]> CyberLeo.Net >> Repos - FreeBSD/releng/10.0.git/blob - cddl/contrib/dtracetoolkit/JavaScript/Readme
- Copy stable/10 (r259064) to releng/10.0 as part of the
[FreeBSD/releng/10.0.git] / cddl / contrib / dtracetoolkit / JavaScript / Readme
1 JavaScript - DTracing JavaScript
2
3    There scripts trace the JavaScript programming language, and require a
4    browser to be built with the DTrace JavaScript provider.
5
6    The DTrace JavaScript provider was originally written by Brendan Gregg,
7    and later developed as part of a Mozilla DTrace provider suite by
8    engineers from both Sun and Mozilla. It currently exists as patches
9    to the Mozilla source tree and requires building from source to get
10    working; it may be integrated into Solaris builds by default in the
11    future. To download the current patches and instructions, visit,
12
13         http://www.opensolaris.org/os/project/mozilla-dtrace/
14
15    A rough guide for the process is,
16
17         1. Download the Mozilla source
18                 http://developer.mozilla.org/en/docs/Mozilla_Source_Code_Via_CVS
19         2. Download the Mozilla DTrace framework patch, and apply
20                 https://bugzilla.mozilla.org/show_bug.cgi?id=370906
21         3. Download the JavaScript DTrace provider patch, and apply
22                 https://bugzilla.mozilla.org/show_bug.cgi?id=388564
23         4. Create a .mozconfig file (needed for compilation).
24         5. Setup various compilation environment vars (CC/CFLAGS/CXX/...)
25         6. autoconf
26         7. ./configure --enable-dtrace
27         8. gmake
28
29    See John Rice's instructions linked from the OpenSolaris page above
30    for details on steps 4-8.
31
32    Since the DTrace JavaScript provider may be developed further, there is a
33    chance that it has changed slightly by the time you are reading this,
34    causing these scripts to either break or behave oddly. Firstly, check for
35    newer versions of the DTraceToolkit; if it hasn't been updated and you need
36    to use these scripts immediately, then updating them shouldn't take
37    too long. The following was the state of the provider when these scripts
38    were written - check for changes and update the scripts accordingly,
39
40         provider javascript {
41             probe function-entry(file, class, func)
42             probe function-info(file, class, func, lineno, runfile, runlineno)
43             probe function-args(file, class, func, argc, argv, argv0, argv1,
44                 argv2, argv3, argv4)
45             probe function-rval(file, class, func, lineno, rval, rval0)
46             probe function-return(file, class, func)
47             probe object-create-start(file, class)
48             probe object-create(file, class, *object, rlineno)
49             probe object-create-done(file, class)
50             probe object-finalize(NULL, class, *object)
51             probe execute-start(file, lineno)
52             probe execute-done(file, lineno)
53         };
54