Closed Bug 444845 Opened 12 years ago Closed 12 years ago
Add JS functions to stop/start vtune
This implements a very basic interface to setting up and tearing down vtune programmatically from jsshell / browser js environment, and toggling its collection state on and off. Setup is hard-wired to collect clockticks and instructions retired only, at a relatively high frequency, to start in paused mode (requiring a resumeVtune() to actually start collecting) and to write to a .tb5 sample filename provided as an optional argument (defaulting to "mozilla-vtune.tb5"). I've no reason to prefer these defaults over others, it was just for getting something simple working. Proposed improvements to the interface would be welcome. Presumably something that exposes some quantity of the legal events? (Patch also contains a couple whitespace / docstring fixes for the callgrind patch I noticed while I was in there)
Update to the event names and sampling parameters. This works in vtune 9, which likes core 2 duos. Curiously, vtune 8 and 9 use different event names, and if you use the event names preferred by one with the other, it crashes (despite having an error code it's supposed to use to signal such a condition). Moreover there is no way to detect versions. There is also a strange sensitivity the API has to the sampling interval parameter, even when in EBS mode. It seems that if you don't set the sampling interval high enough, event buffers simply fill up and are ignored (or possibly overwritten) rather than being drained. So I've attempted to set the combination of sampling frequency, buffer size and sampling interval such that nothing is being lost. But this whole arrangement strikes me as slightly absurd. Any vtune experts?
(In reply to comment #2) > Created an attachment (id=329936) [details] > update to vtune patch > > Update to the event names and sampling parameters. This works in vtune 9, which > likes core 2 duos. > Seems like it would be ok to support VTune 9 only. > > There is also a strange sensitivity the API has to the sampling interval > parameter, even when in EBS mode. Maybe someone from Intel can shed some light on this?
Pushed to mozilla-central in revision 74297bc2ef76.
Status: NEW → RESOLVED
Closed: 12 years ago
Resolution: --- → FIXED
You need to log in before you can comment on or make changes to this bug.