Skip to content

Commit 4f345a0

Browse files
committed
Merge: perf trace: fix return value printing for set_robust_list and rseq
MR: https://gitlab.com/redhat/centos-stream/src/kernel/centos-stream-9/-/merge_requests/7066 JIRA: https://issues.redhat.com/browse/RHEL-78308 - Ensure return value always gets printed, even if no errpid is returned - Fix the definitions of set_robust_list and rseq to show they do not return a pid. Signed-off-by: Anubhav Shelat <ashelat@redhat.com> Approved-by: Michael Petlan <mpetlan@redhat.com> Approved-by: jbrnak <jbrnak@redhat.com> Approved-by: CKI KWF Bot <cki-ci-bot+kwf-gitlab-com@redhat.com> Merged-by: Augusto Caringi <acaringi@redhat.com>
2 parents 1675960 + dc6e53f commit 4f345a0

File tree

1 file changed

+3
-3
lines changed

1 file changed

+3
-3
lines changed

tools/perf/builtin-trace.c

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1327,7 +1327,7 @@ static const struct syscall_fmt syscall_fmts[] = {
13271327
.arg = { [0] = { .scnprintf = SCA_FDAT, /* olddirfd */ },
13281328
[2] = { .scnprintf = SCA_FDAT, /* newdirfd */ },
13291329
[4] = { .scnprintf = SCA_RENAMEAT2_FLAGS, /* flags */ }, }, },
1330-
{ .name = "rseq", .errpid = true,
1330+
{ .name = "rseq",
13311331
.arg = { [0] = { .from_user = true /* rseq */, }, }, },
13321332
{ .name = "rt_sigaction",
13331333
.arg = { [0] = { .scnprintf = SCA_SIGNUM, /* sig */ }, }, },
@@ -1351,7 +1351,7 @@ static const struct syscall_fmt syscall_fmts[] = {
13511351
{ .name = "sendto",
13521352
.arg = { [3] = { .scnprintf = SCA_MSG_FLAGS, /* flags */ },
13531353
[4] = SCA_SOCKADDR_FROM_USER(addr), }, },
1354-
{ .name = "set_robust_list", .errpid = true,
1354+
{ .name = "set_robust_list",
13551355
.arg = { [0] = { .from_user = true /* head */, }, }, },
13561356
{ .name = "set_tid_address", .errpid = true, },
13571357
{ .name = "setitimer",
@@ -2868,8 +2868,8 @@ errno_print: {
28682868
else if (sc->fmt->errpid) {
28692869
struct thread *child = machine__find_thread(trace->host, ret, ret);
28702870

2871+
fprintf(trace->output, "%ld", ret);
28712872
if (child != NULL) {
2872-
fprintf(trace->output, "%ld", ret);
28732873
if (thread__comm_set(child))
28742874
fprintf(trace->output, " (%s)", thread__comm_str(child));
28752875
thread__put(child);

0 commit comments

Comments
 (0)