diff options
author | Steven Rostedt <srostedt@redhat.com> | 2009-12-04 01:36:01 -0500 |
---|---|---|
committer | Steven Rostedt <rostedt@goodmis.org> | 2009-12-04 01:36:01 -0500 |
commit | dacd5dd2bfe3331e325c2f3a6fc044d3fa6fd03c (patch) | |
tree | a5f73eb6800aeedfa89fad2c1ce5c0ef6abf0d2f | |
parent | cd001f7b40f9dd1e5dfbf0c436531a03064f9391 (diff) |
Rename tracecmd_handle to tracecmd_input
We will soon be adding write functionality to the tracecmd
library. This will require a new and separate handle than what
is used by the file reader.
"handle" is too generic. Rename it to "input" so we can make
the output handle called tracecmd_output.
Signed-off-by: Steven Rostedt <rostedt@goodmis.org>
-rw-r--r-- | trace-cmd.h | 28 | ||||
-rw-r--r-- | trace-ftrace.c | 2 | ||||
-rw-r--r-- | trace-input.c | 80 | ||||
-rw-r--r-- | trace-local.h | 2 | ||||
-rw-r--r-- | trace-read.c | 8 |
5 files changed, 60 insertions, 60 deletions
diff --git a/trace-cmd.h b/trace-cmd.h index cdd31e1..afd7d6b 100644 --- a/trace-cmd.h +++ b/trace-cmd.h | |||
@@ -34,33 +34,33 @@ struct record { | |||
34 | void *data; | 34 | void *data; |
35 | }; | 35 | }; |
36 | 36 | ||
37 | struct tracecmd_handle; | 37 | struct tracecmd_input; |
38 | 38 | ||
39 | struct tracecmd_handle *tracecmd_open(int fd); | 39 | struct tracecmd_input *tracecmd_open(int fd); |
40 | int tracecmd_read_headers(struct tracecmd_handle *handle); | 40 | int tracecmd_read_headers(struct tracecmd_input *handle); |
41 | int tracecmd_long_size(struct tracecmd_handle *handle); | 41 | int tracecmd_long_size(struct tracecmd_input *handle); |
42 | int tracecmd_page_size(struct tracecmd_handle *handle); | 42 | int tracecmd_page_size(struct tracecmd_input *handle); |
43 | int tracecmd_cpus(struct tracecmd_handle *handle); | 43 | int tracecmd_cpus(struct tracecmd_input *handle); |
44 | 44 | ||
45 | int tracecmd_init_data(struct tracecmd_handle *handle); | 45 | int tracecmd_init_data(struct tracecmd_input *handle); |
46 | 46 | ||
47 | struct record * | 47 | struct record * |
48 | tracecmd_peek_data(struct tracecmd_handle *handle, int cpu); | 48 | tracecmd_peek_data(struct tracecmd_input *handle, int cpu); |
49 | 49 | ||
50 | struct record * | 50 | struct record * |
51 | tracecmd_read_data(struct tracecmd_handle *handle, int cpu); | 51 | tracecmd_read_data(struct tracecmd_input *handle, int cpu); |
52 | 52 | ||
53 | struct record * | 53 | struct record * |
54 | tracecmd_read_at(struct tracecmd_handle *handle, unsigned long long offset, | 54 | tracecmd_read_at(struct tracecmd_input *handle, unsigned long long offset, |
55 | int *cpu); | 55 | int *cpu); |
56 | struct record * | 56 | struct record * |
57 | tracecmd_translate_data(struct tracecmd_handle *handle, | 57 | tracecmd_translate_data(struct tracecmd_input *handle, |
58 | void *ptr, int size); | 58 | void *ptr, int size); |
59 | 59 | ||
60 | int tracecmd_ftrace_overrides(struct tracecmd_handle *handle); | 60 | int tracecmd_ftrace_overrides(struct tracecmd_input *handle); |
61 | struct pevent *tracecmd_get_pevent(struct tracecmd_handle *handle); | 61 | struct pevent *tracecmd_get_pevent(struct tracecmd_input *handle); |
62 | 62 | ||
63 | /* hack for function graph work around */ | 63 | /* hack for function graph work around */ |
64 | extern __thread struct tracecmd_handle *tracecmd_curr_thread_handle; | 64 | extern __thread struct tracecmd_input *tracecmd_curr_thread_handle; |
65 | 65 | ||
66 | #endif /* _TRACE_CMD_H */ | 66 | #endif /* _TRACE_CMD_H */ |
diff --git a/trace-ftrace.c b/trace-ftrace.c index 3e7ccde..68ac7a8 100644 --- a/trace-ftrace.c +++ b/trace-ftrace.c | |||
@@ -289,7 +289,7 @@ fgraph_ret_handler(struct trace_seq *s, void *data, int size, | |||
289 | return trace_seq_putc(s, '}'); | 289 | return trace_seq_putc(s, '}'); |
290 | } | 290 | } |
291 | 291 | ||
292 | int tracecmd_ftrace_overrides(struct tracecmd_handle *handle) | 292 | int tracecmd_ftrace_overrides(struct tracecmd_input *handle) |
293 | { | 293 | { |
294 | struct pevent *pevent; | 294 | struct pevent *pevent; |
295 | struct event *event; | 295 | struct event *event; |
diff --git a/trace-input.c b/trace-input.c index 6e35897..23d4986 100644 --- a/trace-input.c +++ b/trace-input.c | |||
@@ -33,7 +33,7 @@ struct cpu_data { | |||
33 | int page_size; | 33 | int page_size; |
34 | }; | 34 | }; |
35 | 35 | ||
36 | struct tracecmd_handle { | 36 | struct tracecmd_input { |
37 | struct pevent *pevent; | 37 | struct pevent *pevent; |
38 | int fd; | 38 | int fd; |
39 | int long_size; | 39 | int long_size; |
@@ -44,11 +44,11 @@ struct tracecmd_handle { | |||
44 | struct cpu_data *cpu_data; | 44 | struct cpu_data *cpu_data; |
45 | }; | 45 | }; |
46 | 46 | ||
47 | __thread struct tracecmd_handle *tracecmd_curr_thread_handle; | 47 | __thread struct tracecmd_input *tracecmd_curr_thread_handle; |
48 | 48 | ||
49 | static int init_cpu(struct tracecmd_handle *handle, int cpu); | 49 | static int init_cpu(struct tracecmd_input *handle, int cpu); |
50 | 50 | ||
51 | static int do_read(struct tracecmd_handle *handle, void *data, int size) | 51 | static int do_read(struct tracecmd_input *handle, void *data, int size) |
52 | { | 52 | { |
53 | int tot = 0; | 53 | int tot = 0; |
54 | int r; | 54 | int r; |
@@ -67,7 +67,7 @@ static int do_read(struct tracecmd_handle *handle, void *data, int size) | |||
67 | } | 67 | } |
68 | 68 | ||
69 | static int | 69 | static int |
70 | do_read_check(struct tracecmd_handle *handle, void *data, int size) | 70 | do_read_check(struct tracecmd_input *handle, void *data, int size) |
71 | { | 71 | { |
72 | int ret; | 72 | int ret; |
73 | 73 | ||
@@ -80,7 +80,7 @@ do_read_check(struct tracecmd_handle *handle, void *data, int size) | |||
80 | return 0; | 80 | return 0; |
81 | } | 81 | } |
82 | 82 | ||
83 | static char *read_string(struct tracecmd_handle *handle) | 83 | static char *read_string(struct tracecmd_input *handle) |
84 | { | 84 | { |
85 | char buf[BUFSIZ]; | 85 | char buf[BUFSIZ]; |
86 | char *str = NULL; | 86 | char *str = NULL; |
@@ -146,7 +146,7 @@ static char *read_string(struct tracecmd_handle *handle) | |||
146 | return NULL; | 146 | return NULL; |
147 | } | 147 | } |
148 | 148 | ||
149 | static unsigned int read4(struct tracecmd_handle *handle) | 149 | static unsigned int read4(struct tracecmd_input *handle) |
150 | { | 150 | { |
151 | struct pevent *pevent = handle->pevent; | 151 | struct pevent *pevent = handle->pevent; |
152 | unsigned int data; | 152 | unsigned int data; |
@@ -157,7 +157,7 @@ static unsigned int read4(struct tracecmd_handle *handle) | |||
157 | return __data2host4(pevent, data); | 157 | return __data2host4(pevent, data); |
158 | } | 158 | } |
159 | 159 | ||
160 | static unsigned long long read8(struct tracecmd_handle *handle) | 160 | static unsigned long long read8(struct tracecmd_input *handle) |
161 | { | 161 | { |
162 | struct pevent *pevent = handle->pevent; | 162 | struct pevent *pevent = handle->pevent; |
163 | unsigned long long data; | 163 | unsigned long long data; |
@@ -168,7 +168,7 @@ static unsigned long long read8(struct tracecmd_handle *handle) | |||
168 | return __data2host8(pevent, data); | 168 | return __data2host8(pevent, data); |
169 | } | 169 | } |
170 | 170 | ||
171 | static int read_header_files(struct tracecmd_handle *handle) | 171 | static int read_header_files(struct tracecmd_input *handle) |
172 | { | 172 | { |
173 | struct pevent *pevent = handle->pevent; | 173 | struct pevent *pevent = handle->pevent; |
174 | long long size; | 174 | long long size; |
@@ -227,7 +227,7 @@ static int read_header_files(struct tracecmd_handle *handle) | |||
227 | return -1; | 227 | return -1; |
228 | } | 228 | } |
229 | 229 | ||
230 | static int read_ftrace_file(struct tracecmd_handle *handle, | 230 | static int read_ftrace_file(struct tracecmd_input *handle, |
231 | unsigned long long size) | 231 | unsigned long long size) |
232 | { | 232 | { |
233 | struct pevent *pevent = handle->pevent; | 233 | struct pevent *pevent = handle->pevent; |
@@ -247,7 +247,7 @@ static int read_ftrace_file(struct tracecmd_handle *handle, | |||
247 | return 0; | 247 | return 0; |
248 | } | 248 | } |
249 | 249 | ||
250 | static int read_event_file(struct tracecmd_handle *handle, | 250 | static int read_event_file(struct tracecmd_input *handle, |
251 | char *system, unsigned long long size) | 251 | char *system, unsigned long long size) |
252 | { | 252 | { |
253 | struct pevent *pevent = handle->pevent; | 253 | struct pevent *pevent = handle->pevent; |
@@ -271,7 +271,7 @@ static int read_event_file(struct tracecmd_handle *handle, | |||
271 | return 0; | 271 | return 0; |
272 | } | 272 | } |
273 | 273 | ||
274 | static int read_ftrace_files(struct tracecmd_handle *handle) | 274 | static int read_ftrace_files(struct tracecmd_input *handle) |
275 | { | 275 | { |
276 | unsigned long long size; | 276 | unsigned long long size; |
277 | int count; | 277 | int count; |
@@ -294,7 +294,7 @@ static int read_ftrace_files(struct tracecmd_handle *handle) | |||
294 | return 0; | 294 | return 0; |
295 | } | 295 | } |
296 | 296 | ||
297 | static int read_event_files(struct tracecmd_handle *handle) | 297 | static int read_event_files(struct tracecmd_input *handle) |
298 | { | 298 | { |
299 | unsigned long long size; | 299 | unsigned long long size; |
300 | char *system; | 300 | char *system; |
@@ -335,7 +335,7 @@ static int read_event_files(struct tracecmd_handle *handle) | |||
335 | return -1; | 335 | return -1; |
336 | } | 336 | } |
337 | 337 | ||
338 | static int read_proc_kallsyms(struct tracecmd_handle *handle) | 338 | static int read_proc_kallsyms(struct tracecmd_input *handle) |
339 | { | 339 | { |
340 | struct pevent *pevent = handle->pevent; | 340 | struct pevent *pevent = handle->pevent; |
341 | int size; | 341 | int size; |
@@ -362,7 +362,7 @@ static int read_proc_kallsyms(struct tracecmd_handle *handle) | |||
362 | return 0; | 362 | return 0; |
363 | } | 363 | } |
364 | 364 | ||
365 | static int read_ftrace_printk(struct tracecmd_handle *handle) | 365 | static int read_ftrace_printk(struct tracecmd_input *handle) |
366 | { | 366 | { |
367 | int size; | 367 | int size; |
368 | char *buf; | 368 | char *buf; |
@@ -389,7 +389,7 @@ static int read_ftrace_printk(struct tracecmd_handle *handle) | |||
389 | return 0; | 389 | return 0; |
390 | } | 390 | } |
391 | 391 | ||
392 | int tracecmd_read_headers(struct tracecmd_handle *handle) | 392 | int tracecmd_read_headers(struct tracecmd_input *handle) |
393 | { | 393 | { |
394 | struct pevent *pevent = handle->pevent; | 394 | struct pevent *pevent = handle->pevent; |
395 | int ret; | 395 | int ret; |
@@ -422,7 +422,7 @@ int tracecmd_read_headers(struct tracecmd_handle *handle) | |||
422 | return 0; | 422 | return 0; |
423 | } | 423 | } |
424 | 424 | ||
425 | static unsigned int type4host(struct tracecmd_handle *handle, | 425 | static unsigned int type4host(struct tracecmd_input *handle, |
426 | unsigned int type_len_ts) | 426 | unsigned int type_len_ts) |
427 | { | 427 | { |
428 | struct pevent *pevent = handle->pevent; | 428 | struct pevent *pevent = handle->pevent; |
@@ -433,7 +433,7 @@ static unsigned int type4host(struct tracecmd_handle *handle, | |||
433 | return type_len_ts & 3; | 433 | return type_len_ts & 3; |
434 | } | 434 | } |
435 | 435 | ||
436 | static unsigned int len4host(struct tracecmd_handle *handle, | 436 | static unsigned int len4host(struct tracecmd_input *handle, |
437 | unsigned int type_len_ts) | 437 | unsigned int type_len_ts) |
438 | { | 438 | { |
439 | struct pevent *pevent = handle->pevent; | 439 | struct pevent *pevent = handle->pevent; |
@@ -444,7 +444,7 @@ static unsigned int len4host(struct tracecmd_handle *handle, | |||
444 | return (type_len_ts >> 2) & 7; | 444 | return (type_len_ts >> 2) & 7; |
445 | } | 445 | } |
446 | 446 | ||
447 | static unsigned int type_len4host(struct tracecmd_handle *handle, | 447 | static unsigned int type_len4host(struct tracecmd_input *handle, |
448 | unsigned int type_len_ts) | 448 | unsigned int type_len_ts) |
449 | { | 449 | { |
450 | struct pevent *pevent = handle->pevent; | 450 | struct pevent *pevent = handle->pevent; |
@@ -455,7 +455,7 @@ static unsigned int type_len4host(struct tracecmd_handle *handle, | |||
455 | return type_len_ts & ((1 << 5) - 1); | 455 | return type_len_ts & ((1 << 5) - 1); |
456 | } | 456 | } |
457 | 457 | ||
458 | static unsigned int ts4host(struct tracecmd_handle *handle, | 458 | static unsigned int ts4host(struct tracecmd_input *handle, |
459 | unsigned int type_len_ts) | 459 | unsigned int type_len_ts) |
460 | { | 460 | { |
461 | struct pevent *pevent = handle->pevent; | 461 | struct pevent *pevent = handle->pevent; |
@@ -466,21 +466,21 @@ static unsigned int ts4host(struct tracecmd_handle *handle, | |||
466 | return type_len_ts >> 5; | 466 | return type_len_ts >> 5; |
467 | } | 467 | } |
468 | 468 | ||
469 | static int calc_index(struct tracecmd_handle *handle, | 469 | static int calc_index(struct tracecmd_input *handle, |
470 | void *ptr, int cpu) | 470 | void *ptr, int cpu) |
471 | { | 471 | { |
472 | return (unsigned long)ptr - (unsigned long)handle->cpu_data[cpu].page; | 472 | return (unsigned long)ptr - (unsigned long)handle->cpu_data[cpu].page; |
473 | } | 473 | } |
474 | 474 | ||
475 | static void | 475 | static void |
476 | update_cpu_data_index(struct tracecmd_handle *handle, int cpu) | 476 | update_cpu_data_index(struct tracecmd_input *handle, int cpu) |
477 | { | 477 | { |
478 | handle->cpu_data[cpu].offset += handle->page_size; | 478 | handle->cpu_data[cpu].offset += handle->page_size; |
479 | handle->cpu_data[cpu].size -= handle->page_size; | 479 | handle->cpu_data[cpu].size -= handle->page_size; |
480 | handle->cpu_data[cpu].index = 0; | 480 | handle->cpu_data[cpu].index = 0; |
481 | } | 481 | } |
482 | 482 | ||
483 | static int get_next_page(struct tracecmd_handle *handle, int cpu) | 483 | static int get_next_page(struct tracecmd_input *handle, int cpu) |
484 | { | 484 | { |
485 | off64_t save_seek; | 485 | off64_t save_seek; |
486 | off64_t ret; | 486 | off64_t ret; |
@@ -540,7 +540,7 @@ enum old_ring_buffer_type { | |||
540 | }; | 540 | }; |
541 | 541 | ||
542 | static struct record * | 542 | static struct record * |
543 | read_old_format(struct tracecmd_handle *handle, void **ptr, int cpu) | 543 | read_old_format(struct tracecmd_input *handle, void **ptr, int cpu) |
544 | { | 544 | { |
545 | struct pevent *pevent = handle->pevent; | 545 | struct pevent *pevent = handle->pevent; |
546 | struct record *data; | 546 | struct record *data; |
@@ -614,7 +614,7 @@ read_old_format(struct tracecmd_handle *handle, void **ptr, int cpu) | |||
614 | } | 614 | } |
615 | 615 | ||
616 | static struct record * | 616 | static struct record * |
617 | read_event(struct tracecmd_handle *handle, unsigned long long offset, | 617 | read_event(struct tracecmd_input *handle, unsigned long long offset, |
618 | int cpu) | 618 | int cpu) |
619 | { | 619 | { |
620 | struct record *record = NULL; | 620 | struct record *record = NULL; |
@@ -645,7 +645,7 @@ read_event(struct tracecmd_handle *handle, unsigned long long offset, | |||
645 | } | 645 | } |
646 | 646 | ||
647 | static struct record * | 647 | static struct record * |
648 | find_and_read_event(struct tracecmd_handle *handle, unsigned long long offset, | 648 | find_and_read_event(struct tracecmd_input *handle, unsigned long long offset, |
649 | int *pcpu) | 649 | int *pcpu) |
650 | { | 650 | { |
651 | unsigned long long page_offset; | 651 | unsigned long long page_offset; |
@@ -707,7 +707,7 @@ find_and_read_event(struct tracecmd_handle *handle, unsigned long long offset, | |||
707 | 707 | ||
708 | 708 | ||
709 | struct record * | 709 | struct record * |
710 | tracecmd_read_at(struct tracecmd_handle *handle, unsigned long long offset, | 710 | tracecmd_read_at(struct tracecmd_input *handle, unsigned long long offset, |
711 | int *pcpu) | 711 | int *pcpu) |
712 | { | 712 | { |
713 | unsigned long long page_offset; | 713 | unsigned long long page_offset; |
@@ -730,7 +730,7 @@ tracecmd_read_at(struct tracecmd_handle *handle, unsigned long long offset, | |||
730 | } | 730 | } |
731 | 731 | ||
732 | static unsigned int | 732 | static unsigned int |
733 | translate_data(struct tracecmd_handle *handle, | 733 | translate_data(struct tracecmd_input *handle, |
734 | void **ptr, unsigned long long *delta, int *length) | 734 | void **ptr, unsigned long long *delta, int *length) |
735 | { | 735 | { |
736 | struct pevent *pevent = handle->pevent; | 736 | struct pevent *pevent = handle->pevent; |
@@ -777,7 +777,7 @@ translate_data(struct tracecmd_handle *handle, | |||
777 | } | 777 | } |
778 | 778 | ||
779 | struct record * | 779 | struct record * |
780 | tracecmd_translate_data(struct tracecmd_handle *handle, | 780 | tracecmd_translate_data(struct tracecmd_input *handle, |
781 | void *ptr, int size) | 781 | void *ptr, int size) |
782 | { | 782 | { |
783 | struct record *data; | 783 | struct record *data; |
@@ -808,7 +808,7 @@ tracecmd_translate_data(struct tracecmd_handle *handle, | |||
808 | } | 808 | } |
809 | 809 | ||
810 | struct record * | 810 | struct record * |
811 | tracecmd_peek_data(struct tracecmd_handle *handle, int cpu) | 811 | tracecmd_peek_data(struct tracecmd_input *handle, int cpu) |
812 | { | 812 | { |
813 | struct pevent *pevent = handle->pevent; | 813 | struct pevent *pevent = handle->pevent; |
814 | struct record *data; | 814 | struct record *data; |
@@ -913,7 +913,7 @@ read_again: | |||
913 | } | 913 | } |
914 | 914 | ||
915 | struct record * | 915 | struct record * |
916 | tracecmd_read_data(struct tracecmd_handle *handle, int cpu) | 916 | tracecmd_read_data(struct tracecmd_input *handle, int cpu) |
917 | { | 917 | { |
918 | struct record *data; | 918 | struct record *data; |
919 | 919 | ||
@@ -923,7 +923,7 @@ tracecmd_read_data(struct tracecmd_handle *handle, int cpu) | |||
923 | return data; | 923 | return data; |
924 | } | 924 | } |
925 | 925 | ||
926 | static int init_read(struct tracecmd_handle *handle, int cpu) | 926 | static int init_read(struct tracecmd_input *handle, int cpu) |
927 | { | 927 | { |
928 | off64_t ret; | 928 | off64_t ret; |
929 | off64_t save_seek; | 929 | off64_t save_seek; |
@@ -948,7 +948,7 @@ static int init_read(struct tracecmd_handle *handle, int cpu) | |||
948 | return 0; | 948 | return 0; |
949 | } | 949 | } |
950 | 950 | ||
951 | static int init_cpu(struct tracecmd_handle *handle, int cpu) | 951 | static int init_cpu(struct tracecmd_input *handle, int cpu) |
952 | { | 952 | { |
953 | if (!handle->cpu_data[cpu].size) { | 953 | if (!handle->cpu_data[cpu].size) { |
954 | printf("CPU %d is empty\n", cpu); | 954 | printf("CPU %d is empty\n", cpu); |
@@ -971,7 +971,7 @@ static int init_cpu(struct tracecmd_handle *handle, int cpu) | |||
971 | return 0; | 971 | return 0; |
972 | } | 972 | } |
973 | 973 | ||
974 | int tracecmd_init_data(struct tracecmd_handle *handle) | 974 | int tracecmd_init_data(struct tracecmd_input *handle) |
975 | { | 975 | { |
976 | struct pevent *pevent = handle->pevent; | 976 | struct pevent *pevent = handle->pevent; |
977 | unsigned long long size; | 977 | unsigned long long size; |
@@ -1032,9 +1032,9 @@ int tracecmd_init_data(struct tracecmd_handle *handle) | |||
1032 | return 0; | 1032 | return 0; |
1033 | } | 1033 | } |
1034 | 1034 | ||
1035 | struct tracecmd_handle *tracecmd_open(int fd) | 1035 | struct tracecmd_input *tracecmd_open(int fd) |
1036 | { | 1036 | { |
1037 | struct tracecmd_handle *handle; | 1037 | struct tracecmd_input *handle; |
1038 | char test[] = { 23, 8, 68 }; | 1038 | char test[] = { 23, 8, 68 }; |
1039 | char *version; | 1039 | char *version; |
1040 | char buf[BUFSIZ]; | 1040 | char buf[BUFSIZ]; |
@@ -1086,22 +1086,22 @@ struct tracecmd_handle *tracecmd_open(int fd) | |||
1086 | return NULL; | 1086 | return NULL; |
1087 | } | 1087 | } |
1088 | 1088 | ||
1089 | int tracecmd_long_size(struct tracecmd_handle *handle) | 1089 | int tracecmd_long_size(struct tracecmd_input *handle) |
1090 | { | 1090 | { |
1091 | return handle->long_size; | 1091 | return handle->long_size; |
1092 | } | 1092 | } |
1093 | 1093 | ||
1094 | int tracecmd_page_size(struct tracecmd_handle *handle) | 1094 | int tracecmd_page_size(struct tracecmd_input *handle) |
1095 | { | 1095 | { |
1096 | return handle->page_size; | 1096 | return handle->page_size; |
1097 | } | 1097 | } |
1098 | 1098 | ||
1099 | int tracecmd_cpus(struct tracecmd_handle *handle) | 1099 | int tracecmd_cpus(struct tracecmd_input *handle) |
1100 | { | 1100 | { |
1101 | return handle->cpus; | 1101 | return handle->cpus; |
1102 | } | 1102 | } |
1103 | 1103 | ||
1104 | struct pevent *tracecmd_get_pevent(struct tracecmd_handle *handle) | 1104 | struct pevent *tracecmd_get_pevent(struct tracecmd_input *handle) |
1105 | { | 1105 | { |
1106 | return handle->pevent; | 1106 | return handle->pevent; |
1107 | } | 1107 | } |
diff --git a/trace-local.h b/trace-local.h index 83fe077..2fab032 100644 --- a/trace-local.h +++ b/trace-local.h | |||
@@ -7,7 +7,7 @@ | |||
7 | 7 | ||
8 | void usage(char **argv); | 8 | void usage(char **argv); |
9 | 9 | ||
10 | struct tracecmd_handle *read_trace_header(void); | 10 | struct tracecmd_input *read_trace_header(void); |
11 | int read_trace_files(void); | 11 | int read_trace_files(void); |
12 | 12 | ||
13 | void trace_report(int argc, char **argv); | 13 | void trace_report(int argc, char **argv); |
diff --git a/trace-read.c b/trace-read.c index 862200f..9bc7f60 100644 --- a/trace-read.c +++ b/trace-read.c | |||
@@ -46,7 +46,7 @@ int show_events = 0; | |||
46 | 46 | ||
47 | static int filter_cpu = -1; | 47 | static int filter_cpu = -1; |
48 | 48 | ||
49 | static void show_data(struct tracecmd_handle *handle, int cpu) | 49 | static void show_data(struct tracecmd_input *handle, int cpu) |
50 | { | 50 | { |
51 | struct pevent *pevent; | 51 | struct pevent *pevent; |
52 | struct record *record; | 52 | struct record *record; |
@@ -78,7 +78,7 @@ static void read_rest(void) | |||
78 | } while (r > 0); | 78 | } while (r > 0); |
79 | } | 79 | } |
80 | 80 | ||
81 | static void read_data_info(struct tracecmd_handle *handle) | 81 | static void read_data_info(struct tracecmd_input *handle) |
82 | { | 82 | { |
83 | unsigned long long ts; | 83 | unsigned long long ts; |
84 | struct record *data; | 84 | struct record *data; |
@@ -123,7 +123,7 @@ static void read_data_info(struct tracecmd_handle *handle) | |||
123 | } while (next >= 0); | 123 | } while (next >= 0); |
124 | } | 124 | } |
125 | 125 | ||
126 | struct tracecmd_handle *read_trace_header(void) | 126 | struct tracecmd_input *read_trace_header(void) |
127 | { | 127 | { |
128 | input_fd = open(input_file, O_RDONLY); | 128 | input_fd = open(input_file, O_RDONLY); |
129 | if (input_fd < 0) | 129 | if (input_fd < 0) |
@@ -134,7 +134,7 @@ struct tracecmd_handle *read_trace_header(void) | |||
134 | 134 | ||
135 | void trace_report (int argc, char **argv) | 135 | void trace_report (int argc, char **argv) |
136 | { | 136 | { |
137 | struct tracecmd_handle *handle; | 137 | struct tracecmd_input *handle; |
138 | struct pevent *pevent; | 138 | struct pevent *pevent; |
139 | int show_funcs = 0; | 139 | int show_funcs = 0; |
140 | int show_endian = 0; | 140 | int show_endian = 0; |