Closed Bug 599499 Opened 15 years ago Closed 12 years ago

Implement opagent (oprofile JIT agent) support for JM

Categories

(Core :: JavaScript Engine, enhancement)

x86_64
Linux
enhancement
Not set
normal

Tracking

()

RESOLVED WONTFIX

People

(Reporter: sfink, Unassigned)

References

Details

Attachments

(2 files, 8 obsolete files)

See <http://oprofile.sourceforge.net/doc/devel/index.html> for the API. This would allow getting Javascript source:lineno information into oprofile dumps for JITted code (opreport and opannotate). WebKit is working on this support: https://bugs.webkit.org/show_bug.cgi?id=32561 oprofile usage instructions (for once this is implemented) are at http://oprofile.sourceforge.net/doc/setup-jit.html
Attached patch adds oprofile support to JM (obsolete) — Splinter Review
Thanks for filing this, Steve! I made a small patch to add oprofile support to the method JIT a while ago, which is attached. The hard part is getting the shell and the browser to link with libopagent, which is part of oprofile. I have no idea how to do this properly.
Bug 463730 covers adding oprofile support to TraceMonkey (no activity yet, but more cc's), not sure if the bugs should be linked somehow...
This came up again. Some time ago, I did some of the configure stuff for integrating this. I can't actually remember how far I made it, so I'm not sure what the state of this patch is, but it probably isn't usable right now. Attaching more as a better starting point.
Attached patch add oprofile support to JM (obsolete) — Splinter Review
I've been playing with this today. I'm attaching the patch that I've been using, even though it's slow and done the wrong way. It sorta seems to work, though I'm not very familiar with oprofile so it's hard to tell. I did get it to spit out annotated versions of jquery.js and jquery-ui.js with call counts and times on some of the lines. My current usage instructions, from memory: * install oprofile * install opagent-devel (or the equivalent) * apply patch * in mozconfig: ac_add_options --with-opagent * sudo opcontrol --start-daemon --no-vmlinux * sudo opcontrol --start * run the browser on your test scenario * sudo opcontrol --stop; sudo opcontrol --dump Now you have data. opreport and opannotate will take that data and produce gibberish. To get something vaguely interesting, run opannotate --source --include-file='*.js' -o stuff it'll think for a long time and spew out stuff. At the end it'll complain about not being able to find files like 'http://googleapis.com/blah/jquery.js'. wget those into a dummy directory structure (starting with 'http:'). Run again. Now you should have annotated .js files buried in there. Lots of work to go.
Attachment #478411 - Attachment is obsolete: true
Attachment #516476 - Attachment is obsolete: true
Attached patch opagent build (obsolete) — Splinter Review
Temporary split-out patch to add some config options for opagent and other JIT code observers.
Attachment #516753 - Attachment is obsolete: true
Mostly attaching here as a base for bug 642320
Depends on: 645887
Attached patch opagent build (obsolete) — Splinter Review
This patch now depends on bug 642320 (instead of the other way around), which itself depends on the patches in bug 645887.
This patch now depends on bug 642320 (instead of the other way around), which itself depends on the patches in bug 645887.
Attachment #521037 - Attachment is obsolete: true
Attachment #521038 - Attachment is obsolete: true
Summary: Implement opagent (oprofile JIT agent) support → Implement opagent (oprofile JIT agent) support for JM
Attached patch opagent buildSplinter Review
my clumsy attempt at configure-fu for dealing with where opagent gets installed
Attachment #522548 - Attachment is obsolete: true
Rewritten for new JIT registration API
Attachment #522549 - Attachment is obsolete: true
Rebased to be tied to the process, not the runtime, since that's how opagent works.
Attachment #559736 - Attachment is obsolete: true
JM was removed.
Status: NEW → RESOLVED
Closed: 12 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: