[<prev] [next>] [<thread-prev] [day] [month] [year] [list]
Message-Id: <1432835361-16964-3-git-send-email-andi@firstfloor.org>
Date: Thu, 28 May 2015 10:49:21 -0700
From: Andi Kleen <andi@...stfloor.org>
To: sukadev@...ux.vnet.ibm.com
Cc: jolsa@...hat.com, mingo@...nel.org, acme@...nel.org,
linux-kernel@...r.kernel.org, Andi Kleen <ak@...ux.intel.com>
Subject: [PATCH 2/2] perf, tools: Add override support for event list CPUID
From: Andi Kleen <ak@...ux.intel.com>
Add a PERF_CPUID variable to override the CPUID of the current CPU.
This is useful for testing, so that all event lists can be tested on a single
system.
Signed-off-by: Andi Kleen <ak@...ux.intel.com>
---
tools/perf/util/pmu.c | 4 +++-
1 file changed, 3 insertions(+), 1 deletion(-)
diff --git a/tools/perf/util/pmu.c b/tools/perf/util/pmu.c
index ba50300..5500126 100644
--- a/tools/perf/util/pmu.c
+++ b/tools/perf/util/pmu.c
@@ -474,7 +474,9 @@ static int pmu_add_cpu_aliases(void *data)
struct pmu_event *pe;
char *cpuid;
- cpuid = get_cpuid_str();
+ cpuid = getenv("PERF_CPUID");
+ if (!cpuid)
+ cpuid = get_cpuid_str();
if (!cpuid)
return 0;
--
2.1.0
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@...r.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/
Powered by blists - more mailing lists