perf_counter: Add unique counter id
authorPeter Zijlstra <a.p.zijlstra@chello.nl>
Tue, 2 Jun 2009 13:08:15 +0000 (15:08 +0200)
committerIngo Molnar <mingo@elte.hu>
Tue, 2 Jun 2009 19:45:29 +0000 (21:45 +0200)
commit8e5799b1ad2a0567fdfaaf0e91b40efee010f2c1
treebd3f45c348f48411a4496229572643211cbd59b8
parent53e111a730ea8b002d57dd226098c12789993329
perf_counter: Add unique counter id

Stephan raised the issue that we currently cannot distinguish between
similar counters within a group (PERF_RECORD_GROUP uses the config
value as identifier).

Therefore, generate a new ID for each counter using a global u64
sequence counter.

Reported-by: Stephane Eranian <eranian@googlemail.com>
Signed-off-by: Peter Zijlstra <a.p.zijlstra@chello.nl>
Cc: Mike Galbraith <efault@gmx.de>
Cc: Paul Mackerras <paulus@samba.org>
Cc: Corey Ashford <cjashfor@linux.vnet.ibm.com>
Cc: Marcelo Tosatti <mtosatti@redhat.com>
Cc: Arnaldo Carvalho de Melo <acme@redhat.com>
Cc: Thomas Gleixner <tglx@linutronix.de>
Cc: John Kacur <jkacur@redhat.com>
LKML-Reference: <new-submission>
Signed-off-by: Ingo Molnar <mingo@elte.hu>
include/linux/perf_counter.h
kernel/perf_counter.c