Skip to content

Commit 5db75d7

Browse files
[BOLT] Filter itrace from perf script mmap & task events (#69585)
perf2bolt launches a few perf script commands and stores the output in temporary files before processing the output and cleaning them up before it exits. The command `perf script --show-mmap-events` outputs PERF_RECORD_MMAP2 and instruction tracing data but when processed it only looks for PERF_RECORD_MMAP2 and the instruction tracing data is ignored. This is fine for small amounts of instruction trace data but when I've recorded Arm ETM or Intel PT AUX I get lots of it By adding `--no-itrace` is will just show the PERF_RECORD_MMAP2 records and will save on time running the `perf script`, disk space storing the output & time parsing the output. It is the same for `perf script --show-task-events` where BOLT is only interested in the PERF_RECORD_COMM & PERF_RECORD_FORK records. ### Data | Perf Record | Perf Data Size | MMap Size | MMap No Itrace Size | |---|---|---|---| | perf record -e cs_etm/@tmc_etr0/u | 137K | 4468K | 0.632K | | perf record -e intel_pt//u | 890K | 33378K | 0.673K |
1 parent 2ad41fa commit 5db75d7

File tree

1 file changed

+6
-8
lines changed

1 file changed

+6
-8
lines changed

bolt/lib/Profile/DataAggregator.cpp

Lines changed: 6 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -181,15 +181,13 @@ void DataAggregator::start() {
181181
"script -F pid,event,addr,ip",
182182
/*Wait = */false);
183183

184-
launchPerfProcess("process events",
185-
MMapEventsPPI,
186-
"script --show-mmap-events",
187-
/*Wait = */false);
184+
launchPerfProcess("process events", MMapEventsPPI,
185+
"script --show-mmap-events --no-itrace",
186+
/*Wait = */ false);
188187

189-
launchPerfProcess("task events",
190-
TaskEventsPPI,
191-
"script --show-task-events",
192-
/*Wait = */false);
188+
launchPerfProcess("task events", TaskEventsPPI,
189+
"script --show-task-events --no-itrace",
190+
/*Wait = */ false);
193191
}
194192

195193
void DataAggregator::abort() {

0 commit comments

Comments
 (0)