perf python scripting: Support fedora 11 (audit 1.7.17)
authorArnaldo Carvalho de Melo <acme@redhat.com>
Tue, 26 Oct 2010 00:12:01 +0000 (22:12 -0200)
committerArnaldo Carvalho de Melo <acme@redhat.com>
Tue, 26 Oct 2010 00:12:01 +0000 (22:12 -0200)
Where we don't have the audit.MACH_ARMEB constant.

Cc: David S. Miller <davem@davemloft.net>
Cc: Frederic Weisbecker <fweisbec@gmail.com>
Cc: Ingo Molnar <mingo@elte.hu>
Cc: Mike Galbraith <efault@gmx.de>
Cc: Paul Mackerras <paulus@samba.org>
Cc: Peter Zijlstra <peterz@infradead.org>
Cc: Stephane Eranian <eranian@google.com>
Cc: Tom Zanussi <tzanussi@gmail.com>
LKML-Reference: <new-submission>
Signed-off-by: Arnaldo Carvalho de Melo <acme@redhat.com>
tools/perf/scripts/python/Perf-Trace-Util/lib/Perf/Trace/Util.py

index 9d15f484308c3036a6539f407e4be35fa174f211..99ff1b7a0d2c5d3e6fd585350464f7f6cd969249 100644 (file)
@@ -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: