aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJiri Olsa <[email protected]>2014-07-20 23:55:45 +0200
committerArnaldo Carvalho de Melo <[email protected]>2014-07-24 16:40:47 -0300
commitf1dd1460a40894b00bbeacd753025e9251ec11bd (patch)
tree89af3d56cf02e2b4a1ae706f9f3e0dd70fae39aa
parentc94b93cbca59435dfc0f2a838fea55bd632145d3 (diff)
perf session: Fix accounting of ordered samples queue
Properly account flushed samples within the ordered samples queue. Signed-off-by: Jiri Olsa <[email protected]> Acked-by: Adrian Hunter <[email protected]> Acked-by: David Ahern <[email protected]> Cc: Corey Ashford <[email protected]> Cc: David Ahern <[email protected]> Cc: Frederic Weisbecker <[email protected]> Cc: Ingo Molnar <[email protected]> Cc: Jean Pihet <[email protected]> Cc: Namhyung Kim <[email protected]> Cc: Paul Mackerras <[email protected]> Cc: Peter Zijlstra <[email protected]> Link: http://lkml.kernel.org/r/[email protected] Signed-off-by: Arnaldo Carvalho de Melo <[email protected]>
-rw-r--r--tools/perf/util/session.c3
1 files changed, 1 insertions, 2 deletions
diff --git a/tools/perf/util/session.c b/tools/perf/util/session.c
index fab5838c06be..88dfef70c13d 100644
--- a/tools/perf/util/session.c
+++ b/tools/perf/util/session.c
@@ -509,6 +509,7 @@ static int flush_sample_queue(struct perf_session *s,
os->last_flush = iter->timestamp;
list_del(&iter->list);
list_add(&iter->list, &os->sample_cache);
+ os->nr_samples--;
if (show_progress)
ui_progress__update(&prog, 1);
@@ -521,8 +522,6 @@ static int flush_sample_queue(struct perf_session *s,
list_entry(head->prev, struct sample_queue, list);
}
- os->nr_samples = 0;
-
return 0;
}