109
edits
Joel Reymont (talk | contribs) No edit summary |
Joel Reymont (talk | contribs) |
||
| Line 6: | Line 6: | ||
=== September 14, 2009 === | === September 14, 2009 === | ||
==== XPT_ArenaMalloc and zero-filling memory ==== | |||
Closed [https://bugzilla.mozilla.org/show_bug.cgi?id=516241 Bug 516241]. There's no evidence that zero-filling memset is a bottleneck. DTrace cannot latch onto the return from memset on Snow Leopard, so I can't time it. All I know is that it's called 133,245 times during startup and zero-fills 14,851,995 bytes of memory. | Closed [https://bugzilla.mozilla.org/show_bug.cgi?id=516241 Bug 516241]. There's no evidence that zero-filling memset is a bottleneck. DTrace cannot latch onto the return from memset on Snow Leopard, so I can't time it. All I know is that it's called 133,245 times during startup and zero-fills 14,851,995 bytes of memory. | ||
<pre> | |||
bsmedberg:joelr: do you have evidence that the calloc is hurting? It really | |||
doesn't sound like something that would take a lot of time | |||
bsmedberg:there's no IO, and arena pages are roughly page-sized, right? | |||
joelr:bsmedberg: i don't have evidence that it's hurting, not at all. i just | |||
see it in the startup path a lot. | |||
bsmedberg:"see it" in what way? | |||
joelr:bsmedberg: there's no IO but arena pages are not page-sized. they are 1k | |||
blocks whereas pages are 4k | |||
joelr:bsmedberg: i'm dtracing startup, all functions, that's how i see it | |||
bsmedberg:it's less than a page, then... you really shouldn't be having | |||
memory-thrashing issues with the calloc | |||
bsmedberg:joelr: you mean it takes time, or its just a callcount? | |||
bsmedberg:I'm a little skeptical that the arena actually helps at all, but | |||
that's a different matter. | |||
joelr:bsmedberg: call count, i suppose. i'm also skeptical that arena helps at | |||
all since mac osx has it's own memory allocation optimizations | |||
bsmedberg:And the xpt code has no tests, so unles you have a measured | |||
performance problem I suggest not touching it. | |||
joelr:bsmedberg: i see (tests)... well, i'll look into it a little bit more | |||
since i want to measure a difference vs malloc (no zero-fill). it does crash | |||
with malloc at the moment so i won't be looking into it too much. | |||
bsmedberg:you'd have to basically zero-fill when you allocate items from the | |||
arena | |||
joelr:bsmedberg: because those items expect to be zero-filled? | |||
bsmedberg:seems so, if you're crashing with malloc... | |||
bsmedberg:joelr: ok, well, I'm saying "you have no evidence this bug is worth | |||
fixing, please move on" | |||
</pre> | |||
= Previous statuses = | = Previous statuses = | ||
edits