Skip to contentSkip to conversation

perf trace: Do not beautify the 'pid' parameter as a simple integer

tip:perf/core tip-bot for Arnaldo Carvalho de Melo 1 participant 1 message Apr 27, 2016 perf events

lore
Share & tools
lore
#0 lore raw
Commit-ID:  ccd9b2a7f82b069b8e8ac892fd9c1c22e7b11eba
Gitweb:     http://git.kernel.org/tip/ccd9b2a7f82b069b8e8ac892fd9c1c22e7b11eba
Author:     Arnaldo Carvalho de Melo <[email protected]>
AuthorDate: Tue, 26 Apr 2016 11:40:17 -0300
Committer:  Arnaldo Carvalho de Melo <[email protected]>
CommitDate: Tue, 26 Apr 2016 13:14:59 -0300

perf trace: Do not beautify the 'pid' parameter as a simple integer

Leave it alone so that it ends up assigned to SCA_PID via its type, 'pid_t', that will look up the pid on the machine thread rb_tree and possibly find its COMM.

---
 tools/perf/builtin-trace.c | 3 +--
 1 file changed, 1 insertion(+), 2 deletions(-)
tools/perf/builtin-trace.c +1 -2
index 903deda..48b00f0 100644
@@ -1043,8 +1043,7 @@ static struct syscall_fmt {
 			     [1] = SCA_FILENAME, /* filename */
 			     [2] = SCA_OPEN_FLAGS, /* flags */ }, },
 	{ .name	    = "perf_event_open", .errmsg = true,
-	  .arg_scnprintf = { [1] = SCA_INT, /* pid */
-			     [2] = SCA_INT, /* cpu */
+	  .arg_scnprintf = { [2] = SCA_INT, /* cpu */
 			     [3] = SCA_FD,  /* group_fd */
 			     [4] = SCA_PERF_FLAGS,  /* flags */ }, },
 	{ .name	    = "pipe2",	    .errmsg = true,