summaryrefslogtreecommitdiff
path: root/tools/perf/scripts/python/task-analyzer.py
diff options
context:
space:
mode:
authorRafael J. Wysocki <rafael.j.wysocki@intel.com>2025-01-27 16:38:25 +0300
committerRafael J. Wysocki <rafael.j.wysocki@intel.com>2025-02-18 22:44:22 +0300
commita8e62726ac0dd7b610c87ba1a938a5a9091c34df (patch)
treeb9e89a0144f3097b1cf6869ae33d3ba3cd4459a7 /tools/perf/scripts/python/task-analyzer.py
parent5fad775d432c6c9158ea12e7e00d8922ef8d3dfc (diff)
downloadlinux-a8e62726ac0dd7b610c87ba1a938a5a9091c34df.tar.xz
PM: EM: Slightly reduce em_check_capacity_update() overhead
Every iteration of the loop over all possible CPUs in em_check_capacity_update() causes get_cpu_device() to be called twice for the same CPU, once indirectly via em_cpu_get() and once directly. Get rid of the indirect get_cpu_device() call by moving the direct invocation of it earlier and using em_pd_get() instead of em_cpu_get() to get a pd pointer for the dev one returned by it. This also exposes the fact that dev is needed to get a pd, so the code becomes somewhat easier to follow after it. No functional impact. Signed-off-by: Rafael J. Wysocki <rafael.j.wysocki@intel.com> Reviewed-by: Lukasz Luba <lukasz.luba@arm.com> Link: https://patch.msgid.link/1925950.tdWV9SEqCh@rjwysocki.net
Diffstat (limited to 'tools/perf/scripts/python/task-analyzer.py')
0 files changed, 0 insertions, 0 deletions