aboutsummaryrefslogtreecommitdiffstats
path: root/tools/lib/traceevent/event-parse.h
diff options
context:
space:
mode:
Diffstat (limited to 'tools/lib/traceevent/event-parse.h')
-rw-r--r--tools/lib/traceevent/event-parse.h25
1 files changed, 22 insertions, 3 deletions
diff --git a/tools/lib/traceevent/event-parse.h b/tools/lib/traceevent/event-parse.h
index feab94281634..7a3873ff9a4f 100644
--- a/tools/lib/traceevent/event-parse.h
+++ b/tools/lib/traceevent/event-parse.h
@@ -107,8 +107,8 @@ typedef int (*pevent_event_handler_func)(struct trace_seq *s,
107typedef int (*pevent_plugin_load_func)(struct pevent *pevent); 107typedef int (*pevent_plugin_load_func)(struct pevent *pevent);
108typedef int (*pevent_plugin_unload_func)(struct pevent *pevent); 108typedef int (*pevent_plugin_unload_func)(struct pevent *pevent);
109 109
110struct plugin_option { 110struct pevent_plugin_option {
111 struct plugin_option *next; 111 struct pevent_plugin_option *next;
112 void *handle; 112 void *handle;
113 char *file; 113 char *file;
114 char *name; 114 char *name;
@@ -135,7 +135,7 @@ struct plugin_option {
135 * PEVENT_PLUGIN_OPTIONS: (optional) 135 * PEVENT_PLUGIN_OPTIONS: (optional)
136 * Plugin options that can be set before loading 136 * Plugin options that can be set before loading
137 * 137 *
138 * struct plugin_option PEVENT_PLUGIN_OPTIONS[] = { 138 * struct pevent_plugin_option PEVENT_PLUGIN_OPTIONS[] = {
139 * { 139 * {
140 * .name = "option-name", 140 * .name = "option-name",
141 * .plugin_alias = "overide-file-name", (optional) 141 * .plugin_alias = "overide-file-name", (optional)
@@ -208,6 +208,11 @@ struct print_arg_string {
208 int offset; 208 int offset;
209}; 209};
210 210
211struct print_arg_bitmask {
212 char *bitmask;
213 int offset;
214};
215
211struct print_arg_field { 216struct print_arg_field {
212 char *name; 217 char *name;
213 struct format_field *field; 218 struct format_field *field;
@@ -274,6 +279,7 @@ enum print_arg_type {
274 PRINT_DYNAMIC_ARRAY, 279 PRINT_DYNAMIC_ARRAY,
275 PRINT_OP, 280 PRINT_OP,
276 PRINT_FUNC, 281 PRINT_FUNC,
282 PRINT_BITMASK,
277}; 283};
278 284
279struct print_arg { 285struct print_arg {
@@ -288,6 +294,7 @@ struct print_arg {
288 struct print_arg_hex hex; 294 struct print_arg_hex hex;
289 struct print_arg_func func; 295 struct print_arg_func func;
290 struct print_arg_string string; 296 struct print_arg_string string;
297 struct print_arg_bitmask bitmask;
291 struct print_arg_op op; 298 struct print_arg_op op;
292 struct print_arg_dynarray dynarray; 299 struct print_arg_dynarray dynarray;
293 }; 300 };
@@ -354,6 +361,8 @@ enum pevent_func_arg_type {
354 361
355enum pevent_flag { 362enum pevent_flag {
356 PEVENT_NSEC_OUTPUT = 1, /* output in NSECS */ 363 PEVENT_NSEC_OUTPUT = 1, /* output in NSECS */
364 PEVENT_DISABLE_SYS_PLUGINS = 1 << 1,
365 PEVENT_DISABLE_PLUGINS = 1 << 2,
357}; 366};
358 367
359#define PEVENT_ERRORS \ 368#define PEVENT_ERRORS \
@@ -410,9 +419,19 @@ enum pevent_errno {
410 419
411struct plugin_list; 420struct plugin_list;
412 421
422#define INVALID_PLUGIN_LIST_OPTION ((char **)((unsigned long)-1))
423
413struct plugin_list *traceevent_load_plugins(struct pevent *pevent); 424struct plugin_list *traceevent_load_plugins(struct pevent *pevent);
414void traceevent_unload_plugins(struct plugin_list *plugin_list, 425void traceevent_unload_plugins(struct plugin_list *plugin_list,
415 struct pevent *pevent); 426 struct pevent *pevent);
427char **traceevent_plugin_list_options(void);
428void traceevent_plugin_free_options_list(char **list);
429int traceevent_plugin_add_options(const char *name,
430 struct pevent_plugin_option *options);
431void traceevent_plugin_remove_options(struct pevent_plugin_option *options);
432void traceevent_print_plugins(struct trace_seq *s,
433 const char *prefix, const char *suffix,
434 const struct plugin_list *list);
416 435
417struct cmdline; 436struct cmdline;
418struct cmdline_list; 437struct cmdline_list;