tools/perf/trace/beauty/pid.c
Source file repositories/reference/linux-study-clean/tools/perf/trace/beauty/pid.c
File Facts
- System
- Linux kernel
- Corpus path
tools/perf/trace/beauty/pid.c- Extension
.c- Size
- 576 bytes
- Lines
- 22
- Domain
- Support Tooling And Documentation
- Bucket
- tools
- Inferred role
- Support Tooling And Documentation: implementation source
- Status
- source implementation candidate
Why This File Exists
Repository support layer: documentation, build tooling, samples, user-space helper tools, generated initramfs support, licenses, and validation utilities.
- Repository support layer: documentation, build tooling, samples, user-space helper tools, generated initramfs support, licenses, and validation utilities.
- Defines or uses C structs; map object ownership, embedded links, reference counts, and lock ownership.
Dependency Surface
- No C-style include directives detected by the generator.
Detected Declarations
function syscall_arg__scnprintf_pid
Annotated Snippet
// 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;
size_t printed = scnprintf(bf, size, "%d", pid);
struct thread *thread = machine__findnew_thread(trace->host, pid, pid);
if (thread != NULL) {
if (!thread__comm_set(thread))
thread__set_comm_from_proc(thread);
if (thread__comm_set(thread))
printed += scnprintf(bf + printed, size - printed,
" (%s)", thread__comm_str(thread));
thread__put(thread);
}
return printed;
}
Annotation
- Detected declarations: `function syscall_arg__scnprintf_pid`.
- Atlas domain: Support Tooling And Documentation / tools.
- Implementation status: source implementation candidate.
Implementation Notes
- This generated page is the file-by-file coverage layer; curated subsystem chapters should link here when they synthesize a multi-file control flow.
- Core OS pages should be promoted from atlas-only to deep-reviewed when they explain data structures, invariants, locking, lifecycle, and C implementation snippets.
- Driver-family pages are intentionally pattern-oriented unless they are part of the selected PCIe/NVMe representative device path.