Closed Bug 726374 Opened 13 years ago Closed 13 years ago

[CC] clean up COLLECT_TIME_DEBUG

Categories

(Core :: XPCOM, defect)

defect
Not set
normal

Tracking

()

RESOLVED FIXED
mozilla13

People

(Reporter: mccr8, Assigned: mccr8)

References

Details

Attachments

(1 file, 1 obsolete file)

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.
Blocks: 697134
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:
Attached patch clean up debug timer measurement (obsolete) — Splinter Review
Assignee: nobody → continuation
Attachment #596413 - Flags: review?(bugs)
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+
Attachment #596413 - Attachment is obsolete: true
Attachment #596481 - Flags: review+
Target Milestone: --- → mozilla13
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.

Attachment

General

Created:
Updated:
Size: