Closed
Bug 726374
Opened 13 years ago
Closed 13 years ago
[CC] clean up COLLECT_TIME_DEBUG
Categories
(Core :: XPCOM, defect)
Core
XPCOM
Tracking
()
RESOLVED
FIXED
mozilla13
People
(Reporter: mccr8, Assigned: mccr8)
References
Details
Attachments
(1 file, 1 obsolete file)
11.66 KB,
patch
|
mccr8
:
review+
|
Details | Diff | Splinter Review |
All of the macro stuff all over the place is a little annoying, and there are a few segments that it is missing coverage for. I also switched to TimeStamp and cleaned up a few misc. timer things.
Assignee | ||
Comment 1•13 years ago
|
||
example output:
cc: ForgetSkippable() took 11ms
cc: mRuntimes[*]->BeginCycleCollection() took 2ms
cc: MarkRoots() took 85ms
cc: ScanRoots() took 14ms
cc: CollectWhite::Root took 1ms
cc: CollectWhite::Unlink took 8ms
cc: CollectWhite::Unroot took 19ms
cc: CollectWhite() took 30ms
cc: ClearGraph() took 4ms
cc: total cycle collector time was 140ms
cc: visited 9849 ref counted and 41542 GCed objects, freed 47120.
cc:
Assignee | ||
Comment 2•13 years ago
|
||
Assignee: nobody → continuation
Assignee | ||
Comment 3•13 years ago
|
||
Assignee | ||
Updated•13 years ago
|
Attachment #596413 -
Flags: review?(bugs)
Comment 4•13 years ago
|
||
Comment on attachment 596413 [details] [diff] [review]
clean up debug timer measurement
> #endif
>
>+
Nit, extra newline
>+#ifdef COLLECT_TIME_DEBUG
>+struct TimeLog
I'd prefer class and then public:
>+{
>+ TimeLog() : mLastCheckpoint(TimeStamp::Now()) {}
>+
>+ void
>+ Checkpoint(const char* aEvent)
>+ {
>+ TimeStamp now = TimeStamp::Now();
>+ PRInt32 dur = (PRInt32) (now - mLastCheckpoint).ToMilliseconds();
Please use C++ casting, or PRInt32(expr).
And would PRUint32 be better. That is used elsewhere.
>+ timeLog.Checkpoint(" CollectWhite::Root");
I'd prefer without spaces, since with indentation it looks like
the time is part of something above.
Attachment #596413 -
Flags: review?(bugs) → review+
Assignee | ||
Comment 5•13 years ago
|
||
Addressed review comments.
https://hg.mozilla.org/integration/mozilla-inbound/rev/ad782d99ae8f
Attachment #596413 -
Attachment is obsolete: true
Attachment #596481 -
Flags: review+
Assignee | ||
Updated•13 years ago
|
Target Milestone: --- → mozilla13
Comment 6•13 years ago
|
||
Status: NEW → RESOLVED
Closed: 13 years ago
Resolution: --- → FIXED
You need to log in
before you can comment on or make changes to this bug.
Description
•