Linux kernel mirror (for testing) git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
kernel os linux

perf tools: Export perf_event__process_finished_round()

Export perf_event__process_finished_round() so it can be used elsewhere.

This is needed in perf inject to obey finished-round ordering.

Signed-off-by: Adrian Hunter <adrian.hunter@intel.com>
Acked-by: Ian Rogers <irogers@google.com>
Cc: Jiri Olsa <jolsa@kernel.org>
Cc: Namhyung Kim <namhyung@kernel.org>
Cc: kvm@vger.kernel.org
Link: https://lore.kernel.org/r/20220711093218.10967-5-adrian.hunter@intel.com
Signed-off-by: Arnaldo Carvalho de Melo <acme@redhat.com>

authored by

Adrian Hunter and committed by
Arnaldo Carvalho de Melo
eddc6e3f f8bcf1e2

+8 -8
+4 -8
tools/perf/util/session.c
··· 374 374 return 0; 375 375 } 376 376 377 - static int process_finished_round(struct perf_tool *tool, 378 - union perf_event *event, 379 - struct ordered_events *oe); 380 - 381 377 static int skipn(int fd, off_t n) 382 378 { 383 379 char buf[4096]; ··· 530 534 tool->build_id = process_event_op2_stub; 531 535 if (tool->finished_round == NULL) { 532 536 if (tool->ordered_events) 533 - tool->finished_round = process_finished_round; 537 + tool->finished_round = perf_event__process_finished_round; 534 538 else 535 539 tool->finished_round = process_finished_round_stub; 536 540 } ··· 1065 1069 * Flush every events below timestamp 7 1066 1070 * etc... 1067 1071 */ 1068 - static int process_finished_round(struct perf_tool *tool __maybe_unused, 1069 - union perf_event *event __maybe_unused, 1070 - struct ordered_events *oe) 1072 + int perf_event__process_finished_round(struct perf_tool *tool __maybe_unused, 1073 + union perf_event *event __maybe_unused, 1074 + struct ordered_events *oe) 1071 1075 { 1072 1076 if (dump_trace) 1073 1077 fprintf(stdout, "\n");
+4
tools/perf/util/session.h
··· 155 155 int perf_event__process_id_index(struct perf_session *session, 156 156 union perf_event *event); 157 157 158 + int perf_event__process_finished_round(struct perf_tool *tool, 159 + union perf_event *event, 160 + struct ordered_events *oe); 161 + 158 162 #endif /* __PERF_SESSION_H */