Skip to contentSkip to conversation

perf python scripting: Support fedora 11 (audit 1.7.17)

tip:perf/urgent tip-bot for Arnaldo Carvalho de Melo 1 participant 1 message Oct 26, 2010 perf events

lore
Share & tools
lore
#0 lore raw
Commit-ID:  7f6c1bd50d73d12f8b4ea09edb4515997f6527f5
Gitweb:     http://git.kernel.org/tip/7f6c1bd50d73d12f8b4ea09edb4515997f6527f5
Author:     Arnaldo Carvalho de Melo <[email protected]>
AuthorDate: Mon, 25 Oct 2010 22:12:01 -0200
Committer:  Arnaldo Carvalho de Melo <[email protected]>
CommitDate: Mon, 25 Oct 2010 22:12:01 -0200

perf python scripting: Support fedora 11 (audit 1.7.17)

Where we don't have the audit.MACH_ARMEB constant.

Cc: David S. Miller <[email protected]>
Cc: Frederic Weisbecker <[email protected]>
Cc: Ingo Molnar <[email protected]>
Cc: Mike Galbraith <[email protected]>
Cc: Paul Mackerras <[email protected]>
Cc: Peter Zijlstra <[email protected]>
Cc: Stephane Eranian <[email protected]>
Cc: Tom Zanussi <[email protected]>
LKML-Reference: <new-submission>

---
 .../python/Perf-Trace-Util/lib/Perf/Trace/Util.py  |    5 ++++-
 1 files changed, 4 insertions(+), 1 deletions(-)
tools/perf/scripts/python/Perf-Trace-Util/lib/Perf/Trace/Util.py +4 -1
index 9d15f48..99ff1b7 100644
@@ -36,7 +36,6 @@ try:
 	machine_to_id = {
 		'x86_64': audit.MACH_86_64,
 		'alpha'	: audit.MACH_ALPHA,
-		'armeb'	: audit.MACH_ARMEB,
 		'ia64'	: audit.MACH_IA64,
 		'ppc'	: audit.MACH_PPC,
 		'ppc64'	: audit.MACH_PPC64,
@@ -46,6 +45,10 @@ try:
 		'i586'	: audit.MACH_X86,
 		'i686'	: audit.MACH_X86,
 	}
+	try:
+		machine_to_id['armeb'] = audit.MACH_ARMEB
+	except:
+		pass
 	machine_id = machine_to_id[os.uname()[4]]
 except:
 	if not audit_package_warned: