diff options
| author | Masami Hiramatsu (Google) <mhiramat@kernel.org> | 2026-07-02 21:12:41 +0900 |
|---|---|---|
| committer | Masami Hiramatsu (Google) <mhiramat@kernel.org> | 2026-07-14 22:43:16 +0900 |
| commit | 60432df556d5876d0c6451a9a4c5c01c513f19e1 (patch) | |
| tree | 1c0a7066cfac17f0d758527e55ccb826a552d852 /tools/perf/scripts/python/export-to-postgresql.py | |
| parent | 438a8d6a82931f12305f80bc3e7ef067c2ac0551 (diff) | |
tracing/probes: Support nested typecast
When we hit an open parenthesis right after typecast closing
parenthesis, it means we have nested typecast. This allows us to
typecast a generic data member in a structure to a pointer to
another structure.
For example, to cast a DATA_MEMBER of VAR structure to STRUCT pointer
and get MEMBER value.
(STRUCT)(VAR->DATA_MEMBER)->MEMBER
Also, we can nest typecast.
(STRUCT1)((STRUCT2)$ARG->FIELD2)->FIELD1
Currently the max nest level is limited to 3.
This also allows user to use typecasting for registers or stacks on
kprobe events. e.g.
(STRUCT)(%ax)->MEMBER
(STRUCT)($stack0)->MEMBER
Link: https://lore.kernel.org/all/178271363855.1176915.16793301788257446529.stgit@devnote2/
Signed-off-by: Masami Hiramatsu (Google) <mhiramat@kernel.org>
Diffstat (limited to 'tools/perf/scripts/python/export-to-postgresql.py')
0 files changed, 0 insertions, 0 deletions
