All of lore.kernel.org
 help / color / mirror / Atom feed
* [PATCH] perf tools: fix guest mode monitoring on AMD
@ 2012-02-27 17:33 Stephane Eranian
  2012-02-27 17:39 ` Gleb Natapov
  2012-02-27 17:47 ` David Ahern
  0 siblings, 2 replies; 19+ messages in thread
From: Stephane Eranian @ 2012-02-27 17:33 UTC (permalink / raw)
  To: linux-kernel; +Cc: acme, robert.richter, peterz, mingo, joro, gleb

Commit:

1aed267 perf kvm: Do guest-only counting by default
 
introduced a bug on AMD systems whereby simple commands:

$ perf stat ls
Performance counter stats for 'ls':
                 0 cycles                    #    0.000 GHz                    
       0.003704596 seconds time elapsed

would not count anything anymore. Same results for perf record.

I tracked it down to guest mode exclusion being enabled
by default leading to attr->exclude_guest = 1. When
not operating under any sort of virtualization, this
causes the PMU not to count anything.

The fix disables guest exclusion by default.

Signed-off-by: Stephane Eranian <eranian@google.com>
---

diff --git a/tools/perf/util/util.c b/tools/perf/util/util.c
index 8109a90..c1017b3 100644
--- a/tools/perf/util/util.c
+++ b/tools/perf/util/util.c
@@ -6,7 +6,7 @@
  * XXX We need to find a better place for these things...
  */
 bool perf_host  = true;
-bool perf_guest = false;
+bool perf_guest = true;
 
 void event_attr_init(struct perf_event_attr *attr)
 {

^ permalink raw reply related	[flat|nested] 19+ messages in thread

end of thread, other threads:[~2012-03-02 14:56 UTC | newest]

Thread overview: 19+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2012-02-27 17:33 [PATCH] perf tools: fix guest mode monitoring on AMD Stephane Eranian
2012-02-27 17:39 ` Gleb Natapov
2012-02-27 17:47 ` David Ahern
2012-02-27 17:52   ` Stephane Eranian
2012-02-27 18:00     ` David Ahern
2012-02-27 18:23     ` Joerg Roedel
2012-02-28 15:55       ` [PATCH] perf/x86: Fix HO/GO counting with SVM disabled Joerg Roedel
2012-02-28 17:24         ` Avi Kivity
2012-02-28 17:36           ` David Ahern
2012-02-28 17:38             ` Avi Kivity
2012-02-29 13:24               ` Joerg Roedel
2012-02-29 13:57         ` [PATCH v2] " Joerg Roedel
2012-02-29 17:00           ` Avi Kivity
2012-02-29 17:03             ` Gleb Natapov
2012-02-29 17:05             ` Joerg Roedel
2012-02-29 17:08               ` Avi Kivity
2012-02-29 17:24               ` Peter Zijlstra
2012-02-29 17:44           ` Peter Zijlstra
2012-03-02 14:54           ` [tip:perf/urgent] perf/x86/kvm: Fix Host-Only/ Guest-Only " tip-bot for Joerg Roedel

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.