Closed
Bug 601949
Opened 14 years ago
Closed 5 months ago
Global GC duration stats
Categories
(Core :: JavaScript Engine, enhancement)
Core
JavaScript Engine
Tracking
()
RESOLVED
INCOMPLETE
People
(Reporter: bjacob, Unassigned)
Details
Attachments
(1 file)
6.30 KB,
patch
|
Details | Diff | Splinter Review |
The attached patch adds a way of getting global stats about the durations of GC pauses. My use case for it is that when a user reports that some animation isn't smooth, a natural guess is that that might be caused by GC pauses, but that isn't too easy to measure with just a profiler as the % of time spend in js_GC is not enough information. Not asking for review because this patch isn't ready for that: * it uses gettimeofday() which is not portable to Windows, and not necessarily the best notion of time; I wanted to use clock_gettime but that required making changes in several makefiles to link to librt. * it should probably be merged with the existing GCTimer stuff. That didn't seem entirely easy to me, in part because GCTimer uses RDTSC and that didn't seem like the notion of time that I wanted to use (I want to count actual time in seconds). I would love however to have some flavor of that checked in, it would help greatly handling graphics bug reports about choppy animations. Usage: define the MOZ_GC_GLOBAL_DURATION_STATS env variable. Stats are printed on exit. Example: $ MOZ_GC_GLOBAL_DURATION_STATS=1 dist/bin/firefox -P test -no-remote http://audioscene.org/scene-files/humph/fotn-beta7-demo/ There have been 26 GC runs. 1 GC runs took between 5.12e-04 and 1.02e-03 seconds 0 GC runs took between 1.02e-03 and 2.05e-03 seconds 0 GC runs took between 2.05e-03 and 4.10e-03 seconds 1 GC runs took between 4.10e-03 and 8.19e-03 seconds 1 GC runs took between 8.19e-03 and 1.64e-02 seconds 4 GC runs took between 1.64e-02 and 3.28e-02 seconds 0 GC runs took between 3.28e-02 and 6.55e-02 seconds 2 GC runs took between 6.55e-02 and 1.31e-01 seconds 13 GC runs took between 1.31e-01 and 2.62e-01 seconds 4 GC runs took between 2.62e-01 and 5.24e-01 seconds Minimum duration of a GC run: 9.942e-04 seconds Average duration of a GC run: 1.587e-01 seconds Maximum duration of a GC run: 3.486e-01 seconds
Comment 1•14 years ago
|
||
I don't think we should duplicate this functionality. Measuring GC pause time and provide basic information for each GC run is the main purpose of the GCTIMER. We should try to merge this functionality and I can help you if you want. I don't have anything against changing to seconds for the time unit. I used rdtsc because it's the (only?) platform independent way to get accurate "time-measurements" and it's already implemented for most platforms in SM. I am totally open for improvements.
Comment 2•14 years ago
|
||
You guys should talk to sfink. He is wiring up platform independent probes for SM and Gecko.
Assignee | ||
Updated•10 years ago
|
Assignee: general → nobody
Updated•2 years ago
|
Severity: normal → S3
Updated•5 months ago
|
Status: NEW → RESOLVED
Closed: 5 months ago
Resolution: --- → INCOMPLETE
You need to log in
before you can comment on or make changes to this bug.
Description
•