Closed
Bug 580063
Opened 14 years ago
Closed 14 years ago
functiontimer: report timestamp of latest event
Categories
(Core :: XPCOM, enhancement)
Tracking
()
RESOLVED
FIXED
mozilla2.0b7
People
(Reporter: sfink, Assigned: sfink)
References
Details
Attachments
(1 file, 2 obsolete files)
3.62 KB,
patch
|
vlad
:
review+
benjamin
:
approval2.0+
|
Details | Diff | Splinter Review |
For bug 558200, I want to be able to detect what function timer events have occurred within the execution scope of a Javascript call. If the function timer interface provided a way to get a very precise timestamp of the last reported event, then I could compare the timestamps of matching enter/exit pairs to see if it changed. Attached is a patch that implements a NS_TIME_FUNCTION_LATEST that returns the TimeDuration since app startup. I originally was thinking that I would use byte offsets within the function timer log file, but that would be even more racy than what's already there. Assuming the precision is high enough, the timestamps should be enough to find the exact points in the log.
Assignee | ||
Comment 1•14 years ago
|
||
Not sure why it rejected my attachment the first time. Note that the reason why I want the TimeDuration rather than a TimeStamp is because I need to be able to generate printouts that can be exactly matched against function timer printouts, and those are relative to sAppStart.
Comment on attachment 458451 [details] [diff] [review] Add NS_TIME_FUNCTION_LATEST for latest event timestamp Looks fine, though I would call the Latest() method something that implies that it's a duration since startup.. LatestSinceStartup() is a bit wordy, but maybe something else. Dunno.
Attachment #458451 -
Flags: review?(vladimir) → review+
Assignee | ||
Comment 3•14 years ago
|
||
Ok, I renamed it to LatestSinceStartup and will blame you if anyone complains. I couldn't think of anything else to call it. LatestElapsed() sounded confusing to me. But I agree that it was weird having mLatest and Latest() return entirely different things.
Attachment #458451 -
Attachment is obsolete: true
Assignee | ||
Comment 5•14 years ago
|
||
Found a problem when using this. If no timer events have occurred when you first ask for the latest event time, it'll deref a null pointer.
Attachment #458493 -
Attachment is obsolete: true
Attachment #461334 -
Flags: review?(vladimir)
Attachment #461334 -
Flags: review?(vladimir) → review+
Assignee | ||
Comment 6•14 years ago
|
||
Requesting blocking2.0 (see also bug 507012) because it is very useful for performance profiling (eg what slow internal calls are invoked by this JS call -- see also bug 558200) and is low risk. This would be particularly helpful for mobile.
blocking2.0: --- → ?
Comment 7•14 years ago
|
||
This needs approval2.0 before it can land.
Assignee | ||
Comment 8•14 years ago
|
||
Comment on attachment 461334 [details] [diff] [review] Retrieve latest event timestamp - avoid crash for early use Whoops, I requesting blocking2.0 instead of approval2.0. Doh!
Attachment #461334 -
Flags: approval2.0?
Updated•14 years ago
|
Attachment #461334 -
Flags: approval2.0? → approval2.0+
Assignee | ||
Updated•14 years ago
|
Keywords: checkin-needed
Comment 9•14 years ago
|
||
http://hg.mozilla.org/mozilla-central/rev/c5acd5e8f2a8
Status: ASSIGNED → RESOLVED
Closed: 14 years ago
Keywords: checkin-needed
Resolution: --- → FIXED
Target Milestone: --- → mozilla2.0b6
Updated•14 years ago
|
blocking2.0: ? → ---
You need to log in
before you can comment on or make changes to this bug.
Description
•