hc
2024-05-10 23fa18eaa71266feff7ba8d83022d9e1cc83c65a
kernel/tools/perf/util/trace-event.c
....@@ -14,7 +14,6 @@
1414 #include <api/fs/fs.h>
1515 #include "trace-event.h"
1616 #include "machine.h"
17
-#include "util.h"
1817
1918 /*
2019 * global trace_event object used by trace_event__tp_format
....@@ -40,7 +39,7 @@
4039
4140 static int trace_event__init2(void)
4241 {
43
- int be = tep_host_bigendian();
42
+ int be = tep_is_bigendian();
4443 struct tep_handle *pevent;
4544
4645 if (trace_event__init(&tevent))
....@@ -49,7 +48,7 @@
4948 pevent = tevent.pevent;
5049 tep_set_flag(pevent, TEP_NSEC_OUTPUT);
5150 tep_set_file_bigendian(pevent, be);
52
- tep_set_host_bigendian(pevent, be);
51
+ tep_set_local_bigendian(pevent, be);
5352 tevent_initialized = true;
5453 return 0;
5554 }
....@@ -72,12 +71,12 @@
7271 /*
7372 * Returns pointer with encoded error via <linux/err.h> interface.
7473 */
75
-static struct event_format*
74
+static struct tep_event*
7675 tp_format(const char *sys, const char *name)
7776 {
7877 char *tp_dir = get_events_file(sys);
7978 struct tep_handle *pevent = tevent.pevent;
80
- struct event_format *event = NULL;
79
+ struct tep_event *event = NULL;
8180 char path[PATH_MAX];
8281 size_t size;
8382 char *data;
....@@ -102,7 +101,7 @@
102101 /*
103102 * Returns pointer with encoded error via <linux/err.h> interface.
104103 */
105
-struct event_format*
104
+struct tep_event*
106105 trace_event__tp_format(const char *sys, const char *name)
107106 {
108107 if (!tevent_initialized && trace_event__init2())
....@@ -111,7 +110,7 @@
111110 return tp_format(sys, name);
112111 }
113112
114
-struct event_format *trace_event__tp_format_id(int id)
113
+struct tep_event *trace_event__tp_format_id(int id)
115114 {
116115 if (!tevent_initialized && trace_event__init2())
117116 return ERR_PTR(-ENOMEM);