aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorArnaldo Carvalho de Melo <acme@redhat.com>2019-08-26 18:02:31 -0400
committerArnaldo Carvalho de Melo <acme@redhat.com>2019-08-26 18:39:11 -0400
commit69d81f09e1607b577346c0579bf938c1194bff3a (patch)
tree9bac5bd977e2c0ae2e636c183e67450924c1c6de
parentb1fcd190bb3fc1234dca60390d171a4cc75b21b2 (diff)
libperf: Rename the PERF_RECORD_ structs to have a "perf" suffix
Even more, to have a "perf_record_" prefix, so that they match the PERF_RECORD_ enum they map to. Cc: Adrian Hunter <adrian.hunter@intel.com> Cc: Jiri Olsa <jolsa@kernel.org> Cc: Namhyung Kim <namhyung@kernel.org> Link: https://lkml.kernel.org/n/tip-qbabmcz2a0pkzt72liyuz3p8@git.kernel.org Signed-off-by: Arnaldo Carvalho de Melo <acme@redhat.com>
-rw-r--r--tools/perf/lib/include/perf/event.h24
-rw-r--r--tools/perf/tests/parse-no-sample-id-all.c4
-rw-r--r--tools/perf/util/bpf-event.c12
-rw-r--r--tools/perf/util/event.h30
-rw-r--r--tools/perf/util/evsel.c4
-rw-r--r--tools/perf/util/evsel.h2
-rw-r--r--tools/perf/util/intel-bts.c2
-rw-r--r--tools/perf/util/namespaces.c2
-rw-r--r--tools/perf/util/namespaces.h4
-rw-r--r--tools/perf/util/python.c44
-rw-r--r--tools/perf/util/session.c2
-rw-r--r--tools/perf/util/thread.c4
-rw-r--r--tools/perf/util/thread.h4
13 files changed, 69 insertions, 69 deletions
diff --git a/tools/perf/lib/include/perf/event.h b/tools/perf/lib/include/perf/event.h
index e768a2dfbe53..36ad3a4a79e6 100644
--- a/tools/perf/lib/include/perf/event.h
+++ b/tools/perf/lib/include/perf/event.h
@@ -7,7 +7,7 @@
7#include <linux/limits.h> 7#include <linux/limits.h>
8#include <linux/bpf.h> 8#include <linux/bpf.h>
9 9
10struct mmap_event { 10struct perf_record_mmap {
11 struct perf_event_header header; 11 struct perf_event_header header;
12 __u32 pid, tid; 12 __u32 pid, tid;
13 __u64 start; 13 __u64 start;
@@ -16,7 +16,7 @@ struct mmap_event {
16 char filename[PATH_MAX]; 16 char filename[PATH_MAX];
17}; 17};
18 18
19struct mmap2_event { 19struct perf_record_mmap2 {
20 struct perf_event_header header; 20 struct perf_event_header header;
21 __u32 pid, tid; 21 __u32 pid, tid;
22 __u64 start; 22 __u64 start;
@@ -31,33 +31,33 @@ struct mmap2_event {
31 char filename[PATH_MAX]; 31 char filename[PATH_MAX];
32}; 32};
33 33
34struct comm_event { 34struct perf_record_comm {
35 struct perf_event_header header; 35 struct perf_event_header header;
36 __u32 pid, tid; 36 __u32 pid, tid;
37 char comm[16]; 37 char comm[16];
38}; 38};
39 39
40struct namespaces_event { 40struct perf_record_namespaces {
41 struct perf_event_header header; 41 struct perf_event_header header;
42 __u32 pid, tid; 42 __u32 pid, tid;
43 __u64 nr_namespaces; 43 __u64 nr_namespaces;
44 struct perf_ns_link_info link_info[]; 44 struct perf_ns_link_info link_info[];
45}; 45};
46 46
47struct fork_event { 47struct perf_record_fork {
48 struct perf_event_header header; 48 struct perf_event_header header;
49 __u32 pid, ppid; 49 __u32 pid, ppid;
50 __u32 tid, ptid; 50 __u32 tid, ptid;
51 __u64 time; 51 __u64 time;
52}; 52};
53 53
54struct lost_event { 54struct perf_record_lost {
55 struct perf_event_header header; 55 struct perf_event_header header;
56 __u64 id; 56 __u64 id;
57 __u64 lost; 57 __u64 lost;
58}; 58};
59 59
60struct lost_samples_event { 60struct perf_record_lost_samples {
61 struct perf_event_header header; 61 struct perf_event_header header;
62 __u64 lost; 62 __u64 lost;
63}; 63};
@@ -65,7 +65,7 @@ struct lost_samples_event {
65/* 65/*
66 * PERF_FORMAT_ENABLED | PERF_FORMAT_RUNNING | PERF_FORMAT_ID 66 * PERF_FORMAT_ENABLED | PERF_FORMAT_RUNNING | PERF_FORMAT_ID
67 */ 67 */
68struct read_event { 68struct perf_record_read {
69 struct perf_event_header header; 69 struct perf_event_header header;
70 __u32 pid, tid; 70 __u32 pid, tid;
71 __u64 value; 71 __u64 value;
@@ -74,7 +74,7 @@ struct read_event {
74 __u64 id; 74 __u64 id;
75}; 75};
76 76
77struct throttle_event { 77struct perf_record_throttle {
78 struct perf_event_header header; 78 struct perf_event_header header;
79 __u64 time; 79 __u64 time;
80 __u64 id; 80 __u64 id;
@@ -85,7 +85,7 @@ struct throttle_event {
85#define KSYM_NAME_LEN 256 85#define KSYM_NAME_LEN 256
86#endif 86#endif
87 87
88struct ksymbol_event { 88struct perf_record_ksymbol {
89 struct perf_event_header header; 89 struct perf_event_header header;
90 __u64 addr; 90 __u64 addr;
91 __u32 len; 91 __u32 len;
@@ -94,7 +94,7 @@ struct ksymbol_event {
94 char name[KSYM_NAME_LEN]; 94 char name[KSYM_NAME_LEN];
95}; 95};
96 96
97struct bpf_event { 97struct perf_record_bpf_event {
98 struct perf_event_header header; 98 struct perf_event_header header;
99 __u16 type; 99 __u16 type;
100 __u16 flags; 100 __u16 flags;
@@ -104,7 +104,7 @@ struct bpf_event {
104 __u8 tag[BPF_TAG_SIZE]; // prog tag 104 __u8 tag[BPF_TAG_SIZE]; // prog tag
105}; 105};
106 106
107struct sample_event { 107struct perf_record_sample {
108 struct perf_event_header header; 108 struct perf_event_header header;
109 __u64 array[]; 109 __u64 array[];
110}; 110};
diff --git a/tools/perf/tests/parse-no-sample-id-all.c b/tools/perf/tests/parse-no-sample-id-all.c
index 396e40d68922..8284752a60c8 100644
--- a/tools/perf/tests/parse-no-sample-id-all.c
+++ b/tools/perf/tests/parse-no-sample-id-all.c
@@ -87,10 +87,10 @@ int test__parse_no_sample_id_all(struct test *test __maybe_unused, int subtest _
87 }, 87 },
88 .id = 2, 88 .id = 2,
89 }; 89 };
90 struct mmap_event event3 = { 90 struct perf_record_mmap event3 = {
91 .header = { 91 .header = {
92 .type = PERF_RECORD_MMAP, 92 .type = PERF_RECORD_MMAP,
93 .size = sizeof(struct mmap_event), 93 .size = sizeof(struct perf_record_mmap),
94 }, 94 },
95 }; 95 };
96 union perf_event *events[] = { 96 union perf_event *events[] = {
diff --git a/tools/perf/util/bpf-event.c b/tools/perf/util/bpf-event.c
index 5c634bcfea7e..3be8c480fa1f 100644
--- a/tools/perf/util/bpf-event.c
+++ b/tools/perf/util/bpf-event.c
@@ -161,8 +161,8 @@ static int perf_event__synthesize_one_bpf_prog(struct perf_session *session,
161 union perf_event *event, 161 union perf_event *event,
162 struct record_opts *opts) 162 struct record_opts *opts)
163{ 163{
164 struct ksymbol_event *ksymbol_event = &event->ksymbol_event; 164 struct perf_record_ksymbol *ksymbol_event = &event->ksymbol_event;
165 struct bpf_event *bpf_event = &event->bpf_event; 165 struct perf_record_bpf_event *bpf_event = &event->bpf_event;
166 struct bpf_prog_info_linear *info_linear; 166 struct bpf_prog_info_linear *info_linear;
167 struct perf_tool *tool = session->tool; 167 struct perf_tool *tool = session->tool;
168 struct bpf_prog_info_node *info_node; 168 struct bpf_prog_info_node *info_node;
@@ -230,10 +230,10 @@ static int perf_event__synthesize_one_bpf_prog(struct perf_session *session,
230 __u64 *prog_addrs = (__u64 *)(uintptr_t)(info->jited_ksyms); 230 __u64 *prog_addrs = (__u64 *)(uintptr_t)(info->jited_ksyms);
231 int name_len; 231 int name_len;
232 232
233 *ksymbol_event = (struct ksymbol_event){ 233 *ksymbol_event = (struct perf_record_ksymbol) {
234 .header = { 234 .header = {
235 .type = PERF_RECORD_KSYMBOL, 235 .type = PERF_RECORD_KSYMBOL,
236 .size = offsetof(struct ksymbol_event, name), 236 .size = offsetof(struct perf_record_ksymbol, name),
237 }, 237 },
238 .addr = prog_addrs[i], 238 .addr = prog_addrs[i],
239 .len = prog_lens[i], 239 .len = prog_lens[i],
@@ -254,10 +254,10 @@ static int perf_event__synthesize_one_bpf_prog(struct perf_session *session,
254 254
255 if (!opts->no_bpf_event) { 255 if (!opts->no_bpf_event) {
256 /* Synthesize PERF_RECORD_BPF_EVENT */ 256 /* Synthesize PERF_RECORD_BPF_EVENT */
257 *bpf_event = (struct bpf_event){ 257 *bpf_event = (struct perf_record_bpf_event) {
258 .header = { 258 .header = {
259 .type = PERF_RECORD_BPF_EVENT, 259 .type = PERF_RECORD_BPF_EVENT,
260 .size = sizeof(struct bpf_event), 260 .size = sizeof(struct perf_record_bpf_event),
261 }, 261 },
262 .type = PERF_BPF_EVENT_PROG_LOAD, 262 .type = PERF_BPF_EVENT_PROG_LOAD,
263 .flags = 0, 263 .flags = 0,
diff --git a/tools/perf/util/event.h b/tools/perf/util/event.h
index dee0ee57efc2..25f5309a3442 100644
--- a/tools/perf/util/event.h
+++ b/tools/perf/util/event.h
@@ -305,18 +305,18 @@ static inline void *perf_synth__raw_data(void *p)
305 * when possible sends this number in a PERF_RECORD_LOST event. The number of 305 * when possible sends this number in a PERF_RECORD_LOST event. The number of
306 * such "chunks" of lost events is stored in .nr_events[PERF_EVENT_LOST] while 306 * such "chunks" of lost events is stored in .nr_events[PERF_EVENT_LOST] while
307 * total_lost tells exactly how many events the kernel in fact lost, i.e. it is 307 * total_lost tells exactly how many events the kernel in fact lost, i.e. it is
308 * the sum of all struct lost_event.lost fields reported. 308 * the sum of all struct perf_record_lost.lost fields reported.
309 * 309 *
310 * The kernel discards mixed up samples and sends the number in a 310 * The kernel discards mixed up samples and sends the number in a
311 * PERF_RECORD_LOST_SAMPLES event. The number of lost-samples events is stored 311 * PERF_RECORD_LOST_SAMPLES event. The number of lost-samples events is stored
312 * in .nr_events[PERF_RECORD_LOST_SAMPLES] while total_lost_samples tells 312 * in .nr_events[PERF_RECORD_LOST_SAMPLES] while total_lost_samples tells
313 * exactly how many samples the kernel in fact dropped, i.e. it is the sum of 313 * exactly how many samples the kernel in fact dropped, i.e. it is the sum of
314 * all struct lost_samples_event.lost fields reported. 314 * all struct perf_record_lost_samples.lost fields reported.
315 * 315 *
316 * The total_period is needed because by default auto-freq is used, so 316 * The total_period is needed because by default auto-freq is used, so
317 * multipling nr_events[PERF_EVENT_SAMPLE] by a frequency isn't possible to get 317 * multipling nr_events[PERF_EVENT_SAMPLE] by a frequency isn't possible to get
318 * the total number of low level events, it is necessary to to sum all struct 318 * the total number of low level events, it is necessary to to sum all struct
319 * sample_event.period and stash the result in total_period. 319 * perf_record_sample.period and stash the result in total_period.
320 */ 320 */
321struct events_stats { 321struct events_stats {
322 u64 total_period; 322 u64 total_period;
@@ -550,16 +550,18 @@ struct compressed_event {
550 550
551union perf_event { 551union perf_event {
552 struct perf_event_header header; 552 struct perf_event_header header;
553 struct mmap_event mmap; 553 struct perf_record_mmap mmap;
554 struct mmap2_event mmap2; 554 struct perf_record_mmap2 mmap2;
555 struct comm_event comm; 555 struct perf_record_comm comm;
556 struct namespaces_event namespaces; 556 struct perf_record_namespaces namespaces;
557 struct fork_event fork; 557 struct perf_record_fork fork;
558 struct lost_event lost; 558 struct perf_record_lost lost;
559 struct lost_samples_event lost_samples; 559 struct perf_record_lost_samples lost_samples;
560 struct read_event read; 560 struct perf_record_read read;
561 struct throttle_event throttle; 561 struct perf_record_throttle throttle;
562 struct sample_event sample; 562 struct perf_record_sample sample;
563 struct perf_record_bpf_event bpf_event;
564 struct perf_record_ksymbol ksymbol_event;
563 struct attr_event attr; 565 struct attr_event attr;
564 struct event_update_event event_update; 566 struct event_update_event event_update;
565 struct event_type_event event_type; 567 struct event_type_event event_type;
@@ -579,8 +581,6 @@ union perf_event {
579 struct stat_round_event stat_round; 581 struct stat_round_event stat_round;
580 struct time_conv_event time_conv; 582 struct time_conv_event time_conv;
581 struct feature_event feat; 583 struct feature_event feat;
582 struct ksymbol_event ksymbol_event;
583 struct bpf_event bpf_event;
584 struct compressed_event pack; 584 struct compressed_event pack;
585}; 585};
586 586
diff --git a/tools/perf/util/evsel.c b/tools/perf/util/evsel.c
index 778262f68d5c..b3cfe120d097 100644
--- a/tools/perf/util/evsel.c
+++ b/tools/perf/util/evsel.c
@@ -117,7 +117,7 @@ int __perf_evsel__sample_size(u64 sample_type)
117 * 117 *
118 * This function returns the position of the event id (PERF_SAMPLE_ID or 118 * This function returns the position of the event id (PERF_SAMPLE_ID or
119 * PERF_SAMPLE_IDENTIFIER) in a sample event i.e. in the array of struct 119 * PERF_SAMPLE_IDENTIFIER) in a sample event i.e. in the array of struct
120 * sample_event. 120 * perf_record_sample.
121 */ 121 */
122static int __perf_evsel__calc_id_pos(u64 sample_type) 122static int __perf_evsel__calc_id_pos(u64 sample_type)
123{ 123{
@@ -2420,7 +2420,7 @@ int perf_evsel__parse_sample_timestamp(struct evsel *evsel,
2420size_t perf_event__sample_event_size(const struct perf_sample *sample, u64 type, 2420size_t perf_event__sample_event_size(const struct perf_sample *sample, u64 type,
2421 u64 read_format) 2421 u64 read_format)
2422{ 2422{
2423 size_t sz, result = sizeof(struct sample_event); 2423 size_t sz, result = sizeof(struct perf_record_sample);
2424 2424
2425 if (type & PERF_SAMPLE_IDENTIFIER) 2425 if (type & PERF_SAMPLE_IDENTIFIER)
2426 result += sizeof(u64); 2426 result += sizeof(u64);
diff --git a/tools/perf/util/evsel.h b/tools/perf/util/evsel.h
index 5a351cae66df..77e07f2486d3 100644
--- a/tools/perf/util/evsel.h
+++ b/tools/perf/util/evsel.h
@@ -107,7 +107,7 @@ struct xyarray;
107 * show the name used, not some alias. 107 * show the name used, not some alias.
108 * @id_pos: the position of the event id (PERF_SAMPLE_ID or 108 * @id_pos: the position of the event id (PERF_SAMPLE_ID or
109 * PERF_SAMPLE_IDENTIFIER) in a sample event i.e. in the array of 109 * PERF_SAMPLE_IDENTIFIER) in a sample event i.e. in the array of
110 * struct sample_event 110 * struct perf_record_sample
111 * @is_pos: the position (counting backwards) of the event id (PERF_SAMPLE_ID or 111 * @is_pos: the position (counting backwards) of the event id (PERF_SAMPLE_ID or
112 * PERF_SAMPLE_IDENTIFIER) in a non-sample event i.e. if sample_id_all 112 * PERF_SAMPLE_IDENTIFIER) in a non-sample event i.e. if sample_id_all
113 * is used there is an id sample appended to non-sample events 113 * is used there is an id sample appended to non-sample events
diff --git a/tools/perf/util/intel-bts.c b/tools/perf/util/intel-bts.c
index 7eb9e6dc27dd..8dc6408206b9 100644
--- a/tools/perf/util/intel-bts.c
+++ b/tools/perf/util/intel-bts.c
@@ -818,7 +818,7 @@ static int intel_bts_synth_events(struct intel_bts *bts,
818 * We only use sample types from PERF_SAMPLE_MASK so we can use 818 * We only use sample types from PERF_SAMPLE_MASK so we can use
819 * __perf_evsel__sample_size() here. 819 * __perf_evsel__sample_size() here.
820 */ 820 */
821 bts->branches_event_size = sizeof(struct sample_event) + 821 bts->branches_event_size = sizeof(struct perf_record_sample) +
822 __perf_evsel__sample_size(attr.sample_type); 822 __perf_evsel__sample_size(attr.sample_type);
823 } 823 }
824 824
diff --git a/tools/perf/util/namespaces.c b/tools/perf/util/namespaces.c
index 46d3a7754897..99be15dd2b6b 100644
--- a/tools/perf/util/namespaces.c
+++ b/tools/perf/util/namespaces.c
@@ -19,7 +19,7 @@
19#include <asm/bug.h> 19#include <asm/bug.h>
20#include <linux/zalloc.h> 20#include <linux/zalloc.h>
21 21
22struct namespaces *namespaces__new(struct namespaces_event *event) 22struct namespaces *namespaces__new(struct perf_record_namespaces *event)
23{ 23{
24 struct namespaces *namespaces; 24 struct namespaces *namespaces;
25 u64 link_info_size = ((event ? event->nr_namespaces : NR_NAMESPACES) * 25 u64 link_info_size = ((event ? event->nr_namespaces : NR_NAMESPACES) *
diff --git a/tools/perf/util/namespaces.h b/tools/perf/util/namespaces.h
index 004430c0de93..40edef56cb52 100644
--- a/tools/perf/util/namespaces.h
+++ b/tools/perf/util/namespaces.h
@@ -17,7 +17,7 @@
17int setns(int fd, int nstype); 17int setns(int fd, int nstype);
18#endif 18#endif
19 19
20struct namespaces_event; 20struct perf_record_namespaces;
21 21
22struct namespaces { 22struct namespaces {
23 struct list_head list; 23 struct list_head list;
@@ -25,7 +25,7 @@ struct namespaces {
25 struct perf_ns_link_info link_info[]; 25 struct perf_ns_link_info link_info[];
26}; 26};
27 27
28struct namespaces *namespaces__new(struct namespaces_event *event); 28struct namespaces *namespaces__new(struct perf_record_namespaces *event);
29void namespaces__free(struct namespaces *namespaces); 29void namespaces__free(struct namespaces *namespaces);
30 30
31struct nsinfo { 31struct nsinfo {
diff --git a/tools/perf/util/python.c b/tools/perf/util/python.c
index d21e270c7823..59974e901232 100644
--- a/tools/perf/util/python.c
+++ b/tools/perf/util/python.c
@@ -116,12 +116,12 @@ static PyMemberDef pyrf_mmap_event__members[] = {
116 sample_members 116 sample_members
117 member_def(perf_event_header, type, T_UINT, "event type"), 117 member_def(perf_event_header, type, T_UINT, "event type"),
118 member_def(perf_event_header, misc, T_UINT, "event misc"), 118 member_def(perf_event_header, misc, T_UINT, "event misc"),
119 member_def(mmap_event, pid, T_UINT, "event pid"), 119 member_def(perf_record_mmap, pid, T_UINT, "event pid"),
120 member_def(mmap_event, tid, T_UINT, "event tid"), 120 member_def(perf_record_mmap, tid, T_UINT, "event tid"),
121 member_def(mmap_event, start, T_ULONGLONG, "start of the map"), 121 member_def(perf_record_mmap, start, T_ULONGLONG, "start of the map"),
122 member_def(mmap_event, len, T_ULONGLONG, "map length"), 122 member_def(perf_record_mmap, len, T_ULONGLONG, "map length"),
123 member_def(mmap_event, pgoff, T_ULONGLONG, "page offset"), 123 member_def(perf_record_mmap, pgoff, T_ULONGLONG, "page offset"),
124 member_def(mmap_event, filename, T_STRING_INPLACE, "backing store"), 124 member_def(perf_record_mmap, filename, T_STRING_INPLACE, "backing store"),
125 { .name = NULL, }, 125 { .name = NULL, },
126}; 126};
127 127
@@ -159,11 +159,11 @@ static char pyrf_task_event__doc[] = PyDoc_STR("perf task (fork/exit) event obje
159static PyMemberDef pyrf_task_event__members[] = { 159static PyMemberDef pyrf_task_event__members[] = {
160 sample_members 160 sample_members
161 member_def(perf_event_header, type, T_UINT, "event type"), 161 member_def(perf_event_header, type, T_UINT, "event type"),
162 member_def(fork_event, pid, T_UINT, "event pid"), 162 member_def(perf_record_fork, pid, T_UINT, "event pid"),
163 member_def(fork_event, ppid, T_UINT, "event ppid"), 163 member_def(perf_record_fork, ppid, T_UINT, "event ppid"),
164 member_def(fork_event, tid, T_UINT, "event tid"), 164 member_def(perf_record_fork, tid, T_UINT, "event tid"),
165 member_def(fork_event, ptid, T_UINT, "event ptid"), 165 member_def(perf_record_fork, ptid, T_UINT, "event ptid"),
166 member_def(fork_event, time, T_ULONGLONG, "timestamp"), 166 member_def(perf_record_fork, time, T_ULONGLONG, "timestamp"),
167 { .name = NULL, }, 167 { .name = NULL, },
168}; 168};
169 169
@@ -194,9 +194,9 @@ static char pyrf_comm_event__doc[] = PyDoc_STR("perf comm event object.");
194static PyMemberDef pyrf_comm_event__members[] = { 194static PyMemberDef pyrf_comm_event__members[] = {
195 sample_members 195 sample_members
196 member_def(perf_event_header, type, T_UINT, "event type"), 196 member_def(perf_event_header, type, T_UINT, "event type"),
197 member_def(comm_event, pid, T_UINT, "event pid"), 197 member_def(perf_record_comm, pid, T_UINT, "event pid"),
198 member_def(comm_event, tid, T_UINT, "event tid"), 198 member_def(perf_record_comm, tid, T_UINT, "event tid"),
199 member_def(comm_event, comm, T_STRING_INPLACE, "process name"), 199 member_def(perf_record_comm, comm, T_STRING_INPLACE, "process name"),
200 { .name = NULL, }, 200 { .name = NULL, },
201}; 201};
202 202
@@ -223,15 +223,15 @@ static char pyrf_throttle_event__doc[] = PyDoc_STR("perf throttle event object."
223static PyMemberDef pyrf_throttle_event__members[] = { 223static PyMemberDef pyrf_throttle_event__members[] = {
224 sample_members 224 sample_members
225 member_def(perf_event_header, type, T_UINT, "event type"), 225 member_def(perf_event_header, type, T_UINT, "event type"),
226 member_def(throttle_event, time, T_ULONGLONG, "timestamp"), 226 member_def(perf_record_throttle, time, T_ULONGLONG, "timestamp"),
227 member_def(throttle_event, id, T_ULONGLONG, "event id"), 227 member_def(perf_record_throttle, id, T_ULONGLONG, "event id"),
228 member_def(throttle_event, stream_id, T_ULONGLONG, "event stream id"), 228 member_def(perf_record_throttle, stream_id, T_ULONGLONG, "event stream id"),
229 { .name = NULL, }, 229 { .name = NULL, },
230}; 230};
231 231
232static PyObject *pyrf_throttle_event__repr(struct pyrf_event *pevent) 232static PyObject *pyrf_throttle_event__repr(struct pyrf_event *pevent)
233{ 233{
234 struct throttle_event *te = (struct throttle_event *)(&pevent->event.header + 1); 234 struct perf_record_throttle *te = (struct perf_record_throttle *)(&pevent->event.header + 1);
235 235
236 return _PyUnicode_FromFormat("{ type: %sthrottle, time: %" PRI_lu64 ", id: %" PRI_lu64 236 return _PyUnicode_FromFormat("{ type: %sthrottle, time: %" PRI_lu64 ", id: %" PRI_lu64
237 ", stream_id: %" PRI_lu64 " }", 237 ", stream_id: %" PRI_lu64 " }",
@@ -253,8 +253,8 @@ static char pyrf_lost_event__doc[] = PyDoc_STR("perf lost event object.");
253 253
254static PyMemberDef pyrf_lost_event__members[] = { 254static PyMemberDef pyrf_lost_event__members[] = {
255 sample_members 255 sample_members
256 member_def(lost_event, id, T_ULONGLONG, "event id"), 256 member_def(perf_record_lost, id, T_ULONGLONG, "event id"),
257 member_def(lost_event, lost, T_ULONGLONG, "number of lost events"), 257 member_def(perf_record_lost, lost, T_ULONGLONG, "number of lost events"),
258 { .name = NULL, }, 258 { .name = NULL, },
259}; 259};
260 260
@@ -288,8 +288,8 @@ static char pyrf_read_event__doc[] = PyDoc_STR("perf read event object.");
288 288
289static PyMemberDef pyrf_read_event__members[] = { 289static PyMemberDef pyrf_read_event__members[] = {
290 sample_members 290 sample_members
291 member_def(read_event, pid, T_UINT, "event pid"), 291 member_def(perf_record_read, pid, T_UINT, "event pid"),
292 member_def(read_event, tid, T_UINT, "event tid"), 292 member_def(perf_record_read, tid, T_UINT, "event tid"),
293 { .name = NULL, }, 293 { .name = NULL, },
294}; 294};
295 295
diff --git a/tools/perf/util/session.c b/tools/perf/util/session.c
index cb1d8dcd0c19..4bfec9db36d6 100644
--- a/tools/perf/util/session.c
+++ b/tools/perf/util/session.c
@@ -1254,7 +1254,7 @@ static void dump_sample(struct evsel *evsel, union perf_event *event,
1254 1254
1255static void dump_read(struct evsel *evsel, union perf_event *event) 1255static void dump_read(struct evsel *evsel, union perf_event *event)
1256{ 1256{
1257 struct read_event *read_event = &event->read; 1257 struct perf_record_read *read_event = &event->read;
1258 u64 read_format; 1258 u64 read_format;
1259 1259
1260 if (!dump_trace) 1260 if (!dump_trace)
diff --git a/tools/perf/util/thread.c b/tools/perf/util/thread.c
index bbf7816cba31..dbcb9cfb0f2f 100644
--- a/tools/perf/util/thread.c
+++ b/tools/perf/util/thread.c
@@ -169,7 +169,7 @@ struct namespaces *thread__namespaces(struct thread *thread)
169} 169}
170 170
171static int __thread__set_namespaces(struct thread *thread, u64 timestamp, 171static int __thread__set_namespaces(struct thread *thread, u64 timestamp,
172 struct namespaces_event *event) 172 struct perf_record_namespaces *event)
173{ 173{
174 struct namespaces *new, *curr = __thread__namespaces(thread); 174 struct namespaces *new, *curr = __thread__namespaces(thread);
175 175
@@ -193,7 +193,7 @@ static int __thread__set_namespaces(struct thread *thread, u64 timestamp,
193} 193}
194 194
195int thread__set_namespaces(struct thread *thread, u64 timestamp, 195int thread__set_namespaces(struct thread *thread, u64 timestamp,
196 struct namespaces_event *event) 196 struct perf_record_namespaces *event)
197{ 197{
198 int ret; 198 int ret;
199 199
diff --git a/tools/perf/util/thread.h b/tools/perf/util/thread.h
index bf06113be4f3..51bdb9a7af7f 100644
--- a/tools/perf/util/thread.h
+++ b/tools/perf/util/thread.h
@@ -16,7 +16,7 @@
16 16
17struct addr_location; 17struct addr_location;
18struct map; 18struct map;
19struct namespaces_event; 19struct perf_record_namespaces;
20struct thread_stack; 20struct thread_stack;
21struct unwind_libunwind_ops; 21struct unwind_libunwind_ops;
22 22
@@ -74,7 +74,7 @@ static inline void thread__exited(struct thread *thread)
74 74
75struct namespaces *thread__namespaces(struct thread *thread); 75struct namespaces *thread__namespaces(struct thread *thread);
76int thread__set_namespaces(struct thread *thread, u64 timestamp, 76int thread__set_namespaces(struct thread *thread, u64 timestamp,
77 struct namespaces_event *event); 77 struct perf_record_namespaces *event);
78 78
79int __thread__set_comm(struct thread *thread, const char *comm, u64 timestamp, 79int __thread__set_comm(struct thread *thread, const char *comm, u64 timestamp,
80 bool exec); 80 bool exec);