]> Git Repo - linux.git/commitdiff
perf header: Display feature name on write failure
authorJiri Olsa <[email protected]>
Mon, 10 Oct 2016 07:38:02 +0000 (09:38 +0200)
committerArnaldo Carvalho de Melo <[email protected]>
Mon, 24 Oct 2016 14:07:34 +0000 (11:07 -0300)
Display name of feature instead of just the number
during recording data.

Before:
  failed to write feature 13

Now:
  failed to write feature HEADER_CPU_TOPOLOGY

Signed-off-by: Jiri Olsa <[email protected]>
Cc: Adrian Hunter <[email protected]>
Cc: David Ahern <[email protected]>
Cc: Namhyung Kim <[email protected]>
Cc: Wang Nan <[email protected]>
Link: http://lkml.kernel.org/n/[email protected]
Signed-off-by: Arnaldo Carvalho de Melo <[email protected]>
tools/perf/util/header.c

index d6310c6dace5d5f46c33e6f3501a02c95a5bc2b3..d89c9c7ef4e54ba6381c7b63d8db29c87328b3ea 100644 (file)
@@ -2290,7 +2290,7 @@ static int do_write_feat(int fd, struct perf_header *h, int type,
 
                err = feat_ops[type].write(fd, h, evlist);
                if (err < 0) {
-                       pr_debug("failed to write feature %d\n", type);
+                       pr_debug("failed to write feature %s\n", feat_ops[type].name);
 
                        /* undo anything written */
                        lseek(fd, (*p)->offset, SEEK_SET);
This page took 0.05358 seconds and 4 git commands to generate.