1DTRACE(1) General Commands Manual DTRACE(1)
2
3
4
6 dtrace - Dtrace compatibile user application static probe generation
7 tool.
8
9
11 dtrace -s file [OPTIONS]
12
13
15 The dtrace command converts probe descriptions defined in file.d into a
16 probe header file via the -h option or a probe description file via the
17 -G option.
18
19
21 -h generate a systemtap header file.
22
23
24 -G generate a systemtap probe definition object file.
25
26
27 -o file
28 is the name of the output file. If the -G option is given then
29 the output file will be called file.o; if the -h option is given
30 then the output file will be called file.h.
31
32
33 -C run the cpp preprocessor on the input file when the -h option is
34 given.
35
36
37 -I file
38 give this include path to cpp when the -C option is given.
39
40
41 -k keep temporary files, for example the C language source for the
42 -G option.
43
44
45 --types
46 generate probe argument typedef information when the -h option
47 is given.
48
49
51 Systemtap is source compatible with dtrace user application static
52 probe support. Given a file test.d containing:
53 provider sdt_probes
54 {
55 probe test_0 (int type);
56 probe test_1 (struct astruct node);
57 };
58 struct astruct {int a; int b;};
59 Then the command "dtrace -s test.d -G" will create the probe definition
60 file test.o and the command "dtrace -s test.d -h" will create the probe
61 header file test.h Subsequently the application can define probes using
62 #include "test.h"
63 ...
64 struct astruct s;
65 ...
66 SDT_PROBES_TEST_0(value);
67 ...
68 SDT_PROBES_TEST_1(s);
69
70 The application is linked with "test.o" when it is built.
71
72
74 stap(1) stappaths(7)
75
76
77
78
79 DTRACE(1)