Add timestamp support to GC/CC JSON output

VERIFIED FIXED in mozilla14

Status

()

Core
JavaScript Engine
VERIFIED FIXED
5 years ago
5 years ago

People

(Reporter: billm, Assigned: billm)

Tracking

unspecified
mozilla14
Points:
---

Firefox Tracking Flags

(Not tracked)

Details

Attachments

(1 attachment)

(Assignee)

Description

5 years ago
Created attachment 606782 [details] [diff] [review]
patch

Pretty self-explanatory. I decided to have it pass in the time so that we can use PR_Now instead of PRMJ_Now. It looks like the implementations may be different, so I'd rather use the same one that the rest of the browser uses.
Attachment #606782 - Flags: review?(terrence)
Comment on attachment 606782 [details] [diff] [review]
patch

Review of attachment 606782 [details] [diff] [review]:
-----------------------------------------------------------------

Looks fine.
Attachment #606782 - Flags: review?(terrence) → review+
(Assignee)

Comment 2

5 years ago
https://hg.mozilla.org/integration/mozilla-inbound/rev/31e8a3b6f4c3
Target Milestone: --- → mozilla14
So to calculate the beginning of the GC we would have to do timestamp-duration? Why do we want the timestamp for JSON only? Wouldn't it be helpful to have it in the console message too?
(Assignee)

Comment 4

5 years ago
(In reply to Henrik Skupin (:whimboo) from comment #3)
> So to calculate the beginning of the GC we would have to do
> timestamp-duration?

Yes.

> Why do we want the timestamp for JSON only? Wouldn't it
> be helpful to have it in the console message too?

The console includes a kind of timestamp (the GC(T+x), where x is the time in seconds since the first GC). We used to include an actual timestamp, but it was just a random 16-digit number that wasn't useful to anyone. I guess we could put the time of day in there, but I don't think that would be helpful either. Usually the only thing we care about is how far apart the GCs are.
https://hg.mozilla.org/mozilla-central/rev/31e8a3b6f4c3
Status: NEW → RESOLVED
Last Resolved: 5 years ago
Resolution: --- → FIXED
Verified fixed with Mozilla/5.0 (Macintosh; Intel Mac OS X 10.7; rv:14.0) Gecko/20120321 Firefox/14.0a1 ID:20120321031151

Just to note the timestamp is in microseconds so tools will have to convert it most likely into milliseconds first.
Status: RESOLVED → VERIFIED
You need to log in before you can comment on or make changes to this bug.