Skip to contentSkip to conversation

perf header: Display feature name on write failure

tip:perf/core tip-bot for Jiri Olsa 1 participant 1 message Oct 24, 2016 perf events

lore
Share & tools
lore

tip-bot for Jiri Olsa

author merge bot
#0 lore raw
Commit-ID:  0c2aff4c78e83f3185bf5affa434618815ab77bf
Gitweb:     http://git.kernel.org/tip/0c2aff4c78e83f3185bf5affa434618815ab77bf
Author:     Jiri Olsa <[email protected]>
AuthorDate: Mon, 10 Oct 2016 09:38:02 +0200
Committer:  Arnaldo Carvalho de Melo <[email protected]>
CommitDate: Mon, 24 Oct 2016 11:07:34 -0300

perf header: Display feature name on write failure

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

---
 tools/perf/util/header.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
tools/perf/util/header.c +1 -1
index d6310c6..d89c9c7 100644
@@ -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);