By jmr on Mar 09, 2007
But we have changed the namespace to be in sync with the other mozilla probes, so you will need to change the probe names in the script appropriately, for example:
Follow the instructions below to apply the Mozilla Infrastructure and layout patch:
Apply mozilla-js.diff downloaded from bug 370906
Rebuild mozilla as described above, not forgetting to run ./configure –enable-dtrace before hand. Test the probes have been applied by running the newly patched firefox-bin and listing the probes as described below.
$ dtrace -n
ID PROVIDER MODULE FUNCTION NAME
35 trace_mozilla1815 libmozjs.so jsdtrace_execute_done js_execute-done 35 trace_mozilla1815 libmozjs.so jsdtrace_execute_done jsdtrace_execute_start 35 trace_mozilla1815 libmozjs.so jsdtrace_execute_done js_execute-done
#pragma D option quiet
printf("Tracing...Hit Ctrl-C to end.\\n"
@funcs[basename(copyinstr(arg0)), copyinstr(arg2)] = count();
printf("%-32s %-36s %8s\\n", "FILE", "FUNC","CALLS"
printa("%-32s %-36s %@8d\\n", @funcs);
$ dtrace -s js_funcalls.d
FILE FUNC CALLS
autocomplete.xml createEvent 1
autocomplete.xml dispatchEvent 1
: browser.xml QueryInterface 130
nsSessionStore.js QueryInterface 987
nsSessionStore.js getNext 988
nsSessionStore.js hasMoreElements 990