aboutsummaryrefslogtreecommitdiffstats
path: root/tools/lib/traceevent/event-parse.c
diff options
context:
space:
mode:
authorTzvetomir Stoyanov <tstoyanov@vmware.com>2019-04-01 12:43:18 -0400
committerArnaldo Carvalho de Melo <acme@redhat.com>2019-04-01 14:18:10 -0400
commit69769ce159cbfd7567815a86cfc3ea63423de61b (patch)
tree8b3e0e4daca45e0db9780edccf752dca3bb3deae /tools/lib/traceevent/event-parse.c
parent047ff221e3ab07129a3566683e95a4d142f7c3c0 (diff)
perf tools, tools lib traceevent: Rename "pevent" member of struct tep_event to "tep"
The member "pevent" of the struct tep_event is renamed to "tep". This makes the struct consistent with the chosen naming convention: tep (trace event parser), instead of the old pevent. Signed-off-by: Tzvetomir Stoyanov <tstoyanov@vmware.com> Cc: Andrew Morton <akpm@linux-foundation.org> Cc: Jiri Olsa <jolsa@redhat.com> Cc: Namhyung Kim <namhyung@kernel.org> Link: http://lore.kernel.org/linux-trace-devel/20190401132111.13727-3-tstoyanov@vmware.com Link: http://lkml.kernel.org/r/20190401164344.627724996@goodmis.org Signed-off-by: Steven Rostedt (VMware) <rostedt@goodmis.org> Signed-off-by: Arnaldo Carvalho de Melo <acme@redhat.com>
Diffstat (limited to 'tools/lib/traceevent/event-parse.c')
-rw-r--r--tools/lib/traceevent/event-parse.c32
1 files changed, 16 insertions, 16 deletions
diff --git a/tools/lib/traceevent/event-parse.c b/tools/lib/traceevent/event-parse.c
index ceefa9b3d726..70ea638156f2 100644
--- a/tools/lib/traceevent/event-parse.c
+++ b/tools/lib/traceevent/event-parse.c
@@ -804,7 +804,7 @@ static int add_event(struct tep_handle *pevent, struct tep_event *event)
804 pevent->events[i] = event; 804 pevent->events[i] = event;
805 pevent->nr_events++; 805 pevent->nr_events++;
806 806
807 event->pevent = pevent; 807 event->tep = pevent;
808 808
809 return 0; 809 return 0;
810} 810}
@@ -1656,8 +1656,8 @@ static int event_read_fields(struct tep_event *event, struct tep_format_field **
1656 else if (field->flags & TEP_FIELD_IS_STRING) 1656 else if (field->flags & TEP_FIELD_IS_STRING)
1657 field->elementsize = 1; 1657 field->elementsize = 1;
1658 else if (field->flags & TEP_FIELD_IS_LONG) 1658 else if (field->flags & TEP_FIELD_IS_LONG)
1659 field->elementsize = event->pevent ? 1659 field->elementsize = event->tep ?
1660 event->pevent->long_size : 1660 event->tep->long_size :
1661 sizeof(long); 1661 sizeof(long);
1662 } else 1662 } else
1663 field->elementsize = field->size; 1663 field->elementsize = field->size;
@@ -3075,7 +3075,7 @@ process_function(struct tep_event *event, struct tep_print_arg *arg,
3075 return process_dynamic_array_len(event, arg, tok); 3075 return process_dynamic_array_len(event, arg, tok);
3076 } 3076 }
3077 3077
3078 func = find_func_handler(event->pevent, token); 3078 func = find_func_handler(event->tep, token);
3079 if (func) { 3079 if (func) {
3080 free_token(token); 3080 free_token(token);
3081 return process_func_handler(event, func, arg, tok); 3081 return process_func_handler(event, func, arg, tok);
@@ -3405,7 +3405,7 @@ int tep_read_number_field(struct tep_format_field *field, const void *data,
3405 case 2: 3405 case 2:
3406 case 4: 3406 case 4:
3407 case 8: 3407 case 8:
3408 *value = tep_read_number(field->event->pevent, 3408 *value = tep_read_number(field->event->tep,
3409 data + field->offset, field->size); 3409 data + field->offset, field->size);
3410 return 0; 3410 return 0;
3411 default: 3411 default:
@@ -3566,7 +3566,7 @@ tep_find_event_by_name(struct tep_handle *tep,
3566static unsigned long long 3566static unsigned long long
3567eval_num_arg(void *data, int size, struct tep_event *event, struct tep_print_arg *arg) 3567eval_num_arg(void *data, int size, struct tep_event *event, struct tep_print_arg *arg)
3568{ 3568{
3569 struct tep_handle *pevent = event->pevent; 3569 struct tep_handle *pevent = event->tep;
3570 unsigned long long val = 0; 3570 unsigned long long val = 0;
3571 unsigned long long left, right; 3571 unsigned long long left, right;
3572 struct tep_print_arg *typearg = NULL; 3572 struct tep_print_arg *typearg = NULL;
@@ -3907,7 +3907,7 @@ static void print_str_arg(struct trace_seq *s, void *data, int size,
3907 struct tep_event *event, const char *format, 3907 struct tep_event *event, const char *format,
3908 int len_arg, struct tep_print_arg *arg) 3908 int len_arg, struct tep_print_arg *arg)
3909{ 3909{
3910 struct tep_handle *pevent = event->pevent; 3910 struct tep_handle *pevent = event->tep;
3911 struct tep_print_flag_sym *flag; 3911 struct tep_print_flag_sym *flag;
3912 struct tep_format_field *field; 3912 struct tep_format_field *field;
3913 struct printk_map *printk; 3913 struct printk_map *printk;
@@ -4256,7 +4256,7 @@ static void free_args(struct tep_print_arg *args)
4256 4256
4257static struct tep_print_arg *make_bprint_args(char *fmt, void *data, int size, struct tep_event *event) 4257static struct tep_print_arg *make_bprint_args(char *fmt, void *data, int size, struct tep_event *event)
4258{ 4258{
4259 struct tep_handle *pevent = event->pevent; 4259 struct tep_handle *pevent = event->tep;
4260 struct tep_format_field *field, *ip_field; 4260 struct tep_format_field *field, *ip_field;
4261 struct tep_print_arg *args, *arg, **next; 4261 struct tep_print_arg *args, *arg, **next;
4262 unsigned long long ip, val; 4262 unsigned long long ip, val;
@@ -4434,7 +4434,7 @@ static char *
4434get_bprint_format(void *data, int size __maybe_unused, 4434get_bprint_format(void *data, int size __maybe_unused,
4435 struct tep_event *event) 4435 struct tep_event *event)
4436{ 4436{
4437 struct tep_handle *pevent = event->pevent; 4437 struct tep_handle *pevent = event->tep;
4438 unsigned long long addr; 4438 unsigned long long addr;
4439 struct tep_format_field *field; 4439 struct tep_format_field *field;
4440 struct printk_map *printk; 4440 struct printk_map *printk;
@@ -4835,7 +4835,7 @@ void tep_print_field(struct trace_seq *s, void *data,
4835{ 4835{
4836 unsigned long long val; 4836 unsigned long long val;
4837 unsigned int offset, len, i; 4837 unsigned int offset, len, i;
4838 struct tep_handle *pevent = field->event->pevent; 4838 struct tep_handle *pevent = field->event->tep;
4839 4839
4840 if (field->flags & TEP_FIELD_IS_ARRAY) { 4840 if (field->flags & TEP_FIELD_IS_ARRAY) {
4841 offset = field->offset; 4841 offset = field->offset;
@@ -4910,7 +4910,7 @@ void tep_print_fields(struct trace_seq *s, void *data,
4910 4910
4911static void pretty_print(struct trace_seq *s, void *data, int size, struct tep_event *event) 4911static void pretty_print(struct trace_seq *s, void *data, int size, struct tep_event *event)
4912{ 4912{
4913 struct tep_handle *pevent = event->pevent; 4913 struct tep_handle *pevent = event->tep;
4914 struct tep_print_fmt *print_fmt = &event->print_fmt; 4914 struct tep_print_fmt *print_fmt = &event->print_fmt;
4915 struct tep_print_arg *arg = print_fmt->args; 4915 struct tep_print_arg *arg = print_fmt->args;
4916 struct tep_print_arg *args = NULL; 4916 struct tep_print_arg *args = NULL;
@@ -5424,7 +5424,7 @@ void tep_event_info(struct trace_seq *s, struct tep_event *event,
5424{ 5424{
5425 int print_pretty = 1; 5425 int print_pretty = 1;
5426 5426
5427 if (event->pevent->print_raw || (event->flags & TEP_EVENT_FL_PRINTRAW)) 5427 if (event->tep->print_raw || (event->flags & TEP_EVENT_FL_PRINTRAW))
5428 tep_print_fields(s, record->data, record->size, event); 5428 tep_print_fields(s, record->data, record->size, event);
5429 else { 5429 else {
5430 5430
@@ -6163,7 +6163,7 @@ enum tep_errno __tep_parse_format(struct tep_event **eventp,
6163 } 6163 }
6164 6164
6165 /* Add pevent to event so that it can be referenced */ 6165 /* Add pevent to event so that it can be referenced */
6166 event->pevent = pevent; 6166 event->tep = pevent;
6167 6167
6168 ret = event_read_format(event); 6168 ret = event_read_format(event);
6169 if (ret < 0) { 6169 if (ret < 0) {
@@ -6357,8 +6357,8 @@ void *tep_get_field_raw(struct trace_seq *s, struct tep_event *event,
6357 6357
6358 offset = field->offset; 6358 offset = field->offset;
6359 if (field->flags & TEP_FIELD_IS_DYNAMIC) { 6359 if (field->flags & TEP_FIELD_IS_DYNAMIC) {
6360 offset = tep_read_number(event->pevent, 6360 offset = tep_read_number(event->tep,
6361 data + offset, field->size); 6361 data + offset, field->size);
6362 *len = offset >> 16; 6362 *len = offset >> 16;
6363 offset &= 0xffff; 6363 offset &= 0xffff;
6364 } else 6364 } else
@@ -6492,7 +6492,7 @@ int tep_print_func_field(struct trace_seq *s, const char *fmt,
6492 struct tep_record *record, int err) 6492 struct tep_record *record, int err)
6493{ 6493{
6494 struct tep_format_field *field = tep_find_field(event, name); 6494 struct tep_format_field *field = tep_find_field(event, name);
6495 struct tep_handle *pevent = event->pevent; 6495 struct tep_handle *pevent = event->tep;
6496 unsigned long long val; 6496 unsigned long long val;
6497 struct func_map *func; 6497 struct func_map *func;
6498 char tmp[128]; 6498 char tmp[128];