Commit f1dd1460 authored by Jiri Olsa's avatar Jiri Olsa Committed by Arnaldo Carvalho de Melo

perf session: Fix accounting of ordered samples queue

Properly account flushed samples within the ordered samples queue.
Signed-off-by: default avatarJiri Olsa <jolsa@kernel.org>
Acked-by: default avatarAdrian Hunter <adrian.hunter@intel.com>
Acked-by: default avatarDavid Ahern <dsahern@gmail.com>
Cc: Corey Ashford <cjashfor@linux.vnet.ibm.com>
Cc: David Ahern <dsahern@gmail.com>
Cc: Frederic Weisbecker <fweisbec@gmail.com>
Cc: Ingo Molnar <mingo@kernel.org>
Cc: Jean Pihet <jean.pihet@linaro.org>
Cc: Namhyung Kim <namhyung@kernel.org>
Cc: Paul Mackerras <paulus@samba.org>
Cc: Peter Zijlstra <a.p.zijlstra@chello.nl>
Link: http://lkml.kernel.org/r/1405893363-21967-2-git-send-email-jolsa@kernel.orgSigned-off-by: default avatarArnaldo Carvalho de Melo <acme@redhat.com>
parent c94b93cb
...@@ -509,6 +509,7 @@ static int flush_sample_queue(struct perf_session *s, ...@@ -509,6 +509,7 @@ static int flush_sample_queue(struct perf_session *s,
os->last_flush = iter->timestamp; os->last_flush = iter->timestamp;
list_del(&iter->list); list_del(&iter->list);
list_add(&iter->list, &os->sample_cache); list_add(&iter->list, &os->sample_cache);
os->nr_samples--;
if (show_progress) if (show_progress)
ui_progress__update(&prog, 1); ui_progress__update(&prog, 1);
...@@ -521,8 +522,6 @@ static int flush_sample_queue(struct perf_session *s, ...@@ -521,8 +522,6 @@ static int flush_sample_queue(struct perf_session *s,
list_entry(head->prev, struct sample_queue, list); list_entry(head->prev, struct sample_queue, list);
} }
os->nr_samples = 0;
return 0; return 0;
} }
......
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