lkml.org 
[lkml]   [2013]   [Nov]   [12]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
Date
From
SubjectRe: [PATCH 1/2] perf trace: Beautify fifth argument of mmap() as fd
On 11/11/13, 11:24 PM, Namhyung Kim wrote:
> From: Namhyung Kim <namhyung.kim@lge.com>
>
> The fifth argument of mmap syscall is fd and it often contains -1 as a
> value for anon mappings. Without this patch it doesn't show the file
> name as well as it shows -1 as 4294967295.
>
> Cc: David Ahern <dsahern@gmail.com>
> Signed-off-by: Namhyung Kim <namhyung@kernel.org>
> ---
> tools/perf/builtin-trace.c | 3 ++-
> 1 file changed, 2 insertions(+), 1 deletion(-)
>
> diff --git a/tools/perf/builtin-trace.c b/tools/perf/builtin-trace.c
> index c3008b1c369c..aeb6296a76bd 100644
> --- a/tools/perf/builtin-trace.c
> +++ b/tools/perf/builtin-trace.c
> @@ -951,7 +951,8 @@ static struct syscall_fmt {
> { .name = "mmap", .hexret = true,
> .arg_scnprintf = { [0] = SCA_HEX, /* addr */
> [2] = SCA_MMAP_PROT, /* prot */
> - [3] = SCA_MMAP_FLAGS, /* flags */ }, },
> + [3] = SCA_MMAP_FLAGS, /* flags */
> + [4] = SCA_FD, /* fd */ }, },
> { .name = "mprotect", .errmsg = true,
> .arg_scnprintf = { [0] = SCA_HEX, /* start */
> [2] = SCA_MMAP_PROT, /* prot */ }, },
>

Looks good to me.

Acked-by: David Ahern <dsahern@gmail.com>


\
 
 \ /
  Last update: 2013-11-12 17:21    [W:0.179 / U:0.188 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site