Merge branch 'merge' of git://git.kernel.org/pub/scm/linux/kernel/git/benh/powerpc
[linux-2.6.git] / arch / x86 / kernel / cpu / perf_event_intel_lbr.c
blobd978353c939bba235a29e76fda02d1f8eb97f84a
1 #include <linux/perf_event.h>
2 #include <linux/types.h>
4 #include <asm/perf_event.h>
5 #include <asm/msr.h>
6 #include <asm/insn.h>
8 #include "perf_event.h"
10 enum {
11 LBR_FORMAT_32 = 0x00,
12 LBR_FORMAT_LIP = 0x01,
13 LBR_FORMAT_EIP = 0x02,
14 LBR_FORMAT_EIP_FLAGS = 0x03,
18 * Intel LBR_SELECT bits
19 * Intel Vol3a, April 2011, Section 16.7 Table 16-10
21 * Hardware branch filter (not available on all CPUs)
23 #define LBR_KERNEL_BIT 0 /* do not capture at ring0 */
24 #define LBR_USER_BIT 1 /* do not capture at ring > 0 */
25 #define LBR_JCC_BIT 2 /* do not capture conditional branches */
26 #define LBR_REL_CALL_BIT 3 /* do not capture relative calls */
27 #define LBR_IND_CALL_BIT 4 /* do not capture indirect calls */
28 #define LBR_RETURN_BIT 5 /* do not capture near returns */
29 #define LBR_IND_JMP_BIT 6 /* do not capture indirect jumps */
30 #define LBR_REL_JMP_BIT 7 /* do not capture relative jumps */
31 #define LBR_FAR_BIT 8 /* do not capture far branches */
33 #define LBR_KERNEL (1 << LBR_KERNEL_BIT)
34 #define LBR_USER (1 << LBR_USER_BIT)
35 #define LBR_JCC (1 << LBR_JCC_BIT)
36 #define LBR_REL_CALL (1 << LBR_REL_CALL_BIT)
37 #define LBR_IND_CALL (1 << LBR_IND_CALL_BIT)
38 #define LBR_RETURN (1 << LBR_RETURN_BIT)
39 #define LBR_REL_JMP (1 << LBR_REL_JMP_BIT)
40 #define LBR_IND_JMP (1 << LBR_IND_JMP_BIT)
41 #define LBR_FAR (1 << LBR_FAR_BIT)
43 #define LBR_PLM (LBR_KERNEL | LBR_USER)
45 #define LBR_SEL_MASK 0x1ff /* valid bits in LBR_SELECT */
46 #define LBR_NOT_SUPP -1 /* LBR filter not supported */
47 #define LBR_IGN 0 /* ignored */
49 #define LBR_ANY \
50 (LBR_JCC |\
51 LBR_REL_CALL |\
52 LBR_IND_CALL |\
53 LBR_RETURN |\
54 LBR_REL_JMP |\
55 LBR_IND_JMP |\
56 LBR_FAR)
58 #define LBR_FROM_FLAG_MISPRED (1ULL << 63)
60 #define for_each_branch_sample_type(x) \
61 for ((x) = PERF_SAMPLE_BRANCH_USER; \
62 (x) < PERF_SAMPLE_BRANCH_MAX; (x) <<= 1)
65 * x86control flow change classification
66 * x86control flow changes include branches, interrupts, traps, faults
68 enum {
69 X86_BR_NONE = 0, /* unknown */
71 X86_BR_USER = 1 << 0, /* branch target is user */
72 X86_BR_KERNEL = 1 << 1, /* branch target is kernel */
74 X86_BR_CALL = 1 << 2, /* call */
75 X86_BR_RET = 1 << 3, /* return */
76 X86_BR_SYSCALL = 1 << 4, /* syscall */
77 X86_BR_SYSRET = 1 << 5, /* syscall return */
78 X86_BR_INT = 1 << 6, /* sw interrupt */
79 X86_BR_IRET = 1 << 7, /* return from interrupt */
80 X86_BR_JCC = 1 << 8, /* conditional */
81 X86_BR_JMP = 1 << 9, /* jump */
82 X86_BR_IRQ = 1 << 10,/* hw interrupt or trap or fault */
83 X86_BR_IND_CALL = 1 << 11,/* indirect calls */
86 #define X86_BR_PLM (X86_BR_USER | X86_BR_KERNEL)
88 #define X86_BR_ANY \
89 (X86_BR_CALL |\
90 X86_BR_RET |\
91 X86_BR_SYSCALL |\
92 X86_BR_SYSRET |\
93 X86_BR_INT |\
94 X86_BR_IRET |\
95 X86_BR_JCC |\
96 X86_BR_JMP |\
97 X86_BR_IRQ |\
98 X86_BR_IND_CALL)
100 #define X86_BR_ALL (X86_BR_PLM | X86_BR_ANY)
102 #define X86_BR_ANY_CALL \
103 (X86_BR_CALL |\
104 X86_BR_IND_CALL |\
105 X86_BR_SYSCALL |\
106 X86_BR_IRQ |\
107 X86_BR_INT)
109 static void intel_pmu_lbr_filter(struct cpu_hw_events *cpuc);
112 * We only support LBR implementations that have FREEZE_LBRS_ON_PMI
113 * otherwise it becomes near impossible to get a reliable stack.
116 static void __intel_pmu_lbr_enable(void)
118 u64 debugctl;
119 struct cpu_hw_events *cpuc = &__get_cpu_var(cpu_hw_events);
121 if (cpuc->lbr_sel)
122 wrmsrl(MSR_LBR_SELECT, cpuc->lbr_sel->config);
124 rdmsrl(MSR_IA32_DEBUGCTLMSR, debugctl);
125 debugctl |= (DEBUGCTLMSR_LBR | DEBUGCTLMSR_FREEZE_LBRS_ON_PMI);
126 wrmsrl(MSR_IA32_DEBUGCTLMSR, debugctl);
129 static void __intel_pmu_lbr_disable(void)
131 u64 debugctl;
133 rdmsrl(MSR_IA32_DEBUGCTLMSR, debugctl);
134 debugctl &= ~(DEBUGCTLMSR_LBR | DEBUGCTLMSR_FREEZE_LBRS_ON_PMI);
135 wrmsrl(MSR_IA32_DEBUGCTLMSR, debugctl);
138 static void intel_pmu_lbr_reset_32(void)
140 int i;
142 for (i = 0; i < x86_pmu.lbr_nr; i++)
143 wrmsrl(x86_pmu.lbr_from + i, 0);
146 static void intel_pmu_lbr_reset_64(void)
148 int i;
150 for (i = 0; i < x86_pmu.lbr_nr; i++) {
151 wrmsrl(x86_pmu.lbr_from + i, 0);
152 wrmsrl(x86_pmu.lbr_to + i, 0);
156 void intel_pmu_lbr_reset(void)
158 if (!x86_pmu.lbr_nr)
159 return;
161 if (x86_pmu.intel_cap.lbr_format == LBR_FORMAT_32)
162 intel_pmu_lbr_reset_32();
163 else
164 intel_pmu_lbr_reset_64();
167 void intel_pmu_lbr_enable(struct perf_event *event)
169 struct cpu_hw_events *cpuc = &__get_cpu_var(cpu_hw_events);
171 if (!x86_pmu.lbr_nr)
172 return;
175 * Reset the LBR stack if we changed task context to
176 * avoid data leaks.
178 if (event->ctx->task && cpuc->lbr_context != event->ctx) {
179 intel_pmu_lbr_reset();
180 cpuc->lbr_context = event->ctx;
182 cpuc->br_sel = event->hw.branch_reg.reg;
184 cpuc->lbr_users++;
187 void intel_pmu_lbr_disable(struct perf_event *event)
189 struct cpu_hw_events *cpuc = &__get_cpu_var(cpu_hw_events);
191 if (!x86_pmu.lbr_nr)
192 return;
194 cpuc->lbr_users--;
195 WARN_ON_ONCE(cpuc->lbr_users < 0);
197 if (cpuc->enabled && !cpuc->lbr_users) {
198 __intel_pmu_lbr_disable();
199 /* avoid stale pointer */
200 cpuc->lbr_context = NULL;
204 void intel_pmu_lbr_enable_all(void)
206 struct cpu_hw_events *cpuc = &__get_cpu_var(cpu_hw_events);
208 if (cpuc->lbr_users)
209 __intel_pmu_lbr_enable();
212 void intel_pmu_lbr_disable_all(void)
214 struct cpu_hw_events *cpuc = &__get_cpu_var(cpu_hw_events);
216 if (cpuc->lbr_users)
217 __intel_pmu_lbr_disable();
221 * TOS = most recently recorded branch
223 static inline u64 intel_pmu_lbr_tos(void)
225 u64 tos;
227 rdmsrl(x86_pmu.lbr_tos, tos);
229 return tos;
232 static void intel_pmu_lbr_read_32(struct cpu_hw_events *cpuc)
234 unsigned long mask = x86_pmu.lbr_nr - 1;
235 u64 tos = intel_pmu_lbr_tos();
236 int i;
238 for (i = 0; i < x86_pmu.lbr_nr; i++) {
239 unsigned long lbr_idx = (tos - i) & mask;
240 union {
241 struct {
242 u32 from;
243 u32 to;
245 u64 lbr;
246 } msr_lastbranch;
248 rdmsrl(x86_pmu.lbr_from + lbr_idx, msr_lastbranch.lbr);
250 cpuc->lbr_entries[i].from = msr_lastbranch.from;
251 cpuc->lbr_entries[i].to = msr_lastbranch.to;
252 cpuc->lbr_entries[i].mispred = 0;
253 cpuc->lbr_entries[i].predicted = 0;
254 cpuc->lbr_entries[i].reserved = 0;
256 cpuc->lbr_stack.nr = i;
260 * Due to lack of segmentation in Linux the effective address (offset)
261 * is the same as the linear address, allowing us to merge the LIP and EIP
262 * LBR formats.
264 static void intel_pmu_lbr_read_64(struct cpu_hw_events *cpuc)
266 unsigned long mask = x86_pmu.lbr_nr - 1;
267 int lbr_format = x86_pmu.intel_cap.lbr_format;
268 u64 tos = intel_pmu_lbr_tos();
269 int i;
271 for (i = 0; i < x86_pmu.lbr_nr; i++) {
272 unsigned long lbr_idx = (tos - i) & mask;
273 u64 from, to, mis = 0, pred = 0;
275 rdmsrl(x86_pmu.lbr_from + lbr_idx, from);
276 rdmsrl(x86_pmu.lbr_to + lbr_idx, to);
278 if (lbr_format == LBR_FORMAT_EIP_FLAGS) {
279 mis = !!(from & LBR_FROM_FLAG_MISPRED);
280 pred = !mis;
281 from = (u64)((((s64)from) << 1) >> 1);
284 cpuc->lbr_entries[i].from = from;
285 cpuc->lbr_entries[i].to = to;
286 cpuc->lbr_entries[i].mispred = mis;
287 cpuc->lbr_entries[i].predicted = pred;
288 cpuc->lbr_entries[i].reserved = 0;
290 cpuc->lbr_stack.nr = i;
293 void intel_pmu_lbr_read(void)
295 struct cpu_hw_events *cpuc = &__get_cpu_var(cpu_hw_events);
297 if (!cpuc->lbr_users)
298 return;
300 if (x86_pmu.intel_cap.lbr_format == LBR_FORMAT_32)
301 intel_pmu_lbr_read_32(cpuc);
302 else
303 intel_pmu_lbr_read_64(cpuc);
305 intel_pmu_lbr_filter(cpuc);
309 * SW filter is used:
310 * - in case there is no HW filter
311 * - in case the HW filter has errata or limitations
313 static int intel_pmu_setup_sw_lbr_filter(struct perf_event *event)
315 u64 br_type = event->attr.branch_sample_type;
316 int mask = 0;
318 if (br_type & PERF_SAMPLE_BRANCH_USER)
319 mask |= X86_BR_USER;
321 if (br_type & PERF_SAMPLE_BRANCH_KERNEL) {
322 if (perf_paranoid_kernel() && !capable(CAP_SYS_ADMIN))
323 return -EACCES;
324 mask |= X86_BR_KERNEL;
327 /* we ignore BRANCH_HV here */
329 if (br_type & PERF_SAMPLE_BRANCH_ANY)
330 mask |= X86_BR_ANY;
332 if (br_type & PERF_SAMPLE_BRANCH_ANY_CALL)
333 mask |= X86_BR_ANY_CALL;
335 if (br_type & PERF_SAMPLE_BRANCH_ANY_RETURN)
336 mask |= X86_BR_RET | X86_BR_IRET | X86_BR_SYSRET;
338 if (br_type & PERF_SAMPLE_BRANCH_IND_CALL)
339 mask |= X86_BR_IND_CALL;
341 * stash actual user request into reg, it may
342 * be used by fixup code for some CPU
344 event->hw.branch_reg.reg = mask;
346 return 0;
350 * setup the HW LBR filter
351 * Used only when available, may not be enough to disambiguate
352 * all branches, may need the help of the SW filter
354 static int intel_pmu_setup_hw_lbr_filter(struct perf_event *event)
356 struct hw_perf_event_extra *reg;
357 u64 br_type = event->attr.branch_sample_type;
358 u64 mask = 0, m;
359 u64 v;
361 for_each_branch_sample_type(m) {
362 if (!(br_type & m))
363 continue;
365 v = x86_pmu.lbr_sel_map[m];
366 if (v == LBR_NOT_SUPP)
367 return -EOPNOTSUPP;
369 if (v != LBR_IGN)
370 mask |= v;
372 reg = &event->hw.branch_reg;
373 reg->idx = EXTRA_REG_LBR;
375 /* LBR_SELECT operates in suppress mode so invert mask */
376 reg->config = ~mask & x86_pmu.lbr_sel_mask;
378 return 0;
381 int intel_pmu_setup_lbr_filter(struct perf_event *event)
383 int ret = 0;
386 * no LBR on this PMU
388 if (!x86_pmu.lbr_nr)
389 return -EOPNOTSUPP;
392 * setup SW LBR filter
394 ret = intel_pmu_setup_sw_lbr_filter(event);
395 if (ret)
396 return ret;
399 * setup HW LBR filter, if any
401 if (x86_pmu.lbr_sel_map)
402 ret = intel_pmu_setup_hw_lbr_filter(event);
404 return ret;
408 * return the type of control flow change at address "from"
409 * intruction is not necessarily a branch (in case of interrupt).
411 * The branch type returned also includes the priv level of the
412 * target of the control flow change (X86_BR_USER, X86_BR_KERNEL).
414 * If a branch type is unknown OR the instruction cannot be
415 * decoded (e.g., text page not present), then X86_BR_NONE is
416 * returned.
418 static int branch_type(unsigned long from, unsigned long to)
420 struct insn insn;
421 void *addr;
422 int bytes, size = MAX_INSN_SIZE;
423 int ret = X86_BR_NONE;
424 int ext, to_plm, from_plm;
425 u8 buf[MAX_INSN_SIZE];
426 int is64 = 0;
428 to_plm = kernel_ip(to) ? X86_BR_KERNEL : X86_BR_USER;
429 from_plm = kernel_ip(from) ? X86_BR_KERNEL : X86_BR_USER;
432 * maybe zero if lbr did not fill up after a reset by the time
433 * we get a PMU interrupt
435 if (from == 0 || to == 0)
436 return X86_BR_NONE;
438 if (from_plm == X86_BR_USER) {
440 * can happen if measuring at the user level only
441 * and we interrupt in a kernel thread, e.g., idle.
443 if (!current->mm)
444 return X86_BR_NONE;
446 /* may fail if text not present */
447 bytes = copy_from_user_nmi(buf, (void __user *)from, size);
448 if (bytes != size)
449 return X86_BR_NONE;
451 addr = buf;
452 } else {
454 * The LBR logs any address in the IP, even if the IP just
455 * faulted. This means userspace can control the from address.
456 * Ensure we don't blindy read any address by validating it is
457 * a known text address.
459 if (kernel_text_address(from))
460 addr = (void *)from;
461 else
462 return X86_BR_NONE;
466 * decoder needs to know the ABI especially
467 * on 64-bit systems running 32-bit apps
469 #ifdef CONFIG_X86_64
470 is64 = kernel_ip((unsigned long)addr) || !test_thread_flag(TIF_IA32);
471 #endif
472 insn_init(&insn, addr, is64);
473 insn_get_opcode(&insn);
475 switch (insn.opcode.bytes[0]) {
476 case 0xf:
477 switch (insn.opcode.bytes[1]) {
478 case 0x05: /* syscall */
479 case 0x34: /* sysenter */
480 ret = X86_BR_SYSCALL;
481 break;
482 case 0x07: /* sysret */
483 case 0x35: /* sysexit */
484 ret = X86_BR_SYSRET;
485 break;
486 case 0x80 ... 0x8f: /* conditional */
487 ret = X86_BR_JCC;
488 break;
489 default:
490 ret = X86_BR_NONE;
492 break;
493 case 0x70 ... 0x7f: /* conditional */
494 ret = X86_BR_JCC;
495 break;
496 case 0xc2: /* near ret */
497 case 0xc3: /* near ret */
498 case 0xca: /* far ret */
499 case 0xcb: /* far ret */
500 ret = X86_BR_RET;
501 break;
502 case 0xcf: /* iret */
503 ret = X86_BR_IRET;
504 break;
505 case 0xcc ... 0xce: /* int */
506 ret = X86_BR_INT;
507 break;
508 case 0xe8: /* call near rel */
509 case 0x9a: /* call far absolute */
510 ret = X86_BR_CALL;
511 break;
512 case 0xe0 ... 0xe3: /* loop jmp */
513 ret = X86_BR_JCC;
514 break;
515 case 0xe9 ... 0xeb: /* jmp */
516 ret = X86_BR_JMP;
517 break;
518 case 0xff: /* call near absolute, call far absolute ind */
519 insn_get_modrm(&insn);
520 ext = (insn.modrm.bytes[0] >> 3) & 0x7;
521 switch (ext) {
522 case 2: /* near ind call */
523 case 3: /* far ind call */
524 ret = X86_BR_IND_CALL;
525 break;
526 case 4:
527 case 5:
528 ret = X86_BR_JMP;
529 break;
531 break;
532 default:
533 ret = X86_BR_NONE;
536 * interrupts, traps, faults (and thus ring transition) may
537 * occur on any instructions. Thus, to classify them correctly,
538 * we need to first look at the from and to priv levels. If they
539 * are different and to is in the kernel, then it indicates
540 * a ring transition. If the from instruction is not a ring
541 * transition instr (syscall, systenter, int), then it means
542 * it was a irq, trap or fault.
544 * we have no way of detecting kernel to kernel faults.
546 if (from_plm == X86_BR_USER && to_plm == X86_BR_KERNEL
547 && ret != X86_BR_SYSCALL && ret != X86_BR_INT)
548 ret = X86_BR_IRQ;
551 * branch priv level determined by target as
552 * is done by HW when LBR_SELECT is implemented
554 if (ret != X86_BR_NONE)
555 ret |= to_plm;
557 return ret;
561 * implement actual branch filter based on user demand.
562 * Hardware may not exactly satisfy that request, thus
563 * we need to inspect opcodes. Mismatched branches are
564 * discarded. Therefore, the number of branches returned
565 * in PERF_SAMPLE_BRANCH_STACK sample may vary.
567 static void
568 intel_pmu_lbr_filter(struct cpu_hw_events *cpuc)
570 u64 from, to;
571 int br_sel = cpuc->br_sel;
572 int i, j, type;
573 bool compress = false;
575 /* if sampling all branches, then nothing to filter */
576 if ((br_sel & X86_BR_ALL) == X86_BR_ALL)
577 return;
579 for (i = 0; i < cpuc->lbr_stack.nr; i++) {
581 from = cpuc->lbr_entries[i].from;
582 to = cpuc->lbr_entries[i].to;
584 type = branch_type(from, to);
586 /* if type does not correspond, then discard */
587 if (type == X86_BR_NONE || (br_sel & type) != type) {
588 cpuc->lbr_entries[i].from = 0;
589 compress = true;
593 if (!compress)
594 return;
596 /* remove all entries with from=0 */
597 for (i = 0; i < cpuc->lbr_stack.nr; ) {
598 if (!cpuc->lbr_entries[i].from) {
599 j = i;
600 while (++j < cpuc->lbr_stack.nr)
601 cpuc->lbr_entries[j-1] = cpuc->lbr_entries[j];
602 cpuc->lbr_stack.nr--;
603 if (!cpuc->lbr_entries[i].from)
604 continue;
606 i++;
611 * Map interface branch filters onto LBR filters
613 static const int nhm_lbr_sel_map[PERF_SAMPLE_BRANCH_MAX] = {
614 [PERF_SAMPLE_BRANCH_ANY] = LBR_ANY,
615 [PERF_SAMPLE_BRANCH_USER] = LBR_USER,
616 [PERF_SAMPLE_BRANCH_KERNEL] = LBR_KERNEL,
617 [PERF_SAMPLE_BRANCH_HV] = LBR_IGN,
618 [PERF_SAMPLE_BRANCH_ANY_RETURN] = LBR_RETURN | LBR_REL_JMP
619 | LBR_IND_JMP | LBR_FAR,
621 * NHM/WSM erratum: must include REL_JMP+IND_JMP to get CALL branches
623 [PERF_SAMPLE_BRANCH_ANY_CALL] =
624 LBR_REL_CALL | LBR_IND_CALL | LBR_REL_JMP | LBR_IND_JMP | LBR_FAR,
626 * NHM/WSM erratum: must include IND_JMP to capture IND_CALL
628 [PERF_SAMPLE_BRANCH_IND_CALL] = LBR_IND_CALL | LBR_IND_JMP,
631 static const int snb_lbr_sel_map[PERF_SAMPLE_BRANCH_MAX] = {
632 [PERF_SAMPLE_BRANCH_ANY] = LBR_ANY,
633 [PERF_SAMPLE_BRANCH_USER] = LBR_USER,
634 [PERF_SAMPLE_BRANCH_KERNEL] = LBR_KERNEL,
635 [PERF_SAMPLE_BRANCH_HV] = LBR_IGN,
636 [PERF_SAMPLE_BRANCH_ANY_RETURN] = LBR_RETURN | LBR_FAR,
637 [PERF_SAMPLE_BRANCH_ANY_CALL] = LBR_REL_CALL | LBR_IND_CALL
638 | LBR_FAR,
639 [PERF_SAMPLE_BRANCH_IND_CALL] = LBR_IND_CALL,
642 /* core */
643 void intel_pmu_lbr_init_core(void)
645 x86_pmu.lbr_nr = 4;
646 x86_pmu.lbr_tos = MSR_LBR_TOS;
647 x86_pmu.lbr_from = MSR_LBR_CORE_FROM;
648 x86_pmu.lbr_to = MSR_LBR_CORE_TO;
651 * SW branch filter usage:
652 * - compensate for lack of HW filter
654 pr_cont("4-deep LBR, ");
657 /* nehalem/westmere */
658 void intel_pmu_lbr_init_nhm(void)
660 x86_pmu.lbr_nr = 16;
661 x86_pmu.lbr_tos = MSR_LBR_TOS;
662 x86_pmu.lbr_from = MSR_LBR_NHM_FROM;
663 x86_pmu.lbr_to = MSR_LBR_NHM_TO;
665 x86_pmu.lbr_sel_mask = LBR_SEL_MASK;
666 x86_pmu.lbr_sel_map = nhm_lbr_sel_map;
669 * SW branch filter usage:
670 * - workaround LBR_SEL errata (see above)
671 * - support syscall, sysret capture.
672 * That requires LBR_FAR but that means far
673 * jmp need to be filtered out
675 pr_cont("16-deep LBR, ");
678 /* sandy bridge */
679 void intel_pmu_lbr_init_snb(void)
681 x86_pmu.lbr_nr = 16;
682 x86_pmu.lbr_tos = MSR_LBR_TOS;
683 x86_pmu.lbr_from = MSR_LBR_NHM_FROM;
684 x86_pmu.lbr_to = MSR_LBR_NHM_TO;
686 x86_pmu.lbr_sel_mask = LBR_SEL_MASK;
687 x86_pmu.lbr_sel_map = snb_lbr_sel_map;
690 * SW branch filter usage:
691 * - support syscall, sysret capture.
692 * That requires LBR_FAR but that means far
693 * jmp need to be filtered out
695 pr_cont("16-deep LBR, ");
698 /* atom */
699 void intel_pmu_lbr_init_atom(void)
702 * only models starting at stepping 10 seems
703 * to have an operational LBR which can freeze
704 * on PMU interrupt
706 if (boot_cpu_data.x86_model == 28
707 && boot_cpu_data.x86_mask < 10) {
708 pr_cont("LBR disabled due to erratum");
709 return;
712 x86_pmu.lbr_nr = 8;
713 x86_pmu.lbr_tos = MSR_LBR_TOS;
714 x86_pmu.lbr_from = MSR_LBR_CORE_FROM;
715 x86_pmu.lbr_to = MSR_LBR_CORE_TO;
718 * SW branch filter usage:
719 * - compensate for lack of HW filter
721 pr_cont("8-deep LBR, ");