aboutsummaryrefslogtreecommitdiffstats
path: root/tools/perf/util
diff options
context:
space:
mode:
authorSteven Rostedt <srostedt@redhat.com>2012-04-05 18:48:06 -0400
committerFrederic Weisbecker <fweisbec@gmail.com>2012-04-25 07:35:48 -0400
commit1c698186abf5caaea06fda66590f6a0e0a21628d (patch)
treeb100ba4b49a8b5c11f23d00804b47835235849bf /tools/perf/util
parent42c80139eaa0feebf961c9792fa9eef76a3ce663 (diff)
parse-events: Rename struct record to struct pevent_record
As libtraceevent will be a library, having struct record is far too generic of a name to use. Renaming it to be consistent with the rest of the functions will be a better long term solution. Signed-off-by: Steven Rostedt <rostedt@goodmis.org> Cc: Ingo Molnar <mingo@kernel.org> Cc: Thomas Gleixner <tglx@linutronix.de> Cc: Peter Zijlstra <peterz@infradead.org> Cc: Arnaldo Carvalho de Melo <acme@infradead.org> Cc: Steven Rostedt <rostedt@goodmis.org> Cc: Borislav Petkov <bp@alien8.de> Cc: Jiri Olsa <jolsa@redhat.com> Cc: Arun Sharma <asharma@fb.com> Cc: Namhyung Kim <namhyung.kim@lge.com> Signed-off-by: Frederic Weisbecker <fweisbec@gmail.com>
Diffstat (limited to 'tools/perf/util')
-rw-r--r--tools/perf/util/trace-event-parse.c8
-rw-r--r--tools/perf/util/trace-event-read.c10
-rw-r--r--tools/perf/util/trace-event.h4
3 files changed, 11 insertions, 11 deletions
diff --git a/tools/perf/util/trace-event-parse.c b/tools/perf/util/trace-event-parse.c
index 39f22f8843a2..df2fddbf0cd2 100644
--- a/tools/perf/util/trace-event-parse.c
+++ b/tools/perf/util/trace-event-parse.c
@@ -152,7 +152,7 @@ void *raw_field_ptr(struct event_format *event, const char *name, void *data)
152 152
153int trace_parse_common_type(void *data) 153int trace_parse_common_type(void *data)
154{ 154{
155 struct record record; 155 struct pevent_record record;
156 156
157 record.data = data; 157 record.data = data;
158 return pevent_data_type(pevent, &record); 158 return pevent_data_type(pevent, &record);
@@ -160,7 +160,7 @@ int trace_parse_common_type(void *data)
160 160
161int trace_parse_common_pid(void *data) 161int trace_parse_common_pid(void *data)
162{ 162{
163 struct record record; 163 struct pevent_record record;
164 164
165 record.data = data; 165 record.data = data;
166 return pevent_data_pid(pevent, &record); 166 return pevent_data_pid(pevent, &record);
@@ -180,7 +180,7 @@ struct event_format *trace_find_event(int type)
180void print_trace_event(int cpu, void *data, int size) 180void print_trace_event(int cpu, void *data, int size)
181{ 181{
182 struct event_format *event; 182 struct event_format *event;
183 struct record record; 183 struct pevent_record record;
184 struct trace_seq s; 184 struct trace_seq s;
185 int type; 185 int type;
186 186
@@ -206,7 +206,7 @@ void print_trace_event(int cpu, void *data, int size)
206void print_event(int cpu, void *data, int size, unsigned long long nsecs, 206void print_event(int cpu, void *data, int size, unsigned long long nsecs,
207 char *comm) 207 char *comm)
208{ 208{
209 struct record record; 209 struct pevent_record record;
210 struct trace_seq s; 210 struct trace_seq s;
211 int pid; 211 int pid;
212 212
diff --git a/tools/perf/util/trace-event-read.c b/tools/perf/util/trace-event-read.c
index 29b92065b88e..f097e0dd6c5c 100644
--- a/tools/perf/util/trace-event-read.c
+++ b/tools/perf/util/trace-event-read.c
@@ -292,7 +292,7 @@ struct cpu_data {
292 unsigned long long offset; 292 unsigned long long offset;
293 unsigned long long size; 293 unsigned long long size;
294 unsigned long long timestamp; 294 unsigned long long timestamp;
295 struct record *next; 295 struct pevent_record *next;
296 char *page; 296 char *page;
297 int cpu; 297 int cpu;
298 int index; 298 int index;
@@ -377,9 +377,9 @@ static int calc_index(void *ptr, int cpu)
377 return (unsigned long)ptr - (unsigned long)cpu_data[cpu].page; 377 return (unsigned long)ptr - (unsigned long)cpu_data[cpu].page;
378} 378}
379 379
380struct record *trace_peek_data(int cpu) 380struct pevent_record *trace_peek_data(int cpu)
381{ 381{
382 struct record *data; 382 struct pevent_record *data;
383 void *page = cpu_data[cpu].page; 383 void *page = cpu_data[cpu].page;
384 int idx = cpu_data[cpu].index; 384 int idx = cpu_data[cpu].index;
385 void *ptr = page + idx; 385 void *ptr = page + idx;
@@ -477,9 +477,9 @@ read_again:
477 return data; 477 return data;
478} 478}
479 479
480struct record *trace_read_data(int cpu) 480struct pevent_record *trace_read_data(int cpu)
481{ 481{
482 struct record *data; 482 struct pevent_record *data;
483 483
484 data = trace_peek_data(cpu); 484 data = trace_peek_data(cpu);
485 cpu_data[cpu].next = NULL; 485 cpu_data[cpu].next = NULL;
diff --git a/tools/perf/util/trace-event.h b/tools/perf/util/trace-event.h
index 112bc2aa72e1..639852ac1117 100644
--- a/tools/perf/util/trace-event.h
+++ b/tools/perf/util/trace-event.h
@@ -38,7 +38,7 @@ void print_event(int cpu, void *data, int size, unsigned long long nsecs,
38int parse_ftrace_file(char *buf, unsigned long size); 38int parse_ftrace_file(char *buf, unsigned long size);
39int parse_event_file(char *buf, unsigned long size, char *sys); 39int parse_event_file(char *buf, unsigned long size, char *sys);
40 40
41struct record *trace_peek_data(int cpu); 41struct pevent_record *trace_peek_data(int cpu);
42struct event_format *trace_find_event(int type); 42struct event_format *trace_find_event(int type);
43 43
44unsigned long long 44unsigned long long
@@ -57,7 +57,7 @@ struct event_format *trace_find_next_event(struct event_format *event);
57unsigned long long read_size(void *ptr, int size); 57unsigned long long read_size(void *ptr, int size);
58unsigned long long eval_flag(const char *flag); 58unsigned long long eval_flag(const char *flag);
59 59
60struct record *trace_read_data(int cpu); 60struct pevent_record *trace_read_data(int cpu);
61int read_tracing_data(int fd, struct list_head *pattrs); 61int read_tracing_data(int fd, struct list_head *pattrs);
62 62
63struct tracing_data { 63struct tracing_data {