7 __attribute__ ((visibility ("protected")))
8 extern struct marker __start___markers
[];
10 __attribute__ ((visibility ("protected")))
11 extern struct marker __stop___markers
[];
14 * __mark_empty_function - Empty probe callback
15 * @probe_private: probe private data
16 * @call_private: call site private data
18 * @...: variable argument list
20 * Empty callback provided as a probe to the markers. By providing this to a
21 * disabled marker, we make sure the execution flow is always valid even
22 * though the function pointer change and the marker enabling are two distinct
23 * operations that modifies the execution flow of preemptible code.
25 __attribute__ ((visibility ("protected")))
26 void __mark_empty_function(void *probe_private
, void *call_private
,
27 const char *fmt
, va_list *args
)
32 * marker_probe_cb Callback that prepares the variable argument list for probes.
33 * @mdata: pointer of type struct marker
34 * @call_private: caller site private data
36 * @...: Variable argument list.
39 __attribute__ ((visibility ("protected")))
40 void marker_probe_cb(const struct marker
*mdata
, void *call_private
,
47 vsnprintf(buf
, PAGE_SIZE
-1, fmt
, ap
);
52 //FIXME : imv_read won't work with optimized immediate values.
53 //will need to issue one sys_marker call for each immediate value.
54 __attribute__ ((visibility ("protected")))
57 printf("addr : %p\n", __builtin_return_address(0));
60 __attribute__((constructor
, visibility ("protected")))
61 void marker_init(void)
66 printf("Marker section : from %p to %p (init)\n",
67 __start___markers
, __stop___markers
);
69 for (iter
= __start___markers
; iter
< __stop___markers
; iter
++) {
70 printf("Marker : %s\n", iter
->name
);
71 ret
= sys_marker(iter
->name
, iter
->format
,
72 &imv_read(iter
->state
), 1);
74 perror("Error connecting markers");
78 __attribute__((destructor
, visibility ("protected")))
79 void marker_fini(void)
84 printf("Marker section : from %p to %p (fini)\n",
85 __start___markers
, __stop___markers
);
86 for (iter
= __start___markers
; iter
< __stop___markers
; iter
++) {
87 printf("Marker : %s\n", iter
->name
);
88 ret
= sys_marker(iter
->name
, iter
->format
,
89 &imv_read(iter
->state
), 0);
91 perror("Error disconnecting markers");
This page took 0.031461 seconds and 4 git commands to generate.