diff options
author | 2015-03-03 13:02:24 -0300 | |
---|---|---|
committer | 2015-03-12 12:39:51 -0300 | |
commit | 4a6b362f36e68618ee4d3cdb361d05a5e80af023 (patch) | |
tree | d4857d28733a0ae160b793835cf290a068abdb2a /tools/perf/util/session.c | |
parent | perf tools: Remove superfluous thread->comm_set setting (diff) | |
download | linux-4a6b362f36e68618ee4d3cdb361d05a5e80af023.tar.gz linux-4a6b362f36e68618ee4d3cdb361d05a5e80af023.tar.bz2 linux-4a6b362f36e68618ee4d3cdb361d05a5e80af023.zip |
perf ordered_events: Adopt queue() method
From perf_session, will be used in 'trace'.
Cc: Adrian Hunter <adrian.hunter@intel.com>
Cc: Borislav Petkov <bp@suse.de>
Cc: David Ahern <dsahern@gmail.com>
Cc: Don Zickus <dzickus@redhat.com>
Cc: Frederic Weisbecker <fweisbec@gmail.com>
Cc: Jiri Olsa <jolsa@redhat.com>
Cc: Namhyung Kim <namhyung@kernel.org>
Cc: Stephane Eranian <eranian@google.com>
Link: http://lkml.kernel.org/n/tip-mfihndzaumx44h6y37ng2irb@git.kernel.org
Signed-off-by: Arnaldo Carvalho de Melo <acme@redhat.com>
Diffstat (limited to 'tools/perf/util/session.c')
-rw-r--r-- | tools/perf/util/session.c | 28 |
1 files changed, 1 insertions, 27 deletions
diff --git a/tools/perf/util/session.c b/tools/perf/util/session.c index 703a370ae5b6..adf0740c563b 100644 --- a/tools/perf/util/session.c +++ b/tools/perf/util/session.c @@ -541,33 +541,7 @@ static int process_finished_round(struct perf_tool *tool __maybe_unused, int perf_session__queue_event(struct perf_session *s, union perf_event *event, struct perf_sample *sample, u64 file_offset) { - struct ordered_events *oe = &s->ordered_events; - - u64 timestamp = sample->time; - struct ordered_event *new; - - if (!timestamp || timestamp == ~0ULL) - return -ETIME; - - if (timestamp < oe->last_flush) { - pr_oe_time(timestamp, "out of order event\n"); - pr_oe_time(oe->last_flush, "last flush, last_flush_type %d\n", - oe->last_flush_type); - - s->evlist->stats.nr_unordered_events++; - } - - new = ordered_events__new(oe, timestamp, event); - if (!new) { - ordered_events__flush(oe, OE_FLUSH__HALF); - new = ordered_events__new(oe, timestamp, event); - } - - if (!new) - return -ENOMEM; - - new->file_offset = file_offset; - return 0; + return ordered_events__queue(&s->ordered_events, event, sample, file_offset); } static void callchain__lbr_callstack_printf(struct perf_sample *sample) |