Commit 0aefb3df authored by Benjamin Peterson's avatar Benjamin Peterson Committed by Namhyung Kim
Browse files

perf trace: Fix return value of trace__fprintf_tp_fields



This function formerly returned twice the number of bytes printed.

Signed-off-by: default avatarBenjamin Peterson <benjamin@engflow.com>
Reviewed-by: default avatarHoward Chu <howardchu95@gmail.com>
Link: https://lore.kernel.org/r/20250123-void-fprintf_tp_fields-v2-1-6038f8224987@engflow.com


Signed-off-by: default avatarNamhyung Kim <namhyung@kernel.org>
parent 91b7747d
Loading
Loading
Loading
Loading
+1 −1
Original line number Diff line number Diff line
@@ -3080,7 +3080,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,