summaryrefslogtreecommitdiffstats
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.c17
1 files changed, 2 insertions, 15 deletions
diff --git a/tools/perf/util/session.c b/tools/perf/util/session.c
index 7f5851e433bb..7d8dbf213d64 100644
--- a/tools/perf/util/session.c
+++ b/tools/perf/util/session.c
@@ -442,19 +442,6 @@ static perf_event__swap_op perf_event__swap_ops[] = {
[PERF_RECORD_HEADER_MAX] = NULL,
};
-static void perf_session_free_sample_buffers(struct perf_session *session)
-{
- struct ordered_events *oe = &session->ordered_events;
-
- while (!list_empty(&oe->to_free)) {
- struct ordered_event *event;
-
- event = list_entry(oe->to_free.next, struct ordered_event, list);
- list_del(&event->list);
- free(event);
- }
-}
-
/*
* When perf record finishes a pass on every buffers, it records this pseudo
* event.
@@ -1092,7 +1079,7 @@ done:
out_err:
free(buf);
perf_session__warn_about_errors(session, tool);
- perf_session_free_sample_buffers(session);
+ ordered_events__free(&session->ordered_events);
return err;
}
@@ -1237,7 +1224,7 @@ out:
out_err:
ui_progress__finish();
perf_session__warn_about_errors(session, tool);
- perf_session_free_sample_buffers(session);
+ ordered_events__free(&session->ordered_events);
session->one_mmap = false;
return err;
}