diff options
author | Thomas Gleixner <tglx@linutronix.de> | 2010-11-30 17:49:33 +0000 |
---|---|---|
committer | Arnaldo Carvalho de Melo <acme@redhat.com> | 2010-11-30 19:52:36 -0200 |
commit | a1225decc43849a73f7e4c333c3fdbbb8a9c1e65 (patch) | |
tree | d08e7f7aaec99038f592176923cc1990767c69f2 /tools/perf/util/session.h | |
parent | c320c7b7d380e630f595de1236d9d085b035d5b4 (diff) | |
download | blackbird-op-linux-a1225decc43849a73f7e4c333c3fdbbb8a9c1e65.tar.gz blackbird-op-linux-a1225decc43849a73f7e4c333c3fdbbb8a9c1e65.zip |
perf session: Fix list sort algorithm
The homebrewn sort algorithm fails to sort in time order. One of the problem
spots is that it fails to deal with equal timestamps correctly.
My first gut reaction was to replace the fancy list with an rbtree, but the
performance is 3 times worse.
Rewrite it so it works.
Cc: Ingo Molnar <mingo@elte.hu>
Cc: Peter Zijlstra <peterz@infradead.org>
Cc: Frederic Weisbecker <fweisbec@gmail.com>
LKML-Reference: <20101130163819.908482530@linutronix.de>
Signed-off-by: Thomas Gleixner <tglx@linutronix.de>
Signed-off-by: Arnaldo Carvalho de Melo <acme@redhat.com>
Diffstat (limited to 'tools/perf/util/session.h')
-rw-r--r-- | tools/perf/util/session.h | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/tools/perf/util/session.h b/tools/perf/util/session.h index 9fa0fc2a863f..a00f32ed1c79 100644 --- a/tools/perf/util/session.h +++ b/tools/perf/util/session.h @@ -17,8 +17,8 @@ struct ordered_samples { u64 last_flush; u64 next_flush; u64 max_timestamp; - struct list_head samples_head; - struct sample_queue *last_inserted; + struct list_head samples; + struct sample_queue *last_sample; }; struct perf_session { |