1
0
Fork 0
alistair23-linux/tools/perf
Michel Lespinasse d6ff127392 rbtree: adjust node color in __rb_erase_color() only when necessary
In __rb_erase_color(), we were always setting a node to black after
exiting the main loop.  And in one case, after fixing up the tree to
satisfy all rbtree invariants, we were setting the current node to root
just to guarantee a loop exit, at which point the root would be set to
black.  However this is not necessary, as the root of an rbtree is already
known to be black.  The only case where the color flip is required is when
we exit the loop due to the current node being red, and it's easiest to
just do the flip at that point instead of doing it after the loop.

[adrian.hunter@intel.com: perf tools: fix build for another rbtree.c change]
Signed-off-by: Michel Lespinasse <walken@google.com>
Cc: Andrea Arcangeli <aarcange@redhat.com>
Acked-by: David Woodhouse <David.Woodhouse@intel.com>
Cc: Rik van Riel <riel@redhat.com>
Cc: Peter Zijlstra <a.p.zijlstra@chello.nl>
Cc: Daniel Santos <daniel.santos@pobox.com>
Cc: Jens Axboe <axboe@kernel.dk>
Cc: "Eric W. Biederman" <ebiederm@xmission.com>
Signed-off-by: Adrian Hunter <adrian.hunter@intel.com>
Cc: Alexander Shishkin <alexander.shishkin@intel.com>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
2012-10-09 16:22:34 +09:00
..
Documentation perf trace: New tool 2012-09-26 20:42:23 -03:00
arch perf tools: Support for DWARF CFI unwinding on post processing 2012-08-11 15:06:56 -03:00
bench perf tools: Use __maybe_used for unused variables 2012-09-11 12:19:15 -03:00
config perf tools: Check libaudit availability for perf-trace builtin 2012-09-27 10:56:40 -03:00
python perf python: Use attr.watermark in twatch.py 2012-01-30 18:38:23 -02:00
scripts perf scripts: Add event_analyzing_sample-record/report 2012-09-17 13:11:15 -03:00
ui perf hists browser: Fix first column printing 2012-09-14 15:50:14 -03:00
util rbtree: adjust node color in __rb_erase_color() only when necessary 2012-10-09 16:22:34 +09:00
.gitignore perf tools: Ignore compiled python binaries 2012-09-07 12:10:58 -03:00
CREDITS perf_counter tools: Add CREDITS file for Git contributors 2009-06-24 19:54:29 +02:00
MANIFEST perf kvm: Events analysis tool 2012-09-21 12:51:22 -03:00
Makefile Merge branch 'rc-fixes' of git://git.kernel.org/pub/scm/linux/kernel/git/mmarek/kbuild 2012-10-08 07:56:10 +09:00
bash_completion perf tools: Support for events bash completion 2012-08-09 15:59:26 -03:00
builtin-annotate.c perf tools: Use __maybe_used for unused variables 2012-09-11 12:19:15 -03:00
builtin-bench.c perf tools: Use __maybe_used for unused variables 2012-09-11 12:19:15 -03:00
builtin-buildid-cache.c perf tools: Use __maybe_used for unused variables 2012-09-11 12:19:15 -03:00
builtin-buildid-list.c perf tools: Use __maybe_used for unused variables 2012-09-11 12:19:15 -03:00
builtin-diff.c perf tools: Use __maybe_used for unused variables 2012-09-11 12:19:15 -03:00
builtin-evlist.c perf tools: Use __maybe_used for unused variables 2012-09-11 12:19:15 -03:00
builtin-help.c perf tools: Use __maybe_used for unused variables 2012-09-11 12:19:15 -03:00
builtin-inject.c perf tools: Use __maybe_used for unused variables 2012-09-11 12:19:15 -03:00
builtin-kmem.c perf kmem: Use perf_evsel__intval and perf_session__set_tracepoints_handlers 2012-09-24 10:52:03 -03:00
builtin-kvm.c perf kvm: Use perf_session_env for reading cpuid 2012-09-24 11:47:27 -03:00
builtin-list.c perf tools: Use __maybe_used for unused variables 2012-09-11 12:19:15 -03:00
builtin-lock.c perf lock: Use perf_evsel__intval and perf_session__set_tracepoints_handlers 2012-09-24 10:52:12 -03:00
builtin-probe.c perf tools: Use __maybe_used for unused variables 2012-09-11 12:19:15 -03:00
builtin-record.c perf evlist: Renane set_filters method to apply_filters 2012-09-26 14:45:16 -03:00
builtin-report.c perf report: Add missing perf_hpp__init for pipe-mode 2012-09-17 13:11:33 -03:00
builtin-sched.c perf sched: Fixup for the die() removal 2012-09-14 15:48:38 -03:00
builtin-script.c perf scripts: Export a find_scripts() function 2012-09-17 13:11:26 -03:00
builtin-stat.c perf evlist: Renane set_filters method to apply_filters 2012-09-26 14:45:16 -03:00
builtin-test.c perf test: Add test to check we correctly parse and match syscall open parms 2012-09-26 13:42:01 -03:00
builtin-timechart.c perf timechart: Use zalloc and fix a couple leaks 2012-09-24 11:43:38 -03:00
builtin-top.c perf evsel: Know if byte swap is needed 2012-09-26 12:48:18 -03:00
builtin-trace.c perf trace: Add aliases for some syscalls 2012-09-27 13:18:49 -03:00
builtin.h perf trace: New tool 2012-09-26 20:42:23 -03:00
command-list.txt perf trace: New tool 2012-09-26 20:42:23 -03:00
design.txt perf tools: Update ioctl documentation for PERF_IOC_FLAG_GROUP 2012-05-31 11:38:42 -03:00
perf-archive.sh perf archive: Make 'f' the last parameter for tar 2012-09-17 13:10:42 -03:00
perf.c perf tools: Check libaudit availability for perf-trace builtin 2012-09-27 10:56:40 -03:00
perf.h Linux support for the 64-bit ARM architecture (AArch64) 2012-10-01 11:51:57 -07:00