aboutsummaryrefslogtreecommitdiffstats
path: root/tools/perf/util/session.c
diff options
context:
space:
mode:
Diffstat (limited to 'tools/perf/util/session.c')
-rw-r--r--tools/perf/util/session.c42
1 files changed, 8 insertions, 34 deletions
diff --git a/tools/perf/util/session.c b/tools/perf/util/session.c
index d5636ba94b20..60b3593d210d 100644
--- a/tools/perf/util/session.c
+++ b/tools/perf/util/session.c
@@ -240,14 +240,6 @@ static int process_event_stub(struct perf_tool *tool __maybe_unused,
240 return 0; 240 return 0;
241} 241}
242 242
243static int process_build_id_stub(struct perf_tool *tool __maybe_unused,
244 union perf_event *event __maybe_unused,
245 struct perf_session *session __maybe_unused)
246{
247 dump_printf(": unhandled!\n");
248 return 0;
249}
250
251static int process_finished_round_stub(struct perf_tool *tool __maybe_unused, 243static int process_finished_round_stub(struct perf_tool *tool __maybe_unused,
252 union perf_event *event __maybe_unused, 244 union perf_event *event __maybe_unused,
253 struct ordered_events *oe __maybe_unused) 245 struct ordered_events *oe __maybe_unused)
@@ -260,23 +252,6 @@ static int process_finished_round(struct perf_tool *tool,
260 union perf_event *event, 252 union perf_event *event,
261 struct ordered_events *oe); 253 struct ordered_events *oe);
262 254
263static int process_id_index_stub(struct perf_tool *tool __maybe_unused,
264 union perf_event *event __maybe_unused,
265 struct perf_session *perf_session
266 __maybe_unused)
267{
268 dump_printf(": unhandled!\n");
269 return 0;
270}
271
272static int process_event_auxtrace_info_stub(struct perf_tool *tool __maybe_unused,
273 union perf_event *event __maybe_unused,
274 struct perf_session *session __maybe_unused)
275{
276 dump_printf(": unhandled!\n");
277 return 0;
278}
279
280static int skipn(int fd, off_t n) 255static int skipn(int fd, off_t n)
281{ 256{
282 char buf[4096]; 257 char buf[4096];
@@ -303,10 +278,9 @@ static s64 process_event_auxtrace_stub(struct perf_tool *tool __maybe_unused,
303 return event->auxtrace.size; 278 return event->auxtrace.size;
304} 279}
305 280
306static 281static int process_event_op2_stub(struct perf_tool *tool __maybe_unused,
307int process_event_auxtrace_error_stub(struct perf_tool *tool __maybe_unused, 282 union perf_event *event __maybe_unused,
308 union perf_event *event __maybe_unused, 283 struct perf_session *session __maybe_unused)
309 struct perf_session *session __maybe_unused)
310{ 284{
311 dump_printf(": unhandled!\n"); 285 dump_printf(": unhandled!\n");
312 return 0; 286 return 0;
@@ -410,7 +384,7 @@ void perf_tool__fill_defaults(struct perf_tool *tool)
410 if (tool->tracing_data == NULL) 384 if (tool->tracing_data == NULL)
411 tool->tracing_data = process_event_synth_tracing_data_stub; 385 tool->tracing_data = process_event_synth_tracing_data_stub;
412 if (tool->build_id == NULL) 386 if (tool->build_id == NULL)
413 tool->build_id = process_build_id_stub; 387 tool->build_id = process_event_op2_stub;
414 if (tool->finished_round == NULL) { 388 if (tool->finished_round == NULL) {
415 if (tool->ordered_events) 389 if (tool->ordered_events)
416 tool->finished_round = process_finished_round; 390 tool->finished_round = process_finished_round;
@@ -418,13 +392,13 @@ void perf_tool__fill_defaults(struct perf_tool *tool)
418 tool->finished_round = process_finished_round_stub; 392 tool->finished_round = process_finished_round_stub;
419 } 393 }
420 if (tool->id_index == NULL) 394 if (tool->id_index == NULL)
421 tool->id_index = process_id_index_stub; 395 tool->id_index = process_event_op2_stub;
422 if (tool->auxtrace_info == NULL) 396 if (tool->auxtrace_info == NULL)
423 tool->auxtrace_info = process_event_auxtrace_info_stub; 397 tool->auxtrace_info = process_event_op2_stub;
424 if (tool->auxtrace == NULL) 398 if (tool->auxtrace == NULL)
425 tool->auxtrace = process_event_auxtrace_stub; 399 tool->auxtrace = process_event_auxtrace_stub;
426 if (tool->auxtrace_error == NULL) 400 if (tool->auxtrace_error == NULL)
427 tool->auxtrace_error = process_event_auxtrace_error_stub; 401 tool->auxtrace_error = process_event_op2_stub;
428 if (tool->thread_map == NULL) 402 if (tool->thread_map == NULL)
429 tool->thread_map = process_event_thread_map_stub; 403 tool->thread_map = process_event_thread_map_stub;
430 if (tool->cpu_map == NULL) 404 if (tool->cpu_map == NULL)
@@ -1149,7 +1123,7 @@ static struct machine *machines__find_for_cpumode(struct machines *machines,
1149 1123
1150 machine = machines__find(machines, pid); 1124 machine = machines__find(machines, pid);
1151 if (!machine) 1125 if (!machine)
1152 machine = machines__find(machines, DEFAULT_GUEST_KERNEL_ID); 1126 machine = machines__findnew(machines, DEFAULT_GUEST_KERNEL_ID);
1153 return machine; 1127 return machine;
1154 } 1128 }
1155 1129