Commit eddc6e3f authored by Adrian Hunter's avatar Adrian Hunter Committed by Arnaldo Carvalho de Melo

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: default avatarAdrian Hunter <adrian.hunter@intel.com>
Acked-by: default avatarIan 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.comSigned-off-by: default avatarArnaldo Carvalho de Melo <acme@redhat.com>
parent f8bcf1e2
...@@ -374,10 +374,6 @@ static int process_finished_round_stub(struct perf_tool *tool __maybe_unused, ...@@ -374,10 +374,6 @@ static int process_finished_round_stub(struct perf_tool *tool __maybe_unused,
return 0; return 0;
} }
static int process_finished_round(struct perf_tool *tool,
union perf_event *event,
struct ordered_events *oe);
static int skipn(int fd, off_t n) static int skipn(int fd, off_t n)
{ {
char buf[4096]; char buf[4096];
...@@ -534,7 +530,7 @@ void perf_tool__fill_defaults(struct perf_tool *tool) ...@@ -534,7 +530,7 @@ void perf_tool__fill_defaults(struct perf_tool *tool)
tool->build_id = process_event_op2_stub; tool->build_id = process_event_op2_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 = perf_event__process_finished_round;
else else
tool->finished_round = process_finished_round_stub; tool->finished_round = process_finished_round_stub;
} }
...@@ -1069,9 +1065,9 @@ static perf_event__swap_op perf_event__swap_ops[] = { ...@@ -1069,9 +1065,9 @@ static perf_event__swap_op perf_event__swap_ops[] = {
* Flush every events below timestamp 7 * Flush every events below timestamp 7
* etc... * etc...
*/ */
static int process_finished_round(struct perf_tool *tool __maybe_unused, int perf_event__process_finished_round(struct perf_tool *tool __maybe_unused,
union perf_event *event __maybe_unused, union perf_event *event __maybe_unused,
struct ordered_events *oe) struct ordered_events *oe)
{ {
if (dump_trace) if (dump_trace)
fprintf(stdout, "\n"); fprintf(stdout, "\n");
......
...@@ -155,4 +155,8 @@ int perf_session__deliver_synth_event(struct perf_session *session, ...@@ -155,4 +155,8 @@ int perf_session__deliver_synth_event(struct perf_session *session,
int perf_event__process_id_index(struct perf_session *session, int perf_event__process_id_index(struct perf_session *session,
union perf_event *event); union perf_event *event);
int perf_event__process_finished_round(struct perf_tool *tool,
union perf_event *event,
struct ordered_events *oe);
#endif /* __PERF_SESSION_H */ #endif /* __PERF_SESSION_H */
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment