Closed Bug 454082 Opened 16 years ago Closed 6 years ago

add vprof-style timing probes

Categories

(Tamarin Graveyard :: Virtual Machine, defect)

x86
Windows XP
defect
Not set
normal

Tracking

(Not tracked)

RESOLVED WONTFIX
Future

People

(Reporter: edwsmith, Assigned: rreitmai)

Details

(Whiteboard: loose-end)

Attachments

(1 file, 4 obsolete files)

Attached patch add tprof macros (x86 only) (obsolete) — Splinter Review
VProf is so nice, lets extend it to support simple timers. these two probes are designed to time different phases in a group; when one starts, it stops the previous one, with only one sample taken so there is no "lost" time. _ntprof(e) start timer e, stop previous ntprof timer. _tprof_end() end It would also be nice to support independent and nestable groups so, for example, timing a short span down in a library doesn't end the timer for some independent group of timers. It would also be nice to have file/line based names in addition to explicit names.
Attachment #337304 - Flags: review?(mohammad.r.haghighat)
Attached file vprof-based timers (obsolete) —
Here are a few examples of using the tprof utility: A nestable timer: _TPROF_DECL (timer, "timer name"); _TPROF_START (timer); ... _TPROF_STOP (timer); A continuous timer: _TPROF_CONT (ctimer, "timer name); Continuous timers need to be declared and imported using _TPROF_GDECL and imported to other files using _TPROF_IGDECL. Defining and importing global timers: _TPROF_GDECL (timer, "timer name"); // declare a global timer _TPROF_IGDECL (timer); // import a global timer Only tprof.h needs to be added to Tamarin. The other two files, timer.cpp and timer2.cpp, are just drivers that show how to use tprof. Continuous timers may subsume Ed's patch, but they can co-exist as well. Let me know if there were any problems or you have any comments or suggestions. I'll be out of office the entire of next week.
Attached file vprof-based timers (obsolete) —
fixed a minor problem.
Attachment #338149 - Attachment is obsolete: true
Attachment #337304 - Flags: review?(mohammad.r.haghighat)
Move bug to Tamarin central and assign
Assignee: nobody → rreitmai
Status: NEW → ASSIGNED
Component: Tracing Virtual Machine → Virtual Machine
QA Contact: tracing-vm → vm
Further patch to support exclusive timings will be added ontop of this one. This patch performs inclusive timings (i.e. probes may include time spent in other probes).
Attachment #337304 - Attachment is obsolete: true
Attachment #338157 - Attachment is obsolete: true
Attachment #377234 - Flags: review?(edwsmith)
(patch doesn't apply cleanly against current redux tip)
Attachment #377234 - Attachment is obsolete: true
Attachment #377234 - Flags: review?(edwsmith)
Flags: flashplayer-qrb+
Target Milestone: --- → flash10.x
Blocks: 486742
Priority: -- → P3
ver 3 contains (1) support nested timing probes (2) conversion of existing timed code to use new probes. (3) support to send vprof output to a file. (4) winmo/32 likes %I64d (5) _rdtsc() to use full available resolution of timer (ticks). Output of timer tick resolution printed as part of output. I believe that the deopt profiling work requires the old timer macros. Recommend adding them back-in post-patch as needed.
Attachment #378446 - Flags: review?(edwsmith)
Attachment #378446 - Flags: review?(edwsmith) → review?(tharwood)
Comment on attachment 378446 [details] [diff] [review] ver 3 - contains more winmo fixes and rebase delegating review
Attachment #378446 - Flags: superreview?(edwsmith)
Comment on attachment 378446 [details] [diff] [review] ver 3 - contains more winmo fixes and rebase The dump-to-file name is pretty idiosyncratic, can it be passed to the dump routine?
Attachment #378446 - Flags: review?(tharwood) → review+
lets make sure this stuff aligns with the over-time logging; is one set of probes possible?
tom: we could pass the file, but it's more of a utility issue. vprof is not enabled without a recompile and we'd like to send output to stdout by default. Only on systems where its difficult to get stdout (say winmo) will file output be typically used. ed: i'm guessing no. over-time logging, I'm assuming is hand-off based, where one regions' time ends another begins. With these probes, you time a region of code much like a stopwatch; on/off.
it turned out we needed to track nesting after all, so there might be more overlap than we thought. I think the only difference between traditional vprof nested timers, and the over-time logging, is the window of time youre interested in. (traditional = 1 interval for the whole program. over time = N small intervals).
tom/ed: not sure what is needed to proceed? Ed did you want Tom to check for overlap?
Attachment #378446 - Flags: superreview?(edwsmith) → superreview+
Rick, What's the resolution of this bug? Is there a follow-on patch to deal with nesting?
Flags: flashplayer-qrb+ → flashplayer-qrb?
Nesting is already part of the patch. If there's no further objections, I'll land it.
Flags: flashplayer-qrb? → flashplayer-qrb+
Moving to "Future" target per conversation with Rick. If this patch is required, it should be rebased and landed.
Target Milestone: flash10.1 → Future
No longer blocks: 486742
Priority: P3 → --
Status: ASSIGNED → NEW
Whiteboard: loose-end
Tamarin isn't maintained anymore. WONTFIX remaining bugs.
Status: NEW → RESOLVED
Closed: 6 years ago
Resolution: --- → WONTFIX
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Creator:
Created:
Updated:
Size: