diff options
Diffstat (limited to 'tools/perf/builtin-script.c')
-rw-r--r-- | tools/perf/builtin-script.c | 23 |
1 files changed, 12 insertions, 11 deletions
diff --git a/tools/perf/builtin-script.c b/tools/perf/builtin-script.c index 150a606002e..5f40df635dc 100644 --- a/tools/perf/builtin-script.c +++ b/tools/perf/builtin-script.c | |||
@@ -63,7 +63,8 @@ static int cleanup_scripting(void) | |||
63 | 63 | ||
64 | static char const *input_name = "perf.data"; | 64 | static char const *input_name = "perf.data"; |
65 | 65 | ||
66 | static int process_sample_event(event_t *event, struct sample_data *sample, | 66 | static int process_sample_event(union perf_event *event, |
67 | struct perf_sample *sample, | ||
67 | struct perf_session *session) | 68 | struct perf_session *session) |
68 | { | 69 | { |
69 | struct thread *thread = perf_session__findnew(session, event->ip.pid); | 70 | struct thread *thread = perf_session__findnew(session, event->ip.pid); |
@@ -77,8 +78,8 @@ static int process_sample_event(event_t *event, struct sample_data *sample, | |||
77 | if (session->sample_type & PERF_SAMPLE_RAW) { | 78 | if (session->sample_type & PERF_SAMPLE_RAW) { |
78 | if (debug_mode) { | 79 | if (debug_mode) { |
79 | if (sample->time < last_timestamp) { | 80 | if (sample->time < last_timestamp) { |
80 | pr_err("Samples misordered, previous: %llu " | 81 | pr_err("Samples misordered, previous: %" PRIu64 |
81 | "this: %llu\n", last_timestamp, | 82 | " this: %" PRIu64 "\n", last_timestamp, |
82 | sample->time); | 83 | sample->time); |
83 | nr_unordered++; | 84 | nr_unordered++; |
84 | } | 85 | } |
@@ -100,14 +101,14 @@ static int process_sample_event(event_t *event, struct sample_data *sample, | |||
100 | } | 101 | } |
101 | 102 | ||
102 | static struct perf_event_ops event_ops = { | 103 | static struct perf_event_ops event_ops = { |
103 | .sample = process_sample_event, | 104 | .sample = process_sample_event, |
104 | .comm = event__process_comm, | 105 | .comm = perf_event__process_comm, |
105 | .attr = event__process_attr, | 106 | .attr = perf_event__process_attr, |
106 | .event_type = event__process_event_type, | 107 | .event_type = perf_event__process_event_type, |
107 | .tracing_data = event__process_tracing_data, | 108 | .tracing_data = perf_event__process_tracing_data, |
108 | .build_id = event__process_build_id, | 109 | .build_id = perf_event__process_build_id, |
109 | .ordering_requires_timestamps = true, | ||
110 | .ordered_samples = true, | 110 | .ordered_samples = true, |
111 | .ordering_requires_timestamps = true, | ||
111 | }; | 112 | }; |
112 | 113 | ||
113 | extern volatile int session_done; | 114 | extern volatile int session_done; |
@@ -126,7 +127,7 @@ static int __cmd_script(struct perf_session *session) | |||
126 | ret = perf_session__process_events(session, &event_ops); | 127 | ret = perf_session__process_events(session, &event_ops); |
127 | 128 | ||
128 | if (debug_mode) | 129 | if (debug_mode) |
129 | pr_err("Misordered timestamps: %llu\n", nr_unordered); | 130 | pr_err("Misordered timestamps: %" PRIu64 "\n", nr_unordered); |
130 | 131 | ||
131 | return ret; | 132 | return ret; |
132 | } | 133 | } |