aboutsummaryrefslogtreecommitdiffstats
path: root/contrib/tools/flame-graph/filter-perf-events.awk
blob: 64300ff2f40e351093cbc804ee32e118d564d6d8 (plain) (blame)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
#!/usr/bin/awk -f
# Filter perf script output by event type
# Sample usage: awk -f ./filter-perf-events.awk -v event=stalled-cycles-frontend <perf.data.dump

/^[^[:space:]]/ {
    match_event = match($0, event ":");
}

match_event {
    print
}

NF == 0 {
    match_event = 0
}