]> git.baikalelectronics.ru Git - kernel.git/commit
perf: Fix event group context move
authorJiri Olsa <jolsa@redhat.com>
Fri, 1 Feb 2013 10:23:45 +0000 (11:23 +0100)
committerIngo Molnar <mingo@kernel.org>
Sun, 3 Feb 2013 11:01:29 +0000 (12:01 +0100)
commite5946da7e2960697fc07ac8e9ec3381a907be4ed
treea2b584263ace5acfda61830fb57591d49fdad34c
parent866fe6c20c56024d901b52d670e5aa29b6efa913
perf: Fix event group context move

When we have group with mixed events (hw/sw) we want to end up
with group leader being in hw context. So if group leader is
initialy sw event, we move all the events under hw context.

The move is done for each event by removing it from its context
and adding it back into proper one. As a part of the removal the
event is automatically disabled, which is not what we want at
this stage of creating groups.

The fix is to initialize event state after removal from sw
context.

This fix resulted from the following discussion:

  http://thread.gmane.org/gmane.linux.kernel.perf.user/1144

Reported-by: Andreas Hollmann <hollmann@in.tum.de>
Signed-off-by: Jiri Olsa <jolsa@redhat.com>
Cc: Arnaldo Carvalho de Melo <acme@redhat.com>
Cc: Namhyung Kim <namhyung@kernel.org>
Cc: Corey Ashford <cjashfor@linux.vnet.ibm.com>
Cc: Frederic Weisbecker <fweisbec@gmail.com>
Cc: Paul Mackerras <paulus@samba.org>
Cc: Peter Zijlstra <a.p.zijlstra@chello.nl>
Cc: Stephane Eranian <eranian@google.com>
Cc: Vince Weaver <vince@deater.net>
Link: http://lkml.kernel.org/r/1359714225-4231-1-git-send-email-jolsa@redhat.com
Signed-off-by: Ingo Molnar <mingo@kernel.org>
kernel/events/core.c