10 #include <linux/kernel.h> 11 #include <linux/err.h> 12 #include <traceevent/event-parse.h> 13 #include <api/fs/tracing_path.h> 14 #include <api/fs/fs.h> 31 struct pevent *pevent = pevent_alloc();
38 return pevent ? 0 : -1;
43 int be = traceevent_host_bigendian();
44 struct pevent *pevent;
50 pevent_set_flag(pevent, PEVENT_NSEC_OUTPUT);
51 pevent_set_file_bigendian(pevent, be);
52 pevent_set_host_bigendian(pevent, be);
58 pevent_func_resolver_t *
func)
63 return pevent_set_function_resolver(
tevent.
pevent, func, machine);
75 static struct event_format*
78 char *tp_dir = get_events_file(sys);
80 struct event_format *
event = NULL;
87 return ERR_PTR(-errno);
89 scnprintf(path,
PATH_MAX,
"%s/%s/format", tp_dir, name);
90 put_events_file(tp_dir);
92 err = filename__read_str(path, &data, &size);
96 pevent_parse_format(pevent, &
event, data, size, sys);
109 return ERR_PTR(-ENOMEM);
117 return ERR_PTR(-ENOMEM);
struct event_format * trace_event__tp_format(const char *sys, const char *name)
static int trace_event__init2(void)
static bool tevent_initialized
int trace_event__register_resolver(struct machine *machine, pevent_func_resolver_t *func)
static struct trace_event tevent
int trace_event__init(struct trace_event *t)
void trace_event__cleanup(struct trace_event *t)
struct event_format * trace_event__tp_format_id(int id)
struct plugin_list * plugin_list
static struct event_format * tp_format(const char *sys, const char *name)