tools/perf/tests/task-exit.c
Source file repositories/reference/linux-study-clean/tools/perf/tests/task-exit.c
File Facts
- System
- Linux kernel
- Corpus path
tools/perf/tests/task-exit.c- Extension
.c- Size
- 3819 bytes
- Lines
- 162
- 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
debug.hevlist.hevsel.htarget.hthread_map.htests.hutil/mmap.herrno.hsignal.hlinux/string.hperf/cpumap.hperf/evlist.hperf/mmap.h
Detected Declarations
function sig_handlerfunction workload_exec_failed_signalfunction test__task_exit
Annotated Snippet
if (retry_count++ > 1000) {
pr_debug("Failed after retrying 1000 times\n");
err = -1;
goto out_delete_evlist;
}
goto retry;
}
if (nr_exit != 1) {
pr_debug("received %d EXIT records\n", nr_exit);
err = -1;
}
out_delete_evlist:
perf_cpu_map__put(cpus);
perf_thread_map__put(threads);
evlist__delete(evlist);
return err;
}
struct test_case tests__task_exit[] = {
TEST_CASE_EXCLUSIVE("Number of exit events of a simple workload", task_exit),
{ .name = NULL, }
};
struct test_suite suite__task_exit = {
.desc = "Number of exit events of a simple workload",
.test_cases = tests__task_exit,
};
Annotation
- Immediate include surface: `debug.h`, `evlist.h`, `evsel.h`, `target.h`, `thread_map.h`, `tests.h`, `util/mmap.h`, `errno.h`.
- Detected declarations: `function sig_handler`, `function workload_exec_failed_signal`, `function test__task_exit`.
- 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.