Changes

Jump to: navigation, search

DTrace 0.1 Release

2,234 bytes added, 11:14, 18 October 2008
Step 3: Check for current probes
==Step 34: Check for current probes==It is wise that you have 2 Terminals running at this point. 1 will allow you to keep firefox running, the other will allow you to do dtrace grunt work. 
In order to pick up any current probes, you must run the firefox-bin while you do these commands. Re-direct yourself to the Mozilla application you will use.
You are not to use dist/bin! If you do, it will run - but it will not retrieve keyboard input.
Run the executable specified with(you may run it in Background if you wish):<code>./firefox-bin -profilemanager [$]</code>
Upon running, it is wise to create yourself a seperate profile than the one you are using for Firefox. This helps if you have 2 different versions of it running at once.
 
To get a list of any javascript based probes that are currently running, we will use the dtrace command. For Mac users, you need superuser permissions via sudo to make this command run.<br>
 
<code>[sudo] dtrace -n 'javascript*' -l</code>
 
This command will output all currently running scripts matching this naming convention. It will only display probes that are currently running, so firefox must be running in order for this command to output. The output should look something like this (Provider ID may be different):
 
<code>
ID PROVIDER MODULE FUNCTION NAME
20925 javascript333 libmozjs.dylib js_Interpret function-args<br>
20926 javascript333 libmozjs.dylib jsdtrace_function_args function-args<br>
20927 javascript333 libmozjs.dylib js_Interpret function-entry<br>
20928 javascript333 libmozjs.dylib jsdtrace_function_entry function-entry<br>
20929 javascript333 libmozjs.dylib js_Interpret function-info<br>
20930 javascript333 libmozjs.dylib jsdtrace_function_info function-info<br>
20931 javascript333 libmozjs.dylib js_Interpret function-return<br>
20932 javascript333 libmozjs.dylib jsdtrace_function_return function-return<br>
20933 javascript333 libmozjs.dylib js_Interpret function-rval<br>
20934 javascript333 libmozjs.dylib jsdtrace_function_rval function-rval<br>
</code>
 
javascript333 is the unique provider for the probes. 333 is required in case you have 2 programs running that use D-Tracing (replacing the * with the number helps limit your script). libmozjs.dylib is the Mozilla module that has the definition of these probes. Each probe has 5 categories split into 2 functions - the function itself and the interpreter.
 
A list of all the probe definitions can be found at this [http://blogs.sun.com/jmr/entry/dtrace_mozilla_rfe_javascript_tracing blog] written by John Rice.
1
edit

Navigation menu