As others have explained, this is a draft, and wasn't intended for wide consumption. The easiest way I've found to show people an unpublished WordPress blog post draft is to just "save page as" in the browser and then put the resulting file up somewhere. I've done this before without problem, but this is the first time I've sent the link to a public mailing list. Lesson learned! Next time I'll send it privately to the relevant people and mark it clearly as a draft. (Or if anyone can tell me a better way to circulate a WordPress draft -- one that works for a blog that is aggregated on planet.mozilla.org -- I'd be happy to hear it.)
I've stripped out all the WordPress links and stuff from the draft post, because that was confusing lots of people. I've also added a big header at the top explaining it's a draft.
The final post, which won't be much different from this version, will go up on my blog (http://blog.mozilla.com/nnethercote/) in the next day or two.
There hasn't been much meaningful discussion in this thread, and I don't think it will hurt anyone to wait a couple days for your post to be ready. So we'll bury this one and invite you (or anyone) to submit it then.
Ha, perfectly reasonable. Sharing a draft post is an interesting question though, and one I never found a good way to do back when I wrote some wordpress blog posts at a previous job. And according to wordpress.stackexchange[0] (there seems to be a stackexchange site for everything...), there is no easy way to do it.
FWIW, I've always heard the joke as "There are two hard problems....", which I find a little funnier because it starts the same as the original quote by Phil Karlton and just adds the joke at the end.
This is great to see, but I expect that once we have memory instrumentation implemented in Servo that we won't particularly like the initial results. :) I'm guessing that the language still needs some more work before we can start being fully competitive with Gecko, specifically in the areas of virtual structs and non-zeroing drop.
Certainly, as njn has brought online each new memory profiling feature, he's discovered something ridiculous we were doing in Servo (e.g., copying things we thought we weren't; continuous memory leaks; poor use of underlying native gfx buffers, etc.). I suspect that in the near term there's plenty of low-hanging "Servo is doing something dumb" fruit to keep us busy while we log some Rust implementation issues for the smaller things.
Maybe I'm mistaken, but it seems to me that the alignment between elements (at least in C++) is not being taken in account (or maybe I've misunderstood something).
The size of each individual object is determined by calling malloc_usable_size on the block itself, so this includes any internal alignment, as well as any padding from the allocator after the object proper.
So, you get the size of the object, using the callback. Then, if the object has fields that point to other objects, you call the reporter on those fields. Then those two quantities are totaled.
It's easy to do that, we can just put known_heap_size invocations for these.
The reason this is ignored is that we want to figure out how we want to handle things like this (and haven't yet). We can ignore them, count them as <size>/<refcount>, or count their entire size for each owner. Depends on which one is more important for tracing memory bloat.
As others have explained, this is a draft, and wasn't intended for wide consumption. The easiest way I've found to show people an unpublished WordPress blog post draft is to just "save page as" in the browser and then put the resulting file up somewhere. I've done this before without problem, but this is the first time I've sent the link to a public mailing list. Lesson learned! Next time I'll send it privately to the relevant people and mark it clearly as a draft. (Or if anyone can tell me a better way to circulate a WordPress draft -- one that works for a blog that is aggregated on planet.mozilla.org -- I'd be happy to hear it.)
I've stripped out all the WordPress links and stuff from the draft post, because that was confusing lots of people. I've also added a big header at the top explaining it's a draft.
The final post, which won't be much different from this version, will go up on my blog (http://blog.mozilla.com/nnethercote/) in the next day or two.
Apologies for the confusion!