Closed
Bug 683615
Opened 14 years ago
Closed 13 years ago
Measure time spent in constructors on startup
Categories
(Core Graveyard :: Widget: Android, defect)
Tracking
(Not tracked)
RESOLVED
WONTFIX
People
(Reporter: stechz, Assigned: glandium)
References
Details
Attachments
(1 file, 1 obsolete file)
Our run-time linker could measure the time we are spending in constructors.
Reporter | ||
Updated•14 years ago
|
Assignee: nobody → mh+mozilla
Assignee | ||
Comment 1•14 years ago
|
||
This measures relocations and constructors timings on startup. The interesting part is that it actually only works for the child process, and reports the following on my nexus s: Spent 3ms on relocations, 15ms on constructors.
It should be noted that constructors do include the elfhack initialization, so it also includes relocations.
With elfhack disabled, I get: Spent 98ms on relocations, 4ms on constructors
Two things to note about this:
- elfhack's relocations are much faster than the linker's because it's a tight loop and doesn't need to handle several relocation types.
- constructors have a very low overhead on warm startup (child initialization is a warm startup)
Now, the reason why this patch only works for the child initialization is that we actually don't use our linker when using the library cache, and use the system linker instead. Which means we don't benefit from all the improvements we've made to our linker. I'll file a separate bug for that.
Without library cache (iow, when the libraries are uncompressed on the fly), the timings on the main process look like this:
elfhack disabled: Spent 45ms on relocations, 3ms on constructors
elfhack enabled: Spent 2ms on relocations, 10ms on constructors
It is interesting to see that child process initialization is slower. No idea why at the moment.
Assignee | ||
Comment 2•14 years ago
|
||
With library cache and an experimental fix for bug 686282, this is what I get on cold cache:
elfhack disabled: Spent 241ms on relocations, 327ms on constructors
elfhack enabled: Spent 30ms on relocations, 349ms on constructors
Assignee | ||
Comment 3•14 years ago
|
||
As long as we don't time for more than one hour worth of cumulated time, it's just safe not to care about usec->sec overflow.
Assignee | ||
Updated•14 years ago
|
Attachment #559834 -
Attachment is obsolete: true
Assignee | ||
Comment 4•13 years ago
|
||
It was good to get timings once, I don't think it's useful to land.
Status: NEW → RESOLVED
Closed: 13 years ago
Resolution: --- → WONTFIX
Updated•3 years ago
|
Product: Core → Core Graveyard
You need to log in
before you can comment on or make changes to this bug.
Description
•