Messages in this thread | | | Date | Thu, 12 Dec 2013 09:45:26 -0700 | From | David Ahern <> | Subject | Re: [PATCH v0 07/71] perf tools: Record whether a dso is 64-bit |
| |
On 12/12/13, 5:05 AM, Adrian Hunter wrote:
>>> diff --git a/tools/perf/util/dso.h b/tools/perf/util/dso.h >>> index 384f2d9..62680e1 100644 >>> --- a/tools/perf/util/dso.h >>> +++ b/tools/perf/util/dso.h >>> @@ -91,6 +91,7 @@ struct dso { >>> u8 annotate_warned:1; >>> u8 sname_alloc:1; >>> u8 lname_alloc:1; >>> + u8 is_64_bit:1; >> >> The is_64_bit name seems a bit hardcoded. We need something similar for >> perf-trace to set the audit machine type for resolving syscalls. How about >> having this field set a machine type rather than a "64-bit" flag? > > I am not sure what you mean by "machine type". For itrace the > implementation only deals with its own architecture (e.g. the intel_pt > pmu is only on Intel architecture) so it is not necessary to record > the architecture. > > is_64_bit corresponds to ELFCLASS64 (vs ELFCLASS32) which is needed > to determine whether the instruction set is 64-bit. That should > work for other architectures too. >
perf-trace needs something similar -- an audit machine type to know how to convert syscall numbers to functions. One of the following per task:
typedef enum { MACH_X86=0, MACH_86_64, MACH_IA64, MACH_PPC64, MACH_PPC, MACH_S390X, MACH_S390, MACH_ALPHA, MACH_ARMEB } machine_t;
I was pondering how the 2 can be combined into a common flag.
David
| |