Re: [PATCH v3 1/4] perf tests: take into account address of each objdump line

From: Adrian Hunter
Date: Thu Sep 03 2015 - 07:38:22 EST


On 03/09/15 14:23, Jan Stancek wrote:
> objdump output can contain repeated bytes. At the moment test reads
> all output sequentially, assuming each address is represented in
> output only once:
>
> ffffffff8164efb3 <retint_swapgs+0x9>:
> ffffffff8164efb3: c1 5d 00 eb rcrl $0xeb,0x0(%rbp)
> ffffffff8164efb7: 00 4c 8b 5c add %cl,0x5c(%rbx,%rcx,4)
>
> ffffffff8164efb8 <restore_c_regs_and_iret>:
> ffffffff8164efb8: 4c 8b 5c 24 30 mov 0x30(%rsp),%r11
> ffffffff8164efbd: 4c 8b 54 24 38 mov 0x38(%rsp),%r10
>
> Store objdump output to buffer according to offset calculated
> from address on each line.
>
> Signed-off-by: Jan Stancek <jstancek@xxxxxxxxxx>
> Cc: Arnaldo Carvalho de Melo <acme@xxxxxxxxxx>
> Cc: Jiri Olsa <jolsa@xxxxxxxxxx>
> Cc: Adrian Hunter <adrian.hunter@xxxxxxxxx>
> Cc: David Ahern <dsahern@xxxxxxxxx>
> Cc: Corey Ashford <cjashfor@xxxxxxxxxxxxxxxxxx>
> Cc: Frederic Weisbecker <fweisbec@xxxxxxxxx>
> Cc: Ingo Molnar <mingo@xxxxxxxxxx>
> Cc: Namhyung Kim <namhyung@xxxxxxxxxx>
> Cc: Paul Mackerras <paulus@xxxxxxxxx>
> Cc: Peter Zijlstra <a.p.zijlstra@xxxxxxxxx>
> ---
> tools/perf/tests/code-reading.c | 53 +++++++++++++++++++++++++++++++----------
> 1 file changed, 40 insertions(+), 13 deletions(-)
>
> Changes in v3:
> align read_objdump_line parameters on 2nd line
> fix multiline comment
> replace MIN with min
>

Acked-by: Adrian Hunter <adrian.hunter@xxxxxxxxx>

--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/