File tree 1 file changed +25
-1
lines changed
tools/testing/selftests/bpf 1 file changed +25
-1
lines changed Original file line number Diff line number Diff line change 2
2
3
3
#include <stdio.h>
4
4
#include <string.h>
5
+ #include <sdt.h>
5
6
6
7
#define __PASTE (a , b ) a##b
7
8
#define PASTE (a , b ) __PASTE(a, b)
@@ -53,15 +54,38 @@ static int bench(void)
53
54
return 0 ;
54
55
}
55
56
57
+ #define PROBE STAP_PROBE(test, usdt);
58
+
59
+ #define PROBE10 PROBE PROBE PROBE PROBE PROBE \
60
+ PROBE PROBE PROBE PROBE PROBE
61
+ #define PROBE100 PROBE10 PROBE10 PROBE10 PROBE10 PROBE10 \
62
+ PROBE10 PROBE10 PROBE10 PROBE10 PROBE10
63
+ #define PROBE1000 PROBE100 PROBE100 PROBE100 PROBE100 PROBE100 \
64
+ PROBE100 PROBE100 PROBE100 PROBE100 PROBE100
65
+ #define PROBE10000 PROBE1000 PROBE1000 PROBE1000 PROBE1000 PROBE1000 \
66
+ PROBE1000 PROBE1000 PROBE1000 PROBE1000 PROBE1000
67
+
68
+ static int usdt (void )
69
+ {
70
+ PROBE10000
71
+ PROBE10000
72
+ PROBE10000
73
+ PROBE10000
74
+ PROBE10000
75
+ return 0 ;
76
+ }
77
+
56
78
int main (int argc , char * * argv )
57
79
{
58
80
if (argc != 2 )
59
81
goto error ;
60
82
61
83
if (!strcmp ("bench" , argv [1 ]))
62
84
return bench ();
85
+ if (!strcmp ("usdt" , argv [1 ]))
86
+ return usdt ();
63
87
64
88
error :
65
- fprintf (stderr , "usage: %s <bench>\n" , argv [0 ]);
89
+ fprintf (stderr , "usage: %s <bench|usdt >\n" , argv [0 ]);
66
90
return -1 ;
67
91
}
You can’t perform that action at this time.
0 commit comments