Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit 2c83dfae authored by Arnaldo Carvalho de Melo's avatar Arnaldo Carvalho de Melo
Browse files

perf trace: Enclose the errno strings with ()

To match strace, now both emit the same line for calls like:

 access("/etc/ld.so.preload", R_OK)      = -1 ENOENT (No such file or directory)

Cc: Adrian Hunter <adrian.hunter@intel.com>
Cc: Jiri Olsa <jolsa@kernel.org>
Cc: Luis Cláudio Gonçalves <lclaudio@redhat.com>
Cc: Namhyung Kim <namhyung@kernel.org>
Cc: Wang Nan <wangnan0@huawei.com>
Link: https://lkml.kernel.org/n/tip-krxl6klsqc9qyktoaxyih942@git.kernel.org


Signed-off-by: default avatarArnaldo Carvalho de Melo <acme@redhat.com>
parent c48ee107
Loading
Loading
Loading
Loading
+2 −2
Original line number Original line Diff line number Diff line
@@ -2024,10 +2024,10 @@ errno_print: {
		const char *emsg = str_error_r(-ret, bf, sizeof(bf)),
		const char *emsg = str_error_r(-ret, bf, sizeof(bf)),
			   *e = errno_to_name(evsel, -ret);
			   *e = errno_to_name(evsel, -ret);


		fprintf(trace->output, "-1 %s %s", e, emsg);
		fprintf(trace->output, "-1 %s (%s)", e, emsg);
	}
	}
	} else if (ret == 0 && sc->fmt->timeout)
	} else if (ret == 0 && sc->fmt->timeout)
		fprintf(trace->output, "0 Timeout");
		fprintf(trace->output, "0 (Timeout)");
	else if (ttrace->ret_scnprintf) {
	else if (ttrace->ret_scnprintf) {
		char bf[1024];
		char bf[1024];
		struct syscall_arg arg = {
		struct syscall_arg arg = {