aboutsummaryrefslogtreecommitdiff
path: root/tools/perf/scripts/python/compaction-times.py
diff options
context:
space:
mode:
authorIan Rogers <[email protected]>2022-03-17 16:16:43 -0700
committerArnaldo Carvalho de Melo <[email protected]>2022-03-18 18:39:09 -0300
commit8b464eac9765dfc84d0327fa3f3668faa439d1ce (patch)
tree33b01cedf3690cd112774f742caa9bf470d3cd6f /tools/perf/scripts/python/compaction-times.py
parent3cf6a32f3f2a45944dd5be5c6ac4deb46bcd3bee (diff)
perf evlist: Avoid iteration for empty evlist.
As seen with 'perf stat --null ..' and reported in: https://lore.kernel.org/lkml/[email protected]/ v2. Avoids setting evsel in the empty list case as suggested by Jiri Olsa. Committer testing: Before: $ perf stat --null sleep 1 Segmentation fault (core dumped) $ After: $ perf stat --null sleep 1 Performance counter stats for 'sleep 1': 1.010340646 seconds time elapsed 0.001420000 seconds user 0.000000000 seconds sys $ Fixes: 472832d2c000b961 ("perf evlist: Refactor evlist__for_each_cpu()") Reported-by: Arnaldo Carvalho de Melo <[email protected]> Signed-off-by: Ian Rogers <[email protected]> Tested-by: Arnaldo Carvalho de Melo <[email protected]> Acked-by: Jiri Olsa <[email protected]> Cc: Adrian Hunter <[email protected]> Cc: Ian Rogers <[email protected]> Cc: Namhyung Kim <[email protected]> Link: https://lore.kernel.org/r/[email protected] Signed-off-by: Arnaldo Carvalho de Melo <[email protected]>
Diffstat (limited to 'tools/perf/scripts/python/compaction-times.py')
0 files changed, 0 insertions, 0 deletions