Last Comment Bug 638284 - JM: Simple function-level hit and cycle counter
: JM: Simple function-level hit and cycle counter
Product: Core
Classification: Components
Component: JavaScript Engine (show other bugs)
: unspecified
: x86_64 Linux
-- normal (vote)
: ---
Assigned To: general
: Jason Orendorff [:jorendorff]
Depends on:
  Show dependency treegraph
Reported: 2011-03-02 16:14 PST by David Anderson [:dvander]
Modified: 2013-06-10 09:39 PDT (History)
9 users (show)
See Also:
Crash Signature:
QA Whiteboard:
Iteration: ---
Points: ---
Has Regression Range: ---
Has STR: ---

v0 (18.43 KB, patch)
2011-03-02 16:14 PST, David Anderson [:dvander]
no flags Details | Diff | Splinter Review

Description User image David Anderson [:dvander] 2011-03-02 16:14:52 PST
Created attachment 516441 [details] [diff] [review]

This patch starts an rdtsc timer at function prologues, then takes the difference at the epilogue and adds it to script->ncycles. When a script is destroyed, its statistics are dumped like this:

jit prof (script "crypto.js") (line "243") (cycles 12250744) (hits 158295) (per 77)

There's no callgraph information or anything yet. This is quick and dirty and I'm not sure if it's enough to be helpful yet.
Comment 1 User image Jan de Mooij [:jandem] 2013-06-10 09:39:26 PDT
JM was removed, and there's pccounts + code to integrate with various profilers now.

Note You need to log in before you can comment on or make changes to this bug.