tools/perf/util/parse-events.y
Source file repositories/reference/linux-study-clean/tools/perf/util/parse-events.y
File Facts
- System
- Linux kernel
- Corpus path
tools/perf/util/parse-events.y- Extension
.y- Size
- 12112 bytes
- Lines
- 648
- Domain
- Support Tooling And Documentation
- Bucket
- tools
- Inferred role
- Support Tooling And Documentation: tools
- Status
- atlas-only
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.hlinux/compiler.hlinux/types.hpmu.hpmus.hevsel.hparse-events.hparse-events-bison.h
Detected Declarations
struct tracepoint_namefunction alloc_listfunction free_list_evselfunction list_for_each_entry_safefunction parse_events_error
Annotated Snippet
struct tracepoint_name {
char *sys;
char *event;
} tracepoint_name;
}
%%
/*
* Entry points. We are either parsing events or terminals. Just terminal
* parsing is used for parsing events in sysfs.
*/
start:
PE_START_EVENTS start_events
|
PE_START_TERMS start_terms
start_events: groups
{
/* Take the parsed events, groups.. and place into parse_state. */
struct list_head *groups = $1;
struct parse_events_state *parse_state = _parse_state;
list_splice_tail(groups, &parse_state->list);
free(groups);
}
groups: /* A list of groups or events. */
groups ',' group
{
/* Merge group into the list of events/groups. */
struct list_head *groups = $1;
struct list_head *group = $3;
list_splice_tail(group, groups);
free(group);
$$ = groups;
}
|
groups ',' event
{
/* Merge event into the list of events/groups. */
struct list_head *groups = $1;
struct list_head *event = $3;
list_splice_tail(event, groups);
free(event);
$$ = groups;
}
|
group
|
event
group:
group_def ':' PE_MODIFIER_EVENT
{
/* Apply the modifier to the events in the group_def. */
struct list_head *list = $1;
int err;
err = parse_events__modifier_group(_parse_state, &@3, list, $3);
if (err)
YYABORT;
$$ = list;
}
|
group_def
group_def:
Annotation
- Immediate include surface: `errno.h`, `linux/compiler.h`, `linux/types.h`, `pmu.h`, `pmus.h`, `evsel.h`, `parse-events.h`, `parse-events-bison.h`.
- Detected declarations: `struct tracepoint_name`, `function alloc_list`, `function free_list_evsel`, `function list_for_each_entry_safe`, `function parse_events_error`.
- Atlas domain: Support Tooling And Documentation / tools.
- Implementation status: atlas-only.
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.