Sfink/JS Profiling-Related APIs: Difference between revisions

(Created page with 'I've crawled around js/src/ and attempted to summarize the various APIs used for profiling-related tasks. Some of these are straight profilers, some are general debugging hooks. …')
 
mNo edit summary
 
(One intermediate revision by the same user not shown)
Line 1: Line 1:
I've crawled around js/src/ and attempted to summarize the various APIs used for profiling-related tasks. Some of these are straight profilers, some are general debugging hooks.
I've crawled around js/src/ and attempted to summarize the various APIs used for profiling-related tasks. Some of these are straight profilers, some are general debugging hooks.


* vtune
== vtune ==
** #ifdef MOZ_VTUNE
 
** jsdbgapi: start/stop/pause/resume API
* #ifdef MOZ_VTUNE
** global functions for JS shell & mozJSComponentLoader (NOT xpcshell!)
* jsdbgapi: start/stop/pause/resume API
* shark
* global functions for JS shell & mozJSComponentLoader (NOT xpcshell!)
** #ifdef MOZ_SHARK
 
** jsdbgapi: start/stop/connect/disconnect API (2 unused; should be static?)
== shark ==
** global functions for JS shell & mozJSComponentLoader & xpcshell
 
** command-line option -k for JS shell & xpcshell
* #ifdef MOZ_SHARK
* callgrind
* jsdbgapi: start/stop/connect/disconnect API (2 unused; should be static?)
** #ifdef MOZ_CALLGRIND
* global functions for JS shell & mozJSComponentLoader & xpcshell
** jsdbgapi: start/stop/dump API
* command-line option -k for JS shell & xpcshell
** global functions for JS shell & mozJSComponentLoader & xpcshell
 
* dtrace
== callgrind ==
** #ifdef INCLUDE_MOZILLA_DTRACE
 
** start/stop API unnecessary
* #ifdef MOZ_CALLGRIND
** jsdtracef: enter/exit/execute-enter/execute-exit/objectCreate/finalize probes
* jsdbgapi: start/stop/dump API
** probes in jsgc.cpp, jsinterp.cpp, jsobjinlines.h (obj create), NOT jstracer
* global functions for JS shell & mozJSComponentLoader & xpcshell
* jscall ({{bug|507012}}
 
** #ifdef MOZ_TRACE_JSCALLS
== dtrace ==
** jsapi.h, jscntxt.h: get/set callback API
 
** piggybacks on dtrace probes but adds in jstracer probes
* #ifdef INCLUDE_MOZILLA_DTRACE
** start/stop done in nsJSEnvironment (bug 580055), may add a js/ variant
* start/stop API unnecessary
* debughooks (jsdv1)
* jsdtracef: enter/exit/execute-enter/execute-exit/objectCreate/finalize probes
** unconditionally included
* probes in jsgc.cpp, jsinterp.cpp, jsobjinlines.h (obj create), NOT jstracer
** jsdbgapi: get/set/clear
 
** specific hooks enumerated in JSDebugHooks in jsprvtd.h
== jscall ({{bug|507012}}) ==
** jsprvtd.h: interrupt/newScript/destroyScript/execute/call/throw hooks + some debugger,source code,error stuff
* #ifdef MOZ_TRACE_JSCALLS
** hooks in jsinterp.cpp (almost everything here), jsscan.cpp (source code), jsscript.cpp (newScript,destroyScript), jstracer (callHook when synthesizing a frame)
* jsapi.h, jscntxt.h: get/set callback API
** usage disables trace JIT
* piggybacks on dtrace probes but adds in jstracer probes
* jsdv2
* start/stop done in nsJSEnvironment ({{bug|580055}}), may add a js/ variant
** sorry, I don't know where this is to look at it. I've only read the spec.
 
== debughooks (jsdv1) ==
* unconditionally included
* jsdbgapi: get/set/clear
* specific hooks enumerated in JSDebugHooks in jsprvtd.h
* jsprvtd.h: interrupt/newScript/destroyScript/execute/call/throw hooks + some debugger,source code,error stuff
* hooks in jsinterp.cpp (almost everything here), jsscan.cpp (source code), jsscript.cpp (newScript,destroyScript), jstracer (callHook when synthesizing a frame)
* usage disables trace JIT
 
== jsdv2 ==
* sorry, I don't know where this is to look at it. I've only read the spec.

Latest revision as of 22:17, 30 July 2010

I've crawled around js/src/ and attempted to summarize the various APIs used for profiling-related tasks. Some of these are straight profilers, some are general debugging hooks.

vtune

  • #ifdef MOZ_VTUNE
  • jsdbgapi: start/stop/pause/resume API
  • global functions for JS shell & mozJSComponentLoader (NOT xpcshell!)

shark

  • #ifdef MOZ_SHARK
  • jsdbgapi: start/stop/connect/disconnect API (2 unused; should be static?)
  • global functions for JS shell & mozJSComponentLoader & xpcshell
  • command-line option -k for JS shell & xpcshell

callgrind

  • #ifdef MOZ_CALLGRIND
  • jsdbgapi: start/stop/dump API
  • global functions for JS shell & mozJSComponentLoader & xpcshell

dtrace

  • #ifdef INCLUDE_MOZILLA_DTRACE
  • start/stop API unnecessary
  • jsdtracef: enter/exit/execute-enter/execute-exit/objectCreate/finalize probes
  • probes in jsgc.cpp, jsinterp.cpp, jsobjinlines.h (obj create), NOT jstracer

jscall (bug 507012)

  • #ifdef MOZ_TRACE_JSCALLS
  • jsapi.h, jscntxt.h: get/set callback API
  • piggybacks on dtrace probes but adds in jstracer probes
  • start/stop done in nsJSEnvironment (bug 580055), may add a js/ variant

debughooks (jsdv1)

  • unconditionally included
  • jsdbgapi: get/set/clear
  • specific hooks enumerated in JSDebugHooks in jsprvtd.h
  • jsprvtd.h: interrupt/newScript/destroyScript/execute/call/throw hooks + some debugger,source code,error stuff
  • hooks in jsinterp.cpp (almost everything here), jsscan.cpp (source code), jsscript.cpp (newScript,destroyScript), jstracer (callHook when synthesizing a frame)
  • usage disables trace JIT

jsdv2

  • sorry, I don't know where this is to look at it. I've only read the spec.