aboutsummaryrefslogtreecommitdiffstats
path: root/tools/perf/util/trace-event-parse.c
diff options
context:
space:
mode:
Diffstat (limited to 'tools/perf/util/trace-event-parse.c')
-rw-r--r--tools/perf/util/trace-event-parse.c18
1 files changed, 13 insertions, 5 deletions
diff --git a/tools/perf/util/trace-event-parse.c b/tools/perf/util/trace-event-parse.c
index 85d7163a9fd4..1f16495e5597 100644
--- a/tools/perf/util/trace-event-parse.c
+++ b/tools/perf/util/trace-event-parse.c
@@ -1888,7 +1888,7 @@ find_any_field(struct event *event, const char *name)
1888 return find_field(event, name); 1888 return find_field(event, name);
1889} 1889}
1890 1890
1891static unsigned long long read_size(void *ptr, int size) 1891unsigned long long read_size(void *ptr, int size)
1892{ 1892{
1893 switch (size) { 1893 switch (size) {
1894 case 1: 1894 case 1:
@@ -1973,7 +1973,7 @@ int trace_parse_common_type(void *data)
1973 "common_type"); 1973 "common_type");
1974} 1974}
1975 1975
1976static int parse_common_pid(void *data) 1976int trace_parse_common_pid(void *data)
1977{ 1977{
1978 static int pid_offset; 1978 static int pid_offset;
1979 static int pid_size; 1979 static int pid_size;
@@ -2025,6 +2025,14 @@ struct event *trace_find_event(int id)
2025 return event; 2025 return event;
2026} 2026}
2027 2027
2028struct event *trace_find_next_event(struct event *event)
2029{
2030 if (!event)
2031 return event_list;
2032
2033 return event->next;
2034}
2035
2028static unsigned long long eval_num_arg(void *data, int size, 2036static unsigned long long eval_num_arg(void *data, int size,
2029 struct event *event, struct print_arg *arg) 2037 struct event *event, struct print_arg *arg)
2030{ 2038{
@@ -2164,7 +2172,7 @@ static const struct flag flags[] = {
2164 { "HRTIMER_RESTART", 1 }, 2172 { "HRTIMER_RESTART", 1 },
2165}; 2173};
2166 2174
2167static unsigned long long eval_flag(const char *flag) 2175unsigned long long eval_flag(const char *flag)
2168{ 2176{
2169 int i; 2177 int i;
2170 2178
@@ -2694,7 +2702,7 @@ get_return_for_leaf(int cpu, int cur_pid, unsigned long long cur_func,
2694 if (!(event->flags & EVENT_FL_ISFUNCRET)) 2702 if (!(event->flags & EVENT_FL_ISFUNCRET))
2695 return NULL; 2703 return NULL;
2696 2704
2697 pid = parse_common_pid(next->data); 2705 pid = trace_parse_common_pid(next->data);
2698 field = find_field(event, "func"); 2706 field = find_field(event, "func");
2699 if (!field) 2707 if (!field)
2700 die("function return does not have field func"); 2708 die("function return does not have field func");
@@ -2980,7 +2988,7 @@ void print_event(int cpu, void *data, int size, unsigned long long nsecs,
2980 return; 2988 return;
2981 } 2989 }
2982 2990
2983 pid = parse_common_pid(data); 2991 pid = trace_parse_common_pid(data);
2984 2992
2985 if (event->flags & (EVENT_FL_ISFUNCENT | EVENT_FL_ISFUNCRET)) 2993 if (event->flags & (EVENT_FL_ISFUNCENT | EVENT_FL_ISFUNCRET))
2986 return pretty_print_func_graph(data, size, event, cpu, 2994 return pretty_print_func_graph(data, size, event, cpu,