1 // SPDX-License-Identifier: LGPL-2.1 1 // SPDX-License-Identifier: LGPL-2.1 2 2 3 size_t syscall_arg__scnprintf_pid(char *bf, si 3 size_t syscall_arg__scnprintf_pid(char *bf, size_t size, struct syscall_arg *arg) 4 { 4 { 5 int pid = arg->val; 5 int pid = arg->val; 6 struct trace *trace = arg->trace; 6 struct trace *trace = arg->trace; 7 size_t printed = scnprintf(bf, size, " 7 size_t printed = scnprintf(bf, size, "%d", pid); 8 struct thread *thread = machine__findn 8 struct thread *thread = machine__findnew_thread(trace->host, pid, pid); 9 9 10 if (thread != NULL) { 10 if (thread != NULL) { 11 if (!thread__comm_set(thread)) 11 if (!thread__comm_set(thread)) 12 thread__set_comm_from_ 12 thread__set_comm_from_proc(thread); 13 13 14 if (thread__comm_set(thread)) 14 if (thread__comm_set(thread)) 15 printed += scnprintf(b 15 printed += scnprintf(bf + printed, size - printed, 16 " 16 " (%s)", thread__comm_str(thread)); 17 thread__put(thread); 17 thread__put(thread); 18 } 18 } 19 19 20 return printed; 20 return printed; 21 } 21 } 22 22
Linux® is a registered trademark of Linus Torvalds in the United States and other countries.
TOMOYO® is a registered trademark of NTT DATA CORPORATION.