tools/perf/tests/parse-events.c
Source file repositories/reference/linux-study-clean/tools/perf/tests/parse-events.c
File Facts
- System
- Linux kernel
- Corpus path
tools/perf/tests/parse-events.c- Extension
.c- Size
- 102401 bytes
- Lines
- 2954
- 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
parse-events.hevsel.hevsel_fprintf.hevlist.hapi/fs/fs.htests.hdebug.hpmu.hpmus.hstrbuf.hdirent.herrno.hfncache.hsys/types.hsys/stat.hunistd.hlinux/kernel.hlinux/hw_breakpoint.hapi/fs/tracing_path.h
Detected Declarations
struct evlist_teststruct terms_testfunction check_evlistfunction check_evselfunction num_core_entriesfunction evlist__for_each_entryfunction test_hw_configfunction kvm_s390_create_vm_validfunction test__checkevent_tracepointfunction test__checkevent_tracepoint_multifunction evlist__for_each_entryfunction test__checkevent_rawfunction evlist__for_each_entryfunction test__checkevent_numericfunction test__checkevent_symbolic_namefunction evlist__for_each_entryfunction test__checkevent_symbolic_name_configfunction evlist__for_each_entryfunction test__checkevent_symbolic_aliasfunction test__checkevent_genhwfunction evlist__for_each_entryfunction test__checkevent_breakpointfunction test__checkevent_breakpoint_xfunction test__checkevent_breakpoint_rfunction test__checkevent_breakpoint_wfunction test__checkevent_breakpoint_rwfunction test__checkevent_tracepoint_modifierfunction test__checkevent_tracepoint_multi_modifierfunction evlist__for_each_entryfunction test__checkevent_raw_modifierfunction evlist__for_each_entryfunction test__checkevent_numeric_modifierfunction evlist__for_each_entryfunction test__checkevent_symbolic_name_modifierfunction evlist__for_each_entryfunction test__checkevent_exclude_host_modifierfunction evlist__for_each_entryfunction test__checkevent_exclude_guest_modifierfunction evlist__for_each_entryfunction test__checkevent_symbolic_alias_modifierfunction test__checkevent_genhw_modifierfunction evlist__for_each_entryfunction test__checkevent_exclude_idle_modifierfunction test__checkevent_exclude_idle_modifier_1function test__checkevent_breakpoint_modifierfunction test__checkevent_breakpoint_x_modifierfunction test__checkevent_breakpoint_r_modifierfunction test__checkevent_breakpoint_w_modifier
Annotated Snippet
struct evlist_test {
const char *name;
bool (*valid)(void);
int (*check)(struct evlist *evlist);
};
static const struct evlist_test test__events[] = {
{
.name = "syscalls:sys_enter_openat",
.check = test__checkevent_tracepoint,
/* 0 */
},
{
.name = "syscalls:*",
.check = test__checkevent_tracepoint_multi,
/* 1 */
},
{
.name = "r1a",
.check = test__checkevent_raw,
/* 2 */
},
{
.name = "1:1",
.check = test__checkevent_numeric,
/* 3 */
},
{
.name = "instructions",
.check = test__checkevent_symbolic_name,
/* 4 */
},
{
.name = "cpu-cycles/period=100000,config2/",
.check = test__checkevent_symbolic_name_config,
/* 5 */
},
{
.name = "faults",
.check = test__checkevent_symbolic_alias,
/* 6 */
},
{
.name = "L1-dcache-load-miss",
.check = test__checkevent_genhw,
/* 7 */
},
{
.name = "mem:0",
.check = test__checkevent_breakpoint,
/* 8 */
},
{
.name = "mem:0:x",
.check = test__checkevent_breakpoint_x,
/* 9 */
},
{
.name = "mem:0:r",
.check = test__checkevent_breakpoint_r,
/* 0 */
},
{
.name = "mem:0:w",
.check = test__checkevent_breakpoint_w,
/* 1 */
},
{
.name = "syscalls:sys_enter_openat:k",
.check = test__checkevent_tracepoint_modifier,
/* 2 */
},
{
.name = "syscalls:*:u",
.check = test__checkevent_tracepoint_multi_modifier,
/* 3 */
},
{
.name = "r1a:kp",
.check = test__checkevent_raw_modifier,
/* 4 */
},
{
.name = "1:1:hp",
.check = test__checkevent_numeric_modifier,
/* 5 */
},
{
.name = "instructions:h",
.check = test__checkevent_symbolic_name_modifier,
Annotation
- Immediate include surface: `parse-events.h`, `evsel.h`, `evsel_fprintf.h`, `evlist.h`, `api/fs/fs.h`, `tests.h`, `debug.h`, `pmu.h`.
- Detected declarations: `struct evlist_test`, `struct terms_test`, `function check_evlist`, `function check_evsel`, `function num_core_entries`, `function evlist__for_each_entry`, `function test_hw_config`, `function kvm_s390_create_vm_valid`, `function test__checkevent_tracepoint`, `function test__checkevent_tracepoint_multi`.
- 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.