tools/testing/selftests/powerpc/pmu/lib.c
Source file repositories/reference/linux-study-clean/tools/testing/selftests/powerpc/pmu/lib.c
File Facts
- System
- Linux kernel
- Corpus path
tools/testing/selftests/powerpc/pmu/lib.c- Extension
.c- Size
- 3163 bytes
- Lines
- 189
- 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
errno.hsched.hsetjmp.hstdlib.hsys/wait.hutils.hlib.h
Detected Declarations
function sync_with_childfunction wait_for_parentfunction notify_parentfunction notify_parent_of_errorfunction wait_for_childfunction kill_child_and_waitfunction eat_cpu_childfunction eat_cpufunction parse_proc_mapsfunction require_paranoia_below
Annotated Snippet
if (strstr(name, "libc")) {
libc.first = start;
libc.last = end - 1;
} else if (strstr(name, "[vdso]")) {
vdso.first = start;
vdso.last = end - 1;
}
} while(1);
fclose(f);
return 0;
}
#define PARANOID_PATH "/proc/sys/kernel/perf_event_paranoid"
bool require_paranoia_below(int level)
{
int err;
long current;
err = read_long(PARANOID_PATH, ¤t, 10);
if (err) {
printf("Couldn't parse " PARANOID_PATH "?\n");
return false;
}
return current < level;
}
Annotation
- Immediate include surface: `errno.h`, `sched.h`, `setjmp.h`, `stdlib.h`, `sys/wait.h`, `utils.h`, `lib.h`.
- Detected declarations: `function sync_with_child`, `function wait_for_parent`, `function notify_parent`, `function notify_parent_of_error`, `function wait_for_child`, `function kill_child_and_wait`, `function eat_cpu_child`, `function eat_cpu`, `function parse_proc_maps`, `function require_paranoia_below`.
- 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.