Closed Bug 684072 Opened 13 years ago Closed 11 years ago

JS event visualization

Categories

(Core :: JavaScript Engine, defect)

defect
Not set
normal

Tracking

()

RESOLVED WONTFIX

People

(Reporter: billm, Assigned: billm)

Details

Attachments

(1 file)

Attached image screenshot (deleted) —
I wrote this tool a while ago, but it might be of use to some people. It's a Java program that allows you to see when GC happens and why, how much memory is used at any time, etc. You can also instrument benchmarks to add to the output. This allows you to do things like see if a GC ever overlaps with the timed part of SunSpider, or see how the framerate of an animation is affected by incremental GC. (At least that's how I've been using it.) Everything is done in terms of events. There can be single events, like "the trace cache was flushed." Or "this compartment is now using 2048 bytes of GC heap". Each event can have an argument, like "2048 bytes". You can also make intervals with a start and an end event. I've attached a screenshot. There are two "streams" shown. The top stream is for the SunSpider compartment and the bottom stream is for the entire runtime. The green bars show when a SunSpider benchmark is being timed. You can mouse over one and it will tell you how long it took and which benchmark it was (that's the "(4)" part). The bottom part shows GCs. If you have any line graphs, they're overlaid on top of the intervals. It's pretty primitive, but still useful. You need the JDK as well as IBM's SWT widgets. Here's the repo: http://hg.mozilla.org/users/wmccloskey_mozilla.com/telemetry I called it telemetry before I knew about Taras's thing. To build, just run ant. The telemetry.patch should apply to the Mozilla codebase. It adds some basic instrumentation for GCs. You can call the function _event(tag, arg) from JS code in the browser and it will generate events. I have an instrumented version of SunSpider that does this already. I can post it if there's any interest. If it's built into the browser or shell, run with TRACEDIR=/tmp/traces and it will put some trace files in that directory. There is one file per stream. Then run: ./bin/viewer <stream1> <stream2> ...
Assignee: general → wmccloskey
Unassigning myself from old bugs. Don't worry, not quitting.
Status: NEW → RESOLVED
Closed: 11 years ago
Resolution: --- → WONTFIX
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Created:
Updated:
Size: