aboutsummaryrefslogtreecommitdiff
path: root/tools/perf/util/scripting-engines/trace-event-python.c
diff options
context:
space:
mode:
authorDavid Ahern <[email protected]>2012-09-13 14:59:13 -0600
committerArnaldo Carvalho de Melo <[email protected]>2012-10-16 12:43:31 -0300
commit1342798cc13e3b48d9b5738f0c8fa812ccea8101 (patch)
tree19a89b595304ab6e2bf5ecc969599f9585bcc15a /tools/perf/util/scripting-engines/trace-event-python.c
parent95cf59ea72331d0093010543b8951bb43f262cac (diff)
perf tool: Precise mode requires exclude_guest
Summary of events per Peter: "Intel PEBS in VT-x context uses the DS address as a guest linear address, even though its programmed by the host as a host linear address. This either results in guest memory corruption and or the hardware faulting and 'crashing' the virtual machine. Therefore we have to disable PEBS on VT-x enter and re-enable on VT-x exit, enforcing a strict exclude_guest. AMB IBS does work but doesn't currently support exclude_* at all, setting an exclude_* bit will make it fail." This patch handles userspace perf command, setting the exclude_guest attribute if precise mode is requested, but only if a user has not specified a request for guest or host only profiling (G or H attribute). Kernel side AMD currently ignores all exclude_* bits, so there is no impact to existing IBS code paths. Robert Richter has a patch where IBS code will return EINVAL if an exclude_* bit is set. When this goes in it means use of :p on AMD with IBS will first fail with EINVAL (because exclude_guest will be set). Then the existing fallback code within perf will unset exclude_guest and try again. The second attempt will succeed if the CPU supports IBS profiling. Signed-off-by: David Ahern <[email protected]> Acked-by: Peter Zijlstra <[email protected]> Acked-by: Robert Richter <[email protected]> Tested-by: Robert Richter <[email protected]> Reviewed-by: Robert Richter <[email protected]> Cc: Avi Kivity <[email protected]> Cc: Gleb Natapov <[email protected]> Cc: Ingo Molnar <[email protected]> Cc: Peter Zijlstra <[email protected]> Cc: Robert Richter <[email protected]> Link: http://lkml.kernel.org/r/[email protected] Signed-off-by: Arnaldo Carvalho de Melo <[email protected]>
Diffstat (limited to 'tools/perf/util/scripting-engines/trace-event-python.c')
0 files changed, 0 insertions, 0 deletions