.. | .. |
---|
14 | 14 | #include <api/fs/fs.h> |
---|
15 | 15 | #include "trace-event.h" |
---|
16 | 16 | #include "machine.h" |
---|
17 | | -#include "util.h" |
---|
18 | 17 | |
---|
19 | 18 | /* |
---|
20 | 19 | * global trace_event object used by trace_event__tp_format |
---|
.. | .. |
---|
40 | 39 | |
---|
41 | 40 | static int trace_event__init2(void) |
---|
42 | 41 | { |
---|
43 | | - int be = tep_host_bigendian(); |
---|
| 42 | + int be = tep_is_bigendian(); |
---|
44 | 43 | struct tep_handle *pevent; |
---|
45 | 44 | |
---|
46 | 45 | if (trace_event__init(&tevent)) |
---|
.. | .. |
---|
49 | 48 | pevent = tevent.pevent; |
---|
50 | 49 | tep_set_flag(pevent, TEP_NSEC_OUTPUT); |
---|
51 | 50 | tep_set_file_bigendian(pevent, be); |
---|
52 | | - tep_set_host_bigendian(pevent, be); |
---|
| 51 | + tep_set_local_bigendian(pevent, be); |
---|
53 | 52 | tevent_initialized = true; |
---|
54 | 53 | return 0; |
---|
55 | 54 | } |
---|
.. | .. |
---|
72 | 71 | /* |
---|
73 | 72 | * Returns pointer with encoded error via <linux/err.h> interface. |
---|
74 | 73 | */ |
---|
75 | | -static struct event_format* |
---|
| 74 | +static struct tep_event* |
---|
76 | 75 | tp_format(const char *sys, const char *name) |
---|
77 | 76 | { |
---|
78 | 77 | char *tp_dir = get_events_file(sys); |
---|
79 | 78 | struct tep_handle *pevent = tevent.pevent; |
---|
80 | | - struct event_format *event = NULL; |
---|
| 79 | + struct tep_event *event = NULL; |
---|
81 | 80 | char path[PATH_MAX]; |
---|
82 | 81 | size_t size; |
---|
83 | 82 | char *data; |
---|
.. | .. |
---|
102 | 101 | /* |
---|
103 | 102 | * Returns pointer with encoded error via <linux/err.h> interface. |
---|
104 | 103 | */ |
---|
105 | | -struct event_format* |
---|
| 104 | +struct tep_event* |
---|
106 | 105 | trace_event__tp_format(const char *sys, const char *name) |
---|
107 | 106 | { |
---|
108 | 107 | if (!tevent_initialized && trace_event__init2()) |
---|
.. | .. |
---|
111 | 110 | return tp_format(sys, name); |
---|
112 | 111 | } |
---|
113 | 112 | |
---|
114 | | -struct event_format *trace_event__tp_format_id(int id) |
---|
| 113 | +struct tep_event *trace_event__tp_format_id(int id) |
---|
115 | 114 | { |
---|
116 | 115 | if (!tevent_initialized && trace_event__init2()) |
---|
117 | 116 | return ERR_PTR(-ENOMEM); |
---|