The default bug view has changed. See this FAQ.

[CC] clean up COLLECT_TIME_DEBUG

RESOLVED FIXED in mozilla13

Status

()

Core
XPCOM
RESOLVED FIXED
5 years ago
5 years ago

People

(Reporter: mccr8, Assigned: mccr8)

Tracking

Trunk
mozilla13
Points:
---

Firefox Tracking Flags

(Not tracked)

Details

Attachments

(1 attachment, 1 obsolete attachment)

(Assignee)

Description

5 years ago
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)

Updated

5 years ago
Blocks: 697134
(Assignee)

Comment 1

5 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

5 years ago
Created attachment 596413 [details] [diff] [review]
clean up debug timer measurement
Assignee: nobody → continuation
(Assignee)

Comment 3

5 years ago
https://tbpl.mozilla.org/?tree=Try&rev=79a06f6ddea2
(Assignee)

Updated

5 years ago
Attachment #596413 - Flags: review?(bugs)

Comment 4

5 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

5 years ago
Created attachment 596481 [details] [diff] [review]
clean up debug timer measurement

Addressed review comments.

https://hg.mozilla.org/integration/mozilla-inbound/rev/ad782d99ae8f
Attachment #596413 - Attachment is obsolete: true
Attachment #596481 - Flags: review+
(Assignee)

Updated

5 years ago
Target Milestone: --- → mozilla13
https://hg.mozilla.org/mozilla-central/rev/ad782d99ae8f
Status: NEW → RESOLVED
Last Resolved: 5 years ago
Resolution: --- → FIXED
You need to log in before you can comment on or make changes to this bug.