public inbox for linux-kernel@vger.kernel.org
 help / color / mirror / Atom feed
* [PATCH v2] perf trace: Fix return value of trace__fprintf_tp_fields
@ 2025-01-23 23:59 Benjamin Peterson
  2025-01-27 18:35 ` Namhyung Kim
  0 siblings, 1 reply; 2+ messages in thread
From: Benjamin Peterson @ 2025-01-23 23:59 UTC (permalink / raw)
  To: Peter Zijlstra, Ingo Molnar, Arnaldo Carvalho de Melo,
	Namhyung Kim, Mark Rutland, Alexander Shishkin, Jiri Olsa,
	Ian Rogers, Adrian Hunter
  Cc: linux-perf-users, linux-kernel, Benjamin Peterson

This function formerly returned twice the number of bytes printed.

Signed-off-by: Benjamin Peterson <benjamin@engflow.com>
---
This is a small followup cleanup to my earlier commit 5fb8e56542a3 ("perf
trace: avoid garbage when not printing a trace event's arguments").

To: 
---
 tools/perf/builtin-trace.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/tools/perf/builtin-trace.c b/tools/perf/builtin-trace.c
index 6a1a128fe645014d0347ad4ec3e0c9e77ec59aee..c2e8ff48682bdc86a0a21f54f5163eb82d4cc17d 100644
--- a/tools/perf/builtin-trace.c
+++ b/tools/perf/builtin-trace.c
@@ -3088,7 +3088,7 @@ static size_t trace__fprintf_tp_fields(struct trace *trace, struct evsel *evsel,
 		printed += syscall_arg_fmt__scnprintf_val(arg, bf + printed, size - printed, &syscall_arg, val);
 	}
 
-	return printed + fprintf(trace->output, "%.*s", (int)printed, bf);
+	return fprintf(trace->output, "%.*s", (int)printed, bf);
 }
 
 static int trace__event_handler(struct trace *trace, struct evsel *evsel,

---
base-commit: 8883957b3c9de2087fb6cf9691c1188cccf1ac9c
change-id: 20241212-void-fprintf_tp_fields-8aaae2f5525f

Best regards,
-- 
Benjamin Peterson <benjamin@engflow.com>


^ permalink raw reply related	[flat|nested] 2+ messages in thread

* Re: [PATCH v2] perf trace: Fix return value of trace__fprintf_tp_fields
  2025-01-23 23:59 [PATCH v2] perf trace: Fix return value of trace__fprintf_tp_fields Benjamin Peterson
@ 2025-01-27 18:35 ` Namhyung Kim
  0 siblings, 0 replies; 2+ messages in thread
From: Namhyung Kim @ 2025-01-27 18:35 UTC (permalink / raw)
  To: Peter Zijlstra, Ingo Molnar, Arnaldo Carvalho de Melo,
	Mark Rutland, Alexander Shishkin, Jiri Olsa, Ian Rogers,
	Adrian Hunter, Benjamin Peterson
  Cc: linux-perf-users, linux-kernel

On Thu, 23 Jan 2025 15:59:35 -0800, Benjamin Peterson wrote:

> This function formerly returned twice the number of bytes printed.
> 
> 

Applied to perf-tools-next, thanks!

Best regards,
Namhyung


^ permalink raw reply	[flat|nested] 2+ messages in thread

end of thread, other threads:[~2025-01-27 18:35 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2025-01-23 23:59 [PATCH v2] perf trace: Fix return value of trace__fprintf_tp_fields Benjamin Peterson
2025-01-27 18:35 ` Namhyung Kim

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox