summaryrefslogtreecommitdiff
path: root/tools/perf/trace/beauty/pid.c
diff options
context:
space:
mode:
Diffstat (limited to 'tools/perf/trace/beauty/pid.c')
-rw-r--r--tools/perf/trace/beauty/pid.c10
1 files changed, 5 insertions, 5 deletions
diff --git a/tools/perf/trace/beauty/pid.c b/tools/perf/trace/beauty/pid.c
index 07486ea65ae3..8f9c9950f8ba 100644
--- a/tools/perf/trace/beauty/pid.c
+++ b/tools/perf/trace/beauty/pid.c
@@ -1,4 +1,6 @@
-static size_t syscall_arg__scnprintf_pid(char *bf, size_t size, struct syscall_arg *arg)
+// SPDX-License-Identifier: LGPL-2.1
+
+size_t syscall_arg__scnprintf_pid(char *bf, size_t size, struct syscall_arg *arg)
{
int pid = arg->val;
struct trace *trace = arg->trace;
@@ -6,10 +8,10 @@ static size_t syscall_arg__scnprintf_pid(char *bf, size_t size, struct syscall_a
struct thread *thread = machine__findnew_thread(trace->host, pid, pid);
if (thread != NULL) {
- if (!thread->comm_set)
+ if (!thread__comm_set(thread))
thread__set_comm_from_proc(thread);
- if (thread->comm_set)
+ if (thread__comm_set(thread))
printed += scnprintf(bf + printed, size - printed,
" (%s)", thread__comm_str(thread));
thread__put(thread);
@@ -17,5 +19,3 @@ static size_t syscall_arg__scnprintf_pid(char *bf, size_t size, struct syscall_a
return printed;
}
-
-#define SCA_PID syscall_arg__scnprintf_pid