|
@@ -225,10 +225,17 @@ static int process_event_stub(struct perf_tool *tool __maybe_unused,
|
|
return 0;
|
|
return 0;
|
|
}
|
|
}
|
|
|
|
|
|
|
|
+static int process_build_id_stub(struct perf_tool *tool __maybe_unused,
|
|
|
|
+ union perf_event *event __maybe_unused,
|
|
|
|
+ struct perf_session *session __maybe_unused)
|
|
|
|
+{
|
|
|
|
+ dump_printf(": unhandled!\n");
|
|
|
|
+ return 0;
|
|
|
|
+}
|
|
|
|
+
|
|
static int process_finished_round_stub(struct perf_tool *tool __maybe_unused,
|
|
static int process_finished_round_stub(struct perf_tool *tool __maybe_unused,
|
|
union perf_event *event __maybe_unused,
|
|
union perf_event *event __maybe_unused,
|
|
- struct perf_session *perf_session
|
|
|
|
- __maybe_unused)
|
|
|
|
|
|
+ struct ordered_events *oe __maybe_unused)
|
|
{
|
|
{
|
|
dump_printf(": unhandled!\n");
|
|
dump_printf(": unhandled!\n");
|
|
return 0;
|
|
return 0;
|
|
@@ -236,7 +243,7 @@ static int process_finished_round_stub(struct perf_tool *tool __maybe_unused,
|
|
|
|
|
|
static int process_finished_round(struct perf_tool *tool,
|
|
static int process_finished_round(struct perf_tool *tool,
|
|
union perf_event *event,
|
|
union perf_event *event,
|
|
- struct perf_session *session);
|
|
|
|
|
|
+ struct ordered_events *oe);
|
|
|
|
|
|
static int process_id_index_stub(struct perf_tool *tool __maybe_unused,
|
|
static int process_id_index_stub(struct perf_tool *tool __maybe_unused,
|
|
union perf_event *event __maybe_unused,
|
|
union perf_event *event __maybe_unused,
|
|
@@ -274,7 +281,7 @@ void perf_tool__fill_defaults(struct perf_tool *tool)
|
|
if (tool->tracing_data == NULL)
|
|
if (tool->tracing_data == NULL)
|
|
tool->tracing_data = process_event_synth_tracing_data_stub;
|
|
tool->tracing_data = process_event_synth_tracing_data_stub;
|
|
if (tool->build_id == NULL)
|
|
if (tool->build_id == NULL)
|
|
- tool->build_id = process_finished_round_stub;
|
|
|
|
|
|
+ tool->build_id = process_build_id_stub;
|
|
if (tool->finished_round == NULL) {
|
|
if (tool->finished_round == NULL) {
|
|
if (tool->ordered_events)
|
|
if (tool->ordered_events)
|
|
tool->finished_round = process_finished_round;
|
|
tool->finished_round = process_finished_round;
|
|
@@ -526,10 +533,8 @@ static perf_event__swap_op perf_event__swap_ops[] = {
|
|
*/
|
|
*/
|
|
static int process_finished_round(struct perf_tool *tool __maybe_unused,
|
|
static int process_finished_round(struct perf_tool *tool __maybe_unused,
|
|
union perf_event *event __maybe_unused,
|
|
union perf_event *event __maybe_unused,
|
|
- struct perf_session *session)
|
|
|
|
|
|
+ struct ordered_events *oe)
|
|
{
|
|
{
|
|
- struct ordered_events *oe = &session->ordered_events;
|
|
|
|
-
|
|
|
|
return ordered_events__flush(oe, OE_FLUSH__ROUND);
|
|
return ordered_events__flush(oe, OE_FLUSH__ROUND);
|
|
}
|
|
}
|
|
|
|
|
|
@@ -961,7 +966,8 @@ static s64 perf_session__process_user_event(struct perf_session *session,
|
|
union perf_event *event,
|
|
union perf_event *event,
|
|
u64 file_offset)
|
|
u64 file_offset)
|
|
{
|
|
{
|
|
- struct perf_tool *tool = session->ordered_events.tool;
|
|
|
|
|
|
+ struct ordered_events *oe = &session->ordered_events;
|
|
|
|
+ struct perf_tool *tool = oe->tool;
|
|
int fd = perf_data_file__fd(session->file);
|
|
int fd = perf_data_file__fd(session->file);
|
|
int err;
|
|
int err;
|
|
|
|
|
|
@@ -989,7 +995,7 @@ static s64 perf_session__process_user_event(struct perf_session *session,
|
|
case PERF_RECORD_HEADER_BUILD_ID:
|
|
case PERF_RECORD_HEADER_BUILD_ID:
|
|
return tool->build_id(tool, event, session);
|
|
return tool->build_id(tool, event, session);
|
|
case PERF_RECORD_FINISHED_ROUND:
|
|
case PERF_RECORD_FINISHED_ROUND:
|
|
- return tool->finished_round(tool, event, session);
|
|
|
|
|
|
+ return tool->finished_round(tool, event, oe);
|
|
case PERF_RECORD_ID_INDEX:
|
|
case PERF_RECORD_ID_INDEX:
|
|
return tool->id_index(tool, event, session);
|
|
return tool->id_index(tool, event, session);
|
|
default:
|
|
default:
|