Skip to contentSkip to conversation

perf trace: remove redundant ')'

PATCH In review [email protected] 3 participants 7 messages Mar 13, 2018 – Apr 4, 2018 perf events

lore
Share & tools
lore
#0 lore raw

PATCH 1/1 perf trace: remove redundant ')'

From: Changbin Du <[email protected]>

There is a redundant ')' at the tail of each event. So remove it.

$ sudo perf trace --no-syscalls -e 'kmem:*' -a
   899.342 kmem:kfree:(vfs_writev+0xb9) call_site=ffffffff9c453979 ptr=(nil))
   899.344 kmem:kfree:(___sys_recvmsg+0x188) call_site=ffffffff9c9b8b88 ptr=(nil))
---
 tools/perf/builtin-trace.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
tools/perf/builtin-trace.c +1 -1
index e7f1b18..7273f5f 100644
@@ -1959,7 +1959,7 @@ static int trace__event_handler(struct trace *trace, struct perf_evsel *evsel,
 				      trace->output);
 	}
 
-	fprintf(trace->output, ")\n");
+	fprintf(trace->output, "\n");
 
 	if (callchain_ret > 0)
 		trace__fprintf_callchain(trace, sample);
Signature · 1 line
2.7.4
#1 lore raw

Hi Arnaldo, How about this simple one? Thanks.

Quoted 28 lines · On Tue, Mar 13, 2018 at 06:40:01PM +0800, [email protected] wrote:

From: Changbin Du <[email protected]>

There is a redundant ')' at the tail of each event. So remove it.

$ sudo perf trace --no-syscalls -e 'kmem:*' -a
   899.342 kmem:kfree:(vfs_writev+0xb9) call_site=ffffffff9c453979 ptr=(nil))
   899.344 kmem:kfree:(___sys_recvmsg+0x188) call_site=ffffffff9c9b8b88 ptr=(nil))
---
 tools/perf/builtin-trace.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
tools/perf/builtin-trace.c +1 -1
index e7f1b18..7273f5f 100644
@@ -1959,7 +1959,7 @@ static int trace__event_handler(struct trace *trace, struct perf_evsel *evsel,
 				      trace->output);
 	}
 
-	fprintf(trace->output, ")\n");
+	fprintf(trace->output, "\n");
 
 	if (callchain_ret > 0)
 		trace__fprintf_callchain(trace, sample);
Signature · 1 line
2.7.4
Signature · 2 lines
Thanks,
Changbin Du
#2 lore raw

Em Fri, Mar 16, 2018 at 03:51:09PM +0800, Du, Changbin escreveu:

Quoted 23 lines

Hi Arnaldo, How about this simple one? Thanks.

Quoted 20 lines · On Tue, Mar 13, 2018 at 06:40:01PM +0800, [email protected] wrote:

From: Changbin Du <[email protected]>

There is a redundant ')' at the tail of each event. So remove it.

$ sudo perf trace --no-syscalls -e 'kmem:*' -a
   899.342 kmem:kfree:(vfs_writev+0xb9) call_site=ffffffff9c453979 ptr=(nil))
   899.344 kmem:kfree:(___sys_recvmsg+0x188) call_site=ffffffff9c9b8b88 ptr=(nil))
---
 tools/perf/builtin-trace.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
tools/perf/builtin-trace.c +0 -0
index e7f1b18..7273f5f 100644
@@ -1959,7 +1959,7 @@ static int trace__event_handler(struct trace *trace, struct perf_evsel *evsel,
 				      trace->output);
 	}
 
Quoted 2 lines

tools/perf/builtin-trace.c static int trace__event_handler(struct trace *trace, struct perf_evsel *evsel, · line 1962

Quoted 2 lines
tools/perf/builtin-trace.c +1 -1
-	fprintf(trace->output, ")\n");
+	fprintf(trace->output, "\n");

It looks simple on the surface, but I couldn't quickly recall why this ')' was put there in the first place... So I left for later to do a 'git blame' on this file, etc.

- Arnaldo

Quoted 9 lines
Quoted 5 lines
tools/perf/builtin-trace.c +0 -0
 	if (callchain_ret > 0)
 		trace__fprintf_callchain(trace, sample);
Signature · 1 line
2.7.4
Signature · 2 lines
Thanks,
Changbin Du
#3 lore raw

Hi Arnaldo,
Just a kind reminder. Hope you didn't forget this.

Quoted 42 lines · Arnaldo Carvalho de Melo

Em Fri, Mar 16, 2018 at 03:51:09PM +0800, Du, Changbin escreveu:

Quoted 23 lines

Hi Arnaldo, How about this simple one? Thanks.

Quoted 20 lines · On Tue, Mar 13, 2018 at 06:40:01PM +0800, [email protected] wrote:

From: Changbin Du <[email protected]>

There is a redundant ')' at the tail of each event. So remove it.

$ sudo perf trace --no-syscalls -e 'kmem:*' -a
   899.342 kmem:kfree:(vfs_writev+0xb9) call_site=ffffffff9c453979 ptr=(nil))
   899.344 kmem:kfree:(___sys_recvmsg+0x188) call_site=ffffffff9c9b8b88 ptr=(nil))
---
 tools/perf/builtin-trace.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
tools/perf/builtin-trace.c +0 -0
index e7f1b18..7273f5f 100644
@@ -1959,7 +1959,7 @@ static int trace__event_handler(struct trace *trace, struct perf_evsel *evsel,
 				      trace->output);
 	}
 
Quoted 2 lines

tools/perf/builtin-trace.c static int trace__event_handler(struct trace *trace, struct perf_evsel *evsel, · line 1962

Quoted 2 lines
tools/perf/builtin-trace.c +1 -1
-	fprintf(trace->output, ")\n");
+	fprintf(trace->output, "\n");

It looks simple on the surface, but I couldn't quickly recall why this ')' was put there in the first place... So I left for later to do a 'git blame' on this file, etc.

- Arnaldo

Quoted 9 lines
Quoted 5 lines
tools/perf/builtin-trace.c +0 -0
 	if (callchain_ret > 0)
 		trace__fprintf_callchain(trace, sample);
Signature · 1 line
2.7.4
Signature · 2 lines
Thanks,
Changbin Du
Signature · 2 lines
Thanks,
Changbin Du
#4 lore raw

Em Wed, Mar 28, 2018 at 03:26:31PM +0800, Du, Changbin escreveu:

Quoted 2 lines

Hi Arnaldo,
Just a kind reminder. Hope you didn't forget this.

Ok, applied.

- Arnaldo

Quoted 47 lines · Arnaldo Carvalho de Melo
Quoted 42 lines

Em Fri, Mar 16, 2018 at 03:51:09PM +0800, Du, Changbin escreveu:

Quoted 23 lines

Hi Arnaldo, How about this simple one? Thanks.

Quoted 20 lines · On Tue, Mar 13, 2018 at 06:40:01PM +0800, [email protected] wrote:

From: Changbin Du <[email protected]>

There is a redundant ')' at the tail of each event. So remove it.

$ sudo perf trace --no-syscalls -e 'kmem:*' -a
   899.342 kmem:kfree:(vfs_writev+0xb9) call_site=ffffffff9c453979 ptr=(nil))
   899.344 kmem:kfree:(___sys_recvmsg+0x188) call_site=ffffffff9c9b8b88 ptr=(nil))
---
 tools/perf/builtin-trace.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
tools/perf/builtin-trace.c +0 -0
index e7f1b18..7273f5f 100644
@@ -1959,7 +1959,7 @@ static int trace__event_handler(struct trace *trace, struct perf_evsel *evsel,
 				      trace->output);
 	}
 
Quoted 2 lines

tools/perf/builtin-trace.c static int trace__event_handler(struct trace *trace, struct perf_evsel *evsel, · line 1962

Quoted 2 lines
tools/perf/builtin-trace.c +1 -1
-	fprintf(trace->output, ")\n");
+	fprintf(trace->output, "\n");

It looks simple on the surface, but I couldn't quickly recall why this ')' was put there in the first place... So I left for later to do a 'git blame' on this file, etc.

- Arnaldo

Quoted 9 lines
Quoted 5 lines
tools/perf/builtin-trace.c +0 -0
 	if (callchain_ret > 0)
 		trace__fprintf_callchain(trace, sample);
Signature · 1 line
2.7.4
Signature · 2 lines
Thanks,
Changbin Du
Signature · 2 lines
Thanks,
Changbin Du
#5 lore raw
Quoted 8 lines · Arnaldo Carvalho de Melo

Em Wed, Mar 28, 2018 at 03:26:31PM +0800, Du, Changbin escreveu:

Quoted 2 lines

Hi Arnaldo,
Just a kind reminder. Hope you didn't forget this.

Ok, applied.

- Arnaldo

Got it, thanks!

#6 lore raw

[tip:perf/urgent] perf trace: Remove redundant ')'

In reply to [email protected]
perf trace: Remove redundant ')'
Commit-ID:  51125a29a395048fdb3429b8c4ca0ada57097744
Gitweb:     https://git.kernel.org/tip/51125a29a395048fdb3429b8c4ca0ada57097744
Author:     Changbin Du <[email protected]>
AuthorDate: Tue, 13 Mar 2018 18:40:01 +0800
Committer:  Arnaldo Carvalho de Melo <[email protected]>
CommitDate: Tue, 3 Apr 2018 16:16:41 -0300

perf trace: Remove redundant ')'

There is a redundant ')' at the tail of each event. So remove it.

$ sudo perf trace --no-syscalls -e 'kmem:*' -a
   899.342 kmem:kfree:(vfs_writev+0xb9) call_site=ffffffff9c453979 ptr=(nil))
   899.344 kmem:kfree:(___sys_recvmsg+0x188) call_site=ffffffff9c9b8b88 ptr=(nil))
---
 tools/perf/builtin-trace.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
tools/perf/builtin-trace.c +1 -1
index 4e03f0f68241..3ad17ee89403 100644
@@ -1962,7 +1962,7 @@ static int trace__event_handler(struct trace *trace, struct perf_evsel *evsel,
 				      trace->output);
 	}
 
-	fprintf(trace->output, ")\n");
+	fprintf(trace->output, "\n");
 
 	if (callchain_ret > 0)
 		trace__fprintf_callchain(trace, sample);