lkml.org 
[lkml]   [2015]   [Sep]   [3]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
SubjectRe: [PATCH v2 2/4] perf tests: make objdump disassemble zero blocks
From
Date
On 02/09/15 11:19, Jan Stancek wrote:
> Add -z parameter to avoid skipping zero blocks:
>
> ffffffff816704fe <sysret_check+0x4b>:
> ffffffff816704fe: 7b 34 jnp ffffffff81670534 <sysret_signal+0x1c>
> ...
> ffffffff81670501 <sysret_careful>:
> ffffffff81670501: 0f ba e2 03 bt $0x3,%edx
> ffffffff81670505: 73 11 jae ffffffff81670518 <sysret_signal>
>
> Signed-off-by: Jan Stancek <jstancek@redhat.com>
> Cc: Arnaldo Carvalho de Melo <acme@kernel.org>
> Cc: Jiri Olsa <jolsa@kernel.org>
> Cc: Adrian Hunter <adrian.hunter@intel.com>
> Cc: David Ahern <dsahern@gmail.com>
> Cc: Corey Ashford <cjashfor@linux.vnet.ibm.com>
> Cc: Frederic Weisbecker <fweisbec@gmail.com>
> Cc: Ingo Molnar <mingo@kernel.org>
> Cc: Namhyung Kim <namhyung@kernel.org>
> Cc: Paul Mackerras <paulus@samba.org>
> Cc: Peter Zijlstra <a.p.zijlstra@chello.nl>

Apart from nitpick below:

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

> ---
> tools/perf/tests/code-reading.c | 3 ++-
> 1 file changed, 2 insertions(+), 1 deletion(-)
>
> diff --git a/tools/perf/tests/code-reading.c b/tools/perf/tests/code-reading.c
> index 38ee90bc2228..375ba30e4ed0 100644
> --- a/tools/perf/tests/code-reading.c
> +++ b/tools/perf/tests/code-reading.c
> @@ -128,7 +128,8 @@ static int read_via_objdump(const char *filename, u64 addr, void *buf,
> FILE *f;
> int ret;
>
> - fmt = "%s -d --start-address=0x%"PRIx64" --stop-address=0x%"PRIx64" %s";
> + fmt = "%s -z -d --start-address=0x%"PRIx64\

The line continuation is not needed but we are not that religious about long
lines especially if they contain string literals, so you could just make it
one line.

> + " --stop-address=0x%"PRIx64" %s";
> ret = snprintf(cmd, sizeof(cmd), fmt, "objdump", addr, addr + len,
> filename);
> if (ret <= 0 || (size_t)ret >= sizeof(cmd))
>



\
 
 \ /
  Last update: 2015-09-03 11:41    [W:0.090 / U:5.884 seconds]
©2003-2017 Jasper Spaans. hosted at Digital OceanAdvertise on this site