diff options
author | Kan Liang <kan.liang@linux.intel.com> | 2020-07-03 05:49:19 -0700 |
---|---|---|
committer | Peter Zijlstra <peterz@infradead.org> | 2020-07-08 11:38:54 +0200 |
commit | 631618a0dca31dc23dcce38cf345c6139bd8a1e9 (patch) | |
tree | a22d02bc47ace92859e8ebaffcff7b463b3f23db /tools/perf/scripts/python/exported-sql-viewer.py | |
parent | fda1f99f34a8f0975086bcfef34da865009995c1 (diff) |
perf/x86/intel/lbr: Factor out intel_pmu_store_lbr
The way to store the LBR information from a PEBS LBR record can be
reused in Architecture LBR, because
- The LBR information is stored like a stack. Entry 0 is always the
youngest branch.
- The layout of the LBR INFO MSR is similar.
The LBR information may be retrieved from either the LBR registers
(non-PEBS event) or a buffer (PEBS event). Extend rdlbr_*() to support
both methods.
Explicitly check the invalid entry (0s), which can avoid unnecessary MSR
access if using a non-PEBS event. For a PEBS event, the check should
slightly improve the performance as well. The invalid entries are cut.
The intel_pmu_lbr_filter() doesn't need to check and filter them out.
Cannot share the function with current model-specific LBR read, because
the direction of the LBR growth is opposite.
Signed-off-by: Kan Liang <kan.liang@linux.intel.com>
Signed-off-by: Peter Zijlstra (Intel) <peterz@infradead.org>
Link: https://lkml.kernel.org/r/1593780569-62993-14-git-send-email-kan.liang@linux.intel.com
Diffstat (limited to 'tools/perf/scripts/python/exported-sql-viewer.py')
0 files changed, 0 insertions, 0 deletions