diff options
author | Ira Weiny <ira.weiny@intel.com> | 2023-01-18 08:53:41 +0300 |
---|---|---|
committer | Dan Williams <dan.j.williams@intel.com> | 2023-01-27 03:51:07 +0300 |
commit | d1dca858f058f53f68aeacb6db0e1cb3568fa6ef (patch) | |
tree | 3b336d464fdbdbb2724a09f9ad225670e25afca0 /tools/perf/scripts/python/task-analyzer.py | |
parent | 95b4947992858f725ad6a65a2087a3533749660f (diff) | |
download | linux-d1dca858f058f53f68aeacb6db0e1cb3568fa6ef.tar.xz |
cxl/test: Add generic mock events
Facilitate testing basic Get/Clear Event functionality by creating
multiple logs and generic events with made up UUID's.
Data is completely made up with data patterns which should be easy to
spot in trace output.
A single sysfs entry resets the event data and triggers collecting the
events for testing.
Test traces are easy to obtain with a small script such as this:
#!/bin/bash -x
devices=`find /sys/devices/platform -name cxl_mem*`
# Turn on tracing
echo "" > /sys/kernel/tracing/trace
echo 1 > /sys/kernel/tracing/events/cxl/enable
echo 1 > /sys/kernel/tracing/tracing_on
# Generate fake interrupt
for device in $devices; do
echo 1 > $device/event_trigger
done
# Turn off tracing and report events
echo 0 > /sys/kernel/tracing/tracing_on
cat /sys/kernel/tracing/trace
Reviewed-by: Dan Williams <dan.j.williams@intel.com>
Reviewed-by: Jonathan Cameron <Jonathan.Cameron@huawei.com>
Signed-off-by: Ira Weiny <ira.weiny@intel.com>
Link: https://lore.kernel.org/r/20221216-cxl-ev-log-v7-6-2316a5c8f7d8@intel.com
Signed-off-by: Dan Williams <dan.j.williams@intel.com>
Diffstat (limited to 'tools/perf/scripts/python/task-analyzer.py')
0 files changed, 0 insertions, 0 deletions