aboutsummaryrefslogtreecommitdiff
path: root/tools/perf/scripts/python/exported-sql-viewer.py
diff options
context:
space:
mode:
authorRiccardo Mancini <[email protected]>2021-08-21 11:19:08 +0200
committerArnaldo Carvalho de Melo <[email protected]>2021-08-31 16:17:02 -0300
commit6e93bc534f1408e0e1f890e760596099b12f0d8c (patch)
tree565f03db84f57548fb163e5cb0c3c70596299973 /tools/perf/scripts/python/exported-sql-viewer.py
parentb75f299d6960e773a28fcd38bad901998035e69e (diff)
libperf cpumap: Take into advantage it is sorted to optimize perf_cpu_map__max()
From commit 7074674e7338863e ("perf cpumap: Maintain cpumaps ordered and without dups"), perf_cpu_map elements are sorted in ascending order. This patch improves the perf_cpu_map__max function by returning the last element. Committer notes: Do it as a ternary to keep it in just one return line, add a comment explaining it is sorted and what functions does it. Signed-off-by: Riccardo Mancini <[email protected]> Cc: Ian Rogers <[email protected]> Cc: Jiri Olsa <[email protected]> Cc: Mark Rutland <[email protected]> Cc: Namhyung Kim <[email protected]> Cc: Peter Zijlstra <[email protected]> Link: http://lore.kernel.org/lkml/fb79f02e7b86ea8044d563adb1e9890c906f982f.1629490974.git.rickyman7@gmail.com Signed-off-by: Arnaldo Carvalho de Melo <[email protected]>
Diffstat (limited to 'tools/perf/scripts/python/exported-sql-viewer.py')
0 files changed, 0 insertions, 0 deletions