]> git.baikalelectronics.ru Git - kernel.git/commit
perf_counter tools: Add locking to perf top
authorArnaldo Carvalho de Melo <acme@redhat.com>
Fri, 29 May 2009 20:03:07 +0000 (17:03 -0300)
committerIngo Molnar <mingo@elte.hu>
Sat, 30 May 2009 09:34:00 +0000 (11:34 +0200)
commit66d001c4f7d5b355463aa09b6a1d43c243b50eb6
tree364605b0662b25f6a3abe3238489bdb5dfe001f5
parent3cb8eae055ba41f42df4f71b9037ef24df4bdb4e
perf_counter tools: Add locking to perf top

perf_counter tools: Add locking to perf top

We need to protect the active_symbols list as two threads change it:
the main thread adding entries to the head and the display thread
decaying entries from any place in the list.

Also related: take a snapshot of syme->count[0] before using it to
calculate the weight and to show the same number used in this calc when
displaying the symbol usage.

Reported-by: Mike Galbraith <efault@gmx.de>
Tested-by: Mike Galbraith <efault@gmx.de>
Signed-off-by: Arnaldo Carvalho de Melo <acme@redhat.com>
Cc: Peter Zijlstra <a.p.zijlstra@chello.nl>
Cc: Paul Mackerras <paulus@samba.org>
Cc: Steven Rostedt <rostedt@goodmis.org>
LKML-Reference: <20090529200307.GR4747@ghostprotocols.net>
Signed-off-by: Ingo Molnar <mingo@elte.hu>
Documentation/perf_counter/builtin-top.c