44 DTRACE_PROBE(test_prov, zero);
45 DTRACE_PROBE1(test_prov, one, 1);
46 DTRACE_PROBE2(test_prov, two, 2, 3);
47 DTRACE_PROBE3(test_prov, three, 4, 5, 7);
48 DTRACE_PROBE4(test_prov, four, 7, 8, 9, 10);
49 DTRACE_PROBE5(test_prov, five, 11, 12, 13, 14, 15);
50 }
51 EOF
52
53 cat > prov.d <<EOF
54 provider test_prov {
55 probe zero();
56 probe one(uintptr_t);
57 probe two(uintptr_t, uintptr_t);
58 probe three(uintptr_t, uintptr_t, uintptr_t);
59 probe four(uintptr_t, uintptr_t, uintptr_t, uintptr_t);
60 probe five(uintptr_t, uintptr_t, uintptr_t, uintptr_t, uintptr_t);
61 };
62 EOF
63
64 gcc -c test.c
65 if [ $? -ne 0 ]; then
66 print -u2 "failed to compile test.c"
67 exit 1
68 fi
69 $dtrace -G -32 -s prov.d test.o
70 if [ $? -ne 0 ]; then
71 print -u2 "failed to create DOF"
72 exit 1
73 fi
74 gcc -o test test.o prov.o
75 if [ $? -ne 0 ]; then
76 print -u2 "failed to link final executable"
77 exit 1
78 fi
79
80 cd /
81 /usr/bin/rm -rf $DIR
|
44 DTRACE_PROBE(test_prov, zero);
45 DTRACE_PROBE1(test_prov, one, 1);
46 DTRACE_PROBE2(test_prov, two, 2, 3);
47 DTRACE_PROBE3(test_prov, three, 4, 5, 7);
48 DTRACE_PROBE4(test_prov, four, 7, 8, 9, 10);
49 DTRACE_PROBE5(test_prov, five, 11, 12, 13, 14, 15);
50 }
51 EOF
52
53 cat > prov.d <<EOF
54 provider test_prov {
55 probe zero();
56 probe one(uintptr_t);
57 probe two(uintptr_t, uintptr_t);
58 probe three(uintptr_t, uintptr_t, uintptr_t);
59 probe four(uintptr_t, uintptr_t, uintptr_t, uintptr_t);
60 probe five(uintptr_t, uintptr_t, uintptr_t, uintptr_t, uintptr_t);
61 };
62 EOF
63
64 gcc -m32 -c test.c
65 if [ $? -ne 0 ]; then
66 print -u2 "failed to compile test.c"
67 exit 1
68 fi
69 $dtrace -G -32 -s prov.d test.o
70 if [ $? -ne 0 ]; then
71 print -u2 "failed to create DOF"
72 exit 1
73 fi
74 gcc -m32 -o test test.o prov.o
75 if [ $? -ne 0 ]; then
76 print -u2 "failed to link final executable"
77 exit 1
78 fi
79
80 cd /
81 /usr/bin/rm -rf $DIR
|