Re: [PATCH v3 02/11] perf tools script: Support insn output for normal samples

2019-03-04 Thread Andi Kleen
> > + uname(); > > + if (!strcmp(uts.machine, session->header.env.arch) || > > + (!strcmp(uts.machine, "x86_64") && > > +!strcmp(session->header.env.arch, "i386"))) > > why is this check and native_arch bool necessary? > i386 data will be overed by arch/x86 This is so

Re: [PATCH v3 02/11] perf tools script: Support insn output for normal samples

2019-03-04 Thread Jiri Olsa
On Thu, Feb 28, 2019 at 10:35:41AM -0800, Andi Kleen wrote: SNIP > @@ -1234,9 +1243,12 @@ static int perf_sample__fprintf_insn(struct > perf_sample *sample, > { > int printed = 0; > > + if (sample->insn_len == 0 && native_arch) > + arch_fetch_insn(sample, thread,

[PATCH v3 02/11] perf tools script: Support insn output for normal samples

2019-02-28 Thread Andi Kleen
From: Andi Kleen perf script -F +insn was only working for PT traces because the PT instruction decoder was filling in the insn/insn_len sample attributes. Support it for non PT samples too on x86 using the existing x86 instruction decoder. % perf record -a sleep 1 % perf script -F ip,sym,insn