aboutsummaryrefslogtreecommitdiff
path: root/tools/perf/util/trace-event-scripting.c
diff options
context:
space:
mode:
authorAlison Schofield <[email protected]>2024-03-14 13:12:17 -0700
committerSteven Rostedt (Google) <[email protected]>2024-03-18 10:26:03 -0400
commit6c871260965255a1c142fb77ccee58b172d1690b (patch)
tree9c6560d11fa7db3d15af79ddd30b342c43f49cb8 /tools/perf/util/trace-event-scripting.c
parent3f9952e8d80cca2da3b47ecd5ad9ec16cfd1a649 (diff)
cxl/trace: Properly initialize cxl_poison region name
The TP_STRUCT__entry that gets assigned the region name, or an empty string if no region is present, is erroneously initialized to the cxl_region pointer. It needs to be properly initialized otherwise it's length is wrong and garbage chars can appear in the kernel trace output: /sys/kernel/tracing/trace The bad initialization was due in part to a naming conflict with the parameter: struct cxl_region *region. The field 'region' is already exposed externally as the region name, so changing that to something logical, like 'region_name' is not an option. Instead rename the internal only struct cxl_region to the commonly used 'cxlr'. Impact is that tooling depending on that trace data can miss picking up a valid event when searching by region name. The TP_printk() output, if enabled, does emit the correct region names in the dmesg log. This was found during testing of the cxl-list option to report media-errors for a region. Cc: Davidlohr Bueso <[email protected]> Cc: Jonathan Cameron <[email protected]> Cc: Dave Jiang <[email protected]> Cc: Vishal Verma <[email protected]> Cc: [email protected] Fixes: ddf49d57b841 ("cxl/trace: Add TRACE support for CXL media-error records") Signed-off-by: Alison Schofield <[email protected]> Reviewed-by: Ira Weiny <[email protected]> Acked-by: Dan Williams <[email protected]> Signed-off-by: Steven Rostedt (Google) <[email protected]>
Diffstat (limited to 'tools/perf/util/trace-event-scripting.c')
0 files changed, 0 insertions, 0 deletions