aboutsummaryrefslogtreecommitdiffstats
path: root/tools/perf
diff options
context:
space:
mode:
authorDmitry Torokhov <dmitry.torokhov@gmail.com>2018-04-04 19:11:49 -0400
committerDmitry Torokhov <dmitry.torokhov@gmail.com>2018-04-04 19:11:49 -0400
commit664b0bae0b87f69bc9deb098f5e0158b9cf18e04 (patch)
treed5841492b396ff483723b9339c7c11dc33b67688 /tools/perf
parent567b9b549cfa1cbc202762ae97b5385c29ade1e3 (diff)
parent04bb1719c4de94700056241d4c0fe3c1413f5aff (diff)
Merge branch 'next' into for-linus
Prepare input updates for 4.17 merge window.
Diffstat (limited to 'tools/perf')
-rw-r--r--tools/perf/.gitignore1
-rw-r--r--tools/perf/Build4
-rw-r--r--tools/perf/Documentation/perf-buildid-cache.txt3
-rw-r--r--tools/perf/Documentation/perf-data.txt4
-rw-r--r--tools/perf/Documentation/perf-evlist.txt4
-rw-r--r--tools/perf/Documentation/perf-inject.txt4
-rw-r--r--tools/perf/Documentation/perf-list.txt11
-rw-r--r--tools/perf/Documentation/perf-lock.txt4
-rw-r--r--tools/perf/Documentation/perf-probe.txt18
-rw-r--r--tools/perf/Documentation/perf-record.txt5
-rw-r--r--tools/perf/Documentation/perf-report.txt40
-rw-r--r--tools/perf/Documentation/perf-sched.txt12
-rw-r--r--tools/perf/Documentation/perf-script.txt56
-rw-r--r--tools/perf/Documentation/perf-stat.txt7
-rw-r--r--tools/perf/Documentation/perf-timechart.txt4
-rw-r--r--tools/perf/Documentation/perf-top.txt9
-rw-r--r--tools/perf/Documentation/perf-trace.txt20
-rw-r--r--tools/perf/Documentation/perf.data-file-format.txt27
-rw-r--r--tools/perf/Documentation/tips.txt2
-rw-r--r--tools/perf/Makefile.config80
-rw-r--r--tools/perf/Makefile.perf58
-rw-r--r--tools/perf/arch/arm/annotate/instructions.c3
-rw-r--r--tools/perf/arch/arm/util/auxtrace.c77
-rw-r--r--tools/perf/arch/arm/util/pmu.c6
-rw-r--r--tools/perf/arch/arm64/annotate/instructions.c3
-rw-r--r--tools/perf/arch/arm64/util/Build5
-rw-r--r--tools/perf/arch/arm64/util/arm-spe.c225
-rw-r--r--tools/perf/arch/arm64/util/header.c65
-rw-r--r--tools/perf/arch/arm64/util/sym-handling.c22
-rw-r--r--tools/perf/arch/common.c44
-rw-r--r--tools/perf/arch/common.h1
-rw-r--r--tools/perf/arch/powerpc/annotate/instructions.c4
-rw-r--r--tools/perf/arch/powerpc/util/header.c2
-rw-r--r--tools/perf/arch/powerpc/util/sym-handling.c8
-rw-r--r--tools/perf/arch/s390/Makefile26
-rw-r--r--tools/perf/arch/s390/annotate/instructions.c7
-rwxr-xr-xtools/perf/arch/s390/entry/syscalls/mksyscalltbl32
-rw-r--r--tools/perf/arch/s390/entry/syscalls/syscall.tbl390
-rw-r--r--tools/perf/arch/s390/include/dwarf-regs-table.h71
-rw-r--r--tools/perf/arch/s390/include/perf_regs.h95
-rw-r--r--tools/perf/arch/s390/util/Build3
-rw-r--r--tools/perf/arch/s390/util/auxtrace.c118
-rw-r--r--tools/perf/arch/s390/util/dwarf-regs.c41
-rw-r--r--tools/perf/arch/s390/util/unwind-libdw.c63
-rw-r--r--tools/perf/arch/x86/annotate/instructions.c14
-rw-r--r--tools/perf/arch/x86/include/arch-tests.h1
-rw-r--r--tools/perf/arch/x86/tests/Build1
-rw-r--r--tools/perf/arch/x86/tests/arch-tests.c4
-rw-r--r--tools/perf/arch/x86/tests/perf-time-to-tsc.c2
-rw-r--r--tools/perf/arch/x86/util/header.c4
-rw-r--r--tools/perf/arch/x86/util/unwind-libunwind.c2
-rw-r--r--tools/perf/bench/futex-hash.c20
-rw-r--r--tools/perf/bench/futex-lock-pi.c23
-rw-r--r--tools/perf/bench/futex-requeue.c22
-rw-r--r--tools/perf/bench/futex-wake-parallel.c46
-rw-r--r--tools/perf/bench/futex-wake.c18
-rw-r--r--tools/perf/bench/numa.c56
-rw-r--r--tools/perf/builtin-annotate.c10
-rw-r--r--tools/perf/builtin-buildid-cache.c12
-rw-r--r--tools/perf/builtin-buildid-list.c16
-rw-r--r--tools/perf/builtin-c2c.c31
-rw-r--r--tools/perf/builtin-config.c22
-rw-r--r--tools/perf/builtin-diff.c18
-rw-r--r--tools/perf/builtin-evlist.c12
-rw-r--r--tools/perf/builtin-help.c6
-rw-r--r--tools/perf/builtin-inject.c39
-rw-r--r--tools/perf/builtin-kmem.c13
-rw-r--r--tools/perf/builtin-kvm.c31
-rw-r--r--tools/perf/builtin-list.c7
-rw-r--r--tools/perf/builtin-lock.c12
-rw-r--r--tools/perf/builtin-mem.c13
-rw-r--r--tools/perf/builtin-record.c265
-rw-r--r--tools/perf/builtin-report.c303
-rw-r--r--tools/perf/builtin-sched.c28
-rw-r--r--tools/perf/builtin-script.c985
-rw-r--r--tools/perf/builtin-stat.c347
-rw-r--r--tools/perf/builtin-timechart.c18
-rw-r--r--tools/perf/builtin-top.c209
-rw-r--r--tools/perf/builtin-trace.c217
-rwxr-xr-xtools/perf/check-headers.sh19
-rw-r--r--tools/perf/jvmti/jvmti_agent.c16
-rw-r--r--tools/perf/jvmti/jvmti_agent.h7
-rw-r--r--tools/perf/jvmti/libjvmti.c147
-rw-r--r--tools/perf/perf-completion.sh47
-rw-r--r--tools/perf/perf.c4
-rw-r--r--tools/perf/perf.h2
-rw-r--r--tools/perf/pmu-events/arch/arm64/cavium/thunderx2-imp-def.json62
-rw-r--r--tools/perf/pmu-events/arch/arm64/cortex-a53/branch.json27
-rw-r--r--tools/perf/pmu-events/arch/arm64/cortex-a53/bus.json22
-rw-r--r--tools/perf/pmu-events/arch/arm64/cortex-a53/cache.json27
-rw-r--r--tools/perf/pmu-events/arch/arm64/cortex-a53/memory.json22
-rw-r--r--tools/perf/pmu-events/arch/arm64/cortex-a53/other.json32
-rw-r--r--tools/perf/pmu-events/arch/arm64/cortex-a53/pipeline.json52
-rw-r--r--tools/perf/pmu-events/arch/arm64/mapfile.csv16
-rw-r--r--tools/perf/pmu-events/arch/powerpc/mapfile.csv12
-rw-r--r--tools/perf/pmu-events/arch/powerpc/power9/cache.json5
-rw-r--r--tools/perf/pmu-events/arch/powerpc/power9/frontend.json7
-rw-r--r--tools/perf/pmu-events/arch/powerpc/power9/marked.json27
-rw-r--r--tools/perf/pmu-events/arch/powerpc/power9/other.json276
-rw-r--r--tools/perf/pmu-events/arch/powerpc/power9/pipeline.json14
-rw-r--r--tools/perf/pmu-events/arch/powerpc/power9/pmc.json2
-rw-r--r--tools/perf/pmu-events/arch/powerpc/power9/translation.json5
-rw-r--r--tools/perf/pmu-events/arch/x86/broadwell/bdw-metrics.json164
-rw-r--r--tools/perf/pmu-events/arch/x86/broadwell/cache.json555
-rw-r--r--tools/perf/pmu-events/arch/x86/broadwell/floating-point.json108
-rw-r--r--tools/perf/pmu-events/arch/x86/broadwell/frontend.json138
-rw-r--r--tools/perf/pmu-events/arch/x86/broadwell/memory.json210
-rw-r--r--tools/perf/pmu-events/arch/x86/broadwell/other.json20
-rw-r--r--tools/perf/pmu-events/arch/x86/broadwell/pipeline.json1156
-rw-r--r--tools/perf/pmu-events/arch/x86/broadwell/virtual-memory.json150
-rw-r--r--tools/perf/pmu-events/arch/x86/broadwellde/bdwde-metrics.json164
-rw-r--r--tools/perf/pmu-events/arch/x86/broadwellde/cache.json389
-rw-r--r--tools/perf/pmu-events/arch/x86/broadwellde/floating-point.json108
-rw-r--r--tools/perf/pmu-events/arch/x86/broadwellde/frontend.json138
-rw-r--r--tools/perf/pmu-events/arch/x86/broadwellde/memory.json9
-rw-r--r--tools/perf/pmu-events/arch/x86/broadwellde/other.json20
-rw-r--r--tools/perf/pmu-events/arch/x86/broadwellde/pipeline.json1156
-rw-r--r--tools/perf/pmu-events/arch/x86/broadwellde/virtual-memory.json150
-rw-r--r--tools/perf/pmu-events/arch/x86/broadwellx/bdx-metrics.json164
-rw-r--r--tools/perf/pmu-events/arch/x86/broadwellx/cache.json383
-rw-r--r--tools/perf/pmu-events/arch/x86/broadwellx/floating-point.json108
-rw-r--r--tools/perf/pmu-events/arch/x86/broadwellx/frontend.json138
-rw-r--r--tools/perf/pmu-events/arch/x86/broadwellx/memory.json40
-rw-r--r--tools/perf/pmu-events/arch/x86/broadwellx/other.json20
-rw-r--r--tools/perf/pmu-events/arch/x86/broadwellx/pipeline.json1156
-rw-r--r--tools/perf/pmu-events/arch/x86/broadwellx/virtual-memory.json150
-rw-r--r--tools/perf/pmu-events/arch/x86/goldmont/cache.json1050
-rw-r--r--tools/perf/pmu-events/arch/x86/goldmont/memory.json280
-rw-r--r--tools/perf/pmu-events/arch/x86/goldmont/other.json54
-rw-r--r--tools/perf/pmu-events/arch/x86/goldmont/pipeline.json506
-rw-r--r--tools/perf/pmu-events/arch/x86/goldmont/virtual-memory.json60
-rw-r--r--tools/perf/pmu-events/arch/x86/goldmontplus/cache.json1453
-rw-r--r--tools/perf/pmu-events/arch/x86/goldmontplus/frontend.json62
-rw-r--r--tools/perf/pmu-events/arch/x86/goldmontplus/memory.json38
-rw-r--r--tools/perf/pmu-events/arch/x86/goldmontplus/other.json98
-rw-r--r--tools/perf/pmu-events/arch/x86/goldmontplus/pipeline.json544
-rw-r--r--tools/perf/pmu-events/arch/x86/goldmontplus/virtual-memory.json218
-rw-r--r--tools/perf/pmu-events/arch/x86/haswell/cache.json365
-rw-r--r--tools/perf/pmu-events/arch/x86/haswell/floating-point.json20
-rw-r--r--tools/perf/pmu-events/arch/x86/haswell/frontend.json132
-rw-r--r--tools/perf/pmu-events/arch/x86/haswell/hsw-metrics.json158
-rw-r--r--tools/perf/pmu-events/arch/x86/haswell/memory.json21
-rw-r--r--tools/perf/pmu-events/arch/x86/haswell/other.json20
-rw-r--r--tools/perf/pmu-events/arch/x86/haswell/pipeline.json981
-rw-r--r--tools/perf/pmu-events/arch/x86/haswell/virtual-memory.json212
-rw-r--r--tools/perf/pmu-events/arch/x86/haswellx/cache.json377
-rw-r--r--tools/perf/pmu-events/arch/x86/haswellx/floating-point.json20
-rw-r--r--tools/perf/pmu-events/arch/x86/haswellx/frontend.json132
-rw-r--r--tools/perf/pmu-events/arch/x86/haswellx/hsx-metrics.json158
-rw-r--r--tools/perf/pmu-events/arch/x86/haswellx/memory.json28
-rw-r--r--tools/perf/pmu-events/arch/x86/haswellx/other.json20
-rw-r--r--tools/perf/pmu-events/arch/x86/haswellx/pipeline.json981
-rw-r--r--tools/perf/pmu-events/arch/x86/haswellx/virtual-memory.json212
-rw-r--r--tools/perf/pmu-events/arch/x86/ivybridge/cache.json243
-rw-r--r--tools/perf/pmu-events/arch/x86/ivybridge/frontend.json122
-rw-r--r--tools/perf/pmu-events/arch/x86/ivybridge/ivb-metrics.json164
-rw-r--r--tools/perf/pmu-events/arch/x86/ivybridge/memory.json24
-rw-r--r--tools/perf/pmu-events/arch/x86/ivybridge/other.json20
-rw-r--r--tools/perf/pmu-events/arch/x86/ivybridge/pipeline.json812
-rw-r--r--tools/perf/pmu-events/arch/x86/ivybridge/virtual-memory.json60
-rw-r--r--tools/perf/pmu-events/arch/x86/ivytown/cache.json236
-rw-r--r--tools/perf/pmu-events/arch/x86/ivytown/frontend.json122
-rw-r--r--tools/perf/pmu-events/arch/x86/ivytown/ivt-metrics.json164
-rw-r--r--tools/perf/pmu-events/arch/x86/ivytown/memory.json24
-rw-r--r--tools/perf/pmu-events/arch/x86/ivytown/other.json20
-rw-r--r--tools/perf/pmu-events/arch/x86/ivytown/pipeline.json812
-rw-r--r--tools/perf/pmu-events/arch/x86/ivytown/virtual-memory.json60
-rw-r--r--tools/perf/pmu-events/arch/x86/jaketown/jkt-metrics.json140
-rw-r--r--tools/perf/pmu-events/arch/x86/mapfile.csv6
-rw-r--r--tools/perf/pmu-events/arch/x86/sandybridge/snb-metrics.json140
-rw-r--r--tools/perf/pmu-events/arch/x86/silvermont/cache.json3
-rw-r--r--tools/perf/pmu-events/arch/x86/skylake/cache.json4180
-rw-r--r--tools/perf/pmu-events/arch/x86/skylake/floating-point.json5
-rw-r--r--tools/perf/pmu-events/arch/x86/skylake/frontend.json232
-rw-r--r--tools/perf/pmu-events/arch/x86/skylake/memory.json2008
-rw-r--r--tools/perf/pmu-events/arch/x86/skylake/other.json40
-rw-r--r--tools/perf/pmu-events/arch/x86/skylake/pipeline.json973
-rw-r--r--tools/perf/pmu-events/arch/x86/skylake/skl-metrics.json164
-rw-r--r--tools/perf/pmu-events/arch/x86/skylake/virtual-memory.json262
-rw-r--r--tools/perf/pmu-events/arch/x86/skylakex/cache.json257
-rw-r--r--tools/perf/pmu-events/arch/x86/skylakex/floating-point.json3
-rw-r--r--tools/perf/pmu-events/arch/x86/skylakex/frontend.json48
-rw-r--r--tools/perf/pmu-events/arch/x86/skylakex/memory.json231
-rw-r--r--tools/perf/pmu-events/arch/x86/skylakex/other.json94
-rw-r--r--tools/perf/pmu-events/arch/x86/skylakex/pipeline.json44
-rw-r--r--tools/perf/pmu-events/arch/x86/skylakex/skx-metrics.json164
-rw-r--r--tools/perf/pmu-events/arch/x86/skylakex/virtual-memory.json42
-rw-r--r--tools/perf/pmu-events/jevents.c63
-rw-r--r--tools/perf/pmu-events/jevents.h2
-rw-r--r--tools/perf/pmu-events/pmu-events.h1
-rw-r--r--tools/perf/scripts/python/bin/mem-phys-addr-record19
-rw-r--r--tools/perf/scripts/python/bin/mem-phys-addr-report3
-rw-r--r--tools/perf/scripts/python/mem-phys-addr.py95
-rw-r--r--tools/perf/tests/attr.c8
-rw-r--r--tools/perf/tests/attr.py6
-rw-r--r--tools/perf/tests/attr/base-record2
-rw-r--r--tools/perf/tests/attr/test-record-group1
-rw-r--r--tools/perf/tests/attr/test-record-group-sampling2
-rw-r--r--tools/perf/tests/attr/test-record-group11
-rw-r--r--tools/perf/tests/attr/test-stat-C01
-rw-r--r--tools/perf/tests/attr/test-stat-basic1
-rw-r--r--tools/perf/tests/attr/test-stat-default4
-rw-r--r--tools/perf/tests/attr/test-stat-detailed-18
-rw-r--r--tools/perf/tests/attr/test-stat-detailed-213
-rw-r--r--tools/perf/tests/attr/test-stat-detailed-313
-rw-r--r--tools/perf/tests/attr/test-stat-group2
-rw-r--r--tools/perf/tests/attr/test-stat-group12
-rw-r--r--tools/perf/tests/attr/test-stat-no-inherit1
-rw-r--r--tools/perf/tests/backward-ring-buffer.c9
-rw-r--r--tools/perf/tests/bp_signal.c2
-rw-r--r--tools/perf/tests/bpf-script-example.c4
-rw-r--r--tools/perf/tests/bpf.c68
-rw-r--r--tools/perf/tests/builtin-test.c11
-rw-r--r--tools/perf/tests/code-reading.c2
-rw-r--r--tools/perf/tests/dwarf-unwind.c1
-rw-r--r--tools/perf/tests/keep-tracking.c2
-rw-r--r--tools/perf/tests/mmap-basic.c2
-rw-r--r--tools/perf/tests/mmap-thread-lookup.c2
-rw-r--r--tools/perf/tests/openat-syscall-tp-fields.c5
-rw-r--r--tools/perf/tests/parse-events.c1
-rw-r--r--tools/perf/tests/perf-record.c2
-rw-r--r--tools/perf/tests/sample-parsing.c2
-rwxr-xr-xtools/perf/tests/shell/trace+probe_libc_inet_pton.sh28
-rwxr-xr-xtools/perf/tests/shell/trace+probe_vfs_getname.sh5
-rw-r--r--tools/perf/tests/sw-clock.c2
-rw-r--r--tools/perf/tests/switch-tracking.c2
-rw-r--r--tools/perf/tests/task-exit.c6
-rw-r--r--tools/perf/tests/thread-map.c2
-rw-r--r--tools/perf/tests/topology.c22
-rw-r--r--tools/perf/trace/beauty/Build3
-rw-r--r--tools/perf/trace/beauty/arch_errno_names.c1
-rwxr-xr-xtools/perf/trace/beauty/arch_errno_names.sh100
-rw-r--r--tools/perf/trace/beauty/beauty.h23
-rw-r--r--tools/perf/trace/beauty/flock.c10
-rw-r--r--tools/perf/trace/beauty/futex_val3.c18
-rw-r--r--tools/perf/trace/beauty/kcmp.c44
-rwxr-xr-xtools/perf/trace/beauty/kcmp_type.sh10
-rwxr-xr-xtools/perf/trace/beauty/madvise_behavior.sh10
-rw-r--r--tools/perf/trace/beauty/mmap.c41
-rw-r--r--tools/perf/trace/beauty/prctl.c82
-rwxr-xr-xtools/perf/trace/beauty/prctl_option.sh17
-rw-r--r--tools/perf/ui/browsers/annotate.c399
-rw-r--r--tools/perf/ui/browsers/hists.c218
-rw-r--r--tools/perf/ui/browsers/hists.h3
-rw-r--r--tools/perf/ui/gtk/annotate.c25
-rw-r--r--tools/perf/ui/progress.c6
-rw-r--r--tools/perf/ui/progress.h12
-rw-r--r--tools/perf/ui/stdio/hist.c77
-rw-r--r--tools/perf/ui/tui/progress.c32
-rw-r--r--tools/perf/util/Build13
-rw-r--r--tools/perf/util/annotate.c678
-rw-r--r--tools/perf/util/annotate.h76
-rw-r--r--tools/perf/util/arm-spe-pkt-decoder.c462
-rw-r--r--tools/perf/util/arm-spe-pkt-decoder.h43
-rw-r--r--tools/perf/util/arm-spe.c231
-rw-r--r--tools/perf/util/arm-spe.h31
-rw-r--r--tools/perf/util/auxtrace.c12
-rw-r--r--tools/perf/util/auxtrace.h5
-rw-r--r--tools/perf/util/bpf-loader.c4
-rw-r--r--tools/perf/util/callchain.c189
-rw-r--r--tools/perf/util/callchain.h8
-rw-r--r--tools/perf/util/cgroup.c3
-rw-r--r--tools/perf/util/comm.c18
-rw-r--r--tools/perf/util/config.c5
-rw-r--r--tools/perf/util/cs-etm-decoder/Build1
-rw-r--r--tools/perf/util/cs-etm-decoder/cs-etm-decoder.c513
-rw-r--r--tools/perf/util/cs-etm-decoder/cs-etm-decoder.h105
-rw-r--r--tools/perf/util/cs-etm.c1023
-rw-r--r--tools/perf/util/cs-etm.h18
-rw-r--r--tools/perf/util/data-convert-bt.c12
-rw-r--r--tools/perf/util/data.c105
-rw-r--r--tools/perf/util/data.h38
-rw-r--r--tools/perf/util/debug.c31
-rw-r--r--tools/perf/util/dso.c22
-rw-r--r--tools/perf/util/dso.h6
-rw-r--r--tools/perf/util/env.c47
-rw-r--r--tools/perf/util/env.h2
-rw-r--r--tools/perf/util/event.c170
-rw-r--r--tools/perf/util/event.h7
-rw-r--r--tools/perf/util/evlist.c349
-rw-r--r--tools/perf/util/evlist.h96
-rw-r--r--tools/perf/util/evsel.c273
-rw-r--r--tools/perf/util/evsel.h31
-rw-r--r--tools/perf/util/evsel_fprintf.c37
-rwxr-xr-xtools/perf/util/generate-cmdlist.sh2
-rw-r--r--tools/perf/util/header.c150
-rw-r--r--tools/perf/util/header.h9
-rw-r--r--tools/perf/util/hist.c7
-rw-r--r--tools/perf/util/hist.h6
-rw-r--r--tools/perf/util/intel-bts.c12
-rw-r--r--tools/perf/util/intel-pt-decoder/Build24
-rw-r--r--tools/perf/util/intel-pt-decoder/inat.h10
-rw-r--r--tools/perf/util/intel-pt-decoder/x86-opcode-map.txt15
-rw-r--r--tools/perf/util/intel-pt.c17
-rw-r--r--tools/perf/util/jit.h2
-rw-r--r--tools/perf/util/jitdump.c10
-rw-r--r--tools/perf/util/machine.c233
-rw-r--r--tools/perf/util/machine.h33
-rw-r--r--tools/perf/util/map.c36
-rw-r--r--tools/perf/util/map.h3
-rw-r--r--tools/perf/util/metricgroup.c492
-rw-r--r--tools/perf/util/metricgroup.h31
-rw-r--r--tools/perf/util/mmap.c348
-rw-r--r--tools/perf/util/mmap.h101
-rw-r--r--tools/perf/util/namespaces.c1
-rw-r--r--tools/perf/util/namespaces.h5
-rw-r--r--tools/perf/util/ordered-events.c3
-rw-r--r--tools/perf/util/ordered-events.h2
-rw-r--r--tools/perf/util/parse-events.c34
-rw-r--r--tools/perf/util/parse-events.h6
-rw-r--r--tools/perf/util/parse-events.l8
-rw-r--r--tools/perf/util/path.c14
-rw-r--r--tools/perf/util/path.h3
-rw-r--r--tools/perf/util/pmu.c137
-rw-r--r--tools/perf/util/pmu.h2
-rw-r--r--tools/perf/util/print_binary.c30
-rw-r--r--tools/perf/util/print_binary.h18
-rw-r--r--tools/perf/util/probe-event.c85
-rw-r--r--tools/perf/util/probe-file.c1
-rw-r--r--tools/perf/util/python-ext-sources2
-rw-r--r--tools/perf/util/python.c2
-rw-r--r--tools/perf/util/rb_resort.h5
-rw-r--r--tools/perf/util/rblist.c19
-rw-r--r--tools/perf/util/rblist.h1
-rw-r--r--tools/perf/util/rwsem.c32
-rw-r--r--tools/perf/util/rwsem.h19
-rw-r--r--tools/perf/util/scripting-engines/trace-event-python.c3
-rw-r--r--tools/perf/util/session.c100
-rw-r--r--tools/perf/util/session.h8
-rw-r--r--tools/perf/util/sort.c26
-rw-r--r--tools/perf/util/sort.h1
-rw-r--r--tools/perf/util/srcline.c305
-rw-r--r--tools/perf/util/srcline.h31
-rw-r--r--tools/perf/util/stat-shadow.c530
-rw-r--r--tools/perf/util/stat.c31
-rw-r--r--tools/perf/util/stat.h65
-rw-r--r--tools/perf/util/string.c46
-rw-r--r--tools/perf/util/string2.h2
-rw-r--r--tools/perf/util/symbol.c14
-rw-r--r--tools/perf/util/symbol.h3
-rw-r--r--tools/perf/util/syscalltbl.c4
-rw-r--r--tools/perf/util/target.h7
-rw-r--r--tools/perf/util/thread.c57
-rw-r--r--tools/perf/util/thread.h3
-rw-r--r--tools/perf/util/thread_map.c27
-rw-r--r--tools/perf/util/thread_map.h3
-rw-r--r--tools/perf/util/time-utils.c301
-rw-r--r--tools/perf/util/time-utils.h8
-rw-r--r--tools/perf/util/tool.h1
-rw-r--r--tools/perf/util/top.h1
-rw-r--r--tools/perf/util/trace-event-info.c1
-rw-r--r--tools/perf/util/trace-event-read.c1
-rw-r--r--tools/perf/util/unwind-libunwind-local.c9
-rw-r--r--tools/perf/util/unwind-libunwind.c4
-rw-r--r--tools/perf/util/util.c42
-rw-r--r--tools/perf/util/util.h17
-rw-r--r--tools/perf/util/vdso.c4
-rw-r--r--tools/perf/util/zlib.c1
358 files changed, 25654 insertions, 16469 deletions
diff --git a/tools/perf/.gitignore b/tools/perf/.gitignore
index 643cc4ba6872..3e5135dded16 100644
--- a/tools/perf/.gitignore
+++ b/tools/perf/.gitignore
@@ -31,5 +31,6 @@ config.mak.autogen
31.config-detected 31.config-detected
32util/intel-pt-decoder/inat-tables.c 32util/intel-pt-decoder/inat-tables.c
33arch/*/include/generated/ 33arch/*/include/generated/
34trace/beauty/generated/
34pmu-events/pmu-events.c 35pmu-events/pmu-events.c
35pmu-events/jevents 36pmu-events/jevents
diff --git a/tools/perf/Build b/tools/perf/Build
index b48ca40fccf9..e5232d567611 100644
--- a/tools/perf/Build
+++ b/tools/perf/Build
@@ -25,7 +25,7 @@ perf-y += builtin-data.o
25perf-y += builtin-version.o 25perf-y += builtin-version.o
26perf-y += builtin-c2c.o 26perf-y += builtin-c2c.o
27 27
28perf-$(CONFIG_AUDIT) += builtin-trace.o 28perf-$(CONFIG_TRACE) += builtin-trace.o
29perf-$(CONFIG_LIBELF) += builtin-probe.o 29perf-$(CONFIG_LIBELF) += builtin-probe.o
30 30
31perf-y += bench/ 31perf-y += bench/
@@ -50,6 +50,6 @@ libperf-y += util/
50libperf-y += arch/ 50libperf-y += arch/
51libperf-y += ui/ 51libperf-y += ui/
52libperf-y += scripts/ 52libperf-y += scripts/
53libperf-$(CONFIG_AUDIT) += trace/beauty/ 53libperf-$(CONFIG_TRACE) += trace/beauty/
54 54
55gtk-y += ui/gtk/ 55gtk-y += ui/gtk/
diff --git a/tools/perf/Documentation/perf-buildid-cache.txt b/tools/perf/Documentation/perf-buildid-cache.txt
index 84681007f80f..73c2650bd0db 100644
--- a/tools/perf/Documentation/perf-buildid-cache.txt
+++ b/tools/perf/Documentation/perf-buildid-cache.txt
@@ -24,6 +24,9 @@ OPTIONS
24-a:: 24-a::
25--add=:: 25--add=::
26 Add specified file to the cache. 26 Add specified file to the cache.
27-f::
28--force::
29 Don't complain, do it.
27-k:: 30-k::
28--kcore:: 31--kcore::
29 Add specified kcore file to the cache. For the current host that is 32 Add specified kcore file to the cache. For the current host that is
diff --git a/tools/perf/Documentation/perf-data.txt b/tools/perf/Documentation/perf-data.txt
index f0796a47dfa3..90bb4aabe4f8 100644
--- a/tools/perf/Documentation/perf-data.txt
+++ b/tools/perf/Documentation/perf-data.txt
@@ -30,6 +30,10 @@ OPTIONS for 'convert'
30-i:: 30-i::
31 Specify input perf data file path. 31 Specify input perf data file path.
32 32
33-f::
34--force::
35 Don't complain, do it.
36
33-v:: 37-v::
34--verbose:: 38--verbose::
35 Be more verbose (show counter open errors, etc). 39 Be more verbose (show counter open errors, etc).
diff --git a/tools/perf/Documentation/perf-evlist.txt b/tools/perf/Documentation/perf-evlist.txt
index 6f7200fb85cf..c0a66400a960 100644
--- a/tools/perf/Documentation/perf-evlist.txt
+++ b/tools/perf/Documentation/perf-evlist.txt
@@ -20,6 +20,10 @@ OPTIONS
20--input=:: 20--input=::
21 Input file name. (default: perf.data unless stdin is a fifo) 21 Input file name. (default: perf.data unless stdin is a fifo)
22 22
23-f::
24--force::
25 Don't complain, do it.
26
23-F:: 27-F::
24--freq=:: 28--freq=::
25 Show just the sample frequency used for each event. 29 Show just the sample frequency used for each event.
diff --git a/tools/perf/Documentation/perf-inject.txt b/tools/perf/Documentation/perf-inject.txt
index 87b2588d1cbd..a64d6588470e 100644
--- a/tools/perf/Documentation/perf-inject.txt
+++ b/tools/perf/Documentation/perf-inject.txt
@@ -60,6 +60,10 @@ include::itrace.txt[]
60 found in the jitdumps files captured in the input perf.data file. Use this option 60 found in the jitdumps files captured in the input perf.data file. Use this option
61 if you are monitoring environment using JIT runtimes, such as Java, DART or V8. 61 if you are monitoring environment using JIT runtimes, such as Java, DART or V8.
62 62
63-f::
64--force::
65 Don't complain, do it.
66
63SEE ALSO 67SEE ALSO
64-------- 68--------
65linkperf:perf-record[1], linkperf:perf-report[1], linkperf:perf-archive[1] 69linkperf:perf-record[1], linkperf:perf-report[1], linkperf:perf-archive[1]
diff --git a/tools/perf/Documentation/perf-list.txt b/tools/perf/Documentation/perf-list.txt
index f709de54707b..e2a897ae3596 100644
--- a/tools/perf/Documentation/perf-list.txt
+++ b/tools/perf/Documentation/perf-list.txt
@@ -8,7 +8,8 @@ perf-list - List all symbolic event types
8SYNOPSIS 8SYNOPSIS
9-------- 9--------
10[verse] 10[verse]
11'perf list' [--no-desc] [--long-desc] [hw|sw|cache|tracepoint|pmu|sdt|event_glob] 11'perf list' [--no-desc] [--long-desc]
12 [hw|sw|cache|tracepoint|pmu|sdt|metric|metricgroup|event_glob]
12 13
13DESCRIPTION 14DESCRIPTION
14----------- 15-----------
@@ -47,6 +48,8 @@ counted. The following modifiers exist:
47 P - use maximum detected precise level 48 P - use maximum detected precise level
48 S - read sample value (PERF_SAMPLE_READ) 49 S - read sample value (PERF_SAMPLE_READ)
49 D - pin the event to the PMU 50 D - pin the event to the PMU
51 W - group is weak and will fallback to non-group if not schedulable,
52 only supported in 'perf stat' for now.
50 53
51The 'p' modifier can be used for specifying how precise the instruction 54The 'p' modifier can be used for specifying how precise the instruction
52address should be. The 'p' modifier can be specified multiple times: 55address should be. The 'p' modifier can be specified multiple times:
@@ -201,7 +204,7 @@ For example Intel Core CPUs typically have four generic performance counters
201for the core, plus three fixed counters for instructions, cycles and 204for the core, plus three fixed counters for instructions, cycles and
202ref-cycles. Some special events have restrictions on which counter they 205ref-cycles. Some special events have restrictions on which counter they
203can schedule, and may not support multiple instances in a single group. 206can schedule, and may not support multiple instances in a single group.
204When too many events are specified in the group none of them will not 207When too many events are specified in the group some of them will not
205be measured. 208be measured.
206 209
207Globally pinned events can limit the number of counters available for 210Globally pinned events can limit the number of counters available for
@@ -246,6 +249,10 @@ To limit the list use:
246 249
247. 'sdt' to list all Statically Defined Tracepoint events. 250. 'sdt' to list all Statically Defined Tracepoint events.
248 251
252. 'metric' to list metrics
253
254. 'metricgroup' to list metricgroups with metrics.
255
249. If none of the above is matched, it will apply the supplied glob to all 256. If none of the above is matched, it will apply the supplied glob to all
250 events, printing the ones that match. 257 events, printing the ones that match.
251 258
diff --git a/tools/perf/Documentation/perf-lock.txt b/tools/perf/Documentation/perf-lock.txt
index ab25be28c9dc..74d774592196 100644
--- a/tools/perf/Documentation/perf-lock.txt
+++ b/tools/perf/Documentation/perf-lock.txt
@@ -42,6 +42,10 @@ COMMON OPTIONS
42--dump-raw-trace:: 42--dump-raw-trace::
43 Dump raw trace in ASCII. 43 Dump raw trace in ASCII.
44 44
45-f::
46--force::
47 Don't complan, do it.
48
45REPORT OPTIONS 49REPORT OPTIONS
46-------------- 50--------------
47 51
diff --git a/tools/perf/Documentation/perf-probe.txt b/tools/perf/Documentation/perf-probe.txt
index d7e4869905f1..b6866a05edd2 100644
--- a/tools/perf/Documentation/perf-probe.txt
+++ b/tools/perf/Documentation/perf-probe.txt
@@ -170,7 +170,7 @@ Probe points are defined by following syntax.
170 or, 170 or,
171 sdt_PROVIDER:SDTEVENT 171 sdt_PROVIDER:SDTEVENT
172 172
173'EVENT' specifies the name of new event, if omitted, it will be set the name of the probed function. You can also specify a group name by 'GROUP', if omitted, set 'probe' is used for kprobe and 'probe_<bin>' is used for uprobe. 173'EVENT' specifies the name of new event, if omitted, it will be set the name of the probed function, and for return probes, a "\_\_return" suffix is automatically added to the function name. You can also specify a group name by 'GROUP', if omitted, set 'probe' is used for kprobe and 'probe_<bin>' is used for uprobe.
174Note that using existing group name can conflict with other events. Especially, using the group name reserved for kernel modules can hide embedded events in the 174Note that using existing group name can conflict with other events. Especially, using the group name reserved for kernel modules can hide embedded events in the
175modules. 175modules.
176'FUNC' specifies a probed function name, and it may have one of the following options; '+OFFS' is the offset from function entry address in bytes, ':RLN' is the relative-line number from function entry line, and '%return' means that it probes function return. And ';PTN' means lazy matching pattern (see LAZY MATCHING). Note that ';PTN' must be the end of the probe point definition. In addition, '@SRC' specifies a source file which has that function. 176'FUNC' specifies a probed function name, and it may have one of the following options; '+OFFS' is the offset from function entry address in bytes, ':RLN' is the relative-line number from function entry line, and '%return' means that it probes function return. And ';PTN' means lazy matching pattern (see LAZY MATCHING). Note that ';PTN' must be the end of the probe point definition. In addition, '@SRC' specifies a source file which has that function.
@@ -182,6 +182,14 @@ Note that before using the SDT event, the target binary (on which SDT events are
182For details of the SDT, see below. 182For details of the SDT, see below.
183https://sourceware.org/gdb/onlinedocs/gdb/Static-Probe-Points.html 183https://sourceware.org/gdb/onlinedocs/gdb/Static-Probe-Points.html
184 184
185ESCAPED CHARACTER
186-----------------
187
188In the probe syntax, '=', '@', '+', ':' and ';' are treated as a special character. You can use a backslash ('\') to escape the special characters.
189This is useful if you need to probe on a specific versioned symbols, like @GLIBC_... suffixes, or also you need to specify a source file which includes the special characters.
190Note that usually single backslash is consumed by shell, so you might need to pass double backslash (\\) or wrapping with single quotes (\'AAA\@BBB').
191See EXAMPLES how it is used.
192
185PROBE ARGUMENT 193PROBE ARGUMENT
186-------------- 194--------------
187Each probe argument follows below syntax. 195Each probe argument follows below syntax.
@@ -277,6 +285,14 @@ Add a USDT probe to a target process running in a different mount namespace
277 285
278 ./perf probe --target-ns <target pid> -x /usr/lib/jvm/java-1.8.0-openjdk-1.8.0.121-0.b13.el7_3.x86_64/jre/lib/amd64/server/libjvm.so %sdt_hotspot:thread__sleep__end 286 ./perf probe --target-ns <target pid> -x /usr/lib/jvm/java-1.8.0-openjdk-1.8.0.121-0.b13.el7_3.x86_64/jre/lib/amd64/server/libjvm.so %sdt_hotspot:thread__sleep__end
279 287
288Add a probe on specific versioned symbol by backslash escape
289
290 ./perf probe -x /lib64/libc-2.25.so 'malloc_get_state\@GLIBC_2.2.5'
291
292Add a probe in a source file using special characters by backslash escape
293
294 ./perf probe -x /opt/test/a.out 'foo\+bar.c:4'
295
280 296
281SEE ALSO 297SEE ALSO
282-------- 298--------
diff --git a/tools/perf/Documentation/perf-record.txt b/tools/perf/Documentation/perf-record.txt
index 63526f4416ea..3eea6de35a38 100644
--- a/tools/perf/Documentation/perf-record.txt
+++ b/tools/perf/Documentation/perf-record.txt
@@ -377,6 +377,8 @@ symbolic names, e.g. on x86, ax, si. To list the available registers use
377--intr-regs=\?. To name registers, pass a comma separated list such as 377--intr-regs=\?. To name registers, pass a comma separated list such as
378--intr-regs=ax,bx. The list of register is architecture dependent. 378--intr-regs=ax,bx. The list of register is architecture dependent.
379 379
380--user-regs::
381Capture user registers at sample time. Same arguments as -I.
380 382
381--running-time:: 383--running-time::
382Record running and enabled time for read events (:S) 384Record running and enabled time for read events (:S)
@@ -428,6 +430,9 @@ Configure all used events to run in user space.
428--timestamp-filename 430--timestamp-filename
429Append timestamp to output file name. 431Append timestamp to output file name.
430 432
433--timestamp-boundary::
434Record timestamp boundary (time of first/last samples).
435
431--switch-output[=mode]:: 436--switch-output[=mode]::
432Generate multiple perf.data files, timestamp prefixed, switching to a new one 437Generate multiple perf.data files, timestamp prefixed, switching to a new one
433based on 'mode' value: 438based on 'mode' value:
diff --git a/tools/perf/Documentation/perf-report.txt b/tools/perf/Documentation/perf-report.txt
index 383a98d992ed..907e505b6309 100644
--- a/tools/perf/Documentation/perf-report.txt
+++ b/tools/perf/Documentation/perf-report.txt
@@ -402,6 +402,26 @@ OPTIONS
402 stop time is not given (i.e, time string is 'x.y,') then analysis goes 402 stop time is not given (i.e, time string is 'x.y,') then analysis goes
403 to end of file. 403 to end of file.
404 404
405 Also support time percent with multiple time range. Time string is
406 'a%/n,b%/m,...' or 'a%-b%,c%-%d,...'.
407
408 For example:
409 Select the second 10% time slice:
410
411 perf report --time 10%/2
412
413 Select from 0% to 10% time slice:
414
415 perf report --time 0%-10%
416
417 Select the first and second 10% time slices:
418
419 perf report --time 10%/1,10%/2
420
421 Select from 0% to 10% and 30% to 40% slices:
422
423 perf report --time 0%-10%,30%-40%
424
405--itrace:: 425--itrace::
406 Options for decoding instruction tracing data. The options are: 426 Options for decoding instruction tracing data. The options are:
407 427
@@ -434,10 +454,26 @@ include::itrace.txt[]
434 454
435--inline:: 455--inline::
436 If a callgraph address belongs to an inlined function, the inline stack 456 If a callgraph address belongs to an inlined function, the inline stack
437 will be printed. Each entry is function name or file/line. 457 will be printed. Each entry is function name or file/line. Enabled by
458 default, disable with --no-inline.
459
460--mmaps::
461 Show --tasks output plus mmap information in a format similar to
462 /proc/<PID>/maps.
463
464 Please note that not all mmaps are stored, options affecting which ones
465 are include 'perf record --data', for instance.
466
467--stats::
468 Display overall events statistics without any further processing.
469 (like the one at the end of the perf report -D command)
470
471--tasks::
472 Display monitored tasks stored in perf data. Displaying pid/tid/ppid
473 plus the command string aligned to distinguish parent and child tasks.
438 474
439include::callchain-overhead-calculation.txt[] 475include::callchain-overhead-calculation.txt[]
440 476
441SEE ALSO 477SEE ALSO
442-------- 478--------
443linkperf:perf-stat[1], linkperf:perf-annotate[1] 479linkperf:perf-stat[1], linkperf:perf-annotate[1], linkperf:perf-record[1]
diff --git a/tools/perf/Documentation/perf-sched.txt b/tools/perf/Documentation/perf-sched.txt
index a092a2499e8f..c7e50f263887 100644
--- a/tools/perf/Documentation/perf-sched.txt
+++ b/tools/perf/Documentation/perf-sched.txt
@@ -74,6 +74,10 @@ OPTIONS
74--dump-raw-trace=:: 74--dump-raw-trace=::
75 Display verbose dump of the sched data. 75 Display verbose dump of the sched data.
76 76
77-f::
78--force::
79 Don't complain, do it.
80
77OPTIONS for 'perf sched map' 81OPTIONS for 'perf sched map'
78---------------------------- 82----------------------------
79 83
@@ -106,6 +110,14 @@ OPTIONS for 'perf sched timehist'
106--max-stack:: 110--max-stack::
107 Maximum number of functions to display in backtrace, default 5. 111 Maximum number of functions to display in backtrace, default 5.
108 112
113-p=::
114--pid=::
115 Only show events for given process ID (comma separated list).
116
117-t=::
118--tid=::
119 Only show events for given thread ID (comma separated list).
120
109-s:: 121-s::
110--summary:: 122--summary::
111 Show only a summary of scheduling by thread with min, max, and average 123 Show only a summary of scheduling by thread with min, max, and average
diff --git a/tools/perf/Documentation/perf-script.txt b/tools/perf/Documentation/perf-script.txt
index 18dfcfa38454..7730c1d2b5d3 100644
--- a/tools/perf/Documentation/perf-script.txt
+++ b/tools/perf/Documentation/perf-script.txt
@@ -116,8 +116,8 @@ OPTIONS
116--fields:: 116--fields::
117 Comma separated list of fields to print. Options are: 117 Comma separated list of fields to print. Options are:
118 comm, tid, pid, time, cpu, event, trace, ip, sym, dso, addr, symoff, 118 comm, tid, pid, time, cpu, event, trace, ip, sym, dso, addr, symoff,
119 srcline, period, iregs, brstack, brstacksym, flags, bpf-output, brstackinsn, brstackoff, 119 srcline, period, iregs, uregs, brstack, brstacksym, flags, bpf-output, brstackinsn,
120 callindent, insn, insnlen, synth, phys_addr. 120 brstackoff, callindent, insn, insnlen, synth, phys_addr, metric, misc.
121 Field list can be prepended with the type, trace, sw or hw, 121 Field list can be prepended with the type, trace, sw or hw,
122 to indicate to which event type the field list applies. 122 to indicate to which event type the field list applies.
123 e.g., -F sw:comm,tid,time,ip,sym and -F trace:time,cpu,trace 123 e.g., -F sw:comm,tid,time,ip,sym and -F trace:time,cpu,trace
@@ -217,6 +217,32 @@ OPTIONS
217 217
218 The brstackoff field will print an offset into a specific dso/binary. 218 The brstackoff field will print an offset into a specific dso/binary.
219 219
220 With the metric option perf script can compute metrics for
221 sampling periods, similar to perf stat. This requires
222 specifying a group with multiple metrics with the :S option
223 for perf record. perf will sample on the first event, and
224 compute metrics for all the events in the group. Please note
225 that the metric computed is averaged over the whole sampling
226 period, not just for the sample point.
227
228 For sample events it's possible to display misc field with -F +misc option,
229 following letters are displayed for each bit:
230
231 PERF_RECORD_MISC_KERNEL K
232 PERF_RECORD_MISC_USER U
233 PERF_RECORD_MISC_HYPERVISOR H
234 PERF_RECORD_MISC_GUEST_KERNEL G
235 PERF_RECORD_MISC_GUEST_USER g
236 PERF_RECORD_MISC_MMAP_DATA* M
237 PERF_RECORD_MISC_COMM_EXEC E
238 PERF_RECORD_MISC_SWITCH_OUT S
239
240 $ perf script -F +misc ...
241 sched-messaging 1414 K 28690.636582: 4590 cycles ...
242 sched-messaging 1407 U 28690.636600: 325620 cycles ...
243 sched-messaging 1414 K 28690.636608: 19473 cycles ...
244 misc field ___________/
245
220-k:: 246-k::
221--vmlinux=<file>:: 247--vmlinux=<file>::
222 vmlinux pathname 248 vmlinux pathname
@@ -274,6 +300,9 @@ OPTIONS
274 Display context switch events i.e. events of type PERF_RECORD_SWITCH or 300 Display context switch events i.e. events of type PERF_RECORD_SWITCH or
275 PERF_RECORD_SWITCH_CPU_WIDE. 301 PERF_RECORD_SWITCH_CPU_WIDE.
276 302
303--show-lost-events
304 Display lost events i.e. events of type PERF_RECORD_LOST.
305
277--demangle:: 306--demangle::
278 Demangle symbol names to human readable form. It's enabled by default, 307 Demangle symbol names to human readable form. It's enabled by default,
279 disable with --no-demangle. 308 disable with --no-demangle.
@@ -321,13 +350,34 @@ include::itrace.txt[]
321 stop time is not given (i.e, time string is 'x.y,') then analysis goes 350 stop time is not given (i.e, time string is 'x.y,') then analysis goes
322 to end of file. 351 to end of file.
323 352
353 Also support time percent with multipe time range. Time string is
354 'a%/n,b%/m,...' or 'a%-b%,c%-%d,...'.
355
356 For example:
357 Select the second 10% time slice:
358 perf script --time 10%/2
359
360 Select from 0% to 10% time slice:
361 perf script --time 0%-10%
362
363 Select the first and second 10% time slices:
364 perf script --time 10%/1,10%/2
365
366 Select from 0% to 10% and 30% to 40% slices:
367 perf script --time 0%-10%,30%-40%
368
324--max-blocks:: 369--max-blocks::
325 Set the maximum number of program blocks to print with brstackasm for 370 Set the maximum number of program blocks to print with brstackasm for
326 each sample. 371 each sample.
327 372
373--per-event-dump::
374 Create per event files with a "perf.data.EVENT.dump" name instead of
375 printing to stdout, useful, for instance, for generating flamegraphs.
376
328--inline:: 377--inline::
329 If a callgraph address belongs to an inlined function, the inline stack 378 If a callgraph address belongs to an inlined function, the inline stack
330 will be printed. Each entry has function name and file/line. 379 will be printed. Each entry has function name and file/line. Enabled by
380 default, disable with --no-inline.
331 381
332SEE ALSO 382SEE ALSO
333-------- 383--------
diff --git a/tools/perf/Documentation/perf-stat.txt b/tools/perf/Documentation/perf-stat.txt
index c37d61682dfb..823fce7674bb 100644
--- a/tools/perf/Documentation/perf-stat.txt
+++ b/tools/perf/Documentation/perf-stat.txt
@@ -199,6 +199,13 @@ Aggregate counts per processor socket for system-wide mode measurements.
199--per-core:: 199--per-core::
200Aggregate counts per physical processor for system-wide mode measurements. 200Aggregate counts per physical processor for system-wide mode measurements.
201 201
202-M::
203--metrics::
204Print metrics or metricgroups specified in a comma separated list.
205For a group all metrics from the group are added.
206The events from the metrics are automatically measured.
207See perf list output for the possble metrics and metricgroups.
208
202-A:: 209-A::
203--no-aggr:: 210--no-aggr::
204Do not aggregate counts across all monitored CPUs. 211Do not aggregate counts across all monitored CPUs.
diff --git a/tools/perf/Documentation/perf-timechart.txt b/tools/perf/Documentation/perf-timechart.txt
index df98d1c82688..ef0c7565bd5c 100644
--- a/tools/perf/Documentation/perf-timechart.txt
+++ b/tools/perf/Documentation/perf-timechart.txt
@@ -50,7 +50,9 @@ TIMECHART OPTIONS
50-p:: 50-p::
51--process:: 51--process::
52 Select the processes to display, by name or PID 52 Select the processes to display, by name or PID
53 53-f::
54--force::
55 Don't complain, do it.
54--symfs=<directory>:: 56--symfs=<directory>::
55 Look for files with symbols relative to this directory. 57 Look for files with symbols relative to this directory.
56-n:: 58-n::
diff --git a/tools/perf/Documentation/perf-top.txt b/tools/perf/Documentation/perf-top.txt
index d864ea6fd367..8a32cc77bead 100644
--- a/tools/perf/Documentation/perf-top.txt
+++ b/tools/perf/Documentation/perf-top.txt
@@ -240,6 +240,9 @@ Default is to monitor all CPUS.
240--force:: 240--force::
241 Don't do ownership validation. 241 Don't do ownership validation.
242 242
243--num-thread-synthesize::
244 The number of threads to run when synthesizing events for existing processes.
245 By default, the number of threads equals to the number of online CPUs.
243 246
244INTERACTIVE PROMPTING KEYS 247INTERACTIVE PROMPTING KEYS
245-------------------------- 248--------------------------
@@ -265,6 +268,12 @@ INTERACTIVE PROMPTING KEYS
265[S]:: 268[S]::
266 Stop annotation, return to full profile display. 269 Stop annotation, return to full profile display.
267 270
271[K]::
272 Hide kernel symbols.
273
274[U]::
275 Hide user symbols.
276
268[z]:: 277[z]::
269 Toggle event count zeroing across display updates. 278 Toggle event count zeroing across display updates.
270 279
diff --git a/tools/perf/Documentation/perf-trace.txt b/tools/perf/Documentation/perf-trace.txt
index d53bea6bd571..33a88e984e66 100644
--- a/tools/perf/Documentation/perf-trace.txt
+++ b/tools/perf/Documentation/perf-trace.txt
@@ -86,18 +86,18 @@ comma-separated list with no space: 0,1. Ranges of CPUs are specified with -: 0-
86In per-thread mode with inheritance mode on (default), Events are captured only when 86In per-thread mode with inheritance mode on (default), Events are captured only when
87the thread executes on the designated CPUs. Default is to monitor all CPUs. 87the thread executes on the designated CPUs. Default is to monitor all CPUs.
88 88
89--duration: 89--duration::
90 Show only events that had a duration greater than N.M ms. 90 Show only events that had a duration greater than N.M ms.
91 91
92--sched: 92--sched::
93 Accrue thread runtime and provide a summary at the end of the session. 93 Accrue thread runtime and provide a summary at the end of the session.
94 94
95-i 95-i::
96--input 96--input::
97 Process events from a given perf data file. 97 Process events from a given perf data file.
98 98
99-T 99-T::
100--time 100--time::
101 Print full timestamp rather time relative to first sample. 101 Print full timestamp rather time relative to first sample.
102 102
103--comm:: 103--comm::
@@ -117,6 +117,10 @@ the thread executes on the designated CPUs. Default is to monitor all CPUs.
117 Show tool stats such as number of times fd->pathname was discovered thru 117 Show tool stats such as number of times fd->pathname was discovered thru
118 hooking the open syscall return + vfs_getname or via reading /proc/pid/fd, etc. 118 hooking the open syscall return + vfs_getname or via reading /proc/pid/fd, etc.
119 119
120-f::
121--force::
122 Don't complain, do it.
123
120-F=[all|min|maj]:: 124-F=[all|min|maj]::
121--pf=[all|min|maj]:: 125--pf=[all|min|maj]::
122 Trace pagefaults. Optionally, you can specify whether you want minor, 126 Trace pagefaults. Optionally, you can specify whether you want minor,
@@ -159,6 +163,10 @@ the thread executes on the designated CPUs. Default is to monitor all CPUs.
159 Implies '--call-graph dwarf' when --call-graph not present on the 163 Implies '--call-graph dwarf' when --call-graph not present on the
160 command line, on systems where DWARF unwinding was built in. 164 command line, on systems where DWARF unwinding was built in.
161 165
166--print-sample::
167 Print the PERF_RECORD_SAMPLE PERF_SAMPLE_ info for the
168 raw_syscalls:sys_{enter,exit} tracepoints, for debugging.
169
162--proc-map-timeout:: 170--proc-map-timeout::
163 When processing pre-existing threads /proc/XXX/mmap, it may take a long time, 171 When processing pre-existing threads /proc/XXX/mmap, it may take a long time,
164 because the file may be huge. A time out is needed in such cases. 172 because the file may be huge. A time out is needed in such cases.
diff --git a/tools/perf/Documentation/perf.data-file-format.txt b/tools/perf/Documentation/perf.data-file-format.txt
index e90c59c6d815..f7d85e89a98a 100644
--- a/tools/perf/Documentation/perf.data-file-format.txt
+++ b/tools/perf/Documentation/perf.data-file-format.txt
@@ -238,6 +238,33 @@ struct auxtrace_index {
238 struct auxtrace_index_entry entries[PERF_AUXTRACE_INDEX_ENTRY_COUNT]; 238 struct auxtrace_index_entry entries[PERF_AUXTRACE_INDEX_ENTRY_COUNT];
239}; 239};
240 240
241 HEADER_STAT = 19,
242
243This is merely a flag signifying that the data section contains data
244recorded from perf stat record.
245
246 HEADER_CACHE = 20,
247
248Description of the cache hierarchy. Based on the Linux sysfs format
249in /sys/devices/system/cpu/cpu*/cache/
250
251 u32 version Currently always 1
252 u32 number_of_cache_levels
253
254struct {
255 u32 level;
256 u32 line_size;
257 u32 sets;
258 u32 ways;
259 struct perf_header_string type;
260 struct perf_header_string size;
261 struct perf_header_string map;
262}[number_of_cache_levels];
263
264 HEADER_SAMPLE_TIME = 21,
265
266Two uint64_t for the time of first sample and the time of last sample.
267
241 other bits are reserved and should ignored for now 268 other bits are reserved and should ignored for now
242 HEADER_FEAT_BITS = 256, 269 HEADER_FEAT_BITS = 256,
243 270
diff --git a/tools/perf/Documentation/tips.txt b/tools/perf/Documentation/tips.txt
index db0ca3063eae..849599f39c5e 100644
--- a/tools/perf/Documentation/tips.txt
+++ b/tools/perf/Documentation/tips.txt
@@ -32,3 +32,5 @@ Order by the overhead of source file name and line number: perf report -s srclin
32System-wide collection from all CPUs: perf record -a 32System-wide collection from all CPUs: perf record -a
33Show current config key-value pairs: perf config --list 33Show current config key-value pairs: perf config --list
34Show user configuration overrides: perf config --user --list 34Show user configuration overrides: perf config --user --list
35To add Node.js USDT(User-Level Statically Defined Tracing): perf buildid-cache --add `which node`
36To report cacheline events from previous recording: perf c2c report
diff --git a/tools/perf/Makefile.config b/tools/perf/Makefile.config
index 63f534a0902f..0dfdaa9fa81e 100644
--- a/tools/perf/Makefile.config
+++ b/tools/perf/Makefile.config
@@ -22,6 +22,7 @@ include $(srctree)/tools/scripts/Makefile.arch
22$(call detected_var,SRCARCH) 22$(call detected_var,SRCARCH)
23 23
24NO_PERF_REGS := 1 24NO_PERF_REGS := 1
25NO_SYSCALL_TABLE := 1
25 26
26# Additional ARCH settings for ppc 27# Additional ARCH settings for ppc
27ifeq ($(SRCARCH),powerpc) 28ifeq ($(SRCARCH),powerpc)
@@ -33,7 +34,8 @@ endif
33ifeq ($(SRCARCH),x86) 34ifeq ($(SRCARCH),x86)
34 $(call detected,CONFIG_X86) 35 $(call detected,CONFIG_X86)
35 ifeq (${IS_64_BIT}, 1) 36 ifeq (${IS_64_BIT}, 1)
36 CFLAGS += -DHAVE_ARCH_X86_64_SUPPORT -DHAVE_SYSCALL_TABLE -I$(OUTPUT)arch/x86/include/generated 37 NO_SYSCALL_TABLE := 0
38 CFLAGS += -DHAVE_ARCH_X86_64_SUPPORT -I$(OUTPUT)arch/x86/include/generated
37 ARCH_INCLUDE = ../../arch/x86/lib/memcpy_64.S ../../arch/x86/lib/memset_64.S 39 ARCH_INCLUDE = ../../arch/x86/lib/memcpy_64.S ../../arch/x86/lib/memset_64.S
38 LIBUNWIND_LIBS = -lunwind-x86_64 -lunwind -llzma 40 LIBUNWIND_LIBS = -lunwind-x86_64 -lunwind -llzma
39 $(call detected,CONFIG_X86_64) 41 $(call detected,CONFIG_X86_64)
@@ -53,15 +55,25 @@ ifeq ($(SRCARCH),arm64)
53 LIBUNWIND_LIBS = -lunwind -lunwind-aarch64 55 LIBUNWIND_LIBS = -lunwind -lunwind-aarch64
54endif 56endif
55 57
58ifeq ($(ARCH),s390)
59 NO_PERF_REGS := 0
60 NO_SYSCALL_TABLE := 0
61 CFLAGS += -fPIC -I$(OUTPUT)arch/s390/include/generated
62endif
63
56ifeq ($(NO_PERF_REGS),0) 64ifeq ($(NO_PERF_REGS),0)
57 $(call detected,CONFIG_PERF_REGS) 65 $(call detected,CONFIG_PERF_REGS)
58endif 66endif
59 67
68ifneq ($(NO_SYSCALL_TABLE),1)
69 CFLAGS += -DHAVE_SYSCALL_TABLE
70endif
71
60# So far there's only x86 and arm libdw unwind support merged in perf. 72# So far there's only x86 and arm libdw unwind support merged in perf.
61# Disable it on all other architectures in case libdw unwind 73# Disable it on all other architectures in case libdw unwind
62# support is detected in system. Add supported architectures 74# support is detected in system. Add supported architectures
63# to the check. 75# to the check.
64ifneq ($(SRCARCH),$(filter $(SRCARCH),x86 arm powerpc)) 76ifneq ($(SRCARCH),$(filter $(SRCARCH),x86 arm powerpc s390))
65 NO_LIBDW_DWARF_UNWIND := 1 77 NO_LIBDW_DWARF_UNWIND := 1
66endif 78endif
67 79
@@ -93,6 +105,16 @@ FEATURE_CHECK_LDFLAGS-libunwind = $(LIBUNWIND_LDFLAGS) $(LIBUNWIND_LIBS)
93FEATURE_CHECK_CFLAGS-libunwind-debug-frame = $(LIBUNWIND_CFLAGS) 105FEATURE_CHECK_CFLAGS-libunwind-debug-frame = $(LIBUNWIND_CFLAGS)
94FEATURE_CHECK_LDFLAGS-libunwind-debug-frame = $(LIBUNWIND_LDFLAGS) $(LIBUNWIND_LIBS) 106FEATURE_CHECK_LDFLAGS-libunwind-debug-frame = $(LIBUNWIND_LDFLAGS) $(LIBUNWIND_LIBS)
95 107
108ifdef CSINCLUDES
109 LIBOPENCSD_CFLAGS := -I$(CSINCLUDES)
110endif
111OPENCSDLIBS := -lopencsd_c_api -lopencsd
112ifdef CSLIBS
113 LIBOPENCSD_LDFLAGS := -L$(CSLIBS)
114endif
115FEATURE_CHECK_CFLAGS-libopencsd := $(LIBOPENCSD_CFLAGS)
116FEATURE_CHECK_LDFLAGS-libopencsd := $(LIBOPENCSD_LDFLAGS) $(OPENCSDLIBS)
117
96ifeq ($(NO_PERF_REGS),0) 118ifeq ($(NO_PERF_REGS),0)
97 CFLAGS += -DHAVE_PERF_REGS_SUPPORT 119 CFLAGS += -DHAVE_PERF_REGS_SUPPORT
98endif 120endif
@@ -184,9 +206,7 @@ ifdef PYTHON_CONFIG
184 PYTHON_EMBED_LDFLAGS := $(call strip-libs,$(PYTHON_EMBED_LDOPTS)) 206 PYTHON_EMBED_LDFLAGS := $(call strip-libs,$(PYTHON_EMBED_LDOPTS))
185 PYTHON_EMBED_LIBADD := $(call grep-libs,$(PYTHON_EMBED_LDOPTS)) -lutil 207 PYTHON_EMBED_LIBADD := $(call grep-libs,$(PYTHON_EMBED_LDOPTS)) -lutil
186 PYTHON_EMBED_CCOPTS := $(shell $(PYTHON_CONFIG_SQ) --cflags 2>/dev/null) 208 PYTHON_EMBED_CCOPTS := $(shell $(PYTHON_CONFIG_SQ) --cflags 2>/dev/null)
187 ifeq ($(CC_NO_CLANG), 1) 209 PYTHON_EMBED_CCOPTS := $(filter-out -specs=%,$(PYTHON_EMBED_CCOPTS))
188 PYTHON_EMBED_CCOPTS := $(filter-out -specs=%,$(PYTHON_EMBED_CCOPTS))
189 endif
190 FLAGS_PYTHON_EMBED := $(PYTHON_EMBED_CCOPTS) $(PYTHON_EMBED_LDOPTS) 210 FLAGS_PYTHON_EMBED := $(PYTHON_EMBED_CCOPTS) $(PYTHON_EMBED_LDOPTS)
191endif 211endif
192 212
@@ -263,6 +283,10 @@ ifeq ($(feature-pthread-attr-setaffinity-np), 1)
263 CFLAGS += -DHAVE_PTHREAD_ATTR_SETAFFINITY_NP 283 CFLAGS += -DHAVE_PTHREAD_ATTR_SETAFFINITY_NP
264endif 284endif
265 285
286ifeq ($(feature-pthread-barrier), 1)
287 CFLAGS += -DHAVE_PTHREAD_BARRIER
288endif
289
266ifndef NO_BIONIC 290ifndef NO_BIONIC
267 $(call feature_check,bionic) 291 $(call feature_check,bionic)
268 ifeq ($(feature-bionic), 1) 292 ifeq ($(feature-bionic), 1)
@@ -339,6 +363,21 @@ ifeq ($(feature-setns), 1)
339 $(call detected,CONFIG_SETNS) 363 $(call detected,CONFIG_SETNS)
340endif 364endif
341 365
366ifndef NO_CORESIGHT
367 ifeq ($(feature-libopencsd), 1)
368 CFLAGS += -DHAVE_CSTRACE_SUPPORT $(LIBOPENCSD_CFLAGS)
369 LDFLAGS += $(LIBOPENCSD_LDFLAGS)
370 EXTLIBS += $(OPENCSDLIBS)
371 $(call detected,CONFIG_LIBOPENCSD)
372 ifdef CSTRACE_RAW
373 CFLAGS += -DCS_DEBUG_RAW
374 ifeq (${CSTRACE_RAW}, packed)
375 CFLAGS += -DCS_RAW_PACKED
376 endif
377 endif
378 endif
379endif
380
342ifndef NO_LIBELF 381ifndef NO_LIBELF
343 CFLAGS += -DHAVE_LIBELF_SUPPORT 382 CFLAGS += -DHAVE_LIBELF_SUPPORT
344 EXTLIBS += -lelf 383 EXTLIBS += -lelf
@@ -517,14 +556,18 @@ ifndef NO_LIBUNWIND
517 EXTLIBS += $(EXTLIBS_LIBUNWIND) 556 EXTLIBS += $(EXTLIBS_LIBUNWIND)
518endif 557endif
519 558
520ifndef NO_LIBAUDIT 559ifeq ($(NO_SYSCALL_TABLE),0)
521 ifneq ($(feature-libaudit), 1) 560 $(call detected,CONFIG_TRACE)
522 msg := $(warning No libaudit.h found, disables 'trace' tool, please install audit-libs-devel or libaudit-dev); 561else
523 NO_LIBAUDIT := 1 562 ifndef NO_LIBAUDIT
524 else 563 ifneq ($(feature-libaudit), 1)
525 CFLAGS += -DHAVE_LIBAUDIT_SUPPORT 564 msg := $(warning No libaudit.h found, disables 'trace' tool, please install audit-libs-devel or libaudit-dev);
526 EXTLIBS += -laudit 565 NO_LIBAUDIT := 1
527 $(call detected,CONFIG_AUDIT) 566 else
567 CFLAGS += -DHAVE_LIBAUDIT_SUPPORT
568 EXTLIBS += -laudit
569 $(call detected,CONFIG_TRACE)
570 endif
528 endif 571 endif
529endif 572endif
530 573
@@ -572,14 +615,15 @@ ifndef NO_GTK2
572 endif 615 endif
573endif 616endif
574 617
575
576ifdef NO_LIBPERL 618ifdef NO_LIBPERL
577 CFLAGS += -DNO_LIBPERL 619 CFLAGS += -DNO_LIBPERL
578else 620else
579 PERL_EMBED_LDOPTS = $(shell perl -MExtUtils::Embed -e ldopts 2>/dev/null) 621 PERL_EMBED_LDOPTS = $(shell perl -MExtUtils::Embed -e ldopts 2>/dev/null)
580 PERL_EMBED_LDFLAGS = $(call strip-libs,$(PERL_EMBED_LDOPTS)) 622 PERL_EMBED_LDFLAGS = $(call strip-libs,$(PERL_EMBED_LDOPTS))
581 PERL_EMBED_LIBADD = $(call grep-libs,$(PERL_EMBED_LDOPTS)) 623 PERL_EMBED_LIBADD = $(call grep-libs,$(PERL_EMBED_LDOPTS))
582 PERL_EMBED_CCOPTS = `perl -MExtUtils::Embed -e ccopts 2>/dev/null` 624 PERL_EMBED_CCOPTS = $(shell perl -MExtUtils::Embed -e ccopts 2>/dev/null)
625 PERL_EMBED_CCOPTS := $(filter-out -specs=%,$(PERL_EMBED_CCOPTS))
626 PERL_EMBED_LDOPTS := $(filter-out -specs=%,$(PERL_EMBED_LDOPTS))
583 FLAGS_PERL_EMBED=$(PERL_EMBED_CCOPTS) $(PERL_EMBED_LDOPTS) 627 FLAGS_PERL_EMBED=$(PERL_EMBED_CCOPTS) $(PERL_EMBED_LDOPTS)
584 628
585 ifneq ($(feature-libperl), 1) 629 ifneq ($(feature-libperl), 1)
@@ -765,7 +809,7 @@ else
765 NO_PERF_READ_VDSOX32 := 1 809 NO_PERF_READ_VDSOX32 := 1
766endif 810endif
767 811
768ifdef LIBBABELTRACE 812ifndef NO_LIBBABELTRACE
769 $(call feature_check,libbabeltrace) 813 $(call feature_check,libbabeltrace)
770 ifeq ($(feature-libbabeltrace), 1) 814 ifeq ($(feature-libbabeltrace), 1)
771 CFLAGS += -DHAVE_LIBBABELTRACE_SUPPORT $(LIBBABELTRACE_CFLAGS) 815 CFLAGS += -DHAVE_LIBBABELTRACE_SUPPORT $(LIBBABELTRACE_CFLAGS)
@@ -932,6 +976,10 @@ define print_var_code
932endef 976endef
933 977
934ifeq ($(VF),1) 978ifeq ($(VF),1)
979 # Display EXTRA features which are detected manualy
980 # from here with feature_check call and thus cannot
981 # be partof global state output.
982 $(foreach feat,$(FEATURE_TESTS_EXTRA),$(call feature_print_status,$(feat),))
935 $(call print_var,prefix) 983 $(call print_var,prefix)
936 $(call print_var,bindir) 984 $(call print_var,bindir)
937 $(call print_var,libdir) 985 $(call print_var,libdir)
diff --git a/tools/perf/Makefile.perf b/tools/perf/Makefile.perf
index 91ef44bfaf3e..012328038594 100644
--- a/tools/perf/Makefile.perf
+++ b/tools/perf/Makefile.perf
@@ -77,7 +77,7 @@ include ../scripts/utilities.mak
77# 77#
78# Define NO_ZLIB if you do not want to support compressed kernel modules 78# Define NO_ZLIB if you do not want to support compressed kernel modules
79# 79#
80# Define LIBBABELTRACE if you DO want libbabeltrace support 80# Define NO_LIBBABELTRACE if you do not want libbabeltrace support
81# for CTF data format. 81# for CTF data format.
82# 82#
83# Define NO_LZMA if you do not want to support compressed (xz) kernel modules 83# Define NO_LZMA if you do not want to support compressed (xz) kernel modules
@@ -98,6 +98,8 @@ include ../scripts/utilities.mak
98# When selected, pass LLVM_CONFIG=/path/to/llvm-config to `make' if 98# When selected, pass LLVM_CONFIG=/path/to/llvm-config to `make' if
99# llvm-config is not in $PATH. 99# llvm-config is not in $PATH.
100 100
101# Define NO_CORESIGHT if you do not want support for CoreSight trace decoding.
102
101# As per kernel Makefile, avoid funny character set dependencies 103# As per kernel Makefile, avoid funny character set dependencies
102unexport LC_ALL 104unexport LC_ALL
103LC_COLLATE=C 105LC_COLLATE=C
@@ -144,12 +146,6 @@ define allow-override
144 $(eval $(1) = $(2))) 146 $(eval $(1) = $(2)))
145endef 147endef
146 148
147# Allow setting CC and AR and LD, or setting CROSS_COMPILE as a prefix.
148$(call allow-override,CC,$(CROSS_COMPILE)gcc)
149$(call allow-override,AR,$(CROSS_COMPILE)ar)
150$(call allow-override,LD,$(CROSS_COMPILE)ld)
151$(call allow-override,CXX,$(CROSS_COMPILE)g++)
152
153LD += $(EXTRA_LDFLAGS) 149LD += $(EXTRA_LDFLAGS)
154 150
155HOSTCC ?= gcc 151HOSTCC ?= gcc
@@ -173,7 +169,7 @@ AWK = awk
173# non-config cases 169# non-config cases
174config := 1 170config := 1
175 171
176NON_CONFIG_TARGETS := clean TAGS tags cscope help install-doc install-man install-html install-info install-pdf doc man html info pdf 172NON_CONFIG_TARGETS := clean python-clean TAGS tags cscope help install-doc install-man install-html install-info install-pdf doc man html info pdf
177 173
178ifdef MAKECMDGOALS 174ifdef MAKECMDGOALS
179ifeq ($(filter-out $(NON_CONFIG_TARGETS),$(MAKECMDGOALS)),) 175ifeq ($(filter-out $(NON_CONFIG_TARGETS),$(MAKECMDGOALS)),)
@@ -420,6 +416,13 @@ sndrv_pcm_ioctl_tbl := $(srctree)/tools/perf/trace/beauty/sndrv_pcm_ioctl.sh
420$(sndrv_pcm_ioctl_array): $(sndrv_pcm_hdr_dir)/asound.h $(sndrv_pcm_ioctl_tbl) 416$(sndrv_pcm_ioctl_array): $(sndrv_pcm_hdr_dir)/asound.h $(sndrv_pcm_ioctl_tbl)
421 $(Q)$(SHELL) '$(sndrv_pcm_ioctl_tbl)' $(sndrv_pcm_hdr_dir) > $@ 417 $(Q)$(SHELL) '$(sndrv_pcm_ioctl_tbl)' $(sndrv_pcm_hdr_dir) > $@
422 418
419kcmp_type_array := $(beauty_outdir)/kcmp_type_array.c
420kcmp_hdr_dir := $(srctree)/tools/include/uapi/linux/
421kcmp_type_tbl := $(srctree)/tools/perf/trace/beauty/kcmp_type.sh
422
423$(kcmp_type_array): $(kcmp_hdr_dir)/kcmp.h $(kcmp_type_tbl)
424 $(Q)$(SHELL) '$(kcmp_type_tbl)' $(kcmp_hdr_dir) > $@
425
423kvm_ioctl_array := $(beauty_ioctl_outdir)/kvm_ioctl_array.c 426kvm_ioctl_array := $(beauty_ioctl_outdir)/kvm_ioctl_array.c
424kvm_hdr_dir := $(srctree)/tools/include/uapi/linux 427kvm_hdr_dir := $(srctree)/tools/include/uapi/linux
425kvm_ioctl_tbl := $(srctree)/tools/perf/trace/beauty/kvm_ioctl.sh 428kvm_ioctl_tbl := $(srctree)/tools/perf/trace/beauty/kvm_ioctl.sh
@@ -441,6 +444,27 @@ perf_ioctl_tbl := $(srctree)/tools/perf/trace/beauty/perf_ioctl.sh
441$(perf_ioctl_array): $(perf_hdr_dir)/perf_event.h $(perf_ioctl_tbl) 444$(perf_ioctl_array): $(perf_hdr_dir)/perf_event.h $(perf_ioctl_tbl)
442 $(Q)$(SHELL) '$(perf_ioctl_tbl)' $(perf_hdr_dir) > $@ 445 $(Q)$(SHELL) '$(perf_ioctl_tbl)' $(perf_hdr_dir) > $@
443 446
447madvise_behavior_array := $(beauty_outdir)/madvise_behavior_array.c
448madvise_hdr_dir := $(srctree)/tools/include/uapi/asm-generic/
449madvise_behavior_tbl := $(srctree)/tools/perf/trace/beauty/madvise_behavior.sh
450
451$(madvise_behavior_array): $(madvise_hdr_dir)/mman-common.h $(madvise_behavior_tbl)
452 $(Q)$(SHELL) '$(madvise_behavior_tbl)' $(madvise_hdr_dir) > $@
453
454prctl_option_array := $(beauty_outdir)/prctl_option_array.c
455prctl_hdr_dir := $(srctree)/tools/include/uapi/linux/
456prctl_option_tbl := $(srctree)/tools/perf/trace/beauty/prctl_option.sh
457
458$(prctl_option_array): $(prctl_hdr_dir)/prctl.h $(prctl_option_tbl)
459 $(Q)$(SHELL) '$(prctl_option_tbl)' $(prctl_hdr_dir) > $@
460
461arch_errno_name_array := $(beauty_outdir)/arch_errno_name_array.c
462arch_errno_hdr_dir := $(srctree)/tools
463arch_errno_tbl := $(srctree)/tools/perf/trace/beauty/arch_errno_names.sh
464
465$(arch_errno_name_array): $(arch_errno_tbl)
466 $(Q)$(SHELL) '$(arch_errno_tbl)' $(CC) $(arch_errno_hdr_dir) > $@
467
444all: shell_compatibility_test $(ALL_PROGRAMS) $(LANG_BINDINGS) $(OTHER_PROGRAMS) 468all: shell_compatibility_test $(ALL_PROGRAMS) $(LANG_BINDINGS) $(OTHER_PROGRAMS)
445 469
446$(OUTPUT)python/perf.so: $(PYTHON_EXT_SRCS) $(PYTHON_EXT_DEPS) $(LIBTRACEEVENT_DYNAMIC_LIST) 470$(OUTPUT)python/perf.so: $(PYTHON_EXT_SRCS) $(PYTHON_EXT_DEPS) $(LIBTRACEEVENT_DYNAMIC_LIST)
@@ -539,9 +563,13 @@ prepare: $(OUTPUT)PERF-VERSION-FILE $(OUTPUT)common-cmds.h archheaders $(drm_ioc
539 $(pkey_alloc_access_rights_array) \ 563 $(pkey_alloc_access_rights_array) \
540 $(sndrv_pcm_ioctl_array) \ 564 $(sndrv_pcm_ioctl_array) \
541 $(sndrv_ctl_ioctl_array) \ 565 $(sndrv_ctl_ioctl_array) \
566 $(kcmp_type_array) \
542 $(kvm_ioctl_array) \ 567 $(kvm_ioctl_array) \
543 $(vhost_virtio_ioctl_array) \ 568 $(vhost_virtio_ioctl_array) \
544 $(perf_ioctl_array) 569 $(madvise_behavior_array) \
570 $(perf_ioctl_array) \
571 $(prctl_option_array) \
572 $(arch_errno_name_array)
545 573
546$(OUTPUT)%.o: %.c prepare FORCE 574$(OUTPUT)%.o: %.c prepare FORCE
547 $(Q)$(MAKE) -f $(srctree)/tools/build/Makefile.build dir=$(build-dir) $@ 575 $(Q)$(MAKE) -f $(srctree)/tools/build/Makefile.build dir=$(build-dir) $@
@@ -802,7 +830,10 @@ config-clean:
802 $(call QUIET_CLEAN, config) 830 $(call QUIET_CLEAN, config)
803 $(Q)$(MAKE) -C $(srctree)/tools/build/feature/ $(if $(OUTPUT),OUTPUT=$(OUTPUT)feature/,) clean >/dev/null 831 $(Q)$(MAKE) -C $(srctree)/tools/build/feature/ $(if $(OUTPUT),OUTPUT=$(OUTPUT)feature/,) clean >/dev/null
804 832
805clean:: $(LIBTRACEEVENT)-clean $(LIBAPI)-clean $(LIBBPF)-clean $(LIBSUBCMD)-clean config-clean fixdep-clean 833python-clean:
834 $(python-clean)
835
836clean:: $(LIBTRACEEVENT)-clean $(LIBAPI)-clean $(LIBBPF)-clean $(LIBSUBCMD)-clean config-clean fixdep-clean python-clean
806 $(call QUIET_CLEAN, core-objs) $(RM) $(LIB_FILE) $(OUTPUT)perf-archive $(OUTPUT)perf-with-kcore $(LANG_BINDINGS) 837 $(call QUIET_CLEAN, core-objs) $(RM) $(LIB_FILE) $(OUTPUT)perf-archive $(OUTPUT)perf-with-kcore $(LANG_BINDINGS)
807 $(Q)find $(if $(OUTPUT),$(OUTPUT),.) -name '*.o' -delete -o -name '\.*.cmd' -delete -o -name '\.*.d' -delete 838 $(Q)find $(if $(OUTPUT),$(OUTPUT),.) -name '*.o' -delete -o -name '\.*.cmd' -delete -o -name '\.*.d' -delete
808 $(Q)$(RM) $(OUTPUT).config-detected 839 $(Q)$(RM) $(OUTPUT).config-detected
@@ -811,15 +842,18 @@ clean:: $(LIBTRACEEVENT)-clean $(LIBAPI)-clean $(LIBBPF)-clean $(LIBSUBCMD)-clea
811 $(OUTPUT)util/intel-pt-decoder/inat-tables.c \ 842 $(OUTPUT)util/intel-pt-decoder/inat-tables.c \
812 $(OUTPUT)tests/llvm-src-{base,kbuild,prologue,relocation}.c \ 843 $(OUTPUT)tests/llvm-src-{base,kbuild,prologue,relocation}.c \
813 $(OUTPUT)pmu-events/pmu-events.c \ 844 $(OUTPUT)pmu-events/pmu-events.c \
845 $(OUTPUT)$(madvise_behavior_array) \
814 $(OUTPUT)$(drm_ioctl_array) \ 846 $(OUTPUT)$(drm_ioctl_array) \
815 $(OUTPUT)$(pkey_alloc_access_rights_array) \ 847 $(OUTPUT)$(pkey_alloc_access_rights_array) \
816 $(OUTPUT)$(sndrv_ctl_ioctl_array) \ 848 $(OUTPUT)$(sndrv_ctl_ioctl_array) \
817 $(OUTPUT)$(sndrv_pcm_ioctl_array) \ 849 $(OUTPUT)$(sndrv_pcm_ioctl_array) \
818 $(OUTPUT)$(kvm_ioctl_array) \ 850 $(OUTPUT)$(kvm_ioctl_array) \
851 $(OUTPUT)$(kcmp_type_array) \
819 $(OUTPUT)$(vhost_virtio_ioctl_array) \ 852 $(OUTPUT)$(vhost_virtio_ioctl_array) \
820 $(OUTPUT)$(perf_ioctl_array) 853 $(OUTPUT)$(perf_ioctl_array) \
854 $(OUTPUT)$(prctl_option_array) \
855 $(OUTPUT)$(arch_errno_name_array)
821 $(QUIET_SUBDIR0)Documentation $(QUIET_SUBDIR1) clean 856 $(QUIET_SUBDIR0)Documentation $(QUIET_SUBDIR1) clean
822 $(python-clean)
823 857
824# 858#
825# To provide FEATURE-DUMP into $(FEATURE_DUMP_COPY) 859# To provide FEATURE-DUMP into $(FEATURE_DUMP_COPY)
diff --git a/tools/perf/arch/arm/annotate/instructions.c b/tools/perf/arch/arm/annotate/instructions.c
index b39b16395aac..f64516d5b23e 100644
--- a/tools/perf/arch/arm/annotate/instructions.c
+++ b/tools/perf/arch/arm/annotate/instructions.c
@@ -1,4 +1,5 @@
1// SPDX-License-Identifier: GPL-2.0 1// SPDX-License-Identifier: GPL-2.0
2#include <linux/compiler.h>
2#include <sys/types.h> 3#include <sys/types.h>
3#include <regex.h> 4#include <regex.h>
4 5
@@ -24,7 +25,7 @@ static struct ins_ops *arm__associate_instruction_ops(struct arch *arch, const c
24 return ops; 25 return ops;
25} 26}
26 27
27static int arm__annotate_init(struct arch *arch) 28static int arm__annotate_init(struct arch *arch, char *cpuid __maybe_unused)
28{ 29{
29 struct arm_annotate *arm; 30 struct arm_annotate *arm;
30 int err; 31 int err;
diff --git a/tools/perf/arch/arm/util/auxtrace.c b/tools/perf/arch/arm/util/auxtrace.c
index 8edf2cb71564..2323581b157d 100644
--- a/tools/perf/arch/arm/util/auxtrace.c
+++ b/tools/perf/arch/arm/util/auxtrace.c
@@ -22,6 +22,42 @@
22#include "../../util/evlist.h" 22#include "../../util/evlist.h"
23#include "../../util/pmu.h" 23#include "../../util/pmu.h"
24#include "cs-etm.h" 24#include "cs-etm.h"
25#include "arm-spe.h"
26
27static struct perf_pmu **find_all_arm_spe_pmus(int *nr_spes, int *err)
28{
29 struct perf_pmu **arm_spe_pmus = NULL;
30 int ret, i, nr_cpus = sysconf(_SC_NPROCESSORS_CONF);
31 /* arm_spe_xxxxxxxxx\0 */
32 char arm_spe_pmu_name[sizeof(ARM_SPE_PMU_NAME) + 10];
33
34 arm_spe_pmus = zalloc(sizeof(struct perf_pmu *) * nr_cpus);
35 if (!arm_spe_pmus) {
36 pr_err("spes alloc failed\n");
37 *err = -ENOMEM;
38 return NULL;
39 }
40
41 for (i = 0; i < nr_cpus; i++) {
42 ret = sprintf(arm_spe_pmu_name, "%s%d", ARM_SPE_PMU_NAME, i);
43 if (ret < 0) {
44 pr_err("sprintf failed\n");
45 *err = -ENOMEM;
46 return NULL;
47 }
48
49 arm_spe_pmus[*nr_spes] = perf_pmu__find(arm_spe_pmu_name);
50 if (arm_spe_pmus[*nr_spes]) {
51 pr_debug2("%s %d: arm_spe_pmu %d type %d name %s\n",
52 __func__, __LINE__, *nr_spes,
53 arm_spe_pmus[*nr_spes]->type,
54 arm_spe_pmus[*nr_spes]->name);
55 (*nr_spes)++;
56 }
57 }
58
59 return arm_spe_pmus;
60}
25 61
26struct auxtrace_record 62struct auxtrace_record
27*auxtrace_record__init(struct perf_evlist *evlist, int *err) 63*auxtrace_record__init(struct perf_evlist *evlist, int *err)
@@ -29,22 +65,51 @@ struct auxtrace_record
29 struct perf_pmu *cs_etm_pmu; 65 struct perf_pmu *cs_etm_pmu;
30 struct perf_evsel *evsel; 66 struct perf_evsel *evsel;
31 bool found_etm = false; 67 bool found_etm = false;
68 bool found_spe = false;
69 static struct perf_pmu **arm_spe_pmus = NULL;
70 static int nr_spes = 0;
71 int i;
72
73 if (!evlist)
74 return NULL;
32 75
33 cs_etm_pmu = perf_pmu__find(CORESIGHT_ETM_PMU_NAME); 76 cs_etm_pmu = perf_pmu__find(CORESIGHT_ETM_PMU_NAME);
34 77
35 if (evlist) { 78 if (!arm_spe_pmus)
36 evlist__for_each_entry(evlist, evsel) { 79 arm_spe_pmus = find_all_arm_spe_pmus(&nr_spes, err);
37 if (cs_etm_pmu && 80
38 evsel->attr.type == cs_etm_pmu->type) 81 evlist__for_each_entry(evlist, evsel) {
39 found_etm = true; 82 if (cs_etm_pmu &&
83 evsel->attr.type == cs_etm_pmu->type)
84 found_etm = true;
85
86 if (!nr_spes)
87 continue;
88
89 for (i = 0; i < nr_spes; i++) {
90 if (evsel->attr.type == arm_spe_pmus[i]->type) {
91 found_spe = true;
92 break;
93 }
40 } 94 }
41 } 95 }
42 96
97 if (found_etm && found_spe) {
98 pr_err("Concurrent ARM Coresight ETM and SPE operation not currently supported\n");
99 *err = -EOPNOTSUPP;
100 return NULL;
101 }
102
43 if (found_etm) 103 if (found_etm)
44 return cs_etm_record_init(err); 104 return cs_etm_record_init(err);
45 105
106#if defined(__aarch64__)
107 if (found_spe)
108 return arm_spe_recording_init(err, arm_spe_pmus[i]);
109#endif
110
46 /* 111 /*
47 * Clear 'err' even if we haven't found a cs_etm event - that way perf 112 * Clear 'err' even if we haven't found an event - that way perf
48 * record can still be used even if tracers aren't present. The NULL 113 * record can still be used even if tracers aren't present. The NULL
49 * return value will take care of telling the infrastructure HW tracing 114 * return value will take care of telling the infrastructure HW tracing
50 * isn't available. 115 * isn't available.
diff --git a/tools/perf/arch/arm/util/pmu.c b/tools/perf/arch/arm/util/pmu.c
index 98d67399a0d6..ac4dffc807b8 100644
--- a/tools/perf/arch/arm/util/pmu.c
+++ b/tools/perf/arch/arm/util/pmu.c
@@ -20,6 +20,7 @@
20#include <linux/perf_event.h> 20#include <linux/perf_event.h>
21 21
22#include "cs-etm.h" 22#include "cs-etm.h"
23#include "arm-spe.h"
23#include "../../util/pmu.h" 24#include "../../util/pmu.h"
24 25
25struct perf_event_attr 26struct perf_event_attr
@@ -30,7 +31,12 @@ struct perf_event_attr
30 /* add ETM default config here */ 31 /* add ETM default config here */
31 pmu->selectable = true; 32 pmu->selectable = true;
32 pmu->set_drv_config = cs_etm_set_drv_config; 33 pmu->set_drv_config = cs_etm_set_drv_config;
34#if defined(__aarch64__)
35 } else if (strstarts(pmu->name, ARM_SPE_PMU_NAME)) {
36 return arm_spe_pmu_default_config(pmu);
37#endif
33 } 38 }
39
34#endif 40#endif
35 return NULL; 41 return NULL;
36} 42}
diff --git a/tools/perf/arch/arm64/annotate/instructions.c b/tools/perf/arch/arm64/annotate/instructions.c
index 9a3e0523e2c9..6688977e4ac7 100644
--- a/tools/perf/arch/arm64/annotate/instructions.c
+++ b/tools/perf/arch/arm64/annotate/instructions.c
@@ -1,4 +1,5 @@
1// SPDX-License-Identifier: GPL-2.0 1// SPDX-License-Identifier: GPL-2.0
2#include <linux/compiler.h>
2#include <sys/types.h> 3#include <sys/types.h>
3#include <regex.h> 4#include <regex.h>
4 5
@@ -26,7 +27,7 @@ static struct ins_ops *arm64__associate_instruction_ops(struct arch *arch, const
26 return ops; 27 return ops;
27} 28}
28 29
29static int arm64__annotate_init(struct arch *arch) 30static int arm64__annotate_init(struct arch *arch, char *cpuid __maybe_unused)
30{ 31{
31 struct arm64_annotate *arm; 32 struct arm64_annotate *arm;
32 int err; 33 int err;
diff --git a/tools/perf/arch/arm64/util/Build b/tools/perf/arch/arm64/util/Build
index cef6fb38d17e..c0b8dfef98ba 100644
--- a/tools/perf/arch/arm64/util/Build
+++ b/tools/perf/arch/arm64/util/Build
@@ -1,6 +1,9 @@
1libperf-y += header.o
2libperf-y += sym-handling.o
1libperf-$(CONFIG_DWARF) += dwarf-regs.o 3libperf-$(CONFIG_DWARF) += dwarf-regs.o
2libperf-$(CONFIG_LOCAL_LIBUNWIND) += unwind-libunwind.o 4libperf-$(CONFIG_LOCAL_LIBUNWIND) += unwind-libunwind.o
3 5
4libperf-$(CONFIG_AUXTRACE) += ../../arm/util/pmu.o \ 6libperf-$(CONFIG_AUXTRACE) += ../../arm/util/pmu.o \
5 ../../arm/util/auxtrace.o \ 7 ../../arm/util/auxtrace.o \
6 ../../arm/util/cs-etm.o 8 ../../arm/util/cs-etm.o \
9 arm-spe.o
diff --git a/tools/perf/arch/arm64/util/arm-spe.c b/tools/perf/arch/arm64/util/arm-spe.c
new file mode 100644
index 000000000000..1120e39c1b00
--- /dev/null
+++ b/tools/perf/arch/arm64/util/arm-spe.c
@@ -0,0 +1,225 @@
1// SPDX-License-Identifier: GPL-2.0
2/*
3 * Arm Statistical Profiling Extensions (SPE) support
4 * Copyright (c) 2017-2018, Arm Ltd.
5 */
6
7#include <linux/kernel.h>
8#include <linux/types.h>
9#include <linux/bitops.h>
10#include <linux/log2.h>
11#include <time.h>
12
13#include "../../util/cpumap.h"
14#include "../../util/evsel.h"
15#include "../../util/evlist.h"
16#include "../../util/session.h"
17#include "../../util/util.h"
18#include "../../util/pmu.h"
19#include "../../util/debug.h"
20#include "../../util/auxtrace.h"
21#include "../../util/arm-spe.h"
22
23#define KiB(x) ((x) * 1024)
24#define MiB(x) ((x) * 1024 * 1024)
25
26struct arm_spe_recording {
27 struct auxtrace_record itr;
28 struct perf_pmu *arm_spe_pmu;
29 struct perf_evlist *evlist;
30};
31
32static size_t
33arm_spe_info_priv_size(struct auxtrace_record *itr __maybe_unused,
34 struct perf_evlist *evlist __maybe_unused)
35{
36 return ARM_SPE_AUXTRACE_PRIV_SIZE;
37}
38
39static int arm_spe_info_fill(struct auxtrace_record *itr,
40 struct perf_session *session,
41 struct auxtrace_info_event *auxtrace_info,
42 size_t priv_size)
43{
44 struct arm_spe_recording *sper =
45 container_of(itr, struct arm_spe_recording, itr);
46 struct perf_pmu *arm_spe_pmu = sper->arm_spe_pmu;
47
48 if (priv_size != ARM_SPE_AUXTRACE_PRIV_SIZE)
49 return -EINVAL;
50
51 if (!session->evlist->nr_mmaps)
52 return -EINVAL;
53
54 auxtrace_info->type = PERF_AUXTRACE_ARM_SPE;
55 auxtrace_info->priv[ARM_SPE_PMU_TYPE] = arm_spe_pmu->type;
56
57 return 0;
58}
59
60static int arm_spe_recording_options(struct auxtrace_record *itr,
61 struct perf_evlist *evlist,
62 struct record_opts *opts)
63{
64 struct arm_spe_recording *sper =
65 container_of(itr, struct arm_spe_recording, itr);
66 struct perf_pmu *arm_spe_pmu = sper->arm_spe_pmu;
67 struct perf_evsel *evsel, *arm_spe_evsel = NULL;
68 bool privileged = geteuid() == 0 || perf_event_paranoid() < 0;
69 struct perf_evsel *tracking_evsel;
70 int err;
71
72 sper->evlist = evlist;
73
74 evlist__for_each_entry(evlist, evsel) {
75 if (evsel->attr.type == arm_spe_pmu->type) {
76 if (arm_spe_evsel) {
77 pr_err("There may be only one " ARM_SPE_PMU_NAME "x event\n");
78 return -EINVAL;
79 }
80 evsel->attr.freq = 0;
81 evsel->attr.sample_period = 1;
82 arm_spe_evsel = evsel;
83 opts->full_auxtrace = true;
84 }
85 }
86
87 if (!opts->full_auxtrace)
88 return 0;
89
90 /* We are in full trace mode but '-m,xyz' wasn't specified */
91 if (opts->full_auxtrace && !opts->auxtrace_mmap_pages) {
92 if (privileged) {
93 opts->auxtrace_mmap_pages = MiB(4) / page_size;
94 } else {
95 opts->auxtrace_mmap_pages = KiB(128) / page_size;
96 if (opts->mmap_pages == UINT_MAX)
97 opts->mmap_pages = KiB(256) / page_size;
98 }
99 }
100
101 /* Validate auxtrace_mmap_pages */
102 if (opts->auxtrace_mmap_pages) {
103 size_t sz = opts->auxtrace_mmap_pages * (size_t)page_size;
104 size_t min_sz = KiB(8);
105
106 if (sz < min_sz || !is_power_of_2(sz)) {
107 pr_err("Invalid mmap size for ARM SPE: must be at least %zuKiB and a power of 2\n",
108 min_sz / 1024);
109 return -EINVAL;
110 }
111 }
112
113
114 /*
115 * To obtain the auxtrace buffer file descriptor, the auxtrace event
116 * must come first.
117 */
118 perf_evlist__to_front(evlist, arm_spe_evsel);
119
120 perf_evsel__set_sample_bit(arm_spe_evsel, CPU);
121 perf_evsel__set_sample_bit(arm_spe_evsel, TIME);
122 perf_evsel__set_sample_bit(arm_spe_evsel, TID);
123
124 /* Add dummy event to keep tracking */
125 err = parse_events(evlist, "dummy:u", NULL);
126 if (err)
127 return err;
128
129 tracking_evsel = perf_evlist__last(evlist);
130 perf_evlist__set_tracking_event(evlist, tracking_evsel);
131
132 tracking_evsel->attr.freq = 0;
133 tracking_evsel->attr.sample_period = 1;
134 perf_evsel__set_sample_bit(tracking_evsel, TIME);
135 perf_evsel__set_sample_bit(tracking_evsel, CPU);
136 perf_evsel__reset_sample_bit(tracking_evsel, BRANCH_STACK);
137
138 return 0;
139}
140
141static u64 arm_spe_reference(struct auxtrace_record *itr __maybe_unused)
142{
143 struct timespec ts;
144
145 clock_gettime(CLOCK_MONOTONIC_RAW, &ts);
146
147 return ts.tv_sec ^ ts.tv_nsec;
148}
149
150static void arm_spe_recording_free(struct auxtrace_record *itr)
151{
152 struct arm_spe_recording *sper =
153 container_of(itr, struct arm_spe_recording, itr);
154
155 free(sper);
156}
157
158static int arm_spe_read_finish(struct auxtrace_record *itr, int idx)
159{
160 struct arm_spe_recording *sper =
161 container_of(itr, struct arm_spe_recording, itr);
162 struct perf_evsel *evsel;
163
164 evlist__for_each_entry(sper->evlist, evsel) {
165 if (evsel->attr.type == sper->arm_spe_pmu->type)
166 return perf_evlist__enable_event_idx(sper->evlist,
167 evsel, idx);
168 }
169 return -EINVAL;
170}
171
172struct auxtrace_record *arm_spe_recording_init(int *err,
173 struct perf_pmu *arm_spe_pmu)
174{
175 struct arm_spe_recording *sper;
176
177 if (!arm_spe_pmu) {
178 *err = -ENODEV;
179 return NULL;
180 }
181
182 sper = zalloc(sizeof(struct arm_spe_recording));
183 if (!sper) {
184 *err = -ENOMEM;
185 return NULL;
186 }
187
188 sper->arm_spe_pmu = arm_spe_pmu;
189 sper->itr.recording_options = arm_spe_recording_options;
190 sper->itr.info_priv_size = arm_spe_info_priv_size;
191 sper->itr.info_fill = arm_spe_info_fill;
192 sper->itr.free = arm_spe_recording_free;
193 sper->itr.reference = arm_spe_reference;
194 sper->itr.read_finish = arm_spe_read_finish;
195 sper->itr.alignment = 0;
196
197 return &sper->itr;
198}
199
200struct perf_event_attr
201*arm_spe_pmu_default_config(struct perf_pmu *arm_spe_pmu)
202{
203 struct perf_event_attr *attr;
204
205 attr = zalloc(sizeof(struct perf_event_attr));
206 if (!attr) {
207 pr_err("arm_spe default config cannot allocate a perf_event_attr\n");
208 return NULL;
209 }
210
211 /*
212 * If kernel driver doesn't advertise a minimum,
213 * use max allowable by PMSIDR_EL1.INTERVAL
214 */
215 if (perf_pmu__scan_file(arm_spe_pmu, "caps/min_interval", "%llu",
216 &attr->sample_period) != 1) {
217 pr_debug("arm_spe driver doesn't advertise a min. interval. Using 4096\n");
218 attr->sample_period = 4096;
219 }
220
221 arm_spe_pmu->selectable = true;
222 arm_spe_pmu->is_uncore = false;
223
224 return attr;
225}
diff --git a/tools/perf/arch/arm64/util/header.c b/tools/perf/arch/arm64/util/header.c
new file mode 100644
index 000000000000..534cd2507d83
--- /dev/null
+++ b/tools/perf/arch/arm64/util/header.c
@@ -0,0 +1,65 @@
1#include <stdio.h>
2#include <stdlib.h>
3#include <api/fs/fs.h>
4#include "header.h"
5
6#define MIDR "/regs/identification/midr_el1"
7#define MIDR_SIZE 19
8#define MIDR_REVISION_MASK 0xf
9#define MIDR_VARIANT_SHIFT 20
10#define MIDR_VARIANT_MASK (0xf << MIDR_VARIANT_SHIFT)
11
12char *get_cpuid_str(struct perf_pmu *pmu)
13{
14 char *buf = NULL;
15 char path[PATH_MAX];
16 const char *sysfs = sysfs__mountpoint();
17 int cpu;
18 u64 midr = 0;
19 struct cpu_map *cpus;
20 FILE *file;
21
22 if (!sysfs || !pmu || !pmu->cpus)
23 return NULL;
24
25 buf = malloc(MIDR_SIZE);
26 if (!buf)
27 return NULL;
28
29 /* read midr from list of cpus mapped to this pmu */
30 cpus = cpu_map__get(pmu->cpus);
31 for (cpu = 0; cpu < cpus->nr; cpu++) {
32 scnprintf(path, PATH_MAX, "%s/devices/system/cpu/cpu%d"MIDR,
33 sysfs, cpus->map[cpu]);
34
35 file = fopen(path, "r");
36 if (!file) {
37 pr_debug("fopen failed for file %s\n", path);
38 continue;
39 }
40
41 if (!fgets(buf, MIDR_SIZE, file)) {
42 fclose(file);
43 continue;
44 }
45 fclose(file);
46
47 /* Ignore/clear Variant[23:20] and
48 * Revision[3:0] of MIDR
49 */
50 midr = strtoul(buf, NULL, 16);
51 midr &= (~(MIDR_VARIANT_MASK | MIDR_REVISION_MASK));
52 scnprintf(buf, MIDR_SIZE, "0x%016lx", midr);
53 /* got midr break loop */
54 break;
55 }
56
57 if (!midr) {
58 pr_err("failed to get cpuid string for PMU %s\n", pmu->name);
59 free(buf);
60 buf = NULL;
61 }
62
63 cpu_map__put(cpus);
64 return buf;
65}
diff --git a/tools/perf/arch/arm64/util/sym-handling.c b/tools/perf/arch/arm64/util/sym-handling.c
new file mode 100644
index 000000000000..0051b1ee8450
--- /dev/null
+++ b/tools/perf/arch/arm64/util/sym-handling.c
@@ -0,0 +1,22 @@
1/*
2 * This program is free software; you can redistribute it and/or modify
3 * it under the terms of the GNU General Public License, version 2, as
4 * published by the Free Software Foundation.
5 *
6 * Copyright (C) 2015 Naveen N. Rao, IBM Corporation
7 */
8
9#include "debug.h"
10#include "symbol.h"
11#include "map.h"
12#include "probe-event.h"
13#include "probe-file.h"
14
15#ifdef HAVE_LIBELF_SUPPORT
16bool elf__needs_adjust_symbols(GElf_Ehdr ehdr)
17{
18 return ehdr.e_type == ET_EXEC ||
19 ehdr.e_type == ET_REL ||
20 ehdr.e_type == ET_DYN;
21}
22#endif
diff --git a/tools/perf/arch/common.c b/tools/perf/arch/common.c
index 8c0cfeb55f8e..c6f373508a4f 100644
--- a/tools/perf/arch/common.c
+++ b/tools/perf/arch/common.c
@@ -1,12 +1,10 @@
1// SPDX-License-Identifier: GPL-2.0 1// SPDX-License-Identifier: GPL-2.0
2#include <stdio.h> 2#include <stdio.h>
3#include <sys/utsname.h>
4#include "common.h" 3#include "common.h"
4#include "../util/env.h"
5#include "../util/util.h" 5#include "../util/util.h"
6#include "../util/debug.h" 6#include "../util/debug.h"
7 7
8#include "sane_ctype.h"
9
10const char *const arm_triplets[] = { 8const char *const arm_triplets[] = {
11 "arm-eabi-", 9 "arm-eabi-",
12 "arm-linux-androideabi-", 10 "arm-linux-androideabi-",
@@ -120,55 +118,19 @@ static int lookup_triplets(const char *const *triplets, const char *name)
120 return -1; 118 return -1;
121} 119}
122 120
123/*
124 * Return architecture name in a normalized form.
125 * The conversion logic comes from the Makefile.
126 */
127const char *normalize_arch(char *arch)
128{
129 if (!strcmp(arch, "x86_64"))
130 return "x86";
131 if (arch[0] == 'i' && arch[2] == '8' && arch[3] == '6')
132 return "x86";
133 if (!strcmp(arch, "sun4u") || !strncmp(arch, "sparc", 5))
134 return "sparc";
135 if (!strcmp(arch, "aarch64") || !strcmp(arch, "arm64"))
136 return "arm64";
137 if (!strncmp(arch, "arm", 3) || !strcmp(arch, "sa110"))
138 return "arm";
139 if (!strncmp(arch, "s390", 4))
140 return "s390";
141 if (!strncmp(arch, "parisc", 6))
142 return "parisc";
143 if (!strncmp(arch, "powerpc", 7) || !strncmp(arch, "ppc", 3))
144 return "powerpc";
145 if (!strncmp(arch, "mips", 4))
146 return "mips";
147 if (!strncmp(arch, "sh", 2) && isdigit(arch[2]))
148 return "sh";
149
150 return arch;
151}
152
153static int perf_env__lookup_binutils_path(struct perf_env *env, 121static int perf_env__lookup_binutils_path(struct perf_env *env,
154 const char *name, const char **path) 122 const char *name, const char **path)
155{ 123{
156 int idx; 124 int idx;
157 const char *arch, *cross_env; 125 const char *arch = perf_env__arch(env), *cross_env;
158 struct utsname uts;
159 const char *const *path_list; 126 const char *const *path_list;
160 char *buf = NULL; 127 char *buf = NULL;
161 128
162 arch = normalize_arch(env->arch);
163
164 if (uname(&uts) < 0)
165 goto out;
166
167 /* 129 /*
168 * We don't need to try to find objdump path for native system. 130 * We don't need to try to find objdump path for native system.
169 * Just use default binutils path (e.g.: "objdump"). 131 * Just use default binutils path (e.g.: "objdump").
170 */ 132 */
171 if (!strcmp(normalize_arch(uts.machine), arch)) 133 if (!strcmp(perf_env__arch(NULL), arch))
172 goto out; 134 goto out;
173 135
174 cross_env = getenv("CROSS_COMPILE"); 136 cross_env = getenv("CROSS_COMPILE");
diff --git a/tools/perf/arch/common.h b/tools/perf/arch/common.h
index a1546509ad24..2d875baa92e6 100644
--- a/tools/perf/arch/common.h
+++ b/tools/perf/arch/common.h
@@ -7,6 +7,5 @@
7extern const char *objdump_path; 7extern const char *objdump_path;
8 8
9int perf_env__lookup_objdump(struct perf_env *env); 9int perf_env__lookup_objdump(struct perf_env *env);
10const char *normalize_arch(char *arch);
11 10
12#endif /* ARCH_PERF_COMMON_H */ 11#endif /* ARCH_PERF_COMMON_H */
diff --git a/tools/perf/arch/powerpc/annotate/instructions.c b/tools/perf/arch/powerpc/annotate/instructions.c
index b7bc04980fe8..a3f423c27cae 100644
--- a/tools/perf/arch/powerpc/annotate/instructions.c
+++ b/tools/perf/arch/powerpc/annotate/instructions.c
@@ -1,4 +1,6 @@
1// SPDX-License-Identifier: GPL-2.0 1// SPDX-License-Identifier: GPL-2.0
2#include <linux/compiler.h>
3
2static struct ins_ops *powerpc__associate_instruction_ops(struct arch *arch, const char *name) 4static struct ins_ops *powerpc__associate_instruction_ops(struct arch *arch, const char *name)
3{ 5{
4 int i; 6 int i;
@@ -47,7 +49,7 @@ static struct ins_ops *powerpc__associate_instruction_ops(struct arch *arch, con
47 return ops; 49 return ops;
48} 50}
49 51
50static int powerpc__annotate_init(struct arch *arch) 52static int powerpc__annotate_init(struct arch *arch, char *cpuid __maybe_unused)
51{ 53{
52 if (!arch->initialized) { 54 if (!arch->initialized) {
53 arch->initialized = true; 55 arch->initialized = true;
diff --git a/tools/perf/arch/powerpc/util/header.c b/tools/perf/arch/powerpc/util/header.c
index 7a4cf80c207a..0b242664f5ea 100644
--- a/tools/perf/arch/powerpc/util/header.c
+++ b/tools/perf/arch/powerpc/util/header.c
@@ -35,7 +35,7 @@ get_cpuid(char *buffer, size_t sz)
35} 35}
36 36
37char * 37char *
38get_cpuid_str(void) 38get_cpuid_str(struct perf_pmu *pmu __maybe_unused)
39{ 39{
40 char *bufp; 40 char *bufp;
41 41
diff --git a/tools/perf/arch/powerpc/util/sym-handling.c b/tools/perf/arch/powerpc/util/sym-handling.c
index 9c4e23d8c8ce..53d83d7e6a09 100644
--- a/tools/perf/arch/powerpc/util/sym-handling.c
+++ b/tools/perf/arch/powerpc/util/sym-handling.c
@@ -64,6 +64,14 @@ int arch__compare_symbol_names_n(const char *namea, const char *nameb,
64 64
65 return strncmp(namea, nameb, n); 65 return strncmp(namea, nameb, n);
66} 66}
67
68const char *arch__normalize_symbol_name(const char *name)
69{
70 /* Skip over initial dot */
71 if (name && *name == '.')
72 name++;
73 return name;
74}
67#endif 75#endif
68 76
69#if defined(_CALL_ELF) && _CALL_ELF == 2 77#if defined(_CALL_ELF) && _CALL_ELF == 2
diff --git a/tools/perf/arch/s390/Makefile b/tools/perf/arch/s390/Makefile
index 21322e0385b8..dfa6e3103437 100644
--- a/tools/perf/arch/s390/Makefile
+++ b/tools/perf/arch/s390/Makefile
@@ -2,3 +2,29 @@ ifndef NO_DWARF
2PERF_HAVE_DWARF_REGS := 1 2PERF_HAVE_DWARF_REGS := 1
3endif 3endif
4HAVE_KVM_STAT_SUPPORT := 1 4HAVE_KVM_STAT_SUPPORT := 1
5PERF_HAVE_ARCH_REGS_QUERY_REGISTER_OFFSET := 1
6
7#
8# Syscall table generation for perf
9#
10
11out := $(OUTPUT)arch/s390/include/generated/asm
12header := $(out)/syscalls_64.c
13syskrn := $(srctree)/arch/s390/kernel/syscalls/syscall.tbl
14sysprf := $(srctree)/tools/perf/arch/s390/entry/syscalls
15sysdef := $(sysprf)/syscall.tbl
16systbl := $(sysprf)/mksyscalltbl
17
18# Create output directory if not already present
19_dummy := $(shell [ -d '$(out)' ] || mkdir -p '$(out)')
20
21$(header): $(sysdef) $(systbl)
22 @(test -d ../../kernel -a -d ../../tools -a -d ../perf && ( \
23 (diff -B $(sysdef) $(syskrn) >/dev/null) \
24 || echo "Warning: Kernel ABI header at '$(sysdef)' differs from latest version at '$(syskrn)'" >&2 )) || true
25 $(Q)$(SHELL) '$(systbl)' $(sysdef) > $@
26
27clean::
28 $(call QUIET_CLEAN, s390) $(RM) $(header)
29
30archheaders: $(header)
diff --git a/tools/perf/arch/s390/annotate/instructions.c b/tools/perf/arch/s390/annotate/instructions.c
index c9a81673e8aa..8c72b44444cb 100644
--- a/tools/perf/arch/s390/annotate/instructions.c
+++ b/tools/perf/arch/s390/annotate/instructions.c
@@ -1,4 +1,6 @@
1// SPDX-License-Identifier: GPL-2.0 1// SPDX-License-Identifier: GPL-2.0
2#include <linux/compiler.h>
3
2static struct ins_ops *s390__associate_ins_ops(struct arch *arch, const char *name) 4static struct ins_ops *s390__associate_ins_ops(struct arch *arch, const char *name)
3{ 5{
4 struct ins_ops *ops = NULL; 6 struct ins_ops *ops = NULL;
@@ -16,11 +18,12 @@ static struct ins_ops *s390__associate_ins_ops(struct arch *arch, const char *na
16 if (!strcmp(name, "br")) 18 if (!strcmp(name, "br"))
17 ops = &ret_ops; 19 ops = &ret_ops;
18 20
19 arch__associate_ins_ops(arch, name, ops); 21 if (ops)
22 arch__associate_ins_ops(arch, name, ops);
20 return ops; 23 return ops;
21} 24}
22 25
23static int s390__annotate_init(struct arch *arch) 26static int s390__annotate_init(struct arch *arch, char *cpuid __maybe_unused)
24{ 27{
25 if (!arch->initialized) { 28 if (!arch->initialized) {
26 arch->initialized = true; 29 arch->initialized = true;
diff --git a/tools/perf/arch/s390/entry/syscalls/mksyscalltbl b/tools/perf/arch/s390/entry/syscalls/mksyscalltbl
new file mode 100755
index 000000000000..72ecbb676370
--- /dev/null
+++ b/tools/perf/arch/s390/entry/syscalls/mksyscalltbl
@@ -0,0 +1,32 @@
1#!/bin/sh
2# SPDX-License-Identifier: GPL-2.0
3#
4# Generate system call table for perf
5#
6# Copyright IBM Corp. 2017, 2018
7# Author(s): Hendrik Brueckner <brueckner@linux.vnet.ibm.com>
8#
9
10SYSCALL_TBL=$1
11
12if ! test -r $SYSCALL_TBL; then
13 echo "Could not read input file" >&2
14 exit 1
15fi
16
17create_table()
18{
19 local max_nr nr abi sc discard
20
21 echo 'static const char *syscalltbl_s390_64[] = {'
22 while read nr abi sc discard; do
23 printf '\t[%d] = "%s",\n' $nr $sc
24 max_nr=$nr
25 done
26 echo '};'
27 echo "#define SYSCALLTBL_S390_64_MAX_ID $max_nr"
28}
29
30grep -E "^[[:digit:]]+[[:space:]]+(common|64)" $SYSCALL_TBL \
31 |sort -k1 -n \
32 |create_table
diff --git a/tools/perf/arch/s390/entry/syscalls/syscall.tbl b/tools/perf/arch/s390/entry/syscalls/syscall.tbl
new file mode 100644
index 000000000000..b38d48464368
--- /dev/null
+++ b/tools/perf/arch/s390/entry/syscalls/syscall.tbl
@@ -0,0 +1,390 @@
1# SPDX-License-Identifier: GPL-2.0 WITH Linux-syscall-note
2#
3# System call table for s390
4#
5# Format:
6#
7# <nr> <abi> <syscall> <entry-64bit> <compat-entry>
8#
9# where <abi> can be common, 64, or 32
10
111 common exit sys_exit sys_exit
122 common fork sys_fork sys_fork
133 common read sys_read compat_sys_s390_read
144 common write sys_write compat_sys_s390_write
155 common open sys_open compat_sys_open
166 common close sys_close sys_close
177 common restart_syscall sys_restart_syscall sys_restart_syscall
188 common creat sys_creat compat_sys_creat
199 common link sys_link compat_sys_link
2010 common unlink sys_unlink compat_sys_unlink
2111 common execve sys_execve compat_sys_execve
2212 common chdir sys_chdir compat_sys_chdir
2313 32 time - compat_sys_time
2414 common mknod sys_mknod compat_sys_mknod
2515 common chmod sys_chmod compat_sys_chmod
2616 32 lchown - compat_sys_s390_lchown16
2719 common lseek sys_lseek compat_sys_lseek
2820 common getpid sys_getpid sys_getpid
2921 common mount sys_mount compat_sys_mount
3022 common umount sys_oldumount compat_sys_oldumount
3123 32 setuid - compat_sys_s390_setuid16
3224 32 getuid - compat_sys_s390_getuid16
3325 32 stime - compat_sys_stime
3426 common ptrace sys_ptrace compat_sys_ptrace
3527 common alarm sys_alarm sys_alarm
3629 common pause sys_pause sys_pause
3730 common utime sys_utime compat_sys_utime
3833 common access sys_access compat_sys_access
3934 common nice sys_nice sys_nice
4036 common sync sys_sync sys_sync
4137 common kill sys_kill sys_kill
4238 common rename sys_rename compat_sys_rename
4339 common mkdir sys_mkdir compat_sys_mkdir
4440 common rmdir sys_rmdir compat_sys_rmdir
4541 common dup sys_dup sys_dup
4642 common pipe sys_pipe compat_sys_pipe
4743 common times sys_times compat_sys_times
4845 common brk sys_brk compat_sys_brk
4946 32 setgid - compat_sys_s390_setgid16
5047 32 getgid - compat_sys_s390_getgid16
5148 common signal sys_signal compat_sys_signal
5249 32 geteuid - compat_sys_s390_geteuid16
5350 32 getegid - compat_sys_s390_getegid16
5451 common acct sys_acct compat_sys_acct
5552 common umount2 sys_umount compat_sys_umount
5654 common ioctl sys_ioctl compat_sys_ioctl
5755 common fcntl sys_fcntl compat_sys_fcntl
5857 common setpgid sys_setpgid sys_setpgid
5960 common umask sys_umask sys_umask
6061 common chroot sys_chroot compat_sys_chroot
6162 common ustat sys_ustat compat_sys_ustat
6263 common dup2 sys_dup2 sys_dup2
6364 common getppid sys_getppid sys_getppid
6465 common getpgrp sys_getpgrp sys_getpgrp
6566 common setsid sys_setsid sys_setsid
6667 common sigaction sys_sigaction compat_sys_sigaction
6770 32 setreuid - compat_sys_s390_setreuid16
6871 32 setregid - compat_sys_s390_setregid16
6972 common sigsuspend sys_sigsuspend compat_sys_sigsuspend
7073 common sigpending sys_sigpending compat_sys_sigpending
7174 common sethostname sys_sethostname compat_sys_sethostname
7275 common setrlimit sys_setrlimit compat_sys_setrlimit
7376 32 getrlimit - compat_sys_old_getrlimit
7477 common getrusage sys_getrusage compat_sys_getrusage
7578 common gettimeofday sys_gettimeofday compat_sys_gettimeofday
7679 common settimeofday sys_settimeofday compat_sys_settimeofday
7780 32 getgroups - compat_sys_s390_getgroups16
7881 32 setgroups - compat_sys_s390_setgroups16
7983 common symlink sys_symlink compat_sys_symlink
8085 common readlink sys_readlink compat_sys_readlink
8186 common uselib sys_uselib compat_sys_uselib
8287 common swapon sys_swapon compat_sys_swapon
8388 common reboot sys_reboot compat_sys_reboot
8489 common readdir - compat_sys_old_readdir
8590 common mmap sys_old_mmap compat_sys_s390_old_mmap
8691 common munmap sys_munmap compat_sys_munmap
8792 common truncate sys_truncate compat_sys_truncate
8893 common ftruncate sys_ftruncate compat_sys_ftruncate
8994 common fchmod sys_fchmod sys_fchmod
9095 32 fchown - compat_sys_s390_fchown16
9196 common getpriority sys_getpriority sys_getpriority
9297 common setpriority sys_setpriority sys_setpriority
9399 common statfs sys_statfs compat_sys_statfs
94100 common fstatfs sys_fstatfs compat_sys_fstatfs
95101 32 ioperm - -
96102 common socketcall sys_socketcall compat_sys_socketcall
97103 common syslog sys_syslog compat_sys_syslog
98104 common setitimer sys_setitimer compat_sys_setitimer
99105 common getitimer sys_getitimer compat_sys_getitimer
100106 common stat sys_newstat compat_sys_newstat
101107 common lstat sys_newlstat compat_sys_newlstat
102108 common fstat sys_newfstat compat_sys_newfstat
103110 common lookup_dcookie sys_lookup_dcookie compat_sys_lookup_dcookie
104111 common vhangup sys_vhangup sys_vhangup
105112 common idle - -
106114 common wait4 sys_wait4 compat_sys_wait4
107115 common swapoff sys_swapoff compat_sys_swapoff
108116 common sysinfo sys_sysinfo compat_sys_sysinfo
109117 common ipc sys_s390_ipc compat_sys_s390_ipc
110118 common fsync sys_fsync sys_fsync
111119 common sigreturn sys_sigreturn compat_sys_sigreturn
112120 common clone sys_clone compat_sys_clone
113121 common setdomainname sys_setdomainname compat_sys_setdomainname
114122 common uname sys_newuname compat_sys_newuname
115124 common adjtimex sys_adjtimex compat_sys_adjtimex
116125 common mprotect sys_mprotect compat_sys_mprotect
117126 common sigprocmask sys_sigprocmask compat_sys_sigprocmask
118127 common create_module - -
119128 common init_module sys_init_module compat_sys_init_module
120129 common delete_module sys_delete_module compat_sys_delete_module
121130 common get_kernel_syms - -
122131 common quotactl sys_quotactl compat_sys_quotactl
123132 common getpgid sys_getpgid sys_getpgid
124133 common fchdir sys_fchdir sys_fchdir
125134 common bdflush sys_bdflush compat_sys_bdflush
126135 common sysfs sys_sysfs compat_sys_sysfs
127136 common personality sys_s390_personality sys_s390_personality
128137 common afs_syscall - -
129138 32 setfsuid - compat_sys_s390_setfsuid16
130139 32 setfsgid - compat_sys_s390_setfsgid16
131140 32 _llseek - compat_sys_llseek
132141 common getdents sys_getdents compat_sys_getdents
133142 32 _newselect - compat_sys_select
134142 64 select sys_select -
135143 common flock sys_flock sys_flock
136144 common msync sys_msync compat_sys_msync
137145 common readv sys_readv compat_sys_readv
138146 common writev sys_writev compat_sys_writev
139147 common getsid sys_getsid sys_getsid
140148 common fdatasync sys_fdatasync sys_fdatasync
141149 common _sysctl sys_sysctl compat_sys_sysctl
142150 common mlock sys_mlock compat_sys_mlock
143151 common munlock sys_munlock compat_sys_munlock
144152 common mlockall sys_mlockall sys_mlockall
145153 common munlockall sys_munlockall sys_munlockall
146154 common sched_setparam sys_sched_setparam compat_sys_sched_setparam
147155 common sched_getparam sys_sched_getparam compat_sys_sched_getparam
148156 common sched_setscheduler sys_sched_setscheduler compat_sys_sched_setscheduler
149157 common sched_getscheduler sys_sched_getscheduler sys_sched_getscheduler
150158 common sched_yield sys_sched_yield sys_sched_yield
151159 common sched_get_priority_max sys_sched_get_priority_max sys_sched_get_priority_max
152160 common sched_get_priority_min sys_sched_get_priority_min sys_sched_get_priority_min
153161 common sched_rr_get_interval sys_sched_rr_get_interval compat_sys_sched_rr_get_interval
154162 common nanosleep sys_nanosleep compat_sys_nanosleep
155163 common mremap sys_mremap compat_sys_mremap
156164 32 setresuid - compat_sys_s390_setresuid16
157165 32 getresuid - compat_sys_s390_getresuid16
158167 common query_module - -
159168 common poll sys_poll compat_sys_poll
160169 common nfsservctl - -
161170 32 setresgid - compat_sys_s390_setresgid16
162171 32 getresgid - compat_sys_s390_getresgid16
163172 common prctl sys_prctl compat_sys_prctl
164173 common rt_sigreturn sys_rt_sigreturn compat_sys_rt_sigreturn
165174 common rt_sigaction sys_rt_sigaction compat_sys_rt_sigaction
166175 common rt_sigprocmask sys_rt_sigprocmask compat_sys_rt_sigprocmask
167176 common rt_sigpending sys_rt_sigpending compat_sys_rt_sigpending
168177 common rt_sigtimedwait sys_rt_sigtimedwait compat_sys_rt_sigtimedwait
169178 common rt_sigqueueinfo sys_rt_sigqueueinfo compat_sys_rt_sigqueueinfo
170179 common rt_sigsuspend sys_rt_sigsuspend compat_sys_rt_sigsuspend
171180 common pread64 sys_pread64 compat_sys_s390_pread64
172181 common pwrite64 sys_pwrite64 compat_sys_s390_pwrite64
173182 32 chown - compat_sys_s390_chown16
174183 common getcwd sys_getcwd compat_sys_getcwd
175184 common capget sys_capget compat_sys_capget
176185 common capset sys_capset compat_sys_capset
177186 common sigaltstack sys_sigaltstack compat_sys_sigaltstack
178187 common sendfile sys_sendfile64 compat_sys_sendfile
179188 common getpmsg - -
180189 common putpmsg - -
181190 common vfork sys_vfork sys_vfork
182191 32 ugetrlimit - compat_sys_getrlimit
183191 64 getrlimit sys_getrlimit -
184192 32 mmap2 - compat_sys_s390_mmap2
185193 32 truncate64 - compat_sys_s390_truncate64
186194 32 ftruncate64 - compat_sys_s390_ftruncate64
187195 32 stat64 - compat_sys_s390_stat64
188196 32 lstat64 - compat_sys_s390_lstat64
189197 32 fstat64 - compat_sys_s390_fstat64
190198 32 lchown32 - compat_sys_lchown
191198 64 lchown sys_lchown -
192199 32 getuid32 - sys_getuid
193199 64 getuid sys_getuid -
194200 32 getgid32 - sys_getgid
195200 64 getgid sys_getgid -
196201 32 geteuid32 - sys_geteuid
197201 64 geteuid sys_geteuid -
198202 32 getegid32 - sys_getegid
199202 64 getegid sys_getegid -
200203 32 setreuid32 - sys_setreuid
201203 64 setreuid sys_setreuid -
202204 32 setregid32 - sys_setregid
203204 64 setregid sys_setregid -
204205 32 getgroups32 - compat_sys_getgroups
205205 64 getgroups sys_getgroups -
206206 32 setgroups32 - compat_sys_setgroups
207206 64 setgroups sys_setgroups -
208207 32 fchown32 - sys_fchown
209207 64 fchown sys_fchown -
210208 32 setresuid32 - sys_setresuid
211208 64 setresuid sys_setresuid -
212209 32 getresuid32 - compat_sys_getresuid
213209 64 getresuid sys_getresuid -
214210 32 setresgid32 - sys_setresgid
215210 64 setresgid sys_setresgid -
216211 32 getresgid32 - compat_sys_getresgid
217211 64 getresgid sys_getresgid -
218212 32 chown32 - compat_sys_chown
219212 64 chown sys_chown -
220213 32 setuid32 - sys_setuid
221213 64 setuid sys_setuid -
222214 32 setgid32 - sys_setgid
223214 64 setgid sys_setgid -
224215 32 setfsuid32 - sys_setfsuid
225215 64 setfsuid sys_setfsuid -
226216 32 setfsgid32 - sys_setfsgid
227216 64 setfsgid sys_setfsgid -
228217 common pivot_root sys_pivot_root compat_sys_pivot_root
229218 common mincore sys_mincore compat_sys_mincore
230219 common madvise sys_madvise compat_sys_madvise
231220 common getdents64 sys_getdents64 compat_sys_getdents64
232221 32 fcntl64 - compat_sys_fcntl64
233222 common readahead sys_readahead compat_sys_s390_readahead
234223 32 sendfile64 - compat_sys_sendfile64
235224 common setxattr sys_setxattr compat_sys_setxattr
236225 common lsetxattr sys_lsetxattr compat_sys_lsetxattr
237226 common fsetxattr sys_fsetxattr compat_sys_fsetxattr
238227 common getxattr sys_getxattr compat_sys_getxattr
239228 common lgetxattr sys_lgetxattr compat_sys_lgetxattr
240229 common fgetxattr sys_fgetxattr compat_sys_fgetxattr
241230 common listxattr sys_listxattr compat_sys_listxattr
242231 common llistxattr sys_llistxattr compat_sys_llistxattr
243232 common flistxattr sys_flistxattr compat_sys_flistxattr
244233 common removexattr sys_removexattr compat_sys_removexattr
245234 common lremovexattr sys_lremovexattr compat_sys_lremovexattr
246235 common fremovexattr sys_fremovexattr compat_sys_fremovexattr
247236 common gettid sys_gettid sys_gettid
248237 common tkill sys_tkill sys_tkill
249238 common futex sys_futex compat_sys_futex
250239 common sched_setaffinity sys_sched_setaffinity compat_sys_sched_setaffinity
251240 common sched_getaffinity sys_sched_getaffinity compat_sys_sched_getaffinity
252241 common tgkill sys_tgkill sys_tgkill
253243 common io_setup sys_io_setup compat_sys_io_setup
254244 common io_destroy sys_io_destroy compat_sys_io_destroy
255245 common io_getevents sys_io_getevents compat_sys_io_getevents
256246 common io_submit sys_io_submit compat_sys_io_submit
257247 common io_cancel sys_io_cancel compat_sys_io_cancel
258248 common exit_group sys_exit_group sys_exit_group
259249 common epoll_create sys_epoll_create sys_epoll_create
260250 common epoll_ctl sys_epoll_ctl compat_sys_epoll_ctl
261251 common epoll_wait sys_epoll_wait compat_sys_epoll_wait
262252 common set_tid_address sys_set_tid_address compat_sys_set_tid_address
263253 common fadvise64 sys_fadvise64_64 compat_sys_s390_fadvise64
264254 common timer_create sys_timer_create compat_sys_timer_create
265255 common timer_settime sys_timer_settime compat_sys_timer_settime
266256 common timer_gettime sys_timer_gettime compat_sys_timer_gettime
267257 common timer_getoverrun sys_timer_getoverrun sys_timer_getoverrun
268258 common timer_delete sys_timer_delete sys_timer_delete
269259 common clock_settime sys_clock_settime compat_sys_clock_settime
270260 common clock_gettime sys_clock_gettime compat_sys_clock_gettime
271261 common clock_getres sys_clock_getres compat_sys_clock_getres
272262 common clock_nanosleep sys_clock_nanosleep compat_sys_clock_nanosleep
273264 32 fadvise64_64 - compat_sys_s390_fadvise64_64
274265 common statfs64 sys_statfs64 compat_sys_statfs64
275266 common fstatfs64 sys_fstatfs64 compat_sys_fstatfs64
276267 common remap_file_pages sys_remap_file_pages compat_sys_remap_file_pages
277268 common mbind sys_mbind compat_sys_mbind
278269 common get_mempolicy sys_get_mempolicy compat_sys_get_mempolicy
279270 common set_mempolicy sys_set_mempolicy compat_sys_set_mempolicy
280271 common mq_open sys_mq_open compat_sys_mq_open
281272 common mq_unlink sys_mq_unlink compat_sys_mq_unlink
282273 common mq_timedsend sys_mq_timedsend compat_sys_mq_timedsend
283274 common mq_timedreceive sys_mq_timedreceive compat_sys_mq_timedreceive
284275 common mq_notify sys_mq_notify compat_sys_mq_notify
285276 common mq_getsetattr sys_mq_getsetattr compat_sys_mq_getsetattr
286277 common kexec_load sys_kexec_load compat_sys_kexec_load
287278 common add_key sys_add_key compat_sys_add_key
288279 common request_key sys_request_key compat_sys_request_key
289280 common keyctl sys_keyctl compat_sys_keyctl
290281 common waitid sys_waitid compat_sys_waitid
291282 common ioprio_set sys_ioprio_set sys_ioprio_set
292283 common ioprio_get sys_ioprio_get sys_ioprio_get
293284 common inotify_init sys_inotify_init sys_inotify_init
294285 common inotify_add_watch sys_inotify_add_watch compat_sys_inotify_add_watch
295286 common inotify_rm_watch sys_inotify_rm_watch sys_inotify_rm_watch
296287 common migrate_pages sys_migrate_pages compat_sys_migrate_pages
297288 common openat sys_openat compat_sys_openat
298289 common mkdirat sys_mkdirat compat_sys_mkdirat
299290 common mknodat sys_mknodat compat_sys_mknodat
300291 common fchownat sys_fchownat compat_sys_fchownat
301292 common futimesat sys_futimesat compat_sys_futimesat
302293 32 fstatat64 - compat_sys_s390_fstatat64
303293 64 newfstatat sys_newfstatat -
304294 common unlinkat sys_unlinkat compat_sys_unlinkat
305295 common renameat sys_renameat compat_sys_renameat
306296 common linkat sys_linkat compat_sys_linkat
307297 common symlinkat sys_symlinkat compat_sys_symlinkat
308298 common readlinkat sys_readlinkat compat_sys_readlinkat
309299 common fchmodat sys_fchmodat compat_sys_fchmodat
310300 common faccessat sys_faccessat compat_sys_faccessat
311301 common pselect6 sys_pselect6 compat_sys_pselect6
312302 common ppoll sys_ppoll compat_sys_ppoll
313303 common unshare sys_unshare compat_sys_unshare
314304 common set_robust_list sys_set_robust_list compat_sys_set_robust_list
315305 common get_robust_list sys_get_robust_list compat_sys_get_robust_list
316306 common splice sys_splice compat_sys_splice
317307 common sync_file_range sys_sync_file_range compat_sys_s390_sync_file_range
318308 common tee sys_tee compat_sys_tee
319309 common vmsplice sys_vmsplice compat_sys_vmsplice
320310 common move_pages sys_move_pages compat_sys_move_pages
321311 common getcpu sys_getcpu compat_sys_getcpu
322312 common epoll_pwait sys_epoll_pwait compat_sys_epoll_pwait
323313 common utimes sys_utimes compat_sys_utimes
324314 common fallocate sys_fallocate compat_sys_s390_fallocate
325315 common utimensat sys_utimensat compat_sys_utimensat
326316 common signalfd sys_signalfd compat_sys_signalfd
327317 common timerfd - -
328318 common eventfd sys_eventfd sys_eventfd
329319 common timerfd_create sys_timerfd_create sys_timerfd_create
330320 common timerfd_settime sys_timerfd_settime compat_sys_timerfd_settime
331321 common timerfd_gettime sys_timerfd_gettime compat_sys_timerfd_gettime
332322 common signalfd4 sys_signalfd4 compat_sys_signalfd4
333323 common eventfd2 sys_eventfd2 sys_eventfd2
334324 common inotify_init1 sys_inotify_init1 sys_inotify_init1
335325 common pipe2 sys_pipe2 compat_sys_pipe2
336326 common dup3 sys_dup3 sys_dup3
337327 common epoll_create1 sys_epoll_create1 sys_epoll_create1
338328 common preadv sys_preadv compat_sys_preadv
339329 common pwritev sys_pwritev compat_sys_pwritev
340330 common rt_tgsigqueueinfo sys_rt_tgsigqueueinfo compat_sys_rt_tgsigqueueinfo
341331 common perf_event_open sys_perf_event_open compat_sys_perf_event_open
342332 common fanotify_init sys_fanotify_init sys_fanotify_init
343333 common fanotify_mark sys_fanotify_mark compat_sys_fanotify_mark
344334 common prlimit64 sys_prlimit64 compat_sys_prlimit64
345335 common name_to_handle_at sys_name_to_handle_at compat_sys_name_to_handle_at
346336 common open_by_handle_at sys_open_by_handle_at compat_sys_open_by_handle_at
347337 common clock_adjtime sys_clock_adjtime compat_sys_clock_adjtime
348338 common syncfs sys_syncfs sys_syncfs
349339 common setns sys_setns sys_setns
350340 common process_vm_readv sys_process_vm_readv compat_sys_process_vm_readv
351341 common process_vm_writev sys_process_vm_writev compat_sys_process_vm_writev
352342 common s390_runtime_instr sys_s390_runtime_instr sys_s390_runtime_instr
353343 common kcmp sys_kcmp compat_sys_kcmp
354344 common finit_module sys_finit_module compat_sys_finit_module
355345 common sched_setattr sys_sched_setattr compat_sys_sched_setattr
356346 common sched_getattr sys_sched_getattr compat_sys_sched_getattr
357347 common renameat2 sys_renameat2 compat_sys_renameat2
358348 common seccomp sys_seccomp compat_sys_seccomp
359349 common getrandom sys_getrandom compat_sys_getrandom
360350 common memfd_create sys_memfd_create compat_sys_memfd_create
361351 common bpf sys_bpf compat_sys_bpf
362352 common s390_pci_mmio_write sys_s390_pci_mmio_write compat_sys_s390_pci_mmio_write
363353 common s390_pci_mmio_read sys_s390_pci_mmio_read compat_sys_s390_pci_mmio_read
364354 common execveat sys_execveat compat_sys_execveat
365355 common userfaultfd sys_userfaultfd sys_userfaultfd
366356 common membarrier sys_membarrier sys_membarrier
367357 common recvmmsg sys_recvmmsg compat_sys_recvmmsg
368358 common sendmmsg sys_sendmmsg compat_sys_sendmmsg
369359 common socket sys_socket sys_socket
370360 common socketpair sys_socketpair compat_sys_socketpair
371361 common bind sys_bind compat_sys_bind
372362 common connect sys_connect compat_sys_connect
373363 common listen sys_listen sys_listen
374364 common accept4 sys_accept4 compat_sys_accept4
375365 common getsockopt sys_getsockopt compat_sys_getsockopt
376366 common setsockopt sys_setsockopt compat_sys_setsockopt
377367 common getsockname sys_getsockname compat_sys_getsockname
378368 common getpeername sys_getpeername compat_sys_getpeername
379369 common sendto sys_sendto compat_sys_sendto
380370 common sendmsg sys_sendmsg compat_sys_sendmsg
381371 common recvfrom sys_recvfrom compat_sys_recvfrom
382372 common recvmsg sys_recvmsg compat_sys_recvmsg
383373 common shutdown sys_shutdown sys_shutdown
384374 common mlock2 sys_mlock2 compat_sys_mlock2
385375 common copy_file_range sys_copy_file_range compat_sys_copy_file_range
386376 common preadv2 sys_preadv2 compat_sys_preadv2
387377 common pwritev2 sys_pwritev2 compat_sys_pwritev2
388378 common s390_guarded_storage sys_s390_guarded_storage compat_sys_s390_guarded_storage
389379 common statx sys_statx compat_sys_statx
390380 common s390_sthyi sys_s390_sthyi compat_sys_s390_sthyi
diff --git a/tools/perf/arch/s390/include/dwarf-regs-table.h b/tools/perf/arch/s390/include/dwarf-regs-table.h
index 792d4c277225..671553525f41 100644
--- a/tools/perf/arch/s390/include/dwarf-regs-table.h
+++ b/tools/perf/arch/s390/include/dwarf-regs-table.h
@@ -1,9 +1,72 @@
1/* SPDX-License-Identifier: GPL-2.0 */ 1/* SPDX-License-Identifier: GPL-2.0 */
2#ifdef DEFINE_DWARF_REGSTR_TABLE 2#ifndef S390_DWARF_REGS_TABLE_H
3/* This is included in perf/util/dwarf-regs.c */ 3#define S390_DWARF_REGS_TABLE_H
4 4
5static const char * const s390_regstr_tbl[] = { 5#define REG_DWARFNUM_NAME(reg, idx) [idx] = "%" #reg
6
7/*
8 * For reference, see DWARF register mapping:
9 * http://refspecs.linuxfoundation.org/ELF/zSeries/lzsabi0_s390/x1542.html
10 */
11static const char * const s390_dwarf_regs[] = {
6 "%r0", "%r1", "%r2", "%r3", "%r4", "%r5", "%r6", "%r7", 12 "%r0", "%r1", "%r2", "%r3", "%r4", "%r5", "%r6", "%r7",
7 "%r8", "%r9", "%r10", "%r11", "%r12", "%r13", "%r14", "%r15", 13 "%r8", "%r9", "%r10", "%r11", "%r12", "%r13", "%r14", "%r15",
14 REG_DWARFNUM_NAME(f0, 16),
15 REG_DWARFNUM_NAME(f1, 20),
16 REG_DWARFNUM_NAME(f2, 17),
17 REG_DWARFNUM_NAME(f3, 21),
18 REG_DWARFNUM_NAME(f4, 18),
19 REG_DWARFNUM_NAME(f5, 22),
20 REG_DWARFNUM_NAME(f6, 19),
21 REG_DWARFNUM_NAME(f7, 23),
22 REG_DWARFNUM_NAME(f8, 24),
23 REG_DWARFNUM_NAME(f9, 28),
24 REG_DWARFNUM_NAME(f10, 25),
25 REG_DWARFNUM_NAME(f11, 29),
26 REG_DWARFNUM_NAME(f12, 26),
27 REG_DWARFNUM_NAME(f13, 30),
28 REG_DWARFNUM_NAME(f14, 27),
29 REG_DWARFNUM_NAME(f15, 31),
30 REG_DWARFNUM_NAME(c0, 32),
31 REG_DWARFNUM_NAME(c1, 33),
32 REG_DWARFNUM_NAME(c2, 34),
33 REG_DWARFNUM_NAME(c3, 35),
34 REG_DWARFNUM_NAME(c4, 36),
35 REG_DWARFNUM_NAME(c5, 37),
36 REG_DWARFNUM_NAME(c6, 38),
37 REG_DWARFNUM_NAME(c7, 39),
38 REG_DWARFNUM_NAME(c8, 40),
39 REG_DWARFNUM_NAME(c9, 41),
40 REG_DWARFNUM_NAME(c10, 42),
41 REG_DWARFNUM_NAME(c11, 43),
42 REG_DWARFNUM_NAME(c12, 44),
43 REG_DWARFNUM_NAME(c13, 45),
44 REG_DWARFNUM_NAME(c14, 46),
45 REG_DWARFNUM_NAME(c15, 47),
46 REG_DWARFNUM_NAME(a0, 48),
47 REG_DWARFNUM_NAME(a1, 49),
48 REG_DWARFNUM_NAME(a2, 50),
49 REG_DWARFNUM_NAME(a3, 51),
50 REG_DWARFNUM_NAME(a4, 52),
51 REG_DWARFNUM_NAME(a5, 53),
52 REG_DWARFNUM_NAME(a6, 54),
53 REG_DWARFNUM_NAME(a7, 55),
54 REG_DWARFNUM_NAME(a8, 56),
55 REG_DWARFNUM_NAME(a9, 57),
56 REG_DWARFNUM_NAME(a10, 58),
57 REG_DWARFNUM_NAME(a11, 59),
58 REG_DWARFNUM_NAME(a12, 60),
59 REG_DWARFNUM_NAME(a13, 61),
60 REG_DWARFNUM_NAME(a14, 62),
61 REG_DWARFNUM_NAME(a15, 63),
62 REG_DWARFNUM_NAME(pswm, 64),
63 REG_DWARFNUM_NAME(pswa, 65),
8}; 64};
9#endif 65
66#ifdef DEFINE_DWARF_REGSTR_TABLE
67/* This is included in perf/util/dwarf-regs.c */
68
69#define s390_regstr_tbl s390_dwarf_regs
70
71#endif /* DEFINE_DWARF_REGSTR_TABLE */
72#endif /* S390_DWARF_REGS_TABLE_H */
diff --git a/tools/perf/arch/s390/include/perf_regs.h b/tools/perf/arch/s390/include/perf_regs.h
new file mode 100644
index 000000000000..bcfbaed78cc2
--- /dev/null
+++ b/tools/perf/arch/s390/include/perf_regs.h
@@ -0,0 +1,95 @@
1#ifndef ARCH_PERF_REGS_H
2#define ARCH_PERF_REGS_H
3
4#include <stdlib.h>
5#include <linux/types.h>
6#include <asm/perf_regs.h>
7
8void perf_regs_load(u64 *regs);
9
10#define PERF_REGS_MASK ((1ULL << PERF_REG_S390_MAX) - 1)
11#define PERF_REGS_MAX PERF_REG_S390_MAX
12#define PERF_SAMPLE_REGS_ABI PERF_SAMPLE_REGS_ABI_64
13
14#define PERF_REG_IP PERF_REG_S390_PC
15#define PERF_REG_SP PERF_REG_S390_R15
16
17static inline const char *perf_reg_name(int id)
18{
19 switch (id) {
20 case PERF_REG_S390_R0:
21 return "R0";
22 case PERF_REG_S390_R1:
23 return "R1";
24 case PERF_REG_S390_R2:
25 return "R2";
26 case PERF_REG_S390_R3:
27 return "R3";
28 case PERF_REG_S390_R4:
29 return "R4";
30 case PERF_REG_S390_R5:
31 return "R5";
32 case PERF_REG_S390_R6:
33 return "R6";
34 case PERF_REG_S390_R7:
35 return "R7";
36 case PERF_REG_S390_R8:
37 return "R8";
38 case PERF_REG_S390_R9:
39 return "R9";
40 case PERF_REG_S390_R10:
41 return "R10";
42 case PERF_REG_S390_R11:
43 return "R11";
44 case PERF_REG_S390_R12:
45 return "R12";
46 case PERF_REG_S390_R13:
47 return "R13";
48 case PERF_REG_S390_R14:
49 return "R14";
50 case PERF_REG_S390_R15:
51 return "R15";
52 case PERF_REG_S390_FP0:
53 return "FP0";
54 case PERF_REG_S390_FP1:
55 return "FP1";
56 case PERF_REG_S390_FP2:
57 return "FP2";
58 case PERF_REG_S390_FP3:
59 return "FP3";
60 case PERF_REG_S390_FP4:
61 return "FP4";
62 case PERF_REG_S390_FP5:
63 return "FP5";
64 case PERF_REG_S390_FP6:
65 return "FP6";
66 case PERF_REG_S390_FP7:
67 return "FP7";
68 case PERF_REG_S390_FP8:
69 return "FP8";
70 case PERF_REG_S390_FP9:
71 return "FP9";
72 case PERF_REG_S390_FP10:
73 return "FP10";
74 case PERF_REG_S390_FP11:
75 return "FP11";
76 case PERF_REG_S390_FP12:
77 return "FP12";
78 case PERF_REG_S390_FP13:
79 return "FP13";
80 case PERF_REG_S390_FP14:
81 return "FP14";
82 case PERF_REG_S390_FP15:
83 return "FP15";
84 case PERF_REG_S390_MASK:
85 return "MASK";
86 case PERF_REG_S390_PC:
87 return "PC";
88 default:
89 return NULL;
90 }
91
92 return NULL;
93}
94
95#endif /* ARCH_PERF_REGS_H */
diff --git a/tools/perf/arch/s390/util/Build b/tools/perf/arch/s390/util/Build
index 5bd7b9260cc0..4a233683c684 100644
--- a/tools/perf/arch/s390/util/Build
+++ b/tools/perf/arch/s390/util/Build
@@ -2,5 +2,8 @@ libperf-y += header.o
2libperf-y += kvm-stat.o 2libperf-y += kvm-stat.o
3 3
4libperf-$(CONFIG_DWARF) += dwarf-regs.o 4libperf-$(CONFIG_DWARF) += dwarf-regs.o
5libperf-$(CONFIG_LIBDW_DWARF_UNWIND) += unwind-libdw.o
5 6
6libperf-y += machine.o 7libperf-y += machine.o
8
9libperf-$(CONFIG_AUXTRACE) += auxtrace.o
diff --git a/tools/perf/arch/s390/util/auxtrace.c b/tools/perf/arch/s390/util/auxtrace.c
new file mode 100644
index 000000000000..6cb48e4cffd9
--- /dev/null
+++ b/tools/perf/arch/s390/util/auxtrace.c
@@ -0,0 +1,118 @@
1#include <stdbool.h>
2#include <linux/kernel.h>
3#include <linux/types.h>
4#include <linux/bitops.h>
5#include <linux/log2.h>
6
7#include "../../util/evlist.h"
8#include "../../util/auxtrace.h"
9#include "../../util/evsel.h"
10
11#define PERF_EVENT_CPUM_SF 0xB0000 /* Event: Basic-sampling */
12#define PERF_EVENT_CPUM_SF_DIAG 0xBD000 /* Event: Combined-sampling */
13#define DEFAULT_AUX_PAGES 128
14#define DEFAULT_FREQ 4000
15
16static void cpumsf_free(struct auxtrace_record *itr)
17{
18 free(itr);
19}
20
21static size_t cpumsf_info_priv_size(struct auxtrace_record *itr __maybe_unused,
22 struct perf_evlist *evlist __maybe_unused)
23{
24 return 0;
25}
26
27static int
28cpumsf_info_fill(struct auxtrace_record *itr __maybe_unused,
29 struct perf_session *session __maybe_unused,
30 struct auxtrace_info_event *auxtrace_info __maybe_unused,
31 size_t priv_size __maybe_unused)
32{
33 return 0;
34}
35
36static unsigned long
37cpumsf_reference(struct auxtrace_record *itr __maybe_unused)
38{
39 return 0;
40}
41
42static int
43cpumsf_recording_options(struct auxtrace_record *ar __maybe_unused,
44 struct perf_evlist *evlist __maybe_unused,
45 struct record_opts *opts)
46{
47 unsigned int factor = 1;
48 unsigned int pages;
49
50 opts->full_auxtrace = true;
51
52 /*
53 * The AUX buffer size should be set properly to avoid
54 * overflow of samples if it is not set explicitly.
55 * DEFAULT_AUX_PAGES is an proper size when sampling frequency
56 * is DEFAULT_FREQ. It is expected to hold about 1/2 second
57 * of sampling data. The size used for AUX buffer will scale
58 * according to the specified frequency and DEFAULT_FREQ.
59 */
60 if (!opts->auxtrace_mmap_pages) {
61 if (opts->user_freq != UINT_MAX)
62 factor = (opts->user_freq + DEFAULT_FREQ
63 - 1) / DEFAULT_FREQ;
64 pages = DEFAULT_AUX_PAGES * factor;
65 opts->auxtrace_mmap_pages = roundup_pow_of_two(pages);
66 }
67
68 return 0;
69}
70
71static int
72cpumsf_parse_snapshot_options(struct auxtrace_record *itr __maybe_unused,
73 struct record_opts *opts __maybe_unused,
74 const char *str __maybe_unused)
75{
76 return 0;
77}
78
79/*
80 * auxtrace_record__init is called when perf record
81 * check if the event really need auxtrace
82 */
83struct auxtrace_record *auxtrace_record__init(struct perf_evlist *evlist,
84 int *err)
85{
86 struct auxtrace_record *aux;
87 struct perf_evsel *pos;
88 int diagnose = 0;
89
90 if (evlist->nr_entries == 0)
91 return NULL;
92
93 evlist__for_each_entry(evlist, pos) {
94 if (pos->attr.config == PERF_EVENT_CPUM_SF_DIAG) {
95 diagnose = 1;
96 break;
97 }
98 }
99
100 if (!diagnose)
101 return NULL;
102
103 /* sampling in diagnose mode. alloc aux buffer */
104 aux = zalloc(sizeof(*aux));
105 if (aux == NULL) {
106 *err = -ENOMEM;
107 return NULL;
108 }
109
110 aux->parse_snapshot_options = cpumsf_parse_snapshot_options;
111 aux->recording_options = cpumsf_recording_options;
112 aux->info_priv_size = cpumsf_info_priv_size;
113 aux->info_fill = cpumsf_info_fill;
114 aux->free = cpumsf_free;
115 aux->reference = cpumsf_reference;
116
117 return aux;
118}
diff --git a/tools/perf/arch/s390/util/dwarf-regs.c b/tools/perf/arch/s390/util/dwarf-regs.c
index 0dff5b2ed1e5..a8ace5cc6301 100644
--- a/tools/perf/arch/s390/util/dwarf-regs.c
+++ b/tools/perf/arch/s390/util/dwarf-regs.c
@@ -2,22 +2,43 @@
2/* 2/*
3 * Mapping of DWARF debug register numbers into register names. 3 * Mapping of DWARF debug register numbers into register names.
4 * 4 *
5 * Copyright IBM Corp. 2010 5 * Copyright IBM Corp. 2010, 2017
6 * Author(s): Heiko Carstens <heiko.carstens@de.ibm.com>, 6 * Author(s): Heiko Carstens <heiko.carstens@de.ibm.com>,
7 * Hendrik Brueckner <brueckner@linux.vnet.ibm.com>
7 * 8 *
8 */ 9 */
9 10
11#include <errno.h>
10#include <stddef.h> 12#include <stddef.h>
13#include <stdlib.h>
14#include <linux/kernel.h>
15#include <asm/ptrace.h>
16#include <string.h>
11#include <dwarf-regs.h> 17#include <dwarf-regs.h>
12 18#include "dwarf-regs-table.h"
13#define NUM_GPRS 16
14
15static const char *gpr_names[NUM_GPRS] = {
16 "%r0", "%r1", "%r2", "%r3", "%r4", "%r5", "%r6", "%r7",
17 "%r8", "%r9", "%r10", "%r11", "%r12", "%r13", "%r14", "%r15",
18};
19 19
20const char *get_arch_regstr(unsigned int n) 20const char *get_arch_regstr(unsigned int n)
21{ 21{
22 return (n >= NUM_GPRS) ? NULL : gpr_names[n]; 22 return (n >= ARRAY_SIZE(s390_dwarf_regs)) ? NULL : s390_dwarf_regs[n];
23}
24
25/*
26 * Convert the register name into an offset to struct pt_regs (kernel).
27 * This is required by the BPF prologue generator. The BPF
28 * program is called in the BPF overflow handler in the perf
29 * core.
30 */
31int regs_query_register_offset(const char *name)
32{
33 unsigned long gpr;
34
35 if (!name || strncmp(name, "%r", 2))
36 return -EINVAL;
37
38 errno = 0;
39 gpr = strtoul(name + 2, NULL, 10);
40 if (errno || gpr >= 16)
41 return -EINVAL;
42
43 return offsetof(user_pt_regs, gprs) + 8 * gpr;
23} 44}
diff --git a/tools/perf/arch/s390/util/unwind-libdw.c b/tools/perf/arch/s390/util/unwind-libdw.c
new file mode 100644
index 000000000000..387c698cdd1b
--- /dev/null
+++ b/tools/perf/arch/s390/util/unwind-libdw.c
@@ -0,0 +1,63 @@
1#include <linux/kernel.h>
2#include <elfutils/libdwfl.h>
3#include "../../util/unwind-libdw.h"
4#include "../../util/perf_regs.h"
5#include "../../util/event.h"
6#include "dwarf-regs-table.h"
7
8
9bool libdw__arch_set_initial_registers(Dwfl_Thread *thread, void *arg)
10{
11 struct unwind_info *ui = arg;
12 struct regs_dump *user_regs = &ui->sample->user_regs;
13 Dwarf_Word dwarf_regs[ARRAY_SIZE(s390_dwarf_regs)];
14
15#define REG(r) ({ \
16 Dwarf_Word val = 0; \
17 perf_reg_value(&val, user_regs, PERF_REG_S390_##r); \
18 val; \
19})
20 /*
21 * For DWARF register mapping details,
22 * see also perf/arch/s390/include/dwarf-regs-table.h
23 */
24 dwarf_regs[0] = REG(R0);
25 dwarf_regs[1] = REG(R1);
26 dwarf_regs[2] = REG(R2);
27 dwarf_regs[3] = REG(R3);
28 dwarf_regs[4] = REG(R4);
29 dwarf_regs[5] = REG(R5);
30 dwarf_regs[6] = REG(R6);
31 dwarf_regs[7] = REG(R7);
32 dwarf_regs[8] = REG(R8);
33 dwarf_regs[9] = REG(R9);
34 dwarf_regs[10] = REG(R10);
35 dwarf_regs[11] = REG(R11);
36 dwarf_regs[12] = REG(R12);
37 dwarf_regs[13] = REG(R13);
38 dwarf_regs[14] = REG(R14);
39 dwarf_regs[15] = REG(R15);
40
41 dwarf_regs[16] = REG(FP0);
42 dwarf_regs[17] = REG(FP2);
43 dwarf_regs[18] = REG(FP4);
44 dwarf_regs[19] = REG(FP6);
45 dwarf_regs[20] = REG(FP1);
46 dwarf_regs[21] = REG(FP3);
47 dwarf_regs[22] = REG(FP5);
48 dwarf_regs[23] = REG(FP7);
49 dwarf_regs[24] = REG(FP8);
50 dwarf_regs[25] = REG(FP10);
51 dwarf_regs[26] = REG(FP12);
52 dwarf_regs[27] = REG(FP14);
53 dwarf_regs[28] = REG(FP9);
54 dwarf_regs[29] = REG(FP11);
55 dwarf_regs[30] = REG(FP13);
56 dwarf_regs[31] = REG(FP15);
57
58 dwarf_regs[64] = REG(MASK);
59 dwarf_regs[65] = REG(PC);
60
61 dwfl_thread_state_register_pc(thread, dwarf_regs[65]);
62 return dwfl_thread_state_registers(thread, 0, 32, dwarf_regs);
63}
diff --git a/tools/perf/arch/x86/annotate/instructions.c b/tools/perf/arch/x86/annotate/instructions.c
index 4adfb4ce2864..5bd1ba8c0282 100644
--- a/tools/perf/arch/x86/annotate/instructions.c
+++ b/tools/perf/arch/x86/annotate/instructions.c
@@ -123,3 +123,17 @@ static int x86__cpuid_parse(struct arch *arch, char *cpuid)
123 123
124 return -1; 124 return -1;
125} 125}
126
127static int x86__annotate_init(struct arch *arch, char *cpuid)
128{
129 int err = 0;
130
131 if (arch->initialized)
132 return 0;
133
134 if (cpuid)
135 err = x86__cpuid_parse(arch, cpuid);
136
137 arch->initialized = true;
138 return err;
139}
diff --git a/tools/perf/arch/x86/include/arch-tests.h b/tools/perf/arch/x86/include/arch-tests.h
index 9834fdc7c59e..c1bd979b957b 100644
--- a/tools/perf/arch/x86/include/arch-tests.h
+++ b/tools/perf/arch/x86/include/arch-tests.h
@@ -9,7 +9,6 @@ struct test;
9int test__rdpmc(struct test *test __maybe_unused, int subtest); 9int test__rdpmc(struct test *test __maybe_unused, int subtest);
10int test__perf_time_to_tsc(struct test *test __maybe_unused, int subtest); 10int test__perf_time_to_tsc(struct test *test __maybe_unused, int subtest);
11int test__insn_x86(struct test *test __maybe_unused, int subtest); 11int test__insn_x86(struct test *test __maybe_unused, int subtest);
12int test__intel_cqm_count_nmi_context(struct test *test __maybe_unused, int subtest);
13 12
14#ifdef HAVE_DWARF_UNWIND_SUPPORT 13#ifdef HAVE_DWARF_UNWIND_SUPPORT
15struct thread; 14struct thread;
diff --git a/tools/perf/arch/x86/tests/Build b/tools/perf/arch/x86/tests/Build
index cbb7e978166b..8e2c5a38c3b9 100644
--- a/tools/perf/arch/x86/tests/Build
+++ b/tools/perf/arch/x86/tests/Build
@@ -5,4 +5,3 @@ libperf-y += arch-tests.o
5libperf-y += rdpmc.o 5libperf-y += rdpmc.o
6libperf-y += perf-time-to-tsc.o 6libperf-y += perf-time-to-tsc.o
7libperf-$(CONFIG_AUXTRACE) += insn-x86.o 7libperf-$(CONFIG_AUXTRACE) += insn-x86.o
8libperf-y += intel-cqm.o
diff --git a/tools/perf/arch/x86/tests/arch-tests.c b/tools/perf/arch/x86/tests/arch-tests.c
index 34a078136a47..cc1802ff5410 100644
--- a/tools/perf/arch/x86/tests/arch-tests.c
+++ b/tools/perf/arch/x86/tests/arch-tests.c
@@ -25,10 +25,6 @@ struct test arch_tests[] = {
25 }, 25 },
26#endif 26#endif
27 { 27 {
28 .desc = "Intel cqm nmi context read",
29 .func = test__intel_cqm_count_nmi_context,
30 },
31 {
32 .func = NULL, 28 .func = NULL,
33 }, 29 },
34 30
diff --git a/tools/perf/arch/x86/tests/perf-time-to-tsc.c b/tools/perf/arch/x86/tests/perf-time-to-tsc.c
index b59678e8c1e2..06abe8108b33 100644
--- a/tools/perf/arch/x86/tests/perf-time-to-tsc.c
+++ b/tools/perf/arch/x86/tests/perf-time-to-tsc.c
@@ -84,7 +84,7 @@ int test__perf_time_to_tsc(struct test *test __maybe_unused, int subtest __maybe
84 84
85 CHECK__(perf_evlist__open(evlist)); 85 CHECK__(perf_evlist__open(evlist));
86 86
87 CHECK__(perf_evlist__mmap(evlist, UINT_MAX, false)); 87 CHECK__(perf_evlist__mmap(evlist, UINT_MAX));
88 88
89 pc = evlist->mmap[0].base; 89 pc = evlist->mmap[0].base;
90 ret = perf_read_tsc_conversion(pc, &tc); 90 ret = perf_read_tsc_conversion(pc, &tc);
diff --git a/tools/perf/arch/x86/util/header.c b/tools/perf/arch/x86/util/header.c
index 33027c5e6f92..fb0d71afee8b 100644
--- a/tools/perf/arch/x86/util/header.c
+++ b/tools/perf/arch/x86/util/header.c
@@ -66,11 +66,11 @@ get_cpuid(char *buffer, size_t sz)
66} 66}
67 67
68char * 68char *
69get_cpuid_str(void) 69get_cpuid_str(struct perf_pmu *pmu __maybe_unused)
70{ 70{
71 char *buf = malloc(128); 71 char *buf = malloc(128);
72 72
73 if (__get_cpuid(buf, 128, "%s-%u-%X$") < 0) { 73 if (buf && __get_cpuid(buf, 128, "%s-%u-%X$") < 0) {
74 free(buf); 74 free(buf);
75 return NULL; 75 return NULL;
76 } 76 }
diff --git a/tools/perf/arch/x86/util/unwind-libunwind.c b/tools/perf/arch/x86/util/unwind-libunwind.c
index 9c917f80c906..05920e3edf7a 100644
--- a/tools/perf/arch/x86/util/unwind-libunwind.c
+++ b/tools/perf/arch/x86/util/unwind-libunwind.c
@@ -1,7 +1,7 @@
1// SPDX-License-Identifier: GPL-2.0 1// SPDX-License-Identifier: GPL-2.0
2 2
3#ifndef REMOTE_UNWIND_LIBUNWIND
4#include <errno.h> 3#include <errno.h>
4#ifndef REMOTE_UNWIND_LIBUNWIND
5#include <libunwind.h> 5#include <libunwind.h>
6#include "perf_regs.h" 6#include "perf_regs.h"
7#include "../../util/unwind.h" 7#include "../../util/unwind.h"
diff --git a/tools/perf/bench/futex-hash.c b/tools/perf/bench/futex-hash.c
index 58ae6ed8f38b..9aa3a674829b 100644
--- a/tools/perf/bench/futex-hash.c
+++ b/tools/perf/bench/futex-hash.c
@@ -24,9 +24,9 @@
24#include <subcmd/parse-options.h> 24#include <subcmd/parse-options.h>
25#include "bench.h" 25#include "bench.h"
26#include "futex.h" 26#include "futex.h"
27#include "cpumap.h"
27 28
28#include <err.h> 29#include <err.h>
29#include <sys/time.h>
30 30
31static unsigned int nthreads = 0; 31static unsigned int nthreads = 0;
32static unsigned int nsecs = 10; 32static unsigned int nsecs = 10;
@@ -118,11 +118,12 @@ static void print_summary(void)
118int bench_futex_hash(int argc, const char **argv) 118int bench_futex_hash(int argc, const char **argv)
119{ 119{
120 int ret = 0; 120 int ret = 0;
121 cpu_set_t cpu; 121 cpu_set_t cpuset;
122 struct sigaction act; 122 struct sigaction act;
123 unsigned int i, ncpus; 123 unsigned int i;
124 pthread_attr_t thread_attr; 124 pthread_attr_t thread_attr;
125 struct worker *worker = NULL; 125 struct worker *worker = NULL;
126 struct cpu_map *cpu;
126 127
127 argc = parse_options(argc, argv, options, bench_futex_hash_usage, 0); 128 argc = parse_options(argc, argv, options, bench_futex_hash_usage, 0);
128 if (argc) { 129 if (argc) {
@@ -130,14 +131,16 @@ int bench_futex_hash(int argc, const char **argv)
130 exit(EXIT_FAILURE); 131 exit(EXIT_FAILURE);
131 } 132 }
132 133
133 ncpus = sysconf(_SC_NPROCESSORS_ONLN); 134 cpu = cpu_map__new(NULL);
135 if (!cpu)
136 goto errmem;
134 137
135 sigfillset(&act.sa_mask); 138 sigfillset(&act.sa_mask);
136 act.sa_sigaction = toggle_done; 139 act.sa_sigaction = toggle_done;
137 sigaction(SIGINT, &act, NULL); 140 sigaction(SIGINT, &act, NULL);
138 141
139 if (!nthreads) /* default to the number of CPUs */ 142 if (!nthreads) /* default to the number of CPUs */
140 nthreads = ncpus; 143 nthreads = cpu->nr;
141 144
142 worker = calloc(nthreads, sizeof(*worker)); 145 worker = calloc(nthreads, sizeof(*worker));
143 if (!worker) 146 if (!worker)
@@ -163,10 +166,10 @@ int bench_futex_hash(int argc, const char **argv)
163 if (!worker[i].futex) 166 if (!worker[i].futex)
164 goto errmem; 167 goto errmem;
165 168
166 CPU_ZERO(&cpu); 169 CPU_ZERO(&cpuset);
167 CPU_SET(i % ncpus, &cpu); 170 CPU_SET(cpu->map[i % cpu->nr], &cpuset);
168 171
169 ret = pthread_attr_setaffinity_np(&thread_attr, sizeof(cpu_set_t), &cpu); 172 ret = pthread_attr_setaffinity_np(&thread_attr, sizeof(cpu_set_t), &cpuset);
170 if (ret) 173 if (ret)
171 err(EXIT_FAILURE, "pthread_attr_setaffinity_np"); 174 err(EXIT_FAILURE, "pthread_attr_setaffinity_np");
172 175
@@ -217,6 +220,7 @@ int bench_futex_hash(int argc, const char **argv)
217 print_summary(); 220 print_summary();
218 221
219 free(worker); 222 free(worker);
223 free(cpu);
220 return ret; 224 return ret;
221errmem: 225errmem:
222 err(EXIT_FAILURE, "calloc"); 226 err(EXIT_FAILURE, "calloc");
diff --git a/tools/perf/bench/futex-lock-pi.c b/tools/perf/bench/futex-lock-pi.c
index 08653ae8a8c4..8e9c4753e304 100644
--- a/tools/perf/bench/futex-lock-pi.c
+++ b/tools/perf/bench/futex-lock-pi.c
@@ -15,6 +15,7 @@
15#include <errno.h> 15#include <errno.h>
16#include "bench.h" 16#include "bench.h"
17#include "futex.h" 17#include "futex.h"
18#include "cpumap.h"
18 19
19#include <err.h> 20#include <err.h>
20#include <stdlib.h> 21#include <stdlib.h>
@@ -32,7 +33,7 @@ static struct worker *worker;
32static unsigned int nsecs = 10; 33static unsigned int nsecs = 10;
33static bool silent = false, multi = false; 34static bool silent = false, multi = false;
34static bool done = false, fshared = false; 35static bool done = false, fshared = false;
35static unsigned int ncpus, nthreads = 0; 36static unsigned int nthreads = 0;
36static int futex_flag = 0; 37static int futex_flag = 0;
37struct timeval start, end, runtime; 38struct timeval start, end, runtime;
38static pthread_mutex_t thread_lock; 39static pthread_mutex_t thread_lock;
@@ -113,9 +114,10 @@ static void *workerfn(void *arg)
113 return NULL; 114 return NULL;
114} 115}
115 116
116static void create_threads(struct worker *w, pthread_attr_t thread_attr) 117static void create_threads(struct worker *w, pthread_attr_t thread_attr,
118 struct cpu_map *cpu)
117{ 119{
118 cpu_set_t cpu; 120 cpu_set_t cpuset;
119 unsigned int i; 121 unsigned int i;
120 122
121 threads_starting = nthreads; 123 threads_starting = nthreads;
@@ -130,10 +132,10 @@ static void create_threads(struct worker *w, pthread_attr_t thread_attr)
130 } else 132 } else
131 worker[i].futex = &global_futex; 133 worker[i].futex = &global_futex;
132 134
133 CPU_ZERO(&cpu); 135 CPU_ZERO(&cpuset);
134 CPU_SET(i % ncpus, &cpu); 136 CPU_SET(cpu->map[i % cpu->nr], &cpuset);
135 137
136 if (pthread_attr_setaffinity_np(&thread_attr, sizeof(cpu_set_t), &cpu)) 138 if (pthread_attr_setaffinity_np(&thread_attr, sizeof(cpu_set_t), &cpuset))
137 err(EXIT_FAILURE, "pthread_attr_setaffinity_np"); 139 err(EXIT_FAILURE, "pthread_attr_setaffinity_np");
138 140
139 if (pthread_create(&w[i].thread, &thread_attr, workerfn, &worker[i])) 141 if (pthread_create(&w[i].thread, &thread_attr, workerfn, &worker[i]))
@@ -147,19 +149,22 @@ int bench_futex_lock_pi(int argc, const char **argv)
147 unsigned int i; 149 unsigned int i;
148 struct sigaction act; 150 struct sigaction act;
149 pthread_attr_t thread_attr; 151 pthread_attr_t thread_attr;
152 struct cpu_map *cpu;
150 153
151 argc = parse_options(argc, argv, options, bench_futex_lock_pi_usage, 0); 154 argc = parse_options(argc, argv, options, bench_futex_lock_pi_usage, 0);
152 if (argc) 155 if (argc)
153 goto err; 156 goto err;
154 157
155 ncpus = sysconf(_SC_NPROCESSORS_ONLN); 158 cpu = cpu_map__new(NULL);
159 if (!cpu)
160 err(EXIT_FAILURE, "calloc");
156 161
157 sigfillset(&act.sa_mask); 162 sigfillset(&act.sa_mask);
158 act.sa_sigaction = toggle_done; 163 act.sa_sigaction = toggle_done;
159 sigaction(SIGINT, &act, NULL); 164 sigaction(SIGINT, &act, NULL);
160 165
161 if (!nthreads) 166 if (!nthreads)
162 nthreads = ncpus; 167 nthreads = cpu->nr;
163 168
164 worker = calloc(nthreads, sizeof(*worker)); 169 worker = calloc(nthreads, sizeof(*worker));
165 if (!worker) 170 if (!worker)
@@ -180,7 +185,7 @@ int bench_futex_lock_pi(int argc, const char **argv)
180 pthread_attr_init(&thread_attr); 185 pthread_attr_init(&thread_attr);
181 gettimeofday(&start, NULL); 186 gettimeofday(&start, NULL);
182 187
183 create_threads(worker, thread_attr); 188 create_threads(worker, thread_attr, cpu);
184 pthread_attr_destroy(&thread_attr); 189 pthread_attr_destroy(&thread_attr);
185 190
186 pthread_mutex_lock(&thread_lock); 191 pthread_mutex_lock(&thread_lock);
diff --git a/tools/perf/bench/futex-requeue.c b/tools/perf/bench/futex-requeue.c
index 1058c194608a..fc692efa0c05 100644
--- a/tools/perf/bench/futex-requeue.c
+++ b/tools/perf/bench/futex-requeue.c
@@ -22,6 +22,7 @@
22#include <errno.h> 22#include <errno.h>
23#include "bench.h" 23#include "bench.h"
24#include "futex.h" 24#include "futex.h"
25#include "cpumap.h"
25 26
26#include <err.h> 27#include <err.h>
27#include <stdlib.h> 28#include <stdlib.h>
@@ -40,7 +41,7 @@ static bool done = false, silent = false, fshared = false;
40static pthread_mutex_t thread_lock; 41static pthread_mutex_t thread_lock;
41static pthread_cond_t thread_parent, thread_worker; 42static pthread_cond_t thread_parent, thread_worker;
42static struct stats requeuetime_stats, requeued_stats; 43static struct stats requeuetime_stats, requeued_stats;
43static unsigned int ncpus, threads_starting, nthreads = 0; 44static unsigned int threads_starting, nthreads = 0;
44static int futex_flag = 0; 45static int futex_flag = 0;
45 46
46static const struct option options[] = { 47static const struct option options[] = {
@@ -83,19 +84,19 @@ static void *workerfn(void *arg __maybe_unused)
83} 84}
84 85
85static void block_threads(pthread_t *w, 86static void block_threads(pthread_t *w,
86 pthread_attr_t thread_attr) 87 pthread_attr_t thread_attr, struct cpu_map *cpu)
87{ 88{
88 cpu_set_t cpu; 89 cpu_set_t cpuset;
89 unsigned int i; 90 unsigned int i;
90 91
91 threads_starting = nthreads; 92 threads_starting = nthreads;
92 93
93 /* create and block all threads */ 94 /* create and block all threads */
94 for (i = 0; i < nthreads; i++) { 95 for (i = 0; i < nthreads; i++) {
95 CPU_ZERO(&cpu); 96 CPU_ZERO(&cpuset);
96 CPU_SET(i % ncpus, &cpu); 97 CPU_SET(cpu->map[i % cpu->nr], &cpuset);
97 98
98 if (pthread_attr_setaffinity_np(&thread_attr, sizeof(cpu_set_t), &cpu)) 99 if (pthread_attr_setaffinity_np(&thread_attr, sizeof(cpu_set_t), &cpuset))
99 err(EXIT_FAILURE, "pthread_attr_setaffinity_np"); 100 err(EXIT_FAILURE, "pthread_attr_setaffinity_np");
100 101
101 if (pthread_create(&w[i], &thread_attr, workerfn, NULL)) 102 if (pthread_create(&w[i], &thread_attr, workerfn, NULL))
@@ -116,19 +117,22 @@ int bench_futex_requeue(int argc, const char **argv)
116 unsigned int i, j; 117 unsigned int i, j;
117 struct sigaction act; 118 struct sigaction act;
118 pthread_attr_t thread_attr; 119 pthread_attr_t thread_attr;
120 struct cpu_map *cpu;
119 121
120 argc = parse_options(argc, argv, options, bench_futex_requeue_usage, 0); 122 argc = parse_options(argc, argv, options, bench_futex_requeue_usage, 0);
121 if (argc) 123 if (argc)
122 goto err; 124 goto err;
123 125
124 ncpus = sysconf(_SC_NPROCESSORS_ONLN); 126 cpu = cpu_map__new(NULL);
127 if (!cpu)
128 err(EXIT_FAILURE, "cpu_map__new");
125 129
126 sigfillset(&act.sa_mask); 130 sigfillset(&act.sa_mask);
127 act.sa_sigaction = toggle_done; 131 act.sa_sigaction = toggle_done;
128 sigaction(SIGINT, &act, NULL); 132 sigaction(SIGINT, &act, NULL);
129 133
130 if (!nthreads) 134 if (!nthreads)
131 nthreads = ncpus; 135 nthreads = cpu->nr;
132 136
133 worker = calloc(nthreads, sizeof(*worker)); 137 worker = calloc(nthreads, sizeof(*worker));
134 if (!worker) 138 if (!worker)
@@ -156,7 +160,7 @@ int bench_futex_requeue(int argc, const char **argv)
156 struct timeval start, end, runtime; 160 struct timeval start, end, runtime;
157 161
158 /* create, launch & block all threads */ 162 /* create, launch & block all threads */
159 block_threads(worker, thread_attr); 163 block_threads(worker, thread_attr, cpu);
160 164
161 /* make sure all threads are already blocked */ 165 /* make sure all threads are already blocked */
162 pthread_mutex_lock(&thread_lock); 166 pthread_mutex_lock(&thread_lock);
diff --git a/tools/perf/bench/futex-wake-parallel.c b/tools/perf/bench/futex-wake-parallel.c
index b4732dad9f89..69d8fdc87315 100644
--- a/tools/perf/bench/futex-wake-parallel.c
+++ b/tools/perf/bench/futex-wake-parallel.c
@@ -7,7 +7,17 @@
7 * for each individual thread to service its share of work. Ultimately 7 * for each individual thread to service its share of work. Ultimately
8 * it can be used to measure futex_wake() changes. 8 * it can be used to measure futex_wake() changes.
9 */ 9 */
10#include "bench.h"
11#include <linux/compiler.h>
12#include "../util/debug.h"
10 13
14#ifndef HAVE_PTHREAD_BARRIER
15int bench_futex_wake_parallel(int argc __maybe_unused, const char **argv __maybe_unused)
16{
17 pr_err("%s: pthread_barrier_t unavailable, disabling this test...\n", __func__);
18 return 0;
19}
20#else /* HAVE_PTHREAD_BARRIER */
11/* For the CLR_() macros */ 21/* For the CLR_() macros */
12#include <string.h> 22#include <string.h>
13#include <pthread.h> 23#include <pthread.h>
@@ -15,12 +25,11 @@
15#include <signal.h> 25#include <signal.h>
16#include "../util/stat.h" 26#include "../util/stat.h"
17#include <subcmd/parse-options.h> 27#include <subcmd/parse-options.h>
18#include <linux/compiler.h>
19#include <linux/kernel.h> 28#include <linux/kernel.h>
20#include <linux/time64.h> 29#include <linux/time64.h>
21#include <errno.h> 30#include <errno.h>
22#include "bench.h"
23#include "futex.h" 31#include "futex.h"
32#include "cpumap.h"
24 33
25#include <err.h> 34#include <err.h>
26#include <stdlib.h> 35#include <stdlib.h>
@@ -42,8 +51,9 @@ static bool done = false, silent = false, fshared = false;
42static unsigned int nblocked_threads = 0, nwaking_threads = 0; 51static unsigned int nblocked_threads = 0, nwaking_threads = 0;
43static pthread_mutex_t thread_lock; 52static pthread_mutex_t thread_lock;
44static pthread_cond_t thread_parent, thread_worker; 53static pthread_cond_t thread_parent, thread_worker;
54static pthread_barrier_t barrier;
45static struct stats waketime_stats, wakeup_stats; 55static struct stats waketime_stats, wakeup_stats;
46static unsigned int ncpus, threads_starting; 56static unsigned int threads_starting;
47static int futex_flag = 0; 57static int futex_flag = 0;
48 58
49static const struct option options[] = { 59static const struct option options[] = {
@@ -64,6 +74,8 @@ static void *waking_workerfn(void *arg)
64 struct thread_data *waker = (struct thread_data *) arg; 74 struct thread_data *waker = (struct thread_data *) arg;
65 struct timeval start, end; 75 struct timeval start, end;
66 76
77 pthread_barrier_wait(&barrier);
78
67 gettimeofday(&start, NULL); 79 gettimeofday(&start, NULL);
68 80
69 waker->nwoken = futex_wake(&futex, nwakes, futex_flag); 81 waker->nwoken = futex_wake(&futex, nwakes, futex_flag);
@@ -84,6 +96,8 @@ static void wakeup_threads(struct thread_data *td, pthread_attr_t thread_attr)
84 96
85 pthread_attr_setdetachstate(&thread_attr, PTHREAD_CREATE_JOINABLE); 97 pthread_attr_setdetachstate(&thread_attr, PTHREAD_CREATE_JOINABLE);
86 98
99 pthread_barrier_init(&barrier, NULL, nwaking_threads + 1);
100
87 /* create and block all threads */ 101 /* create and block all threads */
88 for (i = 0; i < nwaking_threads; i++) { 102 for (i = 0; i < nwaking_threads; i++) {
89 /* 103 /*
@@ -96,9 +110,13 @@ static void wakeup_threads(struct thread_data *td, pthread_attr_t thread_attr)
96 err(EXIT_FAILURE, "pthread_create"); 110 err(EXIT_FAILURE, "pthread_create");
97 } 111 }
98 112
113 pthread_barrier_wait(&barrier);
114
99 for (i = 0; i < nwaking_threads; i++) 115 for (i = 0; i < nwaking_threads; i++)
100 if (pthread_join(td[i].worker, NULL)) 116 if (pthread_join(td[i].worker, NULL))
101 err(EXIT_FAILURE, "pthread_join"); 117 err(EXIT_FAILURE, "pthread_join");
118
119 pthread_barrier_destroy(&barrier);
102} 120}
103 121
104static void *blocked_workerfn(void *arg __maybe_unused) 122static void *blocked_workerfn(void *arg __maybe_unused)
@@ -119,19 +137,20 @@ static void *blocked_workerfn(void *arg __maybe_unused)
119 return NULL; 137 return NULL;
120} 138}
121 139
122static void block_threads(pthread_t *w, pthread_attr_t thread_attr) 140static void block_threads(pthread_t *w, pthread_attr_t thread_attr,
141 struct cpu_map *cpu)
123{ 142{
124 cpu_set_t cpu; 143 cpu_set_t cpuset;
125 unsigned int i; 144 unsigned int i;
126 145
127 threads_starting = nblocked_threads; 146 threads_starting = nblocked_threads;
128 147
129 /* create and block all threads */ 148 /* create and block all threads */
130 for (i = 0; i < nblocked_threads; i++) { 149 for (i = 0; i < nblocked_threads; i++) {
131 CPU_ZERO(&cpu); 150 CPU_ZERO(&cpuset);
132 CPU_SET(i % ncpus, &cpu); 151 CPU_SET(cpu->map[i % cpu->nr], &cpuset);
133 152
134 if (pthread_attr_setaffinity_np(&thread_attr, sizeof(cpu_set_t), &cpu)) 153 if (pthread_attr_setaffinity_np(&thread_attr, sizeof(cpu_set_t), &cpuset))
135 err(EXIT_FAILURE, "pthread_attr_setaffinity_np"); 154 err(EXIT_FAILURE, "pthread_attr_setaffinity_np");
136 155
137 if (pthread_create(&w[i], &thread_attr, blocked_workerfn, NULL)) 156 if (pthread_create(&w[i], &thread_attr, blocked_workerfn, NULL))
@@ -205,6 +224,7 @@ int bench_futex_wake_parallel(int argc, const char **argv)
205 struct sigaction act; 224 struct sigaction act;
206 pthread_attr_t thread_attr; 225 pthread_attr_t thread_attr;
207 struct thread_data *waking_worker; 226 struct thread_data *waking_worker;
227 struct cpu_map *cpu;
208 228
209 argc = parse_options(argc, argv, options, 229 argc = parse_options(argc, argv, options,
210 bench_futex_wake_parallel_usage, 0); 230 bench_futex_wake_parallel_usage, 0);
@@ -217,9 +237,12 @@ int bench_futex_wake_parallel(int argc, const char **argv)
217 act.sa_sigaction = toggle_done; 237 act.sa_sigaction = toggle_done;
218 sigaction(SIGINT, &act, NULL); 238 sigaction(SIGINT, &act, NULL);
219 239
220 ncpus = sysconf(_SC_NPROCESSORS_ONLN); 240 cpu = cpu_map__new(NULL);
241 if (!cpu)
242 err(EXIT_FAILURE, "calloc");
243
221 if (!nblocked_threads) 244 if (!nblocked_threads)
222 nblocked_threads = ncpus; 245 nblocked_threads = cpu->nr;
223 246
224 /* some sanity checks */ 247 /* some sanity checks */
225 if (nwaking_threads > nblocked_threads || !nwaking_threads) 248 if (nwaking_threads > nblocked_threads || !nwaking_threads)
@@ -259,7 +282,7 @@ int bench_futex_wake_parallel(int argc, const char **argv)
259 err(EXIT_FAILURE, "calloc"); 282 err(EXIT_FAILURE, "calloc");
260 283
261 /* create, launch & block all threads */ 284 /* create, launch & block all threads */
262 block_threads(blocked_worker, thread_attr); 285 block_threads(blocked_worker, thread_attr, cpu);
263 286
264 /* make sure all threads are already blocked */ 287 /* make sure all threads are already blocked */
265 pthread_mutex_lock(&thread_lock); 288 pthread_mutex_lock(&thread_lock);
@@ -297,3 +320,4 @@ int bench_futex_wake_parallel(int argc, const char **argv)
297 free(blocked_worker); 320 free(blocked_worker);
298 return ret; 321 return ret;
299} 322}
323#endif /* HAVE_PTHREAD_BARRIER */
diff --git a/tools/perf/bench/futex-wake.c b/tools/perf/bench/futex-wake.c
index 8c5c0b6b5c97..e8181ad7d088 100644
--- a/tools/perf/bench/futex-wake.c
+++ b/tools/perf/bench/futex-wake.c
@@ -22,6 +22,7 @@
22#include <errno.h> 22#include <errno.h>
23#include "bench.h" 23#include "bench.h"
24#include "futex.h" 24#include "futex.h"
25#include "cpumap.h"
25 26
26#include <err.h> 27#include <err.h>
27#include <stdlib.h> 28#include <stdlib.h>
@@ -89,19 +90,19 @@ static void print_summary(void)
89} 90}
90 91
91static void block_threads(pthread_t *w, 92static void block_threads(pthread_t *w,
92 pthread_attr_t thread_attr) 93 pthread_attr_t thread_attr, struct cpu_map *cpu)
93{ 94{
94 cpu_set_t cpu; 95 cpu_set_t cpuset;
95 unsigned int i; 96 unsigned int i;
96 97
97 threads_starting = nthreads; 98 threads_starting = nthreads;
98 99
99 /* create and block all threads */ 100 /* create and block all threads */
100 for (i = 0; i < nthreads; i++) { 101 for (i = 0; i < nthreads; i++) {
101 CPU_ZERO(&cpu); 102 CPU_ZERO(&cpuset);
102 CPU_SET(i % ncpus, &cpu); 103 CPU_SET(cpu->map[i % cpu->nr], &cpuset);
103 104
104 if (pthread_attr_setaffinity_np(&thread_attr, sizeof(cpu_set_t), &cpu)) 105 if (pthread_attr_setaffinity_np(&thread_attr, sizeof(cpu_set_t), &cpuset))
105 err(EXIT_FAILURE, "pthread_attr_setaffinity_np"); 106 err(EXIT_FAILURE, "pthread_attr_setaffinity_np");
106 107
107 if (pthread_create(&w[i], &thread_attr, workerfn, NULL)) 108 if (pthread_create(&w[i], &thread_attr, workerfn, NULL))
@@ -122,6 +123,7 @@ int bench_futex_wake(int argc, const char **argv)
122 unsigned int i, j; 123 unsigned int i, j;
123 struct sigaction act; 124 struct sigaction act;
124 pthread_attr_t thread_attr; 125 pthread_attr_t thread_attr;
126 struct cpu_map *cpu;
125 127
126 argc = parse_options(argc, argv, options, bench_futex_wake_usage, 0); 128 argc = parse_options(argc, argv, options, bench_futex_wake_usage, 0);
127 if (argc) { 129 if (argc) {
@@ -129,7 +131,9 @@ int bench_futex_wake(int argc, const char **argv)
129 exit(EXIT_FAILURE); 131 exit(EXIT_FAILURE);
130 } 132 }
131 133
132 ncpus = sysconf(_SC_NPROCESSORS_ONLN); 134 cpu = cpu_map__new(NULL);
135 if (!cpu)
136 err(EXIT_FAILURE, "calloc");
133 137
134 sigfillset(&act.sa_mask); 138 sigfillset(&act.sa_mask);
135 act.sa_sigaction = toggle_done; 139 act.sa_sigaction = toggle_done;
@@ -161,7 +165,7 @@ int bench_futex_wake(int argc, const char **argv)
161 struct timeval start, end, runtime; 165 struct timeval start, end, runtime;
162 166
163 /* create, launch & block all threads */ 167 /* create, launch & block all threads */
164 block_threads(worker, thread_attr); 168 block_threads(worker, thread_attr, cpu);
165 169
166 /* make sure all threads are already blocked */ 170 /* make sure all threads are already blocked */
167 pthread_mutex_lock(&thread_lock); 171 pthread_mutex_lock(&thread_lock);
diff --git a/tools/perf/bench/numa.c b/tools/perf/bench/numa.c
index d95fdcc26f4b..944070e98a2c 100644
--- a/tools/perf/bench/numa.c
+++ b/tools/perf/bench/numa.c
@@ -216,6 +216,47 @@ static const char * const numa_usage[] = {
216 NULL 216 NULL
217}; 217};
218 218
219/*
220 * To get number of numa nodes present.
221 */
222static int nr_numa_nodes(void)
223{
224 int i, nr_nodes = 0;
225
226 for (i = 0; i < g->p.nr_nodes; i++) {
227 if (numa_bitmask_isbitset(numa_nodes_ptr, i))
228 nr_nodes++;
229 }
230
231 return nr_nodes;
232}
233
234/*
235 * To check if given numa node is present.
236 */
237static int is_node_present(int node)
238{
239 return numa_bitmask_isbitset(numa_nodes_ptr, node);
240}
241
242/*
243 * To check given numa node has cpus.
244 */
245static bool node_has_cpus(int node)
246{
247 struct bitmask *cpu = numa_allocate_cpumask();
248 unsigned int i;
249
250 if (cpu && !numa_node_to_cpus(node, cpu)) {
251 for (i = 0; i < cpu->size; i++) {
252 if (numa_bitmask_isbitset(cpu, i))
253 return true;
254 }
255 }
256
257 return false; /* lets fall back to nocpus safely */
258}
259
219static cpu_set_t bind_to_cpu(int target_cpu) 260static cpu_set_t bind_to_cpu(int target_cpu)
220{ 261{
221 cpu_set_t orig_mask, mask; 262 cpu_set_t orig_mask, mask;
@@ -244,12 +285,12 @@ static cpu_set_t bind_to_cpu(int target_cpu)
244 285
245static cpu_set_t bind_to_node(int target_node) 286static cpu_set_t bind_to_node(int target_node)
246{ 287{
247 int cpus_per_node = g->p.nr_cpus/g->p.nr_nodes; 288 int cpus_per_node = g->p.nr_cpus / nr_numa_nodes();
248 cpu_set_t orig_mask, mask; 289 cpu_set_t orig_mask, mask;
249 int cpu; 290 int cpu;
250 int ret; 291 int ret;
251 292
252 BUG_ON(cpus_per_node*g->p.nr_nodes != g->p.nr_cpus); 293 BUG_ON(cpus_per_node * nr_numa_nodes() != g->p.nr_cpus);
253 BUG_ON(!cpus_per_node); 294 BUG_ON(!cpus_per_node);
254 295
255 ret = sched_getaffinity(0, sizeof(orig_mask), &orig_mask); 296 ret = sched_getaffinity(0, sizeof(orig_mask), &orig_mask);
@@ -649,7 +690,7 @@ static int parse_setup_node_list(void)
649 int i; 690 int i;
650 691
651 for (i = 0; i < mul; i++) { 692 for (i = 0; i < mul; i++) {
652 if (t >= g->p.nr_tasks) { 693 if (t >= g->p.nr_tasks || !node_has_cpus(bind_node)) {
653 printf("\n# NOTE: ignoring bind NODEs starting at NODE#%d\n", bind_node); 694 printf("\n# NOTE: ignoring bind NODEs starting at NODE#%d\n", bind_node);
654 goto out; 695 goto out;
655 } 696 }
@@ -964,6 +1005,8 @@ static void calc_convergence(double runtime_ns_max, double *convergence)
964 sum = 0; 1005 sum = 0;
965 1006
966 for (node = 0; node < g->p.nr_nodes; node++) { 1007 for (node = 0; node < g->p.nr_nodes; node++) {
1008 if (!is_node_present(node))
1009 continue;
967 nr = nodes[node]; 1010 nr = nodes[node];
968 nr_min = min(nr, nr_min); 1011 nr_min = min(nr, nr_min);
969 nr_max = max(nr, nr_max); 1012 nr_max = max(nr, nr_max);
@@ -984,8 +1027,11 @@ static void calc_convergence(double runtime_ns_max, double *convergence)
984 process_groups = 0; 1027 process_groups = 0;
985 1028
986 for (node = 0; node < g->p.nr_nodes; node++) { 1029 for (node = 0; node < g->p.nr_nodes; node++) {
987 int processes = count_node_processes(node); 1030 int processes;
988 1031
1032 if (!is_node_present(node))
1033 continue;
1034 processes = count_node_processes(node);
989 nr = nodes[node]; 1035 nr = nodes[node];
990 tprintf(" %2d/%-2d", nr, processes); 1036 tprintf(" %2d/%-2d", nr, processes);
991 1037
@@ -1291,7 +1337,7 @@ static void print_summary(void)
1291 1337
1292 printf("\n ###\n"); 1338 printf("\n ###\n");
1293 printf(" # %d %s will execute (on %d nodes, %d CPUs):\n", 1339 printf(" # %d %s will execute (on %d nodes, %d CPUs):\n",
1294 g->p.nr_tasks, g->p.nr_tasks == 1 ? "task" : "tasks", g->p.nr_nodes, g->p.nr_cpus); 1340 g->p.nr_tasks, g->p.nr_tasks == 1 ? "task" : "tasks", nr_numa_nodes(), g->p.nr_cpus);
1295 printf(" # %5dx %5ldMB global shared mem operations\n", 1341 printf(" # %5dx %5ldMB global shared mem operations\n",
1296 g->p.nr_loops, g->p.bytes_global/1024/1024); 1342 g->p.nr_loops, g->p.bytes_global/1024/1024);
1297 printf(" # %5dx %5ldMB process shared mem operations\n", 1343 printf(" # %5dx %5ldMB process shared mem operations\n",
diff --git a/tools/perf/builtin-annotate.c b/tools/perf/builtin-annotate.c
index 3d32aa45016d..f15731a3d438 100644
--- a/tools/perf/builtin-annotate.c
+++ b/tools/perf/builtin-annotate.c
@@ -357,7 +357,7 @@ static int __cmd_annotate(struct perf_annotate *ann)
357 } 357 }
358 358
359 if (total_nr_samples == 0) { 359 if (total_nr_samples == 0) {
360 ui__error("The %s file has no samples!\n", session->file->path); 360 ui__error("The %s file has no samples!\n", session->data->file.path);
361 goto out; 361 goto out;
362 } 362 }
363 363
@@ -401,7 +401,7 @@ int cmd_annotate(int argc, const char **argv)
401 .ordering_requires_timestamps = true, 401 .ordering_requires_timestamps = true,
402 }, 402 },
403 }; 403 };
404 struct perf_data_file file = { 404 struct perf_data data = {
405 .mode = PERF_DATA_MODE_READ, 405 .mode = PERF_DATA_MODE_READ,
406 }; 406 };
407 struct option options[] = { 407 struct option options[] = {
@@ -411,7 +411,7 @@ int cmd_annotate(int argc, const char **argv)
411 "only consider symbols in these dsos"), 411 "only consider symbols in these dsos"),
412 OPT_STRING('s', "symbol", &annotate.sym_hist_filter, "symbol", 412 OPT_STRING('s', "symbol", &annotate.sym_hist_filter, "symbol",
413 "symbol to annotate"), 413 "symbol to annotate"),
414 OPT_BOOLEAN('f', "force", &file.force, "don't complain, do it"), 414 OPT_BOOLEAN('f', "force", &data.force, "don't complain, do it"),
415 OPT_INCR('v', "verbose", &verbose, 415 OPT_INCR('v', "verbose", &verbose,
416 "be more verbose (show symbol address, etc)"), 416 "be more verbose (show symbol address, etc)"),
417 OPT_BOOLEAN('q', "quiet", &quiet, "do now show any message"), 417 OPT_BOOLEAN('q', "quiet", &quiet, "do now show any message"),
@@ -483,9 +483,9 @@ int cmd_annotate(int argc, const char **argv)
483 if (quiet) 483 if (quiet)
484 perf_quiet_option(); 484 perf_quiet_option();
485 485
486 file.path = input_name; 486 data.file.path = input_name;
487 487
488 annotate.session = perf_session__new(&file, false, &annotate.tool); 488 annotate.session = perf_session__new(&data, false, &annotate.tool);
489 if (annotate.session == NULL) 489 if (annotate.session == NULL)
490 return -1; 490 return -1;
491 491
diff --git a/tools/perf/builtin-buildid-cache.c b/tools/perf/builtin-buildid-cache.c
index 5f53a7ad5ef3..41db2cba77eb 100644
--- a/tools/perf/builtin-buildid-cache.c
+++ b/tools/perf/builtin-buildid-cache.c
@@ -312,7 +312,7 @@ int cmd_buildid_cache(int argc, const char **argv)
312 *kcore_filename = NULL; 312 *kcore_filename = NULL;
313 char sbuf[STRERR_BUFSIZE]; 313 char sbuf[STRERR_BUFSIZE];
314 314
315 struct perf_data_file file = { 315 struct perf_data data = {
316 .mode = PERF_DATA_MODE_READ, 316 .mode = PERF_DATA_MODE_READ,
317 }; 317 };
318 struct perf_session *session = NULL; 318 struct perf_session *session = NULL;
@@ -325,8 +325,8 @@ int cmd_buildid_cache(int argc, const char **argv)
325 "file", "kcore file to add"), 325 "file", "kcore file to add"),
326 OPT_STRING('r', "remove", &remove_name_list_str, "file list", 326 OPT_STRING('r', "remove", &remove_name_list_str, "file list",
327 "file(s) to remove"), 327 "file(s) to remove"),
328 OPT_STRING('p', "purge", &purge_name_list_str, "path list", 328 OPT_STRING('p', "purge", &purge_name_list_str, "file list",
329 "path(s) to remove (remove old caches too)"), 329 "file(s) to remove (remove old caches too)"),
330 OPT_STRING('M', "missing", &missing_filename, "file", 330 OPT_STRING('M', "missing", &missing_filename, "file",
331 "to find missing build ids in the cache"), 331 "to find missing build ids in the cache"),
332 OPT_BOOLEAN('f', "force", &force, "don't complain, do it"), 332 OPT_BOOLEAN('f', "force", &force, "don't complain, do it"),
@@ -353,10 +353,10 @@ int cmd_buildid_cache(int argc, const char **argv)
353 nsi = nsinfo__new(ns_id); 353 nsi = nsinfo__new(ns_id);
354 354
355 if (missing_filename) { 355 if (missing_filename) {
356 file.path = missing_filename; 356 data.file.path = missing_filename;
357 file.force = force; 357 data.force = force;
358 358
359 session = perf_session__new(&file, false, NULL); 359 session = perf_session__new(&data, false, NULL);
360 if (session == NULL) 360 if (session == NULL)
361 return -1; 361 return -1;
362 } 362 }
diff --git a/tools/perf/builtin-buildid-list.c b/tools/perf/builtin-buildid-list.c
index ec2f327cd79d..78abbe8d9d5f 100644
--- a/tools/perf/builtin-buildid-list.c
+++ b/tools/perf/builtin-buildid-list.c
@@ -51,10 +51,12 @@ static bool dso__skip_buildid(struct dso *dso, int with_hits)
51static int perf_session__list_build_ids(bool force, bool with_hits) 51static int perf_session__list_build_ids(bool force, bool with_hits)
52{ 52{
53 struct perf_session *session; 53 struct perf_session *session;
54 struct perf_data_file file = { 54 struct perf_data data = {
55 .path = input_name, 55 .file = {
56 .mode = PERF_DATA_MODE_READ, 56 .path = input_name,
57 .force = force, 57 },
58 .mode = PERF_DATA_MODE_READ,
59 .force = force,
58 }; 60 };
59 61
60 symbol__elf_init(); 62 symbol__elf_init();
@@ -64,7 +66,7 @@ static int perf_session__list_build_ids(bool force, bool with_hits)
64 if (filename__fprintf_build_id(input_name, stdout) > 0) 66 if (filename__fprintf_build_id(input_name, stdout) > 0)
65 goto out; 67 goto out;
66 68
67 session = perf_session__new(&file, false, &build_id__mark_dso_hit_ops); 69 session = perf_session__new(&data, false, &build_id__mark_dso_hit_ops);
68 if (session == NULL) 70 if (session == NULL)
69 return -1; 71 return -1;
70 72
@@ -72,7 +74,7 @@ static int perf_session__list_build_ids(bool force, bool with_hits)
72 * We take all buildids when the file contains AUX area tracing data 74 * We take all buildids when the file contains AUX area tracing data
73 * because we do not decode the trace because it would take too long. 75 * because we do not decode the trace because it would take too long.
74 */ 76 */
75 if (!perf_data_file__is_pipe(&file) && 77 if (!perf_data__is_pipe(&data) &&
76 perf_header__has_feat(&session->header, HEADER_AUXTRACE)) 78 perf_header__has_feat(&session->header, HEADER_AUXTRACE))
77 with_hits = false; 79 with_hits = false;
78 80
@@ -80,7 +82,7 @@ static int perf_session__list_build_ids(bool force, bool with_hits)
80 * in pipe-mode, the only way to get the buildids is to parse 82 * in pipe-mode, the only way to get the buildids is to parse
81 * the record stream. Buildids are stored as RECORD_HEADER_BUILD_ID 83 * the record stream. Buildids are stored as RECORD_HEADER_BUILD_ID
82 */ 84 */
83 if (with_hits || perf_data_file__is_pipe(&file)) 85 if (with_hits || perf_data__is_pipe(&data))
84 perf_session__process_events(session); 86 perf_session__process_events(session);
85 87
86 perf_session__fprintf_dsos_buildid(session, stdout, dso__skip_buildid, with_hits); 88 perf_session__fprintf_dsos_buildid(session, stdout, dso__skip_buildid, with_hits);
diff --git a/tools/perf/builtin-c2c.c b/tools/perf/builtin-c2c.c
index fd32ad08c6d4..539c3d460158 100644
--- a/tools/perf/builtin-c2c.c
+++ b/tools/perf/builtin-c2c.c
@@ -27,13 +27,10 @@
27#include "sort.h" 27#include "sort.h"
28#include "tool.h" 28#include "tool.h"
29#include "data.h" 29#include "data.h"
30#include "sort.h"
31#include "event.h" 30#include "event.h"
32#include "evlist.h" 31#include "evlist.h"
33#include "evsel.h" 32#include "evsel.h"
34#include <asm/bug.h>
35#include "ui/browsers/hists.h" 33#include "ui/browsers/hists.h"
36#include "evlist.h"
37#include "thread.h" 34#include "thread.h"
38 35
39struct c2c_hists { 36struct c2c_hists {
@@ -2224,9 +2221,9 @@ static int perf_c2c__browse_cacheline(struct hist_entry *he)
2224 struct hist_browser *browser; 2221 struct hist_browser *browser;
2225 int key = -1; 2222 int key = -1;
2226 const char help[] = 2223 const char help[] =
2227 " ENTER Togle callchains (if present) \n" 2224 " ENTER Toggle callchains (if present) \n"
2228 " n Togle Node details info \n" 2225 " n Toggle Node details info \n"
2229 " s Togle full lenght of symbol and source line columns \n" 2226 " s Toggle full length of symbol and source line columns \n"
2230 " q Return back to cacheline list \n"; 2227 " q Return back to cacheline list \n";
2231 2228
2232 /* Display compact version first. */ 2229 /* Display compact version first. */
@@ -2248,7 +2245,7 @@ static int perf_c2c__browse_cacheline(struct hist_entry *he)
2248 c2c_browser__update_nr_entries(browser); 2245 c2c_browser__update_nr_entries(browser);
2249 2246
2250 while (1) { 2247 while (1) {
2251 key = hist_browser__run(browser, "? - help"); 2248 key = hist_browser__run(browser, "? - help", true);
2252 2249
2253 switch (key) { 2250 switch (key) {
2254 case 's': 2251 case 's':
@@ -2303,7 +2300,7 @@ static int perf_c2c__hists_browse(struct hists *hists)
2303 int key = -1; 2300 int key = -1;
2304 const char help[] = 2301 const char help[] =
2305 " d Display cacheline details \n" 2302 " d Display cacheline details \n"
2306 " ENTER Togle callchains (if present) \n" 2303 " ENTER Toggle callchains (if present) \n"
2307 " q Quit \n"; 2304 " q Quit \n";
2308 2305
2309 browser = perf_c2c_browser__new(hists); 2306 browser = perf_c2c_browser__new(hists);
@@ -2317,7 +2314,7 @@ static int perf_c2c__hists_browse(struct hists *hists)
2317 c2c_browser__update_nr_entries(browser); 2314 c2c_browser__update_nr_entries(browser);
2318 2315
2319 while (1) { 2316 while (1) {
2320 key = hist_browser__run(browser, "? - help"); 2317 key = hist_browser__run(browser, "? - help", true);
2321 2318
2322 switch (key) { 2319 switch (key) {
2323 case 'q': 2320 case 'q':
@@ -2393,9 +2390,10 @@ static int setup_callchain(struct perf_evlist *evlist)
2393 enum perf_call_graph_mode mode = CALLCHAIN_NONE; 2390 enum perf_call_graph_mode mode = CALLCHAIN_NONE;
2394 2391
2395 if ((sample_type & PERF_SAMPLE_REGS_USER) && 2392 if ((sample_type & PERF_SAMPLE_REGS_USER) &&
2396 (sample_type & PERF_SAMPLE_STACK_USER)) 2393 (sample_type & PERF_SAMPLE_STACK_USER)) {
2397 mode = CALLCHAIN_DWARF; 2394 mode = CALLCHAIN_DWARF;
2398 else if (sample_type & PERF_SAMPLE_BRANCH_STACK) 2395 dwarf_callchain_users = true;
2396 } else if (sample_type & PERF_SAMPLE_BRANCH_STACK)
2399 mode = CALLCHAIN_LBR; 2397 mode = CALLCHAIN_LBR;
2400 else if (sample_type & PERF_SAMPLE_CALLCHAIN) 2398 else if (sample_type & PERF_SAMPLE_CALLCHAIN)
2401 mode = CALLCHAIN_FP; 2399 mode = CALLCHAIN_FP;
@@ -2524,7 +2522,7 @@ static int perf_c2c__report(int argc, const char **argv)
2524{ 2522{
2525 struct perf_session *session; 2523 struct perf_session *session;
2526 struct ui_progress prog; 2524 struct ui_progress prog;
2527 struct perf_data_file file = { 2525 struct perf_data data = {
2528 .mode = PERF_DATA_MODE_READ, 2526 .mode = PERF_DATA_MODE_READ,
2529 }; 2527 };
2530 char callchain_default_opt[] = CALLCHAIN_DEFAULT_OPT; 2528 char callchain_default_opt[] = CALLCHAIN_DEFAULT_OPT;
@@ -2573,8 +2571,8 @@ static int perf_c2c__report(int argc, const char **argv)
2573 if (!input_name || !strlen(input_name)) 2571 if (!input_name || !strlen(input_name))
2574 input_name = "perf.data"; 2572 input_name = "perf.data";
2575 2573
2576 file.path = input_name; 2574 data.file.path = input_name;
2577 file.force = symbol_conf.force; 2575 data.force = symbol_conf.force;
2578 2576
2579 err = setup_display(display); 2577 err = setup_display(display);
2580 if (err) 2578 if (err)
@@ -2592,7 +2590,7 @@ static int perf_c2c__report(int argc, const char **argv)
2592 goto out; 2590 goto out;
2593 } 2591 }
2594 2592
2595 session = perf_session__new(&file, 0, &c2c.tool); 2593 session = perf_session__new(&data, 0, &c2c.tool);
2596 if (session == NULL) { 2594 if (session == NULL) {
2597 pr_debug("No memory for session\n"); 2595 pr_debug("No memory for session\n");
2598 goto out; 2596 goto out;
@@ -2612,7 +2610,7 @@ static int perf_c2c__report(int argc, const char **argv)
2612 goto out_session; 2610 goto out_session;
2613 2611
2614 /* No pipe support at the moment. */ 2612 /* No pipe support at the moment. */
2615 if (perf_data_file__is_pipe(session->file)) { 2613 if (perf_data__is_pipe(session->data)) {
2616 pr_debug("No pipe support at the moment.\n"); 2614 pr_debug("No pipe support at the moment.\n");
2617 goto out_session; 2615 goto out_session;
2618 } 2616 }
@@ -2733,6 +2731,7 @@ static int perf_c2c__record(int argc, const char **argv)
2733 if (!perf_mem_events[j].supported) { 2731 if (!perf_mem_events[j].supported) {
2734 pr_err("failed: event '%s' not supported\n", 2732 pr_err("failed: event '%s' not supported\n",
2735 perf_mem_events[j].name); 2733 perf_mem_events[j].name);
2734 free(rec_argv);
2736 return -1; 2735 return -1;
2737 } 2736 }
2738 2737
diff --git a/tools/perf/builtin-config.c b/tools/perf/builtin-config.c
index abfa49eaf7fd..514f70f95b57 100644
--- a/tools/perf/builtin-config.c
+++ b/tools/perf/builtin-config.c
@@ -35,8 +35,7 @@ static struct option config_options[] = {
35 OPT_END() 35 OPT_END()
36}; 36};
37 37
38static int set_config(struct perf_config_set *set, const char *file_name, 38static int set_config(struct perf_config_set *set, const char *file_name)
39 const char *var, const char *value)
40{ 39{
41 struct perf_config_section *section = NULL; 40 struct perf_config_section *section = NULL;
42 struct perf_config_item *item = NULL; 41 struct perf_config_item *item = NULL;
@@ -50,7 +49,6 @@ static int set_config(struct perf_config_set *set, const char *file_name,
50 if (!fp) 49 if (!fp)
51 return -1; 50 return -1;
52 51
53 perf_config_set__collect(set, file_name, var, value);
54 fprintf(fp, "%s\n", first_line); 52 fprintf(fp, "%s\n", first_line);
55 53
56 /* overwrite configvariables */ 54 /* overwrite configvariables */
@@ -162,6 +160,7 @@ int cmd_config(int argc, const char **argv)
162 struct perf_config_set *set; 160 struct perf_config_set *set;
163 char *user_config = mkpath("%s/.perfconfig", getenv("HOME")); 161 char *user_config = mkpath("%s/.perfconfig", getenv("HOME"));
164 const char *config_filename; 162 const char *config_filename;
163 bool changed = false;
165 164
166 argc = parse_options(argc, argv, config_options, config_usage, 165 argc = parse_options(argc, argv, config_options, config_usage,
167 PARSE_OPT_STOP_AT_NON_OPTION); 166 PARSE_OPT_STOP_AT_NON_OPTION);
@@ -232,15 +231,26 @@ int cmd_config(int argc, const char **argv)
232 goto out_err; 231 goto out_err;
233 } 232 }
234 } else { 233 } else {
235 if (set_config(set, config_filename, var, value) < 0) { 234 if (perf_config_set__collect(set, config_filename,
236 pr_err("Failed to set '%s=%s' on %s\n", 235 var, value) < 0) {
237 var, value, config_filename); 236 pr_err("Failed to add '%s=%s'\n",
237 var, value);
238 free(arg); 238 free(arg);
239 goto out_err; 239 goto out_err;
240 } 240 }
241 changed = true;
241 } 242 }
242 free(arg); 243 free(arg);
243 } 244 }
245
246 if (!changed)
247 break;
248
249 if (set_config(set, config_filename) < 0) {
250 pr_err("Failed to set the configs on %s\n",
251 config_filename);
252 goto out_err;
253 }
244 } 254 }
245 255
246 ret = 0; 256 ret = 0;
diff --git a/tools/perf/builtin-diff.c b/tools/perf/builtin-diff.c
index 56223bdfa205..d660cb7b222b 100644
--- a/tools/perf/builtin-diff.c
+++ b/tools/perf/builtin-diff.c
@@ -48,7 +48,7 @@ struct diff_hpp_fmt {
48 48
49struct data__file { 49struct data__file {
50 struct perf_session *session; 50 struct perf_session *session;
51 struct perf_data_file file; 51 struct perf_data data;
52 int idx; 52 int idx;
53 struct hists *hists; 53 struct hists *hists;
54 struct diff_hpp_fmt fmt[PERF_HPP_DIFF__MAX_INDEX]; 54 struct diff_hpp_fmt fmt[PERF_HPP_DIFF__MAX_INDEX];
@@ -708,7 +708,7 @@ static void data__fprintf(void)
708 708
709 data__for_each_file(i, d) 709 data__for_each_file(i, d)
710 fprintf(stdout, "# [%d] %s %s\n", 710 fprintf(stdout, "# [%d] %s %s\n",
711 d->idx, d->file.path, 711 d->idx, d->data.file.path,
712 !d->idx ? "(Baseline)" : ""); 712 !d->idx ? "(Baseline)" : "");
713 713
714 fprintf(stdout, "#\n"); 714 fprintf(stdout, "#\n");
@@ -777,16 +777,16 @@ static int __cmd_diff(void)
777 int ret = -EINVAL, i; 777 int ret = -EINVAL, i;
778 778
779 data__for_each_file(i, d) { 779 data__for_each_file(i, d) {
780 d->session = perf_session__new(&d->file, false, &tool); 780 d->session = perf_session__new(&d->data, false, &tool);
781 if (!d->session) { 781 if (!d->session) {
782 pr_err("Failed to open %s\n", d->file.path); 782 pr_err("Failed to open %s\n", d->data.file.path);
783 ret = -1; 783 ret = -1;
784 goto out_delete; 784 goto out_delete;
785 } 785 }
786 786
787 ret = perf_session__process_events(d->session); 787 ret = perf_session__process_events(d->session);
788 if (ret) { 788 if (ret) {
789 pr_err("Failed to process %s\n", d->file.path); 789 pr_err("Failed to process %s\n", d->data.file.path);
790 goto out_delete; 790 goto out_delete;
791 } 791 }
792 792
@@ -1287,11 +1287,11 @@ static int data_init(int argc, const char **argv)
1287 return -ENOMEM; 1287 return -ENOMEM;
1288 1288
1289 data__for_each_file(i, d) { 1289 data__for_each_file(i, d) {
1290 struct perf_data_file *file = &d->file; 1290 struct perf_data *data = &d->data;
1291 1291
1292 file->path = use_default ? defaults[i] : argv[i]; 1292 data->file.path = use_default ? defaults[i] : argv[i];
1293 file->mode = PERF_DATA_MODE_READ, 1293 data->mode = PERF_DATA_MODE_READ,
1294 file->force = force, 1294 data->force = force,
1295 1295
1296 d->idx = i; 1296 d->idx = i;
1297 } 1297 }
diff --git a/tools/perf/builtin-evlist.c b/tools/perf/builtin-evlist.c
index cdd145613f60..e06e822ce634 100644
--- a/tools/perf/builtin-evlist.c
+++ b/tools/perf/builtin-evlist.c
@@ -22,14 +22,16 @@ static int __cmd_evlist(const char *file_name, struct perf_attr_details *details
22{ 22{
23 struct perf_session *session; 23 struct perf_session *session;
24 struct perf_evsel *pos; 24 struct perf_evsel *pos;
25 struct perf_data_file file = { 25 struct perf_data data = {
26 .path = file_name, 26 .file = {
27 .mode = PERF_DATA_MODE_READ, 27 .path = file_name,
28 .force = details->force, 28 },
29 .mode = PERF_DATA_MODE_READ,
30 .force = details->force,
29 }; 31 };
30 bool has_tracepoint = false; 32 bool has_tracepoint = false;
31 33
32 session = perf_session__new(&file, 0, NULL); 34 session = perf_session__new(&data, 0, NULL);
33 if (session == NULL) 35 if (session == NULL)
34 return -1; 36 return -1;
35 37
diff --git a/tools/perf/builtin-help.c b/tools/perf/builtin-help.c
index bd1fedef3d1c..4aca13f23b9d 100644
--- a/tools/perf/builtin-help.c
+++ b/tools/perf/builtin-help.c
@@ -284,7 +284,7 @@ static int perf_help_config(const char *var, const char *value, void *cb)
284 add_man_viewer(value); 284 add_man_viewer(value);
285 return 0; 285 return 0;
286 } 286 }
287 if (!strstarts(var, "man.")) 287 if (strstarts(var, "man."))
288 return add_man_viewer_info(var, value); 288 return add_man_viewer_info(var, value);
289 289
290 return 0; 290 return 0;
@@ -314,7 +314,7 @@ static const char *cmd_to_page(const char *perf_cmd)
314 314
315 if (!perf_cmd) 315 if (!perf_cmd)
316 return "perf"; 316 return "perf";
317 else if (!strstarts(perf_cmd, "perf")) 317 else if (strstarts(perf_cmd, "perf"))
318 return perf_cmd; 318 return perf_cmd;
319 319
320 return asprintf(&s, "perf-%s", perf_cmd) < 0 ? NULL : s; 320 return asprintf(&s, "perf-%s", perf_cmd) < 0 ? NULL : s;
@@ -439,7 +439,7 @@ int cmd_help(int argc, const char **argv)
439#ifdef HAVE_LIBELF_SUPPORT 439#ifdef HAVE_LIBELF_SUPPORT
440 "probe", 440 "probe",
441#endif 441#endif
442#ifdef HAVE_LIBAUDIT_SUPPORT 442#if defined(HAVE_LIBAUDIT_SUPPORT) || defined(HAVE_SYSCALL_TABLE)
443 "trace", 443 "trace",
444#endif 444#endif
445 NULL }; 445 NULL };
diff --git a/tools/perf/builtin-inject.c b/tools/perf/builtin-inject.c
index 3e0e73b0dc67..40fe919bbcf3 100644
--- a/tools/perf/builtin-inject.c
+++ b/tools/perf/builtin-inject.c
@@ -36,7 +36,7 @@ struct perf_inject {
36 bool strip; 36 bool strip;
37 bool jit_mode; 37 bool jit_mode;
38 const char *input_name; 38 const char *input_name;
39 struct perf_data_file output; 39 struct perf_data output;
40 u64 bytes_written; 40 u64 bytes_written;
41 u64 aux_id; 41 u64 aux_id;
42 struct list_head samples; 42 struct list_head samples;
@@ -53,7 +53,7 @@ static int output_bytes(struct perf_inject *inject, void *buf, size_t sz)
53{ 53{
54 ssize_t size; 54 ssize_t size;
55 55
56 size = perf_data_file__write(&inject->output, buf, sz); 56 size = perf_data__write(&inject->output, buf, sz);
57 if (size < 0) 57 if (size < 0)
58 return -errno; 58 return -errno;
59 59
@@ -146,7 +146,7 @@ static s64 perf_event__repipe_auxtrace(struct perf_tool *tool,
146 if (!inject->output.is_pipe) { 146 if (!inject->output.is_pipe) {
147 off_t offset; 147 off_t offset;
148 148
149 offset = lseek(inject->output.fd, 0, SEEK_CUR); 149 offset = lseek(inject->output.file.fd, 0, SEEK_CUR);
150 if (offset == -1) 150 if (offset == -1)
151 return -errno; 151 return -errno;
152 ret = auxtrace_index__auxtrace_event(&session->auxtrace_index, 152 ret = auxtrace_index__auxtrace_event(&session->auxtrace_index,
@@ -155,11 +155,11 @@ static s64 perf_event__repipe_auxtrace(struct perf_tool *tool,
155 return ret; 155 return ret;
156 } 156 }
157 157
158 if (perf_data_file__is_pipe(session->file) || !session->one_mmap) { 158 if (perf_data__is_pipe(session->data) || !session->one_mmap) {
159 ret = output_bytes(inject, event, event->header.size); 159 ret = output_bytes(inject, event, event->header.size);
160 if (ret < 0) 160 if (ret < 0)
161 return ret; 161 return ret;
162 ret = copy_bytes(inject, perf_data_file__fd(session->file), 162 ret = copy_bytes(inject, perf_data__fd(session->data),
163 event->auxtrace.size); 163 event->auxtrace.size);
164 } else { 164 } else {
165 ret = output_bytes(inject, event, 165 ret = output_bytes(inject, event,
@@ -536,8 +536,7 @@ found:
536 sample_sw.period = sample->period; 536 sample_sw.period = sample->period;
537 sample_sw.time = sample->time; 537 sample_sw.time = sample->time;
538 perf_event__synthesize_sample(event_sw, evsel->attr.sample_type, 538 perf_event__synthesize_sample(event_sw, evsel->attr.sample_type,
539 evsel->attr.read_format, &sample_sw, 539 evsel->attr.read_format, &sample_sw);
540 false);
541 build_id__mark_dso_hit(tool, event_sw, &sample_sw, evsel, machine); 540 build_id__mark_dso_hit(tool, event_sw, &sample_sw, evsel, machine);
542 return perf_event__repipe(tool, event_sw, &sample_sw, machine); 541 return perf_event__repipe(tool, event_sw, &sample_sw, machine);
543} 542}
@@ -638,8 +637,8 @@ static int __cmd_inject(struct perf_inject *inject)
638{ 637{
639 int ret = -EINVAL; 638 int ret = -EINVAL;
640 struct perf_session *session = inject->session; 639 struct perf_session *session = inject->session;
641 struct perf_data_file *file_out = &inject->output; 640 struct perf_data *data_out = &inject->output;
642 int fd = perf_data_file__fd(file_out); 641 int fd = perf_data__fd(data_out);
643 u64 output_data_offset; 642 u64 output_data_offset;
644 643
645 signal(SIGINT, sig_handler); 644 signal(SIGINT, sig_handler);
@@ -694,14 +693,14 @@ static int __cmd_inject(struct perf_inject *inject)
694 if (!inject->itrace_synth_opts.set) 693 if (!inject->itrace_synth_opts.set)
695 auxtrace_index__free(&session->auxtrace_index); 694 auxtrace_index__free(&session->auxtrace_index);
696 695
697 if (!file_out->is_pipe) 696 if (!data_out->is_pipe)
698 lseek(fd, output_data_offset, SEEK_SET); 697 lseek(fd, output_data_offset, SEEK_SET);
699 698
700 ret = perf_session__process_events(session); 699 ret = perf_session__process_events(session);
701 if (ret) 700 if (ret)
702 return ret; 701 return ret;
703 702
704 if (!file_out->is_pipe) { 703 if (!data_out->is_pipe) {
705 if (inject->build_ids) 704 if (inject->build_ids)
706 perf_header__set_feat(&session->header, 705 perf_header__set_feat(&session->header,
707 HEADER_BUILD_ID); 706 HEADER_BUILD_ID);
@@ -776,11 +775,13 @@ int cmd_inject(int argc, const char **argv)
776 .input_name = "-", 775 .input_name = "-",
777 .samples = LIST_HEAD_INIT(inject.samples), 776 .samples = LIST_HEAD_INIT(inject.samples),
778 .output = { 777 .output = {
779 .path = "-", 778 .file = {
780 .mode = PERF_DATA_MODE_WRITE, 779 .path = "-",
780 },
781 .mode = PERF_DATA_MODE_WRITE,
781 }, 782 },
782 }; 783 };
783 struct perf_data_file file = { 784 struct perf_data data = {
784 .mode = PERF_DATA_MODE_READ, 785 .mode = PERF_DATA_MODE_READ,
785 }; 786 };
786 int ret; 787 int ret;
@@ -790,7 +791,7 @@ int cmd_inject(int argc, const char **argv)
790 "Inject build-ids into the output stream"), 791 "Inject build-ids into the output stream"),
791 OPT_STRING('i', "input", &inject.input_name, "file", 792 OPT_STRING('i', "input", &inject.input_name, "file",
792 "input file name"), 793 "input file name"),
793 OPT_STRING('o', "output", &inject.output.path, "file", 794 OPT_STRING('o', "output", &inject.output.file.path, "file",
794 "output file name"), 795 "output file name"),
795 OPT_BOOLEAN('s', "sched-stat", &inject.sched_stat, 796 OPT_BOOLEAN('s', "sched-stat", &inject.sched_stat,
796 "Merge sched-stat and sched-switch for getting events " 797 "Merge sched-stat and sched-switch for getting events "
@@ -802,7 +803,7 @@ int cmd_inject(int argc, const char **argv)
802 "be more verbose (show build ids, etc)"), 803 "be more verbose (show build ids, etc)"),
803 OPT_STRING(0, "kallsyms", &symbol_conf.kallsyms_name, "file", 804 OPT_STRING(0, "kallsyms", &symbol_conf.kallsyms_name, "file",
804 "kallsyms pathname"), 805 "kallsyms pathname"),
805 OPT_BOOLEAN('f', "force", &file.force, "don't complain, do it"), 806 OPT_BOOLEAN('f', "force", &data.force, "don't complain, do it"),
806 OPT_CALLBACK_OPTARG(0, "itrace", &inject.itrace_synth_opts, 807 OPT_CALLBACK_OPTARG(0, "itrace", &inject.itrace_synth_opts,
807 NULL, "opts", "Instruction Tracing options", 808 NULL, "opts", "Instruction Tracing options",
808 itrace_parse_synth_opts), 809 itrace_parse_synth_opts),
@@ -830,15 +831,15 @@ int cmd_inject(int argc, const char **argv)
830 return -1; 831 return -1;
831 } 832 }
832 833
833 if (perf_data_file__open(&inject.output)) { 834 if (perf_data__open(&inject.output)) {
834 perror("failed to create output file"); 835 perror("failed to create output file");
835 return -1; 836 return -1;
836 } 837 }
837 838
838 inject.tool.ordered_events = inject.sched_stat; 839 inject.tool.ordered_events = inject.sched_stat;
839 840
840 file.path = inject.input_name; 841 data.file.path = inject.input_name;
841 inject.session = perf_session__new(&file, true, &inject.tool); 842 inject.session = perf_session__new(&data, true, &inject.tool);
842 if (inject.session == NULL) 843 if (inject.session == NULL)
843 return -1; 844 return -1;
844 845
diff --git a/tools/perf/builtin-kmem.c b/tools/perf/builtin-kmem.c
index 35d4b9c9a9e8..ae11e4c3516a 100644
--- a/tools/perf/builtin-kmem.c
+++ b/tools/perf/builtin-kmem.c
@@ -641,7 +641,6 @@ static const struct {
641 { "__GFP_ATOMIC", "_A" }, 641 { "__GFP_ATOMIC", "_A" },
642 { "__GFP_IO", "I" }, 642 { "__GFP_IO", "I" },
643 { "__GFP_FS", "F" }, 643 { "__GFP_FS", "F" },
644 { "__GFP_COLD", "CO" },
645 { "__GFP_NOWARN", "NWR" }, 644 { "__GFP_NOWARN", "NWR" },
646 { "__GFP_RETRY_MAYFAIL", "R" }, 645 { "__GFP_RETRY_MAYFAIL", "R" },
647 { "__GFP_NOFAIL", "NF" }, 646 { "__GFP_NOFAIL", "NF" },
@@ -655,7 +654,6 @@ static const struct {
655 { "__GFP_RECLAIMABLE", "RC" }, 654 { "__GFP_RECLAIMABLE", "RC" },
656 { "__GFP_MOVABLE", "M" }, 655 { "__GFP_MOVABLE", "M" },
657 { "__GFP_ACCOUNT", "AC" }, 656 { "__GFP_ACCOUNT", "AC" },
658 { "__GFP_NOTRACK", "NT" },
659 { "__GFP_WRITE", "WR" }, 657 { "__GFP_WRITE", "WR" },
660 { "__GFP_RECLAIM", "R" }, 658 { "__GFP_RECLAIM", "R" },
661 { "__GFP_DIRECT_RECLAIM", "DR" }, 659 { "__GFP_DIRECT_RECLAIM", "DR" },
@@ -1894,7 +1892,7 @@ int cmd_kmem(int argc, const char **argv)
1894{ 1892{
1895 const char * const default_slab_sort = "frag,hit,bytes"; 1893 const char * const default_slab_sort = "frag,hit,bytes";
1896 const char * const default_page_sort = "bytes,hit"; 1894 const char * const default_page_sort = "bytes,hit";
1897 struct perf_data_file file = { 1895 struct perf_data data = {
1898 .mode = PERF_DATA_MODE_READ, 1896 .mode = PERF_DATA_MODE_READ,
1899 }; 1897 };
1900 const struct option kmem_options[] = { 1898 const struct option kmem_options[] = {
@@ -1910,7 +1908,7 @@ int cmd_kmem(int argc, const char **argv)
1910 "page, order, migtype, gfp", parse_sort_opt), 1908 "page, order, migtype, gfp", parse_sort_opt),
1911 OPT_CALLBACK('l', "line", NULL, "num", "show n lines", parse_line_opt), 1909 OPT_CALLBACK('l', "line", NULL, "num", "show n lines", parse_line_opt),
1912 OPT_BOOLEAN(0, "raw-ip", &raw_ip, "show raw ip instead of symbol"), 1910 OPT_BOOLEAN(0, "raw-ip", &raw_ip, "show raw ip instead of symbol"),
1913 OPT_BOOLEAN('f', "force", &file.force, "don't complain, do it"), 1911 OPT_BOOLEAN('f', "force", &data.force, "don't complain, do it"),
1914 OPT_CALLBACK_NOOPT(0, "slab", NULL, NULL, "Analyze slab allocator", 1912 OPT_CALLBACK_NOOPT(0, "slab", NULL, NULL, "Analyze slab allocator",
1915 parse_slab_opt), 1913 parse_slab_opt),
1916 OPT_CALLBACK_NOOPT(0, "page", NULL, NULL, "Analyze page allocator", 1914 OPT_CALLBACK_NOOPT(0, "page", NULL, NULL, "Analyze page allocator",
@@ -1950,9 +1948,9 @@ int cmd_kmem(int argc, const char **argv)
1950 return __cmd_record(argc, argv); 1948 return __cmd_record(argc, argv);
1951 } 1949 }
1952 1950
1953 file.path = input_name; 1951 data.file.path = input_name;
1954 1952
1955 kmem_session = session = perf_session__new(&file, false, &perf_kmem); 1953 kmem_session = session = perf_session__new(&data, false, &perf_kmem);
1956 if (session == NULL) 1954 if (session == NULL)
1957 return -1; 1955 return -1;
1958 1956
@@ -1984,7 +1982,8 @@ int cmd_kmem(int argc, const char **argv)
1984 1982
1985 if (perf_time__parse_str(&ptime, time_str) != 0) { 1983 if (perf_time__parse_str(&ptime, time_str) != 0) {
1986 pr_err("Invalid time string\n"); 1984 pr_err("Invalid time string\n");
1987 return -EINVAL; 1985 ret = -EINVAL;
1986 goto out_delete;
1988 } 1987 }
1989 1988
1990 if (!strcmp(argv[0], "stat")) { 1989 if (!strcmp(argv[0], "stat")) {
diff --git a/tools/perf/builtin-kvm.c b/tools/perf/builtin-kvm.c
index 5fb40368d5d1..55d919dc5bc6 100644
--- a/tools/perf/builtin-kvm.c
+++ b/tools/perf/builtin-kvm.c
@@ -26,6 +26,9 @@
26#include <sys/timerfd.h> 26#include <sys/timerfd.h>
27#endif 27#endif
28#include <sys/time.h> 28#include <sys/time.h>
29#include <sys/types.h>
30#include <sys/stat.h>
31#include <fcntl.h>
29 32
30#include <linux/kernel.h> 33#include <linux/kernel.h>
31#include <linux/time64.h> 34#include <linux/time64.h>
@@ -35,7 +38,6 @@
35#include <termios.h> 38#include <termios.h>
36#include <semaphore.h> 39#include <semaphore.h>
37#include <signal.h> 40#include <signal.h>
38#include <pthread.h>
39#include <math.h> 41#include <math.h>
40 42
41static const char *get_filename_for_perf_kvm(void) 43static const char *get_filename_for_perf_kvm(void)
@@ -742,20 +744,20 @@ static s64 perf_kvm__mmap_read_idx(struct perf_kvm_stat *kvm, int idx,
742 u64 *mmap_time) 744 u64 *mmap_time)
743{ 745{
744 union perf_event *event; 746 union perf_event *event;
745 struct perf_sample sample; 747 u64 timestamp;
746 s64 n = 0; 748 s64 n = 0;
747 int err; 749 int err;
748 750
749 *mmap_time = ULLONG_MAX; 751 *mmap_time = ULLONG_MAX;
750 while ((event = perf_evlist__mmap_read(kvm->evlist, idx)) != NULL) { 752 while ((event = perf_evlist__mmap_read(kvm->evlist, idx)) != NULL) {
751 err = perf_evlist__parse_sample(kvm->evlist, event, &sample); 753 err = perf_evlist__parse_sample_timestamp(kvm->evlist, event, &timestamp);
752 if (err) { 754 if (err) {
753 perf_evlist__mmap_consume(kvm->evlist, idx); 755 perf_evlist__mmap_consume(kvm->evlist, idx);
754 pr_err("Failed to parse sample\n"); 756 pr_err("Failed to parse sample\n");
755 return -1; 757 return -1;
756 } 758 }
757 759
758 err = perf_session__queue_event(kvm->session, event, &sample, 0); 760 err = perf_session__queue_event(kvm->session, event, timestamp, 0);
759 /* 761 /*
760 * FIXME: Here we can't consume the event, as perf_session__queue_event will 762 * FIXME: Here we can't consume the event, as perf_session__queue_event will
761 * point to it, and it'll get possibly overwritten by the kernel. 763 * point to it, and it'll get possibly overwritten by the kernel.
@@ -769,7 +771,7 @@ static s64 perf_kvm__mmap_read_idx(struct perf_kvm_stat *kvm, int idx,
769 771
770 /* save time stamp of our first sample for this mmap */ 772 /* save time stamp of our first sample for this mmap */
771 if (n == 0) 773 if (n == 0)
772 *mmap_time = sample.time; 774 *mmap_time = timestamp;
773 775
774 /* limit events per mmap handled all at once */ 776 /* limit events per mmap handled all at once */
775 n++; 777 n++;
@@ -1045,7 +1047,7 @@ static int kvm_live_open_events(struct perf_kvm_stat *kvm)
1045 goto out; 1047 goto out;
1046 } 1048 }
1047 1049
1048 if (perf_evlist__mmap(evlist, kvm->opts.mmap_pages, false) < 0) { 1050 if (perf_evlist__mmap(evlist, kvm->opts.mmap_pages) < 0) {
1049 ui__error("Failed to mmap the events: %s\n", 1051 ui__error("Failed to mmap the events: %s\n",
1050 str_error_r(errno, sbuf, sizeof(sbuf))); 1052 str_error_r(errno, sbuf, sizeof(sbuf)));
1051 perf_evlist__close(evlist); 1053 perf_evlist__close(evlist);
@@ -1069,10 +1071,12 @@ static int read_events(struct perf_kvm_stat *kvm)
1069 .namespaces = perf_event__process_namespaces, 1071 .namespaces = perf_event__process_namespaces,
1070 .ordered_events = true, 1072 .ordered_events = true,
1071 }; 1073 };
1072 struct perf_data_file file = { 1074 struct perf_data file = {
1073 .path = kvm->file_name, 1075 .file = {
1074 .mode = PERF_DATA_MODE_READ, 1076 .path = kvm->file_name,
1075 .force = kvm->force, 1077 },
1078 .mode = PERF_DATA_MODE_READ,
1079 .force = kvm->force,
1076 }; 1080 };
1077 1081
1078 kvm->tool = eops; 1082 kvm->tool = eops;
@@ -1360,7 +1364,7 @@ static int kvm_events_live(struct perf_kvm_stat *kvm,
1360 "perf kvm stat live [<options>]", 1364 "perf kvm stat live [<options>]",
1361 NULL 1365 NULL
1362 }; 1366 };
1363 struct perf_data_file file = { 1367 struct perf_data data = {
1364 .mode = PERF_DATA_MODE_WRITE, 1368 .mode = PERF_DATA_MODE_WRITE,
1365 }; 1369 };
1366 1370
@@ -1434,7 +1438,7 @@ static int kvm_events_live(struct perf_kvm_stat *kvm,
1434 /* 1438 /*
1435 * perf session 1439 * perf session
1436 */ 1440 */
1437 kvm->session = perf_session__new(&file, false, &kvm->tool); 1441 kvm->session = perf_session__new(&data, false, &kvm->tool);
1438 if (kvm->session == NULL) { 1442 if (kvm->session == NULL) {
1439 err = -1; 1443 err = -1;
1440 goto out; 1444 goto out;
@@ -1443,7 +1447,8 @@ static int kvm_events_live(struct perf_kvm_stat *kvm,
1443 perf_session__set_id_hdr_size(kvm->session); 1447 perf_session__set_id_hdr_size(kvm->session);
1444 ordered_events__set_copy_on_queue(&kvm->session->ordered_events, true); 1448 ordered_events__set_copy_on_queue(&kvm->session->ordered_events, true);
1445 machine__synthesize_threads(&kvm->session->machines.host, &kvm->opts.target, 1449 machine__synthesize_threads(&kvm->session->machines.host, &kvm->opts.target,
1446 kvm->evlist->threads, false, kvm->opts.proc_map_timeout); 1450 kvm->evlist->threads, false,
1451 kvm->opts.proc_map_timeout, 1);
1447 err = kvm_live_open_events(kvm); 1452 err = kvm_live_open_events(kvm);
1448 if (err) 1453 if (err)
1449 goto out; 1454 goto out;
diff --git a/tools/perf/builtin-list.c b/tools/perf/builtin-list.c
index eeedbe433776..ead221e49f00 100644
--- a/tools/perf/builtin-list.c
+++ b/tools/perf/builtin-list.c
@@ -16,6 +16,7 @@
16#include "util/cache.h" 16#include "util/cache.h"
17#include "util/pmu.h" 17#include "util/pmu.h"
18#include "util/debug.h" 18#include "util/debug.h"
19#include "util/metricgroup.h"
19#include <subcmd/parse-options.h> 20#include <subcmd/parse-options.h>
20 21
21static bool desc_flag = true; 22static bool desc_flag = true;
@@ -80,6 +81,10 @@ int cmd_list(int argc, const char **argv)
80 long_desc_flag, details_flag); 81 long_desc_flag, details_flag);
81 else if (strcmp(argv[i], "sdt") == 0) 82 else if (strcmp(argv[i], "sdt") == 0)
82 print_sdt_events(NULL, NULL, raw_dump); 83 print_sdt_events(NULL, NULL, raw_dump);
84 else if (strcmp(argv[i], "metric") == 0)
85 metricgroup__print(true, false, NULL, raw_dump);
86 else if (strcmp(argv[i], "metricgroup") == 0)
87 metricgroup__print(false, true, NULL, raw_dump);
83 else if ((sep = strchr(argv[i], ':')) != NULL) { 88 else if ((sep = strchr(argv[i], ':')) != NULL) {
84 int sep_idx; 89 int sep_idx;
85 90
@@ -97,6 +102,7 @@ int cmd_list(int argc, const char **argv)
97 s[sep_idx] = '\0'; 102 s[sep_idx] = '\0';
98 print_tracepoint_events(s, s + sep_idx + 1, raw_dump); 103 print_tracepoint_events(s, s + sep_idx + 1, raw_dump);
99 print_sdt_events(s, s + sep_idx + 1, raw_dump); 104 print_sdt_events(s, s + sep_idx + 1, raw_dump);
105 metricgroup__print(true, true, s, raw_dump);
100 free(s); 106 free(s);
101 } else { 107 } else {
102 if (asprintf(&s, "*%s*", argv[i]) < 0) { 108 if (asprintf(&s, "*%s*", argv[i]) < 0) {
@@ -113,6 +119,7 @@ int cmd_list(int argc, const char **argv)
113 details_flag); 119 details_flag);
114 print_tracepoint_events(NULL, s, raw_dump); 120 print_tracepoint_events(NULL, s, raw_dump);
115 print_sdt_events(NULL, s, raw_dump); 121 print_sdt_events(NULL, s, raw_dump);
122 metricgroup__print(true, true, NULL, raw_dump);
116 free(s); 123 free(s);
117 } 124 }
118 } 125 }
diff --git a/tools/perf/builtin-lock.c b/tools/perf/builtin-lock.c
index fe69cd6b89e1..6e0189df2b3b 100644
--- a/tools/perf/builtin-lock.c
+++ b/tools/perf/builtin-lock.c
@@ -865,13 +865,15 @@ static int __cmd_report(bool display_info)
865 .namespaces = perf_event__process_namespaces, 865 .namespaces = perf_event__process_namespaces,
866 .ordered_events = true, 866 .ordered_events = true,
867 }; 867 };
868 struct perf_data_file file = { 868 struct perf_data data = {
869 .path = input_name, 869 .file = {
870 .mode = PERF_DATA_MODE_READ, 870 .path = input_name,
871 .force = force, 871 },
872 .mode = PERF_DATA_MODE_READ,
873 .force = force,
872 }; 874 };
873 875
874 session = perf_session__new(&file, false, &eops); 876 session = perf_session__new(&data, false, &eops);
875 if (!session) { 877 if (!session) {
876 pr_err("Initializing perf session failed\n"); 878 pr_err("Initializing perf session failed\n");
877 return -1; 879 return -1;
diff --git a/tools/perf/builtin-mem.c b/tools/perf/builtin-mem.c
index 4db960085273..506564651cda 100644
--- a/tools/perf/builtin-mem.c
+++ b/tools/perf/builtin-mem.c
@@ -113,6 +113,7 @@ static int __cmd_record(int argc, const char **argv, struct perf_mem *mem)
113 if (!perf_mem_events[j].supported) { 113 if (!perf_mem_events[j].supported) {
114 pr_err("failed: event '%s' not supported\n", 114 pr_err("failed: event '%s' not supported\n",
115 perf_mem_events__name(j)); 115 perf_mem_events__name(j));
116 free(rec_argv);
116 return -1; 117 return -1;
117 } 118 }
118 119
@@ -236,13 +237,15 @@ static int process_sample_event(struct perf_tool *tool,
236 237
237static int report_raw_events(struct perf_mem *mem) 238static int report_raw_events(struct perf_mem *mem)
238{ 239{
239 struct perf_data_file file = { 240 struct perf_data data = {
240 .path = input_name, 241 .file = {
241 .mode = PERF_DATA_MODE_READ, 242 .path = input_name,
242 .force = mem->force, 243 },
244 .mode = PERF_DATA_MODE_READ,
245 .force = mem->force,
243 }; 246 };
244 int ret; 247 int ret;
245 struct perf_session *session = perf_session__new(&file, false, 248 struct perf_session *session = perf_session__new(&data, false,
246 &mem->tool); 249 &mem->tool);
247 250
248 if (session == NULL) 251 if (session == NULL)
diff --git a/tools/perf/builtin-record.c b/tools/perf/builtin-record.c
index 0c95ffefb6cc..bf4ca749d1ac 100644
--- a/tools/perf/builtin-record.c
+++ b/tools/perf/builtin-record.c
@@ -51,7 +51,6 @@
51#include <signal.h> 51#include <signal.h>
52#include <sys/mman.h> 52#include <sys/mman.h>
53#include <sys/wait.h> 53#include <sys/wait.h>
54#include <asm/bug.h>
55#include <linux/time64.h> 54#include <linux/time64.h>
56 55
57struct switch_output { 56struct switch_output {
@@ -67,7 +66,7 @@ struct record {
67 struct perf_tool tool; 66 struct perf_tool tool;
68 struct record_opts opts; 67 struct record_opts opts;
69 u64 bytes_written; 68 u64 bytes_written;
70 struct perf_data_file file; 69 struct perf_data data;
71 struct auxtrace_record *itr; 70 struct auxtrace_record *itr;
72 struct perf_evlist *evlist; 71 struct perf_evlist *evlist;
73 struct perf_session *session; 72 struct perf_session *session;
@@ -79,6 +78,7 @@ struct record {
79 bool no_buildid_cache_set; 78 bool no_buildid_cache_set;
80 bool buildid_all; 79 bool buildid_all;
81 bool timestamp_filename; 80 bool timestamp_filename;
81 bool timestamp_boundary;
82 struct switch_output switch_output; 82 struct switch_output switch_output;
83 unsigned long long samples; 83 unsigned long long samples;
84}; 84};
@@ -108,7 +108,7 @@ static bool switch_output_time(struct record *rec)
108 108
109static int record__write(struct record *rec, void *bf, size_t size) 109static int record__write(struct record *rec, void *bf, size_t size)
110{ 110{
111 if (perf_data_file__write(rec->session->file, bf, size) < 0) { 111 if (perf_data__write(rec->session->data, bf, size) < 0) {
112 pr_err("failed to write perf data, error: %m\n"); 112 pr_err("failed to write perf data, error: %m\n");
113 return -1; 113 return -1;
114 } 114 }
@@ -130,107 +130,12 @@ static int process_synthesized_event(struct perf_tool *tool,
130 return record__write(rec, event, event->header.size); 130 return record__write(rec, event, event->header.size);
131} 131}
132 132
133static int 133static int record__pushfn(void *to, void *bf, size_t size)
134backward_rb_find_range(void *buf, int mask, u64 head, u64 *start, u64 *end)
135{
136 struct perf_event_header *pheader;
137 u64 evt_head = head;
138 int size = mask + 1;
139
140 pr_debug2("backward_rb_find_range: buf=%p, head=%"PRIx64"\n", buf, head);
141 pheader = (struct perf_event_header *)(buf + (head & mask));
142 *start = head;
143 while (true) {
144 if (evt_head - head >= (unsigned int)size) {
145 pr_debug("Finished reading backward ring buffer: rewind\n");
146 if (evt_head - head > (unsigned int)size)
147 evt_head -= pheader->size;
148 *end = evt_head;
149 return 0;
150 }
151
152 pheader = (struct perf_event_header *)(buf + (evt_head & mask));
153
154 if (pheader->size == 0) {
155 pr_debug("Finished reading backward ring buffer: get start\n");
156 *end = evt_head;
157 return 0;
158 }
159
160 evt_head += pheader->size;
161 pr_debug3("move evt_head: %"PRIx64"\n", evt_head);
162 }
163 WARN_ONCE(1, "Shouldn't get here\n");
164 return -1;
165}
166
167static int
168rb_find_range(void *data, int mask, u64 head, u64 old,
169 u64 *start, u64 *end, bool backward)
170{
171 if (!backward) {
172 *start = old;
173 *end = head;
174 return 0;
175 }
176
177 return backward_rb_find_range(data, mask, head, start, end);
178}
179
180static int
181record__mmap_read(struct record *rec, struct perf_mmap *md,
182 bool overwrite, bool backward)
183{ 134{
184 u64 head = perf_mmap__read_head(md); 135 struct record *rec = to;
185 u64 old = md->prev;
186 u64 end = head, start = old;
187 unsigned char *data = md->base + page_size;
188 unsigned long size;
189 void *buf;
190 int rc = 0;
191
192 if (rb_find_range(data, md->mask, head,
193 old, &start, &end, backward))
194 return -1;
195
196 if (start == end)
197 return 0;
198 136
199 rec->samples++; 137 rec->samples++;
200 138 return record__write(rec, bf, size);
201 size = end - start;
202 if (size > (unsigned long)(md->mask) + 1) {
203 WARN_ONCE(1, "failed to keep up with mmap data. (warn only once)\n");
204
205 md->prev = head;
206 perf_mmap__consume(md, overwrite || backward);
207 return 0;
208 }
209
210 if ((start & md->mask) + size != (end & md->mask)) {
211 buf = &data[start & md->mask];
212 size = md->mask + 1 - (start & md->mask);
213 start += size;
214
215 if (record__write(rec, buf, size) < 0) {
216 rc = -1;
217 goto out;
218 }
219 }
220
221 buf = &data[start & md->mask];
222 size = end - start;
223 start += size;
224
225 if (record__write(rec, buf, size) < 0) {
226 rc = -1;
227 goto out;
228 }
229
230 md->prev = head;
231 perf_mmap__consume(md, overwrite || backward);
232out:
233 return rc;
234} 139}
235 140
236static volatile int done; 141static volatile int done;
@@ -269,13 +174,13 @@ static int record__process_auxtrace(struct perf_tool *tool,
269 size_t len1, void *data2, size_t len2) 174 size_t len1, void *data2, size_t len2)
270{ 175{
271 struct record *rec = container_of(tool, struct record, tool); 176 struct record *rec = container_of(tool, struct record, tool);
272 struct perf_data_file *file = &rec->file; 177 struct perf_data *data = &rec->data;
273 size_t padding; 178 size_t padding;
274 u8 pad[8] = {0}; 179 u8 pad[8] = {0};
275 180
276 if (!perf_data_file__is_pipe(file)) { 181 if (!perf_data__is_pipe(data)) {
277 off_t file_offset; 182 off_t file_offset;
278 int fd = perf_data_file__fd(file); 183 int fd = perf_data__fd(data);
279 int err; 184 int err;
280 185
281 file_offset = lseek(fd, 0, SEEK_CUR); 186 file_offset = lseek(fd, 0, SEEK_CUR);
@@ -396,7 +301,7 @@ static int record__mmap_evlist(struct record *rec,
396 struct record_opts *opts = &rec->opts; 301 struct record_opts *opts = &rec->opts;
397 char msg[512]; 302 char msg[512];
398 303
399 if (perf_evlist__mmap_ex(evlist, opts->mmap_pages, false, 304 if (perf_evlist__mmap_ex(evlist, opts->mmap_pages,
400 opts->auxtrace_mmap_pages, 305 opts->auxtrace_mmap_pages,
401 opts->auxtrace_snapshot_mode) < 0) { 306 opts->auxtrace_snapshot_mode) < 0) {
402 if (errno == EPERM) { 307 if (errno == EPERM) {
@@ -434,6 +339,22 @@ static int record__open(struct record *rec)
434 struct perf_evsel_config_term *err_term; 339 struct perf_evsel_config_term *err_term;
435 int rc = 0; 340 int rc = 0;
436 341
342 /*
343 * For initial_delay we need to add a dummy event so that we can track
344 * PERF_RECORD_MMAP while we wait for the initial delay to enable the
345 * real events, the ones asked by the user.
346 */
347 if (opts->initial_delay) {
348 if (perf_evlist__add_dummy(evlist))
349 return -ENOMEM;
350
351 pos = perf_evlist__first(evlist);
352 pos->tracking = 0;
353 pos = perf_evlist__last(evlist);
354 pos->tracking = 1;
355 pos->attr.enable_on_exec = 1;
356 }
357
437 perf_evlist__config(evlist, opts, &callchain_param); 358 perf_evlist__config(evlist, opts, &callchain_param);
438 359
439 evlist__for_each_entry(evlist, pos) { 360 evlist__for_each_entry(evlist, pos) {
@@ -451,6 +372,8 @@ try_again:
451 ui__error("%s\n", msg); 372 ui__error("%s\n", msg);
452 goto out; 373 goto out;
453 } 374 }
375
376 pos->supported = true;
454 } 377 }
455 378
456 if (perf_evlist__apply_filters(evlist, &pos)) { 379 if (perf_evlist__apply_filters(evlist, &pos)) {
@@ -487,17 +410,24 @@ static int process_sample_event(struct perf_tool *tool,
487{ 410{
488 struct record *rec = container_of(tool, struct record, tool); 411 struct record *rec = container_of(tool, struct record, tool);
489 412
490 rec->samples++; 413 if (rec->evlist->first_sample_time == 0)
414 rec->evlist->first_sample_time = sample->time;
491 415
416 rec->evlist->last_sample_time = sample->time;
417
418 if (rec->buildid_all)
419 return 0;
420
421 rec->samples++;
492 return build_id__mark_dso_hit(tool, event, sample, evsel, machine); 422 return build_id__mark_dso_hit(tool, event, sample, evsel, machine);
493} 423}
494 424
495static int process_buildids(struct record *rec) 425static int process_buildids(struct record *rec)
496{ 426{
497 struct perf_data_file *file = &rec->file; 427 struct perf_data *data = &rec->data;
498 struct perf_session *session = rec->session; 428 struct perf_session *session = rec->session;
499 429
500 if (file->size == 0) 430 if (data->size == 0)
501 return 0; 431 return 0;
502 432
503 /* 433 /*
@@ -513,9 +443,11 @@ static int process_buildids(struct record *rec)
513 443
514 /* 444 /*
515 * If --buildid-all is given, it marks all DSO regardless of hits, 445 * If --buildid-all is given, it marks all DSO regardless of hits,
516 * so no need to process samples. 446 * so no need to process samples. But if timestamp_boundary is enabled,
447 * it still needs to walk on all samples to get the timestamps of
448 * first/last samples.
517 */ 449 */
518 if (rec->buildid_all) 450 if (rec->buildid_all && !rec->timestamp_boundary)
519 rec->tool.sample = NULL; 451 rec->tool.sample = NULL;
520 452
521 return perf_session__process_events(session); 453 return perf_session__process_events(session);
@@ -556,7 +488,7 @@ static struct perf_event_header finished_round_event = {
556}; 488};
557 489
558static int record__mmap_read_evlist(struct record *rec, struct perf_evlist *evlist, 490static int record__mmap_read_evlist(struct record *rec, struct perf_evlist *evlist,
559 bool backward) 491 bool overwrite)
560{ 492{
561 u64 bytes_written = rec->bytes_written; 493 u64 bytes_written = rec->bytes_written;
562 int i; 494 int i;
@@ -566,19 +498,18 @@ static int record__mmap_read_evlist(struct record *rec, struct perf_evlist *evli
566 if (!evlist) 498 if (!evlist)
567 return 0; 499 return 0;
568 500
569 maps = backward ? evlist->backward_mmap : evlist->mmap; 501 maps = overwrite ? evlist->overwrite_mmap : evlist->mmap;
570 if (!maps) 502 if (!maps)
571 return 0; 503 return 0;
572 504
573 if (backward && evlist->bkw_mmap_state != BKW_MMAP_DATA_PENDING) 505 if (overwrite && evlist->bkw_mmap_state != BKW_MMAP_DATA_PENDING)
574 return 0; 506 return 0;
575 507
576 for (i = 0; i < evlist->nr_mmaps; i++) { 508 for (i = 0; i < evlist->nr_mmaps; i++) {
577 struct auxtrace_mmap *mm = &maps[i].auxtrace_mmap; 509 struct auxtrace_mmap *mm = &maps[i].auxtrace_mmap;
578 510
579 if (maps[i].base) { 511 if (maps[i].base) {
580 if (record__mmap_read(rec, &maps[i], 512 if (perf_mmap__push(&maps[i], overwrite, rec, record__pushfn) != 0) {
581 evlist->overwrite, backward) != 0) {
582 rc = -1; 513 rc = -1;
583 goto out; 514 goto out;
584 } 515 }
@@ -598,7 +529,7 @@ static int record__mmap_read_evlist(struct record *rec, struct perf_evlist *evli
598 if (bytes_written != rec->bytes_written) 529 if (bytes_written != rec->bytes_written)
599 rc = record__write(rec, &finished_round_event, sizeof(finished_round_event)); 530 rc = record__write(rec, &finished_round_event, sizeof(finished_round_event));
600 531
601 if (backward) 532 if (overwrite)
602 perf_evlist__toggle_bkw_mmap(evlist, BKW_MMAP_EMPTY); 533 perf_evlist__toggle_bkw_mmap(evlist, BKW_MMAP_EMPTY);
603out: 534out:
604 return rc; 535 return rc;
@@ -641,14 +572,14 @@ static void record__init_features(struct record *rec)
641static void 572static void
642record__finish_output(struct record *rec) 573record__finish_output(struct record *rec)
643{ 574{
644 struct perf_data_file *file = &rec->file; 575 struct perf_data *data = &rec->data;
645 int fd = perf_data_file__fd(file); 576 int fd = perf_data__fd(data);
646 577
647 if (file->is_pipe) 578 if (data->is_pipe)
648 return; 579 return;
649 580
650 rec->session->header.data_size += rec->bytes_written; 581 rec->session->header.data_size += rec->bytes_written;
651 file->size = lseek(perf_data_file__fd(file), 0, SEEK_CUR); 582 data->size = lseek(perf_data__fd(data), 0, SEEK_CUR);
652 583
653 if (!rec->no_buildid) { 584 if (!rec->no_buildid) {
654 process_buildids(rec); 585 process_buildids(rec);
@@ -687,7 +618,7 @@ static int record__synthesize(struct record *rec, bool tail);
687static int 618static int
688record__switch_output(struct record *rec, bool at_exit) 619record__switch_output(struct record *rec, bool at_exit)
689{ 620{
690 struct perf_data_file *file = &rec->file; 621 struct perf_data *data = &rec->data;
691 int fd, err; 622 int fd, err;
692 623
693 /* Same Size: "2015122520103046"*/ 624 /* Same Size: "2015122520103046"*/
@@ -705,7 +636,7 @@ record__switch_output(struct record *rec, bool at_exit)
705 return -EINVAL; 636 return -EINVAL;
706 } 637 }
707 638
708 fd = perf_data_file__switch(file, timestamp, 639 fd = perf_data__switch(data, timestamp,
709 rec->session->header.data_offset, 640 rec->session->header.data_offset,
710 at_exit); 641 at_exit);
711 if (fd >= 0 && !at_exit) { 642 if (fd >= 0 && !at_exit) {
@@ -715,7 +646,7 @@ record__switch_output(struct record *rec, bool at_exit)
715 646
716 if (!quiet) 647 if (!quiet)
717 fprintf(stderr, "[ perf record: Dump %s.%s ]\n", 648 fprintf(stderr, "[ perf record: Dump %s.%s ]\n",
718 file->path, timestamp); 649 data->file.path, timestamp);
719 650
720 /* Output tracking events */ 651 /* Output tracking events */
721 if (!at_exit) { 652 if (!at_exit) {
@@ -770,8 +701,8 @@ perf_evlist__pick_pc(struct perf_evlist *evlist)
770 if (evlist) { 701 if (evlist) {
771 if (evlist->mmap && evlist->mmap[0].base) 702 if (evlist->mmap && evlist->mmap[0].base)
772 return evlist->mmap[0].base; 703 return evlist->mmap[0].base;
773 if (evlist->backward_mmap && evlist->backward_mmap[0].base) 704 if (evlist->overwrite_mmap && evlist->overwrite_mmap[0].base)
774 return evlist->backward_mmap[0].base; 705 return evlist->overwrite_mmap[0].base;
775 } 706 }
776 return NULL; 707 return NULL;
777} 708}
@@ -790,16 +721,16 @@ static int record__synthesize(struct record *rec, bool tail)
790{ 721{
791 struct perf_session *session = rec->session; 722 struct perf_session *session = rec->session;
792 struct machine *machine = &session->machines.host; 723 struct machine *machine = &session->machines.host;
793 struct perf_data_file *file = &rec->file; 724 struct perf_data *data = &rec->data;
794 struct record_opts *opts = &rec->opts; 725 struct record_opts *opts = &rec->opts;
795 struct perf_tool *tool = &rec->tool; 726 struct perf_tool *tool = &rec->tool;
796 int fd = perf_data_file__fd(file); 727 int fd = perf_data__fd(data);
797 int err = 0; 728 int err = 0;
798 729
799 if (rec->opts.tail_synthesize != tail) 730 if (rec->opts.tail_synthesize != tail)
800 return 0; 731 return 0;
801 732
802 if (file->is_pipe) { 733 if (data->is_pipe) {
803 err = perf_event__synthesize_features( 734 err = perf_event__synthesize_features(
804 tool, session, rec->evlist, process_synthesized_event); 735 tool, session, rec->evlist, process_synthesized_event);
805 if (err < 0) { 736 if (err < 0) {
@@ -845,26 +776,50 @@ static int record__synthesize(struct record *rec, bool tail)
845 goto out; 776 goto out;
846 } 777 }
847 778
848 err = perf_event__synthesize_kernel_mmap(tool, process_synthesized_event, 779 if (!perf_evlist__exclude_kernel(rec->evlist)) {
849 machine); 780 err = perf_event__synthesize_kernel_mmap(tool, process_synthesized_event,
850 WARN_ONCE(err < 0, "Couldn't record kernel reference relocation symbol\n" 781 machine);
851 "Symbol resolution may be skewed if relocation was used (e.g. kexec).\n" 782 WARN_ONCE(err < 0, "Couldn't record kernel reference relocation symbol\n"
852 "Check /proc/kallsyms permission or run as root.\n"); 783 "Symbol resolution may be skewed if relocation was used (e.g. kexec).\n"
853 784 "Check /proc/kallsyms permission or run as root.\n");
854 err = perf_event__synthesize_modules(tool, process_synthesized_event, 785
855 machine); 786 err = perf_event__synthesize_modules(tool, process_synthesized_event,
856 WARN_ONCE(err < 0, "Couldn't record kernel module information.\n" 787 machine);
857 "Symbol resolution may be skewed if relocation was used (e.g. kexec).\n" 788 WARN_ONCE(err < 0, "Couldn't record kernel module information.\n"
858 "Check /proc/modules permission or run as root.\n"); 789 "Symbol resolution may be skewed if relocation was used (e.g. kexec).\n"
790 "Check /proc/modules permission or run as root.\n");
791 }
859 792
860 if (perf_guest) { 793 if (perf_guest) {
861 machines__process_guests(&session->machines, 794 machines__process_guests(&session->machines,
862 perf_event__synthesize_guest_os, tool); 795 perf_event__synthesize_guest_os, tool);
863 } 796 }
864 797
798 err = perf_event__synthesize_extra_attr(&rec->tool,
799 rec->evlist,
800 process_synthesized_event,
801 data->is_pipe);
802 if (err)
803 goto out;
804
805 err = perf_event__synthesize_thread_map2(&rec->tool, rec->evlist->threads,
806 process_synthesized_event,
807 NULL);
808 if (err < 0) {
809 pr_err("Couldn't synthesize thread map.\n");
810 return err;
811 }
812
813 err = perf_event__synthesize_cpu_map(&rec->tool, rec->evlist->cpus,
814 process_synthesized_event, NULL);
815 if (err < 0) {
816 pr_err("Couldn't synthesize cpu map.\n");
817 return err;
818 }
819
865 err = __machine__synthesize_threads(machine, tool, &opts->target, rec->evlist->threads, 820 err = __machine__synthesize_threads(machine, tool, &opts->target, rec->evlist->threads,
866 process_synthesized_event, opts->sample_address, 821 process_synthesized_event, opts->sample_address,
867 opts->proc_map_timeout); 822 opts->proc_map_timeout, 1);
868out: 823out:
869 return err; 824 return err;
870} 825}
@@ -878,7 +833,7 @@ static int __cmd_record(struct record *rec, int argc, const char **argv)
878 struct machine *machine; 833 struct machine *machine;
879 struct perf_tool *tool = &rec->tool; 834 struct perf_tool *tool = &rec->tool;
880 struct record_opts *opts = &rec->opts; 835 struct record_opts *opts = &rec->opts;
881 struct perf_data_file *file = &rec->file; 836 struct perf_data *data = &rec->data;
882 struct perf_session *session; 837 struct perf_session *session;
883 bool disabled = false, draining = false; 838 bool disabled = false, draining = false;
884 int fd; 839 int fd;
@@ -904,20 +859,20 @@ static int __cmd_record(struct record *rec, int argc, const char **argv)
904 signal(SIGUSR2, SIG_IGN); 859 signal(SIGUSR2, SIG_IGN);
905 } 860 }
906 861
907 session = perf_session__new(file, false, tool); 862 session = perf_session__new(data, false, tool);
908 if (session == NULL) { 863 if (session == NULL) {
909 pr_err("Perf session creation failed.\n"); 864 pr_err("Perf session creation failed.\n");
910 return -1; 865 return -1;
911 } 866 }
912 867
913 fd = perf_data_file__fd(file); 868 fd = perf_data__fd(data);
914 rec->session = session; 869 rec->session = session;
915 870
916 record__init_features(rec); 871 record__init_features(rec);
917 872
918 if (forks) { 873 if (forks) {
919 err = perf_evlist__prepare_workload(rec->evlist, &opts->target, 874 err = perf_evlist__prepare_workload(rec->evlist, &opts->target,
920 argv, file->is_pipe, 875 argv, data->is_pipe,
921 workload_exec_failed_signal); 876 workload_exec_failed_signal);
922 if (err < 0) { 877 if (err < 0) {
923 pr_err("Couldn't run the workload!\n"); 878 pr_err("Couldn't run the workload!\n");
@@ -953,7 +908,7 @@ static int __cmd_record(struct record *rec, int argc, const char **argv)
953 if (!rec->evlist->nr_groups) 908 if (!rec->evlist->nr_groups)
954 perf_header__clear_feat(&session->header, HEADER_GROUP_DESC); 909 perf_header__clear_feat(&session->header, HEADER_GROUP_DESC);
955 910
956 if (file->is_pipe) { 911 if (data->is_pipe) {
957 err = perf_header__write_pipe(fd); 912 err = perf_header__write_pipe(fd);
958 if (err < 0) 913 if (err < 0)
959 goto out_child; 914 goto out_child;
@@ -1214,8 +1169,8 @@ out_child:
1214 samples[0] = '\0'; 1169 samples[0] = '\0';
1215 1170
1216 fprintf(stderr, "[ perf record: Captured and wrote %.3f MB %s%s%s ]\n", 1171 fprintf(stderr, "[ perf record: Captured and wrote %.3f MB %s%s%s ]\n",
1217 perf_data_file__size(file) / 1024.0 / 1024.0, 1172 perf_data__size(data) / 1024.0 / 1024.0,
1218 file->path, postfix, samples); 1173 data->file.path, postfix, samples);
1219 } 1174 }
1220 1175
1221out_delete_session: 1176out_delete_session:
@@ -1579,7 +1534,7 @@ static struct option __record_options[] = {
1579 OPT_STRING('C', "cpu", &record.opts.target.cpu_list, "cpu", 1534 OPT_STRING('C', "cpu", &record.opts.target.cpu_list, "cpu",
1580 "list of cpus to monitor"), 1535 "list of cpus to monitor"),
1581 OPT_U64('c', "count", &record.opts.user_interval, "event period to sample"), 1536 OPT_U64('c', "count", &record.opts.user_interval, "event period to sample"),
1582 OPT_STRING('o', "output", &record.file.path, "file", 1537 OPT_STRING('o', "output", &record.data.file.path, "file",
1583 "output file name"), 1538 "output file name"),
1584 OPT_BOOLEAN_SET('i', "no-inherit", &record.opts.no_inherit, 1539 OPT_BOOLEAN_SET('i', "no-inherit", &record.opts.no_inherit,
1585 &record.opts.no_inherit_set, 1540 &record.opts.no_inherit_set,
@@ -1611,7 +1566,8 @@ static struct option __record_options[] = {
1611 OPT_BOOLEAN_SET('T', "timestamp", &record.opts.sample_time, 1566 OPT_BOOLEAN_SET('T', "timestamp", &record.opts.sample_time,
1612 &record.opts.sample_time_set, 1567 &record.opts.sample_time_set,
1613 "Record the sample timestamps"), 1568 "Record the sample timestamps"),
1614 OPT_BOOLEAN('P', "period", &record.opts.period, "Record the sample period"), 1569 OPT_BOOLEAN_SET('P', "period", &record.opts.period, &record.opts.period_set,
1570 "Record the sample period"),
1615 OPT_BOOLEAN('n', "no-samples", &record.opts.no_samples, 1571 OPT_BOOLEAN('n', "no-samples", &record.opts.no_samples,
1616 "don't sample"), 1572 "don't sample"),
1617 OPT_BOOLEAN_SET('N', "no-buildid-cache", &record.no_buildid_cache, 1573 OPT_BOOLEAN_SET('N', "no-buildid-cache", &record.no_buildid_cache,
@@ -1644,6 +1600,9 @@ static struct option __record_options[] = {
1644 OPT_CALLBACK_OPTARG('I', "intr-regs", &record.opts.sample_intr_regs, NULL, "any register", 1600 OPT_CALLBACK_OPTARG('I', "intr-regs", &record.opts.sample_intr_regs, NULL, "any register",
1645 "sample selected machine registers on interrupt," 1601 "sample selected machine registers on interrupt,"
1646 " use -I ? to list register names", parse_regs), 1602 " use -I ? to list register names", parse_regs),
1603 OPT_CALLBACK_OPTARG(0, "user-regs", &record.opts.sample_user_regs, NULL, "any register",
1604 "sample selected machine registers on interrupt,"
1605 " use -I ? to list register names", parse_regs),
1647 OPT_BOOLEAN(0, "running-time", &record.opts.running_time, 1606 OPT_BOOLEAN(0, "running-time", &record.opts.running_time,
1648 "Record running/enabled time of read (:S) events"), 1607 "Record running/enabled time of read (:S) events"),
1649 OPT_CALLBACK('k', "clockid", &record.opts, 1608 OPT_CALLBACK('k', "clockid", &record.opts,
@@ -1673,6 +1632,8 @@ static struct option __record_options[] = {
1673 "Record build-id of all DSOs regardless of hits"), 1632 "Record build-id of all DSOs regardless of hits"),
1674 OPT_BOOLEAN(0, "timestamp-filename", &record.timestamp_filename, 1633 OPT_BOOLEAN(0, "timestamp-filename", &record.timestamp_filename,
1675 "append timestamp to output filename"), 1634 "append timestamp to output filename"),
1635 OPT_BOOLEAN(0, "timestamp-boundary", &record.timestamp_boundary,
1636 "Record timestamp boundary (time of first/last samples)"),
1676 OPT_STRING_OPTARG_SET(0, "switch-output", &record.switch_output.str, 1637 OPT_STRING_OPTARG_SET(0, "switch-output", &record.switch_output.str,
1677 &record.switch_output.set, "signal,size,time", 1638 &record.switch_output.set, "signal,size,time",
1678 "Switch output when receive SIGUSR2 or cross size,time threshold", 1639 "Switch output when receive SIGUSR2 or cross size,time threshold",
@@ -1786,7 +1747,7 @@ int cmd_record(int argc, const char **argv)
1786 1747
1787 err = -ENOMEM; 1748 err = -ENOMEM;
1788 1749
1789 if (symbol_conf.kptr_restrict) 1750 if (symbol_conf.kptr_restrict && !perf_evlist__exclude_kernel(rec->evlist))
1790 pr_warning( 1751 pr_warning(
1791"WARNING: Kernel address maps (/proc/{kallsyms,modules}) are restricted,\n" 1752"WARNING: Kernel address maps (/proc/{kallsyms,modules}) are restricted,\n"
1792"check /proc/sys/kernel/kptr_restrict.\n\n" 1753"check /proc/sys/kernel/kptr_restrict.\n\n"
@@ -1856,8 +1817,8 @@ int cmd_record(int argc, const char **argv)
1856 goto out; 1817 goto out;
1857 } 1818 }
1858 1819
1859 /* Enable ignoring missing threads when -u option is defined. */ 1820 /* Enable ignoring missing threads when -u/-p option is defined. */
1860 rec->opts.ignore_missing_thread = rec->opts.target.uid != UINT_MAX; 1821 rec->opts.ignore_missing_thread = rec->opts.target.uid != UINT_MAX || rec->opts.target.pid;
1861 1822
1862 err = -ENOMEM; 1823 err = -ENOMEM;
1863 if (perf_evlist__create_maps(rec->evlist, &rec->opts.target) < 0) 1824 if (perf_evlist__create_maps(rec->evlist, &rec->opts.target) < 0)
diff --git a/tools/perf/builtin-report.c b/tools/perf/builtin-report.c
index fae4b0340750..4ad5dc649716 100644
--- a/tools/perf/builtin-report.c
+++ b/tools/perf/builtin-report.c
@@ -15,6 +15,7 @@
15#include "util/color.h" 15#include "util/color.h"
16#include <linux/list.h> 16#include <linux/list.h>
17#include <linux/rbtree.h> 17#include <linux/rbtree.h>
18#include <linux/err.h>
18#include "util/symbol.h" 19#include "util/symbol.h"
19#include "util/callchain.h" 20#include "util/callchain.h"
20#include "util/values.h" 21#include "util/values.h"
@@ -51,6 +52,7 @@
51#include <sys/types.h> 52#include <sys/types.h>
52#include <sys/stat.h> 53#include <sys/stat.h>
53#include <unistd.h> 54#include <unistd.h>
55#include <linux/mman.h>
54 56
55struct report { 57struct report {
56 struct perf_tool tool; 58 struct perf_tool tool;
@@ -60,6 +62,9 @@ struct report {
60 bool show_threads; 62 bool show_threads;
61 bool inverted_callchain; 63 bool inverted_callchain;
62 bool mem_mode; 64 bool mem_mode;
65 bool stats_mode;
66 bool tasks_mode;
67 bool mmaps_mode;
63 bool header; 68 bool header;
64 bool header_only; 69 bool header_only;
65 bool nonany_branch_mode; 70 bool nonany_branch_mode;
@@ -69,7 +74,9 @@ struct report {
69 const char *cpu_list; 74 const char *cpu_list;
70 const char *symbol_filter_str; 75 const char *symbol_filter_str;
71 const char *time_str; 76 const char *time_str;
72 struct perf_time_interval ptime; 77 struct perf_time_interval *ptime_range;
78 int range_size;
79 int range_num;
73 float min_percent; 80 float min_percent;
74 u64 nr_entries; 81 u64 nr_entries;
75 u64 queue_size; 82 u64 queue_size;
@@ -162,12 +169,28 @@ static int hist_iter__branch_callback(struct hist_entry_iter *iter,
162 struct hist_entry *he = iter->he; 169 struct hist_entry *he = iter->he;
163 struct report *rep = arg; 170 struct report *rep = arg;
164 struct branch_info *bi; 171 struct branch_info *bi;
172 struct perf_sample *sample = iter->sample;
173 struct perf_evsel *evsel = iter->evsel;
174 int err;
175
176 if (!ui__has_annotation())
177 return 0;
178
179 hist__account_cycles(sample->branch_stack, al, sample,
180 rep->nonany_branch_mode);
165 181
166 bi = he->branch_info; 182 bi = he->branch_info;
183 err = addr_map_symbol__inc_samples(&bi->from, sample, evsel->idx);
184 if (err)
185 goto out;
186
187 err = addr_map_symbol__inc_samples(&bi->to, sample, evsel->idx);
188
167 branch_type_count(&rep->brtype_stat, &bi->flags, 189 branch_type_count(&rep->brtype_stat, &bi->flags,
168 bi->from.addr, bi->to.addr); 190 bi->from.addr, bi->to.addr);
169 191
170 return 0; 192out:
193 return err;
171} 194}
172 195
173static int process_sample_event(struct perf_tool *tool, 196static int process_sample_event(struct perf_tool *tool,
@@ -186,8 +209,10 @@ static int process_sample_event(struct perf_tool *tool,
186 }; 209 };
187 int ret = 0; 210 int ret = 0;
188 211
189 if (perf_time__skip_sample(&rep->ptime, sample->time)) 212 if (perf_time__ranges_skip_sample(rep->ptime_range, rep->range_num,
213 sample->time)) {
190 return 0; 214 return 0;
215 }
191 216
192 if (machine__resolve(machine, &al, sample) < 0) { 217 if (machine__resolve(machine, &al, sample) < 0) {
193 pr_debug("problem processing %d event, skipping it.\n", 218 pr_debug("problem processing %d event, skipping it.\n",
@@ -258,7 +283,7 @@ static int report__setup_sample_type(struct report *rep)
258{ 283{
259 struct perf_session *session = rep->session; 284 struct perf_session *session = rep->session;
260 u64 sample_type = perf_evlist__combined_sample_type(session->evlist); 285 u64 sample_type = perf_evlist__combined_sample_type(session->evlist);
261 bool is_pipe = perf_data_file__is_pipe(session->file); 286 bool is_pipe = perf_data__is_pipe(session->data);
262 287
263 if (session->itrace_synth_opts->callchain || 288 if (session->itrace_synth_opts->callchain ||
264 (!is_pipe && 289 (!is_pipe &&
@@ -312,9 +337,10 @@ static int report__setup_sample_type(struct report *rep)
312 337
313 if (symbol_conf.use_callchain || symbol_conf.cumulate_callchain) { 338 if (symbol_conf.use_callchain || symbol_conf.cumulate_callchain) {
314 if ((sample_type & PERF_SAMPLE_REGS_USER) && 339 if ((sample_type & PERF_SAMPLE_REGS_USER) &&
315 (sample_type & PERF_SAMPLE_STACK_USER)) 340 (sample_type & PERF_SAMPLE_STACK_USER)) {
316 callchain_param.record_mode = CALLCHAIN_DWARF; 341 callchain_param.record_mode = CALLCHAIN_DWARF;
317 else if (sample_type & PERF_SAMPLE_BRANCH_STACK) 342 dwarf_callchain_users = true;
343 } else if (sample_type & PERF_SAMPLE_BRANCH_STACK)
318 callchain_param.record_mode = CALLCHAIN_LBR; 344 callchain_param.record_mode = CALLCHAIN_LBR;
319 else 345 else
320 callchain_param.record_mode = CALLCHAIN_FP; 346 callchain_param.record_mode = CALLCHAIN_FP;
@@ -377,6 +403,9 @@ static size_t hists__fprintf_nr_sample_events(struct hists *hists, struct report
377 if (evname != NULL) 403 if (evname != NULL)
378 ret += fprintf(fp, " of event '%s'", evname); 404 ret += fprintf(fp, " of event '%s'", evname);
379 405
406 if (rep->time_str)
407 ret += fprintf(fp, " (time slices: %s)", rep->time_str);
408
380 if (symbol_conf.show_ref_callgraph && 409 if (symbol_conf.show_ref_callgraph &&
381 strstr(evname, "call-graph=no")) { 410 strstr(evname, "call-graph=no")) {
382 ret += fprintf(fp, ", show reference callgraph"); 411 ret += fprintf(fp, ", show reference callgraph");
@@ -441,6 +470,9 @@ static void report__warn_kptr_restrict(const struct report *rep)
441 struct map *kernel_map = machine__kernel_map(&rep->session->machines.host); 470 struct map *kernel_map = machine__kernel_map(&rep->session->machines.host);
442 struct kmap *kernel_kmap = kernel_map ? map__kmap(kernel_map) : NULL; 471 struct kmap *kernel_kmap = kernel_map ? map__kmap(kernel_map) : NULL;
443 472
473 if (perf_evlist__exclude_kernel(rep->session->evlist))
474 return;
475
444 if (kernel_map == NULL || 476 if (kernel_map == NULL ||
445 (kernel_map->dso->hit && 477 (kernel_map->dso->hit &&
446 (kernel_kmap->ref_reloc_sym == NULL || 478 (kernel_kmap->ref_reloc_sym == NULL ||
@@ -498,7 +530,8 @@ static int report__browse_hists(struct report *rep)
498 case 1: 530 case 1:
499 ret = perf_evlist__tui_browse_hists(evlist, help, NULL, 531 ret = perf_evlist__tui_browse_hists(evlist, help, NULL,
500 rep->min_percent, 532 rep->min_percent,
501 &session->header.env); 533 &session->header.env,
534 true);
502 /* 535 /*
503 * Usually "ret" is the last pressed key, and we only 536 * Usually "ret" is the last pressed key, and we only
504 * care if the key notifies us to switch data file. 537 * care if the key notifies us to switch data file.
@@ -564,12 +597,180 @@ static void report__output_resort(struct report *rep)
564 ui_progress__finish(); 597 ui_progress__finish();
565} 598}
566 599
600static void stats_setup(struct report *rep)
601{
602 memset(&rep->tool, 0, sizeof(rep->tool));
603 rep->tool.no_warn = true;
604}
605
606static int stats_print(struct report *rep)
607{
608 struct perf_session *session = rep->session;
609
610 perf_session__fprintf_nr_events(session, stdout);
611 return 0;
612}
613
614static void tasks_setup(struct report *rep)
615{
616 memset(&rep->tool, 0, sizeof(rep->tool));
617 if (rep->mmaps_mode) {
618 rep->tool.mmap = perf_event__process_mmap;
619 rep->tool.mmap2 = perf_event__process_mmap2;
620 }
621 rep->tool.comm = perf_event__process_comm;
622 rep->tool.exit = perf_event__process_exit;
623 rep->tool.fork = perf_event__process_fork;
624 rep->tool.no_warn = true;
625}
626
627struct task {
628 struct thread *thread;
629 struct list_head list;
630 struct list_head children;
631};
632
633static struct task *tasks_list(struct task *task, struct machine *machine)
634{
635 struct thread *parent_thread, *thread = task->thread;
636 struct task *parent_task;
637
638 /* Already listed. */
639 if (!list_empty(&task->list))
640 return NULL;
641
642 /* Last one in the chain. */
643 if (thread->ppid == -1)
644 return task;
645
646 parent_thread = machine__find_thread(machine, -1, thread->ppid);
647 if (!parent_thread)
648 return ERR_PTR(-ENOENT);
649
650 parent_task = thread__priv(parent_thread);
651 list_add_tail(&task->list, &parent_task->children);
652 return tasks_list(parent_task, machine);
653}
654
655static size_t maps__fprintf_task(struct maps *maps, int indent, FILE *fp)
656{
657 size_t printed = 0;
658 struct rb_node *nd;
659
660 for (nd = rb_first(&maps->entries); nd; nd = rb_next(nd)) {
661 struct map *map = rb_entry(nd, struct map, rb_node);
662
663 printed += fprintf(fp, "%*s %" PRIx64 "-%" PRIx64 " %c%c%c%c %08" PRIx64 " %" PRIu64 " %s\n",
664 indent, "", map->start, map->end,
665 map->prot & PROT_READ ? 'r' : '-',
666 map->prot & PROT_WRITE ? 'w' : '-',
667 map->prot & PROT_EXEC ? 'x' : '-',
668 map->flags & MAP_SHARED ? 's' : 'p',
669 map->pgoff,
670 map->ino, map->dso->name);
671 }
672
673 return printed;
674}
675
676static int map_groups__fprintf_task(struct map_groups *mg, int indent, FILE *fp)
677{
678 int printed = 0, i;
679 for (i = 0; i < MAP__NR_TYPES; ++i)
680 printed += maps__fprintf_task(&mg->maps[i], indent, fp);
681 return printed;
682}
683
684static void task__print_level(struct task *task, FILE *fp, int level)
685{
686 struct thread *thread = task->thread;
687 struct task *child;
688 int comm_indent = fprintf(fp, " %8d %8d %8d |%*s",
689 thread->pid_, thread->tid, thread->ppid,
690 level, "");
691
692 fprintf(fp, "%s\n", thread__comm_str(thread));
693
694 map_groups__fprintf_task(thread->mg, comm_indent, fp);
695
696 if (!list_empty(&task->children)) {
697 list_for_each_entry(child, &task->children, list)
698 task__print_level(child, fp, level + 1);
699 }
700}
701
702static int tasks_print(struct report *rep, FILE *fp)
703{
704 struct perf_session *session = rep->session;
705 struct machine *machine = &session->machines.host;
706 struct task *tasks, *task;
707 unsigned int nr = 0, itask = 0, i;
708 struct rb_node *nd;
709 LIST_HEAD(list);
710
711 /*
712 * No locking needed while accessing machine->threads,
713 * because --tasks is single threaded command.
714 */
715
716 /* Count all the threads. */
717 for (i = 0; i < THREADS__TABLE_SIZE; i++)
718 nr += machine->threads[i].nr;
719
720 tasks = malloc(sizeof(*tasks) * nr);
721 if (!tasks)
722 return -ENOMEM;
723
724 for (i = 0; i < THREADS__TABLE_SIZE; i++) {
725 struct threads *threads = &machine->threads[i];
726
727 for (nd = rb_first(&threads->entries); nd; nd = rb_next(nd)) {
728 task = tasks + itask++;
729
730 task->thread = rb_entry(nd, struct thread, rb_node);
731 INIT_LIST_HEAD(&task->children);
732 INIT_LIST_HEAD(&task->list);
733 thread__set_priv(task->thread, task);
734 }
735 }
736
737 /*
738 * Iterate every task down to the unprocessed parent
739 * and link all in task children list. Task with no
740 * parent is added into 'list'.
741 */
742 for (itask = 0; itask < nr; itask++) {
743 task = tasks + itask;
744
745 if (!list_empty(&task->list))
746 continue;
747
748 task = tasks_list(task, machine);
749 if (IS_ERR(task)) {
750 pr_err("Error: failed to process tasks\n");
751 free(tasks);
752 return PTR_ERR(task);
753 }
754
755 if (task)
756 list_add_tail(&task->list, &list);
757 }
758
759 fprintf(fp, "# %8s %8s %8s %s\n", "pid", "tid", "ppid", "comm");
760
761 list_for_each_entry(task, &list, list)
762 task__print_level(task, fp, 0);
763
764 free(tasks);
765 return 0;
766}
767
567static int __cmd_report(struct report *rep) 768static int __cmd_report(struct report *rep)
568{ 769{
569 int ret; 770 int ret;
570 struct perf_session *session = rep->session; 771 struct perf_session *session = rep->session;
571 struct perf_evsel *pos; 772 struct perf_evsel *pos;
572 struct perf_data_file *file = session->file; 773 struct perf_data *data = session->data;
573 774
574 signal(SIGINT, sig_handler); 775 signal(SIGINT, sig_handler);
575 776
@@ -595,12 +796,24 @@ static int __cmd_report(struct report *rep)
595 return ret; 796 return ret;
596 } 797 }
597 798
799 if (rep->stats_mode)
800 stats_setup(rep);
801
802 if (rep->tasks_mode)
803 tasks_setup(rep);
804
598 ret = perf_session__process_events(session); 805 ret = perf_session__process_events(session);
599 if (ret) { 806 if (ret) {
600 ui__error("failed to process sample\n"); 807 ui__error("failed to process sample\n");
601 return ret; 808 return ret;
602 } 809 }
603 810
811 if (rep->stats_mode)
812 return stats_print(rep);
813
814 if (rep->tasks_mode)
815 return tasks_print(rep, stdout);
816
604 report__warn_kptr_restrict(rep); 817 report__warn_kptr_restrict(rep);
605 818
606 evlist__for_each_entry(session->evlist, pos) 819 evlist__for_each_entry(session->evlist, pos)
@@ -638,7 +851,7 @@ static int __cmd_report(struct report *rep)
638 rep->nr_entries += evsel__hists(pos)->nr_entries; 851 rep->nr_entries += evsel__hists(pos)->nr_entries;
639 852
640 if (rep->nr_entries == 0) { 853 if (rep->nr_entries == 0) {
641 ui__error("The %s file has no samples!\n", file->path); 854 ui__error("The %s file has no samples!\n", data->file.path);
642 return 0; 855 return 0;
643 } 856 }
644 857
@@ -757,6 +970,9 @@ int cmd_report(int argc, const char **argv)
757 OPT_BOOLEAN('q', "quiet", &quiet, "Do not show any message"), 970 OPT_BOOLEAN('q', "quiet", &quiet, "Do not show any message"),
758 OPT_BOOLEAN('D', "dump-raw-trace", &dump_trace, 971 OPT_BOOLEAN('D', "dump-raw-trace", &dump_trace,
759 "dump raw trace in ASCII"), 972 "dump raw trace in ASCII"),
973 OPT_BOOLEAN(0, "stats", &report.stats_mode, "Display event stats"),
974 OPT_BOOLEAN(0, "tasks", &report.tasks_mode, "Display recorded tasks"),
975 OPT_BOOLEAN(0, "mmaps", &report.mmaps_mode, "Display recorded tasks memory maps"),
760 OPT_STRING('k', "vmlinux", &symbol_conf.vmlinux_name, 976 OPT_STRING('k', "vmlinux", &symbol_conf.vmlinux_name,
761 "file", "vmlinux pathname"), 977 "file", "vmlinux pathname"),
762 OPT_STRING(0, "kallsyms", &symbol_conf.kallsyms_name, 978 OPT_STRING(0, "kallsyms", &symbol_conf.kallsyms_name,
@@ -880,7 +1096,7 @@ int cmd_report(int argc, const char **argv)
880 "Show inline function"), 1096 "Show inline function"),
881 OPT_END() 1097 OPT_END()
882 }; 1098 };
883 struct perf_data_file file = { 1099 struct perf_data data = {
884 .mode = PERF_DATA_MODE_READ, 1100 .mode = PERF_DATA_MODE_READ,
885 }; 1101 };
886 int ret = hists__init(); 1102 int ret = hists__init();
@@ -904,6 +1120,9 @@ int cmd_report(int argc, const char **argv)
904 report.symbol_filter_str = argv[0]; 1120 report.symbol_filter_str = argv[0];
905 } 1121 }
906 1122
1123 if (report.mmaps_mode)
1124 report.tasks_mode = true;
1125
907 if (quiet) 1126 if (quiet)
908 perf_quiet_option(); 1127 perf_quiet_option();
909 1128
@@ -918,13 +1137,6 @@ int cmd_report(int argc, const char **argv)
918 return -EINVAL; 1137 return -EINVAL;
919 } 1138 }
920 1139
921 if (report.use_stdio)
922 use_browser = 0;
923 else if (report.use_tui)
924 use_browser = 1;
925 else if (report.use_gtk)
926 use_browser = 2;
927
928 if (report.inverted_callchain) 1140 if (report.inverted_callchain)
929 callchain_param.order = ORDER_CALLER; 1141 callchain_param.order = ORDER_CALLER;
930 if (symbol_conf.cumulate_callchain && !callchain_param.order_set) 1142 if (symbol_conf.cumulate_callchain && !callchain_param.order_set)
@@ -941,11 +1153,11 @@ int cmd_report(int argc, const char **argv)
941 input_name = "perf.data"; 1153 input_name = "perf.data";
942 } 1154 }
943 1155
944 file.path = input_name; 1156 data.file.path = input_name;
945 file.force = symbol_conf.force; 1157 data.force = symbol_conf.force;
946 1158
947repeat: 1159repeat:
948 session = perf_session__new(&file, false, &report.tool); 1160 session = perf_session__new(&data, false, &report.tool);
949 if (session == NULL) 1161 if (session == NULL)
950 return -1; 1162 return -1;
951 1163
@@ -1011,6 +1223,13 @@ repeat:
1011 perf_hpp_list.need_collapse = true; 1223 perf_hpp_list.need_collapse = true;
1012 } 1224 }
1013 1225
1226 if (report.use_stdio)
1227 use_browser = 0;
1228 else if (report.use_tui)
1229 use_browser = 1;
1230 else if (report.use_gtk)
1231 use_browser = 2;
1232
1014 /* Force tty output for header output and per-thread stat. */ 1233 /* Force tty output for header output and per-thread stat. */
1015 if (report.header || report.header_only || report.show_threads) 1234 if (report.header || report.header_only || report.show_threads)
1016 use_browser = 0; 1235 use_browser = 0;
@@ -1018,6 +1237,12 @@ repeat:
1018 report.tool.show_feat_hdr = SHOW_FEAT_HEADER; 1237 report.tool.show_feat_hdr = SHOW_FEAT_HEADER;
1019 if (report.show_full_info) 1238 if (report.show_full_info)
1020 report.tool.show_feat_hdr = SHOW_FEAT_HEADER_FULL_INFO; 1239 report.tool.show_feat_hdr = SHOW_FEAT_HEADER_FULL_INFO;
1240 if (report.stats_mode || report.tasks_mode)
1241 use_browser = 0;
1242 if (report.stats_mode && report.tasks_mode) {
1243 pr_err("Error: --tasks and --mmaps can't be used together with --stats\n");
1244 goto error;
1245 }
1021 1246
1022 if (strcmp(input_name, "-") != 0) 1247 if (strcmp(input_name, "-") != 0)
1023 setup_browser(true); 1248 setup_browser(true);
@@ -1040,7 +1265,8 @@ repeat:
1040 ret = 0; 1265 ret = 0;
1041 goto error; 1266 goto error;
1042 } 1267 }
1043 } else if (use_browser == 0 && !quiet) { 1268 } else if (use_browser == 0 && !quiet &&
1269 !report.stats_mode && !report.tasks_mode) {
1044 fputs("# To display the perf.data header info, please use --header/--header-only options.\n#\n", 1270 fputs("# To display the perf.data header info, please use --header/--header-only options.\n#\n",
1045 stdout); 1271 stdout);
1046 } 1272 }
@@ -1074,9 +1300,36 @@ repeat:
1074 if (symbol__init(&session->header.env) < 0) 1300 if (symbol__init(&session->header.env) < 0)
1075 goto error; 1301 goto error;
1076 1302
1077 if (perf_time__parse_str(&report.ptime, report.time_str) != 0) { 1303 report.ptime_range = perf_time__range_alloc(report.time_str,
1078 pr_err("Invalid time string\n"); 1304 &report.range_size);
1079 return -EINVAL; 1305 if (!report.ptime_range) {
1306 ret = -ENOMEM;
1307 goto error;
1308 }
1309
1310 if (perf_time__parse_str(report.ptime_range, report.time_str) != 0) {
1311 if (session->evlist->first_sample_time == 0 &&
1312 session->evlist->last_sample_time == 0) {
1313 pr_err("HINT: no first/last sample time found in perf data.\n"
1314 "Please use latest perf binary to execute 'perf record'\n"
1315 "(if '--buildid-all' is enabled, please set '--timestamp-boundary').\n");
1316 ret = -EINVAL;
1317 goto error;
1318 }
1319
1320 report.range_num = perf_time__percent_parse_str(
1321 report.ptime_range, report.range_size,
1322 report.time_str,
1323 session->evlist->first_sample_time,
1324 session->evlist->last_sample_time);
1325
1326 if (report.range_num < 0) {
1327 pr_err("Invalid time string\n");
1328 ret = -EINVAL;
1329 goto error;
1330 }
1331 } else {
1332 report.range_num = 1;
1080 } 1333 }
1081 1334
1082 sort__setup_elide(stdout); 1335 sort__setup_elide(stdout);
@@ -1089,6 +1342,8 @@ repeat:
1089 ret = 0; 1342 ret = 0;
1090 1343
1091error: 1344error:
1345 zfree(&report.ptime_range);
1346
1092 perf_session__delete(session); 1347 perf_session__delete(session);
1093 return ret; 1348 return ret;
1094} 1349}
diff --git a/tools/perf/builtin-sched.c b/tools/perf/builtin-sched.c
index f380d91ee609..83283fedb00f 100644
--- a/tools/perf/builtin-sched.c
+++ b/tools/perf/builtin-sched.c
@@ -1701,14 +1701,16 @@ static int perf_sched__read_events(struct perf_sched *sched)
1701 { "sched:sched_migrate_task", process_sched_migrate_task_event, }, 1701 { "sched:sched_migrate_task", process_sched_migrate_task_event, },
1702 }; 1702 };
1703 struct perf_session *session; 1703 struct perf_session *session;
1704 struct perf_data_file file = { 1704 struct perf_data data = {
1705 .path = input_name, 1705 .file = {
1706 .mode = PERF_DATA_MODE_READ, 1706 .path = input_name,
1707 .force = sched->force, 1707 },
1708 .mode = PERF_DATA_MODE_READ,
1709 .force = sched->force,
1708 }; 1710 };
1709 int rc = -1; 1711 int rc = -1;
1710 1712
1711 session = perf_session__new(&file, false, &sched->tool); 1713 session = perf_session__new(&data, false, &sched->tool);
1712 if (session == NULL) { 1714 if (session == NULL) {
1713 pr_debug("No Memory for session\n"); 1715 pr_debug("No Memory for session\n");
1714 return -1; 1716 return -1;
@@ -2903,10 +2905,12 @@ static int perf_sched__timehist(struct perf_sched *sched)
2903 const struct perf_evsel_str_handler migrate_handlers[] = { 2905 const struct perf_evsel_str_handler migrate_handlers[] = {
2904 { "sched:sched_migrate_task", timehist_migrate_task_event, }, 2906 { "sched:sched_migrate_task", timehist_migrate_task_event, },
2905 }; 2907 };
2906 struct perf_data_file file = { 2908 struct perf_data data = {
2907 .path = input_name, 2909 .file = {
2908 .mode = PERF_DATA_MODE_READ, 2910 .path = input_name,
2909 .force = sched->force, 2911 },
2912 .mode = PERF_DATA_MODE_READ,
2913 .force = sched->force,
2910 }; 2914 };
2911 2915
2912 struct perf_session *session; 2916 struct perf_session *session;
@@ -2931,7 +2935,7 @@ static int perf_sched__timehist(struct perf_sched *sched)
2931 2935
2932 symbol_conf.use_callchain = sched->show_callchain; 2936 symbol_conf.use_callchain = sched->show_callchain;
2933 2937
2934 session = perf_session__new(&file, false, &sched->tool); 2938 session = perf_session__new(&data, false, &sched->tool);
2935 if (session == NULL) 2939 if (session == NULL)
2936 return -ENOMEM; 2940 return -ENOMEM;
2937 2941
@@ -3364,6 +3368,10 @@ int cmd_sched(int argc, const char **argv)
3364 OPT_STRING(0, "time", &sched.time_str, "str", 3368 OPT_STRING(0, "time", &sched.time_str, "str",
3365 "Time span for analysis (start,stop)"), 3369 "Time span for analysis (start,stop)"),
3366 OPT_BOOLEAN(0, "state", &sched.show_state, "Show task state when sched-out"), 3370 OPT_BOOLEAN(0, "state", &sched.show_state, "Show task state when sched-out"),
3371 OPT_STRING('p', "pid", &symbol_conf.pid_list_str, "pid[,pid...]",
3372 "analyze events only for given process id(s)"),
3373 OPT_STRING('t', "tid", &symbol_conf.tid_list_str, "tid[,tid...]",
3374 "analyze events only for given thread id(s)"),
3367 OPT_PARENT(sched_options) 3375 OPT_PARENT(sched_options)
3368 }; 3376 };
3369 3377
diff --git a/tools/perf/builtin-script.c b/tools/perf/builtin-script.c
index 0fe02758de7d..ab19a6ee4093 100644
--- a/tools/perf/builtin-script.c
+++ b/tools/perf/builtin-script.c
@@ -22,9 +22,11 @@
22#include "util/cpumap.h" 22#include "util/cpumap.h"
23#include "util/thread_map.h" 23#include "util/thread_map.h"
24#include "util/stat.h" 24#include "util/stat.h"
25#include "util/color.h"
25#include "util/string2.h" 26#include "util/string2.h"
26#include "util/thread-stack.h" 27#include "util/thread-stack.h"
27#include "util/time-utils.h" 28#include "util/time-utils.h"
29#include "util/path.h"
28#include "print_binary.h" 30#include "print_binary.h"
29#include <linux/bitmap.h> 31#include <linux/bitmap.h>
30#include <linux/kernel.h> 32#include <linux/kernel.h>
@@ -40,6 +42,7 @@
40#include <sys/param.h> 42#include <sys/param.h>
41#include <sys/types.h> 43#include <sys/types.h>
42#include <sys/stat.h> 44#include <sys/stat.h>
45#include <fcntl.h>
43#include <unistd.h> 46#include <unistd.h>
44 47
45#include "sane_ctype.h" 48#include "sane_ctype.h"
@@ -89,6 +92,9 @@ enum perf_output_field {
89 PERF_OUTPUT_BRSTACKOFF = 1U << 24, 92 PERF_OUTPUT_BRSTACKOFF = 1U << 24,
90 PERF_OUTPUT_SYNTH = 1U << 25, 93 PERF_OUTPUT_SYNTH = 1U << 25,
91 PERF_OUTPUT_PHYS_ADDR = 1U << 26, 94 PERF_OUTPUT_PHYS_ADDR = 1U << 26,
95 PERF_OUTPUT_UREGS = 1U << 27,
96 PERF_OUTPUT_METRIC = 1U << 28,
97 PERF_OUTPUT_MISC = 1U << 29,
92}; 98};
93 99
94struct output_option { 100struct output_option {
@@ -110,6 +116,7 @@ struct output_option {
110 {.str = "srcline", .field = PERF_OUTPUT_SRCLINE}, 116 {.str = "srcline", .field = PERF_OUTPUT_SRCLINE},
111 {.str = "period", .field = PERF_OUTPUT_PERIOD}, 117 {.str = "period", .field = PERF_OUTPUT_PERIOD},
112 {.str = "iregs", .field = PERF_OUTPUT_IREGS}, 118 {.str = "iregs", .field = PERF_OUTPUT_IREGS},
119 {.str = "uregs", .field = PERF_OUTPUT_UREGS},
113 {.str = "brstack", .field = PERF_OUTPUT_BRSTACK}, 120 {.str = "brstack", .field = PERF_OUTPUT_BRSTACK},
114 {.str = "brstacksym", .field = PERF_OUTPUT_BRSTACKSYM}, 121 {.str = "brstacksym", .field = PERF_OUTPUT_BRSTACKSYM},
115 {.str = "data_src", .field = PERF_OUTPUT_DATA_SRC}, 122 {.str = "data_src", .field = PERF_OUTPUT_DATA_SRC},
@@ -122,6 +129,8 @@ struct output_option {
122 {.str = "brstackoff", .field = PERF_OUTPUT_BRSTACKOFF}, 129 {.str = "brstackoff", .field = PERF_OUTPUT_BRSTACKOFF},
123 {.str = "synth", .field = PERF_OUTPUT_SYNTH}, 130 {.str = "synth", .field = PERF_OUTPUT_SYNTH},
124 {.str = "phys_addr", .field = PERF_OUTPUT_PHYS_ADDR}, 131 {.str = "phys_addr", .field = PERF_OUTPUT_PHYS_ADDR},
132 {.str = "metric", .field = PERF_OUTPUT_METRIC},
133 {.str = "misc", .field = PERF_OUTPUT_MISC},
125}; 134};
126 135
127enum { 136enum {
@@ -209,6 +218,58 @@ static struct {
209 }, 218 },
210}; 219};
211 220
221struct perf_evsel_script {
222 char *filename;
223 FILE *fp;
224 u64 samples;
225 /* For metric output */
226 u64 val;
227 int gnum;
228};
229
230static inline struct perf_evsel_script *evsel_script(struct perf_evsel *evsel)
231{
232 return (struct perf_evsel_script *)evsel->priv;
233}
234
235static struct perf_evsel_script *perf_evsel_script__new(struct perf_evsel *evsel,
236 struct perf_data *data)
237{
238 struct perf_evsel_script *es = zalloc(sizeof(*es));
239
240 if (es != NULL) {
241 if (asprintf(&es->filename, "%s.%s.dump", data->file.path, perf_evsel__name(evsel)) < 0)
242 goto out_free;
243 es->fp = fopen(es->filename, "w");
244 if (es->fp == NULL)
245 goto out_free_filename;
246 }
247
248 return es;
249out_free_filename:
250 zfree(&es->filename);
251out_free:
252 free(es);
253 return NULL;
254}
255
256static void perf_evsel_script__delete(struct perf_evsel_script *es)
257{
258 zfree(&es->filename);
259 fclose(es->fp);
260 es->fp = NULL;
261 free(es);
262}
263
264static int perf_evsel_script__fprintf(struct perf_evsel_script *es, FILE *fp)
265{
266 struct stat st;
267
268 fstat(fileno(es->fp), &st);
269 return fprintf(fp, "[ perf script: Wrote %.3f MB %s (%" PRIu64 " samples) ]\n",
270 st.st_size / 1024.0 / 1024.0, es->filename, es->samples);
271}
272
212static inline int output_type(unsigned int type) 273static inline int output_type(unsigned int type)
213{ 274{
214 switch (type) { 275 switch (type) {
@@ -376,16 +437,16 @@ static int perf_evsel__check_attr(struct perf_evsel *evsel,
376 PERF_OUTPUT_CPU, allow_user_set)) 437 PERF_OUTPUT_CPU, allow_user_set))
377 return -EINVAL; 438 return -EINVAL;
378 439
379 if (PRINT_FIELD(PERIOD) &&
380 perf_evsel__check_stype(evsel, PERF_SAMPLE_PERIOD, "PERIOD",
381 PERF_OUTPUT_PERIOD))
382 return -EINVAL;
383
384 if (PRINT_FIELD(IREGS) && 440 if (PRINT_FIELD(IREGS) &&
385 perf_evsel__check_stype(evsel, PERF_SAMPLE_REGS_INTR, "IREGS", 441 perf_evsel__check_stype(evsel, PERF_SAMPLE_REGS_INTR, "IREGS",
386 PERF_OUTPUT_IREGS)) 442 PERF_OUTPUT_IREGS))
387 return -EINVAL; 443 return -EINVAL;
388 444
445 if (PRINT_FIELD(UREGS) &&
446 perf_evsel__check_stype(evsel, PERF_SAMPLE_REGS_USER, "UREGS",
447 PERF_OUTPUT_UREGS))
448 return -EINVAL;
449
389 if (PRINT_FIELD(PHYS_ADDR) && 450 if (PRINT_FIELD(PHYS_ADDR) &&
390 perf_evsel__check_stype(evsel, PERF_SAMPLE_PHYS_ADDR, "PHYS_ADDR", 451 perf_evsel__check_stype(evsel, PERF_SAMPLE_PHYS_ADDR, "PHYS_ADDR",
391 PERF_OUTPUT_PHYS_ADDR)) 452 PERF_OUTPUT_PHYS_ADDR))
@@ -494,51 +555,118 @@ out:
494 return 0; 555 return 0;
495} 556}
496 557
497static void print_sample_iregs(struct perf_sample *sample, 558static int perf_sample__fprintf_iregs(struct perf_sample *sample,
498 struct perf_event_attr *attr) 559 struct perf_event_attr *attr, FILE *fp)
499{ 560{
500 struct regs_dump *regs = &sample->intr_regs; 561 struct regs_dump *regs = &sample->intr_regs;
501 uint64_t mask = attr->sample_regs_intr; 562 uint64_t mask = attr->sample_regs_intr;
502 unsigned i = 0, r; 563 unsigned i = 0, r;
564 int printed = 0;
503 565
504 if (!regs) 566 if (!regs)
505 return; 567 return 0;
506 568
507 for_each_set_bit(r, (unsigned long *) &mask, sizeof(mask) * 8) { 569 for_each_set_bit(r, (unsigned long *) &mask, sizeof(mask) * 8) {
508 u64 val = regs->regs[i++]; 570 u64 val = regs->regs[i++];
509 printf("%5s:0x%"PRIx64" ", perf_reg_name(r), val); 571 printed += fprintf(fp, "%5s:0x%"PRIx64" ", perf_reg_name(r), val);
510 } 572 }
573
574 return printed;
511} 575}
512 576
513static void print_sample_start(struct perf_sample *sample, 577static int perf_sample__fprintf_uregs(struct perf_sample *sample,
514 struct thread *thread, 578 struct perf_event_attr *attr, FILE *fp)
515 struct perf_evsel *evsel) 579{
580 struct regs_dump *regs = &sample->user_regs;
581 uint64_t mask = attr->sample_regs_user;
582 unsigned i = 0, r;
583 int printed = 0;
584
585 if (!regs || !regs->regs)
586 return 0;
587
588 printed += fprintf(fp, " ABI:%" PRIu64 " ", regs->abi);
589
590 for_each_set_bit(r, (unsigned long *) &mask, sizeof(mask) * 8) {
591 u64 val = regs->regs[i++];
592 printed += fprintf(fp, "%5s:0x%"PRIx64" ", perf_reg_name(r), val);
593 }
594
595 return printed;
596}
597
598static int perf_sample__fprintf_start(struct perf_sample *sample,
599 struct thread *thread,
600 struct perf_evsel *evsel,
601 u32 type, FILE *fp)
516{ 602{
517 struct perf_event_attr *attr = &evsel->attr; 603 struct perf_event_attr *attr = &evsel->attr;
518 unsigned long secs; 604 unsigned long secs;
519 unsigned long long nsecs; 605 unsigned long long nsecs;
606 int printed = 0;
520 607
521 if (PRINT_FIELD(COMM)) { 608 if (PRINT_FIELD(COMM)) {
522 if (latency_format) 609 if (latency_format)
523 printf("%8.8s ", thread__comm_str(thread)); 610 printed += fprintf(fp, "%8.8s ", thread__comm_str(thread));
524 else if (PRINT_FIELD(IP) && symbol_conf.use_callchain) 611 else if (PRINT_FIELD(IP) && symbol_conf.use_callchain)
525 printf("%s ", thread__comm_str(thread)); 612 printed += fprintf(fp, "%s ", thread__comm_str(thread));
526 else 613 else
527 printf("%16s ", thread__comm_str(thread)); 614 printed += fprintf(fp, "%16s ", thread__comm_str(thread));
528 } 615 }
529 616
530 if (PRINT_FIELD(PID) && PRINT_FIELD(TID)) 617 if (PRINT_FIELD(PID) && PRINT_FIELD(TID))
531 printf("%5d/%-5d ", sample->pid, sample->tid); 618 printed += fprintf(fp, "%5d/%-5d ", sample->pid, sample->tid);
532 else if (PRINT_FIELD(PID)) 619 else if (PRINT_FIELD(PID))
533 printf("%5d ", sample->pid); 620 printed += fprintf(fp, "%5d ", sample->pid);
534 else if (PRINT_FIELD(TID)) 621 else if (PRINT_FIELD(TID))
535 printf("%5d ", sample->tid); 622 printed += fprintf(fp, "%5d ", sample->tid);
536 623
537 if (PRINT_FIELD(CPU)) { 624 if (PRINT_FIELD(CPU)) {
538 if (latency_format) 625 if (latency_format)
539 printf("%3d ", sample->cpu); 626 printed += fprintf(fp, "%3d ", sample->cpu);
540 else 627 else
541 printf("[%03d] ", sample->cpu); 628 printed += fprintf(fp, "[%03d] ", sample->cpu);
629 }
630
631 if (PRINT_FIELD(MISC)) {
632 int ret = 0;
633
634 #define has(m) \
635 (sample->misc & PERF_RECORD_MISC_##m) == PERF_RECORD_MISC_##m
636
637 if (has(KERNEL))
638 ret += fprintf(fp, "K");
639 if (has(USER))
640 ret += fprintf(fp, "U");
641 if (has(HYPERVISOR))
642 ret += fprintf(fp, "H");
643 if (has(GUEST_KERNEL))
644 ret += fprintf(fp, "G");
645 if (has(GUEST_USER))
646 ret += fprintf(fp, "g");
647
648 switch (type) {
649 case PERF_RECORD_MMAP:
650 case PERF_RECORD_MMAP2:
651 if (has(MMAP_DATA))
652 ret += fprintf(fp, "M");
653 break;
654 case PERF_RECORD_COMM:
655 if (has(COMM_EXEC))
656 ret += fprintf(fp, "E");
657 break;
658 case PERF_RECORD_SWITCH:
659 case PERF_RECORD_SWITCH_CPU_WIDE:
660 if (has(SWITCH_OUT))
661 ret += fprintf(fp, "S");
662 default:
663 break;
664 }
665
666 #undef has
667
668 ret += fprintf(fp, "%*s", 6 - ret, " ");
669 printed += ret;
542 } 670 }
543 671
544 if (PRINT_FIELD(TIME)) { 672 if (PRINT_FIELD(TIME)) {
@@ -547,13 +675,15 @@ static void print_sample_start(struct perf_sample *sample,
547 nsecs -= secs * NSEC_PER_SEC; 675 nsecs -= secs * NSEC_PER_SEC;
548 676
549 if (nanosecs) 677 if (nanosecs)
550 printf("%5lu.%09llu: ", secs, nsecs); 678 printed += fprintf(fp, "%5lu.%09llu: ", secs, nsecs);
551 else { 679 else {
552 char sample_time[32]; 680 char sample_time[32];
553 timestamp__scnprintf_usec(sample->time, sample_time, sizeof(sample_time)); 681 timestamp__scnprintf_usec(sample->time, sample_time, sizeof(sample_time));
554 printf("%12s: ", sample_time); 682 printed += fprintf(fp, "%12s: ", sample_time);
555 } 683 }
556 } 684 }
685
686 return printed;
557} 687}
558 688
559static inline char 689static inline char
@@ -565,16 +695,17 @@ mispred_str(struct branch_entry *br)
565 return br->flags.predicted ? 'P' : 'M'; 695 return br->flags.predicted ? 'P' : 'M';
566} 696}
567 697
568static void print_sample_brstack(struct perf_sample *sample, 698static int perf_sample__fprintf_brstack(struct perf_sample *sample,
569 struct thread *thread, 699 struct thread *thread,
570 struct perf_event_attr *attr) 700 struct perf_event_attr *attr, FILE *fp)
571{ 701{
572 struct branch_stack *br = sample->branch_stack; 702 struct branch_stack *br = sample->branch_stack;
573 struct addr_location alf, alt; 703 struct addr_location alf, alt;
574 u64 i, from, to; 704 u64 i, from, to;
705 int printed = 0;
575 706
576 if (!(br && br->nr)) 707 if (!(br && br->nr))
577 return; 708 return 0;
578 709
579 for (i = 0; i < br->nr; i++) { 710 for (i = 0; i < br->nr; i++) {
580 from = br->entries[i].from; 711 from = br->entries[i].from;
@@ -587,38 +718,41 @@ static void print_sample_brstack(struct perf_sample *sample,
587 thread__find_addr_map(thread, sample->cpumode, MAP__FUNCTION, to, &alt); 718 thread__find_addr_map(thread, sample->cpumode, MAP__FUNCTION, to, &alt);
588 } 719 }
589 720
590 printf(" 0x%"PRIx64, from); 721 printed += fprintf(fp, " 0x%"PRIx64, from);
591 if (PRINT_FIELD(DSO)) { 722 if (PRINT_FIELD(DSO)) {
592 printf("("); 723 printed += fprintf(fp, "(");
593 map__fprintf_dsoname(alf.map, stdout); 724 printed += map__fprintf_dsoname(alf.map, fp);
594 printf(")"); 725 printed += fprintf(fp, ")");
595 } 726 }
596 727
597 printf("/0x%"PRIx64, to); 728 printed += fprintf(fp, "/0x%"PRIx64, to);
598 if (PRINT_FIELD(DSO)) { 729 if (PRINT_FIELD(DSO)) {
599 printf("("); 730 printed += fprintf(fp, "(");
600 map__fprintf_dsoname(alt.map, stdout); 731 printed += map__fprintf_dsoname(alt.map, fp);
601 printf(")"); 732 printed += fprintf(fp, ")");
602 } 733 }
603 734
604 printf("/%c/%c/%c/%d ", 735 printed += fprintf(fp, "/%c/%c/%c/%d ",
605 mispred_str( br->entries + i), 736 mispred_str( br->entries + i),
606 br->entries[i].flags.in_tx? 'X' : '-', 737 br->entries[i].flags.in_tx? 'X' : '-',
607 br->entries[i].flags.abort? 'A' : '-', 738 br->entries[i].flags.abort? 'A' : '-',
608 br->entries[i].flags.cycles); 739 br->entries[i].flags.cycles);
609 } 740 }
741
742 return printed;
610} 743}
611 744
612static void print_sample_brstacksym(struct perf_sample *sample, 745static int perf_sample__fprintf_brstacksym(struct perf_sample *sample,
613 struct thread *thread, 746 struct thread *thread,
614 struct perf_event_attr *attr) 747 struct perf_event_attr *attr, FILE *fp)
615{ 748{
616 struct branch_stack *br = sample->branch_stack; 749 struct branch_stack *br = sample->branch_stack;
617 struct addr_location alf, alt; 750 struct addr_location alf, alt;
618 u64 i, from, to; 751 u64 i, from, to;
752 int printed = 0;
619 753
620 if (!(br && br->nr)) 754 if (!(br && br->nr))
621 return; 755 return 0;
622 756
623 for (i = 0; i < br->nr; i++) { 757 for (i = 0; i < br->nr; i++) {
624 758
@@ -635,37 +769,40 @@ static void print_sample_brstacksym(struct perf_sample *sample,
635 if (alt.map) 769 if (alt.map)
636 alt.sym = map__find_symbol(alt.map, alt.addr); 770 alt.sym = map__find_symbol(alt.map, alt.addr);
637 771
638 symbol__fprintf_symname_offs(alf.sym, &alf, stdout); 772 printed += symbol__fprintf_symname_offs(alf.sym, &alf, fp);
639 if (PRINT_FIELD(DSO)) { 773 if (PRINT_FIELD(DSO)) {
640 printf("("); 774 printed += fprintf(fp, "(");
641 map__fprintf_dsoname(alf.map, stdout); 775 printed += map__fprintf_dsoname(alf.map, fp);
642 printf(")"); 776 printed += fprintf(fp, ")");
643 } 777 }
644 putchar('/'); 778 printed += fprintf(fp, "%c", '/');
645 symbol__fprintf_symname_offs(alt.sym, &alt, stdout); 779 printed += symbol__fprintf_symname_offs(alt.sym, &alt, fp);
646 if (PRINT_FIELD(DSO)) { 780 if (PRINT_FIELD(DSO)) {
647 printf("("); 781 printed += fprintf(fp, "(");
648 map__fprintf_dsoname(alt.map, stdout); 782 printed += map__fprintf_dsoname(alt.map, fp);
649 printf(")"); 783 printed += fprintf(fp, ")");
650 } 784 }
651 printf("/%c/%c/%c/%d ", 785 printed += fprintf(fp, "/%c/%c/%c/%d ",
652 mispred_str( br->entries + i), 786 mispred_str( br->entries + i),
653 br->entries[i].flags.in_tx? 'X' : '-', 787 br->entries[i].flags.in_tx? 'X' : '-',
654 br->entries[i].flags.abort? 'A' : '-', 788 br->entries[i].flags.abort? 'A' : '-',
655 br->entries[i].flags.cycles); 789 br->entries[i].flags.cycles);
656 } 790 }
791
792 return printed;
657} 793}
658 794
659static void print_sample_brstackoff(struct perf_sample *sample, 795static int perf_sample__fprintf_brstackoff(struct perf_sample *sample,
660 struct thread *thread, 796 struct thread *thread,
661 struct perf_event_attr *attr) 797 struct perf_event_attr *attr, FILE *fp)
662{ 798{
663 struct branch_stack *br = sample->branch_stack; 799 struct branch_stack *br = sample->branch_stack;
664 struct addr_location alf, alt; 800 struct addr_location alf, alt;
665 u64 i, from, to; 801 u64 i, from, to;
802 int printed = 0;
666 803
667 if (!(br && br->nr)) 804 if (!(br && br->nr))
668 return; 805 return 0;
669 806
670 for (i = 0; i < br->nr; i++) { 807 for (i = 0; i < br->nr; i++) {
671 808
@@ -682,24 +819,26 @@ static void print_sample_brstackoff(struct perf_sample *sample,
682 if (alt.map && !alt.map->dso->adjust_symbols) 819 if (alt.map && !alt.map->dso->adjust_symbols)
683 to = map__map_ip(alt.map, to); 820 to = map__map_ip(alt.map, to);
684 821
685 printf(" 0x%"PRIx64, from); 822 printed += fprintf(fp, " 0x%"PRIx64, from);
686 if (PRINT_FIELD(DSO)) { 823 if (PRINT_FIELD(DSO)) {
687 printf("("); 824 printed += fprintf(fp, "(");
688 map__fprintf_dsoname(alf.map, stdout); 825 printed += map__fprintf_dsoname(alf.map, fp);
689 printf(")"); 826 printed += fprintf(fp, ")");
690 } 827 }
691 printf("/0x%"PRIx64, to); 828 printed += fprintf(fp, "/0x%"PRIx64, to);
692 if (PRINT_FIELD(DSO)) { 829 if (PRINT_FIELD(DSO)) {
693 printf("("); 830 printed += fprintf(fp, "(");
694 map__fprintf_dsoname(alt.map, stdout); 831 printed += map__fprintf_dsoname(alt.map, fp);
695 printf(")"); 832 printed += fprintf(fp, ")");
696 } 833 }
697 printf("/%c/%c/%c/%d ", 834 printed += fprintf(fp, "/%c/%c/%c/%d ",
698 mispred_str(br->entries + i), 835 mispred_str(br->entries + i),
699 br->entries[i].flags.in_tx ? 'X' : '-', 836 br->entries[i].flags.in_tx ? 'X' : '-',
700 br->entries[i].flags.abort ? 'A' : '-', 837 br->entries[i].flags.abort ? 'A' : '-',
701 br->entries[i].flags.cycles); 838 br->entries[i].flags.cycles);
702 } 839 }
840
841 return printed;
703} 842}
704#define MAXBB 16384UL 843#define MAXBB 16384UL
705 844
@@ -727,27 +866,26 @@ static int grab_bb(u8 *buffer, u64 start, u64 end,
727 * but the exit is not. Let the caller patch it up. 866 * but the exit is not. Let the caller patch it up.
728 */ 867 */
729 if (kernel != machine__kernel_ip(machine, end)) { 868 if (kernel != machine__kernel_ip(machine, end)) {
730 printf("\tblock %" PRIx64 "-%" PRIx64 " transfers between kernel and user\n", 869 pr_debug("\tblock %" PRIx64 "-%" PRIx64 " transfers between kernel and user\n", start, end);
731 start, end);
732 return -ENXIO; 870 return -ENXIO;
733 } 871 }
734 872
735 memset(&al, 0, sizeof(al)); 873 memset(&al, 0, sizeof(al));
736 if (end - start > MAXBB - MAXINSN) { 874 if (end - start > MAXBB - MAXINSN) {
737 if (last) 875 if (last)
738 printf("\tbrstack does not reach to final jump (%" PRIx64 "-%" PRIx64 ")\n", start, end); 876 pr_debug("\tbrstack does not reach to final jump (%" PRIx64 "-%" PRIx64 ")\n", start, end);
739 else 877 else
740 printf("\tblock %" PRIx64 "-%" PRIx64 " (%" PRIu64 ") too long to dump\n", start, end, end - start); 878 pr_debug("\tblock %" PRIx64 "-%" PRIx64 " (%" PRIu64 ") too long to dump\n", start, end, end - start);
741 return 0; 879 return 0;
742 } 880 }
743 881
744 thread__find_addr_map(thread, *cpumode, MAP__FUNCTION, start, &al); 882 thread__find_addr_map(thread, *cpumode, MAP__FUNCTION, start, &al);
745 if (!al.map || !al.map->dso) { 883 if (!al.map || !al.map->dso) {
746 printf("\tcannot resolve %" PRIx64 "-%" PRIx64 "\n", start, end); 884 pr_debug("\tcannot resolve %" PRIx64 "-%" PRIx64 "\n", start, end);
747 return 0; 885 return 0;
748 } 886 }
749 if (al.map->dso->data.status == DSO_DATA_STATUS_ERROR) { 887 if (al.map->dso->data.status == DSO_DATA_STATUS_ERROR) {
750 printf("\tcannot resolve %" PRIx64 "-%" PRIx64 "\n", start, end); 888 pr_debug("\tcannot resolve %" PRIx64 "-%" PRIx64 "\n", start, end);
751 return 0; 889 return 0;
752 } 890 }
753 891
@@ -760,36 +898,35 @@ static int grab_bb(u8 *buffer, u64 start, u64 end,
760 898
761 *is64bit = al.map->dso->is_64_bit; 899 *is64bit = al.map->dso->is_64_bit;
762 if (len <= 0) 900 if (len <= 0)
763 printf("\tcannot fetch code for block at %" PRIx64 "-%" PRIx64 "\n", 901 pr_debug("\tcannot fetch code for block at %" PRIx64 "-%" PRIx64 "\n",
764 start, end); 902 start, end);
765 return len; 903 return len;
766} 904}
767 905
768static void print_jump(uint64_t ip, struct branch_entry *en, 906static int ip__fprintf_jump(uint64_t ip, struct branch_entry *en,
769 struct perf_insn *x, u8 *inbuf, int len, 907 struct perf_insn *x, u8 *inbuf, int len,
770 int insn) 908 int insn, FILE *fp)
771{ 909{
772 printf("\t%016" PRIx64 "\t%-30s\t#%s%s%s%s", 910 int printed = fprintf(fp, "\t%016" PRIx64 "\t%-30s\t#%s%s%s%s", ip,
773 ip, 911 dump_insn(x, ip, inbuf, len, NULL),
774 dump_insn(x, ip, inbuf, len, NULL), 912 en->flags.predicted ? " PRED" : "",
775 en->flags.predicted ? " PRED" : "", 913 en->flags.mispred ? " MISPRED" : "",
776 en->flags.mispred ? " MISPRED" : "", 914 en->flags.in_tx ? " INTX" : "",
777 en->flags.in_tx ? " INTX" : "", 915 en->flags.abort ? " ABORT" : "");
778 en->flags.abort ? " ABORT" : "");
779 if (en->flags.cycles) { 916 if (en->flags.cycles) {
780 printf(" %d cycles", en->flags.cycles); 917 printed += fprintf(fp, " %d cycles", en->flags.cycles);
781 if (insn) 918 if (insn)
782 printf(" %.2f IPC", (float)insn / en->flags.cycles); 919 printed += fprintf(fp, " %.2f IPC", (float)insn / en->flags.cycles);
783 } 920 }
784 putchar('\n'); 921 return printed + fprintf(fp, "\n");
785} 922}
786 923
787static void print_ip_sym(struct thread *thread, u8 cpumode, int cpu, 924static int ip__fprintf_sym(uint64_t addr, struct thread *thread,
788 uint64_t addr, struct symbol **lastsym, 925 u8 cpumode, int cpu, struct symbol **lastsym,
789 struct perf_event_attr *attr) 926 struct perf_event_attr *attr, FILE *fp)
790{ 927{
791 struct addr_location al; 928 struct addr_location al;
792 int off; 929 int off, printed = 0;
793 930
794 memset(&al, 0, sizeof(al)); 931 memset(&al, 0, sizeof(al));
795 932
@@ -798,7 +935,7 @@ static void print_ip_sym(struct thread *thread, u8 cpumode, int cpu,
798 thread__find_addr_map(thread, cpumode, MAP__VARIABLE, 935 thread__find_addr_map(thread, cpumode, MAP__VARIABLE,
799 addr, &al); 936 addr, &al);
800 if ((*lastsym) && al.addr >= (*lastsym)->start && al.addr < (*lastsym)->end) 937 if ((*lastsym) && al.addr >= (*lastsym)->start && al.addr < (*lastsym)->end)
801 return; 938 return 0;
802 939
803 al.cpu = cpu; 940 al.cpu = cpu;
804 al.sym = NULL; 941 al.sym = NULL;
@@ -806,37 +943,39 @@ static void print_ip_sym(struct thread *thread, u8 cpumode, int cpu,
806 al.sym = map__find_symbol(al.map, al.addr); 943 al.sym = map__find_symbol(al.map, al.addr);
807 944
808 if (!al.sym) 945 if (!al.sym)
809 return; 946 return 0;
810 947
811 if (al.addr < al.sym->end) 948 if (al.addr < al.sym->end)
812 off = al.addr - al.sym->start; 949 off = al.addr - al.sym->start;
813 else 950 else
814 off = al.addr - al.map->start - al.sym->start; 951 off = al.addr - al.map->start - al.sym->start;
815 printf("\t%s", al.sym->name); 952 printed += fprintf(fp, "\t%s", al.sym->name);
816 if (off) 953 if (off)
817 printf("%+d", off); 954 printed += fprintf(fp, "%+d", off);
818 putchar(':'); 955 printed += fprintf(fp, ":");
819 if (PRINT_FIELD(SRCLINE)) 956 if (PRINT_FIELD(SRCLINE))
820 map__fprintf_srcline(al.map, al.addr, "\t", stdout); 957 printed += map__fprintf_srcline(al.map, al.addr, "\t", fp);
821 putchar('\n'); 958 printed += fprintf(fp, "\n");
822 *lastsym = al.sym; 959 *lastsym = al.sym;
960
961 return printed;
823} 962}
824 963
825static void print_sample_brstackinsn(struct perf_sample *sample, 964static int perf_sample__fprintf_brstackinsn(struct perf_sample *sample,
826 struct thread *thread, 965 struct thread *thread,
827 struct perf_event_attr *attr, 966 struct perf_event_attr *attr,
828 struct machine *machine) 967 struct machine *machine, FILE *fp)
829{ 968{
830 struct branch_stack *br = sample->branch_stack; 969 struct branch_stack *br = sample->branch_stack;
831 u64 start, end; 970 u64 start, end;
832 int i, insn, len, nr, ilen; 971 int i, insn, len, nr, ilen, printed = 0;
833 struct perf_insn x; 972 struct perf_insn x;
834 u8 buffer[MAXBB]; 973 u8 buffer[MAXBB];
835 unsigned off; 974 unsigned off;
836 struct symbol *lastsym = NULL; 975 struct symbol *lastsym = NULL;
837 976
838 if (!(br && br->nr)) 977 if (!(br && br->nr))
839 return; 978 return 0;
840 nr = br->nr; 979 nr = br->nr;
841 if (max_blocks && nr > max_blocks + 1) 980 if (max_blocks && nr > max_blocks + 1)
842 nr = max_blocks + 1; 981 nr = max_blocks + 1;
@@ -844,17 +983,17 @@ static void print_sample_brstackinsn(struct perf_sample *sample,
844 x.thread = thread; 983 x.thread = thread;
845 x.cpu = sample->cpu; 984 x.cpu = sample->cpu;
846 985
847 putchar('\n'); 986 printed += fprintf(fp, "%c", '\n');
848 987
849 /* Handle first from jump, of which we don't know the entry. */ 988 /* Handle first from jump, of which we don't know the entry. */
850 len = grab_bb(buffer, br->entries[nr-1].from, 989 len = grab_bb(buffer, br->entries[nr-1].from,
851 br->entries[nr-1].from, 990 br->entries[nr-1].from,
852 machine, thread, &x.is64bit, &x.cpumode, false); 991 machine, thread, &x.is64bit, &x.cpumode, false);
853 if (len > 0) { 992 if (len > 0) {
854 print_ip_sym(thread, x.cpumode, x.cpu, 993 printed += ip__fprintf_sym(br->entries[nr - 1].from, thread,
855 br->entries[nr - 1].from, &lastsym, attr); 994 x.cpumode, x.cpu, &lastsym, attr, fp);
856 print_jump(br->entries[nr - 1].from, &br->entries[nr - 1], 995 printed += ip__fprintf_jump(br->entries[nr - 1].from, &br->entries[nr - 1],
857 &x, buffer, len, 0); 996 &x, buffer, len, 0, fp);
858 } 997 }
859 998
860 /* Print all blocks */ 999 /* Print all blocks */
@@ -880,13 +1019,13 @@ static void print_sample_brstackinsn(struct perf_sample *sample,
880 for (off = 0;; off += ilen) { 1019 for (off = 0;; off += ilen) {
881 uint64_t ip = start + off; 1020 uint64_t ip = start + off;
882 1021
883 print_ip_sym(thread, x.cpumode, x.cpu, ip, &lastsym, attr); 1022 printed += ip__fprintf_sym(ip, thread, x.cpumode, x.cpu, &lastsym, attr, fp);
884 if (ip == end) { 1023 if (ip == end) {
885 print_jump(ip, &br->entries[i], &x, buffer + off, len - off, insn); 1024 printed += ip__fprintf_jump(ip, &br->entries[i], &x, buffer + off, len - off, insn, fp);
886 break; 1025 break;
887 } else { 1026 } else {
888 printf("\t%016" PRIx64 "\t%s\n", ip, 1027 printed += fprintf(fp, "\t%016" PRIx64 "\t%s\n", ip,
889 dump_insn(&x, ip, buffer + off, len - off, &ilen)); 1028 dump_insn(&x, ip, buffer + off, len - off, &ilen));
890 if (ilen == 0) 1029 if (ilen == 0)
891 break; 1030 break;
892 insn++; 1031 insn++;
@@ -899,9 +1038,9 @@ static void print_sample_brstackinsn(struct perf_sample *sample,
899 * has not been executed yet. 1038 * has not been executed yet.
900 */ 1039 */
901 if (br->entries[0].from == sample->ip) 1040 if (br->entries[0].from == sample->ip)
902 return; 1041 goto out;
903 if (br->entries[0].flags.abort) 1042 if (br->entries[0].flags.abort)
904 return; 1043 goto out;
905 1044
906 /* 1045 /*
907 * Print final block upto sample 1046 * Print final block upto sample
@@ -909,58 +1048,61 @@ static void print_sample_brstackinsn(struct perf_sample *sample,
909 start = br->entries[0].to; 1048 start = br->entries[0].to;
910 end = sample->ip; 1049 end = sample->ip;
911 len = grab_bb(buffer, start, end, machine, thread, &x.is64bit, &x.cpumode, true); 1050 len = grab_bb(buffer, start, end, machine, thread, &x.is64bit, &x.cpumode, true);
912 print_ip_sym(thread, x.cpumode, x.cpu, start, &lastsym, attr); 1051 printed += ip__fprintf_sym(start, thread, x.cpumode, x.cpu, &lastsym, attr, fp);
913 if (len <= 0) { 1052 if (len <= 0) {
914 /* Print at least last IP if basic block did not work */ 1053 /* Print at least last IP if basic block did not work */
915 len = grab_bb(buffer, sample->ip, sample->ip, 1054 len = grab_bb(buffer, sample->ip, sample->ip,
916 machine, thread, &x.is64bit, &x.cpumode, false); 1055 machine, thread, &x.is64bit, &x.cpumode, false);
917 if (len <= 0) 1056 if (len <= 0)
918 return; 1057 goto out;
919 1058
920 printf("\t%016" PRIx64 "\t%s\n", sample->ip, 1059 printed += fprintf(fp, "\t%016" PRIx64 "\t%s\n", sample->ip,
921 dump_insn(&x, sample->ip, buffer, len, NULL)); 1060 dump_insn(&x, sample->ip, buffer, len, NULL));
922 return; 1061 goto out;
923 } 1062 }
924 for (off = 0; off <= end - start; off += ilen) { 1063 for (off = 0; off <= end - start; off += ilen) {
925 printf("\t%016" PRIx64 "\t%s\n", start + off, 1064 printed += fprintf(fp, "\t%016" PRIx64 "\t%s\n", start + off,
926 dump_insn(&x, start + off, buffer + off, len - off, &ilen)); 1065 dump_insn(&x, start + off, buffer + off, len - off, &ilen));
927 if (ilen == 0) 1066 if (ilen == 0)
928 break; 1067 break;
929 } 1068 }
1069out:
1070 return printed;
930} 1071}
931 1072
932static void print_sample_addr(struct perf_sample *sample, 1073static int perf_sample__fprintf_addr(struct perf_sample *sample,
933 struct thread *thread, 1074 struct thread *thread,
934 struct perf_event_attr *attr) 1075 struct perf_event_attr *attr, FILE *fp)
935{ 1076{
936 struct addr_location al; 1077 struct addr_location al;
937 1078 int printed = fprintf(fp, "%16" PRIx64, sample->addr);
938 printf("%16" PRIx64, sample->addr);
939 1079
940 if (!sample_addr_correlates_sym(attr)) 1080 if (!sample_addr_correlates_sym(attr))
941 return; 1081 goto out;
942 1082
943 thread__resolve(thread, &al, sample); 1083 thread__resolve(thread, &al, sample);
944 1084
945 if (PRINT_FIELD(SYM)) { 1085 if (PRINT_FIELD(SYM)) {
946 printf(" "); 1086 printed += fprintf(fp, " ");
947 if (PRINT_FIELD(SYMOFFSET)) 1087 if (PRINT_FIELD(SYMOFFSET))
948 symbol__fprintf_symname_offs(al.sym, &al, stdout); 1088 printed += symbol__fprintf_symname_offs(al.sym, &al, fp);
949 else 1089 else
950 symbol__fprintf_symname(al.sym, stdout); 1090 printed += symbol__fprintf_symname(al.sym, fp);
951 } 1091 }
952 1092
953 if (PRINT_FIELD(DSO)) { 1093 if (PRINT_FIELD(DSO)) {
954 printf(" ("); 1094 printed += fprintf(fp, " (");
955 map__fprintf_dsoname(al.map, stdout); 1095 printed += map__fprintf_dsoname(al.map, fp);
956 printf(")"); 1096 printed += fprintf(fp, ")");
957 } 1097 }
1098out:
1099 return printed;
958} 1100}
959 1101
960static void print_sample_callindent(struct perf_sample *sample, 1102static int perf_sample__fprintf_callindent(struct perf_sample *sample,
961 struct perf_evsel *evsel, 1103 struct perf_evsel *evsel,
962 struct thread *thread, 1104 struct thread *thread,
963 struct addr_location *al) 1105 struct addr_location *al, FILE *fp)
964{ 1106{
965 struct perf_event_attr *attr = &evsel->attr; 1107 struct perf_event_attr *attr = &evsel->attr;
966 size_t depth = thread_stack__depth(thread); 1108 size_t depth = thread_stack__depth(thread);
@@ -995,12 +1137,12 @@ static void print_sample_callindent(struct perf_sample *sample,
995 } 1137 }
996 1138
997 if (name) 1139 if (name)
998 len = printf("%*s%s", (int)depth * 4, "", name); 1140 len = fprintf(fp, "%*s%s", (int)depth * 4, "", name);
999 else if (ip) 1141 else if (ip)
1000 len = printf("%*s%16" PRIx64, (int)depth * 4, "", ip); 1142 len = fprintf(fp, "%*s%16" PRIx64, (int)depth * 4, "", ip);
1001 1143
1002 if (len < 0) 1144 if (len < 0)
1003 return; 1145 return len;
1004 1146
1005 /* 1147 /*
1006 * Try to keep the output length from changing frequently so that the 1148 * Try to keep the output length from changing frequently so that the
@@ -1010,39 +1152,46 @@ static void print_sample_callindent(struct perf_sample *sample,
1010 spacing = round_up(len + 4, 32); 1152 spacing = round_up(len + 4, 32);
1011 1153
1012 if (len < spacing) 1154 if (len < spacing)
1013 printf("%*s", spacing - len, ""); 1155 len += fprintf(fp, "%*s", spacing - len, "");
1156
1157 return len;
1014} 1158}
1015 1159
1016static void print_insn(struct perf_sample *sample, 1160static int perf_sample__fprintf_insn(struct perf_sample *sample,
1017 struct perf_event_attr *attr, 1161 struct perf_event_attr *attr,
1018 struct thread *thread, 1162 struct thread *thread,
1019 struct machine *machine) 1163 struct machine *machine, FILE *fp)
1020{ 1164{
1165 int printed = 0;
1166
1021 if (PRINT_FIELD(INSNLEN)) 1167 if (PRINT_FIELD(INSNLEN))
1022 printf(" ilen: %d", sample->insn_len); 1168 printed += fprintf(fp, " ilen: %d", sample->insn_len);
1023 if (PRINT_FIELD(INSN)) { 1169 if (PRINT_FIELD(INSN)) {
1024 int i; 1170 int i;
1025 1171
1026 printf(" insn:"); 1172 printed += fprintf(fp, " insn:");
1027 for (i = 0; i < sample->insn_len; i++) 1173 for (i = 0; i < sample->insn_len; i++)
1028 printf(" %02x", (unsigned char)sample->insn[i]); 1174 printed += fprintf(fp, " %02x", (unsigned char)sample->insn[i]);
1029 } 1175 }
1030 if (PRINT_FIELD(BRSTACKINSN)) 1176 if (PRINT_FIELD(BRSTACKINSN))
1031 print_sample_brstackinsn(sample, thread, attr, machine); 1177 printed += perf_sample__fprintf_brstackinsn(sample, thread, attr, machine, fp);
1178
1179 return printed;
1032} 1180}
1033 1181
1034static void print_sample_bts(struct perf_sample *sample, 1182static int perf_sample__fprintf_bts(struct perf_sample *sample,
1035 struct perf_evsel *evsel, 1183 struct perf_evsel *evsel,
1036 struct thread *thread, 1184 struct thread *thread,
1037 struct addr_location *al, 1185 struct addr_location *al,
1038 struct machine *machine) 1186 struct machine *machine, FILE *fp)
1039{ 1187{
1040 struct perf_event_attr *attr = &evsel->attr; 1188 struct perf_event_attr *attr = &evsel->attr;
1041 unsigned int type = output_type(attr->type); 1189 unsigned int type = output_type(attr->type);
1042 bool print_srcline_last = false; 1190 bool print_srcline_last = false;
1191 int printed = 0;
1043 1192
1044 if (PRINT_FIELD(CALLINDENT)) 1193 if (PRINT_FIELD(CALLINDENT))
1045 print_sample_callindent(sample, evsel, thread, al); 1194 printed += perf_sample__fprintf_callindent(sample, evsel, thread, al, fp);
1046 1195
1047 /* print branch_from information */ 1196 /* print branch_from information */
1048 if (PRINT_FIELD(IP)) { 1197 if (PRINT_FIELD(IP)) {
@@ -1055,31 +1204,30 @@ static void print_sample_bts(struct perf_sample *sample,
1055 cursor = &callchain_cursor; 1204 cursor = &callchain_cursor;
1056 1205
1057 if (cursor == NULL) { 1206 if (cursor == NULL) {
1058 putchar(' '); 1207 printed += fprintf(fp, " ");
1059 if (print_opts & EVSEL__PRINT_SRCLINE) { 1208 if (print_opts & EVSEL__PRINT_SRCLINE) {
1060 print_srcline_last = true; 1209 print_srcline_last = true;
1061 print_opts &= ~EVSEL__PRINT_SRCLINE; 1210 print_opts &= ~EVSEL__PRINT_SRCLINE;
1062 } 1211 }
1063 } else 1212 } else
1064 putchar('\n'); 1213 printed += fprintf(fp, "\n");
1065 1214
1066 sample__fprintf_sym(sample, al, 0, print_opts, cursor, stdout); 1215 printed += sample__fprintf_sym(sample, al, 0, print_opts, cursor, fp);
1067 } 1216 }
1068 1217
1069 /* print branch_to information */ 1218 /* print branch_to information */
1070 if (PRINT_FIELD(ADDR) || 1219 if (PRINT_FIELD(ADDR) ||
1071 ((evsel->attr.sample_type & PERF_SAMPLE_ADDR) && 1220 ((evsel->attr.sample_type & PERF_SAMPLE_ADDR) &&
1072 !output[type].user_set)) { 1221 !output[type].user_set)) {
1073 printf(" => "); 1222 printed += fprintf(fp, " => ");
1074 print_sample_addr(sample, thread, attr); 1223 printed += perf_sample__fprintf_addr(sample, thread, attr, fp);
1075 } 1224 }
1076 1225
1077 if (print_srcline_last) 1226 if (print_srcline_last)
1078 map__fprintf_srcline(al->map, al->addr, "\n ", stdout); 1227 printed += map__fprintf_srcline(al->map, al->addr, "\n ", fp);
1079 1228
1080 print_insn(sample, attr, thread, machine); 1229 printed += perf_sample__fprintf_insn(sample, attr, thread, machine, fp);
1081 1230 return printed + fprintf(fp, "\n");
1082 printf("\n");
1083} 1231}
1084 1232
1085static struct { 1233static struct {
@@ -1102,7 +1250,7 @@ static struct {
1102 {0, NULL} 1250 {0, NULL}
1103}; 1251};
1104 1252
1105static void print_sample_flags(u32 flags) 1253static int perf_sample__fprintf_flags(u32 flags, FILE *fp)
1106{ 1254{
1107 const char *chars = PERF_IP_FLAG_CHARS; 1255 const char *chars = PERF_IP_FLAG_CHARS;
1108 const int n = strlen(PERF_IP_FLAG_CHARS); 1256 const int n = strlen(PERF_IP_FLAG_CHARS);
@@ -1129,9 +1277,9 @@ static void print_sample_flags(u32 flags)
1129 str[pos] = 0; 1277 str[pos] = 0;
1130 1278
1131 if (name) 1279 if (name)
1132 printf(" %-7s%4s ", name, in_tx ? "(x)" : ""); 1280 return fprintf(fp, " %-7s%4s ", name, in_tx ? "(x)" : "");
1133 else 1281
1134 printf(" %-11s ", str); 1282 return fprintf(fp, " %-11s ", str);
1135} 1283}
1136 1284
1137struct printer_data { 1285struct printer_data {
@@ -1140,40 +1288,40 @@ struct printer_data {
1140 bool is_printable; 1288 bool is_printable;
1141}; 1289};
1142 1290
1143static void 1291static int sample__fprintf_bpf_output(enum binary_printer_ops op,
1144print_sample_bpf_output_printer(enum binary_printer_ops op, 1292 unsigned int val,
1145 unsigned int val, 1293 void *extra, FILE *fp)
1146 void *extra)
1147{ 1294{
1148 unsigned char ch = (unsigned char)val; 1295 unsigned char ch = (unsigned char)val;
1149 struct printer_data *printer_data = extra; 1296 struct printer_data *printer_data = extra;
1297 int printed = 0;
1150 1298
1151 switch (op) { 1299 switch (op) {
1152 case BINARY_PRINT_DATA_BEGIN: 1300 case BINARY_PRINT_DATA_BEGIN:
1153 printf("\n"); 1301 printed += fprintf(fp, "\n");
1154 break; 1302 break;
1155 case BINARY_PRINT_LINE_BEGIN: 1303 case BINARY_PRINT_LINE_BEGIN:
1156 printf("%17s", !printer_data->line_no ? "BPF output:" : 1304 printed += fprintf(fp, "%17s", !printer_data->line_no ? "BPF output:" :
1157 " "); 1305 " ");
1158 break; 1306 break;
1159 case BINARY_PRINT_ADDR: 1307 case BINARY_PRINT_ADDR:
1160 printf(" %04x:", val); 1308 printed += fprintf(fp, " %04x:", val);
1161 break; 1309 break;
1162 case BINARY_PRINT_NUM_DATA: 1310 case BINARY_PRINT_NUM_DATA:
1163 printf(" %02x", val); 1311 printed += fprintf(fp, " %02x", val);
1164 break; 1312 break;
1165 case BINARY_PRINT_NUM_PAD: 1313 case BINARY_PRINT_NUM_PAD:
1166 printf(" "); 1314 printed += fprintf(fp, " ");
1167 break; 1315 break;
1168 case BINARY_PRINT_SEP: 1316 case BINARY_PRINT_SEP:
1169 printf(" "); 1317 printed += fprintf(fp, " ");
1170 break; 1318 break;
1171 case BINARY_PRINT_CHAR_DATA: 1319 case BINARY_PRINT_CHAR_DATA:
1172 if (printer_data->hit_nul && ch) 1320 if (printer_data->hit_nul && ch)
1173 printer_data->is_printable = false; 1321 printer_data->is_printable = false;
1174 1322
1175 if (!isprint(ch)) { 1323 if (!isprint(ch)) {
1176 printf("%c", '.'); 1324 printed += fprintf(fp, "%c", '.');
1177 1325
1178 if (!printer_data->is_printable) 1326 if (!printer_data->is_printable)
1179 break; 1327 break;
@@ -1183,154 +1331,154 @@ print_sample_bpf_output_printer(enum binary_printer_ops op,
1183 else 1331 else
1184 printer_data->is_printable = false; 1332 printer_data->is_printable = false;
1185 } else { 1333 } else {
1186 printf("%c", ch); 1334 printed += fprintf(fp, "%c", ch);
1187 } 1335 }
1188 break; 1336 break;
1189 case BINARY_PRINT_CHAR_PAD: 1337 case BINARY_PRINT_CHAR_PAD:
1190 printf(" "); 1338 printed += fprintf(fp, " ");
1191 break; 1339 break;
1192 case BINARY_PRINT_LINE_END: 1340 case BINARY_PRINT_LINE_END:
1193 printf("\n"); 1341 printed += fprintf(fp, "\n");
1194 printer_data->line_no++; 1342 printer_data->line_no++;
1195 break; 1343 break;
1196 case BINARY_PRINT_DATA_END: 1344 case BINARY_PRINT_DATA_END:
1197 default: 1345 default:
1198 break; 1346 break;
1199 } 1347 }
1348
1349 return printed;
1200} 1350}
1201 1351
1202static void print_sample_bpf_output(struct perf_sample *sample) 1352static int perf_sample__fprintf_bpf_output(struct perf_sample *sample, FILE *fp)
1203{ 1353{
1204 unsigned int nr_bytes = sample->raw_size; 1354 unsigned int nr_bytes = sample->raw_size;
1205 struct printer_data printer_data = {0, false, true}; 1355 struct printer_data printer_data = {0, false, true};
1206 1356 int printed = binary__fprintf(sample->raw_data, nr_bytes, 8,
1207 print_binary(sample->raw_data, nr_bytes, 8, 1357 sample__fprintf_bpf_output, &printer_data, fp);
1208 print_sample_bpf_output_printer, &printer_data);
1209 1358
1210 if (printer_data.is_printable && printer_data.hit_nul) 1359 if (printer_data.is_printable && printer_data.hit_nul)
1211 printf("%17s \"%s\"\n", "BPF string:", 1360 printed += fprintf(fp, "%17s \"%s\"\n", "BPF string:", (char *)(sample->raw_data));
1212 (char *)(sample->raw_data)); 1361
1362 return printed;
1213} 1363}
1214 1364
1215static void print_sample_spacing(int len, int spacing) 1365static int perf_sample__fprintf_spacing(int len, int spacing, FILE *fp)
1216{ 1366{
1217 if (len > 0 && len < spacing) 1367 if (len > 0 && len < spacing)
1218 printf("%*s", spacing - len, ""); 1368 return fprintf(fp, "%*s", spacing - len, "");
1369
1370 return 0;
1219} 1371}
1220 1372
1221static void print_sample_pt_spacing(int len) 1373static int perf_sample__fprintf_pt_spacing(int len, FILE *fp)
1222{ 1374{
1223 print_sample_spacing(len, 34); 1375 return perf_sample__fprintf_spacing(len, 34, fp);
1224} 1376}
1225 1377
1226static void print_sample_synth_ptwrite(struct perf_sample *sample) 1378static int perf_sample__fprintf_synth_ptwrite(struct perf_sample *sample, FILE *fp)
1227{ 1379{
1228 struct perf_synth_intel_ptwrite *data = perf_sample__synth_ptr(sample); 1380 struct perf_synth_intel_ptwrite *data = perf_sample__synth_ptr(sample);
1229 int len; 1381 int len;
1230 1382
1231 if (perf_sample__bad_synth_size(sample, *data)) 1383 if (perf_sample__bad_synth_size(sample, *data))
1232 return; 1384 return 0;
1233 1385
1234 len = printf(" IP: %u payload: %#" PRIx64 " ", 1386 len = fprintf(fp, " IP: %u payload: %#" PRIx64 " ",
1235 data->ip, le64_to_cpu(data->payload)); 1387 data->ip, le64_to_cpu(data->payload));
1236 print_sample_pt_spacing(len); 1388 return len + perf_sample__fprintf_pt_spacing(len, fp);
1237} 1389}
1238 1390
1239static void print_sample_synth_mwait(struct perf_sample *sample) 1391static int perf_sample__fprintf_synth_mwait(struct perf_sample *sample, FILE *fp)
1240{ 1392{
1241 struct perf_synth_intel_mwait *data = perf_sample__synth_ptr(sample); 1393 struct perf_synth_intel_mwait *data = perf_sample__synth_ptr(sample);
1242 int len; 1394 int len;
1243 1395
1244 if (perf_sample__bad_synth_size(sample, *data)) 1396 if (perf_sample__bad_synth_size(sample, *data))
1245 return; 1397 return 0;
1246 1398
1247 len = printf(" hints: %#x extensions: %#x ", 1399 len = fprintf(fp, " hints: %#x extensions: %#x ",
1248 data->hints, data->extensions); 1400 data->hints, data->extensions);
1249 print_sample_pt_spacing(len); 1401 return len + perf_sample__fprintf_pt_spacing(len, fp);
1250} 1402}
1251 1403
1252static void print_sample_synth_pwre(struct perf_sample *sample) 1404static int perf_sample__fprintf_synth_pwre(struct perf_sample *sample, FILE *fp)
1253{ 1405{
1254 struct perf_synth_intel_pwre *data = perf_sample__synth_ptr(sample); 1406 struct perf_synth_intel_pwre *data = perf_sample__synth_ptr(sample);
1255 int len; 1407 int len;
1256 1408
1257 if (perf_sample__bad_synth_size(sample, *data)) 1409 if (perf_sample__bad_synth_size(sample, *data))
1258 return; 1410 return 0;
1259 1411
1260 len = printf(" hw: %u cstate: %u sub-cstate: %u ", 1412 len = fprintf(fp, " hw: %u cstate: %u sub-cstate: %u ",
1261 data->hw, data->cstate, data->subcstate); 1413 data->hw, data->cstate, data->subcstate);
1262 print_sample_pt_spacing(len); 1414 return len + perf_sample__fprintf_pt_spacing(len, fp);
1263} 1415}
1264 1416
1265static void print_sample_synth_exstop(struct perf_sample *sample) 1417static int perf_sample__fprintf_synth_exstop(struct perf_sample *sample, FILE *fp)
1266{ 1418{
1267 struct perf_synth_intel_exstop *data = perf_sample__synth_ptr(sample); 1419 struct perf_synth_intel_exstop *data = perf_sample__synth_ptr(sample);
1268 int len; 1420 int len;
1269 1421
1270 if (perf_sample__bad_synth_size(sample, *data)) 1422 if (perf_sample__bad_synth_size(sample, *data))
1271 return; 1423 return 0;
1272 1424
1273 len = printf(" IP: %u ", data->ip); 1425 len = fprintf(fp, " IP: %u ", data->ip);
1274 print_sample_pt_spacing(len); 1426 return len + perf_sample__fprintf_pt_spacing(len, fp);
1275} 1427}
1276 1428
1277static void print_sample_synth_pwrx(struct perf_sample *sample) 1429static int perf_sample__fprintf_synth_pwrx(struct perf_sample *sample, FILE *fp)
1278{ 1430{
1279 struct perf_synth_intel_pwrx *data = perf_sample__synth_ptr(sample); 1431 struct perf_synth_intel_pwrx *data = perf_sample__synth_ptr(sample);
1280 int len; 1432 int len;
1281 1433
1282 if (perf_sample__bad_synth_size(sample, *data)) 1434 if (perf_sample__bad_synth_size(sample, *data))
1283 return; 1435 return 0;
1284 1436
1285 len = printf(" deepest cstate: %u last cstate: %u wake reason: %#x ", 1437 len = fprintf(fp, " deepest cstate: %u last cstate: %u wake reason: %#x ",
1286 data->deepest_cstate, data->last_cstate, 1438 data->deepest_cstate, data->last_cstate,
1287 data->wake_reason); 1439 data->wake_reason);
1288 print_sample_pt_spacing(len); 1440 return len + perf_sample__fprintf_pt_spacing(len, fp);
1289} 1441}
1290 1442
1291static void print_sample_synth_cbr(struct perf_sample *sample) 1443static int perf_sample__fprintf_synth_cbr(struct perf_sample *sample, FILE *fp)
1292{ 1444{
1293 struct perf_synth_intel_cbr *data = perf_sample__synth_ptr(sample); 1445 struct perf_synth_intel_cbr *data = perf_sample__synth_ptr(sample);
1294 unsigned int percent, freq; 1446 unsigned int percent, freq;
1295 int len; 1447 int len;
1296 1448
1297 if (perf_sample__bad_synth_size(sample, *data)) 1449 if (perf_sample__bad_synth_size(sample, *data))
1298 return; 1450 return 0;
1299 1451
1300 freq = (le32_to_cpu(data->freq) + 500) / 1000; 1452 freq = (le32_to_cpu(data->freq) + 500) / 1000;
1301 len = printf(" cbr: %2u freq: %4u MHz ", data->cbr, freq); 1453 len = fprintf(fp, " cbr: %2u freq: %4u MHz ", data->cbr, freq);
1302 if (data->max_nonturbo) { 1454 if (data->max_nonturbo) {
1303 percent = (5 + (1000 * data->cbr) / data->max_nonturbo) / 10; 1455 percent = (5 + (1000 * data->cbr) / data->max_nonturbo) / 10;
1304 len += printf("(%3u%%) ", percent); 1456 len += fprintf(fp, "(%3u%%) ", percent);
1305 } 1457 }
1306 print_sample_pt_spacing(len); 1458 return len + perf_sample__fprintf_pt_spacing(len, fp);
1307} 1459}
1308 1460
1309static void print_sample_synth(struct perf_sample *sample, 1461static int perf_sample__fprintf_synth(struct perf_sample *sample,
1310 struct perf_evsel *evsel) 1462 struct perf_evsel *evsel, FILE *fp)
1311{ 1463{
1312 switch (evsel->attr.config) { 1464 switch (evsel->attr.config) {
1313 case PERF_SYNTH_INTEL_PTWRITE: 1465 case PERF_SYNTH_INTEL_PTWRITE:
1314 print_sample_synth_ptwrite(sample); 1466 return perf_sample__fprintf_synth_ptwrite(sample, fp);
1315 break;
1316 case PERF_SYNTH_INTEL_MWAIT: 1467 case PERF_SYNTH_INTEL_MWAIT:
1317 print_sample_synth_mwait(sample); 1468 return perf_sample__fprintf_synth_mwait(sample, fp);
1318 break;
1319 case PERF_SYNTH_INTEL_PWRE: 1469 case PERF_SYNTH_INTEL_PWRE:
1320 print_sample_synth_pwre(sample); 1470 return perf_sample__fprintf_synth_pwre(sample, fp);
1321 break;
1322 case PERF_SYNTH_INTEL_EXSTOP: 1471 case PERF_SYNTH_INTEL_EXSTOP:
1323 print_sample_synth_exstop(sample); 1472 return perf_sample__fprintf_synth_exstop(sample, fp);
1324 break;
1325 case PERF_SYNTH_INTEL_PWRX: 1473 case PERF_SYNTH_INTEL_PWRX:
1326 print_sample_synth_pwrx(sample); 1474 return perf_sample__fprintf_synth_pwrx(sample, fp);
1327 break;
1328 case PERF_SYNTH_INTEL_CBR: 1475 case PERF_SYNTH_INTEL_CBR:
1329 print_sample_synth_cbr(sample); 1476 return perf_sample__fprintf_synth_cbr(sample, fp);
1330 break;
1331 default: 1477 default:
1332 break; 1478 break;
1333 } 1479 }
1480
1481 return 0;
1334} 1482}
1335 1483
1336struct perf_script { 1484struct perf_script {
@@ -1340,12 +1488,16 @@ struct perf_script {
1340 bool show_mmap_events; 1488 bool show_mmap_events;
1341 bool show_switch_events; 1489 bool show_switch_events;
1342 bool show_namespace_events; 1490 bool show_namespace_events;
1491 bool show_lost_events;
1343 bool allocated; 1492 bool allocated;
1493 bool per_event_dump;
1344 struct cpu_map *cpus; 1494 struct cpu_map *cpus;
1345 struct thread_map *threads; 1495 struct thread_map *threads;
1346 int name_width; 1496 int name_width;
1347 const char *time_str; 1497 const char *time_str;
1348 struct perf_time_interval ptime; 1498 struct perf_time_interval *ptime_range;
1499 int range_size;
1500 int range_num;
1349}; 1501};
1350 1502
1351static int perf_evlist__max_name_len(struct perf_evlist *evlist) 1503static int perf_evlist__max_name_len(struct perf_evlist *evlist)
@@ -1362,7 +1514,7 @@ static int perf_evlist__max_name_len(struct perf_evlist *evlist)
1362 return max; 1514 return max;
1363} 1515}
1364 1516
1365static size_t data_src__printf(u64 data_src) 1517static int data_src__fprintf(u64 data_src, FILE *fp)
1366{ 1518{
1367 struct mem_info mi = { .data_src.val = data_src }; 1519 struct mem_info mi = { .data_src.val = data_src };
1368 char decode[100]; 1520 char decode[100];
@@ -1376,7 +1528,89 @@ static size_t data_src__printf(u64 data_src)
1376 if (maxlen < len) 1528 if (maxlen < len)
1377 maxlen = len; 1529 maxlen = len;
1378 1530
1379 return printf("%-*s", maxlen, out); 1531 return fprintf(fp, "%-*s", maxlen, out);
1532}
1533
1534struct metric_ctx {
1535 struct perf_sample *sample;
1536 struct thread *thread;
1537 struct perf_evsel *evsel;
1538 FILE *fp;
1539};
1540
1541static void script_print_metric(void *ctx, const char *color,
1542 const char *fmt,
1543 const char *unit, double val)
1544{
1545 struct metric_ctx *mctx = ctx;
1546
1547 if (!fmt)
1548 return;
1549 perf_sample__fprintf_start(mctx->sample, mctx->thread, mctx->evsel,
1550 PERF_RECORD_SAMPLE, mctx->fp);
1551 fputs("\tmetric: ", mctx->fp);
1552 if (color)
1553 color_fprintf(mctx->fp, color, fmt, val);
1554 else
1555 printf(fmt, val);
1556 fprintf(mctx->fp, " %s\n", unit);
1557}
1558
1559static void script_new_line(void *ctx)
1560{
1561 struct metric_ctx *mctx = ctx;
1562
1563 perf_sample__fprintf_start(mctx->sample, mctx->thread, mctx->evsel,
1564 PERF_RECORD_SAMPLE, mctx->fp);
1565 fputs("\tmetric: ", mctx->fp);
1566}
1567
1568static void perf_sample__fprint_metric(struct perf_script *script,
1569 struct thread *thread,
1570 struct perf_evsel *evsel,
1571 struct perf_sample *sample,
1572 FILE *fp)
1573{
1574 struct perf_stat_output_ctx ctx = {
1575 .print_metric = script_print_metric,
1576 .new_line = script_new_line,
1577 .ctx = &(struct metric_ctx) {
1578 .sample = sample,
1579 .thread = thread,
1580 .evsel = evsel,
1581 .fp = fp,
1582 },
1583 .force_header = false,
1584 };
1585 struct perf_evsel *ev2;
1586 static bool init;
1587 u64 val;
1588
1589 if (!init) {
1590 perf_stat__init_shadow_stats();
1591 init = true;
1592 }
1593 if (!evsel->stats)
1594 perf_evlist__alloc_stats(script->session->evlist, false);
1595 if (evsel_script(evsel->leader)->gnum++ == 0)
1596 perf_stat__reset_shadow_stats();
1597 val = sample->period * evsel->scale;
1598 perf_stat__update_shadow_stats(evsel,
1599 val,
1600 sample->cpu,
1601 &rt_stat);
1602 evsel_script(evsel)->val = val;
1603 if (evsel_script(evsel->leader)->gnum == evsel->leader->nr_members) {
1604 for_each_group_member (ev2, evsel->leader) {
1605 perf_stat__print_shadow_stats(ev2,
1606 evsel_script(ev2)->val,
1607 sample->cpu,
1608 &ctx,
1609 NULL,
1610 &rt_stat);
1611 }
1612 evsel_script(evsel->leader)->gnum = 0;
1613 }
1380} 1614}
1381 1615
1382static void process_event(struct perf_script *script, 1616static void process_event(struct perf_script *script,
@@ -1387,14 +1621,19 @@ static void process_event(struct perf_script *script,
1387 struct thread *thread = al->thread; 1621 struct thread *thread = al->thread;
1388 struct perf_event_attr *attr = &evsel->attr; 1622 struct perf_event_attr *attr = &evsel->attr;
1389 unsigned int type = output_type(attr->type); 1623 unsigned int type = output_type(attr->type);
1624 struct perf_evsel_script *es = evsel->priv;
1625 FILE *fp = es->fp;
1390 1626
1391 if (output[type].fields == 0) 1627 if (output[type].fields == 0)
1392 return; 1628 return;
1393 1629
1394 print_sample_start(sample, thread, evsel); 1630 ++es->samples;
1631
1632 perf_sample__fprintf_start(sample, thread, evsel,
1633 PERF_RECORD_SAMPLE, fp);
1395 1634
1396 if (PRINT_FIELD(PERIOD)) 1635 if (PRINT_FIELD(PERIOD))
1397 printf("%10" PRIu64 " ", sample->period); 1636 fprintf(fp, "%10" PRIu64 " ", sample->period);
1398 1637
1399 if (PRINT_FIELD(EVNAME)) { 1638 if (PRINT_FIELD(EVNAME)) {
1400 const char *evname = perf_evsel__name(evsel); 1639 const char *evname = perf_evsel__name(evsel);
@@ -1402,33 +1641,33 @@ static void process_event(struct perf_script *script,
1402 if (!script->name_width) 1641 if (!script->name_width)
1403 script->name_width = perf_evlist__max_name_len(script->session->evlist); 1642 script->name_width = perf_evlist__max_name_len(script->session->evlist);
1404 1643
1405 printf("%*s: ", script->name_width, 1644 fprintf(fp, "%*s: ", script->name_width, evname ?: "[unknown]");
1406 evname ? evname : "[unknown]");
1407 } 1645 }
1408 1646
1409 if (print_flags) 1647 if (print_flags)
1410 print_sample_flags(sample->flags); 1648 perf_sample__fprintf_flags(sample->flags, fp);
1411 1649
1412 if (is_bts_event(attr)) { 1650 if (is_bts_event(attr)) {
1413 print_sample_bts(sample, evsel, thread, al, machine); 1651 perf_sample__fprintf_bts(sample, evsel, thread, al, machine, fp);
1414 return; 1652 return;
1415 } 1653 }
1416 1654
1417 if (PRINT_FIELD(TRACE)) 1655 if (PRINT_FIELD(TRACE)) {
1418 event_format__print(evsel->tp_format, sample->cpu, 1656 event_format__fprintf(evsel->tp_format, sample->cpu,
1419 sample->raw_data, sample->raw_size); 1657 sample->raw_data, sample->raw_size, fp);
1658 }
1420 1659
1421 if (attr->type == PERF_TYPE_SYNTH && PRINT_FIELD(SYNTH)) 1660 if (attr->type == PERF_TYPE_SYNTH && PRINT_FIELD(SYNTH))
1422 print_sample_synth(sample, evsel); 1661 perf_sample__fprintf_synth(sample, evsel, fp);
1423 1662
1424 if (PRINT_FIELD(ADDR)) 1663 if (PRINT_FIELD(ADDR))
1425 print_sample_addr(sample, thread, attr); 1664 perf_sample__fprintf_addr(sample, thread, attr, fp);
1426 1665
1427 if (PRINT_FIELD(DATA_SRC)) 1666 if (PRINT_FIELD(DATA_SRC))
1428 data_src__printf(sample->data_src); 1667 data_src__fprintf(sample->data_src, fp);
1429 1668
1430 if (PRINT_FIELD(WEIGHT)) 1669 if (PRINT_FIELD(WEIGHT))
1431 printf("%16" PRIu64, sample->weight); 1670 fprintf(fp, "%16" PRIu64, sample->weight);
1432 1671
1433 if (PRINT_FIELD(IP)) { 1672 if (PRINT_FIELD(IP)) {
1434 struct callchain_cursor *cursor = NULL; 1673 struct callchain_cursor *cursor = NULL;
@@ -1438,27 +1677,33 @@ static void process_event(struct perf_script *script,
1438 sample, NULL, NULL, scripting_max_stack) == 0) 1677 sample, NULL, NULL, scripting_max_stack) == 0)
1439 cursor = &callchain_cursor; 1678 cursor = &callchain_cursor;
1440 1679
1441 putchar(cursor ? '\n' : ' '); 1680 fputc(cursor ? '\n' : ' ', fp);
1442 sample__fprintf_sym(sample, al, 0, output[type].print_ip_opts, cursor, stdout); 1681 sample__fprintf_sym(sample, al, 0, output[type].print_ip_opts, cursor, fp);
1443 } 1682 }
1444 1683
1445 if (PRINT_FIELD(IREGS)) 1684 if (PRINT_FIELD(IREGS))
1446 print_sample_iregs(sample, attr); 1685 perf_sample__fprintf_iregs(sample, attr, fp);
1686
1687 if (PRINT_FIELD(UREGS))
1688 perf_sample__fprintf_uregs(sample, attr, fp);
1447 1689
1448 if (PRINT_FIELD(BRSTACK)) 1690 if (PRINT_FIELD(BRSTACK))
1449 print_sample_brstack(sample, thread, attr); 1691 perf_sample__fprintf_brstack(sample, thread, attr, fp);
1450 else if (PRINT_FIELD(BRSTACKSYM)) 1692 else if (PRINT_FIELD(BRSTACKSYM))
1451 print_sample_brstacksym(sample, thread, attr); 1693 perf_sample__fprintf_brstacksym(sample, thread, attr, fp);
1452 else if (PRINT_FIELD(BRSTACKOFF)) 1694 else if (PRINT_FIELD(BRSTACKOFF))
1453 print_sample_brstackoff(sample, thread, attr); 1695 perf_sample__fprintf_brstackoff(sample, thread, attr, fp);
1454 1696
1455 if (perf_evsel__is_bpf_output(evsel) && PRINT_FIELD(BPF_OUTPUT)) 1697 if (perf_evsel__is_bpf_output(evsel) && PRINT_FIELD(BPF_OUTPUT))
1456 print_sample_bpf_output(sample); 1698 perf_sample__fprintf_bpf_output(sample, fp);
1457 print_insn(sample, attr, thread, machine); 1699 perf_sample__fprintf_insn(sample, attr, thread, machine, fp);
1458 1700
1459 if (PRINT_FIELD(PHYS_ADDR)) 1701 if (PRINT_FIELD(PHYS_ADDR))
1460 printf("%16" PRIx64, sample->phys_addr); 1702 fprintf(fp, "%16" PRIx64, sample->phys_addr);
1461 printf("\n"); 1703 fprintf(fp, "\n");
1704
1705 if (PRINT_FIELD(METRIC))
1706 perf_sample__fprint_metric(script, thread, evsel, sample, fp);
1462} 1707}
1463 1708
1464static struct scripting_ops *scripting_ops; 1709static struct scripting_ops *scripting_ops;
@@ -1538,8 +1783,10 @@ static int process_sample_event(struct perf_tool *tool,
1538 struct perf_script *scr = container_of(tool, struct perf_script, tool); 1783 struct perf_script *scr = container_of(tool, struct perf_script, tool);
1539 struct addr_location al; 1784 struct addr_location al;
1540 1785
1541 if (perf_time__skip_sample(&scr->ptime, sample->time)) 1786 if (perf_time__ranges_skip_sample(scr->ptime_range, scr->range_num,
1787 sample->time)) {
1542 return 0; 1788 return 0;
1789 }
1543 1790
1544 if (debug_mode) { 1791 if (debug_mode) {
1545 if (sample->time < last_timestamp) { 1792 if (sample->time < last_timestamp) {
@@ -1632,7 +1879,8 @@ static int process_comm_event(struct perf_tool *tool,
1632 sample->tid = event->comm.tid; 1879 sample->tid = event->comm.tid;
1633 sample->pid = event->comm.pid; 1880 sample->pid = event->comm.pid;
1634 } 1881 }
1635 print_sample_start(sample, thread, evsel); 1882 perf_sample__fprintf_start(sample, thread, evsel,
1883 PERF_RECORD_COMM, stdout);
1636 perf_event__fprintf(event, stdout); 1884 perf_event__fprintf(event, stdout);
1637 ret = 0; 1885 ret = 0;
1638out: 1886out:
@@ -1667,7 +1915,8 @@ static int process_namespaces_event(struct perf_tool *tool,
1667 sample->tid = event->namespaces.tid; 1915 sample->tid = event->namespaces.tid;
1668 sample->pid = event->namespaces.pid; 1916 sample->pid = event->namespaces.pid;
1669 } 1917 }
1670 print_sample_start(sample, thread, evsel); 1918 perf_sample__fprintf_start(sample, thread, evsel,
1919 PERF_RECORD_NAMESPACES, stdout);
1671 perf_event__fprintf(event, stdout); 1920 perf_event__fprintf(event, stdout);
1672 ret = 0; 1921 ret = 0;
1673out: 1922out:
@@ -1700,7 +1949,8 @@ static int process_fork_event(struct perf_tool *tool,
1700 sample->tid = event->fork.tid; 1949 sample->tid = event->fork.tid;
1701 sample->pid = event->fork.pid; 1950 sample->pid = event->fork.pid;
1702 } 1951 }
1703 print_sample_start(sample, thread, evsel); 1952 perf_sample__fprintf_start(sample, thread, evsel,
1953 PERF_RECORD_FORK, stdout);
1704 perf_event__fprintf(event, stdout); 1954 perf_event__fprintf(event, stdout);
1705 thread__put(thread); 1955 thread__put(thread);
1706 1956
@@ -1729,7 +1979,8 @@ static int process_exit_event(struct perf_tool *tool,
1729 sample->tid = event->fork.tid; 1979 sample->tid = event->fork.tid;
1730 sample->pid = event->fork.pid; 1980 sample->pid = event->fork.pid;
1731 } 1981 }
1732 print_sample_start(sample, thread, evsel); 1982 perf_sample__fprintf_start(sample, thread, evsel,
1983 PERF_RECORD_EXIT, stdout);
1733 perf_event__fprintf(event, stdout); 1984 perf_event__fprintf(event, stdout);
1734 1985
1735 if (perf_event__process_exit(tool, event, sample, machine) < 0) 1986 if (perf_event__process_exit(tool, event, sample, machine) < 0)
@@ -1764,7 +2015,8 @@ static int process_mmap_event(struct perf_tool *tool,
1764 sample->tid = event->mmap.tid; 2015 sample->tid = event->mmap.tid;
1765 sample->pid = event->mmap.pid; 2016 sample->pid = event->mmap.pid;
1766 } 2017 }
1767 print_sample_start(sample, thread, evsel); 2018 perf_sample__fprintf_start(sample, thread, evsel,
2019 PERF_RECORD_MMAP, stdout);
1768 perf_event__fprintf(event, stdout); 2020 perf_event__fprintf(event, stdout);
1769 thread__put(thread); 2021 thread__put(thread);
1770 return 0; 2022 return 0;
@@ -1795,7 +2047,8 @@ static int process_mmap2_event(struct perf_tool *tool,
1795 sample->tid = event->mmap2.tid; 2047 sample->tid = event->mmap2.tid;
1796 sample->pid = event->mmap2.pid; 2048 sample->pid = event->mmap2.pid;
1797 } 2049 }
1798 print_sample_start(sample, thread, evsel); 2050 perf_sample__fprintf_start(sample, thread, evsel,
2051 PERF_RECORD_MMAP2, stdout);
1799 perf_event__fprintf(event, stdout); 2052 perf_event__fprintf(event, stdout);
1800 thread__put(thread); 2053 thread__put(thread);
1801 return 0; 2054 return 0;
@@ -1821,7 +2074,31 @@ static int process_switch_event(struct perf_tool *tool,
1821 return -1; 2074 return -1;
1822 } 2075 }
1823 2076
1824 print_sample_start(sample, thread, evsel); 2077 perf_sample__fprintf_start(sample, thread, evsel,
2078 PERF_RECORD_SWITCH, stdout);
2079 perf_event__fprintf(event, stdout);
2080 thread__put(thread);
2081 return 0;
2082}
2083
2084static int
2085process_lost_event(struct perf_tool *tool,
2086 union perf_event *event,
2087 struct perf_sample *sample,
2088 struct machine *machine)
2089{
2090 struct perf_script *script = container_of(tool, struct perf_script, tool);
2091 struct perf_session *session = script->session;
2092 struct perf_evsel *evsel = perf_evlist__id2evsel(session->evlist, sample->id);
2093 struct thread *thread;
2094
2095 thread = machine__findnew_thread(machine, sample->pid,
2096 sample->tid);
2097 if (thread == NULL)
2098 return -1;
2099
2100 perf_sample__fprintf_start(sample, thread, evsel,
2101 PERF_RECORD_LOST, stdout);
1825 perf_event__fprintf(event, stdout); 2102 perf_event__fprintf(event, stdout);
1826 thread__put(thread); 2103 thread__put(thread);
1827 return 0; 2104 return 0;
@@ -1832,6 +2109,75 @@ static void sig_handler(int sig __maybe_unused)
1832 session_done = 1; 2109 session_done = 1;
1833} 2110}
1834 2111
2112static void perf_script__fclose_per_event_dump(struct perf_script *script)
2113{
2114 struct perf_evlist *evlist = script->session->evlist;
2115 struct perf_evsel *evsel;
2116
2117 evlist__for_each_entry(evlist, evsel) {
2118 if (!evsel->priv)
2119 break;
2120 perf_evsel_script__delete(evsel->priv);
2121 evsel->priv = NULL;
2122 }
2123}
2124
2125static int perf_script__fopen_per_event_dump(struct perf_script *script)
2126{
2127 struct perf_evsel *evsel;
2128
2129 evlist__for_each_entry(script->session->evlist, evsel) {
2130 /*
2131 * Already setup? I.e. we may be called twice in cases like
2132 * Intel PT, one for the intel_pt// and dummy events, then
2133 * for the evsels syntheized from the auxtrace info.
2134 *
2135 * Ses perf_script__process_auxtrace_info.
2136 */
2137 if (evsel->priv != NULL)
2138 continue;
2139
2140 evsel->priv = perf_evsel_script__new(evsel, script->session->data);
2141 if (evsel->priv == NULL)
2142 goto out_err_fclose;
2143 }
2144
2145 return 0;
2146
2147out_err_fclose:
2148 perf_script__fclose_per_event_dump(script);
2149 return -1;
2150}
2151
2152static int perf_script__setup_per_event_dump(struct perf_script *script)
2153{
2154 struct perf_evsel *evsel;
2155 static struct perf_evsel_script es_stdout;
2156
2157 if (script->per_event_dump)
2158 return perf_script__fopen_per_event_dump(script);
2159
2160 es_stdout.fp = stdout;
2161
2162 evlist__for_each_entry(script->session->evlist, evsel)
2163 evsel->priv = &es_stdout;
2164
2165 return 0;
2166}
2167
2168static void perf_script__exit_per_event_dump_stats(struct perf_script *script)
2169{
2170 struct perf_evsel *evsel;
2171
2172 evlist__for_each_entry(script->session->evlist, evsel) {
2173 struct perf_evsel_script *es = evsel->priv;
2174
2175 perf_evsel_script__fprintf(es, stdout);
2176 perf_evsel_script__delete(es);
2177 evsel->priv = NULL;
2178 }
2179}
2180
1835static int __cmd_script(struct perf_script *script) 2181static int __cmd_script(struct perf_script *script)
1836{ 2182{
1837 int ret; 2183 int ret;
@@ -1852,9 +2198,19 @@ static int __cmd_script(struct perf_script *script)
1852 script->tool.context_switch = process_switch_event; 2198 script->tool.context_switch = process_switch_event;
1853 if (script->show_namespace_events) 2199 if (script->show_namespace_events)
1854 script->tool.namespaces = process_namespaces_event; 2200 script->tool.namespaces = process_namespaces_event;
2201 if (script->show_lost_events)
2202 script->tool.lost = process_lost_event;
2203
2204 if (perf_script__setup_per_event_dump(script)) {
2205 pr_err("Couldn't create the per event dump files\n");
2206 return -1;
2207 }
1855 2208
1856 ret = perf_session__process_events(script->session); 2209 ret = perf_session__process_events(script->session);
1857 2210
2211 if (script->per_event_dump)
2212 perf_script__exit_per_event_dump_stats(script);
2213
1858 if (debug_mode) 2214 if (debug_mode)
1859 pr_err("Misordered timestamps: %" PRIu64 "\n", nr_unordered); 2215 pr_err("Misordered timestamps: %" PRIu64 "\n", nr_unordered);
1860 2216
@@ -2129,19 +2485,6 @@ out:
2129 return rc; 2485 return rc;
2130} 2486}
2131 2487
2132/* Helper function for filesystems that return a dent->d_type DT_UNKNOWN */
2133static int is_directory(const char *base_path, const struct dirent *dent)
2134{
2135 char path[PATH_MAX];
2136 struct stat st;
2137
2138 sprintf(path, "%s/%s", base_path, dent->d_name);
2139 if (stat(path, &st))
2140 return 0;
2141
2142 return S_ISDIR(st.st_mode);
2143}
2144
2145#define for_each_lang(scripts_path, scripts_dir, lang_dirent) \ 2488#define for_each_lang(scripts_path, scripts_dir, lang_dirent) \
2146 while ((lang_dirent = readdir(scripts_dir)) != NULL) \ 2489 while ((lang_dirent = readdir(scripts_dir)) != NULL) \
2147 if ((lang_dirent->d_type == DT_DIR || \ 2490 if ((lang_dirent->d_type == DT_DIR || \
@@ -2419,14 +2762,16 @@ int find_scripts(char **scripts_array, char **scripts_path_array)
2419 char scripts_path[MAXPATHLEN], lang_path[MAXPATHLEN]; 2762 char scripts_path[MAXPATHLEN], lang_path[MAXPATHLEN];
2420 DIR *scripts_dir, *lang_dir; 2763 DIR *scripts_dir, *lang_dir;
2421 struct perf_session *session; 2764 struct perf_session *session;
2422 struct perf_data_file file = { 2765 struct perf_data data = {
2423 .path = input_name, 2766 .file = {
2424 .mode = PERF_DATA_MODE_READ, 2767 .path = input_name,
2768 },
2769 .mode = PERF_DATA_MODE_READ,
2425 }; 2770 };
2426 char *temp; 2771 char *temp;
2427 int i = 0; 2772 int i = 0;
2428 2773
2429 session = perf_session__new(&file, false, NULL); 2774 session = perf_session__new(&data, false, NULL);
2430 if (!session) 2775 if (!session)
2431 return -1; 2776 return -1;
2432 2777
@@ -2574,9 +2919,10 @@ static void script__setup_sample_type(struct perf_script *script)
2574 2919
2575 if (symbol_conf.use_callchain || symbol_conf.cumulate_callchain) { 2920 if (symbol_conf.use_callchain || symbol_conf.cumulate_callchain) {
2576 if ((sample_type & PERF_SAMPLE_REGS_USER) && 2921 if ((sample_type & PERF_SAMPLE_REGS_USER) &&
2577 (sample_type & PERF_SAMPLE_STACK_USER)) 2922 (sample_type & PERF_SAMPLE_STACK_USER)) {
2578 callchain_param.record_mode = CALLCHAIN_DWARF; 2923 callchain_param.record_mode = CALLCHAIN_DWARF;
2579 else if (sample_type & PERF_SAMPLE_BRANCH_STACK) 2924 dwarf_callchain_users = true;
2925 } else if (sample_type & PERF_SAMPLE_BRANCH_STACK)
2580 callchain_param.record_mode = CALLCHAIN_LBR; 2926 callchain_param.record_mode = CALLCHAIN_LBR;
2581 else 2927 else
2582 callchain_param.record_mode = CALLCHAIN_FP; 2928 callchain_param.record_mode = CALLCHAIN_FP;
@@ -2664,6 +3010,25 @@ int process_cpu_map_event(struct perf_tool *tool __maybe_unused,
2664 return set_maps(script); 3010 return set_maps(script);
2665} 3011}
2666 3012
3013#ifdef HAVE_AUXTRACE_SUPPORT
3014static int perf_script__process_auxtrace_info(struct perf_tool *tool,
3015 union perf_event *event,
3016 struct perf_session *session)
3017{
3018 int ret = perf_event__process_auxtrace_info(tool, event, session);
3019
3020 if (ret == 0) {
3021 struct perf_script *script = container_of(tool, struct perf_script, tool);
3022
3023 ret = perf_script__setup_per_event_dump(script);
3024 }
3025
3026 return ret;
3027}
3028#else
3029#define perf_script__process_auxtrace_info 0
3030#endif
3031
2667int cmd_script(int argc, const char **argv) 3032int cmd_script(int argc, const char **argv)
2668{ 3033{
2669 bool show_full_info = false; 3034 bool show_full_info = false;
@@ -2692,7 +3057,7 @@ int cmd_script(int argc, const char **argv)
2692 .feature = perf_event__process_feature, 3057 .feature = perf_event__process_feature,
2693 .build_id = perf_event__process_build_id, 3058 .build_id = perf_event__process_build_id,
2694 .id_index = perf_event__process_id_index, 3059 .id_index = perf_event__process_id_index,
2695 .auxtrace_info = perf_event__process_auxtrace_info, 3060 .auxtrace_info = perf_script__process_auxtrace_info,
2696 .auxtrace = perf_event__process_auxtrace, 3061 .auxtrace = perf_event__process_auxtrace,
2697 .auxtrace_error = perf_event__process_auxtrace_error, 3062 .auxtrace_error = perf_event__process_auxtrace_error,
2698 .stat = perf_event__process_stat_event, 3063 .stat = perf_event__process_stat_event,
@@ -2704,7 +3069,7 @@ int cmd_script(int argc, const char **argv)
2704 .ordering_requires_timestamps = true, 3069 .ordering_requires_timestamps = true,
2705 }, 3070 },
2706 }; 3071 };
2707 struct perf_data_file file = { 3072 struct perf_data data = {
2708 .mode = PERF_DATA_MODE_READ, 3073 .mode = PERF_DATA_MODE_READ,
2709 }; 3074 };
2710 const struct option options[] = { 3075 const struct option options[] = {
@@ -2740,7 +3105,7 @@ int cmd_script(int argc, const char **argv)
2740 "+field to add and -field to remove." 3105 "+field to add and -field to remove."
2741 "Valid types: hw,sw,trace,raw,synth. " 3106 "Valid types: hw,sw,trace,raw,synth. "
2742 "Fields: comm,tid,pid,time,cpu,event,trace,ip,sym,dso," 3107 "Fields: comm,tid,pid,time,cpu,event,trace,ip,sym,dso,"
2743 "addr,symoff,period,iregs,brstack,brstacksym,flags," 3108 "addr,symoff,period,iregs,uregs,brstack,brstacksym,flags,"
2744 "bpf-output,callindent,insn,insnlen,brstackinsn,synth,phys_addr", 3109 "bpf-output,callindent,insn,insnlen,brstackinsn,synth,phys_addr",
2745 parse_output_fields), 3110 parse_output_fields),
2746 OPT_BOOLEAN('a', "all-cpus", &system_wide, 3111 OPT_BOOLEAN('a', "all-cpus", &system_wide,
@@ -2772,6 +3137,10 @@ int cmd_script(int argc, const char **argv)
2772 "Show context switch events (if recorded)"), 3137 "Show context switch events (if recorded)"),
2773 OPT_BOOLEAN('\0', "show-namespace-events", &script.show_namespace_events, 3138 OPT_BOOLEAN('\0', "show-namespace-events", &script.show_namespace_events,
2774 "Show namespace events (if recorded)"), 3139 "Show namespace events (if recorded)"),
3140 OPT_BOOLEAN('\0', "show-lost-events", &script.show_lost_events,
3141 "Show lost events (if recorded)"),
3142 OPT_BOOLEAN('\0', "per-event-dump", &script.per_event_dump,
3143 "Dump trace output to files named by the monitored events"),
2775 OPT_BOOLEAN('f', "force", &symbol_conf.force, "don't complain, do it"), 3144 OPT_BOOLEAN('f', "force", &symbol_conf.force, "don't complain, do it"),
2776 OPT_INTEGER(0, "max-blocks", &max_blocks, 3145 OPT_INTEGER(0, "max-blocks", &max_blocks,
2777 "Maximum number of code blocks to dump with brstackinsn"), 3146 "Maximum number of code blocks to dump with brstackinsn"),
@@ -2802,13 +3171,15 @@ int cmd_script(int argc, const char **argv)
2802 NULL 3171 NULL
2803 }; 3172 };
2804 3173
3174 perf_set_singlethreaded();
3175
2805 setup_scripting(); 3176 setup_scripting();
2806 3177
2807 argc = parse_options_subcommand(argc, argv, options, script_subcommands, script_usage, 3178 argc = parse_options_subcommand(argc, argv, options, script_subcommands, script_usage,
2808 PARSE_OPT_STOP_AT_NON_OPTION); 3179 PARSE_OPT_STOP_AT_NON_OPTION);
2809 3180
2810 file.path = input_name; 3181 data.file.path = input_name;
2811 file.force = symbol_conf.force; 3182 data.force = symbol_conf.force;
2812 3183
2813 if (argc > 1 && !strncmp(argv[0], "rec", strlen("rec"))) { 3184 if (argc > 1 && !strncmp(argv[0], "rec", strlen("rec"))) {
2814 rec_script_path = get_script_path(argv[1], RECORD_SUFFIX); 3185 rec_script_path = get_script_path(argv[1], RECORD_SUFFIX);
@@ -2975,7 +3346,7 @@ int cmd_script(int argc, const char **argv)
2975 if (!script_name) 3346 if (!script_name)
2976 setup_pager(); 3347 setup_pager();
2977 3348
2978 session = perf_session__new(&file, false, &script.tool); 3349 session = perf_session__new(&data, false, &script.tool);
2979 if (session == NULL) 3350 if (session == NULL)
2980 return -1; 3351 return -1;
2981 3352
@@ -3016,7 +3387,8 @@ int cmd_script(int argc, const char **argv)
3016 machine__resolve_kernel_addr, 3387 machine__resolve_kernel_addr,
3017 &session->machines.host) < 0) { 3388 &session->machines.host) < 0) {
3018 pr_err("%s: failed to set libtraceevent function resolver\n", __func__); 3389 pr_err("%s: failed to set libtraceevent function resolver\n", __func__);
3019 return -1; 3390 err = -1;
3391 goto out_delete;
3020 } 3392 }
3021 3393
3022 if (generate_script_lang) { 3394 if (generate_script_lang) {
@@ -3030,7 +3402,7 @@ int cmd_script(int argc, const char **argv)
3030 goto out_delete; 3402 goto out_delete;
3031 } 3403 }
3032 3404
3033 input = open(file.path, O_RDONLY); /* input_name */ 3405 input = open(data.file.path, O_RDONLY); /* input_name */
3034 if (input < 0) { 3406 if (input < 0) {
3035 err = -errno; 3407 err = -errno;
3036 perror("failed to open file"); 3408 perror("failed to open file");
@@ -3073,10 +3445,37 @@ int cmd_script(int argc, const char **argv)
3073 if (err < 0) 3445 if (err < 0)
3074 goto out_delete; 3446 goto out_delete;
3075 3447
3448 script.ptime_range = perf_time__range_alloc(script.time_str,
3449 &script.range_size);
3450 if (!script.ptime_range) {
3451 err = -ENOMEM;
3452 goto out_delete;
3453 }
3454
3076 /* needs to be parsed after looking up reference time */ 3455 /* needs to be parsed after looking up reference time */
3077 if (perf_time__parse_str(&script.ptime, script.time_str) != 0) { 3456 if (perf_time__parse_str(script.ptime_range, script.time_str) != 0) {
3078 pr_err("Invalid time string\n"); 3457 if (session->evlist->first_sample_time == 0 &&
3079 return -EINVAL; 3458 session->evlist->last_sample_time == 0) {
3459 pr_err("HINT: no first/last sample time found in perf data.\n"
3460 "Please use latest perf binary to execute 'perf record'\n"
3461 "(if '--buildid-all' is enabled, please set '--timestamp-boundary').\n");
3462 err = -EINVAL;
3463 goto out_delete;
3464 }
3465
3466 script.range_num = perf_time__percent_parse_str(
3467 script.ptime_range, script.range_size,
3468 script.time_str,
3469 session->evlist->first_sample_time,
3470 session->evlist->last_sample_time);
3471
3472 if (script.range_num < 0) {
3473 pr_err("Invalid time string\n");
3474 err = -EINVAL;
3475 goto out_delete;
3476 }
3477 } else {
3478 script.range_num = 1;
3080 } 3479 }
3081 3480
3082 err = __cmd_script(&script); 3481 err = __cmd_script(&script);
@@ -3084,6 +3483,8 @@ int cmd_script(int argc, const char **argv)
3084 flush_scripting(); 3483 flush_scripting();
3085 3484
3086out_delete: 3485out_delete:
3486 zfree(&script.ptime_range);
3487
3087 perf_evlist__free_stats(session->evlist); 3488 perf_evlist__free_stats(session->evlist);
3088 perf_session__delete(session); 3489 perf_session__delete(session);
3089 3490
diff --git a/tools/perf/builtin-stat.c b/tools/perf/builtin-stat.c
index 69523ed55894..98bf9d32f222 100644
--- a/tools/perf/builtin-stat.c
+++ b/tools/perf/builtin-stat.c
@@ -63,8 +63,8 @@
63#include "util/group.h" 63#include "util/group.h"
64#include "util/session.h" 64#include "util/session.h"
65#include "util/tool.h" 65#include "util/tool.h"
66#include "util/group.h"
67#include "util/string2.h" 66#include "util/string2.h"
67#include "util/metricgroup.h"
68#include "asm/bug.h" 68#include "asm/bug.h"
69 69
70#include <linux/time64.h> 70#include <linux/time64.h>
@@ -133,6 +133,8 @@ static const char *smi_cost_attrs = {
133 133
134static struct perf_evlist *evsel_list; 134static struct perf_evlist *evsel_list;
135 135
136static struct rblist metric_events;
137
136static struct target target = { 138static struct target target = {
137 .uid = UINT_MAX, 139 .uid = UINT_MAX,
138}; 140};
@@ -172,7 +174,7 @@ static int print_free_counters_hint;
172 174
173struct perf_stat { 175struct perf_stat {
174 bool record; 176 bool record;
175 struct perf_data_file file; 177 struct perf_data data;
176 struct perf_session *session; 178 struct perf_session *session;
177 u64 bytes_written; 179 u64 bytes_written;
178 struct perf_tool tool; 180 struct perf_tool tool;
@@ -192,6 +194,11 @@ static struct perf_stat_config stat_config = {
192 .scale = true, 194 .scale = true,
193}; 195};
194 196
197static bool is_duration_time(struct perf_evsel *evsel)
198{
199 return !strcmp(evsel->name, "duration_time");
200}
201
195static inline void diff_timespec(struct timespec *r, struct timespec *a, 202static inline void diff_timespec(struct timespec *r, struct timespec *a,
196 struct timespec *b) 203 struct timespec *b)
197{ 204{
@@ -206,8 +213,13 @@ static inline void diff_timespec(struct timespec *r, struct timespec *a,
206 213
207static void perf_stat__reset_stats(void) 214static void perf_stat__reset_stats(void)
208{ 215{
216 int i;
217
209 perf_evlist__reset_stats(evsel_list); 218 perf_evlist__reset_stats(evsel_list);
210 perf_stat__reset_shadow_stats(); 219 perf_stat__reset_shadow_stats();
220
221 for (i = 0; i < stat_config.stats_num; i++)
222 perf_stat__reset_shadow_per_stat(&stat_config.stats[i]);
211} 223}
212 224
213static int create_perf_stat_counter(struct perf_evsel *evsel) 225static int create_perf_stat_counter(struct perf_evsel *evsel)
@@ -245,7 +257,7 @@ static int create_perf_stat_counter(struct perf_evsel *evsel)
245 * by attr->sample_type != 0, and we can't run it on 257 * by attr->sample_type != 0, and we can't run it on
246 * stat sessions. 258 * stat sessions.
247 */ 259 */
248 if (!(STAT_RECORD && perf_stat.file.is_pipe)) 260 if (!(STAT_RECORD && perf_stat.data.is_pipe))
249 attr->sample_type = PERF_SAMPLE_IDENTIFIER; 261 attr->sample_type = PERF_SAMPLE_IDENTIFIER;
250 262
251 /* 263 /*
@@ -264,7 +276,7 @@ static int create_perf_stat_counter(struct perf_evsel *evsel)
264 attr->enable_on_exec = 1; 276 attr->enable_on_exec = 1;
265 } 277 }
266 278
267 if (target__has_cpu(&target)) 279 if (target__has_cpu(&target) && !target__has_per_thread(&target))
268 return perf_evsel__open_per_cpu(evsel, perf_evsel__cpus(evsel)); 280 return perf_evsel__open_per_cpu(evsel, perf_evsel__cpus(evsel));
269 281
270 return perf_evsel__open_per_thread(evsel, evsel_list->threads); 282 return perf_evsel__open_per_thread(evsel, evsel_list->threads);
@@ -287,7 +299,7 @@ static int process_synthesized_event(struct perf_tool *tool __maybe_unused,
287 struct perf_sample *sample __maybe_unused, 299 struct perf_sample *sample __maybe_unused,
288 struct machine *machine __maybe_unused) 300 struct machine *machine __maybe_unused)
289{ 301{
290 if (perf_data_file__write(&perf_stat.file, event, event->header.size) < 0) { 302 if (perf_data__write(&perf_stat.data, event, event->header.size) < 0) {
291 pr_err("failed to write perf data, error: %m\n"); 303 pr_err("failed to write perf data, error: %m\n");
292 return -1; 304 return -1;
293 } 305 }
@@ -327,7 +339,7 @@ static int read_counter(struct perf_evsel *counter)
327 int nthreads = thread_map__nr(evsel_list->threads); 339 int nthreads = thread_map__nr(evsel_list->threads);
328 int ncpus, cpu, thread; 340 int ncpus, cpu, thread;
329 341
330 if (target__has_cpu(&target)) 342 if (target__has_cpu(&target) && !target__has_per_thread(&target))
331 ncpus = perf_evsel__nr_cpus(counter); 343 ncpus = perf_evsel__nr_cpus(counter);
332 else 344 else
333 ncpus = 1; 345 ncpus = 1;
@@ -407,6 +419,8 @@ static void process_interval(void)
407 pr_err("failed to write stat round event\n"); 419 pr_err("failed to write stat round event\n");
408 } 420 }
409 421
422 init_stats(&walltime_nsecs_stats);
423 update_stats(&walltime_nsecs_stats, stat_config.interval * 1000000);
410 print_counters(&rs, 0, NULL); 424 print_counters(&rs, 0, NULL);
411} 425}
412 426
@@ -448,19 +462,8 @@ static void workload_exec_failed_signal(int signo __maybe_unused, siginfo_t *inf
448 workload_exec_errno = info->si_value.sival_int; 462 workload_exec_errno = info->si_value.sival_int;
449} 463}
450 464
451static bool has_unit(struct perf_evsel *counter)
452{
453 return counter->unit && *counter->unit;
454}
455
456static bool has_scale(struct perf_evsel *counter)
457{
458 return counter->scale != 1;
459}
460
461static int perf_stat_synthesize_config(bool is_pipe) 465static int perf_stat_synthesize_config(bool is_pipe)
462{ 466{
463 struct perf_evsel *counter;
464 int err; 467 int err;
465 468
466 if (is_pipe) { 469 if (is_pipe) {
@@ -472,53 +475,10 @@ static int perf_stat_synthesize_config(bool is_pipe)
472 } 475 }
473 } 476 }
474 477
475 /* 478 err = perf_event__synthesize_extra_attr(NULL,
476 * Synthesize other events stuff not carried within 479 evsel_list,
477 * attr event - unit, scale, name 480 process_synthesized_event,
478 */ 481 is_pipe);
479 evlist__for_each_entry(evsel_list, counter) {
480 if (!counter->supported)
481 continue;
482
483 /*
484 * Synthesize unit and scale only if it's defined.
485 */
486 if (has_unit(counter)) {
487 err = perf_event__synthesize_event_update_unit(NULL, counter, process_synthesized_event);
488 if (err < 0) {
489 pr_err("Couldn't synthesize evsel unit.\n");
490 return err;
491 }
492 }
493
494 if (has_scale(counter)) {
495 err = perf_event__synthesize_event_update_scale(NULL, counter, process_synthesized_event);
496 if (err < 0) {
497 pr_err("Couldn't synthesize evsel scale.\n");
498 return err;
499 }
500 }
501
502 if (counter->own_cpus) {
503 err = perf_event__synthesize_event_update_cpus(NULL, counter, process_synthesized_event);
504 if (err < 0) {
505 pr_err("Couldn't synthesize evsel scale.\n");
506 return err;
507 }
508 }
509
510 /*
511 * Name is needed only for pipe output,
512 * perf.data carries event names.
513 */
514 if (is_pipe) {
515 err = perf_event__synthesize_event_update_name(NULL, counter, process_synthesized_event);
516 if (err < 0) {
517 pr_err("Couldn't synthesize evsel name.\n");
518 return err;
519 }
520 }
521 }
522 482
523 err = perf_event__synthesize_thread_map2(NULL, evsel_list->threads, 483 err = perf_event__synthesize_thread_map2(NULL, evsel_list->threads,
524 process_synthesized_event, 484 process_synthesized_event,
@@ -582,6 +542,32 @@ static bool perf_evsel__should_store_id(struct perf_evsel *counter)
582 return STAT_RECORD || counter->attr.read_format & PERF_FORMAT_ID; 542 return STAT_RECORD || counter->attr.read_format & PERF_FORMAT_ID;
583} 543}
584 544
545static struct perf_evsel *perf_evsel__reset_weak_group(struct perf_evsel *evsel)
546{
547 struct perf_evsel *c2, *leader;
548 bool is_open = true;
549
550 leader = evsel->leader;
551 pr_debug("Weak group for %s/%d failed\n",
552 leader->name, leader->nr_members);
553
554 /*
555 * for_each_group_member doesn't work here because it doesn't
556 * include the first entry.
557 */
558 evlist__for_each_entry(evsel_list, c2) {
559 if (c2 == evsel)
560 is_open = false;
561 if (c2->leader == leader) {
562 if (is_open)
563 perf_evsel__close(c2);
564 c2->leader = c2;
565 c2->nr_members = 0;
566 }
567 }
568 return leader;
569}
570
585static int __run_perf_stat(int argc, const char **argv) 571static int __run_perf_stat(int argc, const char **argv)
586{ 572{
587 int interval = stat_config.interval; 573 int interval = stat_config.interval;
@@ -592,7 +578,7 @@ static int __run_perf_stat(int argc, const char **argv)
592 size_t l; 578 size_t l;
593 int status = 0; 579 int status = 0;
594 const bool forks = (argc > 0); 580 const bool forks = (argc > 0);
595 bool is_pipe = STAT_RECORD ? perf_stat.file.is_pipe : false; 581 bool is_pipe = STAT_RECORD ? perf_stat.data.is_pipe : false;
596 struct perf_evsel_config_term *err_term; 582 struct perf_evsel_config_term *err_term;
597 583
598 if (interval) { 584 if (interval) {
@@ -618,6 +604,15 @@ static int __run_perf_stat(int argc, const char **argv)
618 evlist__for_each_entry(evsel_list, counter) { 604 evlist__for_each_entry(evsel_list, counter) {
619try_again: 605try_again:
620 if (create_perf_stat_counter(counter) < 0) { 606 if (create_perf_stat_counter(counter) < 0) {
607
608 /* Weak group failed. Reset the group. */
609 if ((errno == EINVAL || errno == EBADF) &&
610 counter->leader != counter &&
611 counter->weak_group) {
612 counter = perf_evsel__reset_weak_group(counter);
613 goto try_again;
614 }
615
621 /* 616 /*
622 * PPC returns ENXIO for HW counters until 2.6.37 617 * PPC returns ENXIO for HW counters until 2.6.37
623 * (behavior changed with commit b0a873e). 618 * (behavior changed with commit b0a873e).
@@ -674,10 +669,10 @@ try_again:
674 } 669 }
675 670
676 if (STAT_RECORD) { 671 if (STAT_RECORD) {
677 int err, fd = perf_data_file__fd(&perf_stat.file); 672 int err, fd = perf_data__fd(&perf_stat.data);
678 673
679 if (is_pipe) { 674 if (is_pipe) {
680 err = perf_header__write_pipe(perf_data_file__fd(&perf_stat.file)); 675 err = perf_header__write_pipe(perf_data__fd(&perf_stat.data));
681 } else { 676 } else {
682 err = perf_session__write_header(perf_stat.session, evsel_list, 677 err = perf_session__write_header(perf_stat.session, evsel_list,
683 fd, false); 678 fd, false);
@@ -800,7 +795,7 @@ static void print_noise(struct perf_evsel *evsel, double avg)
800 if (run_count == 1) 795 if (run_count == 1)
801 return; 796 return;
802 797
803 ps = evsel->priv; 798 ps = evsel->stats;
804 print_noise_pct(stddev_stats(&ps->res_stats[0]), avg); 799 print_noise_pct(stddev_stats(&ps->res_stats[0]), avg);
805} 800}
806 801
@@ -1106,7 +1101,8 @@ static void abs_printout(int id, int nr, struct perf_evsel *evsel, double avg)
1106} 1101}
1107 1102
1108static void printout(int id, int nr, struct perf_evsel *counter, double uval, 1103static void printout(int id, int nr, struct perf_evsel *counter, double uval,
1109 char *prefix, u64 run, u64 ena, double noise) 1104 char *prefix, u64 run, u64 ena, double noise,
1105 struct runtime_stat *st)
1110{ 1106{
1111 struct perf_stat_output_ctx out; 1107 struct perf_stat_output_ctx out;
1112 struct outstate os = { 1108 struct outstate os = {
@@ -1199,7 +1195,7 @@ static void printout(int id, int nr, struct perf_evsel *counter, double uval,
1199 1195
1200 perf_stat__print_shadow_stats(counter, uval, 1196 perf_stat__print_shadow_stats(counter, uval,
1201 first_shadow_cpu(counter, id), 1197 first_shadow_cpu(counter, id),
1202 &out); 1198 &out, &metric_events, st);
1203 if (!csv_output && !metric_only) { 1199 if (!csv_output && !metric_only) {
1204 print_noise(counter, noise); 1200 print_noise(counter, noise);
1205 print_running(run, ena); 1201 print_running(run, ena);
@@ -1222,9 +1218,9 @@ static void aggr_update_shadow(void)
1222 continue; 1218 continue;
1223 val += perf_counts(counter->counts, cpu, 0)->val; 1219 val += perf_counts(counter->counts, cpu, 0)->val;
1224 } 1220 }
1225 val = val * counter->scale; 1221 perf_stat__update_shadow_stats(counter, val,
1226 perf_stat__update_shadow_stats(counter, &val, 1222 first_shadow_cpu(counter, id),
1227 first_shadow_cpu(counter, id)); 1223 &rt_stat);
1228 } 1224 }
1229 } 1225 }
1230} 1226}
@@ -1325,6 +1321,9 @@ static void print_aggr(char *prefix)
1325 ad.id = id = aggr_map->map[s]; 1321 ad.id = id = aggr_map->map[s];
1326 first = true; 1322 first = true;
1327 evlist__for_each_entry(evsel_list, counter) { 1323 evlist__for_each_entry(evsel_list, counter) {
1324 if (is_duration_time(counter))
1325 continue;
1326
1328 ad.val = ad.ena = ad.run = 0; 1327 ad.val = ad.ena = ad.run = 0;
1329 ad.nr = 0; 1328 ad.nr = 0;
1330 if (!collect_data(counter, aggr_cb, &ad)) 1329 if (!collect_data(counter, aggr_cb, &ad))
@@ -1341,7 +1340,8 @@ static void print_aggr(char *prefix)
1341 fprintf(output, "%s", prefix); 1340 fprintf(output, "%s", prefix);
1342 1341
1343 uval = val * counter->scale; 1342 uval = val * counter->scale;
1344 printout(id, nr, counter, uval, prefix, run, ena, 1.0); 1343 printout(id, nr, counter, uval, prefix, run, ena, 1.0,
1344 &rt_stat);
1345 if (!metric_only) 1345 if (!metric_only)
1346 fputc('\n', output); 1346 fputc('\n', output);
1347 } 1347 }
@@ -1350,13 +1350,24 @@ static void print_aggr(char *prefix)
1350 } 1350 }
1351} 1351}
1352 1352
1353static void print_aggr_thread(struct perf_evsel *counter, char *prefix) 1353static int cmp_val(const void *a, const void *b)
1354{ 1354{
1355 FILE *output = stat_config.output; 1355 return ((struct perf_aggr_thread_value *)b)->val -
1356 int nthreads = thread_map__nr(counter->threads); 1356 ((struct perf_aggr_thread_value *)a)->val;
1357 int ncpus = cpu_map__nr(counter->cpus); 1357}
1358 int cpu, thread; 1358
1359static struct perf_aggr_thread_value *sort_aggr_thread(
1360 struct perf_evsel *counter,
1361 int nthreads, int ncpus,
1362 int *ret)
1363{
1364 int cpu, thread, i = 0;
1359 double uval; 1365 double uval;
1366 struct perf_aggr_thread_value *buf;
1367
1368 buf = calloc(nthreads, sizeof(struct perf_aggr_thread_value));
1369 if (!buf)
1370 return NULL;
1360 1371
1361 for (thread = 0; thread < nthreads; thread++) { 1372 for (thread = 0; thread < nthreads; thread++) {
1362 u64 ena = 0, run = 0, val = 0; 1373 u64 ena = 0, run = 0, val = 0;
@@ -1367,13 +1378,63 @@ static void print_aggr_thread(struct perf_evsel *counter, char *prefix)
1367 run += perf_counts(counter->counts, cpu, thread)->run; 1378 run += perf_counts(counter->counts, cpu, thread)->run;
1368 } 1379 }
1369 1380
1381 uval = val * counter->scale;
1382
1383 /*
1384 * Skip value 0 when enabling --per-thread globally,
1385 * otherwise too many 0 output.
1386 */
1387 if (uval == 0.0 && target__has_per_thread(&target))
1388 continue;
1389
1390 buf[i].counter = counter;
1391 buf[i].id = thread;
1392 buf[i].uval = uval;
1393 buf[i].val = val;
1394 buf[i].run = run;
1395 buf[i].ena = ena;
1396 i++;
1397 }
1398
1399 qsort(buf, i, sizeof(struct perf_aggr_thread_value), cmp_val);
1400
1401 if (ret)
1402 *ret = i;
1403
1404 return buf;
1405}
1406
1407static void print_aggr_thread(struct perf_evsel *counter, char *prefix)
1408{
1409 FILE *output = stat_config.output;
1410 int nthreads = thread_map__nr(counter->threads);
1411 int ncpus = cpu_map__nr(counter->cpus);
1412 int thread, sorted_threads, id;
1413 struct perf_aggr_thread_value *buf;
1414
1415 buf = sort_aggr_thread(counter, nthreads, ncpus, &sorted_threads);
1416 if (!buf) {
1417 perror("cannot sort aggr thread");
1418 return;
1419 }
1420
1421 for (thread = 0; thread < sorted_threads; thread++) {
1370 if (prefix) 1422 if (prefix)
1371 fprintf(output, "%s", prefix); 1423 fprintf(output, "%s", prefix);
1372 1424
1373 uval = val * counter->scale; 1425 id = buf[thread].id;
1374 printout(thread, 0, counter, uval, prefix, run, ena, 1.0); 1426 if (stat_config.stats)
1427 printout(id, 0, buf[thread].counter, buf[thread].uval,
1428 prefix, buf[thread].run, buf[thread].ena, 1.0,
1429 &stat_config.stats[id]);
1430 else
1431 printout(id, 0, buf[thread].counter, buf[thread].uval,
1432 prefix, buf[thread].run, buf[thread].ena, 1.0,
1433 &rt_stat);
1375 fputc('\n', output); 1434 fputc('\n', output);
1376 } 1435 }
1436
1437 free(buf);
1377} 1438}
1378 1439
1379struct caggr_data { 1440struct caggr_data {
@@ -1384,7 +1445,7 @@ static void counter_aggr_cb(struct perf_evsel *counter, void *data,
1384 bool first __maybe_unused) 1445 bool first __maybe_unused)
1385{ 1446{
1386 struct caggr_data *cd = data; 1447 struct caggr_data *cd = data;
1387 struct perf_stat_evsel *ps = counter->priv; 1448 struct perf_stat_evsel *ps = counter->stats;
1388 1449
1389 cd->avg += avg_stats(&ps->res_stats[0]); 1450 cd->avg += avg_stats(&ps->res_stats[0]);
1390 cd->avg_enabled += avg_stats(&ps->res_stats[1]); 1451 cd->avg_enabled += avg_stats(&ps->res_stats[1]);
@@ -1408,7 +1469,8 @@ static void print_counter_aggr(struct perf_evsel *counter, char *prefix)
1408 fprintf(output, "%s", prefix); 1469 fprintf(output, "%s", prefix);
1409 1470
1410 uval = cd.avg * counter->scale; 1471 uval = cd.avg * counter->scale;
1411 printout(-1, 0, counter, uval, prefix, cd.avg_running, cd.avg_enabled, cd.avg); 1472 printout(-1, 0, counter, uval, prefix, cd.avg_running, cd.avg_enabled,
1473 cd.avg, &rt_stat);
1412 if (!metric_only) 1474 if (!metric_only)
1413 fprintf(output, "\n"); 1475 fprintf(output, "\n");
1414} 1476}
@@ -1447,7 +1509,8 @@ static void print_counter(struct perf_evsel *counter, char *prefix)
1447 fprintf(output, "%s", prefix); 1509 fprintf(output, "%s", prefix);
1448 1510
1449 uval = val * counter->scale; 1511 uval = val * counter->scale;
1450 printout(cpu, 0, counter, uval, prefix, run, ena, 1.0); 1512 printout(cpu, 0, counter, uval, prefix, run, ena, 1.0,
1513 &rt_stat);
1451 1514
1452 fputc('\n', output); 1515 fputc('\n', output);
1453 } 1516 }
@@ -1468,6 +1531,8 @@ static void print_no_aggr_metric(char *prefix)
1468 if (prefix) 1531 if (prefix)
1469 fputs(prefix, stat_config.output); 1532 fputs(prefix, stat_config.output);
1470 evlist__for_each_entry(evsel_list, counter) { 1533 evlist__for_each_entry(evsel_list, counter) {
1534 if (is_duration_time(counter))
1535 continue;
1471 if (first) { 1536 if (first) {
1472 aggr_printout(counter, cpu, 0); 1537 aggr_printout(counter, cpu, 0);
1473 first = false; 1538 first = false;
@@ -1477,7 +1542,8 @@ static void print_no_aggr_metric(char *prefix)
1477 run = perf_counts(counter->counts, cpu, 0)->run; 1542 run = perf_counts(counter->counts, cpu, 0)->run;
1478 1543
1479 uval = val * counter->scale; 1544 uval = val * counter->scale;
1480 printout(cpu, 0, counter, uval, prefix, run, ena, 1.0); 1545 printout(cpu, 0, counter, uval, prefix, run, ena, 1.0,
1546 &rt_stat);
1481 } 1547 }
1482 fputc('\n', stat_config.output); 1548 fputc('\n', stat_config.output);
1483 } 1549 }
@@ -1522,6 +1588,8 @@ static void print_metric_headers(const char *prefix, bool no_indent)
1522 1588
1523 /* Print metrics headers only */ 1589 /* Print metrics headers only */
1524 evlist__for_each_entry(evsel_list, counter) { 1590 evlist__for_each_entry(evsel_list, counter) {
1591 if (is_duration_time(counter))
1592 continue;
1525 os.evsel = counter; 1593 os.evsel = counter;
1526 out.ctx = &os; 1594 out.ctx = &os;
1527 out.print_metric = print_metric_header; 1595 out.print_metric = print_metric_header;
@@ -1530,7 +1598,9 @@ static void print_metric_headers(const char *prefix, bool no_indent)
1530 os.evsel = counter; 1598 os.evsel = counter;
1531 perf_stat__print_shadow_stats(counter, 0, 1599 perf_stat__print_shadow_stats(counter, 0,
1532 0, 1600 0,
1533 &out); 1601 &out,
1602 &metric_events,
1603 &rt_stat);
1534 } 1604 }
1535 fputc('\n', stat_config.output); 1605 fputc('\n', stat_config.output);
1536} 1606}
@@ -1643,7 +1713,7 @@ static void print_counters(struct timespec *ts, int argc, const char **argv)
1643 char buf[64], *prefix = NULL; 1713 char buf[64], *prefix = NULL;
1644 1714
1645 /* Do not print anything if we record to the pipe. */ 1715 /* Do not print anything if we record to the pipe. */
1646 if (STAT_RECORD && perf_stat.file.is_pipe) 1716 if (STAT_RECORD && perf_stat.data.is_pipe)
1647 return; 1717 return;
1648 1718
1649 if (interval) 1719 if (interval)
@@ -1668,12 +1738,18 @@ static void print_counters(struct timespec *ts, int argc, const char **argv)
1668 print_aggr(prefix); 1738 print_aggr(prefix);
1669 break; 1739 break;
1670 case AGGR_THREAD: 1740 case AGGR_THREAD:
1671 evlist__for_each_entry(evsel_list, counter) 1741 evlist__for_each_entry(evsel_list, counter) {
1742 if (is_duration_time(counter))
1743 continue;
1672 print_aggr_thread(counter, prefix); 1744 print_aggr_thread(counter, prefix);
1745 }
1673 break; 1746 break;
1674 case AGGR_GLOBAL: 1747 case AGGR_GLOBAL:
1675 evlist__for_each_entry(evsel_list, counter) 1748 evlist__for_each_entry(evsel_list, counter) {
1749 if (is_duration_time(counter))
1750 continue;
1676 print_counter_aggr(counter, prefix); 1751 print_counter_aggr(counter, prefix);
1752 }
1677 if (metric_only) 1753 if (metric_only)
1678 fputc('\n', stat_config.output); 1754 fputc('\n', stat_config.output);
1679 break; 1755 break;
@@ -1681,8 +1757,11 @@ static void print_counters(struct timespec *ts, int argc, const char **argv)
1681 if (metric_only) 1757 if (metric_only)
1682 print_no_aggr_metric(prefix); 1758 print_no_aggr_metric(prefix);
1683 else { 1759 else {
1684 evlist__for_each_entry(evsel_list, counter) 1760 evlist__for_each_entry(evsel_list, counter) {
1761 if (is_duration_time(counter))
1762 continue;
1685 print_counter(counter, prefix); 1763 print_counter(counter, prefix);
1764 }
1686 } 1765 }
1687 break; 1766 break;
1688 case AGGR_UNSET: 1767 case AGGR_UNSET:
@@ -1754,6 +1833,13 @@ static int enable_metric_only(const struct option *opt __maybe_unused,
1754 return 0; 1833 return 0;
1755} 1834}
1756 1835
1836static int parse_metric_groups(const struct option *opt,
1837 const char *str,
1838 int unset __maybe_unused)
1839{
1840 return metricgroup__parse_groups(opt, str, &metric_events);
1841}
1842
1757static const struct option stat_options[] = { 1843static const struct option stat_options[] = {
1758 OPT_BOOLEAN('T', "transaction", &transaction_run, 1844 OPT_BOOLEAN('T', "transaction", &transaction_run,
1759 "hardware transaction statistics"), 1845 "hardware transaction statistics"),
@@ -1819,6 +1905,9 @@ static const struct option stat_options[] = {
1819 "measure topdown level 1 statistics"), 1905 "measure topdown level 1 statistics"),
1820 OPT_BOOLEAN(0, "smi-cost", &smi_cost, 1906 OPT_BOOLEAN(0, "smi-cost", &smi_cost,
1821 "measure SMI cost"), 1907 "measure SMI cost"),
1908 OPT_CALLBACK('M', "metrics", &evsel_list, "metric/metric group list",
1909 "monitor specified metrics or metric groups (separated by ,)",
1910 parse_metric_groups),
1822 OPT_END() 1911 OPT_END()
1823}; 1912};
1824 1913
@@ -2334,20 +2423,20 @@ static void init_features(struct perf_session *session)
2334static int __cmd_record(int argc, const char **argv) 2423static int __cmd_record(int argc, const char **argv)
2335{ 2424{
2336 struct perf_session *session; 2425 struct perf_session *session;
2337 struct perf_data_file *file = &perf_stat.file; 2426 struct perf_data *data = &perf_stat.data;
2338 2427
2339 argc = parse_options(argc, argv, stat_options, stat_record_usage, 2428 argc = parse_options(argc, argv, stat_options, stat_record_usage,
2340 PARSE_OPT_STOP_AT_NON_OPTION); 2429 PARSE_OPT_STOP_AT_NON_OPTION);
2341 2430
2342 if (output_name) 2431 if (output_name)
2343 file->path = output_name; 2432 data->file.path = output_name;
2344 2433
2345 if (run_count != 1 || forever) { 2434 if (run_count != 1 || forever) {
2346 pr_err("Cannot use -r option with perf stat record.\n"); 2435 pr_err("Cannot use -r option with perf stat record.\n");
2347 return -1; 2436 return -1;
2348 } 2437 }
2349 2438
2350 session = perf_session__new(file, false, NULL); 2439 session = perf_session__new(data, false, NULL);
2351 if (session == NULL) { 2440 if (session == NULL) {
2352 pr_err("Perf session creation failed.\n"); 2441 pr_err("Perf session creation failed.\n");
2353 return -1; 2442 return -1;
@@ -2405,7 +2494,7 @@ int process_stat_config_event(struct perf_tool *tool,
2405 if (st->aggr_mode != AGGR_UNSET) 2494 if (st->aggr_mode != AGGR_UNSET)
2406 stat_config.aggr_mode = st->aggr_mode; 2495 stat_config.aggr_mode = st->aggr_mode;
2407 2496
2408 if (perf_stat.file.is_pipe) 2497 if (perf_stat.data.is_pipe)
2409 perf_stat_init_aggr_mode(); 2498 perf_stat_init_aggr_mode();
2410 else 2499 else
2411 perf_stat_init_aggr_mode_file(st); 2500 perf_stat_init_aggr_mode_file(st);
@@ -2470,6 +2559,35 @@ int process_cpu_map_event(struct perf_tool *tool,
2470 return set_maps(st); 2559 return set_maps(st);
2471} 2560}
2472 2561
2562static int runtime_stat_new(struct perf_stat_config *config, int nthreads)
2563{
2564 int i;
2565
2566 config->stats = calloc(nthreads, sizeof(struct runtime_stat));
2567 if (!config->stats)
2568 return -1;
2569
2570 config->stats_num = nthreads;
2571
2572 for (i = 0; i < nthreads; i++)
2573 runtime_stat__init(&config->stats[i]);
2574
2575 return 0;
2576}
2577
2578static void runtime_stat_delete(struct perf_stat_config *config)
2579{
2580 int i;
2581
2582 if (!config->stats)
2583 return;
2584
2585 for (i = 0; i < config->stats_num; i++)
2586 runtime_stat__exit(&config->stats[i]);
2587
2588 free(config->stats);
2589}
2590
2473static const char * const stat_report_usage[] = { 2591static const char * const stat_report_usage[] = {
2474 "perf stat report [<options>]", 2592 "perf stat report [<options>]",
2475 NULL, 2593 NULL,
@@ -2513,10 +2631,10 @@ static int __cmd_report(int argc, const char **argv)
2513 input_name = "perf.data"; 2631 input_name = "perf.data";
2514 } 2632 }
2515 2633
2516 perf_stat.file.path = input_name; 2634 perf_stat.data.file.path = input_name;
2517 perf_stat.file.mode = PERF_DATA_MODE_READ; 2635 perf_stat.data.mode = PERF_DATA_MODE_READ;
2518 2636
2519 session = perf_session__new(&perf_stat.file, false, &perf_stat.tool); 2637 session = perf_session__new(&perf_stat.data, false, &perf_stat.tool);
2520 if (session == NULL) 2638 if (session == NULL)
2521 return -1; 2639 return -1;
2522 2640
@@ -2679,12 +2797,16 @@ int cmd_stat(int argc, const char **argv)
2679 run_count = 1; 2797 run_count = 1;
2680 } 2798 }
2681 2799
2682 if ((stat_config.aggr_mode == AGGR_THREAD) && !target__has_task(&target)) { 2800 if ((stat_config.aggr_mode == AGGR_THREAD) &&
2683 fprintf(stderr, "The --per-thread option is only available " 2801 !target__has_task(&target)) {
2684 "when monitoring via -p -t options.\n"); 2802 if (!target.system_wide || target.cpu_list) {
2685 parse_options_usage(NULL, stat_options, "p", 1); 2803 fprintf(stderr, "The --per-thread option is only "
2686 parse_options_usage(NULL, stat_options, "t", 1); 2804 "available when monitoring via -p -t -a "
2687 goto out; 2805 "options or only --per-thread.\n");
2806 parse_options_usage(NULL, stat_options, "p", 1);
2807 parse_options_usage(NULL, stat_options, "t", 1);
2808 goto out;
2809 }
2688 } 2810 }
2689 2811
2690 /* 2812 /*
@@ -2708,6 +2830,9 @@ int cmd_stat(int argc, const char **argv)
2708 2830
2709 target__validate(&target); 2831 target__validate(&target);
2710 2832
2833 if ((stat_config.aggr_mode == AGGR_THREAD) && (target.system_wide))
2834 target.per_thread = true;
2835
2711 if (perf_evlist__create_maps(evsel_list, &target) < 0) { 2836 if (perf_evlist__create_maps(evsel_list, &target) < 0) {
2712 if (target__has_task(&target)) { 2837 if (target__has_task(&target)) {
2713 pr_err("Problems finding threads of monitor\n"); 2838 pr_err("Problems finding threads of monitor\n");
@@ -2725,8 +2850,15 @@ int cmd_stat(int argc, const char **argv)
2725 * Initialize thread_map with comm names, 2850 * Initialize thread_map with comm names,
2726 * so we could print it out on output. 2851 * so we could print it out on output.
2727 */ 2852 */
2728 if (stat_config.aggr_mode == AGGR_THREAD) 2853 if (stat_config.aggr_mode == AGGR_THREAD) {
2729 thread_map__read_comms(evsel_list->threads); 2854 thread_map__read_comms(evsel_list->threads);
2855 if (target.system_wide) {
2856 if (runtime_stat_new(&stat_config,
2857 thread_map__nr(evsel_list->threads))) {
2858 goto out;
2859 }
2860 }
2861 }
2730 2862
2731 if (interval && interval < 100) { 2863 if (interval && interval < 100) {
2732 if (interval < 10) { 2864 if (interval < 10) {
@@ -2787,7 +2919,7 @@ int cmd_stat(int argc, const char **argv)
2787 * records, but the need to suppress the kptr_restrict messages in older 2919 * records, but the need to suppress the kptr_restrict messages in older
2788 * tools remain -acme 2920 * tools remain -acme
2789 */ 2921 */
2790 int fd = perf_data_file__fd(&perf_stat.file); 2922 int fd = perf_data__fd(&perf_stat.data);
2791 int err = perf_event__synthesize_kernel_mmap((void *)&perf_stat, 2923 int err = perf_event__synthesize_kernel_mmap((void *)&perf_stat,
2792 process_synthesized_event, 2924 process_synthesized_event,
2793 &perf_stat.session->machines.host); 2925 &perf_stat.session->machines.host);
@@ -2801,7 +2933,7 @@ int cmd_stat(int argc, const char **argv)
2801 pr_err("failed to write stat round event\n"); 2933 pr_err("failed to write stat round event\n");
2802 } 2934 }
2803 2935
2804 if (!perf_stat.file.is_pipe) { 2936 if (!perf_stat.data.is_pipe) {
2805 perf_stat.session->header.data_size += perf_stat.bytes_written; 2937 perf_stat.session->header.data_size += perf_stat.bytes_written;
2806 perf_session__write_header(perf_stat.session, evsel_list, fd, true); 2938 perf_session__write_header(perf_stat.session, evsel_list, fd, true);
2807 } 2939 }
@@ -2816,5 +2948,8 @@ out:
2816 sysfs__write_int(FREEZE_ON_SMI_PATH, 0); 2948 sysfs__write_int(FREEZE_ON_SMI_PATH, 0);
2817 2949
2818 perf_evlist__delete(evsel_list); 2950 perf_evlist__delete(evsel_list);
2951
2952 runtime_stat_delete(&stat_config);
2953
2819 return status; 2954 return status;
2820} 2955}
diff --git a/tools/perf/builtin-timechart.c b/tools/perf/builtin-timechart.c
index 4e2e61695986..813698a9b8c7 100644
--- a/tools/perf/builtin-timechart.c
+++ b/tools/perf/builtin-timechart.c
@@ -1601,13 +1601,15 @@ static int __cmd_timechart(struct timechart *tchart, const char *output_name)
1601 { "syscalls:sys_exit_pselect6", process_exit_poll }, 1601 { "syscalls:sys_exit_pselect6", process_exit_poll },
1602 { "syscalls:sys_exit_select", process_exit_poll }, 1602 { "syscalls:sys_exit_select", process_exit_poll },
1603 }; 1603 };
1604 struct perf_data_file file = { 1604 struct perf_data data = {
1605 .path = input_name, 1605 .file = {
1606 .mode = PERF_DATA_MODE_READ, 1606 .path = input_name,
1607 .force = tchart->force, 1607 },
1608 .mode = PERF_DATA_MODE_READ,
1609 .force = tchart->force,
1608 }; 1610 };
1609 1611
1610 struct perf_session *session = perf_session__new(&file, false, 1612 struct perf_session *session = perf_session__new(&data, false,
1611 &tchart->tool); 1613 &tchart->tool);
1612 int ret = -EINVAL; 1614 int ret = -EINVAL;
1613 1615
@@ -1617,7 +1619,7 @@ static int __cmd_timechart(struct timechart *tchart, const char *output_name)
1617 symbol__init(&session->header.env); 1619 symbol__init(&session->header.env);
1618 1620
1619 (void)perf_header__process_sections(&session->header, 1621 (void)perf_header__process_sections(&session->header,
1620 perf_data_file__fd(session->file), 1622 perf_data__fd(session->data),
1621 tchart, 1623 tchart,
1622 process_header); 1624 process_header);
1623 1625
@@ -1732,8 +1734,10 @@ static int timechart__io_record(int argc, const char **argv)
1732 if (rec_argv == NULL) 1734 if (rec_argv == NULL)
1733 return -ENOMEM; 1735 return -ENOMEM;
1734 1736
1735 if (asprintf(&filter, "common_pid != %d", getpid()) < 0) 1737 if (asprintf(&filter, "common_pid != %d", getpid()) < 0) {
1738 free(rec_argv);
1736 return -ENOMEM; 1739 return -ENOMEM;
1740 }
1737 1741
1738 p = rec_argv; 1742 p = rec_argv;
1739 for (i = 0; i < common_args_nr; i++) 1743 for (i = 0; i < common_args_nr; i++)
diff --git a/tools/perf/builtin-top.c b/tools/perf/builtin-top.c
index ee954bde7e3e..b7c823ba8374 100644
--- a/tools/perf/builtin-top.c
+++ b/tools/perf/builtin-top.c
@@ -77,6 +77,7 @@
77#include "sane_ctype.h" 77#include "sane_ctype.h"
78 78
79static volatile int done; 79static volatile int done;
80static volatile int resize;
80 81
81#define HEADER_LINE_NR 5 82#define HEADER_LINE_NR 5
82 83
@@ -85,17 +86,20 @@ static void perf_top__update_print_entries(struct perf_top *top)
85 top->print_entries = top->winsize.ws_row - HEADER_LINE_NR; 86 top->print_entries = top->winsize.ws_row - HEADER_LINE_NR;
86} 87}
87 88
88static void perf_top__sig_winch(int sig __maybe_unused, 89static void winch_sig(int sig __maybe_unused)
89 siginfo_t *info __maybe_unused, void *arg)
90{ 90{
91 struct perf_top *top = arg; 91 resize = 1;
92}
92 93
94static void perf_top__resize(struct perf_top *top)
95{
93 get_term_dimensions(&top->winsize); 96 get_term_dimensions(&top->winsize);
94 perf_top__update_print_entries(top); 97 perf_top__update_print_entries(top);
95} 98}
96 99
97static int perf_top__parse_source(struct perf_top *top, struct hist_entry *he) 100static int perf_top__parse_source(struct perf_top *top, struct hist_entry *he)
98{ 101{
102 struct perf_evsel *evsel = hists_to_evsel(he->hists);
99 struct symbol *sym; 103 struct symbol *sym;
100 struct annotation *notes; 104 struct annotation *notes;
101 struct map *map; 105 struct map *map;
@@ -134,7 +138,7 @@ static int perf_top__parse_source(struct perf_top *top, struct hist_entry *he)
134 return err; 138 return err;
135 } 139 }
136 140
137 err = symbol__disassemble(sym, map, NULL, 0, NULL, NULL); 141 err = symbol__annotate(sym, map, evsel, 0, NULL);
138 if (err == 0) { 142 if (err == 0) {
139out_assign: 143out_assign:
140 top->sym_filter_entry = he; 144 top->sym_filter_entry = he;
@@ -226,6 +230,7 @@ static void perf_top__record_precise_ip(struct perf_top *top,
226static void perf_top__show_details(struct perf_top *top) 230static void perf_top__show_details(struct perf_top *top)
227{ 231{
228 struct hist_entry *he = top->sym_filter_entry; 232 struct hist_entry *he = top->sym_filter_entry;
233 struct perf_evsel *evsel = hists_to_evsel(he->hists);
229 struct annotation *notes; 234 struct annotation *notes;
230 struct symbol *symbol; 235 struct symbol *symbol;
231 int more; 236 int more;
@@ -238,6 +243,8 @@ static void perf_top__show_details(struct perf_top *top)
238 243
239 pthread_mutex_lock(&notes->lock); 244 pthread_mutex_lock(&notes->lock);
240 245
246 symbol__calc_percent(symbol, evsel);
247
241 if (notes->src == NULL) 248 if (notes->src == NULL)
242 goto out_unlock; 249 goto out_unlock;
243 250
@@ -276,8 +283,9 @@ static void perf_top__print_sym_table(struct perf_top *top)
276 283
277 printf("%-*.*s\n", win_width, win_width, graph_dotted_line); 284 printf("%-*.*s\n", win_width, win_width, graph_dotted_line);
278 285
279 if (hists->stats.nr_lost_warned != 286 if (!top->record_opts.overwrite &&
280 hists->stats.nr_events[PERF_RECORD_LOST]) { 287 (hists->stats.nr_lost_warned !=
288 hists->stats.nr_events[PERF_RECORD_LOST])) {
281 hists->stats.nr_lost_warned = 289 hists->stats.nr_lost_warned =
282 hists->stats.nr_events[PERF_RECORD_LOST]; 290 hists->stats.nr_events[PERF_RECORD_LOST];
283 color_fprintf(stdout, PERF_COLOR_RED, 291 color_fprintf(stdout, PERF_COLOR_RED,
@@ -409,7 +417,7 @@ static void perf_top__print_mapped_keys(struct perf_top *top)
409 fprintf(stdout, "\t[S] stop annotation.\n"); 417 fprintf(stdout, "\t[S] stop annotation.\n");
410 418
411 fprintf(stdout, 419 fprintf(stdout,
412 "\t[K] hide kernel_symbols symbols. \t(%s)\n", 420 "\t[K] hide kernel symbols. \t(%s)\n",
413 top->hide_kernel_symbols ? "yes" : "no"); 421 top->hide_kernel_symbols ? "yes" : "no");
414 fprintf(stdout, 422 fprintf(stdout,
415 "\t[U] hide user symbols. \t(%s)\n", 423 "\t[U] hide user symbols. \t(%s)\n",
@@ -473,12 +481,8 @@ static bool perf_top__handle_keypress(struct perf_top *top, int c)
473 case 'e': 481 case 'e':
474 prompt_integer(&top->print_entries, "Enter display entries (lines)"); 482 prompt_integer(&top->print_entries, "Enter display entries (lines)");
475 if (top->print_entries == 0) { 483 if (top->print_entries == 0) {
476 struct sigaction act = { 484 perf_top__resize(top);
477 .sa_sigaction = perf_top__sig_winch, 485 signal(SIGWINCH, winch_sig);
478 .sa_flags = SA_SIGINFO,
479 };
480 perf_top__sig_winch(SIGWINCH, NULL, top);
481 sigaction(SIGWINCH, &act, NULL);
482 } else { 486 } else {
483 signal(SIGWINCH, SIG_DFL); 487 signal(SIGWINCH, SIG_DFL);
484 } 488 }
@@ -608,7 +612,8 @@ static void *display_thread_tui(void *arg)
608 612
609 perf_evlist__tui_browse_hists(top->evlist, help, &hbt, 613 perf_evlist__tui_browse_hists(top->evlist, help, &hbt,
610 top->min_percent, 614 top->min_percent,
611 &top->session->header.env); 615 &top->session->header.env,
616 !top->record_opts.overwrite);
612 617
613 done = 1; 618 done = 1;
614 return NULL; 619 return NULL;
@@ -732,14 +737,16 @@ static void perf_event__process_sample(struct perf_tool *tool,
732 if (!machine->kptr_restrict_warned && 737 if (!machine->kptr_restrict_warned &&
733 symbol_conf.kptr_restrict && 738 symbol_conf.kptr_restrict &&
734 al.cpumode == PERF_RECORD_MISC_KERNEL) { 739 al.cpumode == PERF_RECORD_MISC_KERNEL) {
735 ui__warning( 740 if (!perf_evlist__exclude_kernel(top->session->evlist)) {
741 ui__warning(
736"Kernel address maps (/proc/{kallsyms,modules}) are restricted.\n\n" 742"Kernel address maps (/proc/{kallsyms,modules}) are restricted.\n\n"
737"Check /proc/sys/kernel/kptr_restrict.\n\n" 743"Check /proc/sys/kernel/kptr_restrict.\n\n"
738"Kernel%s samples will not be resolved.\n", 744"Kernel%s samples will not be resolved.\n",
739 al.map && !RB_EMPTY_ROOT(&al.map->dso->symbols[MAP__FUNCTION]) ? 745 al.map && !RB_EMPTY_ROOT(&al.map->dso->symbols[MAP__FUNCTION]) ?
740 " modules" : ""); 746 " modules" : "");
741 if (use_browser <= 0) 747 if (use_browser <= 0)
742 sleep(5); 748 sleep(5);
749 }
743 machine->kptr_restrict_warned = true; 750 machine->kptr_restrict_warned = true;
744 } 751 }
745 752
@@ -802,15 +809,23 @@ static void perf_event__process_sample(struct perf_tool *tool,
802 809
803static void perf_top__mmap_read_idx(struct perf_top *top, int idx) 810static void perf_top__mmap_read_idx(struct perf_top *top, int idx)
804{ 811{
812 struct record_opts *opts = &top->record_opts;
813 struct perf_evlist *evlist = top->evlist;
805 struct perf_sample sample; 814 struct perf_sample sample;
806 struct perf_evsel *evsel; 815 struct perf_evsel *evsel;
816 struct perf_mmap *md;
807 struct perf_session *session = top->session; 817 struct perf_session *session = top->session;
808 union perf_event *event; 818 union perf_event *event;
809 struct machine *machine; 819 struct machine *machine;
820 u64 end, start;
810 int ret; 821 int ret;
811 822
812 while ((event = perf_evlist__mmap_read(top->evlist, idx)) != NULL) { 823 md = opts->overwrite ? &evlist->overwrite_mmap[idx] : &evlist->mmap[idx];
813 ret = perf_evlist__parse_sample(top->evlist, event, &sample); 824 if (perf_mmap__read_init(md, opts->overwrite, &start, &end) < 0)
825 return;
826
827 while ((event = perf_mmap__read_event(md, opts->overwrite, &start, end)) != NULL) {
828 ret = perf_evlist__parse_sample(evlist, event, &sample);
814 if (ret) { 829 if (ret) {
815 pr_err("Can't parse sample, err = %d\n", ret); 830 pr_err("Can't parse sample, err = %d\n", ret);
816 goto next_event; 831 goto next_event;
@@ -864,16 +879,120 @@ static void perf_top__mmap_read_idx(struct perf_top *top, int idx)
864 } else 879 } else
865 ++session->evlist->stats.nr_unknown_events; 880 ++session->evlist->stats.nr_unknown_events;
866next_event: 881next_event:
867 perf_evlist__mmap_consume(top->evlist, idx); 882 perf_mmap__consume(md, opts->overwrite);
868 } 883 }
884
885 perf_mmap__read_done(md);
869} 886}
870 887
871static void perf_top__mmap_read(struct perf_top *top) 888static void perf_top__mmap_read(struct perf_top *top)
872{ 889{
890 bool overwrite = top->record_opts.overwrite;
891 struct perf_evlist *evlist = top->evlist;
892 unsigned long long start, end;
873 int i; 893 int i;
874 894
895 start = rdclock();
896 if (overwrite)
897 perf_evlist__toggle_bkw_mmap(evlist, BKW_MMAP_DATA_PENDING);
898
875 for (i = 0; i < top->evlist->nr_mmaps; i++) 899 for (i = 0; i < top->evlist->nr_mmaps; i++)
876 perf_top__mmap_read_idx(top, i); 900 perf_top__mmap_read_idx(top, i);
901
902 if (overwrite) {
903 perf_evlist__toggle_bkw_mmap(evlist, BKW_MMAP_EMPTY);
904 perf_evlist__toggle_bkw_mmap(evlist, BKW_MMAP_RUNNING);
905 }
906 end = rdclock();
907
908 if ((end - start) > (unsigned long long)top->delay_secs * NSEC_PER_SEC)
909 ui__warning("Too slow to read ring buffer.\n"
910 "Please try increasing the period (-c) or\n"
911 "decreasing the freq (-F) or\n"
912 "limiting the number of CPUs (-C)\n");
913}
914
915/*
916 * Check per-event overwrite term.
917 * perf top should support consistent term for all events.
918 * - All events don't have per-event term
919 * E.g. "cpu/cpu-cycles/,cpu/instructions/"
920 * Nothing change, return 0.
921 * - All events have same per-event term
922 * E.g. "cpu/cpu-cycles,no-overwrite/,cpu/instructions,no-overwrite/
923 * Using the per-event setting to replace the opts->overwrite if
924 * they are different, then return 0.
925 * - Events have different per-event term
926 * E.g. "cpu/cpu-cycles,overwrite/,cpu/instructions,no-overwrite/"
927 * Return -1
928 * - Some of the event set per-event term, but some not.
929 * E.g. "cpu/cpu-cycles/,cpu/instructions,no-overwrite/"
930 * Return -1
931 */
932static int perf_top__overwrite_check(struct perf_top *top)
933{
934 struct record_opts *opts = &top->record_opts;
935 struct perf_evlist *evlist = top->evlist;
936 struct perf_evsel_config_term *term;
937 struct list_head *config_terms;
938 struct perf_evsel *evsel;
939 int set, overwrite = -1;
940
941 evlist__for_each_entry(evlist, evsel) {
942 set = -1;
943 config_terms = &evsel->config_terms;
944 list_for_each_entry(term, config_terms, list) {
945 if (term->type == PERF_EVSEL__CONFIG_TERM_OVERWRITE)
946 set = term->val.overwrite ? 1 : 0;
947 }
948
949 /* no term for current and previous event (likely) */
950 if ((overwrite < 0) && (set < 0))
951 continue;
952
953 /* has term for both current and previous event, compare */
954 if ((overwrite >= 0) && (set >= 0) && (overwrite != set))
955 return -1;
956
957 /* no term for current event but has term for previous one */
958 if ((overwrite >= 0) && (set < 0))
959 return -1;
960
961 /* has term for current event */
962 if ((overwrite < 0) && (set >= 0)) {
963 /* if it's first event, set overwrite */
964 if (evsel == perf_evlist__first(evlist))
965 overwrite = set;
966 else
967 return -1;
968 }
969 }
970
971 if ((overwrite >= 0) && (opts->overwrite != overwrite))
972 opts->overwrite = overwrite;
973
974 return 0;
975}
976
977static int perf_top_overwrite_fallback(struct perf_top *top,
978 struct perf_evsel *evsel)
979{
980 struct record_opts *opts = &top->record_opts;
981 struct perf_evlist *evlist = top->evlist;
982 struct perf_evsel *counter;
983
984 if (!opts->overwrite)
985 return 0;
986
987 /* only fall back when first event fails */
988 if (evsel != perf_evlist__first(evlist))
989 return 0;
990
991 evlist__for_each_entry(evlist, counter)
992 counter->attr.write_backward = false;
993 opts->overwrite = false;
994 ui__warning("fall back to non-overwrite mode\n");
995 return 1;
877} 996}
878 997
879static int perf_top__start_counters(struct perf_top *top) 998static int perf_top__start_counters(struct perf_top *top)
@@ -883,12 +1002,33 @@ static int perf_top__start_counters(struct perf_top *top)
883 struct perf_evlist *evlist = top->evlist; 1002 struct perf_evlist *evlist = top->evlist;
884 struct record_opts *opts = &top->record_opts; 1003 struct record_opts *opts = &top->record_opts;
885 1004
1005 if (perf_top__overwrite_check(top)) {
1006 ui__error("perf top only support consistent per-event "
1007 "overwrite setting for all events\n");
1008 goto out_err;
1009 }
1010
886 perf_evlist__config(evlist, opts, &callchain_param); 1011 perf_evlist__config(evlist, opts, &callchain_param);
887 1012
888 evlist__for_each_entry(evlist, counter) { 1013 evlist__for_each_entry(evlist, counter) {
889try_again: 1014try_again:
890 if (perf_evsel__open(counter, top->evlist->cpus, 1015 if (perf_evsel__open(counter, top->evlist->cpus,
891 top->evlist->threads) < 0) { 1016 top->evlist->threads) < 0) {
1017
1018 /*
1019 * Specially handle overwrite fall back.
1020 * Because perf top is the only tool which has
1021 * overwrite mode by default, support
1022 * both overwrite and non-overwrite mode, and
1023 * require consistent mode for all events.
1024 *
1025 * May move it to generic code with more tools
1026 * have similar attribute.
1027 */
1028 if (perf_missing_features.write_backward &&
1029 perf_top_overwrite_fallback(top, counter))
1030 goto try_again;
1031
892 if (perf_evsel__fallback(counter, errno, msg, sizeof(msg))) { 1032 if (perf_evsel__fallback(counter, errno, msg, sizeof(msg))) {
893 if (verbose > 0) 1033 if (verbose > 0)
894 ui__warning("%s\n", msg); 1034 ui__warning("%s\n", msg);
@@ -902,7 +1042,7 @@ try_again:
902 } 1042 }
903 } 1043 }
904 1044
905 if (perf_evlist__mmap(evlist, opts->mmap_pages, false) < 0) { 1045 if (perf_evlist__mmap(evlist, opts->mmap_pages) < 0) {
906 ui__error("Failed to mmap with %d (%s)\n", 1046 ui__error("Failed to mmap with %d (%s)\n",
907 errno, str_error_r(errno, msg, sizeof(msg))); 1047 errno, str_error_r(errno, msg, sizeof(msg)));
908 goto out_err; 1048 goto out_err;
@@ -958,8 +1098,16 @@ static int __cmd_top(struct perf_top *top)
958 if (perf_session__register_idle_thread(top->session) < 0) 1098 if (perf_session__register_idle_thread(top->session) < 0)
959 goto out_delete; 1099 goto out_delete;
960 1100
1101 if (top->nr_threads_synthesize > 1)
1102 perf_set_multithreaded();
1103
961 machine__synthesize_threads(&top->session->machines.host, &opts->target, 1104 machine__synthesize_threads(&top->session->machines.host, &opts->target,
962 top->evlist->threads, false, opts->proc_map_timeout); 1105 top->evlist->threads, false,
1106 opts->proc_map_timeout,
1107 top->nr_threads_synthesize);
1108
1109 if (top->nr_threads_synthesize > 1)
1110 perf_set_singlethreaded();
963 1111
964 if (perf_hpp_list.socket) { 1112 if (perf_hpp_list.socket) {
965 ret = perf_env__read_cpu_topology_map(&perf_env); 1113 ret = perf_env__read_cpu_topology_map(&perf_env);
@@ -1020,8 +1168,13 @@ static int __cmd_top(struct perf_top *top)
1020 1168
1021 perf_top__mmap_read(top); 1169 perf_top__mmap_read(top);
1022 1170
1023 if (hits == top->samples) 1171 if (opts->overwrite || (hits == top->samples))
1024 ret = perf_evlist__poll(top->evlist, 100); 1172 ret = perf_evlist__poll(top->evlist, 100);
1173
1174 if (resize) {
1175 perf_top__resize(top);
1176 resize = 0;
1177 }
1025 } 1178 }
1026 1179
1027 ret = 0; 1180 ret = 0;
@@ -1109,9 +1262,11 @@ int cmd_top(int argc, const char **argv)
1109 .uses_mmap = true, 1262 .uses_mmap = true,
1110 }, 1263 },
1111 .proc_map_timeout = 500, 1264 .proc_map_timeout = 500,
1265 .overwrite = 1,
1112 }, 1266 },
1113 .max_stack = sysctl_perf_event_max_stack, 1267 .max_stack = sysctl_perf_event_max_stack,
1114 .sym_pcnt_filter = 5, 1268 .sym_pcnt_filter = 5,
1269 .nr_threads_synthesize = UINT_MAX,
1115 }; 1270 };
1116 struct record_opts *opts = &top.record_opts; 1271 struct record_opts *opts = &top.record_opts;
1117 struct target *target = &opts->target; 1272 struct target *target = &opts->target;
@@ -1221,6 +1376,8 @@ int cmd_top(int argc, const char **argv)
1221 OPT_BOOLEAN(0, "hierarchy", &symbol_conf.report_hierarchy, 1376 OPT_BOOLEAN(0, "hierarchy", &symbol_conf.report_hierarchy,
1222 "Show entries in a hierarchy"), 1377 "Show entries in a hierarchy"),
1223 OPT_BOOLEAN(0, "force", &symbol_conf.force, "don't complain, do it"), 1378 OPT_BOOLEAN(0, "force", &symbol_conf.force, "don't complain, do it"),
1379 OPT_UINTEGER(0, "num-thread-synthesize", &top.nr_threads_synthesize,
1380 "number of thread to run event synthesize"),
1224 OPT_END() 1381 OPT_END()
1225 }; 1382 };
1226 const char * const top_usage[] = { 1383 const char * const top_usage[] = {
@@ -1341,12 +1498,8 @@ int cmd_top(int argc, const char **argv)
1341 1498
1342 get_term_dimensions(&top.winsize); 1499 get_term_dimensions(&top.winsize);
1343 if (top.print_entries == 0) { 1500 if (top.print_entries == 0) {
1344 struct sigaction act = {
1345 .sa_sigaction = perf_top__sig_winch,
1346 .sa_flags = SA_SIGINFO,
1347 };
1348 perf_top__update_print_entries(&top); 1501 perf_top__update_print_entries(&top);
1349 sigaction(SIGWINCH, &act, NULL); 1502 signal(SIGWINCH, winch_sig);
1350 } 1503 }
1351 1504
1352 status = __cmd_top(&top); 1505 status = __cmd_top(&top);
diff --git a/tools/perf/builtin-trace.c b/tools/perf/builtin-trace.c
index 771ddab94bb0..e7f1b182fc15 100644
--- a/tools/perf/builtin-trace.c
+++ b/tools/perf/builtin-trace.c
@@ -21,6 +21,7 @@
21#include "builtin.h" 21#include "builtin.h"
22#include "util/color.h" 22#include "util/color.h"
23#include "util/debug.h" 23#include "util/debug.h"
24#include "util/env.h"
24#include "util/event.h" 25#include "util/event.h"
25#include "util/evlist.h" 26#include "util/evlist.h"
26#include <subcmd/exec-cmd.h> 27#include <subcmd/exec-cmd.h>
@@ -45,18 +46,17 @@
45 46
46#include <errno.h> 47#include <errno.h>
47#include <inttypes.h> 48#include <inttypes.h>
48#include <libaudit.h> /* FIXME: Still needed for audit_errno_to_name */
49#include <poll.h> 49#include <poll.h>
50#include <signal.h> 50#include <signal.h>
51#include <stdlib.h> 51#include <stdlib.h>
52#include <string.h> 52#include <string.h>
53#include <linux/err.h> 53#include <linux/err.h>
54#include <linux/filter.h> 54#include <linux/filter.h>
55#include <linux/audit.h>
56#include <linux/kernel.h> 55#include <linux/kernel.h>
57#include <linux/random.h> 56#include <linux/random.h>
58#include <linux/stringify.h> 57#include <linux/stringify.h>
59#include <linux/time64.h> 58#include <linux/time64.h>
59#include <fcntl.h>
60 60
61#include "sane_ctype.h" 61#include "sane_ctype.h"
62 62
@@ -111,6 +111,7 @@ struct trace {
111 bool summary; 111 bool summary;
112 bool summary_only; 112 bool summary_only;
113 bool show_comm; 113 bool show_comm;
114 bool print_sample;
114 bool show_tool_stats; 115 bool show_tool_stats;
115 bool trace_syscalls; 116 bool trace_syscalls;
116 bool kernel_syscallchains; 117 bool kernel_syscallchains;
@@ -545,9 +546,10 @@ static size_t syscall_arg__scnprintf_getrandom_flags(char *bf, size_t size,
545 { .scnprintf = SCA_STRARRAY, \ 546 { .scnprintf = SCA_STRARRAY, \
546 .parm = &strarray__##array, } 547 .parm = &strarray__##array, }
547 548
549#include "trace/beauty/arch_errno_names.c"
548#include "trace/beauty/eventfd.c" 550#include "trace/beauty/eventfd.c"
549#include "trace/beauty/flock.c"
550#include "trace/beauty/futex_op.c" 551#include "trace/beauty/futex_op.c"
552#include "trace/beauty/futex_val3.c"
551#include "trace/beauty/mmap.c" 553#include "trace/beauty/mmap.c"
552#include "trace/beauty/mode_t.c" 554#include "trace/beauty/mode_t.c"
553#include "trace/beauty/msg_flags.c" 555#include "trace/beauty/msg_flags.c"
@@ -578,7 +580,6 @@ static struct syscall_fmt {
578} syscall_fmts[] = { 580} syscall_fmts[] = {
579 { .name = "access", 581 { .name = "access",
580 .arg = { [1] = { .scnprintf = SCA_ACCMODE, /* mode */ }, }, }, 582 .arg = { [1] = { .scnprintf = SCA_ACCMODE, /* mode */ }, }, },
581 { .name = "arch_prctl", .alias = "prctl", },
582 { .name = "bpf", 583 { .name = "bpf",
583 .arg = { [0] = STRARRAY(cmd, bpf_cmd), }, }, 584 .arg = { [0] = STRARRAY(cmd, bpf_cmd), }, },
584 { .name = "brk", .hexret = true, 585 { .name = "brk", .hexret = true,
@@ -611,7 +612,8 @@ static struct syscall_fmt {
611 { .name = "fstat", .alias = "newfstat", }, 612 { .name = "fstat", .alias = "newfstat", },
612 { .name = "fstatat", .alias = "newfstatat", }, 613 { .name = "fstatat", .alias = "newfstatat", },
613 { .name = "futex", 614 { .name = "futex",
614 .arg = { [1] = { .scnprintf = SCA_FUTEX_OP, /* op */ }, }, }, 615 .arg = { [1] = { .scnprintf = SCA_FUTEX_OP, /* op */ },
616 [5] = { .scnprintf = SCA_FUTEX_VAL3, /* val3 */ }, }, },
615 { .name = "futimesat", 617 { .name = "futimesat",
616 .arg = { [0] = { .scnprintf = SCA_FDAT, /* fd */ }, }, }, 618 .arg = { [0] = { .scnprintf = SCA_FDAT, /* fd */ }, }, },
617 { .name = "getitimer", 619 { .name = "getitimer",
@@ -623,6 +625,7 @@ static struct syscall_fmt {
623 .arg = { [2] = { .scnprintf = SCA_GETRANDOM_FLAGS, /* flags */ }, }, }, 625 .arg = { [2] = { .scnprintf = SCA_GETRANDOM_FLAGS, /* flags */ }, }, },
624 { .name = "getrlimit", 626 { .name = "getrlimit",
625 .arg = { [0] = STRARRAY(resource, rlimit_resources), }, }, 627 .arg = { [0] = STRARRAY(resource, rlimit_resources), }, },
628 { .name = "gettid", .errpid = true, },
626 { .name = "ioctl", 629 { .name = "ioctl",
627 .arg = { 630 .arg = {
628#if defined(__i386__) || defined(__x86_64__) 631#if defined(__i386__) || defined(__x86_64__)
@@ -634,6 +637,12 @@ static struct syscall_fmt {
634#else 637#else
635 [2] = { .scnprintf = SCA_HEX, /* arg */ }, }, }, 638 [2] = { .scnprintf = SCA_HEX, /* arg */ }, }, },
636#endif 639#endif
640 { .name = "kcmp", .nr_args = 5,
641 .arg = { [0] = { .name = "pid1", .scnprintf = SCA_PID, },
642 [1] = { .name = "pid2", .scnprintf = SCA_PID, },
643 [2] = { .name = "type", .scnprintf = SCA_KCMP_TYPE, },
644 [3] = { .name = "idx1", .scnprintf = SCA_KCMP_IDX, },
645 [4] = { .name = "idx2", .scnprintf = SCA_KCMP_IDX, }, }, },
637 { .name = "keyctl", 646 { .name = "keyctl",
638 .arg = { [0] = STRARRAY(option, keyctl_options), }, }, 647 .arg = { [0] = STRARRAY(option, keyctl_options), }, },
639 { .name = "kill", 648 { .name = "kill",
@@ -703,6 +712,10 @@ static struct syscall_fmt {
703 [3] = { .scnprintf = SCA_INT, /* pkey */ }, }, }, 712 [3] = { .scnprintf = SCA_INT, /* pkey */ }, }, },
704 { .name = "poll", .timeout = true, }, 713 { .name = "poll", .timeout = true, },
705 { .name = "ppoll", .timeout = true, }, 714 { .name = "ppoll", .timeout = true, },
715 { .name = "prctl", .alias = "arch_prctl",
716 .arg = { [0] = { .scnprintf = SCA_PRCTL_OPTION, /* option */ },
717 [1] = { .scnprintf = SCA_PRCTL_ARG2, /* arg2 */ },
718 [2] = { .scnprintf = SCA_PRCTL_ARG3, /* arg3 */ }, }, },
706 { .name = "pread", .alias = "pread64", }, 719 { .name = "pread", .alias = "pread64", },
707 { .name = "preadv", .alias = "pread", }, 720 { .name = "preadv", .alias = "pread", },
708 { .name = "prlimit64", 721 { .name = "prlimit64",
@@ -810,7 +823,7 @@ static size_t fprintf_duration(unsigned long t, bool calculated, FILE *fp)
810 size_t printed = fprintf(fp, "("); 823 size_t printed = fprintf(fp, "(");
811 824
812 if (!calculated) 825 if (!calculated)
813 printed += fprintf(fp, " ? "); 826 printed += fprintf(fp, " ");
814 else if (duration >= 1.0) 827 else if (duration >= 1.0)
815 printed += color_fprintf(fp, PERF_COLOR_RED, "%6.3f ms", duration); 828 printed += color_fprintf(fp, PERF_COLOR_RED, "%6.3f ms", duration);
816 else if (duration >= 0.01) 829 else if (duration >= 0.01)
@@ -985,6 +998,23 @@ size_t syscall_arg__scnprintf_fd(char *bf, size_t size, struct syscall_arg *arg)
985 return printed; 998 return printed;
986} 999}
987 1000
1001size_t pid__scnprintf_fd(struct trace *trace, pid_t pid, int fd, char *bf, size_t size)
1002{
1003 size_t printed = scnprintf(bf, size, "%d", fd);
1004 struct thread *thread = machine__find_thread(trace->host, pid, pid);
1005
1006 if (thread) {
1007 const char *path = thread__fd_path(thread, fd, trace);
1008
1009 if (path)
1010 printed += scnprintf(bf + printed, size - printed, "<%s>", path);
1011
1012 thread__put(thread);
1013 }
1014
1015 return printed;
1016}
1017
988static size_t syscall_arg__scnprintf_close_fd(char *bf, size_t size, 1018static size_t syscall_arg__scnprintf_close_fd(char *bf, size_t size,
989 struct syscall_arg *arg) 1019 struct syscall_arg *arg)
990{ 1020{
@@ -1126,18 +1156,28 @@ static int trace__symbols_init(struct trace *trace, struct perf_evlist *evlist)
1126 if (trace->host == NULL) 1156 if (trace->host == NULL)
1127 return -ENOMEM; 1157 return -ENOMEM;
1128 1158
1129 if (trace_event__register_resolver(trace->host, trace__machine__resolve_kernel_addr) < 0) 1159 err = trace_event__register_resolver(trace->host, trace__machine__resolve_kernel_addr);
1130 return -errno; 1160 if (err < 0)
1161 goto out;
1131 1162
1132 err = __machine__synthesize_threads(trace->host, &trace->tool, &trace->opts.target, 1163 err = __machine__synthesize_threads(trace->host, &trace->tool, &trace->opts.target,
1133 evlist->threads, trace__tool_process, false, 1164 evlist->threads, trace__tool_process, false,
1134 trace->opts.proc_map_timeout); 1165 trace->opts.proc_map_timeout, 1);
1166out:
1135 if (err) 1167 if (err)
1136 symbol__exit(); 1168 symbol__exit();
1137 1169
1138 return err; 1170 return err;
1139} 1171}
1140 1172
1173static void trace__symbols__exit(struct trace *trace)
1174{
1175 machine__exit(trace->host);
1176 trace->host = NULL;
1177
1178 symbol__exit();
1179}
1180
1141static int syscall__alloc_arg_fmts(struct syscall *sc, int nr_args) 1181static int syscall__alloc_arg_fmts(struct syscall *sc, int nr_args)
1142{ 1182{
1143 int idx; 1183 int idx;
@@ -1518,10 +1558,9 @@ static void thread__update_stats(struct thread_trace *ttrace,
1518 update_stats(stats, duration); 1558 update_stats(stats, duration);
1519} 1559}
1520 1560
1521static int trace__printf_interrupted_entry(struct trace *trace, struct perf_sample *sample) 1561static int trace__printf_interrupted_entry(struct trace *trace)
1522{ 1562{
1523 struct thread_trace *ttrace; 1563 struct thread_trace *ttrace;
1524 u64 duration;
1525 size_t printed; 1564 size_t printed;
1526 1565
1527 if (trace->current == NULL) 1566 if (trace->current == NULL)
@@ -1532,15 +1571,30 @@ static int trace__printf_interrupted_entry(struct trace *trace, struct perf_samp
1532 if (!ttrace->entry_pending) 1571 if (!ttrace->entry_pending)
1533 return 0; 1572 return 0;
1534 1573
1535 duration = sample->time - ttrace->entry_time; 1574 printed = trace__fprintf_entry_head(trace, trace->current, 0, false, ttrace->entry_time, trace->output);
1536
1537 printed = trace__fprintf_entry_head(trace, trace->current, duration, true, ttrace->entry_time, trace->output);
1538 printed += fprintf(trace->output, "%-70s) ...\n", ttrace->entry_str); 1575 printed += fprintf(trace->output, "%-70s) ...\n", ttrace->entry_str);
1539 ttrace->entry_pending = false; 1576 ttrace->entry_pending = false;
1540 1577
1541 return printed; 1578 return printed;
1542} 1579}
1543 1580
1581static int trace__fprintf_sample(struct trace *trace, struct perf_evsel *evsel,
1582 struct perf_sample *sample, struct thread *thread)
1583{
1584 int printed = 0;
1585
1586 if (trace->print_sample) {
1587 double ts = (double)sample->time / NSEC_PER_MSEC;
1588
1589 printed += fprintf(trace->output, "%22s %10.3f %s %d/%d [%d]\n",
1590 perf_evsel__name(evsel), ts,
1591 thread__comm_str(thread),
1592 sample->pid, sample->tid, sample->cpu);
1593 }
1594
1595 return printed;
1596}
1597
1544static int trace__sys_enter(struct trace *trace, struct perf_evsel *evsel, 1598static int trace__sys_enter(struct trace *trace, struct perf_evsel *evsel,
1545 union perf_event *event __maybe_unused, 1599 union perf_event *event __maybe_unused,
1546 struct perf_sample *sample) 1600 struct perf_sample *sample)
@@ -1561,6 +1615,8 @@ static int trace__sys_enter(struct trace *trace, struct perf_evsel *evsel,
1561 if (ttrace == NULL) 1615 if (ttrace == NULL)
1562 goto out_put; 1616 goto out_put;
1563 1617
1618 trace__fprintf_sample(trace, evsel, sample, thread);
1619
1564 args = perf_evsel__sc_tp_ptr(evsel, args, sample); 1620 args = perf_evsel__sc_tp_ptr(evsel, args, sample);
1565 1621
1566 if (ttrace->entry_str == NULL) { 1622 if (ttrace->entry_str == NULL) {
@@ -1570,7 +1626,7 @@ static int trace__sys_enter(struct trace *trace, struct perf_evsel *evsel,
1570 } 1626 }
1571 1627
1572 if (!(trace->duration_filter || trace->summary_only || trace->min_stack)) 1628 if (!(trace->duration_filter || trace->summary_only || trace->min_stack))
1573 trace__printf_interrupted_entry(trace, sample); 1629 trace__printf_interrupted_entry(trace);
1574 1630
1575 ttrace->entry_time = sample->time; 1631 ttrace->entry_time = sample->time;
1576 msg = ttrace->entry_str; 1632 msg = ttrace->entry_str;
@@ -1605,9 +1661,12 @@ static int trace__resolve_callchain(struct trace *trace, struct perf_evsel *evse
1605 struct callchain_cursor *cursor) 1661 struct callchain_cursor *cursor)
1606{ 1662{
1607 struct addr_location al; 1663 struct addr_location al;
1664 int max_stack = evsel->attr.sample_max_stack ?
1665 evsel->attr.sample_max_stack :
1666 trace->max_stack;
1608 1667
1609 if (machine__resolve(trace->host, &al, sample) < 0 || 1668 if (machine__resolve(trace->host, &al, sample) < 0 ||
1610 thread__resolve_callchain(al.thread, cursor, evsel, sample, NULL, NULL, trace->max_stack)) 1669 thread__resolve_callchain(al.thread, cursor, evsel, sample, NULL, NULL, max_stack))
1611 return -1; 1670 return -1;
1612 1671
1613 return 0; 1672 return 0;
@@ -1623,6 +1682,14 @@ static int trace__fprintf_callchain(struct trace *trace, struct perf_sample *sam
1623 return sample__fprintf_callchain(sample, 38, print_opts, &callchain_cursor, trace->output); 1682 return sample__fprintf_callchain(sample, 38, print_opts, &callchain_cursor, trace->output);
1624} 1683}
1625 1684
1685static const char *errno_to_name(struct perf_evsel *evsel, int err)
1686{
1687 struct perf_env *env = perf_evsel__env(evsel);
1688 const char *arch_name = perf_env__arch(env);
1689
1690 return arch_syscalls__strerrno(arch_name, err);
1691}
1692
1626static int trace__sys_exit(struct trace *trace, struct perf_evsel *evsel, 1693static int trace__sys_exit(struct trace *trace, struct perf_evsel *evsel,
1627 union perf_event *event __maybe_unused, 1694 union perf_event *event __maybe_unused,
1628 struct perf_sample *sample) 1695 struct perf_sample *sample)
@@ -1643,6 +1710,8 @@ static int trace__sys_exit(struct trace *trace, struct perf_evsel *evsel,
1643 if (ttrace == NULL) 1710 if (ttrace == NULL)
1644 goto out_put; 1711 goto out_put;
1645 1712
1713 trace__fprintf_sample(trace, evsel, sample, thread);
1714
1646 if (trace->summary) 1715 if (trace->summary)
1647 thread__update_stats(ttrace, id, sample); 1716 thread__update_stats(ttrace, id, sample);
1648 1717
@@ -1693,7 +1762,7 @@ signed_print:
1693errno_print: { 1762errno_print: {
1694 char bf[STRERR_BUFSIZE]; 1763 char bf[STRERR_BUFSIZE];
1695 const char *emsg = str_error_r(-ret, bf, sizeof(bf)), 1764 const char *emsg = str_error_r(-ret, bf, sizeof(bf)),
1696 *e = audit_errno_to_name(-ret); 1765 *e = errno_to_name(evsel, -ret);
1697 1766
1698 fprintf(trace->output, ") = -1 %s %s", e, emsg); 1767 fprintf(trace->output, ") = -1 %s %s", e, emsg);
1699 } 1768 }
@@ -1828,16 +1897,14 @@ out_dump:
1828 goto out_put; 1897 goto out_put;
1829} 1898}
1830 1899
1831static void bpf_output__printer(enum binary_printer_ops op, 1900static int bpf_output__printer(enum binary_printer_ops op,
1832 unsigned int val, void *extra) 1901 unsigned int val, void *extra __maybe_unused, FILE *fp)
1833{ 1902{
1834 FILE *output = extra;
1835 unsigned char ch = (unsigned char)val; 1903 unsigned char ch = (unsigned char)val;
1836 1904
1837 switch (op) { 1905 switch (op) {
1838 case BINARY_PRINT_CHAR_DATA: 1906 case BINARY_PRINT_CHAR_DATA:
1839 fprintf(output, "%c", isprint(ch) ? ch : '.'); 1907 return fprintf(fp, "%c", isprint(ch) ? ch : '.');
1840 break;
1841 case BINARY_PRINT_DATA_BEGIN: 1908 case BINARY_PRINT_DATA_BEGIN:
1842 case BINARY_PRINT_LINE_BEGIN: 1909 case BINARY_PRINT_LINE_BEGIN:
1843 case BINARY_PRINT_ADDR: 1910 case BINARY_PRINT_ADDR:
@@ -1850,13 +1917,15 @@ static void bpf_output__printer(enum binary_printer_ops op,
1850 default: 1917 default:
1851 break; 1918 break;
1852 } 1919 }
1920
1921 return 0;
1853} 1922}
1854 1923
1855static void bpf_output__fprintf(struct trace *trace, 1924static void bpf_output__fprintf(struct trace *trace,
1856 struct perf_sample *sample) 1925 struct perf_sample *sample)
1857{ 1926{
1858 print_binary(sample->raw_data, sample->raw_size, 8, 1927 binary__fprintf(sample->raw_data, sample->raw_size, 8,
1859 bpf_output__printer, trace->output); 1928 bpf_output__printer, NULL, trace->output);
1860} 1929}
1861 1930
1862static int trace__event_handler(struct trace *trace, struct perf_evsel *evsel, 1931static int trace__event_handler(struct trace *trace, struct perf_evsel *evsel,
@@ -1874,7 +1943,7 @@ static int trace__event_handler(struct trace *trace, struct perf_evsel *evsel,
1874 } 1943 }
1875 } 1944 }
1876 1945
1877 trace__printf_interrupted_entry(trace, sample); 1946 trace__printf_interrupted_entry(trace);
1878 trace__fprintf_tstamp(trace, sample->time, trace->output); 1947 trace__fprintf_tstamp(trace, sample->time, trace->output);
1879 1948
1880 if (trace->trace_syscalls) 1949 if (trace->trace_syscalls)
@@ -2078,6 +2147,7 @@ static int trace__record(struct trace *trace, int argc, const char **argv)
2078 rec_argv[j++] = "syscalls:sys_enter,syscalls:sys_exit"; 2147 rec_argv[j++] = "syscalls:sys_enter,syscalls:sys_exit";
2079 else { 2148 else {
2080 pr_err("Neither raw_syscalls nor syscalls events exist.\n"); 2149 pr_err("Neither raw_syscalls nor syscalls events exist.\n");
2150 free(rec_argv);
2081 return -1; 2151 return -1;
2082 } 2152 }
2083 } 2153 }
@@ -2184,6 +2254,9 @@ static int trace__add_syscall_newtp(struct trace *trace)
2184 if (perf_evsel__init_sc_tp_uint_field(sys_exit, ret)) 2254 if (perf_evsel__init_sc_tp_uint_field(sys_exit, ret))
2185 goto out_delete_sys_exit; 2255 goto out_delete_sys_exit;
2186 2256
2257 perf_evsel__config_callchain(sys_enter, &trace->opts, &callchain_param);
2258 perf_evsel__config_callchain(sys_exit, &trace->opts, &callchain_param);
2259
2187 perf_evlist__add(evlist, sys_enter); 2260 perf_evlist__add(evlist, sys_enter);
2188 perf_evlist__add(evlist, sys_exit); 2261 perf_evlist__add(evlist, sys_exit);
2189 2262
@@ -2280,6 +2353,7 @@ static int trace__run(struct trace *trace, int argc, const char **argv)
2280 pgfault_maj = perf_evsel__new_pgfault(PERF_COUNT_SW_PAGE_FAULTS_MAJ); 2353 pgfault_maj = perf_evsel__new_pgfault(PERF_COUNT_SW_PAGE_FAULTS_MAJ);
2281 if (pgfault_maj == NULL) 2354 if (pgfault_maj == NULL)
2282 goto out_error_mem; 2355 goto out_error_mem;
2356 perf_evsel__config_callchain(pgfault_maj, &trace->opts, &callchain_param);
2283 perf_evlist__add(evlist, pgfault_maj); 2357 perf_evlist__add(evlist, pgfault_maj);
2284 } 2358 }
2285 2359
@@ -2287,6 +2361,7 @@ static int trace__run(struct trace *trace, int argc, const char **argv)
2287 pgfault_min = perf_evsel__new_pgfault(PERF_COUNT_SW_PAGE_FAULTS_MIN); 2361 pgfault_min = perf_evsel__new_pgfault(PERF_COUNT_SW_PAGE_FAULTS_MIN);
2288 if (pgfault_min == NULL) 2362 if (pgfault_min == NULL)
2289 goto out_error_mem; 2363 goto out_error_mem;
2364 perf_evsel__config_callchain(pgfault_min, &trace->opts, &callchain_param);
2290 perf_evlist__add(evlist, pgfault_min); 2365 perf_evlist__add(evlist, pgfault_min);
2291 } 2366 }
2292 2367
@@ -2307,45 +2382,7 @@ static int trace__run(struct trace *trace, int argc, const char **argv)
2307 goto out_delete_evlist; 2382 goto out_delete_evlist;
2308 } 2383 }
2309 2384
2310 perf_evlist__config(evlist, &trace->opts, NULL); 2385 perf_evlist__config(evlist, &trace->opts, &callchain_param);
2311
2312 if (callchain_param.enabled) {
2313 bool use_identifier = false;
2314
2315 if (trace->syscalls.events.sys_exit) {
2316 perf_evsel__config_callchain(trace->syscalls.events.sys_exit,
2317 &trace->opts, &callchain_param);
2318 use_identifier = true;
2319 }
2320
2321 if (pgfault_maj) {
2322 perf_evsel__config_callchain(pgfault_maj, &trace->opts, &callchain_param);
2323 use_identifier = true;
2324 }
2325
2326 if (pgfault_min) {
2327 perf_evsel__config_callchain(pgfault_min, &trace->opts, &callchain_param);
2328 use_identifier = true;
2329 }
2330
2331 if (use_identifier) {
2332 /*
2333 * Now we have evsels with different sample_ids, use
2334 * PERF_SAMPLE_IDENTIFIER to map from sample to evsel
2335 * from a fixed position in each ring buffer record.
2336 *
2337 * As of this the changeset introducing this comment, this
2338 * isn't strictly needed, as the fields that can come before
2339 * PERF_SAMPLE_ID are all used, but we'll probably disable
2340 * some of those for things like copying the payload of
2341 * pointer syscall arguments, and for vfs_getname we don't
2342 * need PERF_SAMPLE_ADDR and PERF_SAMPLE_IP, so do this
2343 * here as a warning we need to use PERF_SAMPLE_IDENTIFIER.
2344 */
2345 perf_evlist__set_sample_bit(evlist, IDENTIFIER);
2346 perf_evlist__reset_sample_bit(evlist, ID);
2347 }
2348 }
2349 2386
2350 signal(SIGCHLD, sig_handler); 2387 signal(SIGCHLD, sig_handler);
2351 signal(SIGINT, sig_handler); 2388 signal(SIGINT, sig_handler);
@@ -2400,7 +2437,7 @@ static int trace__run(struct trace *trace, int argc, const char **argv)
2400 if (err < 0) 2437 if (err < 0)
2401 goto out_error_apply_filters; 2438 goto out_error_apply_filters;
2402 2439
2403 err = perf_evlist__mmap(evlist, trace->opts.mmap_pages, false); 2440 err = perf_evlist__mmap(evlist, trace->opts.mmap_pages);
2404 if (err < 0) 2441 if (err < 0)
2405 goto out_error_mmap; 2442 goto out_error_mmap;
2406 2443
@@ -2418,6 +2455,18 @@ static int trace__run(struct trace *trace, int argc, const char **argv)
2418 trace->multiple_threads = thread_map__pid(evlist->threads, 0) == -1 || 2455 trace->multiple_threads = thread_map__pid(evlist->threads, 0) == -1 ||
2419 evlist->threads->nr > 1 || 2456 evlist->threads->nr > 1 ||
2420 perf_evlist__first(evlist)->attr.inherit; 2457 perf_evlist__first(evlist)->attr.inherit;
2458
2459 /*
2460 * Now that we already used evsel->attr to ask the kernel to setup the
2461 * events, lets reuse evsel->attr.sample_max_stack as the limit in
2462 * trace__resolve_callchain(), allowing per-event max-stack settings
2463 * to override an explicitely set --max-stack global setting.
2464 */
2465 evlist__for_each_entry(evlist, evsel) {
2466 if ((evsel->attr.sample_type & PERF_SAMPLE_CALLCHAIN) &&
2467 evsel->attr.sample_max_stack == 0)
2468 evsel->attr.sample_max_stack = trace->max_stack;
2469 }
2421again: 2470again:
2422 before = trace->nr_events; 2471 before = trace->nr_events;
2423 2472
@@ -2481,6 +2530,8 @@ out_disable:
2481 } 2530 }
2482 2531
2483out_delete_evlist: 2532out_delete_evlist:
2533 trace__symbols__exit(trace);
2534
2484 perf_evlist__delete(evlist); 2535 perf_evlist__delete(evlist);
2485 trace->evlist = NULL; 2536 trace->evlist = NULL;
2486 trace->live = false; 2537 trace->live = false;
@@ -2528,10 +2579,12 @@ static int trace__replay(struct trace *trace)
2528 const struct perf_evsel_str_handler handlers[] = { 2579 const struct perf_evsel_str_handler handlers[] = {
2529 { "probe:vfs_getname", trace__vfs_getname, }, 2580 { "probe:vfs_getname", trace__vfs_getname, },
2530 }; 2581 };
2531 struct perf_data_file file = { 2582 struct perf_data data = {
2532 .path = input_name, 2583 .file = {
2533 .mode = PERF_DATA_MODE_READ, 2584 .path = input_name,
2534 .force = trace->force, 2585 },
2586 .mode = PERF_DATA_MODE_READ,
2587 .force = trace->force,
2535 }; 2588 };
2536 struct perf_session *session; 2589 struct perf_session *session;
2537 struct perf_evsel *evsel; 2590 struct perf_evsel *evsel;
@@ -2554,7 +2607,7 @@ static int trace__replay(struct trace *trace)
2554 /* add tid to output */ 2607 /* add tid to output */
2555 trace->multiple_threads = true; 2608 trace->multiple_threads = true;
2556 2609
2557 session = perf_session__new(&file, false, &trace->tool); 2610 session = perf_session__new(&data, false, &trace->tool);
2558 if (session == NULL) 2611 if (session == NULL)
2559 return -1; 2612 return -1;
2560 2613
@@ -2730,20 +2783,23 @@ DEFINE_RESORT_RB(threads, (thread__nr_events(a->thread->priv) < thread__nr_event
2730 2783
2731static size_t trace__fprintf_thread_summary(struct trace *trace, FILE *fp) 2784static size_t trace__fprintf_thread_summary(struct trace *trace, FILE *fp)
2732{ 2785{
2733 DECLARE_RESORT_RB_MACHINE_THREADS(threads, trace->host);
2734 size_t printed = trace__fprintf_threads_header(fp); 2786 size_t printed = trace__fprintf_threads_header(fp);
2735 struct rb_node *nd; 2787 struct rb_node *nd;
2788 int i;
2736 2789
2737 if (threads == NULL) { 2790 for (i = 0; i < THREADS__TABLE_SIZE; i++) {
2738 fprintf(fp, "%s", "Error sorting output by nr_events!\n"); 2791 DECLARE_RESORT_RB_MACHINE_THREADS(threads, trace->host, i);
2739 return 0;
2740 }
2741 2792
2742 resort_rb__for_each_entry(nd, threads) 2793 if (threads == NULL) {
2743 printed += trace__fprintf_thread(fp, threads_entry->thread, trace); 2794 fprintf(fp, "%s", "Error sorting output by nr_events!\n");
2795 return 0;
2796 }
2744 2797
2745 resort_rb__delete(threads); 2798 resort_rb__for_each_entry(nd, threads)
2799 printed += trace__fprintf_thread(fp, threads_entry->thread, trace);
2746 2800
2801 resort_rb__delete(threads);
2802 }
2747 return printed; 2803 return printed;
2748} 2804}
2749 2805
@@ -3002,6 +3058,8 @@ int cmd_trace(int argc, const char **argv)
3002 "Set the maximum stack depth when parsing the callchain, " 3058 "Set the maximum stack depth when parsing the callchain, "
3003 "anything beyond the specified depth will be ignored. " 3059 "anything beyond the specified depth will be ignored. "
3004 "Default: kernel.perf_event_max_stack or " __stringify(PERF_MAX_STACK_DEPTH)), 3060 "Default: kernel.perf_event_max_stack or " __stringify(PERF_MAX_STACK_DEPTH)),
3061 OPT_BOOLEAN(0, "print-sample", &trace.print_sample,
3062 "print the PERF_RECORD_SAMPLE PERF_SAMPLE_ info, for debugging"),
3005 OPT_UINTEGER(0, "proc-map-timeout", &trace.opts.proc_map_timeout, 3063 OPT_UINTEGER(0, "proc-map-timeout", &trace.opts.proc_map_timeout,
3006 "per thread proc mmap processing timeout in ms"), 3064 "per thread proc mmap processing timeout in ms"),
3007 OPT_UINTEGER('D', "delay", &trace.opts.initial_delay, 3065 OPT_UINTEGER('D', "delay", &trace.opts.initial_delay,
@@ -3053,8 +3111,9 @@ int cmd_trace(int argc, const char **argv)
3053 } 3111 }
3054 3112
3055#ifdef HAVE_DWARF_UNWIND_SUPPORT 3113#ifdef HAVE_DWARF_UNWIND_SUPPORT
3056 if ((trace.min_stack || max_stack_user_set) && !callchain_param.enabled && trace.trace_syscalls) 3114 if ((trace.min_stack || max_stack_user_set) && !callchain_param.enabled) {
3057 record_opts__parse_callchain(&trace.opts, &callchain_param, "dwarf", false); 3115 record_opts__parse_callchain(&trace.opts, &callchain_param, "dwarf", false);
3116 }
3058#endif 3117#endif
3059 3118
3060 if (callchain_param.enabled) { 3119 if (callchain_param.enabled) {
diff --git a/tools/perf/check-headers.sh b/tools/perf/check-headers.sh
index 50cd6228f506..790ec25919a0 100755
--- a/tools/perf/check-headers.sh
+++ b/tools/perf/check-headers.sh
@@ -5,8 +5,10 @@ HEADERS='
5include/uapi/drm/drm.h 5include/uapi/drm/drm.h
6include/uapi/drm/i915_drm.h 6include/uapi/drm/i915_drm.h
7include/uapi/linux/fcntl.h 7include/uapi/linux/fcntl.h
8include/uapi/linux/kcmp.h
8include/uapi/linux/kvm.h 9include/uapi/linux/kvm.h
9include/uapi/linux/perf_event.h 10include/uapi/linux/perf_event.h
11include/uapi/linux/prctl.h
10include/uapi/linux/sched.h 12include/uapi/linux/sched.h
11include/uapi/linux/stat.h 13include/uapi/linux/stat.h
12include/uapi/linux/vhost.h 14include/uapi/linux/vhost.h
@@ -19,6 +21,7 @@ arch/x86/include/asm/cpufeatures.h
19arch/arm/include/uapi/asm/perf_regs.h 21arch/arm/include/uapi/asm/perf_regs.h
20arch/arm64/include/uapi/asm/perf_regs.h 22arch/arm64/include/uapi/asm/perf_regs.h
21arch/powerpc/include/uapi/asm/perf_regs.h 23arch/powerpc/include/uapi/asm/perf_regs.h
24arch/s390/include/uapi/asm/perf_regs.h
22arch/x86/include/uapi/asm/perf_regs.h 25arch/x86/include/uapi/asm/perf_regs.h
23arch/x86/include/uapi/asm/kvm.h 26arch/x86/include/uapi/asm/kvm.h
24arch/x86/include/uapi/asm/kvm_perf.h 27arch/x86/include/uapi/asm/kvm_perf.h
@@ -28,22 +31,31 @@ arch/x86/include/uapi/asm/vmx.h
28arch/powerpc/include/uapi/asm/kvm.h 31arch/powerpc/include/uapi/asm/kvm.h
29arch/s390/include/uapi/asm/kvm.h 32arch/s390/include/uapi/asm/kvm.h
30arch/s390/include/uapi/asm/kvm_perf.h 33arch/s390/include/uapi/asm/kvm_perf.h
34arch/s390/include/uapi/asm/ptrace.h
31arch/s390/include/uapi/asm/sie.h 35arch/s390/include/uapi/asm/sie.h
32arch/arm/include/uapi/asm/kvm.h 36arch/arm/include/uapi/asm/kvm.h
33arch/arm64/include/uapi/asm/kvm.h 37arch/arm64/include/uapi/asm/kvm.h
38arch/alpha/include/uapi/asm/errno.h
39arch/mips/include/asm/errno.h
40arch/mips/include/uapi/asm/errno.h
41arch/parisc/include/uapi/asm/errno.h
42arch/powerpc/include/uapi/asm/errno.h
43arch/sparc/include/uapi/asm/errno.h
44arch/x86/include/uapi/asm/errno.h
34include/asm-generic/bitops/arch_hweight.h 45include/asm-generic/bitops/arch_hweight.h
35include/asm-generic/bitops/const_hweight.h 46include/asm-generic/bitops/const_hweight.h
36include/asm-generic/bitops/__fls.h 47include/asm-generic/bitops/__fls.h
37include/asm-generic/bitops/fls.h 48include/asm-generic/bitops/fls.h
38include/asm-generic/bitops/fls64.h 49include/asm-generic/bitops/fls64.h
39include/linux/coresight-pmu.h 50include/linux/coresight-pmu.h
51include/uapi/asm-generic/errno.h
52include/uapi/asm-generic/errno-base.h
40include/uapi/asm-generic/ioctls.h 53include/uapi/asm-generic/ioctls.h
41include/uapi/asm-generic/mman-common.h 54include/uapi/asm-generic/mman-common.h
42' 55'
43 56
44check () { 57check () {
45 file=$1 58 file=$1
46 opts="--ignore-blank-lines --ignore-space-change"
47 59
48 shift 60 shift
49 while [ -n "$*" ]; do 61 while [ -n "$*" ]; do
@@ -58,6 +70,11 @@ check () {
58} 70}
59 71
60 72
73# Check if we have the kernel headers (tools/perf/../../include), else
74# we're probably on a detached tarball, so no point in trying to check
75# differences.
76test -d ../../include || exit 0
77
61# simple diff check 78# simple diff check
62for i in $HEADERS; do 79for i in $HEADERS; do
63 check $i -B 80 check $i -B
diff --git a/tools/perf/jvmti/jvmti_agent.c b/tools/perf/jvmti/jvmti_agent.c
index cf36de7ea255..0c6d1002b524 100644
--- a/tools/perf/jvmti/jvmti_agent.c
+++ b/tools/perf/jvmti/jvmti_agent.c
@@ -384,13 +384,13 @@ jvmti_write_code(void *agent, char const *sym,
384} 384}
385 385
386int 386int
387jvmti_write_debug_info(void *agent, uint64_t code, const char *file, 387jvmti_write_debug_info(void *agent, uint64_t code,
388 jvmti_line_info_t *li, int nr_lines) 388 int nr_lines, jvmti_line_info_t *li,
389 const char * const * file_names)
389{ 390{
390 struct jr_code_debug_info rec; 391 struct jr_code_debug_info rec;
391 size_t sret, len, size, flen; 392 size_t sret, len, size, flen = 0;
392 uint64_t addr; 393 uint64_t addr;
393 const char *fn = file;
394 FILE *fp = agent; 394 FILE *fp = agent;
395 int i; 395 int i;
396 396
@@ -405,7 +405,9 @@ jvmti_write_debug_info(void *agent, uint64_t code, const char *file,
405 return -1; 405 return -1;
406 } 406 }
407 407
408 flen = strlen(file) + 1; 408 for (i = 0; i < nr_lines; ++i) {
409 flen += strlen(file_names[i]) + 1;
410 }
409 411
410 rec.p.id = JIT_CODE_DEBUG_INFO; 412 rec.p.id = JIT_CODE_DEBUG_INFO;
411 size = sizeof(rec); 413 size = sizeof(rec);
@@ -421,7 +423,7 @@ jvmti_write_debug_info(void *agent, uint64_t code, const char *file,
421 * file[] : source file name 423 * file[] : source file name
422 */ 424 */
423 size += nr_lines * sizeof(struct debug_entry); 425 size += nr_lines * sizeof(struct debug_entry);
424 size += flen * nr_lines; 426 size += flen;
425 rec.p.total_size = size; 427 rec.p.total_size = size;
426 428
427 /* 429 /*
@@ -452,7 +454,7 @@ jvmti_write_debug_info(void *agent, uint64_t code, const char *file,
452 if (sret != 1) 454 if (sret != 1)
453 goto error; 455 goto error;
454 456
455 sret = fwrite_unlocked(fn, flen, 1, fp); 457 sret = fwrite_unlocked(file_names[i], strlen(file_names[i]) + 1, 1, fp);
456 if (sret != 1) 458 if (sret != 1)
457 goto error; 459 goto error;
458 } 460 }
diff --git a/tools/perf/jvmti/jvmti_agent.h b/tools/perf/jvmti/jvmti_agent.h
index fe32d8344a82..6ed82f6c06dd 100644
--- a/tools/perf/jvmti/jvmti_agent.h
+++ b/tools/perf/jvmti/jvmti_agent.h
@@ -14,6 +14,7 @@ typedef struct {
14 unsigned long pc; 14 unsigned long pc;
15 int line_number; 15 int line_number;
16 int discrim; /* discriminator -- 0 for now */ 16 int discrim; /* discriminator -- 0 for now */
17 jmethodID methodID;
17} jvmti_line_info_t; 18} jvmti_line_info_t;
18 19
19void *jvmti_open(void); 20void *jvmti_open(void);
@@ -22,11 +23,9 @@ int jvmti_write_code(void *agent, char const *symbol_name,
22 uint64_t vma, void const *code, 23 uint64_t vma, void const *code,
23 const unsigned int code_size); 24 const unsigned int code_size);
24 25
25int jvmti_write_debug_info(void *agent, 26int jvmti_write_debug_info(void *agent, uint64_t code, int nr_lines,
26 uint64_t code,
27 const char *file,
28 jvmti_line_info_t *li, 27 jvmti_line_info_t *li,
29 int nr_lines); 28 const char * const * file_names);
30 29
31#if defined(__cplusplus) 30#if defined(__cplusplus)
32} 31}
diff --git a/tools/perf/jvmti/libjvmti.c b/tools/perf/jvmti/libjvmti.c
index c62c9fc9a525..6add3e982614 100644
--- a/tools/perf/jvmti/libjvmti.c
+++ b/tools/perf/jvmti/libjvmti.c
@@ -47,6 +47,7 @@ do_get_line_numbers(jvmtiEnv *jvmti, void *pc, jmethodID m, jint bci,
47 tab[lines].pc = (unsigned long)pc; 47 tab[lines].pc = (unsigned long)pc;
48 tab[lines].line_number = loc_tab[i].line_number; 48 tab[lines].line_number = loc_tab[i].line_number;
49 tab[lines].discrim = 0; /* not yet used */ 49 tab[lines].discrim = 0; /* not yet used */
50 tab[lines].methodID = m;
50 lines++; 51 lines++;
51 } else { 52 } else {
52 break; 53 break;
@@ -125,6 +126,99 @@ get_line_numbers(jvmtiEnv *jvmti, const void *compile_info, jvmti_line_info_t **
125 return JVMTI_ERROR_NONE; 126 return JVMTI_ERROR_NONE;
126} 127}
127 128
129static void
130copy_class_filename(const char * class_sign, const char * file_name, char * result, size_t max_length)
131{
132 /*
133 * Assume path name is class hierarchy, this is a common practice with Java programs
134 */
135 if (*class_sign == 'L') {
136 int j, i = 0;
137 char *p = strrchr(class_sign, '/');
138 if (p) {
139 /* drop the 'L' prefix and copy up to the final '/' */
140 for (i = 0; i < (p - class_sign); i++)
141 result[i] = class_sign[i+1];
142 }
143 /*
144 * append file name, we use loops and not string ops to avoid modifying
145 * class_sign which is used later for the symbol name
146 */
147 for (j = 0; i < (max_length - 1) && file_name && j < strlen(file_name); j++, i++)
148 result[i] = file_name[j];
149
150 result[i] = '\0';
151 } else {
152 /* fallback case */
153 size_t file_name_len = strlen(file_name);
154 strncpy(result, file_name, file_name_len < max_length ? file_name_len : max_length);
155 }
156}
157
158static jvmtiError
159get_source_filename(jvmtiEnv *jvmti, jmethodID methodID, char ** buffer)
160{
161 jvmtiError ret;
162 jclass decl_class;
163 char *file_name = NULL;
164 char *class_sign = NULL;
165 char fn[PATH_MAX];
166 size_t len;
167
168 ret = (*jvmti)->GetMethodDeclaringClass(jvmti, methodID, &decl_class);
169 if (ret != JVMTI_ERROR_NONE) {
170 print_error(jvmti, "GetMethodDeclaringClass", ret);
171 return ret;
172 }
173
174 ret = (*jvmti)->GetSourceFileName(jvmti, decl_class, &file_name);
175 if (ret != JVMTI_ERROR_NONE) {
176 print_error(jvmti, "GetSourceFileName", ret);
177 return ret;
178 }
179
180 ret = (*jvmti)->GetClassSignature(jvmti, decl_class, &class_sign, NULL);
181 if (ret != JVMTI_ERROR_NONE) {
182 print_error(jvmti, "GetClassSignature", ret);
183 goto free_file_name_error;
184 }
185
186 copy_class_filename(class_sign, file_name, fn, PATH_MAX);
187 len = strlen(fn);
188 *buffer = malloc((len + 1) * sizeof(char));
189 if (!*buffer) {
190 print_error(jvmti, "GetClassSignature", ret);
191 ret = JVMTI_ERROR_OUT_OF_MEMORY;
192 goto free_class_sign_error;
193 }
194 strcpy(*buffer, fn);
195 ret = JVMTI_ERROR_NONE;
196
197free_class_sign_error:
198 (*jvmti)->Deallocate(jvmti, (unsigned char *)class_sign);
199free_file_name_error:
200 (*jvmti)->Deallocate(jvmti, (unsigned char *)file_name);
201
202 return ret;
203}
204
205static jvmtiError
206fill_source_filenames(jvmtiEnv *jvmti, int nr_lines,
207 const jvmti_line_info_t * line_tab,
208 char ** file_names)
209{
210 int index;
211 jvmtiError ret;
212
213 for (index = 0; index < nr_lines; ++index) {
214 ret = get_source_filename(jvmti, line_tab[index].methodID, &(file_names[index]));
215 if (ret != JVMTI_ERROR_NONE)
216 return ret;
217 }
218
219 return JVMTI_ERROR_NONE;
220}
221
128static void JNICALL 222static void JNICALL
129compiled_method_load_cb(jvmtiEnv *jvmti, 223compiled_method_load_cb(jvmtiEnv *jvmti,
130 jmethodID method, 224 jmethodID method,
@@ -135,16 +229,18 @@ compiled_method_load_cb(jvmtiEnv *jvmti,
135 const void *compile_info) 229 const void *compile_info)
136{ 230{
137 jvmti_line_info_t *line_tab = NULL; 231 jvmti_line_info_t *line_tab = NULL;
232 char ** line_file_names = NULL;
138 jclass decl_class; 233 jclass decl_class;
139 char *class_sign = NULL; 234 char *class_sign = NULL;
140 char *func_name = NULL; 235 char *func_name = NULL;
141 char *func_sign = NULL; 236 char *func_sign = NULL;
142 char *file_name= NULL; 237 char *file_name = NULL;
143 char fn[PATH_MAX]; 238 char fn[PATH_MAX];
144 uint64_t addr = (uint64_t)(uintptr_t)code_addr; 239 uint64_t addr = (uint64_t)(uintptr_t)code_addr;
145 jvmtiError ret; 240 jvmtiError ret;
146 int nr_lines = 0; /* in line_tab[] */ 241 int nr_lines = 0; /* in line_tab[] */
147 size_t len; 242 size_t len;
243 int output_debug_info = 0;
148 244
149 ret = (*jvmti)->GetMethodDeclaringClass(jvmti, method, 245 ret = (*jvmti)->GetMethodDeclaringClass(jvmti, method,
150 &decl_class); 246 &decl_class);
@@ -158,6 +254,19 @@ compiled_method_load_cb(jvmtiEnv *jvmti,
158 if (ret != JVMTI_ERROR_NONE) { 254 if (ret != JVMTI_ERROR_NONE) {
159 warnx("jvmti: cannot get line table for method"); 255 warnx("jvmti: cannot get line table for method");
160 nr_lines = 0; 256 nr_lines = 0;
257 } else if (nr_lines > 0) {
258 line_file_names = malloc(sizeof(char*) * nr_lines);
259 if (!line_file_names) {
260 warnx("jvmti: cannot allocate space for line table method names");
261 } else {
262 memset(line_file_names, 0, sizeof(char*) * nr_lines);
263 ret = fill_source_filenames(jvmti, nr_lines, line_tab, line_file_names);
264 if (ret != JVMTI_ERROR_NONE) {
265 warnx("jvmti: fill_source_filenames failed");
266 } else {
267 output_debug_info = 1;
268 }
269 }
161 } 270 }
162 } 271 }
163 272
@@ -181,33 +290,14 @@ compiled_method_load_cb(jvmtiEnv *jvmti,
181 goto error; 290 goto error;
182 } 291 }
183 292
184 /* 293 copy_class_filename(class_sign, file_name, fn, PATH_MAX);
185 * Assume path name is class hierarchy, this is a common practice with Java programs 294
186 */
187 if (*class_sign == 'L') {
188 int j, i = 0;
189 char *p = strrchr(class_sign, '/');
190 if (p) {
191 /* drop the 'L' prefix and copy up to the final '/' */
192 for (i = 0; i < (p - class_sign); i++)
193 fn[i] = class_sign[i+1];
194 }
195 /*
196 * append file name, we use loops and not string ops to avoid modifying
197 * class_sign which is used later for the symbol name
198 */
199 for (j = 0; i < (PATH_MAX - 1) && file_name && j < strlen(file_name); j++, i++)
200 fn[i] = file_name[j];
201 fn[i] = '\0';
202 } else {
203 /* fallback case */
204 strcpy(fn, file_name);
205 }
206 /* 295 /*
207 * write source line info record if we have it 296 * write source line info record if we have it
208 */ 297 */
209 if (jvmti_write_debug_info(jvmti_agent, addr, fn, line_tab, nr_lines)) 298 if (output_debug_info)
210 warnx("jvmti: write_debug_info() failed"); 299 if (jvmti_write_debug_info(jvmti_agent, addr, nr_lines, line_tab, (const char * const *) line_file_names))
300 warnx("jvmti: write_debug_info() failed");
211 301
212 len = strlen(func_name) + strlen(class_sign) + strlen(func_sign) + 2; 302 len = strlen(func_name) + strlen(class_sign) + strlen(func_sign) + 2;
213 { 303 {
@@ -223,6 +313,13 @@ error:
223 (*jvmti)->Deallocate(jvmti, (unsigned char *)class_sign); 313 (*jvmti)->Deallocate(jvmti, (unsigned char *)class_sign);
224 (*jvmti)->Deallocate(jvmti, (unsigned char *)file_name); 314 (*jvmti)->Deallocate(jvmti, (unsigned char *)file_name);
225 free(line_tab); 315 free(line_tab);
316 while (line_file_names && (nr_lines > 0)) {
317 if (line_file_names[nr_lines - 1]) {
318 free(line_file_names[nr_lines - 1]);
319 }
320 nr_lines -= 1;
321 }
322 free(line_file_names);
226} 323}
227 324
228static void JNICALL 325static void JNICALL
diff --git a/tools/perf/perf-completion.sh b/tools/perf/perf-completion.sh
index 345f5d6e9ed5..fdf75d45efff 100644
--- a/tools/perf/perf-completion.sh
+++ b/tools/perf/perf-completion.sh
@@ -162,8 +162,37 @@ __perf_main ()
162 # List possible events for -e option 162 # List possible events for -e option
163 elif [[ $prev == @("-e"|"--event") && 163 elif [[ $prev == @("-e"|"--event") &&
164 $prev_skip_opts == @(record|stat|top) ]]; then 164 $prev_skip_opts == @(record|stat|top) ]]; then
165 evts=$($cmd list --raw-dump) 165
166 __perfcomp_colon "$evts" "$cur" 166 local cur1=${COMP_WORDS[COMP_CWORD]}
167 local raw_evts=$($cmd list --raw-dump)
168 local arr s tmp result
169
170 if [[ "$cur1" == */* && ${cur1#*/} =~ ^[A-Z] ]]; then
171 OLD_IFS="$IFS"
172 IFS=" "
173 arr=($raw_evts)
174 IFS="$OLD_IFS"
175
176 for s in ${arr[@]}
177 do
178 if [[ "$s" == *cpu/* ]]; then
179 tmp=${s#*cpu/}
180 result=$result" ""cpu/"${tmp^^}
181 else
182 result=$result" "$s
183 fi
184 done
185
186 evts=${result}" "$(ls /sys/bus/event_source/devices/cpu/events)
187 else
188 evts=${raw_evts}" "$(ls /sys/bus/event_source/devices/cpu/events)
189 fi
190
191 if [[ "$cur1" == , ]]; then
192 __perfcomp_colon "$evts" ""
193 else
194 __perfcomp_colon "$evts" "$cur1"
195 fi
167 else 196 else
168 # List subcommands for perf commands 197 # List subcommands for perf commands
169 if [[ $prev_skip_opts == @(kvm|kmem|mem|lock|sched| 198 if [[ $prev_skip_opts == @(kvm|kmem|mem|lock|sched|
@@ -246,11 +275,21 @@ fi
246type perf &>/dev/null && 275type perf &>/dev/null &&
247_perf() 276_perf()
248{ 277{
278 if [[ "$COMP_WORDBREAKS" != *,* ]]; then
279 COMP_WORDBREAKS="${COMP_WORDBREAKS},"
280 export COMP_WORDBREAKS
281 fi
282
283 if [[ "$COMP_WORDBREAKS" == *:* ]]; then
284 COMP_WORDBREAKS="${COMP_WORDBREAKS/:/}"
285 export COMP_WORDBREAKS
286 fi
287
249 local cur words cword prev 288 local cur words cword prev
250 if [ $preload_get_comp_words_by_ref = "true" ]; then 289 if [ $preload_get_comp_words_by_ref = "true" ]; then
251 _get_comp_words_by_ref -n =: cur words cword prev 290 _get_comp_words_by_ref -n =:, cur words cword prev
252 else 291 else
253 __perf_get_comp_words_by_ref -n =: cur words cword prev 292 __perf_get_comp_words_by_ref -n =:, cur words cword prev
254 fi 293 fi
255 __perf_main 294 __perf_main
256} && 295} &&
diff --git a/tools/perf/perf.c b/tools/perf/perf.c
index 62b13518bc6e..1b3fc8ec0fa2 100644
--- a/tools/perf/perf.c
+++ b/tools/perf/perf.c
@@ -73,7 +73,7 @@ static struct cmd_struct commands[] = {
73 { "lock", cmd_lock, 0 }, 73 { "lock", cmd_lock, 0 },
74 { "kvm", cmd_kvm, 0 }, 74 { "kvm", cmd_kvm, 0 },
75 { "test", cmd_test, 0 }, 75 { "test", cmd_test, 0 },
76#ifdef HAVE_LIBAUDIT_SUPPORT 76#if defined(HAVE_LIBAUDIT_SUPPORT) || defined(HAVE_SYSCALL_TABLE)
77 { "trace", cmd_trace, 0 }, 77 { "trace", cmd_trace, 0 },
78#endif 78#endif
79 { "inject", cmd_inject, 0 }, 79 { "inject", cmd_inject, 0 },
@@ -485,7 +485,7 @@ int main(int argc, const char **argv)
485 argv[0] = cmd; 485 argv[0] = cmd;
486 } 486 }
487 if (strstarts(cmd, "trace")) { 487 if (strstarts(cmd, "trace")) {
488#ifdef HAVE_LIBAUDIT_SUPPORT 488#if defined(HAVE_LIBAUDIT_SUPPORT) || defined(HAVE_SYSCALL_TABLE)
489 setup_path(); 489 setup_path();
490 argv[0] = "trace"; 490 argv[0] = "trace";
491 return cmd_trace(argc, argv); 491 return cmd_trace(argc, argv);
diff --git a/tools/perf/perf.h b/tools/perf/perf.h
index f75f3dec7485..cfe46236a5e5 100644
--- a/tools/perf/perf.h
+++ b/tools/perf/perf.h
@@ -50,6 +50,7 @@ struct record_opts {
50 bool sample_time_set; 50 bool sample_time_set;
51 bool sample_cpu; 51 bool sample_cpu;
52 bool period; 52 bool period;
53 bool period_set;
53 bool running_time; 54 bool running_time;
54 bool full_auxtrace; 55 bool full_auxtrace;
55 bool auxtrace_snapshot_mode; 56 bool auxtrace_snapshot_mode;
@@ -66,6 +67,7 @@ struct record_opts {
66 unsigned int user_freq; 67 unsigned int user_freq;
67 u64 branch_stack; 68 u64 branch_stack;
68 u64 sample_intr_regs; 69 u64 sample_intr_regs;
70 u64 sample_user_regs;
69 u64 default_interval; 71 u64 default_interval;
70 u64 user_interval; 72 u64 user_interval;
71 size_t auxtrace_snapshot_size; 73 size_t auxtrace_snapshot_size;
diff --git a/tools/perf/pmu-events/arch/arm64/cavium/thunderx2-imp-def.json b/tools/perf/pmu-events/arch/arm64/cavium/thunderx2-imp-def.json
new file mode 100644
index 000000000000..2db45c40ebc7
--- /dev/null
+++ b/tools/perf/pmu-events/arch/arm64/cavium/thunderx2-imp-def.json
@@ -0,0 +1,62 @@
1[
2 {
3 "PublicDescription": "Attributable Level 1 data cache access, read",
4 "EventCode": "0x40",
5 "EventName": "l1d_cache_rd",
6 "BriefDescription": "L1D cache read",
7 },
8 {
9 "PublicDescription": "Attributable Level 1 data cache access, write ",
10 "EventCode": "0x41",
11 "EventName": "l1d_cache_wr",
12 "BriefDescription": "L1D cache write",
13 },
14 {
15 "PublicDescription": "Attributable Level 1 data cache refill, read",
16 "EventCode": "0x42",
17 "EventName": "l1d_cache_refill_rd",
18 "BriefDescription": "L1D cache refill read",
19 },
20 {
21 "PublicDescription": "Attributable Level 1 data cache refill, write",
22 "EventCode": "0x43",
23 "EventName": "l1d_cache_refill_wr",
24 "BriefDescription": "L1D refill write",
25 },
26 {
27 "PublicDescription": "Attributable Level 1 data TLB refill, read",
28 "EventCode": "0x4C",
29 "EventName": "l1d_tlb_refill_rd",
30 "BriefDescription": "L1D tlb refill read",
31 },
32 {
33 "PublicDescription": "Attributable Level 1 data TLB refill, write",
34 "EventCode": "0x4D",
35 "EventName": "l1d_tlb_refill_wr",
36 "BriefDescription": "L1D tlb refill write",
37 },
38 {
39 "PublicDescription": "Attributable Level 1 data or unified TLB access, read",
40 "EventCode": "0x4E",
41 "EventName": "l1d_tlb_rd",
42 "BriefDescription": "L1D tlb read",
43 },
44 {
45 "PublicDescription": "Attributable Level 1 data or unified TLB access, write",
46 "EventCode": "0x4F",
47 "EventName": "l1d_tlb_wr",
48 "BriefDescription": "L1D tlb write",
49 },
50 {
51 "PublicDescription": "Bus access read",
52 "EventCode": "0x60",
53 "EventName": "bus_access_rd",
54 "BriefDescription": "Bus access read",
55 },
56 {
57 "PublicDescription": "Bus access write",
58 "EventCode": "0x61",
59 "EventName": "bus_access_wr",
60 "BriefDescription": "Bus access write",
61 }
62]
diff --git a/tools/perf/pmu-events/arch/arm64/cortex-a53/branch.json b/tools/perf/pmu-events/arch/arm64/cortex-a53/branch.json
new file mode 100644
index 000000000000..3b6208763e50
--- /dev/null
+++ b/tools/perf/pmu-events/arch/arm64/cortex-a53/branch.json
@@ -0,0 +1,27 @@
1[
2 {,
3 "EventCode": "0x7A",
4 "EventName": "BR_INDIRECT_SPEC",
5 "BriefDescription": "Branch speculatively executed - Indirect branch"
6 },
7 {,
8 "EventCode": "0xC9",
9 "EventName": "BR_COND",
10 "BriefDescription": "Conditional branch executed"
11 },
12 {,
13 "EventCode": "0xCA",
14 "EventName": "BR_INDIRECT_MISPRED",
15 "BriefDescription": "Indirect branch mispredicted"
16 },
17 {,
18 "EventCode": "0xCB",
19 "EventName": "BR_INDIRECT_MISPRED_ADDR",
20 "BriefDescription": "Indirect branch mispredicted because of address miscompare"
21 },
22 {,
23 "EventCode": "0xCC",
24 "EventName": "BR_COND_MISPRED",
25 "BriefDescription": "Conditional branch mispredicted"
26 }
27]
diff --git a/tools/perf/pmu-events/arch/arm64/cortex-a53/bus.json b/tools/perf/pmu-events/arch/arm64/cortex-a53/bus.json
new file mode 100644
index 000000000000..480d9f7460ab
--- /dev/null
+++ b/tools/perf/pmu-events/arch/arm64/cortex-a53/bus.json
@@ -0,0 +1,22 @@
1[
2 {,
3 "EventCode": "0x60",
4 "EventName": "BUS_ACCESS_LD",
5 "BriefDescription": "Bus access - Read"
6 },
7 {,
8 "EventCode": "0x61",
9 "EventName": "BUS_ACCESS_ST",
10 "BriefDescription": "Bus access - Write"
11 },
12 {,
13 "EventCode": "0xC0",
14 "EventName": "EXT_MEM_REQ",
15 "BriefDescription": "External memory request"
16 },
17 {,
18 "EventCode": "0xC1",
19 "EventName": "EXT_MEM_REQ_NC",
20 "BriefDescription": "Non-cacheable external memory request"
21 }
22]
diff --git a/tools/perf/pmu-events/arch/arm64/cortex-a53/cache.json b/tools/perf/pmu-events/arch/arm64/cortex-a53/cache.json
new file mode 100644
index 000000000000..11baad6344b9
--- /dev/null
+++ b/tools/perf/pmu-events/arch/arm64/cortex-a53/cache.json
@@ -0,0 +1,27 @@
1[
2 {,
3 "EventCode": "0xC2",
4 "EventName": "PREFETCH_LINEFILL",
5 "BriefDescription": "Linefill because of prefetch"
6 },
7 {,
8 "EventCode": "0xC3",
9 "EventName": "PREFETCH_LINEFILL_DROP",
10 "BriefDescription": "Instruction Cache Throttle occurred"
11 },
12 {,
13 "EventCode": "0xC4",
14 "EventName": "READ_ALLOC_ENTER",
15 "BriefDescription": "Entering read allocate mode"
16 },
17 {,
18 "EventCode": "0xC5",
19 "EventName": "READ_ALLOC",
20 "BriefDescription": "Read allocate mode"
21 },
22 {,
23 "EventCode": "0xC8",
24 "EventName": "EXT_SNOOP",
25 "BriefDescription": "SCU Snooped data from another CPU for this CPU"
26 }
27]
diff --git a/tools/perf/pmu-events/arch/arm64/cortex-a53/memory.json b/tools/perf/pmu-events/arch/arm64/cortex-a53/memory.json
new file mode 100644
index 000000000000..480d9f7460ab
--- /dev/null
+++ b/tools/perf/pmu-events/arch/arm64/cortex-a53/memory.json
@@ -0,0 +1,22 @@
1[
2 {,
3 "EventCode": "0x60",
4 "EventName": "BUS_ACCESS_LD",
5 "BriefDescription": "Bus access - Read"
6 },
7 {,
8 "EventCode": "0x61",
9 "EventName": "BUS_ACCESS_ST",
10 "BriefDescription": "Bus access - Write"
11 },
12 {,
13 "EventCode": "0xC0",
14 "EventName": "EXT_MEM_REQ",
15 "BriefDescription": "External memory request"
16 },
17 {,
18 "EventCode": "0xC1",
19 "EventName": "EXT_MEM_REQ_NC",
20 "BriefDescription": "Non-cacheable external memory request"
21 }
22]
diff --git a/tools/perf/pmu-events/arch/arm64/cortex-a53/other.json b/tools/perf/pmu-events/arch/arm64/cortex-a53/other.json
new file mode 100644
index 000000000000..73a22402d003
--- /dev/null
+++ b/tools/perf/pmu-events/arch/arm64/cortex-a53/other.json
@@ -0,0 +1,32 @@
1[
2 {,
3 "EventCode": "0x86",
4 "EventName": "EXC_IRQ",
5 "BriefDescription": "Exception taken, IRQ"
6 },
7 {,
8 "EventCode": "0x87",
9 "EventName": "EXC_FIQ",
10 "BriefDescription": "Exception taken, FIQ"
11 },
12 {,
13 "EventCode": "0xC6",
14 "EventName": "PRE_DECODE_ERR",
15 "BriefDescription": "Pre-decode error"
16 },
17 {,
18 "EventCode": "0xD0",
19 "EventName": "L1I_CACHE_ERR",
20 "BriefDescription": "L1 Instruction Cache (data or tag) memory error"
21 },
22 {,
23 "EventCode": "0xD1",
24 "EventName": "L1D_CACHE_ERR",
25 "BriefDescription": "L1 Data Cache (data, tag or dirty) memory error, correctable or non-correctable"
26 },
27 {,
28 "EventCode": "0xD2",
29 "EventName": "TLB_ERR",
30 "BriefDescription": "TLB memory error"
31 }
32]
diff --git a/tools/perf/pmu-events/arch/arm64/cortex-a53/pipeline.json b/tools/perf/pmu-events/arch/arm64/cortex-a53/pipeline.json
new file mode 100644
index 000000000000..3149fb90555a
--- /dev/null
+++ b/tools/perf/pmu-events/arch/arm64/cortex-a53/pipeline.json
@@ -0,0 +1,52 @@
1[
2 {,
3 "EventCode": "0xC7",
4 "EventName": "STALL_SB_FULL",
5 "BriefDescription": "Data Write operation that stalls the pipeline because the store buffer is full"
6 },
7 {,
8 "EventCode": "0xE0",
9 "EventName": "OTHER_IQ_DEP_STALL",
10 "BriefDescription": "Cycles that the DPU IQ is empty and that is not because of a recent micro-TLB miss, instruction cache miss or pre-decode error"
11 },
12 {,
13 "EventCode": "0xE1",
14 "EventName": "IC_DEP_STALL",
15 "BriefDescription": "Cycles the DPU IQ is empty and there is an instruction cache miss being processed"
16 },
17 {,
18 "EventCode": "0xE2",
19 "EventName": "IUTLB_DEP_STALL",
20 "BriefDescription": "Cycles the DPU IQ is empty and there is an instruction micro-TLB miss being processed"
21 },
22 {,
23 "EventCode": "0xE3",
24 "EventName": "DECODE_DEP_STALL",
25 "BriefDescription": "Cycles the DPU IQ is empty and there is a pre-decode error being processed"
26 },
27 {,
28 "EventCode": "0xE4",
29 "EventName": "OTHER_INTERLOCK_STALL",
30 "BriefDescription": "Cycles there is an interlock other than Advanced SIMD/Floating-point instructions or load/store instruction"
31 },
32 {,
33 "EventCode": "0xE5",
34 "EventName": "AGU_DEP_STALL",
35 "BriefDescription": "Cycles there is an interlock for a load/store instruction waiting for data to calculate the address in the AGU"
36 },
37 {,
38 "EventCode": "0xE6",
39 "EventName": "SIMD_DEP_STALL",
40 "BriefDescription": "Cycles there is an interlock for an Advanced SIMD/Floating-point operation."
41 },
42 {,
43 "EventCode": "0xE7",
44 "EventName": "LD_DEP_STALL",
45 "BriefDescription": "Cycles there is a stall in the Wr stage because of a load miss"
46 },
47 {,
48 "EventCode": "0xE8",
49 "EventName": "ST_DEP_STALL",
50 "BriefDescription": "Cycles there is a stall in the Wr stage because of a store"
51 }
52]
diff --git a/tools/perf/pmu-events/arch/arm64/mapfile.csv b/tools/perf/pmu-events/arch/arm64/mapfile.csv
new file mode 100644
index 000000000000..e61c9ca6cf9e
--- /dev/null
+++ b/tools/perf/pmu-events/arch/arm64/mapfile.csv
@@ -0,0 +1,16 @@
1# Format:
2# MIDR,Version,JSON/file/pathname,Type
3#
4# where
5# MIDR Processor version
6# Variant[23:20] and Revision [3:0] should be zero.
7# Version could be used to track version of of JSON file
8# but currently unused.
9# JSON/file/pathname is the path to JSON file, relative
10# to tools/perf/pmu-events/arch/arm64/.
11# Type is core, uncore etc
12#
13#
14#Family-model,Version,Filename,EventType
150x00000000420f5160,v1,cavium,core
160x00000000410fd03[[:xdigit:]],v1,cortex-a53,core
diff --git a/tools/perf/pmu-events/arch/powerpc/mapfile.csv b/tools/perf/pmu-events/arch/powerpc/mapfile.csv
index a0f3a11ca19f..229150e7ab7d 100644
--- a/tools/perf/pmu-events/arch/powerpc/mapfile.csv
+++ b/tools/perf/pmu-events/arch/powerpc/mapfile.csv
@@ -13,13 +13,5 @@
13# 13#
14 14
15# Power8 entries 15# Power8 entries
16004b0000,1,power8,core 16004[bcd][[:xdigit:]]{4},1,power8,core
17004b0201,1,power8,core 17004e[[:xdigit:]]{4},1,power9,core
18004c0000,1,power8,core
19004d0000,1,power8,core
20004d0100,1,power8,core
21004d0200,1,power8,core
22004c0100,1,power8,core
23004e0100,1,power9,core
24004e0200,1,power9,core
25004e1200,1,power9,core
diff --git a/tools/perf/pmu-events/arch/powerpc/power9/cache.json b/tools/perf/pmu-events/arch/powerpc/power9/cache.json
index 18f6645f2897..7945c5196c43 100644
--- a/tools/perf/pmu-events/arch/powerpc/power9/cache.json
+++ b/tools/perf/pmu-events/arch/powerpc/power9/cache.json
@@ -125,11 +125,6 @@
125 "BriefDescription": "Finish stall because the NTF instruction was a larx waiting to be satisfied" 125 "BriefDescription": "Finish stall because the NTF instruction was a larx waiting to be satisfied"
126 }, 126 },
127 {, 127 {,
128 "EventCode": "0x3006C",
129 "EventName": "PM_RUN_CYC_SMT2_MODE",
130 "BriefDescription": "Cycles in which this thread's run latch is set and the core is in SMT2 mode"
131 },
132 {,
133 "EventCode": "0x1C058", 128 "EventCode": "0x1C058",
134 "EventName": "PM_DTLB_MISS_16G", 129 "EventName": "PM_DTLB_MISS_16G",
135 "BriefDescription": "Data TLB Miss page size 16G" 130 "BriefDescription": "Data TLB Miss page size 16G"
diff --git a/tools/perf/pmu-events/arch/powerpc/power9/frontend.json b/tools/perf/pmu-events/arch/powerpc/power9/frontend.json
index c63a919eda98..bd8361b5fd6a 100644
--- a/tools/perf/pmu-events/arch/powerpc/power9/frontend.json
+++ b/tools/perf/pmu-events/arch/powerpc/power9/frontend.json
@@ -1,10 +1,5 @@
1[ 1[
2 {, 2 {,
3 "EventCode": "0x3E15C",
4 "EventName": "PM_MRK_L2_TM_ST_ABORT_SISTER",
5 "BriefDescription": "TM marked store abort for this thread"
6 },
7 {,
8 "EventCode": "0x25044", 3 "EventCode": "0x25044",
9 "EventName": "PM_IPTEG_FROM_L31_MOD", 4 "EventName": "PM_IPTEG_FROM_L31_MOD",
10 "BriefDescription": "A Page Table Entry was loaded into the TLB with Modified (M) data from another core's L3 on the same chip due to a instruction side request" 5 "BriefDescription": "A Page Table Entry was loaded into the TLB with Modified (M) data from another core's L3 on the same chip due to a instruction side request"
@@ -369,4 +364,4 @@
369 "EventName": "PM_IPTEG_FROM_L31_ECO_MOD", 364 "EventName": "PM_IPTEG_FROM_L31_ECO_MOD",
370 "BriefDescription": "A Page Table Entry was loaded into the TLB with Modified (M) data from another core's ECO L3 on the same chip due to a instruction side request" 365 "BriefDescription": "A Page Table Entry was loaded into the TLB with Modified (M) data from another core's ECO L3 on the same chip due to a instruction side request"
371 } 366 }
372] 367] \ No newline at end of file
diff --git a/tools/perf/pmu-events/arch/powerpc/power9/marked.json b/tools/perf/pmu-events/arch/powerpc/power9/marked.json
index b9df54fb37e3..22f9f32060a8 100644
--- a/tools/perf/pmu-events/arch/powerpc/power9/marked.json
+++ b/tools/perf/pmu-events/arch/powerpc/power9/marked.json
@@ -1,10 +1,5 @@
1[ 1[
2 {, 2 {,
3 "EventCode": "0x3C052",
4 "EventName": "PM_DATA_SYS_PUMP_MPRED",
5 "BriefDescription": "Final Pump Scope (system) mispredicted. Either the original scope was too small (Chip/Group) or the original scope was System and it should have been smaller. Counts for a demand load"
6 },
7 {,
8 "EventCode": "0x3013E", 3 "EventCode": "0x3013E",
9 "EventName": "PM_MRK_STALL_CMPLU_CYC", 4 "EventName": "PM_MRK_STALL_CMPLU_CYC",
10 "BriefDescription": "Number of cycles the marked instruction is experiencing a stall while it is next to complete (NTC)" 5 "BriefDescription": "Number of cycles the marked instruction is experiencing a stall while it is next to complete (NTC)"
@@ -255,6 +250,11 @@
255 "BriefDescription": "A Page Directory Entry was reloaded to a level 1 page walk cache from the core's L3 data cache" 250 "BriefDescription": "A Page Directory Entry was reloaded to a level 1 page walk cache from the core's L3 data cache"
256 }, 251 },
257 {, 252 {,
253 "EventCode": "0x3C052",
254 "EventName": "PM_DATA_SYS_PUMP_MPRED",
255 "BriefDescription": "Final Pump Scope (system) mispredicted. Either the original scope was too small (Chip/Group) or the original scope was System and it should have been smaller. Counts for a demand load"
256 },
257 {,
258 "EventCode": "0x4D142", 258 "EventCode": "0x4D142",
259 "EventName": "PM_MRK_DATA_FROM_L3", 259 "EventName": "PM_MRK_DATA_FROM_L3",
260 "BriefDescription": "The processor's data cache was reloaded from local core's L3 due to a marked load" 260 "BriefDescription": "The processor's data cache was reloaded from local core's L3 due to a marked load"
@@ -435,21 +435,6 @@
435 "BriefDescription": "ITLB Reloaded. Counts 1 per ITLB miss for HPT but multiple for radix depending on number of levels traveresed" 435 "BriefDescription": "ITLB Reloaded. Counts 1 per ITLB miss for HPT but multiple for radix depending on number of levels traveresed"
436 }, 436 },
437 {, 437 {,
438 "EventCode": "0x2D024",
439 "EventName": "PM_RADIX_PWC_L2_HIT",
440 "BriefDescription": "A radix translation attempt missed in the TLB but hit on both the first and second levels of page walk cache."
441 },
442 {,
443 "EventCode": "0x3F056",
444 "EventName": "PM_RADIX_PWC_L3_HIT",
445 "BriefDescription": "A radix translation attempt missed in the TLB but hit on the first, second, and third levels of page walk cache."
446 },
447 {,
448 "EventCode": "0x4E014",
449 "EventName": "PM_TM_TX_PASS_RUN_INST",
450 "BriefDescription": "Run instructions spent in successful transactions"
451 },
452 {,
453 "EventCode": "0x1E044", 438 "EventCode": "0x1E044",
454 "EventName": "PM_DPTEG_FROM_L3_NO_CONFLICT", 439 "EventName": "PM_DPTEG_FROM_L3_NO_CONFLICT",
455 "BriefDescription": "A Page Table Entry was loaded into the TLB from local core's L3 without conflict due to a data side request. When using Radix Page Translation, this count excludes PDE reloads. Only PTE reloads are included" 440 "BriefDescription": "A Page Table Entry was loaded into the TLB from local core's L3 without conflict due to a data side request. When using Radix Page Translation, this count excludes PDE reloads. Only PTE reloads are included"
@@ -644,4 +629,4 @@
644 "EventName": "PM_MRK_BR_MPRED_CMPL", 629 "EventName": "PM_MRK_BR_MPRED_CMPL",
645 "BriefDescription": "Marked Branch Mispredicted" 630 "BriefDescription": "Marked Branch Mispredicted"
646 } 631 }
647] 632] \ No newline at end of file
diff --git a/tools/perf/pmu-events/arch/powerpc/power9/other.json b/tools/perf/pmu-events/arch/powerpc/power9/other.json
index 54cc3be00fc2..5ce312973f1e 100644
--- a/tools/perf/pmu-events/arch/powerpc/power9/other.json
+++ b/tools/perf/pmu-events/arch/powerpc/power9/other.json
@@ -80,6 +80,11 @@
80 "BriefDescription": "A radix translation attempt missed in the TLB and all levels of page walk cache." 80 "BriefDescription": "A radix translation attempt missed in the TLB and all levels of page walk cache."
81 }, 81 },
82 {, 82 {,
83 "EventCode": "0x26882",
84 "EventName": "PM_L2_DC_INV",
85 "BriefDescription": "D-cache invalidates sent over the reload bus to the core"
86 },
87 {,
83 "EventCode": "0x24048", 88 "EventCode": "0x24048",
84 "EventName": "PM_INST_FROM_LMEM", 89 "EventName": "PM_INST_FROM_LMEM",
85 "BriefDescription": "The processor's Instruction cache was reloaded from the local chip's Memory due to an instruction fetch (not prefetch)" 90 "BriefDescription": "The processor's Instruction cache was reloaded from the local chip's Memory due to an instruction fetch (not prefetch)"
@@ -95,11 +100,6 @@
95 "BriefDescription": "Number of TM transactions that passed" 100 "BriefDescription": "Number of TM transactions that passed"
96 }, 101 },
97 {, 102 {,
98 "EventCode": "0xD1A0",
99 "EventName": "PM_MRK_LSU_FLUSH_LHS",
100 "BriefDescription": "Effective Address alias flush : no EA match but Real Address match. If the data has not yet been returned for this load, the instruction will just be rejected, but if it has returned data, it will be flushed"
101 },
102 {,
103 "EventCode": "0xF088", 103 "EventCode": "0xF088",
104 "EventName": "PM_LSU0_STORE_REJECT", 104 "EventName": "PM_LSU0_STORE_REJECT",
105 "BriefDescription": "All internal store rejects cause the instruction to go back to the SRQ and go to sleep until woken up to try again after the condition has been met" 105 "BriefDescription": "All internal store rejects cause the instruction to go back to the SRQ and go to sleep until woken up to try again after the condition has been met"
@@ -127,7 +127,7 @@
127 {, 127 {,
128 "EventCode": "0xD08C", 128 "EventCode": "0xD08C",
129 "EventName": "PM_LSU2_LDMX_FIN", 129 "EventName": "PM_LSU2_LDMX_FIN",
130 "BriefDescription": "New P9 instruction LDMX. The definition of this new PMU event is (from the ldmx RFC02491): The thread has executed an ldmx instruction that accessed a doubleword that contains an effective address within an enabled section of the Load Monitored region. This event, therefore, should not occur if the FSCR has disabled the load monitored facility (FSCR[52]) or disabled the EBB facility (FSCR[56])" 130 "BriefDescription": "New P9 instruction LDMX. The definition of this new PMU event is (from the ldmx RFC02491): The thread has executed an ldmx instruction that accessed a doubleword that contains an effective address within an enabled section of the Load Monitored region. This event, therefore, should not occur if the FSCR has disabled the load monitored facility (FSCR[52]) or disabled the EBB facility (FSCR[56])."
131 }, 131 },
132 {, 132 {,
133 "EventCode": "0x300F8", 133 "EventCode": "0x300F8",
@@ -205,11 +205,6 @@
205 "BriefDescription": "Duration in cycles to reload with Modified (M) data from another core's ECO L3 on the same chip due to a marked load" 205 "BriefDescription": "Duration in cycles to reload with Modified (M) data from another core's ECO L3 on the same chip due to a marked load"
206 }, 206 },
207 {, 207 {,
208 "EventCode": "0xF0B4",
209 "EventName": "PM_DC_PREF_CONS_ALLOC",
210 "BriefDescription": "Prefetch stream allocated in the conservative phase by either the hardware prefetch mechanism or software prefetch"
211 },
212 {,
213 "EventCode": "0xF894", 208 "EventCode": "0xF894",
214 "EventName": "PM_LSU3_L1_CAM_CANCEL", 209 "EventName": "PM_LSU3_L1_CAM_CANCEL",
215 "BriefDescription": "ls3 l1 tm cam cancel" 210 "BriefDescription": "ls3 l1 tm cam cancel"
@@ -220,21 +215,11 @@
220 "BriefDescription": "Dispatch Flush: TLBIE" 215 "BriefDescription": "Dispatch Flush: TLBIE"
221 }, 216 },
222 {, 217 {,
223 "EventCode": "0xD1A4",
224 "EventName": "PM_MRK_LSU_FLUSH_SAO",
225 "BriefDescription": "A load-hit-load condition with Strong Address Ordering will have address compare disabled and flush"
226 },
227 {,
228 "EventCode": "0x4E11E", 218 "EventCode": "0x4E11E",
229 "EventName": "PM_MRK_DATA_FROM_DMEM_CYC", 219 "EventName": "PM_MRK_DATA_FROM_DMEM_CYC",
230 "BriefDescription": "Duration in cycles to reload from another chip's memory on the same Node or Group (Distant) due to a marked load" 220 "BriefDescription": "Duration in cycles to reload from another chip's memory on the same Node or Group (Distant) due to a marked load"
231 }, 221 },
232 {, 222 {,
233 "EventCode": "0x5894",
234 "EventName": "PM_LWSYNC",
235 "BriefDescription": "Lwsync instruction decoded and transferred"
236 },
237 {,
238 "EventCode": "0x14156", 223 "EventCode": "0x14156",
239 "EventName": "PM_MRK_DATA_FROM_L2_CYC", 224 "EventName": "PM_MRK_DATA_FROM_L2_CYC",
240 "BriefDescription": "Duration in cycles to reload from local core's L2 due to a marked load" 225 "BriefDescription": "Duration in cycles to reload from local core's L2 due to a marked load"
@@ -245,11 +230,6 @@
245 "BriefDescription": "Read clearing SC" 230 "BriefDescription": "Read clearing SC"
246 }, 231 },
247 {, 232 {,
248 "EventCode": "0x50A0",
249 "EventName": "PM_HWSYNC",
250 "BriefDescription": "Hwsync instruction decoded and transferred"
251 },
252 {,
253 "EventCode": "0x168B0", 233 "EventCode": "0x168B0",
254 "EventName": "PM_L3_P1_NODE_PUMP", 234 "EventName": "PM_L3_P1_NODE_PUMP",
255 "BriefDescription": "L3 PF sent with nodal scope port 1, counts even retried requests" 235 "BriefDescription": "L3 PF sent with nodal scope port 1, counts even retried requests"
@@ -265,6 +245,11 @@
265 "BriefDescription": "The processor's data cache was reloaded from local core's L2 with load hit store conflict due to a marked load" 245 "BriefDescription": "The processor's data cache was reloaded from local core's L2 with load hit store conflict due to a marked load"
266 }, 246 },
267 {, 247 {,
248 "EventCode": "0x468AE",
249 "EventName": "PM_L3_P3_CO_RTY",
250 "BriefDescription": "L3 CO received retry port 3 (memory only), every retry counted"
251 },
252 {,
268 "EventCode": "0x460A8", 253 "EventCode": "0x460A8",
269 "EventName": "PM_SN_HIT", 254 "EventName": "PM_SN_HIT",
270 "BriefDescription": "Any port snooper hit L3. Up to 4 can happen in a cycle but we only count 1" 255 "BriefDescription": "Any port snooper hit L3. Up to 4 can happen in a cycle but we only count 1"
@@ -280,11 +265,6 @@
280 "BriefDescription": "Prefetch stream allocated by the hardware prefetch mechanism" 265 "BriefDescription": "Prefetch stream allocated by the hardware prefetch mechanism"
281 }, 266 },
282 {, 267 {,
283 "EventCode": "0xF0BC",
284 "EventName": "PM_LS2_UNALIGNED_ST",
285 "BriefDescription": "Store instructions whose data crosses a double-word boundary, which causes it to require an additional slice than than what normally would be required of the Store of that size. If the Store wraps from slice 3 to slice 0, thee is an additional 3-cycle penalty"
286 },
287 {,
288 "EventCode": "0xD0AC", 268 "EventCode": "0xD0AC",
289 "EventName": "PM_SRQ_SYNC_CYC", 269 "EventName": "PM_SRQ_SYNC_CYC",
290 "BriefDescription": "A sync is in the S2Q (edge detect to count)" 270 "BriefDescription": "A sync is in the S2Q (edge detect to count)"
@@ -380,26 +360,11 @@
380 "BriefDescription": "Cycles in which this thread's run latch is set and the core is in SMT4 mode" 360 "BriefDescription": "Cycles in which this thread's run latch is set and the core is in SMT4 mode"
381 }, 361 },
382 {, 362 {,
383 "EventCode": "0x5088",
384 "EventName": "PM_DECODE_FUSION_OP_PRESERV",
385 "BriefDescription": "Destructive op operand preservation"
386 },
387 {,
388 "EventCode": "0x1D14E", 363 "EventCode": "0x1D14E",
389 "EventName": "PM_MRK_DATA_FROM_OFF_CHIP_CACHE_CYC", 364 "EventName": "PM_MRK_DATA_FROM_OFF_CHIP_CACHE_CYC",
390 "BriefDescription": "Duration in cycles to reload either shared or modified data from another core's L2/L3 on a different chip (remote or distant) due to a marked load" 365 "BriefDescription": "Duration in cycles to reload either shared or modified data from another core's L2/L3 on a different chip (remote or distant) due to a marked load"
391 }, 366 },
392 {, 367 {,
393 "EventCode": "0x509C",
394 "EventName": "PM_FORCED_NOP",
395 "BriefDescription": "Instruction was forced to execute as a nop because it was found to behave like a nop (have no effect) at decode time"
396 },
397 {,
398 "EventCode": "0xC098",
399 "EventName": "PM_LS2_UNALIGNED_LD",
400 "BriefDescription": "Load instructions whose data crosses a double-word boundary, which causes it to require an additional slice than than what normally would be required of the load of that size. If the load wraps from slice 3 to slice 0, thee is an additional 3-cycle penalty"
401 },
402 {,
403 "EventCode": "0x20058", 368 "EventCode": "0x20058",
404 "EventName": "PM_DARQ1_10_12_ENTRIES", 369 "EventName": "PM_DARQ1_10_12_ENTRIES",
405 "BriefDescription": "Cycles in which 10 or more DARQ1 entries (out of 12) are in use" 370 "BriefDescription": "Cycles in which 10 or more DARQ1 entries (out of 12) are in use"
@@ -435,11 +400,6 @@
435 "BriefDescription": "All internal store rejects cause the instruction to go back to the SRQ and go to sleep until woken up to try again after the condition has been met" 400 "BriefDescription": "All internal store rejects cause the instruction to go back to the SRQ and go to sleep until woken up to try again after the condition has been met"
436 }, 401 },
437 {, 402 {,
438 "EventCode": "0x4505E",
439 "EventName": "PM_FLOP_CMPL",
440 "BriefDescription": "Floating Point Operation Finished"
441 },
442 {,
443 "EventCode": "0x1D144", 403 "EventCode": "0x1D144",
444 "EventName": "PM_MRK_DATA_FROM_L3_DISP_CONFLICT", 404 "EventName": "PM_MRK_DATA_FROM_L3_DISP_CONFLICT",
445 "BriefDescription": "The processor's data cache was reloaded from local core's L3 with dispatch conflict due to a marked load" 405 "BriefDescription": "The processor's data cache was reloaded from local core's L3 with dispatch conflict due to a marked load"
@@ -480,14 +440,9 @@
480 "BriefDescription": "XL-form branch was mispredicted due to the predicted target address missing from EAT. The EAT forces a mispredict in this case since there is no predicated target to validate. This is a rare case that may occur when the EAT is full and a branch is issued" 440 "BriefDescription": "XL-form branch was mispredicted due to the predicted target address missing from EAT. The EAT forces a mispredict in this case since there is no predicated target to validate. This is a rare case that may occur when the EAT is full and a branch is issued"
481 }, 441 },
482 {, 442 {,
483 "EventCode": "0xC094", 443 "EventCode": "0x460AE",
484 "EventName": "PM_LS0_UNALIGNED_LD", 444 "EventName": "PM_L3_P2_CO_RTY",
485 "BriefDescription": "Load instructions whose data crosses a double-word boundary, which causes it to require an additional slice than than what normally would be required of the load of that size. If the load wraps from slice 3 to slice 0, thee is an additional 3-cycle penalty" 445 "BriefDescription": "L3 CO received retry port 2 (memory only), every retry counted"
486 },
487 {,
488 "EventCode": "0xF8BC",
489 "EventName": "PM_LS3_UNALIGNED_ST",
490 "BriefDescription": "Store instructions whose data crosses a double-word boundary, which causes it to require an additional slice than than what normally would be required of the Store of that size. If the Store wraps from slice 3 to slice 0, thee is an additional 3-cycle penalty"
491 }, 446 },
492 {, 447 {,
493 "EventCode": "0x58B0", 448 "EventCode": "0x58B0",
@@ -505,11 +460,6 @@
505 "BriefDescription": "TM Store (fav or non-fav) ran into conflict (failed)" 460 "BriefDescription": "TM Store (fav or non-fav) ran into conflict (failed)"
506 }, 461 },
507 {, 462 {,
508 "EventCode": "0xD998",
509 "EventName": "PM_MRK_LSU_FLUSH_EMSH",
510 "BriefDescription": "An ERAT miss was detected after a set-p hit. Erat tracker indicates fail due to tlbmiss and the instruction gets flushed because the instruction was working on the wrong address"
511 },
512 {,
513 "EventCode": "0xF8A0", 463 "EventCode": "0xF8A0",
514 "EventName": "PM_NON_DATA_STORE", 464 "EventName": "PM_NON_DATA_STORE",
515 "BriefDescription": "All ops that drain from s2q to L2 and contain no data" 465 "BriefDescription": "All ops that drain from s2q to L2 and contain no data"
@@ -525,11 +475,6 @@
525 "BriefDescription": "Unconditional Branch Completed. HW branch prediction was not used for this branch. This can be an I-form branch, a B-form branch with BO-field set to branch always, or a B-form branch which was covenrted to a Resolve." 475 "BriefDescription": "Unconditional Branch Completed. HW branch prediction was not used for this branch. This can be an I-form branch, a B-form branch with BO-field set to branch always, or a B-form branch which was covenrted to a Resolve."
526 }, 476 },
527 {, 477 {,
528 "EventCode": "0x1F056",
529 "EventName": "PM_RADIX_PWC_L1_HIT",
530 "BriefDescription": "A radix translation attempt missed in the TLB and only the first level page walk cache was a hit."
531 },
532 {,
533 "EventCode": "0xF8A8", 478 "EventCode": "0xF8A8",
534 "EventName": "PM_DC_PREF_FUZZY_CONF", 479 "EventName": "PM_DC_PREF_FUZZY_CONF",
535 "BriefDescription": "A demand load referenced a line in an active fuzzy prefetch stream. The stream could have been allocated through the hardware prefetch mechanism or through software.Fuzzy stream confirm (out of order effects, or pf cant keep up)" 480 "BriefDescription": "A demand load referenced a line in an active fuzzy prefetch stream. The stream could have been allocated through the hardware prefetch mechanism or through software.Fuzzy stream confirm (out of order effects, or pf cant keep up)"
@@ -545,6 +490,11 @@
545 "BriefDescription": "Load tm L1 miss" 490 "BriefDescription": "Load tm L1 miss"
546 }, 491 },
547 {, 492 {,
493 "EventCode": "0xC880",
494 "EventName": "PM_LS1_LD_VECTOR_FIN",
495 "BriefDescription": ""
496 },
497 {,
548 "EventCode": "0x2894", 498 "EventCode": "0x2894",
549 "EventName": "PM_TM_OUTER_TEND", 499 "EventName": "PM_TM_OUTER_TEND",
550 "BriefDescription": "Completion time outer tend" 500 "BriefDescription": "Completion time outer tend"
@@ -565,21 +515,11 @@
565 "BriefDescription": "Marked derat reload (miss) for any page size" 515 "BriefDescription": "Marked derat reload (miss) for any page size"
566 }, 516 },
567 {, 517 {,
568 "EventCode": "0x160A0",
569 "EventName": "PM_L3_PF_MISS_L3",
570 "BriefDescription": "L3 PF missed in L3"
571 },
572 {,
573 "EventCode": "0x1C04A", 518 "EventCode": "0x1C04A",
574 "EventName": "PM_DATA_FROM_RL2L3_SHR", 519 "EventName": "PM_DATA_FROM_RL2L3_SHR",
575 "BriefDescription": "The processor's data cache was reloaded with Shared (S) data from another chip's L2 or L3 on the same Node or Group (Remote), as this chip due to a demand load" 520 "BriefDescription": "The processor's data cache was reloaded with Shared (S) data from another chip's L2 or L3 on the same Node or Group (Remote), as this chip due to a demand load"
576 }, 521 },
577 {, 522 {,
578 "EventCode": "0xD99C",
579 "EventName": "PM_MRK_LSU_FLUSH_UE",
580 "BriefDescription": "Correctable ECC error on reload data, reported at critical data forward time"
581 },
582 {,
583 "EventCode": "0x268B0", 523 "EventCode": "0x268B0",
584 "EventName": "PM_L3_P1_GRP_PUMP", 524 "EventName": "PM_L3_P1_GRP_PUMP",
585 "BriefDescription": "L3 PF sent with grp scope port 1, counts even retried requests" 525 "BriefDescription": "L3 PF sent with grp scope port 1, counts even retried requests"
@@ -630,11 +570,6 @@
630 "BriefDescription": "addrs only req to L2 only on the first one,Indication that Load footprint is not expanding" 570 "BriefDescription": "addrs only req to L2 only on the first one,Indication that Load footprint is not expanding"
631 }, 571 },
632 {, 572 {,
633 "EventCode": "0x5884",
634 "EventName": "PM_DECODE_LANES_NOT_AVAIL",
635 "BriefDescription": "Decode has something to transmit but dispatch lanes are not available"
636 },
637 {,
638 "EventCode": "0x3C042", 573 "EventCode": "0x3C042",
639 "EventName": "PM_DATA_FROM_L3_DISP_CONFLICT", 574 "EventName": "PM_DATA_FROM_L3_DISP_CONFLICT",
640 "BriefDescription": "The processor's data cache was reloaded from local core's L3 with dispatch conflict due to a demand load" 575 "BriefDescription": "The processor's data cache was reloaded from local core's L3 with dispatch conflict due to a demand load"
@@ -690,9 +625,9 @@
690 "BriefDescription": "False LHS match detected" 625 "BriefDescription": "False LHS match detected"
691 }, 626 },
692 {, 627 {,
693 "EventCode": "0xD9A4", 628 "EventCode": "0xF0B0",
694 "EventName": "PM_MRK_LSU_FLUSH_LARX_STCX", 629 "EventName": "PM_L3_LD_PREF",
695 "BriefDescription": "A larx is flushed because an older larx has an LMQ reservation for the same thread. A stcx is flushed because an older stcx is in the LMQ. The flush happens when the older larx/stcx relaunches" 630 "BriefDescription": "L3 load prefetch, sourced from a hardware or software stream, was sent to the nest"
696 }, 631 },
697 {, 632 {,
698 "EventCode": "0x4D012", 633 "EventCode": "0x4D012",
@@ -715,9 +650,9 @@
715 "BriefDescription": "All successful Ld/St dispatches for this thread that were an L2 miss (excludes i_l2mru_tch_reqs)" 650 "BriefDescription": "All successful Ld/St dispatches for this thread that were an L2 miss (excludes i_l2mru_tch_reqs)"
716 }, 651 },
717 {, 652 {,
718 "EventCode": "0xF8B8", 653 "EventCode": "0x160A0",
719 "EventName": "PM_LS1_UNALIGNED_ST", 654 "EventName": "PM_L3_PF_MISS_L3",
720 "BriefDescription": "Store instructions whose data crosses a double-word boundary, which causes it to require an additional slice than than what normally would be required of the Store of that size. If the Store wraps from slice 3 to slice 0, thee is an additional 3-cycle penalty" 655 "BriefDescription": "L3 PF missed in L3"
721 }, 656 },
722 {, 657 {,
723 "EventCode": "0x408C", 658 "EventCode": "0x408C",
@@ -765,11 +700,6 @@
765 "BriefDescription": "Completion time nested tend" 700 "BriefDescription": "Completion time nested tend"
766 }, 701 },
767 {, 702 {,
768 "EventCode": "0x36084",
769 "EventName": "PM_L2_RCST_DISP",
770 "BriefDescription": "All D-side store dispatch attempts for this thread"
771 },
772 {,
773 "EventCode": "0x368A0", 703 "EventCode": "0x368A0",
774 "EventName": "PM_L3_PF_OFF_CHIP_CACHE", 704 "EventName": "PM_L3_PF_OFF_CHIP_CACHE",
775 "BriefDescription": "L3 PF from Off chip cache" 705 "BriefDescription": "L3 PF from Off chip cache"
@@ -830,11 +760,6 @@
830 "BriefDescription": "Rotating sample of 16 snoop valids" 760 "BriefDescription": "Rotating sample of 16 snoop valids"
831 }, 761 },
832 {, 762 {,
833 "EventCode": "0x16084",
834 "EventName": "PM_L2_RCLD_DISP",
835 "BriefDescription": "All I-or-D side load dispatch attempts for this thread (excludes i_l2mru_tch_reqs)"
836 },
837 {,
838 "EventCode": "0x1608C", 763 "EventCode": "0x1608C",
839 "EventName": "PM_RC0_BUSY", 764 "EventName": "PM_RC0_BUSY",
840 "BriefDescription": "RC mach 0 Busy. Used by PMU to sample ave RC lifetime (mach0 used as sample point)" 765 "BriefDescription": "RC mach 0 Busy. Used by PMU to sample ave RC lifetime (mach0 used as sample point)"
@@ -842,7 +767,7 @@
842 {, 767 {,
843 "EventCode": "0x36082", 768 "EventCode": "0x36082",
844 "EventName": "PM_L2_LD_DISP", 769 "EventName": "PM_L2_LD_DISP",
845 "BriefDescription": "All successful I-or-D side load dispatches for this thread (excludes i_l2mru_tch_reqs)." 770 "BriefDescription": "All successful I-or-D side load dispatches for this thread (excludes i_l2mru_tch_reqs)"
846 }, 771 },
847 {, 772 {,
848 "EventCode": "0xF8B0", 773 "EventCode": "0xF8B0",
@@ -905,11 +830,6 @@
905 "BriefDescription": "Instruction prefetch requests" 830 "BriefDescription": "Instruction prefetch requests"
906 }, 831 },
907 {, 832 {,
908 "EventCode": "0xC898",
909 "EventName": "PM_LS3_UNALIGNED_LD",
910 "BriefDescription": "Load instructions whose data crosses a double-word boundary, which causes it to require an additional slice than than what normally would be required of the load of that size. If the load wraps from slice 3 to slice 0, thee is an additional 3-cycle penalty"
911 },
912 {,
913 "EventCode": "0x488C", 833 "EventCode": "0x488C",
914 "EventName": "PM_IC_PREF_WRITE", 834 "EventName": "PM_IC_PREF_WRITE",
915 "BriefDescription": "Instruction prefetch written into IL1" 835 "BriefDescription": "Instruction prefetch written into IL1"
@@ -1017,7 +937,7 @@
1017 {, 937 {,
1018 "EventCode": "0x3E05E", 938 "EventCode": "0x3E05E",
1019 "EventName": "PM_L3_CO_MEPF", 939 "EventName": "PM_L3_CO_MEPF",
1020 "BriefDescription": "L3 castouts in Mepf state for this thread" 940 "BriefDescription": "L3 CO of line in Mep state (includes casthrough to memory). The Mepf state indicates that a line was brought in to satisfy an L3 prefetch request"
1021 }, 941 },
1022 {, 942 {,
1023 "EventCode": "0x460A2", 943 "EventCode": "0x460A2",
@@ -1205,11 +1125,6 @@
1205 "BriefDescription": "Non transactional conflict from LSU, gets reported to TEXASR" 1125 "BriefDescription": "Non transactional conflict from LSU, gets reported to TEXASR"
1206 }, 1126 },
1207 {, 1127 {,
1208 "EventCode": "0xD198",
1209 "EventName": "PM_MRK_LSU_FLUSH_ATOMIC",
1210 "BriefDescription": "Quad-word loads (lq) are considered atomic because they always span at least 2 slices. If a snoop or store from another thread changes the data the load is accessing between the 2 or 3 pieces of the lq instruction, the lq will be flushed"
1211 },
1212 {,
1213 "EventCode": "0x201E0", 1128 "EventCode": "0x201E0",
1214 "EventName": "PM_MRK_DATA_FROM_MEMORY", 1129 "EventName": "PM_MRK_DATA_FROM_MEMORY",
1215 "BriefDescription": "The processor's data cache was reloaded from a memory location including L4 from local remote or distant due to a marked load" 1130 "BriefDescription": "The processor's data cache was reloaded from a memory location including L4 from local remote or distant due to a marked load"
@@ -1295,11 +1210,6 @@
1295 "BriefDescription": "Ict empty for this thread due to dispatch holds because the History Buffer was full. Could be GPR/VSR/VMR/FPR/CR/XVF; CR; XVF (XER/VSCR/FPSCR)" 1210 "BriefDescription": "Ict empty for this thread due to dispatch holds because the History Buffer was full. Could be GPR/VSR/VMR/FPR/CR/XVF; CR; XVF (XER/VSCR/FPSCR)"
1296 }, 1211 },
1297 {, 1212 {,
1298 "EventCode": "0xC894",
1299 "EventName": "PM_LS1_UNALIGNED_LD",
1300 "BriefDescription": "Load instructions whose data crosses a double-word boundary, which causes it to require an additional slice than than what normally would be required of the load of that size. If the load wraps from slice 3 to slice 0, thee is an additional 3-cycle penalty"
1301 },
1302 {,
1303 "EventCode": "0x360A2", 1213 "EventCode": "0x360A2",
1304 "EventName": "PM_L3_L2_CO_HIT", 1214 "EventName": "PM_L3_L2_CO_HIT",
1305 "BriefDescription": "L2 CO hits" 1215 "BriefDescription": "L2 CO hits"
@@ -1325,11 +1235,6 @@
1325 "BriefDescription": "L2 Castouts - Shared (Tx,Sx)" 1235 "BriefDescription": "L2 Castouts - Shared (Tx,Sx)"
1326 }, 1236 },
1327 {, 1237 {,
1328 "EventCode": "0xD884",
1329 "EventName": "PM_LSU3_SET_MPRED",
1330 "BriefDescription": "Set prediction(set-p) miss. The entry was not found in the Set prediction table"
1331 },
1332 {,
1333 "EventCode": "0x26092", 1238 "EventCode": "0x26092",
1334 "EventName": "PM_L2_LD_MISS_64B", 1239 "EventName": "PM_L2_LD_MISS_64B",
1335 "BriefDescription": "All successful D-side load dispatches that were an L2 miss (NOT Sx,Tx,Mx) for this thread and the RC calculated the request should be for 64B(i.e., M=1)" 1240 "BriefDescription": "All successful D-side load dispatches that were an L2 miss (NOT Sx,Tx,Mx) for this thread and the RC calculated the request should be for 64B(i.e., M=1)"
@@ -1362,12 +1267,12 @@
1362 {, 1267 {,
1363 "EventCode": "0xD8A8", 1268 "EventCode": "0xD8A8",
1364 "EventName": "PM_ISLB_MISS", 1269 "EventName": "PM_ISLB_MISS",
1365 "BriefDescription": "Instruction SLB miss - Total of all segment sizes" 1270 "BriefDescription": "Instruction SLB Miss - Total of all segment sizes"
1366 }, 1271 },
1367 {, 1272 {,
1368 "EventCode": "0xD19C", 1273 "EventCode": "0x368AE",
1369 "EventName": "PM_MRK_LSU_FLUSH_RELAUNCH_MISS", 1274 "EventName": "PM_L3_P1_CO_RTY",
1370 "BriefDescription": "If a load that has already returned data and has to relaunch for any reason then gets a miss (erat, setp, data cache), it will often be flushed at relaunch time because the data might be inconsistent" 1275 "BriefDescription": "L3 CO received retry port 1 (memory only), every retry counted"
1371 }, 1276 },
1372 {, 1277 {,
1373 "EventCode": "0x260A2", 1278 "EventCode": "0x260A2",
@@ -1385,6 +1290,11 @@
1385 "BriefDescription": "Completion stall because the ISU is updating the TEXASR to keep track of the nested tbegin. This is a short delay, and it includes ROT" 1290 "BriefDescription": "Completion stall because the ISU is updating the TEXASR to keep track of the nested tbegin. This is a short delay, and it includes ROT"
1386 }, 1291 },
1387 {, 1292 {,
1293 "EventCode": "0xC084",
1294 "EventName": "PM_LS2_LD_VECTOR_FIN",
1295 "BriefDescription": ""
1296 },
1297 {,
1388 "EventCode": "0x1608E", 1298 "EventCode": "0x1608E",
1389 "EventName": "PM_ST_CAUSED_FAIL", 1299 "EventName": "PM_ST_CAUSED_FAIL",
1390 "BriefDescription": "Non-TM Store caused any thread to fail" 1300 "BriefDescription": "Non-TM Store caused any thread to fail"
@@ -1410,11 +1320,6 @@
1410 "BriefDescription": "Continuous 16 cycle (2to1) window where this signals rotates thru sampling each CO machine busy. PMU uses this wave to then do 16 cyc count to sample total number of machs running" 1320 "BriefDescription": "Continuous 16 cycle (2to1) window where this signals rotates thru sampling each CO machine busy. PMU uses this wave to then do 16 cyc count to sample total number of machs running"
1411 }, 1321 },
1412 {, 1322 {,
1413 "EventCode": "0xD084",
1414 "EventName": "PM_LSU2_SET_MPRED",
1415 "BriefDescription": "Set prediction(set-p) miss. The entry was not found in the Set prediction table"
1416 },
1417 {,
1418 "EventCode": "0x48B8", 1323 "EventCode": "0x48B8",
1419 "EventName": "PM_BR_MPRED_TAKEN_TA", 1324 "EventName": "PM_BR_MPRED_TAKEN_TA",
1420 "BriefDescription": "Conditional Branch Completed that was Mispredicted due to the Target Address Prediction from the Count Cache or Link Stack. Only XL-form branches that resolved Taken set this event." 1325 "BriefDescription": "Conditional Branch Completed that was Mispredicted due to the Target Address Prediction from the Count Cache or Link Stack. Only XL-form branches that resolved Taken set this event."
@@ -1450,29 +1355,24 @@
1450 "BriefDescription": "A demand load referenced a line in an active strided prefetch stream. The stream could have been allocated through the hardware prefetch mechanism or through software." 1355 "BriefDescription": "A demand load referenced a line in an active strided prefetch stream. The stream could have been allocated through the hardware prefetch mechanism or through software."
1451 }, 1356 },
1452 {, 1357 {,
1358 "EventCode": "0x36084",
1359 "EventName": "PM_L2_RCST_DISP",
1360 "BriefDescription": "All D-side store dispatch attempts for this thread"
1361 },
1362 {,
1453 "EventCode": "0x45054", 1363 "EventCode": "0x45054",
1454 "EventName": "PM_FMA_CMPL", 1364 "EventName": "PM_FMA_CMPL",
1455 "BriefDescription": "two flops operation completed (fmadd, fnmadd, fmsub, fnmsub) Scalar instructions only. " 1365 "BriefDescription": "two flops operation completed (fmadd, fnmadd, fmsub, fnmsub) Scalar instructions only. "
1456 }, 1366 },
1457 {, 1367 {,
1458 "EventCode": "0x5090",
1459 "EventName": "PM_SHL_ST_DISABLE",
1460 "BriefDescription": "Store-Hit-Load Table Read Hit with entry Disabled (entry was disabled due to the entry shown to not prevent the flush)"
1461 },
1462 {,
1463 "EventCode": "0x201E8", 1368 "EventCode": "0x201E8",
1464 "EventName": "PM_THRESH_EXC_512", 1369 "EventName": "PM_THRESH_EXC_512",
1465 "BriefDescription": "Threshold counter exceeded a value of 512" 1370 "BriefDescription": "Threshold counter exceeded a value of 512"
1466 }, 1371 },
1467 {, 1372 {,
1468 "EventCode": "0x5084",
1469 "EventName": "PM_DECODE_FUSION_EXT_ADD",
1470 "BriefDescription": "32-bit extended addition"
1471 },
1472 {,
1473 "EventCode": "0x36080", 1373 "EventCode": "0x36080",
1474 "EventName": "PM_L2_INST", 1374 "EventName": "PM_L2_INST",
1475 "BriefDescription": "All successful I-side dispatches for this thread (excludes i_l2mru_tch reqs)." 1375 "BriefDescription": "All successful I-side dispatches for this thread (excludes i_l2mru_tch reqs)"
1476 }, 1376 },
1477 {, 1377 {,
1478 "EventCode": "0x3504C", 1378 "EventCode": "0x3504C",
@@ -1555,21 +1455,11 @@
1555 "BriefDescription": "Memory Read With Intent to Modify for this thread" 1455 "BriefDescription": "Memory Read With Intent to Modify for this thread"
1556 }, 1456 },
1557 {, 1457 {,
1558 "EventCode": "0x26882",
1559 "EventName": "PM_L2_DC_INV",
1560 "BriefDescription": "D-cache invalidates sent over the reload bus to the core"
1561 },
1562 {,
1563 "EventCode": "0xC090", 1458 "EventCode": "0xC090",
1564 "EventName": "PM_LSU_STCX", 1459 "EventName": "PM_LSU_STCX",
1565 "BriefDescription": "STCX sent to nest, i.e. total" 1460 "BriefDescription": "STCX sent to nest, i.e. total"
1566 }, 1461 },
1567 {, 1462 {,
1568 "EventCode": "0xD080",
1569 "EventName": "PM_LSU0_SET_MPRED",
1570 "BriefDescription": "Set prediction(set-p) miss. The entry was not found in the Set prediction table"
1571 },
1572 {,
1573 "EventCode": "0x2C120", 1463 "EventCode": "0x2C120",
1574 "EventName": "PM_MRK_DATA_FROM_L2_NO_CONFLICT", 1464 "EventName": "PM_MRK_DATA_FROM_L2_NO_CONFLICT",
1575 "BriefDescription": "The processor's data cache was reloaded from local core's L2 without conflict due to a marked load" 1465 "BriefDescription": "The processor's data cache was reloaded from local core's L2 without conflict due to a marked load"
@@ -1610,11 +1500,6 @@
1610 "BriefDescription": "A Page Table Entry was loaded into the TLB from local core's L2 without conflict due to a instruction side request" 1500 "BriefDescription": "A Page Table Entry was loaded into the TLB from local core's L2 without conflict due to a instruction side request"
1611 }, 1501 },
1612 {, 1502 {,
1613 "EventCode": "0xD9A0",
1614 "EventName": "PM_MRK_LSU_FLUSH_LHL_SHL",
1615 "BriefDescription": "The instruction was flushed because of a sequential load/store consistency. If a load or store hits on an older load that has either been snooped (for loads) or has stale data (for stores)."
1616 },
1617 {,
1618 "EventCode": "0x35042", 1503 "EventCode": "0x35042",
1619 "EventName": "PM_IPTEG_FROM_L3_DISP_CONFLICT", 1504 "EventName": "PM_IPTEG_FROM_L3_DISP_CONFLICT",
1620 "BriefDescription": "A Page Table Entry was loaded into the TLB from local core's L3 with dispatch conflict due to a instruction side request" 1505 "BriefDescription": "A Page Table Entry was loaded into the TLB from local core's L3 with dispatch conflict due to a instruction side request"
@@ -1692,7 +1577,7 @@
1692 {, 1577 {,
1693 "EventCode": "0x2001A", 1578 "EventCode": "0x2001A",
1694 "EventName": "PM_NTC_ALL_FIN", 1579 "EventName": "PM_NTC_ALL_FIN",
1695 "BriefDescription": "Cycles after all instructions have finished to group completed" 1580 "BriefDescription": "Cycles after instruction finished to instruction completed."
1696 }, 1581 },
1697 {, 1582 {,
1698 "EventCode": "0x3005A", 1583 "EventCode": "0x3005A",
@@ -1710,6 +1595,11 @@
1710 "BriefDescription": "ls1 l1 tm cam cancel" 1595 "BriefDescription": "ls1 l1 tm cam cancel"
1711 }, 1596 },
1712 {, 1597 {,
1598 "EventCode": "0x268AE",
1599 "EventName": "PM_L3_P3_PF_RTY",
1600 "BriefDescription": "L3 PF received retry port 3, every retry counted"
1601 },
1602 {,
1713 "EventCode": "0xE884", 1603 "EventCode": "0xE884",
1714 "EventName": "PM_LS1_ERAT_MISS_PREF", 1604 "EventName": "PM_LS1_ERAT_MISS_PREF",
1715 "BriefDescription": "LS1 Erat miss due to prefetch" 1605 "BriefDescription": "LS1 Erat miss due to prefetch"
@@ -1742,7 +1632,7 @@
1742 {, 1632 {,
1743 "EventCode": "0x160B6", 1633 "EventCode": "0x160B6",
1744 "EventName": "PM_L3_WI0_BUSY", 1634 "EventName": "PM_L3_WI0_BUSY",
1745 "BriefDescription": "Rotating sample of 8 WI valid" 1635 "BriefDescription": "Rotating sample of 8 WI valid (duplicate)"
1746 }, 1636 },
1747 {, 1637 {,
1748 "EventCode": "0x368AC", 1638 "EventCode": "0x368AC",
@@ -1790,9 +1680,9 @@
1790 "BriefDescription": "L2 guess system (VGS or RNS) and guess was correct (ie data beyond-group)" 1680 "BriefDescription": "L2 guess system (VGS or RNS) and guess was correct (ie data beyond-group)"
1791 }, 1681 },
1792 {, 1682 {,
1793 "EventCode": "0x589C", 1683 "EventCode": "0x260AE",
1794 "EventName": "PM_PTESYNC", 1684 "EventName": "PM_L3_P2_PF_RTY",
1795 "BriefDescription": "ptesync instruction counted when the instruction is decoded and transmitted" 1685 "BriefDescription": "L3 PF received retry port 2, every retry counted"
1796 }, 1686 },
1797 {, 1687 {,
1798 "EventCode": "0x26086", 1688 "EventCode": "0x26086",
@@ -1825,6 +1715,11 @@
1825 "BriefDescription": "Store-Hit-Load Table Read Hit with entry Enabled" 1715 "BriefDescription": "Store-Hit-Load Table Read Hit with entry Enabled"
1826 }, 1716 },
1827 {, 1717 {,
1718 "EventCode": "0x46882",
1719 "EventName": "PM_L2_ST_HIT",
1720 "BriefDescription": "All successful D-side store dispatches for this thread that were L2 hits"
1721 },
1722 {,
1828 "EventCode": "0x360AC", 1723 "EventCode": "0x360AC",
1829 "EventName": "PM_L3_SN0_BUSY", 1724 "EventName": "PM_L3_SN0_BUSY",
1830 "BriefDescription": "Lifetime, sample of snooper machine 0 valid" 1725 "BriefDescription": "Lifetime, sample of snooper machine 0 valid"
@@ -1845,11 +1740,6 @@
1845 "BriefDescription": "All successful D-Side Store dispatches that were an L2 miss for this thread" 1740 "BriefDescription": "All successful D-Side Store dispatches that were an L2 miss for this thread"
1846 }, 1741 },
1847 {, 1742 {,
1848 "EventCode": "0xF8B4",
1849 "EventName": "PM_DC_PREF_XCONS_ALLOC",
1850 "BriefDescription": "Prefetch stream allocated in the Ultra conservative phase by either the hardware prefetch mechanism or software prefetch"
1851 },
1852 {,
1853 "EventCode": "0x35048", 1743 "EventCode": "0x35048",
1854 "EventName": "PM_IPTEG_FROM_DL2L3_SHR", 1744 "EventName": "PM_IPTEG_FROM_DL2L3_SHR",
1855 "BriefDescription": "A Page Table Entry was loaded into the TLB with Shared (S) data from another chip's L2 or L3 on a different Node or Group (Distant), as this chip due to a instruction side request" 1745 "BriefDescription": "A Page Table Entry was loaded into the TLB with Shared (S) data from another chip's L2 or L3 on a different Node or Group (Distant), as this chip due to a instruction side request"
@@ -1970,11 +1860,6 @@
1970 "BriefDescription": "Cycles thread running at priority level 2 or 3" 1860 "BriefDescription": "Cycles thread running at priority level 2 or 3"
1971 }, 1861 },
1972 {, 1862 {,
1973 "EventCode": "0x10134",
1974 "EventName": "PM_MRK_ST_DONE_L2",
1975 "BriefDescription": "marked store completed in L2 ( RC machine done)"
1976 },
1977 {,
1978 "EventCode": "0x368B2", 1863 "EventCode": "0x368B2",
1979 "EventName": "PM_L3_GRP_GUESS_WRONG_HIGH", 1864 "EventName": "PM_L3_GRP_GUESS_WRONG_HIGH",
1980 "BriefDescription": "Initial scope=group (GS or NNS) but data from local node. Prediction too high" 1865 "BriefDescription": "Initial scope=group (GS or NNS) but data from local node. Prediction too high"
@@ -2005,11 +1890,6 @@
2005 "BriefDescription": "L2 guess grp (GS or NNS) and guess was not correct (ie data on-chip OR beyond-group)" 1890 "BriefDescription": "L2 guess grp (GS or NNS) and guess was not correct (ie data on-chip OR beyond-group)"
2006 }, 1891 },
2007 {, 1892 {,
2008 "EventCode": "0x368AE",
2009 "EventName": "PM_L3_P1_CO_RTY",
2010 "BriefDescription": "L3 CO received retry port 1 (memory only), every retry counted"
2011 },
2012 {,
2013 "EventCode": "0xC0AC", 1893 "EventCode": "0xC0AC",
2014 "EventName": "PM_LSU_FLUSH_EMSH", 1894 "EventName": "PM_LSU_FLUSH_EMSH",
2015 "BriefDescription": "An ERAT miss was detected after a set-p hit. Erat tracker indicates fail due to tlbmiss and the instruction gets flushed because the instruction was working on the wrong address" 1895 "BriefDescription": "An ERAT miss was detected after a set-p hit. Erat tracker indicates fail due to tlbmiss and the instruction gets flushed because the instruction was working on the wrong address"
@@ -2035,11 +1915,6 @@
2035 "BriefDescription": "RC requests that were on group (aka nodel) pump attempts" 1915 "BriefDescription": "RC requests that were on group (aka nodel) pump attempts"
2036 }, 1916 },
2037 {, 1917 {,
2038 "EventCode": "0xF0B0",
2039 "EventName": "PM_L3_LD_PREF",
2040 "BriefDescription": "L3 load prefetch, sourced from a hardware or software stream, was sent to the nest"
2041 },
2042 {,
2043 "EventCode": "0x16080", 1918 "EventCode": "0x16080",
2044 "EventName": "PM_L2_LD", 1919 "EventName": "PM_L2_LD",
2045 "BriefDescription": "All successful D-side Load dispatches for this thread (L2 miss + L2 hits)" 1920 "BriefDescription": "All successful D-side Load dispatches for this thread (L2 miss + L2 hits)"
@@ -2050,6 +1925,11 @@
2050 "BriefDescription": "Math flop instruction completed" 1925 "BriefDescription": "Math flop instruction completed"
2051 }, 1926 },
2052 {, 1927 {,
1928 "EventCode": "0xC080",
1929 "EventName": "PM_LS0_LD_VECTOR_FIN",
1930 "BriefDescription": ""
1931 },
1932 {,
2053 "EventCode": "0x368B0", 1933 "EventCode": "0x368B0",
2054 "EventName": "PM_L3_P1_SYS_PUMP", 1934 "EventName": "PM_L3_P1_SYS_PUMP",
2055 "BriefDescription": "L3 PF sent with sys scope port 1, counts even retried requests" 1935 "BriefDescription": "L3 PF sent with sys scope port 1, counts even retried requests"
@@ -2120,11 +2000,6 @@
2120 "BriefDescription": "Conditional Branch Completed in which the HW correctly predicted the direction as taken. Counted at completion time" 2000 "BriefDescription": "Conditional Branch Completed in which the HW correctly predicted the direction as taken. Counted at completion time"
2121 }, 2001 },
2122 {, 2002 {,
2123 "EventCode": "0xF0B8",
2124 "EventName": "PM_LS0_UNALIGNED_ST",
2125 "BriefDescription": "Store instructions whose data crosses a double-word boundary, which causes it to require an additional slice than than what normally would be required of the Store of that size. If the Store wraps from slice 3 to slice 0, thee is an additional 3-cycle penalty"
2126 },
2127 {,
2128 "EventCode": "0x20132", 2003 "EventCode": "0x20132",
2129 "EventName": "PM_MRK_DFU_FIN", 2004 "EventName": "PM_MRK_DFU_FIN",
2130 "BriefDescription": "Decimal Unit marked Instruction Finish" 2005 "BriefDescription": "Decimal Unit marked Instruction Finish"
@@ -2140,6 +2015,11 @@
2140 "BriefDescription": "Effective Address alias flush : no EA match but Real Address match. If the data has not yet been returned for this load, the instruction will just be rejected, but if it has returned data, it will be flushed" 2015 "BriefDescription": "Effective Address alias flush : no EA match but Real Address match. If the data has not yet been returned for this load, the instruction will just be rejected, but if it has returned data, it will be flushed"
2141 }, 2016 },
2142 {, 2017 {,
2018 "EventCode": "0x16084",
2019 "EventName": "PM_L2_RCLD_DISP",
2020 "BriefDescription": "All I-or-D side load dispatch attempts for this thread (excludes i_l2mru_tch_reqs)"
2021 },
2022 {,
2143 "EventCode": "0x3F150", 2023 "EventCode": "0x3F150",
2144 "EventName": "PM_MRK_ST_DRAIN_TO_L2DISP_CYC", 2024 "EventName": "PM_MRK_ST_DRAIN_TO_L2DISP_CYC",
2145 "BriefDescription": "cycles to drain st from core to L2" 2025 "BriefDescription": "cycles to drain st from core to L2"
@@ -2225,11 +2105,6 @@
2225 "BriefDescription": "Prefetch Canceled due to page boundary" 2105 "BriefDescription": "Prefetch Canceled due to page boundary"
2226 }, 2106 },
2227 {, 2107 {,
2228 "EventCode": "0xF09C",
2229 "EventName": "PM_SLB_TABLEWALK_CYC",
2230 "BriefDescription": "Cycles when a tablewalk is pending on this thread on the SLB table"
2231 },
2232 {,
2233 "EventCode": "0x460AA", 2108 "EventCode": "0x460AA",
2234 "EventName": "PM_L3_P0_CO_L31", 2109 "EventName": "PM_L3_P0_CO_L31",
2235 "BriefDescription": "L3 CO to L3.1 (LCO) port 0 with or without data" 2110 "BriefDescription": "L3 CO to L3.1 (LCO) port 0 with or without data"
@@ -2247,10 +2122,10 @@
2247 {, 2122 {,
2248 "EventCode": "0x46082", 2123 "EventCode": "0x46082",
2249 "EventName": "PM_L2_ST_DISP", 2124 "EventName": "PM_L2_ST_DISP",
2250 "BriefDescription": "All successful D-side store dispatches for this thread " 2125 "BriefDescription": "All successful D-side store dispatches for this thread (L2 miss + L2 hits)"
2251 }, 2126 },
2252 {, 2127 {,
2253 "EventCode": "0x4609E", 2128 "EventCode": "0x36880",
2254 "EventName": "PM_L2_INST_MISS", 2129 "EventName": "PM_L2_INST_MISS",
2255 "BriefDescription": "All successful I-side dispatches that were an L2 miss for this thread (excludes i_l2mru_tch reqs)" 2130 "BriefDescription": "All successful I-side dispatches that were an L2 miss for this thread (excludes i_l2mru_tch reqs)"
2256 }, 2131 },
@@ -2340,9 +2215,9 @@
2340 "BriefDescription": "All ISU rejects" 2215 "BriefDescription": "All ISU rejects"
2341 }, 2216 },
2342 {, 2217 {,
2343 "EventCode": "0x46882", 2218 "EventCode": "0xC884",
2344 "EventName": "PM_L2_ST_HIT", 2219 "EventName": "PM_LS3_LD_VECTOR_FIN",
2345 "BriefDescription": "All successful D-side store dispatches for this thread that were L2 hits" 2220 "BriefDescription": ""
2346 }, 2221 },
2347 {, 2222 {,
2348 "EventCode": "0x360A8", 2223 "EventCode": "0x360A8",
@@ -2360,11 +2235,6 @@
2360 "BriefDescription": "Asserts when a i=1 store op is sent to the nest. No record of issue pipe (LS0/LS1) is maintained so this is for both pipes. Probably don't need separate LS0 and LS1" 2235 "BriefDescription": "Asserts when a i=1 store op is sent to the nest. No record of issue pipe (LS0/LS1) is maintained so this is for both pipes. Probably don't need separate LS0 and LS1"
2361 }, 2236 },
2362 {, 2237 {,
2363 "EventCode": "0xD880",
2364 "EventName": "PM_LSU1_SET_MPRED",
2365 "BriefDescription": "Set prediction(set-p) miss. The entry was not found in the Set prediction table"
2366 },
2367 {,
2368 "EventCode": "0xD0B8", 2238 "EventCode": "0xD0B8",
2369 "EventName": "PM_LSU_LMQ_FULL_CYC", 2239 "EventName": "PM_LSU_LMQ_FULL_CYC",
2370 "BriefDescription": "Counts the number of cycles the LMQ is full" 2240 "BriefDescription": "Counts the number of cycles the LMQ is full"
@@ -2389,4 +2259,4 @@
2389 "EventName": "PM_L3_PF_USAGE", 2259 "EventName": "PM_L3_PF_USAGE",
2390 "BriefDescription": "Rotating sample of 32 PF actives" 2260 "BriefDescription": "Rotating sample of 32 PF actives"
2391 } 2261 }
2392] 2262] \ No newline at end of file
diff --git a/tools/perf/pmu-events/arch/powerpc/power9/pipeline.json b/tools/perf/pmu-events/arch/powerpc/power9/pipeline.json
index bc2db636dabf..5af1abbe82c4 100644
--- a/tools/perf/pmu-events/arch/powerpc/power9/pipeline.json
+++ b/tools/perf/pmu-events/arch/powerpc/power9/pipeline.json
@@ -125,6 +125,11 @@
125 "BriefDescription": "Overflow from counter 5" 125 "BriefDescription": "Overflow from counter 5"
126 }, 126 },
127 {, 127 {,
128 "EventCode": "0x4505E",
129 "EventName": "PM_FLOP_CMPL",
130 "BriefDescription": "Floating Point Operation Finished"
131 },
132 {,
128 "EventCode": "0x2C018", 133 "EventCode": "0x2C018",
129 "EventName": "PM_CMPLU_STALL_DMISS_L21_L31", 134 "EventName": "PM_CMPLU_STALL_DMISS_L21_L31",
130 "BriefDescription": "Completion stall by Dcache miss which resolved on chip ( excluding local L2/L3)" 135 "BriefDescription": "Completion stall by Dcache miss which resolved on chip ( excluding local L2/L3)"
@@ -390,11 +395,6 @@
390 "BriefDescription": "Ict empty for this thread due to branch mispred" 395 "BriefDescription": "Ict empty for this thread due to branch mispred"
391 }, 396 },
392 {, 397 {,
393 "EventCode": "0x3405E",
394 "EventName": "PM_IFETCH_THROTTLE",
395 "BriefDescription": "Cycles in which Instruction fetch throttle was active."
396 },
397 {,
398 "EventCode": "0x1F148", 398 "EventCode": "0x1F148",
399 "EventName": "PM_MRK_DPTEG_FROM_ON_CHIP_CACHE", 399 "EventName": "PM_MRK_DPTEG_FROM_ON_CHIP_CACHE",
400 "BriefDescription": "A Page Table Entry was loaded into the TLB either shared or modified data from another core's L2/L3 on the same chip due to a marked data side request.. When using Radix Page Translation, this count excludes PDE reloads. Only PTE reloads are included" 400 "BriefDescription": "A Page Table Entry was loaded into the TLB either shared or modified data from another core's L2/L3 on the same chip due to a marked data side request.. When using Radix Page Translation, this count excludes PDE reloads. Only PTE reloads are included"
@@ -422,7 +422,7 @@
422 {, 422 {,
423 "EventCode": "0xD0A8", 423 "EventCode": "0xD0A8",
424 "EventName": "PM_DSLB_MISS", 424 "EventName": "PM_DSLB_MISS",
425 "BriefDescription": "Data SLB Miss - Total of all segment sizes" 425 "BriefDescription": "gate_and(sd_pc_c0_comp_valid AND sd_pc_c0_comp_thread(0:1)=tid,sd_pc_c0_comp_ppc_count(0:3)) + gate_and(sd_pc_c1_comp_valid AND sd_pc_c1_comp_thread(0:1)=tid,sd_pc_c1_comp_ppc_count(0:3))"
426 }, 426 },
427 {, 427 {,
428 "EventCode": "0x4C058", 428 "EventCode": "0x4C058",
@@ -549,4 +549,4 @@
549 "EventName": "PM_MRK_DATA_FROM_L21_SHR_CYC", 549 "EventName": "PM_MRK_DATA_FROM_L21_SHR_CYC",
550 "BriefDescription": "Duration in cycles to reload with Shared (S) data from another core's L2 on the same chip due to a marked load" 550 "BriefDescription": "Duration in cycles to reload with Shared (S) data from another core's L2 on the same chip due to a marked load"
551 } 551 }
552] 552] \ No newline at end of file
diff --git a/tools/perf/pmu-events/arch/powerpc/power9/pmc.json b/tools/perf/pmu-events/arch/powerpc/power9/pmc.json
index 3ef8a10aac86..d0b89f930567 100644
--- a/tools/perf/pmu-events/arch/powerpc/power9/pmc.json
+++ b/tools/perf/pmu-events/arch/powerpc/power9/pmc.json
@@ -119,4 +119,4 @@
119 "EventName": "PM_1FLOP_CMPL", 119 "EventName": "PM_1FLOP_CMPL",
120 "BriefDescription": "one flop (fadd, fmul, fsub, fcmp, fsel, fabs, fnabs, fres, fsqrte, fneg) operation completed" 120 "BriefDescription": "one flop (fadd, fmul, fsub, fcmp, fsel, fabs, fnabs, fres, fsqrte, fneg) operation completed"
121 } 121 }
122] 122] \ No newline at end of file
diff --git a/tools/perf/pmu-events/arch/powerpc/power9/translation.json b/tools/perf/pmu-events/arch/powerpc/power9/translation.json
index 8c0f12024afa..bc8e03d7a6b0 100644
--- a/tools/perf/pmu-events/arch/powerpc/power9/translation.json
+++ b/tools/perf/pmu-events/arch/powerpc/power9/translation.json
@@ -90,11 +90,6 @@
90 "BriefDescription": "stcx failed" 90 "BriefDescription": "stcx failed"
91 }, 91 },
92 {, 92 {,
93 "EventCode": "0x20112",
94 "EventName": "PM_MRK_NTF_FIN",
95 "BriefDescription": "Marked next to finish instruction finished"
96 },
97 {,
98 "EventCode": "0x300F0", 93 "EventCode": "0x300F0",
99 "EventName": "PM_ST_MISS_L1", 94 "EventName": "PM_ST_MISS_L1",
100 "BriefDescription": "Store Missed L1" 95 "BriefDescription": "Store Missed L1"
diff --git a/tools/perf/pmu-events/arch/x86/broadwell/bdw-metrics.json b/tools/perf/pmu-events/arch/x86/broadwell/bdw-metrics.json
new file mode 100644
index 000000000000..00bfdb5c5acb
--- /dev/null
+++ b/tools/perf/pmu-events/arch/x86/broadwell/bdw-metrics.json
@@ -0,0 +1,164 @@
1[
2 {
3 "BriefDescription": "Instructions Per Cycle (per logical thread)",
4 "MetricExpr": "INST_RETIRED.ANY / CPU_CLK_UNHALTED.THREAD",
5 "MetricGroup": "TopDownL1",
6 "MetricName": "IPC"
7 },
8 {
9 "BriefDescription": "Uops Per Instruction",
10 "MetricExpr": "UOPS_RETIRED.RETIRE_SLOTS / INST_RETIRED.ANY",
11 "MetricGroup": "Pipeline",
12 "MetricName": "UPI"
13 },
14 {
15 "BriefDescription": "Rough Estimation of fraction of fetched lines bytes that were likely consumed by program instructions",
16 "MetricExpr": "min( 1 , IDQ.MITE_UOPS / ( (UOPS_RETIRED.RETIRE_SLOTS / INST_RETIRED.ANY) * 16 * ( ICACHE.HIT + ICACHE.MISSES ) / 4.0 ) )",
17 "MetricGroup": "Frontend",
18 "MetricName": "IFetch_Line_Utilization"
19 },
20 {
21 "BriefDescription": "Fraction of Uops delivered by the DSB (aka Decoded Icache; or Uop Cache)",
22 "MetricExpr": "IDQ.DSB_UOPS / ( IDQ.DSB_UOPS + LSD.UOPS + IDQ.MITE_UOPS + IDQ.MS_UOPS )",
23 "MetricGroup": "DSB; Frontend_Bandwidth",
24 "MetricName": "DSB_Coverage"
25 },
26 {
27 "BriefDescription": "Cycles Per Instruction (threaded)",
28 "MetricExpr": "1 / (INST_RETIRED.ANY / cycles)",
29 "MetricGroup": "Pipeline;Summary",
30 "MetricName": "CPI"
31 },
32 {
33 "BriefDescription": "Per-thread actual clocks when the logical processor is active. This is called 'Clockticks' in VTune.",
34 "MetricExpr": "CPU_CLK_UNHALTED.THREAD",
35 "MetricGroup": "Summary",
36 "MetricName": "CLKS"
37 },
38 {
39 "BriefDescription": "Total issue-pipeline slots",
40 "MetricExpr": "4*(( CPU_CLK_UNHALTED.THREAD_ANY / 2 ) if #SMT_on else cycles)",
41 "MetricGroup": "TopDownL1",
42 "MetricName": "SLOTS"
43 },
44 {
45 "BriefDescription": "Total number of retired Instructions",
46 "MetricExpr": "INST_RETIRED.ANY",
47 "MetricGroup": "Summary",
48 "MetricName": "Instructions"
49 },
50 {
51 "BriefDescription": "Instructions Per Cycle (per physical core)",
52 "MetricExpr": "INST_RETIRED.ANY / (( CPU_CLK_UNHALTED.THREAD_ANY / 2 ) if #SMT_on else cycles)",
53 "MetricGroup": "SMT",
54 "MetricName": "CoreIPC"
55 },
56 {
57 "BriefDescription": "Instruction-Level-Parallelism (average number of uops executed when there is at least 1 uop executed)",
58 "MetricExpr": "UOPS_EXECUTED.THREAD / (( cpu@UOPS_EXECUTED.CORE\\,cmask\\=1@ / 2) if #SMT_on else UOPS_EXECUTED.CYCLES_GE_1_UOP_EXEC)",
59 "MetricGroup": "Pipeline;Ports_Utilization",
60 "MetricName": "ILP"
61 },
62 {
63 "BriefDescription": "Average Branch Address Clear Cost (fraction of cycles)",
64 "MetricExpr": "2* (( RS_EVENTS.EMPTY_CYCLES - ICACHE.IFDATA_STALL - (( 14 * ITLB_MISSES.STLB_HIT + cpu@ITLB_MISSES.WALK_DURATION\\,cmask\\=1@ + 7* ITLB_MISSES.WALK_COMPLETED )) ) / RS_EVENTS.EMPTY_END)",
65 "MetricGroup": "Unknown_Branches",
66 "MetricName": "BAClear_Cost"
67 },
68 {
69 "BriefDescription": "Core actual clocks when any thread is active on the physical core",
70 "MetricExpr": "( CPU_CLK_UNHALTED.THREAD_ANY / 2 ) if #SMT_on else CPU_CLK_UNHALTED.THREAD",
71 "MetricGroup": "SMT",
72 "MetricName": "CORE_CLKS"
73 },
74 {
75 "BriefDescription": "Actual Average Latency for L1 data-cache miss demand loads",
76 "MetricExpr": "L1D_PEND_MISS.PENDING / ( MEM_LOAD_UOPS_RETIRED.L1_MISS + mem_load_uops_retired.hit_lfb )",
77 "MetricGroup": "Memory_Bound;Memory_Lat",
78 "MetricName": "Load_Miss_Real_Latency"
79 },
80 {
81 "BriefDescription": "Memory-Level-Parallelism (average number of L1 miss demand load when there is at least 1 such miss)",
82 "MetricExpr": "L1D_PEND_MISS.PENDING / (( cpu@l1d_pend_miss.pending_cycles\\,any\\=1@ / 2) if #SMT_on else L1D_PEND_MISS.PENDING_CYCLES)",
83 "MetricGroup": "Memory_Bound;Memory_BW",
84 "MetricName": "MLP"
85 },
86 {
87 "BriefDescription": "Utilization of the core's Page Walker(s) serving STLB misses triggered by instruction/Load/Store accesses",
88 "MetricExpr": "( cpu@ITLB_MISSES.WALK_DURATION\\,cmask\\=1@ + cpu@DTLB_LOAD_MISSES.WALK_DURATION\\,cmask\\=1@ + cpu@DTLB_STORE_MISSES.WALK_DURATION\\,cmask\\=1@ + 7*(DTLB_STORE_MISSES.WALK_COMPLETED+DTLB_LOAD_MISSES.WALK_COMPLETED+ITLB_MISSES.WALK_COMPLETED)) / (( CPU_CLK_UNHALTED.THREAD_ANY / 2 ) if #SMT_on else cycles)",
89 "MetricGroup": "TLB",
90 "MetricName": "Page_Walks_Utilization"
91 },
92 {
93 "BriefDescription": "Average CPU Utilization",
94 "MetricExpr": "CPU_CLK_UNHALTED.REF_TSC / msr@tsc@",
95 "MetricGroup": "Summary",
96 "MetricName": "CPU_Utilization"
97 },
98 {
99 "BriefDescription": "Giga Floating Point Operations Per Second",
100 "MetricExpr": "(( 1*( FP_ARITH_INST_RETIRED.SCALAR_SINGLE + FP_ARITH_INST_RETIRED.SCALAR_DOUBLE ) + 2* FP_ARITH_INST_RETIRED.128B_PACKED_DOUBLE + 4*( FP_ARITH_INST_RETIRED.128B_PACKED_SINGLE + FP_ARITH_INST_RETIRED.256B_PACKED_DOUBLE ) + 8* FP_ARITH_INST_RETIRED.256B_PACKED_SINGLE )) / 1000000000 / duration_time",
101 "MetricGroup": "FLOPS;Summary",
102 "MetricName": "GFLOPs"
103 },
104 {
105 "BriefDescription": "Average Frequency Utilization relative nominal frequency",
106 "MetricExpr": "CPU_CLK_UNHALTED.THREAD / CPU_CLK_UNHALTED.REF_TSC",
107 "MetricGroup": "Power",
108 "MetricName": "Turbo_Utilization"
109 },
110 {
111 "BriefDescription": "Fraction of cycles where both hardware threads were active",
112 "MetricExpr": "1 - CPU_CLK_THREAD_UNHALTED.ONE_THREAD_ACTIVE / ( CPU_CLK_THREAD_UNHALTED.REF_XCLK_ANY / 2 ) if #SMT_on else 0",
113 "MetricGroup": "SMT;Summary",
114 "MetricName": "SMT_2T_Utilization"
115 },
116 {
117 "BriefDescription": "Fraction of cycles spent in Kernel mode",
118 "MetricExpr": "CPU_CLK_UNHALTED.REF_TSC:u / CPU_CLK_UNHALTED.REF_TSC",
119 "MetricGroup": "Summary",
120 "MetricName": "Kernel_Utilization"
121 },
122 {
123 "BriefDescription": "C3 residency percent per core",
124 "MetricExpr": "(cstate_core@c3\\-residency@ / msr@tsc@) * 100",
125 "MetricGroup": "Power",
126 "MetricName": "C3_Core_Residency"
127 },
128 {
129 "BriefDescription": "C6 residency percent per core",
130 "MetricExpr": "(cstate_core@c6\\-residency@ / msr@tsc@) * 100",
131 "MetricGroup": "Power",
132 "MetricName": "C6_Core_Residency"
133 },
134 {
135 "BriefDescription": "C7 residency percent per core",
136 "MetricExpr": "(cstate_core@c7\\-residency@ / msr@tsc@) * 100",
137 "MetricGroup": "Power",
138 "MetricName": "C7_Core_Residency"
139 },
140 {
141 "BriefDescription": "C2 residency percent per package",
142 "MetricExpr": "(cstate_pkg@c2\\-residency@ / msr@tsc@) * 100",
143 "MetricGroup": "Power",
144 "MetricName": "C2_Pkg_Residency"
145 },
146 {
147 "BriefDescription": "C3 residency percent per package",
148 "MetricExpr": "(cstate_pkg@c3\\-residency@ / msr@tsc@) * 100",
149 "MetricGroup": "Power",
150 "MetricName": "C3_Pkg_Residency"
151 },
152 {
153 "BriefDescription": "C6 residency percent per package",
154 "MetricExpr": "(cstate_pkg@c6\\-residency@ / msr@tsc@) * 100",
155 "MetricGroup": "Power",
156 "MetricName": "C6_Pkg_Residency"
157 },
158 {
159 "BriefDescription": "C7 residency percent per package",
160 "MetricExpr": "(cstate_pkg@c7\\-residency@ / msr@tsc@) * 100",
161 "MetricGroup": "Power",
162 "MetricName": "C7_Pkg_Residency"
163 }
164]
diff --git a/tools/perf/pmu-events/arch/x86/broadwell/cache.json b/tools/perf/pmu-events/arch/x86/broadwell/cache.json
index 73688a9dab2a..bba3152ec54a 100644
--- a/tools/perf/pmu-events/arch/x86/broadwell/cache.json
+++ b/tools/perf/pmu-events/arch/x86/broadwell/cache.json
@@ -10,13 +10,30 @@
10 "CounterHTOff": "0,1,2,3,4,5,6,7" 10 "CounterHTOff": "0,1,2,3,4,5,6,7"
11 }, 11 },
12 { 12 {
13 "PublicDescription": "This event counts the number of demand Data Read requests that hit L2 cache. Only not rejected loads are counted.",
14 "EventCode": "0x24", 13 "EventCode": "0x24",
15 "Counter": "0,1,2,3", 14 "Counter": "0,1,2,3",
16 "UMask": "0x41", 15 "UMask": "0x22",
17 "EventName": "L2_RQSTS.DEMAND_DATA_RD_HIT", 16 "EventName": "L2_RQSTS.RFO_MISS",
18 "SampleAfterValue": "200003", 17 "SampleAfterValue": "200003",
19 "BriefDescription": "Demand Data Read requests that hit L2 cache", 18 "BriefDescription": "RFO requests that miss L2 cache.",
19 "CounterHTOff": "0,1,2,3,4,5,6,7"
20 },
21 {
22 "EventCode": "0x24",
23 "Counter": "0,1,2,3",
24 "UMask": "0x24",
25 "EventName": "L2_RQSTS.CODE_RD_MISS",
26 "SampleAfterValue": "200003",
27 "BriefDescription": "L2 cache misses when fetching instructions.",
28 "CounterHTOff": "0,1,2,3,4,5,6,7"
29 },
30 {
31 "EventCode": "0x24",
32 "Counter": "0,1,2,3",
33 "UMask": "0x27",
34 "EventName": "L2_RQSTS.ALL_DEMAND_MISS",
35 "SampleAfterValue": "200003",
36 "BriefDescription": "Demand requests that miss L2 cache.",
20 "CounterHTOff": "0,1,2,3,4,5,6,7" 37 "CounterHTOff": "0,1,2,3,4,5,6,7"
21 }, 38 },
22 { 39 {
@@ -30,6 +47,43 @@
30 "CounterHTOff": "0,1,2,3,4,5,6,7" 47 "CounterHTOff": "0,1,2,3,4,5,6,7"
31 }, 48 },
32 { 49 {
50 "EventCode": "0x24",
51 "Counter": "0,1,2,3",
52 "UMask": "0x3f",
53 "EventName": "L2_RQSTS.MISS",
54 "SampleAfterValue": "200003",
55 "BriefDescription": "All requests that miss L2 cache.",
56 "CounterHTOff": "0,1,2,3,4,5,6,7"
57 },
58 {
59 "PublicDescription": "This event counts the number of demand Data Read requests that hit L2 cache. Only not rejected loads are counted.",
60 "EventCode": "0x24",
61 "Counter": "0,1,2,3",
62 "UMask": "0x41",
63 "EventName": "L2_RQSTS.DEMAND_DATA_RD_HIT",
64 "SampleAfterValue": "200003",
65 "BriefDescription": "Demand Data Read requests that hit L2 cache",
66 "CounterHTOff": "0,1,2,3,4,5,6,7"
67 },
68 {
69 "EventCode": "0x24",
70 "Counter": "0,1,2,3",
71 "UMask": "0x42",
72 "EventName": "L2_RQSTS.RFO_HIT",
73 "SampleAfterValue": "200003",
74 "BriefDescription": "RFO requests that hit L2 cache.",
75 "CounterHTOff": "0,1,2,3,4,5,6,7"
76 },
77 {
78 "EventCode": "0x24",
79 "Counter": "0,1,2,3",
80 "UMask": "0x44",
81 "EventName": "L2_RQSTS.CODE_RD_HIT",
82 "SampleAfterValue": "200003",
83 "BriefDescription": "L2 cache hits when fetching instructions, code reads.",
84 "CounterHTOff": "0,1,2,3,4,5,6,7"
85 },
86 {
33 "PublicDescription": "This event counts the number of requests from the L2 hardware prefetchers that hit L2 cache. L3 prefetch new types.", 87 "PublicDescription": "This event counts the number of requests from the L2 hardware prefetchers that hit L2 cache. L3 prefetch new types.",
34 "EventCode": "0x24", 88 "EventCode": "0x24",
35 "Counter": "0,1,2,3", 89 "Counter": "0,1,2,3",
@@ -70,6 +124,15 @@
70 "CounterHTOff": "0,1,2,3,4,5,6,7" 124 "CounterHTOff": "0,1,2,3,4,5,6,7"
71 }, 125 },
72 { 126 {
127 "EventCode": "0x24",
128 "Counter": "0,1,2,3",
129 "UMask": "0xe7",
130 "EventName": "L2_RQSTS.ALL_DEMAND_REFERENCES",
131 "SampleAfterValue": "200003",
132 "BriefDescription": "Demand requests to L2 cache.",
133 "CounterHTOff": "0,1,2,3,4,5,6,7"
134 },
135 {
73 "PublicDescription": "This event counts the total number of requests from the L2 hardware prefetchers.", 136 "PublicDescription": "This event counts the total number of requests from the L2 hardware prefetchers.",
74 "EventCode": "0x24", 137 "EventCode": "0x24",
75 "Counter": "0,1,2,3", 138 "Counter": "0,1,2,3",
@@ -80,6 +143,15 @@
80 "CounterHTOff": "0,1,2,3,4,5,6,7" 143 "CounterHTOff": "0,1,2,3,4,5,6,7"
81 }, 144 },
82 { 145 {
146 "EventCode": "0x24",
147 "Counter": "0,1,2,3",
148 "UMask": "0xff",
149 "EventName": "L2_RQSTS.REFERENCES",
150 "SampleAfterValue": "200003",
151 "BriefDescription": "All L2 requests.",
152 "CounterHTOff": "0,1,2,3,4,5,6,7"
153 },
154 {
83 "PublicDescription": "This event counts the number of WB requests that hit L2 cache.", 155 "PublicDescription": "This event counts the number of WB requests that hit L2 cache.",
84 "EventCode": "0x27", 156 "EventCode": "0x27",
85 "Counter": "0,1,2,3", 157 "Counter": "0,1,2,3",
@@ -131,6 +203,27 @@
131 "CounterHTOff": "2" 203 "CounterHTOff": "2"
132 }, 204 },
133 { 205 {
206 "EventCode": "0x48",
207 "Counter": "2",
208 "UMask": "0x1",
209 "AnyThread": "1",
210 "EventName": "L1D_PEND_MISS.PENDING_CYCLES_ANY",
211 "SampleAfterValue": "2000003",
212 "BriefDescription": "Cycles with L1D load Misses outstanding from any thread on physical core.",
213 "CounterMask": "1",
214 "CounterHTOff": "2"
215 },
216 {
217 "EventCode": "0x48",
218 "Counter": "0,1,2,3",
219 "UMask": "0x2",
220 "EventName": "L1D_PEND_MISS.FB_FULL",
221 "SampleAfterValue": "2000003",
222 "BriefDescription": "Cycles a demand request was blocked due to Fill Buffers inavailability.",
223 "CounterMask": "1",
224 "CounterHTOff": "0,1,2,3,4,5,6,7"
225 },
226 {
134 "PublicDescription": "This event counts L1D data line replacements including opportunistic replacements, and replacements that require stall-for-replace or block-for-replace.", 227 "PublicDescription": "This event counts L1D data line replacements including opportunistic replacements, and replacements that require stall-for-replace or block-for-replace.",
135 "EventCode": "0x51", 228 "EventCode": "0x51",
136 "Counter": "0,1,2,3", 229 "Counter": "0,1,2,3",
@@ -152,7 +245,30 @@
152 "CounterHTOff": "0,1,2,3,4,5,6,7" 245 "CounterHTOff": "0,1,2,3,4,5,6,7"
153 }, 246 },
154 { 247 {
155 "PublicDescription": "This event counts the number of offcore outstanding Code Reads transactions in the super queue every cycle. The \"Offcore outstanding\" state of the transaction lasts from the L2 miss until the sending transaction completion to requestor (SQ deallocation). See the corresponding Umask under OFFCORE_REQUESTS.", 248 "PublicDescription": "This event counts cycles when offcore outstanding Demand Data Read transactions are present in the super queue (SQ). A transaction is considered to be in the Offcore outstanding state between L2 miss and transaction completion sent to requestor (SQ de-allocation).",
249 "EventCode": "0x60",
250 "Counter": "0,1,2,3",
251 "UMask": "0x1",
252 "Errata": "BDM76",
253 "EventName": "OFFCORE_REQUESTS_OUTSTANDING.CYCLES_WITH_DEMAND_DATA_RD",
254 "SampleAfterValue": "2000003",
255 "BriefDescription": "Cycles when offcore outstanding Demand Data Read transactions are present in SuperQueue (SQ), queue to uncore",
256 "CounterMask": "1",
257 "CounterHTOff": "0,1,2,3,4,5,6,7"
258 },
259 {
260 "EventCode": "0x60",
261 "Counter": "0,1,2,3",
262 "UMask": "0x1",
263 "Errata": "BDM76",
264 "EventName": "OFFCORE_REQUESTS_OUTSTANDING.DEMAND_DATA_RD_GE_6",
265 "SampleAfterValue": "2000003",
266 "BriefDescription": "Cycles with at least 6 offcore outstanding Demand Data Read transactions in uncore queue.",
267 "CounterMask": "6",
268 "CounterHTOff": "0,1,2,3,4,5,6,7"
269 },
270 {
271 "PublicDescription": "This event counts the number of offcore outstanding Code Reads transactions in the super queue every cycle. The Offcore outstanding state of the transaction lasts from the L2 miss until the sending transaction completion to requestor (SQ deallocation). See the corresponding Umask under OFFCORE_REQUESTS.",
156 "EventCode": "0x60", 272 "EventCode": "0x60",
157 "Counter": "0,1,2,3", 273 "Counter": "0,1,2,3",
158 "UMask": "0x2", 274 "UMask": "0x2",
@@ -174,26 +290,26 @@
174 "CounterHTOff": "0,1,2,3,4,5,6,7" 290 "CounterHTOff": "0,1,2,3,4,5,6,7"
175 }, 291 },
176 { 292 {
177 "PublicDescription": "This event counts the number of offcore outstanding cacheable Core Data Read transactions in the super queue every cycle. A transaction is considered to be in the Offcore outstanding state between L2 miss and transaction completion sent to requestor (SQ de-allocation). See corresponding Umask under OFFCORE_REQUESTS.", 293 "PublicDescription": "This event counts the number of offcore outstanding demand rfo Reads transactions in the super queue every cycle. The Offcore outstanding state of the transaction lasts from the L2 miss until the sending transaction completion to requestor (SQ deallocation). See the corresponding Umask under OFFCORE_REQUESTS.",
178 "EventCode": "0x60", 294 "EventCode": "0x60",
179 "Counter": "0,1,2,3", 295 "Counter": "0,1,2,3",
180 "UMask": "0x8", 296 "UMask": "0x4",
181 "Errata": "BDM76", 297 "Errata": "BDM76",
182 "EventName": "OFFCORE_REQUESTS_OUTSTANDING.ALL_DATA_RD", 298 "EventName": "OFFCORE_REQUESTS_OUTSTANDING.CYCLES_WITH_DEMAND_RFO",
183 "SampleAfterValue": "2000003", 299 "SampleAfterValue": "2000003",
184 "BriefDescription": "Offcore outstanding cacheable Core Data Read transactions in SuperQueue (SQ), queue to uncore", 300 "BriefDescription": "Offcore outstanding demand rfo reads transactions in SuperQueue (SQ), queue to uncore, every cycle",
301 "CounterMask": "1",
185 "CounterHTOff": "0,1,2,3,4,5,6,7" 302 "CounterHTOff": "0,1,2,3,4,5,6,7"
186 }, 303 },
187 { 304 {
188 "PublicDescription": "This event counts cycles when offcore outstanding Demand Data Read transactions are present in the super queue (SQ). A transaction is considered to be in the Offcore outstanding state between L2 miss and transaction completion sent to requestor (SQ de-allocation).", 305 "PublicDescription": "This event counts the number of offcore outstanding cacheable Core Data Read transactions in the super queue every cycle. A transaction is considered to be in the Offcore outstanding state between L2 miss and transaction completion sent to requestor (SQ de-allocation). See corresponding Umask under OFFCORE_REQUESTS.",
189 "EventCode": "0x60", 306 "EventCode": "0x60",
190 "Counter": "0,1,2,3", 307 "Counter": "0,1,2,3",
191 "UMask": "0x1", 308 "UMask": "0x8",
192 "Errata": "BDM76", 309 "Errata": "BDM76",
193 "EventName": "OFFCORE_REQUESTS_OUTSTANDING.CYCLES_WITH_DEMAND_DATA_RD", 310 "EventName": "OFFCORE_REQUESTS_OUTSTANDING.ALL_DATA_RD",
194 "SampleAfterValue": "2000003", 311 "SampleAfterValue": "2000003",
195 "BriefDescription": "Cycles when offcore outstanding Demand Data Read transactions are present in SuperQueue (SQ), queue to uncore", 312 "BriefDescription": "Offcore outstanding cacheable Core Data Read transactions in SuperQueue (SQ), queue to uncore",
196 "CounterMask": "1",
197 "CounterHTOff": "0,1,2,3,4,5,6,7" 313 "CounterHTOff": "0,1,2,3,4,5,6,7"
198 }, 314 },
199 { 315 {
@@ -209,18 +325,6 @@
209 "CounterHTOff": "0,1,2,3,4,5,6,7" 325 "CounterHTOff": "0,1,2,3,4,5,6,7"
210 }, 326 },
211 { 327 {
212 "PublicDescription": "This event counts the number of offcore outstanding demand rfo Reads transactions in the super queue every cycle. The \"Offcore outstanding\" state of the transaction lasts from the L2 miss until the sending transaction completion to requestor (SQ deallocation). See the corresponding Umask under OFFCORE_REQUESTS.",
213 "EventCode": "0x60",
214 "Counter": "0,1,2,3",
215 "UMask": "0x4",
216 "Errata": "BDM76",
217 "EventName": "OFFCORE_REQUESTS_OUTSTANDING.CYCLES_WITH_DEMAND_RFO",
218 "SampleAfterValue": "2000003",
219 "BriefDescription": "Offcore outstanding demand rfo reads transactions in SuperQueue (SQ), queue to uncore, every cycle",
220 "CounterMask": "1",
221 "CounterHTOff": "0,1,2,3,4,5,6,7"
222 },
223 {
224 "PublicDescription": "This event counts the number of cycles when the L1D is locked. It is a superset of the 0x1 mask (BUS_LOCK_CLOCKS.BUS_LOCK_DURATION).", 328 "PublicDescription": "This event counts the number of cycles when the L1D is locked. It is a superset of the 0x1 mask (BUS_LOCK_CLOCKS.BUS_LOCK_DURATION).",
225 "EventCode": "0x63", 329 "EventCode": "0x63",
226 "Counter": "0,1,2,3", 330 "Counter": "0,1,2,3",
@@ -261,7 +365,7 @@
261 "CounterHTOff": "0,1,2,3,4,5,6,7" 365 "CounterHTOff": "0,1,2,3,4,5,6,7"
262 }, 366 },
263 { 367 {
264 "PublicDescription": "This event counts the demand and prefetch data reads. All Core Data Reads include cacheable \"Demands\" and L2 prefetchers (not L3 prefetchers). Counting also covers reads due to page walks resulted from any request type.", 368 "PublicDescription": "This event counts the demand and prefetch data reads. All Core Data Reads include cacheable Demands and L2 prefetchers (not L3 prefetchers). Counting also covers reads due to page walks resulted from any request type.",
265 "EventCode": "0xB0", 369 "EventCode": "0xB0",
266 "Counter": "0,1,2,3", 370 "Counter": "0,1,2,3",
267 "UMask": "0x8", 371 "UMask": "0x8",
@@ -281,152 +385,161 @@
281 "CounterHTOff": "0,1,2,3,4,5,6,7" 385 "CounterHTOff": "0,1,2,3,4,5,6,7"
282 }, 386 },
283 { 387 {
388 "EventCode": "0xB7, 0xBB",
389 "Counter": "0,1,2,3",
390 "UMask": "0x1",
391 "EventName": "OFFCORE_RESPONSE",
392 "SampleAfterValue": "100003",
393 "BriefDescription": "Offcore response can be programmed only with a specific pair of event select and counter MSR, and with specific event codes and predefine mask bit value in a dedicated MSR to specify attributes of the offcore transaction.",
394 "CounterHTOff": "0,1,2,3"
395 },
396 {
284 "PEBS": "1", 397 "PEBS": "1",
285 "PublicDescription": "This is a non-precise version (that is, does not use PEBS) of the event that counts load uops with true STLB miss retired to the architected path. True STLB miss is an uop triggering page walk that gets completed without blocks, and later gets retired. This page walk can end up with or without a fault.", 398 "PublicDescription": "This is a precise version (that is, uses PEBS) of the event that counts load uops with true STLB miss retired to the architected path. True STLB miss is an uop triggering page walk that gets completed without blocks, and later gets retired. This page walk can end up with or without a fault.",
286 "EventCode": "0xD0", 399 "EventCode": "0xD0",
287 "Counter": "0,1,2,3", 400 "Counter": "0,1,2,3",
288 "UMask": "0x11", 401 "UMask": "0x11",
289 "EventName": "MEM_UOPS_RETIRED.STLB_MISS_LOADS", 402 "EventName": "MEM_UOPS_RETIRED.STLB_MISS_LOADS",
290 "SampleAfterValue": "100003", 403 "SampleAfterValue": "100003",
291 "BriefDescription": "Retired load uops that miss the STLB.", 404 "BriefDescription": "Retired load uops that miss the STLB. (Precise Event - PEBS)",
292 "CounterHTOff": "0,1,2,3", 405 "CounterHTOff": "0,1,2,3",
293 "Data_LA": "1" 406 "Data_LA": "1"
294 }, 407 },
295 { 408 {
296 "PEBS": "1", 409 "PEBS": "1",
297 "PublicDescription": "This is a non-precise version (that is, does not use PEBS) of the event that counts store uops with true STLB miss retired to the architected path. True STLB miss is an uop triggering page walk that gets completed without blocks, and later gets retired. This page walk can end up with or without a fault.", 410 "PublicDescription": "This is a precise version (that is, uses PEBS) of the event that counts store uops true STLB miss retired to the architected path. True STLB miss is an uop triggering page walk that gets completed without blocks, and later gets retired. This page walk can end up with or without a fault.",
298 "EventCode": "0xD0", 411 "EventCode": "0xD0",
299 "Counter": "0,1,2,3", 412 "Counter": "0,1,2,3",
300 "UMask": "0x12", 413 "UMask": "0x12",
301 "EventName": "MEM_UOPS_RETIRED.STLB_MISS_STORES", 414 "EventName": "MEM_UOPS_RETIRED.STLB_MISS_STORES",
302 "SampleAfterValue": "100003", 415 "SampleAfterValue": "100003",
303 "BriefDescription": "Retired store uops that miss the STLB.", 416 "BriefDescription": "Retired store uops that miss the STLB. (Precise Event - PEBS)",
304 "CounterHTOff": "0,1,2,3", 417 "CounterHTOff": "0,1,2,3",
305 "Data_LA": "1", 418 "Data_LA": "1",
306 "L1_Hit_Indication": "1" 419 "L1_Hit_Indication": "1"
307 }, 420 },
308 { 421 {
309 "PEBS": "1", 422 "PEBS": "1",
310 "PublicDescription": "This is a non-precise version (that is, does not use PEBS) of the event that counts load uops with locked access retired to the architected path.", 423 "PublicDescription": "This is a precise version (that is, uses PEBS) of the event that counts load uops with locked access retired to the architected path.",
311 "EventCode": "0xD0", 424 "EventCode": "0xD0",
312 "Counter": "0,1,2,3", 425 "Counter": "0,1,2,3",
313 "UMask": "0x21", 426 "UMask": "0x21",
314 "Errata": "BDM35", 427 "Errata": "BDM35",
315 "EventName": "MEM_UOPS_RETIRED.LOCK_LOADS", 428 "EventName": "MEM_UOPS_RETIRED.LOCK_LOADS",
316 "SampleAfterValue": "100007", 429 "SampleAfterValue": "100007",
317 "BriefDescription": "Retired load uops with locked access.", 430 "BriefDescription": "Retired load uops with locked access. (Precise Event - PEBS)",
318 "CounterHTOff": "0,1,2,3", 431 "CounterHTOff": "0,1,2,3",
319 "Data_LA": "1" 432 "Data_LA": "1"
320 }, 433 },
321 { 434 {
322 "PEBS": "1", 435 "PEBS": "1",
323 "PublicDescription": "This is a non-precise version (that is, does not use PEBS) of the event that counts line-splitted load uops retired to the architected path. A line split is across 64B cache-line which includes a page split (4K).", 436 "PublicDescription": "This is a precise version (that is, uses PEBS) of the event that counts line-splitted load uops retired to the architected path. A line split is across 64B cache-line which includes a page split (4K).",
324 "EventCode": "0xD0", 437 "EventCode": "0xD0",
325 "Counter": "0,1,2,3", 438 "Counter": "0,1,2,3",
326 "UMask": "0x41", 439 "UMask": "0x41",
327 "EventName": "MEM_UOPS_RETIRED.SPLIT_LOADS", 440 "EventName": "MEM_UOPS_RETIRED.SPLIT_LOADS",
328 "SampleAfterValue": "100003", 441 "SampleAfterValue": "100003",
329 "BriefDescription": "Retired load uops that split across a cacheline boundary.", 442 "BriefDescription": "Retired load uops that split across a cacheline boundary.(Precise Event - PEBS)",
330 "CounterHTOff": "0,1,2,3", 443 "CounterHTOff": "0,1,2,3",
331 "Data_LA": "1" 444 "Data_LA": "1"
332 }, 445 },
333 { 446 {
334 "PEBS": "1", 447 "PEBS": "1",
335 "PublicDescription": "This is a non-precise version (that is, does not use PEBS) of the event that counts line-splitted store uops retired to the architected path. A line split is across 64B cache-line which includes a page split (4K).", 448 "PublicDescription": "This is a precise version (that is, uses PEBS) of the event that counts line-splitted store uops retired to the architected path. A line split is across 64B cache-line which includes a page split (4K).",
336 "EventCode": "0xD0", 449 "EventCode": "0xD0",
337 "Counter": "0,1,2,3", 450 "Counter": "0,1,2,3",
338 "UMask": "0x42", 451 "UMask": "0x42",
339 "EventName": "MEM_UOPS_RETIRED.SPLIT_STORES", 452 "EventName": "MEM_UOPS_RETIRED.SPLIT_STORES",
340 "SampleAfterValue": "100003", 453 "SampleAfterValue": "100003",
341 "BriefDescription": "Retired store uops that split across a cacheline boundary.", 454 "BriefDescription": "Retired store uops that split across a cacheline boundary. (Precise Event - PEBS)",
342 "CounterHTOff": "0,1,2,3", 455 "CounterHTOff": "0,1,2,3",
343 "Data_LA": "1", 456 "Data_LA": "1",
344 "L1_Hit_Indication": "1" 457 "L1_Hit_Indication": "1"
345 }, 458 },
346 { 459 {
347 "PEBS": "1", 460 "PEBS": "1",
348 "PublicDescription": "This event counts load uops retired to the architected path with a filter on bits 0 and 1 applied.\nNote: This event counts AVX-256bit load/store double-pump memory uops as a single uop at retirement. This event also counts SW prefetches.", 461 "PublicDescription": "This is a precise version (that is, uses PEBS) of the event that counts load uops retired to the architected path with a filter on bits 0 and 1 applied.\nNote: This event ?ounts AVX-256bit load/store double-pump memory uops as a single uop at retirement. This event also counts SW prefetches.",
349 "EventCode": "0xD0", 462 "EventCode": "0xD0",
350 "Counter": "0,1,2,3", 463 "Counter": "0,1,2,3",
351 "UMask": "0x81", 464 "UMask": "0x81",
352 "EventName": "MEM_UOPS_RETIRED.ALL_LOADS", 465 "EventName": "MEM_UOPS_RETIRED.ALL_LOADS",
353 "SampleAfterValue": "2000003", 466 "SampleAfterValue": "2000003",
354 "BriefDescription": "All retired load uops.", 467 "BriefDescription": "All retired load uops. (Precise Event - PEBS)",
355 "CounterHTOff": "0,1,2,3", 468 "CounterHTOff": "0,1,2,3",
356 "Data_LA": "1" 469 "Data_LA": "1"
357 }, 470 },
358 { 471 {
359 "PEBS": "1", 472 "PEBS": "1",
360 "PublicDescription": "This event counts store uops retired to the architected path with a filter on bits 0 and 1 applied.\nNote: This event counts AVX-256bit load/store double-pump memory uops as a single uop at retirement.", 473 "PublicDescription": "This is a precise version (that is, uses PEBS) of the event that counts store uops retired to the architected path with a filter on bits 0 and 1 applied.\nNote: This event ?ounts AVX-256bit load/store double-pump memory uops as a single uop at retirement.",
361 "EventCode": "0xD0", 474 "EventCode": "0xD0",
362 "Counter": "0,1,2,3", 475 "Counter": "0,1,2,3",
363 "UMask": "0x82", 476 "UMask": "0x82",
364 "EventName": "MEM_UOPS_RETIRED.ALL_STORES", 477 "EventName": "MEM_UOPS_RETIRED.ALL_STORES",
365 "SampleAfterValue": "2000003", 478 "SampleAfterValue": "2000003",
366 "BriefDescription": "All retired store uops.", 479 "BriefDescription": "Retired store uops that split across a cacheline boundary. (Precise Event - PEBS)",
367 "CounterHTOff": "0,1,2,3", 480 "CounterHTOff": "0,1,2,3",
368 "Data_LA": "1", 481 "Data_LA": "1",
369 "L1_Hit_Indication": "1" 482 "L1_Hit_Indication": "1"
370 }, 483 },
371 { 484 {
372 "PEBS": "1", 485 "PEBS": "1",
373 "PublicDescription": "This is a non-precise version (that is, does not use PEBS) of the event that counts retired load uops which data sources were hits in the nearest-level (L1) cache.\nNote: Only two data-sources of L1/FB are applicable for AVX-256bit even though the corresponding AVX load could be serviced by a deeper level in the memory hierarchy. Data source is reported for the Low-half load. This event also counts SW prefetches independent of the actual data source.", 486 "PublicDescription": "This is a precise version (that is, uses PEBS) of the event that counts retired load uops which data source were hits in the nearest-level (L1) cache.\nNote: Only two data-sources of L1/FB are applicable for AVX-256bit even though the corresponding AVX load could be serviced by a deeper level in the memory hierarchy. Data source is reported for the Low-half load. This event also counts SW prefetches independent of the actual data source.",
374 "EventCode": "0xD1", 487 "EventCode": "0xD1",
375 "Counter": "0,1,2,3", 488 "Counter": "0,1,2,3",
376 "UMask": "0x1", 489 "UMask": "0x1",
377 "EventName": "MEM_LOAD_UOPS_RETIRED.L1_HIT", 490 "EventName": "MEM_LOAD_UOPS_RETIRED.L1_HIT",
378 "SampleAfterValue": "2000003", 491 "SampleAfterValue": "2000003",
379 "BriefDescription": "Retired load uops with L1 cache hits as data sources.", 492 "BriefDescription": "Retired load uops with L1 cache hits as data sources. (Precise Event - PEBS)",
380 "CounterHTOff": "0,1,2,3", 493 "CounterHTOff": "0,1,2,3",
381 "Data_LA": "1" 494 "Data_LA": "1"
382 }, 495 },
383 { 496 {
384 "PEBS": "1", 497 "PEBS": "1",
385 "PublicDescription": "This is a non-precise version (that is, does not use PEBS) of the event that counts retired load uops which data sources were hits in the mid-level (L2) cache.", 498 "PublicDescription": "This is a precise version (that is, uses PEBS) of the event that counts retired load uops which data sources were hits in the mid-level (L2) cache.",
386 "EventCode": "0xD1", 499 "EventCode": "0xD1",
387 "Counter": "0,1,2,3", 500 "Counter": "0,1,2,3",
388 "UMask": "0x2", 501 "UMask": "0x2",
389 "Errata": "BDM35", 502 "Errata": "BDM35",
390 "EventName": "MEM_LOAD_UOPS_RETIRED.L2_HIT", 503 "EventName": "MEM_LOAD_UOPS_RETIRED.L2_HIT",
391 "SampleAfterValue": "100003", 504 "SampleAfterValue": "100003",
392 "BriefDescription": "Retired load uops with L2 cache hits as data sources.", 505 "BriefDescription": "Retired load uops with L2 cache hits as data sources. (Precise Event - PEBS)",
393 "CounterHTOff": "0,1,2,3", 506 "CounterHTOff": "0,1,2,3",
394 "Data_LA": "1" 507 "Data_LA": "1"
395 }, 508 },
396 { 509 {
397 "PEBS": "1", 510 "PEBS": "1",
398 "PublicDescription": "This is a non-precise version (that is, does not use PEBS) of the event that counts retired load uops which data sources were data hits in the last-level (L3) cache without snoops required.", 511 "PublicDescription": "This is a precise version (that is, uses PEBS) of the event that counts retired load uops which data sources were data hits in the last-level (L3) cache without snoops required.",
399 "EventCode": "0xD1", 512 "EventCode": "0xD1",
400 "Counter": "0,1,2,3", 513 "Counter": "0,1,2,3",
401 "UMask": "0x4", 514 "UMask": "0x4",
402 "Errata": "BDM100", 515 "Errata": "BDM100",
403 "EventName": "MEM_LOAD_UOPS_RETIRED.L3_HIT", 516 "EventName": "MEM_LOAD_UOPS_RETIRED.L3_HIT",
404 "SampleAfterValue": "50021", 517 "SampleAfterValue": "50021",
405 "BriefDescription": "Retired load uops which data sources were data hits in L3 without snoops required.", 518 "BriefDescription": "Hit in last-level (L3) cache. Excludes Unknown data-source. (Precise Event - PEBS)",
406 "CounterHTOff": "0,1,2,3", 519 "CounterHTOff": "0,1,2,3",
407 "Data_LA": "1" 520 "Data_LA": "1"
408 }, 521 },
409 { 522 {
410 "PEBS": "1", 523 "PEBS": "1",
411 "PublicDescription": "This is a non-precise version (that is, does not use PEBS) of the event that counts retired load uops which data sources were misses in the nearest-level (L1) cache. Counting excludes unknown and UC data source.", 524 "PublicDescription": "This is a precise version (that is, uses PEBS) of the event that counts retired load uops which data sources were misses in the nearest-level (L1) cache. Counting excludes unknown and UC data source.",
412 "EventCode": "0xD1", 525 "EventCode": "0xD1",
413 "Counter": "0,1,2,3", 526 "Counter": "0,1,2,3",
414 "UMask": "0x8", 527 "UMask": "0x8",
415 "EventName": "MEM_LOAD_UOPS_RETIRED.L1_MISS", 528 "EventName": "MEM_LOAD_UOPS_RETIRED.L1_MISS",
416 "SampleAfterValue": "100003", 529 "SampleAfterValue": "100003",
417 "BriefDescription": "Retired load uops misses in L1 cache as data sources.", 530 "BriefDescription": "Retired load uops misses in L1 cache as data sources. Uses PEBS.",
418 "CounterHTOff": "0,1,2,3", 531 "CounterHTOff": "0,1,2,3",
419 "Data_LA": "1" 532 "Data_LA": "1"
420 }, 533 },
421 { 534 {
422 "PEBS": "1", 535 "PEBS": "1",
423 "PublicDescription": "This is a non-precise version (that is, does not use PEBS) of the event that counts retired load uops which data sources were misses in the mid-level (L2) cache. Counting excludes unknown and UC data source.", 536 "PublicDescription": "This is a precise version (that is, uses PEBS) of the event that counts retired load uops which data sources were misses in the mid-level (L2) cache. Counting excludes unknown and UC data source.",
424 "EventCode": "0xD1", 537 "EventCode": "0xD1",
425 "Counter": "0,1,2,3", 538 "Counter": "0,1,2,3",
426 "UMask": "0x10", 539 "UMask": "0x10",
427 "EventName": "MEM_LOAD_UOPS_RETIRED.L2_MISS", 540 "EventName": "MEM_LOAD_UOPS_RETIRED.L2_MISS",
428 "SampleAfterValue": "50021", 541 "SampleAfterValue": "50021",
429 "BriefDescription": "Miss in mid-level (L2) cache. Excludes Unknown data-source.", 542 "BriefDescription": "Retired load uops with L2 cache misses as data sources. Uses PEBS.",
430 "CounterHTOff": "0,1,2,3", 543 "CounterHTOff": "0,1,2,3",
431 "Data_LA": "1" 544 "Data_LA": "1"
432 }, 545 },
@@ -438,84 +551,83 @@
438 "Errata": "BDM100, BDE70", 551 "Errata": "BDM100, BDE70",
439 "EventName": "MEM_LOAD_UOPS_RETIRED.L3_MISS", 552 "EventName": "MEM_LOAD_UOPS_RETIRED.L3_MISS",
440 "SampleAfterValue": "100007", 553 "SampleAfterValue": "100007",
441 "BriefDescription": "Miss in last-level (L3) cache. Excludes Unknown data-source.", 554 "BriefDescription": "Miss in last-level (L3) cache. Excludes Unknown data-source. (Precise Event - PEBS).",
442 "CounterHTOff": "0,1,2,3", 555 "CounterHTOff": "0,1,2,3",
443 "Data_LA": "1" 556 "Data_LA": "1"
444 }, 557 },
445 { 558 {
446 "PEBS": "1", 559 "PEBS": "1",
447 "PublicDescription": "This is a non-precise version (that is, does not use PEBS) of the event that counts retired load uops which data sources were load uops missed L1 but hit a fill buffer due to a preceding miss to the same cache line with the data not ready.\nNote: Only two data-sources of L1/FB are applicable for AVX-256bit even though the corresponding AVX load could be serviced by a deeper level in the memory hierarchy. Data source is reported for the Low-half load.", 560 "PublicDescription": "This is a precise version (that is, uses PEBS) of the event that counts retired load uops which data sources were load uops missed L1 but hit a fill buffer due to a preceding miss to the same cache line with the data not ready.\nNote: Only two data-sources of L1/FB are applicable for AVX-256bit even though the corresponding AVX load could be serviced by a deeper level in the memory hierarchy. Data source is reported for the Low-half load.",
448 "EventCode": "0xD1", 561 "EventCode": "0xD1",
449 "Counter": "0,1,2,3", 562 "Counter": "0,1,2,3",
450 "UMask": "0x40", 563 "UMask": "0x40",
451 "EventName": "MEM_LOAD_UOPS_RETIRED.HIT_LFB", 564 "EventName": "MEM_LOAD_UOPS_RETIRED.HIT_LFB",
452 "SampleAfterValue": "100003", 565 "SampleAfterValue": "100003",
453 "BriefDescription": "Retired load uops which data sources were load uops missed L1 but hit FB due to preceding miss to the same cache line with data not ready.", 566 "BriefDescription": "Retired load uops which data sources were load uops missed L1 but hit FB due to preceding miss to the same cache line with data not ready. (Precise Event - PEBS)",
454 "CounterHTOff": "0,1,2,3", 567 "CounterHTOff": "0,1,2,3",
455 "Data_LA": "1" 568 "Data_LA": "1"
456 }, 569 },
457 { 570 {
458 "PEBS": "1", 571 "PEBS": "1",
459 "PublicDescription": "This is a non-precise version (that is, does not use PEBS) of the event that counts retired load uops which data sources were L3 Hit and a cross-core snoop missed in the on-pkg core cache.", 572 "PublicDescription": "This is a precise version (that is, uses PEBS) of the event that counts retired load uops which data sources were L3 Hit and a cross-core snoop missed in the on-pkg core cache.",
460 "EventCode": "0xD2", 573 "EventCode": "0xD2",
461 "Counter": "0,1,2,3", 574 "Counter": "0,1,2,3",
462 "UMask": "0x1", 575 "UMask": "0x1",
463 "Errata": "BDM100", 576 "Errata": "BDM100",
464 "EventName": "MEM_LOAD_UOPS_L3_HIT_RETIRED.XSNP_MISS", 577 "EventName": "MEM_LOAD_UOPS_L3_HIT_RETIRED.XSNP_MISS",
465 "SampleAfterValue": "20011", 578 "SampleAfterValue": "20011",
466 "BriefDescription": "Retired load uops which data sources were L3 hit and cross-core snoop missed in on-pkg core cache.", 579 "BriefDescription": "Retired load uops which data sources were L3 hit and cross-core snoop missed in on-pkg core cache. (Precise Event - PEBS)",
467 "CounterHTOff": "0,1,2,3", 580 "CounterHTOff": "0,1,2,3",
468 "Data_LA": "1" 581 "Data_LA": "1"
469 }, 582 },
470 { 583 {
471 "PEBS": "1", 584 "PEBS": "1",
472 "PublicDescription": "This is a non-precise version (that is, does not use PEBS) of the event that counts retired load uops which data sources were L3 hit and a cross-core snoop hit in the on-pkg core cache.", 585 "PublicDescription": "This is a precise version (that is, uses PEBS) of the event that counts retired load uops which data sources were L3 hit and a cross-core snoop hit in the on-pkg core cache.",
473 "EventCode": "0xD2", 586 "EventCode": "0xD2",
474 "Counter": "0,1,2,3", 587 "Counter": "0,1,2,3",
475 "UMask": "0x2", 588 "UMask": "0x2",
476 "Errata": "BDM100", 589 "Errata": "BDM100",
477 "EventName": "MEM_LOAD_UOPS_L3_HIT_RETIRED.XSNP_HIT", 590 "EventName": "MEM_LOAD_UOPS_L3_HIT_RETIRED.XSNP_HIT",
478 "SampleAfterValue": "20011", 591 "SampleAfterValue": "20011",
479 "BriefDescription": "Retired load uops which data sources were L3 and cross-core snoop hits in on-pkg core cache.", 592 "BriefDescription": "Retired load uops which data sources were L3 and cross-core snoop hits in on-pkg core cache. (Precise Event - PEBS)",
480 "CounterHTOff": "0,1,2,3", 593 "CounterHTOff": "0,1,2,3",
481 "Data_LA": "1" 594 "Data_LA": "1"
482 }, 595 },
483 { 596 {
484 "PEBS": "1", 597 "PEBS": "1",
485 "PublicDescription": "This is a non-precise version (that is, does not use PEBS) of the event that counts retired load uops which data sources were HitM responses from a core on same socket (shared L3).", 598 "PublicDescription": "This is a precise version (that is, uses PEBS) of the event that counts retired load uops which data sources were HitM responses from a core on same socket (shared L3).",
486 "EventCode": "0xD2", 599 "EventCode": "0xD2",
487 "Counter": "0,1,2,3", 600 "Counter": "0,1,2,3",
488 "UMask": "0x4", 601 "UMask": "0x4",
489 "Errata": "BDM100", 602 "Errata": "BDM100",
490 "EventName": "MEM_LOAD_UOPS_L3_HIT_RETIRED.XSNP_HITM", 603 "EventName": "MEM_LOAD_UOPS_L3_HIT_RETIRED.XSNP_HITM",
491 "SampleAfterValue": "20011", 604 "SampleAfterValue": "20011",
492 "BriefDescription": "Retired load uops which data sources were HitM responses from shared L3.", 605 "BriefDescription": "Retired load uops which data sources were HitM responses from shared L3. (Precise Event - PEBS)",
493 "CounterHTOff": "0,1,2,3", 606 "CounterHTOff": "0,1,2,3",
494 "Data_LA": "1" 607 "Data_LA": "1"
495 }, 608 },
496 { 609 {
497 "PEBS": "1", 610 "PEBS": "1",
498 "PublicDescription": "This is a non-precise version (that is, does not use PEBS) of the event that counts retired load uops which data sources were hits in the last-level (L3) cache without snoops required.", 611 "PublicDescription": "This is a precise version (that is, uses PEBS) of the event that counts retired load uops which data sources were hits in the last-level (L3) cache without snoops required.",
499 "EventCode": "0xD2", 612 "EventCode": "0xD2",
500 "Counter": "0,1,2,3", 613 "Counter": "0,1,2,3",
501 "UMask": "0x8", 614 "UMask": "0x8",
502 "Errata": "BDM100", 615 "Errata": "BDM100",
503 "EventName": "MEM_LOAD_UOPS_L3_HIT_RETIRED.XSNP_NONE", 616 "EventName": "MEM_LOAD_UOPS_L3_HIT_RETIRED.XSNP_NONE",
504 "SampleAfterValue": "100003", 617 "SampleAfterValue": "100003",
505 "BriefDescription": "Retired load uops which data sources were hits in L3 without snoops required.", 618 "BriefDescription": "Retired load uops which data sources were hits in L3 without snoops required. (Precise Event - PEBS)",
506 "CounterHTOff": "0,1,2,3", 619 "CounterHTOff": "0,1,2,3",
507 "Data_LA": "1" 620 "Data_LA": "1"
508 }, 621 },
509 { 622 {
510 "PEBS": "1", 623 "PEBS": "1",
511 "PublicDescription": "Retired load uop whose Data Source was: local DRAM either Snoop not needed or Snoop Miss (RspI).", 624 "PublicDescription": "This event counts retired load uops where the data came from local DRAM. This does not include hardware prefetches. This is a precise event.",
512 "EventCode": "0xD3", 625 "EventCode": "0xD3",
513 "Counter": "0,1,2,3", 626 "Counter": "0,1,2,3",
514 "UMask": "0x1", 627 "UMask": "0x1",
515 "Errata": "BDE70, BDM100", 628 "Errata": "BDE70, BDM100",
516 "EventName": "MEM_LOAD_UOPS_L3_MISS_RETIRED.LOCAL_DRAM", 629 "EventName": "MEM_LOAD_UOPS_L3_MISS_RETIRED.LOCAL_DRAM",
517 "SampleAfterValue": "100007", 630 "SampleAfterValue": "100007",
518 "BriefDescription": "Data from local DRAM either Snoop not needed or Snoop Miss (RspI)",
519 "CounterHTOff": "0,1,2,3", 631 "CounterHTOff": "0,1,2,3",
520 "Data_LA": "1" 632 "Data_LA": "1"
521 }, 633 },
@@ -659,119 +771,7 @@
659 "CounterHTOff": "0,1,2,3,4,5,6,7" 771 "CounterHTOff": "0,1,2,3,4,5,6,7"
660 }, 772 },
661 { 773 {
662 "EventCode": "0x24", 774 "PublicDescription": "Counts demand data reads that have any response type. Offcore response can be programmed only with a specific pair of event select and counter MSR, and with specific event codes and predefine mask bit value in a dedicated MSR to specify attributes of the offcore transaction.",
663 "Counter": "0,1,2,3",
664 "UMask": "0x42",
665 "EventName": "L2_RQSTS.RFO_HIT",
666 "SampleAfterValue": "200003",
667 "BriefDescription": "RFO requests that hit L2 cache.",
668 "CounterHTOff": "0,1,2,3,4,5,6,7"
669 },
670 {
671 "EventCode": "0x24",
672 "Counter": "0,1,2,3",
673 "UMask": "0x22",
674 "EventName": "L2_RQSTS.RFO_MISS",
675 "SampleAfterValue": "200003",
676 "BriefDescription": "RFO requests that miss L2 cache.",
677 "CounterHTOff": "0,1,2,3,4,5,6,7"
678 },
679 {
680 "EventCode": "0x24",
681 "Counter": "0,1,2,3",
682 "UMask": "0x44",
683 "EventName": "L2_RQSTS.CODE_RD_HIT",
684 "SampleAfterValue": "200003",
685 "BriefDescription": "L2 cache hits when fetching instructions, code reads.",
686 "CounterHTOff": "0,1,2,3,4,5,6,7"
687 },
688 {
689 "EventCode": "0x24",
690 "Counter": "0,1,2,3",
691 "UMask": "0x24",
692 "EventName": "L2_RQSTS.CODE_RD_MISS",
693 "SampleAfterValue": "200003",
694 "BriefDescription": "L2 cache misses when fetching instructions.",
695 "CounterHTOff": "0,1,2,3,4,5,6,7"
696 },
697 {
698 "EventCode": "0x24",
699 "Counter": "0,1,2,3",
700 "UMask": "0x27",
701 "EventName": "L2_RQSTS.ALL_DEMAND_MISS",
702 "SampleAfterValue": "200003",
703 "BriefDescription": "Demand requests that miss L2 cache.",
704 "CounterHTOff": "0,1,2,3,4,5,6,7"
705 },
706 {
707 "EventCode": "0x24",
708 "Counter": "0,1,2,3",
709 "UMask": "0xe7",
710 "EventName": "L2_RQSTS.ALL_DEMAND_REFERENCES",
711 "SampleAfterValue": "200003",
712 "BriefDescription": "Demand requests to L2 cache.",
713 "CounterHTOff": "0,1,2,3,4,5,6,7"
714 },
715 {
716 "EventCode": "0x24",
717 "Counter": "0,1,2,3",
718 "UMask": "0x3f",
719 "EventName": "L2_RQSTS.MISS",
720 "SampleAfterValue": "200003",
721 "BriefDescription": "All requests that miss L2 cache.",
722 "CounterHTOff": "0,1,2,3,4,5,6,7"
723 },
724 {
725 "EventCode": "0x24",
726 "Counter": "0,1,2,3",
727 "UMask": "0xff",
728 "EventName": "L2_RQSTS.REFERENCES",
729 "SampleAfterValue": "200003",
730 "BriefDescription": "All L2 requests.",
731 "CounterHTOff": "0,1,2,3,4,5,6,7"
732 },
733 {
734 "EventCode": "0xB7, 0xBB",
735 "Counter": "0,1,2,3",
736 "UMask": "0x1",
737 "EventName": "OFFCORE_RESPONSE",
738 "SampleAfterValue": "100003",
739 "BriefDescription": "Offcore response can be programmed only with a specific pair of event select and counter MSR, and with specific event codes and predefine mask bit value in a dedicated MSR to specify attributes of the offcore transaction.",
740 "CounterHTOff": "0,1,2,3"
741 },
742 {
743 "EventCode": "0x60",
744 "Counter": "0,1,2,3",
745 "UMask": "0x1",
746 "Errata": "BDM76",
747 "EventName": "OFFCORE_REQUESTS_OUTSTANDING.DEMAND_DATA_RD_GE_6",
748 "SampleAfterValue": "2000003",
749 "BriefDescription": "Cycles with at least 6 offcore outstanding Demand Data Read transactions in uncore queue.",
750 "CounterMask": "6",
751 "CounterHTOff": "0,1,2,3,4,5,6,7"
752 },
753 {
754 "EventCode": "0x48",
755 "Counter": "2",
756 "UMask": "0x1",
757 "AnyThread": "1",
758 "EventName": "L1D_PEND_MISS.PENDING_CYCLES_ANY",
759 "SampleAfterValue": "2000003",
760 "BriefDescription": "Cycles with L1D load Misses outstanding from any thread on physical core.",
761 "CounterMask": "1",
762 "CounterHTOff": "2"
763 },
764 {
765 "EventCode": "0x48",
766 "Counter": "0,1,2,3",
767 "UMask": "0x2",
768 "EventName": "L1D_PEND_MISS.FB_FULL",
769 "SampleAfterValue": "2000003",
770 "BriefDescription": "Cycles a demand request was blocked due to Fill Buffers inavailability.",
771 "CounterMask": "1",
772 "CounterHTOff": "0,1,2,3,4,5,6,7"
773 },
774 {
775 "EventCode": "0xB7, 0xBB", 775 "EventCode": "0xB7, 0xBB",
776 "MSRValue": "0x0000010001 ", 776 "MSRValue": "0x0000010001 ",
777 "Counter": "0,1,2,3", 777 "Counter": "0,1,2,3",
@@ -784,6 +784,7 @@
784 "CounterHTOff": "0,1,2,3" 784 "CounterHTOff": "0,1,2,3"
785 }, 785 },
786 { 786 {
787 "PublicDescription": "tbd Offcore response can be programmed only with a specific pair of event select and counter MSR, and with specific event codes and predefine mask bit value in a dedicated MSR to specify attributes of the offcore transaction.",
787 "EventCode": "0xB7, 0xBB", 788 "EventCode": "0xB7, 0xBB",
788 "MSRValue": "0x0080020001 ", 789 "MSRValue": "0x0080020001 ",
789 "Counter": "0,1,2,3", 790 "Counter": "0,1,2,3",
@@ -796,6 +797,7 @@
796 "CounterHTOff": "0,1,2,3" 797 "CounterHTOff": "0,1,2,3"
797 }, 798 },
798 { 799 {
800 "PublicDescription": "tbd Offcore response can be programmed only with a specific pair of event select and counter MSR, and with specific event codes and predefine mask bit value in a dedicated MSR to specify attributes of the offcore transaction.",
799 "EventCode": "0xB7, 0xBB", 801 "EventCode": "0xB7, 0xBB",
800 "MSRValue": "0x0100020001 ", 802 "MSRValue": "0x0100020001 ",
801 "Counter": "0,1,2,3", 803 "Counter": "0,1,2,3",
@@ -808,6 +810,7 @@
808 "CounterHTOff": "0,1,2,3" 810 "CounterHTOff": "0,1,2,3"
809 }, 811 },
810 { 812 {
813 "PublicDescription": "tbd Offcore response can be programmed only with a specific pair of event select and counter MSR, and with specific event codes and predefine mask bit value in a dedicated MSR to specify attributes of the offcore transaction.",
811 "EventCode": "0xB7, 0xBB", 814 "EventCode": "0xB7, 0xBB",
812 "MSRValue": "0x0200020001 ", 815 "MSRValue": "0x0200020001 ",
813 "Counter": "0,1,2,3", 816 "Counter": "0,1,2,3",
@@ -820,6 +823,7 @@
820 "CounterHTOff": "0,1,2,3" 823 "CounterHTOff": "0,1,2,3"
821 }, 824 },
822 { 825 {
826 "PublicDescription": "tbd Offcore response can be programmed only with a specific pair of event select and counter MSR, and with specific event codes and predefine mask bit value in a dedicated MSR to specify attributes of the offcore transaction.",
823 "EventCode": "0xB7, 0xBB", 827 "EventCode": "0xB7, 0xBB",
824 "MSRValue": "0x0400020001 ", 828 "MSRValue": "0x0400020001 ",
825 "Counter": "0,1,2,3", 829 "Counter": "0,1,2,3",
@@ -832,6 +836,7 @@
832 "CounterHTOff": "0,1,2,3" 836 "CounterHTOff": "0,1,2,3"
833 }, 837 },
834 { 838 {
839 "PublicDescription": "tbd Offcore response can be programmed only with a specific pair of event select and counter MSR, and with specific event codes and predefine mask bit value in a dedicated MSR to specify attributes of the offcore transaction.",
835 "EventCode": "0xB7, 0xBB", 840 "EventCode": "0xB7, 0xBB",
836 "MSRValue": "0x1000020001 ", 841 "MSRValue": "0x1000020001 ",
837 "Counter": "0,1,2,3", 842 "Counter": "0,1,2,3",
@@ -844,6 +849,7 @@
844 "CounterHTOff": "0,1,2,3" 849 "CounterHTOff": "0,1,2,3"
845 }, 850 },
846 { 851 {
852 "PublicDescription": "tbd Offcore response can be programmed only with a specific pair of event select and counter MSR, and with specific event codes and predefine mask bit value in a dedicated MSR to specify attributes of the offcore transaction.",
847 "EventCode": "0xB7, 0xBB", 853 "EventCode": "0xB7, 0xBB",
848 "MSRValue": "0x3f80020001 ", 854 "MSRValue": "0x3f80020001 ",
849 "Counter": "0,1,2,3", 855 "Counter": "0,1,2,3",
@@ -856,6 +862,7 @@
856 "CounterHTOff": "0,1,2,3" 862 "CounterHTOff": "0,1,2,3"
857 }, 863 },
858 { 864 {
865 "PublicDescription": "Counts demand data reads that hit in the L3 with no details on snoop-related information. Offcore response can be programmed only with a specific pair of event select and counter MSR, and with specific event codes and predefine mask bit value in a dedicated MSR to specify attributes of the offcore transaction.",
859 "EventCode": "0xB7, 0xBB", 866 "EventCode": "0xB7, 0xBB",
860 "MSRValue": "0x00803c0001 ", 867 "MSRValue": "0x00803c0001 ",
861 "Counter": "0,1,2,3", 868 "Counter": "0,1,2,3",
@@ -868,6 +875,7 @@
868 "CounterHTOff": "0,1,2,3" 875 "CounterHTOff": "0,1,2,3"
869 }, 876 },
870 { 877 {
878 "PublicDescription": "Counts demand data reads that hit in the L3 and sibling core snoops are not needed as either the core-valid bit is not set or the shared line is present in multiple cores. Offcore response can be programmed only with a specific pair of event select and counter MSR, and with specific event codes and predefine mask bit value in a dedicated MSR to specify attributes of the offcore transaction.",
871 "EventCode": "0xB7, 0xBB", 879 "EventCode": "0xB7, 0xBB",
872 "MSRValue": "0x01003c0001 ", 880 "MSRValue": "0x01003c0001 ",
873 "Counter": "0,1,2,3", 881 "Counter": "0,1,2,3",
@@ -880,6 +888,7 @@
880 "CounterHTOff": "0,1,2,3" 888 "CounterHTOff": "0,1,2,3"
881 }, 889 },
882 { 890 {
891 "PublicDescription": "Counts demand data reads that hit in the L3 with a snoop miss response. Offcore response can be programmed only with a specific pair of event select and counter MSR, and with specific event codes and predefine mask bit value in a dedicated MSR to specify attributes of the offcore transaction.",
883 "EventCode": "0xB7, 0xBB", 892 "EventCode": "0xB7, 0xBB",
884 "MSRValue": "0x02003c0001 ", 893 "MSRValue": "0x02003c0001 ",
885 "Counter": "0,1,2,3", 894 "Counter": "0,1,2,3",
@@ -892,6 +901,7 @@
892 "CounterHTOff": "0,1,2,3" 901 "CounterHTOff": "0,1,2,3"
893 }, 902 },
894 { 903 {
904 "PublicDescription": "Counts demand data reads that hit in the L3 and the snoops to sibling cores hit in either E/S state and the line is not forwarded. Offcore response can be programmed only with a specific pair of event select and counter MSR, and with specific event codes and predefine mask bit value in a dedicated MSR to specify attributes of the offcore transaction.",
895 "EventCode": "0xB7, 0xBB", 905 "EventCode": "0xB7, 0xBB",
896 "MSRValue": "0x04003c0001 ", 906 "MSRValue": "0x04003c0001 ",
897 "Counter": "0,1,2,3", 907 "Counter": "0,1,2,3",
@@ -904,6 +914,7 @@
904 "CounterHTOff": "0,1,2,3" 914 "CounterHTOff": "0,1,2,3"
905 }, 915 },
906 { 916 {
917 "PublicDescription": "tbd Offcore response can be programmed only with a specific pair of event select and counter MSR, and with specific event codes and predefine mask bit value in a dedicated MSR to specify attributes of the offcore transaction.",
907 "EventCode": "0xB7, 0xBB", 918 "EventCode": "0xB7, 0xBB",
908 "MSRValue": "0x10003c0001 ", 919 "MSRValue": "0x10003c0001 ",
909 "Counter": "0,1,2,3", 920 "Counter": "0,1,2,3",
@@ -916,6 +927,7 @@
916 "CounterHTOff": "0,1,2,3" 927 "CounterHTOff": "0,1,2,3"
917 }, 928 },
918 { 929 {
930 "PublicDescription": "Counts demand data reads that hit in the L3. Offcore response can be programmed only with a specific pair of event select and counter MSR, and with specific event codes and predefine mask bit value in a dedicated MSR to specify attributes of the offcore transaction.",
919 "EventCode": "0xB7, 0xBB", 931 "EventCode": "0xB7, 0xBB",
920 "MSRValue": "0x3f803c0001 ", 932 "MSRValue": "0x3f803c0001 ",
921 "Counter": "0,1,2,3", 933 "Counter": "0,1,2,3",
@@ -928,6 +940,7 @@
928 "CounterHTOff": "0,1,2,3" 940 "CounterHTOff": "0,1,2,3"
929 }, 941 },
930 { 942 {
943 "PublicDescription": "Counts all demand data writes (RFOs) that have any response type. Offcore response can be programmed only with a specific pair of event select and counter MSR, and with specific event codes and predefine mask bit value in a dedicated MSR to specify attributes of the offcore transaction.",
931 "EventCode": "0xB7, 0xBB", 944 "EventCode": "0xB7, 0xBB",
932 "MSRValue": "0x0000010002 ", 945 "MSRValue": "0x0000010002 ",
933 "Counter": "0,1,2,3", 946 "Counter": "0,1,2,3",
@@ -940,6 +953,7 @@
940 "CounterHTOff": "0,1,2,3" 953 "CounterHTOff": "0,1,2,3"
941 }, 954 },
942 { 955 {
956 "PublicDescription": "Counts all demand data writes (RFOs) that hit in the L3 with no details on snoop-related information. Offcore response can be programmed only with a specific pair of event select and counter MSR, and with specific event codes and predefine mask bit value in a dedicated MSR to specify attributes of the offcore transaction.",
943 "EventCode": "0xB7, 0xBB", 957 "EventCode": "0xB7, 0xBB",
944 "MSRValue": "0x00803c0002 ", 958 "MSRValue": "0x00803c0002 ",
945 "Counter": "0,1,2,3", 959 "Counter": "0,1,2,3",
@@ -952,6 +966,7 @@
952 "CounterHTOff": "0,1,2,3" 966 "CounterHTOff": "0,1,2,3"
953 }, 967 },
954 { 968 {
969 "PublicDescription": "Counts all demand data writes (RFOs) that hit in the L3 and sibling core snoops are not needed as either the core-valid bit is not set or the shared line is present in multiple cores. Offcore response can be programmed only with a specific pair of event select and counter MSR, and with specific event codes and predefine mask bit value in a dedicated MSR to specify attributes of the offcore transaction.",
955 "EventCode": "0xB7, 0xBB", 970 "EventCode": "0xB7, 0xBB",
956 "MSRValue": "0x01003c0002 ", 971 "MSRValue": "0x01003c0002 ",
957 "Counter": "0,1,2,3", 972 "Counter": "0,1,2,3",
@@ -964,6 +979,7 @@
964 "CounterHTOff": "0,1,2,3" 979 "CounterHTOff": "0,1,2,3"
965 }, 980 },
966 { 981 {
982 "PublicDescription": "Counts all demand data writes (RFOs) that hit in the L3 with a snoop miss response. Offcore response can be programmed only with a specific pair of event select and counter MSR, and with specific event codes and predefine mask bit value in a dedicated MSR to specify attributes of the offcore transaction.",
967 "EventCode": "0xB7, 0xBB", 983 "EventCode": "0xB7, 0xBB",
968 "MSRValue": "0x02003c0002 ", 984 "MSRValue": "0x02003c0002 ",
969 "Counter": "0,1,2,3", 985 "Counter": "0,1,2,3",
@@ -976,6 +992,7 @@
976 "CounterHTOff": "0,1,2,3" 992 "CounterHTOff": "0,1,2,3"
977 }, 993 },
978 { 994 {
995 "PublicDescription": "Counts all demand data writes (RFOs) that hit in the L3 and the snoops to sibling cores hit in either E/S state and the line is not forwarded. Offcore response can be programmed only with a specific pair of event select and counter MSR, and with specific event codes and predefine mask bit value in a dedicated MSR to specify attributes of the offcore transaction.",
979 "EventCode": "0xB7, 0xBB", 996 "EventCode": "0xB7, 0xBB",
980 "MSRValue": "0x04003c0002 ", 997 "MSRValue": "0x04003c0002 ",
981 "Counter": "0,1,2,3", 998 "Counter": "0,1,2,3",
@@ -988,6 +1005,7 @@
988 "CounterHTOff": "0,1,2,3" 1005 "CounterHTOff": "0,1,2,3"
989 }, 1006 },
990 { 1007 {
1008 "PublicDescription": "tbd Offcore response can be programmed only with a specific pair of event select and counter MSR, and with specific event codes and predefine mask bit value in a dedicated MSR to specify attributes of the offcore transaction.",
991 "EventCode": "0xB7, 0xBB", 1009 "EventCode": "0xB7, 0xBB",
992 "MSRValue": "0x10003c0002 ", 1010 "MSRValue": "0x10003c0002 ",
993 "Counter": "0,1,2,3", 1011 "Counter": "0,1,2,3",
@@ -1000,6 +1018,7 @@
1000 "CounterHTOff": "0,1,2,3" 1018 "CounterHTOff": "0,1,2,3"
1001 }, 1019 },
1002 { 1020 {
1021 "PublicDescription": "Counts all demand data writes (RFOs) that hit in the L3. Offcore response can be programmed only with a specific pair of event select and counter MSR, and with specific event codes and predefine mask bit value in a dedicated MSR to specify attributes of the offcore transaction.",
1003 "EventCode": "0xB7, 0xBB", 1022 "EventCode": "0xB7, 0xBB",
1004 "MSRValue": "0x3f803c0002 ", 1023 "MSRValue": "0x3f803c0002 ",
1005 "Counter": "0,1,2,3", 1024 "Counter": "0,1,2,3",
@@ -1012,6 +1031,7 @@
1012 "CounterHTOff": "0,1,2,3" 1031 "CounterHTOff": "0,1,2,3"
1013 }, 1032 },
1014 { 1033 {
1034 "PublicDescription": "Counts all demand code reads that have any response type. Offcore response can be programmed only with a specific pair of event select and counter MSR, and with specific event codes and predefine mask bit value in a dedicated MSR to specify attributes of the offcore transaction.",
1015 "EventCode": "0xB7, 0xBB", 1035 "EventCode": "0xB7, 0xBB",
1016 "MSRValue": "0x0000010004 ", 1036 "MSRValue": "0x0000010004 ",
1017 "Counter": "0,1,2,3", 1037 "Counter": "0,1,2,3",
@@ -1024,6 +1044,7 @@
1024 "CounterHTOff": "0,1,2,3" 1044 "CounterHTOff": "0,1,2,3"
1025 }, 1045 },
1026 { 1046 {
1047 "PublicDescription": "tbd Offcore response can be programmed only with a specific pair of event select and counter MSR, and with specific event codes and predefine mask bit value in a dedicated MSR to specify attributes of the offcore transaction.",
1027 "EventCode": "0xB7, 0xBB", 1048 "EventCode": "0xB7, 0xBB",
1028 "MSRValue": "0x0080020004 ", 1049 "MSRValue": "0x0080020004 ",
1029 "Counter": "0,1,2,3", 1050 "Counter": "0,1,2,3",
@@ -1036,6 +1057,7 @@
1036 "CounterHTOff": "0,1,2,3" 1057 "CounterHTOff": "0,1,2,3"
1037 }, 1058 },
1038 { 1059 {
1060 "PublicDescription": "tbd Offcore response can be programmed only with a specific pair of event select and counter MSR, and with specific event codes and predefine mask bit value in a dedicated MSR to specify attributes of the offcore transaction.",
1039 "EventCode": "0xB7, 0xBB", 1061 "EventCode": "0xB7, 0xBB",
1040 "MSRValue": "0x0100020004 ", 1062 "MSRValue": "0x0100020004 ",
1041 "Counter": "0,1,2,3", 1063 "Counter": "0,1,2,3",
@@ -1048,6 +1070,7 @@
1048 "CounterHTOff": "0,1,2,3" 1070 "CounterHTOff": "0,1,2,3"
1049 }, 1071 },
1050 { 1072 {
1073 "PublicDescription": "tbd Offcore response can be programmed only with a specific pair of event select and counter MSR, and with specific event codes and predefine mask bit value in a dedicated MSR to specify attributes of the offcore transaction.",
1051 "EventCode": "0xB7, 0xBB", 1074 "EventCode": "0xB7, 0xBB",
1052 "MSRValue": "0x0200020004 ", 1075 "MSRValue": "0x0200020004 ",
1053 "Counter": "0,1,2,3", 1076 "Counter": "0,1,2,3",
@@ -1060,6 +1083,7 @@
1060 "CounterHTOff": "0,1,2,3" 1083 "CounterHTOff": "0,1,2,3"
1061 }, 1084 },
1062 { 1085 {
1086 "PublicDescription": "tbd Offcore response can be programmed only with a specific pair of event select and counter MSR, and with specific event codes and predefine mask bit value in a dedicated MSR to specify attributes of the offcore transaction.",
1063 "EventCode": "0xB7, 0xBB", 1087 "EventCode": "0xB7, 0xBB",
1064 "MSRValue": "0x0400020004 ", 1088 "MSRValue": "0x0400020004 ",
1065 "Counter": "0,1,2,3", 1089 "Counter": "0,1,2,3",
@@ -1072,6 +1096,7 @@
1072 "CounterHTOff": "0,1,2,3" 1096 "CounterHTOff": "0,1,2,3"
1073 }, 1097 },
1074 { 1098 {
1099 "PublicDescription": "tbd Offcore response can be programmed only with a specific pair of event select and counter MSR, and with specific event codes and predefine mask bit value in a dedicated MSR to specify attributes of the offcore transaction.",
1075 "EventCode": "0xB7, 0xBB", 1100 "EventCode": "0xB7, 0xBB",
1076 "MSRValue": "0x1000020004 ", 1101 "MSRValue": "0x1000020004 ",
1077 "Counter": "0,1,2,3", 1102 "Counter": "0,1,2,3",
@@ -1084,6 +1109,7 @@
1084 "CounterHTOff": "0,1,2,3" 1109 "CounterHTOff": "0,1,2,3"
1085 }, 1110 },
1086 { 1111 {
1112 "PublicDescription": "tbd Offcore response can be programmed only with a specific pair of event select and counter MSR, and with specific event codes and predefine mask bit value in a dedicated MSR to specify attributes of the offcore transaction.",
1087 "EventCode": "0xB7, 0xBB", 1113 "EventCode": "0xB7, 0xBB",
1088 "MSRValue": "0x3f80020004 ", 1114 "MSRValue": "0x3f80020004 ",
1089 "Counter": "0,1,2,3", 1115 "Counter": "0,1,2,3",
@@ -1096,6 +1122,7 @@
1096 "CounterHTOff": "0,1,2,3" 1122 "CounterHTOff": "0,1,2,3"
1097 }, 1123 },
1098 { 1124 {
1125 "PublicDescription": "Counts all demand code reads that hit in the L3 with no details on snoop-related information. Offcore response can be programmed only with a specific pair of event select and counter MSR, and with specific event codes and predefine mask bit value in a dedicated MSR to specify attributes of the offcore transaction.",
1099 "EventCode": "0xB7, 0xBB", 1126 "EventCode": "0xB7, 0xBB",
1100 "MSRValue": "0x00803c0004 ", 1127 "MSRValue": "0x00803c0004 ",
1101 "Counter": "0,1,2,3", 1128 "Counter": "0,1,2,3",
@@ -1108,6 +1135,7 @@
1108 "CounterHTOff": "0,1,2,3" 1135 "CounterHTOff": "0,1,2,3"
1109 }, 1136 },
1110 { 1137 {
1138 "PublicDescription": "Counts all demand code reads that hit in the L3 and sibling core snoops are not needed as either the core-valid bit is not set or the shared line is present in multiple cores. Offcore response can be programmed only with a specific pair of event select and counter MSR, and with specific event codes and predefine mask bit value in a dedicated MSR to specify attributes of the offcore transaction.",
1111 "EventCode": "0xB7, 0xBB", 1139 "EventCode": "0xB7, 0xBB",
1112 "MSRValue": "0x01003c0004 ", 1140 "MSRValue": "0x01003c0004 ",
1113 "Counter": "0,1,2,3", 1141 "Counter": "0,1,2,3",
@@ -1120,6 +1148,7 @@
1120 "CounterHTOff": "0,1,2,3" 1148 "CounterHTOff": "0,1,2,3"
1121 }, 1149 },
1122 { 1150 {
1151 "PublicDescription": "Counts all demand code reads that hit in the L3 with a snoop miss response. Offcore response can be programmed only with a specific pair of event select and counter MSR, and with specific event codes and predefine mask bit value in a dedicated MSR to specify attributes of the offcore transaction.",
1123 "EventCode": "0xB7, 0xBB", 1152 "EventCode": "0xB7, 0xBB",
1124 "MSRValue": "0x02003c0004 ", 1153 "MSRValue": "0x02003c0004 ",
1125 "Counter": "0,1,2,3", 1154 "Counter": "0,1,2,3",
@@ -1132,6 +1161,7 @@
1132 "CounterHTOff": "0,1,2,3" 1161 "CounterHTOff": "0,1,2,3"
1133 }, 1162 },
1134 { 1163 {
1164 "PublicDescription": "Counts all demand code reads that hit in the L3 and the snoops to sibling cores hit in either E/S state and the line is not forwarded. Offcore response can be programmed only with a specific pair of event select and counter MSR, and with specific event codes and predefine mask bit value in a dedicated MSR to specify attributes of the offcore transaction.",
1135 "EventCode": "0xB7, 0xBB", 1165 "EventCode": "0xB7, 0xBB",
1136 "MSRValue": "0x04003c0004 ", 1166 "MSRValue": "0x04003c0004 ",
1137 "Counter": "0,1,2,3", 1167 "Counter": "0,1,2,3",
@@ -1144,6 +1174,7 @@
1144 "CounterHTOff": "0,1,2,3" 1174 "CounterHTOff": "0,1,2,3"
1145 }, 1175 },
1146 { 1176 {
1177 "PublicDescription": "tbd Offcore response can be programmed only with a specific pair of event select and counter MSR, and with specific event codes and predefine mask bit value in a dedicated MSR to specify attributes of the offcore transaction.",
1147 "EventCode": "0xB7, 0xBB", 1178 "EventCode": "0xB7, 0xBB",
1148 "MSRValue": "0x10003c0004 ", 1179 "MSRValue": "0x10003c0004 ",
1149 "Counter": "0,1,2,3", 1180 "Counter": "0,1,2,3",
@@ -1156,6 +1187,7 @@
1156 "CounterHTOff": "0,1,2,3" 1187 "CounterHTOff": "0,1,2,3"
1157 }, 1188 },
1158 { 1189 {
1190 "PublicDescription": "Counts all demand code reads that hit in the L3. Offcore response can be programmed only with a specific pair of event select and counter MSR, and with specific event codes and predefine mask bit value in a dedicated MSR to specify attributes of the offcore transaction.",
1159 "EventCode": "0xB7, 0xBB", 1191 "EventCode": "0xB7, 0xBB",
1160 "MSRValue": "0x3f803c0004 ", 1192 "MSRValue": "0x3f803c0004 ",
1161 "Counter": "0,1,2,3", 1193 "Counter": "0,1,2,3",
@@ -1168,6 +1200,7 @@
1168 "CounterHTOff": "0,1,2,3" 1200 "CounterHTOff": "0,1,2,3"
1169 }, 1201 },
1170 { 1202 {
1203 "PublicDescription": "Counts writebacks (modified to exclusive) that have any response type. Offcore response can be programmed only with a specific pair of event select and counter MSR, and with specific event codes and predefine mask bit value in a dedicated MSR to specify attributes of the offcore transaction.",
1171 "EventCode": "0xB7, 0xBB", 1204 "EventCode": "0xB7, 0xBB",
1172 "MSRValue": "0x0000010008 ", 1205 "MSRValue": "0x0000010008 ",
1173 "Counter": "0,1,2,3", 1206 "Counter": "0,1,2,3",
@@ -1180,6 +1213,7 @@
1180 "CounterHTOff": "0,1,2,3" 1213 "CounterHTOff": "0,1,2,3"
1181 }, 1214 },
1182 { 1215 {
1216 "PublicDescription": "tbd Offcore response can be programmed only with a specific pair of event select and counter MSR, and with specific event codes and predefine mask bit value in a dedicated MSR to specify attributes of the offcore transaction.",
1183 "EventCode": "0xB7, 0xBB", 1217 "EventCode": "0xB7, 0xBB",
1184 "MSRValue": "0x0080020008 ", 1218 "MSRValue": "0x0080020008 ",
1185 "Counter": "0,1,2,3", 1219 "Counter": "0,1,2,3",
@@ -1192,6 +1226,7 @@
1192 "CounterHTOff": "0,1,2,3" 1226 "CounterHTOff": "0,1,2,3"
1193 }, 1227 },
1194 { 1228 {
1229 "PublicDescription": "tbd Offcore response can be programmed only with a specific pair of event select and counter MSR, and with specific event codes and predefine mask bit value in a dedicated MSR to specify attributes of the offcore transaction.",
1195 "EventCode": "0xB7, 0xBB", 1230 "EventCode": "0xB7, 0xBB",
1196 "MSRValue": "0x0100020008 ", 1231 "MSRValue": "0x0100020008 ",
1197 "Counter": "0,1,2,3", 1232 "Counter": "0,1,2,3",
@@ -1204,6 +1239,7 @@
1204 "CounterHTOff": "0,1,2,3" 1239 "CounterHTOff": "0,1,2,3"
1205 }, 1240 },
1206 { 1241 {
1242 "PublicDescription": "tbd Offcore response can be programmed only with a specific pair of event select and counter MSR, and with specific event codes and predefine mask bit value in a dedicated MSR to specify attributes of the offcore transaction.",
1207 "EventCode": "0xB7, 0xBB", 1243 "EventCode": "0xB7, 0xBB",
1208 "MSRValue": "0x0200020008 ", 1244 "MSRValue": "0x0200020008 ",
1209 "Counter": "0,1,2,3", 1245 "Counter": "0,1,2,3",
@@ -1216,6 +1252,7 @@
1216 "CounterHTOff": "0,1,2,3" 1252 "CounterHTOff": "0,1,2,3"
1217 }, 1253 },
1218 { 1254 {
1255 "PublicDescription": "tbd Offcore response can be programmed only with a specific pair of event select and counter MSR, and with specific event codes and predefine mask bit value in a dedicated MSR to specify attributes of the offcore transaction.",
1219 "EventCode": "0xB7, 0xBB", 1256 "EventCode": "0xB7, 0xBB",
1220 "MSRValue": "0x0400020008 ", 1257 "MSRValue": "0x0400020008 ",
1221 "Counter": "0,1,2,3", 1258 "Counter": "0,1,2,3",
@@ -1228,6 +1265,7 @@
1228 "CounterHTOff": "0,1,2,3" 1265 "CounterHTOff": "0,1,2,3"
1229 }, 1266 },
1230 { 1267 {
1268 "PublicDescription": "tbd Offcore response can be programmed only with a specific pair of event select and counter MSR, and with specific event codes and predefine mask bit value in a dedicated MSR to specify attributes of the offcore transaction.",
1231 "EventCode": "0xB7, 0xBB", 1269 "EventCode": "0xB7, 0xBB",
1232 "MSRValue": "0x1000020008 ", 1270 "MSRValue": "0x1000020008 ",
1233 "Counter": "0,1,2,3", 1271 "Counter": "0,1,2,3",
@@ -1240,6 +1278,7 @@
1240 "CounterHTOff": "0,1,2,3" 1278 "CounterHTOff": "0,1,2,3"
1241 }, 1279 },
1242 { 1280 {
1281 "PublicDescription": "tbd Offcore response can be programmed only with a specific pair of event select and counter MSR, and with specific event codes and predefine mask bit value in a dedicated MSR to specify attributes of the offcore transaction.",
1243 "EventCode": "0xB7, 0xBB", 1282 "EventCode": "0xB7, 0xBB",
1244 "MSRValue": "0x3f80020008 ", 1283 "MSRValue": "0x3f80020008 ",
1245 "Counter": "0,1,2,3", 1284 "Counter": "0,1,2,3",
@@ -1252,6 +1291,7 @@
1252 "CounterHTOff": "0,1,2,3" 1291 "CounterHTOff": "0,1,2,3"
1253 }, 1292 },
1254 { 1293 {
1294 "PublicDescription": "Counts writebacks (modified to exclusive) that hit in the L3 with no details on snoop-related information. Offcore response can be programmed only with a specific pair of event select and counter MSR, and with specific event codes and predefine mask bit value in a dedicated MSR to specify attributes of the offcore transaction.",
1255 "EventCode": "0xB7, 0xBB", 1295 "EventCode": "0xB7, 0xBB",
1256 "MSRValue": "0x00803c0008 ", 1296 "MSRValue": "0x00803c0008 ",
1257 "Counter": "0,1,2,3", 1297 "Counter": "0,1,2,3",
@@ -1264,6 +1304,7 @@
1264 "CounterHTOff": "0,1,2,3" 1304 "CounterHTOff": "0,1,2,3"
1265 }, 1305 },
1266 { 1306 {
1307 "PublicDescription": "Counts writebacks (modified to exclusive) that hit in the L3 and sibling core snoops are not needed as either the core-valid bit is not set or the shared line is present in multiple cores. Offcore response can be programmed only with a specific pair of event select and counter MSR, and with specific event codes and predefine mask bit value in a dedicated MSR to specify attributes of the offcore transaction.",
1267 "EventCode": "0xB7, 0xBB", 1308 "EventCode": "0xB7, 0xBB",
1268 "MSRValue": "0x01003c0008 ", 1309 "MSRValue": "0x01003c0008 ",
1269 "Counter": "0,1,2,3", 1310 "Counter": "0,1,2,3",
@@ -1276,6 +1317,7 @@
1276 "CounterHTOff": "0,1,2,3" 1317 "CounterHTOff": "0,1,2,3"
1277 }, 1318 },
1278 { 1319 {
1320 "PublicDescription": "Counts writebacks (modified to exclusive) that hit in the L3 with a snoop miss response. Offcore response can be programmed only with a specific pair of event select and counter MSR, and with specific event codes and predefine mask bit value in a dedicated MSR to specify attributes of the offcore transaction.",
1279 "EventCode": "0xB7, 0xBB", 1321 "EventCode": "0xB7, 0xBB",
1280 "MSRValue": "0x02003c0008 ", 1322 "MSRValue": "0x02003c0008 ",
1281 "Counter": "0,1,2,3", 1323 "Counter": "0,1,2,3",
@@ -1288,6 +1330,7 @@
1288 "CounterHTOff": "0,1,2,3" 1330 "CounterHTOff": "0,1,2,3"
1289 }, 1331 },
1290 { 1332 {
1333 "PublicDescription": "Counts writebacks (modified to exclusive) that hit in the L3 and the snoops to sibling cores hit in either E/S state and the line is not forwarded. Offcore response can be programmed only with a specific pair of event select and counter MSR, and with specific event codes and predefine mask bit value in a dedicated MSR to specify attributes of the offcore transaction.",
1291 "EventCode": "0xB7, 0xBB", 1334 "EventCode": "0xB7, 0xBB",
1292 "MSRValue": "0x04003c0008 ", 1335 "MSRValue": "0x04003c0008 ",
1293 "Counter": "0,1,2,3", 1336 "Counter": "0,1,2,3",
@@ -1300,6 +1343,7 @@
1300 "CounterHTOff": "0,1,2,3" 1343 "CounterHTOff": "0,1,2,3"
1301 }, 1344 },
1302 { 1345 {
1346 "PublicDescription": "tbd Offcore response can be programmed only with a specific pair of event select and counter MSR, and with specific event codes and predefine mask bit value in a dedicated MSR to specify attributes of the offcore transaction.",
1303 "EventCode": "0xB7, 0xBB", 1347 "EventCode": "0xB7, 0xBB",
1304 "MSRValue": "0x10003c0008 ", 1348 "MSRValue": "0x10003c0008 ",
1305 "Counter": "0,1,2,3", 1349 "Counter": "0,1,2,3",
@@ -1312,6 +1356,7 @@
1312 "CounterHTOff": "0,1,2,3" 1356 "CounterHTOff": "0,1,2,3"
1313 }, 1357 },
1314 { 1358 {
1359 "PublicDescription": "Counts writebacks (modified to exclusive) that hit in the L3. Offcore response can be programmed only with a specific pair of event select and counter MSR, and with specific event codes and predefine mask bit value in a dedicated MSR to specify attributes of the offcore transaction.",
1315 "EventCode": "0xB7, 0xBB", 1360 "EventCode": "0xB7, 0xBB",
1316 "MSRValue": "0x3f803c0008 ", 1361 "MSRValue": "0x3f803c0008 ",
1317 "Counter": "0,1,2,3", 1362 "Counter": "0,1,2,3",
@@ -1324,6 +1369,7 @@
1324 "CounterHTOff": "0,1,2,3" 1369 "CounterHTOff": "0,1,2,3"
1325 }, 1370 },
1326 { 1371 {
1372 "PublicDescription": "Counts prefetch (that bring data to L2) data reads that have any response type. Offcore response can be programmed only with a specific pair of event select and counter MSR, and with specific event codes and predefine mask bit value in a dedicated MSR to specify attributes of the offcore transaction.",
1327 "EventCode": "0xB7, 0xBB", 1373 "EventCode": "0xB7, 0xBB",
1328 "MSRValue": "0x0000010010 ", 1374 "MSRValue": "0x0000010010 ",
1329 "Counter": "0,1,2,3", 1375 "Counter": "0,1,2,3",
@@ -1336,6 +1382,7 @@
1336 "CounterHTOff": "0,1,2,3" 1382 "CounterHTOff": "0,1,2,3"
1337 }, 1383 },
1338 { 1384 {
1385 "PublicDescription": "tbd Offcore response can be programmed only with a specific pair of event select and counter MSR, and with specific event codes and predefine mask bit value in a dedicated MSR to specify attributes of the offcore transaction.",
1339 "EventCode": "0xB7, 0xBB", 1386 "EventCode": "0xB7, 0xBB",
1340 "MSRValue": "0x0080020010 ", 1387 "MSRValue": "0x0080020010 ",
1341 "Counter": "0,1,2,3", 1388 "Counter": "0,1,2,3",
@@ -1348,6 +1395,7 @@
1348 "CounterHTOff": "0,1,2,3" 1395 "CounterHTOff": "0,1,2,3"
1349 }, 1396 },
1350 { 1397 {
1398 "PublicDescription": "tbd Offcore response can be programmed only with a specific pair of event select and counter MSR, and with specific event codes and predefine mask bit value in a dedicated MSR to specify attributes of the offcore transaction.",
1351 "EventCode": "0xB7, 0xBB", 1399 "EventCode": "0xB7, 0xBB",
1352 "MSRValue": "0x0100020010 ", 1400 "MSRValue": "0x0100020010 ",
1353 "Counter": "0,1,2,3", 1401 "Counter": "0,1,2,3",
@@ -1360,6 +1408,7 @@
1360 "CounterHTOff": "0,1,2,3" 1408 "CounterHTOff": "0,1,2,3"
1361 }, 1409 },
1362 { 1410 {
1411 "PublicDescription": "tbd Offcore response can be programmed only with a specific pair of event select and counter MSR, and with specific event codes and predefine mask bit value in a dedicated MSR to specify attributes of the offcore transaction.",
1363 "EventCode": "0xB7, 0xBB", 1412 "EventCode": "0xB7, 0xBB",
1364 "MSRValue": "0x0200020010 ", 1413 "MSRValue": "0x0200020010 ",
1365 "Counter": "0,1,2,3", 1414 "Counter": "0,1,2,3",
@@ -1372,6 +1421,7 @@
1372 "CounterHTOff": "0,1,2,3" 1421 "CounterHTOff": "0,1,2,3"
1373 }, 1422 },
1374 { 1423 {
1424 "PublicDescription": "tbd Offcore response can be programmed only with a specific pair of event select and counter MSR, and with specific event codes and predefine mask bit value in a dedicated MSR to specify attributes of the offcore transaction.",
1375 "EventCode": "0xB7, 0xBB", 1425 "EventCode": "0xB7, 0xBB",
1376 "MSRValue": "0x0400020010 ", 1426 "MSRValue": "0x0400020010 ",
1377 "Counter": "0,1,2,3", 1427 "Counter": "0,1,2,3",
@@ -1384,6 +1434,7 @@
1384 "CounterHTOff": "0,1,2,3" 1434 "CounterHTOff": "0,1,2,3"
1385 }, 1435 },
1386 { 1436 {
1437 "PublicDescription": "tbd Offcore response can be programmed only with a specific pair of event select and counter MSR, and with specific event codes and predefine mask bit value in a dedicated MSR to specify attributes of the offcore transaction.",
1387 "EventCode": "0xB7, 0xBB", 1438 "EventCode": "0xB7, 0xBB",
1388 "MSRValue": "0x1000020010 ", 1439 "MSRValue": "0x1000020010 ",
1389 "Counter": "0,1,2,3", 1440 "Counter": "0,1,2,3",
@@ -1396,6 +1447,7 @@
1396 "CounterHTOff": "0,1,2,3" 1447 "CounterHTOff": "0,1,2,3"
1397 }, 1448 },
1398 { 1449 {
1450 "PublicDescription": "tbd Offcore response can be programmed only with a specific pair of event select and counter MSR, and with specific event codes and predefine mask bit value in a dedicated MSR to specify attributes of the offcore transaction.",
1399 "EventCode": "0xB7, 0xBB", 1451 "EventCode": "0xB7, 0xBB",
1400 "MSRValue": "0x3f80020010 ", 1452 "MSRValue": "0x3f80020010 ",
1401 "Counter": "0,1,2,3", 1453 "Counter": "0,1,2,3",
@@ -1408,6 +1460,7 @@
1408 "CounterHTOff": "0,1,2,3" 1460 "CounterHTOff": "0,1,2,3"
1409 }, 1461 },
1410 { 1462 {
1463 "PublicDescription": "Counts prefetch (that bring data to L2) data reads that hit in the L3 with no details on snoop-related information. Offcore response can be programmed only with a specific pair of event select and counter MSR, and with specific event codes and predefine mask bit value in a dedicated MSR to specify attributes of the offcore transaction.",
1411 "EventCode": "0xB7, 0xBB", 1464 "EventCode": "0xB7, 0xBB",
1412 "MSRValue": "0x00803c0010 ", 1465 "MSRValue": "0x00803c0010 ",
1413 "Counter": "0,1,2,3", 1466 "Counter": "0,1,2,3",
@@ -1420,6 +1473,7 @@
1420 "CounterHTOff": "0,1,2,3" 1473 "CounterHTOff": "0,1,2,3"
1421 }, 1474 },
1422 { 1475 {
1476 "PublicDescription": "Counts prefetch (that bring data to L2) data reads that hit in the L3 and sibling core snoops are not needed as either the core-valid bit is not set or the shared line is present in multiple cores. Offcore response can be programmed only with a specific pair of event select and counter MSR, and with specific event codes and predefine mask bit value in a dedicated MSR to specify attributes of the offcore transaction.",
1423 "EventCode": "0xB7, 0xBB", 1477 "EventCode": "0xB7, 0xBB",
1424 "MSRValue": "0x01003c0010 ", 1478 "MSRValue": "0x01003c0010 ",
1425 "Counter": "0,1,2,3", 1479 "Counter": "0,1,2,3",
@@ -1432,6 +1486,7 @@
1432 "CounterHTOff": "0,1,2,3" 1486 "CounterHTOff": "0,1,2,3"
1433 }, 1487 },
1434 { 1488 {
1489 "PublicDescription": "Counts prefetch (that bring data to L2) data reads that hit in the L3 with a snoop miss response. Offcore response can be programmed only with a specific pair of event select and counter MSR, and with specific event codes and predefine mask bit value in a dedicated MSR to specify attributes of the offcore transaction.",
1435 "EventCode": "0xB7, 0xBB", 1490 "EventCode": "0xB7, 0xBB",
1436 "MSRValue": "0x02003c0010 ", 1491 "MSRValue": "0x02003c0010 ",
1437 "Counter": "0,1,2,3", 1492 "Counter": "0,1,2,3",
@@ -1444,6 +1499,7 @@
1444 "CounterHTOff": "0,1,2,3" 1499 "CounterHTOff": "0,1,2,3"
1445 }, 1500 },
1446 { 1501 {
1502 "PublicDescription": "Counts prefetch (that bring data to L2) data reads that hit in the L3 and the snoops to sibling cores hit in either E/S state and the line is not forwarded. Offcore response can be programmed only with a specific pair of event select and counter MSR, and with specific event codes and predefine mask bit value in a dedicated MSR to specify attributes of the offcore transaction.",
1447 "EventCode": "0xB7, 0xBB", 1503 "EventCode": "0xB7, 0xBB",
1448 "MSRValue": "0x04003c0010 ", 1504 "MSRValue": "0x04003c0010 ",
1449 "Counter": "0,1,2,3", 1505 "Counter": "0,1,2,3",
@@ -1456,6 +1512,7 @@
1456 "CounterHTOff": "0,1,2,3" 1512 "CounterHTOff": "0,1,2,3"
1457 }, 1513 },
1458 { 1514 {
1515 "PublicDescription": "tbd Offcore response can be programmed only with a specific pair of event select and counter MSR, and with specific event codes and predefine mask bit value in a dedicated MSR to specify attributes of the offcore transaction.",
1459 "EventCode": "0xB7, 0xBB", 1516 "EventCode": "0xB7, 0xBB",
1460 "MSRValue": "0x10003c0010 ", 1517 "MSRValue": "0x10003c0010 ",
1461 "Counter": "0,1,2,3", 1518 "Counter": "0,1,2,3",
@@ -1468,6 +1525,7 @@
1468 "CounterHTOff": "0,1,2,3" 1525 "CounterHTOff": "0,1,2,3"
1469 }, 1526 },
1470 { 1527 {
1528 "PublicDescription": "Counts prefetch (that bring data to L2) data reads that hit in the L3. Offcore response can be programmed only with a specific pair of event select and counter MSR, and with specific event codes and predefine mask bit value in a dedicated MSR to specify attributes of the offcore transaction.",
1471 "EventCode": "0xB7, 0xBB", 1529 "EventCode": "0xB7, 0xBB",
1472 "MSRValue": "0x3f803c0010 ", 1530 "MSRValue": "0x3f803c0010 ",
1473 "Counter": "0,1,2,3", 1531 "Counter": "0,1,2,3",
@@ -1480,6 +1538,7 @@
1480 "CounterHTOff": "0,1,2,3" 1538 "CounterHTOff": "0,1,2,3"
1481 }, 1539 },
1482 { 1540 {
1541 "PublicDescription": "Counts all prefetch (that bring data to L2) RFOs that have any response type. Offcore response can be programmed only with a specific pair of event select and counter MSR, and with specific event codes and predefine mask bit value in a dedicated MSR to specify attributes of the offcore transaction.",
1483 "EventCode": "0xB7, 0xBB", 1542 "EventCode": "0xB7, 0xBB",
1484 "MSRValue": "0x0000010020 ", 1543 "MSRValue": "0x0000010020 ",
1485 "Counter": "0,1,2,3", 1544 "Counter": "0,1,2,3",
@@ -1492,6 +1551,7 @@
1492 "CounterHTOff": "0,1,2,3" 1551 "CounterHTOff": "0,1,2,3"
1493 }, 1552 },
1494 { 1553 {
1554 "PublicDescription": "tbd Offcore response can be programmed only with a specific pair of event select and counter MSR, and with specific event codes and predefine mask bit value in a dedicated MSR to specify attributes of the offcore transaction.",
1495 "EventCode": "0xB7, 0xBB", 1555 "EventCode": "0xB7, 0xBB",
1496 "MSRValue": "0x0080020020 ", 1556 "MSRValue": "0x0080020020 ",
1497 "Counter": "0,1,2,3", 1557 "Counter": "0,1,2,3",
@@ -1504,6 +1564,7 @@
1504 "CounterHTOff": "0,1,2,3" 1564 "CounterHTOff": "0,1,2,3"
1505 }, 1565 },
1506 { 1566 {
1567 "PublicDescription": "tbd Offcore response can be programmed only with a specific pair of event select and counter MSR, and with specific event codes and predefine mask bit value in a dedicated MSR to specify attributes of the offcore transaction.",
1507 "EventCode": "0xB7, 0xBB", 1568 "EventCode": "0xB7, 0xBB",
1508 "MSRValue": "0x0100020020 ", 1569 "MSRValue": "0x0100020020 ",
1509 "Counter": "0,1,2,3", 1570 "Counter": "0,1,2,3",
@@ -1516,6 +1577,7 @@
1516 "CounterHTOff": "0,1,2,3" 1577 "CounterHTOff": "0,1,2,3"
1517 }, 1578 },
1518 { 1579 {
1580 "PublicDescription": "tbd Offcore response can be programmed only with a specific pair of event select and counter MSR, and with specific event codes and predefine mask bit value in a dedicated MSR to specify attributes of the offcore transaction.",
1519 "EventCode": "0xB7, 0xBB", 1581 "EventCode": "0xB7, 0xBB",
1520 "MSRValue": "0x0200020020 ", 1582 "MSRValue": "0x0200020020 ",
1521 "Counter": "0,1,2,3", 1583 "Counter": "0,1,2,3",
@@ -1528,6 +1590,7 @@
1528 "CounterHTOff": "0,1,2,3" 1590 "CounterHTOff": "0,1,2,3"
1529 }, 1591 },
1530 { 1592 {
1593 "PublicDescription": "tbd Offcore response can be programmed only with a specific pair of event select and counter MSR, and with specific event codes and predefine mask bit value in a dedicated MSR to specify attributes of the offcore transaction.",
1531 "EventCode": "0xB7, 0xBB", 1594 "EventCode": "0xB7, 0xBB",
1532 "MSRValue": "0x0400020020 ", 1595 "MSRValue": "0x0400020020 ",
1533 "Counter": "0,1,2,3", 1596 "Counter": "0,1,2,3",
@@ -1540,6 +1603,7 @@
1540 "CounterHTOff": "0,1,2,3" 1603 "CounterHTOff": "0,1,2,3"
1541 }, 1604 },
1542 { 1605 {
1606 "PublicDescription": "tbd Offcore response can be programmed only with a specific pair of event select and counter MSR, and with specific event codes and predefine mask bit value in a dedicated MSR to specify attributes of the offcore transaction.",
1543 "EventCode": "0xB7, 0xBB", 1607 "EventCode": "0xB7, 0xBB",
1544 "MSRValue": "0x1000020020 ", 1608 "MSRValue": "0x1000020020 ",
1545 "Counter": "0,1,2,3", 1609 "Counter": "0,1,2,3",
@@ -1552,6 +1616,7 @@
1552 "CounterHTOff": "0,1,2,3" 1616 "CounterHTOff": "0,1,2,3"
1553 }, 1617 },
1554 { 1618 {
1619 "PublicDescription": "tbd Offcore response can be programmed only with a specific pair of event select and counter MSR, and with specific event codes and predefine mask bit value in a dedicated MSR to specify attributes of the offcore transaction.",
1555 "EventCode": "0xB7, 0xBB", 1620 "EventCode": "0xB7, 0xBB",
1556 "MSRValue": "0x3f80020020 ", 1621 "MSRValue": "0x3f80020020 ",
1557 "Counter": "0,1,2,3", 1622 "Counter": "0,1,2,3",
@@ -1564,6 +1629,7 @@
1564 "CounterHTOff": "0,1,2,3" 1629 "CounterHTOff": "0,1,2,3"
1565 }, 1630 },
1566 { 1631 {
1632 "PublicDescription": "Counts all prefetch (that bring data to L2) RFOs that hit in the L3 with no details on snoop-related information. Offcore response can be programmed only with a specific pair of event select and counter MSR, and with specific event codes and predefine mask bit value in a dedicated MSR to specify attributes of the offcore transaction.",
1567 "EventCode": "0xB7, 0xBB", 1633 "EventCode": "0xB7, 0xBB",
1568 "MSRValue": "0x00803c0020 ", 1634 "MSRValue": "0x00803c0020 ",
1569 "Counter": "0,1,2,3", 1635 "Counter": "0,1,2,3",
@@ -1576,6 +1642,7 @@
1576 "CounterHTOff": "0,1,2,3" 1642 "CounterHTOff": "0,1,2,3"
1577 }, 1643 },
1578 { 1644 {
1645 "PublicDescription": "Counts all prefetch (that bring data to L2) RFOs that hit in the L3 and sibling core snoops are not needed as either the core-valid bit is not set or the shared line is present in multiple cores. Offcore response can be programmed only with a specific pair of event select and counter MSR, and with specific event codes and predefine mask bit value in a dedicated MSR to specify attributes of the offcore transaction.",
1579 "EventCode": "0xB7, 0xBB", 1646 "EventCode": "0xB7, 0xBB",
1580 "MSRValue": "0x01003c0020 ", 1647 "MSRValue": "0x01003c0020 ",
1581 "Counter": "0,1,2,3", 1648 "Counter": "0,1,2,3",
@@ -1588,6 +1655,7 @@
1588 "CounterHTOff": "0,1,2,3" 1655 "CounterHTOff": "0,1,2,3"
1589 }, 1656 },
1590 { 1657 {
1658 "PublicDescription": "Counts all prefetch (that bring data to L2) RFOs that hit in the L3 with a snoop miss response. Offcore response can be programmed only with a specific pair of event select and counter MSR, and with specific event codes and predefine mask bit value in a dedicated MSR to specify attributes of the offcore transaction.",
1591 "EventCode": "0xB7, 0xBB", 1659 "EventCode": "0xB7, 0xBB",
1592 "MSRValue": "0x02003c0020 ", 1660 "MSRValue": "0x02003c0020 ",
1593 "Counter": "0,1,2,3", 1661 "Counter": "0,1,2,3",
@@ -1600,6 +1668,7 @@
1600 "CounterHTOff": "0,1,2,3" 1668 "CounterHTOff": "0,1,2,3"
1601 }, 1669 },
1602 { 1670 {
1671 "PublicDescription": "Counts all prefetch (that bring data to L2) RFOs that hit in the L3 and the snoops to sibling cores hit in either E/S state and the line is not forwarded. Offcore response can be programmed only with a specific pair of event select and counter MSR, and with specific event codes and predefine mask bit value in a dedicated MSR to specify attributes of the offcore transaction.",
1603 "EventCode": "0xB7, 0xBB", 1672 "EventCode": "0xB7, 0xBB",
1604 "MSRValue": "0x04003c0020 ", 1673 "MSRValue": "0x04003c0020 ",
1605 "Counter": "0,1,2,3", 1674 "Counter": "0,1,2,3",
@@ -1612,6 +1681,7 @@
1612 "CounterHTOff": "0,1,2,3" 1681 "CounterHTOff": "0,1,2,3"
1613 }, 1682 },
1614 { 1683 {
1684 "PublicDescription": "tbd Offcore response can be programmed only with a specific pair of event select and counter MSR, and with specific event codes and predefine mask bit value in a dedicated MSR to specify attributes of the offcore transaction.",
1615 "EventCode": "0xB7, 0xBB", 1685 "EventCode": "0xB7, 0xBB",
1616 "MSRValue": "0x10003c0020 ", 1686 "MSRValue": "0x10003c0020 ",
1617 "Counter": "0,1,2,3", 1687 "Counter": "0,1,2,3",
@@ -1624,6 +1694,7 @@
1624 "CounterHTOff": "0,1,2,3" 1694 "CounterHTOff": "0,1,2,3"
1625 }, 1695 },
1626 { 1696 {
1697 "PublicDescription": "Counts all prefetch (that bring data to L2) RFOs that hit in the L3. Offcore response can be programmed only with a specific pair of event select and counter MSR, and with specific event codes and predefine mask bit value in a dedicated MSR to specify attributes of the offcore transaction.",
1627 "EventCode": "0xB7, 0xBB", 1698 "EventCode": "0xB7, 0xBB",
1628 "MSRValue": "0x3f803c0020 ", 1699 "MSRValue": "0x3f803c0020 ",
1629 "Counter": "0,1,2,3", 1700 "Counter": "0,1,2,3",
@@ -1636,6 +1707,7 @@
1636 "CounterHTOff": "0,1,2,3" 1707 "CounterHTOff": "0,1,2,3"
1637 }, 1708 },
1638 { 1709 {
1710 "PublicDescription": "Counts all prefetch (that bring data to LLC only) code reads that have any response type. Offcore response can be programmed only with a specific pair of event select and counter MSR, and with specific event codes and predefine mask bit value in a dedicated MSR to specify attributes of the offcore transaction.",
1639 "EventCode": "0xB7, 0xBB", 1711 "EventCode": "0xB7, 0xBB",
1640 "MSRValue": "0x0000010040 ", 1712 "MSRValue": "0x0000010040 ",
1641 "Counter": "0,1,2,3", 1713 "Counter": "0,1,2,3",
@@ -1648,6 +1720,7 @@
1648 "CounterHTOff": "0,1,2,3" 1720 "CounterHTOff": "0,1,2,3"
1649 }, 1721 },
1650 { 1722 {
1723 "PublicDescription": "tbd Offcore response can be programmed only with a specific pair of event select and counter MSR, and with specific event codes and predefine mask bit value in a dedicated MSR to specify attributes of the offcore transaction.",
1651 "EventCode": "0xB7, 0xBB", 1724 "EventCode": "0xB7, 0xBB",
1652 "MSRValue": "0x0080020040 ", 1725 "MSRValue": "0x0080020040 ",
1653 "Counter": "0,1,2,3", 1726 "Counter": "0,1,2,3",
@@ -1660,6 +1733,7 @@
1660 "CounterHTOff": "0,1,2,3" 1733 "CounterHTOff": "0,1,2,3"
1661 }, 1734 },
1662 { 1735 {
1736 "PublicDescription": "tbd Offcore response can be programmed only with a specific pair of event select and counter MSR, and with specific event codes and predefine mask bit value in a dedicated MSR to specify attributes of the offcore transaction.",
1663 "EventCode": "0xB7, 0xBB", 1737 "EventCode": "0xB7, 0xBB",
1664 "MSRValue": "0x0100020040 ", 1738 "MSRValue": "0x0100020040 ",
1665 "Counter": "0,1,2,3", 1739 "Counter": "0,1,2,3",
@@ -1672,6 +1746,7 @@
1672 "CounterHTOff": "0,1,2,3" 1746 "CounterHTOff": "0,1,2,3"
1673 }, 1747 },
1674 { 1748 {
1749 "PublicDescription": "tbd Offcore response can be programmed only with a specific pair of event select and counter MSR, and with specific event codes and predefine mask bit value in a dedicated MSR to specify attributes of the offcore transaction.",
1675 "EventCode": "0xB7, 0xBB", 1750 "EventCode": "0xB7, 0xBB",
1676 "MSRValue": "0x0200020040 ", 1751 "MSRValue": "0x0200020040 ",
1677 "Counter": "0,1,2,3", 1752 "Counter": "0,1,2,3",
@@ -1684,6 +1759,7 @@
1684 "CounterHTOff": "0,1,2,3" 1759 "CounterHTOff": "0,1,2,3"
1685 }, 1760 },
1686 { 1761 {
1762 "PublicDescription": "tbd Offcore response can be programmed only with a specific pair of event select and counter MSR, and with specific event codes and predefine mask bit value in a dedicated MSR to specify attributes of the offcore transaction.",
1687 "EventCode": "0xB7, 0xBB", 1763 "EventCode": "0xB7, 0xBB",
1688 "MSRValue": "0x0400020040 ", 1764 "MSRValue": "0x0400020040 ",
1689 "Counter": "0,1,2,3", 1765 "Counter": "0,1,2,3",
@@ -1696,6 +1772,7 @@
1696 "CounterHTOff": "0,1,2,3" 1772 "CounterHTOff": "0,1,2,3"
1697 }, 1773 },
1698 { 1774 {
1775 "PublicDescription": "tbd Offcore response can be programmed only with a specific pair of event select and counter MSR, and with specific event codes and predefine mask bit value in a dedicated MSR to specify attributes of the offcore transaction.",
1699 "EventCode": "0xB7, 0xBB", 1776 "EventCode": "0xB7, 0xBB",
1700 "MSRValue": "0x1000020040 ", 1777 "MSRValue": "0x1000020040 ",
1701 "Counter": "0,1,2,3", 1778 "Counter": "0,1,2,3",
@@ -1708,6 +1785,7 @@
1708 "CounterHTOff": "0,1,2,3" 1785 "CounterHTOff": "0,1,2,3"
1709 }, 1786 },
1710 { 1787 {
1788 "PublicDescription": "tbd Offcore response can be programmed only with a specific pair of event select and counter MSR, and with specific event codes and predefine mask bit value in a dedicated MSR to specify attributes of the offcore transaction.",
1711 "EventCode": "0xB7, 0xBB", 1789 "EventCode": "0xB7, 0xBB",
1712 "MSRValue": "0x3f80020040 ", 1790 "MSRValue": "0x3f80020040 ",
1713 "Counter": "0,1,2,3", 1791 "Counter": "0,1,2,3",
@@ -1720,6 +1798,7 @@
1720 "CounterHTOff": "0,1,2,3" 1798 "CounterHTOff": "0,1,2,3"
1721 }, 1799 },
1722 { 1800 {
1801 "PublicDescription": "Counts all prefetch (that bring data to LLC only) code reads that hit in the L3 with no details on snoop-related information. Offcore response can be programmed only with a specific pair of event select and counter MSR, and with specific event codes and predefine mask bit value in a dedicated MSR to specify attributes of the offcore transaction.",
1723 "EventCode": "0xB7, 0xBB", 1802 "EventCode": "0xB7, 0xBB",
1724 "MSRValue": "0x00803c0040 ", 1803 "MSRValue": "0x00803c0040 ",
1725 "Counter": "0,1,2,3", 1804 "Counter": "0,1,2,3",
@@ -1732,6 +1811,7 @@
1732 "CounterHTOff": "0,1,2,3" 1811 "CounterHTOff": "0,1,2,3"
1733 }, 1812 },
1734 { 1813 {
1814 "PublicDescription": "Counts all prefetch (that bring data to LLC only) code reads that hit in the L3 and sibling core snoops are not needed as either the core-valid bit is not set or the shared line is present in multiple cores. Offcore response can be programmed only with a specific pair of event select and counter MSR, and with specific event codes and predefine mask bit value in a dedicated MSR to specify attributes of the offcore transaction.",
1735 "EventCode": "0xB7, 0xBB", 1815 "EventCode": "0xB7, 0xBB",
1736 "MSRValue": "0x01003c0040 ", 1816 "MSRValue": "0x01003c0040 ",
1737 "Counter": "0,1,2,3", 1817 "Counter": "0,1,2,3",
@@ -1744,6 +1824,7 @@
1744 "CounterHTOff": "0,1,2,3" 1824 "CounterHTOff": "0,1,2,3"
1745 }, 1825 },
1746 { 1826 {
1827 "PublicDescription": "Counts all prefetch (that bring data to LLC only) code reads that hit in the L3 with a snoop miss response. Offcore response can be programmed only with a specific pair of event select and counter MSR, and with specific event codes and predefine mask bit value in a dedicated MSR to specify attributes of the offcore transaction.",
1747 "EventCode": "0xB7, 0xBB", 1828 "EventCode": "0xB7, 0xBB",
1748 "MSRValue": "0x02003c0040 ", 1829 "MSRValue": "0x02003c0040 ",
1749 "Counter": "0,1,2,3", 1830 "Counter": "0,1,2,3",
@@ -1756,6 +1837,7 @@
1756 "CounterHTOff": "0,1,2,3" 1837 "CounterHTOff": "0,1,2,3"
1757 }, 1838 },
1758 { 1839 {
1840 "PublicDescription": "Counts all prefetch (that bring data to LLC only) code reads that hit in the L3 and the snoops to sibling cores hit in either E/S state and the line is not forwarded. Offcore response can be programmed only with a specific pair of event select and counter MSR, and with specific event codes and predefine mask bit value in a dedicated MSR to specify attributes of the offcore transaction.",
1759 "EventCode": "0xB7, 0xBB", 1841 "EventCode": "0xB7, 0xBB",
1760 "MSRValue": "0x04003c0040 ", 1842 "MSRValue": "0x04003c0040 ",
1761 "Counter": "0,1,2,3", 1843 "Counter": "0,1,2,3",
@@ -1768,6 +1850,7 @@
1768 "CounterHTOff": "0,1,2,3" 1850 "CounterHTOff": "0,1,2,3"
1769 }, 1851 },
1770 { 1852 {
1853 "PublicDescription": "tbd Offcore response can be programmed only with a specific pair of event select and counter MSR, and with specific event codes and predefine mask bit value in a dedicated MSR to specify attributes of the offcore transaction.",
1771 "EventCode": "0xB7, 0xBB", 1854 "EventCode": "0xB7, 0xBB",
1772 "MSRValue": "0x10003c0040 ", 1855 "MSRValue": "0x10003c0040 ",
1773 "Counter": "0,1,2,3", 1856 "Counter": "0,1,2,3",
@@ -1780,6 +1863,7 @@
1780 "CounterHTOff": "0,1,2,3" 1863 "CounterHTOff": "0,1,2,3"
1781 }, 1864 },
1782 { 1865 {
1866 "PublicDescription": "Counts all prefetch (that bring data to LLC only) code reads that hit in the L3. Offcore response can be programmed only with a specific pair of event select and counter MSR, and with specific event codes and predefine mask bit value in a dedicated MSR to specify attributes of the offcore transaction.",
1783 "EventCode": "0xB7, 0xBB", 1867 "EventCode": "0xB7, 0xBB",
1784 "MSRValue": "0x3f803c0040 ", 1868 "MSRValue": "0x3f803c0040 ",
1785 "Counter": "0,1,2,3", 1869 "Counter": "0,1,2,3",
@@ -1792,6 +1876,7 @@
1792 "CounterHTOff": "0,1,2,3" 1876 "CounterHTOff": "0,1,2,3"
1793 }, 1877 },
1794 { 1878 {
1879 "PublicDescription": "Counts all prefetch (that bring data to LLC only) data reads that have any response type. Offcore response can be programmed only with a specific pair of event select and counter MSR, and with specific event codes and predefine mask bit value in a dedicated MSR to specify attributes of the offcore transaction.",
1795 "EventCode": "0xB7, 0xBB", 1880 "EventCode": "0xB7, 0xBB",
1796 "MSRValue": "0x0000010080 ", 1881 "MSRValue": "0x0000010080 ",
1797 "Counter": "0,1,2,3", 1882 "Counter": "0,1,2,3",
@@ -1804,6 +1889,7 @@
1804 "CounterHTOff": "0,1,2,3" 1889 "CounterHTOff": "0,1,2,3"
1805 }, 1890 },
1806 { 1891 {
1892 "PublicDescription": "tbd Offcore response can be programmed only with a specific pair of event select and counter MSR, and with specific event codes and predefine mask bit value in a dedicated MSR to specify attributes of the offcore transaction.",
1807 "EventCode": "0xB7, 0xBB", 1893 "EventCode": "0xB7, 0xBB",
1808 "MSRValue": "0x0080020080 ", 1894 "MSRValue": "0x0080020080 ",
1809 "Counter": "0,1,2,3", 1895 "Counter": "0,1,2,3",
@@ -1816,6 +1902,7 @@
1816 "CounterHTOff": "0,1,2,3" 1902 "CounterHTOff": "0,1,2,3"
1817 }, 1903 },
1818 { 1904 {
1905 "PublicDescription": "tbd Offcore response can be programmed only with a specific pair of event select and counter MSR, and with specific event codes and predefine mask bit value in a dedicated MSR to specify attributes of the offcore transaction.",
1819 "EventCode": "0xB7, 0xBB", 1906 "EventCode": "0xB7, 0xBB",
1820 "MSRValue": "0x0100020080 ", 1907 "MSRValue": "0x0100020080 ",
1821 "Counter": "0,1,2,3", 1908 "Counter": "0,1,2,3",
@@ -1828,6 +1915,7 @@
1828 "CounterHTOff": "0,1,2,3" 1915 "CounterHTOff": "0,1,2,3"
1829 }, 1916 },
1830 { 1917 {
1918 "PublicDescription": "tbd Offcore response can be programmed only with a specific pair of event select and counter MSR, and with specific event codes and predefine mask bit value in a dedicated MSR to specify attributes of the offcore transaction.",
1831 "EventCode": "0xB7, 0xBB", 1919 "EventCode": "0xB7, 0xBB",
1832 "MSRValue": "0x0200020080 ", 1920 "MSRValue": "0x0200020080 ",
1833 "Counter": "0,1,2,3", 1921 "Counter": "0,1,2,3",
@@ -1840,6 +1928,7 @@
1840 "CounterHTOff": "0,1,2,3" 1928 "CounterHTOff": "0,1,2,3"
1841 }, 1929 },
1842 { 1930 {
1931 "PublicDescription": "tbd Offcore response can be programmed only with a specific pair of event select and counter MSR, and with specific event codes and predefine mask bit value in a dedicated MSR to specify attributes of the offcore transaction.",
1843 "EventCode": "0xB7, 0xBB", 1932 "EventCode": "0xB7, 0xBB",
1844 "MSRValue": "0x0400020080 ", 1933 "MSRValue": "0x0400020080 ",
1845 "Counter": "0,1,2,3", 1934 "Counter": "0,1,2,3",
@@ -1852,6 +1941,7 @@
1852 "CounterHTOff": "0,1,2,3" 1941 "CounterHTOff": "0,1,2,3"
1853 }, 1942 },
1854 { 1943 {
1944 "PublicDescription": "tbd Offcore response can be programmed only with a specific pair of event select and counter MSR, and with specific event codes and predefine mask bit value in a dedicated MSR to specify attributes of the offcore transaction.",
1855 "EventCode": "0xB7, 0xBB", 1945 "EventCode": "0xB7, 0xBB",
1856 "MSRValue": "0x1000020080 ", 1946 "MSRValue": "0x1000020080 ",
1857 "Counter": "0,1,2,3", 1947 "Counter": "0,1,2,3",
@@ -1864,6 +1954,7 @@
1864 "CounterHTOff": "0,1,2,3" 1954 "CounterHTOff": "0,1,2,3"
1865 }, 1955 },
1866 { 1956 {
1957 "PublicDescription": "tbd Offcore response can be programmed only with a specific pair of event select and counter MSR, and with specific event codes and predefine mask bit value in a dedicated MSR to specify attributes of the offcore transaction.",
1867 "EventCode": "0xB7, 0xBB", 1958 "EventCode": "0xB7, 0xBB",
1868 "MSRValue": "0x3f80020080 ", 1959 "MSRValue": "0x3f80020080 ",
1869 "Counter": "0,1,2,3", 1960 "Counter": "0,1,2,3",
@@ -1876,6 +1967,7 @@
1876 "CounterHTOff": "0,1,2,3" 1967 "CounterHTOff": "0,1,2,3"
1877 }, 1968 },
1878 { 1969 {
1970 "PublicDescription": "Counts all prefetch (that bring data to LLC only) data reads that hit in the L3 with no details on snoop-related information. Offcore response can be programmed only with a specific pair of event select and counter MSR, and with specific event codes and predefine mask bit value in a dedicated MSR to specify attributes of the offcore transaction.",
1879 "EventCode": "0xB7, 0xBB", 1971 "EventCode": "0xB7, 0xBB",
1880 "MSRValue": "0x00803c0080 ", 1972 "MSRValue": "0x00803c0080 ",
1881 "Counter": "0,1,2,3", 1973 "Counter": "0,1,2,3",
@@ -1888,6 +1980,7 @@
1888 "CounterHTOff": "0,1,2,3" 1980 "CounterHTOff": "0,1,2,3"
1889 }, 1981 },
1890 { 1982 {
1983 "PublicDescription": "Counts all prefetch (that bring data to LLC only) data reads that hit in the L3 and sibling core snoops are not needed as either the core-valid bit is not set or the shared line is present in multiple cores. Offcore response can be programmed only with a specific pair of event select and counter MSR, and with specific event codes and predefine mask bit value in a dedicated MSR to specify attributes of the offcore transaction.",
1891 "EventCode": "0xB7, 0xBB", 1984 "EventCode": "0xB7, 0xBB",
1892 "MSRValue": "0x01003c0080 ", 1985 "MSRValue": "0x01003c0080 ",
1893 "Counter": "0,1,2,3", 1986 "Counter": "0,1,2,3",
@@ -1900,6 +1993,7 @@
1900 "CounterHTOff": "0,1,2,3" 1993 "CounterHTOff": "0,1,2,3"
1901 }, 1994 },
1902 { 1995 {
1996 "PublicDescription": "Counts all prefetch (that bring data to LLC only) data reads that hit in the L3 with a snoop miss response. Offcore response can be programmed only with a specific pair of event select and counter MSR, and with specific event codes and predefine mask bit value in a dedicated MSR to specify attributes of the offcore transaction.",
1903 "EventCode": "0xB7, 0xBB", 1997 "EventCode": "0xB7, 0xBB",
1904 "MSRValue": "0x02003c0080 ", 1998 "MSRValue": "0x02003c0080 ",
1905 "Counter": "0,1,2,3", 1999 "Counter": "0,1,2,3",
@@ -1912,6 +2006,7 @@
1912 "CounterHTOff": "0,1,2,3" 2006 "CounterHTOff": "0,1,2,3"
1913 }, 2007 },
1914 { 2008 {
2009 "PublicDescription": "Counts all prefetch (that bring data to LLC only) data reads that hit in the L3 and the snoops to sibling cores hit in either E/S state and the line is not forwarded. Offcore response can be programmed only with a specific pair of event select and counter MSR, and with specific event codes and predefine mask bit value in a dedicated MSR to specify attributes of the offcore transaction.",
1915 "EventCode": "0xB7, 0xBB", 2010 "EventCode": "0xB7, 0xBB",
1916 "MSRValue": "0x04003c0080 ", 2011 "MSRValue": "0x04003c0080 ",
1917 "Counter": "0,1,2,3", 2012 "Counter": "0,1,2,3",
@@ -1924,6 +2019,7 @@
1924 "CounterHTOff": "0,1,2,3" 2019 "CounterHTOff": "0,1,2,3"
1925 }, 2020 },
1926 { 2021 {
2022 "PublicDescription": "tbd Offcore response can be programmed only with a specific pair of event select and counter MSR, and with specific event codes and predefine mask bit value in a dedicated MSR to specify attributes of the offcore transaction.",
1927 "EventCode": "0xB7, 0xBB", 2023 "EventCode": "0xB7, 0xBB",
1928 "MSRValue": "0x10003c0080 ", 2024 "MSRValue": "0x10003c0080 ",
1929 "Counter": "0,1,2,3", 2025 "Counter": "0,1,2,3",
@@ -1936,6 +2032,7 @@
1936 "CounterHTOff": "0,1,2,3" 2032 "CounterHTOff": "0,1,2,3"
1937 }, 2033 },
1938 { 2034 {
2035 "PublicDescription": "Counts all prefetch (that bring data to LLC only) data reads that hit in the L3. Offcore response can be programmed only with a specific pair of event select and counter MSR, and with specific event codes and predefine mask bit value in a dedicated MSR to specify attributes of the offcore transaction.",
1939 "EventCode": "0xB7, 0xBB", 2036 "EventCode": "0xB7, 0xBB",
1940 "MSRValue": "0x3f803c0080 ", 2037 "MSRValue": "0x3f803c0080 ",
1941 "Counter": "0,1,2,3", 2038 "Counter": "0,1,2,3",
@@ -1948,6 +2045,7 @@
1948 "CounterHTOff": "0,1,2,3" 2045 "CounterHTOff": "0,1,2,3"
1949 }, 2046 },
1950 { 2047 {
2048 "PublicDescription": "Counts all prefetch (that bring data to LLC only) RFOs that have any response type. Offcore response can be programmed only with a specific pair of event select and counter MSR, and with specific event codes and predefine mask bit value in a dedicated MSR to specify attributes of the offcore transaction.",
1951 "EventCode": "0xB7, 0xBB", 2049 "EventCode": "0xB7, 0xBB",
1952 "MSRValue": "0x0000010100 ", 2050 "MSRValue": "0x0000010100 ",
1953 "Counter": "0,1,2,3", 2051 "Counter": "0,1,2,3",
@@ -1960,6 +2058,7 @@
1960 "CounterHTOff": "0,1,2,3" 2058 "CounterHTOff": "0,1,2,3"
1961 }, 2059 },
1962 { 2060 {
2061 "PublicDescription": "tbd Offcore response can be programmed only with a specific pair of event select and counter MSR, and with specific event codes and predefine mask bit value in a dedicated MSR to specify attributes of the offcore transaction.",
1963 "EventCode": "0xB7, 0xBB", 2062 "EventCode": "0xB7, 0xBB",
1964 "MSRValue": "0x0080020100 ", 2063 "MSRValue": "0x0080020100 ",
1965 "Counter": "0,1,2,3", 2064 "Counter": "0,1,2,3",
@@ -1972,6 +2071,7 @@
1972 "CounterHTOff": "0,1,2,3" 2071 "CounterHTOff": "0,1,2,3"
1973 }, 2072 },
1974 { 2073 {
2074 "PublicDescription": "tbd Offcore response can be programmed only with a specific pair of event select and counter MSR, and with specific event codes and predefine mask bit value in a dedicated MSR to specify attributes of the offcore transaction.",
1975 "EventCode": "0xB7, 0xBB", 2075 "EventCode": "0xB7, 0xBB",
1976 "MSRValue": "0x0100020100 ", 2076 "MSRValue": "0x0100020100 ",
1977 "Counter": "0,1,2,3", 2077 "Counter": "0,1,2,3",
@@ -1984,6 +2084,7 @@
1984 "CounterHTOff": "0,1,2,3" 2084 "CounterHTOff": "0,1,2,3"
1985 }, 2085 },
1986 { 2086 {
2087 "PublicDescription": "tbd Offcore response can be programmed only with a specific pair of event select and counter MSR, and with specific event codes and predefine mask bit value in a dedicated MSR to specify attributes of the offcore transaction.",
1987 "EventCode": "0xB7, 0xBB", 2088 "EventCode": "0xB7, 0xBB",
1988 "MSRValue": "0x0200020100 ", 2089 "MSRValue": "0x0200020100 ",
1989 "Counter": "0,1,2,3", 2090 "Counter": "0,1,2,3",
@@ -1996,6 +2097,7 @@
1996 "CounterHTOff": "0,1,2,3" 2097 "CounterHTOff": "0,1,2,3"
1997 }, 2098 },
1998 { 2099 {
2100 "PublicDescription": "tbd Offcore response can be programmed only with a specific pair of event select and counter MSR, and with specific event codes and predefine mask bit value in a dedicated MSR to specify attributes of the offcore transaction.",
1999 "EventCode": "0xB7, 0xBB", 2101 "EventCode": "0xB7, 0xBB",
2000 "MSRValue": "0x0400020100 ", 2102 "MSRValue": "0x0400020100 ",
2001 "Counter": "0,1,2,3", 2103 "Counter": "0,1,2,3",
@@ -2008,6 +2110,7 @@
2008 "CounterHTOff": "0,1,2,3" 2110 "CounterHTOff": "0,1,2,3"
2009 }, 2111 },
2010 { 2112 {
2113 "PublicDescription": "tbd Offcore response can be programmed only with a specific pair of event select and counter MSR, and with specific event codes and predefine mask bit value in a dedicated MSR to specify attributes of the offcore transaction.",
2011 "EventCode": "0xB7, 0xBB", 2114 "EventCode": "0xB7, 0xBB",
2012 "MSRValue": "0x1000020100 ", 2115 "MSRValue": "0x1000020100 ",
2013 "Counter": "0,1,2,3", 2116 "Counter": "0,1,2,3",
@@ -2020,6 +2123,7 @@
2020 "CounterHTOff": "0,1,2,3" 2123 "CounterHTOff": "0,1,2,3"
2021 }, 2124 },
2022 { 2125 {
2126 "PublicDescription": "tbd Offcore response can be programmed only with a specific pair of event select and counter MSR, and with specific event codes and predefine mask bit value in a dedicated MSR to specify attributes of the offcore transaction.",
2023 "EventCode": "0xB7, 0xBB", 2127 "EventCode": "0xB7, 0xBB",
2024 "MSRValue": "0x3f80020100 ", 2128 "MSRValue": "0x3f80020100 ",
2025 "Counter": "0,1,2,3", 2129 "Counter": "0,1,2,3",
@@ -2032,6 +2136,7 @@
2032 "CounterHTOff": "0,1,2,3" 2136 "CounterHTOff": "0,1,2,3"
2033 }, 2137 },
2034 { 2138 {
2139 "PublicDescription": "Counts all prefetch (that bring data to LLC only) RFOs that hit in the L3 with no details on snoop-related information. Offcore response can be programmed only with a specific pair of event select and counter MSR, and with specific event codes and predefine mask bit value in a dedicated MSR to specify attributes of the offcore transaction.",
2035 "EventCode": "0xB7, 0xBB", 2140 "EventCode": "0xB7, 0xBB",
2036 "MSRValue": "0x00803c0100 ", 2141 "MSRValue": "0x00803c0100 ",
2037 "Counter": "0,1,2,3", 2142 "Counter": "0,1,2,3",
@@ -2044,6 +2149,7 @@
2044 "CounterHTOff": "0,1,2,3" 2149 "CounterHTOff": "0,1,2,3"
2045 }, 2150 },
2046 { 2151 {
2152 "PublicDescription": "Counts all prefetch (that bring data to LLC only) RFOs that hit in the L3 and sibling core snoops are not needed as either the core-valid bit is not set or the shared line is present in multiple cores. Offcore response can be programmed only with a specific pair of event select and counter MSR, and with specific event codes and predefine mask bit value in a dedicated MSR to specify attributes of the offcore transaction.",
2047 "EventCode": "0xB7, 0xBB", 2153 "EventCode": "0xB7, 0xBB",
2048 "MSRValue": "0x01003c0100 ", 2154 "MSRValue": "0x01003c0100 ",
2049 "Counter": "0,1,2,3", 2155 "Counter": "0,1,2,3",
@@ -2056,6 +2162,7 @@
2056 "CounterHTOff": "0,1,2,3" 2162 "CounterHTOff": "0,1,2,3"
2057 }, 2163 },
2058 { 2164 {
2165 "PublicDescription": "Counts all prefetch (that bring data to LLC only) RFOs that hit in the L3 with a snoop miss response. Offcore response can be programmed only with a specific pair of event select and counter MSR, and with specific event codes and predefine mask bit value in a dedicated MSR to specify attributes of the offcore transaction.",
2059 "EventCode": "0xB7, 0xBB", 2166 "EventCode": "0xB7, 0xBB",
2060 "MSRValue": "0x02003c0100 ", 2167 "MSRValue": "0x02003c0100 ",
2061 "Counter": "0,1,2,3", 2168 "Counter": "0,1,2,3",
@@ -2068,6 +2175,7 @@
2068 "CounterHTOff": "0,1,2,3" 2175 "CounterHTOff": "0,1,2,3"
2069 }, 2176 },
2070 { 2177 {
2178 "PublicDescription": "Counts all prefetch (that bring data to LLC only) RFOs that hit in the L3 and the snoops to sibling cores hit in either E/S state and the line is not forwarded. Offcore response can be programmed only with a specific pair of event select and counter MSR, and with specific event codes and predefine mask bit value in a dedicated MSR to specify attributes of the offcore transaction.",
2071 "EventCode": "0xB7, 0xBB", 2179 "EventCode": "0xB7, 0xBB",
2072 "MSRValue": "0x04003c0100 ", 2180 "MSRValue": "0x04003c0100 ",
2073 "Counter": "0,1,2,3", 2181 "Counter": "0,1,2,3",
@@ -2080,6 +2188,7 @@
2080 "CounterHTOff": "0,1,2,3" 2188 "CounterHTOff": "0,1,2,3"
2081 }, 2189 },
2082 { 2190 {
2191 "PublicDescription": "tbd Offcore response can be programmed only with a specific pair of event select and counter MSR, and with specific event codes and predefine mask bit value in a dedicated MSR to specify attributes of the offcore transaction.",
2083 "EventCode": "0xB7, 0xBB", 2192 "EventCode": "0xB7, 0xBB",
2084 "MSRValue": "0x10003c0100 ", 2193 "MSRValue": "0x10003c0100 ",
2085 "Counter": "0,1,2,3", 2194 "Counter": "0,1,2,3",
@@ -2092,6 +2201,7 @@
2092 "CounterHTOff": "0,1,2,3" 2201 "CounterHTOff": "0,1,2,3"
2093 }, 2202 },
2094 { 2203 {
2204 "PublicDescription": "Counts all prefetch (that bring data to LLC only) RFOs that hit in the L3. Offcore response can be programmed only with a specific pair of event select and counter MSR, and with specific event codes and predefine mask bit value in a dedicated MSR to specify attributes of the offcore transaction.",
2095 "EventCode": "0xB7, 0xBB", 2205 "EventCode": "0xB7, 0xBB",
2096 "MSRValue": "0x3f803c0100 ", 2206 "MSRValue": "0x3f803c0100 ",
2097 "Counter": "0,1,2,3", 2207 "Counter": "0,1,2,3",
@@ -2104,6 +2214,7 @@
2104 "CounterHTOff": "0,1,2,3" 2214 "CounterHTOff": "0,1,2,3"
2105 }, 2215 },
2106 { 2216 {
2217 "PublicDescription": "Counts prefetch (that bring data to LLC only) code reads that have any response type. Offcore response can be programmed only with a specific pair of event select and counter MSR, and with specific event codes and predefine mask bit value in a dedicated MSR to specify attributes of the offcore transaction.",
2107 "EventCode": "0xB7, 0xBB", 2218 "EventCode": "0xB7, 0xBB",
2108 "MSRValue": "0x0000010200 ", 2219 "MSRValue": "0x0000010200 ",
2109 "Counter": "0,1,2,3", 2220 "Counter": "0,1,2,3",
@@ -2116,6 +2227,7 @@
2116 "CounterHTOff": "0,1,2,3" 2227 "CounterHTOff": "0,1,2,3"
2117 }, 2228 },
2118 { 2229 {
2230 "PublicDescription": "tbd Offcore response can be programmed only with a specific pair of event select and counter MSR, and with specific event codes and predefine mask bit value in a dedicated MSR to specify attributes of the offcore transaction.",
2119 "EventCode": "0xB7, 0xBB", 2231 "EventCode": "0xB7, 0xBB",
2120 "MSRValue": "0x0080020200 ", 2232 "MSRValue": "0x0080020200 ",
2121 "Counter": "0,1,2,3", 2233 "Counter": "0,1,2,3",
@@ -2128,6 +2240,7 @@
2128 "CounterHTOff": "0,1,2,3" 2240 "CounterHTOff": "0,1,2,3"
2129 }, 2241 },
2130 { 2242 {
2243 "PublicDescription": "tbd Offcore response can be programmed only with a specific pair of event select and counter MSR, and with specific event codes and predefine mask bit value in a dedicated MSR to specify attributes of the offcore transaction.",
2131 "EventCode": "0xB7, 0xBB", 2244 "EventCode": "0xB7, 0xBB",
2132 "MSRValue": "0x0100020200 ", 2245 "MSRValue": "0x0100020200 ",
2133 "Counter": "0,1,2,3", 2246 "Counter": "0,1,2,3",
@@ -2140,6 +2253,7 @@
2140 "CounterHTOff": "0,1,2,3" 2253 "CounterHTOff": "0,1,2,3"
2141 }, 2254 },
2142 { 2255 {
2256 "PublicDescription": "tbd Offcore response can be programmed only with a specific pair of event select and counter MSR, and with specific event codes and predefine mask bit value in a dedicated MSR to specify attributes of the offcore transaction.",
2143 "EventCode": "0xB7, 0xBB", 2257 "EventCode": "0xB7, 0xBB",
2144 "MSRValue": "0x0200020200 ", 2258 "MSRValue": "0x0200020200 ",
2145 "Counter": "0,1,2,3", 2259 "Counter": "0,1,2,3",
@@ -2152,6 +2266,7 @@
2152 "CounterHTOff": "0,1,2,3" 2266 "CounterHTOff": "0,1,2,3"
2153 }, 2267 },
2154 { 2268 {
2269 "PublicDescription": "tbd Offcore response can be programmed only with a specific pair of event select and counter MSR, and with specific event codes and predefine mask bit value in a dedicated MSR to specify attributes of the offcore transaction.",
2155 "EventCode": "0xB7, 0xBB", 2270 "EventCode": "0xB7, 0xBB",
2156 "MSRValue": "0x0400020200 ", 2271 "MSRValue": "0x0400020200 ",
2157 "Counter": "0,1,2,3", 2272 "Counter": "0,1,2,3",
@@ -2164,6 +2279,7 @@
2164 "CounterHTOff": "0,1,2,3" 2279 "CounterHTOff": "0,1,2,3"
2165 }, 2280 },
2166 { 2281 {
2282 "PublicDescription": "tbd Offcore response can be programmed only with a specific pair of event select and counter MSR, and with specific event codes and predefine mask bit value in a dedicated MSR to specify attributes of the offcore transaction.",
2167 "EventCode": "0xB7, 0xBB", 2283 "EventCode": "0xB7, 0xBB",
2168 "MSRValue": "0x1000020200 ", 2284 "MSRValue": "0x1000020200 ",
2169 "Counter": "0,1,2,3", 2285 "Counter": "0,1,2,3",
@@ -2176,6 +2292,7 @@
2176 "CounterHTOff": "0,1,2,3" 2292 "CounterHTOff": "0,1,2,3"
2177 }, 2293 },
2178 { 2294 {
2295 "PublicDescription": "tbd Offcore response can be programmed only with a specific pair of event select and counter MSR, and with specific event codes and predefine mask bit value in a dedicated MSR to specify attributes of the offcore transaction.",
2179 "EventCode": "0xB7, 0xBB", 2296 "EventCode": "0xB7, 0xBB",
2180 "MSRValue": "0x3f80020200 ", 2297 "MSRValue": "0x3f80020200 ",
2181 "Counter": "0,1,2,3", 2298 "Counter": "0,1,2,3",
@@ -2188,6 +2305,7 @@
2188 "CounterHTOff": "0,1,2,3" 2305 "CounterHTOff": "0,1,2,3"
2189 }, 2306 },
2190 { 2307 {
2308 "PublicDescription": "Counts prefetch (that bring data to LLC only) code reads that hit in the L3 with no details on snoop-related information. Offcore response can be programmed only with a specific pair of event select and counter MSR, and with specific event codes and predefine mask bit value in a dedicated MSR to specify attributes of the offcore transaction.",
2191 "EventCode": "0xB7, 0xBB", 2309 "EventCode": "0xB7, 0xBB",
2192 "MSRValue": "0x00803c0200 ", 2310 "MSRValue": "0x00803c0200 ",
2193 "Counter": "0,1,2,3", 2311 "Counter": "0,1,2,3",
@@ -2200,6 +2318,7 @@
2200 "CounterHTOff": "0,1,2,3" 2318 "CounterHTOff": "0,1,2,3"
2201 }, 2319 },
2202 { 2320 {
2321 "PublicDescription": "Counts prefetch (that bring data to LLC only) code reads that hit in the L3 and sibling core snoops are not needed as either the core-valid bit is not set or the shared line is present in multiple cores. Offcore response can be programmed only with a specific pair of event select and counter MSR, and with specific event codes and predefine mask bit value in a dedicated MSR to specify attributes of the offcore transaction.",
2203 "EventCode": "0xB7, 0xBB", 2322 "EventCode": "0xB7, 0xBB",
2204 "MSRValue": "0x01003c0200 ", 2323 "MSRValue": "0x01003c0200 ",
2205 "Counter": "0,1,2,3", 2324 "Counter": "0,1,2,3",
@@ -2212,6 +2331,7 @@
2212 "CounterHTOff": "0,1,2,3" 2331 "CounterHTOff": "0,1,2,3"
2213 }, 2332 },
2214 { 2333 {
2334 "PublicDescription": "Counts prefetch (that bring data to LLC only) code reads that hit in the L3 with a snoop miss response. Offcore response can be programmed only with a specific pair of event select and counter MSR, and with specific event codes and predefine mask bit value in a dedicated MSR to specify attributes of the offcore transaction.",
2215 "EventCode": "0xB7, 0xBB", 2335 "EventCode": "0xB7, 0xBB",
2216 "MSRValue": "0x02003c0200 ", 2336 "MSRValue": "0x02003c0200 ",
2217 "Counter": "0,1,2,3", 2337 "Counter": "0,1,2,3",
@@ -2224,6 +2344,7 @@
2224 "CounterHTOff": "0,1,2,3" 2344 "CounterHTOff": "0,1,2,3"
2225 }, 2345 },
2226 { 2346 {
2347 "PublicDescription": "Counts prefetch (that bring data to LLC only) code reads that hit in the L3 and the snoops to sibling cores hit in either E/S state and the line is not forwarded. Offcore response can be programmed only with a specific pair of event select and counter MSR, and with specific event codes and predefine mask bit value in a dedicated MSR to specify attributes of the offcore transaction.",
2227 "EventCode": "0xB7, 0xBB", 2348 "EventCode": "0xB7, 0xBB",
2228 "MSRValue": "0x04003c0200 ", 2349 "MSRValue": "0x04003c0200 ",
2229 "Counter": "0,1,2,3", 2350 "Counter": "0,1,2,3",
@@ -2236,6 +2357,7 @@
2236 "CounterHTOff": "0,1,2,3" 2357 "CounterHTOff": "0,1,2,3"
2237 }, 2358 },
2238 { 2359 {
2360 "PublicDescription": "tbd Offcore response can be programmed only with a specific pair of event select and counter MSR, and with specific event codes and predefine mask bit value in a dedicated MSR to specify attributes of the offcore transaction.",
2239 "EventCode": "0xB7, 0xBB", 2361 "EventCode": "0xB7, 0xBB",
2240 "MSRValue": "0x10003c0200 ", 2362 "MSRValue": "0x10003c0200 ",
2241 "Counter": "0,1,2,3", 2363 "Counter": "0,1,2,3",
@@ -2248,6 +2370,7 @@
2248 "CounterHTOff": "0,1,2,3" 2370 "CounterHTOff": "0,1,2,3"
2249 }, 2371 },
2250 { 2372 {
2373 "PublicDescription": "Counts prefetch (that bring data to LLC only) code reads that hit in the L3. Offcore response can be programmed only with a specific pair of event select and counter MSR, and with specific event codes and predefine mask bit value in a dedicated MSR to specify attributes of the offcore transaction.",
2251 "EventCode": "0xB7, 0xBB", 2374 "EventCode": "0xB7, 0xBB",
2252 "MSRValue": "0x3f803c0200 ", 2375 "MSRValue": "0x3f803c0200 ",
2253 "Counter": "0,1,2,3", 2376 "Counter": "0,1,2,3",
@@ -2260,6 +2383,7 @@
2260 "CounterHTOff": "0,1,2,3" 2383 "CounterHTOff": "0,1,2,3"
2261 }, 2384 },
2262 { 2385 {
2386 "PublicDescription": "Counts any other requests that have any response type. Offcore response can be programmed only with a specific pair of event select and counter MSR, and with specific event codes and predefine mask bit value in a dedicated MSR to specify attributes of the offcore transaction.",
2263 "EventCode": "0xB7, 0xBB", 2387 "EventCode": "0xB7, 0xBB",
2264 "MSRValue": "0x0000018000 ", 2388 "MSRValue": "0x0000018000 ",
2265 "Counter": "0,1,2,3", 2389 "Counter": "0,1,2,3",
@@ -2272,6 +2396,7 @@
2272 "CounterHTOff": "0,1,2,3" 2396 "CounterHTOff": "0,1,2,3"
2273 }, 2397 },
2274 { 2398 {
2399 "PublicDescription": "tbd Offcore response can be programmed only with a specific pair of event select and counter MSR, and with specific event codes and predefine mask bit value in a dedicated MSR to specify attributes of the offcore transaction.",
2275 "EventCode": "0xB7, 0xBB", 2400 "EventCode": "0xB7, 0xBB",
2276 "MSRValue": "0x0080028000 ", 2401 "MSRValue": "0x0080028000 ",
2277 "Counter": "0,1,2,3", 2402 "Counter": "0,1,2,3",
@@ -2284,6 +2409,7 @@
2284 "CounterHTOff": "0,1,2,3" 2409 "CounterHTOff": "0,1,2,3"
2285 }, 2410 },
2286 { 2411 {
2412 "PublicDescription": "tbd Offcore response can be programmed only with a specific pair of event select and counter MSR, and with specific event codes and predefine mask bit value in a dedicated MSR to specify attributes of the offcore transaction.",
2287 "EventCode": "0xB7, 0xBB", 2413 "EventCode": "0xB7, 0xBB",
2288 "MSRValue": "0x0100028000 ", 2414 "MSRValue": "0x0100028000 ",
2289 "Counter": "0,1,2,3", 2415 "Counter": "0,1,2,3",
@@ -2296,6 +2422,7 @@
2296 "CounterHTOff": "0,1,2,3" 2422 "CounterHTOff": "0,1,2,3"
2297 }, 2423 },
2298 { 2424 {
2425 "PublicDescription": "tbd Offcore response can be programmed only with a specific pair of event select and counter MSR, and with specific event codes and predefine mask bit value in a dedicated MSR to specify attributes of the offcore transaction.",
2299 "EventCode": "0xB7, 0xBB", 2426 "EventCode": "0xB7, 0xBB",
2300 "MSRValue": "0x0200028000 ", 2427 "MSRValue": "0x0200028000 ",
2301 "Counter": "0,1,2,3", 2428 "Counter": "0,1,2,3",
@@ -2308,6 +2435,7 @@
2308 "CounterHTOff": "0,1,2,3" 2435 "CounterHTOff": "0,1,2,3"
2309 }, 2436 },
2310 { 2437 {
2438 "PublicDescription": "tbd Offcore response can be programmed only with a specific pair of event select and counter MSR, and with specific event codes and predefine mask bit value in a dedicated MSR to specify attributes of the offcore transaction.",
2311 "EventCode": "0xB7, 0xBB", 2439 "EventCode": "0xB7, 0xBB",
2312 "MSRValue": "0x0400028000 ", 2440 "MSRValue": "0x0400028000 ",
2313 "Counter": "0,1,2,3", 2441 "Counter": "0,1,2,3",
@@ -2320,6 +2448,7 @@
2320 "CounterHTOff": "0,1,2,3" 2448 "CounterHTOff": "0,1,2,3"
2321 }, 2449 },
2322 { 2450 {
2451 "PublicDescription": "tbd Offcore response can be programmed only with a specific pair of event select and counter MSR, and with specific event codes and predefine mask bit value in a dedicated MSR to specify attributes of the offcore transaction.",
2323 "EventCode": "0xB7, 0xBB", 2452 "EventCode": "0xB7, 0xBB",
2324 "MSRValue": "0x1000028000 ", 2453 "MSRValue": "0x1000028000 ",
2325 "Counter": "0,1,2,3", 2454 "Counter": "0,1,2,3",
@@ -2332,6 +2461,7 @@
2332 "CounterHTOff": "0,1,2,3" 2461 "CounterHTOff": "0,1,2,3"
2333 }, 2462 },
2334 { 2463 {
2464 "PublicDescription": "tbd Offcore response can be programmed only with a specific pair of event select and counter MSR, and with specific event codes and predefine mask bit value in a dedicated MSR to specify attributes of the offcore transaction.",
2335 "EventCode": "0xB7, 0xBB", 2465 "EventCode": "0xB7, 0xBB",
2336 "MSRValue": "0x3f80028000 ", 2466 "MSRValue": "0x3f80028000 ",
2337 "Counter": "0,1,2,3", 2467 "Counter": "0,1,2,3",
@@ -2344,6 +2474,7 @@
2344 "CounterHTOff": "0,1,2,3" 2474 "CounterHTOff": "0,1,2,3"
2345 }, 2475 },
2346 { 2476 {
2477 "PublicDescription": "Counts any other requests that hit in the L3 with no details on snoop-related information. Offcore response can be programmed only with a specific pair of event select and counter MSR, and with specific event codes and predefine mask bit value in a dedicated MSR to specify attributes of the offcore transaction.",
2347 "EventCode": "0xB7, 0xBB", 2478 "EventCode": "0xB7, 0xBB",
2348 "MSRValue": "0x00803c8000 ", 2479 "MSRValue": "0x00803c8000 ",
2349 "Counter": "0,1,2,3", 2480 "Counter": "0,1,2,3",
@@ -2356,6 +2487,7 @@
2356 "CounterHTOff": "0,1,2,3" 2487 "CounterHTOff": "0,1,2,3"
2357 }, 2488 },
2358 { 2489 {
2490 "PublicDescription": "Counts any other requests that hit in the L3 and sibling core snoops are not needed as either the core-valid bit is not set or the shared line is present in multiple cores. Offcore response can be programmed only with a specific pair of event select and counter MSR, and with specific event codes and predefine mask bit value in a dedicated MSR to specify attributes of the offcore transaction.",
2359 "EventCode": "0xB7, 0xBB", 2491 "EventCode": "0xB7, 0xBB",
2360 "MSRValue": "0x01003c8000 ", 2492 "MSRValue": "0x01003c8000 ",
2361 "Counter": "0,1,2,3", 2493 "Counter": "0,1,2,3",
@@ -2368,6 +2500,7 @@
2368 "CounterHTOff": "0,1,2,3" 2500 "CounterHTOff": "0,1,2,3"
2369 }, 2501 },
2370 { 2502 {
2503 "PublicDescription": "Counts any other requests that hit in the L3 with a snoop miss response. Offcore response can be programmed only with a specific pair of event select and counter MSR, and with specific event codes and predefine mask bit value in a dedicated MSR to specify attributes of the offcore transaction.",
2371 "EventCode": "0xB7, 0xBB", 2504 "EventCode": "0xB7, 0xBB",
2372 "MSRValue": "0x02003c8000 ", 2505 "MSRValue": "0x02003c8000 ",
2373 "Counter": "0,1,2,3", 2506 "Counter": "0,1,2,3",
@@ -2380,6 +2513,7 @@
2380 "CounterHTOff": "0,1,2,3" 2513 "CounterHTOff": "0,1,2,3"
2381 }, 2514 },
2382 { 2515 {
2516 "PublicDescription": "Counts any other requests that hit in the L3 and the snoops to sibling cores hit in either E/S state and the line is not forwarded. Offcore response can be programmed only with a specific pair of event select and counter MSR, and with specific event codes and predefine mask bit value in a dedicated MSR to specify attributes of the offcore transaction.",
2383 "EventCode": "0xB7, 0xBB", 2517 "EventCode": "0xB7, 0xBB",
2384 "MSRValue": "0x04003c8000 ", 2518 "MSRValue": "0x04003c8000 ",
2385 "Counter": "0,1,2,3", 2519 "Counter": "0,1,2,3",
@@ -2392,6 +2526,7 @@
2392 "CounterHTOff": "0,1,2,3" 2526 "CounterHTOff": "0,1,2,3"
2393 }, 2527 },
2394 { 2528 {
2529 "PublicDescription": "tbd Offcore response can be programmed only with a specific pair of event select and counter MSR, and with specific event codes and predefine mask bit value in a dedicated MSR to specify attributes of the offcore transaction.",
2395 "EventCode": "0xB7, 0xBB", 2530 "EventCode": "0xB7, 0xBB",
2396 "MSRValue": "0x10003c8000 ", 2531 "MSRValue": "0x10003c8000 ",
2397 "Counter": "0,1,2,3", 2532 "Counter": "0,1,2,3",
@@ -2404,6 +2539,7 @@
2404 "CounterHTOff": "0,1,2,3" 2539 "CounterHTOff": "0,1,2,3"
2405 }, 2540 },
2406 { 2541 {
2542 "PublicDescription": "Counts any other requests that hit in the L3. Offcore response can be programmed only with a specific pair of event select and counter MSR, and with specific event codes and predefine mask bit value in a dedicated MSR to specify attributes of the offcore transaction.",
2407 "EventCode": "0xB7, 0xBB", 2543 "EventCode": "0xB7, 0xBB",
2408 "MSRValue": "0x3f803c8000 ", 2544 "MSRValue": "0x3f803c8000 ",
2409 "Counter": "0,1,2,3", 2545 "Counter": "0,1,2,3",
@@ -2416,6 +2552,7 @@
2416 "CounterHTOff": "0,1,2,3" 2552 "CounterHTOff": "0,1,2,3"
2417 }, 2553 },
2418 { 2554 {
2555 "PublicDescription": "Counts all prefetch data reads that have any response type. Offcore response can be programmed only with a specific pair of event select and counter MSR, and with specific event codes and predefine mask bit value in a dedicated MSR to specify attributes of the offcore transaction.",
2419 "EventCode": "0xB7, 0xBB", 2556 "EventCode": "0xB7, 0xBB",
2420 "MSRValue": "0x0000010090 ", 2557 "MSRValue": "0x0000010090 ",
2421 "Counter": "0,1,2,3", 2558 "Counter": "0,1,2,3",
@@ -2428,6 +2565,7 @@
2428 "CounterHTOff": "0,1,2,3" 2565 "CounterHTOff": "0,1,2,3"
2429 }, 2566 },
2430 { 2567 {
2568 "PublicDescription": "tbd Offcore response can be programmed only with a specific pair of event select and counter MSR, and with specific event codes and predefine mask bit value in a dedicated MSR to specify attributes of the offcore transaction.",
2431 "EventCode": "0xB7, 0xBB", 2569 "EventCode": "0xB7, 0xBB",
2432 "MSRValue": "0x0080020090 ", 2570 "MSRValue": "0x0080020090 ",
2433 "Counter": "0,1,2,3", 2571 "Counter": "0,1,2,3",
@@ -2440,6 +2578,7 @@
2440 "CounterHTOff": "0,1,2,3" 2578 "CounterHTOff": "0,1,2,3"
2441 }, 2579 },
2442 { 2580 {
2581 "PublicDescription": "tbd Offcore response can be programmed only with a specific pair of event select and counter MSR, and with specific event codes and predefine mask bit value in a dedicated MSR to specify attributes of the offcore transaction.",
2443 "EventCode": "0xB7, 0xBB", 2582 "EventCode": "0xB7, 0xBB",
2444 "MSRValue": "0x0100020090 ", 2583 "MSRValue": "0x0100020090 ",
2445 "Counter": "0,1,2,3", 2584 "Counter": "0,1,2,3",
@@ -2452,6 +2591,7 @@
2452 "CounterHTOff": "0,1,2,3" 2591 "CounterHTOff": "0,1,2,3"
2453 }, 2592 },
2454 { 2593 {
2594 "PublicDescription": "tbd Offcore response can be programmed only with a specific pair of event select and counter MSR, and with specific event codes and predefine mask bit value in a dedicated MSR to specify attributes of the offcore transaction.",
2455 "EventCode": "0xB7, 0xBB", 2595 "EventCode": "0xB7, 0xBB",
2456 "MSRValue": "0x0200020090 ", 2596 "MSRValue": "0x0200020090 ",
2457 "Counter": "0,1,2,3", 2597 "Counter": "0,1,2,3",
@@ -2464,6 +2604,7 @@
2464 "CounterHTOff": "0,1,2,3" 2604 "CounterHTOff": "0,1,2,3"
2465 }, 2605 },
2466 { 2606 {
2607 "PublicDescription": "tbd Offcore response can be programmed only with a specific pair of event select and counter MSR, and with specific event codes and predefine mask bit value in a dedicated MSR to specify attributes of the offcore transaction.",
2467 "EventCode": "0xB7, 0xBB", 2608 "EventCode": "0xB7, 0xBB",
2468 "MSRValue": "0x0400020090 ", 2609 "MSRValue": "0x0400020090 ",
2469 "Counter": "0,1,2,3", 2610 "Counter": "0,1,2,3",
@@ -2476,6 +2617,7 @@
2476 "CounterHTOff": "0,1,2,3" 2617 "CounterHTOff": "0,1,2,3"
2477 }, 2618 },
2478 { 2619 {
2620 "PublicDescription": "tbd Offcore response can be programmed only with a specific pair of event select and counter MSR, and with specific event codes and predefine mask bit value in a dedicated MSR to specify attributes of the offcore transaction.",
2479 "EventCode": "0xB7, 0xBB", 2621 "EventCode": "0xB7, 0xBB",
2480 "MSRValue": "0x1000020090 ", 2622 "MSRValue": "0x1000020090 ",
2481 "Counter": "0,1,2,3", 2623 "Counter": "0,1,2,3",
@@ -2488,6 +2630,7 @@
2488 "CounterHTOff": "0,1,2,3" 2630 "CounterHTOff": "0,1,2,3"
2489 }, 2631 },
2490 { 2632 {
2633 "PublicDescription": "tbd Offcore response can be programmed only with a specific pair of event select and counter MSR, and with specific event codes and predefine mask bit value in a dedicated MSR to specify attributes of the offcore transaction.",
2491 "EventCode": "0xB7, 0xBB", 2634 "EventCode": "0xB7, 0xBB",
2492 "MSRValue": "0x3f80020090 ", 2635 "MSRValue": "0x3f80020090 ",
2493 "Counter": "0,1,2,3", 2636 "Counter": "0,1,2,3",
@@ -2500,6 +2643,7 @@
2500 "CounterHTOff": "0,1,2,3" 2643 "CounterHTOff": "0,1,2,3"
2501 }, 2644 },
2502 { 2645 {
2646 "PublicDescription": "Counts all prefetch data reads that hit in the L3 with no details on snoop-related information. Offcore response can be programmed only with a specific pair of event select and counter MSR, and with specific event codes and predefine mask bit value in a dedicated MSR to specify attributes of the offcore transaction.",
2503 "EventCode": "0xB7, 0xBB", 2647 "EventCode": "0xB7, 0xBB",
2504 "MSRValue": "0x00803c0090 ", 2648 "MSRValue": "0x00803c0090 ",
2505 "Counter": "0,1,2,3", 2649 "Counter": "0,1,2,3",
@@ -2512,6 +2656,7 @@
2512 "CounterHTOff": "0,1,2,3" 2656 "CounterHTOff": "0,1,2,3"
2513 }, 2657 },
2514 { 2658 {
2659 "PublicDescription": "Counts all prefetch data reads that hit in the L3 and sibling core snoops are not needed as either the core-valid bit is not set or the shared line is present in multiple cores. Offcore response can be programmed only with a specific pair of event select and counter MSR, and with specific event codes and predefine mask bit value in a dedicated MSR to specify attributes of the offcore transaction.",
2515 "EventCode": "0xB7, 0xBB", 2660 "EventCode": "0xB7, 0xBB",
2516 "MSRValue": "0x01003c0090 ", 2661 "MSRValue": "0x01003c0090 ",
2517 "Counter": "0,1,2,3", 2662 "Counter": "0,1,2,3",
@@ -2524,6 +2669,7 @@
2524 "CounterHTOff": "0,1,2,3" 2669 "CounterHTOff": "0,1,2,3"
2525 }, 2670 },
2526 { 2671 {
2672 "PublicDescription": "Counts all prefetch data reads that hit in the L3 with a snoop miss response. Offcore response can be programmed only with a specific pair of event select and counter MSR, and with specific event codes and predefine mask bit value in a dedicated MSR to specify attributes of the offcore transaction.",
2527 "EventCode": "0xB7, 0xBB", 2673 "EventCode": "0xB7, 0xBB",
2528 "MSRValue": "0x02003c0090 ", 2674 "MSRValue": "0x02003c0090 ",
2529 "Counter": "0,1,2,3", 2675 "Counter": "0,1,2,3",
@@ -2536,6 +2682,7 @@
2536 "CounterHTOff": "0,1,2,3" 2682 "CounterHTOff": "0,1,2,3"
2537 }, 2683 },
2538 { 2684 {
2685 "PublicDescription": "Counts all prefetch data reads that hit in the L3 and the snoops to sibling cores hit in either E/S state and the line is not forwarded. Offcore response can be programmed only with a specific pair of event select and counter MSR, and with specific event codes and predefine mask bit value in a dedicated MSR to specify attributes of the offcore transaction.",
2539 "EventCode": "0xB7, 0xBB", 2686 "EventCode": "0xB7, 0xBB",
2540 "MSRValue": "0x04003c0090 ", 2687 "MSRValue": "0x04003c0090 ",
2541 "Counter": "0,1,2,3", 2688 "Counter": "0,1,2,3",
@@ -2548,6 +2695,7 @@
2548 "CounterHTOff": "0,1,2,3" 2695 "CounterHTOff": "0,1,2,3"
2549 }, 2696 },
2550 { 2697 {
2698 "PublicDescription": "tbd Offcore response can be programmed only with a specific pair of event select and counter MSR, and with specific event codes and predefine mask bit value in a dedicated MSR to specify attributes of the offcore transaction.",
2551 "EventCode": "0xB7, 0xBB", 2699 "EventCode": "0xB7, 0xBB",
2552 "MSRValue": "0x10003c0090 ", 2700 "MSRValue": "0x10003c0090 ",
2553 "Counter": "0,1,2,3", 2701 "Counter": "0,1,2,3",
@@ -2560,6 +2708,7 @@
2560 "CounterHTOff": "0,1,2,3" 2708 "CounterHTOff": "0,1,2,3"
2561 }, 2709 },
2562 { 2710 {
2711 "PublicDescription": "Counts all prefetch data reads that hit in the L3. Offcore response can be programmed only with a specific pair of event select and counter MSR, and with specific event codes and predefine mask bit value in a dedicated MSR to specify attributes of the offcore transaction.",
2563 "EventCode": "0xB7, 0xBB", 2712 "EventCode": "0xB7, 0xBB",
2564 "MSRValue": "0x3f803c0090 ", 2713 "MSRValue": "0x3f803c0090 ",
2565 "Counter": "0,1,2,3", 2714 "Counter": "0,1,2,3",
@@ -2572,6 +2721,7 @@
2572 "CounterHTOff": "0,1,2,3" 2721 "CounterHTOff": "0,1,2,3"
2573 }, 2722 },
2574 { 2723 {
2724 "PublicDescription": "Counts prefetch RFOs that have any response type. Offcore response can be programmed only with a specific pair of event select and counter MSR, and with specific event codes and predefine mask bit value in a dedicated MSR to specify attributes of the offcore transaction.",
2575 "EventCode": "0xB7, 0xBB", 2725 "EventCode": "0xB7, 0xBB",
2576 "MSRValue": "0x0000010120 ", 2726 "MSRValue": "0x0000010120 ",
2577 "Counter": "0,1,2,3", 2727 "Counter": "0,1,2,3",
@@ -2584,6 +2734,7 @@
2584 "CounterHTOff": "0,1,2,3" 2734 "CounterHTOff": "0,1,2,3"
2585 }, 2735 },
2586 { 2736 {
2737 "PublicDescription": "tbd Offcore response can be programmed only with a specific pair of event select and counter MSR, and with specific event codes and predefine mask bit value in a dedicated MSR to specify attributes of the offcore transaction.",
2587 "EventCode": "0xB7, 0xBB", 2738 "EventCode": "0xB7, 0xBB",
2588 "MSRValue": "0x0080020120 ", 2739 "MSRValue": "0x0080020120 ",
2589 "Counter": "0,1,2,3", 2740 "Counter": "0,1,2,3",
@@ -2596,6 +2747,7 @@
2596 "CounterHTOff": "0,1,2,3" 2747 "CounterHTOff": "0,1,2,3"
2597 }, 2748 },
2598 { 2749 {
2750 "PublicDescription": "tbd Offcore response can be programmed only with a specific pair of event select and counter MSR, and with specific event codes and predefine mask bit value in a dedicated MSR to specify attributes of the offcore transaction.",
2599 "EventCode": "0xB7, 0xBB", 2751 "EventCode": "0xB7, 0xBB",
2600 "MSRValue": "0x0100020120 ", 2752 "MSRValue": "0x0100020120 ",
2601 "Counter": "0,1,2,3", 2753 "Counter": "0,1,2,3",
@@ -2608,6 +2760,7 @@
2608 "CounterHTOff": "0,1,2,3" 2760 "CounterHTOff": "0,1,2,3"
2609 }, 2761 },
2610 { 2762 {
2763 "PublicDescription": "tbd Offcore response can be programmed only with a specific pair of event select and counter MSR, and with specific event codes and predefine mask bit value in a dedicated MSR to specify attributes of the offcore transaction.",
2611 "EventCode": "0xB7, 0xBB", 2764 "EventCode": "0xB7, 0xBB",
2612 "MSRValue": "0x0200020120 ", 2765 "MSRValue": "0x0200020120 ",
2613 "Counter": "0,1,2,3", 2766 "Counter": "0,1,2,3",
@@ -2620,6 +2773,7 @@
2620 "CounterHTOff": "0,1,2,3" 2773 "CounterHTOff": "0,1,2,3"
2621 }, 2774 },
2622 { 2775 {
2776 "PublicDescription": "tbd Offcore response can be programmed only with a specific pair of event select and counter MSR, and with specific event codes and predefine mask bit value in a dedicated MSR to specify attributes of the offcore transaction.",
2623 "EventCode": "0xB7, 0xBB", 2777 "EventCode": "0xB7, 0xBB",
2624 "MSRValue": "0x0400020120 ", 2778 "MSRValue": "0x0400020120 ",
2625 "Counter": "0,1,2,3", 2779 "Counter": "0,1,2,3",
@@ -2632,6 +2786,7 @@
2632 "CounterHTOff": "0,1,2,3" 2786 "CounterHTOff": "0,1,2,3"
2633 }, 2787 },
2634 { 2788 {
2789 "PublicDescription": "tbd Offcore response can be programmed only with a specific pair of event select and counter MSR, and with specific event codes and predefine mask bit value in a dedicated MSR to specify attributes of the offcore transaction.",
2635 "EventCode": "0xB7, 0xBB", 2790 "EventCode": "0xB7, 0xBB",
2636 "MSRValue": "0x1000020120 ", 2791 "MSRValue": "0x1000020120 ",
2637 "Counter": "0,1,2,3", 2792 "Counter": "0,1,2,3",
@@ -2644,6 +2799,7 @@
2644 "CounterHTOff": "0,1,2,3" 2799 "CounterHTOff": "0,1,2,3"
2645 }, 2800 },
2646 { 2801 {
2802 "PublicDescription": "tbd Offcore response can be programmed only with a specific pair of event select and counter MSR, and with specific event codes and predefine mask bit value in a dedicated MSR to specify attributes of the offcore transaction.",
2647 "EventCode": "0xB7, 0xBB", 2803 "EventCode": "0xB7, 0xBB",
2648 "MSRValue": "0x3f80020120 ", 2804 "MSRValue": "0x3f80020120 ",
2649 "Counter": "0,1,2,3", 2805 "Counter": "0,1,2,3",
@@ -2656,6 +2812,7 @@
2656 "CounterHTOff": "0,1,2,3" 2812 "CounterHTOff": "0,1,2,3"
2657 }, 2813 },
2658 { 2814 {
2815 "PublicDescription": "Counts prefetch RFOs that hit in the L3 with no details on snoop-related information. Offcore response can be programmed only with a specific pair of event select and counter MSR, and with specific event codes and predefine mask bit value in a dedicated MSR to specify attributes of the offcore transaction.",
2659 "EventCode": "0xB7, 0xBB", 2816 "EventCode": "0xB7, 0xBB",
2660 "MSRValue": "0x00803c0120 ", 2817 "MSRValue": "0x00803c0120 ",
2661 "Counter": "0,1,2,3", 2818 "Counter": "0,1,2,3",
@@ -2668,6 +2825,7 @@
2668 "CounterHTOff": "0,1,2,3" 2825 "CounterHTOff": "0,1,2,3"
2669 }, 2826 },
2670 { 2827 {
2828 "PublicDescription": "Counts prefetch RFOs that hit in the L3 and sibling core snoops are not needed as either the core-valid bit is not set or the shared line is present in multiple cores. Offcore response can be programmed only with a specific pair of event select and counter MSR, and with specific event codes and predefine mask bit value in a dedicated MSR to specify attributes of the offcore transaction.",
2671 "EventCode": "0xB7, 0xBB", 2829 "EventCode": "0xB7, 0xBB",
2672 "MSRValue": "0x01003c0120 ", 2830 "MSRValue": "0x01003c0120 ",
2673 "Counter": "0,1,2,3", 2831 "Counter": "0,1,2,3",
@@ -2680,6 +2838,7 @@
2680 "CounterHTOff": "0,1,2,3" 2838 "CounterHTOff": "0,1,2,3"
2681 }, 2839 },
2682 { 2840 {
2841 "PublicDescription": "Counts prefetch RFOs that hit in the L3 with a snoop miss response. Offcore response can be programmed only with a specific pair of event select and counter MSR, and with specific event codes and predefine mask bit value in a dedicated MSR to specify attributes of the offcore transaction.",
2683 "EventCode": "0xB7, 0xBB", 2842 "EventCode": "0xB7, 0xBB",
2684 "MSRValue": "0x02003c0120 ", 2843 "MSRValue": "0x02003c0120 ",
2685 "Counter": "0,1,2,3", 2844 "Counter": "0,1,2,3",
@@ -2692,6 +2851,7 @@
2692 "CounterHTOff": "0,1,2,3" 2851 "CounterHTOff": "0,1,2,3"
2693 }, 2852 },
2694 { 2853 {
2854 "PublicDescription": "Counts prefetch RFOs that hit in the L3 and the snoops to sibling cores hit in either E/S state and the line is not forwarded. Offcore response can be programmed only with a specific pair of event select and counter MSR, and with specific event codes and predefine mask bit value in a dedicated MSR to specify attributes of the offcore transaction.",
2695 "EventCode": "0xB7, 0xBB", 2855 "EventCode": "0xB7, 0xBB",
2696 "MSRValue": "0x04003c0120 ", 2856 "MSRValue": "0x04003c0120 ",
2697 "Counter": "0,1,2,3", 2857 "Counter": "0,1,2,3",
@@ -2704,6 +2864,7 @@
2704 "CounterHTOff": "0,1,2,3" 2864 "CounterHTOff": "0,1,2,3"
2705 }, 2865 },
2706 { 2866 {
2867 "PublicDescription": "tbd Offcore response can be programmed only with a specific pair of event select and counter MSR, and with specific event codes and predefine mask bit value in a dedicated MSR to specify attributes of the offcore transaction.",
2707 "EventCode": "0xB7, 0xBB", 2868 "EventCode": "0xB7, 0xBB",
2708 "MSRValue": "0x10003c0120 ", 2869 "MSRValue": "0x10003c0120 ",
2709 "Counter": "0,1,2,3", 2870 "Counter": "0,1,2,3",
@@ -2716,6 +2877,7 @@
2716 "CounterHTOff": "0,1,2,3" 2877 "CounterHTOff": "0,1,2,3"
2717 }, 2878 },
2718 { 2879 {
2880 "PublicDescription": "Counts prefetch RFOs that hit in the L3. Offcore response can be programmed only with a specific pair of event select and counter MSR, and with specific event codes and predefine mask bit value in a dedicated MSR to specify attributes of the offcore transaction.",
2719 "EventCode": "0xB7, 0xBB", 2881 "EventCode": "0xB7, 0xBB",
2720 "MSRValue": "0x3f803c0120 ", 2882 "MSRValue": "0x3f803c0120 ",
2721 "Counter": "0,1,2,3", 2883 "Counter": "0,1,2,3",
@@ -2728,6 +2890,7 @@
2728 "CounterHTOff": "0,1,2,3" 2890 "CounterHTOff": "0,1,2,3"
2729 }, 2891 },
2730 { 2892 {
2893 "PublicDescription": "Counts all prefetch code reads that have any response type. Offcore response can be programmed only with a specific pair of event select and counter MSR, and with specific event codes and predefine mask bit value in a dedicated MSR to specify attributes of the offcore transaction.",
2731 "EventCode": "0xB7, 0xBB", 2894 "EventCode": "0xB7, 0xBB",
2732 "MSRValue": "0x0000010240 ", 2895 "MSRValue": "0x0000010240 ",
2733 "Counter": "0,1,2,3", 2896 "Counter": "0,1,2,3",
@@ -2740,6 +2903,7 @@
2740 "CounterHTOff": "0,1,2,3" 2903 "CounterHTOff": "0,1,2,3"
2741 }, 2904 },
2742 { 2905 {
2906 "PublicDescription": "tbd Offcore response can be programmed only with a specific pair of event select and counter MSR, and with specific event codes and predefine mask bit value in a dedicated MSR to specify attributes of the offcore transaction.",
2743 "EventCode": "0xB7, 0xBB", 2907 "EventCode": "0xB7, 0xBB",
2744 "MSRValue": "0x0080020240 ", 2908 "MSRValue": "0x0080020240 ",
2745 "Counter": "0,1,2,3", 2909 "Counter": "0,1,2,3",
@@ -2752,6 +2916,7 @@
2752 "CounterHTOff": "0,1,2,3" 2916 "CounterHTOff": "0,1,2,3"
2753 }, 2917 },
2754 { 2918 {
2919 "PublicDescription": "tbd Offcore response can be programmed only with a specific pair of event select and counter MSR, and with specific event codes and predefine mask bit value in a dedicated MSR to specify attributes of the offcore transaction.",
2755 "EventCode": "0xB7, 0xBB", 2920 "EventCode": "0xB7, 0xBB",
2756 "MSRValue": "0x0100020240 ", 2921 "MSRValue": "0x0100020240 ",
2757 "Counter": "0,1,2,3", 2922 "Counter": "0,1,2,3",
@@ -2764,6 +2929,7 @@
2764 "CounterHTOff": "0,1,2,3" 2929 "CounterHTOff": "0,1,2,3"
2765 }, 2930 },
2766 { 2931 {
2932 "PublicDescription": "tbd Offcore response can be programmed only with a specific pair of event select and counter MSR, and with specific event codes and predefine mask bit value in a dedicated MSR to specify attributes of the offcore transaction.",
2767 "EventCode": "0xB7, 0xBB", 2933 "EventCode": "0xB7, 0xBB",
2768 "MSRValue": "0x0200020240 ", 2934 "MSRValue": "0x0200020240 ",
2769 "Counter": "0,1,2,3", 2935 "Counter": "0,1,2,3",
@@ -2776,6 +2942,7 @@
2776 "CounterHTOff": "0,1,2,3" 2942 "CounterHTOff": "0,1,2,3"
2777 }, 2943 },
2778 { 2944 {
2945 "PublicDescription": "tbd Offcore response can be programmed only with a specific pair of event select and counter MSR, and with specific event codes and predefine mask bit value in a dedicated MSR to specify attributes of the offcore transaction.",
2779 "EventCode": "0xB7, 0xBB", 2946 "EventCode": "0xB7, 0xBB",
2780 "MSRValue": "0x0400020240 ", 2947 "MSRValue": "0x0400020240 ",
2781 "Counter": "0,1,2,3", 2948 "Counter": "0,1,2,3",
@@ -2788,6 +2955,7 @@
2788 "CounterHTOff": "0,1,2,3" 2955 "CounterHTOff": "0,1,2,3"
2789 }, 2956 },
2790 { 2957 {
2958 "PublicDescription": "tbd Offcore response can be programmed only with a specific pair of event select and counter MSR, and with specific event codes and predefine mask bit value in a dedicated MSR to specify attributes of the offcore transaction.",
2791 "EventCode": "0xB7, 0xBB", 2959 "EventCode": "0xB7, 0xBB",
2792 "MSRValue": "0x1000020240 ", 2960 "MSRValue": "0x1000020240 ",
2793 "Counter": "0,1,2,3", 2961 "Counter": "0,1,2,3",
@@ -2800,6 +2968,7 @@
2800 "CounterHTOff": "0,1,2,3" 2968 "CounterHTOff": "0,1,2,3"
2801 }, 2969 },
2802 { 2970 {
2971 "PublicDescription": "tbd Offcore response can be programmed only with a specific pair of event select and counter MSR, and with specific event codes and predefine mask bit value in a dedicated MSR to specify attributes of the offcore transaction.",
2803 "EventCode": "0xB7, 0xBB", 2972 "EventCode": "0xB7, 0xBB",
2804 "MSRValue": "0x3f80020240 ", 2973 "MSRValue": "0x3f80020240 ",
2805 "Counter": "0,1,2,3", 2974 "Counter": "0,1,2,3",
@@ -2812,6 +2981,7 @@
2812 "CounterHTOff": "0,1,2,3" 2981 "CounterHTOff": "0,1,2,3"
2813 }, 2982 },
2814 { 2983 {
2984 "PublicDescription": "Counts all prefetch code reads that hit in the L3 with no details on snoop-related information. Offcore response can be programmed only with a specific pair of event select and counter MSR, and with specific event codes and predefine mask bit value in a dedicated MSR to specify attributes of the offcore transaction.",
2815 "EventCode": "0xB7, 0xBB", 2985 "EventCode": "0xB7, 0xBB",
2816 "MSRValue": "0x00803c0240 ", 2986 "MSRValue": "0x00803c0240 ",
2817 "Counter": "0,1,2,3", 2987 "Counter": "0,1,2,3",
@@ -2824,6 +2994,7 @@
2824 "CounterHTOff": "0,1,2,3" 2994 "CounterHTOff": "0,1,2,3"
2825 }, 2995 },
2826 { 2996 {
2997 "PublicDescription": "Counts all prefetch code reads that hit in the L3 and sibling core snoops are not needed as either the core-valid bit is not set or the shared line is present in multiple cores. Offcore response can be programmed only with a specific pair of event select and counter MSR, and with specific event codes and predefine mask bit value in a dedicated MSR to specify attributes of the offcore transaction.",
2827 "EventCode": "0xB7, 0xBB", 2998 "EventCode": "0xB7, 0xBB",
2828 "MSRValue": "0x01003c0240 ", 2999 "MSRValue": "0x01003c0240 ",
2829 "Counter": "0,1,2,3", 3000 "Counter": "0,1,2,3",
@@ -2836,6 +3007,7 @@
2836 "CounterHTOff": "0,1,2,3" 3007 "CounterHTOff": "0,1,2,3"
2837 }, 3008 },
2838 { 3009 {
3010 "PublicDescription": "Counts all prefetch code reads that hit in the L3 with a snoop miss response. Offcore response can be programmed only with a specific pair of event select and counter MSR, and with specific event codes and predefine mask bit value in a dedicated MSR to specify attributes of the offcore transaction.",
2839 "EventCode": "0xB7, 0xBB", 3011 "EventCode": "0xB7, 0xBB",
2840 "MSRValue": "0x02003c0240 ", 3012 "MSRValue": "0x02003c0240 ",
2841 "Counter": "0,1,2,3", 3013 "Counter": "0,1,2,3",
@@ -2848,6 +3020,7 @@
2848 "CounterHTOff": "0,1,2,3" 3020 "CounterHTOff": "0,1,2,3"
2849 }, 3021 },
2850 { 3022 {
3023 "PublicDescription": "Counts all prefetch code reads that hit in the L3 and the snoops to sibling cores hit in either E/S state and the line is not forwarded. Offcore response can be programmed only with a specific pair of event select and counter MSR, and with specific event codes and predefine mask bit value in a dedicated MSR to specify attributes of the offcore transaction.",
2851 "EventCode": "0xB7, 0xBB", 3024 "EventCode": "0xB7, 0xBB",
2852 "MSRValue": "0x04003c0240 ", 3025 "MSRValue": "0x04003c0240 ",
2853 "Counter": "0,1,2,3", 3026 "Counter": "0,1,2,3",
@@ -2860,6 +3033,7 @@
2860 "CounterHTOff": "0,1,2,3" 3033 "CounterHTOff": "0,1,2,3"
2861 }, 3034 },
2862 { 3035 {
3036 "PublicDescription": "tbd Offcore response can be programmed only with a specific pair of event select and counter MSR, and with specific event codes and predefine mask bit value in a dedicated MSR to specify attributes of the offcore transaction.",
2863 "EventCode": "0xB7, 0xBB", 3037 "EventCode": "0xB7, 0xBB",
2864 "MSRValue": "0x10003c0240 ", 3038 "MSRValue": "0x10003c0240 ",
2865 "Counter": "0,1,2,3", 3039 "Counter": "0,1,2,3",
@@ -2872,6 +3046,7 @@
2872 "CounterHTOff": "0,1,2,3" 3046 "CounterHTOff": "0,1,2,3"
2873 }, 3047 },
2874 { 3048 {
3049 "PublicDescription": "Counts all prefetch code reads that hit in the L3. Offcore response can be programmed only with a specific pair of event select and counter MSR, and with specific event codes and predefine mask bit value in a dedicated MSR to specify attributes of the offcore transaction.",
2875 "EventCode": "0xB7, 0xBB", 3050 "EventCode": "0xB7, 0xBB",
2876 "MSRValue": "0x3f803c0240 ", 3051 "MSRValue": "0x3f803c0240 ",
2877 "Counter": "0,1,2,3", 3052 "Counter": "0,1,2,3",
@@ -2884,6 +3059,7 @@
2884 "CounterHTOff": "0,1,2,3" 3059 "CounterHTOff": "0,1,2,3"
2885 }, 3060 },
2886 { 3061 {
3062 "PublicDescription": "Counts all demand & prefetch data reads that have any response type. Offcore response can be programmed only with a specific pair of event select and counter MSR, and with specific event codes and predefine mask bit value in a dedicated MSR to specify attributes of the offcore transaction.",
2887 "EventCode": "0xB7, 0xBB", 3063 "EventCode": "0xB7, 0xBB",
2888 "MSRValue": "0x0000010091 ", 3064 "MSRValue": "0x0000010091 ",
2889 "Counter": "0,1,2,3", 3065 "Counter": "0,1,2,3",
@@ -2896,6 +3072,7 @@
2896 "CounterHTOff": "0,1,2,3" 3072 "CounterHTOff": "0,1,2,3"
2897 }, 3073 },
2898 { 3074 {
3075 "PublicDescription": "tbd Offcore response can be programmed only with a specific pair of event select and counter MSR, and with specific event codes and predefine mask bit value in a dedicated MSR to specify attributes of the offcore transaction.",
2899 "EventCode": "0xB7, 0xBB", 3076 "EventCode": "0xB7, 0xBB",
2900 "MSRValue": "0x0080020091 ", 3077 "MSRValue": "0x0080020091 ",
2901 "Counter": "0,1,2,3", 3078 "Counter": "0,1,2,3",
@@ -2908,6 +3085,7 @@
2908 "CounterHTOff": "0,1,2,3" 3085 "CounterHTOff": "0,1,2,3"
2909 }, 3086 },
2910 { 3087 {
3088 "PublicDescription": "tbd Offcore response can be programmed only with a specific pair of event select and counter MSR, and with specific event codes and predefine mask bit value in a dedicated MSR to specify attributes of the offcore transaction.",
2911 "EventCode": "0xB7, 0xBB", 3089 "EventCode": "0xB7, 0xBB",
2912 "MSRValue": "0x0100020091 ", 3090 "MSRValue": "0x0100020091 ",
2913 "Counter": "0,1,2,3", 3091 "Counter": "0,1,2,3",
@@ -2920,6 +3098,7 @@
2920 "CounterHTOff": "0,1,2,3" 3098 "CounterHTOff": "0,1,2,3"
2921 }, 3099 },
2922 { 3100 {
3101 "PublicDescription": "tbd Offcore response can be programmed only with a specific pair of event select and counter MSR, and with specific event codes and predefine mask bit value in a dedicated MSR to specify attributes of the offcore transaction.",
2923 "EventCode": "0xB7, 0xBB", 3102 "EventCode": "0xB7, 0xBB",
2924 "MSRValue": "0x0200020091 ", 3103 "MSRValue": "0x0200020091 ",
2925 "Counter": "0,1,2,3", 3104 "Counter": "0,1,2,3",
@@ -2932,6 +3111,7 @@
2932 "CounterHTOff": "0,1,2,3" 3111 "CounterHTOff": "0,1,2,3"
2933 }, 3112 },
2934 { 3113 {
3114 "PublicDescription": "tbd Offcore response can be programmed only with a specific pair of event select and counter MSR, and with specific event codes and predefine mask bit value in a dedicated MSR to specify attributes of the offcore transaction.",
2935 "EventCode": "0xB7, 0xBB", 3115 "EventCode": "0xB7, 0xBB",
2936 "MSRValue": "0x0400020091 ", 3116 "MSRValue": "0x0400020091 ",
2937 "Counter": "0,1,2,3", 3117 "Counter": "0,1,2,3",
@@ -2944,6 +3124,7 @@
2944 "CounterHTOff": "0,1,2,3" 3124 "CounterHTOff": "0,1,2,3"
2945 }, 3125 },
2946 { 3126 {
3127 "PublicDescription": "tbd Offcore response can be programmed only with a specific pair of event select and counter MSR, and with specific event codes and predefine mask bit value in a dedicated MSR to specify attributes of the offcore transaction.",
2947 "EventCode": "0xB7, 0xBB", 3128 "EventCode": "0xB7, 0xBB",
2948 "MSRValue": "0x1000020091 ", 3129 "MSRValue": "0x1000020091 ",
2949 "Counter": "0,1,2,3", 3130 "Counter": "0,1,2,3",
@@ -2956,6 +3137,7 @@
2956 "CounterHTOff": "0,1,2,3" 3137 "CounterHTOff": "0,1,2,3"
2957 }, 3138 },
2958 { 3139 {
3140 "PublicDescription": "tbd Offcore response can be programmed only with a specific pair of event select and counter MSR, and with specific event codes and predefine mask bit value in a dedicated MSR to specify attributes of the offcore transaction.",
2959 "EventCode": "0xB7, 0xBB", 3141 "EventCode": "0xB7, 0xBB",
2960 "MSRValue": "0x3f80020091 ", 3142 "MSRValue": "0x3f80020091 ",
2961 "Counter": "0,1,2,3", 3143 "Counter": "0,1,2,3",
@@ -2968,6 +3150,7 @@
2968 "CounterHTOff": "0,1,2,3" 3150 "CounterHTOff": "0,1,2,3"
2969 }, 3151 },
2970 { 3152 {
3153 "PublicDescription": "Counts all demand & prefetch data reads that hit in the L3 with no details on snoop-related information. Offcore response can be programmed only with a specific pair of event select and counter MSR, and with specific event codes and predefine mask bit value in a dedicated MSR to specify attributes of the offcore transaction.",
2971 "EventCode": "0xB7, 0xBB", 3154 "EventCode": "0xB7, 0xBB",
2972 "MSRValue": "0x00803c0091 ", 3155 "MSRValue": "0x00803c0091 ",
2973 "Counter": "0,1,2,3", 3156 "Counter": "0,1,2,3",
@@ -2980,6 +3163,7 @@
2980 "CounterHTOff": "0,1,2,3" 3163 "CounterHTOff": "0,1,2,3"
2981 }, 3164 },
2982 { 3165 {
3166 "PublicDescription": "Counts all demand & prefetch data reads that hit in the L3 and sibling core snoops are not needed as either the core-valid bit is not set or the shared line is present in multiple cores. Offcore response can be programmed only with a specific pair of event select and counter MSR, and with specific event codes and predefine mask bit value in a dedicated MSR to specify attributes of the offcore transaction.",
2983 "EventCode": "0xB7, 0xBB", 3167 "EventCode": "0xB7, 0xBB",
2984 "MSRValue": "0x01003c0091 ", 3168 "MSRValue": "0x01003c0091 ",
2985 "Counter": "0,1,2,3", 3169 "Counter": "0,1,2,3",
@@ -2992,6 +3176,7 @@
2992 "CounterHTOff": "0,1,2,3" 3176 "CounterHTOff": "0,1,2,3"
2993 }, 3177 },
2994 { 3178 {
3179 "PublicDescription": "Counts all demand & prefetch data reads that hit in the L3 with a snoop miss response. Offcore response can be programmed only with a specific pair of event select and counter MSR, and with specific event codes and predefine mask bit value in a dedicated MSR to specify attributes of the offcore transaction.",
2995 "EventCode": "0xB7, 0xBB", 3180 "EventCode": "0xB7, 0xBB",
2996 "MSRValue": "0x02003c0091 ", 3181 "MSRValue": "0x02003c0091 ",
2997 "Counter": "0,1,2,3", 3182 "Counter": "0,1,2,3",
@@ -3004,6 +3189,7 @@
3004 "CounterHTOff": "0,1,2,3" 3189 "CounterHTOff": "0,1,2,3"
3005 }, 3190 },
3006 { 3191 {
3192 "PublicDescription": "Counts all demand & prefetch data reads that hit in the L3 and the snoops to sibling cores hit in either E/S state and the line is not forwarded. Offcore response can be programmed only with a specific pair of event select and counter MSR, and with specific event codes and predefine mask bit value in a dedicated MSR to specify attributes of the offcore transaction.",
3007 "EventCode": "0xB7, 0xBB", 3193 "EventCode": "0xB7, 0xBB",
3008 "MSRValue": "0x04003c0091 ", 3194 "MSRValue": "0x04003c0091 ",
3009 "Counter": "0,1,2,3", 3195 "Counter": "0,1,2,3",
@@ -3016,6 +3202,7 @@
3016 "CounterHTOff": "0,1,2,3" 3202 "CounterHTOff": "0,1,2,3"
3017 }, 3203 },
3018 { 3204 {
3205 "PublicDescription": "tbd Offcore response can be programmed only with a specific pair of event select and counter MSR, and with specific event codes and predefine mask bit value in a dedicated MSR to specify attributes of the offcore transaction.",
3019 "EventCode": "0xB7, 0xBB", 3206 "EventCode": "0xB7, 0xBB",
3020 "MSRValue": "0x10003c0091 ", 3207 "MSRValue": "0x10003c0091 ",
3021 "Counter": "0,1,2,3", 3208 "Counter": "0,1,2,3",
@@ -3028,6 +3215,7 @@
3028 "CounterHTOff": "0,1,2,3" 3215 "CounterHTOff": "0,1,2,3"
3029 }, 3216 },
3030 { 3217 {
3218 "PublicDescription": "Counts all demand & prefetch data reads that hit in the L3. Offcore response can be programmed only with a specific pair of event select and counter MSR, and with specific event codes and predefine mask bit value in a dedicated MSR to specify attributes of the offcore transaction.",
3031 "EventCode": "0xB7, 0xBB", 3219 "EventCode": "0xB7, 0xBB",
3032 "MSRValue": "0x3f803c0091 ", 3220 "MSRValue": "0x3f803c0091 ",
3033 "Counter": "0,1,2,3", 3221 "Counter": "0,1,2,3",
@@ -3040,6 +3228,7 @@
3040 "CounterHTOff": "0,1,2,3" 3228 "CounterHTOff": "0,1,2,3"
3041 }, 3229 },
3042 { 3230 {
3231 "PublicDescription": "Counts all demand & prefetch RFOs that have any response type. Offcore response can be programmed only with a specific pair of event select and counter MSR, and with specific event codes and predefine mask bit value in a dedicated MSR to specify attributes of the offcore transaction.",
3043 "EventCode": "0xB7, 0xBB", 3232 "EventCode": "0xB7, 0xBB",
3044 "MSRValue": "0x0000010122 ", 3233 "MSRValue": "0x0000010122 ",
3045 "Counter": "0,1,2,3", 3234 "Counter": "0,1,2,3",
@@ -3052,6 +3241,7 @@
3052 "CounterHTOff": "0,1,2,3" 3241 "CounterHTOff": "0,1,2,3"
3053 }, 3242 },
3054 { 3243 {
3244 "PublicDescription": "tbd Offcore response can be programmed only with a specific pair of event select and counter MSR, and with specific event codes and predefine mask bit value in a dedicated MSR to specify attributes of the offcore transaction.",
3055 "EventCode": "0xB7, 0xBB", 3245 "EventCode": "0xB7, 0xBB",
3056 "MSRValue": "0x0080020122 ", 3246 "MSRValue": "0x0080020122 ",
3057 "Counter": "0,1,2,3", 3247 "Counter": "0,1,2,3",
@@ -3064,6 +3254,7 @@
3064 "CounterHTOff": "0,1,2,3" 3254 "CounterHTOff": "0,1,2,3"
3065 }, 3255 },
3066 { 3256 {
3257 "PublicDescription": "tbd Offcore response can be programmed only with a specific pair of event select and counter MSR, and with specific event codes and predefine mask bit value in a dedicated MSR to specify attributes of the offcore transaction.",
3067 "EventCode": "0xB7, 0xBB", 3258 "EventCode": "0xB7, 0xBB",
3068 "MSRValue": "0x0100020122 ", 3259 "MSRValue": "0x0100020122 ",
3069 "Counter": "0,1,2,3", 3260 "Counter": "0,1,2,3",
@@ -3076,6 +3267,7 @@
3076 "CounterHTOff": "0,1,2,3" 3267 "CounterHTOff": "0,1,2,3"
3077 }, 3268 },
3078 { 3269 {
3270 "PublicDescription": "tbd Offcore response can be programmed only with a specific pair of event select and counter MSR, and with specific event codes and predefine mask bit value in a dedicated MSR to specify attributes of the offcore transaction.",
3079 "EventCode": "0xB7, 0xBB", 3271 "EventCode": "0xB7, 0xBB",
3080 "MSRValue": "0x0200020122 ", 3272 "MSRValue": "0x0200020122 ",
3081 "Counter": "0,1,2,3", 3273 "Counter": "0,1,2,3",
@@ -3088,6 +3280,7 @@
3088 "CounterHTOff": "0,1,2,3" 3280 "CounterHTOff": "0,1,2,3"
3089 }, 3281 },
3090 { 3282 {
3283 "PublicDescription": "tbd Offcore response can be programmed only with a specific pair of event select and counter MSR, and with specific event codes and predefine mask bit value in a dedicated MSR to specify attributes of the offcore transaction.",
3091 "EventCode": "0xB7, 0xBB", 3284 "EventCode": "0xB7, 0xBB",
3092 "MSRValue": "0x0400020122 ", 3285 "MSRValue": "0x0400020122 ",
3093 "Counter": "0,1,2,3", 3286 "Counter": "0,1,2,3",
@@ -3100,6 +3293,7 @@
3100 "CounterHTOff": "0,1,2,3" 3293 "CounterHTOff": "0,1,2,3"
3101 }, 3294 },
3102 { 3295 {
3296 "PublicDescription": "tbd Offcore response can be programmed only with a specific pair of event select and counter MSR, and with specific event codes and predefine mask bit value in a dedicated MSR to specify attributes of the offcore transaction.",
3103 "EventCode": "0xB7, 0xBB", 3297 "EventCode": "0xB7, 0xBB",
3104 "MSRValue": "0x1000020122 ", 3298 "MSRValue": "0x1000020122 ",
3105 "Counter": "0,1,2,3", 3299 "Counter": "0,1,2,3",
@@ -3112,6 +3306,7 @@
3112 "CounterHTOff": "0,1,2,3" 3306 "CounterHTOff": "0,1,2,3"
3113 }, 3307 },
3114 { 3308 {
3309 "PublicDescription": "tbd Offcore response can be programmed only with a specific pair of event select and counter MSR, and with specific event codes and predefine mask bit value in a dedicated MSR to specify attributes of the offcore transaction.",
3115 "EventCode": "0xB7, 0xBB", 3310 "EventCode": "0xB7, 0xBB",
3116 "MSRValue": "0x3f80020122 ", 3311 "MSRValue": "0x3f80020122 ",
3117 "Counter": "0,1,2,3", 3312 "Counter": "0,1,2,3",
@@ -3124,6 +3319,7 @@
3124 "CounterHTOff": "0,1,2,3" 3319 "CounterHTOff": "0,1,2,3"
3125 }, 3320 },
3126 { 3321 {
3322 "PublicDescription": "Counts all demand & prefetch RFOs that hit in the L3 with no details on snoop-related information. Offcore response can be programmed only with a specific pair of event select and counter MSR, and with specific event codes and predefine mask bit value in a dedicated MSR to specify attributes of the offcore transaction.",
3127 "EventCode": "0xB7, 0xBB", 3323 "EventCode": "0xB7, 0xBB",
3128 "MSRValue": "0x00803c0122 ", 3324 "MSRValue": "0x00803c0122 ",
3129 "Counter": "0,1,2,3", 3325 "Counter": "0,1,2,3",
@@ -3136,6 +3332,7 @@
3136 "CounterHTOff": "0,1,2,3" 3332 "CounterHTOff": "0,1,2,3"
3137 }, 3333 },
3138 { 3334 {
3335 "PublicDescription": "Counts all demand & prefetch RFOs that hit in the L3 and sibling core snoops are not needed as either the core-valid bit is not set or the shared line is present in multiple cores. Offcore response can be programmed only with a specific pair of event select and counter MSR, and with specific event codes and predefine mask bit value in a dedicated MSR to specify attributes of the offcore transaction.",
3139 "EventCode": "0xB7, 0xBB", 3336 "EventCode": "0xB7, 0xBB",
3140 "MSRValue": "0x01003c0122 ", 3337 "MSRValue": "0x01003c0122 ",
3141 "Counter": "0,1,2,3", 3338 "Counter": "0,1,2,3",
@@ -3148,6 +3345,7 @@
3148 "CounterHTOff": "0,1,2,3" 3345 "CounterHTOff": "0,1,2,3"
3149 }, 3346 },
3150 { 3347 {
3348 "PublicDescription": "Counts all demand & prefetch RFOs that hit in the L3 with a snoop miss response. Offcore response can be programmed only with a specific pair of event select and counter MSR, and with specific event codes and predefine mask bit value in a dedicated MSR to specify attributes of the offcore transaction.",
3151 "EventCode": "0xB7, 0xBB", 3349 "EventCode": "0xB7, 0xBB",
3152 "MSRValue": "0x02003c0122 ", 3350 "MSRValue": "0x02003c0122 ",
3153 "Counter": "0,1,2,3", 3351 "Counter": "0,1,2,3",
@@ -3160,6 +3358,7 @@
3160 "CounterHTOff": "0,1,2,3" 3358 "CounterHTOff": "0,1,2,3"
3161 }, 3359 },
3162 { 3360 {
3361 "PublicDescription": "Counts all demand & prefetch RFOs that hit in the L3 and the snoops to sibling cores hit in either E/S state and the line is not forwarded. Offcore response can be programmed only with a specific pair of event select and counter MSR, and with specific event codes and predefine mask bit value in a dedicated MSR to specify attributes of the offcore transaction.",
3163 "EventCode": "0xB7, 0xBB", 3362 "EventCode": "0xB7, 0xBB",
3164 "MSRValue": "0x04003c0122 ", 3363 "MSRValue": "0x04003c0122 ",
3165 "Counter": "0,1,2,3", 3364 "Counter": "0,1,2,3",
@@ -3172,6 +3371,7 @@
3172 "CounterHTOff": "0,1,2,3" 3371 "CounterHTOff": "0,1,2,3"
3173 }, 3372 },
3174 { 3373 {
3374 "PublicDescription": "tbd Offcore response can be programmed only with a specific pair of event select and counter MSR, and with specific event codes and predefine mask bit value in a dedicated MSR to specify attributes of the offcore transaction.",
3175 "EventCode": "0xB7, 0xBB", 3375 "EventCode": "0xB7, 0xBB",
3176 "MSRValue": "0x10003c0122 ", 3376 "MSRValue": "0x10003c0122 ",
3177 "Counter": "0,1,2,3", 3377 "Counter": "0,1,2,3",
@@ -3184,6 +3384,7 @@
3184 "CounterHTOff": "0,1,2,3" 3384 "CounterHTOff": "0,1,2,3"
3185 }, 3385 },
3186 { 3386 {
3387 "PublicDescription": "Counts all demand & prefetch RFOs that hit in the L3. Offcore response can be programmed only with a specific pair of event select and counter MSR, and with specific event codes and predefine mask bit value in a dedicated MSR to specify attributes of the offcore transaction.",
3187 "EventCode": "0xB7, 0xBB", 3388 "EventCode": "0xB7, 0xBB",
3188 "MSRValue": "0x3f803c0122 ", 3389 "MSRValue": "0x3f803c0122 ",
3189 "Counter": "0,1,2,3", 3390 "Counter": "0,1,2,3",
diff --git a/tools/perf/pmu-events/arch/x86/broadwell/floating-point.json b/tools/perf/pmu-events/arch/x86/broadwell/floating-point.json
index 102bfb808199..689d478dae93 100644
--- a/tools/perf/pmu-events/arch/x86/broadwell/floating-point.json
+++ b/tools/perf/pmu-events/arch/x86/broadwell/floating-point.json
@@ -1,6 +1,6 @@
1[ 1[
2 { 2 {
3 "PublicDescription": "This is a non-precise version (that is, does not use PEBS) of the event that counts the number of transitions from AVX-256 to legacy SSE when penalty is applicable.", 3 "PublicDescription": "This event counts the number of transitions from AVX-256 to legacy SSE when penalty is applicable.",
4 "EventCode": "0xC1", 4 "EventCode": "0xC1",
5 "Counter": "0,1,2,3", 5 "Counter": "0,1,2,3",
6 "UMask": "0x8", 6 "UMask": "0x8",
@@ -11,7 +11,7 @@
11 "CounterHTOff": "0,1,2,3,4,5,6,7" 11 "CounterHTOff": "0,1,2,3,4,5,6,7"
12 }, 12 },
13 { 13 {
14 "PublicDescription": "This is a non-precise version (that is, does not use PEBS) of the event that counts the number of transitions from legacy SSE to AVX-256 when penalty is applicable.", 14 "PublicDescription": "This event counts the number of transitions from legacy SSE to AVX-256 when penalty is applicable.",
15 "EventCode": "0xC1", 15 "EventCode": "0xC1",
16 "Counter": "0,1,2,3", 16 "Counter": "0,1,2,3",
17 "UMask": "0x10", 17 "UMask": "0x10",
@@ -22,7 +22,6 @@
22 "CounterHTOff": "0,1,2,3,4,5,6,7" 22 "CounterHTOff": "0,1,2,3,4,5,6,7"
23 }, 23 },
24 { 24 {
25 "PEBS": "1",
26 "EventCode": "0xC7", 25 "EventCode": "0xC7",
27 "Counter": "0,1,2,3", 26 "Counter": "0,1,2,3",
28 "UMask": "0x1", 27 "UMask": "0x1",
@@ -32,7 +31,6 @@
32 "CounterHTOff": "0,1,2,3" 31 "CounterHTOff": "0,1,2,3"
33 }, 32 },
34 { 33 {
35 "PEBS": "1",
36 "EventCode": "0xC7", 34 "EventCode": "0xC7",
37 "Counter": "0,1,2,3", 35 "Counter": "0,1,2,3",
38 "UMask": "0x2", 36 "UMask": "0x2",
@@ -42,7 +40,15 @@
42 "CounterHTOff": "0,1,2,3" 40 "CounterHTOff": "0,1,2,3"
43 }, 41 },
44 { 42 {
45 "PEBS": "1", 43 "EventCode": "0xC7",
44 "Counter": "0,1,2,3",
45 "UMask": "0x3",
46 "EventName": "FP_ARITH_INST_RETIRED.SCALAR",
47 "SampleAfterValue": "2000003",
48 "BriefDescription": "Number of SSE/AVX computational scalar floating-point instructions retired. Applies to SSE* and AVX* scalar, double and single precision floating-point: ADD SUB MUL DIV MIN MAX RSQRT RCP SQRT FM(N)ADD/SUB. FM(N)ADD/SUB instructions count twice as they perform multiple calculations per element.",
49 "CounterHTOff": "0,1,2,3"
50 },
51 {
46 "EventCode": "0xC7", 52 "EventCode": "0xC7",
47 "Counter": "0,1,2,3", 53 "Counter": "0,1,2,3",
48 "UMask": "0x4", 54 "UMask": "0x4",
@@ -52,7 +58,6 @@
52 "CounterHTOff": "0,1,2,3" 58 "CounterHTOff": "0,1,2,3"
53 }, 59 },
54 { 60 {
55 "PEBS": "1",
56 "EventCode": "0xC7", 61 "EventCode": "0xC7",
57 "Counter": "0,1,2,3", 62 "Counter": "0,1,2,3",
58 "UMask": "0x8", 63 "UMask": "0x8",
@@ -62,7 +67,6 @@
62 "CounterHTOff": "0,1,2,3" 67 "CounterHTOff": "0,1,2,3"
63 }, 68 },
64 { 69 {
65 "PEBS": "1",
66 "EventCode": "0xC7", 70 "EventCode": "0xC7",
67 "Counter": "0,1,2,3", 71 "Counter": "0,1,2,3",
68 "UMask": "0x10", 72 "UMask": "0x10",
@@ -72,7 +76,43 @@
72 "CounterHTOff": "0,1,2,3" 76 "CounterHTOff": "0,1,2,3"
73 }, 77 },
74 { 78 {
75 "PublicDescription": "This is a non-precise version (that is, does not use PEBS) of the event that counts the number of x87 floating point (FP) micro-code assist (numeric overflow/underflow, inexact result) when the output value (destination register) is invalid.", 79 "EventCode": "0xC7",
80 "Counter": "0,1,2,3",
81 "UMask": "0x15",
82 "EventName": "FP_ARITH_INST_RETIRED.DOUBLE",
83 "SampleAfterValue": "2000006",
84 "BriefDescription": "Number of SSE/AVX computational double precision floating-point instructions retired. Applies to SSE* and AVX*scalar, double and single precision floating-point: ADD SUB MUL DIV MIN MAX SQRT DPP FM(N)ADD/SUB. DPP and FM(N)ADD/SUB instructions count twice as they perform multiple calculations per element. ?.",
85 "CounterHTOff": "0,1,2,3"
86 },
87 {
88 "EventCode": "0xc7",
89 "Counter": "0,1,2,3",
90 "UMask": "0x20",
91 "EventName": "FP_ARITH_INST_RETIRED.256B_PACKED_SINGLE",
92 "SampleAfterValue": "2000003",
93 "BriefDescription": "Number of SSE/AVX computational 256-bit packed single precision floating-point instructions retired. Each count represents 8 computations. Applies to SSE* and AVX* packed single precision floating-point instructions: ADD SUB MUL DIV MIN MAX RCP RSQRT SQRT DPP FM(N)ADD/SUB. DPP and FM(N)ADD/SUB instructions count twice as they perform multiple calculations per element.",
94 "CounterHTOff": "0,1,2,3"
95 },
96 {
97 "EventCode": "0xC7",
98 "Counter": "0,1,2,3",
99 "UMask": "0x2a",
100 "EventName": "FP_ARITH_INST_RETIRED.SINGLE",
101 "SampleAfterValue": "2000005",
102 "BriefDescription": "Number of SSE/AVX computational single precision floating-point instructions retired. Applies to SSE* and AVX*scalar, double and single precision floating-point: ADD SUB MUL DIV MIN MAX RCP RSQRT SQRT DPP FM(N)ADD/SUB. DPP and FM(N)ADD/SUB instructions count twice as they perform multiple calculations per element. ?.",
103 "CounterHTOff": "0,1,2,3"
104 },
105 {
106 "EventCode": "0xC7",
107 "Counter": "0,1,2,3",
108 "UMask": "0x3c",
109 "EventName": "FP_ARITH_INST_RETIRED.PACKED",
110 "SampleAfterValue": "2000004",
111 "BriefDescription": "Number of SSE/AVX computational packed floating-point instructions retired. Applies to SSE* and AVX*, packed, double and single precision floating-point: ADD SUB MUL DIV MIN MAX RSQRT RCP SQRT DPP FM(N)ADD/SUB. DPP and FM(N)ADD/SUB instructions count twice as they perform multiple calculations per element.",
112 "CounterHTOff": "0,1,2,3"
113 },
114 {
115 "PublicDescription": "This event counts the number of x87 floating point (FP) micro-code assist (numeric overflow/underflow, inexact result) when the output value (destination register) is invalid.",
76 "EventCode": "0xCA", 116 "EventCode": "0xCA",
77 "Counter": "0,1,2,3", 117 "Counter": "0,1,2,3",
78 "UMask": "0x2", 118 "UMask": "0x2",
@@ -82,7 +122,7 @@
82 "CounterHTOff": "0,1,2,3,4,5,6,7" 122 "CounterHTOff": "0,1,2,3,4,5,6,7"
83 }, 123 },
84 { 124 {
85 "PublicDescription": "This is a non-precise version (that is, does not use PEBS) of the event that counts x87 floating point (FP) micro-code assist (invalid operation, denormal operand, SNaN operand) when the input value (one of the source operands to an FP instruction) is invalid.", 125 "PublicDescription": "This event counts x87 floating point (FP) micro-code assist (invalid operation, denormal operand, SNaN operand) when the input value (one of the source operands to an FP instruction) is invalid.",
86 "EventCode": "0xCA", 126 "EventCode": "0xCA",
87 "Counter": "0,1,2,3", 127 "Counter": "0,1,2,3",
88 "UMask": "0x4", 128 "UMask": "0x4",
@@ -92,7 +132,7 @@
92 "CounterHTOff": "0,1,2,3,4,5,6,7" 132 "CounterHTOff": "0,1,2,3,4,5,6,7"
93 }, 133 },
94 { 134 {
95 "PublicDescription": "This is a non-precise version (that is, does not use PEBS) of the event that counts the number of SSE* floating point (FP) micro-code assist (numeric overflow/underflow) when the output value (destination register) is invalid. Counting covers only cases involving penalties that require micro-code assist intervention.", 135 "PublicDescription": "This event counts the number of SSE* floating point (FP) micro-code assist (numeric overflow/underflow) when the output value (destination register) is invalid. Counting covers only cases involving penalties that require micro-code assist intervention.",
96 "EventCode": "0xCA", 136 "EventCode": "0xCA",
97 "Counter": "0,1,2,3", 137 "Counter": "0,1,2,3",
98 "UMask": "0x8", 138 "UMask": "0x8",
@@ -102,7 +142,7 @@
102 "CounterHTOff": "0,1,2,3,4,5,6,7" 142 "CounterHTOff": "0,1,2,3,4,5,6,7"
103 }, 143 },
104 { 144 {
105 "PublicDescription": "This is a non-precise version (that is, does not use PEBS) of the event that counts any input SSE* FP assist - invalid operation, denormal operand, dividing by zero, SNaN operand. Counting includes only cases involving penalties that required micro-code assist intervention.", 145 "PublicDescription": "This event counts any input SSE* FP assist - invalid operation, denormal operand, dividing by zero, SNaN operand. Counting includes only cases involving penalties that required micro-code assist intervention.",
106 "EventCode": "0xCA", 146 "EventCode": "0xCA",
107 "Counter": "0,1,2,3", 147 "Counter": "0,1,2,3",
108 "UMask": "0x10", 148 "UMask": "0x10",
@@ -121,51 +161,5 @@
121 "BriefDescription": "Cycles with any input/output SSE or FP assist", 161 "BriefDescription": "Cycles with any input/output SSE or FP assist",
122 "CounterMask": "1", 162 "CounterMask": "1",
123 "CounterHTOff": "0,1,2,3" 163 "CounterHTOff": "0,1,2,3"
124 },
125 {
126 "PEBS": "1",
127 "EventCode": "0xc7",
128 "Counter": "0,1,2,3",
129 "UMask": "0x20",
130 "EventName": "FP_ARITH_INST_RETIRED.256B_PACKED_SINGLE",
131 "SampleAfterValue": "2000003",
132 "BriefDescription": "Number of SSE/AVX computational 256-bit packed single precision floating-point instructions retired. Each count represents 8 computations. Applies to SSE* and AVX* packed single precision floating-point instructions: ADD SUB MUL DIV MIN MAX RCP RSQRT SQRT DPP FM(N)ADD/SUB. DPP and FM(N)ADD/SUB instructions count twice as they perform multiple calculations per element.",
133 "CounterHTOff": "0,1,2,3"
134 },
135 {
136 "EventCode": "0xC7",
137 "Counter": "0,1,2,3",
138 "UMask": "0x3",
139 "EventName": "FP_ARITH_INST_RETIRED.SCALAR",
140 "SampleAfterValue": "2000003",
141 "BriefDescription": "Number of SSE/AVX computational scalar floating-point instructions retired. Applies to SSE* and AVX* scalar, double and single precision floating-point: ADD SUB MUL DIV MIN MAX RSQRT RCP SQRT FM(N)ADD/SUB. FM(N)ADD/SUB instructions count twice as they perform multiple calculations per element.",
142 "CounterHTOff": "0,1,2,3"
143 },
144 {
145 "EventCode": "0xC7",
146 "Counter": "0,1,2,3",
147 "UMask": "0x3c",
148 "EventName": "FP_ARITH_INST_RETIRED.PACKED",
149 "SampleAfterValue": "2000004",
150 "BriefDescription": "Number of SSE/AVX computational packed floating-point instructions retired. Applies to SSE* and AVX*, packed, double and single precision floating-point: ADD SUB MUL DIV MIN MAX RSQRT RCP SQRT DPP FM(N)ADD/SUB. DPP and FM(N)ADD/SUB instructions count twice as they perform multiple calculations per element.",
151 "CounterHTOff": "0,1,2,3"
152 },
153 {
154 "EventCode": "0xC7",
155 "Counter": "0,1,2,3",
156 "UMask": "0x2a",
157 "EventName": "FP_ARITH_INST_RETIRED.SINGLE",
158 "SampleAfterValue": "2000005",
159 "BriefDescription": "Number of SSE/AVX computational single precision floating-point instructions retired. Applies to SSE* and AVX*scalar, double and single precision floating-point: ADD SUB MUL DIV MIN MAX RCP RSQRT SQRT DPP FM(N)ADD/SUB. DPP and FM(N)ADD/SUB instructions count twice as they perform multiple calculations per element. ?.",
160 "CounterHTOff": "0,1,2,3"
161 },
162 {
163 "EventCode": "0xC7",
164 "Counter": "0,1,2,3",
165 "UMask": "0x15",
166 "EventName": "FP_ARITH_INST_RETIRED.DOUBLE",
167 "SampleAfterValue": "2000006",
168 "BriefDescription": "Number of SSE/AVX computational double precision floating-point instructions retired. Applies to SSE* and AVX*scalar, double and single precision floating-point: ADD SUB MUL DIV MIN MAX SQRT DPP FM(N)ADD/SUB. DPP and FM(N)ADD/SUB instructions count twice as they perform multiple calculations per element. ?.",
169 "CounterHTOff": "0,1,2,3"
170 } 164 }
171] \ No newline at end of file 165] \ No newline at end of file
diff --git a/tools/perf/pmu-events/arch/x86/broadwell/frontend.json b/tools/perf/pmu-events/arch/x86/broadwell/frontend.json
index b0cdf1f097a0..7142c76d7f11 100644
--- a/tools/perf/pmu-events/arch/x86/broadwell/frontend.json
+++ b/tools/perf/pmu-events/arch/x86/broadwell/frontend.json
@@ -10,7 +10,7 @@
10 "CounterHTOff": "0,1,2,3" 10 "CounterHTOff": "0,1,2,3"
11 }, 11 },
12 { 12 {
13 "PublicDescription": "This event counts the number of uops delivered to Instruction Decode Queue (IDQ) from the MITE path. Counting includes uops that may \"bypass\" the IDQ. This also means that uops are not being delivered from the Decode Stream Buffer (DSB).", 13 "PublicDescription": "This event counts the number of uops delivered to Instruction Decode Queue (IDQ) from the MITE path. Counting includes uops that may bypass the IDQ. This also means that uops are not being delivered from the Decode Stream Buffer (DSB).",
14 "EventCode": "0x79", 14 "EventCode": "0x79",
15 "Counter": "0,1,2,3", 15 "Counter": "0,1,2,3",
16 "UMask": "0x4", 16 "UMask": "0x4",
@@ -20,80 +20,49 @@
20 "CounterHTOff": "0,1,2,3,4,5,6,7" 20 "CounterHTOff": "0,1,2,3,4,5,6,7"
21 }, 21 },
22 { 22 {
23 "PublicDescription": "This event counts the number of uops delivered to Instruction Decode Queue (IDQ) from the Decode Stream Buffer (DSB) path. Counting includes uops that may \"bypass\" the IDQ.", 23 "PublicDescription": "This event counts cycles during which uops are being delivered to Instruction Decode Queue (IDQ) from the MITE path. Counting includes uops that may bypass the IDQ.",
24 "EventCode": "0x79", 24 "EventCode": "0x79",
25 "Counter": "0,1,2,3", 25 "Counter": "0,1,2,3",
26 "UMask": "0x8", 26 "UMask": "0x4",
27 "EventName": "IDQ.DSB_UOPS", 27 "EventName": "IDQ.MITE_CYCLES",
28 "SampleAfterValue": "2000003",
29 "BriefDescription": "Uops delivered to Instruction Decode Queue (IDQ) from the Decode Stream Buffer (DSB) path",
30 "CounterHTOff": "0,1,2,3,4,5,6,7"
31 },
32 {
33 "PublicDescription": "This event counts the number of uops initiated by Decode Stream Buffer (DSB) that are being delivered to Instruction Decode Queue (IDQ) while the Microcode Sequencer (MS) is busy. Counting includes uops that may \"bypass\" the IDQ.",
34 "EventCode": "0x79",
35 "Counter": "0,1,2,3",
36 "UMask": "0x10",
37 "EventName": "IDQ.MS_DSB_UOPS",
38 "SampleAfterValue": "2000003",
39 "BriefDescription": "Uops initiated by Decode Stream Buffer (DSB) that are being delivered to Instruction Decode Queue (IDQ) while Microcode Sequenser (MS) is busy",
40 "CounterHTOff": "0,1,2,3,4,5,6,7"
41 },
42 {
43 "PublicDescription": "This event counts the number of uops initiated by MITE and delivered to Instruction Decode Queue (IDQ) while the Microcode Sequenser (MS) is busy. Counting includes uops that may \"bypass\" the IDQ.",
44 "EventCode": "0x79",
45 "Counter": "0,1,2,3",
46 "UMask": "0x20",
47 "EventName": "IDQ.MS_MITE_UOPS",
48 "SampleAfterValue": "2000003",
49 "BriefDescription": "Uops initiated by MITE and delivered to Instruction Decode Queue (IDQ) while Microcode Sequenser (MS) is busy",
50 "CounterHTOff": "0,1,2,3,4,5,6,7"
51 },
52 {
53 "PublicDescription": "This event counts the total number of uops delivered to Instruction Decode Queue (IDQ) while the Microcode Sequenser (MS) is busy. Counting includes uops that may \"bypass\" the IDQ. Uops maybe initiated by Decode Stream Buffer (DSB) or MITE.",
54 "EventCode": "0x79",
55 "Counter": "0,1,2,3",
56 "UMask": "0x30",
57 "EventName": "IDQ.MS_UOPS",
58 "SampleAfterValue": "2000003", 28 "SampleAfterValue": "2000003",
59 "BriefDescription": "Uops delivered to Instruction Decode Queue (IDQ) while Microcode Sequenser (MS) is busy", 29 "BriefDescription": "Cycles when uops are being delivered to Instruction Decode Queue (IDQ) from MITE path",
30 "CounterMask": "1",
60 "CounterHTOff": "0,1,2,3,4,5,6,7" 31 "CounterHTOff": "0,1,2,3,4,5,6,7"
61 }, 32 },
62 { 33 {
63 "PublicDescription": "This event counts cycles during which uops are being delivered to Instruction Decode Queue (IDQ) while the Microcode Sequenser (MS) is busy. Counting includes uops that may \"bypass\" the IDQ. Uops maybe initiated by Decode Stream Buffer (DSB) or MITE.", 34 "PublicDescription": "This event counts the number of uops delivered to Instruction Decode Queue (IDQ) from the Decode Stream Buffer (DSB) path. Counting includes uops that may bypass the IDQ.",
64 "EventCode": "0x79", 35 "EventCode": "0x79",
65 "Counter": "0,1,2,3", 36 "Counter": "0,1,2,3",
66 "UMask": "0x30", 37 "UMask": "0x8",
67 "EventName": "IDQ.MS_CYCLES", 38 "EventName": "IDQ.DSB_UOPS",
68 "SampleAfterValue": "2000003", 39 "SampleAfterValue": "2000003",
69 "BriefDescription": "Cycles when uops are being delivered to Instruction Decode Queue (IDQ) while Microcode Sequenser (MS) is busy", 40 "BriefDescription": "Uops delivered to Instruction Decode Queue (IDQ) from the Decode Stream Buffer (DSB) path",
70 "CounterMask": "1",
71 "CounterHTOff": "0,1,2,3,4,5,6,7" 41 "CounterHTOff": "0,1,2,3,4,5,6,7"
72 }, 42 },
73 { 43 {
74 "PublicDescription": "This event counts cycles during which uops are being delivered to Instruction Decode Queue (IDQ) from the MITE path. Counting includes uops that may \"bypass\" the IDQ.", 44 "PublicDescription": "This event counts cycles during which uops are being delivered to Instruction Decode Queue (IDQ) from the Decode Stream Buffer (DSB) path. Counting includes uops that may bypass the IDQ.",
75 "EventCode": "0x79", 45 "EventCode": "0x79",
76 "Counter": "0,1,2,3", 46 "Counter": "0,1,2,3",
77 "UMask": "0x4", 47 "UMask": "0x8",
78 "EventName": "IDQ.MITE_CYCLES", 48 "EventName": "IDQ.DSB_CYCLES",
79 "SampleAfterValue": "2000003", 49 "SampleAfterValue": "2000003",
80 "BriefDescription": "Cycles when uops are being delivered to Instruction Decode Queue (IDQ) from MITE path", 50 "BriefDescription": "Cycles when uops are being delivered to Instruction Decode Queue (IDQ) from Decode Stream Buffer (DSB) path",
81 "CounterMask": "1", 51 "CounterMask": "1",
82 "CounterHTOff": "0,1,2,3,4,5,6,7" 52 "CounterHTOff": "0,1,2,3,4,5,6,7"
83 }, 53 },
84 { 54 {
85 "PublicDescription": "This event counts cycles during which uops are being delivered to Instruction Decode Queue (IDQ) from the Decode Stream Buffer (DSB) path. Counting includes uops that may \"bypass\" the IDQ.", 55 "PublicDescription": "This event counts the number of uops initiated by Decode Stream Buffer (DSB) that are being delivered to Instruction Decode Queue (IDQ) while the Microcode Sequencer (MS) is busy. Counting includes uops that may bypass the IDQ.",
86 "EventCode": "0x79", 56 "EventCode": "0x79",
87 "Counter": "0,1,2,3", 57 "Counter": "0,1,2,3",
88 "UMask": "0x8", 58 "UMask": "0x10",
89 "EventName": "IDQ.DSB_CYCLES", 59 "EventName": "IDQ.MS_DSB_UOPS",
90 "SampleAfterValue": "2000003", 60 "SampleAfterValue": "2000003",
91 "BriefDescription": "Cycles when uops are being delivered to Instruction Decode Queue (IDQ) from Decode Stream Buffer (DSB) path", 61 "BriefDescription": "Uops initiated by Decode Stream Buffer (DSB) that are being delivered to Instruction Decode Queue (IDQ) while Microcode Sequenser (MS) is busy",
92 "CounterMask": "1",
93 "CounterHTOff": "0,1,2,3,4,5,6,7" 62 "CounterHTOff": "0,1,2,3,4,5,6,7"
94 }, 63 },
95 { 64 {
96 "PublicDescription": "This event counts cycles during which uops initiated by Decode Stream Buffer (DSB) are being delivered to Instruction Decode Queue (IDQ) while the Microcode Sequencer (MS) is busy. Counting includes uops that may \"bypass\" the IDQ.", 65 "PublicDescription": "This event counts cycles during which uops initiated by Decode Stream Buffer (DSB) are being delivered to Instruction Decode Queue (IDQ) while the Microcode Sequencer (MS) is busy. Counting includes uops that may bypass the IDQ.",
97 "EventCode": "0x79", 66 "EventCode": "0x79",
98 "Counter": "0,1,2,3", 67 "Counter": "0,1,2,3",
99 "UMask": "0x10", 68 "UMask": "0x10",
@@ -104,7 +73,7 @@
104 "CounterHTOff": "0,1,2,3,4,5,6,7" 73 "CounterHTOff": "0,1,2,3,4,5,6,7"
105 }, 74 },
106 { 75 {
107 "PublicDescription": "This event counts the number of deliveries to Instruction Decode Queue (IDQ) initiated by Decode Stream Buffer (DSB) while the Microcode Sequencer (MS) is busy. Counting includes uops that may \"bypass\" the IDQ.", 76 "PublicDescription": "This event counts the number of deliveries to Instruction Decode Queue (IDQ) initiated by Decode Stream Buffer (DSB) while the Microcode Sequencer (MS) is busy. Counting includes uops that may bypass the IDQ.",
108 "EventCode": "0x79", 77 "EventCode": "0x79",
109 "Counter": "0,1,2,3", 78 "Counter": "0,1,2,3",
110 "UMask": "0x10", 79 "UMask": "0x10",
@@ -116,7 +85,7 @@
116 "CounterHTOff": "0,1,2,3,4,5,6,7" 85 "CounterHTOff": "0,1,2,3,4,5,6,7"
117 }, 86 },
118 { 87 {
119 "PublicDescription": "This event counts the number of cycles 4 uops were delivered to Instruction Decode Queue (IDQ) from the Decode Stream Buffer (DSB) path. Counting includes uops that may \"bypass\" the IDQ.", 88 "PublicDescription": "This event counts the number of cycles 4 uops were delivered to Instruction Decode Queue (IDQ) from the Decode Stream Buffer (DSB) path. Counting includes uops that may bypass the IDQ.",
120 "EventCode": "0x79", 89 "EventCode": "0x79",
121 "Counter": "0,1,2,3", 90 "Counter": "0,1,2,3",
122 "UMask": "0x18", 91 "UMask": "0x18",
@@ -127,7 +96,7 @@
127 "CounterHTOff": "0,1,2,3,4,5,6,7" 96 "CounterHTOff": "0,1,2,3,4,5,6,7"
128 }, 97 },
129 { 98 {
130 "PublicDescription": "This event counts the number of cycles uops were delivered to Instruction Decode Queue (IDQ) from the Decode Stream Buffer (DSB) path. Counting includes uops that may \"bypass\" the IDQ.", 99 "PublicDescription": "This event counts the number of cycles uops were delivered to Instruction Decode Queue (IDQ) from the Decode Stream Buffer (DSB) path. Counting includes uops that may bypass the IDQ.",
131 "EventCode": "0x79", 100 "EventCode": "0x79",
132 "Counter": "0,1,2,3", 101 "Counter": "0,1,2,3",
133 "UMask": "0x18", 102 "UMask": "0x18",
@@ -138,7 +107,17 @@
138 "CounterHTOff": "0,1,2,3,4,5,6,7" 107 "CounterHTOff": "0,1,2,3,4,5,6,7"
139 }, 108 },
140 { 109 {
141 "PublicDescription": "This event counts the number of cycles 4 uops were delivered to Instruction Decode Queue (IDQ) from the MITE path. Counting includes uops that may \"bypass\" the IDQ. This also means that uops are not being delivered from the Decode Stream Buffer (DSB).", 110 "PublicDescription": "This event counts the number of uops initiated by MITE and delivered to Instruction Decode Queue (IDQ) while the Microcode Sequenser (MS) is busy. Counting includes uops that may bypass the IDQ.",
111 "EventCode": "0x79",
112 "Counter": "0,1,2,3",
113 "UMask": "0x20",
114 "EventName": "IDQ.MS_MITE_UOPS",
115 "SampleAfterValue": "2000003",
116 "BriefDescription": "Uops initiated by MITE and delivered to Instruction Decode Queue (IDQ) while Microcode Sequenser (MS) is busy",
117 "CounterHTOff": "0,1,2,3,4,5,6,7"
118 },
119 {
120 "PublicDescription": "This event counts the number of cycles 4 uops were delivered to Instruction Decode Queue (IDQ) from the MITE path. Counting includes uops that may bypass the IDQ. This also means that uops are not being delivered from the Decode Stream Buffer (DSB).",
142 "EventCode": "0x79", 121 "EventCode": "0x79",
143 "Counter": "0,1,2,3", 122 "Counter": "0,1,2,3",
144 "UMask": "0x24", 123 "UMask": "0x24",
@@ -149,7 +128,7 @@
149 "CounterHTOff": "0,1,2,3,4,5,6,7" 128 "CounterHTOff": "0,1,2,3,4,5,6,7"
150 }, 129 },
151 { 130 {
152 "PublicDescription": "This event counts the number of cycles uops were delivered to Instruction Decode Queue (IDQ) from the MITE path. Counting includes uops that may \"bypass\" the IDQ. This also means that uops are not being delivered from the Decode Stream Buffer (DSB).", 131 "PublicDescription": "This event counts the number of cycles uops were delivered to Instruction Decode Queue (IDQ) from the MITE path. Counting includes uops that may bypass the IDQ. This also means that uops are not being delivered from the Decode Stream Buffer (DSB).",
153 "EventCode": "0x79", 132 "EventCode": "0x79",
154 "Counter": "0,1,2,3", 133 "Counter": "0,1,2,3",
155 "UMask": "0x24", 134 "UMask": "0x24",
@@ -160,7 +139,39 @@
160 "CounterHTOff": "0,1,2,3,4,5,6,7" 139 "CounterHTOff": "0,1,2,3,4,5,6,7"
161 }, 140 },
162 { 141 {
163 "PublicDescription": "This event counts the number of uops delivered to Instruction Decode Queue (IDQ) from the MITE path. Counting includes uops that may \"bypass\" the IDQ. This also means that uops are not being delivered from the Decode Stream Buffer (DSB).", 142 "PublicDescription": "This event counts the total number of uops delivered to Instruction Decode Queue (IDQ) while the Microcode Sequenser (MS) is busy. Counting includes uops that may bypass the IDQ. Uops maybe initiated by Decode Stream Buffer (DSB) or MITE.",
143 "EventCode": "0x79",
144 "Counter": "0,1,2,3",
145 "UMask": "0x30",
146 "EventName": "IDQ.MS_UOPS",
147 "SampleAfterValue": "2000003",
148 "BriefDescription": "Uops delivered to Instruction Decode Queue (IDQ) while Microcode Sequenser (MS) is busy",
149 "CounterHTOff": "0,1,2,3,4,5,6,7"
150 },
151 {
152 "PublicDescription": "This event counts cycles during which uops are being delivered to Instruction Decode Queue (IDQ) while the Microcode Sequenser (MS) is busy. Counting includes uops that may bypass the IDQ. Uops maybe initiated by Decode Stream Buffer (DSB) or MITE.",
153 "EventCode": "0x79",
154 "Counter": "0,1,2,3",
155 "UMask": "0x30",
156 "EventName": "IDQ.MS_CYCLES",
157 "SampleAfterValue": "2000003",
158 "BriefDescription": "Cycles when uops are being delivered to Instruction Decode Queue (IDQ) while Microcode Sequenser (MS) is busy",
159 "CounterMask": "1",
160 "CounterHTOff": "0,1,2,3,4,5,6,7"
161 },
162 {
163 "EventCode": "0x79",
164 "Counter": "0,1,2,3",
165 "UMask": "0x30",
166 "EdgeDetect": "1",
167 "EventName": "IDQ.MS_SWITCHES",
168 "SampleAfterValue": "2000003",
169 "BriefDescription": "Number of switches from DSB (Decode Stream Buffer) or MITE (legacy decode pipeline) to the Microcode Sequencer.",
170 "CounterMask": "1",
171 "CounterHTOff": "0,1,2,3,4,5,6,7"
172 },
173 {
174 "PublicDescription": "This event counts the number of uops delivered to Instruction Decode Queue (IDQ) from the MITE path. Counting includes uops that may bypass the IDQ. This also means that uops are not being delivered from the Decode Stream Buffer (DSB).",
164 "EventCode": "0x79", 175 "EventCode": "0x79",
165 "Counter": "0,1,2,3", 176 "Counter": "0,1,2,3",
166 "UMask": "0x3c", 177 "UMask": "0x3c",
@@ -200,7 +211,7 @@
200 "CounterHTOff": "0,1,2,3,4,5,6,7" 211 "CounterHTOff": "0,1,2,3,4,5,6,7"
201 }, 212 },
202 { 213 {
203 "PublicDescription": "This event counts the number of uops not delivered to Resource Allocation Table (RAT) per thread adding ?4 ? x? when Resource Allocation Table (RAT) is not stalled and Instruction Decode Queue (IDQ) delivers x uops to Resource Allocation Table (RAT) (where x belongs to {0,1,2,3}). Counting does not cover cases when:\n a. IDQ-Resource Allocation Table (RAT) pipe serves the other thread;\n b. Resource Allocation Table (RAT) is stalled for the thread (including uop drops and clear BE conditions); \n c. Instruction Decode Queue (IDQ) delivers four uops.", 214 "PublicDescription": "This event counts the number of uops not delivered to Resource Allocation Table (RAT) per thread adding 4 x when Resource Allocation Table (RAT) is not stalled and Instruction Decode Queue (IDQ) delivers x uops to Resource Allocation Table (RAT) (where x belongs to {0,1,2,3}). Counting does not cover cases when:\n a. IDQ-Resource Allocation Table (RAT) pipe serves the other thread;\n b. Resource Allocation Table (RAT) is stalled for the thread (including uop drops and clear BE conditions); \n c. Instruction Decode Queue (IDQ) delivers four uops.",
204 "EventCode": "0x9C", 215 "EventCode": "0x9C",
205 "Counter": "0,1,2,3", 216 "Counter": "0,1,2,3",
206 "UMask": "0x1", 217 "UMask": "0x1",
@@ -263,7 +274,7 @@
263 "CounterHTOff": "0,1,2,3" 274 "CounterHTOff": "0,1,2,3"
264 }, 275 },
265 { 276 {
266 "PublicDescription": "This event counts Decode Stream Buffer (DSB)-to-MITE switch true penalty cycles. These cycles do not include uops routed through because of the switch itself, for example, when Instruction Decode Queue (IDQ) pre-allocation is unavailable, or Instruction Decode Queue (IDQ) is full. SBD-to-MITE switch true penalty cycles happen after the merge mux (MM) receives Decode Stream Buffer (DSB) Sync-indication until receiving the first MITE uop. \nMM is placed before Instruction Decode Queue (IDQ) to merge uops being fed from the MITE and Decode Stream Buffer (DSB) paths. Decode Stream Buffer (DSB) inserts the Sync-indication whenever a Decode Stream Buffer (DSB)-to-MITE switch occurs.\nPenalty: A Decode Stream Buffer (DSB) hit followed by a Decode Stream Buffer (DSB) miss can cost up to six cycles in which no uops are delivered to the IDQ. Most often, such switches from the Decode Stream Buffer (DSB) to the legacy pipeline cost 0?2 cycles.", 277 "PublicDescription": "This event counts Decode Stream Buffer (DSB)-to-MITE switch true penalty cycles. These cycles do not include uops routed through because of the switch itself, for example, when Instruction Decode Queue (IDQ) pre-allocation is unavailable, or Instruction Decode Queue (IDQ) is full. SBD-to-MITE switch true penalty cycles happen after the merge mux (MM) receives Decode Stream Buffer (DSB) Sync-indication until receiving the first MITE uop. \nMM is placed before Instruction Decode Queue (IDQ) to merge uops being fed from the MITE and Decode Stream Buffer (DSB) paths. Decode Stream Buffer (DSB) inserts the Sync-indication whenever a Decode Stream Buffer (DSB)-to-MITE switch occurs.\nPenalty: A Decode Stream Buffer (DSB) hit followed by a Decode Stream Buffer (DSB) miss can cost up to six cycles in which no uops are delivered to the IDQ. Most often, such switches from the Decode Stream Buffer (DSB) to the legacy pipeline cost 02 cycles.",
267 "EventCode": "0xAB", 278 "EventCode": "0xAB",
268 "Counter": "0,1,2,3", 279 "Counter": "0,1,2,3",
269 "UMask": "0x2", 280 "UMask": "0x2",
@@ -271,16 +282,5 @@
271 "SampleAfterValue": "2000003", 282 "SampleAfterValue": "2000003",
272 "BriefDescription": "Decode Stream Buffer (DSB)-to-MITE switch true penalty cycles.", 283 "BriefDescription": "Decode Stream Buffer (DSB)-to-MITE switch true penalty cycles.",
273 "CounterHTOff": "0,1,2,3,4,5,6,7" 284 "CounterHTOff": "0,1,2,3,4,5,6,7"
274 },
275 {
276 "EventCode": "0x79",
277 "Counter": "0,1,2,3",
278 "UMask": "0x30",
279 "EdgeDetect": "1",
280 "EventName": "IDQ.MS_SWITCHES",
281 "SampleAfterValue": "2000003",
282 "BriefDescription": "Number of switches from DSB (Decode Stream Buffer) or MITE (legacy decode pipeline) to the Microcode Sequencer.",
283 "CounterMask": "1",
284 "CounterHTOff": "0,1,2,3,4,5,6,7"
285 } 285 }
286] \ No newline at end of file 286] \ No newline at end of file
diff --git a/tools/perf/pmu-events/arch/x86/broadwell/memory.json b/tools/perf/pmu-events/arch/x86/broadwell/memory.json
index ff5416d29d0d..c9154cebbdf0 100644
--- a/tools/perf/pmu-events/arch/x86/broadwell/memory.json
+++ b/tools/perf/pmu-events/arch/x86/broadwell/memory.json
@@ -90,7 +90,6 @@
90 "CounterHTOff": "0,1,2,3,4,5,6,7" 90 "CounterHTOff": "0,1,2,3,4,5,6,7"
91 }, 91 },
92 { 92 {
93 "PublicDescription": "Unfriendly TSX abort triggered by a flowmarker.",
94 "EventCode": "0x5d", 93 "EventCode": "0x5d",
95 "Counter": "0,1,2,3", 94 "Counter": "0,1,2,3",
96 "UMask": "0x1", 95 "UMask": "0x1",
@@ -170,13 +169,13 @@
170 }, 169 },
171 { 170 {
172 "PEBS": "1", 171 "PEBS": "1",
173 "PublicDescription": "Number of times HLE abort was triggered.", 172 "PublicDescription": "Number of times HLE abort was triggered (PEBS).",
174 "EventCode": "0xc8", 173 "EventCode": "0xc8",
175 "Counter": "0,1,2,3", 174 "Counter": "0,1,2,3",
176 "UMask": "0x4", 175 "UMask": "0x4",
177 "EventName": "HLE_RETIRED.ABORTED", 176 "EventName": "HLE_RETIRED.ABORTED",
178 "SampleAfterValue": "2000003", 177 "SampleAfterValue": "2000003",
179 "BriefDescription": "Number of times HLE abort was triggered", 178 "BriefDescription": "Number of times HLE abort was triggered (PEBS)",
180 "CounterHTOff": "0,1,2,3,4,5,6,7" 179 "CounterHTOff": "0,1,2,3,4,5,6,7"
181 }, 180 },
182 { 181 {
@@ -251,13 +250,13 @@
251 }, 250 },
252 { 251 {
253 "PEBS": "1", 252 "PEBS": "1",
254 "PublicDescription": "Number of times RTM abort was triggered .", 253 "PublicDescription": "Number of times RTM abort was triggered (PEBS).",
255 "EventCode": "0xc9", 254 "EventCode": "0xc9",
256 "Counter": "0,1,2,3", 255 "Counter": "0,1,2,3",
257 "UMask": "0x4", 256 "UMask": "0x4",
258 "EventName": "RTM_RETIRED.ABORTED", 257 "EventName": "RTM_RETIRED.ABORTED",
259 "SampleAfterValue": "2000003", 258 "SampleAfterValue": "2000003",
260 "BriefDescription": "Number of times RTM abort was triggered", 259 "BriefDescription": "Number of times RTM abort was triggered (PEBS)",
261 "CounterHTOff": "0,1,2,3" 260 "CounterHTOff": "0,1,2,3"
262 }, 261 },
263 { 262 {
@@ -431,6 +430,7 @@
431 "CounterHTOff": "3" 430 "CounterHTOff": "3"
432 }, 431 },
433 { 432 {
433 "PublicDescription": "tbd Offcore response can be programmed only with a specific pair of event select and counter MSR, and with specific event codes and predefine mask bit value in a dedicated MSR to specify attributes of the offcore transaction.",
434 "EventCode": "0xB7, 0xBB", 434 "EventCode": "0xB7, 0xBB",
435 "MSRValue": "0x2000020001 ", 435 "MSRValue": "0x2000020001 ",
436 "Counter": "0,1,2,3", 436 "Counter": "0,1,2,3",
@@ -443,6 +443,7 @@
443 "CounterHTOff": "0,1,2,3" 443 "CounterHTOff": "0,1,2,3"
444 }, 444 },
445 { 445 {
446 "PublicDescription": "Counts demand data reads that hit in the L3 and the target was non-DRAM system address. Offcore response can be programmed only with a specific pair of event select and counter MSR, and with specific event codes and predefine mask bit value in a dedicated MSR to specify attributes of the offcore transaction.",
446 "EventCode": "0xB7, 0xBB", 447 "EventCode": "0xB7, 0xBB",
447 "MSRValue": "0x20003c0001 ", 448 "MSRValue": "0x20003c0001 ",
448 "Counter": "0,1,2,3", 449 "Counter": "0,1,2,3",
@@ -455,6 +456,7 @@
455 "CounterHTOff": "0,1,2,3" 456 "CounterHTOff": "0,1,2,3"
456 }, 457 },
457 { 458 {
459 "PublicDescription": "tbd Offcore response can be programmed only with a specific pair of event select and counter MSR, and with specific event codes and predefine mask bit value in a dedicated MSR to specify attributes of the offcore transaction.",
458 "EventCode": "0xB7, 0xBB", 460 "EventCode": "0xB7, 0xBB",
459 "MSRValue": "0x0084000001 ", 461 "MSRValue": "0x0084000001 ",
460 "Counter": "0,1,2,3", 462 "Counter": "0,1,2,3",
@@ -467,6 +469,7 @@
467 "CounterHTOff": "0,1,2,3" 469 "CounterHTOff": "0,1,2,3"
468 }, 470 },
469 { 471 {
472 "PublicDescription": "tbd Offcore response can be programmed only with a specific pair of event select and counter MSR, and with specific event codes and predefine mask bit value in a dedicated MSR to specify attributes of the offcore transaction.",
470 "EventCode": "0xB7, 0xBB", 473 "EventCode": "0xB7, 0xBB",
471 "MSRValue": "0x0104000001 ", 474 "MSRValue": "0x0104000001 ",
472 "Counter": "0,1,2,3", 475 "Counter": "0,1,2,3",
@@ -479,6 +482,7 @@
479 "CounterHTOff": "0,1,2,3" 482 "CounterHTOff": "0,1,2,3"
480 }, 483 },
481 { 484 {
485 "PublicDescription": "tbd Offcore response can be programmed only with a specific pair of event select and counter MSR, and with specific event codes and predefine mask bit value in a dedicated MSR to specify attributes of the offcore transaction.",
482 "EventCode": "0xB7, 0xBB", 486 "EventCode": "0xB7, 0xBB",
483 "MSRValue": "0x0204000001 ", 487 "MSRValue": "0x0204000001 ",
484 "Counter": "0,1,2,3", 488 "Counter": "0,1,2,3",
@@ -491,6 +495,7 @@
491 "CounterHTOff": "0,1,2,3" 495 "CounterHTOff": "0,1,2,3"
492 }, 496 },
493 { 497 {
498 "PublicDescription": "tbd Offcore response can be programmed only with a specific pair of event select and counter MSR, and with specific event codes and predefine mask bit value in a dedicated MSR to specify attributes of the offcore transaction.",
494 "EventCode": "0xB7, 0xBB", 499 "EventCode": "0xB7, 0xBB",
495 "MSRValue": "0x0404000001 ", 500 "MSRValue": "0x0404000001 ",
496 "Counter": "0,1,2,3", 501 "Counter": "0,1,2,3",
@@ -503,6 +508,7 @@
503 "CounterHTOff": "0,1,2,3" 508 "CounterHTOff": "0,1,2,3"
504 }, 509 },
505 { 510 {
511 "PublicDescription": "tbd Offcore response can be programmed only with a specific pair of event select and counter MSR, and with specific event codes and predefine mask bit value in a dedicated MSR to specify attributes of the offcore transaction.",
506 "EventCode": "0xB7, 0xBB", 512 "EventCode": "0xB7, 0xBB",
507 "MSRValue": "0x1004000001 ", 513 "MSRValue": "0x1004000001 ",
508 "Counter": "0,1,2,3", 514 "Counter": "0,1,2,3",
@@ -515,6 +521,7 @@
515 "CounterHTOff": "0,1,2,3" 521 "CounterHTOff": "0,1,2,3"
516 }, 522 },
517 { 523 {
524 "PublicDescription": "tbd Offcore response can be programmed only with a specific pair of event select and counter MSR, and with specific event codes and predefine mask bit value in a dedicated MSR to specify attributes of the offcore transaction.",
518 "EventCode": "0xB7, 0xBB", 525 "EventCode": "0xB7, 0xBB",
519 "MSRValue": "0x2004000001 ", 526 "MSRValue": "0x2004000001 ",
520 "Counter": "0,1,2,3", 527 "Counter": "0,1,2,3",
@@ -527,6 +534,7 @@
527 "CounterHTOff": "0,1,2,3" 534 "CounterHTOff": "0,1,2,3"
528 }, 535 },
529 { 536 {
537 "PublicDescription": "tbd Offcore response can be programmed only with a specific pair of event select and counter MSR, and with specific event codes and predefine mask bit value in a dedicated MSR to specify attributes of the offcore transaction.",
530 "EventCode": "0xB7, 0xBB", 538 "EventCode": "0xB7, 0xBB",
531 "MSRValue": "0x3f84000001 ", 539 "MSRValue": "0x3f84000001 ",
532 "Counter": "0,1,2,3", 540 "Counter": "0,1,2,3",
@@ -539,6 +547,7 @@
539 "CounterHTOff": "0,1,2,3" 547 "CounterHTOff": "0,1,2,3"
540 }, 548 },
541 { 549 {
550 "PublicDescription": "Counts demand data reads that miss the L3 with no details on snoop-related information. Offcore response can be programmed only with a specific pair of event select and counter MSR, and with specific event codes and predefine mask bit value in a dedicated MSR to specify attributes of the offcore transaction.",
542 "EventCode": "0xB7, 0xBB", 551 "EventCode": "0xB7, 0xBB",
543 "MSRValue": "0x00bc000001 ", 552 "MSRValue": "0x00bc000001 ",
544 "Counter": "0,1,2,3", 553 "Counter": "0,1,2,3",
@@ -551,6 +560,7 @@
551 "CounterHTOff": "0,1,2,3" 560 "CounterHTOff": "0,1,2,3"
552 }, 561 },
553 { 562 {
563 "PublicDescription": "tbd Offcore response can be programmed only with a specific pair of event select and counter MSR, and with specific event codes and predefine mask bit value in a dedicated MSR to specify attributes of the offcore transaction.",
554 "EventCode": "0xB7, 0xBB", 564 "EventCode": "0xB7, 0xBB",
555 "MSRValue": "0x013c000001 ", 565 "MSRValue": "0x013c000001 ",
556 "Counter": "0,1,2,3", 566 "Counter": "0,1,2,3",
@@ -563,6 +573,7 @@
563 "CounterHTOff": "0,1,2,3" 573 "CounterHTOff": "0,1,2,3"
564 }, 574 },
565 { 575 {
576 "PublicDescription": "Counts demand data reads that miss the L3 with a snoop miss response. Offcore response can be programmed only with a specific pair of event select and counter MSR, and with specific event codes and predefine mask bit value in a dedicated MSR to specify attributes of the offcore transaction.",
566 "EventCode": "0xB7, 0xBB", 577 "EventCode": "0xB7, 0xBB",
567 "MSRValue": "0x023c000001 ", 578 "MSRValue": "0x023c000001 ",
568 "Counter": "0,1,2,3", 579 "Counter": "0,1,2,3",
@@ -575,6 +586,7 @@
575 "CounterHTOff": "0,1,2,3" 586 "CounterHTOff": "0,1,2,3"
576 }, 587 },
577 { 588 {
589 "PublicDescription": "tbd Offcore response can be programmed only with a specific pair of event select and counter MSR, and with specific event codes and predefine mask bit value in a dedicated MSR to specify attributes of the offcore transaction.",
578 "EventCode": "0xB7, 0xBB", 590 "EventCode": "0xB7, 0xBB",
579 "MSRValue": "0x043c000001 ", 591 "MSRValue": "0x043c000001 ",
580 "Counter": "0,1,2,3", 592 "Counter": "0,1,2,3",
@@ -587,6 +599,7 @@
587 "CounterHTOff": "0,1,2,3" 599 "CounterHTOff": "0,1,2,3"
588 }, 600 },
589 { 601 {
602 "PublicDescription": "Counts all demand data writes (RFOs) that hit in the L3 and the target was non-DRAM system address. Offcore response can be programmed only with a specific pair of event select and counter MSR, and with specific event codes and predefine mask bit value in a dedicated MSR to specify attributes of the offcore transaction.",
590 "EventCode": "0xB7, 0xBB", 603 "EventCode": "0xB7, 0xBB",
591 "MSRValue": "0x20003c0002 ", 604 "MSRValue": "0x20003c0002 ",
592 "Counter": "0,1,2,3", 605 "Counter": "0,1,2,3",
@@ -599,6 +612,7 @@
599 "CounterHTOff": "0,1,2,3" 612 "CounterHTOff": "0,1,2,3"
600 }, 613 },
601 { 614 {
615 "PublicDescription": "tbd Offcore response can be programmed only with a specific pair of event select and counter MSR, and with specific event codes and predefine mask bit value in a dedicated MSR to specify attributes of the offcore transaction.",
602 "EventCode": "0xB7, 0xBB", 616 "EventCode": "0xB7, 0xBB",
603 "MSRValue": "0x3f84000002 ", 617 "MSRValue": "0x3f84000002 ",
604 "Counter": "0,1,2,3", 618 "Counter": "0,1,2,3",
@@ -611,6 +625,7 @@
611 "CounterHTOff": "0,1,2,3" 625 "CounterHTOff": "0,1,2,3"
612 }, 626 },
613 { 627 {
628 "PublicDescription": "Counts all demand data writes (RFOs) that miss the L3 with no details on snoop-related information. Offcore response can be programmed only with a specific pair of event select and counter MSR, and with specific event codes and predefine mask bit value in a dedicated MSR to specify attributes of the offcore transaction.",
614 "EventCode": "0xB7, 0xBB", 629 "EventCode": "0xB7, 0xBB",
615 "MSRValue": "0x00bc000002 ", 630 "MSRValue": "0x00bc000002 ",
616 "Counter": "0,1,2,3", 631 "Counter": "0,1,2,3",
@@ -623,6 +638,7 @@
623 "CounterHTOff": "0,1,2,3" 638 "CounterHTOff": "0,1,2,3"
624 }, 639 },
625 { 640 {
641 "PublicDescription": "tbd Offcore response can be programmed only with a specific pair of event select and counter MSR, and with specific event codes and predefine mask bit value in a dedicated MSR to specify attributes of the offcore transaction.",
626 "EventCode": "0xB7, 0xBB", 642 "EventCode": "0xB7, 0xBB",
627 "MSRValue": "0x013c000002 ", 643 "MSRValue": "0x013c000002 ",
628 "Counter": "0,1,2,3", 644 "Counter": "0,1,2,3",
@@ -635,6 +651,7 @@
635 "CounterHTOff": "0,1,2,3" 651 "CounterHTOff": "0,1,2,3"
636 }, 652 },
637 { 653 {
654 "PublicDescription": "Counts all demand data writes (RFOs) that miss the L3 with a snoop miss response. Offcore response can be programmed only with a specific pair of event select and counter MSR, and with specific event codes and predefine mask bit value in a dedicated MSR to specify attributes of the offcore transaction.",
638 "EventCode": "0xB7, 0xBB", 655 "EventCode": "0xB7, 0xBB",
639 "MSRValue": "0x023c000002 ", 656 "MSRValue": "0x023c000002 ",
640 "Counter": "0,1,2,3", 657 "Counter": "0,1,2,3",
@@ -647,6 +664,7 @@
647 "CounterHTOff": "0,1,2,3" 664 "CounterHTOff": "0,1,2,3"
648 }, 665 },
649 { 666 {
667 "PublicDescription": "tbd Offcore response can be programmed only with a specific pair of event select and counter MSR, and with specific event codes and predefine mask bit value in a dedicated MSR to specify attributes of the offcore transaction.",
650 "EventCode": "0xB7, 0xBB", 668 "EventCode": "0xB7, 0xBB",
651 "MSRValue": "0x043c000002 ", 669 "MSRValue": "0x043c000002 ",
652 "Counter": "0,1,2,3", 670 "Counter": "0,1,2,3",
@@ -659,6 +677,7 @@
659 "CounterHTOff": "0,1,2,3" 677 "CounterHTOff": "0,1,2,3"
660 }, 678 },
661 { 679 {
680 "PublicDescription": "tbd Offcore response can be programmed only with a specific pair of event select and counter MSR, and with specific event codes and predefine mask bit value in a dedicated MSR to specify attributes of the offcore transaction.",
662 "EventCode": "0xB7, 0xBB", 681 "EventCode": "0xB7, 0xBB",
663 "MSRValue": "0x2000020004 ", 682 "MSRValue": "0x2000020004 ",
664 "Counter": "0,1,2,3", 683 "Counter": "0,1,2,3",
@@ -671,6 +690,7 @@
671 "CounterHTOff": "0,1,2,3" 690 "CounterHTOff": "0,1,2,3"
672 }, 691 },
673 { 692 {
693 "PublicDescription": "Counts all demand code reads that hit in the L3 and the target was non-DRAM system address. Offcore response can be programmed only with a specific pair of event select and counter MSR, and with specific event codes and predefine mask bit value in a dedicated MSR to specify attributes of the offcore transaction.",
674 "EventCode": "0xB7, 0xBB", 694 "EventCode": "0xB7, 0xBB",
675 "MSRValue": "0x20003c0004 ", 695 "MSRValue": "0x20003c0004 ",
676 "Counter": "0,1,2,3", 696 "Counter": "0,1,2,3",
@@ -683,6 +703,7 @@
683 "CounterHTOff": "0,1,2,3" 703 "CounterHTOff": "0,1,2,3"
684 }, 704 },
685 { 705 {
706 "PublicDescription": "tbd Offcore response can be programmed only with a specific pair of event select and counter MSR, and with specific event codes and predefine mask bit value in a dedicated MSR to specify attributes of the offcore transaction.",
686 "EventCode": "0xB7, 0xBB", 707 "EventCode": "0xB7, 0xBB",
687 "MSRValue": "0x0084000004 ", 708 "MSRValue": "0x0084000004 ",
688 "Counter": "0,1,2,3", 709 "Counter": "0,1,2,3",
@@ -695,6 +716,7 @@
695 "CounterHTOff": "0,1,2,3" 716 "CounterHTOff": "0,1,2,3"
696 }, 717 },
697 { 718 {
719 "PublicDescription": "tbd Offcore response can be programmed only with a specific pair of event select and counter MSR, and with specific event codes and predefine mask bit value in a dedicated MSR to specify attributes of the offcore transaction.",
698 "EventCode": "0xB7, 0xBB", 720 "EventCode": "0xB7, 0xBB",
699 "MSRValue": "0x0104000004 ", 721 "MSRValue": "0x0104000004 ",
700 "Counter": "0,1,2,3", 722 "Counter": "0,1,2,3",
@@ -707,6 +729,7 @@
707 "CounterHTOff": "0,1,2,3" 729 "CounterHTOff": "0,1,2,3"
708 }, 730 },
709 { 731 {
732 "PublicDescription": "tbd Offcore response can be programmed only with a specific pair of event select and counter MSR, and with specific event codes and predefine mask bit value in a dedicated MSR to specify attributes of the offcore transaction.",
710 "EventCode": "0xB7, 0xBB", 733 "EventCode": "0xB7, 0xBB",
711 "MSRValue": "0x0204000004 ", 734 "MSRValue": "0x0204000004 ",
712 "Counter": "0,1,2,3", 735 "Counter": "0,1,2,3",
@@ -719,6 +742,7 @@
719 "CounterHTOff": "0,1,2,3" 742 "CounterHTOff": "0,1,2,3"
720 }, 743 },
721 { 744 {
745 "PublicDescription": "tbd Offcore response can be programmed only with a specific pair of event select and counter MSR, and with specific event codes and predefine mask bit value in a dedicated MSR to specify attributes of the offcore transaction.",
722 "EventCode": "0xB7, 0xBB", 746 "EventCode": "0xB7, 0xBB",
723 "MSRValue": "0x0404000004 ", 747 "MSRValue": "0x0404000004 ",
724 "Counter": "0,1,2,3", 748 "Counter": "0,1,2,3",
@@ -731,6 +755,7 @@
731 "CounterHTOff": "0,1,2,3" 755 "CounterHTOff": "0,1,2,3"
732 }, 756 },
733 { 757 {
758 "PublicDescription": "tbd Offcore response can be programmed only with a specific pair of event select and counter MSR, and with specific event codes and predefine mask bit value in a dedicated MSR to specify attributes of the offcore transaction.",
734 "EventCode": "0xB7, 0xBB", 759 "EventCode": "0xB7, 0xBB",
735 "MSRValue": "0x1004000004 ", 760 "MSRValue": "0x1004000004 ",
736 "Counter": "0,1,2,3", 761 "Counter": "0,1,2,3",
@@ -743,6 +768,7 @@
743 "CounterHTOff": "0,1,2,3" 768 "CounterHTOff": "0,1,2,3"
744 }, 769 },
745 { 770 {
771 "PublicDescription": "tbd Offcore response can be programmed only with a specific pair of event select and counter MSR, and with specific event codes and predefine mask bit value in a dedicated MSR to specify attributes of the offcore transaction.",
746 "EventCode": "0xB7, 0xBB", 772 "EventCode": "0xB7, 0xBB",
747 "MSRValue": "0x2004000004 ", 773 "MSRValue": "0x2004000004 ",
748 "Counter": "0,1,2,3", 774 "Counter": "0,1,2,3",
@@ -755,6 +781,7 @@
755 "CounterHTOff": "0,1,2,3" 781 "CounterHTOff": "0,1,2,3"
756 }, 782 },
757 { 783 {
784 "PublicDescription": "tbd Offcore response can be programmed only with a specific pair of event select and counter MSR, and with specific event codes and predefine mask bit value in a dedicated MSR to specify attributes of the offcore transaction.",
758 "EventCode": "0xB7, 0xBB", 785 "EventCode": "0xB7, 0xBB",
759 "MSRValue": "0x3f84000004 ", 786 "MSRValue": "0x3f84000004 ",
760 "Counter": "0,1,2,3", 787 "Counter": "0,1,2,3",
@@ -767,6 +794,7 @@
767 "CounterHTOff": "0,1,2,3" 794 "CounterHTOff": "0,1,2,3"
768 }, 795 },
769 { 796 {
797 "PublicDescription": "Counts all demand code reads that miss the L3 with no details on snoop-related information. Offcore response can be programmed only with a specific pair of event select and counter MSR, and with specific event codes and predefine mask bit value in a dedicated MSR to specify attributes of the offcore transaction.",
770 "EventCode": "0xB7, 0xBB", 798 "EventCode": "0xB7, 0xBB",
771 "MSRValue": "0x00bc000004 ", 799 "MSRValue": "0x00bc000004 ",
772 "Counter": "0,1,2,3", 800 "Counter": "0,1,2,3",
@@ -779,6 +807,7 @@
779 "CounterHTOff": "0,1,2,3" 807 "CounterHTOff": "0,1,2,3"
780 }, 808 },
781 { 809 {
810 "PublicDescription": "tbd Offcore response can be programmed only with a specific pair of event select and counter MSR, and with specific event codes and predefine mask bit value in a dedicated MSR to specify attributes of the offcore transaction.",
782 "EventCode": "0xB7, 0xBB", 811 "EventCode": "0xB7, 0xBB",
783 "MSRValue": "0x013c000004 ", 812 "MSRValue": "0x013c000004 ",
784 "Counter": "0,1,2,3", 813 "Counter": "0,1,2,3",
@@ -791,6 +820,7 @@
791 "CounterHTOff": "0,1,2,3" 820 "CounterHTOff": "0,1,2,3"
792 }, 821 },
793 { 822 {
823 "PublicDescription": "Counts all demand code reads that miss the L3 with a snoop miss response. Offcore response can be programmed only with a specific pair of event select and counter MSR, and with specific event codes and predefine mask bit value in a dedicated MSR to specify attributes of the offcore transaction.",
794 "EventCode": "0xB7, 0xBB", 824 "EventCode": "0xB7, 0xBB",
795 "MSRValue": "0x023c000004 ", 825 "MSRValue": "0x023c000004 ",
796 "Counter": "0,1,2,3", 826 "Counter": "0,1,2,3",
@@ -803,6 +833,7 @@
803 "CounterHTOff": "0,1,2,3" 833 "CounterHTOff": "0,1,2,3"
804 }, 834 },
805 { 835 {
836 "PublicDescription": "tbd Offcore response can be programmed only with a specific pair of event select and counter MSR, and with specific event codes and predefine mask bit value in a dedicated MSR to specify attributes of the offcore transaction.",
806 "EventCode": "0xB7, 0xBB", 837 "EventCode": "0xB7, 0xBB",
807 "MSRValue": "0x043c000004 ", 838 "MSRValue": "0x043c000004 ",
808 "Counter": "0,1,2,3", 839 "Counter": "0,1,2,3",
@@ -815,6 +846,7 @@
815 "CounterHTOff": "0,1,2,3" 846 "CounterHTOff": "0,1,2,3"
816 }, 847 },
817 { 848 {
849 "PublicDescription": "tbd Offcore response can be programmed only with a specific pair of event select and counter MSR, and with specific event codes and predefine mask bit value in a dedicated MSR to specify attributes of the offcore transaction.",
818 "EventCode": "0xB7, 0xBB", 850 "EventCode": "0xB7, 0xBB",
819 "MSRValue": "0x2000020008 ", 851 "MSRValue": "0x2000020008 ",
820 "Counter": "0,1,2,3", 852 "Counter": "0,1,2,3",
@@ -827,6 +859,7 @@
827 "CounterHTOff": "0,1,2,3" 859 "CounterHTOff": "0,1,2,3"
828 }, 860 },
829 { 861 {
862 "PublicDescription": "Counts writebacks (modified to exclusive) that hit in the L3 and the target was non-DRAM system address. Offcore response can be programmed only with a specific pair of event select and counter MSR, and with specific event codes and predefine mask bit value in a dedicated MSR to specify attributes of the offcore transaction.",
830 "EventCode": "0xB7, 0xBB", 863 "EventCode": "0xB7, 0xBB",
831 "MSRValue": "0x20003c0008 ", 864 "MSRValue": "0x20003c0008 ",
832 "Counter": "0,1,2,3", 865 "Counter": "0,1,2,3",
@@ -839,6 +872,7 @@
839 "CounterHTOff": "0,1,2,3" 872 "CounterHTOff": "0,1,2,3"
840 }, 873 },
841 { 874 {
875 "PublicDescription": "tbd Offcore response can be programmed only with a specific pair of event select and counter MSR, and with specific event codes and predefine mask bit value in a dedicated MSR to specify attributes of the offcore transaction.",
842 "EventCode": "0xB7, 0xBB", 876 "EventCode": "0xB7, 0xBB",
843 "MSRValue": "0x0084000008 ", 877 "MSRValue": "0x0084000008 ",
844 "Counter": "0,1,2,3", 878 "Counter": "0,1,2,3",
@@ -851,6 +885,7 @@
851 "CounterHTOff": "0,1,2,3" 885 "CounterHTOff": "0,1,2,3"
852 }, 886 },
853 { 887 {
888 "PublicDescription": "tbd Offcore response can be programmed only with a specific pair of event select and counter MSR, and with specific event codes and predefine mask bit value in a dedicated MSR to specify attributes of the offcore transaction.",
854 "EventCode": "0xB7, 0xBB", 889 "EventCode": "0xB7, 0xBB",
855 "MSRValue": "0x0104000008 ", 890 "MSRValue": "0x0104000008 ",
856 "Counter": "0,1,2,3", 891 "Counter": "0,1,2,3",
@@ -863,6 +898,7 @@
863 "CounterHTOff": "0,1,2,3" 898 "CounterHTOff": "0,1,2,3"
864 }, 899 },
865 { 900 {
901 "PublicDescription": "tbd Offcore response can be programmed only with a specific pair of event select and counter MSR, and with specific event codes and predefine mask bit value in a dedicated MSR to specify attributes of the offcore transaction.",
866 "EventCode": "0xB7, 0xBB", 902 "EventCode": "0xB7, 0xBB",
867 "MSRValue": "0x0204000008 ", 903 "MSRValue": "0x0204000008 ",
868 "Counter": "0,1,2,3", 904 "Counter": "0,1,2,3",
@@ -875,6 +911,7 @@
875 "CounterHTOff": "0,1,2,3" 911 "CounterHTOff": "0,1,2,3"
876 }, 912 },
877 { 913 {
914 "PublicDescription": "tbd Offcore response can be programmed only with a specific pair of event select and counter MSR, and with specific event codes and predefine mask bit value in a dedicated MSR to specify attributes of the offcore transaction.",
878 "EventCode": "0xB7, 0xBB", 915 "EventCode": "0xB7, 0xBB",
879 "MSRValue": "0x0404000008 ", 916 "MSRValue": "0x0404000008 ",
880 "Counter": "0,1,2,3", 917 "Counter": "0,1,2,3",
@@ -887,6 +924,7 @@
887 "CounterHTOff": "0,1,2,3" 924 "CounterHTOff": "0,1,2,3"
888 }, 925 },
889 { 926 {
927 "PublicDescription": "tbd Offcore response can be programmed only with a specific pair of event select and counter MSR, and with specific event codes and predefine mask bit value in a dedicated MSR to specify attributes of the offcore transaction.",
890 "EventCode": "0xB7, 0xBB", 928 "EventCode": "0xB7, 0xBB",
891 "MSRValue": "0x1004000008 ", 929 "MSRValue": "0x1004000008 ",
892 "Counter": "0,1,2,3", 930 "Counter": "0,1,2,3",
@@ -899,6 +937,7 @@
899 "CounterHTOff": "0,1,2,3" 937 "CounterHTOff": "0,1,2,3"
900 }, 938 },
901 { 939 {
940 "PublicDescription": "tbd Offcore response can be programmed only with a specific pair of event select and counter MSR, and with specific event codes and predefine mask bit value in a dedicated MSR to specify attributes of the offcore transaction.",
902 "EventCode": "0xB7, 0xBB", 941 "EventCode": "0xB7, 0xBB",
903 "MSRValue": "0x2004000008 ", 942 "MSRValue": "0x2004000008 ",
904 "Counter": "0,1,2,3", 943 "Counter": "0,1,2,3",
@@ -911,6 +950,7 @@
911 "CounterHTOff": "0,1,2,3" 950 "CounterHTOff": "0,1,2,3"
912 }, 951 },
913 { 952 {
953 "PublicDescription": "tbd Offcore response can be programmed only with a specific pair of event select and counter MSR, and with specific event codes and predefine mask bit value in a dedicated MSR to specify attributes of the offcore transaction.",
914 "EventCode": "0xB7, 0xBB", 954 "EventCode": "0xB7, 0xBB",
915 "MSRValue": "0x3f84000008 ", 955 "MSRValue": "0x3f84000008 ",
916 "Counter": "0,1,2,3", 956 "Counter": "0,1,2,3",
@@ -923,6 +963,7 @@
923 "CounterHTOff": "0,1,2,3" 963 "CounterHTOff": "0,1,2,3"
924 }, 964 },
925 { 965 {
966 "PublicDescription": "Counts writebacks (modified to exclusive) that miss the L3 with no details on snoop-related information. Offcore response can be programmed only with a specific pair of event select and counter MSR, and with specific event codes and predefine mask bit value in a dedicated MSR to specify attributes of the offcore transaction.",
926 "EventCode": "0xB7, 0xBB", 967 "EventCode": "0xB7, 0xBB",
927 "MSRValue": "0x00bc000008 ", 968 "MSRValue": "0x00bc000008 ",
928 "Counter": "0,1,2,3", 969 "Counter": "0,1,2,3",
@@ -935,6 +976,7 @@
935 "CounterHTOff": "0,1,2,3" 976 "CounterHTOff": "0,1,2,3"
936 }, 977 },
937 { 978 {
979 "PublicDescription": "tbd Offcore response can be programmed only with a specific pair of event select and counter MSR, and with specific event codes and predefine mask bit value in a dedicated MSR to specify attributes of the offcore transaction.",
938 "EventCode": "0xB7, 0xBB", 980 "EventCode": "0xB7, 0xBB",
939 "MSRValue": "0x013c000008 ", 981 "MSRValue": "0x013c000008 ",
940 "Counter": "0,1,2,3", 982 "Counter": "0,1,2,3",
@@ -947,6 +989,7 @@
947 "CounterHTOff": "0,1,2,3" 989 "CounterHTOff": "0,1,2,3"
948 }, 990 },
949 { 991 {
992 "PublicDescription": "Counts writebacks (modified to exclusive) that miss the L3 with a snoop miss response. Offcore response can be programmed only with a specific pair of event select and counter MSR, and with specific event codes and predefine mask bit value in a dedicated MSR to specify attributes of the offcore transaction.",
950 "EventCode": "0xB7, 0xBB", 993 "EventCode": "0xB7, 0xBB",
951 "MSRValue": "0x023c000008 ", 994 "MSRValue": "0x023c000008 ",
952 "Counter": "0,1,2,3", 995 "Counter": "0,1,2,3",
@@ -959,6 +1002,7 @@
959 "CounterHTOff": "0,1,2,3" 1002 "CounterHTOff": "0,1,2,3"
960 }, 1003 },
961 { 1004 {
1005 "PublicDescription": "tbd Offcore response can be programmed only with a specific pair of event select and counter MSR, and with specific event codes and predefine mask bit value in a dedicated MSR to specify attributes of the offcore transaction.",
962 "EventCode": "0xB7, 0xBB", 1006 "EventCode": "0xB7, 0xBB",
963 "MSRValue": "0x043c000008 ", 1007 "MSRValue": "0x043c000008 ",
964 "Counter": "0,1,2,3", 1008 "Counter": "0,1,2,3",
@@ -971,6 +1015,7 @@
971 "CounterHTOff": "0,1,2,3" 1015 "CounterHTOff": "0,1,2,3"
972 }, 1016 },
973 { 1017 {
1018 "PublicDescription": "tbd Offcore response can be programmed only with a specific pair of event select and counter MSR, and with specific event codes and predefine mask bit value in a dedicated MSR to specify attributes of the offcore transaction.",
974 "EventCode": "0xB7, 0xBB", 1019 "EventCode": "0xB7, 0xBB",
975 "MSRValue": "0x2000020010 ", 1020 "MSRValue": "0x2000020010 ",
976 "Counter": "0,1,2,3", 1021 "Counter": "0,1,2,3",
@@ -983,6 +1028,7 @@
983 "CounterHTOff": "0,1,2,3" 1028 "CounterHTOff": "0,1,2,3"
984 }, 1029 },
985 { 1030 {
1031 "PublicDescription": "Counts prefetch (that bring data to L2) data reads that hit in the L3 and the target was non-DRAM system address. Offcore response can be programmed only with a specific pair of event select and counter MSR, and with specific event codes and predefine mask bit value in a dedicated MSR to specify attributes of the offcore transaction.",
986 "EventCode": "0xB7, 0xBB", 1032 "EventCode": "0xB7, 0xBB",
987 "MSRValue": "0x20003c0010 ", 1033 "MSRValue": "0x20003c0010 ",
988 "Counter": "0,1,2,3", 1034 "Counter": "0,1,2,3",
@@ -995,6 +1041,7 @@
995 "CounterHTOff": "0,1,2,3" 1041 "CounterHTOff": "0,1,2,3"
996 }, 1042 },
997 { 1043 {
1044 "PublicDescription": "tbd Offcore response can be programmed only with a specific pair of event select and counter MSR, and with specific event codes and predefine mask bit value in a dedicated MSR to specify attributes of the offcore transaction.",
998 "EventCode": "0xB7, 0xBB", 1045 "EventCode": "0xB7, 0xBB",
999 "MSRValue": "0x0084000010 ", 1046 "MSRValue": "0x0084000010 ",
1000 "Counter": "0,1,2,3", 1047 "Counter": "0,1,2,3",
@@ -1007,6 +1054,7 @@
1007 "CounterHTOff": "0,1,2,3" 1054 "CounterHTOff": "0,1,2,3"
1008 }, 1055 },
1009 { 1056 {
1057 "PublicDescription": "tbd Offcore response can be programmed only with a specific pair of event select and counter MSR, and with specific event codes and predefine mask bit value in a dedicated MSR to specify attributes of the offcore transaction.",
1010 "EventCode": "0xB7, 0xBB", 1058 "EventCode": "0xB7, 0xBB",
1011 "MSRValue": "0x0104000010 ", 1059 "MSRValue": "0x0104000010 ",
1012 "Counter": "0,1,2,3", 1060 "Counter": "0,1,2,3",
@@ -1019,6 +1067,7 @@
1019 "CounterHTOff": "0,1,2,3" 1067 "CounterHTOff": "0,1,2,3"
1020 }, 1068 },
1021 { 1069 {
1070 "PublicDescription": "tbd Offcore response can be programmed only with a specific pair of event select and counter MSR, and with specific event codes and predefine mask bit value in a dedicated MSR to specify attributes of the offcore transaction.",
1022 "EventCode": "0xB7, 0xBB", 1071 "EventCode": "0xB7, 0xBB",
1023 "MSRValue": "0x0204000010 ", 1072 "MSRValue": "0x0204000010 ",
1024 "Counter": "0,1,2,3", 1073 "Counter": "0,1,2,3",
@@ -1031,6 +1080,7 @@
1031 "CounterHTOff": "0,1,2,3" 1080 "CounterHTOff": "0,1,2,3"
1032 }, 1081 },
1033 { 1082 {
1083 "PublicDescription": "tbd Offcore response can be programmed only with a specific pair of event select and counter MSR, and with specific event codes and predefine mask bit value in a dedicated MSR to specify attributes of the offcore transaction.",
1034 "EventCode": "0xB7, 0xBB", 1084 "EventCode": "0xB7, 0xBB",
1035 "MSRValue": "0x0404000010 ", 1085 "MSRValue": "0x0404000010 ",
1036 "Counter": "0,1,2,3", 1086 "Counter": "0,1,2,3",
@@ -1043,6 +1093,7 @@
1043 "CounterHTOff": "0,1,2,3" 1093 "CounterHTOff": "0,1,2,3"
1044 }, 1094 },
1045 { 1095 {
1096 "PublicDescription": "tbd Offcore response can be programmed only with a specific pair of event select and counter MSR, and with specific event codes and predefine mask bit value in a dedicated MSR to specify attributes of the offcore transaction.",
1046 "EventCode": "0xB7, 0xBB", 1097 "EventCode": "0xB7, 0xBB",
1047 "MSRValue": "0x1004000010 ", 1098 "MSRValue": "0x1004000010 ",
1048 "Counter": "0,1,2,3", 1099 "Counter": "0,1,2,3",
@@ -1055,6 +1106,7 @@
1055 "CounterHTOff": "0,1,2,3" 1106 "CounterHTOff": "0,1,2,3"
1056 }, 1107 },
1057 { 1108 {
1109 "PublicDescription": "tbd Offcore response can be programmed only with a specific pair of event select and counter MSR, and with specific event codes and predefine mask bit value in a dedicated MSR to specify attributes of the offcore transaction.",
1058 "EventCode": "0xB7, 0xBB", 1110 "EventCode": "0xB7, 0xBB",
1059 "MSRValue": "0x2004000010 ", 1111 "MSRValue": "0x2004000010 ",
1060 "Counter": "0,1,2,3", 1112 "Counter": "0,1,2,3",
@@ -1067,6 +1119,7 @@
1067 "CounterHTOff": "0,1,2,3" 1119 "CounterHTOff": "0,1,2,3"
1068 }, 1120 },
1069 { 1121 {
1122 "PublicDescription": "tbd Offcore response can be programmed only with a specific pair of event select and counter MSR, and with specific event codes and predefine mask bit value in a dedicated MSR to specify attributes of the offcore transaction.",
1070 "EventCode": "0xB7, 0xBB", 1123 "EventCode": "0xB7, 0xBB",
1071 "MSRValue": "0x3f84000010 ", 1124 "MSRValue": "0x3f84000010 ",
1072 "Counter": "0,1,2,3", 1125 "Counter": "0,1,2,3",
@@ -1079,6 +1132,7 @@
1079 "CounterHTOff": "0,1,2,3" 1132 "CounterHTOff": "0,1,2,3"
1080 }, 1133 },
1081 { 1134 {
1135 "PublicDescription": "Counts prefetch (that bring data to L2) data reads that miss the L3 with no details on snoop-related information. Offcore response can be programmed only with a specific pair of event select and counter MSR, and with specific event codes and predefine mask bit value in a dedicated MSR to specify attributes of the offcore transaction.",
1082 "EventCode": "0xB7, 0xBB", 1136 "EventCode": "0xB7, 0xBB",
1083 "MSRValue": "0x00bc000010 ", 1137 "MSRValue": "0x00bc000010 ",
1084 "Counter": "0,1,2,3", 1138 "Counter": "0,1,2,3",
@@ -1091,6 +1145,7 @@
1091 "CounterHTOff": "0,1,2,3" 1145 "CounterHTOff": "0,1,2,3"
1092 }, 1146 },
1093 { 1147 {
1148 "PublicDescription": "tbd Offcore response can be programmed only with a specific pair of event select and counter MSR, and with specific event codes and predefine mask bit value in a dedicated MSR to specify attributes of the offcore transaction.",
1094 "EventCode": "0xB7, 0xBB", 1149 "EventCode": "0xB7, 0xBB",
1095 "MSRValue": "0x013c000010 ", 1150 "MSRValue": "0x013c000010 ",
1096 "Counter": "0,1,2,3", 1151 "Counter": "0,1,2,3",
@@ -1103,6 +1158,7 @@
1103 "CounterHTOff": "0,1,2,3" 1158 "CounterHTOff": "0,1,2,3"
1104 }, 1159 },
1105 { 1160 {
1161 "PublicDescription": "Counts prefetch (that bring data to L2) data reads that miss the L3 with a snoop miss response. Offcore response can be programmed only with a specific pair of event select and counter MSR, and with specific event codes and predefine mask bit value in a dedicated MSR to specify attributes of the offcore transaction.",
1106 "EventCode": "0xB7, 0xBB", 1162 "EventCode": "0xB7, 0xBB",
1107 "MSRValue": "0x023c000010 ", 1163 "MSRValue": "0x023c000010 ",
1108 "Counter": "0,1,2,3", 1164 "Counter": "0,1,2,3",
@@ -1115,6 +1171,7 @@
1115 "CounterHTOff": "0,1,2,3" 1171 "CounterHTOff": "0,1,2,3"
1116 }, 1172 },
1117 { 1173 {
1174 "PublicDescription": "tbd Offcore response can be programmed only with a specific pair of event select and counter MSR, and with specific event codes and predefine mask bit value in a dedicated MSR to specify attributes of the offcore transaction.",
1118 "EventCode": "0xB7, 0xBB", 1175 "EventCode": "0xB7, 0xBB",
1119 "MSRValue": "0x043c000010 ", 1176 "MSRValue": "0x043c000010 ",
1120 "Counter": "0,1,2,3", 1177 "Counter": "0,1,2,3",
@@ -1127,6 +1184,7 @@
1127 "CounterHTOff": "0,1,2,3" 1184 "CounterHTOff": "0,1,2,3"
1128 }, 1185 },
1129 { 1186 {
1187 "PublicDescription": "tbd Offcore response can be programmed only with a specific pair of event select and counter MSR, and with specific event codes and predefine mask bit value in a dedicated MSR to specify attributes of the offcore transaction.",
1130 "EventCode": "0xB7, 0xBB", 1188 "EventCode": "0xB7, 0xBB",
1131 "MSRValue": "0x2000020020 ", 1189 "MSRValue": "0x2000020020 ",
1132 "Counter": "0,1,2,3", 1190 "Counter": "0,1,2,3",
@@ -1139,6 +1197,7 @@
1139 "CounterHTOff": "0,1,2,3" 1197 "CounterHTOff": "0,1,2,3"
1140 }, 1198 },
1141 { 1199 {
1200 "PublicDescription": "Counts all prefetch (that bring data to L2) RFOs that hit in the L3 and the target was non-DRAM system address. Offcore response can be programmed only with a specific pair of event select and counter MSR, and with specific event codes and predefine mask bit value in a dedicated MSR to specify attributes of the offcore transaction.",
1142 "EventCode": "0xB7, 0xBB", 1201 "EventCode": "0xB7, 0xBB",
1143 "MSRValue": "0x20003c0020 ", 1202 "MSRValue": "0x20003c0020 ",
1144 "Counter": "0,1,2,3", 1203 "Counter": "0,1,2,3",
@@ -1151,6 +1210,7 @@
1151 "CounterHTOff": "0,1,2,3" 1210 "CounterHTOff": "0,1,2,3"
1152 }, 1211 },
1153 { 1212 {
1213 "PublicDescription": "tbd Offcore response can be programmed only with a specific pair of event select and counter MSR, and with specific event codes and predefine mask bit value in a dedicated MSR to specify attributes of the offcore transaction.",
1154 "EventCode": "0xB7, 0xBB", 1214 "EventCode": "0xB7, 0xBB",
1155 "MSRValue": "0x0084000020 ", 1215 "MSRValue": "0x0084000020 ",
1156 "Counter": "0,1,2,3", 1216 "Counter": "0,1,2,3",
@@ -1163,6 +1223,7 @@
1163 "CounterHTOff": "0,1,2,3" 1223 "CounterHTOff": "0,1,2,3"
1164 }, 1224 },
1165 { 1225 {
1226 "PublicDescription": "tbd Offcore response can be programmed only with a specific pair of event select and counter MSR, and with specific event codes and predefine mask bit value in a dedicated MSR to specify attributes of the offcore transaction.",
1166 "EventCode": "0xB7, 0xBB", 1227 "EventCode": "0xB7, 0xBB",
1167 "MSRValue": "0x0104000020 ", 1228 "MSRValue": "0x0104000020 ",
1168 "Counter": "0,1,2,3", 1229 "Counter": "0,1,2,3",
@@ -1175,6 +1236,7 @@
1175 "CounterHTOff": "0,1,2,3" 1236 "CounterHTOff": "0,1,2,3"
1176 }, 1237 },
1177 { 1238 {
1239 "PublicDescription": "tbd Offcore response can be programmed only with a specific pair of event select and counter MSR, and with specific event codes and predefine mask bit value in a dedicated MSR to specify attributes of the offcore transaction.",
1178 "EventCode": "0xB7, 0xBB", 1240 "EventCode": "0xB7, 0xBB",
1179 "MSRValue": "0x0204000020 ", 1241 "MSRValue": "0x0204000020 ",
1180 "Counter": "0,1,2,3", 1242 "Counter": "0,1,2,3",
@@ -1187,6 +1249,7 @@
1187 "CounterHTOff": "0,1,2,3" 1249 "CounterHTOff": "0,1,2,3"
1188 }, 1250 },
1189 { 1251 {
1252 "PublicDescription": "tbd Offcore response can be programmed only with a specific pair of event select and counter MSR, and with specific event codes and predefine mask bit value in a dedicated MSR to specify attributes of the offcore transaction.",
1190 "EventCode": "0xB7, 0xBB", 1253 "EventCode": "0xB7, 0xBB",
1191 "MSRValue": "0x0404000020 ", 1254 "MSRValue": "0x0404000020 ",
1192 "Counter": "0,1,2,3", 1255 "Counter": "0,1,2,3",
@@ -1199,6 +1262,7 @@
1199 "CounterHTOff": "0,1,2,3" 1262 "CounterHTOff": "0,1,2,3"
1200 }, 1263 },
1201 { 1264 {
1265 "PublicDescription": "tbd Offcore response can be programmed only with a specific pair of event select and counter MSR, and with specific event codes and predefine mask bit value in a dedicated MSR to specify attributes of the offcore transaction.",
1202 "EventCode": "0xB7, 0xBB", 1266 "EventCode": "0xB7, 0xBB",
1203 "MSRValue": "0x1004000020 ", 1267 "MSRValue": "0x1004000020 ",
1204 "Counter": "0,1,2,3", 1268 "Counter": "0,1,2,3",
@@ -1211,6 +1275,7 @@
1211 "CounterHTOff": "0,1,2,3" 1275 "CounterHTOff": "0,1,2,3"
1212 }, 1276 },
1213 { 1277 {
1278 "PublicDescription": "tbd Offcore response can be programmed only with a specific pair of event select and counter MSR, and with specific event codes and predefine mask bit value in a dedicated MSR to specify attributes of the offcore transaction.",
1214 "EventCode": "0xB7, 0xBB", 1279 "EventCode": "0xB7, 0xBB",
1215 "MSRValue": "0x2004000020 ", 1280 "MSRValue": "0x2004000020 ",
1216 "Counter": "0,1,2,3", 1281 "Counter": "0,1,2,3",
@@ -1223,6 +1288,7 @@
1223 "CounterHTOff": "0,1,2,3" 1288 "CounterHTOff": "0,1,2,3"
1224 }, 1289 },
1225 { 1290 {
1291 "PublicDescription": "tbd Offcore response can be programmed only with a specific pair of event select and counter MSR, and with specific event codes and predefine mask bit value in a dedicated MSR to specify attributes of the offcore transaction.",
1226 "EventCode": "0xB7, 0xBB", 1292 "EventCode": "0xB7, 0xBB",
1227 "MSRValue": "0x3f84000020 ", 1293 "MSRValue": "0x3f84000020 ",
1228 "Counter": "0,1,2,3", 1294 "Counter": "0,1,2,3",
@@ -1235,6 +1301,7 @@
1235 "CounterHTOff": "0,1,2,3" 1301 "CounterHTOff": "0,1,2,3"
1236 }, 1302 },
1237 { 1303 {
1304 "PublicDescription": "Counts all prefetch (that bring data to L2) RFOs that miss the L3 with no details on snoop-related information. Offcore response can be programmed only with a specific pair of event select and counter MSR, and with specific event codes and predefine mask bit value in a dedicated MSR to specify attributes of the offcore transaction.",
1238 "EventCode": "0xB7, 0xBB", 1305 "EventCode": "0xB7, 0xBB",
1239 "MSRValue": "0x00bc000020 ", 1306 "MSRValue": "0x00bc000020 ",
1240 "Counter": "0,1,2,3", 1307 "Counter": "0,1,2,3",
@@ -1247,6 +1314,7 @@
1247 "CounterHTOff": "0,1,2,3" 1314 "CounterHTOff": "0,1,2,3"
1248 }, 1315 },
1249 { 1316 {
1317 "PublicDescription": "tbd Offcore response can be programmed only with a specific pair of event select and counter MSR, and with specific event codes and predefine mask bit value in a dedicated MSR to specify attributes of the offcore transaction.",
1250 "EventCode": "0xB7, 0xBB", 1318 "EventCode": "0xB7, 0xBB",
1251 "MSRValue": "0x013c000020 ", 1319 "MSRValue": "0x013c000020 ",
1252 "Counter": "0,1,2,3", 1320 "Counter": "0,1,2,3",
@@ -1259,6 +1327,7 @@
1259 "CounterHTOff": "0,1,2,3" 1327 "CounterHTOff": "0,1,2,3"
1260 }, 1328 },
1261 { 1329 {
1330 "PublicDescription": "Counts all prefetch (that bring data to L2) RFOs that miss the L3 with a snoop miss response. Offcore response can be programmed only with a specific pair of event select and counter MSR, and with specific event codes and predefine mask bit value in a dedicated MSR to specify attributes of the offcore transaction.",
1262 "EventCode": "0xB7, 0xBB", 1331 "EventCode": "0xB7, 0xBB",
1263 "MSRValue": "0x023c000020 ", 1332 "MSRValue": "0x023c000020 ",
1264 "Counter": "0,1,2,3", 1333 "Counter": "0,1,2,3",
@@ -1271,6 +1340,7 @@
1271 "CounterHTOff": "0,1,2,3" 1340 "CounterHTOff": "0,1,2,3"
1272 }, 1341 },
1273 { 1342 {
1343 "PublicDescription": "tbd Offcore response can be programmed only with a specific pair of event select and counter MSR, and with specific event codes and predefine mask bit value in a dedicated MSR to specify attributes of the offcore transaction.",
1274 "EventCode": "0xB7, 0xBB", 1344 "EventCode": "0xB7, 0xBB",
1275 "MSRValue": "0x043c000020 ", 1345 "MSRValue": "0x043c000020 ",
1276 "Counter": "0,1,2,3", 1346 "Counter": "0,1,2,3",
@@ -1283,6 +1353,7 @@
1283 "CounterHTOff": "0,1,2,3" 1353 "CounterHTOff": "0,1,2,3"
1284 }, 1354 },
1285 { 1355 {
1356 "PublicDescription": "tbd Offcore response can be programmed only with a specific pair of event select and counter MSR, and with specific event codes and predefine mask bit value in a dedicated MSR to specify attributes of the offcore transaction.",
1286 "EventCode": "0xB7, 0xBB", 1357 "EventCode": "0xB7, 0xBB",
1287 "MSRValue": "0x2000020040 ", 1358 "MSRValue": "0x2000020040 ",
1288 "Counter": "0,1,2,3", 1359 "Counter": "0,1,2,3",
@@ -1295,6 +1366,7 @@
1295 "CounterHTOff": "0,1,2,3" 1366 "CounterHTOff": "0,1,2,3"
1296 }, 1367 },
1297 { 1368 {
1369 "PublicDescription": "Counts all prefetch (that bring data to LLC only) code reads that hit in the L3 and the target was non-DRAM system address. Offcore response can be programmed only with a specific pair of event select and counter MSR, and with specific event codes and predefine mask bit value in a dedicated MSR to specify attributes of the offcore transaction.",
1298 "EventCode": "0xB7, 0xBB", 1370 "EventCode": "0xB7, 0xBB",
1299 "MSRValue": "0x20003c0040 ", 1371 "MSRValue": "0x20003c0040 ",
1300 "Counter": "0,1,2,3", 1372 "Counter": "0,1,2,3",
@@ -1307,6 +1379,7 @@
1307 "CounterHTOff": "0,1,2,3" 1379 "CounterHTOff": "0,1,2,3"
1308 }, 1380 },
1309 { 1381 {
1382 "PublicDescription": "tbd Offcore response can be programmed only with a specific pair of event select and counter MSR, and with specific event codes and predefine mask bit value in a dedicated MSR to specify attributes of the offcore transaction.",
1310 "EventCode": "0xB7, 0xBB", 1383 "EventCode": "0xB7, 0xBB",
1311 "MSRValue": "0x0084000040 ", 1384 "MSRValue": "0x0084000040 ",
1312 "Counter": "0,1,2,3", 1385 "Counter": "0,1,2,3",
@@ -1319,6 +1392,7 @@
1319 "CounterHTOff": "0,1,2,3" 1392 "CounterHTOff": "0,1,2,3"
1320 }, 1393 },
1321 { 1394 {
1395 "PublicDescription": "tbd Offcore response can be programmed only with a specific pair of event select and counter MSR, and with specific event codes and predefine mask bit value in a dedicated MSR to specify attributes of the offcore transaction.",
1322 "EventCode": "0xB7, 0xBB", 1396 "EventCode": "0xB7, 0xBB",
1323 "MSRValue": "0x0104000040 ", 1397 "MSRValue": "0x0104000040 ",
1324 "Counter": "0,1,2,3", 1398 "Counter": "0,1,2,3",
@@ -1331,6 +1405,7 @@
1331 "CounterHTOff": "0,1,2,3" 1405 "CounterHTOff": "0,1,2,3"
1332 }, 1406 },
1333 { 1407 {
1408 "PublicDescription": "tbd Offcore response can be programmed only with a specific pair of event select and counter MSR, and with specific event codes and predefine mask bit value in a dedicated MSR to specify attributes of the offcore transaction.",
1334 "EventCode": "0xB7, 0xBB", 1409 "EventCode": "0xB7, 0xBB",
1335 "MSRValue": "0x0204000040 ", 1410 "MSRValue": "0x0204000040 ",
1336 "Counter": "0,1,2,3", 1411 "Counter": "0,1,2,3",
@@ -1343,6 +1418,7 @@
1343 "CounterHTOff": "0,1,2,3" 1418 "CounterHTOff": "0,1,2,3"
1344 }, 1419 },
1345 { 1420 {
1421 "PublicDescription": "tbd Offcore response can be programmed only with a specific pair of event select and counter MSR, and with specific event codes and predefine mask bit value in a dedicated MSR to specify attributes of the offcore transaction.",
1346 "EventCode": "0xB7, 0xBB", 1422 "EventCode": "0xB7, 0xBB",
1347 "MSRValue": "0x0404000040 ", 1423 "MSRValue": "0x0404000040 ",
1348 "Counter": "0,1,2,3", 1424 "Counter": "0,1,2,3",
@@ -1355,6 +1431,7 @@
1355 "CounterHTOff": "0,1,2,3" 1431 "CounterHTOff": "0,1,2,3"
1356 }, 1432 },
1357 { 1433 {
1434 "PublicDescription": "tbd Offcore response can be programmed only with a specific pair of event select and counter MSR, and with specific event codes and predefine mask bit value in a dedicated MSR to specify attributes of the offcore transaction.",
1358 "EventCode": "0xB7, 0xBB", 1435 "EventCode": "0xB7, 0xBB",
1359 "MSRValue": "0x1004000040 ", 1436 "MSRValue": "0x1004000040 ",
1360 "Counter": "0,1,2,3", 1437 "Counter": "0,1,2,3",
@@ -1367,6 +1444,7 @@
1367 "CounterHTOff": "0,1,2,3" 1444 "CounterHTOff": "0,1,2,3"
1368 }, 1445 },
1369 { 1446 {
1447 "PublicDescription": "tbd Offcore response can be programmed only with a specific pair of event select and counter MSR, and with specific event codes and predefine mask bit value in a dedicated MSR to specify attributes of the offcore transaction.",
1370 "EventCode": "0xB7, 0xBB", 1448 "EventCode": "0xB7, 0xBB",
1371 "MSRValue": "0x2004000040 ", 1449 "MSRValue": "0x2004000040 ",
1372 "Counter": "0,1,2,3", 1450 "Counter": "0,1,2,3",
@@ -1379,6 +1457,7 @@
1379 "CounterHTOff": "0,1,2,3" 1457 "CounterHTOff": "0,1,2,3"
1380 }, 1458 },
1381 { 1459 {
1460 "PublicDescription": "tbd Offcore response can be programmed only with a specific pair of event select and counter MSR, and with specific event codes and predefine mask bit value in a dedicated MSR to specify attributes of the offcore transaction.",
1382 "EventCode": "0xB7, 0xBB", 1461 "EventCode": "0xB7, 0xBB",
1383 "MSRValue": "0x3f84000040 ", 1462 "MSRValue": "0x3f84000040 ",
1384 "Counter": "0,1,2,3", 1463 "Counter": "0,1,2,3",
@@ -1391,6 +1470,7 @@
1391 "CounterHTOff": "0,1,2,3" 1470 "CounterHTOff": "0,1,2,3"
1392 }, 1471 },
1393 { 1472 {
1473 "PublicDescription": "Counts all prefetch (that bring data to LLC only) code reads that miss the L3 with no details on snoop-related information. Offcore response can be programmed only with a specific pair of event select and counter MSR, and with specific event codes and predefine mask bit value in a dedicated MSR to specify attributes of the offcore transaction.",
1394 "EventCode": "0xB7, 0xBB", 1474 "EventCode": "0xB7, 0xBB",
1395 "MSRValue": "0x00bc000040 ", 1475 "MSRValue": "0x00bc000040 ",
1396 "Counter": "0,1,2,3", 1476 "Counter": "0,1,2,3",
@@ -1403,6 +1483,7 @@
1403 "CounterHTOff": "0,1,2,3" 1483 "CounterHTOff": "0,1,2,3"
1404 }, 1484 },
1405 { 1485 {
1486 "PublicDescription": "tbd Offcore response can be programmed only with a specific pair of event select and counter MSR, and with specific event codes and predefine mask bit value in a dedicated MSR to specify attributes of the offcore transaction.",
1406 "EventCode": "0xB7, 0xBB", 1487 "EventCode": "0xB7, 0xBB",
1407 "MSRValue": "0x013c000040 ", 1488 "MSRValue": "0x013c000040 ",
1408 "Counter": "0,1,2,3", 1489 "Counter": "0,1,2,3",
@@ -1415,6 +1496,7 @@
1415 "CounterHTOff": "0,1,2,3" 1496 "CounterHTOff": "0,1,2,3"
1416 }, 1497 },
1417 { 1498 {
1499 "PublicDescription": "Counts all prefetch (that bring data to LLC only) code reads that miss the L3 with a snoop miss response. Offcore response can be programmed only with a specific pair of event select and counter MSR, and with specific event codes and predefine mask bit value in a dedicated MSR to specify attributes of the offcore transaction.",
1418 "EventCode": "0xB7, 0xBB", 1500 "EventCode": "0xB7, 0xBB",
1419 "MSRValue": "0x023c000040 ", 1501 "MSRValue": "0x023c000040 ",
1420 "Counter": "0,1,2,3", 1502 "Counter": "0,1,2,3",
@@ -1427,6 +1509,7 @@
1427 "CounterHTOff": "0,1,2,3" 1509 "CounterHTOff": "0,1,2,3"
1428 }, 1510 },
1429 { 1511 {
1512 "PublicDescription": "tbd Offcore response can be programmed only with a specific pair of event select and counter MSR, and with specific event codes and predefine mask bit value in a dedicated MSR to specify attributes of the offcore transaction.",
1430 "EventCode": "0xB7, 0xBB", 1513 "EventCode": "0xB7, 0xBB",
1431 "MSRValue": "0x043c000040 ", 1514 "MSRValue": "0x043c000040 ",
1432 "Counter": "0,1,2,3", 1515 "Counter": "0,1,2,3",
@@ -1439,6 +1522,7 @@
1439 "CounterHTOff": "0,1,2,3" 1522 "CounterHTOff": "0,1,2,3"
1440 }, 1523 },
1441 { 1524 {
1525 "PublicDescription": "tbd Offcore response can be programmed only with a specific pair of event select and counter MSR, and with specific event codes and predefine mask bit value in a dedicated MSR to specify attributes of the offcore transaction.",
1442 "EventCode": "0xB7, 0xBB", 1526 "EventCode": "0xB7, 0xBB",
1443 "MSRValue": "0x2000020080 ", 1527 "MSRValue": "0x2000020080 ",
1444 "Counter": "0,1,2,3", 1528 "Counter": "0,1,2,3",
@@ -1451,6 +1535,7 @@
1451 "CounterHTOff": "0,1,2,3" 1535 "CounterHTOff": "0,1,2,3"
1452 }, 1536 },
1453 { 1537 {
1538 "PublicDescription": "Counts all prefetch (that bring data to LLC only) data reads that hit in the L3 and the target was non-DRAM system address. Offcore response can be programmed only with a specific pair of event select and counter MSR, and with specific event codes and predefine mask bit value in a dedicated MSR to specify attributes of the offcore transaction.",
1454 "EventCode": "0xB7, 0xBB", 1539 "EventCode": "0xB7, 0xBB",
1455 "MSRValue": "0x20003c0080 ", 1540 "MSRValue": "0x20003c0080 ",
1456 "Counter": "0,1,2,3", 1541 "Counter": "0,1,2,3",
@@ -1463,6 +1548,7 @@
1463 "CounterHTOff": "0,1,2,3" 1548 "CounterHTOff": "0,1,2,3"
1464 }, 1549 },
1465 { 1550 {
1551 "PublicDescription": "tbd Offcore response can be programmed only with a specific pair of event select and counter MSR, and with specific event codes and predefine mask bit value in a dedicated MSR to specify attributes of the offcore transaction.",
1466 "EventCode": "0xB7, 0xBB", 1552 "EventCode": "0xB7, 0xBB",
1467 "MSRValue": "0x0084000080 ", 1553 "MSRValue": "0x0084000080 ",
1468 "Counter": "0,1,2,3", 1554 "Counter": "0,1,2,3",
@@ -1475,6 +1561,7 @@
1475 "CounterHTOff": "0,1,2,3" 1561 "CounterHTOff": "0,1,2,3"
1476 }, 1562 },
1477 { 1563 {
1564 "PublicDescription": "tbd Offcore response can be programmed only with a specific pair of event select and counter MSR, and with specific event codes and predefine mask bit value in a dedicated MSR to specify attributes of the offcore transaction.",
1478 "EventCode": "0xB7, 0xBB", 1565 "EventCode": "0xB7, 0xBB",
1479 "MSRValue": "0x0104000080 ", 1566 "MSRValue": "0x0104000080 ",
1480 "Counter": "0,1,2,3", 1567 "Counter": "0,1,2,3",
@@ -1487,6 +1574,7 @@
1487 "CounterHTOff": "0,1,2,3" 1574 "CounterHTOff": "0,1,2,3"
1488 }, 1575 },
1489 { 1576 {
1577 "PublicDescription": "tbd Offcore response can be programmed only with a specific pair of event select and counter MSR, and with specific event codes and predefine mask bit value in a dedicated MSR to specify attributes of the offcore transaction.",
1490 "EventCode": "0xB7, 0xBB", 1578 "EventCode": "0xB7, 0xBB",
1491 "MSRValue": "0x0204000080 ", 1579 "MSRValue": "0x0204000080 ",
1492 "Counter": "0,1,2,3", 1580 "Counter": "0,1,2,3",
@@ -1499,6 +1587,7 @@
1499 "CounterHTOff": "0,1,2,3" 1587 "CounterHTOff": "0,1,2,3"
1500 }, 1588 },
1501 { 1589 {
1590 "PublicDescription": "tbd Offcore response can be programmed only with a specific pair of event select and counter MSR, and with specific event codes and predefine mask bit value in a dedicated MSR to specify attributes of the offcore transaction.",
1502 "EventCode": "0xB7, 0xBB", 1591 "EventCode": "0xB7, 0xBB",
1503 "MSRValue": "0x0404000080 ", 1592 "MSRValue": "0x0404000080 ",
1504 "Counter": "0,1,2,3", 1593 "Counter": "0,1,2,3",
@@ -1511,6 +1600,7 @@
1511 "CounterHTOff": "0,1,2,3" 1600 "CounterHTOff": "0,1,2,3"
1512 }, 1601 },
1513 { 1602 {
1603 "PublicDescription": "tbd Offcore response can be programmed only with a specific pair of event select and counter MSR, and with specific event codes and predefine mask bit value in a dedicated MSR to specify attributes of the offcore transaction.",
1514 "EventCode": "0xB7, 0xBB", 1604 "EventCode": "0xB7, 0xBB",
1515 "MSRValue": "0x1004000080 ", 1605 "MSRValue": "0x1004000080 ",
1516 "Counter": "0,1,2,3", 1606 "Counter": "0,1,2,3",
@@ -1523,6 +1613,7 @@
1523 "CounterHTOff": "0,1,2,3" 1613 "CounterHTOff": "0,1,2,3"
1524 }, 1614 },
1525 { 1615 {
1616 "PublicDescription": "tbd Offcore response can be programmed only with a specific pair of event select and counter MSR, and with specific event codes and predefine mask bit value in a dedicated MSR to specify attributes of the offcore transaction.",
1526 "EventCode": "0xB7, 0xBB", 1617 "EventCode": "0xB7, 0xBB",
1527 "MSRValue": "0x2004000080 ", 1618 "MSRValue": "0x2004000080 ",
1528 "Counter": "0,1,2,3", 1619 "Counter": "0,1,2,3",
@@ -1535,6 +1626,7 @@
1535 "CounterHTOff": "0,1,2,3" 1626 "CounterHTOff": "0,1,2,3"
1536 }, 1627 },
1537 { 1628 {
1629 "PublicDescription": "tbd Offcore response can be programmed only with a specific pair of event select and counter MSR, and with specific event codes and predefine mask bit value in a dedicated MSR to specify attributes of the offcore transaction.",
1538 "EventCode": "0xB7, 0xBB", 1630 "EventCode": "0xB7, 0xBB",
1539 "MSRValue": "0x3f84000080 ", 1631 "MSRValue": "0x3f84000080 ",
1540 "Counter": "0,1,2,3", 1632 "Counter": "0,1,2,3",
@@ -1547,6 +1639,7 @@
1547 "CounterHTOff": "0,1,2,3" 1639 "CounterHTOff": "0,1,2,3"
1548 }, 1640 },
1549 { 1641 {
1642 "PublicDescription": "Counts all prefetch (that bring data to LLC only) data reads that miss the L3 with no details on snoop-related information. Offcore response can be programmed only with a specific pair of event select and counter MSR, and with specific event codes and predefine mask bit value in a dedicated MSR to specify attributes of the offcore transaction.",
1550 "EventCode": "0xB7, 0xBB", 1643 "EventCode": "0xB7, 0xBB",
1551 "MSRValue": "0x00bc000080 ", 1644 "MSRValue": "0x00bc000080 ",
1552 "Counter": "0,1,2,3", 1645 "Counter": "0,1,2,3",
@@ -1559,6 +1652,7 @@
1559 "CounterHTOff": "0,1,2,3" 1652 "CounterHTOff": "0,1,2,3"
1560 }, 1653 },
1561 { 1654 {
1655 "PublicDescription": "tbd Offcore response can be programmed only with a specific pair of event select and counter MSR, and with specific event codes and predefine mask bit value in a dedicated MSR to specify attributes of the offcore transaction.",
1562 "EventCode": "0xB7, 0xBB", 1656 "EventCode": "0xB7, 0xBB",
1563 "MSRValue": "0x013c000080 ", 1657 "MSRValue": "0x013c000080 ",
1564 "Counter": "0,1,2,3", 1658 "Counter": "0,1,2,3",
@@ -1571,6 +1665,7 @@
1571 "CounterHTOff": "0,1,2,3" 1665 "CounterHTOff": "0,1,2,3"
1572 }, 1666 },
1573 { 1667 {
1668 "PublicDescription": "Counts all prefetch (that bring data to LLC only) data reads that miss the L3 with a snoop miss response. Offcore response can be programmed only with a specific pair of event select and counter MSR, and with specific event codes and predefine mask bit value in a dedicated MSR to specify attributes of the offcore transaction.",
1574 "EventCode": "0xB7, 0xBB", 1669 "EventCode": "0xB7, 0xBB",
1575 "MSRValue": "0x023c000080 ", 1670 "MSRValue": "0x023c000080 ",
1576 "Counter": "0,1,2,3", 1671 "Counter": "0,1,2,3",
@@ -1583,6 +1678,7 @@
1583 "CounterHTOff": "0,1,2,3" 1678 "CounterHTOff": "0,1,2,3"
1584 }, 1679 },
1585 { 1680 {
1681 "PublicDescription": "tbd Offcore response can be programmed only with a specific pair of event select and counter MSR, and with specific event codes and predefine mask bit value in a dedicated MSR to specify attributes of the offcore transaction.",
1586 "EventCode": "0xB7, 0xBB", 1682 "EventCode": "0xB7, 0xBB",
1587 "MSRValue": "0x043c000080 ", 1683 "MSRValue": "0x043c000080 ",
1588 "Counter": "0,1,2,3", 1684 "Counter": "0,1,2,3",
@@ -1595,6 +1691,7 @@
1595 "CounterHTOff": "0,1,2,3" 1691 "CounterHTOff": "0,1,2,3"
1596 }, 1692 },
1597 { 1693 {
1694 "PublicDescription": "tbd Offcore response can be programmed only with a specific pair of event select and counter MSR, and with specific event codes and predefine mask bit value in a dedicated MSR to specify attributes of the offcore transaction.",
1598 "EventCode": "0xB7, 0xBB", 1695 "EventCode": "0xB7, 0xBB",
1599 "MSRValue": "0x2000020100 ", 1696 "MSRValue": "0x2000020100 ",
1600 "Counter": "0,1,2,3", 1697 "Counter": "0,1,2,3",
@@ -1607,6 +1704,7 @@
1607 "CounterHTOff": "0,1,2,3" 1704 "CounterHTOff": "0,1,2,3"
1608 }, 1705 },
1609 { 1706 {
1707 "PublicDescription": "Counts all prefetch (that bring data to LLC only) RFOs that hit in the L3 and the target was non-DRAM system address. Offcore response can be programmed only with a specific pair of event select and counter MSR, and with specific event codes and predefine mask bit value in a dedicated MSR to specify attributes of the offcore transaction.",
1610 "EventCode": "0xB7, 0xBB", 1708 "EventCode": "0xB7, 0xBB",
1611 "MSRValue": "0x20003c0100 ", 1709 "MSRValue": "0x20003c0100 ",
1612 "Counter": "0,1,2,3", 1710 "Counter": "0,1,2,3",
@@ -1619,6 +1717,7 @@
1619 "CounterHTOff": "0,1,2,3" 1717 "CounterHTOff": "0,1,2,3"
1620 }, 1718 },
1621 { 1719 {
1720 "PublicDescription": "tbd Offcore response can be programmed only with a specific pair of event select and counter MSR, and with specific event codes and predefine mask bit value in a dedicated MSR to specify attributes of the offcore transaction.",
1622 "EventCode": "0xB7, 0xBB", 1721 "EventCode": "0xB7, 0xBB",
1623 "MSRValue": "0x0084000100 ", 1722 "MSRValue": "0x0084000100 ",
1624 "Counter": "0,1,2,3", 1723 "Counter": "0,1,2,3",
@@ -1631,6 +1730,7 @@
1631 "CounterHTOff": "0,1,2,3" 1730 "CounterHTOff": "0,1,2,3"
1632 }, 1731 },
1633 { 1732 {
1733 "PublicDescription": "tbd Offcore response can be programmed only with a specific pair of event select and counter MSR, and with specific event codes and predefine mask bit value in a dedicated MSR to specify attributes of the offcore transaction.",
1634 "EventCode": "0xB7, 0xBB", 1734 "EventCode": "0xB7, 0xBB",
1635 "MSRValue": "0x0104000100 ", 1735 "MSRValue": "0x0104000100 ",
1636 "Counter": "0,1,2,3", 1736 "Counter": "0,1,2,3",
@@ -1643,6 +1743,7 @@
1643 "CounterHTOff": "0,1,2,3" 1743 "CounterHTOff": "0,1,2,3"
1644 }, 1744 },
1645 { 1745 {
1746 "PublicDescription": "tbd Offcore response can be programmed only with a specific pair of event select and counter MSR, and with specific event codes and predefine mask bit value in a dedicated MSR to specify attributes of the offcore transaction.",
1646 "EventCode": "0xB7, 0xBB", 1747 "EventCode": "0xB7, 0xBB",
1647 "MSRValue": "0x0204000100 ", 1748 "MSRValue": "0x0204000100 ",
1648 "Counter": "0,1,2,3", 1749 "Counter": "0,1,2,3",
@@ -1655,6 +1756,7 @@
1655 "CounterHTOff": "0,1,2,3" 1756 "CounterHTOff": "0,1,2,3"
1656 }, 1757 },
1657 { 1758 {
1759 "PublicDescription": "tbd Offcore response can be programmed only with a specific pair of event select and counter MSR, and with specific event codes and predefine mask bit value in a dedicated MSR to specify attributes of the offcore transaction.",
1658 "EventCode": "0xB7, 0xBB", 1760 "EventCode": "0xB7, 0xBB",
1659 "MSRValue": "0x0404000100 ", 1761 "MSRValue": "0x0404000100 ",
1660 "Counter": "0,1,2,3", 1762 "Counter": "0,1,2,3",
@@ -1667,6 +1769,7 @@
1667 "CounterHTOff": "0,1,2,3" 1769 "CounterHTOff": "0,1,2,3"
1668 }, 1770 },
1669 { 1771 {
1772 "PublicDescription": "tbd Offcore response can be programmed only with a specific pair of event select and counter MSR, and with specific event codes and predefine mask bit value in a dedicated MSR to specify attributes of the offcore transaction.",
1670 "EventCode": "0xB7, 0xBB", 1773 "EventCode": "0xB7, 0xBB",
1671 "MSRValue": "0x1004000100 ", 1774 "MSRValue": "0x1004000100 ",
1672 "Counter": "0,1,2,3", 1775 "Counter": "0,1,2,3",
@@ -1679,6 +1782,7 @@
1679 "CounterHTOff": "0,1,2,3" 1782 "CounterHTOff": "0,1,2,3"
1680 }, 1783 },
1681 { 1784 {
1785 "PublicDescription": "tbd Offcore response can be programmed only with a specific pair of event select and counter MSR, and with specific event codes and predefine mask bit value in a dedicated MSR to specify attributes of the offcore transaction.",
1682 "EventCode": "0xB7, 0xBB", 1786 "EventCode": "0xB7, 0xBB",
1683 "MSRValue": "0x2004000100 ", 1787 "MSRValue": "0x2004000100 ",
1684 "Counter": "0,1,2,3", 1788 "Counter": "0,1,2,3",
@@ -1691,6 +1795,7 @@
1691 "CounterHTOff": "0,1,2,3" 1795 "CounterHTOff": "0,1,2,3"
1692 }, 1796 },
1693 { 1797 {
1798 "PublicDescription": "tbd Offcore response can be programmed only with a specific pair of event select and counter MSR, and with specific event codes and predefine mask bit value in a dedicated MSR to specify attributes of the offcore transaction.",
1694 "EventCode": "0xB7, 0xBB", 1799 "EventCode": "0xB7, 0xBB",
1695 "MSRValue": "0x3f84000100 ", 1800 "MSRValue": "0x3f84000100 ",
1696 "Counter": "0,1,2,3", 1801 "Counter": "0,1,2,3",
@@ -1703,6 +1808,7 @@
1703 "CounterHTOff": "0,1,2,3" 1808 "CounterHTOff": "0,1,2,3"
1704 }, 1809 },
1705 { 1810 {
1811 "PublicDescription": "Counts all prefetch (that bring data to LLC only) RFOs that miss the L3 with no details on snoop-related information. Offcore response can be programmed only with a specific pair of event select and counter MSR, and with specific event codes and predefine mask bit value in a dedicated MSR to specify attributes of the offcore transaction.",
1706 "EventCode": "0xB7, 0xBB", 1812 "EventCode": "0xB7, 0xBB",
1707 "MSRValue": "0x00bc000100 ", 1813 "MSRValue": "0x00bc000100 ",
1708 "Counter": "0,1,2,3", 1814 "Counter": "0,1,2,3",
@@ -1715,6 +1821,7 @@
1715 "CounterHTOff": "0,1,2,3" 1821 "CounterHTOff": "0,1,2,3"
1716 }, 1822 },
1717 { 1823 {
1824 "PublicDescription": "tbd Offcore response can be programmed only with a specific pair of event select and counter MSR, and with specific event codes and predefine mask bit value in a dedicated MSR to specify attributes of the offcore transaction.",
1718 "EventCode": "0xB7, 0xBB", 1825 "EventCode": "0xB7, 0xBB",
1719 "MSRValue": "0x013c000100 ", 1826 "MSRValue": "0x013c000100 ",
1720 "Counter": "0,1,2,3", 1827 "Counter": "0,1,2,3",
@@ -1727,6 +1834,7 @@
1727 "CounterHTOff": "0,1,2,3" 1834 "CounterHTOff": "0,1,2,3"
1728 }, 1835 },
1729 { 1836 {
1837 "PublicDescription": "Counts all prefetch (that bring data to LLC only) RFOs that miss the L3 with a snoop miss response. Offcore response can be programmed only with a specific pair of event select and counter MSR, and with specific event codes and predefine mask bit value in a dedicated MSR to specify attributes of the offcore transaction.",
1730 "EventCode": "0xB7, 0xBB", 1838 "EventCode": "0xB7, 0xBB",
1731 "MSRValue": "0x023c000100 ", 1839 "MSRValue": "0x023c000100 ",
1732 "Counter": "0,1,2,3", 1840 "Counter": "0,1,2,3",
@@ -1739,6 +1847,7 @@
1739 "CounterHTOff": "0,1,2,3" 1847 "CounterHTOff": "0,1,2,3"
1740 }, 1848 },
1741 { 1849 {
1850 "PublicDescription": "tbd Offcore response can be programmed only with a specific pair of event select and counter MSR, and with specific event codes and predefine mask bit value in a dedicated MSR to specify attributes of the offcore transaction.",
1742 "EventCode": "0xB7, 0xBB", 1851 "EventCode": "0xB7, 0xBB",
1743 "MSRValue": "0x043c000100 ", 1852 "MSRValue": "0x043c000100 ",
1744 "Counter": "0,1,2,3", 1853 "Counter": "0,1,2,3",
@@ -1751,6 +1860,7 @@
1751 "CounterHTOff": "0,1,2,3" 1860 "CounterHTOff": "0,1,2,3"
1752 }, 1861 },
1753 { 1862 {
1863 "PublicDescription": "tbd Offcore response can be programmed only with a specific pair of event select and counter MSR, and with specific event codes and predefine mask bit value in a dedicated MSR to specify attributes of the offcore transaction.",
1754 "EventCode": "0xB7, 0xBB", 1864 "EventCode": "0xB7, 0xBB",
1755 "MSRValue": "0x2000020200 ", 1865 "MSRValue": "0x2000020200 ",
1756 "Counter": "0,1,2,3", 1866 "Counter": "0,1,2,3",
@@ -1763,6 +1873,7 @@
1763 "CounterHTOff": "0,1,2,3" 1873 "CounterHTOff": "0,1,2,3"
1764 }, 1874 },
1765 { 1875 {
1876 "PublicDescription": "Counts prefetch (that bring data to LLC only) code reads that hit in the L3 and the target was non-DRAM system address. Offcore response can be programmed only with a specific pair of event select and counter MSR, and with specific event codes and predefine mask bit value in a dedicated MSR to specify attributes of the offcore transaction.",
1766 "EventCode": "0xB7, 0xBB", 1877 "EventCode": "0xB7, 0xBB",
1767 "MSRValue": "0x20003c0200 ", 1878 "MSRValue": "0x20003c0200 ",
1768 "Counter": "0,1,2,3", 1879 "Counter": "0,1,2,3",
@@ -1775,6 +1886,7 @@
1775 "CounterHTOff": "0,1,2,3" 1886 "CounterHTOff": "0,1,2,3"
1776 }, 1887 },
1777 { 1888 {
1889 "PublicDescription": "tbd Offcore response can be programmed only with a specific pair of event select and counter MSR, and with specific event codes and predefine mask bit value in a dedicated MSR to specify attributes of the offcore transaction.",
1778 "EventCode": "0xB7, 0xBB", 1890 "EventCode": "0xB7, 0xBB",
1779 "MSRValue": "0x0084000200 ", 1891 "MSRValue": "0x0084000200 ",
1780 "Counter": "0,1,2,3", 1892 "Counter": "0,1,2,3",
@@ -1787,6 +1899,7 @@
1787 "CounterHTOff": "0,1,2,3" 1899 "CounterHTOff": "0,1,2,3"
1788 }, 1900 },
1789 { 1901 {
1902 "PublicDescription": "tbd Offcore response can be programmed only with a specific pair of event select and counter MSR, and with specific event codes and predefine mask bit value in a dedicated MSR to specify attributes of the offcore transaction.",
1790 "EventCode": "0xB7, 0xBB", 1903 "EventCode": "0xB7, 0xBB",
1791 "MSRValue": "0x0104000200 ", 1904 "MSRValue": "0x0104000200 ",
1792 "Counter": "0,1,2,3", 1905 "Counter": "0,1,2,3",
@@ -1799,6 +1912,7 @@
1799 "CounterHTOff": "0,1,2,3" 1912 "CounterHTOff": "0,1,2,3"
1800 }, 1913 },
1801 { 1914 {
1915 "PublicDescription": "tbd Offcore response can be programmed only with a specific pair of event select and counter MSR, and with specific event codes and predefine mask bit value in a dedicated MSR to specify attributes of the offcore transaction.",
1802 "EventCode": "0xB7, 0xBB", 1916 "EventCode": "0xB7, 0xBB",
1803 "MSRValue": "0x0204000200 ", 1917 "MSRValue": "0x0204000200 ",
1804 "Counter": "0,1,2,3", 1918 "Counter": "0,1,2,3",
@@ -1811,6 +1925,7 @@
1811 "CounterHTOff": "0,1,2,3" 1925 "CounterHTOff": "0,1,2,3"
1812 }, 1926 },
1813 { 1927 {
1928 "PublicDescription": "tbd Offcore response can be programmed only with a specific pair of event select and counter MSR, and with specific event codes and predefine mask bit value in a dedicated MSR to specify attributes of the offcore transaction.",
1814 "EventCode": "0xB7, 0xBB", 1929 "EventCode": "0xB7, 0xBB",
1815 "MSRValue": "0x0404000200 ", 1930 "MSRValue": "0x0404000200 ",
1816 "Counter": "0,1,2,3", 1931 "Counter": "0,1,2,3",
@@ -1823,6 +1938,7 @@
1823 "CounterHTOff": "0,1,2,3" 1938 "CounterHTOff": "0,1,2,3"
1824 }, 1939 },
1825 { 1940 {
1941 "PublicDescription": "tbd Offcore response can be programmed only with a specific pair of event select and counter MSR, and with specific event codes and predefine mask bit value in a dedicated MSR to specify attributes of the offcore transaction.",
1826 "EventCode": "0xB7, 0xBB", 1942 "EventCode": "0xB7, 0xBB",
1827 "MSRValue": "0x1004000200 ", 1943 "MSRValue": "0x1004000200 ",
1828 "Counter": "0,1,2,3", 1944 "Counter": "0,1,2,3",
@@ -1835,6 +1951,7 @@
1835 "CounterHTOff": "0,1,2,3" 1951 "CounterHTOff": "0,1,2,3"
1836 }, 1952 },
1837 { 1953 {
1954 "PublicDescription": "tbd Offcore response can be programmed only with a specific pair of event select and counter MSR, and with specific event codes and predefine mask bit value in a dedicated MSR to specify attributes of the offcore transaction.",
1838 "EventCode": "0xB7, 0xBB", 1955 "EventCode": "0xB7, 0xBB",
1839 "MSRValue": "0x2004000200 ", 1956 "MSRValue": "0x2004000200 ",
1840 "Counter": "0,1,2,3", 1957 "Counter": "0,1,2,3",
@@ -1847,6 +1964,7 @@
1847 "CounterHTOff": "0,1,2,3" 1964 "CounterHTOff": "0,1,2,3"
1848 }, 1965 },
1849 { 1966 {
1967 "PublicDescription": "tbd Offcore response can be programmed only with a specific pair of event select and counter MSR, and with specific event codes and predefine mask bit value in a dedicated MSR to specify attributes of the offcore transaction.",
1850 "EventCode": "0xB7, 0xBB", 1968 "EventCode": "0xB7, 0xBB",
1851 "MSRValue": "0x3f84000200 ", 1969 "MSRValue": "0x3f84000200 ",
1852 "Counter": "0,1,2,3", 1970 "Counter": "0,1,2,3",
@@ -1859,6 +1977,7 @@
1859 "CounterHTOff": "0,1,2,3" 1977 "CounterHTOff": "0,1,2,3"
1860 }, 1978 },
1861 { 1979 {
1980 "PublicDescription": "Counts prefetch (that bring data to LLC only) code reads that miss the L3 with no details on snoop-related information. Offcore response can be programmed only with a specific pair of event select and counter MSR, and with specific event codes and predefine mask bit value in a dedicated MSR to specify attributes of the offcore transaction.",
1862 "EventCode": "0xB7, 0xBB", 1981 "EventCode": "0xB7, 0xBB",
1863 "MSRValue": "0x00bc000200 ", 1982 "MSRValue": "0x00bc000200 ",
1864 "Counter": "0,1,2,3", 1983 "Counter": "0,1,2,3",
@@ -1871,6 +1990,7 @@
1871 "CounterHTOff": "0,1,2,3" 1990 "CounterHTOff": "0,1,2,3"
1872 }, 1991 },
1873 { 1992 {
1993 "PublicDescription": "tbd Offcore response can be programmed only with a specific pair of event select and counter MSR, and with specific event codes and predefine mask bit value in a dedicated MSR to specify attributes of the offcore transaction.",
1874 "EventCode": "0xB7, 0xBB", 1994 "EventCode": "0xB7, 0xBB",
1875 "MSRValue": "0x013c000200 ", 1995 "MSRValue": "0x013c000200 ",
1876 "Counter": "0,1,2,3", 1996 "Counter": "0,1,2,3",
@@ -1883,6 +2003,7 @@
1883 "CounterHTOff": "0,1,2,3" 2003 "CounterHTOff": "0,1,2,3"
1884 }, 2004 },
1885 { 2005 {
2006 "PublicDescription": "Counts prefetch (that bring data to LLC only) code reads that miss the L3 with a snoop miss response. Offcore response can be programmed only with a specific pair of event select and counter MSR, and with specific event codes and predefine mask bit value in a dedicated MSR to specify attributes of the offcore transaction.",
1886 "EventCode": "0xB7, 0xBB", 2007 "EventCode": "0xB7, 0xBB",
1887 "MSRValue": "0x023c000200 ", 2008 "MSRValue": "0x023c000200 ",
1888 "Counter": "0,1,2,3", 2009 "Counter": "0,1,2,3",
@@ -1895,6 +2016,7 @@
1895 "CounterHTOff": "0,1,2,3" 2016 "CounterHTOff": "0,1,2,3"
1896 }, 2017 },
1897 { 2018 {
2019 "PublicDescription": "tbd Offcore response can be programmed only with a specific pair of event select and counter MSR, and with specific event codes and predefine mask bit value in a dedicated MSR to specify attributes of the offcore transaction.",
1898 "EventCode": "0xB7, 0xBB", 2020 "EventCode": "0xB7, 0xBB",
1899 "MSRValue": "0x043c000200 ", 2021 "MSRValue": "0x043c000200 ",
1900 "Counter": "0,1,2,3", 2022 "Counter": "0,1,2,3",
@@ -1907,6 +2029,7 @@
1907 "CounterHTOff": "0,1,2,3" 2029 "CounterHTOff": "0,1,2,3"
1908 }, 2030 },
1909 { 2031 {
2032 "PublicDescription": "tbd Offcore response can be programmed only with a specific pair of event select and counter MSR, and with specific event codes and predefine mask bit value in a dedicated MSR to specify attributes of the offcore transaction.",
1910 "EventCode": "0xB7, 0xBB", 2033 "EventCode": "0xB7, 0xBB",
1911 "MSRValue": "0x2000028000 ", 2034 "MSRValue": "0x2000028000 ",
1912 "Counter": "0,1,2,3", 2035 "Counter": "0,1,2,3",
@@ -1919,6 +2042,7 @@
1919 "CounterHTOff": "0,1,2,3" 2042 "CounterHTOff": "0,1,2,3"
1920 }, 2043 },
1921 { 2044 {
2045 "PublicDescription": "Counts any other requests that hit in the L3 and the target was non-DRAM system address. Offcore response can be programmed only with a specific pair of event select and counter MSR, and with specific event codes and predefine mask bit value in a dedicated MSR to specify attributes of the offcore transaction.",
1922 "EventCode": "0xB7, 0xBB", 2046 "EventCode": "0xB7, 0xBB",
1923 "MSRValue": "0x20003c8000 ", 2047 "MSRValue": "0x20003c8000 ",
1924 "Counter": "0,1,2,3", 2048 "Counter": "0,1,2,3",
@@ -1931,6 +2055,7 @@
1931 "CounterHTOff": "0,1,2,3" 2055 "CounterHTOff": "0,1,2,3"
1932 }, 2056 },
1933 { 2057 {
2058 "PublicDescription": "tbd Offcore response can be programmed only with a specific pair of event select and counter MSR, and with specific event codes and predefine mask bit value in a dedicated MSR to specify attributes of the offcore transaction.",
1934 "EventCode": "0xB7, 0xBB", 2059 "EventCode": "0xB7, 0xBB",
1935 "MSRValue": "0x0084008000 ", 2060 "MSRValue": "0x0084008000 ",
1936 "Counter": "0,1,2,3", 2061 "Counter": "0,1,2,3",
@@ -1943,6 +2068,7 @@
1943 "CounterHTOff": "0,1,2,3" 2068 "CounterHTOff": "0,1,2,3"
1944 }, 2069 },
1945 { 2070 {
2071 "PublicDescription": "tbd Offcore response can be programmed only with a specific pair of event select and counter MSR, and with specific event codes and predefine mask bit value in a dedicated MSR to specify attributes of the offcore transaction.",
1946 "EventCode": "0xB7, 0xBB", 2072 "EventCode": "0xB7, 0xBB",
1947 "MSRValue": "0x0104008000 ", 2073 "MSRValue": "0x0104008000 ",
1948 "Counter": "0,1,2,3", 2074 "Counter": "0,1,2,3",
@@ -1955,6 +2081,7 @@
1955 "CounterHTOff": "0,1,2,3" 2081 "CounterHTOff": "0,1,2,3"
1956 }, 2082 },
1957 { 2083 {
2084 "PublicDescription": "tbd Offcore response can be programmed only with a specific pair of event select and counter MSR, and with specific event codes and predefine mask bit value in a dedicated MSR to specify attributes of the offcore transaction.",
1958 "EventCode": "0xB7, 0xBB", 2085 "EventCode": "0xB7, 0xBB",
1959 "MSRValue": "0x0204008000 ", 2086 "MSRValue": "0x0204008000 ",
1960 "Counter": "0,1,2,3", 2087 "Counter": "0,1,2,3",
@@ -1967,6 +2094,7 @@
1967 "CounterHTOff": "0,1,2,3" 2094 "CounterHTOff": "0,1,2,3"
1968 }, 2095 },
1969 { 2096 {
2097 "PublicDescription": "tbd Offcore response can be programmed only with a specific pair of event select and counter MSR, and with specific event codes and predefine mask bit value in a dedicated MSR to specify attributes of the offcore transaction.",
1970 "EventCode": "0xB7, 0xBB", 2098 "EventCode": "0xB7, 0xBB",
1971 "MSRValue": "0x0404008000 ", 2099 "MSRValue": "0x0404008000 ",
1972 "Counter": "0,1,2,3", 2100 "Counter": "0,1,2,3",
@@ -1979,6 +2107,7 @@
1979 "CounterHTOff": "0,1,2,3" 2107 "CounterHTOff": "0,1,2,3"
1980 }, 2108 },
1981 { 2109 {
2110 "PublicDescription": "tbd Offcore response can be programmed only with a specific pair of event select and counter MSR, and with specific event codes and predefine mask bit value in a dedicated MSR to specify attributes of the offcore transaction.",
1982 "EventCode": "0xB7, 0xBB", 2111 "EventCode": "0xB7, 0xBB",
1983 "MSRValue": "0x1004008000 ", 2112 "MSRValue": "0x1004008000 ",
1984 "Counter": "0,1,2,3", 2113 "Counter": "0,1,2,3",
@@ -1991,6 +2120,7 @@
1991 "CounterHTOff": "0,1,2,3" 2120 "CounterHTOff": "0,1,2,3"
1992 }, 2121 },
1993 { 2122 {
2123 "PublicDescription": "tbd Offcore response can be programmed only with a specific pair of event select and counter MSR, and with specific event codes and predefine mask bit value in a dedicated MSR to specify attributes of the offcore transaction.",
1994 "EventCode": "0xB7, 0xBB", 2124 "EventCode": "0xB7, 0xBB",
1995 "MSRValue": "0x2004008000 ", 2125 "MSRValue": "0x2004008000 ",
1996 "Counter": "0,1,2,3", 2126 "Counter": "0,1,2,3",
@@ -2003,6 +2133,7 @@
2003 "CounterHTOff": "0,1,2,3" 2133 "CounterHTOff": "0,1,2,3"
2004 }, 2134 },
2005 { 2135 {
2136 "PublicDescription": "tbd Offcore response can be programmed only with a specific pair of event select and counter MSR, and with specific event codes and predefine mask bit value in a dedicated MSR to specify attributes of the offcore transaction.",
2006 "EventCode": "0xB7, 0xBB", 2137 "EventCode": "0xB7, 0xBB",
2007 "MSRValue": "0x3f84008000 ", 2138 "MSRValue": "0x3f84008000 ",
2008 "Counter": "0,1,2,3", 2139 "Counter": "0,1,2,3",
@@ -2015,6 +2146,7 @@
2015 "CounterHTOff": "0,1,2,3" 2146 "CounterHTOff": "0,1,2,3"
2016 }, 2147 },
2017 { 2148 {
2149 "PublicDescription": "Counts any other requests that miss the L3 with no details on snoop-related information. Offcore response can be programmed only with a specific pair of event select and counter MSR, and with specific event codes and predefine mask bit value in a dedicated MSR to specify attributes of the offcore transaction.",
2018 "EventCode": "0xB7, 0xBB", 2150 "EventCode": "0xB7, 0xBB",
2019 "MSRValue": "0x00bc008000 ", 2151 "MSRValue": "0x00bc008000 ",
2020 "Counter": "0,1,2,3", 2152 "Counter": "0,1,2,3",
@@ -2027,6 +2159,7 @@
2027 "CounterHTOff": "0,1,2,3" 2159 "CounterHTOff": "0,1,2,3"
2028 }, 2160 },
2029 { 2161 {
2162 "PublicDescription": "tbd Offcore response can be programmed only with a specific pair of event select and counter MSR, and with specific event codes and predefine mask bit value in a dedicated MSR to specify attributes of the offcore transaction.",
2030 "EventCode": "0xB7, 0xBB", 2163 "EventCode": "0xB7, 0xBB",
2031 "MSRValue": "0x013c008000 ", 2164 "MSRValue": "0x013c008000 ",
2032 "Counter": "0,1,2,3", 2165 "Counter": "0,1,2,3",
@@ -2039,6 +2172,7 @@
2039 "CounterHTOff": "0,1,2,3" 2172 "CounterHTOff": "0,1,2,3"
2040 }, 2173 },
2041 { 2174 {
2175 "PublicDescription": "Counts any other requests that miss the L3 with a snoop miss response. Offcore response can be programmed only with a specific pair of event select and counter MSR, and with specific event codes and predefine mask bit value in a dedicated MSR to specify attributes of the offcore transaction.",
2042 "EventCode": "0xB7, 0xBB", 2176 "EventCode": "0xB7, 0xBB",
2043 "MSRValue": "0x023c008000 ", 2177 "MSRValue": "0x023c008000 ",
2044 "Counter": "0,1,2,3", 2178 "Counter": "0,1,2,3",
@@ -2051,6 +2185,7 @@
2051 "CounterHTOff": "0,1,2,3" 2185 "CounterHTOff": "0,1,2,3"
2052 }, 2186 },
2053 { 2187 {
2188 "PublicDescription": "tbd Offcore response can be programmed only with a specific pair of event select and counter MSR, and with specific event codes and predefine mask bit value in a dedicated MSR to specify attributes of the offcore transaction.",
2054 "EventCode": "0xB7, 0xBB", 2189 "EventCode": "0xB7, 0xBB",
2055 "MSRValue": "0x043c008000 ", 2190 "MSRValue": "0x043c008000 ",
2056 "Counter": "0,1,2,3", 2191 "Counter": "0,1,2,3",
@@ -2063,6 +2198,7 @@
2063 "CounterHTOff": "0,1,2,3" 2198 "CounterHTOff": "0,1,2,3"
2064 }, 2199 },
2065 { 2200 {
2201 "PublicDescription": "tbd Offcore response can be programmed only with a specific pair of event select and counter MSR, and with specific event codes and predefine mask bit value in a dedicated MSR to specify attributes of the offcore transaction.",
2066 "EventCode": "0xB7, 0xBB", 2202 "EventCode": "0xB7, 0xBB",
2067 "MSRValue": "0x2000020090 ", 2203 "MSRValue": "0x2000020090 ",
2068 "Counter": "0,1,2,3", 2204 "Counter": "0,1,2,3",
@@ -2075,6 +2211,7 @@
2075 "CounterHTOff": "0,1,2,3" 2211 "CounterHTOff": "0,1,2,3"
2076 }, 2212 },
2077 { 2213 {
2214 "PublicDescription": "Counts all prefetch data reads that hit in the L3 and the target was non-DRAM system address. Offcore response can be programmed only with a specific pair of event select and counter MSR, and with specific event codes and predefine mask bit value in a dedicated MSR to specify attributes of the offcore transaction.",
2078 "EventCode": "0xB7, 0xBB", 2215 "EventCode": "0xB7, 0xBB",
2079 "MSRValue": "0x20003c0090 ", 2216 "MSRValue": "0x20003c0090 ",
2080 "Counter": "0,1,2,3", 2217 "Counter": "0,1,2,3",
@@ -2087,6 +2224,7 @@
2087 "CounterHTOff": "0,1,2,3" 2224 "CounterHTOff": "0,1,2,3"
2088 }, 2225 },
2089 { 2226 {
2227 "PublicDescription": "tbd Offcore response can be programmed only with a specific pair of event select and counter MSR, and with specific event codes and predefine mask bit value in a dedicated MSR to specify attributes of the offcore transaction.",
2090 "EventCode": "0xB7, 0xBB", 2228 "EventCode": "0xB7, 0xBB",
2091 "MSRValue": "0x0084000090 ", 2229 "MSRValue": "0x0084000090 ",
2092 "Counter": "0,1,2,3", 2230 "Counter": "0,1,2,3",
@@ -2099,6 +2237,7 @@
2099 "CounterHTOff": "0,1,2,3" 2237 "CounterHTOff": "0,1,2,3"
2100 }, 2238 },
2101 { 2239 {
2240 "PublicDescription": "tbd Offcore response can be programmed only with a specific pair of event select and counter MSR, and with specific event codes and predefine mask bit value in a dedicated MSR to specify attributes of the offcore transaction.",
2102 "EventCode": "0xB7, 0xBB", 2241 "EventCode": "0xB7, 0xBB",
2103 "MSRValue": "0x0104000090 ", 2242 "MSRValue": "0x0104000090 ",
2104 "Counter": "0,1,2,3", 2243 "Counter": "0,1,2,3",
@@ -2111,6 +2250,7 @@
2111 "CounterHTOff": "0,1,2,3" 2250 "CounterHTOff": "0,1,2,3"
2112 }, 2251 },
2113 { 2252 {
2253 "PublicDescription": "tbd Offcore response can be programmed only with a specific pair of event select and counter MSR, and with specific event codes and predefine mask bit value in a dedicated MSR to specify attributes of the offcore transaction.",
2114 "EventCode": "0xB7, 0xBB", 2254 "EventCode": "0xB7, 0xBB",
2115 "MSRValue": "0x0204000090 ", 2255 "MSRValue": "0x0204000090 ",
2116 "Counter": "0,1,2,3", 2256 "Counter": "0,1,2,3",
@@ -2123,6 +2263,7 @@
2123 "CounterHTOff": "0,1,2,3" 2263 "CounterHTOff": "0,1,2,3"
2124 }, 2264 },
2125 { 2265 {
2266 "PublicDescription": "tbd Offcore response can be programmed only with a specific pair of event select and counter MSR, and with specific event codes and predefine mask bit value in a dedicated MSR to specify attributes of the offcore transaction.",
2126 "EventCode": "0xB7, 0xBB", 2267 "EventCode": "0xB7, 0xBB",
2127 "MSRValue": "0x0404000090 ", 2268 "MSRValue": "0x0404000090 ",
2128 "Counter": "0,1,2,3", 2269 "Counter": "0,1,2,3",
@@ -2135,6 +2276,7 @@
2135 "CounterHTOff": "0,1,2,3" 2276 "CounterHTOff": "0,1,2,3"
2136 }, 2277 },
2137 { 2278 {
2279 "PublicDescription": "tbd Offcore response can be programmed only with a specific pair of event select and counter MSR, and with specific event codes and predefine mask bit value in a dedicated MSR to specify attributes of the offcore transaction.",
2138 "EventCode": "0xB7, 0xBB", 2280 "EventCode": "0xB7, 0xBB",
2139 "MSRValue": "0x1004000090 ", 2281 "MSRValue": "0x1004000090 ",
2140 "Counter": "0,1,2,3", 2282 "Counter": "0,1,2,3",
@@ -2147,6 +2289,7 @@
2147 "CounterHTOff": "0,1,2,3" 2289 "CounterHTOff": "0,1,2,3"
2148 }, 2290 },
2149 { 2291 {
2292 "PublicDescription": "tbd Offcore response can be programmed only with a specific pair of event select and counter MSR, and with specific event codes and predefine mask bit value in a dedicated MSR to specify attributes of the offcore transaction.",
2150 "EventCode": "0xB7, 0xBB", 2293 "EventCode": "0xB7, 0xBB",
2151 "MSRValue": "0x2004000090 ", 2294 "MSRValue": "0x2004000090 ",
2152 "Counter": "0,1,2,3", 2295 "Counter": "0,1,2,3",
@@ -2159,6 +2302,7 @@
2159 "CounterHTOff": "0,1,2,3" 2302 "CounterHTOff": "0,1,2,3"
2160 }, 2303 },
2161 { 2304 {
2305 "PublicDescription": "tbd Offcore response can be programmed only with a specific pair of event select and counter MSR, and with specific event codes and predefine mask bit value in a dedicated MSR to specify attributes of the offcore transaction.",
2162 "EventCode": "0xB7, 0xBB", 2306 "EventCode": "0xB7, 0xBB",
2163 "MSRValue": "0x3f84000090 ", 2307 "MSRValue": "0x3f84000090 ",
2164 "Counter": "0,1,2,3", 2308 "Counter": "0,1,2,3",
@@ -2171,6 +2315,7 @@
2171 "CounterHTOff": "0,1,2,3" 2315 "CounterHTOff": "0,1,2,3"
2172 }, 2316 },
2173 { 2317 {
2318 "PublicDescription": "Counts all prefetch data reads that miss the L3 with no details on snoop-related information. Offcore response can be programmed only with a specific pair of event select and counter MSR, and with specific event codes and predefine mask bit value in a dedicated MSR to specify attributes of the offcore transaction.",
2174 "EventCode": "0xB7, 0xBB", 2319 "EventCode": "0xB7, 0xBB",
2175 "MSRValue": "0x00bc000090 ", 2320 "MSRValue": "0x00bc000090 ",
2176 "Counter": "0,1,2,3", 2321 "Counter": "0,1,2,3",
@@ -2183,6 +2328,7 @@
2183 "CounterHTOff": "0,1,2,3" 2328 "CounterHTOff": "0,1,2,3"
2184 }, 2329 },
2185 { 2330 {
2331 "PublicDescription": "tbd Offcore response can be programmed only with a specific pair of event select and counter MSR, and with specific event codes and predefine mask bit value in a dedicated MSR to specify attributes of the offcore transaction.",
2186 "EventCode": "0xB7, 0xBB", 2332 "EventCode": "0xB7, 0xBB",
2187 "MSRValue": "0x013c000090 ", 2333 "MSRValue": "0x013c000090 ",
2188 "Counter": "0,1,2,3", 2334 "Counter": "0,1,2,3",
@@ -2195,6 +2341,7 @@
2195 "CounterHTOff": "0,1,2,3" 2341 "CounterHTOff": "0,1,2,3"
2196 }, 2342 },
2197 { 2343 {
2344 "PublicDescription": "Counts all prefetch data reads that miss the L3 with a snoop miss response. Offcore response can be programmed only with a specific pair of event select and counter MSR, and with specific event codes and predefine mask bit value in a dedicated MSR to specify attributes of the offcore transaction.",
2198 "EventCode": "0xB7, 0xBB", 2345 "EventCode": "0xB7, 0xBB",
2199 "MSRValue": "0x023c000090 ", 2346 "MSRValue": "0x023c000090 ",
2200 "Counter": "0,1,2,3", 2347 "Counter": "0,1,2,3",
@@ -2207,6 +2354,7 @@
2207 "CounterHTOff": "0,1,2,3" 2354 "CounterHTOff": "0,1,2,3"
2208 }, 2355 },
2209 { 2356 {
2357 "PublicDescription": "tbd Offcore response can be programmed only with a specific pair of event select and counter MSR, and with specific event codes and predefine mask bit value in a dedicated MSR to specify attributes of the offcore transaction.",
2210 "EventCode": "0xB7, 0xBB", 2358 "EventCode": "0xB7, 0xBB",
2211 "MSRValue": "0x043c000090 ", 2359 "MSRValue": "0x043c000090 ",
2212 "Counter": "0,1,2,3", 2360 "Counter": "0,1,2,3",
@@ -2219,6 +2367,7 @@
2219 "CounterHTOff": "0,1,2,3" 2367 "CounterHTOff": "0,1,2,3"
2220 }, 2368 },
2221 { 2369 {
2370 "PublicDescription": "tbd Offcore response can be programmed only with a specific pair of event select and counter MSR, and with specific event codes and predefine mask bit value in a dedicated MSR to specify attributes of the offcore transaction.",
2222 "EventCode": "0xB7, 0xBB", 2371 "EventCode": "0xB7, 0xBB",
2223 "MSRValue": "0x2000020120 ", 2372 "MSRValue": "0x2000020120 ",
2224 "Counter": "0,1,2,3", 2373 "Counter": "0,1,2,3",
@@ -2231,6 +2380,7 @@
2231 "CounterHTOff": "0,1,2,3" 2380 "CounterHTOff": "0,1,2,3"
2232 }, 2381 },
2233 { 2382 {
2383 "PublicDescription": "Counts prefetch RFOs that hit in the L3 and the target was non-DRAM system address. Offcore response can be programmed only with a specific pair of event select and counter MSR, and with specific event codes and predefine mask bit value in a dedicated MSR to specify attributes of the offcore transaction.",
2234 "EventCode": "0xB7, 0xBB", 2384 "EventCode": "0xB7, 0xBB",
2235 "MSRValue": "0x20003c0120 ", 2385 "MSRValue": "0x20003c0120 ",
2236 "Counter": "0,1,2,3", 2386 "Counter": "0,1,2,3",
@@ -2243,6 +2393,7 @@
2243 "CounterHTOff": "0,1,2,3" 2393 "CounterHTOff": "0,1,2,3"
2244 }, 2394 },
2245 { 2395 {
2396 "PublicDescription": "tbd Offcore response can be programmed only with a specific pair of event select and counter MSR, and with specific event codes and predefine mask bit value in a dedicated MSR to specify attributes of the offcore transaction.",
2246 "EventCode": "0xB7, 0xBB", 2397 "EventCode": "0xB7, 0xBB",
2247 "MSRValue": "0x0084000120 ", 2398 "MSRValue": "0x0084000120 ",
2248 "Counter": "0,1,2,3", 2399 "Counter": "0,1,2,3",
@@ -2255,6 +2406,7 @@
2255 "CounterHTOff": "0,1,2,3" 2406 "CounterHTOff": "0,1,2,3"
2256 }, 2407 },
2257 { 2408 {
2409 "PublicDescription": "tbd Offcore response can be programmed only with a specific pair of event select and counter MSR, and with specific event codes and predefine mask bit value in a dedicated MSR to specify attributes of the offcore transaction.",
2258 "EventCode": "0xB7, 0xBB", 2410 "EventCode": "0xB7, 0xBB",
2259 "MSRValue": "0x0104000120 ", 2411 "MSRValue": "0x0104000120 ",
2260 "Counter": "0,1,2,3", 2412 "Counter": "0,1,2,3",
@@ -2267,6 +2419,7 @@
2267 "CounterHTOff": "0,1,2,3" 2419 "CounterHTOff": "0,1,2,3"
2268 }, 2420 },
2269 { 2421 {
2422 "PublicDescription": "tbd Offcore response can be programmed only with a specific pair of event select and counter MSR, and with specific event codes and predefine mask bit value in a dedicated MSR to specify attributes of the offcore transaction.",
2270 "EventCode": "0xB7, 0xBB", 2423 "EventCode": "0xB7, 0xBB",
2271 "MSRValue": "0x0204000120 ", 2424 "MSRValue": "0x0204000120 ",
2272 "Counter": "0,1,2,3", 2425 "Counter": "0,1,2,3",
@@ -2279,6 +2432,7 @@
2279 "CounterHTOff": "0,1,2,3" 2432 "CounterHTOff": "0,1,2,3"
2280 }, 2433 },
2281 { 2434 {
2435 "PublicDescription": "tbd Offcore response can be programmed only with a specific pair of event select and counter MSR, and with specific event codes and predefine mask bit value in a dedicated MSR to specify attributes of the offcore transaction.",
2282 "EventCode": "0xB7, 0xBB", 2436 "EventCode": "0xB7, 0xBB",
2283 "MSRValue": "0x0404000120 ", 2437 "MSRValue": "0x0404000120 ",
2284 "Counter": "0,1,2,3", 2438 "Counter": "0,1,2,3",
@@ -2291,6 +2445,7 @@
2291 "CounterHTOff": "0,1,2,3" 2445 "CounterHTOff": "0,1,2,3"
2292 }, 2446 },
2293 { 2447 {
2448 "PublicDescription": "tbd Offcore response can be programmed only with a specific pair of event select and counter MSR, and with specific event codes and predefine mask bit value in a dedicated MSR to specify attributes of the offcore transaction.",
2294 "EventCode": "0xB7, 0xBB", 2449 "EventCode": "0xB7, 0xBB",
2295 "MSRValue": "0x1004000120 ", 2450 "MSRValue": "0x1004000120 ",
2296 "Counter": "0,1,2,3", 2451 "Counter": "0,1,2,3",
@@ -2303,6 +2458,7 @@
2303 "CounterHTOff": "0,1,2,3" 2458 "CounterHTOff": "0,1,2,3"
2304 }, 2459 },
2305 { 2460 {
2461 "PublicDescription": "tbd Offcore response can be programmed only with a specific pair of event select and counter MSR, and with specific event codes and predefine mask bit value in a dedicated MSR to specify attributes of the offcore transaction.",
2306 "EventCode": "0xB7, 0xBB", 2462 "EventCode": "0xB7, 0xBB",
2307 "MSRValue": "0x2004000120 ", 2463 "MSRValue": "0x2004000120 ",
2308 "Counter": "0,1,2,3", 2464 "Counter": "0,1,2,3",
@@ -2315,6 +2471,7 @@
2315 "CounterHTOff": "0,1,2,3" 2471 "CounterHTOff": "0,1,2,3"
2316 }, 2472 },
2317 { 2473 {
2474 "PublicDescription": "tbd Offcore response can be programmed only with a specific pair of event select and counter MSR, and with specific event codes and predefine mask bit value in a dedicated MSR to specify attributes of the offcore transaction.",
2318 "EventCode": "0xB7, 0xBB", 2475 "EventCode": "0xB7, 0xBB",
2319 "MSRValue": "0x3f84000120 ", 2476 "MSRValue": "0x3f84000120 ",
2320 "Counter": "0,1,2,3", 2477 "Counter": "0,1,2,3",
@@ -2327,6 +2484,7 @@
2327 "CounterHTOff": "0,1,2,3" 2484 "CounterHTOff": "0,1,2,3"
2328 }, 2485 },
2329 { 2486 {
2487 "PublicDescription": "Counts prefetch RFOs that miss the L3 with no details on snoop-related information. Offcore response can be programmed only with a specific pair of event select and counter MSR, and with specific event codes and predefine mask bit value in a dedicated MSR to specify attributes of the offcore transaction.",
2330 "EventCode": "0xB7, 0xBB", 2488 "EventCode": "0xB7, 0xBB",
2331 "MSRValue": "0x00bc000120 ", 2489 "MSRValue": "0x00bc000120 ",
2332 "Counter": "0,1,2,3", 2490 "Counter": "0,1,2,3",
@@ -2339,6 +2497,7 @@
2339 "CounterHTOff": "0,1,2,3" 2497 "CounterHTOff": "0,1,2,3"
2340 }, 2498 },
2341 { 2499 {
2500 "PublicDescription": "tbd Offcore response can be programmed only with a specific pair of event select and counter MSR, and with specific event codes and predefine mask bit value in a dedicated MSR to specify attributes of the offcore transaction.",
2342 "EventCode": "0xB7, 0xBB", 2501 "EventCode": "0xB7, 0xBB",
2343 "MSRValue": "0x013c000120 ", 2502 "MSRValue": "0x013c000120 ",
2344 "Counter": "0,1,2,3", 2503 "Counter": "0,1,2,3",
@@ -2351,6 +2510,7 @@
2351 "CounterHTOff": "0,1,2,3" 2510 "CounterHTOff": "0,1,2,3"
2352 }, 2511 },
2353 { 2512 {
2513 "PublicDescription": "Counts prefetch RFOs that miss the L3 with a snoop miss response. Offcore response can be programmed only with a specific pair of event select and counter MSR, and with specific event codes and predefine mask bit value in a dedicated MSR to specify attributes of the offcore transaction.",
2354 "EventCode": "0xB7, 0xBB", 2514 "EventCode": "0xB7, 0xBB",
2355 "MSRValue": "0x023c000120 ", 2515 "MSRValue": "0x023c000120 ",
2356 "Counter": "0,1,2,3", 2516 "Counter": "0,1,2,3",
@@ -2363,6 +2523,7 @@
2363 "CounterHTOff": "0,1,2,3" 2523 "CounterHTOff": "0,1,2,3"
2364 }, 2524 },
2365 { 2525 {
2526 "PublicDescription": "tbd Offcore response can be programmed only with a specific pair of event select and counter MSR, and with specific event codes and predefine mask bit value in a dedicated MSR to specify attributes of the offcore transaction.",
2366 "EventCode": "0xB7, 0xBB", 2527 "EventCode": "0xB7, 0xBB",
2367 "MSRValue": "0x043c000120 ", 2528 "MSRValue": "0x043c000120 ",
2368 "Counter": "0,1,2,3", 2529 "Counter": "0,1,2,3",
@@ -2375,6 +2536,7 @@
2375 "CounterHTOff": "0,1,2,3" 2536 "CounterHTOff": "0,1,2,3"
2376 }, 2537 },
2377 { 2538 {
2539 "PublicDescription": "tbd Offcore response can be programmed only with a specific pair of event select and counter MSR, and with specific event codes and predefine mask bit value in a dedicated MSR to specify attributes of the offcore transaction.",
2378 "EventCode": "0xB7, 0xBB", 2540 "EventCode": "0xB7, 0xBB",
2379 "MSRValue": "0x2000020240 ", 2541 "MSRValue": "0x2000020240 ",
2380 "Counter": "0,1,2,3", 2542 "Counter": "0,1,2,3",
@@ -2387,6 +2549,7 @@
2387 "CounterHTOff": "0,1,2,3" 2549 "CounterHTOff": "0,1,2,3"
2388 }, 2550 },
2389 { 2551 {
2552 "PublicDescription": "Counts all prefetch code reads that hit in the L3 and the target was non-DRAM system address. Offcore response can be programmed only with a specific pair of event select and counter MSR, and with specific event codes and predefine mask bit value in a dedicated MSR to specify attributes of the offcore transaction.",
2390 "EventCode": "0xB7, 0xBB", 2553 "EventCode": "0xB7, 0xBB",
2391 "MSRValue": "0x20003c0240 ", 2554 "MSRValue": "0x20003c0240 ",
2392 "Counter": "0,1,2,3", 2555 "Counter": "0,1,2,3",
@@ -2399,6 +2562,7 @@
2399 "CounterHTOff": "0,1,2,3" 2562 "CounterHTOff": "0,1,2,3"
2400 }, 2563 },
2401 { 2564 {
2565 "PublicDescription": "tbd Offcore response can be programmed only with a specific pair of event select and counter MSR, and with specific event codes and predefine mask bit value in a dedicated MSR to specify attributes of the offcore transaction.",
2402 "EventCode": "0xB7, 0xBB", 2566 "EventCode": "0xB7, 0xBB",
2403 "MSRValue": "0x0084000240 ", 2567 "MSRValue": "0x0084000240 ",
2404 "Counter": "0,1,2,3", 2568 "Counter": "0,1,2,3",
@@ -2411,6 +2575,7 @@
2411 "CounterHTOff": "0,1,2,3" 2575 "CounterHTOff": "0,1,2,3"
2412 }, 2576 },
2413 { 2577 {
2578 "PublicDescription": "tbd Offcore response can be programmed only with a specific pair of event select and counter MSR, and with specific event codes and predefine mask bit value in a dedicated MSR to specify attributes of the offcore transaction.",
2414 "EventCode": "0xB7, 0xBB", 2579 "EventCode": "0xB7, 0xBB",
2415 "MSRValue": "0x0104000240 ", 2580 "MSRValue": "0x0104000240 ",
2416 "Counter": "0,1,2,3", 2581 "Counter": "0,1,2,3",
@@ -2423,6 +2588,7 @@
2423 "CounterHTOff": "0,1,2,3" 2588 "CounterHTOff": "0,1,2,3"
2424 }, 2589 },
2425 { 2590 {
2591 "PublicDescription": "tbd Offcore response can be programmed only with a specific pair of event select and counter MSR, and with specific event codes and predefine mask bit value in a dedicated MSR to specify attributes of the offcore transaction.",
2426 "EventCode": "0xB7, 0xBB", 2592 "EventCode": "0xB7, 0xBB",
2427 "MSRValue": "0x0204000240 ", 2593 "MSRValue": "0x0204000240 ",
2428 "Counter": "0,1,2,3", 2594 "Counter": "0,1,2,3",
@@ -2435,6 +2601,7 @@
2435 "CounterHTOff": "0,1,2,3" 2601 "CounterHTOff": "0,1,2,3"
2436 }, 2602 },
2437 { 2603 {
2604 "PublicDescription": "tbd Offcore response can be programmed only with a specific pair of event select and counter MSR, and with specific event codes and predefine mask bit value in a dedicated MSR to specify attributes of the offcore transaction.",
2438 "EventCode": "0xB7, 0xBB", 2605 "EventCode": "0xB7, 0xBB",
2439 "MSRValue": "0x0404000240 ", 2606 "MSRValue": "0x0404000240 ",
2440 "Counter": "0,1,2,3", 2607 "Counter": "0,1,2,3",
@@ -2447,6 +2614,7 @@
2447 "CounterHTOff": "0,1,2,3" 2614 "CounterHTOff": "0,1,2,3"
2448 }, 2615 },
2449 { 2616 {
2617 "PublicDescription": "tbd Offcore response can be programmed only with a specific pair of event select and counter MSR, and with specific event codes and predefine mask bit value in a dedicated MSR to specify attributes of the offcore transaction.",
2450 "EventCode": "0xB7, 0xBB", 2618 "EventCode": "0xB7, 0xBB",
2451 "MSRValue": "0x1004000240 ", 2619 "MSRValue": "0x1004000240 ",
2452 "Counter": "0,1,2,3", 2620 "Counter": "0,1,2,3",
@@ -2459,6 +2627,7 @@
2459 "CounterHTOff": "0,1,2,3" 2627 "CounterHTOff": "0,1,2,3"
2460 }, 2628 },
2461 { 2629 {
2630 "PublicDescription": "tbd Offcore response can be programmed only with a specific pair of event select and counter MSR, and with specific event codes and predefine mask bit value in a dedicated MSR to specify attributes of the offcore transaction.",
2462 "EventCode": "0xB7, 0xBB", 2631 "EventCode": "0xB7, 0xBB",
2463 "MSRValue": "0x2004000240 ", 2632 "MSRValue": "0x2004000240 ",
2464 "Counter": "0,1,2,3", 2633 "Counter": "0,1,2,3",
@@ -2471,6 +2640,7 @@
2471 "CounterHTOff": "0,1,2,3" 2640 "CounterHTOff": "0,1,2,3"
2472 }, 2641 },
2473 { 2642 {
2643 "PublicDescription": "tbd Offcore response can be programmed only with a specific pair of event select and counter MSR, and with specific event codes and predefine mask bit value in a dedicated MSR to specify attributes of the offcore transaction.",
2474 "EventCode": "0xB7, 0xBB", 2644 "EventCode": "0xB7, 0xBB",
2475 "MSRValue": "0x3f84000240 ", 2645 "MSRValue": "0x3f84000240 ",
2476 "Counter": "0,1,2,3", 2646 "Counter": "0,1,2,3",
@@ -2483,6 +2653,7 @@
2483 "CounterHTOff": "0,1,2,3" 2653 "CounterHTOff": "0,1,2,3"
2484 }, 2654 },
2485 { 2655 {
2656 "PublicDescription": "Counts all prefetch code reads that miss the L3 with no details on snoop-related information. Offcore response can be programmed only with a specific pair of event select and counter MSR, and with specific event codes and predefine mask bit value in a dedicated MSR to specify attributes of the offcore transaction.",
2486 "EventCode": "0xB7, 0xBB", 2657 "EventCode": "0xB7, 0xBB",
2487 "MSRValue": "0x00bc000240 ", 2658 "MSRValue": "0x00bc000240 ",
2488 "Counter": "0,1,2,3", 2659 "Counter": "0,1,2,3",
@@ -2495,6 +2666,7 @@
2495 "CounterHTOff": "0,1,2,3" 2666 "CounterHTOff": "0,1,2,3"
2496 }, 2667 },
2497 { 2668 {
2669 "PublicDescription": "tbd Offcore response can be programmed only with a specific pair of event select and counter MSR, and with specific event codes and predefine mask bit value in a dedicated MSR to specify attributes of the offcore transaction.",
2498 "EventCode": "0xB7, 0xBB", 2670 "EventCode": "0xB7, 0xBB",
2499 "MSRValue": "0x013c000240 ", 2671 "MSRValue": "0x013c000240 ",
2500 "Counter": "0,1,2,3", 2672 "Counter": "0,1,2,3",
@@ -2507,6 +2679,7 @@
2507 "CounterHTOff": "0,1,2,3" 2679 "CounterHTOff": "0,1,2,3"
2508 }, 2680 },
2509 { 2681 {
2682 "PublicDescription": "Counts all prefetch code reads that miss the L3 with a snoop miss response. Offcore response can be programmed only with a specific pair of event select and counter MSR, and with specific event codes and predefine mask bit value in a dedicated MSR to specify attributes of the offcore transaction.",
2510 "EventCode": "0xB7, 0xBB", 2683 "EventCode": "0xB7, 0xBB",
2511 "MSRValue": "0x023c000240 ", 2684 "MSRValue": "0x023c000240 ",
2512 "Counter": "0,1,2,3", 2685 "Counter": "0,1,2,3",
@@ -2519,6 +2692,7 @@
2519 "CounterHTOff": "0,1,2,3" 2692 "CounterHTOff": "0,1,2,3"
2520 }, 2693 },
2521 { 2694 {
2695 "PublicDescription": "tbd Offcore response can be programmed only with a specific pair of event select and counter MSR, and with specific event codes and predefine mask bit value in a dedicated MSR to specify attributes of the offcore transaction.",
2522 "EventCode": "0xB7, 0xBB", 2696 "EventCode": "0xB7, 0xBB",
2523 "MSRValue": "0x043c000240 ", 2697 "MSRValue": "0x043c000240 ",
2524 "Counter": "0,1,2,3", 2698 "Counter": "0,1,2,3",
@@ -2531,6 +2705,7 @@
2531 "CounterHTOff": "0,1,2,3" 2705 "CounterHTOff": "0,1,2,3"
2532 }, 2706 },
2533 { 2707 {
2708 "PublicDescription": "tbd Offcore response can be programmed only with a specific pair of event select and counter MSR, and with specific event codes and predefine mask bit value in a dedicated MSR to specify attributes of the offcore transaction.",
2534 "EventCode": "0xB7, 0xBB", 2709 "EventCode": "0xB7, 0xBB",
2535 "MSRValue": "0x2000020091 ", 2710 "MSRValue": "0x2000020091 ",
2536 "Counter": "0,1,2,3", 2711 "Counter": "0,1,2,3",
@@ -2543,6 +2718,7 @@
2543 "CounterHTOff": "0,1,2,3" 2718 "CounterHTOff": "0,1,2,3"
2544 }, 2719 },
2545 { 2720 {
2721 "PublicDescription": "Counts all demand & prefetch data reads that hit in the L3 and the target was non-DRAM system address. Offcore response can be programmed only with a specific pair of event select and counter MSR, and with specific event codes and predefine mask bit value in a dedicated MSR to specify attributes of the offcore transaction.",
2546 "EventCode": "0xB7, 0xBB", 2722 "EventCode": "0xB7, 0xBB",
2547 "MSRValue": "0x20003c0091 ", 2723 "MSRValue": "0x20003c0091 ",
2548 "Counter": "0,1,2,3", 2724 "Counter": "0,1,2,3",
@@ -2555,6 +2731,7 @@
2555 "CounterHTOff": "0,1,2,3" 2731 "CounterHTOff": "0,1,2,3"
2556 }, 2732 },
2557 { 2733 {
2734 "PublicDescription": "tbd Offcore response can be programmed only with a specific pair of event select and counter MSR, and with specific event codes and predefine mask bit value in a dedicated MSR to specify attributes of the offcore transaction.",
2558 "EventCode": "0xB7, 0xBB", 2735 "EventCode": "0xB7, 0xBB",
2559 "MSRValue": "0x0084000091 ", 2736 "MSRValue": "0x0084000091 ",
2560 "Counter": "0,1,2,3", 2737 "Counter": "0,1,2,3",
@@ -2567,6 +2744,7 @@
2567 "CounterHTOff": "0,1,2,3" 2744 "CounterHTOff": "0,1,2,3"
2568 }, 2745 },
2569 { 2746 {
2747 "PublicDescription": "tbd Offcore response can be programmed only with a specific pair of event select and counter MSR, and with specific event codes and predefine mask bit value in a dedicated MSR to specify attributes of the offcore transaction.",
2570 "EventCode": "0xB7, 0xBB", 2748 "EventCode": "0xB7, 0xBB",
2571 "MSRValue": "0x0104000091 ", 2749 "MSRValue": "0x0104000091 ",
2572 "Counter": "0,1,2,3", 2750 "Counter": "0,1,2,3",
@@ -2579,6 +2757,7 @@
2579 "CounterHTOff": "0,1,2,3" 2757 "CounterHTOff": "0,1,2,3"
2580 }, 2758 },
2581 { 2759 {
2760 "PublicDescription": "tbd Offcore response can be programmed only with a specific pair of event select and counter MSR, and with specific event codes and predefine mask bit value in a dedicated MSR to specify attributes of the offcore transaction.",
2582 "EventCode": "0xB7, 0xBB", 2761 "EventCode": "0xB7, 0xBB",
2583 "MSRValue": "0x0204000091 ", 2762 "MSRValue": "0x0204000091 ",
2584 "Counter": "0,1,2,3", 2763 "Counter": "0,1,2,3",
@@ -2591,6 +2770,7 @@
2591 "CounterHTOff": "0,1,2,3" 2770 "CounterHTOff": "0,1,2,3"
2592 }, 2771 },
2593 { 2772 {
2773 "PublicDescription": "tbd Offcore response can be programmed only with a specific pair of event select and counter MSR, and with specific event codes and predefine mask bit value in a dedicated MSR to specify attributes of the offcore transaction.",
2594 "EventCode": "0xB7, 0xBB", 2774 "EventCode": "0xB7, 0xBB",
2595 "MSRValue": "0x0404000091 ", 2775 "MSRValue": "0x0404000091 ",
2596 "Counter": "0,1,2,3", 2776 "Counter": "0,1,2,3",
@@ -2603,6 +2783,7 @@
2603 "CounterHTOff": "0,1,2,3" 2783 "CounterHTOff": "0,1,2,3"
2604 }, 2784 },
2605 { 2785 {
2786 "PublicDescription": "tbd Offcore response can be programmed only with a specific pair of event select and counter MSR, and with specific event codes and predefine mask bit value in a dedicated MSR to specify attributes of the offcore transaction.",
2606 "EventCode": "0xB7, 0xBB", 2787 "EventCode": "0xB7, 0xBB",
2607 "MSRValue": "0x1004000091 ", 2788 "MSRValue": "0x1004000091 ",
2608 "Counter": "0,1,2,3", 2789 "Counter": "0,1,2,3",
@@ -2615,6 +2796,7 @@
2615 "CounterHTOff": "0,1,2,3" 2796 "CounterHTOff": "0,1,2,3"
2616 }, 2797 },
2617 { 2798 {
2799 "PublicDescription": "tbd Offcore response can be programmed only with a specific pair of event select and counter MSR, and with specific event codes and predefine mask bit value in a dedicated MSR to specify attributes of the offcore transaction.",
2618 "EventCode": "0xB7, 0xBB", 2800 "EventCode": "0xB7, 0xBB",
2619 "MSRValue": "0x2004000091 ", 2801 "MSRValue": "0x2004000091 ",
2620 "Counter": "0,1,2,3", 2802 "Counter": "0,1,2,3",
@@ -2627,6 +2809,7 @@
2627 "CounterHTOff": "0,1,2,3" 2809 "CounterHTOff": "0,1,2,3"
2628 }, 2810 },
2629 { 2811 {
2812 "PublicDescription": "tbd Offcore response can be programmed only with a specific pair of event select and counter MSR, and with specific event codes and predefine mask bit value in a dedicated MSR to specify attributes of the offcore transaction.",
2630 "EventCode": "0xB7, 0xBB", 2813 "EventCode": "0xB7, 0xBB",
2631 "MSRValue": "0x3f84000091 ", 2814 "MSRValue": "0x3f84000091 ",
2632 "Counter": "0,1,2,3", 2815 "Counter": "0,1,2,3",
@@ -2639,6 +2822,7 @@
2639 "CounterHTOff": "0,1,2,3" 2822 "CounterHTOff": "0,1,2,3"
2640 }, 2823 },
2641 { 2824 {
2825 "PublicDescription": "Counts all demand & prefetch data reads that miss the L3 with no details on snoop-related information. Offcore response can be programmed only with a specific pair of event select and counter MSR, and with specific event codes and predefine mask bit value in a dedicated MSR to specify attributes of the offcore transaction.",
2642 "EventCode": "0xB7, 0xBB", 2826 "EventCode": "0xB7, 0xBB",
2643 "MSRValue": "0x00bc000091 ", 2827 "MSRValue": "0x00bc000091 ",
2644 "Counter": "0,1,2,3", 2828 "Counter": "0,1,2,3",
@@ -2651,6 +2835,7 @@
2651 "CounterHTOff": "0,1,2,3" 2835 "CounterHTOff": "0,1,2,3"
2652 }, 2836 },
2653 { 2837 {
2838 "PublicDescription": "tbd Offcore response can be programmed only with a specific pair of event select and counter MSR, and with specific event codes and predefine mask bit value in a dedicated MSR to specify attributes of the offcore transaction.",
2654 "EventCode": "0xB7, 0xBB", 2839 "EventCode": "0xB7, 0xBB",
2655 "MSRValue": "0x013c000091 ", 2840 "MSRValue": "0x013c000091 ",
2656 "Counter": "0,1,2,3", 2841 "Counter": "0,1,2,3",
@@ -2663,6 +2848,7 @@
2663 "CounterHTOff": "0,1,2,3" 2848 "CounterHTOff": "0,1,2,3"
2664 }, 2849 },
2665 { 2850 {
2851 "PublicDescription": "Counts all demand & prefetch data reads that miss the L3 with a snoop miss response. Offcore response can be programmed only with a specific pair of event select and counter MSR, and with specific event codes and predefine mask bit value in a dedicated MSR to specify attributes of the offcore transaction.",
2666 "EventCode": "0xB7, 0xBB", 2852 "EventCode": "0xB7, 0xBB",
2667 "MSRValue": "0x023c000091 ", 2853 "MSRValue": "0x023c000091 ",
2668 "Counter": "0,1,2,3", 2854 "Counter": "0,1,2,3",
@@ -2675,6 +2861,7 @@
2675 "CounterHTOff": "0,1,2,3" 2861 "CounterHTOff": "0,1,2,3"
2676 }, 2862 },
2677 { 2863 {
2864 "PublicDescription": "tbd Offcore response can be programmed only with a specific pair of event select and counter MSR, and with specific event codes and predefine mask bit value in a dedicated MSR to specify attributes of the offcore transaction.",
2678 "EventCode": "0xB7, 0xBB", 2865 "EventCode": "0xB7, 0xBB",
2679 "MSRValue": "0x043c000091 ", 2866 "MSRValue": "0x043c000091 ",
2680 "Counter": "0,1,2,3", 2867 "Counter": "0,1,2,3",
@@ -2687,6 +2874,7 @@
2687 "CounterHTOff": "0,1,2,3" 2874 "CounterHTOff": "0,1,2,3"
2688 }, 2875 },
2689 { 2876 {
2877 "PublicDescription": "tbd Offcore response can be programmed only with a specific pair of event select and counter MSR, and with specific event codes and predefine mask bit value in a dedicated MSR to specify attributes of the offcore transaction.",
2690 "EventCode": "0xB7, 0xBB", 2878 "EventCode": "0xB7, 0xBB",
2691 "MSRValue": "0x2000020122 ", 2879 "MSRValue": "0x2000020122 ",
2692 "Counter": "0,1,2,3", 2880 "Counter": "0,1,2,3",
@@ -2699,6 +2887,7 @@
2699 "CounterHTOff": "0,1,2,3" 2887 "CounterHTOff": "0,1,2,3"
2700 }, 2888 },
2701 { 2889 {
2890 "PublicDescription": "Counts all demand & prefetch RFOs that hit in the L3 and the target was non-DRAM system address. Offcore response can be programmed only with a specific pair of event select and counter MSR, and with specific event codes and predefine mask bit value in a dedicated MSR to specify attributes of the offcore transaction.",
2702 "EventCode": "0xB7, 0xBB", 2891 "EventCode": "0xB7, 0xBB",
2703 "MSRValue": "0x20003c0122 ", 2892 "MSRValue": "0x20003c0122 ",
2704 "Counter": "0,1,2,3", 2893 "Counter": "0,1,2,3",
@@ -2711,6 +2900,7 @@
2711 "CounterHTOff": "0,1,2,3" 2900 "CounterHTOff": "0,1,2,3"
2712 }, 2901 },
2713 { 2902 {
2903 "PublicDescription": "tbd Offcore response can be programmed only with a specific pair of event select and counter MSR, and with specific event codes and predefine mask bit value in a dedicated MSR to specify attributes of the offcore transaction.",
2714 "EventCode": "0xB7, 0xBB", 2904 "EventCode": "0xB7, 0xBB",
2715 "MSRValue": "0x0084000122 ", 2905 "MSRValue": "0x0084000122 ",
2716 "Counter": "0,1,2,3", 2906 "Counter": "0,1,2,3",
@@ -2723,6 +2913,7 @@
2723 "CounterHTOff": "0,1,2,3" 2913 "CounterHTOff": "0,1,2,3"
2724 }, 2914 },
2725 { 2915 {
2916 "PublicDescription": "tbd Offcore response can be programmed only with a specific pair of event select and counter MSR, and with specific event codes and predefine mask bit value in a dedicated MSR to specify attributes of the offcore transaction.",
2726 "EventCode": "0xB7, 0xBB", 2917 "EventCode": "0xB7, 0xBB",
2727 "MSRValue": "0x0104000122 ", 2918 "MSRValue": "0x0104000122 ",
2728 "Counter": "0,1,2,3", 2919 "Counter": "0,1,2,3",
@@ -2735,6 +2926,7 @@
2735 "CounterHTOff": "0,1,2,3" 2926 "CounterHTOff": "0,1,2,3"
2736 }, 2927 },
2737 { 2928 {
2929 "PublicDescription": "tbd Offcore response can be programmed only with a specific pair of event select and counter MSR, and with specific event codes and predefine mask bit value in a dedicated MSR to specify attributes of the offcore transaction.",
2738 "EventCode": "0xB7, 0xBB", 2930 "EventCode": "0xB7, 0xBB",
2739 "MSRValue": "0x0204000122 ", 2931 "MSRValue": "0x0204000122 ",
2740 "Counter": "0,1,2,3", 2932 "Counter": "0,1,2,3",
@@ -2747,6 +2939,7 @@
2747 "CounterHTOff": "0,1,2,3" 2939 "CounterHTOff": "0,1,2,3"
2748 }, 2940 },
2749 { 2941 {
2942 "PublicDescription": "tbd Offcore response can be programmed only with a specific pair of event select and counter MSR, and with specific event codes and predefine mask bit value in a dedicated MSR to specify attributes of the offcore transaction.",
2750 "EventCode": "0xB7, 0xBB", 2943 "EventCode": "0xB7, 0xBB",
2751 "MSRValue": "0x0404000122 ", 2944 "MSRValue": "0x0404000122 ",
2752 "Counter": "0,1,2,3", 2945 "Counter": "0,1,2,3",
@@ -2759,6 +2952,7 @@
2759 "CounterHTOff": "0,1,2,3" 2952 "CounterHTOff": "0,1,2,3"
2760 }, 2953 },
2761 { 2954 {
2955 "PublicDescription": "tbd Offcore response can be programmed only with a specific pair of event select and counter MSR, and with specific event codes and predefine mask bit value in a dedicated MSR to specify attributes of the offcore transaction.",
2762 "EventCode": "0xB7, 0xBB", 2956 "EventCode": "0xB7, 0xBB",
2763 "MSRValue": "0x1004000122 ", 2957 "MSRValue": "0x1004000122 ",
2764 "Counter": "0,1,2,3", 2958 "Counter": "0,1,2,3",
@@ -2771,6 +2965,7 @@
2771 "CounterHTOff": "0,1,2,3" 2965 "CounterHTOff": "0,1,2,3"
2772 }, 2966 },
2773 { 2967 {
2968 "PublicDescription": "tbd Offcore response can be programmed only with a specific pair of event select and counter MSR, and with specific event codes and predefine mask bit value in a dedicated MSR to specify attributes of the offcore transaction.",
2774 "EventCode": "0xB7, 0xBB", 2969 "EventCode": "0xB7, 0xBB",
2775 "MSRValue": "0x2004000122 ", 2970 "MSRValue": "0x2004000122 ",
2776 "Counter": "0,1,2,3", 2971 "Counter": "0,1,2,3",
@@ -2783,6 +2978,7 @@
2783 "CounterHTOff": "0,1,2,3" 2978 "CounterHTOff": "0,1,2,3"
2784 }, 2979 },
2785 { 2980 {
2981 "PublicDescription": "tbd Offcore response can be programmed only with a specific pair of event select and counter MSR, and with specific event codes and predefine mask bit value in a dedicated MSR to specify attributes of the offcore transaction.",
2786 "EventCode": "0xB7, 0xBB", 2982 "EventCode": "0xB7, 0xBB",
2787 "MSRValue": "0x3f84000122 ", 2983 "MSRValue": "0x3f84000122 ",
2788 "Counter": "0,1,2,3", 2984 "Counter": "0,1,2,3",
@@ -2795,6 +2991,7 @@
2795 "CounterHTOff": "0,1,2,3" 2991 "CounterHTOff": "0,1,2,3"
2796 }, 2992 },
2797 { 2993 {
2994 "PublicDescription": "Counts all demand & prefetch RFOs that miss the L3 with no details on snoop-related information. Offcore response can be programmed only with a specific pair of event select and counter MSR, and with specific event codes and predefine mask bit value in a dedicated MSR to specify attributes of the offcore transaction.",
2798 "EventCode": "0xB7, 0xBB", 2995 "EventCode": "0xB7, 0xBB",
2799 "MSRValue": "0x00bc000122 ", 2996 "MSRValue": "0x00bc000122 ",
2800 "Counter": "0,1,2,3", 2997 "Counter": "0,1,2,3",
@@ -2807,6 +3004,7 @@
2807 "CounterHTOff": "0,1,2,3" 3004 "CounterHTOff": "0,1,2,3"
2808 }, 3005 },
2809 { 3006 {
3007 "PublicDescription": "tbd Offcore response can be programmed only with a specific pair of event select and counter MSR, and with specific event codes and predefine mask bit value in a dedicated MSR to specify attributes of the offcore transaction.",
2810 "EventCode": "0xB7, 0xBB", 3008 "EventCode": "0xB7, 0xBB",
2811 "MSRValue": "0x013c000122 ", 3009 "MSRValue": "0x013c000122 ",
2812 "Counter": "0,1,2,3", 3010 "Counter": "0,1,2,3",
@@ -2819,6 +3017,7 @@
2819 "CounterHTOff": "0,1,2,3" 3017 "CounterHTOff": "0,1,2,3"
2820 }, 3018 },
2821 { 3019 {
3020 "PublicDescription": "Counts all demand & prefetch RFOs that miss the L3 with a snoop miss response. Offcore response can be programmed only with a specific pair of event select and counter MSR, and with specific event codes and predefine mask bit value in a dedicated MSR to specify attributes of the offcore transaction.",
2822 "EventCode": "0xB7, 0xBB", 3021 "EventCode": "0xB7, 0xBB",
2823 "MSRValue": "0x023c000122 ", 3022 "MSRValue": "0x023c000122 ",
2824 "Counter": "0,1,2,3", 3023 "Counter": "0,1,2,3",
@@ -2831,6 +3030,7 @@
2831 "CounterHTOff": "0,1,2,3" 3030 "CounterHTOff": "0,1,2,3"
2832 }, 3031 },
2833 { 3032 {
3033 "PublicDescription": "tbd Offcore response can be programmed only with a specific pair of event select and counter MSR, and with specific event codes and predefine mask bit value in a dedicated MSR to specify attributes of the offcore transaction.",
2834 "EventCode": "0xB7, 0xBB", 3034 "EventCode": "0xB7, 0xBB",
2835 "MSRValue": "0x043c000122 ", 3035 "MSRValue": "0x043c000122 ",
2836 "Counter": "0,1,2,3", 3036 "Counter": "0,1,2,3",
diff --git a/tools/perf/pmu-events/arch/x86/broadwell/other.json b/tools/perf/pmu-events/arch/x86/broadwell/other.json
index edf14f0d0eaf..4f829c5febbe 100644
--- a/tools/perf/pmu-events/arch/x86/broadwell/other.json
+++ b/tools/perf/pmu-events/arch/x86/broadwell/other.json
@@ -10,16 +10,6 @@
10 "CounterHTOff": "0,1,2,3,4,5,6,7" 10 "CounterHTOff": "0,1,2,3,4,5,6,7"
11 }, 11 },
12 { 12 {
13 "PublicDescription": "This event counts unhalted core cycles during which the thread is in rings 1, 2, or 3.",
14 "EventCode": "0x5C",
15 "Counter": "0,1,2,3",
16 "UMask": "0x2",
17 "EventName": "CPL_CYCLES.RING123",
18 "SampleAfterValue": "2000003",
19 "BriefDescription": "Unhalted core cycles when thread is in rings 1, 2, or 3",
20 "CounterHTOff": "0,1,2,3,4,5,6,7"
21 },
22 {
23 "PublicDescription": "This event counts when there is a transition from ring 1,2 or 3 to ring0.", 13 "PublicDescription": "This event counts when there is a transition from ring 1,2 or 3 to ring0.",
24 "EventCode": "0x5C", 14 "EventCode": "0x5C",
25 "Counter": "0,1,2,3", 15 "Counter": "0,1,2,3",
@@ -32,6 +22,16 @@
32 "CounterHTOff": "0,1,2,3,4,5,6,7" 22 "CounterHTOff": "0,1,2,3,4,5,6,7"
33 }, 23 },
34 { 24 {
25 "PublicDescription": "This event counts unhalted core cycles during which the thread is in rings 1, 2, or 3.",
26 "EventCode": "0x5C",
27 "Counter": "0,1,2,3",
28 "UMask": "0x2",
29 "EventName": "CPL_CYCLES.RING123",
30 "SampleAfterValue": "2000003",
31 "BriefDescription": "Unhalted core cycles when thread is in rings 1, 2, or 3",
32 "CounterHTOff": "0,1,2,3,4,5,6,7"
33 },
34 {
35 "PublicDescription": "This event counts cycles in which the L1 and L2 are locked due to a UC lock or split lock. A lock is asserted in case of locked memory access, due to noncacheable memory, locked operation that spans two cache lines, or a page walk from the noncacheable page table. L1D and L2 locks have a very high performance penalty and it is highly recommended to avoid such access.", 35 "PublicDescription": "This event counts cycles in which the L1 and L2 are locked due to a UC lock or split lock. A lock is asserted in case of locked memory access, due to noncacheable memory, locked operation that spans two cache lines, or a page walk from the noncacheable page table. L1D and L2 locks have a very high performance penalty and it is highly recommended to avoid such access.",
36 "EventCode": "0x63", 36 "EventCode": "0x63",
37 "Counter": "0,1,2,3", 37 "Counter": "0,1,2,3",
diff --git a/tools/perf/pmu-events/arch/x86/broadwell/pipeline.json b/tools/perf/pmu-events/arch/x86/broadwell/pipeline.json
index 78913ae87703..97c5d0784c6c 100644
--- a/tools/perf/pmu-events/arch/x86/broadwell/pipeline.json
+++ b/tools/perf/pmu-events/arch/x86/broadwell/pipeline.json
@@ -2,32 +2,42 @@
2 { 2 {
3 "PublicDescription": "This event counts the number of instructions retired from execution. For instructions that consist of multiple micro-ops, this event counts the retirement of the last micro-op of the instruction. Counting continues during hardware interrupts, traps, and inside interrupt handlers. \nNotes: INST_RETIRED.ANY is counted by a designated fixed counter, leaving the four (eight when Hyperthreading is disabled) programmable counters available for other events. INST_RETIRED.ANY_P is counted by a programmable counter and it is an architectural performance event. \nCounting: Faulting executions of GETSEC/VM entry/VM Exit/MWait will not count as retired instructions.", 3 "PublicDescription": "This event counts the number of instructions retired from execution. For instructions that consist of multiple micro-ops, this event counts the retirement of the last micro-op of the instruction. Counting continues during hardware interrupts, traps, and inside interrupt handlers. \nNotes: INST_RETIRED.ANY is counted by a designated fixed counter, leaving the four (eight when Hyperthreading is disabled) programmable counters available for other events. INST_RETIRED.ANY_P is counted by a programmable counter and it is an architectural performance event. \nCounting: Faulting executions of GETSEC/VM entry/VM Exit/MWait will not count as retired instructions.",
4 "EventCode": "0x00", 4 "EventCode": "0x00",
5 "Counter": "Fixed counter 1", 5 "Counter": "Fixed counter 0",
6 "UMask": "0x1", 6 "UMask": "0x1",
7 "EventName": "INST_RETIRED.ANY", 7 "EventName": "INST_RETIRED.ANY",
8 "SampleAfterValue": "2000003", 8 "SampleAfterValue": "2000003",
9 "BriefDescription": "Instructions retired from execution.", 9 "BriefDescription": "Instructions retired from execution.",
10 "CounterHTOff": "Fixed counter 1" 10 "CounterHTOff": "Fixed counter 0"
11 }, 11 },
12 { 12 {
13 "PublicDescription": "This event counts the number of core cycles while the thread is not in a halt state. The thread enters the halt state when it is running the HLT instruction. This event is a component in many key event ratios. The core frequency may change from time to time due to transitions associated with Enhanced Intel SpeedStep Technology or TM2. For this reason this event may have a changing ratio with regards to time. When the core frequency is constant, this event can approximate elapsed time while the core was not in the halt state. It is counted on a dedicated fixed counter, leaving the four (eight when Hyperthreading is disabled) programmable counters available for other events.", 13 "PublicDescription": "This event counts the number of core cycles while the thread is not in a halt state. The thread enters the halt state when it is running the HLT instruction. This event is a component in many key event ratios. The core frequency may change from time to time due to transitions associated with Enhanced Intel SpeedStep Technology or TM2. For this reason this event may have a changing ratio with regards to time. When the core frequency is constant, this event can approximate elapsed time while the core was not in the halt state. It is counted on a dedicated fixed counter, leaving the four (eight when Hyperthreading is disabled) programmable counters available for other events.",
14 "EventCode": "0x00", 14 "EventCode": "0x00",
15 "Counter": "Fixed counter 2", 15 "Counter": "Fixed counter 1",
16 "UMask": "0x2", 16 "UMask": "0x2",
17 "EventName": "CPU_CLK_UNHALTED.THREAD", 17 "EventName": "CPU_CLK_UNHALTED.THREAD",
18 "SampleAfterValue": "2000003", 18 "SampleAfterValue": "2000003",
19 "BriefDescription": "Core cycles when the thread is not in halt state", 19 "BriefDescription": "Core cycles when the thread is not in halt state",
20 "CounterHTOff": "Fixed counter 2" 20 "CounterHTOff": "Fixed counter 1"
21 },
22 {
23 "EventCode": "0x00",
24 "Counter": "Fixed counter 1",
25 "UMask": "0x2",
26 "AnyThread": "1",
27 "EventName": "CPU_CLK_UNHALTED.THREAD_ANY",
28 "SampleAfterValue": "2000003",
29 "BriefDescription": "Core cycles when at least one thread on the physical core is not in halt state.",
30 "CounterHTOff": "Fixed counter 1"
21 }, 31 },
22 { 32 {
23 "PublicDescription": "This event counts the number of reference cycles when the core is not in a halt state. The core enters the halt state when it is running the HLT instruction or the MWAIT instruction. This event is not affected by core frequency changes (for example, P states, TM2 transitions) but has the same incrementing frequency as the time stamp counter. This event can approximate elapsed time while the core was not in a halt state. This event has a constant ratio with the CPU_CLK_UNHALTED.REF_XCLK event. It is counted on a dedicated fixed counter, leaving the four (eight when Hyperthreading is disabled) programmable counters available for other events. \nNote: On all current platforms this event stops counting during 'throttling (TM)' states duty off periods the processor is 'halted'. This event is clocked by base clock (100 Mhz) on Sandy Bridge. The counter update is done at a lower clock rate then the core clock the overflow status bit for this counter may appear 'sticky'. After the counter has overflowed and software clears the overflow status bit and resets the counter to less than MAX. The reset value to the counter is not clocked immediately so the overflow status bit will flip 'high (1)' and generate another PMI (if enabled) after which the reset value gets clocked into the counter. Therefore, software will get the interrupt, read the overflow status bit '1 for bit 34 while the counter value is less than MAX. Software should ignore this case.", 33 "PublicDescription": "This event counts the number of reference cycles when the core is not in a halt state. The core enters the halt state when it is running the HLT instruction or the MWAIT instruction. This event is not affected by core frequency changes (for example, P states, TM2 transitions) but has the same incrementing frequency as the time stamp counter. This event can approximate elapsed time while the core was not in a halt state. This event has a constant ratio with the CPU_CLK_UNHALTED.REF_XCLK event. It is counted on a dedicated fixed counter, leaving the four (eight when Hyperthreading is disabled) programmable counters available for other events. \nNote: On all current platforms this event stops counting during 'throttling (TM)' states duty off periods the processor is 'halted'. This event is clocked by base clock (100 Mhz) on Sandy Bridge. The counter update is done at a lower clock rate then the core clock the overflow status bit for this counter may appear 'sticky'. After the counter has overflowed and software clears the overflow status bit and resets the counter to less than MAX. The reset value to the counter is not clocked immediately so the overflow status bit will flip 'high (1)' and generate another PMI (if enabled) after which the reset value gets clocked into the counter. Therefore, software will get the interrupt, read the overflow status bit '1 for bit 34 while the counter value is less than MAX. Software should ignore this case.",
24 "EventCode": "0x00", 34 "EventCode": "0x00",
25 "Counter": "Fixed counter 3", 35 "Counter": "Fixed counter 2",
26 "UMask": "0x3", 36 "UMask": "0x3",
27 "EventName": "CPU_CLK_UNHALTED.REF_TSC", 37 "EventName": "CPU_CLK_UNHALTED.REF_TSC",
28 "SampleAfterValue": "2000003", 38 "SampleAfterValue": "2000003",
29 "BriefDescription": "Reference cycles when the core is not in halt state.", 39 "BriefDescription": "Reference cycles when the core is not in halt state.",
30 "CounterHTOff": "Fixed counter 3" 40 "CounterHTOff": "Fixed counter 2"
31 }, 41 },
32 { 42 {
33 "PublicDescription": "This event counts how many times the load operation got the true Block-on-Store blocking code preventing store forwarding. This includes cases when:\n - preceding store conflicts with the load (incomplete overlap);\n - store forwarding is impossible due to u-arch limitations;\n - preceding lock RMW operations are not forwarded;\n - store has the no-forward bit set (uncacheable/page-split/masked stores);\n - all-blocking stores are used (mostly, fences and port I/O);\nand others.\nThe most common case is a load blocked due to its address range overlapping with a preceding smaller uncompleted store. Note: This event does not take into account cases of out-of-SW-control (for example, SbTailHit), unknown physical STA, and cases of blocking loads on store due to being non-WB memory type or a lock. These cases are covered by other events.\nSee the table of not supported store forwards in the Optimization Guide.", 43 "PublicDescription": "This event counts how many times the load operation got the true Block-on-Store blocking code preventing store forwarding. This includes cases when:\n - preceding store conflicts with the load (incomplete overlap);\n - store forwarding is impossible due to u-arch limitations;\n - preceding lock RMW operations are not forwarded;\n - store has the no-forward bit set (uncacheable/page-split/masked stores);\n - all-blocking stores are used (mostly, fences and port I/O);\nand others.\nThe most common case is a load blocked due to its address range overlapping with a preceding smaller uncompleted store. Note: This event does not take into account cases of out-of-SW-control (for example, SbTailHit), unknown physical STA, and cases of blocking loads on store due to being non-WB memory type or a lock. These cases are covered by other events.\nSee the table of not supported store forwards in the Optimization Guide.",
@@ -59,27 +69,38 @@
59 "CounterHTOff": "0,1,2,3,4,5,6,7" 69 "CounterHTOff": "0,1,2,3,4,5,6,7"
60 }, 70 },
61 { 71 {
62 "PublicDescription": "This event counts the number of cycles during which Resource Allocation Table (RAT) external stall is sent to Instruction Decode Queue (IDQ) for the current thread. This also includes the cycles during which the Allocator is serving another thread.", 72 "PublicDescription": "Cycles checkpoints in Resource Allocation Table (RAT) are recovering from JEClear or machine clear.",
63 "EventCode": "0x0D", 73 "EventCode": "0x0D",
64 "Counter": "0,1,2,3", 74 "Counter": "0,1,2,3",
65 "UMask": "0x8", 75 "UMask": "0x3",
66 "EventName": "INT_MISC.RAT_STALL_CYCLES", 76 "EventName": "INT_MISC.RECOVERY_CYCLES",
67 "SampleAfterValue": "2000003", 77 "SampleAfterValue": "2000003",
68 "BriefDescription": "Cycles when Resource Allocation Table (RAT) external stall is sent to Instruction Decode Queue (IDQ) for the thread", 78 "BriefDescription": "Core cycles the allocator was stalled due to recovery from earlier clear event for this thread (e.g. misprediction or memory nuke)",
79 "CounterMask": "1",
69 "CounterHTOff": "0,1,2,3,4,5,6,7" 80 "CounterHTOff": "0,1,2,3,4,5,6,7"
70 }, 81 },
71 { 82 {
72 "PublicDescription": "Cycles checkpoints in Resource Allocation Table (RAT) are recovering from JEClear or machine clear.",
73 "EventCode": "0x0D", 83 "EventCode": "0x0D",
74 "Counter": "0,1,2,3", 84 "Counter": "0,1,2,3",
75 "UMask": "0x3", 85 "UMask": "0x3",
76 "EventName": "INT_MISC.RECOVERY_CYCLES", 86 "AnyThread": "1",
87 "EventName": "INT_MISC.RECOVERY_CYCLES_ANY",
77 "SampleAfterValue": "2000003", 88 "SampleAfterValue": "2000003",
78 "BriefDescription": "Number of cycles waiting for the checkpoints in Resource Allocation Table (RAT) to be recovered after Nuke due to all other cases except JEClear (e.g. whenever a ucode assist is needed like SSE exception, memory disambiguation, etc...)", 89 "BriefDescription": "Core cycles the allocator was stalled due to recovery from earlier clear event for any thread running on the physical core (e.g. misprediction or memory nuke).",
79 "CounterMask": "1", 90 "CounterMask": "1",
80 "CounterHTOff": "0,1,2,3,4,5,6,7" 91 "CounterHTOff": "0,1,2,3,4,5,6,7"
81 }, 92 },
82 { 93 {
94 "PublicDescription": "This event counts the number of cycles during which Resource Allocation Table (RAT) external stall is sent to Instruction Decode Queue (IDQ) for the current thread. This also includes the cycles during which the Allocator is serving another thread.",
95 "EventCode": "0x0D",
96 "Counter": "0,1,2,3",
97 "UMask": "0x8",
98 "EventName": "INT_MISC.RAT_STALL_CYCLES",
99 "SampleAfterValue": "2000003",
100 "BriefDescription": "Cycles when Resource Allocation Table (RAT) external stall is sent to Instruction Decode Queue (IDQ) for the thread",
101 "CounterHTOff": "0,1,2,3,4,5,6,7"
102 },
103 {
83 "PublicDescription": "This event counts the number of Uops issued by the Resource Allocation Table (RAT) to the reservation station (RS).", 104 "PublicDescription": "This event counts the number of Uops issued by the Resource Allocation Table (RAT) to the reservation station (RS).",
84 "EventCode": "0x0E", 105 "EventCode": "0x0E",
85 "Counter": "0,1,2,3", 106 "Counter": "0,1,2,3",
@@ -90,6 +111,18 @@
90 "CounterHTOff": "0,1,2,3,4,5,6,7" 111 "CounterHTOff": "0,1,2,3,4,5,6,7"
91 }, 112 },
92 { 113 {
114 "PublicDescription": "This event counts cycles during which the Resource Allocation Table (RAT) does not issue any Uops to the reservation station (RS) for the current thread.",
115 "EventCode": "0x0E",
116 "Invert": "1",
117 "Counter": "0,1,2,3",
118 "UMask": "0x1",
119 "EventName": "UOPS_ISSUED.STALL_CYCLES",
120 "SampleAfterValue": "2000003",
121 "BriefDescription": "Cycles when Resource Allocation Table (RAT) does not issue Uops to Reservation Station (RS) for the thread",
122 "CounterMask": "1",
123 "CounterHTOff": "0,1,2,3"
124 },
125 {
93 "PublicDescription": "Number of flags-merge uops being allocated. Such uops considered perf sensitive\n added by GSR u-arch.", 126 "PublicDescription": "Number of flags-merge uops being allocated. Such uops considered perf sensitive\n added by GSR u-arch.",
94 "EventCode": "0x0E", 127 "EventCode": "0x0E",
95 "Counter": "0,1,2,3", 128 "Counter": "0,1,2,3",
@@ -118,18 +151,6 @@
118 "CounterHTOff": "0,1,2,3,4,5,6,7" 151 "CounterHTOff": "0,1,2,3,4,5,6,7"
119 }, 152 },
120 { 153 {
121 "PublicDescription": "This event counts cycles during which the Resource Allocation Table (RAT) does not issue any Uops to the reservation station (RS) for the current thread.",
122 "EventCode": "0x0E",
123 "Invert": "1",
124 "Counter": "0,1,2,3",
125 "UMask": "0x1",
126 "EventName": "UOPS_ISSUED.STALL_CYCLES",
127 "SampleAfterValue": "2000003",
128 "BriefDescription": "Cycles when Resource Allocation Table (RAT) does not issue Uops to Reservation Station (RS) for the thread",
129 "CounterMask": "1",
130 "CounterHTOff": "0,1,2,3"
131 },
132 {
133 "PublicDescription": "This event counts the number of the divide operations executed. Uses edge-detect and a cmask value of 1 on ARITH.FPU_DIV_ACTIVE to get the number of the divide operations executed.", 154 "PublicDescription": "This event counts the number of the divide operations executed. Uses edge-detect and a cmask value of 1 on ARITH.FPU_DIV_ACTIVE to get the number of the divide operations executed.",
134 "EventCode": "0x14", 155 "EventCode": "0x14",
135 "Counter": "0,1,2,3", 156 "Counter": "0,1,2,3",
@@ -140,6 +161,26 @@
140 "CounterHTOff": "0,1,2,3,4,5,6,7" 161 "CounterHTOff": "0,1,2,3,4,5,6,7"
141 }, 162 },
142 { 163 {
164 "PublicDescription": "This is an architectural event that counts the number of thread cycles while the thread is not in a halt state. The thread enters the halt state when it is running the HLT instruction. The core frequency may change from time to time due to power or thermal throttling. For this reason, this event may have a changing ratio with regards to wall clock time.",
165 "EventCode": "0x3C",
166 "Counter": "0,1,2,3",
167 "UMask": "0x0",
168 "EventName": "CPU_CLK_UNHALTED.THREAD_P",
169 "SampleAfterValue": "2000003",
170 "BriefDescription": "Thread cycles when thread is not in halt state",
171 "CounterHTOff": "0,1,2,3,4,5,6,7"
172 },
173 {
174 "EventCode": "0x3C",
175 "Counter": "0,1,2,3",
176 "UMask": "0x0",
177 "AnyThread": "1",
178 "EventName": "CPU_CLK_UNHALTED.THREAD_P_ANY",
179 "SampleAfterValue": "2000003",
180 "BriefDescription": "Core cycles when at least one thread on the physical core is not in halt state.",
181 "CounterHTOff": "0,1,2,3,4,5,6,7"
182 },
183 {
143 "PublicDescription": "This is a fixed-frequency event programmed to general counters. It counts when the core is unhalted at 100 Mhz.", 184 "PublicDescription": "This is a fixed-frequency event programmed to general counters. It counts when the core is unhalted at 100 Mhz.",
144 "EventCode": "0x3C", 185 "EventCode": "0x3C",
145 "Counter": "0,1,2,3", 186 "Counter": "0,1,2,3",
@@ -150,6 +191,36 @@
150 "CounterHTOff": "0,1,2,3,4,5,6,7" 191 "CounterHTOff": "0,1,2,3,4,5,6,7"
151 }, 192 },
152 { 193 {
194 "EventCode": "0x3C",
195 "Counter": "0,1,2,3",
196 "UMask": "0x1",
197 "AnyThread": "1",
198 "EventName": "CPU_CLK_THREAD_UNHALTED.REF_XCLK_ANY",
199 "SampleAfterValue": "2000003",
200 "BriefDescription": "Reference cycles when the at least one thread on the physical core is unhalted (counts at 100 MHz rate).",
201 "CounterHTOff": "0,1,2,3,4,5,6,7"
202 },
203 {
204 "PublicDescription": "Reference cycles when the thread is unhalted (counts at 100 MHz rate).",
205 "EventCode": "0x3C",
206 "Counter": "0,1,2,3",
207 "UMask": "0x1",
208 "EventName": "CPU_CLK_UNHALTED.REF_XCLK",
209 "SampleAfterValue": "2000003",
210 "BriefDescription": "Reference cycles when the thread is unhalted (counts at 100 MHz rate)",
211 "CounterHTOff": "0,1,2,3,4,5,6,7"
212 },
213 {
214 "EventCode": "0x3C",
215 "Counter": "0,1,2,3",
216 "UMask": "0x1",
217 "AnyThread": "1",
218 "EventName": "CPU_CLK_UNHALTED.REF_XCLK_ANY",
219 "SampleAfterValue": "2000003",
220 "BriefDescription": "Reference cycles when the at least one thread on the physical core is unhalted (counts at 100 MHz rate).",
221 "CounterHTOff": "0,1,2,3,4,5,6,7"
222 },
223 {
153 "EventCode": "0x3c", 224 "EventCode": "0x3c",
154 "Counter": "0,1,2,3", 225 "Counter": "0,1,2,3",
155 "UMask": "0x2", 226 "UMask": "0x2",
@@ -159,6 +230,15 @@
159 "CounterHTOff": "0,1,2,3" 230 "CounterHTOff": "0,1,2,3"
160 }, 231 },
161 { 232 {
233 "EventCode": "0x3C",
234 "Counter": "0,1,2,3",
235 "UMask": "0x2",
236 "EventName": "CPU_CLK_UNHALTED.ONE_THREAD_ACTIVE",
237 "SampleAfterValue": "2000003",
238 "BriefDescription": "Count XClk pulses when this thread is unhalted and the other thread is halted.",
239 "CounterHTOff": "0,1,2,3,4,5,6,7"
240 },
241 {
162 "PublicDescription": "This event counts all not software-prefetch load dispatches that hit the fill buffer (FB) allocated for the software prefetch. It can also be incremented by some lock instructions. So it should only be used with profiling so that the locks can be excluded by asm inspection of the nearby instructions.", 242 "PublicDescription": "This event counts all not software-prefetch load dispatches that hit the fill buffer (FB) allocated for the software prefetch. It can also be incremented by some lock instructions. So it should only be used with profiling so that the locks can be excluded by asm inspection of the nearby instructions.",
163 "EventCode": "0x4c", 243 "EventCode": "0x4c",
164 "Counter": "0,1,2,3", 244 "Counter": "0,1,2,3",
@@ -225,6 +305,18 @@
225 "CounterHTOff": "0,1,2,3,4,5,6,7" 305 "CounterHTOff": "0,1,2,3,4,5,6,7"
226 }, 306 },
227 { 307 {
308 "EventCode": "0x5E",
309 "Invert": "1",
310 "Counter": "0,1,2,3",
311 "UMask": "0x1",
312 "EdgeDetect": "1",
313 "EventName": "RS_EVENTS.EMPTY_END",
314 "SampleAfterValue": "200003",
315 "BriefDescription": "Counts end of periods where the Reservation Station (RS) was empty. Could be useful to precisely locate Frontend Latency Bound issues.",
316 "CounterMask": "1",
317 "CounterHTOff": "0,1,2,3,4,5,6,7"
318 },
319 {
228 "PublicDescription": "This event counts stalls occured due to changing prefix length (66, 67 or REX.W when they change the length of the decoded instruction). Occurrences counting is proportional to the number of prefixes in a 16B-line. This may result in the following penalties: three-cycle penalty for each LCP in a 16-byte chunk.", 320 "PublicDescription": "This event counts stalls occured due to changing prefix length (66, 67 or REX.W when they change the length of the decoded instruction). Occurrences counting is proportional to the number of prefixes in a 16B-line. This may result in the following penalties: three-cycle penalty for each LCP in a 16-byte chunk.",
229 "EventCode": "0x87", 321 "EventCode": "0x87",
230 "Counter": "0,1,2,3", 322 "Counter": "0,1,2,3",
@@ -405,6 +497,15 @@
405 "CounterHTOff": "0,1,2,3,4,5,6,7" 497 "CounterHTOff": "0,1,2,3,4,5,6,7"
406 }, 498 },
407 { 499 {
500 "EventCode": "0x89",
501 "Counter": "0,1,2,3",
502 "UMask": "0xa0",
503 "EventName": "BR_MISP_EXEC.TAKEN_INDIRECT_NEAR_CALL",
504 "SampleAfterValue": "200003",
505 "BriefDescription": "Taken speculative and retired mispredicted indirect calls.",
506 "CounterHTOff": "0,1,2,3,4,5,6,7"
507 },
508 {
408 "PublicDescription": "This event counts both taken and not taken speculative and retired mispredicted macro conditional branch instructions.", 509 "PublicDescription": "This event counts both taken and not taken speculative and retired mispredicted macro conditional branch instructions.",
409 "EventCode": "0x89", 510 "EventCode": "0x89",
410 "Counter": "0,1,2,3", 511 "Counter": "0,1,2,3",
@@ -435,6 +536,16 @@
435 "CounterHTOff": "0,1,2,3,4,5,6,7" 536 "CounterHTOff": "0,1,2,3,4,5,6,7"
436 }, 537 },
437 { 538 {
539 "PublicDescription": "This event counts the number of micro-operations cancelled after they were dispatched from the scheduler to the execution units when the total number of physical register read ports across all dispatch ports exceeds the read bandwidth of the physical register file. The SIMD_PRF subevent applies to the following instructions: VDPPS, DPPS, VPCMPESTRI, PCMPESTRI, VPCMPESTRM, PCMPESTRM, VFMADD*, VFMADDSUB*, VFMSUB*, VMSUBADD*, VFNMADD*, VFNMSUB*. See the Broadwell Optimization Guide for more information.",
540 "EventCode": "0xA0",
541 "Counter": "0,1,2,3",
542 "UMask": "0x3",
543 "EventName": "UOP_DISPATCHES_CANCELLED.SIMD_PRF",
544 "SampleAfterValue": "2000003",
545 "BriefDescription": "Micro-op dispatches cancelled due to insufficient SIMD physical register file read ports",
546 "CounterHTOff": "0,1,2,3"
547 },
548 {
438 "PublicDescription": "This event counts, on the per-thread basis, cycles during which uops are dispatched from the Reservation Station (RS) to port 0.", 549 "PublicDescription": "This event counts, on the per-thread basis, cycles during which uops are dispatched from the Reservation Station (RS) to port 0.",
439 "EventCode": "0xA1", 550 "EventCode": "0xA1",
440 "Counter": "0,1,2,3", 551 "Counter": "0,1,2,3",
@@ -445,6 +556,26 @@
445 "CounterHTOff": "0,1,2,3,4,5,6,7" 556 "CounterHTOff": "0,1,2,3,4,5,6,7"
446 }, 557 },
447 { 558 {
559 "EventCode": "0xA1",
560 "Counter": "0,1,2,3",
561 "UMask": "0x1",
562 "AnyThread": "1",
563 "EventName": "UOPS_EXECUTED_PORT.PORT_0_CORE",
564 "SampleAfterValue": "2000003",
565 "BriefDescription": "Cycles per core when uops are exectuted in port 0.",
566 "CounterHTOff": "0,1,2,3,4,5,6,7"
567 },
568 {
569 "PublicDescription": "This event counts, on the per-thread basis, cycles during which uops are dispatched from the Reservation Station (RS) to port 0.",
570 "EventCode": "0xA1",
571 "Counter": "0,1,2,3",
572 "UMask": "0x1",
573 "EventName": "UOPS_EXECUTED_PORT.PORT_0",
574 "SampleAfterValue": "2000003",
575 "BriefDescription": "Cycles per thread when uops are executed in port 0",
576 "CounterHTOff": "0,1,2,3,4,5,6,7"
577 },
578 {
448 "PublicDescription": "This event counts, on the per-thread basis, cycles during which uops are dispatched from the Reservation Station (RS) to port 1.", 579 "PublicDescription": "This event counts, on the per-thread basis, cycles during which uops are dispatched from the Reservation Station (RS) to port 1.",
449 "EventCode": "0xA1", 580 "EventCode": "0xA1",
450 "Counter": "0,1,2,3", 581 "Counter": "0,1,2,3",
@@ -455,6 +586,26 @@
455 "CounterHTOff": "0,1,2,3,4,5,6,7" 586 "CounterHTOff": "0,1,2,3,4,5,6,7"
456 }, 587 },
457 { 588 {
589 "EventCode": "0xA1",
590 "Counter": "0,1,2,3",
591 "UMask": "0x2",
592 "AnyThread": "1",
593 "EventName": "UOPS_EXECUTED_PORT.PORT_1_CORE",
594 "SampleAfterValue": "2000003",
595 "BriefDescription": "Cycles per core when uops are exectuted in port 1.",
596 "CounterHTOff": "0,1,2,3,4,5,6,7"
597 },
598 {
599 "PublicDescription": "This event counts, on the per-thread basis, cycles during which uops are dispatched from the Reservation Station (RS) to port 1.",
600 "EventCode": "0xA1",
601 "Counter": "0,1,2,3",
602 "UMask": "0x2",
603 "EventName": "UOPS_EXECUTED_PORT.PORT_1",
604 "SampleAfterValue": "2000003",
605 "BriefDescription": "Cycles per thread when uops are executed in port 1",
606 "CounterHTOff": "0,1,2,3,4,5,6,7"
607 },
608 {
458 "PublicDescription": "This event counts, on the per-thread basis, cycles during which uops are dispatched from the Reservation Station (RS) to port 2.", 609 "PublicDescription": "This event counts, on the per-thread basis, cycles during which uops are dispatched from the Reservation Station (RS) to port 2.",
459 "EventCode": "0xA1", 610 "EventCode": "0xA1",
460 "Counter": "0,1,2,3", 611 "Counter": "0,1,2,3",
@@ -465,6 +616,26 @@
465 "CounterHTOff": "0,1,2,3,4,5,6,7" 616 "CounterHTOff": "0,1,2,3,4,5,6,7"
466 }, 617 },
467 { 618 {
619 "EventCode": "0xA1",
620 "Counter": "0,1,2,3",
621 "UMask": "0x4",
622 "AnyThread": "1",
623 "EventName": "UOPS_EXECUTED_PORT.PORT_2_CORE",
624 "SampleAfterValue": "2000003",
625 "BriefDescription": "Cycles per core when uops are dispatched to port 2.",
626 "CounterHTOff": "0,1,2,3,4,5,6,7"
627 },
628 {
629 "PublicDescription": "This event counts, on the per-thread basis, cycles during which uops are dispatched from the Reservation Station (RS) to port 2.",
630 "EventCode": "0xA1",
631 "Counter": "0,1,2,3",
632 "UMask": "0x4",
633 "EventName": "UOPS_EXECUTED_PORT.PORT_2",
634 "SampleAfterValue": "2000003",
635 "BriefDescription": "Cycles per thread when uops are executed in port 2",
636 "CounterHTOff": "0,1,2,3,4,5,6,7"
637 },
638 {
468 "PublicDescription": "This event counts, on the per-thread basis, cycles during which uops are dispatched from the Reservation Station (RS) to port 3.", 639 "PublicDescription": "This event counts, on the per-thread basis, cycles during which uops are dispatched from the Reservation Station (RS) to port 3.",
469 "EventCode": "0xA1", 640 "EventCode": "0xA1",
470 "Counter": "0,1,2,3", 641 "Counter": "0,1,2,3",
@@ -475,6 +646,26 @@
475 "CounterHTOff": "0,1,2,3,4,5,6,7" 646 "CounterHTOff": "0,1,2,3,4,5,6,7"
476 }, 647 },
477 { 648 {
649 "EventCode": "0xA1",
650 "Counter": "0,1,2,3",
651 "UMask": "0x8",
652 "AnyThread": "1",
653 "EventName": "UOPS_EXECUTED_PORT.PORT_3_CORE",
654 "SampleAfterValue": "2000003",
655 "BriefDescription": "Cycles per core when uops are dispatched to port 3.",
656 "CounterHTOff": "0,1,2,3,4,5,6,7"
657 },
658 {
659 "PublicDescription": "This event counts, on the per-thread basis, cycles during which uops are dispatched from the Reservation Station (RS) to port 3.",
660 "EventCode": "0xA1",
661 "Counter": "0,1,2,3",
662 "UMask": "0x8",
663 "EventName": "UOPS_EXECUTED_PORT.PORT_3",
664 "SampleAfterValue": "2000003",
665 "BriefDescription": "Cycles per thread when uops are executed in port 3",
666 "CounterHTOff": "0,1,2,3,4,5,6,7"
667 },
668 {
478 "PublicDescription": "This event counts, on the per-thread basis, cycles during which uops are dispatched from the Reservation Station (RS) to port 4.", 669 "PublicDescription": "This event counts, on the per-thread basis, cycles during which uops are dispatched from the Reservation Station (RS) to port 4.",
479 "EventCode": "0xA1", 670 "EventCode": "0xA1",
480 "Counter": "0,1,2,3", 671 "Counter": "0,1,2,3",
@@ -485,6 +676,26 @@
485 "CounterHTOff": "0,1,2,3,4,5,6,7" 676 "CounterHTOff": "0,1,2,3,4,5,6,7"
486 }, 677 },
487 { 678 {
679 "EventCode": "0xA1",
680 "Counter": "0,1,2,3",
681 "UMask": "0x10",
682 "AnyThread": "1",
683 "EventName": "UOPS_EXECUTED_PORT.PORT_4_CORE",
684 "SampleAfterValue": "2000003",
685 "BriefDescription": "Cycles per core when uops are exectuted in port 4.",
686 "CounterHTOff": "0,1,2,3,4,5,6,7"
687 },
688 {
689 "PublicDescription": "This event counts, on the per-thread basis, cycles during which uops are dispatched from the Reservation Station (RS) to port 4.",
690 "EventCode": "0xA1",
691 "Counter": "0,1,2,3",
692 "UMask": "0x10",
693 "EventName": "UOPS_EXECUTED_PORT.PORT_4",
694 "SampleAfterValue": "2000003",
695 "BriefDescription": "Cycles per thread when uops are executed in port 4",
696 "CounterHTOff": "0,1,2,3,4,5,6,7"
697 },
698 {
488 "PublicDescription": "This event counts, on the per-thread basis, cycles during which uops are dispatched from the Reservation Station (RS) to port 5.", 699 "PublicDescription": "This event counts, on the per-thread basis, cycles during which uops are dispatched from the Reservation Station (RS) to port 5.",
489 "EventCode": "0xA1", 700 "EventCode": "0xA1",
490 "Counter": "0,1,2,3", 701 "Counter": "0,1,2,3",
@@ -495,6 +706,26 @@
495 "CounterHTOff": "0,1,2,3,4,5,6,7" 706 "CounterHTOff": "0,1,2,3,4,5,6,7"
496 }, 707 },
497 { 708 {
709 "EventCode": "0xA1",
710 "Counter": "0,1,2,3",
711 "UMask": "0x20",
712 "AnyThread": "1",
713 "EventName": "UOPS_EXECUTED_PORT.PORT_5_CORE",
714 "SampleAfterValue": "2000003",
715 "BriefDescription": "Cycles per core when uops are exectuted in port 5.",
716 "CounterHTOff": "0,1,2,3,4,5,6,7"
717 },
718 {
719 "PublicDescription": "This event counts, on the per-thread basis, cycles during which uops are dispatched from the Reservation Station (RS) to port 5.",
720 "EventCode": "0xA1",
721 "Counter": "0,1,2,3",
722 "UMask": "0x20",
723 "EventName": "UOPS_EXECUTED_PORT.PORT_5",
724 "SampleAfterValue": "2000003",
725 "BriefDescription": "Cycles per thread when uops are executed in port 5",
726 "CounterHTOff": "0,1,2,3,4,5,6,7"
727 },
728 {
498 "PublicDescription": "This event counts, on the per-thread basis, cycles during which uops are dispatched from the Reservation Station (RS) to port 6.", 729 "PublicDescription": "This event counts, on the per-thread basis, cycles during which uops are dispatched from the Reservation Station (RS) to port 6.",
499 "EventCode": "0xA1", 730 "EventCode": "0xA1",
500 "Counter": "0,1,2,3", 731 "Counter": "0,1,2,3",
@@ -505,6 +736,26 @@
505 "CounterHTOff": "0,1,2,3,4,5,6,7" 736 "CounterHTOff": "0,1,2,3,4,5,6,7"
506 }, 737 },
507 { 738 {
739 "EventCode": "0xA1",
740 "Counter": "0,1,2,3",
741 "UMask": "0x40",
742 "AnyThread": "1",
743 "EventName": "UOPS_EXECUTED_PORT.PORT_6_CORE",
744 "SampleAfterValue": "2000003",
745 "BriefDescription": "Cycles per core when uops are exectuted in port 6.",
746 "CounterHTOff": "0,1,2,3,4,5,6,7"
747 },
748 {
749 "PublicDescription": "This event counts, on the per-thread basis, cycles during which uops are dispatched from the Reservation Station (RS) to port 6.",
750 "EventCode": "0xA1",
751 "Counter": "0,1,2,3",
752 "UMask": "0x40",
753 "EventName": "UOPS_EXECUTED_PORT.PORT_6",
754 "SampleAfterValue": "2000003",
755 "BriefDescription": "Cycles per thread when uops are executed in port 6",
756 "CounterHTOff": "0,1,2,3,4,5,6,7"
757 },
758 {
508 "PublicDescription": "This event counts, on the per-thread basis, cycles during which uops are dispatched from the Reservation Station (RS) to port 7.", 759 "PublicDescription": "This event counts, on the per-thread basis, cycles during which uops are dispatched from the Reservation Station (RS) to port 7.",
509 "EventCode": "0xA1", 760 "EventCode": "0xA1",
510 "Counter": "0,1,2,3", 761 "Counter": "0,1,2,3",
@@ -515,6 +766,26 @@
515 "CounterHTOff": "0,1,2,3,4,5,6,7" 766 "CounterHTOff": "0,1,2,3,4,5,6,7"
516 }, 767 },
517 { 768 {
769 "EventCode": "0xA1",
770 "Counter": "0,1,2,3",
771 "UMask": "0x80",
772 "AnyThread": "1",
773 "EventName": "UOPS_EXECUTED_PORT.PORT_7_CORE",
774 "SampleAfterValue": "2000003",
775 "BriefDescription": "Cycles per core when uops are dispatched to port 7.",
776 "CounterHTOff": "0,1,2,3,4,5,6,7"
777 },
778 {
779 "PublicDescription": "This event counts, on the per-thread basis, cycles during which uops are dispatched from the Reservation Station (RS) to port 7.",
780 "EventCode": "0xA1",
781 "Counter": "0,1,2,3",
782 "UMask": "0x80",
783 "EventName": "UOPS_EXECUTED_PORT.PORT_7",
784 "SampleAfterValue": "2000003",
785 "BriefDescription": "Cycles per thread when uops are executed in port 7",
786 "CounterHTOff": "0,1,2,3,4,5,6,7"
787 },
788 {
518 "PublicDescription": "This event counts resource-related stall cycles. Reasons for stalls can be as follows:\n - *any* u-arch structure got full (LB, SB, RS, ROB, BOB, LM, Physical Register Reclaim Table (PRRT), or Physical History Table (PHT) slots)\n - *any* u-arch structure got empty (like INT/SIMD FreeLists)\n - FPU control word (FPCW), MXCSR\nand others. This counts cycles that the pipeline backend blocked uop delivery from the front end.", 789 "PublicDescription": "This event counts resource-related stall cycles. Reasons for stalls can be as follows:\n - *any* u-arch structure got full (LB, SB, RS, ROB, BOB, LM, Physical Register Reclaim Table (PRRT), or Physical History Table (PHT) slots)\n - *any* u-arch structure got empty (like INT/SIMD FreeLists)\n - FPU control word (FPCW), MXCSR\nand others. This counts cycles that the pipeline backend blocked uop delivery from the front end.",
519 "EventCode": "0xA2", 790 "EventCode": "0xA2",
520 "Counter": "0,1,2,3", 791 "Counter": "0,1,2,3",
@@ -566,15 +837,14 @@
566 "CounterHTOff": "0,1,2,3,4,5,6,7" 837 "CounterHTOff": "0,1,2,3,4,5,6,7"
567 }, 838 },
568 { 839 {
569 "PublicDescription": "Counts number of cycles the CPU has at least one pending demand load request missing the L1 data cache.",
570 "EventCode": "0xA3", 840 "EventCode": "0xA3",
571 "Counter": "2", 841 "Counter": "0,1,2,3",
572 "UMask": "0x8", 842 "UMask": "0x1",
573 "EventName": "CYCLE_ACTIVITY.CYCLES_L1D_PENDING", 843 "EventName": "CYCLE_ACTIVITY.CYCLES_L2_MISS",
574 "SampleAfterValue": "2000003", 844 "SampleAfterValue": "2000003",
575 "BriefDescription": "Cycles while L1 cache miss demand load is outstanding.", 845 "BriefDescription": "Cycles while L2 cache miss demand load is outstanding.",
576 "CounterMask": "8", 846 "CounterMask": "1",
577 "CounterHTOff": "2" 847 "CounterHTOff": "0,1,2,3,4,5,6,7"
578 }, 848 },
579 { 849 {
580 "PublicDescription": "Counts number of cycles the CPU has at least one pending demand load request (that is cycles with non-completed load waiting for its data from memory subsystem).", 850 "PublicDescription": "Counts number of cycles the CPU has at least one pending demand load request (that is cycles with non-completed load waiting for its data from memory subsystem).",
@@ -588,17 +858,37 @@
588 "CounterHTOff": "0,1,2,3,4,5,6,7" 858 "CounterHTOff": "0,1,2,3,4,5,6,7"
589 }, 859 },
590 { 860 {
861 "EventCode": "0xA3",
862 "Counter": "0,1,2,3",
863 "UMask": "0x2",
864 "EventName": "CYCLE_ACTIVITY.CYCLES_MEM_ANY",
865 "SampleAfterValue": "2000003",
866 "BriefDescription": "Cycles while memory subsystem has an outstanding load.",
867 "CounterMask": "2",
868 "CounterHTOff": "0,1,2,3"
869 },
870 {
591 "PublicDescription": "Counts number of cycles nothing is executed on any execution port.", 871 "PublicDescription": "Counts number of cycles nothing is executed on any execution port.",
592 "EventCode": "0xA3", 872 "EventCode": "0xA3",
593 "Counter": "0,1,2,3", 873 "Counter": "0,1,2,3",
594 "UMask": "0x4", 874 "UMask": "0x4",
595 "EventName": "CYCLE_ACTIVITY.CYCLES_NO_EXECUTE", 875 "EventName": "CYCLE_ACTIVITY.CYCLES_NO_EXECUTE",
596 "SampleAfterValue": "2000003", 876 "SampleAfterValue": "2000003",
597 "BriefDescription": "Total execution stalls", 877 "BriefDescription": "This event increments by 1 for every cycle where there was no execute for this thread.",
598 "CounterMask": "4", 878 "CounterMask": "4",
599 "CounterHTOff": "0,1,2,3" 879 "CounterHTOff": "0,1,2,3"
600 }, 880 },
601 { 881 {
882 "EventCode": "0xA3",
883 "Counter": "0,1,2,3",
884 "UMask": "0x4",
885 "EventName": "CYCLE_ACTIVITY.STALLS_TOTAL",
886 "SampleAfterValue": "2000003",
887 "BriefDescription": "Total execution stalls.",
888 "CounterMask": "4",
889 "CounterHTOff": "0,1,2,3,4,5,6,7"
890 },
891 {
602 "PublicDescription": "Counts number of cycles nothing is executed on any execution port, while there was at least one pending demand* load request missing the L2 cache.(as a footprint) * includes also L1 HW prefetch requests that may or may not be required by demands.", 892 "PublicDescription": "Counts number of cycles nothing is executed on any execution port, while there was at least one pending demand* load request missing the L2 cache.(as a footprint) * includes also L1 HW prefetch requests that may or may not be required by demands.",
603 "EventCode": "0xA3", 893 "EventCode": "0xA3",
604 "Counter": "0,1,2,3", 894 "Counter": "0,1,2,3",
@@ -610,6 +900,16 @@
610 "CounterHTOff": "0,1,2,3" 900 "CounterHTOff": "0,1,2,3"
611 }, 901 },
612 { 902 {
903 "EventCode": "0xA3",
904 "Counter": "0,1,2,3",
905 "UMask": "0x5",
906 "EventName": "CYCLE_ACTIVITY.STALLS_L2_MISS",
907 "SampleAfterValue": "2000003",
908 "BriefDescription": "Execution stalls while L2 cache miss demand load is outstanding.",
909 "CounterMask": "5",
910 "CounterHTOff": "0,1,2,3,4,5,6,7"
911 },
912 {
613 "PublicDescription": "Counts number of cycles nothing is executed on any execution port, while there was at least one pending demand load request.", 913 "PublicDescription": "Counts number of cycles nothing is executed on any execution port, while there was at least one pending demand load request.",
614 "EventCode": "0xA3", 914 "EventCode": "0xA3",
615 "Counter": "0,1,2,3", 915 "Counter": "0,1,2,3",
@@ -621,6 +921,37 @@
621 "CounterHTOff": "0,1,2,3" 921 "CounterHTOff": "0,1,2,3"
622 }, 922 },
623 { 923 {
924 "EventCode": "0xA3",
925 "Counter": "0,1,2,3",
926 "UMask": "0x6",
927 "EventName": "CYCLE_ACTIVITY.STALLS_MEM_ANY",
928 "SampleAfterValue": "2000003",
929 "BriefDescription": "Execution stalls while memory subsystem has an outstanding load.",
930 "CounterMask": "6",
931 "CounterHTOff": "0,1,2,3,4,5,6,7"
932 },
933 {
934 "PublicDescription": "Counts number of cycles the CPU has at least one pending demand load request missing the L1 data cache.",
935 "EventCode": "0xA3",
936 "Counter": "2",
937 "UMask": "0x8",
938 "EventName": "CYCLE_ACTIVITY.CYCLES_L1D_PENDING",
939 "SampleAfterValue": "2000003",
940 "BriefDescription": "Cycles while L1 cache miss demand load is outstanding.",
941 "CounterMask": "8",
942 "CounterHTOff": "2"
943 },
944 {
945 "EventCode": "0xA3",
946 "Counter": "2",
947 "UMask": "0x8",
948 "EventName": "CYCLE_ACTIVITY.CYCLES_L1D_MISS",
949 "SampleAfterValue": "2000003",
950 "BriefDescription": "Cycles while L1 cache miss demand load is outstanding.",
951 "CounterMask": "8",
952 "CounterHTOff": "2"
953 },
954 {
624 "PublicDescription": "Counts number of cycles nothing is executed on any execution port, while there was at least one pending demand load request missing the L1 data cache.", 955 "PublicDescription": "Counts number of cycles nothing is executed on any execution port, while there was at least one pending demand load request missing the L1 data cache.",
625 "EventCode": "0xA3", 956 "EventCode": "0xA3",
626 "Counter": "2", 957 "Counter": "2",
@@ -632,7 +963,16 @@
632 "CounterHTOff": "2" 963 "CounterHTOff": "2"
633 }, 964 },
634 { 965 {
635 "PublicDescription": "Number of Uops delivered by the LSD. ", 966 "EventCode": "0xA3",
967 "Counter": "2",
968 "UMask": "0xc",
969 "EventName": "CYCLE_ACTIVITY.STALLS_L1D_MISS",
970 "SampleAfterValue": "2000003",
971 "BriefDescription": "Execution stalls while L1 cache miss demand load is outstanding.",
972 "CounterMask": "12",
973 "CounterHTOff": "2"
974 },
975 {
636 "EventCode": "0xA8", 976 "EventCode": "0xA8",
637 "Counter": "0,1,2,3", 977 "Counter": "0,1,2,3",
638 "UMask": "0x1", 978 "UMask": "0x1",
@@ -642,6 +982,26 @@
642 "CounterHTOff": "0,1,2,3,4,5,6,7" 982 "CounterHTOff": "0,1,2,3,4,5,6,7"
643 }, 983 },
644 { 984 {
985 "EventCode": "0xA8",
986 "Counter": "0,1,2,3",
987 "UMask": "0x1",
988 "EventName": "LSD.CYCLES_4_UOPS",
989 "SampleAfterValue": "2000003",
990 "BriefDescription": "Cycles 4 Uops delivered by the LSD, but didn't come from the decoder.",
991 "CounterMask": "4",
992 "CounterHTOff": "0,1,2,3,4,5,6,7"
993 },
994 {
995 "EventCode": "0xA8",
996 "Counter": "0,1,2,3",
997 "UMask": "0x1",
998 "EventName": "LSD.CYCLES_ACTIVE",
999 "SampleAfterValue": "2000003",
1000 "BriefDescription": "Cycles Uops delivered by the LSD, but didn't come from the decoder.",
1001 "CounterMask": "1",
1002 "CounterHTOff": "0,1,2,3,4,5,6,7"
1003 },
1004 {
645 "PublicDescription": "Number of uops to be executed per-thread each cycle.", 1005 "PublicDescription": "Number of uops to be executed per-thread each cycle.",
646 "EventCode": "0xB1", 1006 "EventCode": "0xB1",
647 "Counter": "0,1,2,3", 1007 "Counter": "0,1,2,3",
@@ -652,6 +1012,58 @@
652 "CounterHTOff": "0,1,2,3,4,5,6,7" 1012 "CounterHTOff": "0,1,2,3,4,5,6,7"
653 }, 1013 },
654 { 1014 {
1015 "PublicDescription": "This event counts cycles during which no uops were dispatched from the Reservation Station (RS) per thread.",
1016 "EventCode": "0xB1",
1017 "Invert": "1",
1018 "Counter": "0,1,2,3",
1019 "UMask": "0x1",
1020 "EventName": "UOPS_EXECUTED.STALL_CYCLES",
1021 "SampleAfterValue": "2000003",
1022 "BriefDescription": "Counts number of cycles no uops were dispatched to be executed on this thread.",
1023 "CounterMask": "1",
1024 "CounterHTOff": "0,1,2,3"
1025 },
1026 {
1027 "EventCode": "0xB1",
1028 "Counter": "0,1,2,3",
1029 "UMask": "0x1",
1030 "EventName": "UOPS_EXECUTED.CYCLES_GE_1_UOP_EXEC",
1031 "SampleAfterValue": "2000003",
1032 "BriefDescription": "Cycles where at least 1 uop was executed per-thread.",
1033 "CounterMask": "1",
1034 "CounterHTOff": "0,1,2,3"
1035 },
1036 {
1037 "EventCode": "0xB1",
1038 "Counter": "0,1,2,3",
1039 "UMask": "0x1",
1040 "EventName": "UOPS_EXECUTED.CYCLES_GE_2_UOPS_EXEC",
1041 "SampleAfterValue": "2000003",
1042 "BriefDescription": "Cycles where at least 2 uops were executed per-thread.",
1043 "CounterMask": "2",
1044 "CounterHTOff": "0,1,2,3"
1045 },
1046 {
1047 "EventCode": "0xB1",
1048 "Counter": "0,1,2,3",
1049 "UMask": "0x1",
1050 "EventName": "UOPS_EXECUTED.CYCLES_GE_3_UOPS_EXEC",
1051 "SampleAfterValue": "2000003",
1052 "BriefDescription": "Cycles where at least 3 uops were executed per-thread.",
1053 "CounterMask": "3",
1054 "CounterHTOff": "0,1,2,3"
1055 },
1056 {
1057 "EventCode": "0xB1",
1058 "Counter": "0,1,2,3",
1059 "UMask": "0x1",
1060 "EventName": "UOPS_EXECUTED.CYCLES_GE_4_UOPS_EXEC",
1061 "SampleAfterValue": "2000003",
1062 "BriefDescription": "Cycles where at least 4 uops were executed per-thread.",
1063 "CounterMask": "4",
1064 "CounterHTOff": "0,1,2,3"
1065 },
1066 {
655 "PublicDescription": "Number of uops executed from any thread.", 1067 "PublicDescription": "Number of uops executed from any thread.",
656 "EventCode": "0xB1", 1068 "EventCode": "0xB1",
657 "Counter": "0,1,2,3", 1069 "Counter": "0,1,2,3",
@@ -662,36 +1074,64 @@
662 "CounterHTOff": "0,1,2,3,4,5,6,7" 1074 "CounterHTOff": "0,1,2,3,4,5,6,7"
663 }, 1075 },
664 { 1076 {
665 "PublicDescription": "This event counts cycles during which no uops were dispatched from the Reservation Station (RS) per thread.", 1077 "EventCode": "0xb1",
666 "EventCode": "0xB1",
667 "Invert": "1",
668 "Counter": "0,1,2,3", 1078 "Counter": "0,1,2,3",
669 "UMask": "0x1", 1079 "UMask": "0x2",
670 "EventName": "UOPS_EXECUTED.STALL_CYCLES", 1080 "EventName": "UOPS_EXECUTED.CORE_CYCLES_GE_1",
671 "SampleAfterValue": "2000003", 1081 "SampleAfterValue": "2000003",
672 "BriefDescription": "Counts number of cycles no uops were dispatched to be executed on this thread.", 1082 "BriefDescription": "Cycles at least 1 micro-op is executed from any thread on physical core.",
673 "CounterMask": "1", 1083 "CounterMask": "1",
674 "CounterHTOff": "0,1,2,3" 1084 "CounterHTOff": "0,1,2,3,4,5,6,7"
675 }, 1085 },
676 { 1086 {
677 "PublicDescription": "This event counts the number of instructions (EOMs) retired. Counting covers macro-fused instructions individually (that is, increments by two).", 1087 "EventCode": "0xb1",
678 "EventCode": "0xC0",
679 "Counter": "0,1,2,3", 1088 "Counter": "0,1,2,3",
680 "UMask": "0x0", 1089 "UMask": "0x2",
681 "Errata": "BDM61", 1090 "EventName": "UOPS_EXECUTED.CORE_CYCLES_GE_2",
682 "EventName": "INST_RETIRED.ANY_P",
683 "SampleAfterValue": "2000003", 1091 "SampleAfterValue": "2000003",
684 "BriefDescription": "Number of instructions retired. General Counter - architectural event", 1092 "BriefDescription": "Cycles at least 2 micro-op is executed from any thread on physical core.",
1093 "CounterMask": "2",
685 "CounterHTOff": "0,1,2,3,4,5,6,7" 1094 "CounterHTOff": "0,1,2,3,4,5,6,7"
686 }, 1095 },
687 { 1096 {
688 "PublicDescription": "This is a non-precise version (that is, does not use PEBS) of the event that counts FP operations retired. For X87 FP operations that have no exceptions counting also includes flows that have several X87, or flows that use X87 uops in the exception handling.", 1097 "EventCode": "0xb1",
689 "EventCode": "0xC0",
690 "Counter": "0,1,2,3", 1098 "Counter": "0,1,2,3",
691 "UMask": "0x2", 1099 "UMask": "0x2",
692 "EventName": "INST_RETIRED.X87", 1100 "EventName": "UOPS_EXECUTED.CORE_CYCLES_GE_3",
693 "SampleAfterValue": "2000003", 1101 "SampleAfterValue": "2000003",
694 "BriefDescription": "FP operations retired. X87 FP operations that have no exceptions:", 1102 "BriefDescription": "Cycles at least 3 micro-op is executed from any thread on physical core.",
1103 "CounterMask": "3",
1104 "CounterHTOff": "0,1,2,3,4,5,6,7"
1105 },
1106 {
1107 "EventCode": "0xb1",
1108 "Counter": "0,1,2,3",
1109 "UMask": "0x2",
1110 "EventName": "UOPS_EXECUTED.CORE_CYCLES_GE_4",
1111 "SampleAfterValue": "2000003",
1112 "BriefDescription": "Cycles at least 4 micro-op is executed from any thread on physical core.",
1113 "CounterMask": "4",
1114 "CounterHTOff": "0,1,2,3,4,5,6,7"
1115 },
1116 {
1117 "EventCode": "0xb1",
1118 "Invert": "1",
1119 "Counter": "0,1,2,3",
1120 "UMask": "0x2",
1121 "EventName": "UOPS_EXECUTED.CORE_CYCLES_NONE",
1122 "SampleAfterValue": "2000003",
1123 "BriefDescription": "Cycles with no micro-ops executed from any thread on physical core.",
1124 "CounterHTOff": "0,1,2,3,4,5,6,7"
1125 },
1126 {
1127 "PublicDescription": "This event counts the number of instructions (EOMs) retired. Counting covers macro-fused instructions individually (that is, increments by two).",
1128 "EventCode": "0xC0",
1129 "Counter": "0,1,2,3",
1130 "UMask": "0x0",
1131 "Errata": "BDM61",
1132 "EventName": "INST_RETIRED.ANY_P",
1133 "SampleAfterValue": "2000003",
1134 "BriefDescription": "Number of instructions retired. General Counter - architectural event",
695 "CounterHTOff": "0,1,2,3,4,5,6,7" 1135 "CounterHTOff": "0,1,2,3,4,5,6,7"
696 }, 1136 },
697 { 1137 {
@@ -707,6 +1147,16 @@
707 "CounterHTOff": "1" 1147 "CounterHTOff": "1"
708 }, 1148 },
709 { 1149 {
1150 "PublicDescription": "This event counts FP operations retired. For X87 FP operations that have no exceptions counting also includes flows that have several X87, or flows that use X87 uops in the exception handling.",
1151 "EventCode": "0xC0",
1152 "Counter": "0,1,2,3",
1153 "UMask": "0x2",
1154 "EventName": "INST_RETIRED.X87",
1155 "SampleAfterValue": "2000003",
1156 "BriefDescription": "FP operations retired. X87 FP operations that have no exceptions:",
1157 "CounterHTOff": "0,1,2,3,4,5,6,7"
1158 },
1159 {
710 "EventCode": "0xC1", 1160 "EventCode": "0xC1",
711 "Counter": "0,1,2,3", 1161 "Counter": "0,1,2,3",
712 "UMask": "0x40", 1162 "UMask": "0x40",
@@ -717,29 +1167,18 @@
717 }, 1167 },
718 { 1168 {
719 "PEBS": "1", 1169 "PEBS": "1",
720 "PublicDescription": "This event counts all actually retired uops. Counting increments by two for micro-fused uops, and by one for macro-fused and other uops. Maximal increment value for one cycle is eight.", 1170 "PublicDescription": "This is a precise version (that is, uses PEBS) of the event that counts all actually retired uops. Counting increments by two for micro-fused uops, and by one for macro-fused and other uops. Maximal increment value for one cycle is eight.",
721 "EventCode": "0xC2", 1171 "EventCode": "0xC2",
722 "Counter": "0,1,2,3", 1172 "Counter": "0,1,2,3",
723 "UMask": "0x1", 1173 "UMask": "0x1",
724 "EventName": "UOPS_RETIRED.ALL", 1174 "EventName": "UOPS_RETIRED.ALL",
725 "SampleAfterValue": "2000003", 1175 "SampleAfterValue": "2000003",
726 "BriefDescription": "Actually retired uops.", 1176 "BriefDescription": "Actually retired uops. (Precise Event - PEBS)",
727 "CounterHTOff": "0,1,2,3,4,5,6,7", 1177 "CounterHTOff": "0,1,2,3,4,5,6,7",
728 "Data_LA": "1" 1178 "Data_LA": "1"
729 }, 1179 },
730 { 1180 {
731 "PEBS": "1", 1181 "PublicDescription": "This event counts cycles without actually retired uops.",
732 "PublicDescription": "This is a non-precise version (that is, does not use PEBS) of the event that counts the number of retirement slots used.",
733 "EventCode": "0xC2",
734 "Counter": "0,1,2,3",
735 "UMask": "0x2",
736 "EventName": "UOPS_RETIRED.RETIRE_SLOTS",
737 "SampleAfterValue": "2000003",
738 "BriefDescription": "Retirement slots used.",
739 "CounterHTOff": "0,1,2,3,4,5,6,7"
740 },
741 {
742 "PublicDescription": "This is a non-precise version (that is, does not use PEBS) of the event that counts cycles without actually retired uops.",
743 "EventCode": "0xC2", 1182 "EventCode": "0xC2",
744 "Invert": "1", 1183 "Invert": "1",
745 "Counter": "0,1,2,3", 1184 "Counter": "0,1,2,3",
@@ -763,6 +1202,17 @@
763 "CounterHTOff": "0,1,2,3" 1202 "CounterHTOff": "0,1,2,3"
764 }, 1203 },
765 { 1204 {
1205 "PEBS": "1",
1206 "PublicDescription": "This is a precise version (that is, uses PEBS) of the event that counts the number of retirement slots used.",
1207 "EventCode": "0xC2",
1208 "Counter": "0,1,2,3",
1209 "UMask": "0x2",
1210 "EventName": "UOPS_RETIRED.RETIRE_SLOTS",
1211 "SampleAfterValue": "2000003",
1212 "BriefDescription": "Retirement slots used. (Precise Event - PEBS)",
1213 "CounterHTOff": "0,1,2,3,4,5,6,7"
1214 },
1215 {
766 "PublicDescription": "This event counts both thread-specific (TS) and all-thread (AT) nukes.", 1216 "PublicDescription": "This event counts both thread-specific (TS) and all-thread (AT) nukes.",
767 "EventCode": "0xC3", 1217 "EventCode": "0xC3",
768 "Counter": "0,1,2,3", 1218 "Counter": "0,1,2,3",
@@ -773,6 +1223,17 @@
773 "CounterHTOff": "0,1,2,3,4,5,6,7" 1223 "CounterHTOff": "0,1,2,3,4,5,6,7"
774 }, 1224 },
775 { 1225 {
1226 "EventCode": "0xC3",
1227 "Counter": "0,1,2,3",
1228 "UMask": "0x1",
1229 "EdgeDetect": "1",
1230 "EventName": "MACHINE_CLEARS.COUNT",
1231 "SampleAfterValue": "100003",
1232 "BriefDescription": "Number of machine clears (nukes) of any type.",
1233 "CounterMask": "1",
1234 "CounterHTOff": "0,1,2,3,4,5,6,7"
1235 },
1236 {
776 "PublicDescription": "This event counts self-modifying code (SMC) detected, which causes a machine clear.", 1237 "PublicDescription": "This event counts self-modifying code (SMC) detected, which causes a machine clear.",
777 "EventCode": "0xC3", 1238 "EventCode": "0xC3",
778 "Counter": "0,1,2,3", 1239 "Counter": "0,1,2,3",
@@ -793,50 +1254,73 @@
793 "CounterHTOff": "0,1,2,3,4,5,6,7" 1254 "CounterHTOff": "0,1,2,3,4,5,6,7"
794 }, 1255 },
795 { 1256 {
1257 "PublicDescription": "This event counts all (macro) branch instructions retired.",
1258 "EventCode": "0xC4",
1259 "Counter": "0,1,2,3",
1260 "UMask": "0x0",
1261 "EventName": "BR_INST_RETIRED.ALL_BRANCHES",
1262 "SampleAfterValue": "400009",
1263 "BriefDescription": "All (macro) branch instructions retired.",
1264 "CounterHTOff": "0,1,2,3,4,5,6,7"
1265 },
1266 {
796 "PEBS": "1", 1267 "PEBS": "1",
797 "PublicDescription": "This is a non-precise version (that is, does not use PEBS) of the event that counts conditional branch instructions retired.", 1268 "PublicDescription": "This is a precise version (that is, uses PEBS) of the event that counts conditional branch instructions retired.",
798 "EventCode": "0xC4", 1269 "EventCode": "0xC4",
799 "Counter": "0,1,2,3", 1270 "Counter": "0,1,2,3",
800 "UMask": "0x1", 1271 "UMask": "0x1",
801 "EventName": "BR_INST_RETIRED.CONDITIONAL", 1272 "EventName": "BR_INST_RETIRED.CONDITIONAL",
802 "SampleAfterValue": "400009", 1273 "SampleAfterValue": "400009",
803 "BriefDescription": "Conditional branch instructions retired.", 1274 "BriefDescription": "Conditional branch instructions retired. (Precise Event - PEBS)",
804 "CounterHTOff": "0,1,2,3,4,5,6,7" 1275 "CounterHTOff": "0,1,2,3,4,5,6,7"
805 }, 1276 },
806 { 1277 {
807 "PEBS": "1", 1278 "PEBS": "1",
808 "PublicDescription": "This is a non-precise version (that is, does not use PEBS) of the event that counts both direct and indirect near call instructions retired.", 1279 "PublicDescription": "This is a precise version (that is, uses PEBS) of the event that counts both direct and indirect near call instructions retired.",
809 "EventCode": "0xC4", 1280 "EventCode": "0xC4",
810 "Counter": "0,1,2,3", 1281 "Counter": "0,1,2,3",
811 "UMask": "0x2", 1282 "UMask": "0x2",
812 "EventName": "BR_INST_RETIRED.NEAR_CALL", 1283 "EventName": "BR_INST_RETIRED.NEAR_CALL",
813 "SampleAfterValue": "100007", 1284 "SampleAfterValue": "100007",
814 "BriefDescription": "Direct and indirect near call instructions retired.", 1285 "BriefDescription": "Direct and indirect near call instructions retired. (Precise Event - PEBS)",
815 "CounterHTOff": "0,1,2,3,4,5,6,7" 1286 "CounterHTOff": "0,1,2,3,4,5,6,7"
816 }, 1287 },
817 { 1288 {
818 "PublicDescription": "This event counts all (macro) branch instructions retired.", 1289 "PEBS": "1",
1290 "PublicDescription": "This is a precise version (that is, uses PEBS) of the event that counts both direct and indirect macro near call instructions retired (captured in ring 3).",
819 "EventCode": "0xC4", 1291 "EventCode": "0xC4",
820 "Counter": "0,1,2,3", 1292 "Counter": "0,1,2,3",
821 "UMask": "0x0", 1293 "UMask": "0x2",
822 "EventName": "BR_INST_RETIRED.ALL_BRANCHES", 1294 "EventName": "BR_INST_RETIRED.NEAR_CALL_R3",
823 "SampleAfterValue": "400009", 1295 "SampleAfterValue": "100007",
824 "BriefDescription": "All (macro) branch instructions retired.", 1296 "BriefDescription": "Direct and indirect macro near call instructions retired (captured in ring 3). (Precise Event - PEBS)",
825 "CounterHTOff": "0,1,2,3,4,5,6,7" 1297 "CounterHTOff": "0,1,2,3,4,5,6,7"
826 }, 1298 },
827 { 1299 {
1300 "PEBS": "2",
1301 "PublicDescription": "This is a precise version of BR_INST_RETIRED.ALL_BRANCHES that counts all (macro) branch instructions retired.",
1302 "EventCode": "0xC4",
1303 "Counter": "0,1,2,3",
1304 "UMask": "0x4",
1305 "Errata": "BDW98",
1306 "EventName": "BR_INST_RETIRED.ALL_BRANCHES_PEBS",
1307 "SampleAfterValue": "400009",
1308 "BriefDescription": "All (macro) branch instructions retired. (Precise Event - PEBS)",
1309 "CounterHTOff": "0,1,2,3"
1310 },
1311 {
828 "PEBS": "1", 1312 "PEBS": "1",
829 "PublicDescription": "This is a non-precise version (that is, does not use PEBS) of the event that counts return instructions retired.", 1313 "PublicDescription": "This is a precise version (that is, uses PEBS) of the event that counts return instructions retired.",
830 "EventCode": "0xC4", 1314 "EventCode": "0xC4",
831 "Counter": "0,1,2,3", 1315 "Counter": "0,1,2,3",
832 "UMask": "0x8", 1316 "UMask": "0x8",
833 "EventName": "BR_INST_RETIRED.NEAR_RETURN", 1317 "EventName": "BR_INST_RETIRED.NEAR_RETURN",
834 "SampleAfterValue": "100007", 1318 "SampleAfterValue": "100007",
835 "BriefDescription": "Return instructions retired.", 1319 "BriefDescription": "Return instructions retired. (Precise Event - PEBS)",
836 "CounterHTOff": "0,1,2,3,4,5,6,7" 1320 "CounterHTOff": "0,1,2,3,4,5,6,7"
837 }, 1321 },
838 { 1322 {
839 "PublicDescription": "This is a non-precise version (that is, does not use PEBS) of the event that counts not taken branch instructions retired.", 1323 "PublicDescription": "This event counts not taken branch instructions retired.",
840 "EventCode": "0xC4", 1324 "EventCode": "0xC4",
841 "Counter": "0,1,2,3", 1325 "Counter": "0,1,2,3",
842 "UMask": "0x10", 1326 "UMask": "0x10",
@@ -847,17 +1331,17 @@
847 }, 1331 },
848 { 1332 {
849 "PEBS": "1", 1333 "PEBS": "1",
850 "PublicDescription": "This is a non-precise version (that is, does not use PEBS) of the event that counts taken branch instructions retired.", 1334 "PublicDescription": "This is a precise version (that is, uses PEBS) of the event that counts taken branch instructions retired.",
851 "EventCode": "0xC4", 1335 "EventCode": "0xC4",
852 "Counter": "0,1,2,3", 1336 "Counter": "0,1,2,3",
853 "UMask": "0x20", 1337 "UMask": "0x20",
854 "EventName": "BR_INST_RETIRED.NEAR_TAKEN", 1338 "EventName": "BR_INST_RETIRED.NEAR_TAKEN",
855 "SampleAfterValue": "400009", 1339 "SampleAfterValue": "400009",
856 "BriefDescription": "Taken branch instructions retired.", 1340 "BriefDescription": "Taken branch instructions retired. (Precise Event - PEBS)",
857 "CounterHTOff": "0,1,2,3,4,5,6,7" 1341 "CounterHTOff": "0,1,2,3,4,5,6,7"
858 }, 1342 },
859 { 1343 {
860 "PublicDescription": "This is a non-precise version (that is, does not use PEBS) of the event that counts far branch instructions retired.", 1344 "PublicDescription": "This event counts far branch instructions retired.",
861 "EventCode": "0xC4", 1345 "EventCode": "0xC4",
862 "Counter": "0,1,2,3", 1346 "Counter": "0,1,2,3",
863 "UMask": "0x40", 1347 "UMask": "0x40",
@@ -868,29 +1352,6 @@
868 "CounterHTOff": "0,1,2,3,4,5,6,7" 1352 "CounterHTOff": "0,1,2,3,4,5,6,7"
869 }, 1353 },
870 { 1354 {
871 "PEBS": "2",
872 "PublicDescription": "This is a precise version of BR_INST_RETIRED.ALL_BRANCHES that counts all (macro) branch instructions retired.",
873 "EventCode": "0xC4",
874 "Counter": "0,1,2,3",
875 "UMask": "0x4",
876 "Errata": "BDW98",
877 "EventName": "BR_INST_RETIRED.ALL_BRANCHES_PEBS",
878 "SampleAfterValue": "400009",
879 "BriefDescription": "All (macro) branch instructions retired. (Precise Event - PEBS)",
880 "CounterHTOff": "0,1,2,3"
881 },
882 {
883 "PEBS": "1",
884 "PublicDescription": "This is a non-precise version (that is, does not use PEBS) of the event that counts mispredicted conditional branch instructions retired.",
885 "EventCode": "0xC5",
886 "Counter": "0,1,2,3",
887 "UMask": "0x1",
888 "EventName": "BR_MISP_RETIRED.CONDITIONAL",
889 "SampleAfterValue": "400009",
890 "BriefDescription": "Mispredicted conditional branch instructions retired.",
891 "CounterHTOff": "0,1,2,3,4,5,6,7"
892 },
893 {
894 "PublicDescription": "This event counts all mispredicted macro branch instructions retired.", 1355 "PublicDescription": "This event counts all mispredicted macro branch instructions retired.",
895 "EventCode": "0xC5", 1356 "EventCode": "0xC5",
896 "Counter": "0,1,2,3", 1357 "Counter": "0,1,2,3",
@@ -902,13 +1363,13 @@
902 }, 1363 },
903 { 1364 {
904 "PEBS": "1", 1365 "PEBS": "1",
905 "PublicDescription": "This is a non-precise version (that is, does not use PEBS) of the event that counts mispredicted return instructions retired.", 1366 "PublicDescription": "This is a precise version (that is, uses PEBS) of the event that counts mispredicted conditional branch instructions retired.",
906 "EventCode": "0xC5", 1367 "EventCode": "0xC5",
907 "Counter": "0,1,2,3", 1368 "Counter": "0,1,2,3",
908 "UMask": "0x8", 1369 "UMask": "0x1",
909 "EventName": "BR_MISP_RETIRED.RET", 1370 "EventName": "BR_MISP_RETIRED.CONDITIONAL",
910 "SampleAfterValue": "100007", 1371 "SampleAfterValue": "400009",
911 "BriefDescription": "This event counts the number of mispredicted ret instructions retired. Non PEBS", 1372 "BriefDescription": "Mispredicted conditional branch instructions retired. (Precise Event - PEBS)",
912 "CounterHTOff": "0,1,2,3,4,5,6,7" 1373 "CounterHTOff": "0,1,2,3,4,5,6,7"
913 }, 1374 },
914 { 1375 {
@@ -923,164 +1384,36 @@
923 "CounterHTOff": "0,1,2,3" 1384 "CounterHTOff": "0,1,2,3"
924 }, 1385 },
925 { 1386 {
926 "PublicDescription": "This event counts cases of saving new LBR records by hardware. This assumes proper enabling of LBRs and takes into account LBR filtering done by the LBR_SELECT register.", 1387 "PEBS": "1",
927 "EventCode": "0xCC", 1388 "PublicDescription": "This is a precise version (that is, uses PEBS) of the event that counts mispredicted return instructions retired.",
928 "Counter": "0,1,2,3", 1389 "EventCode": "0xC5",
929 "UMask": "0x20",
930 "EventName": "ROB_MISC_EVENTS.LBR_INSERTS",
931 "SampleAfterValue": "2000003",
932 "BriefDescription": "Count cases of saving new LBR",
933 "CounterHTOff": "0,1,2,3,4,5,6,7"
934 },
935 {
936 "PublicDescription": "This is an architectural event that counts the number of thread cycles while the thread is not in a halt state. The thread enters the halt state when it is running the HLT instruction. The core frequency may change from time to time due to power or thermal throttling. For this reason, this event may have a changing ratio with regards to wall clock time.",
937 "EventCode": "0x3C",
938 "Counter": "0,1,2,3",
939 "UMask": "0x0",
940 "EventName": "CPU_CLK_UNHALTED.THREAD_P",
941 "SampleAfterValue": "2000003",
942 "BriefDescription": "Thread cycles when thread is not in halt state",
943 "CounterHTOff": "0,1,2,3,4,5,6,7"
944 },
945 {
946 "EventCode": "0x89",
947 "Counter": "0,1,2,3",
948 "UMask": "0xa0",
949 "EventName": "BR_MISP_EXEC.TAKEN_INDIRECT_NEAR_CALL",
950 "SampleAfterValue": "200003",
951 "BriefDescription": "Taken speculative and retired mispredicted indirect calls.",
952 "CounterHTOff": "0,1,2,3,4,5,6,7"
953 },
954 {
955 "EventCode": "0xA1",
956 "Counter": "0,1,2,3",
957 "UMask": "0x1",
958 "AnyThread": "1",
959 "EventName": "UOPS_EXECUTED_PORT.PORT_0_CORE",
960 "SampleAfterValue": "2000003",
961 "BriefDescription": "Cycles per core when uops are exectuted in port 0.",
962 "CounterHTOff": "0,1,2,3,4,5,6,7"
963 },
964 {
965 "EventCode": "0xA1",
966 "Counter": "0,1,2,3",
967 "UMask": "0x2",
968 "AnyThread": "1",
969 "EventName": "UOPS_EXECUTED_PORT.PORT_1_CORE",
970 "SampleAfterValue": "2000003",
971 "BriefDescription": "Cycles per core when uops are exectuted in port 1.",
972 "CounterHTOff": "0,1,2,3,4,5,6,7"
973 },
974 {
975 "EventCode": "0xA1",
976 "Counter": "0,1,2,3",
977 "UMask": "0x4",
978 "AnyThread": "1",
979 "EventName": "UOPS_EXECUTED_PORT.PORT_2_CORE",
980 "SampleAfterValue": "2000003",
981 "BriefDescription": "Cycles per core when uops are dispatched to port 2.",
982 "CounterHTOff": "0,1,2,3,4,5,6,7"
983 },
984 {
985 "EventCode": "0xA1",
986 "Counter": "0,1,2,3", 1390 "Counter": "0,1,2,3",
987 "UMask": "0x8", 1391 "UMask": "0x8",
988 "AnyThread": "1", 1392 "EventName": "BR_MISP_RETIRED.RET",
989 "EventName": "UOPS_EXECUTED_PORT.PORT_3_CORE", 1393 "SampleAfterValue": "100007",
990 "SampleAfterValue": "2000003", 1394 "BriefDescription": "This event counts the number of mispredicted ret instructions retired.(Precise Event)",
991 "BriefDescription": "Cycles per core when uops are dispatched to port 3.",
992 "CounterHTOff": "0,1,2,3,4,5,6,7"
993 },
994 {
995 "EventCode": "0xA1",
996 "Counter": "0,1,2,3",
997 "UMask": "0x10",
998 "AnyThread": "1",
999 "EventName": "UOPS_EXECUTED_PORT.PORT_4_CORE",
1000 "SampleAfterValue": "2000003",
1001 "BriefDescription": "Cycles per core when uops are exectuted in port 4.",
1002 "CounterHTOff": "0,1,2,3,4,5,6,7"
1003 },
1004 {
1005 "EventCode": "0xA1",
1006 "Counter": "0,1,2,3",
1007 "UMask": "0x20",
1008 "AnyThread": "1",
1009 "EventName": "UOPS_EXECUTED_PORT.PORT_5_CORE",
1010 "SampleAfterValue": "2000003",
1011 "BriefDescription": "Cycles per core when uops are exectuted in port 5.",
1012 "CounterHTOff": "0,1,2,3,4,5,6,7"
1013 },
1014 {
1015 "EventCode": "0xA1",
1016 "Counter": "0,1,2,3",
1017 "UMask": "0x40",
1018 "AnyThread": "1",
1019 "EventName": "UOPS_EXECUTED_PORT.PORT_6_CORE",
1020 "SampleAfterValue": "2000003",
1021 "BriefDescription": "Cycles per core when uops are exectuted in port 6.",
1022 "CounterHTOff": "0,1,2,3,4,5,6,7"
1023 },
1024 {
1025 "EventCode": "0xA1",
1026 "Counter": "0,1,2,3",
1027 "UMask": "0x80",
1028 "AnyThread": "1",
1029 "EventName": "UOPS_EXECUTED_PORT.PORT_7_CORE",
1030 "SampleAfterValue": "2000003",
1031 "BriefDescription": "Cycles per core when uops are dispatched to port 7.",
1032 "CounterHTOff": "0,1,2,3,4,5,6,7" 1395 "CounterHTOff": "0,1,2,3,4,5,6,7"
1033 }, 1396 },
1034 { 1397 {
1035 "PEBS": "1", 1398 "PEBS": "1",
1036 "PublicDescription": "Number of near branch instructions retired that were mispredicted and taken.", 1399 "PublicDescription": "Number of near branch instructions retired that were mispredicted and taken. (Precise Event - PEBS).",
1037 "EventCode": "0xC5", 1400 "EventCode": "0xC5",
1038 "Counter": "0,1,2,3", 1401 "Counter": "0,1,2,3",
1039 "UMask": "0x20", 1402 "UMask": "0x20",
1040 "EventName": "BR_MISP_RETIRED.NEAR_TAKEN", 1403 "EventName": "BR_MISP_RETIRED.NEAR_TAKEN",
1041 "SampleAfterValue": "400009", 1404 "SampleAfterValue": "400009",
1042 "BriefDescription": "number of near branch instructions retired that were mispredicted and taken.", 1405 "BriefDescription": "number of near branch instructions retired that were mispredicted and taken. (Precise Event - PEBS).",
1043 "CounterHTOff": "0,1,2,3,4,5,6,7" 1406 "CounterHTOff": "0,1,2,3,4,5,6,7"
1044 }, 1407 },
1045 { 1408 {
1046 "EventCode": "0xB1", 1409 "PublicDescription": "This event counts cases of saving new LBR records by hardware. This assumes proper enabling of LBRs and takes into account LBR filtering done by the LBR_SELECT register.",
1047 "Counter": "0,1,2,3", 1410 "EventCode": "0xCC",
1048 "UMask": "0x1",
1049 "EventName": "UOPS_EXECUTED.CYCLES_GE_1_UOP_EXEC",
1050 "SampleAfterValue": "2000003",
1051 "BriefDescription": "Cycles where at least 1 uop was executed per-thread.",
1052 "CounterMask": "1",
1053 "CounterHTOff": "0,1,2,3"
1054 },
1055 {
1056 "EventCode": "0xB1",
1057 "Counter": "0,1,2,3",
1058 "UMask": "0x1",
1059 "EventName": "UOPS_EXECUTED.CYCLES_GE_2_UOPS_EXEC",
1060 "SampleAfterValue": "2000003",
1061 "BriefDescription": "Cycles where at least 2 uops were executed per-thread.",
1062 "CounterMask": "2",
1063 "CounterHTOff": "0,1,2,3"
1064 },
1065 {
1066 "EventCode": "0xB1",
1067 "Counter": "0,1,2,3",
1068 "UMask": "0x1",
1069 "EventName": "UOPS_EXECUTED.CYCLES_GE_3_UOPS_EXEC",
1070 "SampleAfterValue": "2000003",
1071 "BriefDescription": "Cycles where at least 3 uops were executed per-thread.",
1072 "CounterMask": "3",
1073 "CounterHTOff": "0,1,2,3"
1074 },
1075 {
1076 "EventCode": "0xB1",
1077 "Counter": "0,1,2,3", 1411 "Counter": "0,1,2,3",
1078 "UMask": "0x1", 1412 "UMask": "0x20",
1079 "EventName": "UOPS_EXECUTED.CYCLES_GE_4_UOPS_EXEC", 1413 "EventName": "ROB_MISC_EVENTS.LBR_INSERTS",
1080 "SampleAfterValue": "2000003", 1414 "SampleAfterValue": "2000003",
1081 "BriefDescription": "Cycles where at least 4 uops were executed per-thread.", 1415 "BriefDescription": "Count cases of saving new LBR",
1082 "CounterMask": "4", 1416 "CounterHTOff": "0,1,2,3,4,5,6,7"
1083 "CounterHTOff": "0,1,2,3"
1084 }, 1417 },
1085 { 1418 {
1086 "EventCode": "0xe6", 1419 "EventCode": "0xe6",
@@ -1090,328 +1423,5 @@
1090 "SampleAfterValue": "100003", 1423 "SampleAfterValue": "100003",
1091 "BriefDescription": "Counts the total number when the front end is resteered, mainly when the BPU cannot provide a correct prediction and this is corrected by other branch handling mechanisms at the front end.", 1424 "BriefDescription": "Counts the total number when the front end is resteered, mainly when the BPU cannot provide a correct prediction and this is corrected by other branch handling mechanisms at the front end.",
1092 "CounterHTOff": "0,1,2,3,4,5,6,7" 1425 "CounterHTOff": "0,1,2,3,4,5,6,7"
1093 },
1094 {
1095 "EventCode": "0xA3",
1096 "Counter": "2",
1097 "UMask": "0x8",
1098 "EventName": "CYCLE_ACTIVITY.CYCLES_L1D_MISS",
1099 "SampleAfterValue": "2000003",
1100 "BriefDescription": "Cycles while L1 cache miss demand load is outstanding.",
1101 "CounterMask": "8",
1102 "CounterHTOff": "2"
1103 },
1104 {
1105 "EventCode": "0xA3",
1106 "Counter": "0,1,2,3",
1107 "UMask": "0x1",
1108 "EventName": "CYCLE_ACTIVITY.CYCLES_L2_MISS",
1109 "SampleAfterValue": "2000003",
1110 "BriefDescription": "Cycles while L2 cache miss demand load is outstanding.",
1111 "CounterMask": "1",
1112 "CounterHTOff": "0,1,2,3,4,5,6,7"
1113 },
1114 {
1115 "EventCode": "0xA3",
1116 "Counter": "0,1,2,3",
1117 "UMask": "0x2",
1118 "EventName": "CYCLE_ACTIVITY.CYCLES_MEM_ANY",
1119 "SampleAfterValue": "2000003",
1120 "BriefDescription": "Cycles while memory subsystem has an outstanding load.",
1121 "CounterMask": "2",
1122 "CounterHTOff": "0,1,2,3"
1123 },
1124 {
1125 "EventCode": "0xA3",
1126 "Counter": "0,1,2,3",
1127 "UMask": "0x4",
1128 "EventName": "CYCLE_ACTIVITY.STALLS_TOTAL",
1129 "SampleAfterValue": "2000003",
1130 "BriefDescription": "Total execution stalls.",
1131 "CounterMask": "4",
1132 "CounterHTOff": "0,1,2,3,4,5,6,7"
1133 },
1134 {
1135 "EventCode": "0xA3",
1136 "Counter": "2",
1137 "UMask": "0xc",
1138 "EventName": "CYCLE_ACTIVITY.STALLS_L1D_MISS",
1139 "SampleAfterValue": "2000003",
1140 "BriefDescription": "Execution stalls while L1 cache miss demand load is outstanding.",
1141 "CounterMask": "12",
1142 "CounterHTOff": "2"
1143 },
1144 {
1145 "EventCode": "0xA3",
1146 "Counter": "0,1,2,3",
1147 "UMask": "0x5",
1148 "EventName": "CYCLE_ACTIVITY.STALLS_L2_MISS",
1149 "SampleAfterValue": "2000003",
1150 "BriefDescription": "Execution stalls while L2 cache miss demand load is outstanding.",
1151 "CounterMask": "5",
1152 "CounterHTOff": "0,1,2,3,4,5,6,7"
1153 },
1154 {
1155 "EventCode": "0xA3",
1156 "Counter": "0,1,2,3",
1157 "UMask": "0x6",
1158 "EventName": "CYCLE_ACTIVITY.STALLS_MEM_ANY",
1159 "SampleAfterValue": "2000003",
1160 "BriefDescription": "Execution stalls while memory subsystem has an outstanding load.",
1161 "CounterMask": "6",
1162 "CounterHTOff": "0,1,2,3,4,5,6,7"
1163 },
1164 {
1165 "EventCode": "0xC3",
1166 "Counter": "0,1,2,3",
1167 "UMask": "0x1",
1168 "EdgeDetect": "1",
1169 "EventName": "MACHINE_CLEARS.COUNT",
1170 "SampleAfterValue": "100003",
1171 "BriefDescription": "Number of machine clears (nukes) of any type.",
1172 "CounterMask": "1",
1173 "CounterHTOff": "0,1,2,3,4,5,6,7"
1174 },
1175 {
1176 "EventCode": "0xA8",
1177 "Counter": "0,1,2,3",
1178 "UMask": "0x1",
1179 "EventName": "LSD.CYCLES_4_UOPS",
1180 "SampleAfterValue": "2000003",
1181 "BriefDescription": "Cycles 4 Uops delivered by the LSD, but didn't come from the decoder.",
1182 "CounterMask": "4",
1183 "CounterHTOff": "0,1,2,3,4,5,6,7"
1184 },
1185 {
1186 "EventCode": "0x5E",
1187 "Invert": "1",
1188 "Counter": "0,1,2,3",
1189 "UMask": "0x1",
1190 "EdgeDetect": "1",
1191 "EventName": "RS_EVENTS.EMPTY_END",
1192 "SampleAfterValue": "200003",
1193 "BriefDescription": "Counts end of periods where the Reservation Station (RS) was empty. Could be useful to precisely locate Frontend Latency Bound issues.",
1194 "CounterMask": "1",
1195 "CounterHTOff": "0,1,2,3,4,5,6,7"
1196 },
1197 {
1198 "EventCode": "0xA8",
1199 "Counter": "0,1,2,3",
1200 "UMask": "0x1",
1201 "EventName": "LSD.CYCLES_ACTIVE",
1202 "SampleAfterValue": "2000003",
1203 "BriefDescription": "Cycles Uops delivered by the LSD, but didn't come from the decoder.",
1204 "CounterMask": "1",
1205 "CounterHTOff": "0,1,2,3,4,5,6,7"
1206 },
1207 {
1208 "PublicDescription": "This event counts, on the per-thread basis, cycles during which uops are dispatched from the Reservation Station (RS) to port 0.",
1209 "EventCode": "0xA1",
1210 "Counter": "0,1,2,3",
1211 "UMask": "0x1",
1212 "EventName": "UOPS_EXECUTED_PORT.PORT_0",
1213 "SampleAfterValue": "2000003",
1214 "BriefDescription": "Cycles per thread when uops are executed in port 0",
1215 "CounterHTOff": "0,1,2,3,4,5,6,7"
1216 },
1217 {
1218 "PublicDescription": "This event counts, on the per-thread basis, cycles during which uops are dispatched from the Reservation Station (RS) to port 1.",
1219 "EventCode": "0xA1",
1220 "Counter": "0,1,2,3",
1221 "UMask": "0x2",
1222 "EventName": "UOPS_EXECUTED_PORT.PORT_1",
1223 "SampleAfterValue": "2000003",
1224 "BriefDescription": "Cycles per thread when uops are executed in port 1",
1225 "CounterHTOff": "0,1,2,3,4,5,6,7"
1226 },
1227 {
1228 "PublicDescription": "This event counts, on the per-thread basis, cycles during which uops are dispatched from the Reservation Station (RS) to port 2.",
1229 "EventCode": "0xA1",
1230 "Counter": "0,1,2,3",
1231 "UMask": "0x4",
1232 "EventName": "UOPS_EXECUTED_PORT.PORT_2",
1233 "SampleAfterValue": "2000003",
1234 "BriefDescription": "Cycles per thread when uops are executed in port 2",
1235 "CounterHTOff": "0,1,2,3,4,5,6,7"
1236 },
1237 {
1238 "PublicDescription": "This event counts, on the per-thread basis, cycles during which uops are dispatched from the Reservation Station (RS) to port 3.",
1239 "EventCode": "0xA1",
1240 "Counter": "0,1,2,3",
1241 "UMask": "0x8",
1242 "EventName": "UOPS_EXECUTED_PORT.PORT_3",
1243 "SampleAfterValue": "2000003",
1244 "BriefDescription": "Cycles per thread when uops are executed in port 3",
1245 "CounterHTOff": "0,1,2,3,4,5,6,7"
1246 },
1247 {
1248 "PublicDescription": "This event counts, on the per-thread basis, cycles during which uops are dispatched from the Reservation Station (RS) to port 4.",
1249 "EventCode": "0xA1",
1250 "Counter": "0,1,2,3",
1251 "UMask": "0x10",
1252 "EventName": "UOPS_EXECUTED_PORT.PORT_4",
1253 "SampleAfterValue": "2000003",
1254 "BriefDescription": "Cycles per thread when uops are executed in port 4",
1255 "CounterHTOff": "0,1,2,3,4,5,6,7"
1256 },
1257 {
1258 "PublicDescription": "This event counts, on the per-thread basis, cycles during which uops are dispatched from the Reservation Station (RS) to port 5.",
1259 "EventCode": "0xA1",
1260 "Counter": "0,1,2,3",
1261 "UMask": "0x20",
1262 "EventName": "UOPS_EXECUTED_PORT.PORT_5",
1263 "SampleAfterValue": "2000003",
1264 "BriefDescription": "Cycles per thread when uops are executed in port 5",
1265 "CounterHTOff": "0,1,2,3,4,5,6,7"
1266 },
1267 {
1268 "PublicDescription": "This event counts, on the per-thread basis, cycles during which uops are dispatched from the Reservation Station (RS) to port 6.",
1269 "EventCode": "0xA1",
1270 "Counter": "0,1,2,3",
1271 "UMask": "0x40",
1272 "EventName": "UOPS_EXECUTED_PORT.PORT_6",
1273 "SampleAfterValue": "2000003",
1274 "BriefDescription": "Cycles per thread when uops are executed in port 6",
1275 "CounterHTOff": "0,1,2,3,4,5,6,7"
1276 },
1277 {
1278 "PublicDescription": "This event counts, on the per-thread basis, cycles during which uops are dispatched from the Reservation Station (RS) to port 7.",
1279 "EventCode": "0xA1",
1280 "Counter": "0,1,2,3",
1281 "UMask": "0x80",
1282 "EventName": "UOPS_EXECUTED_PORT.PORT_7",
1283 "SampleAfterValue": "2000003",
1284 "BriefDescription": "Cycles per thread when uops are executed in port 7",
1285 "CounterHTOff": "0,1,2,3,4,5,6,7"
1286 },
1287 {
1288 "PublicDescription": "This event counts the number of micro-operations cancelled after they were dispatched from the scheduler to the execution units when the total number of physical register read ports across all dispatch ports exceeds the read bandwidth of the physical register file. The SIMD_PRF subevent applies to the following instructions: VDPPS, DPPS, VPCMPESTRI, PCMPESTRI, VPCMPESTRM, PCMPESTRM, VFMADD*, VFMADDSUB*, VFMSUB*, VMSUBADD*, VFNMADD*, VFNMSUB*. See the Broadwell Optimization Guide for more information.",
1289 "EventCode": "0xA0",
1290 "Counter": "0,1,2,3",
1291 "UMask": "0x3",
1292 "EventName": "UOP_DISPATCHES_CANCELLED.SIMD_PRF",
1293 "SampleAfterValue": "2000003",
1294 "BriefDescription": "Micro-op dispatches cancelled due to insufficient SIMD physical register file read ports",
1295 "CounterHTOff": "0,1,2,3"
1296 },
1297 {
1298 "EventCode": "0x00",
1299 "Counter": "Fixed counter 2",
1300 "UMask": "0x2",
1301 "AnyThread": "1",
1302 "EventName": "CPU_CLK_UNHALTED.THREAD_ANY",
1303 "SampleAfterValue": "2000003",
1304 "BriefDescription": "Core cycles when at least one thread on the physical core is not in halt state.",
1305 "CounterHTOff": "Fixed counter 2"
1306 },
1307 {
1308 "EventCode": "0x3C",
1309 "Counter": "0,1,2,3",
1310 "UMask": "0x0",
1311 "AnyThread": "1",
1312 "EventName": "CPU_CLK_UNHALTED.THREAD_P_ANY",
1313 "SampleAfterValue": "2000003",
1314 "BriefDescription": "Core cycles when at least one thread on the physical core is not in halt state.",
1315 "CounterHTOff": "0,1,2,3,4,5,6,7"
1316 },
1317 {
1318 "EventCode": "0x3C",
1319 "Counter": "0,1,2,3",
1320 "UMask": "0x1",
1321 "AnyThread": "1",
1322 "EventName": "CPU_CLK_THREAD_UNHALTED.REF_XCLK_ANY",
1323 "SampleAfterValue": "2000003",
1324 "BriefDescription": "Reference cycles when the at least one thread on the physical core is unhalted (counts at 100 MHz rate).",
1325 "CounterHTOff": "0,1,2,3,4,5,6,7"
1326 },
1327 {
1328 "EventCode": "0x0D",
1329 "Counter": "0,1,2,3",
1330 "UMask": "0x3",
1331 "AnyThread": "1",
1332 "EventName": "INT_MISC.RECOVERY_CYCLES_ANY",
1333 "SampleAfterValue": "2000003",
1334 "BriefDescription": "Core cycles the allocator was stalled due to recovery from earlier clear event for any thread running on the physical core (e.g. misprediction or memory nuke).",
1335 "CounterMask": "1",
1336 "CounterHTOff": "0,1,2,3,4,5,6,7"
1337 },
1338 {
1339 "EventCode": "0xb1",
1340 "Counter": "0,1,2,3",
1341 "UMask": "0x2",
1342 "EventName": "UOPS_EXECUTED.CORE_CYCLES_GE_1",
1343 "SampleAfterValue": "2000003",
1344 "BriefDescription": "Cycles at least 1 micro-op is executed from any thread on physical core.",
1345 "CounterMask": "1",
1346 "CounterHTOff": "0,1,2,3,4,5,6,7"
1347 },
1348 {
1349 "EventCode": "0xb1",
1350 "Counter": "0,1,2,3",
1351 "UMask": "0x2",
1352 "EventName": "UOPS_EXECUTED.CORE_CYCLES_GE_2",
1353 "SampleAfterValue": "2000003",
1354 "BriefDescription": "Cycles at least 2 micro-op is executed from any thread on physical core.",
1355 "CounterMask": "2",
1356 "CounterHTOff": "0,1,2,3,4,5,6,7"
1357 },
1358 {
1359 "EventCode": "0xb1",
1360 "Counter": "0,1,2,3",
1361 "UMask": "0x2",
1362 "EventName": "UOPS_EXECUTED.CORE_CYCLES_GE_3",
1363 "SampleAfterValue": "2000003",
1364 "BriefDescription": "Cycles at least 3 micro-op is executed from any thread on physical core.",
1365 "CounterMask": "3",
1366 "CounterHTOff": "0,1,2,3,4,5,6,7"
1367 },
1368 {
1369 "EventCode": "0xb1",
1370 "Counter": "0,1,2,3",
1371 "UMask": "0x2",
1372 "EventName": "UOPS_EXECUTED.CORE_CYCLES_GE_4",
1373 "SampleAfterValue": "2000003",
1374 "BriefDescription": "Cycles at least 4 micro-op is executed from any thread on physical core.",
1375 "CounterMask": "4",
1376 "CounterHTOff": "0,1,2,3,4,5,6,7"
1377 },
1378 {
1379 "EventCode": "0xb1",
1380 "Invert": "1",
1381 "Counter": "0,1,2,3",
1382 "UMask": "0x2",
1383 "EventName": "UOPS_EXECUTED.CORE_CYCLES_NONE",
1384 "SampleAfterValue": "2000003",
1385 "BriefDescription": "Cycles with no micro-ops executed from any thread on physical core.",
1386 "CounterHTOff": "0,1,2,3,4,5,6,7"
1387 },
1388 {
1389 "PublicDescription": "Reference cycles when the thread is unhalted (counts at 100 MHz rate).",
1390 "EventCode": "0x3C",
1391 "Counter": "0,1,2,3",
1392 "UMask": "0x1",
1393 "EventName": "CPU_CLK_UNHALTED.REF_XCLK",
1394 "SampleAfterValue": "2000003",
1395 "BriefDescription": "Reference cycles when the thread is unhalted (counts at 100 MHz rate)",
1396 "CounterHTOff": "0,1,2,3,4,5,6,7"
1397 },
1398 {
1399 "EventCode": "0x3C",
1400 "Counter": "0,1,2,3",
1401 "UMask": "0x1",
1402 "AnyThread": "1",
1403 "EventName": "CPU_CLK_UNHALTED.REF_XCLK_ANY",
1404 "SampleAfterValue": "2000003",
1405 "BriefDescription": "Reference cycles when the at least one thread on the physical core is unhalted (counts at 100 MHz rate).",
1406 "CounterHTOff": "0,1,2,3,4,5,6,7"
1407 },
1408 {
1409 "EventCode": "0x3C",
1410 "Counter": "0,1,2,3",
1411 "UMask": "0x2",
1412 "EventName": "CPU_CLK_UNHALTED.ONE_THREAD_ACTIVE",
1413 "SampleAfterValue": "2000003",
1414 "BriefDescription": "Count XClk pulses when this thread is unhalted and the other thread is halted.",
1415 "CounterHTOff": "0,1,2,3,4,5,6,7"
1416 } 1426 }
1417] \ No newline at end of file 1427] \ No newline at end of file
diff --git a/tools/perf/pmu-events/arch/x86/broadwell/virtual-memory.json b/tools/perf/pmu-events/arch/x86/broadwell/virtual-memory.json
index 4301e6fbc5eb..2a015e4c7e21 100644
--- a/tools/perf/pmu-events/arch/x86/broadwell/virtual-memory.json
+++ b/tools/perf/pmu-events/arch/x86/broadwell/virtual-memory.json
@@ -44,6 +44,16 @@
44 "CounterHTOff": "0,1,2,3,4,5,6,7" 44 "CounterHTOff": "0,1,2,3,4,5,6,7"
45 }, 45 },
46 { 46 {
47 "EventCode": "0x08",
48 "Counter": "0,1,2,3",
49 "UMask": "0xe",
50 "Errata": "BDM69",
51 "EventName": "DTLB_LOAD_MISSES.WALK_COMPLETED",
52 "SampleAfterValue": "100003",
53 "BriefDescription": "Demand load Miss in all translation lookaside buffer (TLB) levels causes a page walk that completes of any page size.",
54 "CounterHTOff": "0,1,2,3,4,5,6,7"
55 },
56 {
47 "PublicDescription": "This event counts the number of cycles while PMH is busy with the page walk.", 57 "PublicDescription": "This event counts the number of cycles while PMH is busy with the page walk.",
48 "EventCode": "0x08", 58 "EventCode": "0x08",
49 "Counter": "0,1,2,3", 59 "Counter": "0,1,2,3",
@@ -73,6 +83,15 @@
73 "CounterHTOff": "0,1,2,3,4,5,6,7" 83 "CounterHTOff": "0,1,2,3,4,5,6,7"
74 }, 84 },
75 { 85 {
86 "EventCode": "0x08",
87 "Counter": "0,1,2,3",
88 "UMask": "0x60",
89 "EventName": "DTLB_LOAD_MISSES.STLB_HIT",
90 "SampleAfterValue": "2000003",
91 "BriefDescription": "Load operations that miss the first DTLB level but hit the second and do not cause page walks.",
92 "CounterHTOff": "0,1,2,3,4,5,6,7"
93 },
94 {
76 "PublicDescription": "This event counts store misses in all DTLB levels that cause page walks of any page size (4K/2M/4M/1G).", 95 "PublicDescription": "This event counts store misses in all DTLB levels that cause page walks of any page size (4K/2M/4M/1G).",
77 "EventCode": "0x49", 96 "EventCode": "0x49",
78 "Counter": "0,1,2,3", 97 "Counter": "0,1,2,3",
@@ -117,6 +136,16 @@
117 "CounterHTOff": "0,1,2,3,4,5,6,7" 136 "CounterHTOff": "0,1,2,3,4,5,6,7"
118 }, 137 },
119 { 138 {
139 "EventCode": "0x49",
140 "Counter": "0,1,2,3",
141 "UMask": "0xe",
142 "Errata": "BDM69",
143 "EventName": "DTLB_STORE_MISSES.WALK_COMPLETED",
144 "SampleAfterValue": "100003",
145 "BriefDescription": "Store misses in all DTLB levels that cause completed page walks.",
146 "CounterHTOff": "0,1,2,3,4,5,6,7"
147 },
148 {
120 "PublicDescription": "This event counts the number of cycles while PMH is busy with the page walk.", 149 "PublicDescription": "This event counts the number of cycles while PMH is busy with the page walk.",
121 "EventCode": "0x49", 150 "EventCode": "0x49",
122 "Counter": "0,1,2,3", 151 "Counter": "0,1,2,3",
@@ -146,6 +175,15 @@
146 "CounterHTOff": "0,1,2,3,4,5,6,7" 175 "CounterHTOff": "0,1,2,3,4,5,6,7"
147 }, 176 },
148 { 177 {
178 "EventCode": "0x49",
179 "Counter": "0,1,2,3",
180 "UMask": "0x60",
181 "EventName": "DTLB_STORE_MISSES.STLB_HIT",
182 "SampleAfterValue": "100003",
183 "BriefDescription": "Store operations that miss the first TLB level but hit the second and do not cause page walks.",
184 "CounterHTOff": "0,1,2,3,4,5,6,7"
185 },
186 {
149 "PublicDescription": "This event counts cycles for an extended page table walk. The Extended Page directory cache differs from standard TLB caches by the operating system that use it. Virtual machine operating systems use the extended page directory cache, while guest operating systems use the standard TLB caches.", 187 "PublicDescription": "This event counts cycles for an extended page table walk. The Extended Page directory cache differs from standard TLB caches by the operating system that use it. Virtual machine operating systems use the extended page directory cache, while guest operating systems use the standard TLB caches.",
150 "EventCode": "0x4F", 188 "EventCode": "0x4F",
151 "Counter": "0,1,2,3", 189 "Counter": "0,1,2,3",
@@ -200,6 +238,16 @@
200 "CounterHTOff": "0,1,2,3,4,5,6,7" 238 "CounterHTOff": "0,1,2,3,4,5,6,7"
201 }, 239 },
202 { 240 {
241 "EventCode": "0x85",
242 "Counter": "0,1,2,3",
243 "UMask": "0xe",
244 "Errata": "BDM69",
245 "EventName": "ITLB_MISSES.WALK_COMPLETED",
246 "SampleAfterValue": "100003",
247 "BriefDescription": "Misses in all ITLB levels that cause completed page walks.",
248 "CounterHTOff": "0,1,2,3,4,5,6,7"
249 },
250 {
203 "PublicDescription": "This event counts the number of cycles while PMH is busy with the page walk.", 251 "PublicDescription": "This event counts the number of cycles while PMH is busy with the page walk.",
204 "EventCode": "0x85", 252 "EventCode": "0x85",
205 "Counter": "0,1,2,3", 253 "Counter": "0,1,2,3",
@@ -229,6 +277,15 @@
229 "CounterHTOff": "0,1,2,3,4,5,6,7" 277 "CounterHTOff": "0,1,2,3,4,5,6,7"
230 }, 278 },
231 { 279 {
280 "EventCode": "0x85",
281 "Counter": "0,1,2,3",
282 "UMask": "0x60",
283 "EventName": "ITLB_MISSES.STLB_HIT",
284 "SampleAfterValue": "100003",
285 "BriefDescription": "Operations that miss the first ITLB level but hit the second and do not cause any page walks.",
286 "CounterHTOff": "0,1,2,3,4,5,6,7"
287 },
288 {
232 "PublicDescription": "This event counts the number of flushes of the big or small ITLB pages. Counting include both TLB Flush (covering all sets) and TLB Set Clear (set-specific).", 289 "PublicDescription": "This event counts the number of flushes of the big or small ITLB pages. Counting include both TLB Flush (covering all sets) and TLB Set Clear (set-specific).",
233 "EventCode": "0xAE", 290 "EventCode": "0xAE",
234 "Counter": "0,1,2,3", 291 "Counter": "0,1,2,3",
@@ -251,61 +308,61 @@
251 { 308 {
252 "EventCode": "0xBC", 309 "EventCode": "0xBC",
253 "Counter": "0,1,2,3", 310 "Counter": "0,1,2,3",
254 "UMask": "0x21", 311 "UMask": "0x12",
255 "Errata": "BDM69, BDM98", 312 "Errata": "BDM69, BDM98",
256 "EventName": "PAGE_WALKER_LOADS.ITLB_L1", 313 "EventName": "PAGE_WALKER_LOADS.DTLB_L2",
257 "SampleAfterValue": "2000003", 314 "SampleAfterValue": "2000003",
258 "BriefDescription": "Number of ITLB page walker hits in the L1+FB.", 315 "BriefDescription": "Number of DTLB page walker hits in the L2.",
259 "CounterHTOff": "0,1,2,3" 316 "CounterHTOff": "0,1,2,3"
260 }, 317 },
261 { 318 {
262 "EventCode": "0xBC", 319 "EventCode": "0xBC",
263 "Counter": "0,1,2,3", 320 "Counter": "0,1,2,3",
264 "UMask": "0x12", 321 "UMask": "0x14",
265 "Errata": "BDM69, BDM98", 322 "Errata": "BDM69, BDM98",
266 "EventName": "PAGE_WALKER_LOADS.DTLB_L2", 323 "EventName": "PAGE_WALKER_LOADS.DTLB_L3",
267 "SampleAfterValue": "2000003", 324 "SampleAfterValue": "2000003",
268 "BriefDescription": "Number of DTLB page walker hits in the L2.", 325 "BriefDescription": "Number of DTLB page walker hits in the L3 + XSNP.",
269 "CounterHTOff": "0,1,2,3" 326 "CounterHTOff": "0,1,2,3"
270 }, 327 },
271 { 328 {
272 "EventCode": "0xBC", 329 "EventCode": "0xBC",
273 "Counter": "0,1,2,3", 330 "Counter": "0,1,2,3",
274 "UMask": "0x22", 331 "UMask": "0x18",
275 "Errata": "BDM69, BDM98", 332 "Errata": "BDM69, BDM98",
276 "EventName": "PAGE_WALKER_LOADS.ITLB_L2", 333 "EventName": "PAGE_WALKER_LOADS.DTLB_MEMORY",
277 "SampleAfterValue": "2000003", 334 "SampleAfterValue": "2000003",
278 "BriefDescription": "Number of ITLB page walker hits in the L2.", 335 "BriefDescription": "Number of DTLB page walker hits in Memory.",
279 "CounterHTOff": "0,1,2,3" 336 "CounterHTOff": "0,1,2,3"
280 }, 337 },
281 { 338 {
282 "EventCode": "0xBC", 339 "EventCode": "0xBC",
283 "Counter": "0,1,2,3", 340 "Counter": "0,1,2,3",
284 "UMask": "0x14", 341 "UMask": "0x21",
285 "Errata": "BDM69, BDM98", 342 "Errata": "BDM69, BDM98",
286 "EventName": "PAGE_WALKER_LOADS.DTLB_L3", 343 "EventName": "PAGE_WALKER_LOADS.ITLB_L1",
287 "SampleAfterValue": "2000003", 344 "SampleAfterValue": "2000003",
288 "BriefDescription": "Number of DTLB page walker hits in the L3 + XSNP.", 345 "BriefDescription": "Number of ITLB page walker hits in the L1+FB.",
289 "CounterHTOff": "0,1,2,3" 346 "CounterHTOff": "0,1,2,3"
290 }, 347 },
291 { 348 {
292 "EventCode": "0xBC", 349 "EventCode": "0xBC",
293 "Counter": "0,1,2,3", 350 "Counter": "0,1,2,3",
294 "UMask": "0x24", 351 "UMask": "0x22",
295 "Errata": "BDM69, BDM98", 352 "Errata": "BDM69, BDM98",
296 "EventName": "PAGE_WALKER_LOADS.ITLB_L3", 353 "EventName": "PAGE_WALKER_LOADS.ITLB_L2",
297 "SampleAfterValue": "2000003", 354 "SampleAfterValue": "2000003",
298 "BriefDescription": "Number of ITLB page walker hits in the L3 + XSNP.", 355 "BriefDescription": "Number of ITLB page walker hits in the L2.",
299 "CounterHTOff": "0,1,2,3" 356 "CounterHTOff": "0,1,2,3"
300 }, 357 },
301 { 358 {
302 "EventCode": "0xBC", 359 "EventCode": "0xBC",
303 "Counter": "0,1,2,3", 360 "Counter": "0,1,2,3",
304 "UMask": "0x18", 361 "UMask": "0x24",
305 "Errata": "BDM69, BDM98", 362 "Errata": "BDM69, BDM98",
306 "EventName": "PAGE_WALKER_LOADS.DTLB_MEMORY", 363 "EventName": "PAGE_WALKER_LOADS.ITLB_L3",
307 "SampleAfterValue": "2000003", 364 "SampleAfterValue": "2000003",
308 "BriefDescription": "Number of DTLB page walker hits in Memory.", 365 "BriefDescription": "Number of ITLB page walker hits in the L3 + XSNP.",
309 "CounterHTOff": "0,1,2,3" 366 "CounterHTOff": "0,1,2,3"
310 }, 367 },
311 { 368 {
@@ -327,62 +384,5 @@
327 "SampleAfterValue": "100007", 384 "SampleAfterValue": "100007",
328 "BriefDescription": "STLB flush attempts", 385 "BriefDescription": "STLB flush attempts",
329 "CounterHTOff": "0,1,2,3,4,5,6,7" 386 "CounterHTOff": "0,1,2,3,4,5,6,7"
330 },
331 {
332 "EventCode": "0x08",
333 "Counter": "0,1,2,3",
334 "UMask": "0xe",
335 "Errata": "BDM69",
336 "EventName": "DTLB_LOAD_MISSES.WALK_COMPLETED",
337 "SampleAfterValue": "100003",
338 "BriefDescription": "Demand load Miss in all translation lookaside buffer (TLB) levels causes a page walk that completes of any page size.",
339 "CounterHTOff": "0,1,2,3,4,5,6,7"
340 },
341 {
342 "EventCode": "0x08",
343 "Counter": "0,1,2,3",
344 "UMask": "0x60",
345 "EventName": "DTLB_LOAD_MISSES.STLB_HIT",
346 "SampleAfterValue": "2000003",
347 "BriefDescription": "Load operations that miss the first DTLB level but hit the second and do not cause page walks.",
348 "CounterHTOff": "0,1,2,3,4,5,6,7"
349 },
350 {
351 "EventCode": "0x49",
352 "Counter": "0,1,2,3",
353 "UMask": "0xe",
354 "Errata": "BDM69",
355 "EventName": "DTLB_STORE_MISSES.WALK_COMPLETED",
356 "SampleAfterValue": "100003",
357 "BriefDescription": "Store misses in all DTLB levels that cause completed page walks.",
358 "CounterHTOff": "0,1,2,3,4,5,6,7"
359 },
360 {
361 "EventCode": "0x49",
362 "Counter": "0,1,2,3",
363 "UMask": "0x60",
364 "EventName": "DTLB_STORE_MISSES.STLB_HIT",
365 "SampleAfterValue": "100003",
366 "BriefDescription": "Store operations that miss the first TLB level but hit the second and do not cause page walks.",
367 "CounterHTOff": "0,1,2,3,4,5,6,7"
368 },
369 {
370 "EventCode": "0x85",
371 "Counter": "0,1,2,3",
372 "UMask": "0xe",
373 "Errata": "BDM69",
374 "EventName": "ITLB_MISSES.WALK_COMPLETED",
375 "SampleAfterValue": "100003",
376 "BriefDescription": "Misses in all ITLB levels that cause completed page walks.",
377 "CounterHTOff": "0,1,2,3,4,5,6,7"
378 },
379 {
380 "EventCode": "0x85",
381 "Counter": "0,1,2,3",
382 "UMask": "0x60",
383 "EventName": "ITLB_MISSES.STLB_HIT",
384 "SampleAfterValue": "100003",
385 "BriefDescription": "Operations that miss the first ITLB level but hit the second and do not cause any page walks.",
386 "CounterHTOff": "0,1,2,3,4,5,6,7"
387 } 387 }
388] \ No newline at end of file 388] \ No newline at end of file
diff --git a/tools/perf/pmu-events/arch/x86/broadwellde/bdwde-metrics.json b/tools/perf/pmu-events/arch/x86/broadwellde/bdwde-metrics.json
new file mode 100644
index 000000000000..49c5f123d811
--- /dev/null
+++ b/tools/perf/pmu-events/arch/x86/broadwellde/bdwde-metrics.json
@@ -0,0 +1,164 @@
1[
2 {
3 "BriefDescription": "Instructions Per Cycle (per logical thread)",
4 "MetricExpr": "INST_RETIRED.ANY / CPU_CLK_UNHALTED.THREAD",
5 "MetricGroup": "TopDownL1",
6 "MetricName": "IPC"
7 },
8 {
9 "BriefDescription": "Uops Per Instruction",
10 "MetricExpr": "UOPS_RETIRED.RETIRE_SLOTS / INST_RETIRED.ANY",
11 "MetricGroup": "Pipeline",
12 "MetricName": "UPI"
13 },
14 {
15 "BriefDescription": "Rough Estimation of fraction of fetched lines bytes that were likely consumed by program instructions",
16 "MetricExpr": "min( 1 , IDQ.MITE_UOPS / ( UOPS_RETIRED.RETIRE_SLOTS / INST_RETIRED.ANY * 16 * ( ICACHE.HIT + ICACHE.MISSES ) / 4.0 ) )",
17 "MetricGroup": "Frontend",
18 "MetricName": "IFetch_Line_Utilization"
19 },
20 {
21 "BriefDescription": "Fraction of Uops delivered by the DSB (aka Decoded Icache; or Uop Cache)",
22 "MetricExpr": "IDQ.DSB_UOPS / ( IDQ.DSB_UOPS + LSD.UOPS + IDQ.MITE_UOPS + IDQ.MS_UOPS )",
23 "MetricGroup": "DSB; Frontend_Bandwidth",
24 "MetricName": "DSB_Coverage"
25 },
26 {
27 "BriefDescription": "Cycles Per Instruction (threaded)",
28 "MetricExpr": "1 / INST_RETIRED.ANY / cycles",
29 "MetricGroup": "Pipeline;Summary",
30 "MetricName": "CPI"
31 },
32 {
33 "BriefDescription": "Per-thread actual clocks when the logical processor is active. This is called 'Clockticks' in VTune.",
34 "MetricExpr": "CPU_CLK_UNHALTED.THREAD",
35 "MetricGroup": "Summary",
36 "MetricName": "CLKS"
37 },
38 {
39 "BriefDescription": "Total issue-pipeline slots",
40 "MetricExpr": "4*( CPU_CLK_UNHALTED.THREAD_ANY / 2 ) if #SMT_on else cycles",
41 "MetricGroup": "TopDownL1",
42 "MetricName": "SLOTS"
43 },
44 {
45 "BriefDescription": "Total number of retired Instructions",
46 "MetricExpr": "INST_RETIRED.ANY",
47 "MetricGroup": "Summary",
48 "MetricName": "Instructions"
49 },
50 {
51 "BriefDescription": "Instructions Per Cycle (per physical core)",
52 "MetricExpr": "INST_RETIRED.ANY / ( CPU_CLK_UNHALTED.THREAD_ANY / 2 ) if #SMT_on else cycles",
53 "MetricGroup": "SMT",
54 "MetricName": "CoreIPC"
55 },
56 {
57 "BriefDescription": "Instruction-Level-Parallelism (average number of uops executed when there is at least 1 uop executed)",
58 "MetricExpr": "UOPS_EXECUTED.THREAD / ( cpu@uops_executed.core\\,cmask\\=1@ / 2) if #SMT_on else UOPS_EXECUTED.CYCLES_GE_1_UOP_EXEC",
59 "MetricGroup": "Pipeline;Ports_Utilization",
60 "MetricName": "ILP"
61 },
62 {
63 "BriefDescription": "Average Branch Address Clear Cost (fraction of cycles)",
64 "MetricExpr": "2* ( RS_EVENTS.EMPTY_CYCLES - ICACHE.IFDATA_STALL - ( 14 * ITLB_MISSES.STLB_HIT + cpu@ITLB_MISSES.WALK_DURATION\\,cmask\\=1@ + 7* ITLB_MISSES.WALK_COMPLETED ) ) / RS_EVENTS.EMPTY_END",
65 "MetricGroup": "Unknown_Branches",
66 "MetricName": "BAClear_Cost"
67 },
68 {
69 "BriefDescription": "Core actual clocks when any thread is active on the physical core",
70 "MetricExpr": "( CPU_CLK_UNHALTED.THREAD_ANY / 2 ) if #SMT_on else CPU_CLK_UNHALTED.THREAD",
71 "MetricGroup": "SMT",
72 "MetricName": "CORE_CLKS"
73 },
74 {
75 "BriefDescription": "Actual Average Latency for L1 data-cache miss demand loads",
76 "MetricExpr": "L1D_PEND_MISS.PENDING / ( MEM_LOAD_UOPS_RETIRED.L1_MISS + mem_load_uops_retired.hit_lfb )",
77 "MetricGroup": "Memory_Bound;Memory_Lat",
78 "MetricName": "Load_Miss_Real_Latency"
79 },
80 {
81 "BriefDescription": "Memory-Level-Parallelism (average number of L1 miss demand load when there is at least 1 such miss)",
82 "MetricExpr": "L1D_PEND_MISS.PENDING / ( cpu@l1d_pend_miss.pending_cycles\\,any\\=1@ / 2) if #SMT_on else L1D_PEND_MISS.PENDING_CYCLES",
83 "MetricGroup": "Memory_Bound;Memory_BW",
84 "MetricName": "MLP"
85 },
86 {
87 "BriefDescription": "Utilization of the core's Page Walker(s) serving STLB misses triggered by instruction/Load/Store accesses",
88 "MetricExpr": "( cpu@ITLB_MISSES.WALK_DURATION\\,cmask\\=1@ + cpu@DTLB_LOAD_MISSES.WALK_DURATION\\,cmask\\=1@ + cpu@DTLB_STORE_MISSES.WALK_DURATION\\,cmask\\=1@ + 7*(DTLB_STORE_MISSES.WALK_COMPLETED+DTLB_LOAD_MISSES.WALK_COMPLETED+ITLB_MISSES.WALK_COMPLETED)) / ( CPU_CLK_UNHALTED.THREAD_ANY / 2 ) if #SMT_on else cycles",
89 "MetricGroup": "TLB",
90 "MetricName": "Page_Walks_Utilization"
91 },
92 {
93 "BriefDescription": "Average CPU Utilization",
94 "MetricExpr": "CPU_CLK_UNHALTED.REF_TSC / msr@tsc@",
95 "MetricGroup": "Summary",
96 "MetricName": "CPU_Utilization"
97 },
98 {
99 "BriefDescription": "Giga Floating Point Operations Per Second",
100 "MetricExpr": "( 1*( FP_ARITH_INST_RETIRED.SCALAR_SINGLE + FP_ARITH_INST_RETIRED.SCALAR_DOUBLE ) + 2* FP_ARITH_INST_RETIRED.128B_PACKED_DOUBLE + 4*( FP_ARITH_INST_RETIRED.128B_PACKED_SINGLE + FP_ARITH_INST_RETIRED.256B_PACKED_DOUBLE ) + 8* FP_ARITH_INST_RETIRED.256B_PACKED_SINGLE ) / 1000000000 / duration_time",
101 "MetricGroup": "FLOPS;Summary",
102 "MetricName": "GFLOPs"
103 },
104 {
105 "BriefDescription": "Average Frequency Utilization relative nominal frequency",
106 "MetricExpr": "CPU_CLK_UNHALTED.THREAD / CPU_CLK_UNHALTED.REF_TSC",
107 "MetricGroup": "Power",
108 "MetricName": "Turbo_Utilization"
109 },
110 {
111 "BriefDescription": "Fraction of cycles where both hardware threads were active",
112 "MetricExpr": "1 - CPU_CLK_THREAD_UNHALTED.ONE_THREAD_ACTIVE / ( CPU_CLK_THREAD_UNHALTED.REF_XCLK_ANY / 2 ) if #SMT_on else 0",
113 "MetricGroup": "SMT;Summary",
114 "MetricName": "SMT_2T_Utilization"
115 },
116 {
117 "BriefDescription": "Fraction of cycles spent in Kernel mode",
118 "MetricExpr": "CPU_CLK_UNHALTED.REF_TSC:u / CPU_CLK_UNHALTED.REF_TSC",
119 "MetricGroup": "Summary",
120 "MetricName": "Kernel_Utilization"
121 },
122 {
123 "BriefDescription": "C3 residency percent per core",
124 "MetricExpr": "(cstate_core@c3\\-residency@ / msr@tsc@) * 100",
125 "MetricGroup": "Power",
126 "MetricName": "C3_Core_Residency"
127 },
128 {
129 "BriefDescription": "C6 residency percent per core",
130 "MetricExpr": "(cstate_core@c6\\-residency@ / msr@tsc@) * 100",
131 "MetricGroup": "Power",
132 "MetricName": "C6_Core_Residency"
133 },
134 {
135 "BriefDescription": "C7 residency percent per core",
136 "MetricExpr": "(cstate_core@c7\\-residency@ / msr@tsc@) * 100",
137 "MetricGroup": "Power",
138 "MetricName": "C7_Core_Residency"
139 },
140 {
141 "BriefDescription": "C2 residency percent per package",
142 "MetricExpr": "(cstate_pkg@c2\\-residency@ / msr@tsc@) * 100",
143 "MetricGroup": "Power",
144 "MetricName": "C2_Pkg_Residency"
145 },
146 {
147 "BriefDescription": "C3 residency percent per package",
148 "MetricExpr": "(cstate_pkg@c3\\-residency@ / msr@tsc@) * 100",
149 "MetricGroup": "Power",
150 "MetricName": "C3_Pkg_Residency"
151 },
152 {
153 "BriefDescription": "C6 residency percent per package",
154 "MetricExpr": "(cstate_pkg@c6\\-residency@ / msr@tsc@) * 100",
155 "MetricGroup": "Power",
156 "MetricName": "C6_Pkg_Residency"
157 },
158 {
159 "BriefDescription": "C7 residency percent per package",
160 "MetricExpr": "(cstate_pkg@c7\\-residency@ / msr@tsc@) * 100",
161 "MetricGroup": "Power",
162 "MetricName": "C7_Pkg_Residency"
163 }
164]
diff --git a/tools/perf/pmu-events/arch/x86/broadwellde/cache.json b/tools/perf/pmu-events/arch/x86/broadwellde/cache.json
index 36fe398029b9..bf243fe2a0ec 100644
--- a/tools/perf/pmu-events/arch/x86/broadwellde/cache.json
+++ b/tools/perf/pmu-events/arch/x86/broadwellde/cache.json
@@ -11,11 +11,28 @@
11 }, 11 },
12 { 12 {
13 "EventCode": "0x24", 13 "EventCode": "0x24",
14 "UMask": "0x41", 14 "UMask": "0x22",
15 "BriefDescription": "Demand Data Read requests that hit L2 cache", 15 "BriefDescription": "RFO requests that miss L2 cache.",
16 "Counter": "0,1,2,3", 16 "Counter": "0,1,2,3",
17 "EventName": "L2_RQSTS.DEMAND_DATA_RD_HIT", 17 "EventName": "L2_RQSTS.RFO_MISS",
18 "PublicDescription": "This event counts the number of demand Data Read requests that hit L2 cache. Only not rejected loads are counted.", 18 "SampleAfterValue": "200003",
19 "CounterHTOff": "0,1,2,3,4,5,6,7"
20 },
21 {
22 "EventCode": "0x24",
23 "UMask": "0x24",
24 "BriefDescription": "L2 cache misses when fetching instructions.",
25 "Counter": "0,1,2,3",
26 "EventName": "L2_RQSTS.CODE_RD_MISS",
27 "SampleAfterValue": "200003",
28 "CounterHTOff": "0,1,2,3,4,5,6,7"
29 },
30 {
31 "EventCode": "0x24",
32 "UMask": "0x27",
33 "BriefDescription": "Demand requests that miss L2 cache.",
34 "Counter": "0,1,2,3",
35 "EventName": "L2_RQSTS.ALL_DEMAND_MISS",
19 "SampleAfterValue": "200003", 36 "SampleAfterValue": "200003",
20 "CounterHTOff": "0,1,2,3,4,5,6,7" 37 "CounterHTOff": "0,1,2,3,4,5,6,7"
21 }, 38 },
@@ -31,6 +48,43 @@
31 }, 48 },
32 { 49 {
33 "EventCode": "0x24", 50 "EventCode": "0x24",
51 "UMask": "0x3f",
52 "BriefDescription": "All requests that miss L2 cache.",
53 "Counter": "0,1,2,3",
54 "EventName": "L2_RQSTS.MISS",
55 "SampleAfterValue": "200003",
56 "CounterHTOff": "0,1,2,3,4,5,6,7"
57 },
58 {
59 "EventCode": "0x24",
60 "UMask": "0x41",
61 "BriefDescription": "Demand Data Read requests that hit L2 cache",
62 "Counter": "0,1,2,3",
63 "EventName": "L2_RQSTS.DEMAND_DATA_RD_HIT",
64 "PublicDescription": "This event counts the number of demand Data Read requests that hit L2 cache. Only not rejected loads are counted.",
65 "SampleAfterValue": "200003",
66 "CounterHTOff": "0,1,2,3,4,5,6,7"
67 },
68 {
69 "EventCode": "0x24",
70 "UMask": "0x42",
71 "BriefDescription": "RFO requests that hit L2 cache.",
72 "Counter": "0,1,2,3",
73 "EventName": "L2_RQSTS.RFO_HIT",
74 "SampleAfterValue": "200003",
75 "CounterHTOff": "0,1,2,3,4,5,6,7"
76 },
77 {
78 "EventCode": "0x24",
79 "UMask": "0x44",
80 "BriefDescription": "L2 cache hits when fetching instructions, code reads.",
81 "Counter": "0,1,2,3",
82 "EventName": "L2_RQSTS.CODE_RD_HIT",
83 "SampleAfterValue": "200003",
84 "CounterHTOff": "0,1,2,3,4,5,6,7"
85 },
86 {
87 "EventCode": "0x24",
34 "UMask": "0x50", 88 "UMask": "0x50",
35 "BriefDescription": "L2 prefetch requests that hit L2 cache", 89 "BriefDescription": "L2 prefetch requests that hit L2 cache",
36 "Counter": "0,1,2,3", 90 "Counter": "0,1,2,3",
@@ -71,6 +125,15 @@
71 }, 125 },
72 { 126 {
73 "EventCode": "0x24", 127 "EventCode": "0x24",
128 "UMask": "0xe7",
129 "BriefDescription": "Demand requests to L2 cache.",
130 "Counter": "0,1,2,3",
131 "EventName": "L2_RQSTS.ALL_DEMAND_REFERENCES",
132 "SampleAfterValue": "200003",
133 "CounterHTOff": "0,1,2,3,4,5,6,7"
134 },
135 {
136 "EventCode": "0x24",
74 "UMask": "0xf8", 137 "UMask": "0xf8",
75 "BriefDescription": "Requests from L2 hardware prefetchers", 138 "BriefDescription": "Requests from L2 hardware prefetchers",
76 "Counter": "0,1,2,3", 139 "Counter": "0,1,2,3",
@@ -80,6 +143,15 @@
80 "CounterHTOff": "0,1,2,3,4,5,6,7" 143 "CounterHTOff": "0,1,2,3,4,5,6,7"
81 }, 144 },
82 { 145 {
146 "EventCode": "0x24",
147 "UMask": "0xff",
148 "BriefDescription": "All L2 requests.",
149 "Counter": "0,1,2,3",
150 "EventName": "L2_RQSTS.REFERENCES",
151 "SampleAfterValue": "200003",
152 "CounterHTOff": "0,1,2,3,4,5,6,7"
153 },
154 {
83 "EventCode": "0x27", 155 "EventCode": "0x27",
84 "UMask": "0x50", 156 "UMask": "0x50",
85 "BriefDescription": "Not rejected writebacks that hit L2 cache", 157 "BriefDescription": "Not rejected writebacks that hit L2 cache",
@@ -131,6 +203,27 @@
131 "CounterHTOff": "2" 203 "CounterHTOff": "2"
132 }, 204 },
133 { 205 {
206 "EventCode": "0x48",
207 "UMask": "0x1",
208 "BriefDescription": "Cycles with L1D load Misses outstanding from any thread on physical core.",
209 "Counter": "2",
210 "EventName": "L1D_PEND_MISS.PENDING_CYCLES_ANY",
211 "AnyThread": "1",
212 "CounterMask": "1",
213 "SampleAfterValue": "2000003",
214 "CounterHTOff": "2"
215 },
216 {
217 "EventCode": "0x48",
218 "UMask": "0x2",
219 "BriefDescription": "Cycles a demand request was blocked due to Fill Buffers inavailability.",
220 "Counter": "0,1,2,3",
221 "EventName": "L1D_PEND_MISS.FB_FULL",
222 "CounterMask": "1",
223 "SampleAfterValue": "2000003",
224 "CounterHTOff": "0,1,2,3,4,5,6,7"
225 },
226 {
134 "EventCode": "0x51", 227 "EventCode": "0x51",
135 "UMask": "0x1", 228 "UMask": "0x1",
136 "BriefDescription": "L1D data line replacements", 229 "BriefDescription": "L1D data line replacements",
@@ -153,12 +246,35 @@
153 }, 246 },
154 { 247 {
155 "EventCode": "0x60", 248 "EventCode": "0x60",
249 "UMask": "0x1",
250 "BriefDescription": "Cycles when offcore outstanding Demand Data Read transactions are present in SuperQueue (SQ), queue to uncore",
251 "Counter": "0,1,2,3",
252 "EventName": "OFFCORE_REQUESTS_OUTSTANDING.CYCLES_WITH_DEMAND_DATA_RD",
253 "CounterMask": "1",
254 "Errata": "BDM76",
255 "PublicDescription": "This event counts cycles when offcore outstanding Demand Data Read transactions are present in the super queue (SQ). A transaction is considered to be in the Offcore outstanding state between L2 miss and transaction completion sent to requestor (SQ de-allocation).",
256 "SampleAfterValue": "2000003",
257 "CounterHTOff": "0,1,2,3,4,5,6,7"
258 },
259 {
260 "EventCode": "0x60",
261 "UMask": "0x1",
262 "BriefDescription": "Cycles with at least 6 offcore outstanding Demand Data Read transactions in uncore queue.",
263 "Counter": "0,1,2,3",
264 "EventName": "OFFCORE_REQUESTS_OUTSTANDING.DEMAND_DATA_RD_GE_6",
265 "CounterMask": "6",
266 "Errata": "BDM76",
267 "SampleAfterValue": "2000003",
268 "CounterHTOff": "0,1,2,3,4,5,6,7"
269 },
270 {
271 "EventCode": "0x60",
156 "UMask": "0x2", 272 "UMask": "0x2",
157 "BriefDescription": "Offcore outstanding code reads transactions in SuperQueue (SQ), queue to uncore, every cycle", 273 "BriefDescription": "Offcore outstanding code reads transactions in SuperQueue (SQ), queue to uncore, every cycle",
158 "Counter": "0,1,2,3", 274 "Counter": "0,1,2,3",
159 "EventName": "OFFCORE_REQUESTS_OUTSTANDING.DEMAND_CODE_RD", 275 "EventName": "OFFCORE_REQUESTS_OUTSTANDING.DEMAND_CODE_RD",
160 "Errata": "BDM76", 276 "Errata": "BDM76",
161 "PublicDescription": "This event counts the number of offcore outstanding Code Reads transactions in the super queue every cycle. The \"Offcore outstanding\" state of the transaction lasts from the L2 miss until the sending transaction completion to requestor (SQ deallocation). See the corresponding Umask under OFFCORE_REQUESTS.", 277 "PublicDescription": "This event counts the number of offcore outstanding Code Reads transactions in the super queue every cycle. The Offcore outstanding state of the transaction lasts from the L2 miss until the sending transaction completion to requestor (SQ deallocation). See the corresponding Umask under OFFCORE_REQUESTS.",
162 "SampleAfterValue": "2000003", 278 "SampleAfterValue": "2000003",
163 "CounterHTOff": "0,1,2,3,4,5,6,7" 279 "CounterHTOff": "0,1,2,3,4,5,6,7"
164 }, 280 },
@@ -175,24 +291,24 @@
175 }, 291 },
176 { 292 {
177 "EventCode": "0x60", 293 "EventCode": "0x60",
178 "UMask": "0x8", 294 "UMask": "0x4",
179 "BriefDescription": "Offcore outstanding cacheable Core Data Read transactions in SuperQueue (SQ), queue to uncore", 295 "BriefDescription": "Offcore outstanding demand rfo reads transactions in SuperQueue (SQ), queue to uncore, every cycle",
180 "Counter": "0,1,2,3", 296 "Counter": "0,1,2,3",
181 "EventName": "OFFCORE_REQUESTS_OUTSTANDING.ALL_DATA_RD", 297 "EventName": "OFFCORE_REQUESTS_OUTSTANDING.CYCLES_WITH_DEMAND_RFO",
298 "CounterMask": "1",
182 "Errata": "BDM76", 299 "Errata": "BDM76",
183 "PublicDescription": "This event counts the number of offcore outstanding cacheable Core Data Read transactions in the super queue every cycle. A transaction is considered to be in the Offcore outstanding state between L2 miss and transaction completion sent to requestor (SQ de-allocation). See corresponding Umask under OFFCORE_REQUESTS.", 300 "PublicDescription": "This event counts the number of offcore outstanding demand rfo Reads transactions in the super queue every cycle. The Offcore outstanding state of the transaction lasts from the L2 miss until the sending transaction completion to requestor (SQ deallocation). See the corresponding Umask under OFFCORE_REQUESTS.",
184 "SampleAfterValue": "2000003", 301 "SampleAfterValue": "2000003",
185 "CounterHTOff": "0,1,2,3,4,5,6,7" 302 "CounterHTOff": "0,1,2,3,4,5,6,7"
186 }, 303 },
187 { 304 {
188 "EventCode": "0x60", 305 "EventCode": "0x60",
189 "UMask": "0x1", 306 "UMask": "0x8",
190 "BriefDescription": "Cycles when offcore outstanding Demand Data Read transactions are present in SuperQueue (SQ), queue to uncore", 307 "BriefDescription": "Offcore outstanding cacheable Core Data Read transactions in SuperQueue (SQ), queue to uncore",
191 "Counter": "0,1,2,3", 308 "Counter": "0,1,2,3",
192 "EventName": "OFFCORE_REQUESTS_OUTSTANDING.CYCLES_WITH_DEMAND_DATA_RD", 309 "EventName": "OFFCORE_REQUESTS_OUTSTANDING.ALL_DATA_RD",
193 "CounterMask": "1",
194 "Errata": "BDM76", 310 "Errata": "BDM76",
195 "PublicDescription": "This event counts cycles when offcore outstanding Demand Data Read transactions are present in the super queue (SQ). A transaction is considered to be in the Offcore outstanding state between L2 miss and transaction completion sent to requestor (SQ de-allocation).", 311 "PublicDescription": "This event counts the number of offcore outstanding cacheable Core Data Read transactions in the super queue every cycle. A transaction is considered to be in the Offcore outstanding state between L2 miss and transaction completion sent to requestor (SQ de-allocation). See corresponding Umask under OFFCORE_REQUESTS.",
196 "SampleAfterValue": "2000003", 312 "SampleAfterValue": "2000003",
197 "CounterHTOff": "0,1,2,3,4,5,6,7" 313 "CounterHTOff": "0,1,2,3,4,5,6,7"
198 }, 314 },
@@ -209,18 +325,6 @@
209 "CounterHTOff": "0,1,2,3,4,5,6,7" 325 "CounterHTOff": "0,1,2,3,4,5,6,7"
210 }, 326 },
211 { 327 {
212 "EventCode": "0x60",
213 "UMask": "0x4",
214 "BriefDescription": "Offcore outstanding demand rfo reads transactions in SuperQueue (SQ), queue to uncore, every cycle",
215 "Counter": "0,1,2,3",
216 "EventName": "OFFCORE_REQUESTS_OUTSTANDING.CYCLES_WITH_DEMAND_RFO",
217 "CounterMask": "1",
218 "Errata": "BDM76",
219 "PublicDescription": "This event counts the number of offcore outstanding demand rfo Reads transactions in the super queue every cycle. The \"Offcore outstanding\" state of the transaction lasts from the L2 miss until the sending transaction completion to requestor (SQ deallocation). See the corresponding Umask under OFFCORE_REQUESTS.",
220 "SampleAfterValue": "2000003",
221 "CounterHTOff": "0,1,2,3,4,5,6,7"
222 },
223 {
224 "EventCode": "0x63", 328 "EventCode": "0x63",
225 "UMask": "0x2", 329 "UMask": "0x2",
226 "BriefDescription": "Cycles when L1D is locked", 330 "BriefDescription": "Cycles when L1D is locked",
@@ -266,7 +370,7 @@
266 "BriefDescription": "Demand and prefetch data reads", 370 "BriefDescription": "Demand and prefetch data reads",
267 "Counter": "0,1,2,3", 371 "Counter": "0,1,2,3",
268 "EventName": "OFFCORE_REQUESTS.ALL_DATA_RD", 372 "EventName": "OFFCORE_REQUESTS.ALL_DATA_RD",
269 "PublicDescription": "This event counts the demand and prefetch data reads. All Core Data Reads include cacheable \"Demands\" and L2 prefetchers (not L3 prefetchers). Counting also covers reads due to page walks resulted from any request type.", 373 "PublicDescription": "This event counts the demand and prefetch data reads. All Core Data Reads include cacheable Demands and L2 prefetchers (not L3 prefetchers). Counting also covers reads due to page walks resulted from any request type.",
270 "SampleAfterValue": "100003", 374 "SampleAfterValue": "100003",
271 "CounterHTOff": "0,1,2,3,4,5,6,7" 375 "CounterHTOff": "0,1,2,3,4,5,6,7"
272 }, 376 },
@@ -281,26 +385,35 @@
281 "CounterHTOff": "0,1,2,3,4,5,6,7" 385 "CounterHTOff": "0,1,2,3,4,5,6,7"
282 }, 386 },
283 { 387 {
388 "EventCode": "0xB7, 0xBB",
389 "UMask": "0x1",
390 "BriefDescription": "Offcore response can be programmed only with a specific pair of event select and counter MSR, and with specific event codes and predefine mask bit value in a dedicated MSR to specify attributes of the offcore transaction.",
391 "Counter": "0,1,2,3",
392 "EventName": "OFFCORE_RESPONSE",
393 "SampleAfterValue": "100003",
394 "CounterHTOff": "0,1,2,3"
395 },
396 {
284 "EventCode": "0xD0", 397 "EventCode": "0xD0",
285 "UMask": "0x11", 398 "UMask": "0x11",
286 "BriefDescription": "Retired load uops that miss the STLB.", 399 "BriefDescription": "Retired load uops that miss the STLB. (Precise Event - PEBS)",
287 "Data_LA": "1", 400 "Data_LA": "1",
288 "PEBS": "1", 401 "PEBS": "1",
289 "Counter": "0,1,2,3", 402 "Counter": "0,1,2,3",
290 "EventName": "MEM_UOPS_RETIRED.STLB_MISS_LOADS", 403 "EventName": "MEM_UOPS_RETIRED.STLB_MISS_LOADS",
291 "PublicDescription": "This is a non-precise version (that is, does not use PEBS) of the event that counts load uops with true STLB miss retired to the architected path. True STLB miss is an uop triggering page walk that gets completed without blocks, and later gets retired. This page walk can end up with or without a fault.", 404 "PublicDescription": "This is a precise version (that is, uses PEBS) of the event that counts load uops with true STLB miss retired to the architected path. True STLB miss is an uop triggering page walk that gets completed without blocks, and later gets retired. This page walk can end up with or without a fault.",
292 "SampleAfterValue": "100003", 405 "SampleAfterValue": "100003",
293 "CounterHTOff": "0,1,2,3" 406 "CounterHTOff": "0,1,2,3"
294 }, 407 },
295 { 408 {
296 "EventCode": "0xD0", 409 "EventCode": "0xD0",
297 "UMask": "0x12", 410 "UMask": "0x12",
298 "BriefDescription": "Retired store uops that miss the STLB.", 411 "BriefDescription": "Retired store uops that miss the STLB. (Precise Event - PEBS)",
299 "Data_LA": "1", 412 "Data_LA": "1",
300 "PEBS": "1", 413 "PEBS": "1",
301 "Counter": "0,1,2,3", 414 "Counter": "0,1,2,3",
302 "EventName": "MEM_UOPS_RETIRED.STLB_MISS_STORES", 415 "EventName": "MEM_UOPS_RETIRED.STLB_MISS_STORES",
303 "PublicDescription": "This is a non-precise version (that is, does not use PEBS) of the event that counts store uops with true STLB miss retired to the architected path. True STLB miss is an uop triggering page walk that gets completed without blocks, and later gets retired. This page walk can end up with or without a fault.", 416 "PublicDescription": "This is a precise version (that is, uses PEBS) of the event that counts store uops true STLB miss retired to the architected path. True STLB miss is an uop triggering page walk that gets completed without blocks, and later gets retired. This page walk can end up with or without a fault.",
304 "SampleAfterValue": "100003", 417 "SampleAfterValue": "100003",
305 "L1_Hit_Indication": "1", 418 "L1_Hit_Indication": "1",
306 "CounterHTOff": "0,1,2,3" 419 "CounterHTOff": "0,1,2,3"
@@ -308,37 +421,37 @@
308 { 421 {
309 "EventCode": "0xD0", 422 "EventCode": "0xD0",
310 "UMask": "0x21", 423 "UMask": "0x21",
311 "BriefDescription": "Retired load uops with locked access.", 424 "BriefDescription": "Retired load uops with locked access. (Precise Event - PEBS)",
312 "Data_LA": "1", 425 "Data_LA": "1",
313 "PEBS": "1", 426 "PEBS": "1",
314 "Counter": "0,1,2,3", 427 "Counter": "0,1,2,3",
315 "EventName": "MEM_UOPS_RETIRED.LOCK_LOADS", 428 "EventName": "MEM_UOPS_RETIRED.LOCK_LOADS",
316 "Errata": "BDM35", 429 "Errata": "BDM35",
317 "PublicDescription": "This is a non-precise version (that is, does not use PEBS) of the event that counts load uops with locked access retired to the architected path.", 430 "PublicDescription": "This is a precise version (that is, uses PEBS) of the event that counts load uops with locked access retired to the architected path.",
318 "SampleAfterValue": "100007", 431 "SampleAfterValue": "100007",
319 "CounterHTOff": "0,1,2,3" 432 "CounterHTOff": "0,1,2,3"
320 }, 433 },
321 { 434 {
322 "EventCode": "0xD0", 435 "EventCode": "0xD0",
323 "UMask": "0x41", 436 "UMask": "0x41",
324 "BriefDescription": "Retired load uops that split across a cacheline boundary.", 437 "BriefDescription": "Retired load uops that split across a cacheline boundary.(Precise Event - PEBS)",
325 "Data_LA": "1", 438 "Data_LA": "1",
326 "PEBS": "1", 439 "PEBS": "1",
327 "Counter": "0,1,2,3", 440 "Counter": "0,1,2,3",
328 "EventName": "MEM_UOPS_RETIRED.SPLIT_LOADS", 441 "EventName": "MEM_UOPS_RETIRED.SPLIT_LOADS",
329 "PublicDescription": "This is a non-precise version (that is, does not use PEBS) of the event that counts line-splitted load uops retired to the architected path. A line split is across 64B cache-line which includes a page split (4K).", 442 "PublicDescription": "This is a precise version (that is, uses PEBS) of the event that counts line-splitted load uops retired to the architected path. A line split is across 64B cache-line which includes a page split (4K).",
330 "SampleAfterValue": "100003", 443 "SampleAfterValue": "100003",
331 "CounterHTOff": "0,1,2,3" 444 "CounterHTOff": "0,1,2,3"
332 }, 445 },
333 { 446 {
334 "EventCode": "0xD0", 447 "EventCode": "0xD0",
335 "UMask": "0x42", 448 "UMask": "0x42",
336 "BriefDescription": "Retired store uops that split across a cacheline boundary.", 449 "BriefDescription": "Retired store uops that split across a cacheline boundary. (Precise Event - PEBS)",
337 "Data_LA": "1", 450 "Data_LA": "1",
338 "PEBS": "1", 451 "PEBS": "1",
339 "Counter": "0,1,2,3", 452 "Counter": "0,1,2,3",
340 "EventName": "MEM_UOPS_RETIRED.SPLIT_STORES", 453 "EventName": "MEM_UOPS_RETIRED.SPLIT_STORES",
341 "PublicDescription": "This is a non-precise version (that is, does not use PEBS) of the event that counts line-splitted store uops retired to the architected path. A line split is across 64B cache-line which includes a page split (4K).", 454 "PublicDescription": "This is a precise version (that is, uses PEBS) of the event that counts line-splitted store uops retired to the architected path. A line split is across 64B cache-line which includes a page split (4K).",
342 "SampleAfterValue": "100003", 455 "SampleAfterValue": "100003",
343 "L1_Hit_Indication": "1", 456 "L1_Hit_Indication": "1",
344 "CounterHTOff": "0,1,2,3" 457 "CounterHTOff": "0,1,2,3"
@@ -346,24 +459,24 @@
346 { 459 {
347 "EventCode": "0xD0", 460 "EventCode": "0xD0",
348 "UMask": "0x81", 461 "UMask": "0x81",
349 "BriefDescription": "All retired load uops.", 462 "BriefDescription": "All retired load uops. (Precise Event - PEBS)",
350 "Data_LA": "1", 463 "Data_LA": "1",
351 "PEBS": "1", 464 "PEBS": "1",
352 "Counter": "0,1,2,3", 465 "Counter": "0,1,2,3",
353 "EventName": "MEM_UOPS_RETIRED.ALL_LOADS", 466 "EventName": "MEM_UOPS_RETIRED.ALL_LOADS",
354 "PublicDescription": "This event counts load uops retired to the architected path with a filter on bits 0 and 1 applied.\nNote: This event counts AVX-256bit load/store double-pump memory uops as a single uop at retirement. This event also counts SW prefetches.", 467 "PublicDescription": "This is a precise version (that is, uses PEBS) of the event that counts load uops retired to the architected path with a filter on bits 0 and 1 applied.\nNote: This event ?ounts AVX-256bit load/store double-pump memory uops as a single uop at retirement. This event also counts SW prefetches.",
355 "SampleAfterValue": "2000003", 468 "SampleAfterValue": "2000003",
356 "CounterHTOff": "0,1,2,3" 469 "CounterHTOff": "0,1,2,3"
357 }, 470 },
358 { 471 {
359 "EventCode": "0xD0", 472 "EventCode": "0xD0",
360 "UMask": "0x82", 473 "UMask": "0x82",
361 "BriefDescription": "All retired store uops.", 474 "BriefDescription": "Retired store uops that split across a cacheline boundary. (Precise Event - PEBS)",
362 "Data_LA": "1", 475 "Data_LA": "1",
363 "PEBS": "1", 476 "PEBS": "1",
364 "Counter": "0,1,2,3", 477 "Counter": "0,1,2,3",
365 "EventName": "MEM_UOPS_RETIRED.ALL_STORES", 478 "EventName": "MEM_UOPS_RETIRED.ALL_STORES",
366 "PublicDescription": "This event counts store uops retired to the architected path with a filter on bits 0 and 1 applied.\nNote: This event counts AVX-256bit load/store double-pump memory uops as a single uop at retirement.", 479 "PublicDescription": "This is a precise version (that is, uses PEBS) of the event that counts store uops retired to the architected path with a filter on bits 0 and 1 applied.\nNote: This event ?ounts AVX-256bit load/store double-pump memory uops as a single uop at retirement.",
367 "SampleAfterValue": "2000003", 480 "SampleAfterValue": "2000003",
368 "L1_Hit_Indication": "1", 481 "L1_Hit_Indication": "1",
369 "CounterHTOff": "0,1,2,3" 482 "CounterHTOff": "0,1,2,3"
@@ -371,69 +484,69 @@
371 { 484 {
372 "EventCode": "0xD1", 485 "EventCode": "0xD1",
373 "UMask": "0x1", 486 "UMask": "0x1",
374 "BriefDescription": "Retired load uops with L1 cache hits as data sources.", 487 "BriefDescription": "Retired load uops with L1 cache hits as data sources. (Precise Event - PEBS)",
375 "Data_LA": "1", 488 "Data_LA": "1",
376 "PEBS": "1", 489 "PEBS": "1",
377 "Counter": "0,1,2,3", 490 "Counter": "0,1,2,3",
378 "EventName": "MEM_LOAD_UOPS_RETIRED.L1_HIT", 491 "EventName": "MEM_LOAD_UOPS_RETIRED.L1_HIT",
379 "PublicDescription": "This is a non-precise version (that is, does not use PEBS) of the event that counts retired load uops which data sources were hits in the nearest-level (L1) cache.\nNote: Only two data-sources of L1/FB are applicable for AVX-256bit even though the corresponding AVX load could be serviced by a deeper level in the memory hierarchy. Data source is reported for the Low-half load. This event also counts SW prefetches independent of the actual data source.", 492 "PublicDescription": "This is a precise version (that is, uses PEBS) of the event that counts retired load uops which data source were hits in the nearest-level (L1) cache.\nNote: Only two data-sources of L1/FB are applicable for AVX-256bit even though the corresponding AVX load could be serviced by a deeper level in the memory hierarchy. Data source is reported for the Low-half load. This event also counts SW prefetches independent of the actual data source.",
380 "SampleAfterValue": "2000003", 493 "SampleAfterValue": "2000003",
381 "CounterHTOff": "0,1,2,3" 494 "CounterHTOff": "0,1,2,3"
382 }, 495 },
383 { 496 {
384 "EventCode": "0xD1", 497 "EventCode": "0xD1",
385 "UMask": "0x2", 498 "UMask": "0x2",
386 "BriefDescription": "Retired load uops with L2 cache hits as data sources.", 499 "BriefDescription": "Retired load uops with L2 cache hits as data sources. (Precise Event - PEBS)",
387 "Data_LA": "1", 500 "Data_LA": "1",
388 "PEBS": "1", 501 "PEBS": "1",
389 "Counter": "0,1,2,3", 502 "Counter": "0,1,2,3",
390 "EventName": "MEM_LOAD_UOPS_RETIRED.L2_HIT", 503 "EventName": "MEM_LOAD_UOPS_RETIRED.L2_HIT",
391 "Errata": "BDM35", 504 "Errata": "BDM35",
392 "PublicDescription": "This is a non-precise version (that is, does not use PEBS) of the event that counts retired load uops which data sources were hits in the mid-level (L2) cache.", 505 "PublicDescription": "This is a precise version (that is, uses PEBS) of the event that counts retired load uops which data sources were hits in the mid-level (L2) cache.",
393 "SampleAfterValue": "100003", 506 "SampleAfterValue": "100003",
394 "CounterHTOff": "0,1,2,3" 507 "CounterHTOff": "0,1,2,3"
395 }, 508 },
396 { 509 {
397 "EventCode": "0xD1", 510 "EventCode": "0xD1",
398 "UMask": "0x4", 511 "UMask": "0x4",
399 "BriefDescription": "Retired load uops which data sources were data hits in L3 without snoops required.", 512 "BriefDescription": "Hit in last-level (L3) cache. Excludes Unknown data-source. (Precise Event - PEBS)",
400 "Data_LA": "1", 513 "Data_LA": "1",
401 "PEBS": "1", 514 "PEBS": "1",
402 "Counter": "0,1,2,3", 515 "Counter": "0,1,2,3",
403 "EventName": "MEM_LOAD_UOPS_RETIRED.L3_HIT", 516 "EventName": "MEM_LOAD_UOPS_RETIRED.L3_HIT",
404 "Errata": "BDM100", 517 "Errata": "BDM100",
405 "PublicDescription": "This is a non-precise version (that is, does not use PEBS) of the event that counts retired load uops which data sources were data hits in the last-level (L3) cache without snoops required.", 518 "PublicDescription": "This is a precise version (that is, uses PEBS) of the event that counts retired load uops which data sources were data hits in the last-level (L3) cache without snoops required.",
406 "SampleAfterValue": "50021", 519 "SampleAfterValue": "50021",
407 "CounterHTOff": "0,1,2,3" 520 "CounterHTOff": "0,1,2,3"
408 }, 521 },
409 { 522 {
410 "EventCode": "0xD1", 523 "EventCode": "0xD1",
411 "UMask": "0x8", 524 "UMask": "0x8",
412 "BriefDescription": "Retired load uops misses in L1 cache as data sources.", 525 "BriefDescription": "Retired load uops misses in L1 cache as data sources. Uses PEBS.",
413 "Data_LA": "1", 526 "Data_LA": "1",
414 "PEBS": "1", 527 "PEBS": "1",
415 "Counter": "0,1,2,3", 528 "Counter": "0,1,2,3",
416 "EventName": "MEM_LOAD_UOPS_RETIRED.L1_MISS", 529 "EventName": "MEM_LOAD_UOPS_RETIRED.L1_MISS",
417 "PublicDescription": "This is a non-precise version (that is, does not use PEBS) of the event that counts retired load uops which data sources were misses in the nearest-level (L1) cache. Counting excludes unknown and UC data source.", 530 "PublicDescription": "This is a precise version (that is, uses PEBS) of the event that counts retired load uops which data sources were misses in the nearest-level (L1) cache. Counting excludes unknown and UC data source.",
418 "SampleAfterValue": "100003", 531 "SampleAfterValue": "100003",
419 "CounterHTOff": "0,1,2,3" 532 "CounterHTOff": "0,1,2,3"
420 }, 533 },
421 { 534 {
422 "EventCode": "0xD1", 535 "EventCode": "0xD1",
423 "UMask": "0x10", 536 "UMask": "0x10",
424 "BriefDescription": "Miss in mid-level (L2) cache. Excludes Unknown data-source.", 537 "BriefDescription": "Retired load uops with L2 cache misses as data sources. Uses PEBS.",
425 "Data_LA": "1", 538 "Data_LA": "1",
426 "PEBS": "1", 539 "PEBS": "1",
427 "Counter": "0,1,2,3", 540 "Counter": "0,1,2,3",
428 "EventName": "MEM_LOAD_UOPS_RETIRED.L2_MISS", 541 "EventName": "MEM_LOAD_UOPS_RETIRED.L2_MISS",
429 "PublicDescription": "This is a non-precise version (that is, does not use PEBS) of the event that counts retired load uops which data sources were misses in the mid-level (L2) cache. Counting excludes unknown and UC data source.", 542 "PublicDescription": "This is a precise version (that is, uses PEBS) of the event that counts retired load uops which data sources were misses in the mid-level (L2) cache. Counting excludes unknown and UC data source.",
430 "SampleAfterValue": "50021", 543 "SampleAfterValue": "50021",
431 "CounterHTOff": "0,1,2,3" 544 "CounterHTOff": "0,1,2,3"
432 }, 545 },
433 { 546 {
434 "EventCode": "0xD1", 547 "EventCode": "0xD1",
435 "UMask": "0x20", 548 "UMask": "0x20",
436 "BriefDescription": "Miss in last-level (L3) cache. Excludes Unknown data-source.", 549 "BriefDescription": "Miss in last-level (L3) cache. Excludes Unknown data-source. (Precise Event - PEBS).",
437 "Data_LA": "1", 550 "Data_LA": "1",
438 "PEBS": "1", 551 "PEBS": "1",
439 "Counter": "0,1,2,3", 552 "Counter": "0,1,2,3",
@@ -445,77 +558,112 @@
445 { 558 {
446 "EventCode": "0xD1", 559 "EventCode": "0xD1",
447 "UMask": "0x40", 560 "UMask": "0x40",
448 "BriefDescription": "Retired load uops which data sources were load uops missed L1 but hit FB due to preceding miss to the same cache line with data not ready.", 561 "BriefDescription": "Retired load uops which data sources were load uops missed L1 but hit FB due to preceding miss to the same cache line with data not ready. (Precise Event - PEBS)",
449 "Data_LA": "1", 562 "Data_LA": "1",
450 "PEBS": "1", 563 "PEBS": "1",
451 "Counter": "0,1,2,3", 564 "Counter": "0,1,2,3",
452 "EventName": "MEM_LOAD_UOPS_RETIRED.HIT_LFB", 565 "EventName": "MEM_LOAD_UOPS_RETIRED.HIT_LFB",
453 "PublicDescription": "This is a non-precise version (that is, does not use PEBS) of the event that counts retired load uops which data sources were load uops missed L1 but hit a fill buffer due to a preceding miss to the same cache line with the data not ready.\nNote: Only two data-sources of L1/FB are applicable for AVX-256bit even though the corresponding AVX load could be serviced by a deeper level in the memory hierarchy. Data source is reported for the Low-half load.", 566 "PublicDescription": "This is a precise version (that is, uses PEBS) of the event that counts retired load uops which data sources were load uops missed L1 but hit a fill buffer due to a preceding miss to the same cache line with the data not ready.\nNote: Only two data-sources of L1/FB are applicable for AVX-256bit even though the corresponding AVX load could be serviced by a deeper level in the memory hierarchy. Data source is reported for the Low-half load.",
454 "SampleAfterValue": "100003", 567 "SampleAfterValue": "100003",
455 "CounterHTOff": "0,1,2,3" 568 "CounterHTOff": "0,1,2,3"
456 }, 569 },
457 { 570 {
458 "EventCode": "0xD2", 571 "EventCode": "0xD2",
459 "UMask": "0x1", 572 "UMask": "0x1",
460 "BriefDescription": "Retired load uops which data sources were L3 hit and cross-core snoop missed in on-pkg core cache.", 573 "BriefDescription": "Retired load uops which data sources were L3 hit and cross-core snoop missed in on-pkg core cache. (Precise Event - PEBS)",
461 "Data_LA": "1", 574 "Data_LA": "1",
462 "PEBS": "1", 575 "PEBS": "1",
463 "Counter": "0,1,2,3", 576 "Counter": "0,1,2,3",
464 "EventName": "MEM_LOAD_UOPS_L3_HIT_RETIRED.XSNP_MISS", 577 "EventName": "MEM_LOAD_UOPS_L3_HIT_RETIRED.XSNP_MISS",
465 "Errata": "BDM100", 578 "Errata": "BDM100",
466 "PublicDescription": "This is a non-precise version (that is, does not use PEBS) of the event that counts retired load uops which data sources were L3 Hit and a cross-core snoop missed in the on-pkg core cache.", 579 "PublicDescription": "This is a precise version (that is, uses PEBS) of the event that counts retired load uops which data sources were L3 Hit and a cross-core snoop missed in the on-pkg core cache.",
467 "SampleAfterValue": "20011", 580 "SampleAfterValue": "20011",
468 "CounterHTOff": "0,1,2,3" 581 "CounterHTOff": "0,1,2,3"
469 }, 582 },
470 { 583 {
471 "EventCode": "0xD2", 584 "EventCode": "0xD2",
472 "UMask": "0x2", 585 "UMask": "0x2",
473 "BriefDescription": "Retired load uops which data sources were L3 and cross-core snoop hits in on-pkg core cache.", 586 "BriefDescription": "Retired load uops which data sources were L3 and cross-core snoop hits in on-pkg core cache. (Precise Event - PEBS)",
474 "Data_LA": "1", 587 "Data_LA": "1",
475 "PEBS": "1", 588 "PEBS": "1",
476 "Counter": "0,1,2,3", 589 "Counter": "0,1,2,3",
477 "EventName": "MEM_LOAD_UOPS_L3_HIT_RETIRED.XSNP_HIT", 590 "EventName": "MEM_LOAD_UOPS_L3_HIT_RETIRED.XSNP_HIT",
478 "Errata": "BDM100", 591 "Errata": "BDM100",
479 "PublicDescription": "This is a non-precise version (that is, does not use PEBS) of the event that counts retired load uops which data sources were L3 hit and a cross-core snoop hit in the on-pkg core cache.", 592 "PublicDescription": "This is a precise version (that is, uses PEBS) of the event that counts retired load uops which data sources were L3 hit and a cross-core snoop hit in the on-pkg core cache.",
480 "SampleAfterValue": "20011", 593 "SampleAfterValue": "20011",
481 "CounterHTOff": "0,1,2,3" 594 "CounterHTOff": "0,1,2,3"
482 }, 595 },
483 { 596 {
484 "EventCode": "0xD2", 597 "EventCode": "0xD2",
485 "UMask": "0x4", 598 "UMask": "0x4",
486 "BriefDescription": "Retired load uops which data sources were HitM responses from shared L3.", 599 "BriefDescription": "Retired load uops which data sources were HitM responses from shared L3. (Precise Event - PEBS)",
487 "Data_LA": "1", 600 "Data_LA": "1",
488 "PEBS": "1", 601 "PEBS": "1",
489 "Counter": "0,1,2,3", 602 "Counter": "0,1,2,3",
490 "EventName": "MEM_LOAD_UOPS_L3_HIT_RETIRED.XSNP_HITM", 603 "EventName": "MEM_LOAD_UOPS_L3_HIT_RETIRED.XSNP_HITM",
491 "Errata": "BDM100", 604 "Errata": "BDM100",
492 "PublicDescription": "This is a non-precise version (that is, does not use PEBS) of the event that counts retired load uops which data sources were HitM responses from a core on same socket (shared L3).", 605 "PublicDescription": "This is a precise version (that is, uses PEBS) of the event that counts retired load uops which data sources were HitM responses from a core on same socket (shared L3).",
493 "SampleAfterValue": "20011", 606 "SampleAfterValue": "20011",
494 "CounterHTOff": "0,1,2,3" 607 "CounterHTOff": "0,1,2,3"
495 }, 608 },
496 { 609 {
497 "EventCode": "0xD2", 610 "EventCode": "0xD2",
498 "UMask": "0x8", 611 "UMask": "0x8",
499 "BriefDescription": "Retired load uops which data sources were hits in L3 without snoops required.", 612 "BriefDescription": "Retired load uops which data sources were hits in L3 without snoops required. (Precise Event - PEBS)",
500 "Data_LA": "1", 613 "Data_LA": "1",
501 "PEBS": "1", 614 "PEBS": "1",
502 "Counter": "0,1,2,3", 615 "Counter": "0,1,2,3",
503 "EventName": "MEM_LOAD_UOPS_L3_HIT_RETIRED.XSNP_NONE", 616 "EventName": "MEM_LOAD_UOPS_L3_HIT_RETIRED.XSNP_NONE",
504 "Errata": "BDM100", 617 "Errata": "BDM100",
505 "PublicDescription": "This is a non-precise version (that is, does not use PEBS) of the event that counts retired load uops which data sources were hits in the last-level (L3) cache without snoops required.", 618 "PublicDescription": "This is a precise version (that is, uses PEBS) of the event that counts retired load uops which data sources were hits in the last-level (L3) cache without snoops required.",
506 "SampleAfterValue": "100003", 619 "SampleAfterValue": "100003",
507 "CounterHTOff": "0,1,2,3" 620 "CounterHTOff": "0,1,2,3"
508 }, 621 },
509 { 622 {
510 "EventCode": "0xD3", 623 "EventCode": "0xD3",
511 "UMask": "0x1", 624 "UMask": "0x1",
512 "BriefDescription": "Data from local DRAM either Snoop not needed or Snoop Miss (RspI)",
513 "Data_LA": "1", 625 "Data_LA": "1",
514 "PEBS": "1", 626 "PEBS": "1",
515 "Counter": "0,1,2,3", 627 "Counter": "0,1,2,3",
516 "EventName": "MEM_LOAD_UOPS_L3_MISS_RETIRED.LOCAL_DRAM", 628 "EventName": "MEM_LOAD_UOPS_L3_MISS_RETIRED.LOCAL_DRAM",
517 "Errata": "BDE70, BDM100", 629 "Errata": "BDE70, BDM100",
518 "PublicDescription": "Retired load uop whose Data Source was: local DRAM either Snoop not needed or Snoop Miss (RspI).", 630 "PublicDescription": "This event counts retired load uops where the data came from local DRAM. This does not include hardware prefetches. This is a precise event.",
631 "SampleAfterValue": "100007",
632 "CounterHTOff": "0,1,2,3"
633 },
634 {
635 "EventCode": "0xD3",
636 "UMask": "0x4",
637 "BriefDescription": "Retired load uop whose Data Source was: remote DRAM either Snoop not needed or Snoop Miss (RspI) (Precise Event)",
638 "Data_LA": "1",
639 "PEBS": "1",
640 "Counter": "0,1,2,3",
641 "EventName": "MEM_LOAD_UOPS_L3_MISS_RETIRED.REMOTE_DRAM",
642 "Errata": "BDE70",
643 "SampleAfterValue": "100007",
644 "CounterHTOff": "0,1,2,3"
645 },
646 {
647 "EventCode": "0xD3",
648 "UMask": "0x10",
649 "BriefDescription": "Retired load uop whose Data Source was: Remote cache HITM (Precise Event)",
650 "Data_LA": "1",
651 "PEBS": "1",
652 "Counter": "0,1,2,3",
653 "EventName": "MEM_LOAD_UOPS_L3_MISS_RETIRED.REMOTE_HITM",
654 "Errata": "BDE70",
655 "SampleAfterValue": "100007",
656 "CounterHTOff": "0,1,2,3"
657 },
658 {
659 "EventCode": "0xD3",
660 "UMask": "0x20",
661 "BriefDescription": "Retired load uop whose Data Source was: forwarded from remote cache (Precise Event)",
662 "Data_LA": "1",
663 "PEBS": "1",
664 "Counter": "0,1,2,3",
665 "EventName": "MEM_LOAD_UOPS_L3_MISS_RETIRED.REMOTE_FWD",
666 "Errata": "BDE70",
519 "SampleAfterValue": "100007", 667 "SampleAfterValue": "100007",
520 "CounterHTOff": "0,1,2,3" 668 "CounterHTOff": "0,1,2,3"
521 }, 669 },
@@ -657,118 +805,5 @@
657 "PublicDescription": "This event counts the number of split locks in the super queue.", 805 "PublicDescription": "This event counts the number of split locks in the super queue.",
658 "SampleAfterValue": "100003", 806 "SampleAfterValue": "100003",
659 "CounterHTOff": "0,1,2,3,4,5,6,7" 807 "CounterHTOff": "0,1,2,3,4,5,6,7"
660 },
661 {
662 "EventCode": "0x24",
663 "UMask": "0x42",
664 "BriefDescription": "RFO requests that hit L2 cache.",
665 "Counter": "0,1,2,3",
666 "EventName": "L2_RQSTS.RFO_HIT",
667 "SampleAfterValue": "200003",
668 "CounterHTOff": "0,1,2,3,4,5,6,7"
669 },
670 {
671 "EventCode": "0x24",
672 "UMask": "0x22",
673 "BriefDescription": "RFO requests that miss L2 cache.",
674 "Counter": "0,1,2,3",
675 "EventName": "L2_RQSTS.RFO_MISS",
676 "SampleAfterValue": "200003",
677 "CounterHTOff": "0,1,2,3,4,5,6,7"
678 },
679 {
680 "EventCode": "0x24",
681 "UMask": "0x44",
682 "BriefDescription": "L2 cache hits when fetching instructions, code reads.",
683 "Counter": "0,1,2,3",
684 "EventName": "L2_RQSTS.CODE_RD_HIT",
685 "SampleAfterValue": "200003",
686 "CounterHTOff": "0,1,2,3,4,5,6,7"
687 },
688 {
689 "EventCode": "0x24",
690 "UMask": "0x24",
691 "BriefDescription": "L2 cache misses when fetching instructions.",
692 "Counter": "0,1,2,3",
693 "EventName": "L2_RQSTS.CODE_RD_MISS",
694 "SampleAfterValue": "200003",
695 "CounterHTOff": "0,1,2,3,4,5,6,7"
696 },
697 {
698 "EventCode": "0x24",
699 "UMask": "0x27",
700 "BriefDescription": "Demand requests that miss L2 cache.",
701 "Counter": "0,1,2,3",
702 "EventName": "L2_RQSTS.ALL_DEMAND_MISS",
703 "SampleAfterValue": "200003",
704 "CounterHTOff": "0,1,2,3,4,5,6,7"
705 },
706 {
707 "EventCode": "0x24",
708 "UMask": "0xe7",
709 "BriefDescription": "Demand requests to L2 cache.",
710 "Counter": "0,1,2,3",
711 "EventName": "L2_RQSTS.ALL_DEMAND_REFERENCES",
712 "SampleAfterValue": "200003",
713 "CounterHTOff": "0,1,2,3,4,5,6,7"
714 },
715 {
716 "EventCode": "0x24",
717 "UMask": "0x3f",
718 "BriefDescription": "All requests that miss L2 cache.",
719 "Counter": "0,1,2,3",
720 "EventName": "L2_RQSTS.MISS",
721 "SampleAfterValue": "200003",
722 "CounterHTOff": "0,1,2,3,4,5,6,7"
723 },
724 {
725 "EventCode": "0x24",
726 "UMask": "0xff",
727 "BriefDescription": "All L2 requests.",
728 "Counter": "0,1,2,3",
729 "EventName": "L2_RQSTS.REFERENCES",
730 "SampleAfterValue": "200003",
731 "CounterHTOff": "0,1,2,3,4,5,6,7"
732 },
733 {
734 "EventCode": "0xB7, 0xBB",
735 "UMask": "0x1",
736 "BriefDescription": "Offcore response can be programmed only with a specific pair of event select and counter MSR, and with specific event codes and predefine mask bit value in a dedicated MSR to specify attributes of the offcore transaction.",
737 "Counter": "0,1,2,3",
738 "EventName": "OFFCORE_RESPONSE",
739 "SampleAfterValue": "100003",
740 "CounterHTOff": "0,1,2,3"
741 },
742 {
743 "EventCode": "0x60",
744 "UMask": "0x1",
745 "BriefDescription": "Cycles with at least 6 offcore outstanding Demand Data Read transactions in uncore queue.",
746 "Counter": "0,1,2,3",
747 "EventName": "OFFCORE_REQUESTS_OUTSTANDING.DEMAND_DATA_RD_GE_6",
748 "CounterMask": "6",
749 "Errata": "BDM76",
750 "SampleAfterValue": "2000003",
751 "CounterHTOff": "0,1,2,3,4,5,6,7"
752 },
753 {
754 "EventCode": "0x48",
755 "UMask": "0x1",
756 "BriefDescription": "Cycles with L1D load Misses outstanding from any thread on physical core.",
757 "Counter": "2",
758 "EventName": "L1D_PEND_MISS.PENDING_CYCLES_ANY",
759 "AnyThread": "1",
760 "CounterMask": "1",
761 "SampleAfterValue": "2000003",
762 "CounterHTOff": "2"
763 },
764 {
765 "EventCode": "0x48",
766 "UMask": "0x2",
767 "BriefDescription": "Cycles a demand request was blocked due to Fill Buffers inavailability.",
768 "Counter": "0,1,2,3",
769 "EventName": "L1D_PEND_MISS.FB_FULL",
770 "CounterMask": "1",
771 "SampleAfterValue": "2000003",
772 "CounterHTOff": "0,1,2,3,4,5,6,7"
773 } 808 }
774] \ No newline at end of file 809] \ No newline at end of file
diff --git a/tools/perf/pmu-events/arch/x86/broadwellde/floating-point.json b/tools/perf/pmu-events/arch/x86/broadwellde/floating-point.json
index 4ae1ea24f22f..d7b9d9c9c518 100644
--- a/tools/perf/pmu-events/arch/x86/broadwellde/floating-point.json
+++ b/tools/perf/pmu-events/arch/x86/broadwellde/floating-point.json
@@ -6,7 +6,7 @@
6 "Counter": "0,1,2,3", 6 "Counter": "0,1,2,3",
7 "EventName": "OTHER_ASSISTS.AVX_TO_SSE", 7 "EventName": "OTHER_ASSISTS.AVX_TO_SSE",
8 "Errata": "BDM30", 8 "Errata": "BDM30",
9 "PublicDescription": "This is a non-precise version (that is, does not use PEBS) of the event that counts the number of transitions from AVX-256 to legacy SSE when penalty is applicable.", 9 "PublicDescription": "This event counts the number of transitions from AVX-256 to legacy SSE when penalty is applicable.",
10 "SampleAfterValue": "100003", 10 "SampleAfterValue": "100003",
11 "CounterHTOff": "0,1,2,3,4,5,6,7" 11 "CounterHTOff": "0,1,2,3,4,5,6,7"
12 }, 12 },
@@ -17,7 +17,7 @@
17 "Counter": "0,1,2,3", 17 "Counter": "0,1,2,3",
18 "EventName": "OTHER_ASSISTS.SSE_TO_AVX", 18 "EventName": "OTHER_ASSISTS.SSE_TO_AVX",
19 "Errata": "BDM30", 19 "Errata": "BDM30",
20 "PublicDescription": "This is a non-precise version (that is, does not use PEBS) of the event that counts the number of transitions from legacy SSE to AVX-256 when penalty is applicable.", 20 "PublicDescription": "This event counts the number of transitions from legacy SSE to AVX-256 when penalty is applicable.",
21 "SampleAfterValue": "100003", 21 "SampleAfterValue": "100003",
22 "CounterHTOff": "0,1,2,3,4,5,6,7" 22 "CounterHTOff": "0,1,2,3,4,5,6,7"
23 }, 23 },
@@ -25,7 +25,6 @@
25 "EventCode": "0xC7", 25 "EventCode": "0xC7",
26 "UMask": "0x1", 26 "UMask": "0x1",
27 "BriefDescription": "Number of SSE/AVX computational scalar double precision floating-point instructions retired. Each count represents 1 computation. Applies to SSE* and AVX* scalar double precision floating-point instructions: ADD SUB MUL DIV MIN MAX SQRT FM(N)ADD/SUB. FM(N)ADD/SUB instructions count twice as they perform multiple calculations per element.", 27 "BriefDescription": "Number of SSE/AVX computational scalar double precision floating-point instructions retired. Each count represents 1 computation. Applies to SSE* and AVX* scalar double precision floating-point instructions: ADD SUB MUL DIV MIN MAX SQRT FM(N)ADD/SUB. FM(N)ADD/SUB instructions count twice as they perform multiple calculations per element.",
28 "PEBS": "1",
29 "Counter": "0,1,2,3", 28 "Counter": "0,1,2,3",
30 "EventName": "FP_ARITH_INST_RETIRED.SCALAR_DOUBLE", 29 "EventName": "FP_ARITH_INST_RETIRED.SCALAR_DOUBLE",
31 "SampleAfterValue": "2000003", 30 "SampleAfterValue": "2000003",
@@ -35,7 +34,6 @@
35 "EventCode": "0xC7", 34 "EventCode": "0xC7",
36 "UMask": "0x2", 35 "UMask": "0x2",
37 "BriefDescription": "Number of SSE/AVX computational scalar single precision floating-point instructions retired. Each count represents 1 computation. Applies to SSE* and AVX* scalar single precision floating-point instructions: ADD SUB MUL DIV MIN MAX RCP RSQRT SQRT FM(N)ADD/SUB. FM(N)ADD/SUB instructions count twice as they perform multiple calculations per element.", 36 "BriefDescription": "Number of SSE/AVX computational scalar single precision floating-point instructions retired. Each count represents 1 computation. Applies to SSE* and AVX* scalar single precision floating-point instructions: ADD SUB MUL DIV MIN MAX RCP RSQRT SQRT FM(N)ADD/SUB. FM(N)ADD/SUB instructions count twice as they perform multiple calculations per element.",
38 "PEBS": "1",
39 "Counter": "0,1,2,3", 37 "Counter": "0,1,2,3",
40 "EventName": "FP_ARITH_INST_RETIRED.SCALAR_SINGLE", 38 "EventName": "FP_ARITH_INST_RETIRED.SCALAR_SINGLE",
41 "SampleAfterValue": "2000003", 39 "SampleAfterValue": "2000003",
@@ -43,9 +41,17 @@
43 }, 41 },
44 { 42 {
45 "EventCode": "0xC7", 43 "EventCode": "0xC7",
44 "UMask": "0x3",
45 "BriefDescription": "Number of SSE/AVX computational scalar floating-point instructions retired. Applies to SSE* and AVX* scalar, double and single precision floating-point: ADD SUB MUL DIV MIN MAX RSQRT RCP SQRT FM(N)ADD/SUB. FM(N)ADD/SUB instructions count twice as they perform multiple calculations per element.",
46 "Counter": "0,1,2,3",
47 "EventName": "FP_ARITH_INST_RETIRED.SCALAR",
48 "SampleAfterValue": "2000003",
49 "CounterHTOff": "0,1,2,3"
50 },
51 {
52 "EventCode": "0xC7",
46 "UMask": "0x4", 53 "UMask": "0x4",
47 "BriefDescription": "Number of SSE/AVX computational 128-bit packed double precision floating-point instructions retired. Each count represents 2 computations. Applies to SSE* and AVX* packed double precision floating-point instructions: ADD SUB MUL DIV MIN MAX SQRT DPP FM(N)ADD/SUB. DPP and FM(N)ADD/SUB instructions count twice as they perform multiple calculations per element.", 54 "BriefDescription": "Number of SSE/AVX computational 128-bit packed double precision floating-point instructions retired. Each count represents 2 computations. Applies to SSE* and AVX* packed double precision floating-point instructions: ADD SUB MUL DIV MIN MAX SQRT DPP FM(N)ADD/SUB. DPP and FM(N)ADD/SUB instructions count twice as they perform multiple calculations per element.",
48 "PEBS": "1",
49 "Counter": "0,1,2,3", 55 "Counter": "0,1,2,3",
50 "EventName": "FP_ARITH_INST_RETIRED.128B_PACKED_DOUBLE", 56 "EventName": "FP_ARITH_INST_RETIRED.128B_PACKED_DOUBLE",
51 "SampleAfterValue": "2000003", 57 "SampleAfterValue": "2000003",
@@ -55,7 +61,6 @@
55 "EventCode": "0xC7", 61 "EventCode": "0xC7",
56 "UMask": "0x8", 62 "UMask": "0x8",
57 "BriefDescription": "Number of SSE/AVX computational 128-bit packed single precision floating-point instructions retired. Each count represents 4 computations. Applies to SSE* and AVX* packed single precision floating-point instructions: ADD SUB MUL DIV MIN MAX RCP RSQRT SQRT DPP FM(N)ADD/SUB. DPP and FM(N)ADD/SUB instructions count twice as they perform multiple calculations per element.", 63 "BriefDescription": "Number of SSE/AVX computational 128-bit packed single precision floating-point instructions retired. Each count represents 4 computations. Applies to SSE* and AVX* packed single precision floating-point instructions: ADD SUB MUL DIV MIN MAX RCP RSQRT SQRT DPP FM(N)ADD/SUB. DPP and FM(N)ADD/SUB instructions count twice as they perform multiple calculations per element.",
58 "PEBS": "1",
59 "Counter": "0,1,2,3", 64 "Counter": "0,1,2,3",
60 "EventName": "FP_ARITH_INST_RETIRED.128B_PACKED_SINGLE", 65 "EventName": "FP_ARITH_INST_RETIRED.128B_PACKED_SINGLE",
61 "SampleAfterValue": "2000003", 66 "SampleAfterValue": "2000003",
@@ -65,19 +70,54 @@
65 "EventCode": "0xC7", 70 "EventCode": "0xC7",
66 "UMask": "0x10", 71 "UMask": "0x10",
67 "BriefDescription": "Number of SSE/AVX computational 256-bit packed double precision floating-point instructions retired. Each count represents 4 computations. Applies to SSE* and AVX* packed double precision floating-point instructions: ADD SUB MUL DIV MIN MAX SQRT DPP FM(N)ADD/SUB. DPP and FM(N)ADD/SUB instructions count twice as they perform multiple calculations per element.", 72 "BriefDescription": "Number of SSE/AVX computational 256-bit packed double precision floating-point instructions retired. Each count represents 4 computations. Applies to SSE* and AVX* packed double precision floating-point instructions: ADD SUB MUL DIV MIN MAX SQRT DPP FM(N)ADD/SUB. DPP and FM(N)ADD/SUB instructions count twice as they perform multiple calculations per element.",
68 "PEBS": "1",
69 "Counter": "0,1,2,3", 73 "Counter": "0,1,2,3",
70 "EventName": "FP_ARITH_INST_RETIRED.256B_PACKED_DOUBLE", 74 "EventName": "FP_ARITH_INST_RETIRED.256B_PACKED_DOUBLE",
71 "SampleAfterValue": "2000003", 75 "SampleAfterValue": "2000003",
72 "CounterHTOff": "0,1,2,3" 76 "CounterHTOff": "0,1,2,3"
73 }, 77 },
74 { 78 {
79 "EventCode": "0xC7",
80 "UMask": "0x15",
81 "BriefDescription": "Number of SSE/AVX computational double precision floating-point instructions retired. Applies to SSE* and AVX*scalar, double and single precision floating-point: ADD SUB MUL DIV MIN MAX SQRT DPP FM(N)ADD/SUB. DPP and FM(N)ADD/SUB instructions count twice as they perform multiple calculations per element. ?.",
82 "Counter": "0,1,2,3",
83 "EventName": "FP_ARITH_INST_RETIRED.DOUBLE",
84 "SampleAfterValue": "2000006",
85 "CounterHTOff": "0,1,2,3"
86 },
87 {
88 "EventCode": "0xc7",
89 "UMask": "0x20",
90 "BriefDescription": "Number of SSE/AVX computational 256-bit packed single precision floating-point instructions retired. Each count represents 8 computations. Applies to SSE* and AVX* packed single precision floating-point instructions: ADD SUB MUL DIV MIN MAX RCP RSQRT SQRT DPP FM(N)ADD/SUB. DPP and FM(N)ADD/SUB instructions count twice as they perform multiple calculations per element.",
91 "Counter": "0,1,2,3",
92 "EventName": "FP_ARITH_INST_RETIRED.256B_PACKED_SINGLE",
93 "SampleAfterValue": "2000003",
94 "CounterHTOff": "0,1,2,3"
95 },
96 {
97 "EventCode": "0xC7",
98 "UMask": "0x2a",
99 "BriefDescription": "Number of SSE/AVX computational single precision floating-point instructions retired. Applies to SSE* and AVX*scalar, double and single precision floating-point: ADD SUB MUL DIV MIN MAX RCP RSQRT SQRT DPP FM(N)ADD/SUB. DPP and FM(N)ADD/SUB instructions count twice as they perform multiple calculations per element. ?.",
100 "Counter": "0,1,2,3",
101 "EventName": "FP_ARITH_INST_RETIRED.SINGLE",
102 "SampleAfterValue": "2000005",
103 "CounterHTOff": "0,1,2,3"
104 },
105 {
106 "EventCode": "0xC7",
107 "UMask": "0x3c",
108 "BriefDescription": "Number of SSE/AVX computational packed floating-point instructions retired. Applies to SSE* and AVX*, packed, double and single precision floating-point: ADD SUB MUL DIV MIN MAX RSQRT RCP SQRT DPP FM(N)ADD/SUB. DPP and FM(N)ADD/SUB instructions count twice as they perform multiple calculations per element.",
109 "Counter": "0,1,2,3",
110 "EventName": "FP_ARITH_INST_RETIRED.PACKED",
111 "SampleAfterValue": "2000004",
112 "CounterHTOff": "0,1,2,3"
113 },
114 {
75 "EventCode": "0xCA", 115 "EventCode": "0xCA",
76 "UMask": "0x2", 116 "UMask": "0x2",
77 "BriefDescription": "Number of X87 assists due to output value.", 117 "BriefDescription": "Number of X87 assists due to output value.",
78 "Counter": "0,1,2,3", 118 "Counter": "0,1,2,3",
79 "EventName": "FP_ASSIST.X87_OUTPUT", 119 "EventName": "FP_ASSIST.X87_OUTPUT",
80 "PublicDescription": "This is a non-precise version (that is, does not use PEBS) of the event that counts the number of x87 floating point (FP) micro-code assist (numeric overflow/underflow, inexact result) when the output value (destination register) is invalid.", 120 "PublicDescription": "This event counts the number of x87 floating point (FP) micro-code assist (numeric overflow/underflow, inexact result) when the output value (destination register) is invalid.",
81 "SampleAfterValue": "100003", 121 "SampleAfterValue": "100003",
82 "CounterHTOff": "0,1,2,3,4,5,6,7" 122 "CounterHTOff": "0,1,2,3,4,5,6,7"
83 }, 123 },
@@ -87,7 +127,7 @@
87 "BriefDescription": "Number of X87 assists due to input value.", 127 "BriefDescription": "Number of X87 assists due to input value.",
88 "Counter": "0,1,2,3", 128 "Counter": "0,1,2,3",
89 "EventName": "FP_ASSIST.X87_INPUT", 129 "EventName": "FP_ASSIST.X87_INPUT",
90 "PublicDescription": "This is a non-precise version (that is, does not use PEBS) of the event that counts x87 floating point (FP) micro-code assist (invalid operation, denormal operand, SNaN operand) when the input value (one of the source operands to an FP instruction) is invalid.", 130 "PublicDescription": "This event counts x87 floating point (FP) micro-code assist (invalid operation, denormal operand, SNaN operand) when the input value (one of the source operands to an FP instruction) is invalid.",
91 "SampleAfterValue": "100003", 131 "SampleAfterValue": "100003",
92 "CounterHTOff": "0,1,2,3,4,5,6,7" 132 "CounterHTOff": "0,1,2,3,4,5,6,7"
93 }, 133 },
@@ -97,7 +137,7 @@
97 "BriefDescription": "Number of SIMD FP assists due to Output values", 137 "BriefDescription": "Number of SIMD FP assists due to Output values",
98 "Counter": "0,1,2,3", 138 "Counter": "0,1,2,3",
99 "EventName": "FP_ASSIST.SIMD_OUTPUT", 139 "EventName": "FP_ASSIST.SIMD_OUTPUT",
100 "PublicDescription": "This is a non-precise version (that is, does not use PEBS) of the event that counts the number of SSE* floating point (FP) micro-code assist (numeric overflow/underflow) when the output value (destination register) is invalid. Counting covers only cases involving penalties that require micro-code assist intervention.", 140 "PublicDescription": "This event counts the number of SSE* floating point (FP) micro-code assist (numeric overflow/underflow) when the output value (destination register) is invalid. Counting covers only cases involving penalties that require micro-code assist intervention.",
101 "SampleAfterValue": "100003", 141 "SampleAfterValue": "100003",
102 "CounterHTOff": "0,1,2,3,4,5,6,7" 142 "CounterHTOff": "0,1,2,3,4,5,6,7"
103 }, 143 },
@@ -107,7 +147,7 @@
107 "BriefDescription": "Number of SIMD FP assists due to input values", 147 "BriefDescription": "Number of SIMD FP assists due to input values",
108 "Counter": "0,1,2,3", 148 "Counter": "0,1,2,3",
109 "EventName": "FP_ASSIST.SIMD_INPUT", 149 "EventName": "FP_ASSIST.SIMD_INPUT",
110 "PublicDescription": "This is a non-precise version (that is, does not use PEBS) of the event that counts any input SSE* FP assist - invalid operation, denormal operand, dividing by zero, SNaN operand. Counting includes only cases involving penalties that required micro-code assist intervention.", 150 "PublicDescription": "This event counts any input SSE* FP assist - invalid operation, denormal operand, dividing by zero, SNaN operand. Counting includes only cases involving penalties that required micro-code assist intervention.",
111 "SampleAfterValue": "100003", 151 "SampleAfterValue": "100003",
112 "CounterHTOff": "0,1,2,3,4,5,6,7" 152 "CounterHTOff": "0,1,2,3,4,5,6,7"
113 }, 153 },
@@ -121,51 +161,5 @@
121 "PublicDescription": "This event counts cycles with any input and output SSE or x87 FP assist. If an input and output assist are detected on the same cycle the event increments by 1.", 161 "PublicDescription": "This event counts cycles with any input and output SSE or x87 FP assist. If an input and output assist are detected on the same cycle the event increments by 1.",
122 "SampleAfterValue": "100003", 162 "SampleAfterValue": "100003",
123 "CounterHTOff": "0,1,2,3" 163 "CounterHTOff": "0,1,2,3"
124 },
125 {
126 "EventCode": "0xc7",
127 "UMask": "0x20",
128 "BriefDescription": "Number of SSE/AVX computational 256-bit packed single precision floating-point instructions retired. Each count represents 8 computations. Applies to SSE* and AVX* packed single precision floating-point instructions: ADD SUB MUL DIV MIN MAX RCP RSQRT SQRT DPP FM(N)ADD/SUB. DPP and FM(N)ADD/SUB instructions count twice as they perform multiple calculations per element.",
129 "PEBS": "1",
130 "Counter": "0,1,2,3",
131 "EventName": "FP_ARITH_INST_RETIRED.256B_PACKED_SINGLE",
132 "SampleAfterValue": "2000003",
133 "CounterHTOff": "0,1,2,3"
134 },
135 {
136 "EventCode": "0xC7",
137 "UMask": "0x3",
138 "BriefDescription": "Number of SSE/AVX computational scalar floating-point instructions retired. Applies to SSE* and AVX* scalar, double and single precision floating-point: ADD SUB MUL DIV MIN MAX RSQRT RCP SQRT FM(N)ADD/SUB. FM(N)ADD/SUB instructions count twice as they perform multiple calculations per element.",
139 "Counter": "0,1,2,3",
140 "EventName": "FP_ARITH_INST_RETIRED.SCALAR",
141 "SampleAfterValue": "2000003",
142 "CounterHTOff": "0,1,2,3"
143 },
144 {
145 "EventCode": "0xC7",
146 "UMask": "0x3c",
147 "BriefDescription": "Number of SSE/AVX computational packed floating-point instructions retired. Applies to SSE* and AVX*, packed, double and single precision floating-point: ADD SUB MUL DIV MIN MAX RSQRT RCP SQRT DPP FM(N)ADD/SUB. DPP and FM(N)ADD/SUB instructions count twice as they perform multiple calculations per element.",
148 "Counter": "0,1,2,3",
149 "EventName": "FP_ARITH_INST_RETIRED.PACKED",
150 "SampleAfterValue": "2000004",
151 "CounterHTOff": "0,1,2,3"
152 },
153 {
154 "EventCode": "0xC7",
155 "UMask": "0x2a",
156 "BriefDescription": "Number of SSE/AVX computational single precision floating-point instructions retired. Applies to SSE* and AVX*scalar, double and single precision floating-point: ADD SUB MUL DIV MIN MAX RCP RSQRT SQRT DPP FM(N)ADD/SUB. DPP and FM(N)ADD/SUB instructions count twice as they perform multiple calculations per element. ?.",
157 "Counter": "0,1,2,3",
158 "EventName": "FP_ARITH_INST_RETIRED.SINGLE",
159 "SampleAfterValue": "2000005",
160 "CounterHTOff": "0,1,2,3"
161 },
162 {
163 "EventCode": "0xC7",
164 "UMask": "0x15",
165 "BriefDescription": "Number of SSE/AVX computational double precision floating-point instructions retired. Applies to SSE* and AVX*scalar, double and single precision floating-point: ADD SUB MUL DIV MIN MAX SQRT DPP FM(N)ADD/SUB. DPP and FM(N)ADD/SUB instructions count twice as they perform multiple calculations per element. ?.",
166 "Counter": "0,1,2,3",
167 "EventName": "FP_ARITH_INST_RETIRED.DOUBLE",
168 "SampleAfterValue": "2000006",
169 "CounterHTOff": "0,1,2,3"
170 } 164 }
171] \ No newline at end of file 165] \ No newline at end of file
diff --git a/tools/perf/pmu-events/arch/x86/broadwellde/frontend.json b/tools/perf/pmu-events/arch/x86/broadwellde/frontend.json
index 06bf0a40e568..72781e1e3362 100644
--- a/tools/perf/pmu-events/arch/x86/broadwellde/frontend.json
+++ b/tools/perf/pmu-events/arch/x86/broadwellde/frontend.json
@@ -15,80 +15,49 @@
15 "BriefDescription": "Uops delivered to Instruction Decode Queue (IDQ) from MITE path", 15 "BriefDescription": "Uops delivered to Instruction Decode Queue (IDQ) from MITE path",
16 "Counter": "0,1,2,3", 16 "Counter": "0,1,2,3",
17 "EventName": "IDQ.MITE_UOPS", 17 "EventName": "IDQ.MITE_UOPS",
18 "PublicDescription": "This event counts the number of uops delivered to Instruction Decode Queue (IDQ) from the MITE path. Counting includes uops that may \"bypass\" the IDQ. This also means that uops are not being delivered from the Decode Stream Buffer (DSB).", 18 "PublicDescription": "This event counts the number of uops delivered to Instruction Decode Queue (IDQ) from the MITE path. Counting includes uops that may bypass the IDQ. This also means that uops are not being delivered from the Decode Stream Buffer (DSB).",
19 "SampleAfterValue": "2000003", 19 "SampleAfterValue": "2000003",
20 "CounterHTOff": "0,1,2,3,4,5,6,7" 20 "CounterHTOff": "0,1,2,3,4,5,6,7"
21 }, 21 },
22 { 22 {
23 "EventCode": "0x79", 23 "EventCode": "0x79",
24 "UMask": "0x8", 24 "UMask": "0x4",
25 "BriefDescription": "Uops delivered to Instruction Decode Queue (IDQ) from the Decode Stream Buffer (DSB) path", 25 "BriefDescription": "Cycles when uops are being delivered to Instruction Decode Queue (IDQ) from MITE path",
26 "Counter": "0,1,2,3",
27 "EventName": "IDQ.DSB_UOPS",
28 "PublicDescription": "This event counts the number of uops delivered to Instruction Decode Queue (IDQ) from the Decode Stream Buffer (DSB) path. Counting includes uops that may \"bypass\" the IDQ.",
29 "SampleAfterValue": "2000003",
30 "CounterHTOff": "0,1,2,3,4,5,6,7"
31 },
32 {
33 "EventCode": "0x79",
34 "UMask": "0x10",
35 "BriefDescription": "Uops initiated by Decode Stream Buffer (DSB) that are being delivered to Instruction Decode Queue (IDQ) while Microcode Sequenser (MS) is busy",
36 "Counter": "0,1,2,3",
37 "EventName": "IDQ.MS_DSB_UOPS",
38 "PublicDescription": "This event counts the number of uops initiated by Decode Stream Buffer (DSB) that are being delivered to Instruction Decode Queue (IDQ) while the Microcode Sequencer (MS) is busy. Counting includes uops that may \"bypass\" the IDQ.",
39 "SampleAfterValue": "2000003",
40 "CounterHTOff": "0,1,2,3,4,5,6,7"
41 },
42 {
43 "EventCode": "0x79",
44 "UMask": "0x20",
45 "BriefDescription": "Uops initiated by MITE and delivered to Instruction Decode Queue (IDQ) while Microcode Sequenser (MS) is busy",
46 "Counter": "0,1,2,3",
47 "EventName": "IDQ.MS_MITE_UOPS",
48 "PublicDescription": "This event counts the number of uops initiated by MITE and delivered to Instruction Decode Queue (IDQ) while the Microcode Sequenser (MS) is busy. Counting includes uops that may \"bypass\" the IDQ.",
49 "SampleAfterValue": "2000003",
50 "CounterHTOff": "0,1,2,3,4,5,6,7"
51 },
52 {
53 "EventCode": "0x79",
54 "UMask": "0x30",
55 "BriefDescription": "Uops delivered to Instruction Decode Queue (IDQ) while Microcode Sequenser (MS) is busy",
56 "Counter": "0,1,2,3", 26 "Counter": "0,1,2,3",
57 "EventName": "IDQ.MS_UOPS", 27 "EventName": "IDQ.MITE_CYCLES",
58 "PublicDescription": "This event counts the total number of uops delivered to Instruction Decode Queue (IDQ) while the Microcode Sequenser (MS) is busy. Counting includes uops that may \"bypass\" the IDQ. Uops maybe initiated by Decode Stream Buffer (DSB) or MITE.", 28 "CounterMask": "1",
29 "PublicDescription": "This event counts cycles during which uops are being delivered to Instruction Decode Queue (IDQ) from the MITE path. Counting includes uops that may bypass the IDQ.",
59 "SampleAfterValue": "2000003", 30 "SampleAfterValue": "2000003",
60 "CounterHTOff": "0,1,2,3,4,5,6,7" 31 "CounterHTOff": "0,1,2,3,4,5,6,7"
61 }, 32 },
62 { 33 {
63 "EventCode": "0x79", 34 "EventCode": "0x79",
64 "UMask": "0x30", 35 "UMask": "0x8",
65 "BriefDescription": "Cycles when uops are being delivered to Instruction Decode Queue (IDQ) while Microcode Sequenser (MS) is busy", 36 "BriefDescription": "Uops delivered to Instruction Decode Queue (IDQ) from the Decode Stream Buffer (DSB) path",
66 "Counter": "0,1,2,3", 37 "Counter": "0,1,2,3",
67 "EventName": "IDQ.MS_CYCLES", 38 "EventName": "IDQ.DSB_UOPS",
68 "CounterMask": "1", 39 "PublicDescription": "This event counts the number of uops delivered to Instruction Decode Queue (IDQ) from the Decode Stream Buffer (DSB) path. Counting includes uops that may bypass the IDQ.",
69 "PublicDescription": "This event counts cycles during which uops are being delivered to Instruction Decode Queue (IDQ) while the Microcode Sequenser (MS) is busy. Counting includes uops that may \"bypass\" the IDQ. Uops maybe initiated by Decode Stream Buffer (DSB) or MITE.",
70 "SampleAfterValue": "2000003", 40 "SampleAfterValue": "2000003",
71 "CounterHTOff": "0,1,2,3,4,5,6,7" 41 "CounterHTOff": "0,1,2,3,4,5,6,7"
72 }, 42 },
73 { 43 {
74 "EventCode": "0x79", 44 "EventCode": "0x79",
75 "UMask": "0x4", 45 "UMask": "0x8",
76 "BriefDescription": "Cycles when uops are being delivered to Instruction Decode Queue (IDQ) from MITE path", 46 "BriefDescription": "Cycles when uops are being delivered to Instruction Decode Queue (IDQ) from Decode Stream Buffer (DSB) path",
77 "Counter": "0,1,2,3", 47 "Counter": "0,1,2,3",
78 "EventName": "IDQ.MITE_CYCLES", 48 "EventName": "IDQ.DSB_CYCLES",
79 "CounterMask": "1", 49 "CounterMask": "1",
80 "PublicDescription": "This event counts cycles during which uops are being delivered to Instruction Decode Queue (IDQ) from the MITE path. Counting includes uops that may \"bypass\" the IDQ.", 50 "PublicDescription": "This event counts cycles during which uops are being delivered to Instruction Decode Queue (IDQ) from the Decode Stream Buffer (DSB) path. Counting includes uops that may bypass the IDQ.",
81 "SampleAfterValue": "2000003", 51 "SampleAfterValue": "2000003",
82 "CounterHTOff": "0,1,2,3,4,5,6,7" 52 "CounterHTOff": "0,1,2,3,4,5,6,7"
83 }, 53 },
84 { 54 {
85 "EventCode": "0x79", 55 "EventCode": "0x79",
86 "UMask": "0x8", 56 "UMask": "0x10",
87 "BriefDescription": "Cycles when uops are being delivered to Instruction Decode Queue (IDQ) from Decode Stream Buffer (DSB) path", 57 "BriefDescription": "Uops initiated by Decode Stream Buffer (DSB) that are being delivered to Instruction Decode Queue (IDQ) while Microcode Sequenser (MS) is busy",
88 "Counter": "0,1,2,3", 58 "Counter": "0,1,2,3",
89 "EventName": "IDQ.DSB_CYCLES", 59 "EventName": "IDQ.MS_DSB_UOPS",
90 "CounterMask": "1", 60 "PublicDescription": "This event counts the number of uops initiated by Decode Stream Buffer (DSB) that are being delivered to Instruction Decode Queue (IDQ) while the Microcode Sequencer (MS) is busy. Counting includes uops that may bypass the IDQ.",
91 "PublicDescription": "This event counts cycles during which uops are being delivered to Instruction Decode Queue (IDQ) from the Decode Stream Buffer (DSB) path. Counting includes uops that may \"bypass\" the IDQ.",
92 "SampleAfterValue": "2000003", 61 "SampleAfterValue": "2000003",
93 "CounterHTOff": "0,1,2,3,4,5,6,7" 62 "CounterHTOff": "0,1,2,3,4,5,6,7"
94 }, 63 },
@@ -99,7 +68,7 @@
99 "Counter": "0,1,2,3", 68 "Counter": "0,1,2,3",
100 "EventName": "IDQ.MS_DSB_CYCLES", 69 "EventName": "IDQ.MS_DSB_CYCLES",
101 "CounterMask": "1", 70 "CounterMask": "1",
102 "PublicDescription": "This event counts cycles during which uops initiated by Decode Stream Buffer (DSB) are being delivered to Instruction Decode Queue (IDQ) while the Microcode Sequencer (MS) is busy. Counting includes uops that may \"bypass\" the IDQ.", 71 "PublicDescription": "This event counts cycles during which uops initiated by Decode Stream Buffer (DSB) are being delivered to Instruction Decode Queue (IDQ) while the Microcode Sequencer (MS) is busy. Counting includes uops that may bypass the IDQ.",
103 "SampleAfterValue": "2000003", 72 "SampleAfterValue": "2000003",
104 "CounterHTOff": "0,1,2,3,4,5,6,7" 73 "CounterHTOff": "0,1,2,3,4,5,6,7"
105 }, 74 },
@@ -111,7 +80,7 @@
111 "Counter": "0,1,2,3", 80 "Counter": "0,1,2,3",
112 "EventName": "IDQ.MS_DSB_OCCUR", 81 "EventName": "IDQ.MS_DSB_OCCUR",
113 "CounterMask": "1", 82 "CounterMask": "1",
114 "PublicDescription": "This event counts the number of deliveries to Instruction Decode Queue (IDQ) initiated by Decode Stream Buffer (DSB) while the Microcode Sequencer (MS) is busy. Counting includes uops that may \"bypass\" the IDQ.", 83 "PublicDescription": "This event counts the number of deliveries to Instruction Decode Queue (IDQ) initiated by Decode Stream Buffer (DSB) while the Microcode Sequencer (MS) is busy. Counting includes uops that may bypass the IDQ.",
115 "SampleAfterValue": "2000003", 84 "SampleAfterValue": "2000003",
116 "CounterHTOff": "0,1,2,3,4,5,6,7" 85 "CounterHTOff": "0,1,2,3,4,5,6,7"
117 }, 86 },
@@ -122,7 +91,7 @@
122 "Counter": "0,1,2,3", 91 "Counter": "0,1,2,3",
123 "EventName": "IDQ.ALL_DSB_CYCLES_4_UOPS", 92 "EventName": "IDQ.ALL_DSB_CYCLES_4_UOPS",
124 "CounterMask": "4", 93 "CounterMask": "4",
125 "PublicDescription": "This event counts the number of cycles 4 uops were delivered to Instruction Decode Queue (IDQ) from the Decode Stream Buffer (DSB) path. Counting includes uops that may \"bypass\" the IDQ.", 94 "PublicDescription": "This event counts the number of cycles 4 uops were delivered to Instruction Decode Queue (IDQ) from the Decode Stream Buffer (DSB) path. Counting includes uops that may bypass the IDQ.",
126 "SampleAfterValue": "2000003", 95 "SampleAfterValue": "2000003",
127 "CounterHTOff": "0,1,2,3,4,5,6,7" 96 "CounterHTOff": "0,1,2,3,4,5,6,7"
128 }, 97 },
@@ -133,7 +102,17 @@
133 "Counter": "0,1,2,3", 102 "Counter": "0,1,2,3",
134 "EventName": "IDQ.ALL_DSB_CYCLES_ANY_UOPS", 103 "EventName": "IDQ.ALL_DSB_CYCLES_ANY_UOPS",
135 "CounterMask": "1", 104 "CounterMask": "1",
136 "PublicDescription": "This event counts the number of cycles uops were delivered to Instruction Decode Queue (IDQ) from the Decode Stream Buffer (DSB) path. Counting includes uops that may \"bypass\" the IDQ.", 105 "PublicDescription": "This event counts the number of cycles uops were delivered to Instruction Decode Queue (IDQ) from the Decode Stream Buffer (DSB) path. Counting includes uops that may bypass the IDQ.",
106 "SampleAfterValue": "2000003",
107 "CounterHTOff": "0,1,2,3,4,5,6,7"
108 },
109 {
110 "EventCode": "0x79",
111 "UMask": "0x20",
112 "BriefDescription": "Uops initiated by MITE and delivered to Instruction Decode Queue (IDQ) while Microcode Sequenser (MS) is busy",
113 "Counter": "0,1,2,3",
114 "EventName": "IDQ.MS_MITE_UOPS",
115 "PublicDescription": "This event counts the number of uops initiated by MITE and delivered to Instruction Decode Queue (IDQ) while the Microcode Sequenser (MS) is busy. Counting includes uops that may bypass the IDQ.",
137 "SampleAfterValue": "2000003", 116 "SampleAfterValue": "2000003",
138 "CounterHTOff": "0,1,2,3,4,5,6,7" 117 "CounterHTOff": "0,1,2,3,4,5,6,7"
139 }, 118 },
@@ -144,7 +123,7 @@
144 "Counter": "0,1,2,3", 123 "Counter": "0,1,2,3",
145 "EventName": "IDQ.ALL_MITE_CYCLES_4_UOPS", 124 "EventName": "IDQ.ALL_MITE_CYCLES_4_UOPS",
146 "CounterMask": "4", 125 "CounterMask": "4",
147 "PublicDescription": "This event counts the number of cycles 4 uops were delivered to Instruction Decode Queue (IDQ) from the MITE path. Counting includes uops that may \"bypass\" the IDQ. This also means that uops are not being delivered from the Decode Stream Buffer (DSB).", 126 "PublicDescription": "This event counts the number of cycles 4 uops were delivered to Instruction Decode Queue (IDQ) from the MITE path. Counting includes uops that may bypass the IDQ. This also means that uops are not being delivered from the Decode Stream Buffer (DSB).",
148 "SampleAfterValue": "2000003", 127 "SampleAfterValue": "2000003",
149 "CounterHTOff": "0,1,2,3,4,5,6,7" 128 "CounterHTOff": "0,1,2,3,4,5,6,7"
150 }, 129 },
@@ -155,7 +134,39 @@
155 "Counter": "0,1,2,3", 134 "Counter": "0,1,2,3",
156 "EventName": "IDQ.ALL_MITE_CYCLES_ANY_UOPS", 135 "EventName": "IDQ.ALL_MITE_CYCLES_ANY_UOPS",
157 "CounterMask": "1", 136 "CounterMask": "1",
158 "PublicDescription": "This event counts the number of cycles uops were delivered to Instruction Decode Queue (IDQ) from the MITE path. Counting includes uops that may \"bypass\" the IDQ. This also means that uops are not being delivered from the Decode Stream Buffer (DSB).", 137 "PublicDescription": "This event counts the number of cycles uops were delivered to Instruction Decode Queue (IDQ) from the MITE path. Counting includes uops that may bypass the IDQ. This also means that uops are not being delivered from the Decode Stream Buffer (DSB).",
138 "SampleAfterValue": "2000003",
139 "CounterHTOff": "0,1,2,3,4,5,6,7"
140 },
141 {
142 "EventCode": "0x79",
143 "UMask": "0x30",
144 "BriefDescription": "Uops delivered to Instruction Decode Queue (IDQ) while Microcode Sequenser (MS) is busy",
145 "Counter": "0,1,2,3",
146 "EventName": "IDQ.MS_UOPS",
147 "PublicDescription": "This event counts the total number of uops delivered to Instruction Decode Queue (IDQ) while the Microcode Sequenser (MS) is busy. Counting includes uops that may bypass the IDQ. Uops maybe initiated by Decode Stream Buffer (DSB) or MITE.",
148 "SampleAfterValue": "2000003",
149 "CounterHTOff": "0,1,2,3,4,5,6,7"
150 },
151 {
152 "EventCode": "0x79",
153 "UMask": "0x30",
154 "BriefDescription": "Cycles when uops are being delivered to Instruction Decode Queue (IDQ) while Microcode Sequenser (MS) is busy",
155 "Counter": "0,1,2,3",
156 "EventName": "IDQ.MS_CYCLES",
157 "CounterMask": "1",
158 "PublicDescription": "This event counts cycles during which uops are being delivered to Instruction Decode Queue (IDQ) while the Microcode Sequenser (MS) is busy. Counting includes uops that may bypass the IDQ. Uops maybe initiated by Decode Stream Buffer (DSB) or MITE.",
159 "SampleAfterValue": "2000003",
160 "CounterHTOff": "0,1,2,3,4,5,6,7"
161 },
162 {
163 "EdgeDetect": "1",
164 "EventCode": "0x79",
165 "UMask": "0x30",
166 "BriefDescription": "Number of switches from DSB (Decode Stream Buffer) or MITE (legacy decode pipeline) to the Microcode Sequencer.",
167 "Counter": "0,1,2,3",
168 "EventName": "IDQ.MS_SWITCHES",
169 "CounterMask": "1",
159 "SampleAfterValue": "2000003", 170 "SampleAfterValue": "2000003",
160 "CounterHTOff": "0,1,2,3,4,5,6,7" 171 "CounterHTOff": "0,1,2,3,4,5,6,7"
161 }, 172 },
@@ -165,7 +176,7 @@
165 "BriefDescription": "Uops delivered to Instruction Decode Queue (IDQ) from MITE path", 176 "BriefDescription": "Uops delivered to Instruction Decode Queue (IDQ) from MITE path",
166 "Counter": "0,1,2,3", 177 "Counter": "0,1,2,3",
167 "EventName": "IDQ.MITE_ALL_UOPS", 178 "EventName": "IDQ.MITE_ALL_UOPS",
168 "PublicDescription": "This event counts the number of uops delivered to Instruction Decode Queue (IDQ) from the MITE path. Counting includes uops that may \"bypass\" the IDQ. This also means that uops are not being delivered from the Decode Stream Buffer (DSB).", 179 "PublicDescription": "This event counts the number of uops delivered to Instruction Decode Queue (IDQ) from the MITE path. Counting includes uops that may bypass the IDQ. This also means that uops are not being delivered from the Decode Stream Buffer (DSB).",
169 "SampleAfterValue": "2000003", 180 "SampleAfterValue": "2000003",
170 "CounterHTOff": "0,1,2,3,4,5,6,7" 181 "CounterHTOff": "0,1,2,3,4,5,6,7"
171 }, 182 },
@@ -205,7 +216,7 @@
205 "BriefDescription": "Uops not delivered to Resource Allocation Table (RAT) per thread when backend of the machine is not stalled", 216 "BriefDescription": "Uops not delivered to Resource Allocation Table (RAT) per thread when backend of the machine is not stalled",
206 "Counter": "0,1,2,3", 217 "Counter": "0,1,2,3",
207 "EventName": "IDQ_UOPS_NOT_DELIVERED.CORE", 218 "EventName": "IDQ_UOPS_NOT_DELIVERED.CORE",
208 "PublicDescription": "This event counts the number of uops not delivered to Resource Allocation Table (RAT) per thread adding ?4 ? x? when Resource Allocation Table (RAT) is not stalled and Instruction Decode Queue (IDQ) delivers x uops to Resource Allocation Table (RAT) (where x belongs to {0,1,2,3}). Counting does not cover cases when:\n a. IDQ-Resource Allocation Table (RAT) pipe serves the other thread;\n b. Resource Allocation Table (RAT) is stalled for the thread (including uop drops and clear BE conditions); \n c. Instruction Decode Queue (IDQ) delivers four uops.", 219 "PublicDescription": "This event counts the number of uops not delivered to Resource Allocation Table (RAT) per thread adding 4 x when Resource Allocation Table (RAT) is not stalled and Instruction Decode Queue (IDQ) delivers x uops to Resource Allocation Table (RAT) (where x belongs to {0,1,2,3}). Counting does not cover cases when:\n a. IDQ-Resource Allocation Table (RAT) pipe serves the other thread;\n b. Resource Allocation Table (RAT) is stalled for the thread (including uop drops and clear BE conditions); \n c. Instruction Decode Queue (IDQ) delivers four uops.",
209 "SampleAfterValue": "2000003", 220 "SampleAfterValue": "2000003",
210 "CounterHTOff": "0,1,2,3" 221 "CounterHTOff": "0,1,2,3"
211 }, 222 },
@@ -268,18 +279,7 @@
268 "BriefDescription": "Decode Stream Buffer (DSB)-to-MITE switch true penalty cycles.", 279 "BriefDescription": "Decode Stream Buffer (DSB)-to-MITE switch true penalty cycles.",
269 "Counter": "0,1,2,3", 280 "Counter": "0,1,2,3",
270 "EventName": "DSB2MITE_SWITCHES.PENALTY_CYCLES", 281 "EventName": "DSB2MITE_SWITCHES.PENALTY_CYCLES",
271 "PublicDescription": "This event counts Decode Stream Buffer (DSB)-to-MITE switch true penalty cycles. These cycles do not include uops routed through because of the switch itself, for example, when Instruction Decode Queue (IDQ) pre-allocation is unavailable, or Instruction Decode Queue (IDQ) is full. SBD-to-MITE switch true penalty cycles happen after the merge mux (MM) receives Decode Stream Buffer (DSB) Sync-indication until receiving the first MITE uop. \nMM is placed before Instruction Decode Queue (IDQ) to merge uops being fed from the MITE and Decode Stream Buffer (DSB) paths. Decode Stream Buffer (DSB) inserts the Sync-indication whenever a Decode Stream Buffer (DSB)-to-MITE switch occurs.\nPenalty: A Decode Stream Buffer (DSB) hit followed by a Decode Stream Buffer (DSB) miss can cost up to six cycles in which no uops are delivered to the IDQ. Most often, such switches from the Decode Stream Buffer (DSB) to the legacy pipeline cost 0?2 cycles.", 282 "PublicDescription": "This event counts Decode Stream Buffer (DSB)-to-MITE switch true penalty cycles. These cycles do not include uops routed through because of the switch itself, for example, when Instruction Decode Queue (IDQ) pre-allocation is unavailable, or Instruction Decode Queue (IDQ) is full. SBD-to-MITE switch true penalty cycles happen after the merge mux (MM) receives Decode Stream Buffer (DSB) Sync-indication until receiving the first MITE uop. \nMM is placed before Instruction Decode Queue (IDQ) to merge uops being fed from the MITE and Decode Stream Buffer (DSB) paths. Decode Stream Buffer (DSB) inserts the Sync-indication whenever a Decode Stream Buffer (DSB)-to-MITE switch occurs.\nPenalty: A Decode Stream Buffer (DSB) hit followed by a Decode Stream Buffer (DSB) miss can cost up to six cycles in which no uops are delivered to the IDQ. Most often, such switches from the Decode Stream Buffer (DSB) to the legacy pipeline cost 02 cycles.",
272 "SampleAfterValue": "2000003",
273 "CounterHTOff": "0,1,2,3,4,5,6,7"
274 },
275 {
276 "EdgeDetect": "1",
277 "EventCode": "0x79",
278 "UMask": "0x30",
279 "BriefDescription": "Number of switches from DSB (Decode Stream Buffer) or MITE (legacy decode pipeline) to the Microcode Sequencer.",
280 "Counter": "0,1,2,3",
281 "EventName": "IDQ.MS_SWITCHES",
282 "CounterMask": "1",
283 "SampleAfterValue": "2000003", 283 "SampleAfterValue": "2000003",
284 "CounterHTOff": "0,1,2,3,4,5,6,7" 284 "CounterHTOff": "0,1,2,3,4,5,6,7"
285 } 285 }
diff --git a/tools/perf/pmu-events/arch/x86/broadwellde/memory.json b/tools/perf/pmu-events/arch/x86/broadwellde/memory.json
index cfa1e5876ec3..e44f73c24ac8 100644
--- a/tools/perf/pmu-events/arch/x86/broadwellde/memory.json
+++ b/tools/perf/pmu-events/arch/x86/broadwellde/memory.json
@@ -95,7 +95,6 @@
95 "BriefDescription": "Counts the number of times a class of instructions that may cause a transactional abort was executed. Since this is the count of execution, it may not always cause a transactional abort.", 95 "BriefDescription": "Counts the number of times a class of instructions that may cause a transactional abort was executed. Since this is the count of execution, it may not always cause a transactional abort.",
96 "Counter": "0,1,2,3", 96 "Counter": "0,1,2,3",
97 "EventName": "TX_EXEC.MISC1", 97 "EventName": "TX_EXEC.MISC1",
98 "PublicDescription": "Unfriendly TSX abort triggered by a flowmarker.",
99 "SampleAfterValue": "2000003", 98 "SampleAfterValue": "2000003",
100 "CounterHTOff": "0,1,2,3,4,5,6,7" 99 "CounterHTOff": "0,1,2,3,4,5,6,7"
101 }, 100 },
@@ -171,11 +170,11 @@
171 { 170 {
172 "EventCode": "0xc8", 171 "EventCode": "0xc8",
173 "UMask": "0x4", 172 "UMask": "0x4",
174 "BriefDescription": "Number of times HLE abort was triggered", 173 "BriefDescription": "Number of times HLE abort was triggered (PEBS)",
175 "PEBS": "1", 174 "PEBS": "1",
176 "Counter": "0,1,2,3", 175 "Counter": "0,1,2,3",
177 "EventName": "HLE_RETIRED.ABORTED", 176 "EventName": "HLE_RETIRED.ABORTED",
178 "PublicDescription": "Number of times HLE abort was triggered.", 177 "PublicDescription": "Number of times HLE abort was triggered (PEBS).",
179 "SampleAfterValue": "2000003", 178 "SampleAfterValue": "2000003",
180 "CounterHTOff": "0,1,2,3,4,5,6,7" 179 "CounterHTOff": "0,1,2,3,4,5,6,7"
181 }, 180 },
@@ -252,11 +251,11 @@
252 { 251 {
253 "EventCode": "0xc9", 252 "EventCode": "0xc9",
254 "UMask": "0x4", 253 "UMask": "0x4",
255 "BriefDescription": "Number of times RTM abort was triggered", 254 "BriefDescription": "Number of times RTM abort was triggered (PEBS)",
256 "PEBS": "1", 255 "PEBS": "1",
257 "Counter": "0,1,2,3", 256 "Counter": "0,1,2,3",
258 "EventName": "RTM_RETIRED.ABORTED", 257 "EventName": "RTM_RETIRED.ABORTED",
259 "PublicDescription": "Number of times RTM abort was triggered .", 258 "PublicDescription": "Number of times RTM abort was triggered (PEBS).",
260 "SampleAfterValue": "2000003", 259 "SampleAfterValue": "2000003",
261 "CounterHTOff": "0,1,2,3" 260 "CounterHTOff": "0,1,2,3"
262 }, 261 },
diff --git a/tools/perf/pmu-events/arch/x86/broadwellde/other.json b/tools/perf/pmu-events/arch/x86/broadwellde/other.json
index 718fcb1db2ee..4475249ea9da 100644
--- a/tools/perf/pmu-events/arch/x86/broadwellde/other.json
+++ b/tools/perf/pmu-events/arch/x86/broadwellde/other.json
@@ -10,16 +10,6 @@
10 "CounterHTOff": "0,1,2,3,4,5,6,7" 10 "CounterHTOff": "0,1,2,3,4,5,6,7"
11 }, 11 },
12 { 12 {
13 "EventCode": "0x5C",
14 "UMask": "0x2",
15 "BriefDescription": "Unhalted core cycles when thread is in rings 1, 2, or 3",
16 "Counter": "0,1,2,3",
17 "EventName": "CPL_CYCLES.RING123",
18 "PublicDescription": "This event counts unhalted core cycles during which the thread is in rings 1, 2, or 3.",
19 "SampleAfterValue": "2000003",
20 "CounterHTOff": "0,1,2,3,4,5,6,7"
21 },
22 {
23 "EdgeDetect": "1", 13 "EdgeDetect": "1",
24 "EventCode": "0x5C", 14 "EventCode": "0x5C",
25 "UMask": "0x1", 15 "UMask": "0x1",
@@ -32,6 +22,16 @@
32 "CounterHTOff": "0,1,2,3,4,5,6,7" 22 "CounterHTOff": "0,1,2,3,4,5,6,7"
33 }, 23 },
34 { 24 {
25 "EventCode": "0x5C",
26 "UMask": "0x2",
27 "BriefDescription": "Unhalted core cycles when thread is in rings 1, 2, or 3",
28 "Counter": "0,1,2,3",
29 "EventName": "CPL_CYCLES.RING123",
30 "PublicDescription": "This event counts unhalted core cycles during which the thread is in rings 1, 2, or 3.",
31 "SampleAfterValue": "2000003",
32 "CounterHTOff": "0,1,2,3,4,5,6,7"
33 },
34 {
35 "EventCode": "0x63", 35 "EventCode": "0x63",
36 "UMask": "0x1", 36 "UMask": "0x1",
37 "BriefDescription": "Cycles when L1 and L2 are locked due to UC or split lock", 37 "BriefDescription": "Cycles when L1 and L2 are locked due to UC or split lock",
diff --git a/tools/perf/pmu-events/arch/x86/broadwellde/pipeline.json b/tools/perf/pmu-events/arch/x86/broadwellde/pipeline.json
index 02b4e1035f2d..920c89da9111 100644
--- a/tools/perf/pmu-events/arch/x86/broadwellde/pipeline.json
+++ b/tools/perf/pmu-events/arch/x86/broadwellde/pipeline.json
@@ -3,31 +3,41 @@
3 "EventCode": "0x00", 3 "EventCode": "0x00",
4 "UMask": "0x1", 4 "UMask": "0x1",
5 "BriefDescription": "Instructions retired from execution.", 5 "BriefDescription": "Instructions retired from execution.",
6 "Counter": "Fixed counter 1", 6 "Counter": "Fixed counter 0",
7 "EventName": "INST_RETIRED.ANY", 7 "EventName": "INST_RETIRED.ANY",
8 "PublicDescription": "This event counts the number of instructions retired from execution. For instructions that consist of multiple micro-ops, this event counts the retirement of the last micro-op of the instruction. Counting continues during hardware interrupts, traps, and inside interrupt handlers. \nNotes: INST_RETIRED.ANY is counted by a designated fixed counter, leaving the four (eight when Hyperthreading is disabled) programmable counters available for other events. INST_RETIRED.ANY_P is counted by a programmable counter and it is an architectural performance event. \nCounting: Faulting executions of GETSEC/VM entry/VM Exit/MWait will not count as retired instructions.", 8 "PublicDescription": "This event counts the number of instructions retired from execution. For instructions that consist of multiple micro-ops, this event counts the retirement of the last micro-op of the instruction. Counting continues during hardware interrupts, traps, and inside interrupt handlers. \nNotes: INST_RETIRED.ANY is counted by a designated fixed counter, leaving the four (eight when Hyperthreading is disabled) programmable counters available for other events. INST_RETIRED.ANY_P is counted by a programmable counter and it is an architectural performance event. \nCounting: Faulting executions of GETSEC/VM entry/VM Exit/MWait will not count as retired instructions.",
9 "SampleAfterValue": "2000003", 9 "SampleAfterValue": "2000003",
10 "CounterHTOff": "Fixed counter 1" 10 "CounterHTOff": "Fixed counter 0"
11 }, 11 },
12 { 12 {
13 "EventCode": "0x00", 13 "EventCode": "0x00",
14 "UMask": "0x2", 14 "UMask": "0x2",
15 "BriefDescription": "Core cycles when the thread is not in halt state", 15 "BriefDescription": "Core cycles when the thread is not in halt state",
16 "Counter": "Fixed counter 2", 16 "Counter": "Fixed counter 1",
17 "EventName": "CPU_CLK_UNHALTED.THREAD", 17 "EventName": "CPU_CLK_UNHALTED.THREAD",
18 "PublicDescription": "This event counts the number of core cycles while the thread is not in a halt state. The thread enters the halt state when it is running the HLT instruction. This event is a component in many key event ratios. The core frequency may change from time to time due to transitions associated with Enhanced Intel SpeedStep Technology or TM2. For this reason this event may have a changing ratio with regards to time. When the core frequency is constant, this event can approximate elapsed time while the core was not in the halt state. It is counted on a dedicated fixed counter, leaving the four (eight when Hyperthreading is disabled) programmable counters available for other events.", 18 "PublicDescription": "This event counts the number of core cycles while the thread is not in a halt state. The thread enters the halt state when it is running the HLT instruction. This event is a component in many key event ratios. The core frequency may change from time to time due to transitions associated with Enhanced Intel SpeedStep Technology or TM2. For this reason this event may have a changing ratio with regards to time. When the core frequency is constant, this event can approximate elapsed time while the core was not in the halt state. It is counted on a dedicated fixed counter, leaving the four (eight when Hyperthreading is disabled) programmable counters available for other events.",
19 "SampleAfterValue": "2000003", 19 "SampleAfterValue": "2000003",
20 "CounterHTOff": "Fixed counter 2" 20 "CounterHTOff": "Fixed counter 1"
21 },
22 {
23 "EventCode": "0x00",
24 "UMask": "0x2",
25 "BriefDescription": "Core cycles when at least one thread on the physical core is not in halt state.",
26 "Counter": "Fixed counter 1",
27 "EventName": "CPU_CLK_UNHALTED.THREAD_ANY",
28 "AnyThread": "1",
29 "SampleAfterValue": "2000003",
30 "CounterHTOff": "Fixed counter 1"
21 }, 31 },
22 { 32 {
23 "EventCode": "0x00", 33 "EventCode": "0x00",
24 "UMask": "0x3", 34 "UMask": "0x3",
25 "BriefDescription": "Reference cycles when the core is not in halt state.", 35 "BriefDescription": "Reference cycles when the core is not in halt state.",
26 "Counter": "Fixed counter 3", 36 "Counter": "Fixed counter 2",
27 "EventName": "CPU_CLK_UNHALTED.REF_TSC", 37 "EventName": "CPU_CLK_UNHALTED.REF_TSC",
28 "PublicDescription": "This event counts the number of reference cycles when the core is not in a halt state. The core enters the halt state when it is running the HLT instruction or the MWAIT instruction. This event is not affected by core frequency changes (for example, P states, TM2 transitions) but has the same incrementing frequency as the time stamp counter. This event can approximate elapsed time while the core was not in a halt state. This event has a constant ratio with the CPU_CLK_UNHALTED.REF_XCLK event. It is counted on a dedicated fixed counter, leaving the four (eight when Hyperthreading is disabled) programmable counters available for other events. \nNote: On all current platforms this event stops counting during 'throttling (TM)' states duty off periods the processor is 'halted'. This event is clocked by base clock (100 Mhz) on Sandy Bridge. The counter update is done at a lower clock rate then the core clock the overflow status bit for this counter may appear 'sticky'. After the counter has overflowed and software clears the overflow status bit and resets the counter to less than MAX. The reset value to the counter is not clocked immediately so the overflow status bit will flip 'high (1)' and generate another PMI (if enabled) after which the reset value gets clocked into the counter. Therefore, software will get the interrupt, read the overflow status bit '1 for bit 34 while the counter value is less than MAX. Software should ignore this case.", 38 "PublicDescription": "This event counts the number of reference cycles when the core is not in a halt state. The core enters the halt state when it is running the HLT instruction or the MWAIT instruction. This event is not affected by core frequency changes (for example, P states, TM2 transitions) but has the same incrementing frequency as the time stamp counter. This event can approximate elapsed time while the core was not in a halt state. This event has a constant ratio with the CPU_CLK_UNHALTED.REF_XCLK event. It is counted on a dedicated fixed counter, leaving the four (eight when Hyperthreading is disabled) programmable counters available for other events. \nNote: On all current platforms this event stops counting during 'throttling (TM)' states duty off periods the processor is 'halted'. This event is clocked by base clock (100 Mhz) on Sandy Bridge. The counter update is done at a lower clock rate then the core clock the overflow status bit for this counter may appear 'sticky'. After the counter has overflowed and software clears the overflow status bit and resets the counter to less than MAX. The reset value to the counter is not clocked immediately so the overflow status bit will flip 'high (1)' and generate another PMI (if enabled) after which the reset value gets clocked into the counter. Therefore, software will get the interrupt, read the overflow status bit '1 for bit 34 while the counter value is less than MAX. Software should ignore this case.",
29 "SampleAfterValue": "2000003", 39 "SampleAfterValue": "2000003",
30 "CounterHTOff": "Fixed counter 3" 40 "CounterHTOff": "Fixed counter 2"
31 }, 41 },
32 { 42 {
33 "EventCode": "0x03", 43 "EventCode": "0x03",
@@ -60,22 +70,33 @@
60 }, 70 },
61 { 71 {
62 "EventCode": "0x0D", 72 "EventCode": "0x0D",
63 "UMask": "0x8", 73 "UMask": "0x3",
64 "BriefDescription": "Cycles when Resource Allocation Table (RAT) external stall is sent to Instruction Decode Queue (IDQ) for the thread", 74 "BriefDescription": "Core cycles the allocator was stalled due to recovery from earlier clear event for this thread (e.g. misprediction or memory nuke)",
65 "Counter": "0,1,2,3", 75 "Counter": "0,1,2,3",
66 "EventName": "INT_MISC.RAT_STALL_CYCLES", 76 "EventName": "INT_MISC.RECOVERY_CYCLES",
67 "PublicDescription": "This event counts the number of cycles during which Resource Allocation Table (RAT) external stall is sent to Instruction Decode Queue (IDQ) for the current thread. This also includes the cycles during which the Allocator is serving another thread.", 77 "CounterMask": "1",
78 "PublicDescription": "Cycles checkpoints in Resource Allocation Table (RAT) are recovering from JEClear or machine clear.",
68 "SampleAfterValue": "2000003", 79 "SampleAfterValue": "2000003",
69 "CounterHTOff": "0,1,2,3,4,5,6,7" 80 "CounterHTOff": "0,1,2,3,4,5,6,7"
70 }, 81 },
71 { 82 {
72 "EventCode": "0x0D", 83 "EventCode": "0x0D",
73 "UMask": "0x3", 84 "UMask": "0x3",
74 "BriefDescription": "Number of cycles waiting for the checkpoints in Resource Allocation Table (RAT) to be recovered after Nuke due to all other cases except JEClear (e.g. whenever a ucode assist is needed like SSE exception, memory disambiguation, etc...)", 85 "BriefDescription": "Core cycles the allocator was stalled due to recovery from earlier clear event for any thread running on the physical core (e.g. misprediction or memory nuke).",
75 "Counter": "0,1,2,3", 86 "Counter": "0,1,2,3",
76 "EventName": "INT_MISC.RECOVERY_CYCLES", 87 "EventName": "INT_MISC.RECOVERY_CYCLES_ANY",
88 "AnyThread": "1",
77 "CounterMask": "1", 89 "CounterMask": "1",
78 "PublicDescription": "Cycles checkpoints in Resource Allocation Table (RAT) are recovering from JEClear or machine clear.", 90 "SampleAfterValue": "2000003",
91 "CounterHTOff": "0,1,2,3,4,5,6,7"
92 },
93 {
94 "EventCode": "0x0D",
95 "UMask": "0x8",
96 "BriefDescription": "Cycles when Resource Allocation Table (RAT) external stall is sent to Instruction Decode Queue (IDQ) for the thread",
97 "Counter": "0,1,2,3",
98 "EventName": "INT_MISC.RAT_STALL_CYCLES",
99 "PublicDescription": "This event counts the number of cycles during which Resource Allocation Table (RAT) external stall is sent to Instruction Decode Queue (IDQ) for the current thread. This also includes the cycles during which the Allocator is serving another thread.",
79 "SampleAfterValue": "2000003", 100 "SampleAfterValue": "2000003",
80 "CounterHTOff": "0,1,2,3,4,5,6,7" 101 "CounterHTOff": "0,1,2,3,4,5,6,7"
81 }, 102 },
@@ -90,6 +111,18 @@
90 "CounterHTOff": "0,1,2,3,4,5,6,7" 111 "CounterHTOff": "0,1,2,3,4,5,6,7"
91 }, 112 },
92 { 113 {
114 "Invert": "1",
115 "EventCode": "0x0E",
116 "UMask": "0x1",
117 "BriefDescription": "Cycles when Resource Allocation Table (RAT) does not issue Uops to Reservation Station (RS) for the thread",
118 "Counter": "0,1,2,3",
119 "EventName": "UOPS_ISSUED.STALL_CYCLES",
120 "CounterMask": "1",
121 "PublicDescription": "This event counts cycles during which the Resource Allocation Table (RAT) does not issue any Uops to the reservation station (RS) for the current thread.",
122 "SampleAfterValue": "2000003",
123 "CounterHTOff": "0,1,2,3"
124 },
125 {
93 "EventCode": "0x0E", 126 "EventCode": "0x0E",
94 "UMask": "0x10", 127 "UMask": "0x10",
95 "BriefDescription": "Number of flags-merge uops being allocated. Such uops considered perf sensitive; added by GSR u-arch.", 128 "BriefDescription": "Number of flags-merge uops being allocated. Such uops considered perf sensitive; added by GSR u-arch.",
@@ -118,18 +151,6 @@
118 "CounterHTOff": "0,1,2,3,4,5,6,7" 151 "CounterHTOff": "0,1,2,3,4,5,6,7"
119 }, 152 },
120 { 153 {
121 "Invert": "1",
122 "EventCode": "0x0E",
123 "UMask": "0x1",
124 "BriefDescription": "Cycles when Resource Allocation Table (RAT) does not issue Uops to Reservation Station (RS) for the thread",
125 "Counter": "0,1,2,3",
126 "EventName": "UOPS_ISSUED.STALL_CYCLES",
127 "CounterMask": "1",
128 "PublicDescription": "This event counts cycles during which the Resource Allocation Table (RAT) does not issue any Uops to the reservation station (RS) for the current thread.",
129 "SampleAfterValue": "2000003",
130 "CounterHTOff": "0,1,2,3"
131 },
132 {
133 "EventCode": "0x14", 154 "EventCode": "0x14",
134 "UMask": "0x1", 155 "UMask": "0x1",
135 "BriefDescription": "Cycles when divider is busy executing divide operations", 156 "BriefDescription": "Cycles when divider is busy executing divide operations",
@@ -141,6 +162,26 @@
141 }, 162 },
142 { 163 {
143 "EventCode": "0x3C", 164 "EventCode": "0x3C",
165 "UMask": "0x0",
166 "BriefDescription": "Thread cycles when thread is not in halt state",
167 "Counter": "0,1,2,3",
168 "EventName": "CPU_CLK_UNHALTED.THREAD_P",
169 "PublicDescription": "This is an architectural event that counts the number of thread cycles while the thread is not in a halt state. The thread enters the halt state when it is running the HLT instruction. The core frequency may change from time to time due to power or thermal throttling. For this reason, this event may have a changing ratio with regards to wall clock time.",
170 "SampleAfterValue": "2000003",
171 "CounterHTOff": "0,1,2,3,4,5,6,7"
172 },
173 {
174 "EventCode": "0x3C",
175 "UMask": "0x0",
176 "BriefDescription": "Core cycles when at least one thread on the physical core is not in halt state.",
177 "Counter": "0,1,2,3",
178 "EventName": "CPU_CLK_UNHALTED.THREAD_P_ANY",
179 "AnyThread": "1",
180 "SampleAfterValue": "2000003",
181 "CounterHTOff": "0,1,2,3,4,5,6,7"
182 },
183 {
184 "EventCode": "0x3C",
144 "UMask": "0x1", 185 "UMask": "0x1",
145 "BriefDescription": "Reference cycles when the thread is unhalted (counts at 100 MHz rate)", 186 "BriefDescription": "Reference cycles when the thread is unhalted (counts at 100 MHz rate)",
146 "Counter": "0,1,2,3", 187 "Counter": "0,1,2,3",
@@ -150,6 +191,36 @@
150 "CounterHTOff": "0,1,2,3,4,5,6,7" 191 "CounterHTOff": "0,1,2,3,4,5,6,7"
151 }, 192 },
152 { 193 {
194 "EventCode": "0x3C",
195 "UMask": "0x1",
196 "BriefDescription": "Reference cycles when the at least one thread on the physical core is unhalted (counts at 100 MHz rate).",
197 "Counter": "0,1,2,3",
198 "EventName": "CPU_CLK_THREAD_UNHALTED.REF_XCLK_ANY",
199 "AnyThread": "1",
200 "SampleAfterValue": "2000003",
201 "CounterHTOff": "0,1,2,3,4,5,6,7"
202 },
203 {
204 "EventCode": "0x3C",
205 "UMask": "0x1",
206 "BriefDescription": "Reference cycles when the thread is unhalted (counts at 100 MHz rate)",
207 "Counter": "0,1,2,3",
208 "EventName": "CPU_CLK_UNHALTED.REF_XCLK",
209 "PublicDescription": "Reference cycles when the thread is unhalted (counts at 100 MHz rate).",
210 "SampleAfterValue": "2000003",
211 "CounterHTOff": "0,1,2,3,4,5,6,7"
212 },
213 {
214 "EventCode": "0x3C",
215 "UMask": "0x1",
216 "BriefDescription": "Reference cycles when the at least one thread on the physical core is unhalted (counts at 100 MHz rate).",
217 "Counter": "0,1,2,3",
218 "EventName": "CPU_CLK_UNHALTED.REF_XCLK_ANY",
219 "AnyThread": "1",
220 "SampleAfterValue": "2000003",
221 "CounterHTOff": "0,1,2,3,4,5,6,7"
222 },
223 {
153 "EventCode": "0x3c", 224 "EventCode": "0x3c",
154 "UMask": "0x2", 225 "UMask": "0x2",
155 "BriefDescription": "Count XClk pulses when this thread is unhalted and the other thread is halted.", 226 "BriefDescription": "Count XClk pulses when this thread is unhalted and the other thread is halted.",
@@ -159,6 +230,15 @@
159 "CounterHTOff": "0,1,2,3" 230 "CounterHTOff": "0,1,2,3"
160 }, 231 },
161 { 232 {
233 "EventCode": "0x3C",
234 "UMask": "0x2",
235 "BriefDescription": "Count XClk pulses when this thread is unhalted and the other thread is halted.",
236 "Counter": "0,1,2,3",
237 "EventName": "CPU_CLK_UNHALTED.ONE_THREAD_ACTIVE",
238 "SampleAfterValue": "2000003",
239 "CounterHTOff": "0,1,2,3,4,5,6,7"
240 },
241 {
162 "EventCode": "0x4c", 242 "EventCode": "0x4c",
163 "UMask": "0x1", 243 "UMask": "0x1",
164 "BriefDescription": "Not software-prefetch load dispatches that hit FB allocated for software prefetch", 244 "BriefDescription": "Not software-prefetch load dispatches that hit FB allocated for software prefetch",
@@ -225,6 +305,18 @@
225 "CounterHTOff": "0,1,2,3,4,5,6,7" 305 "CounterHTOff": "0,1,2,3,4,5,6,7"
226 }, 306 },
227 { 307 {
308 "EdgeDetect": "1",
309 "Invert": "1",
310 "EventCode": "0x5E",
311 "UMask": "0x1",
312 "BriefDescription": "Counts end of periods where the Reservation Station (RS) was empty. Could be useful to precisely locate Frontend Latency Bound issues.",
313 "Counter": "0,1,2,3",
314 "EventName": "RS_EVENTS.EMPTY_END",
315 "CounterMask": "1",
316 "SampleAfterValue": "200003",
317 "CounterHTOff": "0,1,2,3,4,5,6,7"
318 },
319 {
228 "EventCode": "0x87", 320 "EventCode": "0x87",
229 "UMask": "0x1", 321 "UMask": "0x1",
230 "BriefDescription": "Stalls caused by changing prefix length of the instruction.", 322 "BriefDescription": "Stalls caused by changing prefix length of the instruction.",
@@ -406,6 +498,15 @@
406 }, 498 },
407 { 499 {
408 "EventCode": "0x89", 500 "EventCode": "0x89",
501 "UMask": "0xa0",
502 "BriefDescription": "Taken speculative and retired mispredicted indirect calls.",
503 "Counter": "0,1,2,3",
504 "EventName": "BR_MISP_EXEC.TAKEN_INDIRECT_NEAR_CALL",
505 "SampleAfterValue": "200003",
506 "CounterHTOff": "0,1,2,3,4,5,6,7"
507 },
508 {
509 "EventCode": "0x89",
409 "UMask": "0xc1", 510 "UMask": "0xc1",
410 "BriefDescription": "Speculative and retired mispredicted macro conditional branches", 511 "BriefDescription": "Speculative and retired mispredicted macro conditional branches",
411 "Counter": "0,1,2,3", 512 "Counter": "0,1,2,3",
@@ -435,6 +536,16 @@
435 "CounterHTOff": "0,1,2,3,4,5,6,7" 536 "CounterHTOff": "0,1,2,3,4,5,6,7"
436 }, 537 },
437 { 538 {
539 "EventCode": "0xA0",
540 "UMask": "0x3",
541 "BriefDescription": "Micro-op dispatches cancelled due to insufficient SIMD physical register file read ports",
542 "Counter": "0,1,2,3",
543 "EventName": "UOP_DISPATCHES_CANCELLED.SIMD_PRF",
544 "PublicDescription": "This event counts the number of micro-operations cancelled after they were dispatched from the scheduler to the execution units when the total number of physical register read ports across all dispatch ports exceeds the read bandwidth of the physical register file. The SIMD_PRF subevent applies to the following instructions: VDPPS, DPPS, VPCMPESTRI, PCMPESTRI, VPCMPESTRM, PCMPESTRM, VFMADD*, VFMADDSUB*, VFMSUB*, VMSUBADD*, VFNMADD*, VFNMSUB*. See the Broadwell Optimization Guide for more information.",
545 "SampleAfterValue": "2000003",
546 "CounterHTOff": "0,1,2,3"
547 },
548 {
438 "EventCode": "0xA1", 549 "EventCode": "0xA1",
439 "UMask": "0x1", 550 "UMask": "0x1",
440 "BriefDescription": "Cycles per thread when uops are executed in port 0", 551 "BriefDescription": "Cycles per thread when uops are executed in port 0",
@@ -446,6 +557,26 @@
446 }, 557 },
447 { 558 {
448 "EventCode": "0xA1", 559 "EventCode": "0xA1",
560 "UMask": "0x1",
561 "BriefDescription": "Cycles per core when uops are exectuted in port 0.",
562 "Counter": "0,1,2,3",
563 "EventName": "UOPS_EXECUTED_PORT.PORT_0_CORE",
564 "AnyThread": "1",
565 "SampleAfterValue": "2000003",
566 "CounterHTOff": "0,1,2,3,4,5,6,7"
567 },
568 {
569 "EventCode": "0xA1",
570 "UMask": "0x1",
571 "BriefDescription": "Cycles per thread when uops are executed in port 0",
572 "Counter": "0,1,2,3",
573 "EventName": "UOPS_EXECUTED_PORT.PORT_0",
574 "PublicDescription": "This event counts, on the per-thread basis, cycles during which uops are dispatched from the Reservation Station (RS) to port 0.",
575 "SampleAfterValue": "2000003",
576 "CounterHTOff": "0,1,2,3,4,5,6,7"
577 },
578 {
579 "EventCode": "0xA1",
449 "UMask": "0x2", 580 "UMask": "0x2",
450 "BriefDescription": "Cycles per thread when uops are executed in port 1", 581 "BriefDescription": "Cycles per thread when uops are executed in port 1",
451 "Counter": "0,1,2,3", 582 "Counter": "0,1,2,3",
@@ -456,6 +587,26 @@
456 }, 587 },
457 { 588 {
458 "EventCode": "0xA1", 589 "EventCode": "0xA1",
590 "UMask": "0x2",
591 "BriefDescription": "Cycles per core when uops are exectuted in port 1.",
592 "Counter": "0,1,2,3",
593 "EventName": "UOPS_EXECUTED_PORT.PORT_1_CORE",
594 "AnyThread": "1",
595 "SampleAfterValue": "2000003",
596 "CounterHTOff": "0,1,2,3,4,5,6,7"
597 },
598 {
599 "EventCode": "0xA1",
600 "UMask": "0x2",
601 "BriefDescription": "Cycles per thread when uops are executed in port 1",
602 "Counter": "0,1,2,3",
603 "EventName": "UOPS_EXECUTED_PORT.PORT_1",
604 "PublicDescription": "This event counts, on the per-thread basis, cycles during which uops are dispatched from the Reservation Station (RS) to port 1.",
605 "SampleAfterValue": "2000003",
606 "CounterHTOff": "0,1,2,3,4,5,6,7"
607 },
608 {
609 "EventCode": "0xA1",
459 "UMask": "0x4", 610 "UMask": "0x4",
460 "BriefDescription": "Cycles per thread when uops are executed in port 2", 611 "BriefDescription": "Cycles per thread when uops are executed in port 2",
461 "Counter": "0,1,2,3", 612 "Counter": "0,1,2,3",
@@ -466,6 +617,26 @@
466 }, 617 },
467 { 618 {
468 "EventCode": "0xA1", 619 "EventCode": "0xA1",
620 "UMask": "0x4",
621 "BriefDescription": "Cycles per core when uops are dispatched to port 2.",
622 "Counter": "0,1,2,3",
623 "EventName": "UOPS_EXECUTED_PORT.PORT_2_CORE",
624 "AnyThread": "1",
625 "SampleAfterValue": "2000003",
626 "CounterHTOff": "0,1,2,3,4,5,6,7"
627 },
628 {
629 "EventCode": "0xA1",
630 "UMask": "0x4",
631 "BriefDescription": "Cycles per thread when uops are executed in port 2",
632 "Counter": "0,1,2,3",
633 "EventName": "UOPS_EXECUTED_PORT.PORT_2",
634 "PublicDescription": "This event counts, on the per-thread basis, cycles during which uops are dispatched from the Reservation Station (RS) to port 2.",
635 "SampleAfterValue": "2000003",
636 "CounterHTOff": "0,1,2,3,4,5,6,7"
637 },
638 {
639 "EventCode": "0xA1",
469 "UMask": "0x8", 640 "UMask": "0x8",
470 "BriefDescription": "Cycles per thread when uops are executed in port 3", 641 "BriefDescription": "Cycles per thread when uops are executed in port 3",
471 "Counter": "0,1,2,3", 642 "Counter": "0,1,2,3",
@@ -476,6 +647,26 @@
476 }, 647 },
477 { 648 {
478 "EventCode": "0xA1", 649 "EventCode": "0xA1",
650 "UMask": "0x8",
651 "BriefDescription": "Cycles per core when uops are dispatched to port 3.",
652 "Counter": "0,1,2,3",
653 "EventName": "UOPS_EXECUTED_PORT.PORT_3_CORE",
654 "AnyThread": "1",
655 "SampleAfterValue": "2000003",
656 "CounterHTOff": "0,1,2,3,4,5,6,7"
657 },
658 {
659 "EventCode": "0xA1",
660 "UMask": "0x8",
661 "BriefDescription": "Cycles per thread when uops are executed in port 3",
662 "Counter": "0,1,2,3",
663 "EventName": "UOPS_EXECUTED_PORT.PORT_3",
664 "PublicDescription": "This event counts, on the per-thread basis, cycles during which uops are dispatched from the Reservation Station (RS) to port 3.",
665 "SampleAfterValue": "2000003",
666 "CounterHTOff": "0,1,2,3,4,5,6,7"
667 },
668 {
669 "EventCode": "0xA1",
479 "UMask": "0x10", 670 "UMask": "0x10",
480 "BriefDescription": "Cycles per thread when uops are executed in port 4", 671 "BriefDescription": "Cycles per thread when uops are executed in port 4",
481 "Counter": "0,1,2,3", 672 "Counter": "0,1,2,3",
@@ -486,6 +677,26 @@
486 }, 677 },
487 { 678 {
488 "EventCode": "0xA1", 679 "EventCode": "0xA1",
680 "UMask": "0x10",
681 "BriefDescription": "Cycles per core when uops are exectuted in port 4.",
682 "Counter": "0,1,2,3",
683 "EventName": "UOPS_EXECUTED_PORT.PORT_4_CORE",
684 "AnyThread": "1",
685 "SampleAfterValue": "2000003",
686 "CounterHTOff": "0,1,2,3,4,5,6,7"
687 },
688 {
689 "EventCode": "0xA1",
690 "UMask": "0x10",
691 "BriefDescription": "Cycles per thread when uops are executed in port 4",
692 "Counter": "0,1,2,3",
693 "EventName": "UOPS_EXECUTED_PORT.PORT_4",
694 "PublicDescription": "This event counts, on the per-thread basis, cycles during which uops are dispatched from the Reservation Station (RS) to port 4.",
695 "SampleAfterValue": "2000003",
696 "CounterHTOff": "0,1,2,3,4,5,6,7"
697 },
698 {
699 "EventCode": "0xA1",
489 "UMask": "0x20", 700 "UMask": "0x20",
490 "BriefDescription": "Cycles per thread when uops are executed in port 5", 701 "BriefDescription": "Cycles per thread when uops are executed in port 5",
491 "Counter": "0,1,2,3", 702 "Counter": "0,1,2,3",
@@ -496,6 +707,26 @@
496 }, 707 },
497 { 708 {
498 "EventCode": "0xA1", 709 "EventCode": "0xA1",
710 "UMask": "0x20",
711 "BriefDescription": "Cycles per core when uops are exectuted in port 5.",
712 "Counter": "0,1,2,3",
713 "EventName": "UOPS_EXECUTED_PORT.PORT_5_CORE",
714 "AnyThread": "1",
715 "SampleAfterValue": "2000003",
716 "CounterHTOff": "0,1,2,3,4,5,6,7"
717 },
718 {
719 "EventCode": "0xA1",
720 "UMask": "0x20",
721 "BriefDescription": "Cycles per thread when uops are executed in port 5",
722 "Counter": "0,1,2,3",
723 "EventName": "UOPS_EXECUTED_PORT.PORT_5",
724 "PublicDescription": "This event counts, on the per-thread basis, cycles during which uops are dispatched from the Reservation Station (RS) to port 5.",
725 "SampleAfterValue": "2000003",
726 "CounterHTOff": "0,1,2,3,4,5,6,7"
727 },
728 {
729 "EventCode": "0xA1",
499 "UMask": "0x40", 730 "UMask": "0x40",
500 "BriefDescription": "Cycles per thread when uops are executed in port 6", 731 "BriefDescription": "Cycles per thread when uops are executed in port 6",
501 "Counter": "0,1,2,3", 732 "Counter": "0,1,2,3",
@@ -506,6 +737,26 @@
506 }, 737 },
507 { 738 {
508 "EventCode": "0xA1", 739 "EventCode": "0xA1",
740 "UMask": "0x40",
741 "BriefDescription": "Cycles per core when uops are exectuted in port 6.",
742 "Counter": "0,1,2,3",
743 "EventName": "UOPS_EXECUTED_PORT.PORT_6_CORE",
744 "AnyThread": "1",
745 "SampleAfterValue": "2000003",
746 "CounterHTOff": "0,1,2,3,4,5,6,7"
747 },
748 {
749 "EventCode": "0xA1",
750 "UMask": "0x40",
751 "BriefDescription": "Cycles per thread when uops are executed in port 6",
752 "Counter": "0,1,2,3",
753 "EventName": "UOPS_EXECUTED_PORT.PORT_6",
754 "PublicDescription": "This event counts, on the per-thread basis, cycles during which uops are dispatched from the Reservation Station (RS) to port 6.",
755 "SampleAfterValue": "2000003",
756 "CounterHTOff": "0,1,2,3,4,5,6,7"
757 },
758 {
759 "EventCode": "0xA1",
509 "UMask": "0x80", 760 "UMask": "0x80",
510 "BriefDescription": "Cycles per thread when uops are executed in port 7", 761 "BriefDescription": "Cycles per thread when uops are executed in port 7",
511 "Counter": "0,1,2,3", 762 "Counter": "0,1,2,3",
@@ -515,6 +766,26 @@
515 "CounterHTOff": "0,1,2,3,4,5,6,7" 766 "CounterHTOff": "0,1,2,3,4,5,6,7"
516 }, 767 },
517 { 768 {
769 "EventCode": "0xA1",
770 "UMask": "0x80",
771 "BriefDescription": "Cycles per core when uops are dispatched to port 7.",
772 "Counter": "0,1,2,3",
773 "EventName": "UOPS_EXECUTED_PORT.PORT_7_CORE",
774 "AnyThread": "1",
775 "SampleAfterValue": "2000003",
776 "CounterHTOff": "0,1,2,3,4,5,6,7"
777 },
778 {
779 "EventCode": "0xA1",
780 "UMask": "0x80",
781 "BriefDescription": "Cycles per thread when uops are executed in port 7",
782 "Counter": "0,1,2,3",
783 "EventName": "UOPS_EXECUTED_PORT.PORT_7",
784 "PublicDescription": "This event counts, on the per-thread basis, cycles during which uops are dispatched from the Reservation Station (RS) to port 7.",
785 "SampleAfterValue": "2000003",
786 "CounterHTOff": "0,1,2,3,4,5,6,7"
787 },
788 {
518 "EventCode": "0xA2", 789 "EventCode": "0xA2",
519 "UMask": "0x1", 790 "UMask": "0x1",
520 "BriefDescription": "Resource-related stall cycles", 791 "BriefDescription": "Resource-related stall cycles",
@@ -567,14 +838,13 @@
567 }, 838 },
568 { 839 {
569 "EventCode": "0xA3", 840 "EventCode": "0xA3",
570 "UMask": "0x8", 841 "UMask": "0x1",
571 "BriefDescription": "Cycles while L1 cache miss demand load is outstanding.", 842 "BriefDescription": "Cycles while L2 cache miss demand load is outstanding.",
572 "Counter": "2", 843 "Counter": "0,1,2,3",
573 "EventName": "CYCLE_ACTIVITY.CYCLES_L1D_PENDING", 844 "EventName": "CYCLE_ACTIVITY.CYCLES_L2_MISS",
574 "CounterMask": "8", 845 "CounterMask": "1",
575 "PublicDescription": "Counts number of cycles the CPU has at least one pending demand load request missing the L1 data cache.",
576 "SampleAfterValue": "2000003", 846 "SampleAfterValue": "2000003",
577 "CounterHTOff": "2" 847 "CounterHTOff": "0,1,2,3,4,5,6,7"
578 }, 848 },
579 { 849 {
580 "EventCode": "0xA3", 850 "EventCode": "0xA3",
@@ -589,8 +859,18 @@
589 }, 859 },
590 { 860 {
591 "EventCode": "0xA3", 861 "EventCode": "0xA3",
862 "UMask": "0x2",
863 "BriefDescription": "Cycles while memory subsystem has an outstanding load.",
864 "Counter": "0,1,2,3",
865 "EventName": "CYCLE_ACTIVITY.CYCLES_MEM_ANY",
866 "CounterMask": "2",
867 "SampleAfterValue": "2000003",
868 "CounterHTOff": "0,1,2,3"
869 },
870 {
871 "EventCode": "0xA3",
592 "UMask": "0x4", 872 "UMask": "0x4",
593 "BriefDescription": "Total execution stalls", 873 "BriefDescription": "This event increments by 1 for every cycle where there was no execute for this thread.",
594 "Counter": "0,1,2,3", 874 "Counter": "0,1,2,3",
595 "EventName": "CYCLE_ACTIVITY.CYCLES_NO_EXECUTE", 875 "EventName": "CYCLE_ACTIVITY.CYCLES_NO_EXECUTE",
596 "CounterMask": "4", 876 "CounterMask": "4",
@@ -600,6 +880,16 @@
600 }, 880 },
601 { 881 {
602 "EventCode": "0xA3", 882 "EventCode": "0xA3",
883 "UMask": "0x4",
884 "BriefDescription": "Total execution stalls.",
885 "Counter": "0,1,2,3",
886 "EventName": "CYCLE_ACTIVITY.STALLS_TOTAL",
887 "CounterMask": "4",
888 "SampleAfterValue": "2000003",
889 "CounterHTOff": "0,1,2,3,4,5,6,7"
890 },
891 {
892 "EventCode": "0xA3",
603 "UMask": "0x5", 893 "UMask": "0x5",
604 "BriefDescription": "Execution stalls while L2 cache miss demand load is outstanding.", 894 "BriefDescription": "Execution stalls while L2 cache miss demand load is outstanding.",
605 "Counter": "0,1,2,3", 895 "Counter": "0,1,2,3",
@@ -611,6 +901,16 @@
611 }, 901 },
612 { 902 {
613 "EventCode": "0xA3", 903 "EventCode": "0xA3",
904 "UMask": "0x5",
905 "BriefDescription": "Execution stalls while L2 cache miss demand load is outstanding.",
906 "Counter": "0,1,2,3",
907 "EventName": "CYCLE_ACTIVITY.STALLS_L2_MISS",
908 "CounterMask": "5",
909 "SampleAfterValue": "2000003",
910 "CounterHTOff": "0,1,2,3,4,5,6,7"
911 },
912 {
913 "EventCode": "0xA3",
614 "UMask": "0x6", 914 "UMask": "0x6",
615 "BriefDescription": "Execution stalls while memory subsystem has an outstanding load.", 915 "BriefDescription": "Execution stalls while memory subsystem has an outstanding load.",
616 "Counter": "0,1,2,3", 916 "Counter": "0,1,2,3",
@@ -622,6 +922,37 @@
622 }, 922 },
623 { 923 {
624 "EventCode": "0xA3", 924 "EventCode": "0xA3",
925 "UMask": "0x6",
926 "BriefDescription": "Execution stalls while memory subsystem has an outstanding load.",
927 "Counter": "0,1,2,3",
928 "EventName": "CYCLE_ACTIVITY.STALLS_MEM_ANY",
929 "CounterMask": "6",
930 "SampleAfterValue": "2000003",
931 "CounterHTOff": "0,1,2,3,4,5,6,7"
932 },
933 {
934 "EventCode": "0xA3",
935 "UMask": "0x8",
936 "BriefDescription": "Cycles while L1 cache miss demand load is outstanding.",
937 "Counter": "2",
938 "EventName": "CYCLE_ACTIVITY.CYCLES_L1D_PENDING",
939 "CounterMask": "8",
940 "PublicDescription": "Counts number of cycles the CPU has at least one pending demand load request missing the L1 data cache.",
941 "SampleAfterValue": "2000003",
942 "CounterHTOff": "2"
943 },
944 {
945 "EventCode": "0xA3",
946 "UMask": "0x8",
947 "BriefDescription": "Cycles while L1 cache miss demand load is outstanding.",
948 "Counter": "2",
949 "EventName": "CYCLE_ACTIVITY.CYCLES_L1D_MISS",
950 "CounterMask": "8",
951 "SampleAfterValue": "2000003",
952 "CounterHTOff": "2"
953 },
954 {
955 "EventCode": "0xA3",
625 "UMask": "0xc", 956 "UMask": "0xc",
626 "BriefDescription": "Execution stalls while L1 cache miss demand load is outstanding.", 957 "BriefDescription": "Execution stalls while L1 cache miss demand load is outstanding.",
627 "Counter": "2", 958 "Counter": "2",
@@ -632,12 +963,41 @@
632 "CounterHTOff": "2" 963 "CounterHTOff": "2"
633 }, 964 },
634 { 965 {
966 "EventCode": "0xA3",
967 "UMask": "0xc",
968 "BriefDescription": "Execution stalls while L1 cache miss demand load is outstanding.",
969 "Counter": "2",
970 "EventName": "CYCLE_ACTIVITY.STALLS_L1D_MISS",
971 "CounterMask": "12",
972 "SampleAfterValue": "2000003",
973 "CounterHTOff": "2"
974 },
975 {
635 "EventCode": "0xA8", 976 "EventCode": "0xA8",
636 "UMask": "0x1", 977 "UMask": "0x1",
637 "BriefDescription": "Number of Uops delivered by the LSD.", 978 "BriefDescription": "Number of Uops delivered by the LSD.",
638 "Counter": "0,1,2,3", 979 "Counter": "0,1,2,3",
639 "EventName": "LSD.UOPS", 980 "EventName": "LSD.UOPS",
640 "PublicDescription": "Number of Uops delivered by the LSD. ", 981 "SampleAfterValue": "2000003",
982 "CounterHTOff": "0,1,2,3,4,5,6,7"
983 },
984 {
985 "EventCode": "0xA8",
986 "UMask": "0x1",
987 "BriefDescription": "Cycles 4 Uops delivered by the LSD, but didn't come from the decoder.",
988 "Counter": "0,1,2,3",
989 "EventName": "LSD.CYCLES_4_UOPS",
990 "CounterMask": "4",
991 "SampleAfterValue": "2000003",
992 "CounterHTOff": "0,1,2,3,4,5,6,7"
993 },
994 {
995 "EventCode": "0xA8",
996 "UMask": "0x1",
997 "BriefDescription": "Cycles Uops delivered by the LSD, but didn't come from the decoder.",
998 "Counter": "0,1,2,3",
999 "EventName": "LSD.CYCLES_ACTIVE",
1000 "CounterMask": "1",
641 "SampleAfterValue": "2000003", 1001 "SampleAfterValue": "2000003",
642 "CounterHTOff": "0,1,2,3,4,5,6,7" 1002 "CounterHTOff": "0,1,2,3,4,5,6,7"
643 }, 1003 },
@@ -652,6 +1012,58 @@
652 "CounterHTOff": "0,1,2,3,4,5,6,7" 1012 "CounterHTOff": "0,1,2,3,4,5,6,7"
653 }, 1013 },
654 { 1014 {
1015 "Invert": "1",
1016 "EventCode": "0xB1",
1017 "UMask": "0x1",
1018 "BriefDescription": "Counts number of cycles no uops were dispatched to be executed on this thread.",
1019 "Counter": "0,1,2,3",
1020 "EventName": "UOPS_EXECUTED.STALL_CYCLES",
1021 "CounterMask": "1",
1022 "PublicDescription": "This event counts cycles during which no uops were dispatched from the Reservation Station (RS) per thread.",
1023 "SampleAfterValue": "2000003",
1024 "CounterHTOff": "0,1,2,3"
1025 },
1026 {
1027 "EventCode": "0xB1",
1028 "UMask": "0x1",
1029 "BriefDescription": "Cycles where at least 1 uop was executed per-thread.",
1030 "Counter": "0,1,2,3",
1031 "EventName": "UOPS_EXECUTED.CYCLES_GE_1_UOP_EXEC",
1032 "CounterMask": "1",
1033 "SampleAfterValue": "2000003",
1034 "CounterHTOff": "0,1,2,3"
1035 },
1036 {
1037 "EventCode": "0xB1",
1038 "UMask": "0x1",
1039 "BriefDescription": "Cycles where at least 2 uops were executed per-thread.",
1040 "Counter": "0,1,2,3",
1041 "EventName": "UOPS_EXECUTED.CYCLES_GE_2_UOPS_EXEC",
1042 "CounterMask": "2",
1043 "SampleAfterValue": "2000003",
1044 "CounterHTOff": "0,1,2,3"
1045 },
1046 {
1047 "EventCode": "0xB1",
1048 "UMask": "0x1",
1049 "BriefDescription": "Cycles where at least 3 uops were executed per-thread.",
1050 "Counter": "0,1,2,3",
1051 "EventName": "UOPS_EXECUTED.CYCLES_GE_3_UOPS_EXEC",
1052 "CounterMask": "3",
1053 "SampleAfterValue": "2000003",
1054 "CounterHTOff": "0,1,2,3"
1055 },
1056 {
1057 "EventCode": "0xB1",
1058 "UMask": "0x1",
1059 "BriefDescription": "Cycles where at least 4 uops were executed per-thread.",
1060 "Counter": "0,1,2,3",
1061 "EventName": "UOPS_EXECUTED.CYCLES_GE_4_UOPS_EXEC",
1062 "CounterMask": "4",
1063 "SampleAfterValue": "2000003",
1064 "CounterHTOff": "0,1,2,3"
1065 },
1066 {
655 "EventCode": "0xB1", 1067 "EventCode": "0xB1",
656 "UMask": "0x2", 1068 "UMask": "0x2",
657 "BriefDescription": "Number of uops executed on the core.", 1069 "BriefDescription": "Number of uops executed on the core.",
@@ -662,35 +1074,63 @@
662 "CounterHTOff": "0,1,2,3,4,5,6,7" 1074 "CounterHTOff": "0,1,2,3,4,5,6,7"
663 }, 1075 },
664 { 1076 {
665 "Invert": "1", 1077 "EventCode": "0xb1",
666 "EventCode": "0xB1", 1078 "UMask": "0x2",
667 "UMask": "0x1", 1079 "BriefDescription": "Cycles at least 1 micro-op is executed from any thread on physical core.",
668 "BriefDescription": "Counts number of cycles no uops were dispatched to be executed on this thread.",
669 "Counter": "0,1,2,3", 1080 "Counter": "0,1,2,3",
670 "EventName": "UOPS_EXECUTED.STALL_CYCLES", 1081 "EventName": "UOPS_EXECUTED.CORE_CYCLES_GE_1",
671 "CounterMask": "1", 1082 "CounterMask": "1",
672 "PublicDescription": "This event counts cycles during which no uops were dispatched from the Reservation Station (RS) per thread.",
673 "SampleAfterValue": "2000003", 1083 "SampleAfterValue": "2000003",
674 "CounterHTOff": "0,1,2,3" 1084 "CounterHTOff": "0,1,2,3,4,5,6,7"
675 }, 1085 },
676 { 1086 {
677 "EventCode": "0xC0", 1087 "EventCode": "0xb1",
678 "UMask": "0x0", 1088 "UMask": "0x2",
679 "BriefDescription": "Number of instructions retired. General Counter - architectural event", 1089 "BriefDescription": "Cycles at least 2 micro-op is executed from any thread on physical core.",
680 "Counter": "0,1,2,3", 1090 "Counter": "0,1,2,3",
681 "EventName": "INST_RETIRED.ANY_P", 1091 "EventName": "UOPS_EXECUTED.CORE_CYCLES_GE_2",
682 "Errata": "BDM61", 1092 "CounterMask": "2",
683 "PublicDescription": "This event counts the number of instructions (EOMs) retired. Counting covers macro-fused instructions individually (that is, increments by two).",
684 "SampleAfterValue": "2000003", 1093 "SampleAfterValue": "2000003",
685 "CounterHTOff": "0,1,2,3,4,5,6,7" 1094 "CounterHTOff": "0,1,2,3,4,5,6,7"
686 }, 1095 },
687 { 1096 {
688 "EventCode": "0xC0", 1097 "EventCode": "0xb1",
689 "UMask": "0x2", 1098 "UMask": "0x2",
690 "BriefDescription": "FP operations retired. X87 FP operations that have no exceptions:", 1099 "BriefDescription": "Cycles at least 3 micro-op is executed from any thread on physical core.",
691 "Counter": "0,1,2,3", 1100 "Counter": "0,1,2,3",
692 "EventName": "INST_RETIRED.X87", 1101 "EventName": "UOPS_EXECUTED.CORE_CYCLES_GE_3",
693 "PublicDescription": "This is a non-precise version (that is, does not use PEBS) of the event that counts FP operations retired. For X87 FP operations that have no exceptions counting also includes flows that have several X87, or flows that use X87 uops in the exception handling.", 1102 "CounterMask": "3",
1103 "SampleAfterValue": "2000003",
1104 "CounterHTOff": "0,1,2,3,4,5,6,7"
1105 },
1106 {
1107 "EventCode": "0xb1",
1108 "UMask": "0x2",
1109 "BriefDescription": "Cycles at least 4 micro-op is executed from any thread on physical core.",
1110 "Counter": "0,1,2,3",
1111 "EventName": "UOPS_EXECUTED.CORE_CYCLES_GE_4",
1112 "CounterMask": "4",
1113 "SampleAfterValue": "2000003",
1114 "CounterHTOff": "0,1,2,3,4,5,6,7"
1115 },
1116 {
1117 "Invert": "1",
1118 "EventCode": "0xb1",
1119 "UMask": "0x2",
1120 "BriefDescription": "Cycles with no micro-ops executed from any thread on physical core.",
1121 "Counter": "0,1,2,3",
1122 "EventName": "UOPS_EXECUTED.CORE_CYCLES_NONE",
1123 "SampleAfterValue": "2000003",
1124 "CounterHTOff": "0,1,2,3,4,5,6,7"
1125 },
1126 {
1127 "EventCode": "0xC0",
1128 "UMask": "0x0",
1129 "BriefDescription": "Number of instructions retired. General Counter - architectural event",
1130 "Counter": "0,1,2,3",
1131 "EventName": "INST_RETIRED.ANY_P",
1132 "Errata": "BDM61",
1133 "PublicDescription": "This event counts the number of instructions (EOMs) retired. Counting covers macro-fused instructions individually (that is, increments by two).",
694 "SampleAfterValue": "2000003", 1134 "SampleAfterValue": "2000003",
695 "CounterHTOff": "0,1,2,3,4,5,6,7" 1135 "CounterHTOff": "0,1,2,3,4,5,6,7"
696 }, 1136 },
@@ -707,6 +1147,16 @@
707 "CounterHTOff": "1" 1147 "CounterHTOff": "1"
708 }, 1148 },
709 { 1149 {
1150 "EventCode": "0xC0",
1151 "UMask": "0x2",
1152 "BriefDescription": "FP operations retired. X87 FP operations that have no exceptions:",
1153 "Counter": "0,1,2,3",
1154 "EventName": "INST_RETIRED.X87",
1155 "PublicDescription": "This event counts FP operations retired. For X87 FP operations that have no exceptions counting also includes flows that have several X87, or flows that use X87 uops in the exception handling.",
1156 "SampleAfterValue": "2000003",
1157 "CounterHTOff": "0,1,2,3,4,5,6,7"
1158 },
1159 {
710 "EventCode": "0xC1", 1160 "EventCode": "0xC1",
711 "UMask": "0x40", 1161 "UMask": "0x40",
712 "BriefDescription": "Number of times any microcode assist is invoked by HW upon uop writeback.", 1162 "BriefDescription": "Number of times any microcode assist is invoked by HW upon uop writeback.",
@@ -718,23 +1168,12 @@
718 { 1168 {
719 "EventCode": "0xC2", 1169 "EventCode": "0xC2",
720 "UMask": "0x1", 1170 "UMask": "0x1",
721 "BriefDescription": "Actually retired uops.", 1171 "BriefDescription": "Actually retired uops. (Precise Event - PEBS)",
722 "Data_LA": "1", 1172 "Data_LA": "1",
723 "PEBS": "1", 1173 "PEBS": "1",
724 "Counter": "0,1,2,3", 1174 "Counter": "0,1,2,3",
725 "EventName": "UOPS_RETIRED.ALL", 1175 "EventName": "UOPS_RETIRED.ALL",
726 "PublicDescription": "This event counts all actually retired uops. Counting increments by two for micro-fused uops, and by one for macro-fused and other uops. Maximal increment value for one cycle is eight.", 1176 "PublicDescription": "This is a precise version (that is, uses PEBS) of the event that counts all actually retired uops. Counting increments by two for micro-fused uops, and by one for macro-fused and other uops. Maximal increment value for one cycle is eight.",
727 "SampleAfterValue": "2000003",
728 "CounterHTOff": "0,1,2,3,4,5,6,7"
729 },
730 {
731 "EventCode": "0xC2",
732 "UMask": "0x2",
733 "BriefDescription": "Retirement slots used.",
734 "PEBS": "1",
735 "Counter": "0,1,2,3",
736 "EventName": "UOPS_RETIRED.RETIRE_SLOTS",
737 "PublicDescription": "This is a non-precise version (that is, does not use PEBS) of the event that counts the number of retirement slots used.",
738 "SampleAfterValue": "2000003", 1177 "SampleAfterValue": "2000003",
739 "CounterHTOff": "0,1,2,3,4,5,6,7" 1178 "CounterHTOff": "0,1,2,3,4,5,6,7"
740 }, 1179 },
@@ -746,7 +1185,7 @@
746 "Counter": "0,1,2,3", 1185 "Counter": "0,1,2,3",
747 "EventName": "UOPS_RETIRED.STALL_CYCLES", 1186 "EventName": "UOPS_RETIRED.STALL_CYCLES",
748 "CounterMask": "1", 1187 "CounterMask": "1",
749 "PublicDescription": "This is a non-precise version (that is, does not use PEBS) of the event that counts cycles without actually retired uops.", 1188 "PublicDescription": "This event counts cycles without actually retired uops.",
750 "SampleAfterValue": "2000003", 1189 "SampleAfterValue": "2000003",
751 "CounterHTOff": "0,1,2,3" 1190 "CounterHTOff": "0,1,2,3"
752 }, 1191 },
@@ -763,6 +1202,17 @@
763 "CounterHTOff": "0,1,2,3" 1202 "CounterHTOff": "0,1,2,3"
764 }, 1203 },
765 { 1204 {
1205 "EventCode": "0xC2",
1206 "UMask": "0x2",
1207 "BriefDescription": "Retirement slots used. (Precise Event - PEBS)",
1208 "PEBS": "1",
1209 "Counter": "0,1,2,3",
1210 "EventName": "UOPS_RETIRED.RETIRE_SLOTS",
1211 "PublicDescription": "This is a precise version (that is, uses PEBS) of the event that counts the number of retirement slots used.",
1212 "SampleAfterValue": "2000003",
1213 "CounterHTOff": "0,1,2,3,4,5,6,7"
1214 },
1215 {
766 "EventCode": "0xC3", 1216 "EventCode": "0xC3",
767 "UMask": "0x1", 1217 "UMask": "0x1",
768 "BriefDescription": "Cycles there was a Nuke. Account for both thread-specific and All Thread Nukes.", 1218 "BriefDescription": "Cycles there was a Nuke. Account for both thread-specific and All Thread Nukes.",
@@ -773,6 +1223,17 @@
773 "CounterHTOff": "0,1,2,3,4,5,6,7" 1223 "CounterHTOff": "0,1,2,3,4,5,6,7"
774 }, 1224 },
775 { 1225 {
1226 "EdgeDetect": "1",
1227 "EventCode": "0xC3",
1228 "UMask": "0x1",
1229 "BriefDescription": "Number of machine clears (nukes) of any type.",
1230 "Counter": "0,1,2,3",
1231 "EventName": "MACHINE_CLEARS.COUNT",
1232 "CounterMask": "1",
1233 "SampleAfterValue": "100003",
1234 "CounterHTOff": "0,1,2,3,4,5,6,7"
1235 },
1236 {
776 "EventCode": "0xC3", 1237 "EventCode": "0xC3",
777 "UMask": "0x4", 1238 "UMask": "0x4",
778 "BriefDescription": "Self-modifying code (SMC) detected.", 1239 "BriefDescription": "Self-modifying code (SMC) detected.",
@@ -794,44 +1255,67 @@
794 }, 1255 },
795 { 1256 {
796 "EventCode": "0xC4", 1257 "EventCode": "0xC4",
1258 "UMask": "0x0",
1259 "BriefDescription": "All (macro) branch instructions retired.",
1260 "Counter": "0,1,2,3",
1261 "EventName": "BR_INST_RETIRED.ALL_BRANCHES",
1262 "PublicDescription": "This event counts all (macro) branch instructions retired.",
1263 "SampleAfterValue": "400009",
1264 "CounterHTOff": "0,1,2,3,4,5,6,7"
1265 },
1266 {
1267 "EventCode": "0xC4",
797 "UMask": "0x1", 1268 "UMask": "0x1",
798 "BriefDescription": "Conditional branch instructions retired.", 1269 "BriefDescription": "Conditional branch instructions retired. (Precise Event - PEBS)",
799 "PEBS": "1", 1270 "PEBS": "1",
800 "Counter": "0,1,2,3", 1271 "Counter": "0,1,2,3",
801 "EventName": "BR_INST_RETIRED.CONDITIONAL", 1272 "EventName": "BR_INST_RETIRED.CONDITIONAL",
802 "PublicDescription": "This is a non-precise version (that is, does not use PEBS) of the event that counts conditional branch instructions retired.", 1273 "PublicDescription": "This is a precise version (that is, uses PEBS) of the event that counts conditional branch instructions retired.",
803 "SampleAfterValue": "400009", 1274 "SampleAfterValue": "400009",
804 "CounterHTOff": "0,1,2,3,4,5,6,7" 1275 "CounterHTOff": "0,1,2,3,4,5,6,7"
805 }, 1276 },
806 { 1277 {
807 "EventCode": "0xC4", 1278 "EventCode": "0xC4",
808 "UMask": "0x2", 1279 "UMask": "0x2",
809 "BriefDescription": "Direct and indirect near call instructions retired.", 1280 "BriefDescription": "Direct and indirect near call instructions retired. (Precise Event - PEBS)",
810 "PEBS": "1", 1281 "PEBS": "1",
811 "Counter": "0,1,2,3", 1282 "Counter": "0,1,2,3",
812 "EventName": "BR_INST_RETIRED.NEAR_CALL", 1283 "EventName": "BR_INST_RETIRED.NEAR_CALL",
813 "PublicDescription": "This is a non-precise version (that is, does not use PEBS) of the event that counts both direct and indirect near call instructions retired.", 1284 "PublicDescription": "This is a precise version (that is, uses PEBS) of the event that counts both direct and indirect near call instructions retired.",
814 "SampleAfterValue": "100007", 1285 "SampleAfterValue": "100007",
815 "CounterHTOff": "0,1,2,3,4,5,6,7" 1286 "CounterHTOff": "0,1,2,3,4,5,6,7"
816 }, 1287 },
817 { 1288 {
818 "EventCode": "0xC4", 1289 "EventCode": "0xC4",
819 "UMask": "0x0", 1290 "UMask": "0x2",
820 "BriefDescription": "All (macro) branch instructions retired.", 1291 "BriefDescription": "Direct and indirect macro near call instructions retired (captured in ring 3). (Precise Event - PEBS)",
1292 "PEBS": "1",
821 "Counter": "0,1,2,3", 1293 "Counter": "0,1,2,3",
822 "EventName": "BR_INST_RETIRED.ALL_BRANCHES", 1294 "EventName": "BR_INST_RETIRED.NEAR_CALL_R3",
823 "PublicDescription": "This event counts all (macro) branch instructions retired.", 1295 "PublicDescription": "This is a precise version (that is, uses PEBS) of the event that counts both direct and indirect macro near call instructions retired (captured in ring 3).",
824 "SampleAfterValue": "400009", 1296 "SampleAfterValue": "100007",
825 "CounterHTOff": "0,1,2,3,4,5,6,7" 1297 "CounterHTOff": "0,1,2,3,4,5,6,7"
826 }, 1298 },
827 { 1299 {
828 "EventCode": "0xC4", 1300 "EventCode": "0xC4",
1301 "UMask": "0x4",
1302 "BriefDescription": "All (macro) branch instructions retired. (Precise Event - PEBS)",
1303 "PEBS": "2",
1304 "Counter": "0,1,2,3",
1305 "EventName": "BR_INST_RETIRED.ALL_BRANCHES_PEBS",
1306 "Errata": "BDW98",
1307 "PublicDescription": "This is a precise version of BR_INST_RETIRED.ALL_BRANCHES that counts all (macro) branch instructions retired.",
1308 "SampleAfterValue": "400009",
1309 "CounterHTOff": "0,1,2,3"
1310 },
1311 {
1312 "EventCode": "0xC4",
829 "UMask": "0x8", 1313 "UMask": "0x8",
830 "BriefDescription": "Return instructions retired.", 1314 "BriefDescription": "Return instructions retired. (Precise Event - PEBS)",
831 "PEBS": "1", 1315 "PEBS": "1",
832 "Counter": "0,1,2,3", 1316 "Counter": "0,1,2,3",
833 "EventName": "BR_INST_RETIRED.NEAR_RETURN", 1317 "EventName": "BR_INST_RETIRED.NEAR_RETURN",
834 "PublicDescription": "This is a non-precise version (that is, does not use PEBS) of the event that counts return instructions retired.", 1318 "PublicDescription": "This is a precise version (that is, uses PEBS) of the event that counts return instructions retired.",
835 "SampleAfterValue": "100007", 1319 "SampleAfterValue": "100007",
836 "CounterHTOff": "0,1,2,3,4,5,6,7" 1320 "CounterHTOff": "0,1,2,3,4,5,6,7"
837 }, 1321 },
@@ -841,18 +1325,18 @@
841 "BriefDescription": "Not taken branch instructions retired.", 1325 "BriefDescription": "Not taken branch instructions retired.",
842 "Counter": "0,1,2,3", 1326 "Counter": "0,1,2,3",
843 "EventName": "BR_INST_RETIRED.NOT_TAKEN", 1327 "EventName": "BR_INST_RETIRED.NOT_TAKEN",
844 "PublicDescription": "This is a non-precise version (that is, does not use PEBS) of the event that counts not taken branch instructions retired.", 1328 "PublicDescription": "This event counts not taken branch instructions retired.",
845 "SampleAfterValue": "400009", 1329 "SampleAfterValue": "400009",
846 "CounterHTOff": "0,1,2,3,4,5,6,7" 1330 "CounterHTOff": "0,1,2,3,4,5,6,7"
847 }, 1331 },
848 { 1332 {
849 "EventCode": "0xC4", 1333 "EventCode": "0xC4",
850 "UMask": "0x20", 1334 "UMask": "0x20",
851 "BriefDescription": "Taken branch instructions retired.", 1335 "BriefDescription": "Taken branch instructions retired. (Precise Event - PEBS)",
852 "PEBS": "1", 1336 "PEBS": "1",
853 "Counter": "0,1,2,3", 1337 "Counter": "0,1,2,3",
854 "EventName": "BR_INST_RETIRED.NEAR_TAKEN", 1338 "EventName": "BR_INST_RETIRED.NEAR_TAKEN",
855 "PublicDescription": "This is a non-precise version (that is, does not use PEBS) of the event that counts taken branch instructions retired.", 1339 "PublicDescription": "This is a precise version (that is, uses PEBS) of the event that counts taken branch instructions retired.",
856 "SampleAfterValue": "400009", 1340 "SampleAfterValue": "400009",
857 "CounterHTOff": "0,1,2,3,4,5,6,7" 1341 "CounterHTOff": "0,1,2,3,4,5,6,7"
858 }, 1342 },
@@ -863,34 +1347,11 @@
863 "Counter": "0,1,2,3", 1347 "Counter": "0,1,2,3",
864 "EventName": "BR_INST_RETIRED.FAR_BRANCH", 1348 "EventName": "BR_INST_RETIRED.FAR_BRANCH",
865 "Errata": "BDW98", 1349 "Errata": "BDW98",
866 "PublicDescription": "This is a non-precise version (that is, does not use PEBS) of the event that counts far branch instructions retired.", 1350 "PublicDescription": "This event counts far branch instructions retired.",
867 "SampleAfterValue": "100007", 1351 "SampleAfterValue": "100007",
868 "CounterHTOff": "0,1,2,3,4,5,6,7" 1352 "CounterHTOff": "0,1,2,3,4,5,6,7"
869 }, 1353 },
870 { 1354 {
871 "EventCode": "0xC4",
872 "UMask": "0x4",
873 "BriefDescription": "All (macro) branch instructions retired. (Precise Event - PEBS)",
874 "PEBS": "2",
875 "Counter": "0,1,2,3",
876 "EventName": "BR_INST_RETIRED.ALL_BRANCHES_PEBS",
877 "Errata": "BDW98",
878 "PublicDescription": "This is a precise version of BR_INST_RETIRED.ALL_BRANCHES that counts all (macro) branch instructions retired.",
879 "SampleAfterValue": "400009",
880 "CounterHTOff": "0,1,2,3"
881 },
882 {
883 "EventCode": "0xC5",
884 "UMask": "0x1",
885 "BriefDescription": "Mispredicted conditional branch instructions retired.",
886 "PEBS": "1",
887 "Counter": "0,1,2,3",
888 "EventName": "BR_MISP_RETIRED.CONDITIONAL",
889 "PublicDescription": "This is a non-precise version (that is, does not use PEBS) of the event that counts mispredicted conditional branch instructions retired.",
890 "SampleAfterValue": "400009",
891 "CounterHTOff": "0,1,2,3,4,5,6,7"
892 },
893 {
894 "EventCode": "0xC5", 1355 "EventCode": "0xC5",
895 "UMask": "0x0", 1356 "UMask": "0x0",
896 "BriefDescription": "All mispredicted macro branch instructions retired.", 1357 "BriefDescription": "All mispredicted macro branch instructions retired.",
@@ -902,13 +1363,13 @@
902 }, 1363 },
903 { 1364 {
904 "EventCode": "0xC5", 1365 "EventCode": "0xC5",
905 "UMask": "0x8", 1366 "UMask": "0x1",
906 "BriefDescription": "This event counts the number of mispredicted ret instructions retired. Non PEBS", 1367 "BriefDescription": "Mispredicted conditional branch instructions retired. (Precise Event - PEBS)",
907 "PEBS": "1", 1368 "PEBS": "1",
908 "Counter": "0,1,2,3", 1369 "Counter": "0,1,2,3",
909 "EventName": "BR_MISP_RETIRED.RET", 1370 "EventName": "BR_MISP_RETIRED.CONDITIONAL",
910 "PublicDescription": "This is a non-precise version (that is, does not use PEBS) of the event that counts mispredicted return instructions retired.", 1371 "PublicDescription": "This is a precise version (that is, uses PEBS) of the event that counts mispredicted conditional branch instructions retired.",
911 "SampleAfterValue": "100007", 1372 "SampleAfterValue": "400009",
912 "CounterHTOff": "0,1,2,3,4,5,6,7" 1373 "CounterHTOff": "0,1,2,3,4,5,6,7"
913 }, 1374 },
914 { 1375 {
@@ -923,164 +1384,36 @@
923 "CounterHTOff": "0,1,2,3" 1384 "CounterHTOff": "0,1,2,3"
924 }, 1385 },
925 { 1386 {
926 "EventCode": "0xCC", 1387 "EventCode": "0xC5",
927 "UMask": "0x20",
928 "BriefDescription": "Count cases of saving new LBR",
929 "Counter": "0,1,2,3",
930 "EventName": "ROB_MISC_EVENTS.LBR_INSERTS",
931 "PublicDescription": "This event counts cases of saving new LBR records by hardware. This assumes proper enabling of LBRs and takes into account LBR filtering done by the LBR_SELECT register.",
932 "SampleAfterValue": "2000003",
933 "CounterHTOff": "0,1,2,3,4,5,6,7"
934 },
935 {
936 "EventCode": "0x3C",
937 "UMask": "0x0",
938 "BriefDescription": "Thread cycles when thread is not in halt state",
939 "Counter": "0,1,2,3",
940 "EventName": "CPU_CLK_UNHALTED.THREAD_P",
941 "PublicDescription": "This is an architectural event that counts the number of thread cycles while the thread is not in a halt state. The thread enters the halt state when it is running the HLT instruction. The core frequency may change from time to time due to power or thermal throttling. For this reason, this event may have a changing ratio with regards to wall clock time.",
942 "SampleAfterValue": "2000003",
943 "CounterHTOff": "0,1,2,3,4,5,6,7"
944 },
945 {
946 "EventCode": "0x89",
947 "UMask": "0xa0",
948 "BriefDescription": "Taken speculative and retired mispredicted indirect calls.",
949 "Counter": "0,1,2,3",
950 "EventName": "BR_MISP_EXEC.TAKEN_INDIRECT_NEAR_CALL",
951 "SampleAfterValue": "200003",
952 "CounterHTOff": "0,1,2,3,4,5,6,7"
953 },
954 {
955 "EventCode": "0xA1",
956 "UMask": "0x1",
957 "BriefDescription": "Cycles per core when uops are exectuted in port 0.",
958 "Counter": "0,1,2,3",
959 "EventName": "UOPS_EXECUTED_PORT.PORT_0_CORE",
960 "AnyThread": "1",
961 "SampleAfterValue": "2000003",
962 "CounterHTOff": "0,1,2,3,4,5,6,7"
963 },
964 {
965 "EventCode": "0xA1",
966 "UMask": "0x2",
967 "BriefDescription": "Cycles per core when uops are exectuted in port 1.",
968 "Counter": "0,1,2,3",
969 "EventName": "UOPS_EXECUTED_PORT.PORT_1_CORE",
970 "AnyThread": "1",
971 "SampleAfterValue": "2000003",
972 "CounterHTOff": "0,1,2,3,4,5,6,7"
973 },
974 {
975 "EventCode": "0xA1",
976 "UMask": "0x4",
977 "BriefDescription": "Cycles per core when uops are dispatched to port 2.",
978 "Counter": "0,1,2,3",
979 "EventName": "UOPS_EXECUTED_PORT.PORT_2_CORE",
980 "AnyThread": "1",
981 "SampleAfterValue": "2000003",
982 "CounterHTOff": "0,1,2,3,4,5,6,7"
983 },
984 {
985 "EventCode": "0xA1",
986 "UMask": "0x8", 1388 "UMask": "0x8",
987 "BriefDescription": "Cycles per core when uops are dispatched to port 3.", 1389 "BriefDescription": "This event counts the number of mispredicted ret instructions retired.(Precise Event)",
988 "Counter": "0,1,2,3", 1390 "PEBS": "1",
989 "EventName": "UOPS_EXECUTED_PORT.PORT_3_CORE",
990 "AnyThread": "1",
991 "SampleAfterValue": "2000003",
992 "CounterHTOff": "0,1,2,3,4,5,6,7"
993 },
994 {
995 "EventCode": "0xA1",
996 "UMask": "0x10",
997 "BriefDescription": "Cycles per core when uops are exectuted in port 4.",
998 "Counter": "0,1,2,3",
999 "EventName": "UOPS_EXECUTED_PORT.PORT_4_CORE",
1000 "AnyThread": "1",
1001 "SampleAfterValue": "2000003",
1002 "CounterHTOff": "0,1,2,3,4,5,6,7"
1003 },
1004 {
1005 "EventCode": "0xA1",
1006 "UMask": "0x20",
1007 "BriefDescription": "Cycles per core when uops are exectuted in port 5.",
1008 "Counter": "0,1,2,3",
1009 "EventName": "UOPS_EXECUTED_PORT.PORT_5_CORE",
1010 "AnyThread": "1",
1011 "SampleAfterValue": "2000003",
1012 "CounterHTOff": "0,1,2,3,4,5,6,7"
1013 },
1014 {
1015 "EventCode": "0xA1",
1016 "UMask": "0x40",
1017 "BriefDescription": "Cycles per core when uops are exectuted in port 6.",
1018 "Counter": "0,1,2,3",
1019 "EventName": "UOPS_EXECUTED_PORT.PORT_6_CORE",
1020 "AnyThread": "1",
1021 "SampleAfterValue": "2000003",
1022 "CounterHTOff": "0,1,2,3,4,5,6,7"
1023 },
1024 {
1025 "EventCode": "0xA1",
1026 "UMask": "0x80",
1027 "BriefDescription": "Cycles per core when uops are dispatched to port 7.",
1028 "Counter": "0,1,2,3", 1391 "Counter": "0,1,2,3",
1029 "EventName": "UOPS_EXECUTED_PORT.PORT_7_CORE", 1392 "EventName": "BR_MISP_RETIRED.RET",
1030 "AnyThread": "1", 1393 "PublicDescription": "This is a precise version (that is, uses PEBS) of the event that counts mispredicted return instructions retired.",
1031 "SampleAfterValue": "2000003", 1394 "SampleAfterValue": "100007",
1032 "CounterHTOff": "0,1,2,3,4,5,6,7" 1395 "CounterHTOff": "0,1,2,3,4,5,6,7"
1033 }, 1396 },
1034 { 1397 {
1035 "EventCode": "0xC5", 1398 "EventCode": "0xC5",
1036 "UMask": "0x20", 1399 "UMask": "0x20",
1037 "BriefDescription": "number of near branch instructions retired that were mispredicted and taken.", 1400 "BriefDescription": "number of near branch instructions retired that were mispredicted and taken. (Precise Event - PEBS).",
1038 "PEBS": "1", 1401 "PEBS": "1",
1039 "Counter": "0,1,2,3", 1402 "Counter": "0,1,2,3",
1040 "EventName": "BR_MISP_RETIRED.NEAR_TAKEN", 1403 "EventName": "BR_MISP_RETIRED.NEAR_TAKEN",
1041 "PublicDescription": "Number of near branch instructions retired that were mispredicted and taken.", 1404 "PublicDescription": "Number of near branch instructions retired that were mispredicted and taken. (Precise Event - PEBS).",
1042 "SampleAfterValue": "400009", 1405 "SampleAfterValue": "400009",
1043 "CounterHTOff": "0,1,2,3,4,5,6,7" 1406 "CounterHTOff": "0,1,2,3,4,5,6,7"
1044 }, 1407 },
1045 { 1408 {
1046 "EventCode": "0xB1", 1409 "EventCode": "0xCC",
1047 "UMask": "0x1", 1410 "UMask": "0x20",
1048 "BriefDescription": "Cycles where at least 1 uop was executed per-thread.", 1411 "BriefDescription": "Count cases of saving new LBR",
1049 "Counter": "0,1,2,3",
1050 "EventName": "UOPS_EXECUTED.CYCLES_GE_1_UOP_EXEC",
1051 "CounterMask": "1",
1052 "SampleAfterValue": "2000003",
1053 "CounterHTOff": "0,1,2,3"
1054 },
1055 {
1056 "EventCode": "0xB1",
1057 "UMask": "0x1",
1058 "BriefDescription": "Cycles where at least 2 uops were executed per-thread.",
1059 "Counter": "0,1,2,3",
1060 "EventName": "UOPS_EXECUTED.CYCLES_GE_2_UOPS_EXEC",
1061 "CounterMask": "2",
1062 "SampleAfterValue": "2000003",
1063 "CounterHTOff": "0,1,2,3"
1064 },
1065 {
1066 "EventCode": "0xB1",
1067 "UMask": "0x1",
1068 "BriefDescription": "Cycles where at least 3 uops were executed per-thread.",
1069 "Counter": "0,1,2,3",
1070 "EventName": "UOPS_EXECUTED.CYCLES_GE_3_UOPS_EXEC",
1071 "CounterMask": "3",
1072 "SampleAfterValue": "2000003",
1073 "CounterHTOff": "0,1,2,3"
1074 },
1075 {
1076 "EventCode": "0xB1",
1077 "UMask": "0x1",
1078 "BriefDescription": "Cycles where at least 4 uops were executed per-thread.",
1079 "Counter": "0,1,2,3", 1412 "Counter": "0,1,2,3",
1080 "EventName": "UOPS_EXECUTED.CYCLES_GE_4_UOPS_EXEC", 1413 "EventName": "ROB_MISC_EVENTS.LBR_INSERTS",
1081 "CounterMask": "4", 1414 "PublicDescription": "This event counts cases of saving new LBR records by hardware. This assumes proper enabling of LBRs and takes into account LBR filtering done by the LBR_SELECT register.",
1082 "SampleAfterValue": "2000003", 1415 "SampleAfterValue": "2000003",
1083 "CounterHTOff": "0,1,2,3" 1416 "CounterHTOff": "0,1,2,3,4,5,6,7"
1084 }, 1417 },
1085 { 1418 {
1086 "EventCode": "0xe6", 1419 "EventCode": "0xe6",
@@ -1090,328 +1423,5 @@
1090 "EventName": "BACLEARS.ANY", 1423 "EventName": "BACLEARS.ANY",
1091 "SampleAfterValue": "100003", 1424 "SampleAfterValue": "100003",
1092 "CounterHTOff": "0,1,2,3,4,5,6,7" 1425 "CounterHTOff": "0,1,2,3,4,5,6,7"
1093 },
1094 {
1095 "EventCode": "0xA3",
1096 "UMask": "0x8",
1097 "BriefDescription": "Cycles while L1 cache miss demand load is outstanding.",
1098 "Counter": "2",
1099 "EventName": "CYCLE_ACTIVITY.CYCLES_L1D_MISS",
1100 "CounterMask": "8",
1101 "SampleAfterValue": "2000003",
1102 "CounterHTOff": "2"
1103 },
1104 {
1105 "EventCode": "0xA3",
1106 "UMask": "0x1",
1107 "BriefDescription": "Cycles while L2 cache miss demand load is outstanding.",
1108 "Counter": "0,1,2,3",
1109 "EventName": "CYCLE_ACTIVITY.CYCLES_L2_MISS",
1110 "CounterMask": "1",
1111 "SampleAfterValue": "2000003",
1112 "CounterHTOff": "0,1,2,3,4,5,6,7"
1113 },
1114 {
1115 "EventCode": "0xA3",
1116 "UMask": "0x2",
1117 "BriefDescription": "Cycles while memory subsystem has an outstanding load.",
1118 "Counter": "0,1,2,3",
1119 "EventName": "CYCLE_ACTIVITY.CYCLES_MEM_ANY",
1120 "CounterMask": "2",
1121 "SampleAfterValue": "2000003",
1122 "CounterHTOff": "0,1,2,3"
1123 },
1124 {
1125 "EventCode": "0xA3",
1126 "UMask": "0x4",
1127 "BriefDescription": "Total execution stalls.",
1128 "Counter": "0,1,2,3",
1129 "EventName": "CYCLE_ACTIVITY.STALLS_TOTAL",
1130 "CounterMask": "4",
1131 "SampleAfterValue": "2000003",
1132 "CounterHTOff": "0,1,2,3,4,5,6,7"
1133 },
1134 {
1135 "EventCode": "0xA3",
1136 "UMask": "0xc",
1137 "BriefDescription": "Execution stalls while L1 cache miss demand load is outstanding.",
1138 "Counter": "2",
1139 "EventName": "CYCLE_ACTIVITY.STALLS_L1D_MISS",
1140 "CounterMask": "12",
1141 "SampleAfterValue": "2000003",
1142 "CounterHTOff": "2"
1143 },
1144 {
1145 "EventCode": "0xA3",
1146 "UMask": "0x5",
1147 "BriefDescription": "Execution stalls while L2 cache miss demand load is outstanding.",
1148 "Counter": "0,1,2,3",
1149 "EventName": "CYCLE_ACTIVITY.STALLS_L2_MISS",
1150 "CounterMask": "5",
1151 "SampleAfterValue": "2000003",
1152 "CounterHTOff": "0,1,2,3,4,5,6,7"
1153 },
1154 {
1155 "EventCode": "0xA3",
1156 "UMask": "0x6",
1157 "BriefDescription": "Execution stalls while memory subsystem has an outstanding load.",
1158 "Counter": "0,1,2,3",
1159 "EventName": "CYCLE_ACTIVITY.STALLS_MEM_ANY",
1160 "CounterMask": "6",
1161 "SampleAfterValue": "2000003",
1162 "CounterHTOff": "0,1,2,3,4,5,6,7"
1163 },
1164 {
1165 "EdgeDetect": "1",
1166 "EventCode": "0xC3",
1167 "UMask": "0x1",
1168 "BriefDescription": "Number of machine clears (nukes) of any type.",
1169 "Counter": "0,1,2,3",
1170 "EventName": "MACHINE_CLEARS.COUNT",
1171 "CounterMask": "1",
1172 "SampleAfterValue": "100003",
1173 "CounterHTOff": "0,1,2,3,4,5,6,7"
1174 },
1175 {
1176 "EventCode": "0xA8",
1177 "UMask": "0x1",
1178 "BriefDescription": "Cycles 4 Uops delivered by the LSD, but didn't come from the decoder.",
1179 "Counter": "0,1,2,3",
1180 "EventName": "LSD.CYCLES_4_UOPS",
1181 "CounterMask": "4",
1182 "SampleAfterValue": "2000003",
1183 "CounterHTOff": "0,1,2,3,4,5,6,7"
1184 },
1185 {
1186 "EdgeDetect": "1",
1187 "Invert": "1",
1188 "EventCode": "0x5E",
1189 "UMask": "0x1",
1190 "BriefDescription": "Counts end of periods where the Reservation Station (RS) was empty. Could be useful to precisely locate Frontend Latency Bound issues.",
1191 "Counter": "0,1,2,3",
1192 "EventName": "RS_EVENTS.EMPTY_END",
1193 "CounterMask": "1",
1194 "SampleAfterValue": "200003",
1195 "CounterHTOff": "0,1,2,3,4,5,6,7"
1196 },
1197 {
1198 "EventCode": "0xA8",
1199 "UMask": "0x1",
1200 "BriefDescription": "Cycles Uops delivered by the LSD, but didn't come from the decoder.",
1201 "Counter": "0,1,2,3",
1202 "EventName": "LSD.CYCLES_ACTIVE",
1203 "CounterMask": "1",
1204 "SampleAfterValue": "2000003",
1205 "CounterHTOff": "0,1,2,3,4,5,6,7"
1206 },
1207 {
1208 "EventCode": "0xA1",
1209 "UMask": "0x1",
1210 "BriefDescription": "Cycles per thread when uops are executed in port 0",
1211 "Counter": "0,1,2,3",
1212 "EventName": "UOPS_EXECUTED_PORT.PORT_0",
1213 "PublicDescription": "This event counts, on the per-thread basis, cycles during which uops are dispatched from the Reservation Station (RS) to port 0.",
1214 "SampleAfterValue": "2000003",
1215 "CounterHTOff": "0,1,2,3,4,5,6,7"
1216 },
1217 {
1218 "EventCode": "0xA1",
1219 "UMask": "0x2",
1220 "BriefDescription": "Cycles per thread when uops are executed in port 1",
1221 "Counter": "0,1,2,3",
1222 "EventName": "UOPS_EXECUTED_PORT.PORT_1",
1223 "PublicDescription": "This event counts, on the per-thread basis, cycles during which uops are dispatched from the Reservation Station (RS) to port 1.",
1224 "SampleAfterValue": "2000003",
1225 "CounterHTOff": "0,1,2,3,4,5,6,7"
1226 },
1227 {
1228 "EventCode": "0xA1",
1229 "UMask": "0x4",
1230 "BriefDescription": "Cycles per thread when uops are executed in port 2",
1231 "Counter": "0,1,2,3",
1232 "EventName": "UOPS_EXECUTED_PORT.PORT_2",
1233 "PublicDescription": "This event counts, on the per-thread basis, cycles during which uops are dispatched from the Reservation Station (RS) to port 2.",
1234 "SampleAfterValue": "2000003",
1235 "CounterHTOff": "0,1,2,3,4,5,6,7"
1236 },
1237 {
1238 "EventCode": "0xA1",
1239 "UMask": "0x8",
1240 "BriefDescription": "Cycles per thread when uops are executed in port 3",
1241 "Counter": "0,1,2,3",
1242 "EventName": "UOPS_EXECUTED_PORT.PORT_3",
1243 "PublicDescription": "This event counts, on the per-thread basis, cycles during which uops are dispatched from the Reservation Station (RS) to port 3.",
1244 "SampleAfterValue": "2000003",
1245 "CounterHTOff": "0,1,2,3,4,5,6,7"
1246 },
1247 {
1248 "EventCode": "0xA1",
1249 "UMask": "0x10",
1250 "BriefDescription": "Cycles per thread when uops are executed in port 4",
1251 "Counter": "0,1,2,3",
1252 "EventName": "UOPS_EXECUTED_PORT.PORT_4",
1253 "PublicDescription": "This event counts, on the per-thread basis, cycles during which uops are dispatched from the Reservation Station (RS) to port 4.",
1254 "SampleAfterValue": "2000003",
1255 "CounterHTOff": "0,1,2,3,4,5,6,7"
1256 },
1257 {
1258 "EventCode": "0xA1",
1259 "UMask": "0x20",
1260 "BriefDescription": "Cycles per thread when uops are executed in port 5",
1261 "Counter": "0,1,2,3",
1262 "EventName": "UOPS_EXECUTED_PORT.PORT_5",
1263 "PublicDescription": "This event counts, on the per-thread basis, cycles during which uops are dispatched from the Reservation Station (RS) to port 5.",
1264 "SampleAfterValue": "2000003",
1265 "CounterHTOff": "0,1,2,3,4,5,6,7"
1266 },
1267 {
1268 "EventCode": "0xA1",
1269 "UMask": "0x40",
1270 "BriefDescription": "Cycles per thread when uops are executed in port 6",
1271 "Counter": "0,1,2,3",
1272 "EventName": "UOPS_EXECUTED_PORT.PORT_6",
1273 "PublicDescription": "This event counts, on the per-thread basis, cycles during which uops are dispatched from the Reservation Station (RS) to port 6.",
1274 "SampleAfterValue": "2000003",
1275 "CounterHTOff": "0,1,2,3,4,5,6,7"
1276 },
1277 {
1278 "EventCode": "0xA1",
1279 "UMask": "0x80",
1280 "BriefDescription": "Cycles per thread when uops are executed in port 7",
1281 "Counter": "0,1,2,3",
1282 "EventName": "UOPS_EXECUTED_PORT.PORT_7",
1283 "PublicDescription": "This event counts, on the per-thread basis, cycles during which uops are dispatched from the Reservation Station (RS) to port 7.",
1284 "SampleAfterValue": "2000003",
1285 "CounterHTOff": "0,1,2,3,4,5,6,7"
1286 },
1287 {
1288 "EventCode": "0xA0",
1289 "UMask": "0x3",
1290 "BriefDescription": "Micro-op dispatches cancelled due to insufficient SIMD physical register file read ports",
1291 "Counter": "0,1,2,3",
1292 "EventName": "UOP_DISPATCHES_CANCELLED.SIMD_PRF",
1293 "PublicDescription": "This event counts the number of micro-operations cancelled after they were dispatched from the scheduler to the execution units when the total number of physical register read ports across all dispatch ports exceeds the read bandwidth of the physical register file. The SIMD_PRF subevent applies to the following instructions: VDPPS, DPPS, VPCMPESTRI, PCMPESTRI, VPCMPESTRM, PCMPESTRM, VFMADD*, VFMADDSUB*, VFMSUB*, VMSUBADD*, VFNMADD*, VFNMSUB*. See the Broadwell Optimization Guide for more information.",
1294 "SampleAfterValue": "2000003",
1295 "CounterHTOff": "0,1,2,3"
1296 },
1297 {
1298 "EventCode": "0x00",
1299 "UMask": "0x2",
1300 "BriefDescription": "Core cycles when at least one thread on the physical core is not in halt state.",
1301 "Counter": "Fixed counter 2",
1302 "EventName": "CPU_CLK_UNHALTED.THREAD_ANY",
1303 "AnyThread": "1",
1304 "SampleAfterValue": "2000003",
1305 "CounterHTOff": "Fixed counter 2"
1306 },
1307 {
1308 "EventCode": "0x3C",
1309 "UMask": "0x0",
1310 "BriefDescription": "Core cycles when at least one thread on the physical core is not in halt state.",
1311 "Counter": "0,1,2,3",
1312 "EventName": "CPU_CLK_UNHALTED.THREAD_P_ANY",
1313 "AnyThread": "1",
1314 "SampleAfterValue": "2000003",
1315 "CounterHTOff": "0,1,2,3,4,5,6,7"
1316 },
1317 {
1318 "EventCode": "0x3C",
1319 "UMask": "0x1",
1320 "BriefDescription": "Reference cycles when the at least one thread on the physical core is unhalted (counts at 100 MHz rate).",
1321 "Counter": "0,1,2,3",
1322 "EventName": "CPU_CLK_THREAD_UNHALTED.REF_XCLK_ANY",
1323 "AnyThread": "1",
1324 "SampleAfterValue": "2000003",
1325 "CounterHTOff": "0,1,2,3,4,5,6,7"
1326 },
1327 {
1328 "EventCode": "0x0D",
1329 "UMask": "0x3",
1330 "BriefDescription": "Core cycles the allocator was stalled due to recovery from earlier clear event for any thread running on the physical core (e.g. misprediction or memory nuke).",
1331 "Counter": "0,1,2,3",
1332 "EventName": "INT_MISC.RECOVERY_CYCLES_ANY",
1333 "AnyThread": "1",
1334 "CounterMask": "1",
1335 "SampleAfterValue": "2000003",
1336 "CounterHTOff": "0,1,2,3,4,5,6,7"
1337 },
1338 {
1339 "EventCode": "0xb1",
1340 "UMask": "0x2",
1341 "BriefDescription": "Cycles at least 1 micro-op is executed from any thread on physical core.",
1342 "Counter": "0,1,2,3",
1343 "EventName": "UOPS_EXECUTED.CORE_CYCLES_GE_1",
1344 "CounterMask": "1",
1345 "SampleAfterValue": "2000003",
1346 "CounterHTOff": "0,1,2,3,4,5,6,7"
1347 },
1348 {
1349 "EventCode": "0xb1",
1350 "UMask": "0x2",
1351 "BriefDescription": "Cycles at least 2 micro-op is executed from any thread on physical core.",
1352 "Counter": "0,1,2,3",
1353 "EventName": "UOPS_EXECUTED.CORE_CYCLES_GE_2",
1354 "CounterMask": "2",
1355 "SampleAfterValue": "2000003",
1356 "CounterHTOff": "0,1,2,3,4,5,6,7"
1357 },
1358 {
1359 "EventCode": "0xb1",
1360 "UMask": "0x2",
1361 "BriefDescription": "Cycles at least 3 micro-op is executed from any thread on physical core.",
1362 "Counter": "0,1,2,3",
1363 "EventName": "UOPS_EXECUTED.CORE_CYCLES_GE_3",
1364 "CounterMask": "3",
1365 "SampleAfterValue": "2000003",
1366 "CounterHTOff": "0,1,2,3,4,5,6,7"
1367 },
1368 {
1369 "EventCode": "0xb1",
1370 "UMask": "0x2",
1371 "BriefDescription": "Cycles at least 4 micro-op is executed from any thread on physical core.",
1372 "Counter": "0,1,2,3",
1373 "EventName": "UOPS_EXECUTED.CORE_CYCLES_GE_4",
1374 "CounterMask": "4",
1375 "SampleAfterValue": "2000003",
1376 "CounterHTOff": "0,1,2,3,4,5,6,7"
1377 },
1378 {
1379 "Invert": "1",
1380 "EventCode": "0xb1",
1381 "UMask": "0x2",
1382 "BriefDescription": "Cycles with no micro-ops executed from any thread on physical core.",
1383 "Counter": "0,1,2,3",
1384 "EventName": "UOPS_EXECUTED.CORE_CYCLES_NONE",
1385 "SampleAfterValue": "2000003",
1386 "CounterHTOff": "0,1,2,3,4,5,6,7"
1387 },
1388 {
1389 "EventCode": "0x3C",
1390 "UMask": "0x1",
1391 "BriefDescription": "Reference cycles when the thread is unhalted (counts at 100 MHz rate)",
1392 "Counter": "0,1,2,3",
1393 "EventName": "CPU_CLK_UNHALTED.REF_XCLK",
1394 "PublicDescription": "Reference cycles when the thread is unhalted (counts at 100 MHz rate).",
1395 "SampleAfterValue": "2000003",
1396 "CounterHTOff": "0,1,2,3,4,5,6,7"
1397 },
1398 {
1399 "EventCode": "0x3C",
1400 "UMask": "0x1",
1401 "BriefDescription": "Reference cycles when the at least one thread on the physical core is unhalted (counts at 100 MHz rate).",
1402 "Counter": "0,1,2,3",
1403 "EventName": "CPU_CLK_UNHALTED.REF_XCLK_ANY",
1404 "AnyThread": "1",
1405 "SampleAfterValue": "2000003",
1406 "CounterHTOff": "0,1,2,3,4,5,6,7"
1407 },
1408 {
1409 "EventCode": "0x3C",
1410 "UMask": "0x2",
1411 "BriefDescription": "Count XClk pulses when this thread is unhalted and the other thread is halted.",
1412 "Counter": "0,1,2,3",
1413 "EventName": "CPU_CLK_UNHALTED.ONE_THREAD_ACTIVE",
1414 "SampleAfterValue": "2000003",
1415 "CounterHTOff": "0,1,2,3,4,5,6,7"
1416 } 1426 }
1417] \ No newline at end of file 1427] \ No newline at end of file
diff --git a/tools/perf/pmu-events/arch/x86/broadwellde/virtual-memory.json b/tools/perf/pmu-events/arch/x86/broadwellde/virtual-memory.json
index 5ce8b67ba076..7d79c707c6d1 100644
--- a/tools/perf/pmu-events/arch/x86/broadwellde/virtual-memory.json
+++ b/tools/perf/pmu-events/arch/x86/broadwellde/virtual-memory.json
@@ -45,6 +45,16 @@
45 }, 45 },
46 { 46 {
47 "EventCode": "0x08", 47 "EventCode": "0x08",
48 "UMask": "0xe",
49 "BriefDescription": "Demand load Miss in all translation lookaside buffer (TLB) levels causes a page walk that completes of any page size.",
50 "Counter": "0,1,2,3",
51 "EventName": "DTLB_LOAD_MISSES.WALK_COMPLETED",
52 "Errata": "BDM69",
53 "SampleAfterValue": "100003",
54 "CounterHTOff": "0,1,2,3,4,5,6,7"
55 },
56 {
57 "EventCode": "0x08",
48 "UMask": "0x10", 58 "UMask": "0x10",
49 "BriefDescription": "Cycles when PMH is busy with page walks", 59 "BriefDescription": "Cycles when PMH is busy with page walks",
50 "Counter": "0,1,2,3", 60 "Counter": "0,1,2,3",
@@ -73,6 +83,15 @@
73 "CounterHTOff": "0,1,2,3,4,5,6,7" 83 "CounterHTOff": "0,1,2,3,4,5,6,7"
74 }, 84 },
75 { 85 {
86 "EventCode": "0x08",
87 "UMask": "0x60",
88 "BriefDescription": "Load operations that miss the first DTLB level but hit the second and do not cause page walks.",
89 "Counter": "0,1,2,3",
90 "EventName": "DTLB_LOAD_MISSES.STLB_HIT",
91 "SampleAfterValue": "2000003",
92 "CounterHTOff": "0,1,2,3,4,5,6,7"
93 },
94 {
76 "EventCode": "0x49", 95 "EventCode": "0x49",
77 "UMask": "0x1", 96 "UMask": "0x1",
78 "BriefDescription": "Store misses in all DTLB levels that cause page walks", 97 "BriefDescription": "Store misses in all DTLB levels that cause page walks",
@@ -118,6 +137,16 @@
118 }, 137 },
119 { 138 {
120 "EventCode": "0x49", 139 "EventCode": "0x49",
140 "UMask": "0xe",
141 "BriefDescription": "Store misses in all DTLB levels that cause completed page walks.",
142 "Counter": "0,1,2,3",
143 "EventName": "DTLB_STORE_MISSES.WALK_COMPLETED",
144 "Errata": "BDM69",
145 "SampleAfterValue": "100003",
146 "CounterHTOff": "0,1,2,3,4,5,6,7"
147 },
148 {
149 "EventCode": "0x49",
121 "UMask": "0x10", 150 "UMask": "0x10",
122 "BriefDescription": "Cycles when PMH is busy with page walks", 151 "BriefDescription": "Cycles when PMH is busy with page walks",
123 "Counter": "0,1,2,3", 152 "Counter": "0,1,2,3",
@@ -146,6 +175,15 @@
146 "CounterHTOff": "0,1,2,3,4,5,6,7" 175 "CounterHTOff": "0,1,2,3,4,5,6,7"
147 }, 176 },
148 { 177 {
178 "EventCode": "0x49",
179 "UMask": "0x60",
180 "BriefDescription": "Store operations that miss the first TLB level but hit the second and do not cause page walks.",
181 "Counter": "0,1,2,3",
182 "EventName": "DTLB_STORE_MISSES.STLB_HIT",
183 "SampleAfterValue": "100003",
184 "CounterHTOff": "0,1,2,3,4,5,6,7"
185 },
186 {
149 "EventCode": "0x4F", 187 "EventCode": "0x4F",
150 "UMask": "0x10", 188 "UMask": "0x10",
151 "BriefDescription": "Cycle count for an Extended Page table walk.", 189 "BriefDescription": "Cycle count for an Extended Page table walk.",
@@ -201,6 +239,16 @@
201 }, 239 },
202 { 240 {
203 "EventCode": "0x85", 241 "EventCode": "0x85",
242 "UMask": "0xe",
243 "BriefDescription": "Misses in all ITLB levels that cause completed page walks.",
244 "Counter": "0,1,2,3",
245 "EventName": "ITLB_MISSES.WALK_COMPLETED",
246 "Errata": "BDM69",
247 "SampleAfterValue": "100003",
248 "CounterHTOff": "0,1,2,3,4,5,6,7"
249 },
250 {
251 "EventCode": "0x85",
204 "UMask": "0x10", 252 "UMask": "0x10",
205 "BriefDescription": "Cycles when PMH is busy with page walks", 253 "BriefDescription": "Cycles when PMH is busy with page walks",
206 "Counter": "0,1,2,3", 254 "Counter": "0,1,2,3",
@@ -229,6 +277,15 @@
229 "CounterHTOff": "0,1,2,3,4,5,6,7" 277 "CounterHTOff": "0,1,2,3,4,5,6,7"
230 }, 278 },
231 { 279 {
280 "EventCode": "0x85",
281 "UMask": "0x60",
282 "BriefDescription": "Operations that miss the first ITLB level but hit the second and do not cause any page walks.",
283 "Counter": "0,1,2,3",
284 "EventName": "ITLB_MISSES.STLB_HIT",
285 "SampleAfterValue": "100003",
286 "CounterHTOff": "0,1,2,3,4,5,6,7"
287 },
288 {
232 "EventCode": "0xAE", 289 "EventCode": "0xAE",
233 "UMask": "0x1", 290 "UMask": "0x1",
234 "BriefDescription": "Flushing of the Instruction TLB (ITLB) pages, includes 4k/2M/4M pages.", 291 "BriefDescription": "Flushing of the Instruction TLB (ITLB) pages, includes 4k/2M/4M pages.",
@@ -250,60 +307,60 @@
250 }, 307 },
251 { 308 {
252 "EventCode": "0xBC", 309 "EventCode": "0xBC",
253 "UMask": "0x21", 310 "UMask": "0x12",
254 "BriefDescription": "Number of ITLB page walker hits in the L1+FB.", 311 "BriefDescription": "Number of DTLB page walker hits in the L2.",
255 "Counter": "0,1,2,3", 312 "Counter": "0,1,2,3",
256 "EventName": "PAGE_WALKER_LOADS.ITLB_L1", 313 "EventName": "PAGE_WALKER_LOADS.DTLB_L2",
257 "Errata": "BDM69, BDM98", 314 "Errata": "BDM69, BDM98",
258 "SampleAfterValue": "2000003", 315 "SampleAfterValue": "2000003",
259 "CounterHTOff": "0,1,2,3" 316 "CounterHTOff": "0,1,2,3"
260 }, 317 },
261 { 318 {
262 "EventCode": "0xBC", 319 "EventCode": "0xBC",
263 "UMask": "0x12", 320 "UMask": "0x14",
264 "BriefDescription": "Number of DTLB page walker hits in the L2.", 321 "BriefDescription": "Number of DTLB page walker hits in the L3 + XSNP.",
265 "Counter": "0,1,2,3", 322 "Counter": "0,1,2,3",
266 "EventName": "PAGE_WALKER_LOADS.DTLB_L2", 323 "EventName": "PAGE_WALKER_LOADS.DTLB_L3",
267 "Errata": "BDM69, BDM98", 324 "Errata": "BDM69, BDM98",
268 "SampleAfterValue": "2000003", 325 "SampleAfterValue": "2000003",
269 "CounterHTOff": "0,1,2,3" 326 "CounterHTOff": "0,1,2,3"
270 }, 327 },
271 { 328 {
272 "EventCode": "0xBC", 329 "EventCode": "0xBC",
273 "UMask": "0x22", 330 "UMask": "0x18",
274 "BriefDescription": "Number of ITLB page walker hits in the L2.", 331 "BriefDescription": "Number of DTLB page walker hits in Memory.",
275 "Counter": "0,1,2,3", 332 "Counter": "0,1,2,3",
276 "EventName": "PAGE_WALKER_LOADS.ITLB_L2", 333 "EventName": "PAGE_WALKER_LOADS.DTLB_MEMORY",
277 "Errata": "BDM69, BDM98", 334 "Errata": "BDM69, BDM98",
278 "SampleAfterValue": "2000003", 335 "SampleAfterValue": "2000003",
279 "CounterHTOff": "0,1,2,3" 336 "CounterHTOff": "0,1,2,3"
280 }, 337 },
281 { 338 {
282 "EventCode": "0xBC", 339 "EventCode": "0xBC",
283 "UMask": "0x14", 340 "UMask": "0x21",
284 "BriefDescription": "Number of DTLB page walker hits in the L3 + XSNP.", 341 "BriefDescription": "Number of ITLB page walker hits in the L1+FB.",
285 "Counter": "0,1,2,3", 342 "Counter": "0,1,2,3",
286 "EventName": "PAGE_WALKER_LOADS.DTLB_L3", 343 "EventName": "PAGE_WALKER_LOADS.ITLB_L1",
287 "Errata": "BDM69, BDM98", 344 "Errata": "BDM69, BDM98",
288 "SampleAfterValue": "2000003", 345 "SampleAfterValue": "2000003",
289 "CounterHTOff": "0,1,2,3" 346 "CounterHTOff": "0,1,2,3"
290 }, 347 },
291 { 348 {
292 "EventCode": "0xBC", 349 "EventCode": "0xBC",
293 "UMask": "0x24", 350 "UMask": "0x22",
294 "BriefDescription": "Number of ITLB page walker hits in the L3 + XSNP.", 351 "BriefDescription": "Number of ITLB page walker hits in the L2.",
295 "Counter": "0,1,2,3", 352 "Counter": "0,1,2,3",
296 "EventName": "PAGE_WALKER_LOADS.ITLB_L3", 353 "EventName": "PAGE_WALKER_LOADS.ITLB_L2",
297 "Errata": "BDM69, BDM98", 354 "Errata": "BDM69, BDM98",
298 "SampleAfterValue": "2000003", 355 "SampleAfterValue": "2000003",
299 "CounterHTOff": "0,1,2,3" 356 "CounterHTOff": "0,1,2,3"
300 }, 357 },
301 { 358 {
302 "EventCode": "0xBC", 359 "EventCode": "0xBC",
303 "UMask": "0x18", 360 "UMask": "0x24",
304 "BriefDescription": "Number of DTLB page walker hits in Memory.", 361 "BriefDescription": "Number of ITLB page walker hits in the L3 + XSNP.",
305 "Counter": "0,1,2,3", 362 "Counter": "0,1,2,3",
306 "EventName": "PAGE_WALKER_LOADS.DTLB_MEMORY", 363 "EventName": "PAGE_WALKER_LOADS.ITLB_L3",
307 "Errata": "BDM69, BDM98", 364 "Errata": "BDM69, BDM98",
308 "SampleAfterValue": "2000003", 365 "SampleAfterValue": "2000003",
309 "CounterHTOff": "0,1,2,3" 366 "CounterHTOff": "0,1,2,3"
@@ -327,62 +384,5 @@
327 "PublicDescription": "This event counts the number of any STLB flush attempts (such as entire, VPID, PCID, InvPage, CR3 write, and so on).", 384 "PublicDescription": "This event counts the number of any STLB flush attempts (such as entire, VPID, PCID, InvPage, CR3 write, and so on).",
328 "SampleAfterValue": "100007", 385 "SampleAfterValue": "100007",
329 "CounterHTOff": "0,1,2,3,4,5,6,7" 386 "CounterHTOff": "0,1,2,3,4,5,6,7"
330 },
331 {
332 "EventCode": "0x08",
333 "UMask": "0xe",
334 "BriefDescription": "Demand load Miss in all translation lookaside buffer (TLB) levels causes a page walk that completes of any page size.",
335 "Counter": "0,1,2,3",
336 "EventName": "DTLB_LOAD_MISSES.WALK_COMPLETED",
337 "Errata": "BDM69",
338 "SampleAfterValue": "100003",
339 "CounterHTOff": "0,1,2,3,4,5,6,7"
340 },
341 {
342 "EventCode": "0x08",
343 "UMask": "0x60",
344 "BriefDescription": "Load operations that miss the first DTLB level but hit the second and do not cause page walks.",
345 "Counter": "0,1,2,3",
346 "EventName": "DTLB_LOAD_MISSES.STLB_HIT",
347 "SampleAfterValue": "2000003",
348 "CounterHTOff": "0,1,2,3,4,5,6,7"
349 },
350 {
351 "EventCode": "0x49",
352 "UMask": "0xe",
353 "BriefDescription": "Store misses in all DTLB levels that cause completed page walks.",
354 "Counter": "0,1,2,3",
355 "EventName": "DTLB_STORE_MISSES.WALK_COMPLETED",
356 "Errata": "BDM69",
357 "SampleAfterValue": "100003",
358 "CounterHTOff": "0,1,2,3,4,5,6,7"
359 },
360 {
361 "EventCode": "0x49",
362 "UMask": "0x60",
363 "BriefDescription": "Store operations that miss the first TLB level but hit the second and do not cause page walks.",
364 "Counter": "0,1,2,3",
365 "EventName": "DTLB_STORE_MISSES.STLB_HIT",
366 "SampleAfterValue": "100003",
367 "CounterHTOff": "0,1,2,3,4,5,6,7"
368 },
369 {
370 "EventCode": "0x85",
371 "UMask": "0xe",
372 "BriefDescription": "Misses in all ITLB levels that cause completed page walks.",
373 "Counter": "0,1,2,3",
374 "EventName": "ITLB_MISSES.WALK_COMPLETED",
375 "Errata": "BDM69",
376 "SampleAfterValue": "100003",
377 "CounterHTOff": "0,1,2,3,4,5,6,7"
378 },
379 {
380 "EventCode": "0x85",
381 "UMask": "0x60",
382 "BriefDescription": "Operations that miss the first ITLB level but hit the second and do not cause any page walks.",
383 "Counter": "0,1,2,3",
384 "EventName": "ITLB_MISSES.STLB_HIT",
385 "SampleAfterValue": "100003",
386 "CounterHTOff": "0,1,2,3,4,5,6,7"
387 } 387 }
388] \ No newline at end of file 388] \ No newline at end of file
diff --git a/tools/perf/pmu-events/arch/x86/broadwellx/bdx-metrics.json b/tools/perf/pmu-events/arch/x86/broadwellx/bdx-metrics.json
new file mode 100644
index 000000000000..5a7f1ec24200
--- /dev/null
+++ b/tools/perf/pmu-events/arch/x86/broadwellx/bdx-metrics.json
@@ -0,0 +1,164 @@
1[
2 {
3 "BriefDescription": "Instructions Per Cycle (per logical thread)",
4 "MetricExpr": "INST_RETIRED.ANY / CPU_CLK_UNHALTED.THREAD",
5 "MetricGroup": "TopDownL1",
6 "MetricName": "IPC"
7 },
8 {
9 "BriefDescription": "Uops Per Instruction",
10 "MetricExpr": "UOPS_RETIRED.RETIRE_SLOTS / INST_RETIRED.ANY",
11 "MetricGroup": "Pipeline",
12 "MetricName": "UPI"
13 },
14 {
15 "BriefDescription": "Rough Estimation of fraction of fetched lines bytes that were likely consumed by program instructions",
16 "MetricExpr": "min( 1 , IDQ.MITE_UOPS / ( (UOPS_RETIRED.RETIRE_SLOTS / INST_RETIRED.ANY) * 16 * ( ICACHE.HIT + ICACHE.MISSES ) / 4.0 ) )",
17 "MetricGroup": "Frontend",
18 "MetricName": "IFetch_Line_Utilization"
19 },
20 {
21 "BriefDescription": "Fraction of Uops delivered by the DSB (aka Decoded Icache; or Uop Cache)",
22 "MetricExpr": "IDQ.DSB_UOPS / ( IDQ.DSB_UOPS + LSD.UOPS + IDQ.MITE_UOPS + IDQ.MS_UOPS )",
23 "MetricGroup": "DSB; Frontend_Bandwidth",
24 "MetricName": "DSB_Coverage"
25 },
26 {
27 "BriefDescription": "Cycles Per Instruction (threaded)",
28 "MetricExpr": "1 / (INST_RETIRED.ANY / cycles)",
29 "MetricGroup": "Pipeline;Summary",
30 "MetricName": "CPI"
31 },
32 {
33 "BriefDescription": "Per-thread actual clocks when the logical processor is active. This is called 'Clockticks' in VTune.",
34 "MetricExpr": "CPU_CLK_UNHALTED.THREAD",
35 "MetricGroup": "Summary",
36 "MetricName": "CLKS"
37 },
38 {
39 "BriefDescription": "Total issue-pipeline slots",
40 "MetricExpr": "4*(( CPU_CLK_UNHALTED.THREAD_ANY / 2 ) if #SMT_on else cycles)",
41 "MetricGroup": "TopDownL1",
42 "MetricName": "SLOTS"
43 },
44 {
45 "BriefDescription": "Total number of retired Instructions",
46 "MetricExpr": "INST_RETIRED.ANY",
47 "MetricGroup": "Summary",
48 "MetricName": "Instructions"
49 },
50 {
51 "BriefDescription": "Instructions Per Cycle (per physical core)",
52 "MetricExpr": "INST_RETIRED.ANY / (( CPU_CLK_UNHALTED.THREAD_ANY / 2 ) if #SMT_on else cycles)",
53 "MetricGroup": "SMT",
54 "MetricName": "CoreIPC"
55 },
56 {
57 "BriefDescription": "Instruction-Level-Parallelism (average number of uops executed when there is at least 1 uop executed)",
58 "MetricExpr": "UOPS_EXECUTED.THREAD / (( cpu@UOPS_EXECUTED.CORE\\,cmask\\=1@ / 2) if #SMT_on else UOPS_EXECUTED.CYCLES_GE_1_UOP_EXEC)",
59 "MetricGroup": "Pipeline;Ports_Utilization",
60 "MetricName": "ILP"
61 },
62 {
63 "BriefDescription": "Average Branch Address Clear Cost (fraction of cycles)",
64 "MetricExpr": "2* (( RS_EVENTS.EMPTY_CYCLES - ICACHE.IFDATA_STALL - (( 14 * ITLB_MISSES.STLB_HIT + cpu@ITLB_MISSES.WALK_DURATION\\,cmask\\=1@ + 7* ITLB_MISSES.WALK_COMPLETED )) ) / RS_EVENTS.EMPTY_END)",
65 "MetricGroup": "Unknown_Branches",
66 "MetricName": "BAClear_Cost"
67 },
68 {
69 "BriefDescription": "Core actual clocks when any thread is active on the physical core",
70 "MetricExpr": "( CPU_CLK_UNHALTED.THREAD_ANY / 2 ) if #SMT_on else CPU_CLK_UNHALTED.THREAD",
71 "MetricGroup": "SMT",
72 "MetricName": "CORE_CLKS"
73 },
74 {
75 "BriefDescription": "Actual Average Latency for L1 data-cache miss demand loads",
76 "MetricExpr": "L1D_PEND_MISS.PENDING / ( MEM_LOAD_UOPS_RETIRED.L1_MISS + mem_load_uops_retired.hit_lfb )",
77 "MetricGroup": "Memory_Bound;Memory_Lat",
78 "MetricName": "Load_Miss_Real_Latency"
79 },
80 {
81 "BriefDescription": "Memory-Level-Parallelism (average number of L1 miss demand load when there is at least 1 such miss)",
82 "MetricExpr": "L1D_PEND_MISS.PENDING / (( cpu@l1d_pend_miss.pending_cycles\\,any\\=1@ / 2) if #SMT_on else L1D_PEND_MISS.PENDING_CYCLES)",
83 "MetricGroup": "Memory_Bound;Memory_BW",
84 "MetricName": "MLP"
85 },
86 {
87 "BriefDescription": "Utilization of the core's Page Walker(s) serving STLB misses triggered by instruction/Load/Store accesses",
88 "MetricExpr": "( ITLB_MISSES.WALK_DURATION + DTLB_LOAD_MISSES.WALK_DURATION + DTLB_STORE_MISSES.WALK_DURATION + 7*(DTLB_STORE_MISSES.WALK_COMPLETED+DTLB_LOAD_MISSES.WALK_COMPLETED+ITLB_MISSES.WALK_COMPLETED) ) / (2*(( CPU_CLK_UNHALTED.THREAD_ANY / 2 ) if #SMT_on else cycles))",
89 "MetricGroup": "TLB",
90 "MetricName": "Page_Walks_Utilization"
91 },
92 {
93 "BriefDescription": "Average CPU Utilization",
94 "MetricExpr": "CPU_CLK_UNHALTED.REF_TSC / msr@tsc@",
95 "MetricGroup": "Summary",
96 "MetricName": "CPU_Utilization"
97 },
98 {
99 "BriefDescription": "Giga Floating Point Operations Per Second",
100 "MetricExpr": "(( 1*( FP_ARITH_INST_RETIRED.SCALAR_SINGLE + FP_ARITH_INST_RETIRED.SCALAR_DOUBLE ) + 2* FP_ARITH_INST_RETIRED.128B_PACKED_DOUBLE + 4*( FP_ARITH_INST_RETIRED.128B_PACKED_SINGLE + FP_ARITH_INST_RETIRED.256B_PACKED_DOUBLE ) + 8* FP_ARITH_INST_RETIRED.256B_PACKED_SINGLE )) / 1000000000 / duration_time",
101 "MetricGroup": "FLOPS;Summary",
102 "MetricName": "GFLOPs"
103 },
104 {
105 "BriefDescription": "Average Frequency Utilization relative nominal frequency",
106 "MetricExpr": "CPU_CLK_UNHALTED.THREAD / CPU_CLK_UNHALTED.REF_TSC",
107 "MetricGroup": "Power",
108 "MetricName": "Turbo_Utilization"
109 },
110 {
111 "BriefDescription": "Fraction of cycles where both hardware threads were active",
112 "MetricExpr": "1 - CPU_CLK_THREAD_UNHALTED.ONE_THREAD_ACTIVE / ( CPU_CLK_THREAD_UNHALTED.REF_XCLK_ANY / 2 ) if #SMT_on else 0",
113 "MetricGroup": "SMT;Summary",
114 "MetricName": "SMT_2T_Utilization"
115 },
116 {
117 "BriefDescription": "Fraction of cycles spent in Kernel mode",
118 "MetricExpr": "CPU_CLK_UNHALTED.REF_TSC:u / CPU_CLK_UNHALTED.REF_TSC",
119 "MetricGroup": "Summary",
120 "MetricName": "Kernel_Utilization"
121 },
122 {
123 "BriefDescription": "C3 residency percent per core",
124 "MetricExpr": "(cstate_core@c3\\-residency@ / msr@tsc@) * 100",
125 "MetricGroup": "Power",
126 "MetricName": "C3_Core_Residency"
127 },
128 {
129 "BriefDescription": "C6 residency percent per core",
130 "MetricExpr": "(cstate_core@c6\\-residency@ / msr@tsc@) * 100",
131 "MetricGroup": "Power",
132 "MetricName": "C6_Core_Residency"
133 },
134 {
135 "BriefDescription": "C7 residency percent per core",
136 "MetricExpr": "(cstate_core@c7\\-residency@ / msr@tsc@) * 100",
137 "MetricGroup": "Power",
138 "MetricName": "C7_Core_Residency"
139 },
140 {
141 "BriefDescription": "C2 residency percent per package",
142 "MetricExpr": "(cstate_pkg@c2\\-residency@ / msr@tsc@) * 100",
143 "MetricGroup": "Power",
144 "MetricName": "C2_Pkg_Residency"
145 },
146 {
147 "BriefDescription": "C3 residency percent per package",
148 "MetricExpr": "(cstate_pkg@c3\\-residency@ / msr@tsc@) * 100",
149 "MetricGroup": "Power",
150 "MetricName": "C3_Pkg_Residency"
151 },
152 {
153 "BriefDescription": "C6 residency percent per package",
154 "MetricExpr": "(cstate_pkg@c6\\-residency@ / msr@tsc@) * 100",
155 "MetricGroup": "Power",
156 "MetricName": "C6_Pkg_Residency"
157 },
158 {
159 "BriefDescription": "C7 residency percent per package",
160 "MetricExpr": "(cstate_pkg@c7\\-residency@ / msr@tsc@) * 100",
161 "MetricGroup": "Power",
162 "MetricName": "C7_Pkg_Residency"
163 }
164]
diff --git a/tools/perf/pmu-events/arch/x86/broadwellx/cache.json b/tools/perf/pmu-events/arch/x86/broadwellx/cache.json
index d1d043829b95..bf0c51272068 100644
--- a/tools/perf/pmu-events/arch/x86/broadwellx/cache.json
+++ b/tools/perf/pmu-events/arch/x86/broadwellx/cache.json
@@ -11,11 +11,28 @@
11 }, 11 },
12 { 12 {
13 "EventCode": "0x24", 13 "EventCode": "0x24",
14 "UMask": "0x41", 14 "UMask": "0x22",
15 "BriefDescription": "Demand Data Read requests that hit L2 cache", 15 "BriefDescription": "RFO requests that miss L2 cache.",
16 "Counter": "0,1,2,3", 16 "Counter": "0,1,2,3",
17 "EventName": "L2_RQSTS.DEMAND_DATA_RD_HIT", 17 "EventName": "L2_RQSTS.RFO_MISS",
18 "PublicDescription": "This event counts the number of demand Data Read requests that hit L2 cache. Only not rejected loads are counted.", 18 "SampleAfterValue": "200003",
19 "CounterHTOff": "0,1,2,3,4,5,6,7"
20 },
21 {
22 "EventCode": "0x24",
23 "UMask": "0x24",
24 "BriefDescription": "L2 cache misses when fetching instructions.",
25 "Counter": "0,1,2,3",
26 "EventName": "L2_RQSTS.CODE_RD_MISS",
27 "SampleAfterValue": "200003",
28 "CounterHTOff": "0,1,2,3,4,5,6,7"
29 },
30 {
31 "EventCode": "0x24",
32 "UMask": "0x27",
33 "BriefDescription": "Demand requests that miss L2 cache.",
34 "Counter": "0,1,2,3",
35 "EventName": "L2_RQSTS.ALL_DEMAND_MISS",
19 "SampleAfterValue": "200003", 36 "SampleAfterValue": "200003",
20 "CounterHTOff": "0,1,2,3,4,5,6,7" 37 "CounterHTOff": "0,1,2,3,4,5,6,7"
21 }, 38 },
@@ -31,6 +48,43 @@
31 }, 48 },
32 { 49 {
33 "EventCode": "0x24", 50 "EventCode": "0x24",
51 "UMask": "0x3f",
52 "BriefDescription": "All requests that miss L2 cache.",
53 "Counter": "0,1,2,3",
54 "EventName": "L2_RQSTS.MISS",
55 "SampleAfterValue": "200003",
56 "CounterHTOff": "0,1,2,3,4,5,6,7"
57 },
58 {
59 "EventCode": "0x24",
60 "UMask": "0x41",
61 "BriefDescription": "Demand Data Read requests that hit L2 cache",
62 "Counter": "0,1,2,3",
63 "EventName": "L2_RQSTS.DEMAND_DATA_RD_HIT",
64 "PublicDescription": "This event counts the number of demand Data Read requests that hit L2 cache. Only not rejected loads are counted.",
65 "SampleAfterValue": "200003",
66 "CounterHTOff": "0,1,2,3,4,5,6,7"
67 },
68 {
69 "EventCode": "0x24",
70 "UMask": "0x42",
71 "BriefDescription": "RFO requests that hit L2 cache.",
72 "Counter": "0,1,2,3",
73 "EventName": "L2_RQSTS.RFO_HIT",
74 "SampleAfterValue": "200003",
75 "CounterHTOff": "0,1,2,3,4,5,6,7"
76 },
77 {
78 "EventCode": "0x24",
79 "UMask": "0x44",
80 "BriefDescription": "L2 cache hits when fetching instructions, code reads.",
81 "Counter": "0,1,2,3",
82 "EventName": "L2_RQSTS.CODE_RD_HIT",
83 "SampleAfterValue": "200003",
84 "CounterHTOff": "0,1,2,3,4,5,6,7"
85 },
86 {
87 "EventCode": "0x24",
34 "UMask": "0x50", 88 "UMask": "0x50",
35 "BriefDescription": "L2 prefetch requests that hit L2 cache", 89 "BriefDescription": "L2 prefetch requests that hit L2 cache",
36 "Counter": "0,1,2,3", 90 "Counter": "0,1,2,3",
@@ -71,6 +125,15 @@
71 }, 125 },
72 { 126 {
73 "EventCode": "0x24", 127 "EventCode": "0x24",
128 "UMask": "0xe7",
129 "BriefDescription": "Demand requests to L2 cache.",
130 "Counter": "0,1,2,3",
131 "EventName": "L2_RQSTS.ALL_DEMAND_REFERENCES",
132 "SampleAfterValue": "200003",
133 "CounterHTOff": "0,1,2,3,4,5,6,7"
134 },
135 {
136 "EventCode": "0x24",
74 "UMask": "0xf8", 137 "UMask": "0xf8",
75 "BriefDescription": "Requests from L2 hardware prefetchers", 138 "BriefDescription": "Requests from L2 hardware prefetchers",
76 "Counter": "0,1,2,3", 139 "Counter": "0,1,2,3",
@@ -80,6 +143,15 @@
80 "CounterHTOff": "0,1,2,3,4,5,6,7" 143 "CounterHTOff": "0,1,2,3,4,5,6,7"
81 }, 144 },
82 { 145 {
146 "EventCode": "0x24",
147 "UMask": "0xff",
148 "BriefDescription": "All L2 requests.",
149 "Counter": "0,1,2,3",
150 "EventName": "L2_RQSTS.REFERENCES",
151 "SampleAfterValue": "200003",
152 "CounterHTOff": "0,1,2,3,4,5,6,7"
153 },
154 {
83 "EventCode": "0x27", 155 "EventCode": "0x27",
84 "UMask": "0x50", 156 "UMask": "0x50",
85 "BriefDescription": "Not rejected writebacks that hit L2 cache", 157 "BriefDescription": "Not rejected writebacks that hit L2 cache",
@@ -131,6 +203,27 @@
131 "CounterHTOff": "2" 203 "CounterHTOff": "2"
132 }, 204 },
133 { 205 {
206 "EventCode": "0x48",
207 "UMask": "0x1",
208 "BriefDescription": "Cycles with L1D load Misses outstanding from any thread on physical core.",
209 "Counter": "2",
210 "EventName": "L1D_PEND_MISS.PENDING_CYCLES_ANY",
211 "AnyThread": "1",
212 "CounterMask": "1",
213 "SampleAfterValue": "2000003",
214 "CounterHTOff": "2"
215 },
216 {
217 "EventCode": "0x48",
218 "UMask": "0x2",
219 "BriefDescription": "Cycles a demand request was blocked due to Fill Buffers inavailability.",
220 "Counter": "0,1,2,3",
221 "EventName": "L1D_PEND_MISS.FB_FULL",
222 "CounterMask": "1",
223 "SampleAfterValue": "2000003",
224 "CounterHTOff": "0,1,2,3,4,5,6,7"
225 },
226 {
134 "EventCode": "0x51", 227 "EventCode": "0x51",
135 "UMask": "0x1", 228 "UMask": "0x1",
136 "BriefDescription": "L1D data line replacements", 229 "BriefDescription": "L1D data line replacements",
@@ -153,12 +246,35 @@
153 }, 246 },
154 { 247 {
155 "EventCode": "0x60", 248 "EventCode": "0x60",
249 "UMask": "0x1",
250 "BriefDescription": "Cycles when offcore outstanding Demand Data Read transactions are present in SuperQueue (SQ), queue to uncore",
251 "Counter": "0,1,2,3",
252 "EventName": "OFFCORE_REQUESTS_OUTSTANDING.CYCLES_WITH_DEMAND_DATA_RD",
253 "CounterMask": "1",
254 "Errata": "BDM76",
255 "PublicDescription": "This event counts cycles when offcore outstanding Demand Data Read transactions are present in the super queue (SQ). A transaction is considered to be in the Offcore outstanding state between L2 miss and transaction completion sent to requestor (SQ de-allocation).",
256 "SampleAfterValue": "2000003",
257 "CounterHTOff": "0,1,2,3,4,5,6,7"
258 },
259 {
260 "EventCode": "0x60",
261 "UMask": "0x1",
262 "BriefDescription": "Cycles with at least 6 offcore outstanding Demand Data Read transactions in uncore queue.",
263 "Counter": "0,1,2,3",
264 "EventName": "OFFCORE_REQUESTS_OUTSTANDING.DEMAND_DATA_RD_GE_6",
265 "CounterMask": "6",
266 "Errata": "BDM76",
267 "SampleAfterValue": "2000003",
268 "CounterHTOff": "0,1,2,3,4,5,6,7"
269 },
270 {
271 "EventCode": "0x60",
156 "UMask": "0x2", 272 "UMask": "0x2",
157 "BriefDescription": "Offcore outstanding code reads transactions in SuperQueue (SQ), queue to uncore, every cycle", 273 "BriefDescription": "Offcore outstanding code reads transactions in SuperQueue (SQ), queue to uncore, every cycle",
158 "Counter": "0,1,2,3", 274 "Counter": "0,1,2,3",
159 "EventName": "OFFCORE_REQUESTS_OUTSTANDING.DEMAND_CODE_RD", 275 "EventName": "OFFCORE_REQUESTS_OUTSTANDING.DEMAND_CODE_RD",
160 "Errata": "BDM76", 276 "Errata": "BDM76",
161 "PublicDescription": "This event counts the number of offcore outstanding Code Reads transactions in the super queue every cycle. The \"Offcore outstanding\" state of the transaction lasts from the L2 miss until the sending transaction completion to requestor (SQ deallocation). See the corresponding Umask under OFFCORE_REQUESTS.", 277 "PublicDescription": "This event counts the number of offcore outstanding Code Reads transactions in the super queue every cycle. The Offcore outstanding state of the transaction lasts from the L2 miss until the sending transaction completion to requestor (SQ deallocation). See the corresponding Umask under OFFCORE_REQUESTS.",
162 "SampleAfterValue": "2000003", 278 "SampleAfterValue": "2000003",
163 "CounterHTOff": "0,1,2,3,4,5,6,7" 279 "CounterHTOff": "0,1,2,3,4,5,6,7"
164 }, 280 },
@@ -175,24 +291,24 @@
175 }, 291 },
176 { 292 {
177 "EventCode": "0x60", 293 "EventCode": "0x60",
178 "UMask": "0x8", 294 "UMask": "0x4",
179 "BriefDescription": "Offcore outstanding cacheable Core Data Read transactions in SuperQueue (SQ), queue to uncore", 295 "BriefDescription": "Offcore outstanding demand rfo reads transactions in SuperQueue (SQ), queue to uncore, every cycle",
180 "Counter": "0,1,2,3", 296 "Counter": "0,1,2,3",
181 "EventName": "OFFCORE_REQUESTS_OUTSTANDING.ALL_DATA_RD", 297 "EventName": "OFFCORE_REQUESTS_OUTSTANDING.CYCLES_WITH_DEMAND_RFO",
298 "CounterMask": "1",
182 "Errata": "BDM76", 299 "Errata": "BDM76",
183 "PublicDescription": "This event counts the number of offcore outstanding cacheable Core Data Read transactions in the super queue every cycle. A transaction is considered to be in the Offcore outstanding state between L2 miss and transaction completion sent to requestor (SQ de-allocation). See corresponding Umask under OFFCORE_REQUESTS.", 300 "PublicDescription": "This event counts the number of offcore outstanding demand rfo Reads transactions in the super queue every cycle. The Offcore outstanding state of the transaction lasts from the L2 miss until the sending transaction completion to requestor (SQ deallocation). See the corresponding Umask under OFFCORE_REQUESTS.",
184 "SampleAfterValue": "2000003", 301 "SampleAfterValue": "2000003",
185 "CounterHTOff": "0,1,2,3,4,5,6,7" 302 "CounterHTOff": "0,1,2,3,4,5,6,7"
186 }, 303 },
187 { 304 {
188 "EventCode": "0x60", 305 "EventCode": "0x60",
189 "UMask": "0x1", 306 "UMask": "0x8",
190 "BriefDescription": "Cycles when offcore outstanding Demand Data Read transactions are present in SuperQueue (SQ), queue to uncore", 307 "BriefDescription": "Offcore outstanding cacheable Core Data Read transactions in SuperQueue (SQ), queue to uncore",
191 "Counter": "0,1,2,3", 308 "Counter": "0,1,2,3",
192 "EventName": "OFFCORE_REQUESTS_OUTSTANDING.CYCLES_WITH_DEMAND_DATA_RD", 309 "EventName": "OFFCORE_REQUESTS_OUTSTANDING.ALL_DATA_RD",
193 "CounterMask": "1",
194 "Errata": "BDM76", 310 "Errata": "BDM76",
195 "PublicDescription": "This event counts cycles when offcore outstanding Demand Data Read transactions are present in the super queue (SQ). A transaction is considered to be in the Offcore outstanding state between L2 miss and transaction completion sent to requestor (SQ de-allocation).", 311 "PublicDescription": "This event counts the number of offcore outstanding cacheable Core Data Read transactions in the super queue every cycle. A transaction is considered to be in the Offcore outstanding state between L2 miss and transaction completion sent to requestor (SQ de-allocation). See corresponding Umask under OFFCORE_REQUESTS.",
196 "SampleAfterValue": "2000003", 312 "SampleAfterValue": "2000003",
197 "CounterHTOff": "0,1,2,3,4,5,6,7" 313 "CounterHTOff": "0,1,2,3,4,5,6,7"
198 }, 314 },
@@ -209,18 +325,6 @@
209 "CounterHTOff": "0,1,2,3,4,5,6,7" 325 "CounterHTOff": "0,1,2,3,4,5,6,7"
210 }, 326 },
211 { 327 {
212 "EventCode": "0x60",
213 "UMask": "0x4",
214 "BriefDescription": "Offcore outstanding demand rfo reads transactions in SuperQueue (SQ), queue to uncore, every cycle",
215 "Counter": "0,1,2,3",
216 "EventName": "OFFCORE_REQUESTS_OUTSTANDING.CYCLES_WITH_DEMAND_RFO",
217 "CounterMask": "1",
218 "Errata": "BDM76",
219 "PublicDescription": "This event counts the number of offcore outstanding demand rfo Reads transactions in the super queue every cycle. The \"Offcore outstanding\" state of the transaction lasts from the L2 miss until the sending transaction completion to requestor (SQ deallocation). See the corresponding Umask under OFFCORE_REQUESTS.",
220 "SampleAfterValue": "2000003",
221 "CounterHTOff": "0,1,2,3,4,5,6,7"
222 },
223 {
224 "EventCode": "0x63", 328 "EventCode": "0x63",
225 "UMask": "0x2", 329 "UMask": "0x2",
226 "BriefDescription": "Cycles when L1D is locked", 330 "BriefDescription": "Cycles when L1D is locked",
@@ -266,7 +370,7 @@
266 "BriefDescription": "Demand and prefetch data reads", 370 "BriefDescription": "Demand and prefetch data reads",
267 "Counter": "0,1,2,3", 371 "Counter": "0,1,2,3",
268 "EventName": "OFFCORE_REQUESTS.ALL_DATA_RD", 372 "EventName": "OFFCORE_REQUESTS.ALL_DATA_RD",
269 "PublicDescription": "This event counts the demand and prefetch data reads. All Core Data Reads include cacheable \"Demands\" and L2 prefetchers (not L3 prefetchers). Counting also covers reads due to page walks resulted from any request type.", 373 "PublicDescription": "This event counts the demand and prefetch data reads. All Core Data Reads include cacheable Demands and L2 prefetchers (not L3 prefetchers). Counting also covers reads due to page walks resulted from any request type.",
270 "SampleAfterValue": "100003", 374 "SampleAfterValue": "100003",
271 "CounterHTOff": "0,1,2,3,4,5,6,7" 375 "CounterHTOff": "0,1,2,3,4,5,6,7"
272 }, 376 },
@@ -281,26 +385,35 @@
281 "CounterHTOff": "0,1,2,3,4,5,6,7" 385 "CounterHTOff": "0,1,2,3,4,5,6,7"
282 }, 386 },
283 { 387 {
388 "EventCode": "0xB7, 0xBB",
389 "UMask": "0x1",
390 "BriefDescription": "Offcore response can be programmed only with a specific pair of event select and counter MSR, and with specific event codes and predefine mask bit value in a dedicated MSR to specify attributes of the offcore transaction.",
391 "Counter": "0,1,2,3",
392 "EventName": "OFFCORE_RESPONSE",
393 "SampleAfterValue": "100003",
394 "CounterHTOff": "0,1,2,3"
395 },
396 {
284 "EventCode": "0xD0", 397 "EventCode": "0xD0",
285 "UMask": "0x11", 398 "UMask": "0x11",
286 "BriefDescription": "Retired load uops that miss the STLB.", 399 "BriefDescription": "Retired load uops that miss the STLB. (Precise Event - PEBS)",
287 "Data_LA": "1", 400 "Data_LA": "1",
288 "PEBS": "1", 401 "PEBS": "1",
289 "Counter": "0,1,2,3", 402 "Counter": "0,1,2,3",
290 "EventName": "MEM_UOPS_RETIRED.STLB_MISS_LOADS", 403 "EventName": "MEM_UOPS_RETIRED.STLB_MISS_LOADS",
291 "PublicDescription": "This is a non-precise version (that is, does not use PEBS) of the event that counts load uops with true STLB miss retired to the architected path. True STLB miss is an uop triggering page walk that gets completed without blocks, and later gets retired. This page walk can end up with or without a fault.", 404 "PublicDescription": "This is a precise version (that is, uses PEBS) of the event that counts load uops with true STLB miss retired to the architected path. True STLB miss is an uop triggering page walk that gets completed without blocks, and later gets retired. This page walk can end up with or without a fault.",
292 "SampleAfterValue": "100003", 405 "SampleAfterValue": "100003",
293 "CounterHTOff": "0,1,2,3" 406 "CounterHTOff": "0,1,2,3"
294 }, 407 },
295 { 408 {
296 "EventCode": "0xD0", 409 "EventCode": "0xD0",
297 "UMask": "0x12", 410 "UMask": "0x12",
298 "BriefDescription": "Retired store uops that miss the STLB.", 411 "BriefDescription": "Retired store uops that miss the STLB. (Precise Event - PEBS)",
299 "Data_LA": "1", 412 "Data_LA": "1",
300 "PEBS": "1", 413 "PEBS": "1",
301 "Counter": "0,1,2,3", 414 "Counter": "0,1,2,3",
302 "EventName": "MEM_UOPS_RETIRED.STLB_MISS_STORES", 415 "EventName": "MEM_UOPS_RETIRED.STLB_MISS_STORES",
303 "PublicDescription": "This is a non-precise version (that is, does not use PEBS) of the event that counts store uops with true STLB miss retired to the architected path. True STLB miss is an uop triggering page walk that gets completed without blocks, and later gets retired. This page walk can end up with or without a fault.", 416 "PublicDescription": "This is a precise version (that is, uses PEBS) of the event that counts store uops true STLB miss retired to the architected path. True STLB miss is an uop triggering page walk that gets completed without blocks, and later gets retired. This page walk can end up with or without a fault.",
304 "SampleAfterValue": "100003", 417 "SampleAfterValue": "100003",
305 "L1_Hit_Indication": "1", 418 "L1_Hit_Indication": "1",
306 "CounterHTOff": "0,1,2,3" 419 "CounterHTOff": "0,1,2,3"
@@ -308,37 +421,37 @@
308 { 421 {
309 "EventCode": "0xD0", 422 "EventCode": "0xD0",
310 "UMask": "0x21", 423 "UMask": "0x21",
311 "BriefDescription": "Retired load uops with locked access.", 424 "BriefDescription": "Retired load uops with locked access. (Precise Event - PEBS)",
312 "Data_LA": "1", 425 "Data_LA": "1",
313 "PEBS": "1", 426 "PEBS": "1",
314 "Counter": "0,1,2,3", 427 "Counter": "0,1,2,3",
315 "EventName": "MEM_UOPS_RETIRED.LOCK_LOADS", 428 "EventName": "MEM_UOPS_RETIRED.LOCK_LOADS",
316 "Errata": "BDM35", 429 "Errata": "BDM35",
317 "PublicDescription": "This is a non-precise version (that is, does not use PEBS) of the event that counts load uops with locked access retired to the architected path.", 430 "PublicDescription": "This is a precise version (that is, uses PEBS) of the event that counts load uops with locked access retired to the architected path.",
318 "SampleAfterValue": "100007", 431 "SampleAfterValue": "100007",
319 "CounterHTOff": "0,1,2,3" 432 "CounterHTOff": "0,1,2,3"
320 }, 433 },
321 { 434 {
322 "EventCode": "0xD0", 435 "EventCode": "0xD0",
323 "UMask": "0x41", 436 "UMask": "0x41",
324 "BriefDescription": "Retired load uops that split across a cacheline boundary.", 437 "BriefDescription": "Retired load uops that split across a cacheline boundary.(Precise Event - PEBS)",
325 "Data_LA": "1", 438 "Data_LA": "1",
326 "PEBS": "1", 439 "PEBS": "1",
327 "Counter": "0,1,2,3", 440 "Counter": "0,1,2,3",
328 "EventName": "MEM_UOPS_RETIRED.SPLIT_LOADS", 441 "EventName": "MEM_UOPS_RETIRED.SPLIT_LOADS",
329 "PublicDescription": "This is a non-precise version (that is, does not use PEBS) of the event that counts line-splitted load uops retired to the architected path. A line split is across 64B cache-line which includes a page split (4K).", 442 "PublicDescription": "This is a precise version (that is, uses PEBS) of the event that counts line-splitted load uops retired to the architected path. A line split is across 64B cache-line which includes a page split (4K).",
330 "SampleAfterValue": "100003", 443 "SampleAfterValue": "100003",
331 "CounterHTOff": "0,1,2,3" 444 "CounterHTOff": "0,1,2,3"
332 }, 445 },
333 { 446 {
334 "EventCode": "0xD0", 447 "EventCode": "0xD0",
335 "UMask": "0x42", 448 "UMask": "0x42",
336 "BriefDescription": "Retired store uops that split across a cacheline boundary.", 449 "BriefDescription": "Retired store uops that split across a cacheline boundary. (Precise Event - PEBS)",
337 "Data_LA": "1", 450 "Data_LA": "1",
338 "PEBS": "1", 451 "PEBS": "1",
339 "Counter": "0,1,2,3", 452 "Counter": "0,1,2,3",
340 "EventName": "MEM_UOPS_RETIRED.SPLIT_STORES", 453 "EventName": "MEM_UOPS_RETIRED.SPLIT_STORES",
341 "PublicDescription": "This is a non-precise version (that is, does not use PEBS) of the event that counts line-splitted store uops retired to the architected path. A line split is across 64B cache-line which includes a page split (4K).", 454 "PublicDescription": "This is a precise version (that is, uses PEBS) of the event that counts line-splitted store uops retired to the architected path. A line split is across 64B cache-line which includes a page split (4K).",
342 "SampleAfterValue": "100003", 455 "SampleAfterValue": "100003",
343 "L1_Hit_Indication": "1", 456 "L1_Hit_Indication": "1",
344 "CounterHTOff": "0,1,2,3" 457 "CounterHTOff": "0,1,2,3"
@@ -346,24 +459,24 @@
346 { 459 {
347 "EventCode": "0xD0", 460 "EventCode": "0xD0",
348 "UMask": "0x81", 461 "UMask": "0x81",
349 "BriefDescription": "All retired load uops.", 462 "BriefDescription": "All retired load uops. (Precise Event - PEBS)",
350 "Data_LA": "1", 463 "Data_LA": "1",
351 "PEBS": "1", 464 "PEBS": "1",
352 "Counter": "0,1,2,3", 465 "Counter": "0,1,2,3",
353 "EventName": "MEM_UOPS_RETIRED.ALL_LOADS", 466 "EventName": "MEM_UOPS_RETIRED.ALL_LOADS",
354 "PublicDescription": "This event counts load uops retired to the architected path with a filter on bits 0 and 1 applied.\nNote: This event counts AVX-256bit load/store double-pump memory uops as a single uop at retirement. This event also counts SW prefetches.", 467 "PublicDescription": "This is a precise version (that is, uses PEBS) of the event that counts load uops retired to the architected path with a filter on bits 0 and 1 applied.\nNote: This event ?ounts AVX-256bit load/store double-pump memory uops as a single uop at retirement. This event also counts SW prefetches.",
355 "SampleAfterValue": "2000003", 468 "SampleAfterValue": "2000003",
356 "CounterHTOff": "0,1,2,3" 469 "CounterHTOff": "0,1,2,3"
357 }, 470 },
358 { 471 {
359 "EventCode": "0xD0", 472 "EventCode": "0xD0",
360 "UMask": "0x82", 473 "UMask": "0x82",
361 "BriefDescription": "All retired store uops.", 474 "BriefDescription": "Retired store uops that split across a cacheline boundary. (Precise Event - PEBS)",
362 "Data_LA": "1", 475 "Data_LA": "1",
363 "PEBS": "1", 476 "PEBS": "1",
364 "Counter": "0,1,2,3", 477 "Counter": "0,1,2,3",
365 "EventName": "MEM_UOPS_RETIRED.ALL_STORES", 478 "EventName": "MEM_UOPS_RETIRED.ALL_STORES",
366 "PublicDescription": "This event counts store uops retired to the architected path with a filter on bits 0 and 1 applied.\nNote: This event counts AVX-256bit load/store double-pump memory uops as a single uop at retirement.", 479 "PublicDescription": "This is a precise version (that is, uses PEBS) of the event that counts store uops retired to the architected path with a filter on bits 0 and 1 applied.\nNote: This event ?ounts AVX-256bit load/store double-pump memory uops as a single uop at retirement.",
367 "SampleAfterValue": "2000003", 480 "SampleAfterValue": "2000003",
368 "L1_Hit_Indication": "1", 481 "L1_Hit_Indication": "1",
369 "CounterHTOff": "0,1,2,3" 482 "CounterHTOff": "0,1,2,3"
@@ -371,69 +484,69 @@
371 { 484 {
372 "EventCode": "0xD1", 485 "EventCode": "0xD1",
373 "UMask": "0x1", 486 "UMask": "0x1",
374 "BriefDescription": "Retired load uops with L1 cache hits as data sources.", 487 "BriefDescription": "Retired load uops with L1 cache hits as data sources. (Precise Event - PEBS)",
375 "Data_LA": "1", 488 "Data_LA": "1",
376 "PEBS": "1", 489 "PEBS": "1",
377 "Counter": "0,1,2,3", 490 "Counter": "0,1,2,3",
378 "EventName": "MEM_LOAD_UOPS_RETIRED.L1_HIT", 491 "EventName": "MEM_LOAD_UOPS_RETIRED.L1_HIT",
379 "PublicDescription": "This is a non-precise version (that is, does not use PEBS) of the event that counts retired load uops which data sources were hits in the nearest-level (L1) cache.\nNote: Only two data-sources of L1/FB are applicable for AVX-256bit even though the corresponding AVX load could be serviced by a deeper level in the memory hierarchy. Data source is reported for the Low-half load. This event also counts SW prefetches independent of the actual data source.", 492 "PublicDescription": "This is a precise version (that is, uses PEBS) of the event that counts retired load uops which data source were hits in the nearest-level (L1) cache.\nNote: Only two data-sources of L1/FB are applicable for AVX-256bit even though the corresponding AVX load could be serviced by a deeper level in the memory hierarchy. Data source is reported for the Low-half load. This event also counts SW prefetches independent of the actual data source.",
380 "SampleAfterValue": "2000003", 493 "SampleAfterValue": "2000003",
381 "CounterHTOff": "0,1,2,3" 494 "CounterHTOff": "0,1,2,3"
382 }, 495 },
383 { 496 {
384 "EventCode": "0xD1", 497 "EventCode": "0xD1",
385 "UMask": "0x2", 498 "UMask": "0x2",
386 "BriefDescription": "Retired load uops with L2 cache hits as data sources.", 499 "BriefDescription": "Retired load uops with L2 cache hits as data sources. (Precise Event - PEBS)",
387 "Data_LA": "1", 500 "Data_LA": "1",
388 "PEBS": "1", 501 "PEBS": "1",
389 "Counter": "0,1,2,3", 502 "Counter": "0,1,2,3",
390 "EventName": "MEM_LOAD_UOPS_RETIRED.L2_HIT", 503 "EventName": "MEM_LOAD_UOPS_RETIRED.L2_HIT",
391 "Errata": "BDM35", 504 "Errata": "BDM35",
392 "PublicDescription": "This is a non-precise version (that is, does not use PEBS) of the event that counts retired load uops which data sources were hits in the mid-level (L2) cache.", 505 "PublicDescription": "This is a precise version (that is, uses PEBS) of the event that counts retired load uops which data sources were hits in the mid-level (L2) cache.",
393 "SampleAfterValue": "100003", 506 "SampleAfterValue": "100003",
394 "CounterHTOff": "0,1,2,3" 507 "CounterHTOff": "0,1,2,3"
395 }, 508 },
396 { 509 {
397 "EventCode": "0xD1", 510 "EventCode": "0xD1",
398 "UMask": "0x4", 511 "UMask": "0x4",
399 "BriefDescription": "Retired load uops which data sources were data hits in L3 without snoops required.", 512 "BriefDescription": "Hit in last-level (L3) cache. Excludes Unknown data-source. (Precise Event - PEBS)",
400 "Data_LA": "1", 513 "Data_LA": "1",
401 "PEBS": "1", 514 "PEBS": "1",
402 "Counter": "0,1,2,3", 515 "Counter": "0,1,2,3",
403 "EventName": "MEM_LOAD_UOPS_RETIRED.L3_HIT", 516 "EventName": "MEM_LOAD_UOPS_RETIRED.L3_HIT",
404 "Errata": "BDM100", 517 "Errata": "BDM100",
405 "PublicDescription": "This is a non-precise version (that is, does not use PEBS) of the event that counts retired load uops which data sources were data hits in the last-level (L3) cache without snoops required.", 518 "PublicDescription": "This is a precise version (that is, uses PEBS) of the event that counts retired load uops which data sources were data hits in the last-level (L3) cache without snoops required.",
406 "SampleAfterValue": "50021", 519 "SampleAfterValue": "50021",
407 "CounterHTOff": "0,1,2,3" 520 "CounterHTOff": "0,1,2,3"
408 }, 521 },
409 { 522 {
410 "EventCode": "0xD1", 523 "EventCode": "0xD1",
411 "UMask": "0x8", 524 "UMask": "0x8",
412 "BriefDescription": "Retired load uops misses in L1 cache as data sources.", 525 "BriefDescription": "Retired load uops misses in L1 cache as data sources. Uses PEBS.",
413 "Data_LA": "1", 526 "Data_LA": "1",
414 "PEBS": "1", 527 "PEBS": "1",
415 "Counter": "0,1,2,3", 528 "Counter": "0,1,2,3",
416 "EventName": "MEM_LOAD_UOPS_RETIRED.L1_MISS", 529 "EventName": "MEM_LOAD_UOPS_RETIRED.L1_MISS",
417 "PublicDescription": "This is a non-precise version (that is, does not use PEBS) of the event that counts retired load uops which data sources were misses in the nearest-level (L1) cache. Counting excludes unknown and UC data source.", 530 "PublicDescription": "This is a precise version (that is, uses PEBS) of the event that counts retired load uops which data sources were misses in the nearest-level (L1) cache. Counting excludes unknown and UC data source.",
418 "SampleAfterValue": "100003", 531 "SampleAfterValue": "100003",
419 "CounterHTOff": "0,1,2,3" 532 "CounterHTOff": "0,1,2,3"
420 }, 533 },
421 { 534 {
422 "EventCode": "0xD1", 535 "EventCode": "0xD1",
423 "UMask": "0x10", 536 "UMask": "0x10",
424 "BriefDescription": "Miss in mid-level (L2) cache. Excludes Unknown data-source.", 537 "BriefDescription": "Retired load uops with L2 cache misses as data sources. Uses PEBS.",
425 "Data_LA": "1", 538 "Data_LA": "1",
426 "PEBS": "1", 539 "PEBS": "1",
427 "Counter": "0,1,2,3", 540 "Counter": "0,1,2,3",
428 "EventName": "MEM_LOAD_UOPS_RETIRED.L2_MISS", 541 "EventName": "MEM_LOAD_UOPS_RETIRED.L2_MISS",
429 "PublicDescription": "This is a non-precise version (that is, does not use PEBS) of the event that counts retired load uops which data sources were misses in the mid-level (L2) cache. Counting excludes unknown and UC data source.", 542 "PublicDescription": "This is a precise version (that is, uses PEBS) of the event that counts retired load uops which data sources were misses in the mid-level (L2) cache. Counting excludes unknown and UC data source.",
430 "SampleAfterValue": "50021", 543 "SampleAfterValue": "50021",
431 "CounterHTOff": "0,1,2,3" 544 "CounterHTOff": "0,1,2,3"
432 }, 545 },
433 { 546 {
434 "EventCode": "0xD1", 547 "EventCode": "0xD1",
435 "UMask": "0x20", 548 "UMask": "0x20",
436 "BriefDescription": "Miss in last-level (L3) cache. Excludes Unknown data-source.", 549 "BriefDescription": "Miss in last-level (L3) cache. Excludes Unknown data-source. (Precise Event - PEBS).",
437 "Data_LA": "1", 550 "Data_LA": "1",
438 "PEBS": "1", 551 "PEBS": "1",
439 "Counter": "0,1,2,3", 552 "Counter": "0,1,2,3",
@@ -445,84 +558,83 @@
445 { 558 {
446 "EventCode": "0xD1", 559 "EventCode": "0xD1",
447 "UMask": "0x40", 560 "UMask": "0x40",
448 "BriefDescription": "Retired load uops which data sources were load uops missed L1 but hit FB due to preceding miss to the same cache line with data not ready.", 561 "BriefDescription": "Retired load uops which data sources were load uops missed L1 but hit FB due to preceding miss to the same cache line with data not ready. (Precise Event - PEBS)",
449 "Data_LA": "1", 562 "Data_LA": "1",
450 "PEBS": "1", 563 "PEBS": "1",
451 "Counter": "0,1,2,3", 564 "Counter": "0,1,2,3",
452 "EventName": "MEM_LOAD_UOPS_RETIRED.HIT_LFB", 565 "EventName": "MEM_LOAD_UOPS_RETIRED.HIT_LFB",
453 "PublicDescription": "This is a non-precise version (that is, does not use PEBS) of the event that counts retired load uops which data sources were load uops missed L1 but hit a fill buffer due to a preceding miss to the same cache line with the data not ready.\nNote: Only two data-sources of L1/FB are applicable for AVX-256bit even though the corresponding AVX load could be serviced by a deeper level in the memory hierarchy. Data source is reported for the Low-half load.", 566 "PublicDescription": "This is a precise version (that is, uses PEBS) of the event that counts retired load uops which data sources were load uops missed L1 but hit a fill buffer due to a preceding miss to the same cache line with the data not ready.\nNote: Only two data-sources of L1/FB are applicable for AVX-256bit even though the corresponding AVX load could be serviced by a deeper level in the memory hierarchy. Data source is reported for the Low-half load.",
454 "SampleAfterValue": "100003", 567 "SampleAfterValue": "100003",
455 "CounterHTOff": "0,1,2,3" 568 "CounterHTOff": "0,1,2,3"
456 }, 569 },
457 { 570 {
458 "EventCode": "0xD2", 571 "EventCode": "0xD2",
459 "UMask": "0x1", 572 "UMask": "0x1",
460 "BriefDescription": "Retired load uops which data sources were L3 hit and cross-core snoop missed in on-pkg core cache.", 573 "BriefDescription": "Retired load uops which data sources were L3 hit and cross-core snoop missed in on-pkg core cache. (Precise Event - PEBS)",
461 "Data_LA": "1", 574 "Data_LA": "1",
462 "PEBS": "1", 575 "PEBS": "1",
463 "Counter": "0,1,2,3", 576 "Counter": "0,1,2,3",
464 "EventName": "MEM_LOAD_UOPS_L3_HIT_RETIRED.XSNP_MISS", 577 "EventName": "MEM_LOAD_UOPS_L3_HIT_RETIRED.XSNP_MISS",
465 "Errata": "BDM100", 578 "Errata": "BDM100",
466 "PublicDescription": "This is a non-precise version (that is, does not use PEBS) of the event that counts retired load uops which data sources were L3 Hit and a cross-core snoop missed in the on-pkg core cache.", 579 "PublicDescription": "This is a precise version (that is, uses PEBS) of the event that counts retired load uops which data sources were L3 Hit and a cross-core snoop missed in the on-pkg core cache.",
467 "SampleAfterValue": "20011", 580 "SampleAfterValue": "20011",
468 "CounterHTOff": "0,1,2,3" 581 "CounterHTOff": "0,1,2,3"
469 }, 582 },
470 { 583 {
471 "EventCode": "0xD2", 584 "EventCode": "0xD2",
472 "UMask": "0x2", 585 "UMask": "0x2",
473 "BriefDescription": "Retired load uops which data sources were L3 and cross-core snoop hits in on-pkg core cache.", 586 "BriefDescription": "Retired load uops which data sources were L3 and cross-core snoop hits in on-pkg core cache. (Precise Event - PEBS)",
474 "Data_LA": "1", 587 "Data_LA": "1",
475 "PEBS": "1", 588 "PEBS": "1",
476 "Counter": "0,1,2,3", 589 "Counter": "0,1,2,3",
477 "EventName": "MEM_LOAD_UOPS_L3_HIT_RETIRED.XSNP_HIT", 590 "EventName": "MEM_LOAD_UOPS_L3_HIT_RETIRED.XSNP_HIT",
478 "Errata": "BDM100", 591 "Errata": "BDM100",
479 "PublicDescription": "This is a non-precise version (that is, does not use PEBS) of the event that counts retired load uops which data sources were L3 hit and a cross-core snoop hit in the on-pkg core cache.", 592 "PublicDescription": "This is a precise version (that is, uses PEBS) of the event that counts retired load uops which data sources were L3 hit and a cross-core snoop hit in the on-pkg core cache.",
480 "SampleAfterValue": "20011", 593 "SampleAfterValue": "20011",
481 "CounterHTOff": "0,1,2,3" 594 "CounterHTOff": "0,1,2,3"
482 }, 595 },
483 { 596 {
484 "EventCode": "0xD2", 597 "EventCode": "0xD2",
485 "UMask": "0x4", 598 "UMask": "0x4",
486 "BriefDescription": "Retired load uops which data sources were HitM responses from shared L3.", 599 "BriefDescription": "Retired load uops which data sources were HitM responses from shared L3. (Precise Event - PEBS)",
487 "Data_LA": "1", 600 "Data_LA": "1",
488 "PEBS": "1", 601 "PEBS": "1",
489 "Counter": "0,1,2,3", 602 "Counter": "0,1,2,3",
490 "EventName": "MEM_LOAD_UOPS_L3_HIT_RETIRED.XSNP_HITM", 603 "EventName": "MEM_LOAD_UOPS_L3_HIT_RETIRED.XSNP_HITM",
491 "Errata": "BDM100", 604 "Errata": "BDM100",
492 "PublicDescription": "This is a non-precise version (that is, does not use PEBS) of the event that counts retired load uops which data sources were HitM responses from a core on same socket (shared L3).", 605 "PublicDescription": "This is a precise version (that is, uses PEBS) of the event that counts retired load uops which data sources were HitM responses from a core on same socket (shared L3).",
493 "SampleAfterValue": "20011", 606 "SampleAfterValue": "20011",
494 "CounterHTOff": "0,1,2,3" 607 "CounterHTOff": "0,1,2,3"
495 }, 608 },
496 { 609 {
497 "EventCode": "0xD2", 610 "EventCode": "0xD2",
498 "UMask": "0x8", 611 "UMask": "0x8",
499 "BriefDescription": "Retired load uops which data sources were hits in L3 without snoops required.", 612 "BriefDescription": "Retired load uops which data sources were hits in L3 without snoops required. (Precise Event - PEBS)",
500 "Data_LA": "1", 613 "Data_LA": "1",
501 "PEBS": "1", 614 "PEBS": "1",
502 "Counter": "0,1,2,3", 615 "Counter": "0,1,2,3",
503 "EventName": "MEM_LOAD_UOPS_L3_HIT_RETIRED.XSNP_NONE", 616 "EventName": "MEM_LOAD_UOPS_L3_HIT_RETIRED.XSNP_NONE",
504 "Errata": "BDM100", 617 "Errata": "BDM100",
505 "PublicDescription": "This is a non-precise version (that is, does not use PEBS) of the event that counts retired load uops which data sources were hits in the last-level (L3) cache without snoops required.", 618 "PublicDescription": "This is a precise version (that is, uses PEBS) of the event that counts retired load uops which data sources were hits in the last-level (L3) cache without snoops required.",
506 "SampleAfterValue": "100003", 619 "SampleAfterValue": "100003",
507 "CounterHTOff": "0,1,2,3" 620 "CounterHTOff": "0,1,2,3"
508 }, 621 },
509 { 622 {
510 "EventCode": "0xD3", 623 "EventCode": "0xD3",
511 "UMask": "0x1", 624 "UMask": "0x1",
512 "BriefDescription": "Data from local DRAM either Snoop not needed or Snoop Miss (RspI)",
513 "Data_LA": "1", 625 "Data_LA": "1",
514 "PEBS": "1", 626 "PEBS": "1",
515 "Counter": "0,1,2,3", 627 "Counter": "0,1,2,3",
516 "EventName": "MEM_LOAD_UOPS_L3_MISS_RETIRED.LOCAL_DRAM", 628 "EventName": "MEM_LOAD_UOPS_L3_MISS_RETIRED.LOCAL_DRAM",
517 "Errata": "BDE70, BDM100", 629 "Errata": "BDE70, BDM100",
518 "PublicDescription": "Retired load uop whose Data Source was: local DRAM either Snoop not needed or Snoop Miss (RspI).", 630 "PublicDescription": "This event counts retired load uops where the data came from local DRAM. This does not include hardware prefetches. This is a precise event.",
519 "SampleAfterValue": "100007", 631 "SampleAfterValue": "100007",
520 "CounterHTOff": "0,1,2,3" 632 "CounterHTOff": "0,1,2,3"
521 }, 633 },
522 { 634 {
523 "EventCode": "0xD3", 635 "EventCode": "0xD3",
524 "UMask": "0x4", 636 "UMask": "0x4",
525 "BriefDescription": "Retired load uop whose Data Source was: remote DRAM either Snoop not needed or Snoop Miss (RspI)", 637 "BriefDescription": "Retired load uop whose Data Source was: remote DRAM either Snoop not needed or Snoop Miss (RspI) (Precise Event)",
526 "Data_LA": "1", 638 "Data_LA": "1",
527 "PEBS": "1", 639 "PEBS": "1",
528 "Counter": "0,1,2,3", 640 "Counter": "0,1,2,3",
@@ -534,7 +646,7 @@
534 { 646 {
535 "EventCode": "0xD3", 647 "EventCode": "0xD3",
536 "UMask": "0x10", 648 "UMask": "0x10",
537 "BriefDescription": "Retired load uop whose Data Source was: Remote cache HITM", 649 "BriefDescription": "Retired load uop whose Data Source was: Remote cache HITM (Precise Event)",
538 "Data_LA": "1", 650 "Data_LA": "1",
539 "PEBS": "1", 651 "PEBS": "1",
540 "Counter": "0,1,2,3", 652 "Counter": "0,1,2,3",
@@ -546,7 +658,7 @@
546 { 658 {
547 "EventCode": "0xD3", 659 "EventCode": "0xD3",
548 "UMask": "0x20", 660 "UMask": "0x20",
549 "BriefDescription": "Retired load uop whose Data Source was: forwarded from remote cache", 661 "BriefDescription": "Retired load uop whose Data Source was: forwarded from remote cache (Precise Event)",
550 "Data_LA": "1", 662 "Data_LA": "1",
551 "PEBS": "1", 663 "PEBS": "1",
552 "Counter": "0,1,2,3", 664 "Counter": "0,1,2,3",
@@ -695,119 +807,6 @@
695 "CounterHTOff": "0,1,2,3,4,5,6,7" 807 "CounterHTOff": "0,1,2,3,4,5,6,7"
696 }, 808 },
697 { 809 {
698 "EventCode": "0x24",
699 "UMask": "0x42",
700 "BriefDescription": "RFO requests that hit L2 cache.",
701 "Counter": "0,1,2,3",
702 "EventName": "L2_RQSTS.RFO_HIT",
703 "SampleAfterValue": "200003",
704 "CounterHTOff": "0,1,2,3,4,5,6,7"
705 },
706 {
707 "EventCode": "0x24",
708 "UMask": "0x22",
709 "BriefDescription": "RFO requests that miss L2 cache.",
710 "Counter": "0,1,2,3",
711 "EventName": "L2_RQSTS.RFO_MISS",
712 "SampleAfterValue": "200003",
713 "CounterHTOff": "0,1,2,3,4,5,6,7"
714 },
715 {
716 "EventCode": "0x24",
717 "UMask": "0x44",
718 "BriefDescription": "L2 cache hits when fetching instructions, code reads.",
719 "Counter": "0,1,2,3",
720 "EventName": "L2_RQSTS.CODE_RD_HIT",
721 "SampleAfterValue": "200003",
722 "CounterHTOff": "0,1,2,3,4,5,6,7"
723 },
724 {
725 "EventCode": "0x24",
726 "UMask": "0x24",
727 "BriefDescription": "L2 cache misses when fetching instructions.",
728 "Counter": "0,1,2,3",
729 "EventName": "L2_RQSTS.CODE_RD_MISS",
730 "SampleAfterValue": "200003",
731 "CounterHTOff": "0,1,2,3,4,5,6,7"
732 },
733 {
734 "EventCode": "0x24",
735 "UMask": "0x27",
736 "BriefDescription": "Demand requests that miss L2 cache.",
737 "Counter": "0,1,2,3",
738 "EventName": "L2_RQSTS.ALL_DEMAND_MISS",
739 "SampleAfterValue": "200003",
740 "CounterHTOff": "0,1,2,3,4,5,6,7"
741 },
742 {
743 "EventCode": "0x24",
744 "UMask": "0xe7",
745 "BriefDescription": "Demand requests to L2 cache.",
746 "Counter": "0,1,2,3",
747 "EventName": "L2_RQSTS.ALL_DEMAND_REFERENCES",
748 "SampleAfterValue": "200003",
749 "CounterHTOff": "0,1,2,3,4,5,6,7"
750 },
751 {
752 "EventCode": "0x24",
753 "UMask": "0x3f",
754 "BriefDescription": "All requests that miss L2 cache.",
755 "Counter": "0,1,2,3",
756 "EventName": "L2_RQSTS.MISS",
757 "SampleAfterValue": "200003",
758 "CounterHTOff": "0,1,2,3,4,5,6,7"
759 },
760 {
761 "EventCode": "0x24",
762 "UMask": "0xff",
763 "BriefDescription": "All L2 requests.",
764 "Counter": "0,1,2,3",
765 "EventName": "L2_RQSTS.REFERENCES",
766 "SampleAfterValue": "200003",
767 "CounterHTOff": "0,1,2,3,4,5,6,7"
768 },
769 {
770 "EventCode": "0xB7, 0xBB",
771 "UMask": "0x1",
772 "BriefDescription": "Offcore response can be programmed only with a specific pair of event select and counter MSR, and with specific event codes and predefine mask bit value in a dedicated MSR to specify attributes of the offcore transaction.",
773 "Counter": "0,1,2,3",
774 "EventName": "OFFCORE_RESPONSE",
775 "SampleAfterValue": "100003",
776 "CounterHTOff": "0,1,2,3"
777 },
778 {
779 "EventCode": "0x60",
780 "UMask": "0x1",
781 "BriefDescription": "Cycles with at least 6 offcore outstanding Demand Data Read transactions in uncore queue.",
782 "Counter": "0,1,2,3",
783 "EventName": "OFFCORE_REQUESTS_OUTSTANDING.DEMAND_DATA_RD_GE_6",
784 "CounterMask": "6",
785 "Errata": "BDM76",
786 "SampleAfterValue": "2000003",
787 "CounterHTOff": "0,1,2,3,4,5,6,7"
788 },
789 {
790 "EventCode": "0x48",
791 "UMask": "0x1",
792 "BriefDescription": "Cycles with L1D load Misses outstanding from any thread on physical core.",
793 "Counter": "2",
794 "EventName": "L1D_PEND_MISS.PENDING_CYCLES_ANY",
795 "AnyThread": "1",
796 "CounterMask": "1",
797 "SampleAfterValue": "2000003",
798 "CounterHTOff": "2"
799 },
800 {
801 "EventCode": "0x48",
802 "UMask": "0x2",
803 "BriefDescription": "Cycles a demand request was blocked due to Fill Buffers inavailability.",
804 "Counter": "0,1,2,3",
805 "EventName": "L1D_PEND_MISS.FB_FULL",
806 "CounterMask": "1",
807 "SampleAfterValue": "2000003",
808 "CounterHTOff": "0,1,2,3,4,5,6,7"
809 },
810 {
811 "Offcore": "1", 810 "Offcore": "1",
812 "EventCode": "0xB7, 0xBB", 811 "EventCode": "0xB7, 0xBB",
813 "UMask": "0x1", 812 "UMask": "0x1",
@@ -816,6 +815,7 @@
816 "Counter": "0,1,2,3", 815 "Counter": "0,1,2,3",
817 "EventName": "OFFCORE_RESPONSE.ALL_REQUESTS.LLC_HIT.ANY_RESPONSE", 816 "EventName": "OFFCORE_RESPONSE.ALL_REQUESTS.LLC_HIT.ANY_RESPONSE",
818 "MSRIndex": "0x1a6,0x1a7", 817 "MSRIndex": "0x1a6,0x1a7",
818 "PublicDescription": "Counts all requests that hit in the L3 Offcore response can be programmed only with a specific pair of event select and counter MSR, and with specific event codes and predefine mask bit value in a dedicated MSR to specify attributes of the offcore transaction.",
819 "SampleAfterValue": "100003", 819 "SampleAfterValue": "100003",
820 "CounterHTOff": "0,1,2,3" 820 "CounterHTOff": "0,1,2,3"
821 }, 821 },
@@ -828,6 +828,7 @@
828 "Counter": "0,1,2,3", 828 "Counter": "0,1,2,3",
829 "EventName": "OFFCORE_RESPONSE.ALL_READS.LLC_HIT.HITM_OTHER_CORE", 829 "EventName": "OFFCORE_RESPONSE.ALL_READS.LLC_HIT.HITM_OTHER_CORE",
830 "MSRIndex": "0x1a6,0x1a7", 830 "MSRIndex": "0x1a6,0x1a7",
831 "PublicDescription": "Counts all data/code/rfo reads (demand & prefetch) that hit in the L3 and the snoop to one of the sibling cores hits the line in M state and the line is forwarded Offcore response can be programmed only with a specific pair of event select and counter MSR, and with specific event codes and predefine mask bit value in a dedicated MSR to specify attributes of the offcore transaction.",
831 "SampleAfterValue": "100003", 832 "SampleAfterValue": "100003",
832 "CounterHTOff": "0,1,2,3" 833 "CounterHTOff": "0,1,2,3"
833 }, 834 },
@@ -840,6 +841,7 @@
840 "Counter": "0,1,2,3", 841 "Counter": "0,1,2,3",
841 "EventName": "OFFCORE_RESPONSE.ALL_READS.LLC_HIT.HIT_OTHER_CORE_NO_FWD", 842 "EventName": "OFFCORE_RESPONSE.ALL_READS.LLC_HIT.HIT_OTHER_CORE_NO_FWD",
842 "MSRIndex": "0x1a6,0x1a7", 843 "MSRIndex": "0x1a6,0x1a7",
844 "PublicDescription": "Counts all data/code/rfo reads (demand & prefetch) that hit in the L3 and the snoops to sibling cores hit in either E/S state and the line is not forwarded Offcore response can be programmed only with a specific pair of event select and counter MSR, and with specific event codes and predefine mask bit value in a dedicated MSR to specify attributes of the offcore transaction.",
843 "SampleAfterValue": "100003", 845 "SampleAfterValue": "100003",
844 "CounterHTOff": "0,1,2,3" 846 "CounterHTOff": "0,1,2,3"
845 }, 847 },
@@ -852,6 +854,7 @@
852 "Counter": "0,1,2,3", 854 "Counter": "0,1,2,3",
853 "EventName": "OFFCORE_RESPONSE.ALL_CODE_RD.LLC_HIT.HIT_OTHER_CORE_NO_FWD", 855 "EventName": "OFFCORE_RESPONSE.ALL_CODE_RD.LLC_HIT.HIT_OTHER_CORE_NO_FWD",
854 "MSRIndex": "0x1a6,0x1a7", 856 "MSRIndex": "0x1a6,0x1a7",
857 "PublicDescription": "Counts all demand & prefetch code reads that hit in the L3 and the snoops to sibling cores hit in either E/S state and the line is not forwarded Offcore response can be programmed only with a specific pair of event select and counter MSR, and with specific event codes and predefine mask bit value in a dedicated MSR to specify attributes of the offcore transaction.",
855 "SampleAfterValue": "100003", 858 "SampleAfterValue": "100003",
856 "CounterHTOff": "0,1,2,3" 859 "CounterHTOff": "0,1,2,3"
857 }, 860 },
@@ -864,6 +867,7 @@
864 "Counter": "0,1,2,3", 867 "Counter": "0,1,2,3",
865 "EventName": "OFFCORE_RESPONSE.ALL_RFO.LLC_HIT.HITM_OTHER_CORE", 868 "EventName": "OFFCORE_RESPONSE.ALL_RFO.LLC_HIT.HITM_OTHER_CORE",
866 "MSRIndex": "0x1a6,0x1a7", 869 "MSRIndex": "0x1a6,0x1a7",
870 "PublicDescription": "Counts all demand & prefetch RFOs that hit in the L3 and the snoop to one of the sibling cores hits the line in M state and the line is forwarded Offcore response can be programmed only with a specific pair of event select and counter MSR, and with specific event codes and predefine mask bit value in a dedicated MSR to specify attributes of the offcore transaction.",
867 "SampleAfterValue": "100003", 871 "SampleAfterValue": "100003",
868 "CounterHTOff": "0,1,2,3" 872 "CounterHTOff": "0,1,2,3"
869 }, 873 },
@@ -876,6 +880,7 @@
876 "Counter": "0,1,2,3", 880 "Counter": "0,1,2,3",
877 "EventName": "OFFCORE_RESPONSE.ALL_RFO.LLC_HIT.HIT_OTHER_CORE_NO_FWD", 881 "EventName": "OFFCORE_RESPONSE.ALL_RFO.LLC_HIT.HIT_OTHER_CORE_NO_FWD",
878 "MSRIndex": "0x1a6,0x1a7", 882 "MSRIndex": "0x1a6,0x1a7",
883 "PublicDescription": "Counts all demand & prefetch RFOs that hit in the L3 and the snoops to sibling cores hit in either E/S state and the line is not forwarded Offcore response can be programmed only with a specific pair of event select and counter MSR, and with specific event codes and predefine mask bit value in a dedicated MSR to specify attributes of the offcore transaction.",
879 "SampleAfterValue": "100003", 884 "SampleAfterValue": "100003",
880 "CounterHTOff": "0,1,2,3" 885 "CounterHTOff": "0,1,2,3"
881 }, 886 },
@@ -888,6 +893,7 @@
888 "Counter": "0,1,2,3", 893 "Counter": "0,1,2,3",
889 "EventName": "OFFCORE_RESPONSE.ALL_DATA_RD.LLC_HIT.HITM_OTHER_CORE", 894 "EventName": "OFFCORE_RESPONSE.ALL_DATA_RD.LLC_HIT.HITM_OTHER_CORE",
890 "MSRIndex": "0x1a6,0x1a7", 895 "MSRIndex": "0x1a6,0x1a7",
896 "PublicDescription": "Counts all demand & prefetch data reads that hit in the L3 and the snoop to one of the sibling cores hits the line in M state and the line is forwarded Offcore response can be programmed only with a specific pair of event select and counter MSR, and with specific event codes and predefine mask bit value in a dedicated MSR to specify attributes of the offcore transaction.",
891 "SampleAfterValue": "100003", 897 "SampleAfterValue": "100003",
892 "CounterHTOff": "0,1,2,3" 898 "CounterHTOff": "0,1,2,3"
893 }, 899 },
@@ -900,6 +906,7 @@
900 "Counter": "0,1,2,3", 906 "Counter": "0,1,2,3",
901 "EventName": "OFFCORE_RESPONSE.ALL_DATA_RD.LLC_HIT.HIT_OTHER_CORE_NO_FWD", 907 "EventName": "OFFCORE_RESPONSE.ALL_DATA_RD.LLC_HIT.HIT_OTHER_CORE_NO_FWD",
902 "MSRIndex": "0x1a6,0x1a7", 908 "MSRIndex": "0x1a6,0x1a7",
909 "PublicDescription": "Counts all demand & prefetch data reads that hit in the L3 and the snoops to sibling cores hit in either E/S state and the line is not forwarded Offcore response can be programmed only with a specific pair of event select and counter MSR, and with specific event codes and predefine mask bit value in a dedicated MSR to specify attributes of the offcore transaction.",
903 "SampleAfterValue": "100003", 910 "SampleAfterValue": "100003",
904 "CounterHTOff": "0,1,2,3" 911 "CounterHTOff": "0,1,2,3"
905 }, 912 },
@@ -912,6 +919,7 @@
912 "Counter": "0,1,2,3", 919 "Counter": "0,1,2,3",
913 "EventName": "OFFCORE_RESPONSE.PF_LLC_CODE_RD.LLC_HIT.ANY_RESPONSE", 920 "EventName": "OFFCORE_RESPONSE.PF_LLC_CODE_RD.LLC_HIT.ANY_RESPONSE",
914 "MSRIndex": "0x1a6,0x1a7", 921 "MSRIndex": "0x1a6,0x1a7",
922 "PublicDescription": "Counts prefetch (that bring data to LLC only) code reads that hit in the L3 Offcore response can be programmed only with a specific pair of event select and counter MSR, and with specific event codes and predefine mask bit value in a dedicated MSR to specify attributes of the offcore transaction.",
915 "SampleAfterValue": "100003", 923 "SampleAfterValue": "100003",
916 "CounterHTOff": "0,1,2,3" 924 "CounterHTOff": "0,1,2,3"
917 }, 925 },
@@ -924,6 +932,7 @@
924 "Counter": "0,1,2,3", 932 "Counter": "0,1,2,3",
925 "EventName": "OFFCORE_RESPONSE.PF_LLC_RFO.LLC_HIT.ANY_RESPONSE", 933 "EventName": "OFFCORE_RESPONSE.PF_LLC_RFO.LLC_HIT.ANY_RESPONSE",
926 "MSRIndex": "0x1a6,0x1a7", 934 "MSRIndex": "0x1a6,0x1a7",
935 "PublicDescription": "Counts all prefetch (that bring data to LLC only) RFOs that hit in the L3 Offcore response can be programmed only with a specific pair of event select and counter MSR, and with specific event codes and predefine mask bit value in a dedicated MSR to specify attributes of the offcore transaction.",
927 "SampleAfterValue": "100003", 936 "SampleAfterValue": "100003",
928 "CounterHTOff": "0,1,2,3" 937 "CounterHTOff": "0,1,2,3"
929 }, 938 },
@@ -936,6 +945,20 @@
936 "Counter": "0,1,2,3", 945 "Counter": "0,1,2,3",
937 "EventName": "OFFCORE_RESPONSE.DEMAND_RFO.LLC_HIT.HITM_OTHER_CORE", 946 "EventName": "OFFCORE_RESPONSE.DEMAND_RFO.LLC_HIT.HITM_OTHER_CORE",
938 "MSRIndex": "0x1a6,0x1a7", 947 "MSRIndex": "0x1a6,0x1a7",
948 "PublicDescription": "Counts all demand data writes (RFOs) that hit in the L3 and the snoop to one of the sibling cores hits the line in M state and the line is forwarded Offcore response can be programmed only with a specific pair of event select and counter MSR, and with specific event codes and predefine mask bit value in a dedicated MSR to specify attributes of the offcore transaction.",
949 "SampleAfterValue": "100003",
950 "CounterHTOff": "0,1,2,3"
951 },
952 {
953 "Offcore": "1",
954 "EventCode": "0xB7, 0xBB",
955 "UMask": "0x1",
956 "BriefDescription": "Counts all demand data writes (RFOs) that hit in the L3",
957 "MSRValue": "0x3f803c0002",
958 "Counter": "0,1,2,3",
959 "EventName": "OFFCORE_RESPONSE.DEMAND_RFO.LLC_HIT.ANY_RESPONSE",
960 "MSRIndex": "0x1a6,0x1a7",
961 "PublicDescription": "Counts all demand data writes (RFOs) that hit in the L3 Offcore response can be programmed only with a specific pair of event select and counter MSR, and with specific event codes and predefine mask bit value in a dedicated MSR to specify attributes of the offcore transaction.",
939 "SampleAfterValue": "100003", 962 "SampleAfterValue": "100003",
940 "CounterHTOff": "0,1,2,3" 963 "CounterHTOff": "0,1,2,3"
941 } 964 }
diff --git a/tools/perf/pmu-events/arch/x86/broadwellx/floating-point.json b/tools/perf/pmu-events/arch/x86/broadwellx/floating-point.json
index 4ae1ea24f22f..d7b9d9c9c518 100644
--- a/tools/perf/pmu-events/arch/x86/broadwellx/floating-point.json
+++ b/tools/perf/pmu-events/arch/x86/broadwellx/floating-point.json
@@ -6,7 +6,7 @@
6 "Counter": "0,1,2,3", 6 "Counter": "0,1,2,3",
7 "EventName": "OTHER_ASSISTS.AVX_TO_SSE", 7 "EventName": "OTHER_ASSISTS.AVX_TO_SSE",
8 "Errata": "BDM30", 8 "Errata": "BDM30",
9 "PublicDescription": "This is a non-precise version (that is, does not use PEBS) of the event that counts the number of transitions from AVX-256 to legacy SSE when penalty is applicable.", 9 "PublicDescription": "This event counts the number of transitions from AVX-256 to legacy SSE when penalty is applicable.",
10 "SampleAfterValue": "100003", 10 "SampleAfterValue": "100003",
11 "CounterHTOff": "0,1,2,3,4,5,6,7" 11 "CounterHTOff": "0,1,2,3,4,5,6,7"
12 }, 12 },
@@ -17,7 +17,7 @@
17 "Counter": "0,1,2,3", 17 "Counter": "0,1,2,3",
18 "EventName": "OTHER_ASSISTS.SSE_TO_AVX", 18 "EventName": "OTHER_ASSISTS.SSE_TO_AVX",
19 "Errata": "BDM30", 19 "Errata": "BDM30",
20 "PublicDescription": "This is a non-precise version (that is, does not use PEBS) of the event that counts the number of transitions from legacy SSE to AVX-256 when penalty is applicable.", 20 "PublicDescription": "This event counts the number of transitions from legacy SSE to AVX-256 when penalty is applicable.",
21 "SampleAfterValue": "100003", 21 "SampleAfterValue": "100003",
22 "CounterHTOff": "0,1,2,3,4,5,6,7" 22 "CounterHTOff": "0,1,2,3,4,5,6,7"
23 }, 23 },
@@ -25,7 +25,6 @@
25 "EventCode": "0xC7", 25 "EventCode": "0xC7",
26 "UMask": "0x1", 26 "UMask": "0x1",
27 "BriefDescription": "Number of SSE/AVX computational scalar double precision floating-point instructions retired. Each count represents 1 computation. Applies to SSE* and AVX* scalar double precision floating-point instructions: ADD SUB MUL DIV MIN MAX SQRT FM(N)ADD/SUB. FM(N)ADD/SUB instructions count twice as they perform multiple calculations per element.", 27 "BriefDescription": "Number of SSE/AVX computational scalar double precision floating-point instructions retired. Each count represents 1 computation. Applies to SSE* and AVX* scalar double precision floating-point instructions: ADD SUB MUL DIV MIN MAX SQRT FM(N)ADD/SUB. FM(N)ADD/SUB instructions count twice as they perform multiple calculations per element.",
28 "PEBS": "1",
29 "Counter": "0,1,2,3", 28 "Counter": "0,1,2,3",
30 "EventName": "FP_ARITH_INST_RETIRED.SCALAR_DOUBLE", 29 "EventName": "FP_ARITH_INST_RETIRED.SCALAR_DOUBLE",
31 "SampleAfterValue": "2000003", 30 "SampleAfterValue": "2000003",
@@ -35,7 +34,6 @@
35 "EventCode": "0xC7", 34 "EventCode": "0xC7",
36 "UMask": "0x2", 35 "UMask": "0x2",
37 "BriefDescription": "Number of SSE/AVX computational scalar single precision floating-point instructions retired. Each count represents 1 computation. Applies to SSE* and AVX* scalar single precision floating-point instructions: ADD SUB MUL DIV MIN MAX RCP RSQRT SQRT FM(N)ADD/SUB. FM(N)ADD/SUB instructions count twice as they perform multiple calculations per element.", 36 "BriefDescription": "Number of SSE/AVX computational scalar single precision floating-point instructions retired. Each count represents 1 computation. Applies to SSE* and AVX* scalar single precision floating-point instructions: ADD SUB MUL DIV MIN MAX RCP RSQRT SQRT FM(N)ADD/SUB. FM(N)ADD/SUB instructions count twice as they perform multiple calculations per element.",
38 "PEBS": "1",
39 "Counter": "0,1,2,3", 37 "Counter": "0,1,2,3",
40 "EventName": "FP_ARITH_INST_RETIRED.SCALAR_SINGLE", 38 "EventName": "FP_ARITH_INST_RETIRED.SCALAR_SINGLE",
41 "SampleAfterValue": "2000003", 39 "SampleAfterValue": "2000003",
@@ -43,9 +41,17 @@
43 }, 41 },
44 { 42 {
45 "EventCode": "0xC7", 43 "EventCode": "0xC7",
44 "UMask": "0x3",
45 "BriefDescription": "Number of SSE/AVX computational scalar floating-point instructions retired. Applies to SSE* and AVX* scalar, double and single precision floating-point: ADD SUB MUL DIV MIN MAX RSQRT RCP SQRT FM(N)ADD/SUB. FM(N)ADD/SUB instructions count twice as they perform multiple calculations per element.",
46 "Counter": "0,1,2,3",
47 "EventName": "FP_ARITH_INST_RETIRED.SCALAR",
48 "SampleAfterValue": "2000003",
49 "CounterHTOff": "0,1,2,3"
50 },
51 {
52 "EventCode": "0xC7",
46 "UMask": "0x4", 53 "UMask": "0x4",
47 "BriefDescription": "Number of SSE/AVX computational 128-bit packed double precision floating-point instructions retired. Each count represents 2 computations. Applies to SSE* and AVX* packed double precision floating-point instructions: ADD SUB MUL DIV MIN MAX SQRT DPP FM(N)ADD/SUB. DPP and FM(N)ADD/SUB instructions count twice as they perform multiple calculations per element.", 54 "BriefDescription": "Number of SSE/AVX computational 128-bit packed double precision floating-point instructions retired. Each count represents 2 computations. Applies to SSE* and AVX* packed double precision floating-point instructions: ADD SUB MUL DIV MIN MAX SQRT DPP FM(N)ADD/SUB. DPP and FM(N)ADD/SUB instructions count twice as they perform multiple calculations per element.",
48 "PEBS": "1",
49 "Counter": "0,1,2,3", 55 "Counter": "0,1,2,3",
50 "EventName": "FP_ARITH_INST_RETIRED.128B_PACKED_DOUBLE", 56 "EventName": "FP_ARITH_INST_RETIRED.128B_PACKED_DOUBLE",
51 "SampleAfterValue": "2000003", 57 "SampleAfterValue": "2000003",
@@ -55,7 +61,6 @@
55 "EventCode": "0xC7", 61 "EventCode": "0xC7",
56 "UMask": "0x8", 62 "UMask": "0x8",
57 "BriefDescription": "Number of SSE/AVX computational 128-bit packed single precision floating-point instructions retired. Each count represents 4 computations. Applies to SSE* and AVX* packed single precision floating-point instructions: ADD SUB MUL DIV MIN MAX RCP RSQRT SQRT DPP FM(N)ADD/SUB. DPP and FM(N)ADD/SUB instructions count twice as they perform multiple calculations per element.", 63 "BriefDescription": "Number of SSE/AVX computational 128-bit packed single precision floating-point instructions retired. Each count represents 4 computations. Applies to SSE* and AVX* packed single precision floating-point instructions: ADD SUB MUL DIV MIN MAX RCP RSQRT SQRT DPP FM(N)ADD/SUB. DPP and FM(N)ADD/SUB instructions count twice as they perform multiple calculations per element.",
58 "PEBS": "1",
59 "Counter": "0,1,2,3", 64 "Counter": "0,1,2,3",
60 "EventName": "FP_ARITH_INST_RETIRED.128B_PACKED_SINGLE", 65 "EventName": "FP_ARITH_INST_RETIRED.128B_PACKED_SINGLE",
61 "SampleAfterValue": "2000003", 66 "SampleAfterValue": "2000003",
@@ -65,19 +70,54 @@
65 "EventCode": "0xC7", 70 "EventCode": "0xC7",
66 "UMask": "0x10", 71 "UMask": "0x10",
67 "BriefDescription": "Number of SSE/AVX computational 256-bit packed double precision floating-point instructions retired. Each count represents 4 computations. Applies to SSE* and AVX* packed double precision floating-point instructions: ADD SUB MUL DIV MIN MAX SQRT DPP FM(N)ADD/SUB. DPP and FM(N)ADD/SUB instructions count twice as they perform multiple calculations per element.", 72 "BriefDescription": "Number of SSE/AVX computational 256-bit packed double precision floating-point instructions retired. Each count represents 4 computations. Applies to SSE* and AVX* packed double precision floating-point instructions: ADD SUB MUL DIV MIN MAX SQRT DPP FM(N)ADD/SUB. DPP and FM(N)ADD/SUB instructions count twice as they perform multiple calculations per element.",
68 "PEBS": "1",
69 "Counter": "0,1,2,3", 73 "Counter": "0,1,2,3",
70 "EventName": "FP_ARITH_INST_RETIRED.256B_PACKED_DOUBLE", 74 "EventName": "FP_ARITH_INST_RETIRED.256B_PACKED_DOUBLE",
71 "SampleAfterValue": "2000003", 75 "SampleAfterValue": "2000003",
72 "CounterHTOff": "0,1,2,3" 76 "CounterHTOff": "0,1,2,3"
73 }, 77 },
74 { 78 {
79 "EventCode": "0xC7",
80 "UMask": "0x15",
81 "BriefDescription": "Number of SSE/AVX computational double precision floating-point instructions retired. Applies to SSE* and AVX*scalar, double and single precision floating-point: ADD SUB MUL DIV MIN MAX SQRT DPP FM(N)ADD/SUB. DPP and FM(N)ADD/SUB instructions count twice as they perform multiple calculations per element. ?.",
82 "Counter": "0,1,2,3",
83 "EventName": "FP_ARITH_INST_RETIRED.DOUBLE",
84 "SampleAfterValue": "2000006",
85 "CounterHTOff": "0,1,2,3"
86 },
87 {
88 "EventCode": "0xc7",
89 "UMask": "0x20",
90 "BriefDescription": "Number of SSE/AVX computational 256-bit packed single precision floating-point instructions retired. Each count represents 8 computations. Applies to SSE* and AVX* packed single precision floating-point instructions: ADD SUB MUL DIV MIN MAX RCP RSQRT SQRT DPP FM(N)ADD/SUB. DPP and FM(N)ADD/SUB instructions count twice as they perform multiple calculations per element.",
91 "Counter": "0,1,2,3",
92 "EventName": "FP_ARITH_INST_RETIRED.256B_PACKED_SINGLE",
93 "SampleAfterValue": "2000003",
94 "CounterHTOff": "0,1,2,3"
95 },
96 {
97 "EventCode": "0xC7",
98 "UMask": "0x2a",
99 "BriefDescription": "Number of SSE/AVX computational single precision floating-point instructions retired. Applies to SSE* and AVX*scalar, double and single precision floating-point: ADD SUB MUL DIV MIN MAX RCP RSQRT SQRT DPP FM(N)ADD/SUB. DPP and FM(N)ADD/SUB instructions count twice as they perform multiple calculations per element. ?.",
100 "Counter": "0,1,2,3",
101 "EventName": "FP_ARITH_INST_RETIRED.SINGLE",
102 "SampleAfterValue": "2000005",
103 "CounterHTOff": "0,1,2,3"
104 },
105 {
106 "EventCode": "0xC7",
107 "UMask": "0x3c",
108 "BriefDescription": "Number of SSE/AVX computational packed floating-point instructions retired. Applies to SSE* and AVX*, packed, double and single precision floating-point: ADD SUB MUL DIV MIN MAX RSQRT RCP SQRT DPP FM(N)ADD/SUB. DPP and FM(N)ADD/SUB instructions count twice as they perform multiple calculations per element.",
109 "Counter": "0,1,2,3",
110 "EventName": "FP_ARITH_INST_RETIRED.PACKED",
111 "SampleAfterValue": "2000004",
112 "CounterHTOff": "0,1,2,3"
113 },
114 {
75 "EventCode": "0xCA", 115 "EventCode": "0xCA",
76 "UMask": "0x2", 116 "UMask": "0x2",
77 "BriefDescription": "Number of X87 assists due to output value.", 117 "BriefDescription": "Number of X87 assists due to output value.",
78 "Counter": "0,1,2,3", 118 "Counter": "0,1,2,3",
79 "EventName": "FP_ASSIST.X87_OUTPUT", 119 "EventName": "FP_ASSIST.X87_OUTPUT",
80 "PublicDescription": "This is a non-precise version (that is, does not use PEBS) of the event that counts the number of x87 floating point (FP) micro-code assist (numeric overflow/underflow, inexact result) when the output value (destination register) is invalid.", 120 "PublicDescription": "This event counts the number of x87 floating point (FP) micro-code assist (numeric overflow/underflow, inexact result) when the output value (destination register) is invalid.",
81 "SampleAfterValue": "100003", 121 "SampleAfterValue": "100003",
82 "CounterHTOff": "0,1,2,3,4,5,6,7" 122 "CounterHTOff": "0,1,2,3,4,5,6,7"
83 }, 123 },
@@ -87,7 +127,7 @@
87 "BriefDescription": "Number of X87 assists due to input value.", 127 "BriefDescription": "Number of X87 assists due to input value.",
88 "Counter": "0,1,2,3", 128 "Counter": "0,1,2,3",
89 "EventName": "FP_ASSIST.X87_INPUT", 129 "EventName": "FP_ASSIST.X87_INPUT",
90 "PublicDescription": "This is a non-precise version (that is, does not use PEBS) of the event that counts x87 floating point (FP) micro-code assist (invalid operation, denormal operand, SNaN operand) when the input value (one of the source operands to an FP instruction) is invalid.", 130 "PublicDescription": "This event counts x87 floating point (FP) micro-code assist (invalid operation, denormal operand, SNaN operand) when the input value (one of the source operands to an FP instruction) is invalid.",
91 "SampleAfterValue": "100003", 131 "SampleAfterValue": "100003",
92 "CounterHTOff": "0,1,2,3,4,5,6,7" 132 "CounterHTOff": "0,1,2,3,4,5,6,7"
93 }, 133 },
@@ -97,7 +137,7 @@
97 "BriefDescription": "Number of SIMD FP assists due to Output values", 137 "BriefDescription": "Number of SIMD FP assists due to Output values",
98 "Counter": "0,1,2,3", 138 "Counter": "0,1,2,3",
99 "EventName": "FP_ASSIST.SIMD_OUTPUT", 139 "EventName": "FP_ASSIST.SIMD_OUTPUT",
100 "PublicDescription": "This is a non-precise version (that is, does not use PEBS) of the event that counts the number of SSE* floating point (FP) micro-code assist (numeric overflow/underflow) when the output value (destination register) is invalid. Counting covers only cases involving penalties that require micro-code assist intervention.", 140 "PublicDescription": "This event counts the number of SSE* floating point (FP) micro-code assist (numeric overflow/underflow) when the output value (destination register) is invalid. Counting covers only cases involving penalties that require micro-code assist intervention.",
101 "SampleAfterValue": "100003", 141 "SampleAfterValue": "100003",
102 "CounterHTOff": "0,1,2,3,4,5,6,7" 142 "CounterHTOff": "0,1,2,3,4,5,6,7"
103 }, 143 },
@@ -107,7 +147,7 @@
107 "BriefDescription": "Number of SIMD FP assists due to input values", 147 "BriefDescription": "Number of SIMD FP assists due to input values",
108 "Counter": "0,1,2,3", 148 "Counter": "0,1,2,3",
109 "EventName": "FP_ASSIST.SIMD_INPUT", 149 "EventName": "FP_ASSIST.SIMD_INPUT",
110 "PublicDescription": "This is a non-precise version (that is, does not use PEBS) of the event that counts any input SSE* FP assist - invalid operation, denormal operand, dividing by zero, SNaN operand. Counting includes only cases involving penalties that required micro-code assist intervention.", 150 "PublicDescription": "This event counts any input SSE* FP assist - invalid operation, denormal operand, dividing by zero, SNaN operand. Counting includes only cases involving penalties that required micro-code assist intervention.",
111 "SampleAfterValue": "100003", 151 "SampleAfterValue": "100003",
112 "CounterHTOff": "0,1,2,3,4,5,6,7" 152 "CounterHTOff": "0,1,2,3,4,5,6,7"
113 }, 153 },
@@ -121,51 +161,5 @@
121 "PublicDescription": "This event counts cycles with any input and output SSE or x87 FP assist. If an input and output assist are detected on the same cycle the event increments by 1.", 161 "PublicDescription": "This event counts cycles with any input and output SSE or x87 FP assist. If an input and output assist are detected on the same cycle the event increments by 1.",
122 "SampleAfterValue": "100003", 162 "SampleAfterValue": "100003",
123 "CounterHTOff": "0,1,2,3" 163 "CounterHTOff": "0,1,2,3"
124 },
125 {
126 "EventCode": "0xc7",
127 "UMask": "0x20",
128 "BriefDescription": "Number of SSE/AVX computational 256-bit packed single precision floating-point instructions retired. Each count represents 8 computations. Applies to SSE* and AVX* packed single precision floating-point instructions: ADD SUB MUL DIV MIN MAX RCP RSQRT SQRT DPP FM(N)ADD/SUB. DPP and FM(N)ADD/SUB instructions count twice as they perform multiple calculations per element.",
129 "PEBS": "1",
130 "Counter": "0,1,2,3",
131 "EventName": "FP_ARITH_INST_RETIRED.256B_PACKED_SINGLE",
132 "SampleAfterValue": "2000003",
133 "CounterHTOff": "0,1,2,3"
134 },
135 {
136 "EventCode": "0xC7",
137 "UMask": "0x3",
138 "BriefDescription": "Number of SSE/AVX computational scalar floating-point instructions retired. Applies to SSE* and AVX* scalar, double and single precision floating-point: ADD SUB MUL DIV MIN MAX RSQRT RCP SQRT FM(N)ADD/SUB. FM(N)ADD/SUB instructions count twice as they perform multiple calculations per element.",
139 "Counter": "0,1,2,3",
140 "EventName": "FP_ARITH_INST_RETIRED.SCALAR",
141 "SampleAfterValue": "2000003",
142 "CounterHTOff": "0,1,2,3"
143 },
144 {
145 "EventCode": "0xC7",
146 "UMask": "0x3c",
147 "BriefDescription": "Number of SSE/AVX computational packed floating-point instructions retired. Applies to SSE* and AVX*, packed, double and single precision floating-point: ADD SUB MUL DIV MIN MAX RSQRT RCP SQRT DPP FM(N)ADD/SUB. DPP and FM(N)ADD/SUB instructions count twice as they perform multiple calculations per element.",
148 "Counter": "0,1,2,3",
149 "EventName": "FP_ARITH_INST_RETIRED.PACKED",
150 "SampleAfterValue": "2000004",
151 "CounterHTOff": "0,1,2,3"
152 },
153 {
154 "EventCode": "0xC7",
155 "UMask": "0x2a",
156 "BriefDescription": "Number of SSE/AVX computational single precision floating-point instructions retired. Applies to SSE* and AVX*scalar, double and single precision floating-point: ADD SUB MUL DIV MIN MAX RCP RSQRT SQRT DPP FM(N)ADD/SUB. DPP and FM(N)ADD/SUB instructions count twice as they perform multiple calculations per element. ?.",
157 "Counter": "0,1,2,3",
158 "EventName": "FP_ARITH_INST_RETIRED.SINGLE",
159 "SampleAfterValue": "2000005",
160 "CounterHTOff": "0,1,2,3"
161 },
162 {
163 "EventCode": "0xC7",
164 "UMask": "0x15",
165 "BriefDescription": "Number of SSE/AVX computational double precision floating-point instructions retired. Applies to SSE* and AVX*scalar, double and single precision floating-point: ADD SUB MUL DIV MIN MAX SQRT DPP FM(N)ADD/SUB. DPP and FM(N)ADD/SUB instructions count twice as they perform multiple calculations per element. ?.",
166 "Counter": "0,1,2,3",
167 "EventName": "FP_ARITH_INST_RETIRED.DOUBLE",
168 "SampleAfterValue": "2000006",
169 "CounterHTOff": "0,1,2,3"
170 } 164 }
171] \ No newline at end of file 165] \ No newline at end of file
diff --git a/tools/perf/pmu-events/arch/x86/broadwellx/frontend.json b/tools/perf/pmu-events/arch/x86/broadwellx/frontend.json
index 06bf0a40e568..72781e1e3362 100644
--- a/tools/perf/pmu-events/arch/x86/broadwellx/frontend.json
+++ b/tools/perf/pmu-events/arch/x86/broadwellx/frontend.json
@@ -15,80 +15,49 @@
15 "BriefDescription": "Uops delivered to Instruction Decode Queue (IDQ) from MITE path", 15 "BriefDescription": "Uops delivered to Instruction Decode Queue (IDQ) from MITE path",
16 "Counter": "0,1,2,3", 16 "Counter": "0,1,2,3",
17 "EventName": "IDQ.MITE_UOPS", 17 "EventName": "IDQ.MITE_UOPS",
18 "PublicDescription": "This event counts the number of uops delivered to Instruction Decode Queue (IDQ) from the MITE path. Counting includes uops that may \"bypass\" the IDQ. This also means that uops are not being delivered from the Decode Stream Buffer (DSB).", 18 "PublicDescription": "This event counts the number of uops delivered to Instruction Decode Queue (IDQ) from the MITE path. Counting includes uops that may bypass the IDQ. This also means that uops are not being delivered from the Decode Stream Buffer (DSB).",
19 "SampleAfterValue": "2000003", 19 "SampleAfterValue": "2000003",
20 "CounterHTOff": "0,1,2,3,4,5,6,7" 20 "CounterHTOff": "0,1,2,3,4,5,6,7"
21 }, 21 },
22 { 22 {
23 "EventCode": "0x79", 23 "EventCode": "0x79",
24 "UMask": "0x8", 24 "UMask": "0x4",
25 "BriefDescription": "Uops delivered to Instruction Decode Queue (IDQ) from the Decode Stream Buffer (DSB) path", 25 "BriefDescription": "Cycles when uops are being delivered to Instruction Decode Queue (IDQ) from MITE path",
26 "Counter": "0,1,2,3",
27 "EventName": "IDQ.DSB_UOPS",
28 "PublicDescription": "This event counts the number of uops delivered to Instruction Decode Queue (IDQ) from the Decode Stream Buffer (DSB) path. Counting includes uops that may \"bypass\" the IDQ.",
29 "SampleAfterValue": "2000003",
30 "CounterHTOff": "0,1,2,3,4,5,6,7"
31 },
32 {
33 "EventCode": "0x79",
34 "UMask": "0x10",
35 "BriefDescription": "Uops initiated by Decode Stream Buffer (DSB) that are being delivered to Instruction Decode Queue (IDQ) while Microcode Sequenser (MS) is busy",
36 "Counter": "0,1,2,3",
37 "EventName": "IDQ.MS_DSB_UOPS",
38 "PublicDescription": "This event counts the number of uops initiated by Decode Stream Buffer (DSB) that are being delivered to Instruction Decode Queue (IDQ) while the Microcode Sequencer (MS) is busy. Counting includes uops that may \"bypass\" the IDQ.",
39 "SampleAfterValue": "2000003",
40 "CounterHTOff": "0,1,2,3,4,5,6,7"
41 },
42 {
43 "EventCode": "0x79",
44 "UMask": "0x20",
45 "BriefDescription": "Uops initiated by MITE and delivered to Instruction Decode Queue (IDQ) while Microcode Sequenser (MS) is busy",
46 "Counter": "0,1,2,3",
47 "EventName": "IDQ.MS_MITE_UOPS",
48 "PublicDescription": "This event counts the number of uops initiated by MITE and delivered to Instruction Decode Queue (IDQ) while the Microcode Sequenser (MS) is busy. Counting includes uops that may \"bypass\" the IDQ.",
49 "SampleAfterValue": "2000003",
50 "CounterHTOff": "0,1,2,3,4,5,6,7"
51 },
52 {
53 "EventCode": "0x79",
54 "UMask": "0x30",
55 "BriefDescription": "Uops delivered to Instruction Decode Queue (IDQ) while Microcode Sequenser (MS) is busy",
56 "Counter": "0,1,2,3", 26 "Counter": "0,1,2,3",
57 "EventName": "IDQ.MS_UOPS", 27 "EventName": "IDQ.MITE_CYCLES",
58 "PublicDescription": "This event counts the total number of uops delivered to Instruction Decode Queue (IDQ) while the Microcode Sequenser (MS) is busy. Counting includes uops that may \"bypass\" the IDQ. Uops maybe initiated by Decode Stream Buffer (DSB) or MITE.", 28 "CounterMask": "1",
29 "PublicDescription": "This event counts cycles during which uops are being delivered to Instruction Decode Queue (IDQ) from the MITE path. Counting includes uops that may bypass the IDQ.",
59 "SampleAfterValue": "2000003", 30 "SampleAfterValue": "2000003",
60 "CounterHTOff": "0,1,2,3,4,5,6,7" 31 "CounterHTOff": "0,1,2,3,4,5,6,7"
61 }, 32 },
62 { 33 {
63 "EventCode": "0x79", 34 "EventCode": "0x79",
64 "UMask": "0x30", 35 "UMask": "0x8",
65 "BriefDescription": "Cycles when uops are being delivered to Instruction Decode Queue (IDQ) while Microcode Sequenser (MS) is busy", 36 "BriefDescription": "Uops delivered to Instruction Decode Queue (IDQ) from the Decode Stream Buffer (DSB) path",
66 "Counter": "0,1,2,3", 37 "Counter": "0,1,2,3",
67 "EventName": "IDQ.MS_CYCLES", 38 "EventName": "IDQ.DSB_UOPS",
68 "CounterMask": "1", 39 "PublicDescription": "This event counts the number of uops delivered to Instruction Decode Queue (IDQ) from the Decode Stream Buffer (DSB) path. Counting includes uops that may bypass the IDQ.",
69 "PublicDescription": "This event counts cycles during which uops are being delivered to Instruction Decode Queue (IDQ) while the Microcode Sequenser (MS) is busy. Counting includes uops that may \"bypass\" the IDQ. Uops maybe initiated by Decode Stream Buffer (DSB) or MITE.",
70 "SampleAfterValue": "2000003", 40 "SampleAfterValue": "2000003",
71 "CounterHTOff": "0,1,2,3,4,5,6,7" 41 "CounterHTOff": "0,1,2,3,4,5,6,7"
72 }, 42 },
73 { 43 {
74 "EventCode": "0x79", 44 "EventCode": "0x79",
75 "UMask": "0x4", 45 "UMask": "0x8",
76 "BriefDescription": "Cycles when uops are being delivered to Instruction Decode Queue (IDQ) from MITE path", 46 "BriefDescription": "Cycles when uops are being delivered to Instruction Decode Queue (IDQ) from Decode Stream Buffer (DSB) path",
77 "Counter": "0,1,2,3", 47 "Counter": "0,1,2,3",
78 "EventName": "IDQ.MITE_CYCLES", 48 "EventName": "IDQ.DSB_CYCLES",
79 "CounterMask": "1", 49 "CounterMask": "1",
80 "PublicDescription": "This event counts cycles during which uops are being delivered to Instruction Decode Queue (IDQ) from the MITE path. Counting includes uops that may \"bypass\" the IDQ.", 50 "PublicDescription": "This event counts cycles during which uops are being delivered to Instruction Decode Queue (IDQ) from the Decode Stream Buffer (DSB) path. Counting includes uops that may bypass the IDQ.",
81 "SampleAfterValue": "2000003", 51 "SampleAfterValue": "2000003",
82 "CounterHTOff": "0,1,2,3,4,5,6,7" 52 "CounterHTOff": "0,1,2,3,4,5,6,7"
83 }, 53 },
84 { 54 {
85 "EventCode": "0x79", 55 "EventCode": "0x79",
86 "UMask": "0x8", 56 "UMask": "0x10",
87 "BriefDescription": "Cycles when uops are being delivered to Instruction Decode Queue (IDQ) from Decode Stream Buffer (DSB) path", 57 "BriefDescription": "Uops initiated by Decode Stream Buffer (DSB) that are being delivered to Instruction Decode Queue (IDQ) while Microcode Sequenser (MS) is busy",
88 "Counter": "0,1,2,3", 58 "Counter": "0,1,2,3",
89 "EventName": "IDQ.DSB_CYCLES", 59 "EventName": "IDQ.MS_DSB_UOPS",
90 "CounterMask": "1", 60 "PublicDescription": "This event counts the number of uops initiated by Decode Stream Buffer (DSB) that are being delivered to Instruction Decode Queue (IDQ) while the Microcode Sequencer (MS) is busy. Counting includes uops that may bypass the IDQ.",
91 "PublicDescription": "This event counts cycles during which uops are being delivered to Instruction Decode Queue (IDQ) from the Decode Stream Buffer (DSB) path. Counting includes uops that may \"bypass\" the IDQ.",
92 "SampleAfterValue": "2000003", 61 "SampleAfterValue": "2000003",
93 "CounterHTOff": "0,1,2,3,4,5,6,7" 62 "CounterHTOff": "0,1,2,3,4,5,6,7"
94 }, 63 },
@@ -99,7 +68,7 @@
99 "Counter": "0,1,2,3", 68 "Counter": "0,1,2,3",
100 "EventName": "IDQ.MS_DSB_CYCLES", 69 "EventName": "IDQ.MS_DSB_CYCLES",
101 "CounterMask": "1", 70 "CounterMask": "1",
102 "PublicDescription": "This event counts cycles during which uops initiated by Decode Stream Buffer (DSB) are being delivered to Instruction Decode Queue (IDQ) while the Microcode Sequencer (MS) is busy. Counting includes uops that may \"bypass\" the IDQ.", 71 "PublicDescription": "This event counts cycles during which uops initiated by Decode Stream Buffer (DSB) are being delivered to Instruction Decode Queue (IDQ) while the Microcode Sequencer (MS) is busy. Counting includes uops that may bypass the IDQ.",
103 "SampleAfterValue": "2000003", 72 "SampleAfterValue": "2000003",
104 "CounterHTOff": "0,1,2,3,4,5,6,7" 73 "CounterHTOff": "0,1,2,3,4,5,6,7"
105 }, 74 },
@@ -111,7 +80,7 @@
111 "Counter": "0,1,2,3", 80 "Counter": "0,1,2,3",
112 "EventName": "IDQ.MS_DSB_OCCUR", 81 "EventName": "IDQ.MS_DSB_OCCUR",
113 "CounterMask": "1", 82 "CounterMask": "1",
114 "PublicDescription": "This event counts the number of deliveries to Instruction Decode Queue (IDQ) initiated by Decode Stream Buffer (DSB) while the Microcode Sequencer (MS) is busy. Counting includes uops that may \"bypass\" the IDQ.", 83 "PublicDescription": "This event counts the number of deliveries to Instruction Decode Queue (IDQ) initiated by Decode Stream Buffer (DSB) while the Microcode Sequencer (MS) is busy. Counting includes uops that may bypass the IDQ.",
115 "SampleAfterValue": "2000003", 84 "SampleAfterValue": "2000003",
116 "CounterHTOff": "0,1,2,3,4,5,6,7" 85 "CounterHTOff": "0,1,2,3,4,5,6,7"
117 }, 86 },
@@ -122,7 +91,7 @@
122 "Counter": "0,1,2,3", 91 "Counter": "0,1,2,3",
123 "EventName": "IDQ.ALL_DSB_CYCLES_4_UOPS", 92 "EventName": "IDQ.ALL_DSB_CYCLES_4_UOPS",
124 "CounterMask": "4", 93 "CounterMask": "4",
125 "PublicDescription": "This event counts the number of cycles 4 uops were delivered to Instruction Decode Queue (IDQ) from the Decode Stream Buffer (DSB) path. Counting includes uops that may \"bypass\" the IDQ.", 94 "PublicDescription": "This event counts the number of cycles 4 uops were delivered to Instruction Decode Queue (IDQ) from the Decode Stream Buffer (DSB) path. Counting includes uops that may bypass the IDQ.",
126 "SampleAfterValue": "2000003", 95 "SampleAfterValue": "2000003",
127 "CounterHTOff": "0,1,2,3,4,5,6,7" 96 "CounterHTOff": "0,1,2,3,4,5,6,7"
128 }, 97 },
@@ -133,7 +102,17 @@
133 "Counter": "0,1,2,3", 102 "Counter": "0,1,2,3",
134 "EventName": "IDQ.ALL_DSB_CYCLES_ANY_UOPS", 103 "EventName": "IDQ.ALL_DSB_CYCLES_ANY_UOPS",
135 "CounterMask": "1", 104 "CounterMask": "1",
136 "PublicDescription": "This event counts the number of cycles uops were delivered to Instruction Decode Queue (IDQ) from the Decode Stream Buffer (DSB) path. Counting includes uops that may \"bypass\" the IDQ.", 105 "PublicDescription": "This event counts the number of cycles uops were delivered to Instruction Decode Queue (IDQ) from the Decode Stream Buffer (DSB) path. Counting includes uops that may bypass the IDQ.",
106 "SampleAfterValue": "2000003",
107 "CounterHTOff": "0,1,2,3,4,5,6,7"
108 },
109 {
110 "EventCode": "0x79",
111 "UMask": "0x20",
112 "BriefDescription": "Uops initiated by MITE and delivered to Instruction Decode Queue (IDQ) while Microcode Sequenser (MS) is busy",
113 "Counter": "0,1,2,3",
114 "EventName": "IDQ.MS_MITE_UOPS",
115 "PublicDescription": "This event counts the number of uops initiated by MITE and delivered to Instruction Decode Queue (IDQ) while the Microcode Sequenser (MS) is busy. Counting includes uops that may bypass the IDQ.",
137 "SampleAfterValue": "2000003", 116 "SampleAfterValue": "2000003",
138 "CounterHTOff": "0,1,2,3,4,5,6,7" 117 "CounterHTOff": "0,1,2,3,4,5,6,7"
139 }, 118 },
@@ -144,7 +123,7 @@
144 "Counter": "0,1,2,3", 123 "Counter": "0,1,2,3",
145 "EventName": "IDQ.ALL_MITE_CYCLES_4_UOPS", 124 "EventName": "IDQ.ALL_MITE_CYCLES_4_UOPS",
146 "CounterMask": "4", 125 "CounterMask": "4",
147 "PublicDescription": "This event counts the number of cycles 4 uops were delivered to Instruction Decode Queue (IDQ) from the MITE path. Counting includes uops that may \"bypass\" the IDQ. This also means that uops are not being delivered from the Decode Stream Buffer (DSB).", 126 "PublicDescription": "This event counts the number of cycles 4 uops were delivered to Instruction Decode Queue (IDQ) from the MITE path. Counting includes uops that may bypass the IDQ. This also means that uops are not being delivered from the Decode Stream Buffer (DSB).",
148 "SampleAfterValue": "2000003", 127 "SampleAfterValue": "2000003",
149 "CounterHTOff": "0,1,2,3,4,5,6,7" 128 "CounterHTOff": "0,1,2,3,4,5,6,7"
150 }, 129 },
@@ -155,7 +134,39 @@
155 "Counter": "0,1,2,3", 134 "Counter": "0,1,2,3",
156 "EventName": "IDQ.ALL_MITE_CYCLES_ANY_UOPS", 135 "EventName": "IDQ.ALL_MITE_CYCLES_ANY_UOPS",
157 "CounterMask": "1", 136 "CounterMask": "1",
158 "PublicDescription": "This event counts the number of cycles uops were delivered to Instruction Decode Queue (IDQ) from the MITE path. Counting includes uops that may \"bypass\" the IDQ. This also means that uops are not being delivered from the Decode Stream Buffer (DSB).", 137 "PublicDescription": "This event counts the number of cycles uops were delivered to Instruction Decode Queue (IDQ) from the MITE path. Counting includes uops that may bypass the IDQ. This also means that uops are not being delivered from the Decode Stream Buffer (DSB).",
138 "SampleAfterValue": "2000003",
139 "CounterHTOff": "0,1,2,3,4,5,6,7"
140 },
141 {
142 "EventCode": "0x79",
143 "UMask": "0x30",
144 "BriefDescription": "Uops delivered to Instruction Decode Queue (IDQ) while Microcode Sequenser (MS) is busy",
145 "Counter": "0,1,2,3",
146 "EventName": "IDQ.MS_UOPS",
147 "PublicDescription": "This event counts the total number of uops delivered to Instruction Decode Queue (IDQ) while the Microcode Sequenser (MS) is busy. Counting includes uops that may bypass the IDQ. Uops maybe initiated by Decode Stream Buffer (DSB) or MITE.",
148 "SampleAfterValue": "2000003",
149 "CounterHTOff": "0,1,2,3,4,5,6,7"
150 },
151 {
152 "EventCode": "0x79",
153 "UMask": "0x30",
154 "BriefDescription": "Cycles when uops are being delivered to Instruction Decode Queue (IDQ) while Microcode Sequenser (MS) is busy",
155 "Counter": "0,1,2,3",
156 "EventName": "IDQ.MS_CYCLES",
157 "CounterMask": "1",
158 "PublicDescription": "This event counts cycles during which uops are being delivered to Instruction Decode Queue (IDQ) while the Microcode Sequenser (MS) is busy. Counting includes uops that may bypass the IDQ. Uops maybe initiated by Decode Stream Buffer (DSB) or MITE.",
159 "SampleAfterValue": "2000003",
160 "CounterHTOff": "0,1,2,3,4,5,6,7"
161 },
162 {
163 "EdgeDetect": "1",
164 "EventCode": "0x79",
165 "UMask": "0x30",
166 "BriefDescription": "Number of switches from DSB (Decode Stream Buffer) or MITE (legacy decode pipeline) to the Microcode Sequencer.",
167 "Counter": "0,1,2,3",
168 "EventName": "IDQ.MS_SWITCHES",
169 "CounterMask": "1",
159 "SampleAfterValue": "2000003", 170 "SampleAfterValue": "2000003",
160 "CounterHTOff": "0,1,2,3,4,5,6,7" 171 "CounterHTOff": "0,1,2,3,4,5,6,7"
161 }, 172 },
@@ -165,7 +176,7 @@
165 "BriefDescription": "Uops delivered to Instruction Decode Queue (IDQ) from MITE path", 176 "BriefDescription": "Uops delivered to Instruction Decode Queue (IDQ) from MITE path",
166 "Counter": "0,1,2,3", 177 "Counter": "0,1,2,3",
167 "EventName": "IDQ.MITE_ALL_UOPS", 178 "EventName": "IDQ.MITE_ALL_UOPS",
168 "PublicDescription": "This event counts the number of uops delivered to Instruction Decode Queue (IDQ) from the MITE path. Counting includes uops that may \"bypass\" the IDQ. This also means that uops are not being delivered from the Decode Stream Buffer (DSB).", 179 "PublicDescription": "This event counts the number of uops delivered to Instruction Decode Queue (IDQ) from the MITE path. Counting includes uops that may bypass the IDQ. This also means that uops are not being delivered from the Decode Stream Buffer (DSB).",
169 "SampleAfterValue": "2000003", 180 "SampleAfterValue": "2000003",
170 "CounterHTOff": "0,1,2,3,4,5,6,7" 181 "CounterHTOff": "0,1,2,3,4,5,6,7"
171 }, 182 },
@@ -205,7 +216,7 @@
205 "BriefDescription": "Uops not delivered to Resource Allocation Table (RAT) per thread when backend of the machine is not stalled", 216 "BriefDescription": "Uops not delivered to Resource Allocation Table (RAT) per thread when backend of the machine is not stalled",
206 "Counter": "0,1,2,3", 217 "Counter": "0,1,2,3",
207 "EventName": "IDQ_UOPS_NOT_DELIVERED.CORE", 218 "EventName": "IDQ_UOPS_NOT_DELIVERED.CORE",
208 "PublicDescription": "This event counts the number of uops not delivered to Resource Allocation Table (RAT) per thread adding ?4 ? x? when Resource Allocation Table (RAT) is not stalled and Instruction Decode Queue (IDQ) delivers x uops to Resource Allocation Table (RAT) (where x belongs to {0,1,2,3}). Counting does not cover cases when:\n a. IDQ-Resource Allocation Table (RAT) pipe serves the other thread;\n b. Resource Allocation Table (RAT) is stalled for the thread (including uop drops and clear BE conditions); \n c. Instruction Decode Queue (IDQ) delivers four uops.", 219 "PublicDescription": "This event counts the number of uops not delivered to Resource Allocation Table (RAT) per thread adding 4 x when Resource Allocation Table (RAT) is not stalled and Instruction Decode Queue (IDQ) delivers x uops to Resource Allocation Table (RAT) (where x belongs to {0,1,2,3}). Counting does not cover cases when:\n a. IDQ-Resource Allocation Table (RAT) pipe serves the other thread;\n b. Resource Allocation Table (RAT) is stalled for the thread (including uop drops and clear BE conditions); \n c. Instruction Decode Queue (IDQ) delivers four uops.",
209 "SampleAfterValue": "2000003", 220 "SampleAfterValue": "2000003",
210 "CounterHTOff": "0,1,2,3" 221 "CounterHTOff": "0,1,2,3"
211 }, 222 },
@@ -268,18 +279,7 @@
268 "BriefDescription": "Decode Stream Buffer (DSB)-to-MITE switch true penalty cycles.", 279 "BriefDescription": "Decode Stream Buffer (DSB)-to-MITE switch true penalty cycles.",
269 "Counter": "0,1,2,3", 280 "Counter": "0,1,2,3",
270 "EventName": "DSB2MITE_SWITCHES.PENALTY_CYCLES", 281 "EventName": "DSB2MITE_SWITCHES.PENALTY_CYCLES",
271 "PublicDescription": "This event counts Decode Stream Buffer (DSB)-to-MITE switch true penalty cycles. These cycles do not include uops routed through because of the switch itself, for example, when Instruction Decode Queue (IDQ) pre-allocation is unavailable, or Instruction Decode Queue (IDQ) is full. SBD-to-MITE switch true penalty cycles happen after the merge mux (MM) receives Decode Stream Buffer (DSB) Sync-indication until receiving the first MITE uop. \nMM is placed before Instruction Decode Queue (IDQ) to merge uops being fed from the MITE and Decode Stream Buffer (DSB) paths. Decode Stream Buffer (DSB) inserts the Sync-indication whenever a Decode Stream Buffer (DSB)-to-MITE switch occurs.\nPenalty: A Decode Stream Buffer (DSB) hit followed by a Decode Stream Buffer (DSB) miss can cost up to six cycles in which no uops are delivered to the IDQ. Most often, such switches from the Decode Stream Buffer (DSB) to the legacy pipeline cost 0?2 cycles.", 282 "PublicDescription": "This event counts Decode Stream Buffer (DSB)-to-MITE switch true penalty cycles. These cycles do not include uops routed through because of the switch itself, for example, when Instruction Decode Queue (IDQ) pre-allocation is unavailable, or Instruction Decode Queue (IDQ) is full. SBD-to-MITE switch true penalty cycles happen after the merge mux (MM) receives Decode Stream Buffer (DSB) Sync-indication until receiving the first MITE uop. \nMM is placed before Instruction Decode Queue (IDQ) to merge uops being fed from the MITE and Decode Stream Buffer (DSB) paths. Decode Stream Buffer (DSB) inserts the Sync-indication whenever a Decode Stream Buffer (DSB)-to-MITE switch occurs.\nPenalty: A Decode Stream Buffer (DSB) hit followed by a Decode Stream Buffer (DSB) miss can cost up to six cycles in which no uops are delivered to the IDQ. Most often, such switches from the Decode Stream Buffer (DSB) to the legacy pipeline cost 02 cycles.",
272 "SampleAfterValue": "2000003",
273 "CounterHTOff": "0,1,2,3,4,5,6,7"
274 },
275 {
276 "EdgeDetect": "1",
277 "EventCode": "0x79",
278 "UMask": "0x30",
279 "BriefDescription": "Number of switches from DSB (Decode Stream Buffer) or MITE (legacy decode pipeline) to the Microcode Sequencer.",
280 "Counter": "0,1,2,3",
281 "EventName": "IDQ.MS_SWITCHES",
282 "CounterMask": "1",
283 "SampleAfterValue": "2000003", 283 "SampleAfterValue": "2000003",
284 "CounterHTOff": "0,1,2,3,4,5,6,7" 284 "CounterHTOff": "0,1,2,3,4,5,6,7"
285 } 285 }
diff --git a/tools/perf/pmu-events/arch/x86/broadwellx/memory.json b/tools/perf/pmu-events/arch/x86/broadwellx/memory.json
index 1204ea8ff30d..d79a5cfea44b 100644
--- a/tools/perf/pmu-events/arch/x86/broadwellx/memory.json
+++ b/tools/perf/pmu-events/arch/x86/broadwellx/memory.json
@@ -95,7 +95,6 @@
95 "BriefDescription": "Counts the number of times a class of instructions that may cause a transactional abort was executed. Since this is the count of execution, it may not always cause a transactional abort.", 95 "BriefDescription": "Counts the number of times a class of instructions that may cause a transactional abort was executed. Since this is the count of execution, it may not always cause a transactional abort.",
96 "Counter": "0,1,2,3", 96 "Counter": "0,1,2,3",
97 "EventName": "TX_EXEC.MISC1", 97 "EventName": "TX_EXEC.MISC1",
98 "PublicDescription": "Unfriendly TSX abort triggered by a flowmarker.",
99 "SampleAfterValue": "2000003", 98 "SampleAfterValue": "2000003",
100 "CounterHTOff": "0,1,2,3,4,5,6,7" 99 "CounterHTOff": "0,1,2,3,4,5,6,7"
101 }, 100 },
@@ -171,11 +170,11 @@
171 { 170 {
172 "EventCode": "0xc8", 171 "EventCode": "0xc8",
173 "UMask": "0x4", 172 "UMask": "0x4",
174 "BriefDescription": "Number of times HLE abort was triggered", 173 "BriefDescription": "Number of times HLE abort was triggered (PEBS)",
175 "PEBS": "1", 174 "PEBS": "1",
176 "Counter": "0,1,2,3", 175 "Counter": "0,1,2,3",
177 "EventName": "HLE_RETIRED.ABORTED", 176 "EventName": "HLE_RETIRED.ABORTED",
178 "PublicDescription": "Number of times HLE abort was triggered.", 177 "PublicDescription": "Number of times HLE abort was triggered (PEBS).",
179 "SampleAfterValue": "2000003", 178 "SampleAfterValue": "2000003",
180 "CounterHTOff": "0,1,2,3,4,5,6,7" 179 "CounterHTOff": "0,1,2,3,4,5,6,7"
181 }, 180 },
@@ -252,11 +251,11 @@
252 { 251 {
253 "EventCode": "0xc9", 252 "EventCode": "0xc9",
254 "UMask": "0x4", 253 "UMask": "0x4",
255 "BriefDescription": "Number of times RTM abort was triggered", 254 "BriefDescription": "Number of times RTM abort was triggered (PEBS)",
256 "PEBS": "1", 255 "PEBS": "1",
257 "Counter": "0,1,2,3", 256 "Counter": "0,1,2,3",
258 "EventName": "RTM_RETIRED.ABORTED", 257 "EventName": "RTM_RETIRED.ABORTED",
259 "PublicDescription": "Number of times RTM abort was triggered .", 258 "PublicDescription": "Number of times RTM abort was triggered (PEBS).",
260 "SampleAfterValue": "2000003", 259 "SampleAfterValue": "2000003",
261 "CounterHTOff": "0,1,2,3" 260 "CounterHTOff": "0,1,2,3"
262 }, 261 },
@@ -439,6 +438,7 @@
439 "Counter": "0,1,2,3", 438 "Counter": "0,1,2,3",
440 "EventName": "OFFCORE_RESPONSE.ALL_REQUESTS.LLC_MISS.ANY_RESPONSE", 439 "EventName": "OFFCORE_RESPONSE.ALL_REQUESTS.LLC_MISS.ANY_RESPONSE",
441 "MSRIndex": "0x1a6,0x1a7", 440 "MSRIndex": "0x1a6,0x1a7",
441 "PublicDescription": "Counts all requests that miss in the L3 Offcore response can be programmed only with a specific pair of event select and counter MSR, and with specific event codes and predefine mask bit value in a dedicated MSR to specify attributes of the offcore transaction.",
442 "SampleAfterValue": "100003", 442 "SampleAfterValue": "100003",
443 "CounterHTOff": "0,1,2,3" 443 "CounterHTOff": "0,1,2,3"
444 }, 444 },
@@ -451,6 +451,7 @@
451 "Counter": "0,1,2,3", 451 "Counter": "0,1,2,3",
452 "EventName": "OFFCORE_RESPONSE.ALL_READS.LLC_MISS.REMOTE_HIT_FORWARD", 452 "EventName": "OFFCORE_RESPONSE.ALL_READS.LLC_MISS.REMOTE_HIT_FORWARD",
453 "MSRIndex": "0x1a6,0x1a7", 453 "MSRIndex": "0x1a6,0x1a7",
454 "PublicDescription": "Counts all data/code/rfo reads (demand & prefetch) that miss the L3 and clean or shared data is transferred from remote cache Offcore response can be programmed only with a specific pair of event select and counter MSR, and with specific event codes and predefine mask bit value in a dedicated MSR to specify attributes of the offcore transaction.",
454 "SampleAfterValue": "100003", 455 "SampleAfterValue": "100003",
455 "CounterHTOff": "0,1,2,3" 456 "CounterHTOff": "0,1,2,3"
456 }, 457 },
@@ -463,6 +464,7 @@
463 "Counter": "0,1,2,3", 464 "Counter": "0,1,2,3",
464 "EventName": "OFFCORE_RESPONSE.ALL_READS.LLC_MISS.REMOTE_HITM", 465 "EventName": "OFFCORE_RESPONSE.ALL_READS.LLC_MISS.REMOTE_HITM",
465 "MSRIndex": "0x1a6,0x1a7", 466 "MSRIndex": "0x1a6,0x1a7",
467 "PublicDescription": "Counts all data/code/rfo reads (demand & prefetch) that miss the L3 and the modified data is transferred from remote cache Offcore response can be programmed only with a specific pair of event select and counter MSR, and with specific event codes and predefine mask bit value in a dedicated MSR to specify attributes of the offcore transaction.",
466 "SampleAfterValue": "100003", 468 "SampleAfterValue": "100003",
467 "CounterHTOff": "0,1,2,3" 469 "CounterHTOff": "0,1,2,3"
468 }, 470 },
@@ -475,6 +477,7 @@
475 "Counter": "0,1,2,3", 477 "Counter": "0,1,2,3",
476 "EventName": "OFFCORE_RESPONSE.ALL_READS.LLC_MISS.REMOTE_DRAM", 478 "EventName": "OFFCORE_RESPONSE.ALL_READS.LLC_MISS.REMOTE_DRAM",
477 "MSRIndex": "0x1a6,0x1a7", 479 "MSRIndex": "0x1a6,0x1a7",
480 "PublicDescription": "Counts all data/code/rfo reads (demand & prefetch) that miss the L3 and the data is returned from remote dram Offcore response can be programmed only with a specific pair of event select and counter MSR, and with specific event codes and predefine mask bit value in a dedicated MSR to specify attributes of the offcore transaction.",
478 "SampleAfterValue": "100003", 481 "SampleAfterValue": "100003",
479 "CounterHTOff": "0,1,2,3" 482 "CounterHTOff": "0,1,2,3"
480 }, 483 },
@@ -487,6 +490,7 @@
487 "Counter": "0,1,2,3", 490 "Counter": "0,1,2,3",
488 "EventName": "OFFCORE_RESPONSE.ALL_READS.LLC_MISS.LOCAL_DRAM", 491 "EventName": "OFFCORE_RESPONSE.ALL_READS.LLC_MISS.LOCAL_DRAM",
489 "MSRIndex": "0x1a6,0x1a7", 492 "MSRIndex": "0x1a6,0x1a7",
493 "PublicDescription": "Counts all data/code/rfo reads (demand & prefetch) that miss the L3 and the data is returned from local dram Offcore response can be programmed only with a specific pair of event select and counter MSR, and with specific event codes and predefine mask bit value in a dedicated MSR to specify attributes of the offcore transaction.",
490 "SampleAfterValue": "100003", 494 "SampleAfterValue": "100003",
491 "CounterHTOff": "0,1,2,3" 495 "CounterHTOff": "0,1,2,3"
492 }, 496 },
@@ -499,6 +503,7 @@
499 "Counter": "0,1,2,3", 503 "Counter": "0,1,2,3",
500 "EventName": "OFFCORE_RESPONSE.ALL_READS.LLC_MISS.ANY_RESPONSE", 504 "EventName": "OFFCORE_RESPONSE.ALL_READS.LLC_MISS.ANY_RESPONSE",
501 "MSRIndex": "0x1a6,0x1a7", 505 "MSRIndex": "0x1a6,0x1a7",
506 "PublicDescription": "Counts all data/code/rfo reads (demand & prefetch) that miss in the L3 Offcore response can be programmed only with a specific pair of event select and counter MSR, and with specific event codes and predefine mask bit value in a dedicated MSR to specify attributes of the offcore transaction.",
502 "SampleAfterValue": "100003", 507 "SampleAfterValue": "100003",
503 "CounterHTOff": "0,1,2,3" 508 "CounterHTOff": "0,1,2,3"
504 }, 509 },
@@ -511,6 +516,7 @@
511 "Counter": "0,1,2,3", 516 "Counter": "0,1,2,3",
512 "EventName": "OFFCORE_RESPONSE.ALL_CODE_RD.LLC_MISS.LOCAL_DRAM", 517 "EventName": "OFFCORE_RESPONSE.ALL_CODE_RD.LLC_MISS.LOCAL_DRAM",
513 "MSRIndex": "0x1a6,0x1a7", 518 "MSRIndex": "0x1a6,0x1a7",
519 "PublicDescription": "Counts all demand & prefetch code reads that miss the L3 and the data is returned from local dram Offcore response can be programmed only with a specific pair of event select and counter MSR, and with specific event codes and predefine mask bit value in a dedicated MSR to specify attributes of the offcore transaction.",
514 "SampleAfterValue": "100003", 520 "SampleAfterValue": "100003",
515 "CounterHTOff": "0,1,2,3" 521 "CounterHTOff": "0,1,2,3"
516 }, 522 },
@@ -523,6 +529,7 @@
523 "Counter": "0,1,2,3", 529 "Counter": "0,1,2,3",
524 "EventName": "OFFCORE_RESPONSE.ALL_CODE_RD.LLC_MISS.ANY_RESPONSE", 530 "EventName": "OFFCORE_RESPONSE.ALL_CODE_RD.LLC_MISS.ANY_RESPONSE",
525 "MSRIndex": "0x1a6,0x1a7", 531 "MSRIndex": "0x1a6,0x1a7",
532 "PublicDescription": "Counts all demand & prefetch code reads that miss in the L3 Offcore response can be programmed only with a specific pair of event select and counter MSR, and with specific event codes and predefine mask bit value in a dedicated MSR to specify attributes of the offcore transaction.",
526 "SampleAfterValue": "100003", 533 "SampleAfterValue": "100003",
527 "CounterHTOff": "0,1,2,3" 534 "CounterHTOff": "0,1,2,3"
528 }, 535 },
@@ -535,6 +542,7 @@
535 "Counter": "0,1,2,3", 542 "Counter": "0,1,2,3",
536 "EventName": "OFFCORE_RESPONSE.ALL_RFO.LLC_MISS.LOCAL_DRAM", 543 "EventName": "OFFCORE_RESPONSE.ALL_RFO.LLC_MISS.LOCAL_DRAM",
537 "MSRIndex": "0x1a6,0x1a7", 544 "MSRIndex": "0x1a6,0x1a7",
545 "PublicDescription": "Counts all demand & prefetch RFOs that miss the L3 and the data is returned from local dram Offcore response can be programmed only with a specific pair of event select and counter MSR, and with specific event codes and predefine mask bit value in a dedicated MSR to specify attributes of the offcore transaction.",
538 "SampleAfterValue": "100003", 546 "SampleAfterValue": "100003",
539 "CounterHTOff": "0,1,2,3" 547 "CounterHTOff": "0,1,2,3"
540 }, 548 },
@@ -547,6 +555,7 @@
547 "Counter": "0,1,2,3", 555 "Counter": "0,1,2,3",
548 "EventName": "OFFCORE_RESPONSE.ALL_RFO.LLC_MISS.ANY_RESPONSE", 556 "EventName": "OFFCORE_RESPONSE.ALL_RFO.LLC_MISS.ANY_RESPONSE",
549 "MSRIndex": "0x1a6,0x1a7", 557 "MSRIndex": "0x1a6,0x1a7",
558 "PublicDescription": "Counts all demand & prefetch RFOs that miss in the L3 Offcore response can be programmed only with a specific pair of event select and counter MSR, and with specific event codes and predefine mask bit value in a dedicated MSR to specify attributes of the offcore transaction.",
550 "SampleAfterValue": "100003", 559 "SampleAfterValue": "100003",
551 "CounterHTOff": "0,1,2,3" 560 "CounterHTOff": "0,1,2,3"
552 }, 561 },
@@ -559,6 +568,7 @@
559 "Counter": "0,1,2,3", 568 "Counter": "0,1,2,3",
560 "EventName": "OFFCORE_RESPONSE.ALL_DATA_RD.LLC_MISS.REMOTE_HIT_FORWARD", 569 "EventName": "OFFCORE_RESPONSE.ALL_DATA_RD.LLC_MISS.REMOTE_HIT_FORWARD",
561 "MSRIndex": "0x1a6,0x1a7", 570 "MSRIndex": "0x1a6,0x1a7",
571 "PublicDescription": "Counts all demand & prefetch data reads that miss the L3 and clean or shared data is transferred from remote cache Offcore response can be programmed only with a specific pair of event select and counter MSR, and with specific event codes and predefine mask bit value in a dedicated MSR to specify attributes of the offcore transaction.",
562 "SampleAfterValue": "100003", 572 "SampleAfterValue": "100003",
563 "CounterHTOff": "0,1,2,3" 573 "CounterHTOff": "0,1,2,3"
564 }, 574 },
@@ -571,6 +581,7 @@
571 "Counter": "0,1,2,3", 581 "Counter": "0,1,2,3",
572 "EventName": "OFFCORE_RESPONSE.ALL_DATA_RD.LLC_MISS.REMOTE_HITM", 582 "EventName": "OFFCORE_RESPONSE.ALL_DATA_RD.LLC_MISS.REMOTE_HITM",
573 "MSRIndex": "0x1a6,0x1a7", 583 "MSRIndex": "0x1a6,0x1a7",
584 "PublicDescription": "Counts all demand & prefetch data reads that miss the L3 and the modified data is transferred from remote cache Offcore response can be programmed only with a specific pair of event select and counter MSR, and with specific event codes and predefine mask bit value in a dedicated MSR to specify attributes of the offcore transaction.",
574 "SampleAfterValue": "100003", 585 "SampleAfterValue": "100003",
575 "CounterHTOff": "0,1,2,3" 586 "CounterHTOff": "0,1,2,3"
576 }, 587 },
@@ -583,6 +594,7 @@
583 "Counter": "0,1,2,3", 594 "Counter": "0,1,2,3",
584 "EventName": "OFFCORE_RESPONSE.ALL_DATA_RD.LLC_MISS.REMOTE_DRAM", 595 "EventName": "OFFCORE_RESPONSE.ALL_DATA_RD.LLC_MISS.REMOTE_DRAM",
585 "MSRIndex": "0x1a6,0x1a7", 596 "MSRIndex": "0x1a6,0x1a7",
597 "PublicDescription": "Counts all demand & prefetch data reads that miss the L3 and the data is returned from remote dram Offcore response can be programmed only with a specific pair of event select and counter MSR, and with specific event codes and predefine mask bit value in a dedicated MSR to specify attributes of the offcore transaction.",
586 "SampleAfterValue": "100003", 598 "SampleAfterValue": "100003",
587 "CounterHTOff": "0,1,2,3" 599 "CounterHTOff": "0,1,2,3"
588 }, 600 },
@@ -595,6 +607,7 @@
595 "Counter": "0,1,2,3", 607 "Counter": "0,1,2,3",
596 "EventName": "OFFCORE_RESPONSE.ALL_DATA_RD.LLC_MISS.LOCAL_DRAM", 608 "EventName": "OFFCORE_RESPONSE.ALL_DATA_RD.LLC_MISS.LOCAL_DRAM",
597 "MSRIndex": "0x1a6,0x1a7", 609 "MSRIndex": "0x1a6,0x1a7",
610 "PublicDescription": "Counts all demand & prefetch data reads that miss the L3 and the data is returned from local dram Offcore response can be programmed only with a specific pair of event select and counter MSR, and with specific event codes and predefine mask bit value in a dedicated MSR to specify attributes of the offcore transaction.",
598 "SampleAfterValue": "100003", 611 "SampleAfterValue": "100003",
599 "CounterHTOff": "0,1,2,3" 612 "CounterHTOff": "0,1,2,3"
600 }, 613 },
@@ -607,6 +620,7 @@
607 "Counter": "0,1,2,3", 620 "Counter": "0,1,2,3",
608 "EventName": "OFFCORE_RESPONSE.ALL_DATA_RD.LLC_MISS.ANY_RESPONSE", 621 "EventName": "OFFCORE_RESPONSE.ALL_DATA_RD.LLC_MISS.ANY_RESPONSE",
609 "MSRIndex": "0x1a6,0x1a7", 622 "MSRIndex": "0x1a6,0x1a7",
623 "PublicDescription": "Counts all demand & prefetch data reads that miss in the L3 Offcore response can be programmed only with a specific pair of event select and counter MSR, and with specific event codes and predefine mask bit value in a dedicated MSR to specify attributes of the offcore transaction.",
610 "SampleAfterValue": "100003", 624 "SampleAfterValue": "100003",
611 "CounterHTOff": "0,1,2,3" 625 "CounterHTOff": "0,1,2,3"
612 }, 626 },
@@ -619,6 +633,7 @@
619 "Counter": "0,1,2,3", 633 "Counter": "0,1,2,3",
620 "EventName": "OFFCORE_RESPONSE.PF_LLC_CODE_RD.LLC_MISS.ANY_RESPONSE", 634 "EventName": "OFFCORE_RESPONSE.PF_LLC_CODE_RD.LLC_MISS.ANY_RESPONSE",
621 "MSRIndex": "0x1a6,0x1a7", 635 "MSRIndex": "0x1a6,0x1a7",
636 "PublicDescription": "Counts prefetch (that bring data to LLC only) code reads that miss in the L3 Offcore response can be programmed only with a specific pair of event select and counter MSR, and with specific event codes and predefine mask bit value in a dedicated MSR to specify attributes of the offcore transaction.",
622 "SampleAfterValue": "100003", 637 "SampleAfterValue": "100003",
623 "CounterHTOff": "0,1,2,3" 638 "CounterHTOff": "0,1,2,3"
624 }, 639 },
@@ -631,6 +646,7 @@
631 "Counter": "0,1,2,3", 646 "Counter": "0,1,2,3",
632 "EventName": "OFFCORE_RESPONSE.PF_LLC_RFO.LLC_MISS.ANY_RESPONSE", 647 "EventName": "OFFCORE_RESPONSE.PF_LLC_RFO.LLC_MISS.ANY_RESPONSE",
633 "MSRIndex": "0x1a6,0x1a7", 648 "MSRIndex": "0x1a6,0x1a7",
649 "PublicDescription": "Counts all prefetch (that bring data to LLC only) RFOs that miss in the L3 Offcore response can be programmed only with a specific pair of event select and counter MSR, and with specific event codes and predefine mask bit value in a dedicated MSR to specify attributes of the offcore transaction.",
634 "SampleAfterValue": "100003", 650 "SampleAfterValue": "100003",
635 "CounterHTOff": "0,1,2,3" 651 "CounterHTOff": "0,1,2,3"
636 }, 652 },
@@ -643,6 +659,20 @@
643 "Counter": "0,1,2,3", 659 "Counter": "0,1,2,3",
644 "EventName": "OFFCORE_RESPONSE.DEMAND_RFO.LLC_MISS.REMOTE_HITM", 660 "EventName": "OFFCORE_RESPONSE.DEMAND_RFO.LLC_MISS.REMOTE_HITM",
645 "MSRIndex": "0x1a6,0x1a7", 661 "MSRIndex": "0x1a6,0x1a7",
662 "PublicDescription": "Counts all demand data writes (RFOs) that miss the L3 and the modified data is transferred from remote cache Offcore response can be programmed only with a specific pair of event select and counter MSR, and with specific event codes and predefine mask bit value in a dedicated MSR to specify attributes of the offcore transaction.",
663 "SampleAfterValue": "100003",
664 "CounterHTOff": "0,1,2,3"
665 },
666 {
667 "Offcore": "1",
668 "EventCode": "0xB7, 0xBB",
669 "UMask": "0x1",
670 "BriefDescription": "Counts all demand data writes (RFOs) that miss in the L3",
671 "MSRValue": "0x3fbfc00002",
672 "Counter": "0,1,2,3",
673 "EventName": "OFFCORE_RESPONSE.DEMAND_RFO.LLC_MISS.ANY_RESPONSE",
674 "MSRIndex": "0x1a6,0x1a7",
675 "PublicDescription": "Counts all demand data writes (RFOs) that miss in the L3 Offcore response can be programmed only with a specific pair of event select and counter MSR, and with specific event codes and predefine mask bit value in a dedicated MSR to specify attributes of the offcore transaction.",
646 "SampleAfterValue": "100003", 676 "SampleAfterValue": "100003",
647 "CounterHTOff": "0,1,2,3" 677 "CounterHTOff": "0,1,2,3"
648 } 678 }
diff --git a/tools/perf/pmu-events/arch/x86/broadwellx/other.json b/tools/perf/pmu-events/arch/x86/broadwellx/other.json
index 718fcb1db2ee..4475249ea9da 100644
--- a/tools/perf/pmu-events/arch/x86/broadwellx/other.json
+++ b/tools/perf/pmu-events/arch/x86/broadwellx/other.json
@@ -10,16 +10,6 @@
10 "CounterHTOff": "0,1,2,3,4,5,6,7" 10 "CounterHTOff": "0,1,2,3,4,5,6,7"
11 }, 11 },
12 { 12 {
13 "EventCode": "0x5C",
14 "UMask": "0x2",
15 "BriefDescription": "Unhalted core cycles when thread is in rings 1, 2, or 3",
16 "Counter": "0,1,2,3",
17 "EventName": "CPL_CYCLES.RING123",
18 "PublicDescription": "This event counts unhalted core cycles during which the thread is in rings 1, 2, or 3.",
19 "SampleAfterValue": "2000003",
20 "CounterHTOff": "0,1,2,3,4,5,6,7"
21 },
22 {
23 "EdgeDetect": "1", 13 "EdgeDetect": "1",
24 "EventCode": "0x5C", 14 "EventCode": "0x5C",
25 "UMask": "0x1", 15 "UMask": "0x1",
@@ -32,6 +22,16 @@
32 "CounterHTOff": "0,1,2,3,4,5,6,7" 22 "CounterHTOff": "0,1,2,3,4,5,6,7"
33 }, 23 },
34 { 24 {
25 "EventCode": "0x5C",
26 "UMask": "0x2",
27 "BriefDescription": "Unhalted core cycles when thread is in rings 1, 2, or 3",
28 "Counter": "0,1,2,3",
29 "EventName": "CPL_CYCLES.RING123",
30 "PublicDescription": "This event counts unhalted core cycles during which the thread is in rings 1, 2, or 3.",
31 "SampleAfterValue": "2000003",
32 "CounterHTOff": "0,1,2,3,4,5,6,7"
33 },
34 {
35 "EventCode": "0x63", 35 "EventCode": "0x63",
36 "UMask": "0x1", 36 "UMask": "0x1",
37 "BriefDescription": "Cycles when L1 and L2 are locked due to UC or split lock", 37 "BriefDescription": "Cycles when L1 and L2 are locked due to UC or split lock",
diff --git a/tools/perf/pmu-events/arch/x86/broadwellx/pipeline.json b/tools/perf/pmu-events/arch/x86/broadwellx/pipeline.json
index 02b4e1035f2d..920c89da9111 100644
--- a/tools/perf/pmu-events/arch/x86/broadwellx/pipeline.json
+++ b/tools/perf/pmu-events/arch/x86/broadwellx/pipeline.json
@@ -3,31 +3,41 @@
3 "EventCode": "0x00", 3 "EventCode": "0x00",
4 "UMask": "0x1", 4 "UMask": "0x1",
5 "BriefDescription": "Instructions retired from execution.", 5 "BriefDescription": "Instructions retired from execution.",
6 "Counter": "Fixed counter 1", 6 "Counter": "Fixed counter 0",
7 "EventName": "INST_RETIRED.ANY", 7 "EventName": "INST_RETIRED.ANY",
8 "PublicDescription": "This event counts the number of instructions retired from execution. For instructions that consist of multiple micro-ops, this event counts the retirement of the last micro-op of the instruction. Counting continues during hardware interrupts, traps, and inside interrupt handlers. \nNotes: INST_RETIRED.ANY is counted by a designated fixed counter, leaving the four (eight when Hyperthreading is disabled) programmable counters available for other events. INST_RETIRED.ANY_P is counted by a programmable counter and it is an architectural performance event. \nCounting: Faulting executions of GETSEC/VM entry/VM Exit/MWait will not count as retired instructions.", 8 "PublicDescription": "This event counts the number of instructions retired from execution. For instructions that consist of multiple micro-ops, this event counts the retirement of the last micro-op of the instruction. Counting continues during hardware interrupts, traps, and inside interrupt handlers. \nNotes: INST_RETIRED.ANY is counted by a designated fixed counter, leaving the four (eight when Hyperthreading is disabled) programmable counters available for other events. INST_RETIRED.ANY_P is counted by a programmable counter and it is an architectural performance event. \nCounting: Faulting executions of GETSEC/VM entry/VM Exit/MWait will not count as retired instructions.",
9 "SampleAfterValue": "2000003", 9 "SampleAfterValue": "2000003",
10 "CounterHTOff": "Fixed counter 1" 10 "CounterHTOff": "Fixed counter 0"
11 }, 11 },
12 { 12 {
13 "EventCode": "0x00", 13 "EventCode": "0x00",
14 "UMask": "0x2", 14 "UMask": "0x2",
15 "BriefDescription": "Core cycles when the thread is not in halt state", 15 "BriefDescription": "Core cycles when the thread is not in halt state",
16 "Counter": "Fixed counter 2", 16 "Counter": "Fixed counter 1",
17 "EventName": "CPU_CLK_UNHALTED.THREAD", 17 "EventName": "CPU_CLK_UNHALTED.THREAD",
18 "PublicDescription": "This event counts the number of core cycles while the thread is not in a halt state. The thread enters the halt state when it is running the HLT instruction. This event is a component in many key event ratios. The core frequency may change from time to time due to transitions associated with Enhanced Intel SpeedStep Technology or TM2. For this reason this event may have a changing ratio with regards to time. When the core frequency is constant, this event can approximate elapsed time while the core was not in the halt state. It is counted on a dedicated fixed counter, leaving the four (eight when Hyperthreading is disabled) programmable counters available for other events.", 18 "PublicDescription": "This event counts the number of core cycles while the thread is not in a halt state. The thread enters the halt state when it is running the HLT instruction. This event is a component in many key event ratios. The core frequency may change from time to time due to transitions associated with Enhanced Intel SpeedStep Technology or TM2. For this reason this event may have a changing ratio with regards to time. When the core frequency is constant, this event can approximate elapsed time while the core was not in the halt state. It is counted on a dedicated fixed counter, leaving the four (eight when Hyperthreading is disabled) programmable counters available for other events.",
19 "SampleAfterValue": "2000003", 19 "SampleAfterValue": "2000003",
20 "CounterHTOff": "Fixed counter 2" 20 "CounterHTOff": "Fixed counter 1"
21 },
22 {
23 "EventCode": "0x00",
24 "UMask": "0x2",
25 "BriefDescription": "Core cycles when at least one thread on the physical core is not in halt state.",
26 "Counter": "Fixed counter 1",
27 "EventName": "CPU_CLK_UNHALTED.THREAD_ANY",
28 "AnyThread": "1",
29 "SampleAfterValue": "2000003",
30 "CounterHTOff": "Fixed counter 1"
21 }, 31 },
22 { 32 {
23 "EventCode": "0x00", 33 "EventCode": "0x00",
24 "UMask": "0x3", 34 "UMask": "0x3",
25 "BriefDescription": "Reference cycles when the core is not in halt state.", 35 "BriefDescription": "Reference cycles when the core is not in halt state.",
26 "Counter": "Fixed counter 3", 36 "Counter": "Fixed counter 2",
27 "EventName": "CPU_CLK_UNHALTED.REF_TSC", 37 "EventName": "CPU_CLK_UNHALTED.REF_TSC",
28 "PublicDescription": "This event counts the number of reference cycles when the core is not in a halt state. The core enters the halt state when it is running the HLT instruction or the MWAIT instruction. This event is not affected by core frequency changes (for example, P states, TM2 transitions) but has the same incrementing frequency as the time stamp counter. This event can approximate elapsed time while the core was not in a halt state. This event has a constant ratio with the CPU_CLK_UNHALTED.REF_XCLK event. It is counted on a dedicated fixed counter, leaving the four (eight when Hyperthreading is disabled) programmable counters available for other events. \nNote: On all current platforms this event stops counting during 'throttling (TM)' states duty off periods the processor is 'halted'. This event is clocked by base clock (100 Mhz) on Sandy Bridge. The counter update is done at a lower clock rate then the core clock the overflow status bit for this counter may appear 'sticky'. After the counter has overflowed and software clears the overflow status bit and resets the counter to less than MAX. The reset value to the counter is not clocked immediately so the overflow status bit will flip 'high (1)' and generate another PMI (if enabled) after which the reset value gets clocked into the counter. Therefore, software will get the interrupt, read the overflow status bit '1 for bit 34 while the counter value is less than MAX. Software should ignore this case.", 38 "PublicDescription": "This event counts the number of reference cycles when the core is not in a halt state. The core enters the halt state when it is running the HLT instruction or the MWAIT instruction. This event is not affected by core frequency changes (for example, P states, TM2 transitions) but has the same incrementing frequency as the time stamp counter. This event can approximate elapsed time while the core was not in a halt state. This event has a constant ratio with the CPU_CLK_UNHALTED.REF_XCLK event. It is counted on a dedicated fixed counter, leaving the four (eight when Hyperthreading is disabled) programmable counters available for other events. \nNote: On all current platforms this event stops counting during 'throttling (TM)' states duty off periods the processor is 'halted'. This event is clocked by base clock (100 Mhz) on Sandy Bridge. The counter update is done at a lower clock rate then the core clock the overflow status bit for this counter may appear 'sticky'. After the counter has overflowed and software clears the overflow status bit and resets the counter to less than MAX. The reset value to the counter is not clocked immediately so the overflow status bit will flip 'high (1)' and generate another PMI (if enabled) after which the reset value gets clocked into the counter. Therefore, software will get the interrupt, read the overflow status bit '1 for bit 34 while the counter value is less than MAX. Software should ignore this case.",
29 "SampleAfterValue": "2000003", 39 "SampleAfterValue": "2000003",
30 "CounterHTOff": "Fixed counter 3" 40 "CounterHTOff": "Fixed counter 2"
31 }, 41 },
32 { 42 {
33 "EventCode": "0x03", 43 "EventCode": "0x03",
@@ -60,22 +70,33 @@
60 }, 70 },
61 { 71 {
62 "EventCode": "0x0D", 72 "EventCode": "0x0D",
63 "UMask": "0x8", 73 "UMask": "0x3",
64 "BriefDescription": "Cycles when Resource Allocation Table (RAT) external stall is sent to Instruction Decode Queue (IDQ) for the thread", 74 "BriefDescription": "Core cycles the allocator was stalled due to recovery from earlier clear event for this thread (e.g. misprediction or memory nuke)",
65 "Counter": "0,1,2,3", 75 "Counter": "0,1,2,3",
66 "EventName": "INT_MISC.RAT_STALL_CYCLES", 76 "EventName": "INT_MISC.RECOVERY_CYCLES",
67 "PublicDescription": "This event counts the number of cycles during which Resource Allocation Table (RAT) external stall is sent to Instruction Decode Queue (IDQ) for the current thread. This also includes the cycles during which the Allocator is serving another thread.", 77 "CounterMask": "1",
78 "PublicDescription": "Cycles checkpoints in Resource Allocation Table (RAT) are recovering from JEClear or machine clear.",
68 "SampleAfterValue": "2000003", 79 "SampleAfterValue": "2000003",
69 "CounterHTOff": "0,1,2,3,4,5,6,7" 80 "CounterHTOff": "0,1,2,3,4,5,6,7"
70 }, 81 },
71 { 82 {
72 "EventCode": "0x0D", 83 "EventCode": "0x0D",
73 "UMask": "0x3", 84 "UMask": "0x3",
74 "BriefDescription": "Number of cycles waiting for the checkpoints in Resource Allocation Table (RAT) to be recovered after Nuke due to all other cases except JEClear (e.g. whenever a ucode assist is needed like SSE exception, memory disambiguation, etc...)", 85 "BriefDescription": "Core cycles the allocator was stalled due to recovery from earlier clear event for any thread running on the physical core (e.g. misprediction or memory nuke).",
75 "Counter": "0,1,2,3", 86 "Counter": "0,1,2,3",
76 "EventName": "INT_MISC.RECOVERY_CYCLES", 87 "EventName": "INT_MISC.RECOVERY_CYCLES_ANY",
88 "AnyThread": "1",
77 "CounterMask": "1", 89 "CounterMask": "1",
78 "PublicDescription": "Cycles checkpoints in Resource Allocation Table (RAT) are recovering from JEClear or machine clear.", 90 "SampleAfterValue": "2000003",
91 "CounterHTOff": "0,1,2,3,4,5,6,7"
92 },
93 {
94 "EventCode": "0x0D",
95 "UMask": "0x8",
96 "BriefDescription": "Cycles when Resource Allocation Table (RAT) external stall is sent to Instruction Decode Queue (IDQ) for the thread",
97 "Counter": "0,1,2,3",
98 "EventName": "INT_MISC.RAT_STALL_CYCLES",
99 "PublicDescription": "This event counts the number of cycles during which Resource Allocation Table (RAT) external stall is sent to Instruction Decode Queue (IDQ) for the current thread. This also includes the cycles during which the Allocator is serving another thread.",
79 "SampleAfterValue": "2000003", 100 "SampleAfterValue": "2000003",
80 "CounterHTOff": "0,1,2,3,4,5,6,7" 101 "CounterHTOff": "0,1,2,3,4,5,6,7"
81 }, 102 },
@@ -90,6 +111,18 @@
90 "CounterHTOff": "0,1,2,3,4,5,6,7" 111 "CounterHTOff": "0,1,2,3,4,5,6,7"
91 }, 112 },
92 { 113 {
114 "Invert": "1",
115 "EventCode": "0x0E",
116 "UMask": "0x1",
117 "BriefDescription": "Cycles when Resource Allocation Table (RAT) does not issue Uops to Reservation Station (RS) for the thread",
118 "Counter": "0,1,2,3",
119 "EventName": "UOPS_ISSUED.STALL_CYCLES",
120 "CounterMask": "1",
121 "PublicDescription": "This event counts cycles during which the Resource Allocation Table (RAT) does not issue any Uops to the reservation station (RS) for the current thread.",
122 "SampleAfterValue": "2000003",
123 "CounterHTOff": "0,1,2,3"
124 },
125 {
93 "EventCode": "0x0E", 126 "EventCode": "0x0E",
94 "UMask": "0x10", 127 "UMask": "0x10",
95 "BriefDescription": "Number of flags-merge uops being allocated. Such uops considered perf sensitive; added by GSR u-arch.", 128 "BriefDescription": "Number of flags-merge uops being allocated. Such uops considered perf sensitive; added by GSR u-arch.",
@@ -118,18 +151,6 @@
118 "CounterHTOff": "0,1,2,3,4,5,6,7" 151 "CounterHTOff": "0,1,2,3,4,5,6,7"
119 }, 152 },
120 { 153 {
121 "Invert": "1",
122 "EventCode": "0x0E",
123 "UMask": "0x1",
124 "BriefDescription": "Cycles when Resource Allocation Table (RAT) does not issue Uops to Reservation Station (RS) for the thread",
125 "Counter": "0,1,2,3",
126 "EventName": "UOPS_ISSUED.STALL_CYCLES",
127 "CounterMask": "1",
128 "PublicDescription": "This event counts cycles during which the Resource Allocation Table (RAT) does not issue any Uops to the reservation station (RS) for the current thread.",
129 "SampleAfterValue": "2000003",
130 "CounterHTOff": "0,1,2,3"
131 },
132 {
133 "EventCode": "0x14", 154 "EventCode": "0x14",
134 "UMask": "0x1", 155 "UMask": "0x1",
135 "BriefDescription": "Cycles when divider is busy executing divide operations", 156 "BriefDescription": "Cycles when divider is busy executing divide operations",
@@ -141,6 +162,26 @@
141 }, 162 },
142 { 163 {
143 "EventCode": "0x3C", 164 "EventCode": "0x3C",
165 "UMask": "0x0",
166 "BriefDescription": "Thread cycles when thread is not in halt state",
167 "Counter": "0,1,2,3",
168 "EventName": "CPU_CLK_UNHALTED.THREAD_P",
169 "PublicDescription": "This is an architectural event that counts the number of thread cycles while the thread is not in a halt state. The thread enters the halt state when it is running the HLT instruction. The core frequency may change from time to time due to power or thermal throttling. For this reason, this event may have a changing ratio with regards to wall clock time.",
170 "SampleAfterValue": "2000003",
171 "CounterHTOff": "0,1,2,3,4,5,6,7"
172 },
173 {
174 "EventCode": "0x3C",
175 "UMask": "0x0",
176 "BriefDescription": "Core cycles when at least one thread on the physical core is not in halt state.",
177 "Counter": "0,1,2,3",
178 "EventName": "CPU_CLK_UNHALTED.THREAD_P_ANY",
179 "AnyThread": "1",
180 "SampleAfterValue": "2000003",
181 "CounterHTOff": "0,1,2,3,4,5,6,7"
182 },
183 {
184 "EventCode": "0x3C",
144 "UMask": "0x1", 185 "UMask": "0x1",
145 "BriefDescription": "Reference cycles when the thread is unhalted (counts at 100 MHz rate)", 186 "BriefDescription": "Reference cycles when the thread is unhalted (counts at 100 MHz rate)",
146 "Counter": "0,1,2,3", 187 "Counter": "0,1,2,3",
@@ -150,6 +191,36 @@
150 "CounterHTOff": "0,1,2,3,4,5,6,7" 191 "CounterHTOff": "0,1,2,3,4,5,6,7"
151 }, 192 },
152 { 193 {
194 "EventCode": "0x3C",
195 "UMask": "0x1",
196 "BriefDescription": "Reference cycles when the at least one thread on the physical core is unhalted (counts at 100 MHz rate).",
197 "Counter": "0,1,2,3",
198 "EventName": "CPU_CLK_THREAD_UNHALTED.REF_XCLK_ANY",
199 "AnyThread": "1",
200 "SampleAfterValue": "2000003",
201 "CounterHTOff": "0,1,2,3,4,5,6,7"
202 },
203 {
204 "EventCode": "0x3C",
205 "UMask": "0x1",
206 "BriefDescription": "Reference cycles when the thread is unhalted (counts at 100 MHz rate)",
207 "Counter": "0,1,2,3",
208 "EventName": "CPU_CLK_UNHALTED.REF_XCLK",
209 "PublicDescription": "Reference cycles when the thread is unhalted (counts at 100 MHz rate).",
210 "SampleAfterValue": "2000003",
211 "CounterHTOff": "0,1,2,3,4,5,6,7"
212 },
213 {
214 "EventCode": "0x3C",
215 "UMask": "0x1",
216 "BriefDescription": "Reference cycles when the at least one thread on the physical core is unhalted (counts at 100 MHz rate).",
217 "Counter": "0,1,2,3",
218 "EventName": "CPU_CLK_UNHALTED.REF_XCLK_ANY",
219 "AnyThread": "1",
220 "SampleAfterValue": "2000003",
221 "CounterHTOff": "0,1,2,3,4,5,6,7"
222 },
223 {
153 "EventCode": "0x3c", 224 "EventCode": "0x3c",
154 "UMask": "0x2", 225 "UMask": "0x2",
155 "BriefDescription": "Count XClk pulses when this thread is unhalted and the other thread is halted.", 226 "BriefDescription": "Count XClk pulses when this thread is unhalted and the other thread is halted.",
@@ -159,6 +230,15 @@
159 "CounterHTOff": "0,1,2,3" 230 "CounterHTOff": "0,1,2,3"
160 }, 231 },
161 { 232 {
233 "EventCode": "0x3C",
234 "UMask": "0x2",
235 "BriefDescription": "Count XClk pulses when this thread is unhalted and the other thread is halted.",
236 "Counter": "0,1,2,3",
237 "EventName": "CPU_CLK_UNHALTED.ONE_THREAD_ACTIVE",
238 "SampleAfterValue": "2000003",
239 "CounterHTOff": "0,1,2,3,4,5,6,7"
240 },
241 {
162 "EventCode": "0x4c", 242 "EventCode": "0x4c",
163 "UMask": "0x1", 243 "UMask": "0x1",
164 "BriefDescription": "Not software-prefetch load dispatches that hit FB allocated for software prefetch", 244 "BriefDescription": "Not software-prefetch load dispatches that hit FB allocated for software prefetch",
@@ -225,6 +305,18 @@
225 "CounterHTOff": "0,1,2,3,4,5,6,7" 305 "CounterHTOff": "0,1,2,3,4,5,6,7"
226 }, 306 },
227 { 307 {
308 "EdgeDetect": "1",
309 "Invert": "1",
310 "EventCode": "0x5E",
311 "UMask": "0x1",
312 "BriefDescription": "Counts end of periods where the Reservation Station (RS) was empty. Could be useful to precisely locate Frontend Latency Bound issues.",
313 "Counter": "0,1,2,3",
314 "EventName": "RS_EVENTS.EMPTY_END",
315 "CounterMask": "1",
316 "SampleAfterValue": "200003",
317 "CounterHTOff": "0,1,2,3,4,5,6,7"
318 },
319 {
228 "EventCode": "0x87", 320 "EventCode": "0x87",
229 "UMask": "0x1", 321 "UMask": "0x1",
230 "BriefDescription": "Stalls caused by changing prefix length of the instruction.", 322 "BriefDescription": "Stalls caused by changing prefix length of the instruction.",
@@ -406,6 +498,15 @@
406 }, 498 },
407 { 499 {
408 "EventCode": "0x89", 500 "EventCode": "0x89",
501 "UMask": "0xa0",
502 "BriefDescription": "Taken speculative and retired mispredicted indirect calls.",
503 "Counter": "0,1,2,3",
504 "EventName": "BR_MISP_EXEC.TAKEN_INDIRECT_NEAR_CALL",
505 "SampleAfterValue": "200003",
506 "CounterHTOff": "0,1,2,3,4,5,6,7"
507 },
508 {
509 "EventCode": "0x89",
409 "UMask": "0xc1", 510 "UMask": "0xc1",
410 "BriefDescription": "Speculative and retired mispredicted macro conditional branches", 511 "BriefDescription": "Speculative and retired mispredicted macro conditional branches",
411 "Counter": "0,1,2,3", 512 "Counter": "0,1,2,3",
@@ -435,6 +536,16 @@
435 "CounterHTOff": "0,1,2,3,4,5,6,7" 536 "CounterHTOff": "0,1,2,3,4,5,6,7"
436 }, 537 },
437 { 538 {
539 "EventCode": "0xA0",
540 "UMask": "0x3",
541 "BriefDescription": "Micro-op dispatches cancelled due to insufficient SIMD physical register file read ports",
542 "Counter": "0,1,2,3",
543 "EventName": "UOP_DISPATCHES_CANCELLED.SIMD_PRF",
544 "PublicDescription": "This event counts the number of micro-operations cancelled after they were dispatched from the scheduler to the execution units when the total number of physical register read ports across all dispatch ports exceeds the read bandwidth of the physical register file. The SIMD_PRF subevent applies to the following instructions: VDPPS, DPPS, VPCMPESTRI, PCMPESTRI, VPCMPESTRM, PCMPESTRM, VFMADD*, VFMADDSUB*, VFMSUB*, VMSUBADD*, VFNMADD*, VFNMSUB*. See the Broadwell Optimization Guide for more information.",
545 "SampleAfterValue": "2000003",
546 "CounterHTOff": "0,1,2,3"
547 },
548 {
438 "EventCode": "0xA1", 549 "EventCode": "0xA1",
439 "UMask": "0x1", 550 "UMask": "0x1",
440 "BriefDescription": "Cycles per thread when uops are executed in port 0", 551 "BriefDescription": "Cycles per thread when uops are executed in port 0",
@@ -446,6 +557,26 @@
446 }, 557 },
447 { 558 {
448 "EventCode": "0xA1", 559 "EventCode": "0xA1",
560 "UMask": "0x1",
561 "BriefDescription": "Cycles per core when uops are exectuted in port 0.",
562 "Counter": "0,1,2,3",
563 "EventName": "UOPS_EXECUTED_PORT.PORT_0_CORE",
564 "AnyThread": "1",
565 "SampleAfterValue": "2000003",
566 "CounterHTOff": "0,1,2,3,4,5,6,7"
567 },
568 {
569 "EventCode": "0xA1",
570 "UMask": "0x1",
571 "BriefDescription": "Cycles per thread when uops are executed in port 0",
572 "Counter": "0,1,2,3",
573 "EventName": "UOPS_EXECUTED_PORT.PORT_0",
574 "PublicDescription": "This event counts, on the per-thread basis, cycles during which uops are dispatched from the Reservation Station (RS) to port 0.",
575 "SampleAfterValue": "2000003",
576 "CounterHTOff": "0,1,2,3,4,5,6,7"
577 },
578 {
579 "EventCode": "0xA1",
449 "UMask": "0x2", 580 "UMask": "0x2",
450 "BriefDescription": "Cycles per thread when uops are executed in port 1", 581 "BriefDescription": "Cycles per thread when uops are executed in port 1",
451 "Counter": "0,1,2,3", 582 "Counter": "0,1,2,3",
@@ -456,6 +587,26 @@
456 }, 587 },
457 { 588 {
458 "EventCode": "0xA1", 589 "EventCode": "0xA1",
590 "UMask": "0x2",
591 "BriefDescription": "Cycles per core when uops are exectuted in port 1.",
592 "Counter": "0,1,2,3",
593 "EventName": "UOPS_EXECUTED_PORT.PORT_1_CORE",
594 "AnyThread": "1",
595 "SampleAfterValue": "2000003",
596 "CounterHTOff": "0,1,2,3,4,5,6,7"
597 },
598 {
599 "EventCode": "0xA1",
600 "UMask": "0x2",
601 "BriefDescription": "Cycles per thread when uops are executed in port 1",
602 "Counter": "0,1,2,3",
603 "EventName": "UOPS_EXECUTED_PORT.PORT_1",
604 "PublicDescription": "This event counts, on the per-thread basis, cycles during which uops are dispatched from the Reservation Station (RS) to port 1.",
605 "SampleAfterValue": "2000003",
606 "CounterHTOff": "0,1,2,3,4,5,6,7"
607 },
608 {
609 "EventCode": "0xA1",
459 "UMask": "0x4", 610 "UMask": "0x4",
460 "BriefDescription": "Cycles per thread when uops are executed in port 2", 611 "BriefDescription": "Cycles per thread when uops are executed in port 2",
461 "Counter": "0,1,2,3", 612 "Counter": "0,1,2,3",
@@ -466,6 +617,26 @@
466 }, 617 },
467 { 618 {
468 "EventCode": "0xA1", 619 "EventCode": "0xA1",
620 "UMask": "0x4",
621 "BriefDescription": "Cycles per core when uops are dispatched to port 2.",
622 "Counter": "0,1,2,3",
623 "EventName": "UOPS_EXECUTED_PORT.PORT_2_CORE",
624 "AnyThread": "1",
625 "SampleAfterValue": "2000003",
626 "CounterHTOff": "0,1,2,3,4,5,6,7"
627 },
628 {
629 "EventCode": "0xA1",
630 "UMask": "0x4",
631 "BriefDescription": "Cycles per thread when uops are executed in port 2",
632 "Counter": "0,1,2,3",
633 "EventName": "UOPS_EXECUTED_PORT.PORT_2",
634 "PublicDescription": "This event counts, on the per-thread basis, cycles during which uops are dispatched from the Reservation Station (RS) to port 2.",
635 "SampleAfterValue": "2000003",
636 "CounterHTOff": "0,1,2,3,4,5,6,7"
637 },
638 {
639 "EventCode": "0xA1",
469 "UMask": "0x8", 640 "UMask": "0x8",
470 "BriefDescription": "Cycles per thread when uops are executed in port 3", 641 "BriefDescription": "Cycles per thread when uops are executed in port 3",
471 "Counter": "0,1,2,3", 642 "Counter": "0,1,2,3",
@@ -476,6 +647,26 @@
476 }, 647 },
477 { 648 {
478 "EventCode": "0xA1", 649 "EventCode": "0xA1",
650 "UMask": "0x8",
651 "BriefDescription": "Cycles per core when uops are dispatched to port 3.",
652 "Counter": "0,1,2,3",
653 "EventName": "UOPS_EXECUTED_PORT.PORT_3_CORE",
654 "AnyThread": "1",
655 "SampleAfterValue": "2000003",
656 "CounterHTOff": "0,1,2,3,4,5,6,7"
657 },
658 {
659 "EventCode": "0xA1",
660 "UMask": "0x8",
661 "BriefDescription": "Cycles per thread when uops are executed in port 3",
662 "Counter": "0,1,2,3",
663 "EventName": "UOPS_EXECUTED_PORT.PORT_3",
664 "PublicDescription": "This event counts, on the per-thread basis, cycles during which uops are dispatched from the Reservation Station (RS) to port 3.",
665 "SampleAfterValue": "2000003",
666 "CounterHTOff": "0,1,2,3,4,5,6,7"
667 },
668 {
669 "EventCode": "0xA1",
479 "UMask": "0x10", 670 "UMask": "0x10",
480 "BriefDescription": "Cycles per thread when uops are executed in port 4", 671 "BriefDescription": "Cycles per thread when uops are executed in port 4",
481 "Counter": "0,1,2,3", 672 "Counter": "0,1,2,3",
@@ -486,6 +677,26 @@
486 }, 677 },
487 { 678 {
488 "EventCode": "0xA1", 679 "EventCode": "0xA1",
680 "UMask": "0x10",
681 "BriefDescription": "Cycles per core when uops are exectuted in port 4.",
682 "Counter": "0,1,2,3",
683 "EventName": "UOPS_EXECUTED_PORT.PORT_4_CORE",
684 "AnyThread": "1",
685 "SampleAfterValue": "2000003",
686 "CounterHTOff": "0,1,2,3,4,5,6,7"
687 },
688 {
689 "EventCode": "0xA1",
690 "UMask": "0x10",
691 "BriefDescription": "Cycles per thread when uops are executed in port 4",
692 "Counter": "0,1,2,3",
693 "EventName": "UOPS_EXECUTED_PORT.PORT_4",
694 "PublicDescription": "This event counts, on the per-thread basis, cycles during which uops are dispatched from the Reservation Station (RS) to port 4.",
695 "SampleAfterValue": "2000003",
696 "CounterHTOff": "0,1,2,3,4,5,6,7"
697 },
698 {
699 "EventCode": "0xA1",
489 "UMask": "0x20", 700 "UMask": "0x20",
490 "BriefDescription": "Cycles per thread when uops are executed in port 5", 701 "BriefDescription": "Cycles per thread when uops are executed in port 5",
491 "Counter": "0,1,2,3", 702 "Counter": "0,1,2,3",
@@ -496,6 +707,26 @@
496 }, 707 },
497 { 708 {
498 "EventCode": "0xA1", 709 "EventCode": "0xA1",
710 "UMask": "0x20",
711 "BriefDescription": "Cycles per core when uops are exectuted in port 5.",
712 "Counter": "0,1,2,3",
713 "EventName": "UOPS_EXECUTED_PORT.PORT_5_CORE",
714 "AnyThread": "1",
715 "SampleAfterValue": "2000003",
716 "CounterHTOff": "0,1,2,3,4,5,6,7"
717 },
718 {
719 "EventCode": "0xA1",
720 "UMask": "0x20",
721 "BriefDescription": "Cycles per thread when uops are executed in port 5",
722 "Counter": "0,1,2,3",
723 "EventName": "UOPS_EXECUTED_PORT.PORT_5",
724 "PublicDescription": "This event counts, on the per-thread basis, cycles during which uops are dispatched from the Reservation Station (RS) to port 5.",
725 "SampleAfterValue": "2000003",
726 "CounterHTOff": "0,1,2,3,4,5,6,7"
727 },
728 {
729 "EventCode": "0xA1",
499 "UMask": "0x40", 730 "UMask": "0x40",
500 "BriefDescription": "Cycles per thread when uops are executed in port 6", 731 "BriefDescription": "Cycles per thread when uops are executed in port 6",
501 "Counter": "0,1,2,3", 732 "Counter": "0,1,2,3",
@@ -506,6 +737,26 @@
506 }, 737 },
507 { 738 {
508 "EventCode": "0xA1", 739 "EventCode": "0xA1",
740 "UMask": "0x40",
741 "BriefDescription": "Cycles per core when uops are exectuted in port 6.",
742 "Counter": "0,1,2,3",
743 "EventName": "UOPS_EXECUTED_PORT.PORT_6_CORE",
744 "AnyThread": "1",
745 "SampleAfterValue": "2000003",
746 "CounterHTOff": "0,1,2,3,4,5,6,7"
747 },
748 {
749 "EventCode": "0xA1",
750 "UMask": "0x40",
751 "BriefDescription": "Cycles per thread when uops are executed in port 6",
752 "Counter": "0,1,2,3",
753 "EventName": "UOPS_EXECUTED_PORT.PORT_6",
754 "PublicDescription": "This event counts, on the per-thread basis, cycles during which uops are dispatched from the Reservation Station (RS) to port 6.",
755 "SampleAfterValue": "2000003",
756 "CounterHTOff": "0,1,2,3,4,5,6,7"
757 },
758 {
759 "EventCode": "0xA1",
509 "UMask": "0x80", 760 "UMask": "0x80",
510 "BriefDescription": "Cycles per thread when uops are executed in port 7", 761 "BriefDescription": "Cycles per thread when uops are executed in port 7",
511 "Counter": "0,1,2,3", 762 "Counter": "0,1,2,3",
@@ -515,6 +766,26 @@
515 "CounterHTOff": "0,1,2,3,4,5,6,7" 766 "CounterHTOff": "0,1,2,3,4,5,6,7"
516 }, 767 },
517 { 768 {
769 "EventCode": "0xA1",
770 "UMask": "0x80",
771 "BriefDescription": "Cycles per core when uops are dispatched to port 7.",
772 "Counter": "0,1,2,3",
773 "EventName": "UOPS_EXECUTED_PORT.PORT_7_CORE",
774 "AnyThread": "1",
775 "SampleAfterValue": "2000003",
776 "CounterHTOff": "0,1,2,3,4,5,6,7"
777 },
778 {
779 "EventCode": "0xA1",
780 "UMask": "0x80",
781 "BriefDescription": "Cycles per thread when uops are executed in port 7",
782 "Counter": "0,1,2,3",
783 "EventName": "UOPS_EXECUTED_PORT.PORT_7",
784 "PublicDescription": "This event counts, on the per-thread basis, cycles during which uops are dispatched from the Reservation Station (RS) to port 7.",
785 "SampleAfterValue": "2000003",
786 "CounterHTOff": "0,1,2,3,4,5,6,7"
787 },
788 {
518 "EventCode": "0xA2", 789 "EventCode": "0xA2",
519 "UMask": "0x1", 790 "UMask": "0x1",
520 "BriefDescription": "Resource-related stall cycles", 791 "BriefDescription": "Resource-related stall cycles",
@@ -567,14 +838,13 @@
567 }, 838 },
568 { 839 {
569 "EventCode": "0xA3", 840 "EventCode": "0xA3",
570 "UMask": "0x8", 841 "UMask": "0x1",
571 "BriefDescription": "Cycles while L1 cache miss demand load is outstanding.", 842 "BriefDescription": "Cycles while L2 cache miss demand load is outstanding.",
572 "Counter": "2", 843 "Counter": "0,1,2,3",
573 "EventName": "CYCLE_ACTIVITY.CYCLES_L1D_PENDING", 844 "EventName": "CYCLE_ACTIVITY.CYCLES_L2_MISS",
574 "CounterMask": "8", 845 "CounterMask": "1",
575 "PublicDescription": "Counts number of cycles the CPU has at least one pending demand load request missing the L1 data cache.",
576 "SampleAfterValue": "2000003", 846 "SampleAfterValue": "2000003",
577 "CounterHTOff": "2" 847 "CounterHTOff": "0,1,2,3,4,5,6,7"
578 }, 848 },
579 { 849 {
580 "EventCode": "0xA3", 850 "EventCode": "0xA3",
@@ -589,8 +859,18 @@
589 }, 859 },
590 { 860 {
591 "EventCode": "0xA3", 861 "EventCode": "0xA3",
862 "UMask": "0x2",
863 "BriefDescription": "Cycles while memory subsystem has an outstanding load.",
864 "Counter": "0,1,2,3",
865 "EventName": "CYCLE_ACTIVITY.CYCLES_MEM_ANY",
866 "CounterMask": "2",
867 "SampleAfterValue": "2000003",
868 "CounterHTOff": "0,1,2,3"
869 },
870 {
871 "EventCode": "0xA3",
592 "UMask": "0x4", 872 "UMask": "0x4",
593 "BriefDescription": "Total execution stalls", 873 "BriefDescription": "This event increments by 1 for every cycle where there was no execute for this thread.",
594 "Counter": "0,1,2,3", 874 "Counter": "0,1,2,3",
595 "EventName": "CYCLE_ACTIVITY.CYCLES_NO_EXECUTE", 875 "EventName": "CYCLE_ACTIVITY.CYCLES_NO_EXECUTE",
596 "CounterMask": "4", 876 "CounterMask": "4",
@@ -600,6 +880,16 @@
600 }, 880 },
601 { 881 {
602 "EventCode": "0xA3", 882 "EventCode": "0xA3",
883 "UMask": "0x4",
884 "BriefDescription": "Total execution stalls.",
885 "Counter": "0,1,2,3",
886 "EventName": "CYCLE_ACTIVITY.STALLS_TOTAL",
887 "CounterMask": "4",
888 "SampleAfterValue": "2000003",
889 "CounterHTOff": "0,1,2,3,4,5,6,7"
890 },
891 {
892 "EventCode": "0xA3",
603 "UMask": "0x5", 893 "UMask": "0x5",
604 "BriefDescription": "Execution stalls while L2 cache miss demand load is outstanding.", 894 "BriefDescription": "Execution stalls while L2 cache miss demand load is outstanding.",
605 "Counter": "0,1,2,3", 895 "Counter": "0,1,2,3",
@@ -611,6 +901,16 @@
611 }, 901 },
612 { 902 {
613 "EventCode": "0xA3", 903 "EventCode": "0xA3",
904 "UMask": "0x5",
905 "BriefDescription": "Execution stalls while L2 cache miss demand load is outstanding.",
906 "Counter": "0,1,2,3",
907 "EventName": "CYCLE_ACTIVITY.STALLS_L2_MISS",
908 "CounterMask": "5",
909 "SampleAfterValue": "2000003",
910 "CounterHTOff": "0,1,2,3,4,5,6,7"
911 },
912 {
913 "EventCode": "0xA3",
614 "UMask": "0x6", 914 "UMask": "0x6",
615 "BriefDescription": "Execution stalls while memory subsystem has an outstanding load.", 915 "BriefDescription": "Execution stalls while memory subsystem has an outstanding load.",
616 "Counter": "0,1,2,3", 916 "Counter": "0,1,2,3",
@@ -622,6 +922,37 @@
622 }, 922 },
623 { 923 {
624 "EventCode": "0xA3", 924 "EventCode": "0xA3",
925 "UMask": "0x6",
926 "BriefDescription": "Execution stalls while memory subsystem has an outstanding load.",
927 "Counter": "0,1,2,3",
928 "EventName": "CYCLE_ACTIVITY.STALLS_MEM_ANY",
929 "CounterMask": "6",
930 "SampleAfterValue": "2000003",
931 "CounterHTOff": "0,1,2,3,4,5,6,7"
932 },
933 {
934 "EventCode": "0xA3",
935 "UMask": "0x8",
936 "BriefDescription": "Cycles while L1 cache miss demand load is outstanding.",
937 "Counter": "2",
938 "EventName": "CYCLE_ACTIVITY.CYCLES_L1D_PENDING",
939 "CounterMask": "8",
940 "PublicDescription": "Counts number of cycles the CPU has at least one pending demand load request missing the L1 data cache.",
941 "SampleAfterValue": "2000003",
942 "CounterHTOff": "2"
943 },
944 {
945 "EventCode": "0xA3",
946 "UMask": "0x8",
947 "BriefDescription": "Cycles while L1 cache miss demand load is outstanding.",
948 "Counter": "2",
949 "EventName": "CYCLE_ACTIVITY.CYCLES_L1D_MISS",
950 "CounterMask": "8",
951 "SampleAfterValue": "2000003",
952 "CounterHTOff": "2"
953 },
954 {
955 "EventCode": "0xA3",
625 "UMask": "0xc", 956 "UMask": "0xc",
626 "BriefDescription": "Execution stalls while L1 cache miss demand load is outstanding.", 957 "BriefDescription": "Execution stalls while L1 cache miss demand load is outstanding.",
627 "Counter": "2", 958 "Counter": "2",
@@ -632,12 +963,41 @@
632 "CounterHTOff": "2" 963 "CounterHTOff": "2"
633 }, 964 },
634 { 965 {
966 "EventCode": "0xA3",
967 "UMask": "0xc",
968 "BriefDescription": "Execution stalls while L1 cache miss demand load is outstanding.",
969 "Counter": "2",
970 "EventName": "CYCLE_ACTIVITY.STALLS_L1D_MISS",
971 "CounterMask": "12",
972 "SampleAfterValue": "2000003",
973 "CounterHTOff": "2"
974 },
975 {
635 "EventCode": "0xA8", 976 "EventCode": "0xA8",
636 "UMask": "0x1", 977 "UMask": "0x1",
637 "BriefDescription": "Number of Uops delivered by the LSD.", 978 "BriefDescription": "Number of Uops delivered by the LSD.",
638 "Counter": "0,1,2,3", 979 "Counter": "0,1,2,3",
639 "EventName": "LSD.UOPS", 980 "EventName": "LSD.UOPS",
640 "PublicDescription": "Number of Uops delivered by the LSD. ", 981 "SampleAfterValue": "2000003",
982 "CounterHTOff": "0,1,2,3,4,5,6,7"
983 },
984 {
985 "EventCode": "0xA8",
986 "UMask": "0x1",
987 "BriefDescription": "Cycles 4 Uops delivered by the LSD, but didn't come from the decoder.",
988 "Counter": "0,1,2,3",
989 "EventName": "LSD.CYCLES_4_UOPS",
990 "CounterMask": "4",
991 "SampleAfterValue": "2000003",
992 "CounterHTOff": "0,1,2,3,4,5,6,7"
993 },
994 {
995 "EventCode": "0xA8",
996 "UMask": "0x1",
997 "BriefDescription": "Cycles Uops delivered by the LSD, but didn't come from the decoder.",
998 "Counter": "0,1,2,3",
999 "EventName": "LSD.CYCLES_ACTIVE",
1000 "CounterMask": "1",
641 "SampleAfterValue": "2000003", 1001 "SampleAfterValue": "2000003",
642 "CounterHTOff": "0,1,2,3,4,5,6,7" 1002 "CounterHTOff": "0,1,2,3,4,5,6,7"
643 }, 1003 },
@@ -652,6 +1012,58 @@
652 "CounterHTOff": "0,1,2,3,4,5,6,7" 1012 "CounterHTOff": "0,1,2,3,4,5,6,7"
653 }, 1013 },
654 { 1014 {
1015 "Invert": "1",
1016 "EventCode": "0xB1",
1017 "UMask": "0x1",
1018 "BriefDescription": "Counts number of cycles no uops were dispatched to be executed on this thread.",
1019 "Counter": "0,1,2,3",
1020 "EventName": "UOPS_EXECUTED.STALL_CYCLES",
1021 "CounterMask": "1",
1022 "PublicDescription": "This event counts cycles during which no uops were dispatched from the Reservation Station (RS) per thread.",
1023 "SampleAfterValue": "2000003",
1024 "CounterHTOff": "0,1,2,3"
1025 },
1026 {
1027 "EventCode": "0xB1",
1028 "UMask": "0x1",
1029 "BriefDescription": "Cycles where at least 1 uop was executed per-thread.",
1030 "Counter": "0,1,2,3",
1031 "EventName": "UOPS_EXECUTED.CYCLES_GE_1_UOP_EXEC",
1032 "CounterMask": "1",
1033 "SampleAfterValue": "2000003",
1034 "CounterHTOff": "0,1,2,3"
1035 },
1036 {
1037 "EventCode": "0xB1",
1038 "UMask": "0x1",
1039 "BriefDescription": "Cycles where at least 2 uops were executed per-thread.",
1040 "Counter": "0,1,2,3",
1041 "EventName": "UOPS_EXECUTED.CYCLES_GE_2_UOPS_EXEC",
1042 "CounterMask": "2",
1043 "SampleAfterValue": "2000003",
1044 "CounterHTOff": "0,1,2,3"
1045 },
1046 {
1047 "EventCode": "0xB1",
1048 "UMask": "0x1",
1049 "BriefDescription": "Cycles where at least 3 uops were executed per-thread.",
1050 "Counter": "0,1,2,3",
1051 "EventName": "UOPS_EXECUTED.CYCLES_GE_3_UOPS_EXEC",
1052 "CounterMask": "3",
1053 "SampleAfterValue": "2000003",
1054 "CounterHTOff": "0,1,2,3"
1055 },
1056 {
1057 "EventCode": "0xB1",
1058 "UMask": "0x1",
1059 "BriefDescription": "Cycles where at least 4 uops were executed per-thread.",
1060 "Counter": "0,1,2,3",
1061 "EventName": "UOPS_EXECUTED.CYCLES_GE_4_UOPS_EXEC",
1062 "CounterMask": "4",
1063 "SampleAfterValue": "2000003",
1064 "CounterHTOff": "0,1,2,3"
1065 },
1066 {
655 "EventCode": "0xB1", 1067 "EventCode": "0xB1",
656 "UMask": "0x2", 1068 "UMask": "0x2",
657 "BriefDescription": "Number of uops executed on the core.", 1069 "BriefDescription": "Number of uops executed on the core.",
@@ -662,35 +1074,63 @@
662 "CounterHTOff": "0,1,2,3,4,5,6,7" 1074 "CounterHTOff": "0,1,2,3,4,5,6,7"
663 }, 1075 },
664 { 1076 {
665 "Invert": "1", 1077 "EventCode": "0xb1",
666 "EventCode": "0xB1", 1078 "UMask": "0x2",
667 "UMask": "0x1", 1079 "BriefDescription": "Cycles at least 1 micro-op is executed from any thread on physical core.",
668 "BriefDescription": "Counts number of cycles no uops were dispatched to be executed on this thread.",
669 "Counter": "0,1,2,3", 1080 "Counter": "0,1,2,3",
670 "EventName": "UOPS_EXECUTED.STALL_CYCLES", 1081 "EventName": "UOPS_EXECUTED.CORE_CYCLES_GE_1",
671 "CounterMask": "1", 1082 "CounterMask": "1",
672 "PublicDescription": "This event counts cycles during which no uops were dispatched from the Reservation Station (RS) per thread.",
673 "SampleAfterValue": "2000003", 1083 "SampleAfterValue": "2000003",
674 "CounterHTOff": "0,1,2,3" 1084 "CounterHTOff": "0,1,2,3,4,5,6,7"
675 }, 1085 },
676 { 1086 {
677 "EventCode": "0xC0", 1087 "EventCode": "0xb1",
678 "UMask": "0x0", 1088 "UMask": "0x2",
679 "BriefDescription": "Number of instructions retired. General Counter - architectural event", 1089 "BriefDescription": "Cycles at least 2 micro-op is executed from any thread on physical core.",
680 "Counter": "0,1,2,3", 1090 "Counter": "0,1,2,3",
681 "EventName": "INST_RETIRED.ANY_P", 1091 "EventName": "UOPS_EXECUTED.CORE_CYCLES_GE_2",
682 "Errata": "BDM61", 1092 "CounterMask": "2",
683 "PublicDescription": "This event counts the number of instructions (EOMs) retired. Counting covers macro-fused instructions individually (that is, increments by two).",
684 "SampleAfterValue": "2000003", 1093 "SampleAfterValue": "2000003",
685 "CounterHTOff": "0,1,2,3,4,5,6,7" 1094 "CounterHTOff": "0,1,2,3,4,5,6,7"
686 }, 1095 },
687 { 1096 {
688 "EventCode": "0xC0", 1097 "EventCode": "0xb1",
689 "UMask": "0x2", 1098 "UMask": "0x2",
690 "BriefDescription": "FP operations retired. X87 FP operations that have no exceptions:", 1099 "BriefDescription": "Cycles at least 3 micro-op is executed from any thread on physical core.",
691 "Counter": "0,1,2,3", 1100 "Counter": "0,1,2,3",
692 "EventName": "INST_RETIRED.X87", 1101 "EventName": "UOPS_EXECUTED.CORE_CYCLES_GE_3",
693 "PublicDescription": "This is a non-precise version (that is, does not use PEBS) of the event that counts FP operations retired. For X87 FP operations that have no exceptions counting also includes flows that have several X87, or flows that use X87 uops in the exception handling.", 1102 "CounterMask": "3",
1103 "SampleAfterValue": "2000003",
1104 "CounterHTOff": "0,1,2,3,4,5,6,7"
1105 },
1106 {
1107 "EventCode": "0xb1",
1108 "UMask": "0x2",
1109 "BriefDescription": "Cycles at least 4 micro-op is executed from any thread on physical core.",
1110 "Counter": "0,1,2,3",
1111 "EventName": "UOPS_EXECUTED.CORE_CYCLES_GE_4",
1112 "CounterMask": "4",
1113 "SampleAfterValue": "2000003",
1114 "CounterHTOff": "0,1,2,3,4,5,6,7"
1115 },
1116 {
1117 "Invert": "1",
1118 "EventCode": "0xb1",
1119 "UMask": "0x2",
1120 "BriefDescription": "Cycles with no micro-ops executed from any thread on physical core.",
1121 "Counter": "0,1,2,3",
1122 "EventName": "UOPS_EXECUTED.CORE_CYCLES_NONE",
1123 "SampleAfterValue": "2000003",
1124 "CounterHTOff": "0,1,2,3,4,5,6,7"
1125 },
1126 {
1127 "EventCode": "0xC0",
1128 "UMask": "0x0",
1129 "BriefDescription": "Number of instructions retired. General Counter - architectural event",
1130 "Counter": "0,1,2,3",
1131 "EventName": "INST_RETIRED.ANY_P",
1132 "Errata": "BDM61",
1133 "PublicDescription": "This event counts the number of instructions (EOMs) retired. Counting covers macro-fused instructions individually (that is, increments by two).",
694 "SampleAfterValue": "2000003", 1134 "SampleAfterValue": "2000003",
695 "CounterHTOff": "0,1,2,3,4,5,6,7" 1135 "CounterHTOff": "0,1,2,3,4,5,6,7"
696 }, 1136 },
@@ -707,6 +1147,16 @@
707 "CounterHTOff": "1" 1147 "CounterHTOff": "1"
708 }, 1148 },
709 { 1149 {
1150 "EventCode": "0xC0",
1151 "UMask": "0x2",
1152 "BriefDescription": "FP operations retired. X87 FP operations that have no exceptions:",
1153 "Counter": "0,1,2,3",
1154 "EventName": "INST_RETIRED.X87",
1155 "PublicDescription": "This event counts FP operations retired. For X87 FP operations that have no exceptions counting also includes flows that have several X87, or flows that use X87 uops in the exception handling.",
1156 "SampleAfterValue": "2000003",
1157 "CounterHTOff": "0,1,2,3,4,5,6,7"
1158 },
1159 {
710 "EventCode": "0xC1", 1160 "EventCode": "0xC1",
711 "UMask": "0x40", 1161 "UMask": "0x40",
712 "BriefDescription": "Number of times any microcode assist is invoked by HW upon uop writeback.", 1162 "BriefDescription": "Number of times any microcode assist is invoked by HW upon uop writeback.",
@@ -718,23 +1168,12 @@
718 { 1168 {
719 "EventCode": "0xC2", 1169 "EventCode": "0xC2",
720 "UMask": "0x1", 1170 "UMask": "0x1",
721 "BriefDescription": "Actually retired uops.", 1171 "BriefDescription": "Actually retired uops. (Precise Event - PEBS)",
722 "Data_LA": "1", 1172 "Data_LA": "1",
723 "PEBS": "1", 1173 "PEBS": "1",
724 "Counter": "0,1,2,3", 1174 "Counter": "0,1,2,3",
725 "EventName": "UOPS_RETIRED.ALL", 1175 "EventName": "UOPS_RETIRED.ALL",
726 "PublicDescription": "This event counts all actually retired uops. Counting increments by two for micro-fused uops, and by one for macro-fused and other uops. Maximal increment value for one cycle is eight.", 1176 "PublicDescription": "This is a precise version (that is, uses PEBS) of the event that counts all actually retired uops. Counting increments by two for micro-fused uops, and by one for macro-fused and other uops. Maximal increment value for one cycle is eight.",
727 "SampleAfterValue": "2000003",
728 "CounterHTOff": "0,1,2,3,4,5,6,7"
729 },
730 {
731 "EventCode": "0xC2",
732 "UMask": "0x2",
733 "BriefDescription": "Retirement slots used.",
734 "PEBS": "1",
735 "Counter": "0,1,2,3",
736 "EventName": "UOPS_RETIRED.RETIRE_SLOTS",
737 "PublicDescription": "This is a non-precise version (that is, does not use PEBS) of the event that counts the number of retirement slots used.",
738 "SampleAfterValue": "2000003", 1177 "SampleAfterValue": "2000003",
739 "CounterHTOff": "0,1,2,3,4,5,6,7" 1178 "CounterHTOff": "0,1,2,3,4,5,6,7"
740 }, 1179 },
@@ -746,7 +1185,7 @@
746 "Counter": "0,1,2,3", 1185 "Counter": "0,1,2,3",
747 "EventName": "UOPS_RETIRED.STALL_CYCLES", 1186 "EventName": "UOPS_RETIRED.STALL_CYCLES",
748 "CounterMask": "1", 1187 "CounterMask": "1",
749 "PublicDescription": "This is a non-precise version (that is, does not use PEBS) of the event that counts cycles without actually retired uops.", 1188 "PublicDescription": "This event counts cycles without actually retired uops.",
750 "SampleAfterValue": "2000003", 1189 "SampleAfterValue": "2000003",
751 "CounterHTOff": "0,1,2,3" 1190 "CounterHTOff": "0,1,2,3"
752 }, 1191 },
@@ -763,6 +1202,17 @@
763 "CounterHTOff": "0,1,2,3" 1202 "CounterHTOff": "0,1,2,3"
764 }, 1203 },
765 { 1204 {
1205 "EventCode": "0xC2",
1206 "UMask": "0x2",
1207 "BriefDescription": "Retirement slots used. (Precise Event - PEBS)",
1208 "PEBS": "1",
1209 "Counter": "0,1,2,3",
1210 "EventName": "UOPS_RETIRED.RETIRE_SLOTS",
1211 "PublicDescription": "This is a precise version (that is, uses PEBS) of the event that counts the number of retirement slots used.",
1212 "SampleAfterValue": "2000003",
1213 "CounterHTOff": "0,1,2,3,4,5,6,7"
1214 },
1215 {
766 "EventCode": "0xC3", 1216 "EventCode": "0xC3",
767 "UMask": "0x1", 1217 "UMask": "0x1",
768 "BriefDescription": "Cycles there was a Nuke. Account for both thread-specific and All Thread Nukes.", 1218 "BriefDescription": "Cycles there was a Nuke. Account for both thread-specific and All Thread Nukes.",
@@ -773,6 +1223,17 @@
773 "CounterHTOff": "0,1,2,3,4,5,6,7" 1223 "CounterHTOff": "0,1,2,3,4,5,6,7"
774 }, 1224 },
775 { 1225 {
1226 "EdgeDetect": "1",
1227 "EventCode": "0xC3",
1228 "UMask": "0x1",
1229 "BriefDescription": "Number of machine clears (nukes) of any type.",
1230 "Counter": "0,1,2,3",
1231 "EventName": "MACHINE_CLEARS.COUNT",
1232 "CounterMask": "1",
1233 "SampleAfterValue": "100003",
1234 "CounterHTOff": "0,1,2,3,4,5,6,7"
1235 },
1236 {
776 "EventCode": "0xC3", 1237 "EventCode": "0xC3",
777 "UMask": "0x4", 1238 "UMask": "0x4",
778 "BriefDescription": "Self-modifying code (SMC) detected.", 1239 "BriefDescription": "Self-modifying code (SMC) detected.",
@@ -794,44 +1255,67 @@
794 }, 1255 },
795 { 1256 {
796 "EventCode": "0xC4", 1257 "EventCode": "0xC4",
1258 "UMask": "0x0",
1259 "BriefDescription": "All (macro) branch instructions retired.",
1260 "Counter": "0,1,2,3",
1261 "EventName": "BR_INST_RETIRED.ALL_BRANCHES",
1262 "PublicDescription": "This event counts all (macro) branch instructions retired.",
1263 "SampleAfterValue": "400009",
1264 "CounterHTOff": "0,1,2,3,4,5,6,7"
1265 },
1266 {
1267 "EventCode": "0xC4",
797 "UMask": "0x1", 1268 "UMask": "0x1",
798 "BriefDescription": "Conditional branch instructions retired.", 1269 "BriefDescription": "Conditional branch instructions retired. (Precise Event - PEBS)",
799 "PEBS": "1", 1270 "PEBS": "1",
800 "Counter": "0,1,2,3", 1271 "Counter": "0,1,2,3",
801 "EventName": "BR_INST_RETIRED.CONDITIONAL", 1272 "EventName": "BR_INST_RETIRED.CONDITIONAL",
802 "PublicDescription": "This is a non-precise version (that is, does not use PEBS) of the event that counts conditional branch instructions retired.", 1273 "PublicDescription": "This is a precise version (that is, uses PEBS) of the event that counts conditional branch instructions retired.",
803 "SampleAfterValue": "400009", 1274 "SampleAfterValue": "400009",
804 "CounterHTOff": "0,1,2,3,4,5,6,7" 1275 "CounterHTOff": "0,1,2,3,4,5,6,7"
805 }, 1276 },
806 { 1277 {
807 "EventCode": "0xC4", 1278 "EventCode": "0xC4",
808 "UMask": "0x2", 1279 "UMask": "0x2",
809 "BriefDescription": "Direct and indirect near call instructions retired.", 1280 "BriefDescription": "Direct and indirect near call instructions retired. (Precise Event - PEBS)",
810 "PEBS": "1", 1281 "PEBS": "1",
811 "Counter": "0,1,2,3", 1282 "Counter": "0,1,2,3",
812 "EventName": "BR_INST_RETIRED.NEAR_CALL", 1283 "EventName": "BR_INST_RETIRED.NEAR_CALL",
813 "PublicDescription": "This is a non-precise version (that is, does not use PEBS) of the event that counts both direct and indirect near call instructions retired.", 1284 "PublicDescription": "This is a precise version (that is, uses PEBS) of the event that counts both direct and indirect near call instructions retired.",
814 "SampleAfterValue": "100007", 1285 "SampleAfterValue": "100007",
815 "CounterHTOff": "0,1,2,3,4,5,6,7" 1286 "CounterHTOff": "0,1,2,3,4,5,6,7"
816 }, 1287 },
817 { 1288 {
818 "EventCode": "0xC4", 1289 "EventCode": "0xC4",
819 "UMask": "0x0", 1290 "UMask": "0x2",
820 "BriefDescription": "All (macro) branch instructions retired.", 1291 "BriefDescription": "Direct and indirect macro near call instructions retired (captured in ring 3). (Precise Event - PEBS)",
1292 "PEBS": "1",
821 "Counter": "0,1,2,3", 1293 "Counter": "0,1,2,3",
822 "EventName": "BR_INST_RETIRED.ALL_BRANCHES", 1294 "EventName": "BR_INST_RETIRED.NEAR_CALL_R3",
823 "PublicDescription": "This event counts all (macro) branch instructions retired.", 1295 "PublicDescription": "This is a precise version (that is, uses PEBS) of the event that counts both direct and indirect macro near call instructions retired (captured in ring 3).",
824 "SampleAfterValue": "400009", 1296 "SampleAfterValue": "100007",
825 "CounterHTOff": "0,1,2,3,4,5,6,7" 1297 "CounterHTOff": "0,1,2,3,4,5,6,7"
826 }, 1298 },
827 { 1299 {
828 "EventCode": "0xC4", 1300 "EventCode": "0xC4",
1301 "UMask": "0x4",
1302 "BriefDescription": "All (macro) branch instructions retired. (Precise Event - PEBS)",
1303 "PEBS": "2",
1304 "Counter": "0,1,2,3",
1305 "EventName": "BR_INST_RETIRED.ALL_BRANCHES_PEBS",
1306 "Errata": "BDW98",
1307 "PublicDescription": "This is a precise version of BR_INST_RETIRED.ALL_BRANCHES that counts all (macro) branch instructions retired.",
1308 "SampleAfterValue": "400009",
1309 "CounterHTOff": "0,1,2,3"
1310 },
1311 {
1312 "EventCode": "0xC4",
829 "UMask": "0x8", 1313 "UMask": "0x8",
830 "BriefDescription": "Return instructions retired.", 1314 "BriefDescription": "Return instructions retired. (Precise Event - PEBS)",
831 "PEBS": "1", 1315 "PEBS": "1",
832 "Counter": "0,1,2,3", 1316 "Counter": "0,1,2,3",
833 "EventName": "BR_INST_RETIRED.NEAR_RETURN", 1317 "EventName": "BR_INST_RETIRED.NEAR_RETURN",
834 "PublicDescription": "This is a non-precise version (that is, does not use PEBS) of the event that counts return instructions retired.", 1318 "PublicDescription": "This is a precise version (that is, uses PEBS) of the event that counts return instructions retired.",
835 "SampleAfterValue": "100007", 1319 "SampleAfterValue": "100007",
836 "CounterHTOff": "0,1,2,3,4,5,6,7" 1320 "CounterHTOff": "0,1,2,3,4,5,6,7"
837 }, 1321 },
@@ -841,18 +1325,18 @@
841 "BriefDescription": "Not taken branch instructions retired.", 1325 "BriefDescription": "Not taken branch instructions retired.",
842 "Counter": "0,1,2,3", 1326 "Counter": "0,1,2,3",
843 "EventName": "BR_INST_RETIRED.NOT_TAKEN", 1327 "EventName": "BR_INST_RETIRED.NOT_TAKEN",
844 "PublicDescription": "This is a non-precise version (that is, does not use PEBS) of the event that counts not taken branch instructions retired.", 1328 "PublicDescription": "This event counts not taken branch instructions retired.",
845 "SampleAfterValue": "400009", 1329 "SampleAfterValue": "400009",
846 "CounterHTOff": "0,1,2,3,4,5,6,7" 1330 "CounterHTOff": "0,1,2,3,4,5,6,7"
847 }, 1331 },
848 { 1332 {
849 "EventCode": "0xC4", 1333 "EventCode": "0xC4",
850 "UMask": "0x20", 1334 "UMask": "0x20",
851 "BriefDescription": "Taken branch instructions retired.", 1335 "BriefDescription": "Taken branch instructions retired. (Precise Event - PEBS)",
852 "PEBS": "1", 1336 "PEBS": "1",
853 "Counter": "0,1,2,3", 1337 "Counter": "0,1,2,3",
854 "EventName": "BR_INST_RETIRED.NEAR_TAKEN", 1338 "EventName": "BR_INST_RETIRED.NEAR_TAKEN",
855 "PublicDescription": "This is a non-precise version (that is, does not use PEBS) of the event that counts taken branch instructions retired.", 1339 "PublicDescription": "This is a precise version (that is, uses PEBS) of the event that counts taken branch instructions retired.",
856 "SampleAfterValue": "400009", 1340 "SampleAfterValue": "400009",
857 "CounterHTOff": "0,1,2,3,4,5,6,7" 1341 "CounterHTOff": "0,1,2,3,4,5,6,7"
858 }, 1342 },
@@ -863,34 +1347,11 @@
863 "Counter": "0,1,2,3", 1347 "Counter": "0,1,2,3",
864 "EventName": "BR_INST_RETIRED.FAR_BRANCH", 1348 "EventName": "BR_INST_RETIRED.FAR_BRANCH",
865 "Errata": "BDW98", 1349 "Errata": "BDW98",
866 "PublicDescription": "This is a non-precise version (that is, does not use PEBS) of the event that counts far branch instructions retired.", 1350 "PublicDescription": "This event counts far branch instructions retired.",
867 "SampleAfterValue": "100007", 1351 "SampleAfterValue": "100007",
868 "CounterHTOff": "0,1,2,3,4,5,6,7" 1352 "CounterHTOff": "0,1,2,3,4,5,6,7"
869 }, 1353 },
870 { 1354 {
871 "EventCode": "0xC4",
872 "UMask": "0x4",
873 "BriefDescription": "All (macro) branch instructions retired. (Precise Event - PEBS)",
874 "PEBS": "2",
875 "Counter": "0,1,2,3",
876 "EventName": "BR_INST_RETIRED.ALL_BRANCHES_PEBS",
877 "Errata": "BDW98",
878 "PublicDescription": "This is a precise version of BR_INST_RETIRED.ALL_BRANCHES that counts all (macro) branch instructions retired.",
879 "SampleAfterValue": "400009",
880 "CounterHTOff": "0,1,2,3"
881 },
882 {
883 "EventCode": "0xC5",
884 "UMask": "0x1",
885 "BriefDescription": "Mispredicted conditional branch instructions retired.",
886 "PEBS": "1",
887 "Counter": "0,1,2,3",
888 "EventName": "BR_MISP_RETIRED.CONDITIONAL",
889 "PublicDescription": "This is a non-precise version (that is, does not use PEBS) of the event that counts mispredicted conditional branch instructions retired.",
890 "SampleAfterValue": "400009",
891 "CounterHTOff": "0,1,2,3,4,5,6,7"
892 },
893 {
894 "EventCode": "0xC5", 1355 "EventCode": "0xC5",
895 "UMask": "0x0", 1356 "UMask": "0x0",
896 "BriefDescription": "All mispredicted macro branch instructions retired.", 1357 "BriefDescription": "All mispredicted macro branch instructions retired.",
@@ -902,13 +1363,13 @@
902 }, 1363 },
903 { 1364 {
904 "EventCode": "0xC5", 1365 "EventCode": "0xC5",
905 "UMask": "0x8", 1366 "UMask": "0x1",
906 "BriefDescription": "This event counts the number of mispredicted ret instructions retired. Non PEBS", 1367 "BriefDescription": "Mispredicted conditional branch instructions retired. (Precise Event - PEBS)",
907 "PEBS": "1", 1368 "PEBS": "1",
908 "Counter": "0,1,2,3", 1369 "Counter": "0,1,2,3",
909 "EventName": "BR_MISP_RETIRED.RET", 1370 "EventName": "BR_MISP_RETIRED.CONDITIONAL",
910 "PublicDescription": "This is a non-precise version (that is, does not use PEBS) of the event that counts mispredicted return instructions retired.", 1371 "PublicDescription": "This is a precise version (that is, uses PEBS) of the event that counts mispredicted conditional branch instructions retired.",
911 "SampleAfterValue": "100007", 1372 "SampleAfterValue": "400009",
912 "CounterHTOff": "0,1,2,3,4,5,6,7" 1373 "CounterHTOff": "0,1,2,3,4,5,6,7"
913 }, 1374 },
914 { 1375 {
@@ -923,164 +1384,36 @@
923 "CounterHTOff": "0,1,2,3" 1384 "CounterHTOff": "0,1,2,3"
924 }, 1385 },
925 { 1386 {
926 "EventCode": "0xCC", 1387 "EventCode": "0xC5",
927 "UMask": "0x20",
928 "BriefDescription": "Count cases of saving new LBR",
929 "Counter": "0,1,2,3",
930 "EventName": "ROB_MISC_EVENTS.LBR_INSERTS",
931 "PublicDescription": "This event counts cases of saving new LBR records by hardware. This assumes proper enabling of LBRs and takes into account LBR filtering done by the LBR_SELECT register.",
932 "SampleAfterValue": "2000003",
933 "CounterHTOff": "0,1,2,3,4,5,6,7"
934 },
935 {
936 "EventCode": "0x3C",
937 "UMask": "0x0",
938 "BriefDescription": "Thread cycles when thread is not in halt state",
939 "Counter": "0,1,2,3",
940 "EventName": "CPU_CLK_UNHALTED.THREAD_P",
941 "PublicDescription": "This is an architectural event that counts the number of thread cycles while the thread is not in a halt state. The thread enters the halt state when it is running the HLT instruction. The core frequency may change from time to time due to power or thermal throttling. For this reason, this event may have a changing ratio with regards to wall clock time.",
942 "SampleAfterValue": "2000003",
943 "CounterHTOff": "0,1,2,3,4,5,6,7"
944 },
945 {
946 "EventCode": "0x89",
947 "UMask": "0xa0",
948 "BriefDescription": "Taken speculative and retired mispredicted indirect calls.",
949 "Counter": "0,1,2,3",
950 "EventName": "BR_MISP_EXEC.TAKEN_INDIRECT_NEAR_CALL",
951 "SampleAfterValue": "200003",
952 "CounterHTOff": "0,1,2,3,4,5,6,7"
953 },
954 {
955 "EventCode": "0xA1",
956 "UMask": "0x1",
957 "BriefDescription": "Cycles per core when uops are exectuted in port 0.",
958 "Counter": "0,1,2,3",
959 "EventName": "UOPS_EXECUTED_PORT.PORT_0_CORE",
960 "AnyThread": "1",
961 "SampleAfterValue": "2000003",
962 "CounterHTOff": "0,1,2,3,4,5,6,7"
963 },
964 {
965 "EventCode": "0xA1",
966 "UMask": "0x2",
967 "BriefDescription": "Cycles per core when uops are exectuted in port 1.",
968 "Counter": "0,1,2,3",
969 "EventName": "UOPS_EXECUTED_PORT.PORT_1_CORE",
970 "AnyThread": "1",
971 "SampleAfterValue": "2000003",
972 "CounterHTOff": "0,1,2,3,4,5,6,7"
973 },
974 {
975 "EventCode": "0xA1",
976 "UMask": "0x4",
977 "BriefDescription": "Cycles per core when uops are dispatched to port 2.",
978 "Counter": "0,1,2,3",
979 "EventName": "UOPS_EXECUTED_PORT.PORT_2_CORE",
980 "AnyThread": "1",
981 "SampleAfterValue": "2000003",
982 "CounterHTOff": "0,1,2,3,4,5,6,7"
983 },
984 {
985 "EventCode": "0xA1",
986 "UMask": "0x8", 1388 "UMask": "0x8",
987 "BriefDescription": "Cycles per core when uops are dispatched to port 3.", 1389 "BriefDescription": "This event counts the number of mispredicted ret instructions retired.(Precise Event)",
988 "Counter": "0,1,2,3", 1390 "PEBS": "1",
989 "EventName": "UOPS_EXECUTED_PORT.PORT_3_CORE",
990 "AnyThread": "1",
991 "SampleAfterValue": "2000003",
992 "CounterHTOff": "0,1,2,3,4,5,6,7"
993 },
994 {
995 "EventCode": "0xA1",
996 "UMask": "0x10",
997 "BriefDescription": "Cycles per core when uops are exectuted in port 4.",
998 "Counter": "0,1,2,3",
999 "EventName": "UOPS_EXECUTED_PORT.PORT_4_CORE",
1000 "AnyThread": "1",
1001 "SampleAfterValue": "2000003",
1002 "CounterHTOff": "0,1,2,3,4,5,6,7"
1003 },
1004 {
1005 "EventCode": "0xA1",
1006 "UMask": "0x20",
1007 "BriefDescription": "Cycles per core when uops are exectuted in port 5.",
1008 "Counter": "0,1,2,3",
1009 "EventName": "UOPS_EXECUTED_PORT.PORT_5_CORE",
1010 "AnyThread": "1",
1011 "SampleAfterValue": "2000003",
1012 "CounterHTOff": "0,1,2,3,4,5,6,7"
1013 },
1014 {
1015 "EventCode": "0xA1",
1016 "UMask": "0x40",
1017 "BriefDescription": "Cycles per core when uops are exectuted in port 6.",
1018 "Counter": "0,1,2,3",
1019 "EventName": "UOPS_EXECUTED_PORT.PORT_6_CORE",
1020 "AnyThread": "1",
1021 "SampleAfterValue": "2000003",
1022 "CounterHTOff": "0,1,2,3,4,5,6,7"
1023 },
1024 {
1025 "EventCode": "0xA1",
1026 "UMask": "0x80",
1027 "BriefDescription": "Cycles per core when uops are dispatched to port 7.",
1028 "Counter": "0,1,2,3", 1391 "Counter": "0,1,2,3",
1029 "EventName": "UOPS_EXECUTED_PORT.PORT_7_CORE", 1392 "EventName": "BR_MISP_RETIRED.RET",
1030 "AnyThread": "1", 1393 "PublicDescription": "This is a precise version (that is, uses PEBS) of the event that counts mispredicted return instructions retired.",
1031 "SampleAfterValue": "2000003", 1394 "SampleAfterValue": "100007",
1032 "CounterHTOff": "0,1,2,3,4,5,6,7" 1395 "CounterHTOff": "0,1,2,3,4,5,6,7"
1033 }, 1396 },
1034 { 1397 {
1035 "EventCode": "0xC5", 1398 "EventCode": "0xC5",
1036 "UMask": "0x20", 1399 "UMask": "0x20",
1037 "BriefDescription": "number of near branch instructions retired that were mispredicted and taken.", 1400 "BriefDescription": "number of near branch instructions retired that were mispredicted and taken. (Precise Event - PEBS).",
1038 "PEBS": "1", 1401 "PEBS": "1",
1039 "Counter": "0,1,2,3", 1402 "Counter": "0,1,2,3",
1040 "EventName": "BR_MISP_RETIRED.NEAR_TAKEN", 1403 "EventName": "BR_MISP_RETIRED.NEAR_TAKEN",
1041 "PublicDescription": "Number of near branch instructions retired that were mispredicted and taken.", 1404 "PublicDescription": "Number of near branch instructions retired that were mispredicted and taken. (Precise Event - PEBS).",
1042 "SampleAfterValue": "400009", 1405 "SampleAfterValue": "400009",
1043 "CounterHTOff": "0,1,2,3,4,5,6,7" 1406 "CounterHTOff": "0,1,2,3,4,5,6,7"
1044 }, 1407 },
1045 { 1408 {
1046 "EventCode": "0xB1", 1409 "EventCode": "0xCC",
1047 "UMask": "0x1", 1410 "UMask": "0x20",
1048 "BriefDescription": "Cycles where at least 1 uop was executed per-thread.", 1411 "BriefDescription": "Count cases of saving new LBR",
1049 "Counter": "0,1,2,3",
1050 "EventName": "UOPS_EXECUTED.CYCLES_GE_1_UOP_EXEC",
1051 "CounterMask": "1",
1052 "SampleAfterValue": "2000003",
1053 "CounterHTOff": "0,1,2,3"
1054 },
1055 {
1056 "EventCode": "0xB1",
1057 "UMask": "0x1",
1058 "BriefDescription": "Cycles where at least 2 uops were executed per-thread.",
1059 "Counter": "0,1,2,3",
1060 "EventName": "UOPS_EXECUTED.CYCLES_GE_2_UOPS_EXEC",
1061 "CounterMask": "2",
1062 "SampleAfterValue": "2000003",
1063 "CounterHTOff": "0,1,2,3"
1064 },
1065 {
1066 "EventCode": "0xB1",
1067 "UMask": "0x1",
1068 "BriefDescription": "Cycles where at least 3 uops were executed per-thread.",
1069 "Counter": "0,1,2,3",
1070 "EventName": "UOPS_EXECUTED.CYCLES_GE_3_UOPS_EXEC",
1071 "CounterMask": "3",
1072 "SampleAfterValue": "2000003",
1073 "CounterHTOff": "0,1,2,3"
1074 },
1075 {
1076 "EventCode": "0xB1",
1077 "UMask": "0x1",
1078 "BriefDescription": "Cycles where at least 4 uops were executed per-thread.",
1079 "Counter": "0,1,2,3", 1412 "Counter": "0,1,2,3",
1080 "EventName": "UOPS_EXECUTED.CYCLES_GE_4_UOPS_EXEC", 1413 "EventName": "ROB_MISC_EVENTS.LBR_INSERTS",
1081 "CounterMask": "4", 1414 "PublicDescription": "This event counts cases of saving new LBR records by hardware. This assumes proper enabling of LBRs and takes into account LBR filtering done by the LBR_SELECT register.",
1082 "SampleAfterValue": "2000003", 1415 "SampleAfterValue": "2000003",
1083 "CounterHTOff": "0,1,2,3" 1416 "CounterHTOff": "0,1,2,3,4,5,6,7"
1084 }, 1417 },
1085 { 1418 {
1086 "EventCode": "0xe6", 1419 "EventCode": "0xe6",
@@ -1090,328 +1423,5 @@
1090 "EventName": "BACLEARS.ANY", 1423 "EventName": "BACLEARS.ANY",
1091 "SampleAfterValue": "100003", 1424 "SampleAfterValue": "100003",
1092 "CounterHTOff": "0,1,2,3,4,5,6,7" 1425 "CounterHTOff": "0,1,2,3,4,5,6,7"
1093 },
1094 {
1095 "EventCode": "0xA3",
1096 "UMask": "0x8",
1097 "BriefDescription": "Cycles while L1 cache miss demand load is outstanding.",
1098 "Counter": "2",
1099 "EventName": "CYCLE_ACTIVITY.CYCLES_L1D_MISS",
1100 "CounterMask": "8",
1101 "SampleAfterValue": "2000003",
1102 "CounterHTOff": "2"
1103 },
1104 {
1105 "EventCode": "0xA3",
1106 "UMask": "0x1",
1107 "BriefDescription": "Cycles while L2 cache miss demand load is outstanding.",
1108 "Counter": "0,1,2,3",
1109 "EventName": "CYCLE_ACTIVITY.CYCLES_L2_MISS",
1110 "CounterMask": "1",
1111 "SampleAfterValue": "2000003",
1112 "CounterHTOff": "0,1,2,3,4,5,6,7"
1113 },
1114 {
1115 "EventCode": "0xA3",
1116 "UMask": "0x2",
1117 "BriefDescription": "Cycles while memory subsystem has an outstanding load.",
1118 "Counter": "0,1,2,3",
1119 "EventName": "CYCLE_ACTIVITY.CYCLES_MEM_ANY",
1120 "CounterMask": "2",
1121 "SampleAfterValue": "2000003",
1122 "CounterHTOff": "0,1,2,3"
1123 },
1124 {
1125 "EventCode": "0xA3",
1126 "UMask": "0x4",
1127 "BriefDescription": "Total execution stalls.",
1128 "Counter": "0,1,2,3",
1129 "EventName": "CYCLE_ACTIVITY.STALLS_TOTAL",
1130 "CounterMask": "4",
1131 "SampleAfterValue": "2000003",
1132 "CounterHTOff": "0,1,2,3,4,5,6,7"
1133 },
1134 {
1135 "EventCode": "0xA3",
1136 "UMask": "0xc",
1137 "BriefDescription": "Execution stalls while L1 cache miss demand load is outstanding.",
1138 "Counter": "2",
1139 "EventName": "CYCLE_ACTIVITY.STALLS_L1D_MISS",
1140 "CounterMask": "12",
1141 "SampleAfterValue": "2000003",
1142 "CounterHTOff": "2"
1143 },
1144 {
1145 "EventCode": "0xA3",
1146 "UMask": "0x5",
1147 "BriefDescription": "Execution stalls while L2 cache miss demand load is outstanding.",
1148 "Counter": "0,1,2,3",
1149 "EventName": "CYCLE_ACTIVITY.STALLS_L2_MISS",
1150 "CounterMask": "5",
1151 "SampleAfterValue": "2000003",
1152 "CounterHTOff": "0,1,2,3,4,5,6,7"
1153 },
1154 {
1155 "EventCode": "0xA3",
1156 "UMask": "0x6",
1157 "BriefDescription": "Execution stalls while memory subsystem has an outstanding load.",
1158 "Counter": "0,1,2,3",
1159 "EventName": "CYCLE_ACTIVITY.STALLS_MEM_ANY",
1160 "CounterMask": "6",
1161 "SampleAfterValue": "2000003",
1162 "CounterHTOff": "0,1,2,3,4,5,6,7"
1163 },
1164 {
1165 "EdgeDetect": "1",
1166 "EventCode": "0xC3",
1167 "UMask": "0x1",
1168 "BriefDescription": "Number of machine clears (nukes) of any type.",
1169 "Counter": "0,1,2,3",
1170 "EventName": "MACHINE_CLEARS.COUNT",
1171 "CounterMask": "1",
1172 "SampleAfterValue": "100003",
1173 "CounterHTOff": "0,1,2,3,4,5,6,7"
1174 },
1175 {
1176 "EventCode": "0xA8",
1177 "UMask": "0x1",
1178 "BriefDescription": "Cycles 4 Uops delivered by the LSD, but didn't come from the decoder.",
1179 "Counter": "0,1,2,3",
1180 "EventName": "LSD.CYCLES_4_UOPS",
1181 "CounterMask": "4",
1182 "SampleAfterValue": "2000003",
1183 "CounterHTOff": "0,1,2,3,4,5,6,7"
1184 },
1185 {
1186 "EdgeDetect": "1",
1187 "Invert": "1",
1188 "EventCode": "0x5E",
1189 "UMask": "0x1",
1190 "BriefDescription": "Counts end of periods where the Reservation Station (RS) was empty. Could be useful to precisely locate Frontend Latency Bound issues.",
1191 "Counter": "0,1,2,3",
1192 "EventName": "RS_EVENTS.EMPTY_END",
1193 "CounterMask": "1",
1194 "SampleAfterValue": "200003",
1195 "CounterHTOff": "0,1,2,3,4,5,6,7"
1196 },
1197 {
1198 "EventCode": "0xA8",
1199 "UMask": "0x1",
1200 "BriefDescription": "Cycles Uops delivered by the LSD, but didn't come from the decoder.",
1201 "Counter": "0,1,2,3",
1202 "EventName": "LSD.CYCLES_ACTIVE",
1203 "CounterMask": "1",
1204 "SampleAfterValue": "2000003",
1205 "CounterHTOff": "0,1,2,3,4,5,6,7"
1206 },
1207 {
1208 "EventCode": "0xA1",
1209 "UMask": "0x1",
1210 "BriefDescription": "Cycles per thread when uops are executed in port 0",
1211 "Counter": "0,1,2,3",
1212 "EventName": "UOPS_EXECUTED_PORT.PORT_0",
1213 "PublicDescription": "This event counts, on the per-thread basis, cycles during which uops are dispatched from the Reservation Station (RS) to port 0.",
1214 "SampleAfterValue": "2000003",
1215 "CounterHTOff": "0,1,2,3,4,5,6,7"
1216 },
1217 {
1218 "EventCode": "0xA1",
1219 "UMask": "0x2",
1220 "BriefDescription": "Cycles per thread when uops are executed in port 1",
1221 "Counter": "0,1,2,3",
1222 "EventName": "UOPS_EXECUTED_PORT.PORT_1",
1223 "PublicDescription": "This event counts, on the per-thread basis, cycles during which uops are dispatched from the Reservation Station (RS) to port 1.",
1224 "SampleAfterValue": "2000003",
1225 "CounterHTOff": "0,1,2,3,4,5,6,7"
1226 },
1227 {
1228 "EventCode": "0xA1",
1229 "UMask": "0x4",
1230 "BriefDescription": "Cycles per thread when uops are executed in port 2",
1231 "Counter": "0,1,2,3",
1232 "EventName": "UOPS_EXECUTED_PORT.PORT_2",
1233 "PublicDescription": "This event counts, on the per-thread basis, cycles during which uops are dispatched from the Reservation Station (RS) to port 2.",
1234 "SampleAfterValue": "2000003",
1235 "CounterHTOff": "0,1,2,3,4,5,6,7"
1236 },
1237 {
1238 "EventCode": "0xA1",
1239 "UMask": "0x8",
1240 "BriefDescription": "Cycles per thread when uops are executed in port 3",
1241 "Counter": "0,1,2,3",
1242 "EventName": "UOPS_EXECUTED_PORT.PORT_3",
1243 "PublicDescription": "This event counts, on the per-thread basis, cycles during which uops are dispatched from the Reservation Station (RS) to port 3.",
1244 "SampleAfterValue": "2000003",
1245 "CounterHTOff": "0,1,2,3,4,5,6,7"
1246 },
1247 {
1248 "EventCode": "0xA1",
1249 "UMask": "0x10",
1250 "BriefDescription": "Cycles per thread when uops are executed in port 4",
1251 "Counter": "0,1,2,3",
1252 "EventName": "UOPS_EXECUTED_PORT.PORT_4",
1253 "PublicDescription": "This event counts, on the per-thread basis, cycles during which uops are dispatched from the Reservation Station (RS) to port 4.",
1254 "SampleAfterValue": "2000003",
1255 "CounterHTOff": "0,1,2,3,4,5,6,7"
1256 },
1257 {
1258 "EventCode": "0xA1",
1259 "UMask": "0x20",
1260 "BriefDescription": "Cycles per thread when uops are executed in port 5",
1261 "Counter": "0,1,2,3",
1262 "EventName": "UOPS_EXECUTED_PORT.PORT_5",
1263 "PublicDescription": "This event counts, on the per-thread basis, cycles during which uops are dispatched from the Reservation Station (RS) to port 5.",
1264 "SampleAfterValue": "2000003",
1265 "CounterHTOff": "0,1,2,3,4,5,6,7"
1266 },
1267 {
1268 "EventCode": "0xA1",
1269 "UMask": "0x40",
1270 "BriefDescription": "Cycles per thread when uops are executed in port 6",
1271 "Counter": "0,1,2,3",
1272 "EventName": "UOPS_EXECUTED_PORT.PORT_6",
1273 "PublicDescription": "This event counts, on the per-thread basis, cycles during which uops are dispatched from the Reservation Station (RS) to port 6.",
1274 "SampleAfterValue": "2000003",
1275 "CounterHTOff": "0,1,2,3,4,5,6,7"
1276 },
1277 {
1278 "EventCode": "0xA1",
1279 "UMask": "0x80",
1280 "BriefDescription": "Cycles per thread when uops are executed in port 7",
1281 "Counter": "0,1,2,3",
1282 "EventName": "UOPS_EXECUTED_PORT.PORT_7",
1283 "PublicDescription": "This event counts, on the per-thread basis, cycles during which uops are dispatched from the Reservation Station (RS) to port 7.",
1284 "SampleAfterValue": "2000003",
1285 "CounterHTOff": "0,1,2,3,4,5,6,7"
1286 },
1287 {
1288 "EventCode": "0xA0",
1289 "UMask": "0x3",
1290 "BriefDescription": "Micro-op dispatches cancelled due to insufficient SIMD physical register file read ports",
1291 "Counter": "0,1,2,3",
1292 "EventName": "UOP_DISPATCHES_CANCELLED.SIMD_PRF",
1293 "PublicDescription": "This event counts the number of micro-operations cancelled after they were dispatched from the scheduler to the execution units when the total number of physical register read ports across all dispatch ports exceeds the read bandwidth of the physical register file. The SIMD_PRF subevent applies to the following instructions: VDPPS, DPPS, VPCMPESTRI, PCMPESTRI, VPCMPESTRM, PCMPESTRM, VFMADD*, VFMADDSUB*, VFMSUB*, VMSUBADD*, VFNMADD*, VFNMSUB*. See the Broadwell Optimization Guide for more information.",
1294 "SampleAfterValue": "2000003",
1295 "CounterHTOff": "0,1,2,3"
1296 },
1297 {
1298 "EventCode": "0x00",
1299 "UMask": "0x2",
1300 "BriefDescription": "Core cycles when at least one thread on the physical core is not in halt state.",
1301 "Counter": "Fixed counter 2",
1302 "EventName": "CPU_CLK_UNHALTED.THREAD_ANY",
1303 "AnyThread": "1",
1304 "SampleAfterValue": "2000003",
1305 "CounterHTOff": "Fixed counter 2"
1306 },
1307 {
1308 "EventCode": "0x3C",
1309 "UMask": "0x0",
1310 "BriefDescription": "Core cycles when at least one thread on the physical core is not in halt state.",
1311 "Counter": "0,1,2,3",
1312 "EventName": "CPU_CLK_UNHALTED.THREAD_P_ANY",
1313 "AnyThread": "1",
1314 "SampleAfterValue": "2000003",
1315 "CounterHTOff": "0,1,2,3,4,5,6,7"
1316 },
1317 {
1318 "EventCode": "0x3C",
1319 "UMask": "0x1",
1320 "BriefDescription": "Reference cycles when the at least one thread on the physical core is unhalted (counts at 100 MHz rate).",
1321 "Counter": "0,1,2,3",
1322 "EventName": "CPU_CLK_THREAD_UNHALTED.REF_XCLK_ANY",
1323 "AnyThread": "1",
1324 "SampleAfterValue": "2000003",
1325 "CounterHTOff": "0,1,2,3,4,5,6,7"
1326 },
1327 {
1328 "EventCode": "0x0D",
1329 "UMask": "0x3",
1330 "BriefDescription": "Core cycles the allocator was stalled due to recovery from earlier clear event for any thread running on the physical core (e.g. misprediction or memory nuke).",
1331 "Counter": "0,1,2,3",
1332 "EventName": "INT_MISC.RECOVERY_CYCLES_ANY",
1333 "AnyThread": "1",
1334 "CounterMask": "1",
1335 "SampleAfterValue": "2000003",
1336 "CounterHTOff": "0,1,2,3,4,5,6,7"
1337 },
1338 {
1339 "EventCode": "0xb1",
1340 "UMask": "0x2",
1341 "BriefDescription": "Cycles at least 1 micro-op is executed from any thread on physical core.",
1342 "Counter": "0,1,2,3",
1343 "EventName": "UOPS_EXECUTED.CORE_CYCLES_GE_1",
1344 "CounterMask": "1",
1345 "SampleAfterValue": "2000003",
1346 "CounterHTOff": "0,1,2,3,4,5,6,7"
1347 },
1348 {
1349 "EventCode": "0xb1",
1350 "UMask": "0x2",
1351 "BriefDescription": "Cycles at least 2 micro-op is executed from any thread on physical core.",
1352 "Counter": "0,1,2,3",
1353 "EventName": "UOPS_EXECUTED.CORE_CYCLES_GE_2",
1354 "CounterMask": "2",
1355 "SampleAfterValue": "2000003",
1356 "CounterHTOff": "0,1,2,3,4,5,6,7"
1357 },
1358 {
1359 "EventCode": "0xb1",
1360 "UMask": "0x2",
1361 "BriefDescription": "Cycles at least 3 micro-op is executed from any thread on physical core.",
1362 "Counter": "0,1,2,3",
1363 "EventName": "UOPS_EXECUTED.CORE_CYCLES_GE_3",
1364 "CounterMask": "3",
1365 "SampleAfterValue": "2000003",
1366 "CounterHTOff": "0,1,2,3,4,5,6,7"
1367 },
1368 {
1369 "EventCode": "0xb1",
1370 "UMask": "0x2",
1371 "BriefDescription": "Cycles at least 4 micro-op is executed from any thread on physical core.",
1372 "Counter": "0,1,2,3",
1373 "EventName": "UOPS_EXECUTED.CORE_CYCLES_GE_4",
1374 "CounterMask": "4",
1375 "SampleAfterValue": "2000003",
1376 "CounterHTOff": "0,1,2,3,4,5,6,7"
1377 },
1378 {
1379 "Invert": "1",
1380 "EventCode": "0xb1",
1381 "UMask": "0x2",
1382 "BriefDescription": "Cycles with no micro-ops executed from any thread on physical core.",
1383 "Counter": "0,1,2,3",
1384 "EventName": "UOPS_EXECUTED.CORE_CYCLES_NONE",
1385 "SampleAfterValue": "2000003",
1386 "CounterHTOff": "0,1,2,3,4,5,6,7"
1387 },
1388 {
1389 "EventCode": "0x3C",
1390 "UMask": "0x1",
1391 "BriefDescription": "Reference cycles when the thread is unhalted (counts at 100 MHz rate)",
1392 "Counter": "0,1,2,3",
1393 "EventName": "CPU_CLK_UNHALTED.REF_XCLK",
1394 "PublicDescription": "Reference cycles when the thread is unhalted (counts at 100 MHz rate).",
1395 "SampleAfterValue": "2000003",
1396 "CounterHTOff": "0,1,2,3,4,5,6,7"
1397 },
1398 {
1399 "EventCode": "0x3C",
1400 "UMask": "0x1",
1401 "BriefDescription": "Reference cycles when the at least one thread on the physical core is unhalted (counts at 100 MHz rate).",
1402 "Counter": "0,1,2,3",
1403 "EventName": "CPU_CLK_UNHALTED.REF_XCLK_ANY",
1404 "AnyThread": "1",
1405 "SampleAfterValue": "2000003",
1406 "CounterHTOff": "0,1,2,3,4,5,6,7"
1407 },
1408 {
1409 "EventCode": "0x3C",
1410 "UMask": "0x2",
1411 "BriefDescription": "Count XClk pulses when this thread is unhalted and the other thread is halted.",
1412 "Counter": "0,1,2,3",
1413 "EventName": "CPU_CLK_UNHALTED.ONE_THREAD_ACTIVE",
1414 "SampleAfterValue": "2000003",
1415 "CounterHTOff": "0,1,2,3,4,5,6,7"
1416 } 1426 }
1417] \ No newline at end of file 1427] \ No newline at end of file
diff --git a/tools/perf/pmu-events/arch/x86/broadwellx/virtual-memory.json b/tools/perf/pmu-events/arch/x86/broadwellx/virtual-memory.json
index 5ce8b67ba076..7d79c707c6d1 100644
--- a/tools/perf/pmu-events/arch/x86/broadwellx/virtual-memory.json
+++ b/tools/perf/pmu-events/arch/x86/broadwellx/virtual-memory.json
@@ -45,6 +45,16 @@
45 }, 45 },
46 { 46 {
47 "EventCode": "0x08", 47 "EventCode": "0x08",
48 "UMask": "0xe",
49 "BriefDescription": "Demand load Miss in all translation lookaside buffer (TLB) levels causes a page walk that completes of any page size.",
50 "Counter": "0,1,2,3",
51 "EventName": "DTLB_LOAD_MISSES.WALK_COMPLETED",
52 "Errata": "BDM69",
53 "SampleAfterValue": "100003",
54 "CounterHTOff": "0,1,2,3,4,5,6,7"
55 },
56 {
57 "EventCode": "0x08",
48 "UMask": "0x10", 58 "UMask": "0x10",
49 "BriefDescription": "Cycles when PMH is busy with page walks", 59 "BriefDescription": "Cycles when PMH is busy with page walks",
50 "Counter": "0,1,2,3", 60 "Counter": "0,1,2,3",
@@ -73,6 +83,15 @@
73 "CounterHTOff": "0,1,2,3,4,5,6,7" 83 "CounterHTOff": "0,1,2,3,4,5,6,7"
74 }, 84 },
75 { 85 {
86 "EventCode": "0x08",
87 "UMask": "0x60",
88 "BriefDescription": "Load operations that miss the first DTLB level but hit the second and do not cause page walks.",
89 "Counter": "0,1,2,3",
90 "EventName": "DTLB_LOAD_MISSES.STLB_HIT",
91 "SampleAfterValue": "2000003",
92 "CounterHTOff": "0,1,2,3,4,5,6,7"
93 },
94 {
76 "EventCode": "0x49", 95 "EventCode": "0x49",
77 "UMask": "0x1", 96 "UMask": "0x1",
78 "BriefDescription": "Store misses in all DTLB levels that cause page walks", 97 "BriefDescription": "Store misses in all DTLB levels that cause page walks",
@@ -118,6 +137,16 @@
118 }, 137 },
119 { 138 {
120 "EventCode": "0x49", 139 "EventCode": "0x49",
140 "UMask": "0xe",
141 "BriefDescription": "Store misses in all DTLB levels that cause completed page walks.",
142 "Counter": "0,1,2,3",
143 "EventName": "DTLB_STORE_MISSES.WALK_COMPLETED",
144 "Errata": "BDM69",
145 "SampleAfterValue": "100003",
146 "CounterHTOff": "0,1,2,3,4,5,6,7"
147 },
148 {
149 "EventCode": "0x49",
121 "UMask": "0x10", 150 "UMask": "0x10",
122 "BriefDescription": "Cycles when PMH is busy with page walks", 151 "BriefDescription": "Cycles when PMH is busy with page walks",
123 "Counter": "0,1,2,3", 152 "Counter": "0,1,2,3",
@@ -146,6 +175,15 @@
146 "CounterHTOff": "0,1,2,3,4,5,6,7" 175 "CounterHTOff": "0,1,2,3,4,5,6,7"
147 }, 176 },
148 { 177 {
178 "EventCode": "0x49",
179 "UMask": "0x60",
180 "BriefDescription": "Store operations that miss the first TLB level but hit the second and do not cause page walks.",
181 "Counter": "0,1,2,3",
182 "EventName": "DTLB_STORE_MISSES.STLB_HIT",
183 "SampleAfterValue": "100003",
184 "CounterHTOff": "0,1,2,3,4,5,6,7"
185 },
186 {
149 "EventCode": "0x4F", 187 "EventCode": "0x4F",
150 "UMask": "0x10", 188 "UMask": "0x10",
151 "BriefDescription": "Cycle count for an Extended Page table walk.", 189 "BriefDescription": "Cycle count for an Extended Page table walk.",
@@ -201,6 +239,16 @@
201 }, 239 },
202 { 240 {
203 "EventCode": "0x85", 241 "EventCode": "0x85",
242 "UMask": "0xe",
243 "BriefDescription": "Misses in all ITLB levels that cause completed page walks.",
244 "Counter": "0,1,2,3",
245 "EventName": "ITLB_MISSES.WALK_COMPLETED",
246 "Errata": "BDM69",
247 "SampleAfterValue": "100003",
248 "CounterHTOff": "0,1,2,3,4,5,6,7"
249 },
250 {
251 "EventCode": "0x85",
204 "UMask": "0x10", 252 "UMask": "0x10",
205 "BriefDescription": "Cycles when PMH is busy with page walks", 253 "BriefDescription": "Cycles when PMH is busy with page walks",
206 "Counter": "0,1,2,3", 254 "Counter": "0,1,2,3",
@@ -229,6 +277,15 @@
229 "CounterHTOff": "0,1,2,3,4,5,6,7" 277 "CounterHTOff": "0,1,2,3,4,5,6,7"
230 }, 278 },
231 { 279 {
280 "EventCode": "0x85",
281 "UMask": "0x60",
282 "BriefDescription": "Operations that miss the first ITLB level but hit the second and do not cause any page walks.",
283 "Counter": "0,1,2,3",
284 "EventName": "ITLB_MISSES.STLB_HIT",
285 "SampleAfterValue": "100003",
286 "CounterHTOff": "0,1,2,3,4,5,6,7"
287 },
288 {
232 "EventCode": "0xAE", 289 "EventCode": "0xAE",
233 "UMask": "0x1", 290 "UMask": "0x1",
234 "BriefDescription": "Flushing of the Instruction TLB (ITLB) pages, includes 4k/2M/4M pages.", 291 "BriefDescription": "Flushing of the Instruction TLB (ITLB) pages, includes 4k/2M/4M pages.",
@@ -250,60 +307,60 @@
250 }, 307 },
251 { 308 {
252 "EventCode": "0xBC", 309 "EventCode": "0xBC",
253 "UMask": "0x21", 310 "UMask": "0x12",
254 "BriefDescription": "Number of ITLB page walker hits in the L1+FB.", 311 "BriefDescription": "Number of DTLB page walker hits in the L2.",
255 "Counter": "0,1,2,3", 312 "Counter": "0,1,2,3",
256 "EventName": "PAGE_WALKER_LOADS.ITLB_L1", 313 "EventName": "PAGE_WALKER_LOADS.DTLB_L2",
257 "Errata": "BDM69, BDM98", 314 "Errata": "BDM69, BDM98",
258 "SampleAfterValue": "2000003", 315 "SampleAfterValue": "2000003",
259 "CounterHTOff": "0,1,2,3" 316 "CounterHTOff": "0,1,2,3"
260 }, 317 },
261 { 318 {
262 "EventCode": "0xBC", 319 "EventCode": "0xBC",
263 "UMask": "0x12", 320 "UMask": "0x14",
264 "BriefDescription": "Number of DTLB page walker hits in the L2.", 321 "BriefDescription": "Number of DTLB page walker hits in the L3 + XSNP.",
265 "Counter": "0,1,2,3", 322 "Counter": "0,1,2,3",
266 "EventName": "PAGE_WALKER_LOADS.DTLB_L2", 323 "EventName": "PAGE_WALKER_LOADS.DTLB_L3",
267 "Errata": "BDM69, BDM98", 324 "Errata": "BDM69, BDM98",
268 "SampleAfterValue": "2000003", 325 "SampleAfterValue": "2000003",
269 "CounterHTOff": "0,1,2,3" 326 "CounterHTOff": "0,1,2,3"
270 }, 327 },
271 { 328 {
272 "EventCode": "0xBC", 329 "EventCode": "0xBC",
273 "UMask": "0x22", 330 "UMask": "0x18",
274 "BriefDescription": "Number of ITLB page walker hits in the L2.", 331 "BriefDescription": "Number of DTLB page walker hits in Memory.",
275 "Counter": "0,1,2,3", 332 "Counter": "0,1,2,3",
276 "EventName": "PAGE_WALKER_LOADS.ITLB_L2", 333 "EventName": "PAGE_WALKER_LOADS.DTLB_MEMORY",
277 "Errata": "BDM69, BDM98", 334 "Errata": "BDM69, BDM98",
278 "SampleAfterValue": "2000003", 335 "SampleAfterValue": "2000003",
279 "CounterHTOff": "0,1,2,3" 336 "CounterHTOff": "0,1,2,3"
280 }, 337 },
281 { 338 {
282 "EventCode": "0xBC", 339 "EventCode": "0xBC",
283 "UMask": "0x14", 340 "UMask": "0x21",
284 "BriefDescription": "Number of DTLB page walker hits in the L3 + XSNP.", 341 "BriefDescription": "Number of ITLB page walker hits in the L1+FB.",
285 "Counter": "0,1,2,3", 342 "Counter": "0,1,2,3",
286 "EventName": "PAGE_WALKER_LOADS.DTLB_L3", 343 "EventName": "PAGE_WALKER_LOADS.ITLB_L1",
287 "Errata": "BDM69, BDM98", 344 "Errata": "BDM69, BDM98",
288 "SampleAfterValue": "2000003", 345 "SampleAfterValue": "2000003",
289 "CounterHTOff": "0,1,2,3" 346 "CounterHTOff": "0,1,2,3"
290 }, 347 },
291 { 348 {
292 "EventCode": "0xBC", 349 "EventCode": "0xBC",
293 "UMask": "0x24", 350 "UMask": "0x22",
294 "BriefDescription": "Number of ITLB page walker hits in the L3 + XSNP.", 351 "BriefDescription": "Number of ITLB page walker hits in the L2.",
295 "Counter": "0,1,2,3", 352 "Counter": "0,1,2,3",
296 "EventName": "PAGE_WALKER_LOADS.ITLB_L3", 353 "EventName": "PAGE_WALKER_LOADS.ITLB_L2",
297 "Errata": "BDM69, BDM98", 354 "Errata": "BDM69, BDM98",
298 "SampleAfterValue": "2000003", 355 "SampleAfterValue": "2000003",
299 "CounterHTOff": "0,1,2,3" 356 "CounterHTOff": "0,1,2,3"
300 }, 357 },
301 { 358 {
302 "EventCode": "0xBC", 359 "EventCode": "0xBC",
303 "UMask": "0x18", 360 "UMask": "0x24",
304 "BriefDescription": "Number of DTLB page walker hits in Memory.", 361 "BriefDescription": "Number of ITLB page walker hits in the L3 + XSNP.",
305 "Counter": "0,1,2,3", 362 "Counter": "0,1,2,3",
306 "EventName": "PAGE_WALKER_LOADS.DTLB_MEMORY", 363 "EventName": "PAGE_WALKER_LOADS.ITLB_L3",
307 "Errata": "BDM69, BDM98", 364 "Errata": "BDM69, BDM98",
308 "SampleAfterValue": "2000003", 365 "SampleAfterValue": "2000003",
309 "CounterHTOff": "0,1,2,3" 366 "CounterHTOff": "0,1,2,3"
@@ -327,62 +384,5 @@
327 "PublicDescription": "This event counts the number of any STLB flush attempts (such as entire, VPID, PCID, InvPage, CR3 write, and so on).", 384 "PublicDescription": "This event counts the number of any STLB flush attempts (such as entire, VPID, PCID, InvPage, CR3 write, and so on).",
328 "SampleAfterValue": "100007", 385 "SampleAfterValue": "100007",
329 "CounterHTOff": "0,1,2,3,4,5,6,7" 386 "CounterHTOff": "0,1,2,3,4,5,6,7"
330 },
331 {
332 "EventCode": "0x08",
333 "UMask": "0xe",
334 "BriefDescription": "Demand load Miss in all translation lookaside buffer (TLB) levels causes a page walk that completes of any page size.",
335 "Counter": "0,1,2,3",
336 "EventName": "DTLB_LOAD_MISSES.WALK_COMPLETED",
337 "Errata": "BDM69",
338 "SampleAfterValue": "100003",
339 "CounterHTOff": "0,1,2,3,4,5,6,7"
340 },
341 {
342 "EventCode": "0x08",
343 "UMask": "0x60",
344 "BriefDescription": "Load operations that miss the first DTLB level but hit the second and do not cause page walks.",
345 "Counter": "0,1,2,3",
346 "EventName": "DTLB_LOAD_MISSES.STLB_HIT",
347 "SampleAfterValue": "2000003",
348 "CounterHTOff": "0,1,2,3,4,5,6,7"
349 },
350 {
351 "EventCode": "0x49",
352 "UMask": "0xe",
353 "BriefDescription": "Store misses in all DTLB levels that cause completed page walks.",
354 "Counter": "0,1,2,3",
355 "EventName": "DTLB_STORE_MISSES.WALK_COMPLETED",
356 "Errata": "BDM69",
357 "SampleAfterValue": "100003",
358 "CounterHTOff": "0,1,2,3,4,5,6,7"
359 },
360 {
361 "EventCode": "0x49",
362 "UMask": "0x60",
363 "BriefDescription": "Store operations that miss the first TLB level but hit the second and do not cause page walks.",
364 "Counter": "0,1,2,3",
365 "EventName": "DTLB_STORE_MISSES.STLB_HIT",
366 "SampleAfterValue": "100003",
367 "CounterHTOff": "0,1,2,3,4,5,6,7"
368 },
369 {
370 "EventCode": "0x85",
371 "UMask": "0xe",
372 "BriefDescription": "Misses in all ITLB levels that cause completed page walks.",
373 "Counter": "0,1,2,3",
374 "EventName": "ITLB_MISSES.WALK_COMPLETED",
375 "Errata": "BDM69",
376 "SampleAfterValue": "100003",
377 "CounterHTOff": "0,1,2,3,4,5,6,7"
378 },
379 {
380 "EventCode": "0x85",
381 "UMask": "0x60",
382 "BriefDescription": "Operations that miss the first ITLB level but hit the second and do not cause any page walks.",
383 "Counter": "0,1,2,3",
384 "EventName": "ITLB_MISSES.STLB_HIT",
385 "SampleAfterValue": "100003",
386 "CounterHTOff": "0,1,2,3,4,5,6,7"
387 } 387 }
388] \ No newline at end of file 388] \ No newline at end of file
diff --git a/tools/perf/pmu-events/arch/x86/goldmont/cache.json b/tools/perf/pmu-events/arch/x86/goldmont/cache.json
index 4e02e1e5e70d..f8bbe087b0f8 100644
--- a/tools/perf/pmu-events/arch/x86/goldmont/cache.json
+++ b/tools/perf/pmu-events/arch/x86/goldmont/cache.json
@@ -1,6 +1,26 @@
1[ 1[
2 { 2 {
3 "CollectPEBSRecord": "1", 3 "CollectPEBSRecord": "1",
4 "PublicDescription": "Counts memory requests originating from the core that miss in the L2 cache.",
5 "EventCode": "0x2E",
6 "Counter": "0,1,2,3",
7 "UMask": "0x41",
8 "EventName": "LONGEST_LAT_CACHE.MISS",
9 "SampleAfterValue": "200003",
10 "BriefDescription": "L2 cache request misses"
11 },
12 {
13 "CollectPEBSRecord": "1",
14 "PublicDescription": "Counts memory requests originating from the core that reference a cache line in the L2 cache.",
15 "EventCode": "0x2E",
16 "Counter": "0,1,2,3",
17 "UMask": "0x4f",
18 "EventName": "LONGEST_LAT_CACHE.REFERENCE",
19 "SampleAfterValue": "200003",
20 "BriefDescription": "L2 cache requests"
21 },
22 {
23 "CollectPEBSRecord": "1",
4 "PublicDescription": "Counts the number of demand and prefetch transactions that the L2 XQ rejects due to a full or near full condition which likely indicates back pressure from the intra-die interconnect (IDI) fabric. The XQ may reject transactions from the L2Q (non-cacheable requests), L2 misses and L2 write-back victims.", 24 "PublicDescription": "Counts the number of demand and prefetch transactions that the L2 XQ rejects due to a full or near full condition which likely indicates back pressure from the intra-die interconnect (IDI) fabric. The XQ may reject transactions from the L2Q (non-cacheable requests), L2 misses and L2 write-back victims.",
5 "EventCode": "0x30", 25 "EventCode": "0x30",
6 "Counter": "0,1,2,3", 26 "Counter": "0,1,2,3",
@@ -11,120 +31,119 @@
11 }, 31 },
12 { 32 {
13 "CollectPEBSRecord": "1", 33 "CollectPEBSRecord": "1",
14 "PublicDescription": "Counts the number of demand and L1 prefetcher requests rejected by the L2Q due to a full or nearly full condition which likely indicates back pressure from L2Q. It also counts requests that would have gone directly to the XQ, but are rejected due to a full or nearly full condition, indicating back pressure from the IDI link. The L2Q may also reject transactions from a core to insure fairness between cores, or to delay a core's dirty eviction when the address conflicts with incoming external snoops.", 34 "PublicDescription": "Counts the number of demand and L1 prefetcher requests rejected by the L2Q due to a full or nearly full condition which likely indicates back pressure from L2Q. It also counts requests that would have gone directly to the XQ, but are rejected due to a full or nearly full condition, indicating back pressure from the IDI link. The L2Q may also reject transactions from a core to ensure fairness between cores, or to delay a core's dirty eviction when the address conflicts with incoming external snoops.",
15 "EventCode": "0x31", 35 "EventCode": "0x31",
16 "Counter": "0,1,2,3", 36 "Counter": "0,1,2,3",
17 "UMask": "0x0", 37 "UMask": "0x0",
18 "EventName": "CORE_REJECT_L2Q.ALL", 38 "EventName": "CORE_REJECT_L2Q.ALL",
19 "SampleAfterValue": "200003", 39 "SampleAfterValue": "200003",
20 "BriefDescription": "Requests rejected by the L2Q " 40 "BriefDescription": "Requests rejected by the L2Q"
21 }, 41 },
22 { 42 {
23 "CollectPEBSRecord": "1", 43 "CollectPEBSRecord": "1",
24 "PublicDescription": "Counts memory requests originating from the core that reference a cache line in the L2 cache.", 44 "PublicDescription": "Counts when a modified (dirty) cache line is evicted from the data L1 cache and needs to be written back to memory. No count will occur if the evicted line is clean, and hence does not require a writeback.",
25 "EventCode": "0x2E", 45 "EventCode": "0x51",
26 "Counter": "0,1,2,3", 46 "Counter": "0,1,2,3",
27 "UMask": "0x4f", 47 "UMask": "0x1",
28 "EventName": "LONGEST_LAT_CACHE.REFERENCE", 48 "EventName": "DL1.DIRTY_EVICTION",
29 "SampleAfterValue": "200003", 49 "SampleAfterValue": "200003",
30 "BriefDescription": "L2 cache requests" 50 "BriefDescription": "L1 Cache evictions for dirty data"
31 }, 51 },
32 { 52 {
33 "CollectPEBSRecord": "1", 53 "CollectPEBSRecord": "1",
34 "PublicDescription": "Counts memory requests originating from the core that miss in the L2 cache.", 54 "PublicDescription": "Counts cycles that fetch is stalled due to an outstanding ICache miss. That is, the decoder queue is able to accept bytes, but the fetch unit is unable to provide bytes due to an ICache miss. Note: this event is not the same as the total number of cycles spent retrieving instruction cache lines from the memory hierarchy.",
35 "EventCode": "0x2E", 55 "EventCode": "0x86",
36 "Counter": "0,1,2,3", 56 "Counter": "0,1,2,3",
37 "UMask": "0x41", 57 "UMask": "0x2",
38 "EventName": "LONGEST_LAT_CACHE.MISS", 58 "EventName": "FETCH_STALL.ICACHE_FILL_PENDING_CYCLES",
39 "SampleAfterValue": "200003", 59 "SampleAfterValue": "200003",
40 "BriefDescription": "L2 cache request misses" 60 "BriefDescription": "Cycles code-fetch stalled due to an outstanding ICache miss."
41 }, 61 },
42 { 62 {
43 "CollectPEBSRecord": "1", 63 "CollectPEBSRecord": "1",
44 "PublicDescription": "Counts cycles that an ICache miss is outstanding, and instruction fetch is stalled. That is, the decoder queue is able to accept bytes, but the fetch unit is unable to provide bytes, while an Icache miss outstanding. Note this event is not the same as cycles to retrieve an instruction due to an Icache miss. Rather, it is the part of the Instruction Cache (ICache) miss time where no bytes are available for the decoder.", 64 "EventCode": "0xB7",
45 "EventCode": "0x86",
46 "Counter": "0,1,2,3", 65 "Counter": "0,1,2,3",
47 "UMask": "0x2", 66 "UMask": "0x1",
48 "EventName": "FETCH_STALL.ICACHE_FILL_PENDING_CYCLES", 67 "EventName": "OFFCORE_RESPONSE",
49 "SampleAfterValue": "200003", 68 "SampleAfterValue": "100007",
50 "BriefDescription": "Cycles where code-fetch is stalled and an ICache miss is outstanding. This is not the same as an ICache Miss." 69 "BriefDescription": "Requires MSR_OFFCORE_RESP[0,1] to specify request type and response. (duplicated for both MSRs)"
51 }, 70 },
52 { 71 {
53 "PEBS": "2", 72 "PEBS": "2",
54 "CollectPEBSRecord": "2", 73 "CollectPEBSRecord": "2",
55 "PublicDescription": "Counts the number of load uops retired.", 74 "PublicDescription": "Counts locked memory uops retired. This includes regular locks and bus locks. (To specifically count bus locks only, see the Offcore response event.) A locked access is one with a lock prefix, or an exchange to memory. See the SDM for a complete description of which memory load accesses are locks.",
56 "EventCode": "0xD0", 75 "EventCode": "0xD0",
57 "Counter": "0,1,2,3", 76 "Counter": "0,1,2,3",
58 "UMask": "0x81", 77 "UMask": "0x21",
59 "EventName": "MEM_UOPS_RETIRED.ALL_LOADS", 78 "EventName": "MEM_UOPS_RETIRED.LOCK_LOADS",
60 "SampleAfterValue": "200003", 79 "SampleAfterValue": "200003",
61 "BriefDescription": "Load uops retired (Precise event capable)" 80 "BriefDescription": "Locked load uops retired (Precise event capable)"
62 }, 81 },
63 { 82 {
64 "PEBS": "2", 83 "PEBS": "2",
65 "CollectPEBSRecord": "2", 84 "CollectPEBSRecord": "2",
66 "PublicDescription": "Counts the number of store uops retired.", 85 "PublicDescription": "Counts load uops retired where the data requested spans a 64 byte cache line boundary.",
67 "EventCode": "0xD0", 86 "EventCode": "0xD0",
68 "Counter": "0,1,2,3", 87 "Counter": "0,1,2,3",
69 "UMask": "0x82", 88 "UMask": "0x41",
70 "EventName": "MEM_UOPS_RETIRED.ALL_STORES", 89 "EventName": "MEM_UOPS_RETIRED.SPLIT_LOADS",
71 "SampleAfterValue": "200003", 90 "SampleAfterValue": "200003",
72 "BriefDescription": "Store uops retired (Precise event capable)" 91 "BriefDescription": "Load uops retired that split a cache-line (Precise event capable)"
73 }, 92 },
74 { 93 {
75 "PEBS": "2", 94 "PEBS": "2",
76 "CollectPEBSRecord": "2", 95 "CollectPEBSRecord": "2",
77 "PublicDescription": "Counts the number of memory uops retired that is either a loads or a store or both.", 96 "PublicDescription": "Counts store uops retired where the data requested spans a 64 byte cache line boundary.",
78 "EventCode": "0xD0", 97 "EventCode": "0xD0",
79 "Counter": "0,1,2,3", 98 "Counter": "0,1,2,3",
80 "UMask": "0x83", 99 "UMask": "0x42",
81 "EventName": "MEM_UOPS_RETIRED.ALL", 100 "EventName": "MEM_UOPS_RETIRED.SPLIT_STORES",
82 "SampleAfterValue": "200003", 101 "SampleAfterValue": "200003",
83 "BriefDescription": "Memory uops retired (Precise event capable)" 102 "BriefDescription": "Stores uops retired that split a cache-line (Precise event capable)"
84 }, 103 },
85 { 104 {
86 "PEBS": "2", 105 "PEBS": "2",
87 "CollectPEBSRecord": "2", 106 "CollectPEBSRecord": "2",
88 "PublicDescription": "Counts locked memory uops retired. This includes \"regular\" locks and bus locks. (To specifically count bus locks only, see the Offcore response event.) A locked access is one with a lock prefix, or an exchange to memory. See the SDM for a complete description of which memory load accesses are locks.", 107 "PublicDescription": "Counts memory uops retired where the data requested spans a 64 byte cache line boundary.",
89 "EventCode": "0xD0", 108 "EventCode": "0xD0",
90 "Counter": "0,1,2,3", 109 "Counter": "0,1,2,3",
91 "UMask": "0x21", 110 "UMask": "0x43",
92 "EventName": "MEM_UOPS_RETIRED.LOCK_LOADS", 111 "EventName": "MEM_UOPS_RETIRED.SPLIT",
93 "SampleAfterValue": "200003", 112 "SampleAfterValue": "200003",
94 "BriefDescription": "Locked load uops retired (Precise event capable)" 113 "BriefDescription": "Memory uops retired that split a cache-line (Precise event capable)"
95 }, 114 },
96 { 115 {
97 "PEBS": "2", 116 "PEBS": "2",
98 "CollectPEBSRecord": "2", 117 "CollectPEBSRecord": "2",
99 "PublicDescription": "Counts load uops retired where the data requested spans a 64 byte cache line boundary.", 118 "PublicDescription": "Counts the number of load uops retired.",
100 "EventCode": "0xD0", 119 "EventCode": "0xD0",
101 "Counter": "0,1,2,3", 120 "Counter": "0,1,2,3",
102 "UMask": "0x41", 121 "UMask": "0x81",
103 "EventName": "MEM_UOPS_RETIRED.SPLIT_LOADS", 122 "EventName": "MEM_UOPS_RETIRED.ALL_LOADS",
104 "SampleAfterValue": "200003", 123 "SampleAfterValue": "200003",
105 "BriefDescription": "Load uops retired that split a cache-line (Precise event capable)" 124 "BriefDescription": "Load uops retired (Precise event capable)"
106 }, 125 },
107 { 126 {
108 "PEBS": "2", 127 "PEBS": "2",
109 "CollectPEBSRecord": "2", 128 "CollectPEBSRecord": "2",
110 "PublicDescription": "Counts store uops retired where the data requested spans a 64 byte cache line boundary.", 129 "PublicDescription": "Counts the number of store uops retired.",
111 "EventCode": "0xD0", 130 "EventCode": "0xD0",
112 "Counter": "0,1,2,3", 131 "Counter": "0,1,2,3",
113 "UMask": "0x42", 132 "UMask": "0x82",
114 "EventName": "MEM_UOPS_RETIRED.SPLIT_STORES", 133 "EventName": "MEM_UOPS_RETIRED.ALL_STORES",
115 "SampleAfterValue": "200003", 134 "SampleAfterValue": "200003",
116 "BriefDescription": "Stores uops retired that split a cache-line (Precise event capable)" 135 "BriefDescription": "Store uops retired (Precise event capable)"
117 }, 136 },
118 { 137 {
119 "PEBS": "2", 138 "PEBS": "2",
120 "CollectPEBSRecord": "2", 139 "CollectPEBSRecord": "2",
121 "PublicDescription": "Counts memory uops retired where the data requested spans a 64 byte cache line boundary.", 140 "PublicDescription": "Counts the number of memory uops retired that is either a loads or a store or both.",
122 "EventCode": "0xD0", 141 "EventCode": "0xD0",
123 "Counter": "0,1,2,3", 142 "Counter": "0,1,2,3",
124 "UMask": "0x43", 143 "UMask": "0x83",
125 "EventName": "MEM_UOPS_RETIRED.SPLIT", 144 "EventName": "MEM_UOPS_RETIRED.ALL",
126 "SampleAfterValue": "200003", 145 "SampleAfterValue": "200003",
127 "BriefDescription": "Memory uops retired that split a cache-line (Precise event capable)" 146 "BriefDescription": "Memory uops retired (Precise event capable)"
128 }, 147 },
129 { 148 {
130 "PEBS": "2", 149 "PEBS": "2",
@@ -140,24 +159,24 @@
140 { 159 {
141 "PEBS": "2", 160 "PEBS": "2",
142 "CollectPEBSRecord": "2", 161 "CollectPEBSRecord": "2",
143 "PublicDescription": "Counts load uops retired that miss the L1 data cache.", 162 "PublicDescription": "Counts load uops retired that hit in the L2 cache.",
144 "EventCode": "0xD1", 163 "EventCode": "0xD1",
145 "Counter": "0,1,2,3", 164 "Counter": "0,1,2,3",
146 "UMask": "0x8", 165 "UMask": "0x2",
147 "EventName": "MEM_LOAD_UOPS_RETIRED.L1_MISS", 166 "EventName": "MEM_LOAD_UOPS_RETIRED.L2_HIT",
148 "SampleAfterValue": "200003", 167 "SampleAfterValue": "200003",
149 "BriefDescription": "Load uops retired that missed L1 data cache (Precise event capable)" 168 "BriefDescription": "Load uops retired that hit L2 (Precise event capable)"
150 }, 169 },
151 { 170 {
152 "PEBS": "2", 171 "PEBS": "2",
153 "CollectPEBSRecord": "2", 172 "CollectPEBSRecord": "2",
154 "PublicDescription": "Counts load uops retired that hit in the L2 cache.", 173 "PublicDescription": "Counts load uops retired that miss the L1 data cache.",
155 "EventCode": "0xD1", 174 "EventCode": "0xD1",
156 "Counter": "0,1,2,3", 175 "Counter": "0,1,2,3",
157 "UMask": "0x2", 176 "UMask": "0x8",
158 "EventName": "MEM_LOAD_UOPS_RETIRED.L2_HIT", 177 "EventName": "MEM_LOAD_UOPS_RETIRED.L1_MISS",
159 "SampleAfterValue": "200003", 178 "SampleAfterValue": "200003",
160 "BriefDescription": "Load uops retired that hit L2 (Precise event capable)" 179 "BriefDescription": "Load uops retired that missed L1 data cache (Precise event capable)"
161 }, 180 },
162 { 181 {
163 "PEBS": "2", 182 "PEBS": "2",
@@ -205,24 +224,20 @@
205 }, 224 },
206 { 225 {
207 "CollectPEBSRecord": "1", 226 "CollectPEBSRecord": "1",
208 "PublicDescription": "Counts when a modified (dirty) cache line is evicted from the data L1 cache and needs to be written back to memory. No count will occur if the evicted line is clean, and hence does not require a writeback.", 227 "PublicDescription": "Counts data read, code read, and read for ownership (RFO) requests (demand & prefetch) that are outstanding, per cycle, from the time of the L2 miss to when any response is received. Requires MSR_OFFCORE_RESP[0,1] to specify request type and response. (duplicated for both MSRs)",
209 "EventCode": "0x51",
210 "Counter": "0,1,2,3",
211 "UMask": "0x1",
212 "EventName": "DL1.DIRTY_EVICTION",
213 "SampleAfterValue": "200003",
214 "BriefDescription": "L1 Cache evictions for dirty data"
215 },
216 {
217 "CollectPEBSRecord": "1",
218 "EventCode": "0xB7", 228 "EventCode": "0xB7",
229 "MSRValue": "0x40000032b7 ",
219 "Counter": "0,1,2,3", 230 "Counter": "0,1,2,3",
220 "UMask": "0x1", 231 "UMask": "0x1",
221 "EventName": "OFFCORE_RESPONSE", 232 "EventName": "OFFCORE_RESPONSE.ANY_READ.OUTSTANDING",
233 "MSRIndex": "0x1a6",
222 "SampleAfterValue": "100007", 234 "SampleAfterValue": "100007",
223 "BriefDescription": "Requires MSR_OFFCORE_RESP[0,1] to specify request type and response. (duplicated for both MSRs)" 235 "BriefDescription": "Counts data read, code read, and read for ownership (RFO) requests (demand & prefetch) that are outstanding, per cycle, from the time of the L2 miss to when any response is received.",
236 "Offcore": "1"
224 }, 237 },
225 { 238 {
239 "CollectPEBSRecord": "1",
240 "PublicDescription": "Counts data read, code read, and read for ownership (RFO) requests (demand & prefetch) that miss the L2 cache. Requires MSR_OFFCORE_RESP[0,1] to specify request type and response. (duplicated for both MSRs)",
226 "EventCode": "0xB7", 241 "EventCode": "0xB7",
227 "MSRValue": "0x36000032b7 ", 242 "MSRValue": "0x36000032b7 ",
228 "Counter": "0,1,2,3", 243 "Counter": "0,1,2,3",
@@ -234,6 +249,8 @@
234 "Offcore": "1" 249 "Offcore": "1"
235 }, 250 },
236 { 251 {
252 "CollectPEBSRecord": "1",
253 "PublicDescription": "Counts data read, code read, and read for ownership (RFO) requests (demand & prefetch) that miss the L2 cache with a snoop hit in the other processor module, data forwarding is required. Requires MSR_OFFCORE_RESP[0,1] to specify request type and response. (duplicated for both MSRs)",
237 "EventCode": "0xB7", 254 "EventCode": "0xB7",
238 "MSRValue": "0x10000032b7 ", 255 "MSRValue": "0x10000032b7 ",
239 "Counter": "0,1,2,3", 256 "Counter": "0,1,2,3",
@@ -245,6 +262,8 @@
245 "Offcore": "1" 262 "Offcore": "1"
246 }, 263 },
247 { 264 {
265 "CollectPEBSRecord": "1",
266 "PublicDescription": "Counts data read, code read, and read for ownership (RFO) requests (demand & prefetch) that miss the L2 cache with a snoop hit in the other processor module, no data forwarding is required. Requires MSR_OFFCORE_RESP[0,1] to specify request type and response. (duplicated for both MSRs)",
248 "EventCode": "0xB7", 267 "EventCode": "0xB7",
249 "MSRValue": "0x04000032b7 ", 268 "MSRValue": "0x04000032b7 ",
250 "Counter": "0,1,2,3", 269 "Counter": "0,1,2,3",
@@ -256,6 +275,8 @@
256 "Offcore": "1" 275 "Offcore": "1"
257 }, 276 },
258 { 277 {
278 "CollectPEBSRecord": "1",
279 "PublicDescription": "Counts data read, code read, and read for ownership (RFO) requests (demand & prefetch) that true miss for the L2 cache with a snoop miss in the other processor module. Requires MSR_OFFCORE_RESP[0,1] to specify request type and response. (duplicated for both MSRs)",
259 "EventCode": "0xB7", 280 "EventCode": "0xB7",
260 "MSRValue": "0x02000032b7 ", 281 "MSRValue": "0x02000032b7 ",
261 "Counter": "0,1,2,3", 282 "Counter": "0,1,2,3",
@@ -267,6 +288,8 @@
267 "Offcore": "1" 288 "Offcore": "1"
268 }, 289 },
269 { 290 {
291 "CollectPEBSRecord": "1",
292 "PublicDescription": "Counts data read, code read, and read for ownership (RFO) requests (demand & prefetch) that hit the L2 cache. Requires MSR_OFFCORE_RESP[0,1] to specify request type and response. (duplicated for both MSRs)",
270 "EventCode": "0xB7", 293 "EventCode": "0xB7",
271 "MSRValue": "0x00000432b7 ", 294 "MSRValue": "0x00000432b7 ",
272 "Counter": "0,1,2,3", 295 "Counter": "0,1,2,3",
@@ -278,6 +301,34 @@
278 "Offcore": "1" 301 "Offcore": "1"
279 }, 302 },
280 { 303 {
304 "CollectPEBSRecord": "1",
305 "PublicDescription": "Counts data read, code read, and read for ownership (RFO) requests (demand & prefetch) that have any transaction responses from the uncore subsystem. Requires MSR_OFFCORE_RESP[0,1] to specify request type and response. (duplicated for both MSRs)",
306 "EventCode": "0xB7",
307 "MSRValue": "0x00000132b7 ",
308 "Counter": "0,1,2,3",
309 "UMask": "0x1",
310 "EventName": "OFFCORE_RESPONSE.ANY_READ.ANY_RESPONSE",
311 "MSRIndex": "0x1a6,0x1a7",
312 "SampleAfterValue": "100007",
313 "BriefDescription": "Counts data read, code read, and read for ownership (RFO) requests (demand & prefetch) that have any transaction responses from the uncore subsystem.",
314 "Offcore": "1"
315 },
316 {
317 "CollectPEBSRecord": "1",
318 "PublicDescription": "Counts reads for ownership (RFO) requests (demand & prefetch) that are outstanding, per cycle, from the time of the L2 miss to when any response is received. Requires MSR_OFFCORE_RESP[0,1] to specify request type and response. (duplicated for both MSRs)",
319 "EventCode": "0xB7",
320 "MSRValue": "0x4000000022 ",
321 "Counter": "0,1,2,3",
322 "UMask": "0x1",
323 "EventName": "OFFCORE_RESPONSE.ANY_RFO.OUTSTANDING",
324 "MSRIndex": "0x1a6",
325 "SampleAfterValue": "100007",
326 "BriefDescription": "Counts reads for ownership (RFO) requests (demand & prefetch) that are outstanding, per cycle, from the time of the L2 miss to when any response is received.",
327 "Offcore": "1"
328 },
329 {
330 "CollectPEBSRecord": "1",
331 "PublicDescription": "Counts reads for ownership (RFO) requests (demand & prefetch) that miss the L2 cache. Requires MSR_OFFCORE_RESP[0,1] to specify request type and response. (duplicated for both MSRs)",
281 "EventCode": "0xB7", 332 "EventCode": "0xB7",
282 "MSRValue": "0x3600000022 ", 333 "MSRValue": "0x3600000022 ",
283 "Counter": "0,1,2,3", 334 "Counter": "0,1,2,3",
@@ -289,6 +340,8 @@
289 "Offcore": "1" 340 "Offcore": "1"
290 }, 341 },
291 { 342 {
343 "CollectPEBSRecord": "1",
344 "PublicDescription": "Counts reads for ownership (RFO) requests (demand & prefetch) that miss the L2 cache with a snoop hit in the other processor module, data forwarding is required. Requires MSR_OFFCORE_RESP[0,1] to specify request type and response. (duplicated for both MSRs)",
292 "EventCode": "0xB7", 345 "EventCode": "0xB7",
293 "MSRValue": "0x1000000022 ", 346 "MSRValue": "0x1000000022 ",
294 "Counter": "0,1,2,3", 347 "Counter": "0,1,2,3",
@@ -300,6 +353,8 @@
300 "Offcore": "1" 353 "Offcore": "1"
301 }, 354 },
302 { 355 {
356 "CollectPEBSRecord": "1",
357 "PublicDescription": "Counts reads for ownership (RFO) requests (demand & prefetch) that miss the L2 cache with a snoop hit in the other processor module, no data forwarding is required. Requires MSR_OFFCORE_RESP[0,1] to specify request type and response. (duplicated for both MSRs)",
303 "EventCode": "0xB7", 358 "EventCode": "0xB7",
304 "MSRValue": "0x0400000022 ", 359 "MSRValue": "0x0400000022 ",
305 "Counter": "0,1,2,3", 360 "Counter": "0,1,2,3",
@@ -311,6 +366,8 @@
311 "Offcore": "1" 366 "Offcore": "1"
312 }, 367 },
313 { 368 {
369 "CollectPEBSRecord": "1",
370 "PublicDescription": "Counts reads for ownership (RFO) requests (demand & prefetch) that true miss for the L2 cache with a snoop miss in the other processor module. Requires MSR_OFFCORE_RESP[0,1] to specify request type and response. (duplicated for both MSRs)",
314 "EventCode": "0xB7", 371 "EventCode": "0xB7",
315 "MSRValue": "0x0200000022 ", 372 "MSRValue": "0x0200000022 ",
316 "Counter": "0,1,2,3", 373 "Counter": "0,1,2,3",
@@ -322,6 +379,8 @@
322 "Offcore": "1" 379 "Offcore": "1"
323 }, 380 },
324 { 381 {
382 "CollectPEBSRecord": "1",
383 "PublicDescription": "Counts reads for ownership (RFO) requests (demand & prefetch) that hit the L2 cache. Requires MSR_OFFCORE_RESP[0,1] to specify request type and response. (duplicated for both MSRs)",
325 "EventCode": "0xB7", 384 "EventCode": "0xB7",
326 "MSRValue": "0x0000040022 ", 385 "MSRValue": "0x0000040022 ",
327 "Counter": "0,1,2,3", 386 "Counter": "0,1,2,3",
@@ -333,6 +392,34 @@
333 "Offcore": "1" 392 "Offcore": "1"
334 }, 393 },
335 { 394 {
395 "CollectPEBSRecord": "1",
396 "PublicDescription": "Counts reads for ownership (RFO) requests (demand & prefetch) that have any transaction responses from the uncore subsystem. Requires MSR_OFFCORE_RESP[0,1] to specify request type and response. (duplicated for both MSRs)",
397 "EventCode": "0xB7",
398 "MSRValue": "0x0000010022 ",
399 "Counter": "0,1,2,3",
400 "UMask": "0x1",
401 "EventName": "OFFCORE_RESPONSE.ANY_RFO.ANY_RESPONSE",
402 "MSRIndex": "0x1a6,0x1a7",
403 "SampleAfterValue": "100007",
404 "BriefDescription": "Counts reads for ownership (RFO) requests (demand & prefetch) that have any transaction responses from the uncore subsystem.",
405 "Offcore": "1"
406 },
407 {
408 "CollectPEBSRecord": "1",
409 "PublicDescription": "Counts data reads (demand & prefetch) that are outstanding, per cycle, from the time of the L2 miss to when any response is received. Requires MSR_OFFCORE_RESP[0,1] to specify request type and response. (duplicated for both MSRs)",
410 "EventCode": "0xB7",
411 "MSRValue": "0x4000003091",
412 "Counter": "0,1,2,3",
413 "UMask": "0x1",
414 "EventName": "OFFCORE_RESPONSE.ANY_DATA_RD.OUTSTANDING",
415 "MSRIndex": "0x1a6",
416 "SampleAfterValue": "100007",
417 "BriefDescription": "Counts data reads (demand & prefetch) that are outstanding, per cycle, from the time of the L2 miss to when any response is received.",
418 "Offcore": "1"
419 },
420 {
421 "CollectPEBSRecord": "1",
422 "PublicDescription": "Counts data reads (demand & prefetch) that miss the L2 cache. Requires MSR_OFFCORE_RESP[0,1] to specify request type and response. (duplicated for both MSRs)",
336 "EventCode": "0xB7", 423 "EventCode": "0xB7",
337 "MSRValue": "0x3600003091", 424 "MSRValue": "0x3600003091",
338 "Counter": "0,1,2,3", 425 "Counter": "0,1,2,3",
@@ -344,6 +431,8 @@
344 "Offcore": "1" 431 "Offcore": "1"
345 }, 432 },
346 { 433 {
434 "CollectPEBSRecord": "1",
435 "PublicDescription": "Counts data reads (demand & prefetch) that miss the L2 cache with a snoop hit in the other processor module, data forwarding is required. Requires MSR_OFFCORE_RESP[0,1] to specify request type and response. (duplicated for both MSRs)",
347 "EventCode": "0xB7", 436 "EventCode": "0xB7",
348 "MSRValue": "0x1000003091", 437 "MSRValue": "0x1000003091",
349 "Counter": "0,1,2,3", 438 "Counter": "0,1,2,3",
@@ -355,6 +444,8 @@
355 "Offcore": "1" 444 "Offcore": "1"
356 }, 445 },
357 { 446 {
447 "CollectPEBSRecord": "1",
448 "PublicDescription": "Counts data reads (demand & prefetch) that miss the L2 cache with a snoop hit in the other processor module, no data forwarding is required. Requires MSR_OFFCORE_RESP[0,1] to specify request type and response. (duplicated for both MSRs)",
358 "EventCode": "0xB7", 449 "EventCode": "0xB7",
359 "MSRValue": "0x0400003091", 450 "MSRValue": "0x0400003091",
360 "Counter": "0,1,2,3", 451 "Counter": "0,1,2,3",
@@ -366,6 +457,8 @@
366 "Offcore": "1" 457 "Offcore": "1"
367 }, 458 },
368 { 459 {
460 "CollectPEBSRecord": "1",
461 "PublicDescription": "Counts data reads (demand & prefetch) that true miss for the L2 cache with a snoop miss in the other processor module. Requires MSR_OFFCORE_RESP[0,1] to specify request type and response. (duplicated for both MSRs)",
369 "EventCode": "0xB7", 462 "EventCode": "0xB7",
370 "MSRValue": "0x0200003091", 463 "MSRValue": "0x0200003091",
371 "Counter": "0,1,2,3", 464 "Counter": "0,1,2,3",
@@ -377,6 +470,8 @@
377 "Offcore": "1" 470 "Offcore": "1"
378 }, 471 },
379 { 472 {
473 "CollectPEBSRecord": "1",
474 "PublicDescription": "Counts data reads (demand & prefetch) that hit the L2 cache. Requires MSR_OFFCORE_RESP[0,1] to specify request type and response. (duplicated for both MSRs)",
380 "EventCode": "0xB7", 475 "EventCode": "0xB7",
381 "MSRValue": "0x0000043091", 476 "MSRValue": "0x0000043091",
382 "Counter": "0,1,2,3", 477 "Counter": "0,1,2,3",
@@ -388,6 +483,34 @@
388 "Offcore": "1" 483 "Offcore": "1"
389 }, 484 },
390 { 485 {
486 "CollectPEBSRecord": "1",
487 "PublicDescription": "Counts data reads (demand & prefetch) that have any transaction responses from the uncore subsystem. Requires MSR_OFFCORE_RESP[0,1] to specify request type and response. (duplicated for both MSRs)",
488 "EventCode": "0xB7",
489 "MSRValue": "0x0000013091",
490 "Counter": "0,1,2,3",
491 "UMask": "0x1",
492 "EventName": "OFFCORE_RESPONSE.ANY_DATA_RD.ANY_RESPONSE",
493 "MSRIndex": "0x1a6,0x1a7",
494 "SampleAfterValue": "100007",
495 "BriefDescription": "Counts data reads (demand & prefetch) that have any transaction responses from the uncore subsystem.",
496 "Offcore": "1"
497 },
498 {
499 "CollectPEBSRecord": "1",
500 "PublicDescription": "Counts data reads generated by L1 or L2 prefetchers that are outstanding, per cycle, from the time of the L2 miss to when any response is received. Requires MSR_OFFCORE_RESP[0,1] to specify request type and response. (duplicated for both MSRs)",
501 "EventCode": "0xB7",
502 "MSRValue": "0x4000003010 ",
503 "Counter": "0,1,2,3",
504 "UMask": "0x1",
505 "EventName": "OFFCORE_RESPONSE.ANY_PF_DATA_RD.OUTSTANDING",
506 "MSRIndex": "0x1a6",
507 "SampleAfterValue": "100007",
508 "BriefDescription": "Counts data reads generated by L1 or L2 prefetchers that are outstanding, per cycle, from the time of the L2 miss to when any response is received.",
509 "Offcore": "1"
510 },
511 {
512 "CollectPEBSRecord": "1",
513 "PublicDescription": "Counts data reads generated by L1 or L2 prefetchers that miss the L2 cache. Requires MSR_OFFCORE_RESP[0,1] to specify request type and response. (duplicated for both MSRs)",
391 "EventCode": "0xB7", 514 "EventCode": "0xB7",
392 "MSRValue": "0x3600003010 ", 515 "MSRValue": "0x3600003010 ",
393 "Counter": "0,1,2,3", 516 "Counter": "0,1,2,3",
@@ -399,6 +522,8 @@
399 "Offcore": "1" 522 "Offcore": "1"
400 }, 523 },
401 { 524 {
525 "CollectPEBSRecord": "1",
526 "PublicDescription": "Counts data reads generated by L1 or L2 prefetchers that miss the L2 cache with a snoop hit in the other processor module, data forwarding is required. Requires MSR_OFFCORE_RESP[0,1] to specify request type and response. (duplicated for both MSRs)",
402 "EventCode": "0xB7", 527 "EventCode": "0xB7",
403 "MSRValue": "0x1000003010 ", 528 "MSRValue": "0x1000003010 ",
404 "Counter": "0,1,2,3", 529 "Counter": "0,1,2,3",
@@ -410,6 +535,8 @@
410 "Offcore": "1" 535 "Offcore": "1"
411 }, 536 },
412 { 537 {
538 "CollectPEBSRecord": "1",
539 "PublicDescription": "Counts data reads generated by L1 or L2 prefetchers that miss the L2 cache with a snoop hit in the other processor module, no data forwarding is required. Requires MSR_OFFCORE_RESP[0,1] to specify request type and response. (duplicated for both MSRs)",
413 "EventCode": "0xB7", 540 "EventCode": "0xB7",
414 "MSRValue": "0x0400003010 ", 541 "MSRValue": "0x0400003010 ",
415 "Counter": "0,1,2,3", 542 "Counter": "0,1,2,3",
@@ -421,6 +548,8 @@
421 "Offcore": "1" 548 "Offcore": "1"
422 }, 549 },
423 { 550 {
551 "CollectPEBSRecord": "1",
552 "PublicDescription": "Counts data reads generated by L1 or L2 prefetchers that true miss for the L2 cache with a snoop miss in the other processor module. Requires MSR_OFFCORE_RESP[0,1] to specify request type and response. (duplicated for both MSRs)",
424 "EventCode": "0xB7", 553 "EventCode": "0xB7",
425 "MSRValue": "0x0200003010 ", 554 "MSRValue": "0x0200003010 ",
426 "Counter": "0,1,2,3", 555 "Counter": "0,1,2,3",
@@ -432,6 +561,8 @@
432 "Offcore": "1" 561 "Offcore": "1"
433 }, 562 },
434 { 563 {
564 "CollectPEBSRecord": "1",
565 "PublicDescription": "Counts data reads generated by L1 or L2 prefetchers that hit the L2 cache. Requires MSR_OFFCORE_RESP[0,1] to specify request type and response. (duplicated for both MSRs)",
435 "EventCode": "0xB7", 566 "EventCode": "0xB7",
436 "MSRValue": "0x0000043010 ", 567 "MSRValue": "0x0000043010 ",
437 "Counter": "0,1,2,3", 568 "Counter": "0,1,2,3",
@@ -443,6 +574,47 @@
443 "Offcore": "1" 574 "Offcore": "1"
444 }, 575 },
445 { 576 {
577 "CollectPEBSRecord": "1",
578 "PublicDescription": "Counts data reads generated by L1 or L2 prefetchers that have any transaction responses from the uncore subsystem. Requires MSR_OFFCORE_RESP[0,1] to specify request type and response. (duplicated for both MSRs)",
579 "EventCode": "0xB7",
580 "MSRValue": "0x0000013010 ",
581 "Counter": "0,1,2,3",
582 "UMask": "0x1",
583 "EventName": "OFFCORE_RESPONSE.ANY_PF_DATA_RD.ANY_RESPONSE",
584 "MSRIndex": "0x1a6,0x1a7",
585 "SampleAfterValue": "100007",
586 "BriefDescription": "Counts data reads generated by L1 or L2 prefetchers that have any transaction responses from the uncore subsystem.",
587 "Offcore": "1"
588 },
589 {
590 "CollectPEBSRecord": "1",
591 "PublicDescription": "Counts requests to the uncore subsystem that are outstanding, per cycle, from the time of the L2 miss to when any response is received. Requires MSR_OFFCORE_RESP[0,1] to specify request type and response. (duplicated for both MSRs)",
592 "EventCode": "0xB7",
593 "MSRValue": "0x4000008000 ",
594 "Counter": "0,1,2,3",
595 "UMask": "0x1",
596 "EventName": "OFFCORE_RESPONSE.ANY_REQUEST.OUTSTANDING",
597 "MSRIndex": "0x1a6",
598 "SampleAfterValue": "100007",
599 "BriefDescription": "Counts requests to the uncore subsystem that are outstanding, per cycle, from the time of the L2 miss to when any response is received.",
600 "Offcore": "1"
601 },
602 {
603 "CollectPEBSRecord": "1",
604 "PublicDescription": "Counts requests to the uncore subsystem that miss the L2 cache. Requires MSR_OFFCORE_RESP[0,1] to specify request type and response. (duplicated for both MSRs)",
605 "EventCode": "0xB7",
606 "MSRValue": "0x3600008000 ",
607 "Counter": "0,1,2,3",
608 "UMask": "0x1",
609 "EventName": "OFFCORE_RESPONSE.ANY_REQUEST.L2_MISS.ANY",
610 "MSRIndex": "0x1a6,0x1a7",
611 "SampleAfterValue": "100007",
612 "BriefDescription": "Counts requests to the uncore subsystem that miss the L2 cache.",
613 "Offcore": "1"
614 },
615 {
616 "CollectPEBSRecord": "1",
617 "PublicDescription": "Counts requests to the uncore subsystem that miss the L2 cache with a snoop hit in the other processor module, data forwarding is required. Requires MSR_OFFCORE_RESP[0,1] to specify request type and response. (duplicated for both MSRs)",
446 "EventCode": "0xB7", 618 "EventCode": "0xB7",
447 "MSRValue": "0x1000008000 ", 619 "MSRValue": "0x1000008000 ",
448 "Counter": "0,1,2,3", 620 "Counter": "0,1,2,3",
@@ -454,6 +626,8 @@
454 "Offcore": "1" 626 "Offcore": "1"
455 }, 627 },
456 { 628 {
629 "CollectPEBSRecord": "1",
630 "PublicDescription": "Counts requests to the uncore subsystem that miss the L2 cache with a snoop hit in the other processor module, no data forwarding is required. Requires MSR_OFFCORE_RESP[0,1] to specify request type and response. (duplicated for both MSRs)",
457 "EventCode": "0xB7", 631 "EventCode": "0xB7",
458 "MSRValue": "0x0400008000 ", 632 "MSRValue": "0x0400008000 ",
459 "Counter": "0,1,2,3", 633 "Counter": "0,1,2,3",
@@ -465,6 +639,8 @@
465 "Offcore": "1" 639 "Offcore": "1"
466 }, 640 },
467 { 641 {
642 "CollectPEBSRecord": "1",
643 "PublicDescription": "Counts requests to the uncore subsystem that true miss for the L2 cache with a snoop miss in the other processor module. Requires MSR_OFFCORE_RESP[0,1] to specify request type and response. (duplicated for both MSRs)",
468 "EventCode": "0xB7", 644 "EventCode": "0xB7",
469 "MSRValue": "0x0200008000 ", 645 "MSRValue": "0x0200008000 ",
470 "Counter": "0,1,2,3", 646 "Counter": "0,1,2,3",
@@ -476,6 +652,8 @@
476 "Offcore": "1" 652 "Offcore": "1"
477 }, 653 },
478 { 654 {
655 "CollectPEBSRecord": "1",
656 "PublicDescription": "Counts requests to the uncore subsystem that hit the L2 cache. Requires MSR_OFFCORE_RESP[0,1] to specify request type and response. (duplicated for both MSRs)",
479 "EventCode": "0xB7", 657 "EventCode": "0xB7",
480 "MSRValue": "0x0000048000 ", 658 "MSRValue": "0x0000048000 ",
481 "Counter": "0,1,2,3", 659 "Counter": "0,1,2,3",
@@ -487,6 +665,8 @@
487 "Offcore": "1" 665 "Offcore": "1"
488 }, 666 },
489 { 667 {
668 "CollectPEBSRecord": "1",
669 "PublicDescription": "Counts requests to the uncore subsystem that have any transaction responses from the uncore subsystem. Requires MSR_OFFCORE_RESP[0,1] to specify request type and response. (duplicated for both MSRs)",
490 "EventCode": "0xB7", 670 "EventCode": "0xB7",
491 "MSRValue": "0x0000018000 ", 671 "MSRValue": "0x0000018000 ",
492 "Counter": "0,1,2,3", 672 "Counter": "0,1,2,3",
@@ -498,6 +678,21 @@
498 "Offcore": "1" 678 "Offcore": "1"
499 }, 679 },
500 { 680 {
681 "CollectPEBSRecord": "1",
682 "PublicDescription": "Counts any data writes to uncacheable write combining (USWC) memory region that are outstanding, per cycle, from the time of the L2 miss to when any response is received. Requires MSR_OFFCORE_RESP[0,1] to specify request type and response. (duplicated for both MSRs)",
683 "EventCode": "0xB7",
684 "MSRValue": "0x4000004800 ",
685 "Counter": "0,1,2,3",
686 "UMask": "0x1",
687 "EventName": "OFFCORE_RESPONSE.STREAMING_STORES.OUTSTANDING",
688 "MSRIndex": "0x1a6",
689 "SampleAfterValue": "100007",
690 "BriefDescription": "Counts any data writes to uncacheable write combining (USWC) memory region that are outstanding, per cycle, from the time of the L2 miss to when any response is received.",
691 "Offcore": "1"
692 },
693 {
694 "CollectPEBSRecord": "1",
695 "PublicDescription": "Counts any data writes to uncacheable write combining (USWC) memory region that miss the L2 cache. Requires MSR_OFFCORE_RESP[0,1] to specify request type and response. (duplicated for both MSRs)",
501 "EventCode": "0xB7", 696 "EventCode": "0xB7",
502 "MSRValue": "0x3600004800 ", 697 "MSRValue": "0x3600004800 ",
503 "Counter": "0,1,2,3", 698 "Counter": "0,1,2,3",
@@ -509,6 +704,47 @@
509 "Offcore": "1" 704 "Offcore": "1"
510 }, 705 },
511 { 706 {
707 "CollectPEBSRecord": "1",
708 "PublicDescription": "Counts any data writes to uncacheable write combining (USWC) memory region that miss the L2 cache with a snoop hit in the other processor module, data forwarding is required. Requires MSR_OFFCORE_RESP[0,1] to specify request type and response. (duplicated for both MSRs)",
709 "EventCode": "0xB7",
710 "MSRValue": "0x1000004800 ",
711 "Counter": "0,1,2,3",
712 "UMask": "0x1",
713 "EventName": "OFFCORE_RESPONSE.STREAMING_STORES.L2_MISS.HITM_OTHER_CORE",
714 "MSRIndex": "0x1a6,0x1a7",
715 "SampleAfterValue": "100007",
716 "BriefDescription": "Counts any data writes to uncacheable write combining (USWC) memory region that miss the L2 cache with a snoop hit in the other processor module, data forwarding is required.",
717 "Offcore": "1"
718 },
719 {
720 "CollectPEBSRecord": "1",
721 "PublicDescription": "Counts any data writes to uncacheable write combining (USWC) memory region that miss the L2 cache with a snoop hit in the other processor module, no data forwarding is required. Requires MSR_OFFCORE_RESP[0,1] to specify request type and response. (duplicated for both MSRs)",
722 "EventCode": "0xB7",
723 "MSRValue": "0x0400004800 ",
724 "Counter": "0,1,2,3",
725 "UMask": "0x1",
726 "EventName": "OFFCORE_RESPONSE.STREAMING_STORES.L2_MISS.HIT_OTHER_CORE_NO_FWD",
727 "MSRIndex": "0x1a6,0x1a7",
728 "SampleAfterValue": "100007",
729 "BriefDescription": "Counts any data writes to uncacheable write combining (USWC) memory region that miss the L2 cache with a snoop hit in the other processor module, no data forwarding is required.",
730 "Offcore": "1"
731 },
732 {
733 "CollectPEBSRecord": "1",
734 "PublicDescription": "Counts any data writes to uncacheable write combining (USWC) memory region that true miss for the L2 cache with a snoop miss in the other processor module. Requires MSR_OFFCORE_RESP[0,1] to specify request type and response. (duplicated for both MSRs)",
735 "EventCode": "0xB7",
736 "MSRValue": "0x0200004800 ",
737 "Counter": "0,1,2,3",
738 "UMask": "0x1",
739 "EventName": "OFFCORE_RESPONSE.STREAMING_STORES.L2_MISS.SNOOP_MISS_OR_NO_SNOOP_NEEDED",
740 "MSRIndex": "0x1a6,0x1a7",
741 "SampleAfterValue": "100007",
742 "BriefDescription": "Counts any data writes to uncacheable write combining (USWC) memory region that true miss for the L2 cache with a snoop miss in the other processor module. ",
743 "Offcore": "1"
744 },
745 {
746 "CollectPEBSRecord": "1",
747 "PublicDescription": "Counts any data writes to uncacheable write combining (USWC) memory region that hit the L2 cache. Requires MSR_OFFCORE_RESP[0,1] to specify request type and response. (duplicated for both MSRs)",
512 "EventCode": "0xB7", 748 "EventCode": "0xB7",
513 "MSRValue": "0x0000044800 ", 749 "MSRValue": "0x0000044800 ",
514 "Counter": "0,1,2,3", 750 "Counter": "0,1,2,3",
@@ -520,6 +756,34 @@
520 "Offcore": "1" 756 "Offcore": "1"
521 }, 757 },
522 { 758 {
759 "CollectPEBSRecord": "1",
760 "PublicDescription": "Counts any data writes to uncacheable write combining (USWC) memory region that have any transaction responses from the uncore subsystem. Requires MSR_OFFCORE_RESP[0,1] to specify request type and response. (duplicated for both MSRs)",
761 "EventCode": "0xB7",
762 "MSRValue": "0x0000014800 ",
763 "Counter": "0,1,2,3",
764 "UMask": "0x1",
765 "EventName": "OFFCORE_RESPONSE.STREAMING_STORES.ANY_RESPONSE",
766 "MSRIndex": "0x1a6,0x1a7",
767 "SampleAfterValue": "100007",
768 "BriefDescription": "Counts any data writes to uncacheable write combining (USWC) memory region that have any transaction responses from the uncore subsystem.",
769 "Offcore": "1"
770 },
771 {
772 "CollectPEBSRecord": "1",
773 "PublicDescription": "Counts partial cache line data writes to uncacheable write combining (USWC) memory region that are outstanding, per cycle, from the time of the L2 miss to when any response is received. Requires MSR_OFFCORE_RESP[0,1] to specify request type and response. (duplicated for both MSRs)",
774 "EventCode": "0xB7",
775 "MSRValue": "0x4000004000 ",
776 "Counter": "0,1,2,3",
777 "UMask": "0x1",
778 "EventName": "OFFCORE_RESPONSE.PARTIAL_STREAMING_STORES.OUTSTANDING",
779 "MSRIndex": "0x1a6",
780 "SampleAfterValue": "100007",
781 "BriefDescription": "Counts partial cache line data writes to uncacheable write combining (USWC) memory region that are outstanding, per cycle, from the time of the L2 miss to when any response is received.",
782 "Offcore": "1"
783 },
784 {
785 "CollectPEBSRecord": "1",
786 "PublicDescription": "Counts partial cache line data writes to uncacheable write combining (USWC) memory region that miss the L2 cache. Requires MSR_OFFCORE_RESP[0,1] to specify request type and response. (duplicated for both MSRs)",
523 "EventCode": "0xB7", 787 "EventCode": "0xB7",
524 "MSRValue": "0x3600004000 ", 788 "MSRValue": "0x3600004000 ",
525 "Counter": "0,1,2,3", 789 "Counter": "0,1,2,3",
@@ -531,6 +795,8 @@
531 "Offcore": "1" 795 "Offcore": "1"
532 }, 796 },
533 { 797 {
798 "CollectPEBSRecord": "1",
799 "PublicDescription": "Counts partial cache line data writes to uncacheable write combining (USWC) memory region that miss the L2 cache with a snoop hit in the other processor module, data forwarding is required. Requires MSR_OFFCORE_RESP[0,1] to specify request type and response. (duplicated for both MSRs)",
534 "EventCode": "0xB7", 800 "EventCode": "0xB7",
535 "MSRValue": "0x1000004000 ", 801 "MSRValue": "0x1000004000 ",
536 "Counter": "0,1,2,3", 802 "Counter": "0,1,2,3",
@@ -542,6 +808,8 @@
542 "Offcore": "1" 808 "Offcore": "1"
543 }, 809 },
544 { 810 {
811 "CollectPEBSRecord": "1",
812 "PublicDescription": "Counts partial cache line data writes to uncacheable write combining (USWC) memory region that miss the L2 cache with a snoop hit in the other processor module, no data forwarding is required. Requires MSR_OFFCORE_RESP[0,1] to specify request type and response. (duplicated for both MSRs)",
545 "EventCode": "0xB7", 813 "EventCode": "0xB7",
546 "MSRValue": "0x0400004000 ", 814 "MSRValue": "0x0400004000 ",
547 "Counter": "0,1,2,3", 815 "Counter": "0,1,2,3",
@@ -553,6 +821,8 @@
553 "Offcore": "1" 821 "Offcore": "1"
554 }, 822 },
555 { 823 {
824 "CollectPEBSRecord": "1",
825 "PublicDescription": "Counts partial cache line data writes to uncacheable write combining (USWC) memory region that true miss for the L2 cache with a snoop miss in the other processor module. Requires MSR_OFFCORE_RESP[0,1] to specify request type and response. (duplicated for both MSRs)",
556 "EventCode": "0xB7", 826 "EventCode": "0xB7",
557 "MSRValue": "0x0200004000 ", 827 "MSRValue": "0x0200004000 ",
558 "Counter": "0,1,2,3", 828 "Counter": "0,1,2,3",
@@ -564,6 +834,8 @@
564 "Offcore": "1" 834 "Offcore": "1"
565 }, 835 },
566 { 836 {
837 "CollectPEBSRecord": "1",
838 "PublicDescription": "Counts partial cache line data writes to uncacheable write combining (USWC) memory region that hit the L2 cache. Requires MSR_OFFCORE_RESP[0,1] to specify request type and response. (duplicated for both MSRs)",
567 "EventCode": "0xB7", 839 "EventCode": "0xB7",
568 "MSRValue": "0x0000044000 ", 840 "MSRValue": "0x0000044000 ",
569 "Counter": "0,1,2,3", 841 "Counter": "0,1,2,3",
@@ -575,6 +847,34 @@
575 "Offcore": "1" 847 "Offcore": "1"
576 }, 848 },
577 { 849 {
850 "CollectPEBSRecord": "1",
851 "PublicDescription": "Counts partial cache line data writes to uncacheable write combining (USWC) memory region that have any transaction responses from the uncore subsystem. Requires MSR_OFFCORE_RESP[0,1] to specify request type and response. (duplicated for both MSRs)",
852 "EventCode": "0xB7",
853 "MSRValue": "0x0000014000 ",
854 "Counter": "0,1,2,3",
855 "UMask": "0x1",
856 "EventName": "OFFCORE_RESPONSE.PARTIAL_STREAMING_STORES.ANY_RESPONSE",
857 "MSRIndex": "0x1a6,0x1a7",
858 "SampleAfterValue": "100007",
859 "BriefDescription": "Counts partial cache line data writes to uncacheable write combining (USWC) memory region that have any transaction responses from the uncore subsystem.",
860 "Offcore": "1"
861 },
862 {
863 "CollectPEBSRecord": "1",
864 "PublicDescription": "Counts data cache line reads generated by hardware L1 data cache prefetcher that are outstanding, per cycle, from the time of the L2 miss to when any response is received. Requires MSR_OFFCORE_RESP[0,1] to specify request type and response. (duplicated for both MSRs)",
865 "EventCode": "0xB7",
866 "MSRValue": "0x4000002000 ",
867 "Counter": "0,1,2,3",
868 "UMask": "0x1",
869 "EventName": "OFFCORE_RESPONSE.PF_L1_DATA_RD.OUTSTANDING",
870 "MSRIndex": "0x1a6",
871 "SampleAfterValue": "100007",
872 "BriefDescription": "Counts data cache line reads generated by hardware L1 data cache prefetcher that are outstanding, per cycle, from the time of the L2 miss to when any response is received.",
873 "Offcore": "1"
874 },
875 {
876 "CollectPEBSRecord": "1",
877 "PublicDescription": "Counts data cache line reads generated by hardware L1 data cache prefetcher that miss the L2 cache. Requires MSR_OFFCORE_RESP[0,1] to specify request type and response. (duplicated for both MSRs)",
578 "EventCode": "0xB7", 878 "EventCode": "0xB7",
579 "MSRValue": "0x3600002000 ", 879 "MSRValue": "0x3600002000 ",
580 "Counter": "0,1,2,3", 880 "Counter": "0,1,2,3",
@@ -586,6 +886,8 @@
586 "Offcore": "1" 886 "Offcore": "1"
587 }, 887 },
588 { 888 {
889 "CollectPEBSRecord": "1",
890 "PublicDescription": "Counts data cache line reads generated by hardware L1 data cache prefetcher that miss the L2 cache with a snoop hit in the other processor module, data forwarding is required. Requires MSR_OFFCORE_RESP[0,1] to specify request type and response. (duplicated for both MSRs)",
589 "EventCode": "0xB7", 891 "EventCode": "0xB7",
590 "MSRValue": "0x1000002000 ", 892 "MSRValue": "0x1000002000 ",
591 "Counter": "0,1,2,3", 893 "Counter": "0,1,2,3",
@@ -597,6 +899,8 @@
597 "Offcore": "1" 899 "Offcore": "1"
598 }, 900 },
599 { 901 {
902 "CollectPEBSRecord": "1",
903 "PublicDescription": "Counts data cache line reads generated by hardware L1 data cache prefetcher that miss the L2 cache with a snoop hit in the other processor module, no data forwarding is required. Requires MSR_OFFCORE_RESP[0,1] to specify request type and response. (duplicated for both MSRs)",
600 "EventCode": "0xB7", 904 "EventCode": "0xB7",
601 "MSRValue": "0x0400002000 ", 905 "MSRValue": "0x0400002000 ",
602 "Counter": "0,1,2,3", 906 "Counter": "0,1,2,3",
@@ -608,6 +912,8 @@
608 "Offcore": "1" 912 "Offcore": "1"
609 }, 913 },
610 { 914 {
915 "CollectPEBSRecord": "1",
916 "PublicDescription": "Counts data cache line reads generated by hardware L1 data cache prefetcher that true miss for the L2 cache with a snoop miss in the other processor module. Requires MSR_OFFCORE_RESP[0,1] to specify request type and response. (duplicated for both MSRs)",
611 "EventCode": "0xB7", 917 "EventCode": "0xB7",
612 "MSRValue": "0x0200002000 ", 918 "MSRValue": "0x0200002000 ",
613 "Counter": "0,1,2,3", 919 "Counter": "0,1,2,3",
@@ -619,6 +925,8 @@
619 "Offcore": "1" 925 "Offcore": "1"
620 }, 926 },
621 { 927 {
928 "CollectPEBSRecord": "1",
929 "PublicDescription": "Counts data cache line reads generated by hardware L1 data cache prefetcher that hit the L2 cache. Requires MSR_OFFCORE_RESP[0,1] to specify request type and response. (duplicated for both MSRs)",
622 "EventCode": "0xB7", 930 "EventCode": "0xB7",
623 "MSRValue": "0x0000042000 ", 931 "MSRValue": "0x0000042000 ",
624 "Counter": "0,1,2,3", 932 "Counter": "0,1,2,3",
@@ -630,6 +938,34 @@
630 "Offcore": "1" 938 "Offcore": "1"
631 }, 939 },
632 { 940 {
941 "CollectPEBSRecord": "1",
942 "PublicDescription": "Counts data cache line reads generated by hardware L1 data cache prefetcher that have any transaction responses from the uncore subsystem. Requires MSR_OFFCORE_RESP[0,1] to specify request type and response. (duplicated for both MSRs)",
943 "EventCode": "0xB7",
944 "MSRValue": "0x0000012000 ",
945 "Counter": "0,1,2,3",
946 "UMask": "0x1",
947 "EventName": "OFFCORE_RESPONSE.PF_L1_DATA_RD.ANY_RESPONSE",
948 "MSRIndex": "0x1a6,0x1a7",
949 "SampleAfterValue": "100007",
950 "BriefDescription": "Counts data cache line reads generated by hardware L1 data cache prefetcher that have any transaction responses from the uncore subsystem.",
951 "Offcore": "1"
952 },
953 {
954 "CollectPEBSRecord": "1",
955 "PublicDescription": "Counts data cache lines requests by software prefetch instructions that are outstanding, per cycle, from the time of the L2 miss to when any response is received. Requires MSR_OFFCORE_RESP[0,1] to specify request type and response. (duplicated for both MSRs)",
956 "EventCode": "0xB7",
957 "MSRValue": "0x4000001000 ",
958 "Counter": "0,1,2,3",
959 "UMask": "0x1",
960 "EventName": "OFFCORE_RESPONSE.SW_PREFETCH.OUTSTANDING",
961 "MSRIndex": "0x1a6",
962 "SampleAfterValue": "100007",
963 "BriefDescription": "Counts data cache lines requests by software prefetch instructions that are outstanding, per cycle, from the time of the L2 miss to when any response is received.",
964 "Offcore": "1"
965 },
966 {
967 "CollectPEBSRecord": "1",
968 "PublicDescription": "Counts data cache lines requests by software prefetch instructions that miss the L2 cache. Requires MSR_OFFCORE_RESP[0,1] to specify request type and response. (duplicated for both MSRs)",
633 "EventCode": "0xB7", 969 "EventCode": "0xB7",
634 "MSRValue": "0x3600001000 ", 970 "MSRValue": "0x3600001000 ",
635 "Counter": "0,1,2,3", 971 "Counter": "0,1,2,3",
@@ -641,6 +977,8 @@
641 "Offcore": "1" 977 "Offcore": "1"
642 }, 978 },
643 { 979 {
980 "CollectPEBSRecord": "1",
981 "PublicDescription": "Counts data cache lines requests by software prefetch instructions that miss the L2 cache with a snoop hit in the other processor module, data forwarding is required. Requires MSR_OFFCORE_RESP[0,1] to specify request type and response. (duplicated for both MSRs)",
644 "EventCode": "0xB7", 982 "EventCode": "0xB7",
645 "MSRValue": "0x1000001000 ", 983 "MSRValue": "0x1000001000 ",
646 "Counter": "0,1,2,3", 984 "Counter": "0,1,2,3",
@@ -652,6 +990,8 @@
652 "Offcore": "1" 990 "Offcore": "1"
653 }, 991 },
654 { 992 {
993 "CollectPEBSRecord": "1",
994 "PublicDescription": "Counts data cache lines requests by software prefetch instructions that miss the L2 cache with a snoop hit in the other processor module, no data forwarding is required. Requires MSR_OFFCORE_RESP[0,1] to specify request type and response. (duplicated for both MSRs)",
655 "EventCode": "0xB7", 995 "EventCode": "0xB7",
656 "MSRValue": "0x0400001000 ", 996 "MSRValue": "0x0400001000 ",
657 "Counter": "0,1,2,3", 997 "Counter": "0,1,2,3",
@@ -663,6 +1003,8 @@
663 "Offcore": "1" 1003 "Offcore": "1"
664 }, 1004 },
665 { 1005 {
1006 "CollectPEBSRecord": "1",
1007 "PublicDescription": "Counts data cache lines requests by software prefetch instructions that true miss for the L2 cache with a snoop miss in the other processor module. Requires MSR_OFFCORE_RESP[0,1] to specify request type and response. (duplicated for both MSRs)",
666 "EventCode": "0xB7", 1008 "EventCode": "0xB7",
667 "MSRValue": "0x0200001000 ", 1009 "MSRValue": "0x0200001000 ",
668 "Counter": "0,1,2,3", 1010 "Counter": "0,1,2,3",
@@ -674,6 +1016,8 @@
674 "Offcore": "1" 1016 "Offcore": "1"
675 }, 1017 },
676 { 1018 {
1019 "CollectPEBSRecord": "1",
1020 "PublicDescription": "Counts data cache lines requests by software prefetch instructions that hit the L2 cache. Requires MSR_OFFCORE_RESP[0,1] to specify request type and response. (duplicated for both MSRs)",
677 "EventCode": "0xB7", 1021 "EventCode": "0xB7",
678 "MSRValue": "0x0000041000 ", 1022 "MSRValue": "0x0000041000 ",
679 "Counter": "0,1,2,3", 1023 "Counter": "0,1,2,3",
@@ -685,6 +1029,34 @@
685 "Offcore": "1" 1029 "Offcore": "1"
686 }, 1030 },
687 { 1031 {
1032 "CollectPEBSRecord": "1",
1033 "PublicDescription": "Counts data cache lines requests by software prefetch instructions that have any transaction responses from the uncore subsystem. Requires MSR_OFFCORE_RESP[0,1] to specify request type and response. (duplicated for both MSRs)",
1034 "EventCode": "0xB7",
1035 "MSRValue": "0x0000011000 ",
1036 "Counter": "0,1,2,3",
1037 "UMask": "0x1",
1038 "EventName": "OFFCORE_RESPONSE.SW_PREFETCH.ANY_RESPONSE",
1039 "MSRIndex": "0x1a6,0x1a7",
1040 "SampleAfterValue": "100007",
1041 "BriefDescription": "Counts data cache lines requests by software prefetch instructions that have any transaction responses from the uncore subsystem.",
1042 "Offcore": "1"
1043 },
1044 {
1045 "CollectPEBSRecord": "1",
1046 "PublicDescription": "Counts full cache line data writes to uncacheable write combining (USWC) memory region and full cache-line non-temporal writes that are outstanding, per cycle, from the time of the L2 miss to when any response is received. Requires MSR_OFFCORE_RESP[0,1] to specify request type and response. (duplicated for both MSRs)",
1047 "EventCode": "0xB7",
1048 "MSRValue": "0x4000000800 ",
1049 "Counter": "0,1,2,3",
1050 "UMask": "0x1",
1051 "EventName": "OFFCORE_RESPONSE.FULL_STREAMING_STORES.OUTSTANDING",
1052 "MSRIndex": "0x1a6",
1053 "SampleAfterValue": "100007",
1054 "BriefDescription": "Counts full cache line data writes to uncacheable write combining (USWC) memory region and full cache-line non-temporal writes that are outstanding, per cycle, from the time of the L2 miss to when any response is received.",
1055 "Offcore": "1"
1056 },
1057 {
1058 "CollectPEBSRecord": "1",
1059 "PublicDescription": "Counts full cache line data writes to uncacheable write combining (USWC) memory region and full cache-line non-temporal writes that miss the L2 cache. Requires MSR_OFFCORE_RESP[0,1] to specify request type and response. (duplicated for both MSRs)",
688 "EventCode": "0xB7", 1060 "EventCode": "0xB7",
689 "MSRValue": "0x3600000800 ", 1061 "MSRValue": "0x3600000800 ",
690 "Counter": "0,1,2,3", 1062 "Counter": "0,1,2,3",
@@ -696,6 +1068,8 @@
696 "Offcore": "1" 1068 "Offcore": "1"
697 }, 1069 },
698 { 1070 {
1071 "CollectPEBSRecord": "1",
1072 "PublicDescription": "Counts full cache line data writes to uncacheable write combining (USWC) memory region and full cache-line non-temporal writes that miss the L2 cache with a snoop hit in the other processor module, data forwarding is required. Requires MSR_OFFCORE_RESP[0,1] to specify request type and response. (duplicated for both MSRs)",
699 "EventCode": "0xB7", 1073 "EventCode": "0xB7",
700 "MSRValue": "0x1000000800 ", 1074 "MSRValue": "0x1000000800 ",
701 "Counter": "0,1,2,3", 1075 "Counter": "0,1,2,3",
@@ -707,6 +1081,8 @@
707 "Offcore": "1" 1081 "Offcore": "1"
708 }, 1082 },
709 { 1083 {
1084 "CollectPEBSRecord": "1",
1085 "PublicDescription": "Counts full cache line data writes to uncacheable write combining (USWC) memory region and full cache-line non-temporal writes that miss the L2 cache with a snoop hit in the other processor module, no data forwarding is required. Requires MSR_OFFCORE_RESP[0,1] to specify request type and response. (duplicated for both MSRs)",
710 "EventCode": "0xB7", 1086 "EventCode": "0xB7",
711 "MSRValue": "0x0400000800 ", 1087 "MSRValue": "0x0400000800 ",
712 "Counter": "0,1,2,3", 1088 "Counter": "0,1,2,3",
@@ -718,6 +1094,8 @@
718 "Offcore": "1" 1094 "Offcore": "1"
719 }, 1095 },
720 { 1096 {
1097 "CollectPEBSRecord": "1",
1098 "PublicDescription": "Counts full cache line data writes to uncacheable write combining (USWC) memory region and full cache-line non-temporal writes that true miss for the L2 cache with a snoop miss in the other processor module. Requires MSR_OFFCORE_RESP[0,1] to specify request type and response. (duplicated for both MSRs)",
721 "EventCode": "0xB7", 1099 "EventCode": "0xB7",
722 "MSRValue": "0x0200000800 ", 1100 "MSRValue": "0x0200000800 ",
723 "Counter": "0,1,2,3", 1101 "Counter": "0,1,2,3",
@@ -729,6 +1107,8 @@
729 "Offcore": "1" 1107 "Offcore": "1"
730 }, 1108 },
731 { 1109 {
1110 "CollectPEBSRecord": "1",
1111 "PublicDescription": "Counts full cache line data writes to uncacheable write combining (USWC) memory region and full cache-line non-temporal writes that hit the L2 cache. Requires MSR_OFFCORE_RESP[0,1] to specify request type and response. (duplicated for both MSRs)",
732 "EventCode": "0xB7", 1112 "EventCode": "0xB7",
733 "MSRValue": "0x0000040800 ", 1113 "MSRValue": "0x0000040800 ",
734 "Counter": "0,1,2,3", 1114 "Counter": "0,1,2,3",
@@ -740,6 +1120,99 @@
740 "Offcore": "1" 1120 "Offcore": "1"
741 }, 1121 },
742 { 1122 {
1123 "CollectPEBSRecord": "1",
1124 "PublicDescription": "Counts full cache line data writes to uncacheable write combining (USWC) memory region and full cache-line non-temporal writes that have any transaction responses from the uncore subsystem. Requires MSR_OFFCORE_RESP[0,1] to specify request type and response. (duplicated for both MSRs)",
1125 "EventCode": "0xB7",
1126 "MSRValue": "0x0000010800 ",
1127 "Counter": "0,1,2,3",
1128 "UMask": "0x1",
1129 "EventName": "OFFCORE_RESPONSE.FULL_STREAMING_STORES.ANY_RESPONSE",
1130 "MSRIndex": "0x1a6,0x1a7",
1131 "SampleAfterValue": "100007",
1132 "BriefDescription": "Counts full cache line data writes to uncacheable write combining (USWC) memory region and full cache-line non-temporal writes that have any transaction responses from the uncore subsystem.",
1133 "Offcore": "1"
1134 },
1135 {
1136 "CollectPEBSRecord": "1",
1137 "PublicDescription": "Counts bus lock and split lock requests that are outstanding, per cycle, from the time of the L2 miss to when any response is received. Requires MSR_OFFCORE_RESP[0,1] to specify request type and response. (duplicated for both MSRs)",
1138 "EventCode": "0xB7",
1139 "MSRValue": "0x4000000400 ",
1140 "Counter": "0,1,2,3",
1141 "UMask": "0x1",
1142 "EventName": "OFFCORE_RESPONSE.BUS_LOCKS.OUTSTANDING",
1143 "MSRIndex": "0x1a6",
1144 "SampleAfterValue": "100007",
1145 "BriefDescription": "Counts bus lock and split lock requests that are outstanding, per cycle, from the time of the L2 miss to when any response is received.",
1146 "Offcore": "1"
1147 },
1148 {
1149 "CollectPEBSRecord": "1",
1150 "PublicDescription": "Counts bus lock and split lock requests that miss the L2 cache. Requires MSR_OFFCORE_RESP[0,1] to specify request type and response. (duplicated for both MSRs)",
1151 "EventCode": "0xB7",
1152 "MSRValue": "0x3600000400 ",
1153 "Counter": "0,1,2,3",
1154 "UMask": "0x1",
1155 "EventName": "OFFCORE_RESPONSE.BUS_LOCKS.L2_MISS.ANY",
1156 "MSRIndex": "0x1a6,0x1a7",
1157 "SampleAfterValue": "100007",
1158 "BriefDescription": "Counts bus lock and split lock requests that miss the L2 cache.",
1159 "Offcore": "1"
1160 },
1161 {
1162 "CollectPEBSRecord": "1",
1163 "PublicDescription": "Counts bus lock and split lock requests that miss the L2 cache with a snoop hit in the other processor module, data forwarding is required. Requires MSR_OFFCORE_RESP[0,1] to specify request type and response. (duplicated for both MSRs)",
1164 "EventCode": "0xB7",
1165 "MSRValue": "0x1000000400 ",
1166 "Counter": "0,1,2,3",
1167 "UMask": "0x1",
1168 "EventName": "OFFCORE_RESPONSE.BUS_LOCKS.L2_MISS.HITM_OTHER_CORE",
1169 "MSRIndex": "0x1a6,0x1a7",
1170 "SampleAfterValue": "100007",
1171 "BriefDescription": "Counts bus lock and split lock requests that miss the L2 cache with a snoop hit in the other processor module, data forwarding is required.",
1172 "Offcore": "1"
1173 },
1174 {
1175 "CollectPEBSRecord": "1",
1176 "PublicDescription": "Counts bus lock and split lock requests that miss the L2 cache with a snoop hit in the other processor module, no data forwarding is required. Requires MSR_OFFCORE_RESP[0,1] to specify request type and response. (duplicated for both MSRs)",
1177 "EventCode": "0xB7",
1178 "MSRValue": "0x0400000400 ",
1179 "Counter": "0,1,2,3",
1180 "UMask": "0x1",
1181 "EventName": "OFFCORE_RESPONSE.BUS_LOCKS.L2_MISS.HIT_OTHER_CORE_NO_FWD",
1182 "MSRIndex": "0x1a6,0x1a7",
1183 "SampleAfterValue": "100007",
1184 "BriefDescription": "Counts bus lock and split lock requests that miss the L2 cache with a snoop hit in the other processor module, no data forwarding is required.",
1185 "Offcore": "1"
1186 },
1187 {
1188 "CollectPEBSRecord": "1",
1189 "PublicDescription": "Counts bus lock and split lock requests that true miss for the L2 cache with a snoop miss in the other processor module. Requires MSR_OFFCORE_RESP[0,1] to specify request type and response. (duplicated for both MSRs)",
1190 "EventCode": "0xB7",
1191 "MSRValue": "0x0200000400 ",
1192 "Counter": "0,1,2,3",
1193 "UMask": "0x1",
1194 "EventName": "OFFCORE_RESPONSE.BUS_LOCKS.L2_MISS.SNOOP_MISS_OR_NO_SNOOP_NEEDED",
1195 "MSRIndex": "0x1a6,0x1a7",
1196 "SampleAfterValue": "100007",
1197 "BriefDescription": "Counts bus lock and split lock requests that true miss for the L2 cache with a snoop miss in the other processor module. ",
1198 "Offcore": "1"
1199 },
1200 {
1201 "CollectPEBSRecord": "1",
1202 "PublicDescription": "Counts bus lock and split lock requests that hit the L2 cache. Requires MSR_OFFCORE_RESP[0,1] to specify request type and response. (duplicated for both MSRs)",
1203 "EventCode": "0xB7",
1204 "MSRValue": "0x0000040400 ",
1205 "Counter": "0,1,2,3",
1206 "UMask": "0x1",
1207 "EventName": "OFFCORE_RESPONSE.BUS_LOCKS.L2_HIT",
1208 "MSRIndex": "0x1a6,0x1a7",
1209 "SampleAfterValue": "100007",
1210 "BriefDescription": "Counts bus lock and split lock requests that hit the L2 cache.",
1211 "Offcore": "1"
1212 },
1213 {
1214 "CollectPEBSRecord": "1",
1215 "PublicDescription": "Counts bus lock and split lock requests that have any transaction responses from the uncore subsystem. Requires MSR_OFFCORE_RESP[0,1] to specify request type and response. (duplicated for both MSRs)",
743 "EventCode": "0xB7", 1216 "EventCode": "0xB7",
744 "MSRValue": "0x0000010400 ", 1217 "MSRValue": "0x0000010400 ",
745 "Counter": "0,1,2,3", 1218 "Counter": "0,1,2,3",
@@ -751,6 +1224,112 @@
751 "Offcore": "1" 1224 "Offcore": "1"
752 }, 1225 },
753 { 1226 {
1227 "CollectPEBSRecord": "1",
1228 "PublicDescription": "Counts code reads in uncacheable (UC) memory region that are outstanding, per cycle, from the time of the L2 miss to when any response is received. Requires MSR_OFFCORE_RESP[0,1] to specify request type and response. (duplicated for both MSRs)",
1229 "EventCode": "0xB7",
1230 "MSRValue": "0x4000000200 ",
1231 "Counter": "0,1,2,3",
1232 "UMask": "0x1",
1233 "EventName": "OFFCORE_RESPONSE.UC_CODE_RD.OUTSTANDING",
1234 "MSRIndex": "0x1a6",
1235 "SampleAfterValue": "100007",
1236 "BriefDescription": "Counts code reads in uncacheable (UC) memory region that are outstanding, per cycle, from the time of the L2 miss to when any response is received.",
1237 "Offcore": "1"
1238 },
1239 {
1240 "CollectPEBSRecord": "1",
1241 "PublicDescription": "Counts code reads in uncacheable (UC) memory region that miss the L2 cache. Requires MSR_OFFCORE_RESP[0,1] to specify request type and response. (duplicated for both MSRs)",
1242 "EventCode": "0xB7",
1243 "MSRValue": "0x3600000200 ",
1244 "Counter": "0,1,2,3",
1245 "UMask": "0x1",
1246 "EventName": "OFFCORE_RESPONSE.UC_CODE_RD.L2_MISS.ANY",
1247 "MSRIndex": "0x1a6,0x1a7",
1248 "SampleAfterValue": "100007",
1249 "BriefDescription": "Counts code reads in uncacheable (UC) memory region that miss the L2 cache.",
1250 "Offcore": "1"
1251 },
1252 {
1253 "CollectPEBSRecord": "1",
1254 "PublicDescription": "Counts code reads in uncacheable (UC) memory region that miss the L2 cache with a snoop hit in the other processor module, data forwarding is required. Requires MSR_OFFCORE_RESP[0,1] to specify request type and response. (duplicated for both MSRs)",
1255 "EventCode": "0xB7",
1256 "MSRValue": "0x1000000200 ",
1257 "Counter": "0,1,2,3",
1258 "UMask": "0x1",
1259 "EventName": "OFFCORE_RESPONSE.UC_CODE_RD.L2_MISS.HITM_OTHER_CORE",
1260 "MSRIndex": "0x1a6,0x1a7",
1261 "SampleAfterValue": "100007",
1262 "BriefDescription": "Counts code reads in uncacheable (UC) memory region that miss the L2 cache with a snoop hit in the other processor module, data forwarding is required.",
1263 "Offcore": "1"
1264 },
1265 {
1266 "CollectPEBSRecord": "1",
1267 "PublicDescription": "Counts code reads in uncacheable (UC) memory region that miss the L2 cache with a snoop hit in the other processor module, no data forwarding is required. Requires MSR_OFFCORE_RESP[0,1] to specify request type and response. (duplicated for both MSRs)",
1268 "EventCode": "0xB7",
1269 "MSRValue": "0x0400000200 ",
1270 "Counter": "0,1,2,3",
1271 "UMask": "0x1",
1272 "EventName": "OFFCORE_RESPONSE.UC_CODE_RD.L2_MISS.HIT_OTHER_CORE_NO_FWD",
1273 "MSRIndex": "0x1a6,0x1a7",
1274 "SampleAfterValue": "100007",
1275 "BriefDescription": "Counts code reads in uncacheable (UC) memory region that miss the L2 cache with a snoop hit in the other processor module, no data forwarding is required.",
1276 "Offcore": "1"
1277 },
1278 {
1279 "CollectPEBSRecord": "1",
1280 "PublicDescription": "Counts code reads in uncacheable (UC) memory region that true miss for the L2 cache with a snoop miss in the other processor module. Requires MSR_OFFCORE_RESP[0,1] to specify request type and response. (duplicated for both MSRs)",
1281 "EventCode": "0xB7",
1282 "MSRValue": "0x0200000200 ",
1283 "Counter": "0,1,2,3",
1284 "UMask": "0x1",
1285 "EventName": "OFFCORE_RESPONSE.UC_CODE_RD.L2_MISS.SNOOP_MISS_OR_NO_SNOOP_NEEDED",
1286 "MSRIndex": "0x1a6,0x1a7",
1287 "SampleAfterValue": "100007",
1288 "BriefDescription": "Counts code reads in uncacheable (UC) memory region that true miss for the L2 cache with a snoop miss in the other processor module. ",
1289 "Offcore": "1"
1290 },
1291 {
1292 "CollectPEBSRecord": "1",
1293 "PublicDescription": "Counts code reads in uncacheable (UC) memory region that hit the L2 cache. Requires MSR_OFFCORE_RESP[0,1] to specify request type and response. (duplicated for both MSRs)",
1294 "EventCode": "0xB7",
1295 "MSRValue": "0x0000040200 ",
1296 "Counter": "0,1,2,3",
1297 "UMask": "0x1",
1298 "EventName": "OFFCORE_RESPONSE.UC_CODE_RD.L2_HIT",
1299 "MSRIndex": "0x1a6,0x1a7",
1300 "SampleAfterValue": "100007",
1301 "BriefDescription": "Counts code reads in uncacheable (UC) memory region that hit the L2 cache.",
1302 "Offcore": "1"
1303 },
1304 {
1305 "CollectPEBSRecord": "1",
1306 "PublicDescription": "Counts code reads in uncacheable (UC) memory region that have any transaction responses from the uncore subsystem. Requires MSR_OFFCORE_RESP[0,1] to specify request type and response. (duplicated for both MSRs)",
1307 "EventCode": "0xB7",
1308 "MSRValue": "0x0000010200 ",
1309 "Counter": "0,1,2,3",
1310 "UMask": "0x1",
1311 "EventName": "OFFCORE_RESPONSE.UC_CODE_RD.ANY_RESPONSE",
1312 "MSRIndex": "0x1a6,0x1a7",
1313 "SampleAfterValue": "100007",
1314 "BriefDescription": "Counts code reads in uncacheable (UC) memory region that have any transaction responses from the uncore subsystem.",
1315 "Offcore": "1"
1316 },
1317 {
1318 "CollectPEBSRecord": "1",
1319 "PublicDescription": "Counts the number of demand write requests (RFO) generated by a write to partial data cache line, including the writes to uncacheable (UC) and write through (WT), and write protected (WP) types of memory that are outstanding, per cycle, from the time of the L2 miss to when any response is received. Requires MSR_OFFCORE_RESP[0,1] to specify request type and response. (duplicated for both MSRs)",
1320 "EventCode": "0xB7",
1321 "MSRValue": "0x4000000100 ",
1322 "Counter": "0,1,2,3",
1323 "UMask": "0x1",
1324 "EventName": "OFFCORE_RESPONSE.PARTIAL_WRITES.OUTSTANDING",
1325 "MSRIndex": "0x1a6",
1326 "SampleAfterValue": "100007",
1327 "BriefDescription": "Counts the number of demand write requests (RFO) generated by a write to partial data cache line, including the writes to uncacheable (UC) and write through (WT), and write protected (WP) types of memory that are outstanding, per cycle, from the time of the L2 miss to when any response is received.",
1328 "Offcore": "1"
1329 },
1330 {
1331 "CollectPEBSRecord": "1",
1332 "PublicDescription": "Counts the number of demand write requests (RFO) generated by a write to partial data cache line, including the writes to uncacheable (UC) and write through (WT), and write protected (WP) types of memory that miss the L2 cache. Requires MSR_OFFCORE_RESP[0,1] to specify request type and response. (duplicated for both MSRs)",
754 "EventCode": "0xB7", 1333 "EventCode": "0xB7",
755 "MSRValue": "0x3600000100 ", 1334 "MSRValue": "0x3600000100 ",
756 "Counter": "0,1,2,3", 1335 "Counter": "0,1,2,3",
@@ -762,6 +1341,86 @@
762 "Offcore": "1" 1341 "Offcore": "1"
763 }, 1342 },
764 { 1343 {
1344 "CollectPEBSRecord": "1",
1345 "PublicDescription": "Counts the number of demand write requests (RFO) generated by a write to partial data cache line, including the writes to uncacheable (UC) and write through (WT), and write protected (WP) types of memory that miss the L2 cache with a snoop hit in the other processor module, data forwarding is required. Requires MSR_OFFCORE_RESP[0,1] to specify request type and response. (duplicated for both MSRs)",
1346 "EventCode": "0xB7",
1347 "MSRValue": "0x1000000100 ",
1348 "Counter": "0,1,2,3",
1349 "UMask": "0x1",
1350 "EventName": "OFFCORE_RESPONSE.PARTIAL_WRITES.L2_MISS.HITM_OTHER_CORE",
1351 "MSRIndex": "0x1a6,0x1a7",
1352 "SampleAfterValue": "100007",
1353 "BriefDescription": "Counts the number of demand write requests (RFO) generated by a write to partial data cache line, including the writes to uncacheable (UC) and write through (WT), and write protected (WP) types of memory that miss the L2 cache with a snoop hit in the other processor module, data forwarding is required.",
1354 "Offcore": "1"
1355 },
1356 {
1357 "CollectPEBSRecord": "1",
1358 "PublicDescription": "Counts the number of demand write requests (RFO) generated by a write to partial data cache line, including the writes to uncacheable (UC) and write through (WT), and write protected (WP) types of memory that miss the L2 cache with a snoop hit in the other processor module, no data forwarding is required. Requires MSR_OFFCORE_RESP[0,1] to specify request type and response. (duplicated for both MSRs)",
1359 "EventCode": "0xB7",
1360 "MSRValue": "0x0400000100 ",
1361 "Counter": "0,1,2,3",
1362 "UMask": "0x1",
1363 "EventName": "OFFCORE_RESPONSE.PARTIAL_WRITES.L2_MISS.HIT_OTHER_CORE_NO_FWD",
1364 "MSRIndex": "0x1a6,0x1a7",
1365 "SampleAfterValue": "100007",
1366 "BriefDescription": "Counts the number of demand write requests (RFO) generated by a write to partial data cache line, including the writes to uncacheable (UC) and write through (WT), and write protected (WP) types of memory that miss the L2 cache with a snoop hit in the other processor module, no data forwarding is required.",
1367 "Offcore": "1"
1368 },
1369 {
1370 "CollectPEBSRecord": "1",
1371 "PublicDescription": "Counts the number of demand write requests (RFO) generated by a write to partial data cache line, including the writes to uncacheable (UC) and write through (WT), and write protected (WP) types of memory that true miss for the L2 cache with a snoop miss in the other processor module. Requires MSR_OFFCORE_RESP[0,1] to specify request type and response. (duplicated for both MSRs)",
1372 "EventCode": "0xB7",
1373 "MSRValue": "0x0200000100 ",
1374 "Counter": "0,1,2,3",
1375 "UMask": "0x1",
1376 "EventName": "OFFCORE_RESPONSE.PARTIAL_WRITES.L2_MISS.SNOOP_MISS_OR_NO_SNOOP_NEEDED",
1377 "MSRIndex": "0x1a6,0x1a7",
1378 "SampleAfterValue": "100007",
1379 "BriefDescription": "Counts the number of demand write requests (RFO) generated by a write to partial data cache line, including the writes to uncacheable (UC) and write through (WT), and write protected (WP) types of memory that true miss for the L2 cache with a snoop miss in the other processor module. ",
1380 "Offcore": "1"
1381 },
1382 {
1383 "CollectPEBSRecord": "1",
1384 "PublicDescription": "Counts the number of demand write requests (RFO) generated by a write to partial data cache line, including the writes to uncacheable (UC) and write through (WT), and write protected (WP) types of memory that hit the L2 cache. Requires MSR_OFFCORE_RESP[0,1] to specify request type and response. (duplicated for both MSRs)",
1385 "EventCode": "0xB7",
1386 "MSRValue": "0x0000040100 ",
1387 "Counter": "0,1,2,3",
1388 "UMask": "0x1",
1389 "EventName": "OFFCORE_RESPONSE.PARTIAL_WRITES.L2_HIT",
1390 "MSRIndex": "0x1a6,0x1a7",
1391 "SampleAfterValue": "100007",
1392 "BriefDescription": "Counts the number of demand write requests (RFO) generated by a write to partial data cache line, including the writes to uncacheable (UC) and write through (WT), and write protected (WP) types of memory that hit the L2 cache.",
1393 "Offcore": "1"
1394 },
1395 {
1396 "CollectPEBSRecord": "1",
1397 "PublicDescription": "Counts the number of demand write requests (RFO) generated by a write to partial data cache line, including the writes to uncacheable (UC) and write through (WT), and write protected (WP) types of memory that have any transaction responses from the uncore subsystem. Requires MSR_OFFCORE_RESP[0,1] to specify request type and response. (duplicated for both MSRs)",
1398 "EventCode": "0xB7",
1399 "MSRValue": "0x0000010100 ",
1400 "Counter": "0,1,2,3",
1401 "UMask": "0x1",
1402 "EventName": "OFFCORE_RESPONSE.PARTIAL_WRITES.ANY_RESPONSE",
1403 "MSRIndex": "0x1a6,0x1a7",
1404 "SampleAfterValue": "100007",
1405 "BriefDescription": "Counts the number of demand write requests (RFO) generated by a write to partial data cache line, including the writes to uncacheable (UC) and write through (WT), and write protected (WP) types of memory that have any transaction responses from the uncore subsystem.",
1406 "Offcore": "1"
1407 },
1408 {
1409 "CollectPEBSRecord": "1",
1410 "PublicDescription": "Counts demand data partial reads, including data in uncacheable (UC) or uncacheable write combining (USWC) memory types that are outstanding, per cycle, from the time of the L2 miss to when any response is received. Requires MSR_OFFCORE_RESP[0,1] to specify request type and response. (duplicated for both MSRs)",
1411 "EventCode": "0xB7",
1412 "MSRValue": "0x4000000080 ",
1413 "Counter": "0,1,2,3",
1414 "UMask": "0x1",
1415 "EventName": "OFFCORE_RESPONSE.PARTIAL_READS.OUTSTANDING",
1416 "MSRIndex": "0x1a6",
1417 "SampleAfterValue": "100007",
1418 "BriefDescription": "Counts demand data partial reads, including data in uncacheable (UC) or uncacheable write combining (USWC) memory types that are outstanding, per cycle, from the time of the L2 miss to when any response is received.",
1419 "Offcore": "1"
1420 },
1421 {
1422 "CollectPEBSRecord": "1",
1423 "PublicDescription": "Counts demand data partial reads, including data in uncacheable (UC) or uncacheable write combining (USWC) memory types that miss the L2 cache. Requires MSR_OFFCORE_RESP[0,1] to specify request type and response. (duplicated for both MSRs)",
765 "EventCode": "0xB7", 1424 "EventCode": "0xB7",
766 "MSRValue": "0x3600000080 ", 1425 "MSRValue": "0x3600000080 ",
767 "Counter": "0,1,2,3", 1426 "Counter": "0,1,2,3",
@@ -773,6 +1432,86 @@
773 "Offcore": "1" 1432 "Offcore": "1"
774 }, 1433 },
775 { 1434 {
1435 "CollectPEBSRecord": "1",
1436 "PublicDescription": "Counts demand data partial reads, including data in uncacheable (UC) or uncacheable write combining (USWC) memory types that miss the L2 cache with a snoop hit in the other processor module, data forwarding is required. Requires MSR_OFFCORE_RESP[0,1] to specify request type and response. (duplicated for both MSRs)",
1437 "EventCode": "0xB7",
1438 "MSRValue": "0x1000000080 ",
1439 "Counter": "0,1,2,3",
1440 "UMask": "0x1",
1441 "EventName": "OFFCORE_RESPONSE.PARTIAL_READS.L2_MISS.HITM_OTHER_CORE",
1442 "MSRIndex": "0x1a6,0x1a7",
1443 "SampleAfterValue": "100007",
1444 "BriefDescription": "Counts demand data partial reads, including data in uncacheable (UC) or uncacheable write combining (USWC) memory types that miss the L2 cache with a snoop hit in the other processor module, data forwarding is required.",
1445 "Offcore": "1"
1446 },
1447 {
1448 "CollectPEBSRecord": "1",
1449 "PublicDescription": "Counts demand data partial reads, including data in uncacheable (UC) or uncacheable write combining (USWC) memory types that miss the L2 cache with a snoop hit in the other processor module, no data forwarding is required. Requires MSR_OFFCORE_RESP[0,1] to specify request type and response. (duplicated for both MSRs)",
1450 "EventCode": "0xB7",
1451 "MSRValue": "0x0400000080 ",
1452 "Counter": "0,1,2,3",
1453 "UMask": "0x1",
1454 "EventName": "OFFCORE_RESPONSE.PARTIAL_READS.L2_MISS.HIT_OTHER_CORE_NO_FWD",
1455 "MSRIndex": "0x1a6,0x1a7",
1456 "SampleAfterValue": "100007",
1457 "BriefDescription": "Counts demand data partial reads, including data in uncacheable (UC) or uncacheable write combining (USWC) memory types that miss the L2 cache with a snoop hit in the other processor module, no data forwarding is required.",
1458 "Offcore": "1"
1459 },
1460 {
1461 "CollectPEBSRecord": "1",
1462 "PublicDescription": "Counts demand data partial reads, including data in uncacheable (UC) or uncacheable write combining (USWC) memory types that true miss for the L2 cache with a snoop miss in the other processor module. Requires MSR_OFFCORE_RESP[0,1] to specify request type and response. (duplicated for both MSRs)",
1463 "EventCode": "0xB7",
1464 "MSRValue": "0x0200000080 ",
1465 "Counter": "0,1,2,3",
1466 "UMask": "0x1",
1467 "EventName": "OFFCORE_RESPONSE.PARTIAL_READS.L2_MISS.SNOOP_MISS_OR_NO_SNOOP_NEEDED",
1468 "MSRIndex": "0x1a6,0x1a7",
1469 "SampleAfterValue": "100007",
1470 "BriefDescription": "Counts demand data partial reads, including data in uncacheable (UC) or uncacheable write combining (USWC) memory types that true miss for the L2 cache with a snoop miss in the other processor module. ",
1471 "Offcore": "1"
1472 },
1473 {
1474 "CollectPEBSRecord": "1",
1475 "PublicDescription": "Counts demand data partial reads, including data in uncacheable (UC) or uncacheable write combining (USWC) memory types that hit the L2 cache. Requires MSR_OFFCORE_RESP[0,1] to specify request type and response. (duplicated for both MSRs)",
1476 "EventCode": "0xB7",
1477 "MSRValue": "0x0000040080 ",
1478 "Counter": "0,1,2,3",
1479 "UMask": "0x1",
1480 "EventName": "OFFCORE_RESPONSE.PARTIAL_READS.L2_HIT",
1481 "MSRIndex": "0x1a6,0x1a7",
1482 "SampleAfterValue": "100007",
1483 "BriefDescription": "Counts demand data partial reads, including data in uncacheable (UC) or uncacheable write combining (USWC) memory types that hit the L2 cache.",
1484 "Offcore": "1"
1485 },
1486 {
1487 "CollectPEBSRecord": "1",
1488 "PublicDescription": "Counts demand data partial reads, including data in uncacheable (UC) or uncacheable write combining (USWC) memory types that have any transaction responses from the uncore subsystem. Requires MSR_OFFCORE_RESP[0,1] to specify request type and response. (duplicated for both MSRs)",
1489 "EventCode": "0xB7",
1490 "MSRValue": "0x0000010080 ",
1491 "Counter": "0,1,2,3",
1492 "UMask": "0x1",
1493 "EventName": "OFFCORE_RESPONSE.PARTIAL_READS.ANY_RESPONSE",
1494 "MSRIndex": "0x1a6,0x1a7",
1495 "SampleAfterValue": "100007",
1496 "BriefDescription": "Counts demand data partial reads, including data in uncacheable (UC) or uncacheable write combining (USWC) memory types that have any transaction responses from the uncore subsystem.",
1497 "Offcore": "1"
1498 },
1499 {
1500 "CollectPEBSRecord": "1",
1501 "PublicDescription": "Counts reads for ownership (RFO) requests generated by L2 prefetcher that are outstanding, per cycle, from the time of the L2 miss to when any response is received. Requires MSR_OFFCORE_RESP[0,1] to specify request type and response. (duplicated for both MSRs)",
1502 "EventCode": "0xB7",
1503 "MSRValue": "0x4000000020 ",
1504 "Counter": "0,1,2,3",
1505 "UMask": "0x1",
1506 "EventName": "OFFCORE_RESPONSE.PF_L2_RFO.OUTSTANDING",
1507 "MSRIndex": "0x1a6",
1508 "SampleAfterValue": "100007",
1509 "BriefDescription": "Counts reads for ownership (RFO) requests generated by L2 prefetcher that are outstanding, per cycle, from the time of the L2 miss to when any response is received.",
1510 "Offcore": "1"
1511 },
1512 {
1513 "CollectPEBSRecord": "1",
1514 "PublicDescription": "Counts reads for ownership (RFO) requests generated by L2 prefetcher that miss the L2 cache. Requires MSR_OFFCORE_RESP[0,1] to specify request type and response. (duplicated for both MSRs)",
776 "EventCode": "0xB7", 1515 "EventCode": "0xB7",
777 "MSRValue": "0x3600000020 ", 1516 "MSRValue": "0x3600000020 ",
778 "Counter": "0,1,2,3", 1517 "Counter": "0,1,2,3",
@@ -784,6 +1523,8 @@
784 "Offcore": "1" 1523 "Offcore": "1"
785 }, 1524 },
786 { 1525 {
1526 "CollectPEBSRecord": "1",
1527 "PublicDescription": "Counts reads for ownership (RFO) requests generated by L2 prefetcher that miss the L2 cache with a snoop hit in the other processor module, data forwarding is required. Requires MSR_OFFCORE_RESP[0,1] to specify request type and response. (duplicated for both MSRs)",
787 "EventCode": "0xB7", 1528 "EventCode": "0xB7",
788 "MSRValue": "0x1000000020 ", 1529 "MSRValue": "0x1000000020 ",
789 "Counter": "0,1,2,3", 1530 "Counter": "0,1,2,3",
@@ -795,6 +1536,8 @@
795 "Offcore": "1" 1536 "Offcore": "1"
796 }, 1537 },
797 { 1538 {
1539 "CollectPEBSRecord": "1",
1540 "PublicDescription": "Counts reads for ownership (RFO) requests generated by L2 prefetcher that miss the L2 cache with a snoop hit in the other processor module, no data forwarding is required. Requires MSR_OFFCORE_RESP[0,1] to specify request type and response. (duplicated for both MSRs)",
798 "EventCode": "0xB7", 1541 "EventCode": "0xB7",
799 "MSRValue": "0x0400000020 ", 1542 "MSRValue": "0x0400000020 ",
800 "Counter": "0,1,2,3", 1543 "Counter": "0,1,2,3",
@@ -806,6 +1549,8 @@
806 "Offcore": "1" 1549 "Offcore": "1"
807 }, 1550 },
808 { 1551 {
1552 "CollectPEBSRecord": "1",
1553 "PublicDescription": "Counts reads for ownership (RFO) requests generated by L2 prefetcher that true miss for the L2 cache with a snoop miss in the other processor module. Requires MSR_OFFCORE_RESP[0,1] to specify request type and response. (duplicated for both MSRs)",
809 "EventCode": "0xB7", 1554 "EventCode": "0xB7",
810 "MSRValue": "0x0200000020 ", 1555 "MSRValue": "0x0200000020 ",
811 "Counter": "0,1,2,3", 1556 "Counter": "0,1,2,3",
@@ -817,6 +1562,8 @@
817 "Offcore": "1" 1562 "Offcore": "1"
818 }, 1563 },
819 { 1564 {
1565 "CollectPEBSRecord": "1",
1566 "PublicDescription": "Counts reads for ownership (RFO) requests generated by L2 prefetcher that hit the L2 cache. Requires MSR_OFFCORE_RESP[0,1] to specify request type and response. (duplicated for both MSRs)",
820 "EventCode": "0xB7", 1567 "EventCode": "0xB7",
821 "MSRValue": "0x0000040020 ", 1568 "MSRValue": "0x0000040020 ",
822 "Counter": "0,1,2,3", 1569 "Counter": "0,1,2,3",
@@ -828,6 +1575,34 @@
828 "Offcore": "1" 1575 "Offcore": "1"
829 }, 1576 },
830 { 1577 {
1578 "CollectPEBSRecord": "1",
1579 "PublicDescription": "Counts reads for ownership (RFO) requests generated by L2 prefetcher that have any transaction responses from the uncore subsystem. Requires MSR_OFFCORE_RESP[0,1] to specify request type and response. (duplicated for both MSRs)",
1580 "EventCode": "0xB7",
1581 "MSRValue": "0x0000010020 ",
1582 "Counter": "0,1,2,3",
1583 "UMask": "0x1",
1584 "EventName": "OFFCORE_RESPONSE.PF_L2_RFO.ANY_RESPONSE",
1585 "MSRIndex": "0x1a6,0x1a7",
1586 "SampleAfterValue": "100007",
1587 "BriefDescription": "Counts reads for ownership (RFO) requests generated by L2 prefetcher that have any transaction responses from the uncore subsystem.",
1588 "Offcore": "1"
1589 },
1590 {
1591 "CollectPEBSRecord": "1",
1592 "PublicDescription": "Counts data cacheline reads generated by hardware L2 cache prefetcher that are outstanding, per cycle, from the time of the L2 miss to when any response is received. Requires MSR_OFFCORE_RESP[0,1] to specify request type and response. (duplicated for both MSRs)",
1593 "EventCode": "0xB7",
1594 "MSRValue": "0x4000000010 ",
1595 "Counter": "0,1,2,3",
1596 "UMask": "0x1",
1597 "EventName": "OFFCORE_RESPONSE.PF_L2_DATA_RD.OUTSTANDING",
1598 "MSRIndex": "0x1a6",
1599 "SampleAfterValue": "100007",
1600 "BriefDescription": "Counts data cacheline reads generated by hardware L2 cache prefetcher that are outstanding, per cycle, from the time of the L2 miss to when any response is received.",
1601 "Offcore": "1"
1602 },
1603 {
1604 "CollectPEBSRecord": "1",
1605 "PublicDescription": "Counts data cacheline reads generated by hardware L2 cache prefetcher that miss the L2 cache. Requires MSR_OFFCORE_RESP[0,1] to specify request type and response. (duplicated for both MSRs)",
831 "EventCode": "0xB7", 1606 "EventCode": "0xB7",
832 "MSRValue": "0x3600000010 ", 1607 "MSRValue": "0x3600000010 ",
833 "Counter": "0,1,2,3", 1608 "Counter": "0,1,2,3",
@@ -839,6 +1614,8 @@
839 "Offcore": "1" 1614 "Offcore": "1"
840 }, 1615 },
841 { 1616 {
1617 "CollectPEBSRecord": "1",
1618 "PublicDescription": "Counts data cacheline reads generated by hardware L2 cache prefetcher that miss the L2 cache with a snoop hit in the other processor module, data forwarding is required. Requires MSR_OFFCORE_RESP[0,1] to specify request type and response. (duplicated for both MSRs)",
842 "EventCode": "0xB7", 1619 "EventCode": "0xB7",
843 "MSRValue": "0x1000000010 ", 1620 "MSRValue": "0x1000000010 ",
844 "Counter": "0,1,2,3", 1621 "Counter": "0,1,2,3",
@@ -850,6 +1627,8 @@
850 "Offcore": "1" 1627 "Offcore": "1"
851 }, 1628 },
852 { 1629 {
1630 "CollectPEBSRecord": "1",
1631 "PublicDescription": "Counts data cacheline reads generated by hardware L2 cache prefetcher that miss the L2 cache with a snoop hit in the other processor module, no data forwarding is required. Requires MSR_OFFCORE_RESP[0,1] to specify request type and response. (duplicated for both MSRs)",
853 "EventCode": "0xB7", 1632 "EventCode": "0xB7",
854 "MSRValue": "0x0400000010 ", 1633 "MSRValue": "0x0400000010 ",
855 "Counter": "0,1,2,3", 1634 "Counter": "0,1,2,3",
@@ -861,6 +1640,8 @@
861 "Offcore": "1" 1640 "Offcore": "1"
862 }, 1641 },
863 { 1642 {
1643 "CollectPEBSRecord": "1",
1644 "PublicDescription": "Counts data cacheline reads generated by hardware L2 cache prefetcher that true miss for the L2 cache with a snoop miss in the other processor module. Requires MSR_OFFCORE_RESP[0,1] to specify request type and response. (duplicated for both MSRs)",
864 "EventCode": "0xB7", 1645 "EventCode": "0xB7",
865 "MSRValue": "0x0200000010 ", 1646 "MSRValue": "0x0200000010 ",
866 "Counter": "0,1,2,3", 1647 "Counter": "0,1,2,3",
@@ -872,6 +1653,8 @@
872 "Offcore": "1" 1653 "Offcore": "1"
873 }, 1654 },
874 { 1655 {
1656 "CollectPEBSRecord": "1",
1657 "PublicDescription": "Counts data cacheline reads generated by hardware L2 cache prefetcher that hit the L2 cache. Requires MSR_OFFCORE_RESP[0,1] to specify request type and response. (duplicated for both MSRs)",
875 "EventCode": "0xB7", 1658 "EventCode": "0xB7",
876 "MSRValue": "0x0000040010 ", 1659 "MSRValue": "0x0000040010 ",
877 "Counter": "0,1,2,3", 1660 "Counter": "0,1,2,3",
@@ -883,6 +1666,34 @@
883 "Offcore": "1" 1666 "Offcore": "1"
884 }, 1667 },
885 { 1668 {
1669 "CollectPEBSRecord": "1",
1670 "PublicDescription": "Counts data cacheline reads generated by hardware L2 cache prefetcher that have any transaction responses from the uncore subsystem. Requires MSR_OFFCORE_RESP[0,1] to specify request type and response. (duplicated for both MSRs)",
1671 "EventCode": "0xB7",
1672 "MSRValue": "0x0000010010 ",
1673 "Counter": "0,1,2,3",
1674 "UMask": "0x1",
1675 "EventName": "OFFCORE_RESPONSE.PF_L2_DATA_RD.ANY_RESPONSE",
1676 "MSRIndex": "0x1a6,0x1a7",
1677 "SampleAfterValue": "100007",
1678 "BriefDescription": "Counts data cacheline reads generated by hardware L2 cache prefetcher that have any transaction responses from the uncore subsystem.",
1679 "Offcore": "1"
1680 },
1681 {
1682 "CollectPEBSRecord": "1",
1683 "PublicDescription": "Counts the number of writeback transactions caused by L1 or L2 cache evictions that are outstanding, per cycle, from the time of the L2 miss to when any response is received. Requires MSR_OFFCORE_RESP[0,1] to specify request type and response. (duplicated for both MSRs)",
1684 "EventCode": "0xB7",
1685 "MSRValue": "0x4000000008 ",
1686 "Counter": "0,1,2,3",
1687 "UMask": "0x1",
1688 "EventName": "OFFCORE_RESPONSE.COREWB.OUTSTANDING",
1689 "MSRIndex": "0x1a6",
1690 "SampleAfterValue": "100007",
1691 "BriefDescription": "Counts the number of writeback transactions caused by L1 or L2 cache evictions that are outstanding, per cycle, from the time of the L2 miss to when any response is received.",
1692 "Offcore": "1"
1693 },
1694 {
1695 "CollectPEBSRecord": "1",
1696 "PublicDescription": "Counts the number of writeback transactions caused by L1 or L2 cache evictions that miss the L2 cache. Requires MSR_OFFCORE_RESP[0,1] to specify request type and response. (duplicated for both MSRs)",
886 "EventCode": "0xB7", 1697 "EventCode": "0xB7",
887 "MSRValue": "0x3600000008 ", 1698 "MSRValue": "0x3600000008 ",
888 "Counter": "0,1,2,3", 1699 "Counter": "0,1,2,3",
@@ -894,6 +1705,8 @@
894 "Offcore": "1" 1705 "Offcore": "1"
895 }, 1706 },
896 { 1707 {
1708 "CollectPEBSRecord": "1",
1709 "PublicDescription": "Counts the number of writeback transactions caused by L1 or L2 cache evictions that miss the L2 cache with a snoop hit in the other processor module, data forwarding is required. Requires MSR_OFFCORE_RESP[0,1] to specify request type and response. (duplicated for both MSRs)",
897 "EventCode": "0xB7", 1710 "EventCode": "0xB7",
898 "MSRValue": "0x1000000008 ", 1711 "MSRValue": "0x1000000008 ",
899 "Counter": "0,1,2,3", 1712 "Counter": "0,1,2,3",
@@ -905,6 +1718,8 @@
905 "Offcore": "1" 1718 "Offcore": "1"
906 }, 1719 },
907 { 1720 {
1721 "CollectPEBSRecord": "1",
1722 "PublicDescription": "Counts the number of writeback transactions caused by L1 or L2 cache evictions that miss the L2 cache with a snoop hit in the other processor module, no data forwarding is required. Requires MSR_OFFCORE_RESP[0,1] to specify request type and response. (duplicated for both MSRs)",
908 "EventCode": "0xB7", 1723 "EventCode": "0xB7",
909 "MSRValue": "0x0400000008 ", 1724 "MSRValue": "0x0400000008 ",
910 "Counter": "0,1,2,3", 1725 "Counter": "0,1,2,3",
@@ -916,6 +1731,8 @@
916 "Offcore": "1" 1731 "Offcore": "1"
917 }, 1732 },
918 { 1733 {
1734 "CollectPEBSRecord": "1",
1735 "PublicDescription": "Counts the number of writeback transactions caused by L1 or L2 cache evictions that true miss for the L2 cache with a snoop miss in the other processor module. Requires MSR_OFFCORE_RESP[0,1] to specify request type and response. (duplicated for both MSRs)",
919 "EventCode": "0xB7", 1736 "EventCode": "0xB7",
920 "MSRValue": "0x0200000008 ", 1737 "MSRValue": "0x0200000008 ",
921 "Counter": "0,1,2,3", 1738 "Counter": "0,1,2,3",
@@ -927,6 +1744,8 @@
927 "Offcore": "1" 1744 "Offcore": "1"
928 }, 1745 },
929 { 1746 {
1747 "CollectPEBSRecord": "1",
1748 "PublicDescription": "Counts the number of writeback transactions caused by L1 or L2 cache evictions that hit the L2 cache. Requires MSR_OFFCORE_RESP[0,1] to specify request type and response. (duplicated for both MSRs)",
930 "EventCode": "0xB7", 1749 "EventCode": "0xB7",
931 "MSRValue": "0x0000040008 ", 1750 "MSRValue": "0x0000040008 ",
932 "Counter": "0,1,2,3", 1751 "Counter": "0,1,2,3",
@@ -938,6 +1757,21 @@
938 "Offcore": "1" 1757 "Offcore": "1"
939 }, 1758 },
940 { 1759 {
1760 "CollectPEBSRecord": "1",
1761 "PublicDescription": "Counts the number of writeback transactions caused by L1 or L2 cache evictions that have any transaction responses from the uncore subsystem. Requires MSR_OFFCORE_RESP[0,1] to specify request type and response. (duplicated for both MSRs)",
1762 "EventCode": "0xB7",
1763 "MSRValue": "0x0000010008 ",
1764 "Counter": "0,1,2,3",
1765 "UMask": "0x1",
1766 "EventName": "OFFCORE_RESPONSE.COREWB.ANY_RESPONSE",
1767 "MSRIndex": "0x1a6",
1768 "SampleAfterValue": "100007",
1769 "BriefDescription": "Counts the number of writeback transactions caused by L1 or L2 cache evictions that have any transaction responses from the uncore subsystem.",
1770 "Offcore": "1"
1771 },
1772 {
1773 "CollectPEBSRecord": "1",
1774 "PublicDescription": "Counts demand instruction cacheline and I-side prefetch requests that miss the instruction cache that are outstanding, per cycle, from the time of the L2 miss to when any response is received. Requires MSR_OFFCORE_RESP[0,1] to specify request type and response. (duplicated for both MSRs)",
941 "EventCode": "0xB7", 1775 "EventCode": "0xB7",
942 "MSRValue": "0x4000000004 ", 1776 "MSRValue": "0x4000000004 ",
943 "Counter": "0,1,2,3", 1777 "Counter": "0,1,2,3",
@@ -949,6 +1783,8 @@
949 "Offcore": "1" 1783 "Offcore": "1"
950 }, 1784 },
951 { 1785 {
1786 "CollectPEBSRecord": "1",
1787 "PublicDescription": "Counts demand instruction cacheline and I-side prefetch requests that miss the instruction cache that miss the L2 cache. Requires MSR_OFFCORE_RESP[0,1] to specify request type and response. (duplicated for both MSRs)",
952 "EventCode": "0xB7", 1788 "EventCode": "0xB7",
953 "MSRValue": "0x3600000004 ", 1789 "MSRValue": "0x3600000004 ",
954 "Counter": "0,1,2,3", 1790 "Counter": "0,1,2,3",
@@ -960,6 +1796,21 @@
960 "Offcore": "1" 1796 "Offcore": "1"
961 }, 1797 },
962 { 1798 {
1799 "CollectPEBSRecord": "1",
1800 "PublicDescription": "Counts demand instruction cacheline and I-side prefetch requests that miss the instruction cache that miss the L2 cache with a snoop hit in the other processor module, data forwarding is required. Requires MSR_OFFCORE_RESP[0,1] to specify request type and response. (duplicated for both MSRs)",
1801 "EventCode": "0xB7",
1802 "MSRValue": "0x1000000004 ",
1803 "Counter": "0,1,2,3",
1804 "UMask": "0x1",
1805 "EventName": "OFFCORE_RESPONSE.DEMAND_CODE_RD.L2_MISS.HITM_OTHER_CORE",
1806 "MSRIndex": "0x1a6,0x1a7",
1807 "SampleAfterValue": "100007",
1808 "BriefDescription": "Counts demand instruction cacheline and I-side prefetch requests that miss the instruction cache that miss the L2 cache with a snoop hit in the other processor module, data forwarding is required.",
1809 "Offcore": "1"
1810 },
1811 {
1812 "CollectPEBSRecord": "1",
1813 "PublicDescription": "Counts demand instruction cacheline and I-side prefetch requests that miss the instruction cache that miss the L2 cache with a snoop hit in the other processor module, no data forwarding is required. Requires MSR_OFFCORE_RESP[0,1] to specify request type and response. (duplicated for both MSRs)",
963 "EventCode": "0xB7", 1814 "EventCode": "0xB7",
964 "MSRValue": "0x0400000004 ", 1815 "MSRValue": "0x0400000004 ",
965 "Counter": "0,1,2,3", 1816 "Counter": "0,1,2,3",
@@ -971,6 +1822,8 @@
971 "Offcore": "1" 1822 "Offcore": "1"
972 }, 1823 },
973 { 1824 {
1825 "CollectPEBSRecord": "1",
1826 "PublicDescription": "Counts demand instruction cacheline and I-side prefetch requests that miss the instruction cache that true miss for the L2 cache with a snoop miss in the other processor module. Requires MSR_OFFCORE_RESP[0,1] to specify request type and response. (duplicated for both MSRs)",
974 "EventCode": "0xB7", 1827 "EventCode": "0xB7",
975 "MSRValue": "0x0200000004 ", 1828 "MSRValue": "0x0200000004 ",
976 "Counter": "0,1,2,3", 1829 "Counter": "0,1,2,3",
@@ -982,6 +1835,8 @@
982 "Offcore": "1" 1835 "Offcore": "1"
983 }, 1836 },
984 { 1837 {
1838 "CollectPEBSRecord": "1",
1839 "PublicDescription": "Counts demand instruction cacheline and I-side prefetch requests that miss the instruction cache that hit the L2 cache. Requires MSR_OFFCORE_RESP[0,1] to specify request type and response. (duplicated for both MSRs)",
985 "EventCode": "0xB7", 1840 "EventCode": "0xB7",
986 "MSRValue": "0x0000040004 ", 1841 "MSRValue": "0x0000040004 ",
987 "Counter": "0,1,2,3", 1842 "Counter": "0,1,2,3",
@@ -993,6 +1848,21 @@
993 "Offcore": "1" 1848 "Offcore": "1"
994 }, 1849 },
995 { 1850 {
1851 "CollectPEBSRecord": "1",
1852 "PublicDescription": "Counts demand instruction cacheline and I-side prefetch requests that miss the instruction cache that have any transaction responses from the uncore subsystem. Requires MSR_OFFCORE_RESP[0,1] to specify request type and response. (duplicated for both MSRs)",
1853 "EventCode": "0xB7",
1854 "MSRValue": "0x0000010004 ",
1855 "Counter": "0,1,2,3",
1856 "UMask": "0x1",
1857 "EventName": "OFFCORE_RESPONSE.DEMAND_CODE_RD.ANY_RESPONSE",
1858 "MSRIndex": "0x1a6,0x1a7",
1859 "SampleAfterValue": "100007",
1860 "BriefDescription": "Counts demand instruction cacheline and I-side prefetch requests that miss the instruction cache that have any transaction responses from the uncore subsystem.",
1861 "Offcore": "1"
1862 },
1863 {
1864 "CollectPEBSRecord": "1",
1865 "PublicDescription": "Counts demand reads for ownership (RFO) requests generated by a write to full data cache line that are outstanding, per cycle, from the time of the L2 miss to when any response is received. Requires MSR_OFFCORE_RESP[0,1] to specify request type and response. (duplicated for both MSRs)",
996 "EventCode": "0xB7", 1866 "EventCode": "0xB7",
997 "MSRValue": "0x4000000002 ", 1867 "MSRValue": "0x4000000002 ",
998 "Counter": "0,1,2,3", 1868 "Counter": "0,1,2,3",
@@ -1004,6 +1874,8 @@
1004 "Offcore": "1" 1874 "Offcore": "1"
1005 }, 1875 },
1006 { 1876 {
1877 "CollectPEBSRecord": "1",
1878 "PublicDescription": "Counts demand reads for ownership (RFO) requests generated by a write to full data cache line that miss the L2 cache. Requires MSR_OFFCORE_RESP[0,1] to specify request type and response. (duplicated for both MSRs)",
1007 "EventCode": "0xB7", 1879 "EventCode": "0xB7",
1008 "MSRValue": "0x3600000002 ", 1880 "MSRValue": "0x3600000002 ",
1009 "Counter": "0,1,2,3", 1881 "Counter": "0,1,2,3",
@@ -1015,6 +1887,8 @@
1015 "Offcore": "1" 1887 "Offcore": "1"
1016 }, 1888 },
1017 { 1889 {
1890 "CollectPEBSRecord": "1",
1891 "PublicDescription": "Counts demand reads for ownership (RFO) requests generated by a write to full data cache line that miss the L2 cache with a snoop hit in the other processor module, data forwarding is required. Requires MSR_OFFCORE_RESP[0,1] to specify request type and response. (duplicated for both MSRs)",
1018 "EventCode": "0xB7", 1892 "EventCode": "0xB7",
1019 "MSRValue": "0x1000000002 ", 1893 "MSRValue": "0x1000000002 ",
1020 "Counter": "0,1,2,3", 1894 "Counter": "0,1,2,3",
@@ -1026,6 +1900,8 @@
1026 "Offcore": "1" 1900 "Offcore": "1"
1027 }, 1901 },
1028 { 1902 {
1903 "CollectPEBSRecord": "1",
1904 "PublicDescription": "Counts demand reads for ownership (RFO) requests generated by a write to full data cache line that miss the L2 cache with a snoop hit in the other processor module, no data forwarding is required. Requires MSR_OFFCORE_RESP[0,1] to specify request type and response. (duplicated for both MSRs)",
1029 "EventCode": "0xB7", 1905 "EventCode": "0xB7",
1030 "MSRValue": "0x0400000002 ", 1906 "MSRValue": "0x0400000002 ",
1031 "Counter": "0,1,2,3", 1907 "Counter": "0,1,2,3",
@@ -1037,6 +1913,8 @@
1037 "Offcore": "1" 1913 "Offcore": "1"
1038 }, 1914 },
1039 { 1915 {
1916 "CollectPEBSRecord": "1",
1917 "PublicDescription": "Counts demand reads for ownership (RFO) requests generated by a write to full data cache line that true miss for the L2 cache with a snoop miss in the other processor module. Requires MSR_OFFCORE_RESP[0,1] to specify request type and response. (duplicated for both MSRs)",
1040 "EventCode": "0xB7", 1918 "EventCode": "0xB7",
1041 "MSRValue": "0x0200000002 ", 1919 "MSRValue": "0x0200000002 ",
1042 "Counter": "0,1,2,3", 1920 "Counter": "0,1,2,3",
@@ -1048,6 +1926,8 @@
1048 "Offcore": "1" 1926 "Offcore": "1"
1049 }, 1927 },
1050 { 1928 {
1929 "CollectPEBSRecord": "1",
1930 "PublicDescription": "Counts demand reads for ownership (RFO) requests generated by a write to full data cache line that hit the L2 cache. Requires MSR_OFFCORE_RESP[0,1] to specify request type and response. (duplicated for both MSRs)",
1051 "EventCode": "0xB7", 1931 "EventCode": "0xB7",
1052 "MSRValue": "0x0000040002 ", 1932 "MSRValue": "0x0000040002 ",
1053 "Counter": "0,1,2,3", 1933 "Counter": "0,1,2,3",
@@ -1059,6 +1939,21 @@
1059 "Offcore": "1" 1939 "Offcore": "1"
1060 }, 1940 },
1061 { 1941 {
1942 "CollectPEBSRecord": "1",
1943 "PublicDescription": "Counts demand reads for ownership (RFO) requests generated by a write to full data cache line that have any transaction responses from the uncore subsystem. Requires MSR_OFFCORE_RESP[0,1] to specify request type and response. (duplicated for both MSRs)",
1944 "EventCode": "0xB7",
1945 "MSRValue": "0x0000010002 ",
1946 "Counter": "0,1,2,3",
1947 "UMask": "0x1",
1948 "EventName": "OFFCORE_RESPONSE.DEMAND_RFO.ANY_RESPONSE",
1949 "MSRIndex": "0x1a6,0x1a7",
1950 "SampleAfterValue": "100007",
1951 "BriefDescription": "Counts demand reads for ownership (RFO) requests generated by a write to full data cache line that have any transaction responses from the uncore subsystem.",
1952 "Offcore": "1"
1953 },
1954 {
1955 "CollectPEBSRecord": "1",
1956 "PublicDescription": "Counts demand cacheable data reads of full cache lines that are outstanding, per cycle, from the time of the L2 miss to when any response is received. Requires MSR_OFFCORE_RESP[0,1] to specify request type and response. (duplicated for both MSRs)",
1062 "EventCode": "0xB7", 1957 "EventCode": "0xB7",
1063 "MSRValue": "0x4000000001 ", 1958 "MSRValue": "0x4000000001 ",
1064 "Counter": "0,1,2,3", 1959 "Counter": "0,1,2,3",
@@ -1070,6 +1965,8 @@
1070 "Offcore": "1" 1965 "Offcore": "1"
1071 }, 1966 },
1072 { 1967 {
1968 "CollectPEBSRecord": "1",
1969 "PublicDescription": "Counts demand cacheable data reads of full cache lines that miss the L2 cache. Requires MSR_OFFCORE_RESP[0,1] to specify request type and response. (duplicated for both MSRs)",
1073 "EventCode": "0xB7", 1970 "EventCode": "0xB7",
1074 "MSRValue": "0x3600000001 ", 1971 "MSRValue": "0x3600000001 ",
1075 "Counter": "0,1,2,3", 1972 "Counter": "0,1,2,3",
@@ -1081,6 +1978,8 @@
1081 "Offcore": "1" 1978 "Offcore": "1"
1082 }, 1979 },
1083 { 1980 {
1981 "CollectPEBSRecord": "1",
1982 "PublicDescription": "Counts demand cacheable data reads of full cache lines that miss the L2 cache with a snoop hit in the other processor module, data forwarding is required. Requires MSR_OFFCORE_RESP[0,1] to specify request type and response. (duplicated for both MSRs)",
1084 "EventCode": "0xB7", 1983 "EventCode": "0xB7",
1085 "MSRValue": "0x1000000001 ", 1984 "MSRValue": "0x1000000001 ",
1086 "Counter": "0,1,2,3", 1985 "Counter": "0,1,2,3",
@@ -1092,6 +1991,8 @@
1092 "Offcore": "1" 1991 "Offcore": "1"
1093 }, 1992 },
1094 { 1993 {
1994 "CollectPEBSRecord": "1",
1995 "PublicDescription": "Counts demand cacheable data reads of full cache lines that miss the L2 cache with a snoop hit in the other processor module, no data forwarding is required. Requires MSR_OFFCORE_RESP[0,1] to specify request type and response. (duplicated for both MSRs)",
1095 "EventCode": "0xB7", 1996 "EventCode": "0xB7",
1096 "MSRValue": "0x0400000001 ", 1997 "MSRValue": "0x0400000001 ",
1097 "Counter": "0,1,2,3", 1998 "Counter": "0,1,2,3",
@@ -1103,6 +2004,8 @@
1103 "Offcore": "1" 2004 "Offcore": "1"
1104 }, 2005 },
1105 { 2006 {
2007 "CollectPEBSRecord": "1",
2008 "PublicDescription": "Counts demand cacheable data reads of full cache lines that true miss for the L2 cache with a snoop miss in the other processor module. Requires MSR_OFFCORE_RESP[0,1] to specify request type and response. (duplicated for both MSRs)",
1106 "EventCode": "0xB7", 2009 "EventCode": "0xB7",
1107 "MSRValue": "0x0200000001 ", 2010 "MSRValue": "0x0200000001 ",
1108 "Counter": "0,1,2,3", 2011 "Counter": "0,1,2,3",
@@ -1114,6 +2017,8 @@
1114 "Offcore": "1" 2017 "Offcore": "1"
1115 }, 2018 },
1116 { 2019 {
2020 "CollectPEBSRecord": "1",
2021 "PublicDescription": "Counts demand cacheable data reads of full cache lines that hit the L2 cache. Requires MSR_OFFCORE_RESP[0,1] to specify request type and response. (duplicated for both MSRs)",
1117 "EventCode": "0xB7", 2022 "EventCode": "0xB7",
1118 "MSRValue": "0x0000040001 ", 2023 "MSRValue": "0x0000040001 ",
1119 "Counter": "0,1,2,3", 2024 "Counter": "0,1,2,3",
@@ -1123,5 +2028,18 @@
1123 "SampleAfterValue": "100007", 2028 "SampleAfterValue": "100007",
1124 "BriefDescription": "Counts demand cacheable data reads of full cache lines that hit the L2 cache.", 2029 "BriefDescription": "Counts demand cacheable data reads of full cache lines that hit the L2 cache.",
1125 "Offcore": "1" 2030 "Offcore": "1"
2031 },
2032 {
2033 "CollectPEBSRecord": "1",
2034 "PublicDescription": "Counts demand cacheable data reads of full cache lines that have any transaction responses from the uncore subsystem. Requires MSR_OFFCORE_RESP[0,1] to specify request type and response. (duplicated for both MSRs)",
2035 "EventCode": "0xB7",
2036 "MSRValue": "0x0000010001 ",
2037 "Counter": "0,1,2,3",
2038 "UMask": "0x1",
2039 "EventName": "OFFCORE_RESPONSE.DEMAND_DATA_RD.ANY_RESPONSE",
2040 "MSRIndex": "0x1a6,0x1a7",
2041 "SampleAfterValue": "100007",
2042 "BriefDescription": "Counts demand cacheable data reads of full cache lines that have any transaction responses from the uncore subsystem.",
2043 "Offcore": "1"
1126 } 2044 }
1127] \ No newline at end of file 2045] \ No newline at end of file
diff --git a/tools/perf/pmu-events/arch/x86/goldmont/memory.json b/tools/perf/pmu-events/arch/x86/goldmont/memory.json
index ac8b0d365a19..690cebd12a94 100644
--- a/tools/perf/pmu-events/arch/x86/goldmont/memory.json
+++ b/tools/perf/pmu-events/arch/x86/goldmont/memory.json
@@ -1,15 +1,5 @@
1[ 1[
2 { 2 {
3 "CollectPEBSRecord": "1",
4 "PublicDescription": "Counts machine clears due to memory ordering issues. This occurs when a snoop request happens and the machine is uncertain if memory ordering will be preserved - as another core is in the process of modifying the data.",
5 "EventCode": "0xC3",
6 "Counter": "0,1,2,3",
7 "UMask": "0x2",
8 "EventName": "MACHINE_CLEARS.MEMORY_ORDERING",
9 "SampleAfterValue": "200003",
10 "BriefDescription": "Machine clears due to memory ordering issue"
11 },
12 {
13 "PEBS": "2", 3 "PEBS": "2",
14 "CollectPEBSRecord": "2", 4 "CollectPEBSRecord": "2",
15 "PublicDescription": "Counts when a memory load of a uop spans a page boundary (a split) is retired.", 5 "PublicDescription": "Counts when a memory load of a uop spans a page boundary (a split) is retired.",
@@ -30,5 +20,275 @@
30 "EventName": "MISALIGN_MEM_REF.STORE_PAGE_SPLIT", 20 "EventName": "MISALIGN_MEM_REF.STORE_PAGE_SPLIT",
31 "SampleAfterValue": "200003", 21 "SampleAfterValue": "200003",
32 "BriefDescription": "Store uops that split a page (Precise event capable)" 22 "BriefDescription": "Store uops that split a page (Precise event capable)"
23 },
24 {
25 "CollectPEBSRecord": "1",
26 "PublicDescription": "Counts machine clears due to memory ordering issues. This occurs when a snoop request happens and the machine is uncertain if memory ordering will be preserved as another core is in the process of modifying the data.",
27 "EventCode": "0xC3",
28 "Counter": "0,1,2,3",
29 "UMask": "0x2",
30 "EventName": "MACHINE_CLEARS.MEMORY_ORDERING",
31 "SampleAfterValue": "200003",
32 "BriefDescription": "Machine clears due to memory ordering issue"
33 },
34 {
35 "CollectPEBSRecord": "1",
36 "PublicDescription": "Counts data read, code read, and read for ownership (RFO) requests (demand & prefetch) that miss the L2 cache and targets non-DRAM system address. Requires MSR_OFFCORE_RESP[0,1] to specify request type and response. (duplicated for both MSRs)",
37 "EventCode": "0xB7",
38 "MSRValue": "0x20000032b7 ",
39 "Counter": "0,1,2,3",
40 "UMask": "0x1",
41 "EventName": "OFFCORE_RESPONSE.ANY_READ.L2_MISS.NON_DRAM",
42 "MSRIndex": "0x1a6,0x1a7",
43 "SampleAfterValue": "100007",
44 "BriefDescription": "Counts data read, code read, and read for ownership (RFO) requests (demand & prefetch) that miss the L2 cache and targets non-DRAM system address.",
45 "Offcore": "1"
46 },
47 {
48 "CollectPEBSRecord": "1",
49 "PublicDescription": "Counts reads for ownership (RFO) requests (demand & prefetch) that miss the L2 cache and targets non-DRAM system address. Requires MSR_OFFCORE_RESP[0,1] to specify request type and response. (duplicated for both MSRs)",
50 "EventCode": "0xB7",
51 "MSRValue": "0x2000000022 ",
52 "Counter": "0,1,2,3",
53 "UMask": "0x1",
54 "EventName": "OFFCORE_RESPONSE.ANY_RFO.L2_MISS.NON_DRAM",
55 "MSRIndex": "0x1a6,0x1a7",
56 "SampleAfterValue": "100007",
57 "BriefDescription": "Counts reads for ownership (RFO) requests (demand & prefetch) that miss the L2 cache and targets non-DRAM system address.",
58 "Offcore": "1"
59 },
60 {
61 "CollectPEBSRecord": "1",
62 "PublicDescription": "Counts data reads (demand & prefetch) that miss the L2 cache and targets non-DRAM system address. Requires MSR_OFFCORE_RESP[0,1] to specify request type and response. (duplicated for both MSRs)",
63 "EventCode": "0xB7",
64 "MSRValue": "0x2000003091",
65 "Counter": "0,1,2,3",
66 "UMask": "0x1",
67 "EventName": "OFFCORE_RESPONSE.ANY_DATA_RD.L2_MISS.NON_DRAM",
68 "MSRIndex": "0x1a6,0x1a7",
69 "SampleAfterValue": "100007",
70 "BriefDescription": "Counts data reads (demand & prefetch) that miss the L2 cache and targets non-DRAM system address.",
71 "Offcore": "1"
72 },
73 {
74 "CollectPEBSRecord": "1",
75 "PublicDescription": "Counts data reads generated by L1 or L2 prefetchers that miss the L2 cache and targets non-DRAM system address. Requires MSR_OFFCORE_RESP[0,1] to specify request type and response. (duplicated for both MSRs)",
76 "EventCode": "0xB7",
77 "MSRValue": "0x2000003010 ",
78 "Counter": "0,1,2,3",
79 "UMask": "0x1",
80 "EventName": "OFFCORE_RESPONSE.ANY_PF_DATA_RD.L2_MISS.NON_DRAM",
81 "MSRIndex": "0x1a6,0x1a7",
82 "SampleAfterValue": "100007",
83 "BriefDescription": "Counts data reads generated by L1 or L2 prefetchers that miss the L2 cache and targets non-DRAM system address.",
84 "Offcore": "1"
85 },
86 {
87 "CollectPEBSRecord": "1",
88 "PublicDescription": "Counts requests to the uncore subsystem that miss the L2 cache and targets non-DRAM system address. Requires MSR_OFFCORE_RESP[0,1] to specify request type and response. (duplicated for both MSRs)",
89 "EventCode": "0xB7",
90 "MSRValue": "0x2000008000 ",
91 "Counter": "0,1,2,3",
92 "UMask": "0x1",
93 "EventName": "OFFCORE_RESPONSE.ANY_REQUEST.L2_MISS.NON_DRAM",
94 "MSRIndex": "0x1a6,0x1a7",
95 "SampleAfterValue": "100007",
96 "BriefDescription": "Counts requests to the uncore subsystem that miss the L2 cache and targets non-DRAM system address.",
97 "Offcore": "1"
98 },
99 {
100 "CollectPEBSRecord": "1",
101 "PublicDescription": "Counts any data writes to uncacheable write combining (USWC) memory region that miss the L2 cache and targets non-DRAM system address. Requires MSR_OFFCORE_RESP[0,1] to specify request type and response. (duplicated for both MSRs)",
102 "EventCode": "0xB7",
103 "MSRValue": "0x2000004800 ",
104 "Counter": "0,1,2,3",
105 "UMask": "0x1",
106 "EventName": "OFFCORE_RESPONSE.STREAMING_STORES.L2_MISS.NON_DRAM",
107 "MSRIndex": "0x1a6,0x1a7",
108 "SampleAfterValue": "100007",
109 "BriefDescription": "Counts any data writes to uncacheable write combining (USWC) memory region that miss the L2 cache and targets non-DRAM system address.",
110 "Offcore": "1"
111 },
112 {
113 "CollectPEBSRecord": "1",
114 "PublicDescription": "Counts partial cache line data writes to uncacheable write combining (USWC) memory region that miss the L2 cache and targets non-DRAM system address. Requires MSR_OFFCORE_RESP[0,1] to specify request type and response. (duplicated for both MSRs)",
115 "EventCode": "0xB7",
116 "MSRValue": "0x2000004000 ",
117 "Counter": "0,1,2,3",
118 "UMask": "0x1",
119 "EventName": "OFFCORE_RESPONSE.PARTIAL_STREAMING_STORES.L2_MISS.NON_DRAM",
120 "MSRIndex": "0x1a6,0x1a7",
121 "SampleAfterValue": "100007",
122 "BriefDescription": "Counts partial cache line data writes to uncacheable write combining (USWC) memory region that miss the L2 cache and targets non-DRAM system address.",
123 "Offcore": "1"
124 },
125 {
126 "CollectPEBSRecord": "1",
127 "PublicDescription": "Counts data cache line reads generated by hardware L1 data cache prefetcher that miss the L2 cache and targets non-DRAM system address. Requires MSR_OFFCORE_RESP[0,1] to specify request type and response. (duplicated for both MSRs)",
128 "EventCode": "0xB7",
129 "MSRValue": "0x2000002000 ",
130 "Counter": "0,1,2,3",
131 "UMask": "0x1",
132 "EventName": "OFFCORE_RESPONSE.PF_L1_DATA_RD.L2_MISS.NON_DRAM",
133 "MSRIndex": "0x1a6,0x1a7",
134 "SampleAfterValue": "100007",
135 "BriefDescription": "Counts data cache line reads generated by hardware L1 data cache prefetcher that miss the L2 cache and targets non-DRAM system address.",
136 "Offcore": "1"
137 },
138 {
139 "CollectPEBSRecord": "1",
140 "PublicDescription": "Counts data cache lines requests by software prefetch instructions that miss the L2 cache and targets non-DRAM system address. Requires MSR_OFFCORE_RESP[0,1] to specify request type and response. (duplicated for both MSRs)",
141 "EventCode": "0xB7",
142 "MSRValue": "0x2000001000 ",
143 "Counter": "0,1,2,3",
144 "UMask": "0x1",
145 "EventName": "OFFCORE_RESPONSE.SW_PREFETCH.L2_MISS.NON_DRAM",
146 "MSRIndex": "0x1a6,0x1a7",
147 "SampleAfterValue": "100007",
148 "BriefDescription": "Counts data cache lines requests by software prefetch instructions that miss the L2 cache and targets non-DRAM system address.",
149 "Offcore": "1"
150 },
151 {
152 "CollectPEBSRecord": "1",
153 "PublicDescription": "Counts full cache line data writes to uncacheable write combining (USWC) memory region and full cache-line non-temporal writes that miss the L2 cache and targets non-DRAM system address. Requires MSR_OFFCORE_RESP[0,1] to specify request type and response. (duplicated for both MSRs)",
154 "EventCode": "0xB7",
155 "MSRValue": "0x2000000800 ",
156 "Counter": "0,1,2,3",
157 "UMask": "0x1",
158 "EventName": "OFFCORE_RESPONSE.FULL_STREAMING_STORES.L2_MISS.NON_DRAM",
159 "MSRIndex": "0x1a6,0x1a7",
160 "SampleAfterValue": "100007",
161 "BriefDescription": "Counts full cache line data writes to uncacheable write combining (USWC) memory region and full cache-line non-temporal writes that miss the L2 cache and targets non-DRAM system address.",
162 "Offcore": "1"
163 },
164 {
165 "CollectPEBSRecord": "1",
166 "PublicDescription": "Counts bus lock and split lock requests that miss the L2 cache and targets non-DRAM system address. Requires MSR_OFFCORE_RESP[0,1] to specify request type and response. (duplicated for both MSRs)",
167 "EventCode": "0xB7",
168 "MSRValue": "0x2000000400 ",
169 "Counter": "0,1,2,3",
170 "UMask": "0x1",
171 "EventName": "OFFCORE_RESPONSE.BUS_LOCKS.L2_MISS.NON_DRAM",
172 "MSRIndex": "0x1a6,0x1a7",
173 "SampleAfterValue": "100007",
174 "BriefDescription": "Counts bus lock and split lock requests that miss the L2 cache and targets non-DRAM system address.",
175 "Offcore": "1"
176 },
177 {
178 "CollectPEBSRecord": "1",
179 "PublicDescription": "Counts code reads in uncacheable (UC) memory region that miss the L2 cache and targets non-DRAM system address. Requires MSR_OFFCORE_RESP[0,1] to specify request type and response. (duplicated for both MSRs)",
180 "EventCode": "0xB7",
181 "MSRValue": "0x2000000200 ",
182 "Counter": "0,1,2,3",
183 "UMask": "0x1",
184 "EventName": "OFFCORE_RESPONSE.UC_CODE_RD.L2_MISS.NON_DRAM",
185 "MSRIndex": "0x1a6,0x1a7",
186 "SampleAfterValue": "100007",
187 "BriefDescription": "Counts code reads in uncacheable (UC) memory region that miss the L2 cache and targets non-DRAM system address.",
188 "Offcore": "1"
189 },
190 {
191 "CollectPEBSRecord": "1",
192 "PublicDescription": "Counts the number of demand write requests (RFO) generated by a write to partial data cache line, including the writes to uncacheable (UC) and write through (WT), and write protected (WP) types of memory that miss the L2 cache and targets non-DRAM system address. Requires MSR_OFFCORE_RESP[0,1] to specify request type and response. (duplicated for both MSRs)",
193 "EventCode": "0xB7",
194 "MSRValue": "0x2000000100 ",
195 "Counter": "0,1,2,3",
196 "UMask": "0x1",
197 "EventName": "OFFCORE_RESPONSE.PARTIAL_WRITES.L2_MISS.NON_DRAM",
198 "MSRIndex": "0x1a6,0x1a7",
199 "SampleAfterValue": "100007",
200 "BriefDescription": "Counts the number of demand write requests (RFO) generated by a write to partial data cache line, including the writes to uncacheable (UC) and write through (WT), and write protected (WP) types of memory that miss the L2 cache and targets non-DRAM system address.",
201 "Offcore": "1"
202 },
203 {
204 "CollectPEBSRecord": "1",
205 "PublicDescription": "Counts demand data partial reads, including data in uncacheable (UC) or uncacheable write combining (USWC) memory types that miss the L2 cache and targets non-DRAM system address. Requires MSR_OFFCORE_RESP[0,1] to specify request type and response. (duplicated for both MSRs)",
206 "EventCode": "0xB7",
207 "MSRValue": "0x2000000080 ",
208 "Counter": "0,1,2,3",
209 "UMask": "0x1",
210 "EventName": "OFFCORE_RESPONSE.PARTIAL_READS.L2_MISS.NON_DRAM",
211 "MSRIndex": "0x1a6,0x1a7",
212 "SampleAfterValue": "100007",
213 "BriefDescription": "Counts demand data partial reads, including data in uncacheable (UC) or uncacheable write combining (USWC) memory types that miss the L2 cache and targets non-DRAM system address.",
214 "Offcore": "1"
215 },
216 {
217 "CollectPEBSRecord": "1",
218 "PublicDescription": "Counts reads for ownership (RFO) requests generated by L2 prefetcher that miss the L2 cache and targets non-DRAM system address. Requires MSR_OFFCORE_RESP[0,1] to specify request type and response. (duplicated for both MSRs)",
219 "EventCode": "0xB7",
220 "MSRValue": "0x2000000020 ",
221 "Counter": "0,1,2,3",
222 "UMask": "0x1",
223 "EventName": "OFFCORE_RESPONSE.PF_L2_RFO.L2_MISS.NON_DRAM",
224 "MSRIndex": "0x1a6,0x1a7",
225 "SampleAfterValue": "100007",
226 "BriefDescription": "Counts reads for ownership (RFO) requests generated by L2 prefetcher that miss the L2 cache and targets non-DRAM system address.",
227 "Offcore": "1"
228 },
229 {
230 "CollectPEBSRecord": "1",
231 "PublicDescription": "Counts data cacheline reads generated by hardware L2 cache prefetcher that miss the L2 cache and targets non-DRAM system address. Requires MSR_OFFCORE_RESP[0,1] to specify request type and response. (duplicated for both MSRs)",
232 "EventCode": "0xB7",
233 "MSRValue": "0x2000000010 ",
234 "Counter": "0,1,2,3",
235 "UMask": "0x1",
236 "EventName": "OFFCORE_RESPONSE.PF_L2_DATA_RD.L2_MISS.NON_DRAM",
237 "MSRIndex": "0x1a6,0x1a7",
238 "SampleAfterValue": "100007",
239 "BriefDescription": "Counts data cacheline reads generated by hardware L2 cache prefetcher that miss the L2 cache and targets non-DRAM system address.",
240 "Offcore": "1"
241 },
242 {
243 "CollectPEBSRecord": "1",
244 "PublicDescription": "Counts the number of writeback transactions caused by L1 or L2 cache evictions that miss the L2 cache and targets non-DRAM system address. Requires MSR_OFFCORE_RESP[0,1] to specify request type and response. (duplicated for both MSRs)",
245 "EventCode": "0xB7",
246 "MSRValue": "0x2000000008 ",
247 "Counter": "0,1,2,3",
248 "UMask": "0x1",
249 "EventName": "OFFCORE_RESPONSE.COREWB.L2_MISS.NON_DRAM",
250 "MSRIndex": "0x1a6",
251 "SampleAfterValue": "100007",
252 "BriefDescription": "Counts the number of writeback transactions caused by L1 or L2 cache evictions that miss the L2 cache and targets non-DRAM system address.",
253 "Offcore": "1"
254 },
255 {
256 "CollectPEBSRecord": "1",
257 "PublicDescription": "Counts demand instruction cacheline and I-side prefetch requests that miss the instruction cache that miss the L2 cache and targets non-DRAM system address. Requires MSR_OFFCORE_RESP[0,1] to specify request type and response. (duplicated for both MSRs)",
258 "EventCode": "0xB7",
259 "MSRValue": "0x2000000004 ",
260 "Counter": "0,1,2,3",
261 "UMask": "0x1",
262 "EventName": "OFFCORE_RESPONSE.DEMAND_CODE_RD.L2_MISS.NON_DRAM",
263 "MSRIndex": "0x1a6,0x1a7",
264 "SampleAfterValue": "100007",
265 "BriefDescription": "Counts demand instruction cacheline and I-side prefetch requests that miss the instruction cache that miss the L2 cache and targets non-DRAM system address.",
266 "Offcore": "1"
267 },
268 {
269 "CollectPEBSRecord": "1",
270 "PublicDescription": "Counts demand reads for ownership (RFO) requests generated by a write to full data cache line that miss the L2 cache and targets non-DRAM system address. Requires MSR_OFFCORE_RESP[0,1] to specify request type and response. (duplicated for both MSRs)",
271 "EventCode": "0xB7",
272 "MSRValue": "0x2000000002 ",
273 "Counter": "0,1,2,3",
274 "UMask": "0x1",
275 "EventName": "OFFCORE_RESPONSE.DEMAND_RFO.L2_MISS.NON_DRAM",
276 "MSRIndex": "0x1a6,0x1a7",
277 "SampleAfterValue": "100007",
278 "BriefDescription": "Counts demand reads for ownership (RFO) requests generated by a write to full data cache line that miss the L2 cache and targets non-DRAM system address.",
279 "Offcore": "1"
280 },
281 {
282 "CollectPEBSRecord": "1",
283 "PublicDescription": "Counts demand cacheable data reads of full cache lines that miss the L2 cache and targets non-DRAM system address. Requires MSR_OFFCORE_RESP[0,1] to specify request type and response. (duplicated for both MSRs)",
284 "EventCode": "0xB7",
285 "MSRValue": "0x2000000001 ",
286 "Counter": "0,1,2,3",
287 "UMask": "0x1",
288 "EventName": "OFFCORE_RESPONSE.DEMAND_DATA_RD.L2_MISS.NON_DRAM",
289 "MSRIndex": "0x1a6,0x1a7",
290 "SampleAfterValue": "100007",
291 "BriefDescription": "Counts demand cacheable data reads of full cache lines that miss the L2 cache and targets non-DRAM system address.",
292 "Offcore": "1"
33 } 293 }
34] \ No newline at end of file 294] \ No newline at end of file
diff --git a/tools/perf/pmu-events/arch/x86/goldmont/other.json b/tools/perf/pmu-events/arch/x86/goldmont/other.json
index df25ca9542f1..959cadd7cb0e 100644
--- a/tools/perf/pmu-events/arch/x86/goldmont/other.json
+++ b/tools/perf/pmu-events/arch/x86/goldmont/other.json
@@ -1,23 +1,23 @@
1[ 1[
2 { 2 {
3 "CollectPEBSRecord": "1", 3 "CollectPEBSRecord": "1",
4 "PublicDescription": "Counts the number of issue slots per core cycle that were not consumed because of a full resource in the backend. Including but not limited to resources such as the Re-order Buffer (ROB), reservation stations (RS), load/store buffers, physical registers, or any other needed machine resource that is currently unavailable. Note that uops must be available for consumption in order for this event to fire. If a uop is not available (Instruction Queue is empty), this event will not count.", 4 "PublicDescription": "Counts cycles that fetch is stalled due to any reason. That is, the decoder queue is able to accept bytes, but the fetch unit is unable to provide bytes. This will include cycles due to an ITLB miss, ICache miss and other events.",
5 "EventCode": "0xCA", 5 "EventCode": "0x86",
6 "Counter": "0,1,2,3", 6 "Counter": "0,1,2,3",
7 "UMask": "0x1", 7 "UMask": "0x0",
8 "EventName": "ISSUE_SLOTS_NOT_CONSUMED.RESOURCE_FULL", 8 "EventName": "FETCH_STALL.ALL",
9 "SampleAfterValue": "200003", 9 "SampleAfterValue": "200003",
10 "BriefDescription": "Unfilled issue slots per cycle because of a full resource in the backend" 10 "BriefDescription": "Cycles code-fetch stalled due to any reason."
11 }, 11 },
12 { 12 {
13 "CollectPEBSRecord": "1", 13 "CollectPEBSRecord": "1",
14 "PublicDescription": "Counts the number of issue slots per core cycle that were not consumed by the backend because allocation is stalled waiting for a mispredicted jump to retire or other branch-like conditions (e.g. the event is relevant during certain microcode flows). Counts all issue slots blocked while within this window including slots where uops were not available in the Instruction Queue.", 14 "PublicDescription": "Counts cycles that fetch is stalled due to an outstanding ITLB miss. That is, the decoder queue is able to accept bytes, but the fetch unit is unable to provide bytes due to an ITLB miss. Note: this event is not the same as page walk cycles to retrieve an instruction translation.",
15 "EventCode": "0xCA", 15 "EventCode": "0x86",
16 "Counter": "0,1,2,3", 16 "Counter": "0,1,2,3",
17 "UMask": "0x2", 17 "UMask": "0x1",
18 "EventName": "ISSUE_SLOTS_NOT_CONSUMED.RECOVERY", 18 "EventName": "FETCH_STALL.ITLB_FILL_PENDING_CYCLES",
19 "SampleAfterValue": "200003", 19 "SampleAfterValue": "200003",
20 "BriefDescription": "Unfilled issue slots per cycle to recover" 20 "BriefDescription": "Cycles code-fetch stalled due to an outstanding ITLB miss."
21 }, 21 },
22 { 22 {
23 "CollectPEBSRecord": "1", 23 "CollectPEBSRecord": "1",
@@ -30,14 +30,44 @@
30 "BriefDescription": "Unfilled issue slots per cycle" 30 "BriefDescription": "Unfilled issue slots per cycle"
31 }, 31 },
32 { 32 {
33 "CollectPEBSRecord": "1",
34 "PublicDescription": "Counts the number of issue slots per core cycle that were not consumed because of a full resource in the backend. Including but not limited to resources such as the Re-order Buffer (ROB), reservation stations (RS), load/store buffers, physical registers, or any other needed machine resource that is currently unavailable. Note that uops must be available for consumption in order for this event to fire. If a uop is not available (Instruction Queue is empty), this event will not count.",
35 "EventCode": "0xCA",
36 "Counter": "0,1,2,3",
37 "UMask": "0x1",
38 "EventName": "ISSUE_SLOTS_NOT_CONSUMED.RESOURCE_FULL",
39 "SampleAfterValue": "200003",
40 "BriefDescription": "Unfilled issue slots per cycle because of a full resource in the backend"
41 },
42 {
43 "CollectPEBSRecord": "1",
44 "PublicDescription": "Counts the number of issue slots per core cycle that were not consumed by the backend because allocation is stalled waiting for a mispredicted jump to retire or other branch-like conditions (e.g. the event is relevant during certain microcode flows). Counts all issue slots blocked while within this window including slots where uops were not available in the Instruction Queue.",
45 "EventCode": "0xCA",
46 "Counter": "0,1,2,3",
47 "UMask": "0x2",
48 "EventName": "ISSUE_SLOTS_NOT_CONSUMED.RECOVERY",
49 "SampleAfterValue": "200003",
50 "BriefDescription": "Unfilled issue slots per cycle to recover"
51 },
52 {
33 "CollectPEBSRecord": "2", 53 "CollectPEBSRecord": "2",
34 "PublicDescription": "Counts hardware interrupts received by the processor.", 54 "PublicDescription": "Counts hardware interrupts received by the processor.",
35 "EventCode": "0xCB", 55 "EventCode": "0xCB",
36 "Counter": "0,1,2,3", 56 "Counter": "0,1,2,3",
37 "UMask": "0x1", 57 "UMask": "0x1",
38 "EventName": "HW_INTERRUPTS.RECEIVED", 58 "EventName": "HW_INTERRUPTS.RECEIVED",
59 "SampleAfterValue": "203",
60 "BriefDescription": "Hardware interrupts received"
61 },
62 {
63 "CollectPEBSRecord": "2",
64 "PublicDescription": "Counts the number of core cycles during which interrupts are masked (disabled). Increments by 1 each core cycle that EFLAGS.IF is 0, regardless of whether interrupts are pending or not.",
65 "EventCode": "0xCB",
66 "Counter": "0,1,2,3",
67 "UMask": "0x2",
68 "EventName": "HW_INTERRUPTS.MASKED",
39 "SampleAfterValue": "200003", 69 "SampleAfterValue": "200003",
40 "BriefDescription": "Hardware interrupts received (Precise event capable)" 70 "BriefDescription": "Cycles hardware interrupts are masked"
41 }, 71 },
42 { 72 {
43 "CollectPEBSRecord": "2", 73 "CollectPEBSRecord": "2",
@@ -47,6 +77,6 @@
47 "UMask": "0x4", 77 "UMask": "0x4",
48 "EventName": "HW_INTERRUPTS.PENDING_AND_MASKED", 78 "EventName": "HW_INTERRUPTS.PENDING_AND_MASKED",
49 "SampleAfterValue": "200003", 79 "SampleAfterValue": "200003",
50 "BriefDescription": "Cycles pending interrupts are masked (Precise event capable)" 80 "BriefDescription": "Cycles pending interrupts are masked"
51 } 81 }
52] \ No newline at end of file 82] \ No newline at end of file
diff --git a/tools/perf/pmu-events/arch/x86/goldmont/pipeline.json b/tools/perf/pmu-events/arch/x86/goldmont/pipeline.json
index 07f00041f56f..254788af8ab6 100644
--- a/tools/perf/pmu-events/arch/x86/goldmont/pipeline.json
+++ b/tools/perf/pmu-events/arch/x86/goldmont/pipeline.json
@@ -1,168 +1,136 @@
1[ 1[
2 { 2 {
3 "PEBS": "2", 3 "PublicDescription": "Counts the number of instructions that retire execution. For instructions that consist of multiple uops, this event counts the retirement of the last uop of the instruction. The counter continues counting during hardware interrupts, traps, and inside interrupt handlers. This event uses fixed counter 0. You cannot collect a PEBs record for this event.",
4 "CollectPEBSRecord": "2", 4 "EventCode": "0x00",
5 "PublicDescription": "Counts branch instructions retired for all branch types. This is an architectural performance event.", 5 "Counter": "Fixed counter 0",
6 "EventCode": "0xC4", 6 "UMask": "0x1",
7 "Counter": "0,1,2,3", 7 "EventName": "INST_RETIRED.ANY",
8 "UMask": "0x0", 8 "SampleAfterValue": "2000003",
9 "EventName": "BR_INST_RETIRED.ALL_BRANCHES", 9 "BriefDescription": "Instructions retired (Fixed event)"
10 "SampleAfterValue": "200003",
11 "BriefDescription": "Retired branch instructions (Precise event capable)"
12 },
13 {
14 "PEBS": "2",
15 "CollectPEBSRecord": "2",
16 "PublicDescription": "Counts retired Jcc (Jump on Conditional Code/Jump if Condition is Met) branch instructions retired, including both when the branch was taken and when it was not taken.",
17 "EventCode": "0xC4",
18 "Counter": "0,1,2,3",
19 "UMask": "0x7e",
20 "EventName": "BR_INST_RETIRED.JCC",
21 "SampleAfterValue": "200003",
22 "BriefDescription": "Retired conditional branch instructions (Precise event capable)"
23 }, 10 },
24 { 11 {
25 "PEBS": "2", 12 "PublicDescription": "Counts the number of core cycles while the core is not in a halt state. The core enters the halt state when it is running the HLT instruction. In mobile systems the core frequency may change from time to time. For this reason this event may have a changing ratio with regards to time. This event uses fixed counter 1. You cannot collect a PEBs record for this event.",
26 "CollectPEBSRecord": "2", 13 "EventCode": "0x00",
27 "PublicDescription": "Counts Jcc (Jump on Conditional Code/Jump if Condition is Met) branch instructions retired that were taken and does not count when the Jcc branch instruction were not taken.", 14 "Counter": "Fixed counter 1",
28 "EventCode": "0xC4", 15 "UMask": "0x2",
29 "Counter": "0,1,2,3", 16 "EventName": "CPU_CLK_UNHALTED.CORE",
30 "UMask": "0xfe", 17 "SampleAfterValue": "2000003",
31 "EventName": "BR_INST_RETIRED.TAKEN_JCC", 18 "BriefDescription": "Core cycles when core is not halted (Fixed event)"
32 "SampleAfterValue": "200003",
33 "BriefDescription": "Retired conditional branch instructions that were taken (Precise event capable)"
34 }, 19 },
35 { 20 {
36 "PEBS": "2", 21 "PublicDescription": "Counts the number of reference cycles that the core is not in a halt state. The core enters the halt state when it is running the HLT instruction. In mobile systems the core frequency may change from time. This event is not affected by core frequency changes but counts as if the core is running at the maximum frequency all the time. This event uses fixed counter 2. You cannot collect a PEBs record for this event.",
37 "CollectPEBSRecord": "2", 22 "EventCode": "0x00",
38 "PublicDescription": "Counts near CALL branch instructions retired.", 23 "Counter": "Fixed counter 2",
39 "EventCode": "0xC4", 24 "UMask": "0x3",
40 "Counter": "0,1,2,3", 25 "EventName": "CPU_CLK_UNHALTED.REF_TSC",
41 "UMask": "0xf9", 26 "SampleAfterValue": "2000003",
42 "EventName": "BR_INST_RETIRED.CALL", 27 "BriefDescription": "Reference cycles when core is not halted (Fixed event)"
43 "SampleAfterValue": "200003",
44 "BriefDescription": "Retired near call instructions (Precise event capable)"
45 }, 28 },
46 { 29 {
47 "PEBS": "2", 30 "PEBS": "2",
48 "CollectPEBSRecord": "2", 31 "CollectPEBSRecord": "2",
49 "PublicDescription": "Counts near relative CALL branch instructions retired.", 32 "PublicDescription": "Counts a load blocked from using a store forward, but did not occur because the store data was not available at the right time. The forward might occur subsequently when the data is available.",
50 "EventCode": "0xC4", 33 "EventCode": "0x03",
51 "Counter": "0,1,2,3", 34 "Counter": "0,1,2,3",
52 "UMask": "0xfd", 35 "UMask": "0x1",
53 "EventName": "BR_INST_RETIRED.REL_CALL", 36 "EventName": "LD_BLOCKS.DATA_UNKNOWN",
54 "SampleAfterValue": "200003", 37 "SampleAfterValue": "200003",
55 "BriefDescription": "Retired near relative call instructions (Precise event capable)" 38 "BriefDescription": "Loads blocked due to store data not ready (Precise event capable)"
56 }, 39 },
57 { 40 {
58 "PEBS": "2", 41 "PEBS": "2",
59 "CollectPEBSRecord": "2", 42 "CollectPEBSRecord": "2",
60 "PublicDescription": "Counts near indirect CALL branch instructions retired.", 43 "PublicDescription": "Counts a load blocked from using a store forward because of an address/size mismatch, only one of the loads blocked from each store will be counted.",
61 "EventCode": "0xC4", 44 "EventCode": "0x03",
62 "Counter": "0,1,2,3", 45 "Counter": "0,1,2,3",
63 "UMask": "0xfb", 46 "UMask": "0x2",
64 "EventName": "BR_INST_RETIRED.IND_CALL", 47 "EventName": "LD_BLOCKS.STORE_FORWARD",
65 "SampleAfterValue": "200003", 48 "SampleAfterValue": "200003",
66 "BriefDescription": "Retired near indirect call instructions (Precise event capable)" 49 "BriefDescription": "Loads blocked due to store forward restriction (Precise event capable)"
67 }, 50 },
68 { 51 {
69 "PEBS": "2", 52 "PEBS": "2",
70 "CollectPEBSRecord": "2", 53 "CollectPEBSRecord": "2",
71 "PublicDescription": "Counts near return branch instructions retired.", 54 "PublicDescription": "Counts loads that block because their address modulo 4K matches a pending store.",
72 "EventCode": "0xC4", 55 "EventCode": "0x03",
73 "Counter": "0,1,2,3", 56 "Counter": "0,1,2,3",
74 "UMask": "0xf7", 57 "UMask": "0x4",
75 "EventName": "BR_INST_RETIRED.RETURN", 58 "EventName": "LD_BLOCKS.4K_ALIAS",
76 "SampleAfterValue": "200003", 59 "SampleAfterValue": "200003",
77 "BriefDescription": "Retired near return instructions (Precise event capable)" 60 "BriefDescription": "Loads blocked because address has 4k partial address false dependence (Precise event capable)"
78 }, 61 },
79 { 62 {
80 "PEBS": "2", 63 "PEBS": "2",
81 "CollectPEBSRecord": "2", 64 "CollectPEBSRecord": "2",
82 "PublicDescription": "Counts near indirect call or near indirect jmp branch instructions retired.", 65 "PublicDescription": "Counts loads blocked because they are unable to find their physical address in the micro TLB (UTLB).",
83 "EventCode": "0xC4", 66 "EventCode": "0x03",
84 "Counter": "0,1,2,3", 67 "Counter": "0,1,2,3",
85 "UMask": "0xeb", 68 "UMask": "0x8",
86 "EventName": "BR_INST_RETIRED.NON_RETURN_IND", 69 "EventName": "LD_BLOCKS.UTLB_MISS",
87 "SampleAfterValue": "200003", 70 "SampleAfterValue": "200003",
88 "BriefDescription": "Retired instructions of near indirect Jmp or call (Precise event capable)" 71 "BriefDescription": "Loads blocked because address in not in the UTLB (Precise event capable)"
89 }, 72 },
90 { 73 {
91 "PEBS": "2", 74 "PEBS": "2",
92 "CollectPEBSRecord": "2", 75 "CollectPEBSRecord": "2",
93 "PublicDescription": "Counts far branch instructions retired. This includes far jump, far call and return, and Interrupt call and return.", 76 "PublicDescription": "Counts anytime a load that retires is blocked for any reason.",
94 "EventCode": "0xC4", 77 "EventCode": "0x03",
95 "Counter": "0,1,2,3", 78 "Counter": "0,1,2,3",
96 "UMask": "0xbf", 79 "UMask": "0x10",
97 "EventName": "BR_INST_RETIRED.FAR_BRANCH", 80 "EventName": "LD_BLOCKS.ALL_BLOCK",
98 "SampleAfterValue": "200003", 81 "SampleAfterValue": "200003",
99 "BriefDescription": "Retired far branch instructions (Precise event capable)" 82 "BriefDescription": "Loads blocked (Precise event capable)"
100 }, 83 },
101 { 84 {
102 "PEBS": "2", 85 "CollectPEBSRecord": "1",
103 "CollectPEBSRecord": "2", 86 "PublicDescription": "Counts uops issued by the front end and allocated into the back end of the machine. This event counts uops that retire as well as uops that were speculatively executed but didn't retire. The sort of speculative uops that might be counted includes, but is not limited to those uops issued in the shadow of a miss-predicted branch, those uops that are inserted during an assist (such as for a denormal floating point result), and (previously allocated) uops that might be canceled during a machine clear.",
104 "PublicDescription": "Counts mispredicted branch instructions retired including all branch types.", 87 "EventCode": "0x0E",
105 "EventCode": "0xC5",
106 "Counter": "0,1,2,3", 88 "Counter": "0,1,2,3",
107 "UMask": "0x0", 89 "UMask": "0x0",
108 "EventName": "BR_MISP_RETIRED.ALL_BRANCHES", 90 "EventName": "UOPS_ISSUED.ANY",
109 "SampleAfterValue": "200003",
110 "BriefDescription": "Retired mispredicted branch instructions (Precise event capable)"
111 },
112 {
113 "PEBS": "2",
114 "CollectPEBSRecord": "2",
115 "PublicDescription": "Counts mispredicted retired Jcc (Jump on Conditional Code/Jump if Condition is Met) branch instructions retired, including both when the branch was supposed to be taken and when it was not supposed to be taken (but the processor predicted the opposite condition).",
116 "EventCode": "0xC5",
117 "Counter": "0,1,2,3",
118 "UMask": "0x7e",
119 "EventName": "BR_MISP_RETIRED.JCC",
120 "SampleAfterValue": "200003", 91 "SampleAfterValue": "200003",
121 "BriefDescription": "Retired mispredicted conditional branch instructions (Precise event capable)" 92 "BriefDescription": "Uops issued to the back end per cycle"
122 }, 93 },
123 { 94 {
124 "PEBS": "2", 95 "CollectPEBSRecord": "1",
125 "CollectPEBSRecord": "2", 96 "PublicDescription": "Core cycles when core is not halted. This event uses a (_P)rogrammable general purpose performance counter.",
126 "PublicDescription": "Counts mispredicted retired Jcc (Jump on Conditional Code/Jump if Condition is Met) branch instructions retired that were supposed to be taken but the processor predicted that it would not be taken.", 97 "EventCode": "0x3C",
127 "EventCode": "0xC5",
128 "Counter": "0,1,2,3", 98 "Counter": "0,1,2,3",
129 "UMask": "0xfe", 99 "UMask": "0x0",
130 "EventName": "BR_MISP_RETIRED.TAKEN_JCC", 100 "EventName": "CPU_CLK_UNHALTED.CORE_P",
131 "SampleAfterValue": "200003", 101 "SampleAfterValue": "2000003",
132 "BriefDescription": "Retired mispredicted conditional branch instructions that were taken (Precise event capable)" 102 "BriefDescription": "Core cycles when core is not halted"
133 }, 103 },
134 { 104 {
135 "PEBS": "2", 105 "CollectPEBSRecord": "1",
136 "CollectPEBSRecord": "2", 106 "PublicDescription": "Reference cycles when core is not halted. This event uses a programmable general purpose performance counter.",
137 "PublicDescription": "Counts mispredicted near indirect CALL branch instructions retired, where the target address taken was not what the processor predicted.", 107 "EventCode": "0x3C",
138 "EventCode": "0xC5",
139 "Counter": "0,1,2,3", 108 "Counter": "0,1,2,3",
140 "UMask": "0xfb", 109 "UMask": "0x1",
141 "EventName": "BR_MISP_RETIRED.IND_CALL", 110 "EventName": "CPU_CLK_UNHALTED.REF",
142 "SampleAfterValue": "200003", 111 "SampleAfterValue": "2000003",
143 "BriefDescription": "Retired mispredicted near indirect call instructions (Precise event capable)" 112 "BriefDescription": "Reference cycles when core is not halted"
144 }, 113 },
145 { 114 {
146 "PEBS": "2", 115 "CollectPEBSRecord": "1",
147 "CollectPEBSRecord": "2", 116 "PublicDescription": "This event used to measure front-end inefficiencies. I.e. when front-end of the machine is not delivering uops to the back-end and the back-end has is not stalled. This event can be used to identify if the machine is truly front-end bound. When this event occurs, it is an indication that the front-end of the machine is operating at less than its theoretical peak performance. Background: We can think of the processor pipeline as being divided into 2 broader parts: Front-end and Back-end. Front-end is responsible for fetching the instruction, decoding into uops in machine understandable format and putting them into a uop queue to be consumed by back end. The back-end then takes these uops, allocates the required resources. When all resources are ready, uops are executed. If the back-end is not ready to accept uops from the front-end, then we do not want to count these as front-end bottlenecks. However, whenever we have bottlenecks in the back-end, we will have allocation unit stalls and eventually forcing the front-end to wait until the back-end is ready to receive more uops. This event counts only when back-end is requesting more uops and front-end is not able to provide them. When 3 uops are requested and no uops are delivered, the event counts 3. When 3 are requested, and only 1 is delivered, the event counts 2. When only 2 are delivered, the event counts 1. Alternatively stated, the event will not count if 3 uops are delivered, or if the back end is stalled and not requesting any uops at all. Counts indicate missed opportunities for the front-end to deliver a uop to the back end. Some examples of conditions that cause front-end efficiencies are: ICache misses, ITLB misses, and decoder restrictions that limit the front-end bandwidth. Known Issues: Some uops require multiple allocation slots. These uops will not be charged as a front end 'not delivered' opportunity, and will be regarded as a back end problem. For example, the INC instruction has one uop that requires 2 issue slots. A stream of INC instructions will not count as UOPS_NOT_DELIVERED, even though only one instruction can be issued per clock. The low uop issue rate for a stream of INC instructions is considered to be a back end issue.",
148 "PublicDescription": "Counts mispredicted near RET branch instructions retired, where the return address taken was not what the processor predicted.", 117 "EventCode": "0x9C",
149 "EventCode": "0xC5",
150 "Counter": "0,1,2,3", 118 "Counter": "0,1,2,3",
151 "UMask": "0xf7", 119 "UMask": "0x0",
152 "EventName": "BR_MISP_RETIRED.RETURN", 120 "EventName": "UOPS_NOT_DELIVERED.ANY",
153 "SampleAfterValue": "200003", 121 "SampleAfterValue": "200003",
154 "BriefDescription": "Retired mispredicted near return instructions (Precise event capable)" 122 "BriefDescription": "Uops requested but not-delivered to the back-end per cycle"
155 }, 123 },
156 { 124 {
157 "PEBS": "2", 125 "PEBS": "2",
158 "CollectPEBSRecord": "2", 126 "CollectPEBSRecord": "1",
159 "PublicDescription": "Counts mispredicted branch instructions retired that were near indirect call or near indirect jmp, where the target address taken was not what the processor predicted.", 127 "PublicDescription": "Counts the number of instructions that retire execution. For instructions that consist of multiple uops, this event counts the retirement of the last uop of the instruction. The event continues counting during hardware interrupts, traps, and inside interrupt handlers. This is an architectural performance event. This event uses a (_P)rogrammable general purpose performance counter. *This event is Precise Event capable: The EventingRIP field in the PEBS record is precise to the address of the instruction which caused the event. Note: Because PEBS records can be collected only on IA32_PMC0, only one event can use the PEBS facility at a time.",
160 "EventCode": "0xC5", 128 "EventCode": "0xC0",
161 "Counter": "0,1,2,3", 129 "Counter": "0,1,2,3",
162 "UMask": "0xeb", 130 "UMask": "0x0",
163 "EventName": "BR_MISP_RETIRED.NON_RETURN_IND", 131 "EventName": "INST_RETIRED.ANY_P",
164 "SampleAfterValue": "200003", 132 "SampleAfterValue": "2000003",
165 "BriefDescription": "Retired mispredicted instructions of near indirect Jmp or near indirect call. (Precise event capable)" 133 "BriefDescription": "Instructions retired (Precise event capable)"
166 }, 134 },
167 { 135 {
168 "PEBS": "2", 136 "PEBS": "2",
@@ -187,8 +155,40 @@
187 "BriefDescription": "MS uops retired (Precise event capable)" 155 "BriefDescription": "MS uops retired (Precise event capable)"
188 }, 156 },
189 { 157 {
158 "PEBS": "2",
159 "CollectPEBSRecord": "1",
160 "PublicDescription": "Counts the number of floating point divide uops retired.",
161 "EventCode": "0xC2",
162 "Counter": "0,1,2,3",
163 "UMask": "0x8",
164 "EventName": "UOPS_RETIRED.FPDIV",
165 "SampleAfterValue": "2000003",
166 "BriefDescription": "Floating point divide uops retired. (Precise Event Capable)"
167 },
168 {
169 "PEBS": "2",
170 "CollectPEBSRecord": "1",
171 "PublicDescription": "Counts the number of integer divide uops retired.",
172 "EventCode": "0xC2",
173 "Counter": "0,1,2,3",
174 "UMask": "0x10",
175 "EventName": "UOPS_RETIRED.IDIV",
176 "SampleAfterValue": "2000003",
177 "BriefDescription": "Integer divide uops retired. (Precise Event Capable)"
178 },
179 {
190 "CollectPEBSRecord": "1", 180 "CollectPEBSRecord": "1",
191 "PublicDescription": "Counts the number of times that the processor detects that a program is writing to a code section and has to perform a machine clear because of that modification. Self-modifying code (SMC) causes a severe penalty in all Intel? architecture processors.", 181 "PublicDescription": "Counts machine clears for any reason.",
182 "EventCode": "0xC3",
183 "Counter": "0,1,2,3",
184 "UMask": "0x0",
185 "EventName": "MACHINE_CLEARS.ALL",
186 "SampleAfterValue": "200003",
187 "BriefDescription": "All machine clears"
188 },
189 {
190 "CollectPEBSRecord": "1",
191 "PublicDescription": "Counts the number of times that the processor detects that a program is writing to a code section and has to perform a machine clear because of that modification. Self-modifying code (SMC) causes a severe penalty in all Intel architecture processors.",
192 "EventCode": "0xC3", 192 "EventCode": "0xC3",
193 "Counter": "0,1,2,3", 193 "Counter": "0,1,2,3",
194 "UMask": "0x1", 194 "UMask": "0x1",
@@ -217,217 +217,239 @@
217 "BriefDescription": "Machine clears due to memory disambiguation" 217 "BriefDescription": "Machine clears due to memory disambiguation"
218 }, 218 },
219 { 219 {
220 "CollectPEBSRecord": "1", 220 "PEBS": "2",
221 "PublicDescription": "Counts machine clears for any reason.", 221 "CollectPEBSRecord": "2",
222 "EventCode": "0xC3", 222 "PublicDescription": "Counts branch instructions retired for all branch types. This is an architectural performance event.",
223 "EventCode": "0xC4",
223 "Counter": "0,1,2,3", 224 "Counter": "0,1,2,3",
224 "UMask": "0x0", 225 "UMask": "0x0",
225 "EventName": "MACHINE_CLEARS.ALL", 226 "EventName": "BR_INST_RETIRED.ALL_BRANCHES",
226 "SampleAfterValue": "200003", 227 "SampleAfterValue": "200003",
227 "BriefDescription": "All machine clears" 228 "BriefDescription": "Retired branch instructions (Precise event capable)"
228 }, 229 },
229 { 230 {
230 "PEBS": "2", 231 "PEBS": "2",
231 "CollectPEBSRecord": "1", 232 "CollectPEBSRecord": "2",
232 "PublicDescription": "Counts the number of instructions that retire execution. For instructions that consist of multiple uops, this event counts the retirement of the last uop of the instruction. The event continues counting during hardware interrupts, traps, and inside interrupt handlers. This is an architectural performance event. This event uses a (_P)rogrammable general purpose performance counter. *This event is Precise Event capable: The EventingRIP field in the PEBS record is precise to the address of the instruction which caused the event. Note: Because PEBS records can be collected only on IA32_PMC0, only one event can use the PEBS facility at a time.", 233 "PublicDescription": "Counts retired Jcc (Jump on Conditional Code/Jump if Condition is Met) branch instructions retired, including both when the branch was taken and when it was not taken.",
233 "EventCode": "0xC0", 234 "EventCode": "0xC4",
234 "Counter": "0,1,2,3", 235 "Counter": "0,1,2,3",
235 "UMask": "0x0", 236 "UMask": "0x7e",
236 "EventName": "INST_RETIRED.ANY_P", 237 "EventName": "BR_INST_RETIRED.JCC",
237 "SampleAfterValue": "2000003", 238 "SampleAfterValue": "200003",
238 "BriefDescription": "Instructions retired (Precise event capable)" 239 "BriefDescription": "Retired conditional branch instructions (Precise event capable)"
239 }, 240 },
240 { 241 {
242 "PEBS": "2",
241 "CollectPEBSRecord": "1", 243 "CollectPEBSRecord": "1",
242 "PublicDescription": "This event used to measure front-end inefficiencies. I.e. when front-end of the machine is not delivering uops to the back-end and the back-end has is not stalled. This event can be used to identify if the machine is truly front-end bound. When this event occurs, it is an indication that the front-end of the machine is operating at less than its theoretical peak performance. Background: We can think of the processor pipeline as being divided into 2 broader parts: Front-end and Back-end. Front-end is responsible for fetching the instruction, decoding into uops in machine understandable format and putting them into a uop queue to be consumed by back end. The back-end then takes these uops, allocates the required resources. When all resources are ready, uops are executed. If the back-end is not ready to accept uops from the front-end, then we do not want to count these as front-end bottlenecks. However, whenever we have bottlenecks in the back-end, we will have allocation unit stalls and eventually forcing the front-end to wait until the back-end is ready to receive more uops. This event counts only when back-end is requesting more uops and front-end is not able to provide them. When 3 uops are requested and no uops are delivered, the event counts 3. When 3 are requested, and only 1 is delivered, the event counts 2. When only 2 are delivered, the event counts 1. Alternatively stated, the event will not count if 3 uops are delivered, or if the back end is stalled and not requesting any uops at all. Counts indicate missed opportunities for the front-end to deliver a uop to the back end. Some examples of conditions that cause front-end efficiencies are: ICache misses, ITLB misses, and decoder restrictions that limit the front-end bandwidth. Known Issues: Some uops require multiple allocation slots. These uops will not be charged as a front end 'not delivered' opportunity, and will be regarded as a back end problem. For example, the INC instruction has one uop that requires 2 issue slots. A stream of INC instructions will not count as UOPS_NOT_DELIVERED, even though only one instruction can be issued per clock. The low uop issue rate for a stream of INC instructions is considered to be a back end issue.", 244 "PublicDescription": "Counts the number of taken branch instructions retired.",
243 "EventCode": "0x9C", 245 "EventCode": "0xC4",
244 "Counter": "0,1,2,3", 246 "Counter": "0,1,2,3",
245 "UMask": "0x0", 247 "UMask": "0x80",
246 "EventName": "UOPS_NOT_DELIVERED.ANY", 248 "EventName": "BR_INST_RETIRED.ALL_TAKEN_BRANCHES",
247 "SampleAfterValue": "200003", 249 "SampleAfterValue": "200003",
248 "BriefDescription": "Uops requested but not-delivered to the back-end per cycle" 250 "BriefDescription": "Retired taken branch instructions (Precise event capable)"
249 }, 251 },
250 { 252 {
251 "CollectPEBSRecord": "1", 253 "PEBS": "2",
252 "PublicDescription": "Counts uops issued by the front end and allocated into the back end of the machine. This event counts uops that retire as well as uops that were speculatively executed but didn't retire. The sort of speculative uops that might be counted includes, but is not limited to those uops issued in the shadow of a miss-predicted branch, those uops that are inserted during an assist (such as for a denormal floating point result), and (previously allocated) uops that might be canceled during a machine clear.", 254 "CollectPEBSRecord": "2",
253 "EventCode": "0x0E", 255 "PublicDescription": "Counts far branch instructions retired. This includes far jump, far call and return, and Interrupt call and return.",
256 "EventCode": "0xC4",
254 "Counter": "0,1,2,3", 257 "Counter": "0,1,2,3",
255 "UMask": "0x0", 258 "UMask": "0xbf",
256 "EventName": "UOPS_ISSUED.ANY", 259 "EventName": "BR_INST_RETIRED.FAR_BRANCH",
257 "SampleAfterValue": "200003", 260 "SampleAfterValue": "200003",
258 "BriefDescription": "Uops issued to the back end per cycle" 261 "BriefDescription": "Retired far branch instructions (Precise event capable)"
259 }, 262 },
260 { 263 {
261 "CollectPEBSRecord": "1", 264 "PEBS": "2",
262 "PublicDescription": "Counts core cycles if either divide unit is busy.", 265 "CollectPEBSRecord": "2",
263 "EventCode": "0xCD", 266 "PublicDescription": "Counts near indirect call or near indirect jmp branch instructions retired.",
267 "EventCode": "0xC4",
264 "Counter": "0,1,2,3", 268 "Counter": "0,1,2,3",
265 "UMask": "0x0", 269 "UMask": "0xeb",
266 "EventName": "CYCLES_DIV_BUSY.ALL", 270 "EventName": "BR_INST_RETIRED.NON_RETURN_IND",
267 "SampleAfterValue": "2000003", 271 "SampleAfterValue": "200003",
268 "BriefDescription": "Cycles a divider is busy" 272 "BriefDescription": "Retired instructions of near indirect Jmp or call (Precise event capable)"
269 }, 273 },
270 { 274 {
271 "CollectPEBSRecord": "1", 275 "PEBS": "2",
272 "PublicDescription": "Counts core cycles the integer divide unit is busy.", 276 "CollectPEBSRecord": "2",
273 "EventCode": "0xCD", 277 "PublicDescription": "Counts near return branch instructions retired.",
278 "EventCode": "0xC4",
274 "Counter": "0,1,2,3", 279 "Counter": "0,1,2,3",
275 "UMask": "0x1", 280 "UMask": "0xf7",
276 "EventName": "CYCLES_DIV_BUSY.IDIV", 281 "EventName": "BR_INST_RETIRED.RETURN",
277 "SampleAfterValue": "200003", 282 "SampleAfterValue": "200003",
278 "BriefDescription": "Cycles the integer divide unit is busy" 283 "BriefDescription": "Retired near return instructions (Precise event capable)"
279 }, 284 },
280 { 285 {
281 "CollectPEBSRecord": "1", 286 "PEBS": "2",
282 "PublicDescription": "Counts core cycles the floating point divide unit is busy.", 287 "CollectPEBSRecord": "2",
283 "EventCode": "0xCD", 288 "PublicDescription": "Counts near CALL branch instructions retired.",
289 "EventCode": "0xC4",
284 "Counter": "0,1,2,3", 290 "Counter": "0,1,2,3",
285 "UMask": "0x2", 291 "UMask": "0xf9",
286 "EventName": "CYCLES_DIV_BUSY.FPDIV", 292 "EventName": "BR_INST_RETIRED.CALL",
287 "SampleAfterValue": "200003", 293 "SampleAfterValue": "200003",
288 "BriefDescription": "Cycles the FP divide unit is busy" 294 "BriefDescription": "Retired near call instructions (Precise event capable)"
289 }, 295 },
290 { 296 {
291 "PublicDescription": "Counts the number of instructions that retire execution. For instructions that consist of multiple uops, this event counts the retirement of the last uop of the instruction. The counter continues counting during hardware interrupts, traps, and inside interrupt handlers. This event uses fixed counter 0. You cannot collect a PEBs record for this event.", 297 "PEBS": "2",
292 "EventCode": "0x00", 298 "CollectPEBSRecord": "2",
293 "Counter": "Fixed counter 1", 299 "PublicDescription": "Counts near indirect CALL branch instructions retired.",
294 "UMask": "0x1", 300 "EventCode": "0xC4",
295 "EventName": "INST_RETIRED.ANY", 301 "Counter": "0,1,2,3",
296 "SampleAfterValue": "2000003", 302 "UMask": "0xfb",
297 "BriefDescription": "Instructions retired (Fixed event)" 303 "EventName": "BR_INST_RETIRED.IND_CALL",
304 "SampleAfterValue": "200003",
305 "BriefDescription": "Retired near indirect call instructions (Precise event capable)"
298 }, 306 },
299 { 307 {
300 "PublicDescription": "Counts the number of core cycles while the core is not in a halt state. The core enters the halt state when it is running the HLT instruction. In mobile systems the core frequency may change from time to time. For this reason this event may have a changing ratio with regards to time. This event uses fixed counter 1. You cannot collect a PEBs record for this event.", 308 "PEBS": "2",
301 "EventCode": "0x00", 309 "CollectPEBSRecord": "2",
302 "Counter": "Fixed counter 2", 310 "PublicDescription": "Counts near relative CALL branch instructions retired.",
303 "UMask": "0x2", 311 "EventCode": "0xC4",
304 "EventName": "CPU_CLK_UNHALTED.CORE", 312 "Counter": "0,1,2,3",
305 "SampleAfterValue": "2000003", 313 "UMask": "0xfd",
306 "BriefDescription": "Core cycles when core is not halted (Fixed event)" 314 "EventName": "BR_INST_RETIRED.REL_CALL",
315 "SampleAfterValue": "200003",
316 "BriefDescription": "Retired near relative call instructions (Precise event capable)"
307 }, 317 },
308 { 318 {
309 "PublicDescription": "Counts the number of reference cycles that the core is not in a halt state. The core enters the halt state when it is running the HLT instruction. In mobile systems the core frequency may change from time. This event is not affected by core frequency changes but counts as if the core is running at the maximum frequency all the time. This event uses fixed counter 2. You cannot collect a PEBs record for this event.", 319 "PEBS": "2",
310 "EventCode": "0x00", 320 "CollectPEBSRecord": "2",
311 "Counter": "Fixed counter 3", 321 "PublicDescription": "Counts Jcc (Jump on Conditional Code/Jump if Condition is Met) branch instructions retired that were taken and does not count when the Jcc branch instruction were not taken.",
312 "UMask": "0x3", 322 "EventCode": "0xC4",
313 "EventName": "CPU_CLK_UNHALTED.REF_TSC", 323 "Counter": "0,1,2,3",
314 "SampleAfterValue": "2000003", 324 "UMask": "0xfe",
315 "BriefDescription": "Reference cycles when core is not halted (Fixed event)" 325 "EventName": "BR_INST_RETIRED.TAKEN_JCC",
326 "SampleAfterValue": "200003",
327 "BriefDescription": "Retired conditional branch instructions that were taken (Precise event capable)"
316 }, 328 },
317 { 329 {
318 "CollectPEBSRecord": "1", 330 "PEBS": "2",
319 "PublicDescription": "Core cycles when core is not halted. This event uses a (_P)rogrammable general purpose performance counter.", 331 "CollectPEBSRecord": "2",
320 "EventCode": "0x3C", 332 "PublicDescription": "Counts mispredicted branch instructions retired including all branch types.",
333 "EventCode": "0xC5",
321 "Counter": "0,1,2,3", 334 "Counter": "0,1,2,3",
322 "UMask": "0x0", 335 "UMask": "0x0",
323 "EventName": "CPU_CLK_UNHALTED.CORE_P", 336 "EventName": "BR_MISP_RETIRED.ALL_BRANCHES",
324 "SampleAfterValue": "2000003", 337 "SampleAfterValue": "200003",
325 "BriefDescription": "Core cycles when core is not halted" 338 "BriefDescription": "Retired mispredicted branch instructions (Precise event capable)"
326 }, 339 },
327 { 340 {
328 "CollectPEBSRecord": "1", 341 "PEBS": "2",
329 "PublicDescription": "Reference cycles when core is not halted. This event uses a (_P)rogrammable general purpose performance counter.", 342 "CollectPEBSRecord": "2",
330 "EventCode": "0x3C", 343 "PublicDescription": "Counts mispredicted retired Jcc (Jump on Conditional Code/Jump if Condition is Met) branch instructions retired, including both when the branch was supposed to be taken and when it was not supposed to be taken (but the processor predicted the opposite condition).",
344 "EventCode": "0xC5",
331 "Counter": "0,1,2,3", 345 "Counter": "0,1,2,3",
332 "UMask": "0x1", 346 "UMask": "0x7e",
333 "EventName": "CPU_CLK_UNHALTED.REF", 347 "EventName": "BR_MISP_RETIRED.JCC",
334 "SampleAfterValue": "2000003", 348 "SampleAfterValue": "200003",
335 "BriefDescription": "Reference cycles when core is not halted" 349 "BriefDescription": "Retired mispredicted conditional branch instructions (Precise event capable)"
336 }, 350 },
337 { 351 {
338 "CollectPEBSRecord": "1", 352 "PEBS": "2",
339 "PublicDescription": "Counts the number of times a BACLEAR is signaled for any reason, including, but not limited to indirect branch/call, Jcc (Jump on Conditional Code/Jump if Condition is Met) branch, unconditional branch/call, and returns.", 353 "CollectPEBSRecord": "2",
340 "EventCode": "0xE6", 354 "PublicDescription": "Counts mispredicted branch instructions retired that were near indirect call or near indirect jmp, where the target address taken was not what the processor predicted.",
355 "EventCode": "0xC5",
341 "Counter": "0,1,2,3", 356 "Counter": "0,1,2,3",
342 "UMask": "0x1", 357 "UMask": "0xeb",
343 "EventName": "BACLEARS.ALL", 358 "EventName": "BR_MISP_RETIRED.NON_RETURN_IND",
344 "SampleAfterValue": "200003", 359 "SampleAfterValue": "200003",
345 "BriefDescription": "BACLEARs asserted for any branch type" 360 "BriefDescription": "Retired mispredicted instructions of near indirect Jmp or near indirect call. (Precise event capable)"
346 }, 361 },
347 { 362 {
348 "CollectPEBSRecord": "1", 363 "PEBS": "2",
349 "PublicDescription": "Counts BACLEARS on return instructions.", 364 "CollectPEBSRecord": "2",
350 "EventCode": "0xE6", 365 "PublicDescription": "Counts mispredicted near RET branch instructions retired, where the return address taken was not what the processor predicted.",
366 "EventCode": "0xC5",
351 "Counter": "0,1,2,3", 367 "Counter": "0,1,2,3",
352 "UMask": "0x8", 368 "UMask": "0xf7",
353 "EventName": "BACLEARS.RETURN", 369 "EventName": "BR_MISP_RETIRED.RETURN",
354 "SampleAfterValue": "200003", 370 "SampleAfterValue": "200003",
355 "BriefDescription": "BACLEARs asserted for return branch" 371 "BriefDescription": "Retired mispredicted near return instructions (Precise event capable)"
356 }, 372 },
357 { 373 {
358 "CollectPEBSRecord": "1", 374 "PEBS": "2",
359 "PublicDescription": "Counts BACLEARS on Jcc (Jump on Conditional Code/Jump if Condition is Met) branches.", 375 "CollectPEBSRecord": "2",
360 "EventCode": "0xE6", 376 "PublicDescription": "Counts mispredicted near indirect CALL branch instructions retired, where the target address taken was not what the processor predicted.",
377 "EventCode": "0xC5",
361 "Counter": "0,1,2,3", 378 "Counter": "0,1,2,3",
362 "UMask": "0x10", 379 "UMask": "0xfb",
363 "EventName": "BACLEARS.COND", 380 "EventName": "BR_MISP_RETIRED.IND_CALL",
364 "SampleAfterValue": "200003", 381 "SampleAfterValue": "200003",
365 "BriefDescription": "BACLEARs asserted for conditional branch" 382 "BriefDescription": "Retired mispredicted near indirect call instructions (Precise event capable)"
366 }, 383 },
367 { 384 {
368 "PEBS": "2", 385 "PEBS": "2",
369 "CollectPEBSRecord": "2", 386 "CollectPEBSRecord": "2",
370 "PublicDescription": "Counts anytime a load that retires is blocked for any reason.", 387 "PublicDescription": "Counts mispredicted retired Jcc (Jump on Conditional Code/Jump if Condition is Met) branch instructions retired that were supposed to be taken but the processor predicted that it would not be taken.",
371 "EventCode": "0x03", 388 "EventCode": "0xC5",
372 "Counter": "0,1,2,3", 389 "Counter": "0,1,2,3",
373 "UMask": "0x10", 390 "UMask": "0xfe",
374 "EventName": "LD_BLOCKS.ALL_BLOCK", 391 "EventName": "BR_MISP_RETIRED.TAKEN_JCC",
375 "SampleAfterValue": "200003", 392 "SampleAfterValue": "200003",
376 "BriefDescription": "Loads blocked (Precise event capable)" 393 "BriefDescription": "Retired mispredicted conditional branch instructions that were taken (Precise event capable)"
377 }, 394 },
378 { 395 {
379 "PEBS": "2", 396 "CollectPEBSRecord": "1",
380 "CollectPEBSRecord": "2", 397 "PublicDescription": "Counts core cycles if either divide unit is busy.",
381 "PublicDescription": "Counts loads blocked because they are unable to find their physical address in the micro TLB (UTLB).", 398 "EventCode": "0xCD",
382 "EventCode": "0x03",
383 "Counter": "0,1,2,3", 399 "Counter": "0,1,2,3",
384 "UMask": "0x8", 400 "UMask": "0x0",
385 "EventName": "LD_BLOCKS.UTLB_MISS", 401 "EventName": "CYCLES_DIV_BUSY.ALL",
402 "SampleAfterValue": "2000003",
403 "BriefDescription": "Cycles a divider is busy"
404 },
405 {
406 "CollectPEBSRecord": "1",
407 "PublicDescription": "Counts core cycles the integer divide unit is busy.",
408 "EventCode": "0xCD",
409 "Counter": "0,1,2,3",
410 "UMask": "0x1",
411 "EventName": "CYCLES_DIV_BUSY.IDIV",
386 "SampleAfterValue": "200003", 412 "SampleAfterValue": "200003",
387 "BriefDescription": "Loads blocked because address in not in the UTLB (Precise event capable)" 413 "BriefDescription": "Cycles the integer divide unit is busy"
388 }, 414 },
389 { 415 {
390 "PEBS": "2", 416 "CollectPEBSRecord": "1",
391 "CollectPEBSRecord": "2", 417 "PublicDescription": "Counts core cycles the floating point divide unit is busy.",
392 "PublicDescription": "Counts a load blocked from using a store forward because of an address/size mismatch, only one of the loads blocked from each store will be counted.", 418 "EventCode": "0xCD",
393 "EventCode": "0x03",
394 "Counter": "0,1,2,3", 419 "Counter": "0,1,2,3",
395 "UMask": "0x2", 420 "UMask": "0x2",
396 "EventName": "LD_BLOCKS.STORE_FORWARD", 421 "EventName": "CYCLES_DIV_BUSY.FPDIV",
397 "SampleAfterValue": "200003", 422 "SampleAfterValue": "200003",
398 "BriefDescription": "Loads blocked due to store forward restriction (Precise event capable)" 423 "BriefDescription": "Cycles the FP divide unit is busy"
399 }, 424 },
400 { 425 {
401 "PEBS": "2", 426 "CollectPEBSRecord": "1",
402 "CollectPEBSRecord": "2", 427 "PublicDescription": "Counts the number of times a BACLEAR is signaled for any reason, including, but not limited to indirect branch/call, Jcc (Jump on Conditional Code/Jump if Condition is Met) branch, unconditional branch/call, and returns.",
403 "PublicDescription": "Counts a load blocked from using a store forward, but did not occur because the store data was not available at the right time. The forward might occur subsequently when the data is available.", 428 "EventCode": "0xE6",
404 "EventCode": "0x03",
405 "Counter": "0,1,2,3", 429 "Counter": "0,1,2,3",
406 "UMask": "0x1", 430 "UMask": "0x1",
407 "EventName": "LD_BLOCKS.DATA_UNKNOWN", 431 "EventName": "BACLEARS.ALL",
408 "SampleAfterValue": "200003", 432 "SampleAfterValue": "200003",
409 "BriefDescription": "Loads blocked due to store data not ready (Precise event capable)" 433 "BriefDescription": "BACLEARs asserted for any branch type"
410 }, 434 },
411 { 435 {
412 "PEBS": "2", 436 "CollectPEBSRecord": "1",
413 "CollectPEBSRecord": "2", 437 "PublicDescription": "Counts BACLEARS on return instructions.",
414 "PublicDescription": "Counts loads that block because their address modulo 4K matches a pending store.", 438 "EventCode": "0xE6",
415 "EventCode": "0x03",
416 "Counter": "0,1,2,3", 439 "Counter": "0,1,2,3",
417 "UMask": "0x4", 440 "UMask": "0x8",
418 "EventName": "LD_BLOCKS.4K_ALIAS", 441 "EventName": "BACLEARS.RETURN",
419 "SampleAfterValue": "200003", 442 "SampleAfterValue": "200003",
420 "BriefDescription": "Loads blocked because address has 4k partial address false dependence (Precise event capable)" 443 "BriefDescription": "BACLEARs asserted for return branch"
421 }, 444 },
422 { 445 {
423 "PEBS": "2",
424 "CollectPEBSRecord": "1", 446 "CollectPEBSRecord": "1",
425 "PublicDescription": "Counts the number of taken branch instructions retired.", 447 "PublicDescription": "Counts BACLEARS on Jcc (Jump on Conditional Code/Jump if Condition is Met) branches.",
426 "EventCode": "0xC4", 448 "EventCode": "0xE6",
427 "Counter": "0,1,2,3", 449 "Counter": "0,1,2,3",
428 "UMask": "0x80", 450 "UMask": "0x10",
429 "EventName": "BR_INST_RETIRED.ALL_TAKEN_BRANCHES", 451 "EventName": "BACLEARS.COND",
430 "SampleAfterValue": "200003", 452 "SampleAfterValue": "200003",
431 "BriefDescription": "Retired taken branch instructions (Precise event capable)" 453 "BriefDescription": "BACLEARs asserted for conditional branch"
432 } 454 }
433] \ No newline at end of file 455] \ No newline at end of file
diff --git a/tools/perf/pmu-events/arch/x86/goldmont/virtual-memory.json b/tools/perf/pmu-events/arch/x86/goldmont/virtual-memory.json
index 3202c4478836..9805198d3f5f 100644
--- a/tools/perf/pmu-events/arch/x86/goldmont/virtual-memory.json
+++ b/tools/perf/pmu-events/arch/x86/goldmont/virtual-memory.json
@@ -1,6 +1,36 @@
1[ 1[
2 { 2 {
3 "CollectPEBSRecord": "1", 3 "CollectPEBSRecord": "1",
4 "PublicDescription": "Counts every core cycle when a Data-side (walks due to a data operation) page walk is in progress.",
5 "EventCode": "0x05",
6 "Counter": "0,1,2,3",
7 "UMask": "0x1",
8 "EventName": "PAGE_WALKS.D_SIDE_CYCLES",
9 "SampleAfterValue": "200003",
10 "BriefDescription": "Duration of D-side page-walks in cycles"
11 },
12 {
13 "CollectPEBSRecord": "1",
14 "PublicDescription": "Counts every core cycle when a Instruction-side (walks due to an instruction fetch) page walk is in progress.",
15 "EventCode": "0x05",
16 "Counter": "0,1,2,3",
17 "UMask": "0x2",
18 "EventName": "PAGE_WALKS.I_SIDE_CYCLES",
19 "SampleAfterValue": "200003",
20 "BriefDescription": "Duration of I-side pagewalks in cycles"
21 },
22 {
23 "CollectPEBSRecord": "1",
24 "PublicDescription": "Counts every core cycle a page-walk is in progress due to either a data memory operation or an instruction fetch.",
25 "EventCode": "0x05",
26 "Counter": "0,1,2,3",
27 "UMask": "0x3",
28 "EventName": "PAGE_WALKS.CYCLES",
29 "SampleAfterValue": "200003",
30 "BriefDescription": "Duration of page-walks in cycles"
31 },
32 {
33 "CollectPEBSRecord": "1",
4 "PublicDescription": "Counts the number of times the machine was unable to find a translation in the Instruction Translation Lookaside Buffer (ITLB) for a linear address of an instruction fetch. It counts when new translation are filled into the ITLB. The event is speculative in nature, but will not count translations (page walks) that are begun and not finished, or translations that are finished but not filled into the ITLB.", 34 "PublicDescription": "Counts the number of times the machine was unable to find a translation in the Instruction Translation Lookaside Buffer (ITLB) for a linear address of an instruction fetch. It counts when new translation are filled into the ITLB. The event is speculative in nature, but will not count translations (page walks) that are begun and not finished, or translations that are finished but not filled into the ITLB.",
5 "EventCode": "0x81", 35 "EventCode": "0x81",
6 "Counter": "0,1,2,3", 36 "Counter": "0,1,2,3",
@@ -41,35 +71,5 @@
41 "EventName": "MEM_UOPS_RETIRED.DTLB_MISS", 71 "EventName": "MEM_UOPS_RETIRED.DTLB_MISS",
42 "SampleAfterValue": "200003", 72 "SampleAfterValue": "200003",
43 "BriefDescription": "Memory uops retired that missed the DTLB (Precise event capable)" 73 "BriefDescription": "Memory uops retired that missed the DTLB (Precise event capable)"
44 },
45 {
46 "CollectPEBSRecord": "1",
47 "PublicDescription": "Counts every core cycle when a Data-side (walks due to a data operation) page walk is in progress.",
48 "EventCode": "0x05",
49 "Counter": "0,1,2,3",
50 "UMask": "0x1",
51 "EventName": "PAGE_WALKS.D_SIDE_CYCLES",
52 "SampleAfterValue": "200003",
53 "BriefDescription": "Duration of D-side page-walks in cycles"
54 },
55 {
56 "CollectPEBSRecord": "1",
57 "PublicDescription": "Counts every core cycle when a Instruction-side (walks due to an instruction fetch) page walk is in progress.",
58 "EventCode": "0x05",
59 "Counter": "0,1,2,3",
60 "UMask": "0x2",
61 "EventName": "PAGE_WALKS.I_SIDE_CYCLES",
62 "SampleAfterValue": "200003",
63 "BriefDescription": "Duration of I-side pagewalks in cycles"
64 },
65 {
66 "CollectPEBSRecord": "1",
67 "PublicDescription": "Counts every core cycle a page-walk is in progress due to either a data memory operation or an instruction fetch.",
68 "EventCode": "0x05",
69 "Counter": "0,1,2,3",
70 "UMask": "0x3",
71 "EventName": "PAGE_WALKS.CYCLES",
72 "SampleAfterValue": "200003",
73 "BriefDescription": "Duration of page-walks in cycles"
74 } 74 }
75] \ No newline at end of file 75] \ No newline at end of file
diff --git a/tools/perf/pmu-events/arch/x86/goldmontplus/cache.json b/tools/perf/pmu-events/arch/x86/goldmontplus/cache.json
new file mode 100644
index 000000000000..b4791b443a66
--- /dev/null
+++ b/tools/perf/pmu-events/arch/x86/goldmontplus/cache.json
@@ -0,0 +1,1453 @@
1[
2 {
3 "CollectPEBSRecord": "1",
4 "PublicDescription": "Counts memory requests originating from the core that miss in the L2 cache.",
5 "EventCode": "0x2E",
6 "Counter": "0,1,2,3",
7 "UMask": "0x41",
8 "PEBScounters": "0,1,2,3",
9 "EventName": "LONGEST_LAT_CACHE.MISS",
10 "PDIR_COUNTER": "na",
11 "SampleAfterValue": "200003",
12 "BriefDescription": "L2 cache request misses"
13 },
14 {
15 "CollectPEBSRecord": "1",
16 "PublicDescription": "Counts memory requests originating from the core that reference a cache line in the L2 cache.",
17 "EventCode": "0x2E",
18 "Counter": "0,1,2,3",
19 "UMask": "0x4f",
20 "PEBScounters": "0,1,2,3",
21 "EventName": "LONGEST_LAT_CACHE.REFERENCE",
22 "PDIR_COUNTER": "na",
23 "SampleAfterValue": "200003",
24 "BriefDescription": "L2 cache requests"
25 },
26 {
27 "CollectPEBSRecord": "1",
28 "PublicDescription": "Counts the number of demand and prefetch transactions that the L2 XQ rejects due to a full or near full condition which likely indicates back pressure from the intra-die interconnect (IDI) fabric. The XQ may reject transactions from the L2Q (non-cacheable requests), L2 misses and L2 write-back victims.",
29 "EventCode": "0x30",
30 "Counter": "0,1,2,3",
31 "UMask": "0x0",
32 "PEBScounters": "0,1,2,3",
33 "EventName": "L2_REJECT_XQ.ALL",
34 "PDIR_COUNTER": "na",
35 "SampleAfterValue": "200003",
36 "BriefDescription": "Requests rejected by the XQ"
37 },
38 {
39 "CollectPEBSRecord": "1",
40 "PublicDescription": "Counts the number of demand and L1 prefetcher requests rejected by the L2Q due to a full or nearly full condition which likely indicates back pressure from L2Q. It also counts requests that would have gone directly to the XQ, but are rejected due to a full or nearly full condition, indicating back pressure from the IDI link. The L2Q may also reject transactions from a core to insure fairness between cores, or to delay a core's dirty eviction when the address conflicts with incoming external snoops.",
41 "EventCode": "0x31",
42 "Counter": "0,1,2,3",
43 "UMask": "0x0",
44 "PEBScounters": "0,1,2,3",
45 "EventName": "CORE_REJECT_L2Q.ALL",
46 "PDIR_COUNTER": "na",
47 "SampleAfterValue": "200003",
48 "BriefDescription": "Requests rejected by the L2Q"
49 },
50 {
51 "CollectPEBSRecord": "1",
52 "PublicDescription": "Counts when a modified (dirty) cache line is evicted from the data L1 cache and needs to be written back to memory. No count will occur if the evicted line is clean, and hence does not require a writeback.",
53 "EventCode": "0x51",
54 "Counter": "0,1,2,3",
55 "UMask": "0x1",
56 "PEBScounters": "0,1,2,3",
57 "EventName": "DL1.REPLACEMENT",
58 "PDIR_COUNTER": "na",
59 "SampleAfterValue": "200003",
60 "BriefDescription": "L1 Cache evictions for dirty data"
61 },
62 {
63 "CollectPEBSRecord": "1",
64 "PublicDescription": "Counts cycles that fetch is stalled due to an outstanding ICache miss. That is, the decoder queue is able to accept bytes, but the fetch unit is unable to provide bytes due to an ICache miss. Note: this event is not the same as the total number of cycles spent retrieving instruction cache lines from the memory hierarchy.",
65 "EventCode": "0x86",
66 "Counter": "0,1,2,3",
67 "UMask": "0x2",
68 "PEBScounters": "0,1,2,3",
69 "EventName": "FETCH_STALL.ICACHE_FILL_PENDING_CYCLES",
70 "PDIR_COUNTER": "na",
71 "SampleAfterValue": "200003",
72 "BriefDescription": "Cycles code-fetch stalled due to an outstanding ICache miss."
73 },
74 {
75 "CollectPEBSRecord": "1",
76 "EventCode": "0xB7",
77 "Counter": "0,1,2,3",
78 "UMask": "0x1",
79 "PEBScounters": "0,1,2,3",
80 "EventName": "OFFCORE_RESPONSE",
81 "PDIR_COUNTER": "na",
82 "SampleAfterValue": "100007",
83 "BriefDescription": "Requires MSR_OFFCORE_RESP[0,1] to specify request type and response. (duplicated for both MSRs)"
84 },
85 {
86 "PEBS": "2",
87 "CollectPEBSRecord": "2",
88 "PublicDescription": "Counts locked memory uops retired. This includes regular locks and bus locks. (To specifically count bus locks only, see the Offcore response event.) A locked access is one with a lock prefix, or an exchange to memory. See the SDM for a complete description of which memory load accesses are locks.",
89 "EventCode": "0xD0",
90 "Counter": "0,1,2,3",
91 "UMask": "0x21",
92 "PEBScounters": "0,1,2,3",
93 "EventName": "MEM_UOPS_RETIRED.LOCK_LOADS",
94 "SampleAfterValue": "200003",
95 "BriefDescription": "Locked load uops retired (Precise event capable)"
96 },
97 {
98 "PEBS": "2",
99 "CollectPEBSRecord": "2",
100 "PublicDescription": "Counts load uops retired where the data requested spans a 64 byte cache line boundary.",
101 "EventCode": "0xD0",
102 "Counter": "0,1,2,3",
103 "UMask": "0x41",
104 "PEBScounters": "0,1,2,3",
105 "EventName": "MEM_UOPS_RETIRED.SPLIT_LOADS",
106 "SampleAfterValue": "200003",
107 "BriefDescription": "Load uops retired that split a cache-line (Precise event capable)"
108 },
109 {
110 "PEBS": "2",
111 "CollectPEBSRecord": "2",
112 "PublicDescription": "Counts store uops retired where the data requested spans a 64 byte cache line boundary.",
113 "EventCode": "0xD0",
114 "Counter": "0,1,2,3",
115 "UMask": "0x42",
116 "PEBScounters": "0,1,2,3",
117 "EventName": "MEM_UOPS_RETIRED.SPLIT_STORES",
118 "SampleAfterValue": "200003",
119 "BriefDescription": "Stores uops retired that split a cache-line (Precise event capable)"
120 },
121 {
122 "PEBS": "2",
123 "CollectPEBSRecord": "2",
124 "PublicDescription": "Counts memory uops retired where the data requested spans a 64 byte cache line boundary.",
125 "EventCode": "0xD0",
126 "Counter": "0,1,2,3",
127 "UMask": "0x43",
128 "PEBScounters": "0,1,2,3",
129 "EventName": "MEM_UOPS_RETIRED.SPLIT",
130 "SampleAfterValue": "200003",
131 "BriefDescription": "Memory uops retired that split a cache-line (Precise event capable)"
132 },
133 {
134 "PEBS": "2",
135 "CollectPEBSRecord": "2",
136 "PublicDescription": "Counts the number of load uops retired.",
137 "EventCode": "0xD0",
138 "Counter": "0,1,2,3",
139 "UMask": "0x81",
140 "PEBScounters": "0,1,2,3",
141 "EventName": "MEM_UOPS_RETIRED.ALL_LOADS",
142 "SampleAfterValue": "200003",
143 "BriefDescription": "Load uops retired (Precise event capable)"
144 },
145 {
146 "PEBS": "2",
147 "CollectPEBSRecord": "2",
148 "PublicDescription": "Counts the number of store uops retired.",
149 "EventCode": "0xD0",
150 "Counter": "0,1,2,3",
151 "UMask": "0x82",
152 "PEBScounters": "0,1,2,3",
153 "EventName": "MEM_UOPS_RETIRED.ALL_STORES",
154 "SampleAfterValue": "200003",
155 "BriefDescription": "Store uops retired (Precise event capable)"
156 },
157 {
158 "PEBS": "2",
159 "CollectPEBSRecord": "2",
160 "PublicDescription": "Counts the number of memory uops retired that is either a loads or a store or both.",
161 "EventCode": "0xD0",
162 "Counter": "0,1,2,3",
163 "UMask": "0x83",
164 "PEBScounters": "0,1,2,3",
165 "EventName": "MEM_UOPS_RETIRED.ALL",
166 "SampleAfterValue": "200003",
167 "BriefDescription": "Memory uops retired (Precise event capable)"
168 },
169 {
170 "PEBS": "2",
171 "CollectPEBSRecord": "2",
172 "PublicDescription": "Counts load uops retired that hit the L1 data cache.",
173 "EventCode": "0xD1",
174 "Counter": "0,1,2,3",
175 "UMask": "0x1",
176 "PEBScounters": "0,1,2,3",
177 "EventName": "MEM_LOAD_UOPS_RETIRED.L1_HIT",
178 "SampleAfterValue": "200003",
179 "BriefDescription": "Load uops retired that hit L1 data cache (Precise event capable)"
180 },
181 {
182 "PEBS": "2",
183 "CollectPEBSRecord": "2",
184 "PublicDescription": "Counts load uops retired that hit in the L2 cache.",
185 "EventCode": "0xD1",
186 "Counter": "0,1,2,3",
187 "UMask": "0x2",
188 "PEBScounters": "0,1,2,3",
189 "EventName": "MEM_LOAD_UOPS_RETIRED.L2_HIT",
190 "SampleAfterValue": "200003",
191 "BriefDescription": "Load uops retired that hit L2 (Precise event capable)"
192 },
193 {
194 "PEBS": "2",
195 "CollectPEBSRecord": "2",
196 "PublicDescription": "Counts load uops retired that miss the L1 data cache.",
197 "EventCode": "0xD1",
198 "Counter": "0,1,2,3",
199 "UMask": "0x8",
200 "PEBScounters": "0,1,2,3",
201 "EventName": "MEM_LOAD_UOPS_RETIRED.L1_MISS",
202 "SampleAfterValue": "200003",
203 "BriefDescription": "Load uops retired that missed L1 data cache (Precise event capable)"
204 },
205 {
206 "PEBS": "2",
207 "CollectPEBSRecord": "2",
208 "PublicDescription": "Counts load uops retired that miss in the L2 cache.",
209 "EventCode": "0xD1",
210 "Counter": "0,1,2,3",
211 "UMask": "0x10",
212 "PEBScounters": "0,1,2,3",
213 "EventName": "MEM_LOAD_UOPS_RETIRED.L2_MISS",
214 "SampleAfterValue": "200003",
215 "BriefDescription": "Load uops retired that missed L2 (Precise event capable)"
216 },
217 {
218 "PEBS": "2",
219 "CollectPEBSRecord": "2",
220 "PublicDescription": "Counts load uops retired where the cache line containing the data was in the modified state of another core or modules cache (HITM). More specifically, this means that when the load address was checked by other caching agents (typically another processor) in the system, one of those caching agents indicated that they had a dirty copy of the data. Loads that obtain a HITM response incur greater latency than most is typical for a load. In addition, since HITM indicates that some other processor had this data in its cache, it implies that the data was shared between processors, or potentially was a lock or semaphore value. This event is useful for locating sharing, false sharing, and contended locks.",
221 "EventCode": "0xD1",
222 "Counter": "0,1,2,3",
223 "UMask": "0x20",
224 "PEBScounters": "0,1,2,3",
225 "EventName": "MEM_LOAD_UOPS_RETIRED.HITM",
226 "SampleAfterValue": "200003",
227 "BriefDescription": "Memory uop retired where cross core or cross module HITM occurred (Precise event capable)"
228 },
229 {
230 "PEBS": "2",
231 "CollectPEBSRecord": "2",
232 "PublicDescription": "Counts memory load uops retired where the data is retrieved from the WCB (or fill buffer), indicating that the load found its data while that data was in the process of being brought into the L1 cache. Typically a load will receive this indication when some other load or prefetch missed the L1 cache and was in the process of retrieving the cache line containing the data, but that process had not yet finished (and written the data back to the cache). For example, consider load X and Y, both referencing the same cache line that is not in the L1 cache. If load X misses cache first, it obtains and WCB (or fill buffer) and begins the process of requesting the data. When load Y requests the data, it will either hit the WCB, or the L1 cache, depending on exactly what time the request to Y occurs.",
233 "EventCode": "0xD1",
234 "Counter": "0,1,2,3",
235 "UMask": "0x40",
236 "PEBScounters": "0,1,2,3",
237 "EventName": "MEM_LOAD_UOPS_RETIRED.WCB_HIT",
238 "SampleAfterValue": "200003",
239 "BriefDescription": "Loads retired that hit WCB (Precise event capable)"
240 },
241 {
242 "PEBS": "2",
243 "CollectPEBSRecord": "2",
244 "PublicDescription": "Counts memory load uops retired where the data is retrieved from DRAM. Event is counted at retirement, so the speculative loads are ignored. A memory load can hit (or miss) the L1 cache, hit (or miss) the L2 cache, hit DRAM, hit in the WCB or receive a HITM response.",
245 "EventCode": "0xD1",
246 "Counter": "0,1,2,3",
247 "UMask": "0x80",
248 "PEBScounters": "0,1,2,3",
249 "EventName": "MEM_LOAD_UOPS_RETIRED.DRAM_HIT",
250 "SampleAfterValue": "200003",
251 "BriefDescription": "Loads retired that came from DRAM (Precise event capable)"
252 },
253 {
254 "CollectPEBSRecord": "1",
255 "PublicDescription": "Counts demand cacheable data reads of full cache lines have any transaction responses from the uncore subsystem. Requires MSR_OFFCORE_RESP[0,1] to specify request type and response. (duplicated for both MSRs)",
256 "EventCode": "0xB7",
257 "MSRValue": "0x0000010001",
258 "Counter": "0,1,2,3",
259 "UMask": "0x1",
260 "PEBScounters": "0,1,2,3",
261 "EventName": "OFFCORE_RESPONSE.DEMAND_DATA_RD.ANY_RESPONSE",
262 "PDIR_COUNTER": "na",
263 "MSRIndex": "0x1a6, 0x1a7",
264 "SampleAfterValue": "100007",
265 "BriefDescription": "Counts demand cacheable data reads of full cache lines have any transaction responses from the uncore subsystem.",
266 "Offcore": "1"
267 },
268 {
269 "CollectPEBSRecord": "1",
270 "PublicDescription": "Counts demand cacheable data reads of full cache lines hit the L2 cache. Requires MSR_OFFCORE_RESP[0,1] to specify request type and response. (duplicated for both MSRs)",
271 "EventCode": "0xB7",
272 "MSRValue": "0x0000040001",
273 "Counter": "0,1,2,3",
274 "UMask": "0x1",
275 "PEBScounters": "0,1,2,3",
276 "EventName": "OFFCORE_RESPONSE.DEMAND_DATA_RD.L2_HIT",
277 "PDIR_COUNTER": "na",
278 "MSRIndex": "0x1a6, 0x1a7",
279 "SampleAfterValue": "100007",
280 "BriefDescription": "Counts demand cacheable data reads of full cache lines hit the L2 cache.",
281 "Offcore": "1"
282 },
283 {
284 "CollectPEBSRecord": "1",
285 "PublicDescription": "Counts demand cacheable data reads of full cache lines true miss for the L2 cache with a snoop miss in the other processor module. Requires MSR_OFFCORE_RESP[0,1] to specify request type and response. (duplicated for both MSRs)",
286 "EventCode": "0xB7",
287 "MSRValue": "0x0200000001",
288 "Counter": "0,1,2,3",
289 "UMask": "0x1",
290 "PEBScounters": "0,1,2,3",
291 "EventName": "OFFCORE_RESPONSE.DEMAND_DATA_RD.L2_MISS.SNOOP_MISS_OR_NO_SNOOP_NEEDED",
292 "PDIR_COUNTER": "na",
293 "MSRIndex": "0x1a6, 0x1a7",
294 "SampleAfterValue": "100007",
295 "BriefDescription": "Counts demand cacheable data reads of full cache lines true miss for the L2 cache with a snoop miss in the other processor module. ",
296 "Offcore": "1"
297 },
298 {
299 "CollectPEBSRecord": "1",
300 "PublicDescription": "Counts demand cacheable data reads of full cache lines miss the L2 cache with a snoop hit in the other processor module, data forwarding is required. Requires MSR_OFFCORE_RESP[0,1] to specify request type and response. (duplicated for both MSRs)",
301 "EventCode": "0xB7",
302 "MSRValue": "0x1000000001",
303 "Counter": "0,1,2,3",
304 "UMask": "0x1",
305 "PEBScounters": "0,1,2,3",
306 "EventName": "OFFCORE_RESPONSE.DEMAND_DATA_RD.L2_MISS.HITM_OTHER_CORE",
307 "PDIR_COUNTER": "na",
308 "MSRIndex": "0x1a6, 0x1a7",
309 "SampleAfterValue": "100007",
310 "BriefDescription": "Counts demand cacheable data reads of full cache lines miss the L2 cache with a snoop hit in the other processor module, data forwarding is required.",
311 "Offcore": "1"
312 },
313 {
314 "CollectPEBSRecord": "1",
315 "PublicDescription": "Counts demand cacheable data reads of full cache lines outstanding, per cycle, from the time of the L2 miss to when any response is received. Requires MSR_OFFCORE_RESP[0,1] to specify request type and response. (duplicated for both MSRs)",
316 "EventCode": "0xB7",
317 "MSRValue": "0x4000000001",
318 "Counter": "0,1,2,3",
319 "UMask": "0x1",
320 "PEBScounters": "0,1,2,3",
321 "EventName": "OFFCORE_RESPONSE.DEMAND_DATA_RD.OUTSTANDING",
322 "PDIR_COUNTER": "na",
323 "MSRIndex": "0x1a6",
324 "SampleAfterValue": "100007",
325 "BriefDescription": "Counts demand cacheable data reads of full cache lines outstanding, per cycle, from the time of the L2 miss to when any response is received.",
326 "Offcore": "1"
327 },
328 {
329 "CollectPEBSRecord": "1",
330 "PublicDescription": "Counts demand reads for ownership (RFO) requests generated by a write to full data cache line have any transaction responses from the uncore subsystem. Requires MSR_OFFCORE_RESP[0,1] to specify request type and response. (duplicated for both MSRs)",
331 "EventCode": "0xB7",
332 "MSRValue": "0x0000010002",
333 "Counter": "0,1,2,3",
334 "UMask": "0x1",
335 "PEBScounters": "0,1,2,3",
336 "EventName": "OFFCORE_RESPONSE.DEMAND_RFO.ANY_RESPONSE",
337 "PDIR_COUNTER": "na",
338 "MSRIndex": "0x1a6, 0x1a7",
339 "SampleAfterValue": "100007",
340 "BriefDescription": "Counts demand reads for ownership (RFO) requests generated by a write to full data cache line have any transaction responses from the uncore subsystem.",
341 "Offcore": "1"
342 },
343 {
344 "CollectPEBSRecord": "1",
345 "PublicDescription": "Counts demand reads for ownership (RFO) requests generated by a write to full data cache line hit the L2 cache. Requires MSR_OFFCORE_RESP[0,1] to specify request type and response. (duplicated for both MSRs)",
346 "EventCode": "0xB7",
347 "MSRValue": "0x0000040002",
348 "Counter": "0,1,2,3",
349 "UMask": "0x1",
350 "PEBScounters": "0,1,2,3",
351 "EventName": "OFFCORE_RESPONSE.DEMAND_RFO.L2_HIT",
352 "PDIR_COUNTER": "na",
353 "MSRIndex": "0x1a6, 0x1a7",
354 "SampleAfterValue": "100007",
355 "BriefDescription": "Counts demand reads for ownership (RFO) requests generated by a write to full data cache line hit the L2 cache.",
356 "Offcore": "1"
357 },
358 {
359 "CollectPEBSRecord": "1",
360 "PublicDescription": "Counts demand reads for ownership (RFO) requests generated by a write to full data cache line true miss for the L2 cache with a snoop miss in the other processor module. Requires MSR_OFFCORE_RESP[0,1] to specify request type and response. (duplicated for both MSRs)",
361 "EventCode": "0xB7",
362 "MSRValue": "0x0200000002",
363 "Counter": "0,1,2,3",
364 "UMask": "0x1",
365 "PEBScounters": "0,1,2,3",
366 "EventName": "OFFCORE_RESPONSE.DEMAND_RFO.L2_MISS.SNOOP_MISS_OR_NO_SNOOP_NEEDED",
367 "PDIR_COUNTER": "na",
368 "MSRIndex": "0x1a6, 0x1a7",
369 "SampleAfterValue": "100007",
370 "BriefDescription": "Counts demand reads for ownership (RFO) requests generated by a write to full data cache line true miss for the L2 cache with a snoop miss in the other processor module. ",
371 "Offcore": "1"
372 },
373 {
374 "CollectPEBSRecord": "1",
375 "PublicDescription": "Counts demand reads for ownership (RFO) requests generated by a write to full data cache line miss the L2 cache with a snoop hit in the other processor module, data forwarding is required. Requires MSR_OFFCORE_RESP[0,1] to specify request type and response. (duplicated for both MSRs)",
376 "EventCode": "0xB7",
377 "MSRValue": "0x1000000002",
378 "Counter": "0,1,2,3",
379 "UMask": "0x1",
380 "PEBScounters": "0,1,2,3",
381 "EventName": "OFFCORE_RESPONSE.DEMAND_RFO.L2_MISS.HITM_OTHER_CORE",
382 "PDIR_COUNTER": "na",
383 "MSRIndex": "0x1a6, 0x1a7",
384 "SampleAfterValue": "100007",
385 "BriefDescription": "Counts demand reads for ownership (RFO) requests generated by a write to full data cache line miss the L2 cache with a snoop hit in the other processor module, data forwarding is required.",
386 "Offcore": "1"
387 },
388 {
389 "CollectPEBSRecord": "1",
390 "PublicDescription": "Counts demand reads for ownership (RFO) requests generated by a write to full data cache line outstanding, per cycle, from the time of the L2 miss to when any response is received. Requires MSR_OFFCORE_RESP[0,1] to specify request type and response. (duplicated for both MSRs)",
391 "EventCode": "0xB7",
392 "MSRValue": "0x4000000002",
393 "Counter": "0,1,2,3",
394 "UMask": "0x1",
395 "PEBScounters": "0,1,2,3",
396 "EventName": "OFFCORE_RESPONSE.DEMAND_RFO.OUTSTANDING",
397 "PDIR_COUNTER": "na",
398 "MSRIndex": "0x1a6",
399 "SampleAfterValue": "100007",
400 "BriefDescription": "Counts demand reads for ownership (RFO) requests generated by a write to full data cache line outstanding, per cycle, from the time of the L2 miss to when any response is received.",
401 "Offcore": "1"
402 },
403 {
404 "CollectPEBSRecord": "1",
405 "PublicDescription": "Counts demand instruction cacheline and I-side prefetch requests that miss the instruction cache have any transaction responses from the uncore subsystem. Requires MSR_OFFCORE_RESP[0,1] to specify request type and response. (duplicated for both MSRs)",
406 "EventCode": "0xB7",
407 "MSRValue": "0x0000010004",
408 "Counter": "0,1,2,3",
409 "UMask": "0x1",
410 "PEBScounters": "0,1,2,3",
411 "EventName": "OFFCORE_RESPONSE.DEMAND_CODE_RD.ANY_RESPONSE",
412 "PDIR_COUNTER": "na",
413 "MSRIndex": "0x1a6, 0x1a7",
414 "SampleAfterValue": "100007",
415 "BriefDescription": "Counts demand instruction cacheline and I-side prefetch requests that miss the instruction cache have any transaction responses from the uncore subsystem.",
416 "Offcore": "1"
417 },
418 {
419 "CollectPEBSRecord": "1",
420 "PublicDescription": "Counts demand instruction cacheline and I-side prefetch requests that miss the instruction cache hit the L2 cache. Requires MSR_OFFCORE_RESP[0,1] to specify request type and response. (duplicated for both MSRs)",
421 "EventCode": "0xB7",
422 "MSRValue": "0x0000040004",
423 "Counter": "0,1,2,3",
424 "UMask": "0x1",
425 "PEBScounters": "0,1,2,3",
426 "EventName": "OFFCORE_RESPONSE.DEMAND_CODE_RD.L2_HIT",
427 "PDIR_COUNTER": "na",
428 "MSRIndex": "0x1a6, 0x1a7",
429 "SampleAfterValue": "100007",
430 "BriefDescription": "Counts demand instruction cacheline and I-side prefetch requests that miss the instruction cache hit the L2 cache.",
431 "Offcore": "1"
432 },
433 {
434 "CollectPEBSRecord": "1",
435 "PublicDescription": "Counts demand instruction cacheline and I-side prefetch requests that miss the instruction cache true miss for the L2 cache with a snoop miss in the other processor module. Requires MSR_OFFCORE_RESP[0,1] to specify request type and response. (duplicated for both MSRs)",
436 "EventCode": "0xB7",
437 "MSRValue": "0x0200000004",
438 "Counter": "0,1,2,3",
439 "UMask": "0x1",
440 "PEBScounters": "0,1,2,3",
441 "EventName": "OFFCORE_RESPONSE.DEMAND_CODE_RD.L2_MISS.SNOOP_MISS_OR_NO_SNOOP_NEEDED",
442 "PDIR_COUNTER": "na",
443 "MSRIndex": "0x1a6, 0x1a7",
444 "SampleAfterValue": "100007",
445 "BriefDescription": "Counts demand instruction cacheline and I-side prefetch requests that miss the instruction cache true miss for the L2 cache with a snoop miss in the other processor module. ",
446 "Offcore": "1"
447 },
448 {
449 "CollectPEBSRecord": "1",
450 "PublicDescription": "Counts demand instruction cacheline and I-side prefetch requests that miss the instruction cache miss the L2 cache with a snoop hit in the other processor module, data forwarding is required. Requires MSR_OFFCORE_RESP[0,1] to specify request type and response. (duplicated for both MSRs)",
451 "EventCode": "0xB7",
452 "MSRValue": "0x1000000004",
453 "Counter": "0,1,2,3",
454 "UMask": "0x1",
455 "PEBScounters": "0,1,2,3",
456 "EventName": "OFFCORE_RESPONSE.DEMAND_CODE_RD.L2_MISS.HITM_OTHER_CORE",
457 "PDIR_COUNTER": "na",
458 "MSRIndex": "0x1a6, 0x1a7",
459 "SampleAfterValue": "100007",
460 "BriefDescription": "Counts demand instruction cacheline and I-side prefetch requests that miss the instruction cache miss the L2 cache with a snoop hit in the other processor module, data forwarding is required.",
461 "Offcore": "1"
462 },
463 {
464 "CollectPEBSRecord": "1",
465 "PublicDescription": "Counts demand instruction cacheline and I-side prefetch requests that miss the instruction cache outstanding, per cycle, from the time of the L2 miss to when any response is received. Requires MSR_OFFCORE_RESP[0,1] to specify request type and response. (duplicated for both MSRs)",
466 "EventCode": "0xB7",
467 "MSRValue": "0x4000000004",
468 "Counter": "0,1,2,3",
469 "UMask": "0x1",
470 "PEBScounters": "0,1,2,3",
471 "EventName": "OFFCORE_RESPONSE.DEMAND_CODE_RD.OUTSTANDING",
472 "PDIR_COUNTER": "na",
473 "MSRIndex": "0x1a6",
474 "SampleAfterValue": "100007",
475 "BriefDescription": "Counts demand instruction cacheline and I-side prefetch requests that miss the instruction cache outstanding, per cycle, from the time of the L2 miss to when any response is received.",
476 "Offcore": "1"
477 },
478 {
479 "CollectPEBSRecord": "1",
480 "PublicDescription": "Counts the number of writeback transactions caused by L1 or L2 cache evictions have any transaction responses from the uncore subsystem. Requires MSR_OFFCORE_RESP[0,1] to specify request type and response. (duplicated for both MSRs)",
481 "EventCode": "0xB7",
482 "MSRValue": "0x0000010008",
483 "Counter": "0,1,2,3",
484 "UMask": "0x1",
485 "PEBScounters": "0,1,2,3",
486 "EventName": "OFFCORE_RESPONSE.COREWB.ANY_RESPONSE",
487 "PDIR_COUNTER": "na",
488 "MSRIndex": "0x1a6, 0x1a7",
489 "SampleAfterValue": "100007",
490 "BriefDescription": "Counts the number of writeback transactions caused by L1 or L2 cache evictions have any transaction responses from the uncore subsystem.",
491 "Offcore": "1"
492 },
493 {
494 "CollectPEBSRecord": "1",
495 "PublicDescription": "Counts the number of writeback transactions caused by L1 or L2 cache evictions hit the L2 cache. Requires MSR_OFFCORE_RESP[0,1] to specify request type and response. (duplicated for both MSRs)",
496 "EventCode": "0xB7",
497 "MSRValue": "0x0000040008",
498 "Counter": "0,1,2,3",
499 "UMask": "0x1",
500 "PEBScounters": "0,1,2,3",
501 "EventName": "OFFCORE_RESPONSE.COREWB.L2_HIT",
502 "PDIR_COUNTER": "na",
503 "MSRIndex": "0x1a6, 0x1a7",
504 "SampleAfterValue": "100007",
505 "BriefDescription": "Counts the number of writeback transactions caused by L1 or L2 cache evictions hit the L2 cache.",
506 "Offcore": "1"
507 },
508 {
509 "CollectPEBSRecord": "1",
510 "PublicDescription": "Counts the number of writeback transactions caused by L1 or L2 cache evictions true miss for the L2 cache with a snoop miss in the other processor module. Requires MSR_OFFCORE_RESP[0,1] to specify request type and response. (duplicated for both MSRs)",
511 "EventCode": "0xB7",
512 "MSRValue": "0x0200000008",
513 "Counter": "0,1,2,3",
514 "UMask": "0x1",
515 "PEBScounters": "0,1,2,3",
516 "EventName": "OFFCORE_RESPONSE.COREWB.L2_MISS.SNOOP_MISS_OR_NO_SNOOP_NEEDED",
517 "PDIR_COUNTER": "na",
518 "MSRIndex": "0x1a6, 0x1a7",
519 "SampleAfterValue": "100007",
520 "BriefDescription": "Counts the number of writeback transactions caused by L1 or L2 cache evictions true miss for the L2 cache with a snoop miss in the other processor module. ",
521 "Offcore": "1"
522 },
523 {
524 "CollectPEBSRecord": "1",
525 "PublicDescription": "Counts the number of writeback transactions caused by L1 or L2 cache evictions miss the L2 cache with a snoop hit in the other processor module, data forwarding is required. Requires MSR_OFFCORE_RESP[0,1] to specify request type and response. (duplicated for both MSRs)",
526 "EventCode": "0xB7",
527 "MSRValue": "0x1000000008",
528 "Counter": "0,1,2,3",
529 "UMask": "0x1",
530 "PEBScounters": "0,1,2,3",
531 "EventName": "OFFCORE_RESPONSE.COREWB.L2_MISS.HITM_OTHER_CORE",
532 "PDIR_COUNTER": "na",
533 "MSRIndex": "0x1a6, 0x1a7",
534 "SampleAfterValue": "100007",
535 "BriefDescription": "Counts the number of writeback transactions caused by L1 or L2 cache evictions miss the L2 cache with a snoop hit in the other processor module, data forwarding is required.",
536 "Offcore": "1"
537 },
538 {
539 "CollectPEBSRecord": "1",
540 "PublicDescription": "Counts the number of writeback transactions caused by L1 or L2 cache evictions outstanding, per cycle, from the time of the L2 miss to when any response is received. Requires MSR_OFFCORE_RESP[0,1] to specify request type and response. (duplicated for both MSRs)",
541 "EventCode": "0xB7",
542 "MSRValue": "0x4000000008",
543 "Counter": "0,1,2,3",
544 "UMask": "0x1",
545 "PEBScounters": "0,1,2,3",
546 "EventName": "OFFCORE_RESPONSE.COREWB.OUTSTANDING",
547 "PDIR_COUNTER": "na",
548 "MSRIndex": "0x1a6",
549 "SampleAfterValue": "100007",
550 "BriefDescription": "Counts the number of writeback transactions caused by L1 or L2 cache evictions outstanding, per cycle, from the time of the L2 miss to when any response is received.",
551 "Offcore": "1"
552 },
553 {
554 "CollectPEBSRecord": "1",
555 "PublicDescription": "Counts data cacheline reads generated by hardware L2 cache prefetcher have any transaction responses from the uncore subsystem. Requires MSR_OFFCORE_RESP[0,1] to specify request type and response. (duplicated for both MSRs)",
556 "EventCode": "0xB7",
557 "MSRValue": "0x0000010010",
558 "Counter": "0,1,2,3",
559 "UMask": "0x1",
560 "PEBScounters": "0,1,2,3",
561 "EventName": "OFFCORE_RESPONSE.PF_L2_DATA_RD.ANY_RESPONSE",
562 "PDIR_COUNTER": "na",
563 "MSRIndex": "0x1a6, 0x1a7",
564 "SampleAfterValue": "100007",
565 "BriefDescription": "Counts data cacheline reads generated by hardware L2 cache prefetcher have any transaction responses from the uncore subsystem.",
566 "Offcore": "1"
567 },
568 {
569 "CollectPEBSRecord": "1",
570 "PublicDescription": "Counts data cacheline reads generated by hardware L2 cache prefetcher hit the L2 cache. Requires MSR_OFFCORE_RESP[0,1] to specify request type and response. (duplicated for both MSRs)",
571 "EventCode": "0xB7",
572 "MSRValue": "0x0000040010",
573 "Counter": "0,1,2,3",
574 "UMask": "0x1",
575 "PEBScounters": "0,1,2,3",
576 "EventName": "OFFCORE_RESPONSE.PF_L2_DATA_RD.L2_HIT",
577 "PDIR_COUNTER": "na",
578 "MSRIndex": "0x1a6, 0x1a7",
579 "SampleAfterValue": "100007",
580 "BriefDescription": "Counts data cacheline reads generated by hardware L2 cache prefetcher hit the L2 cache.",
581 "Offcore": "1"
582 },
583 {
584 "CollectPEBSRecord": "1",
585 "PublicDescription": "Counts data cacheline reads generated by hardware L2 cache prefetcher true miss for the L2 cache with a snoop miss in the other processor module. Requires MSR_OFFCORE_RESP[0,1] to specify request type and response. (duplicated for both MSRs)",
586 "EventCode": "0xB7",
587 "MSRValue": "0x0200000010",
588 "Counter": "0,1,2,3",
589 "UMask": "0x1",
590 "PEBScounters": "0,1,2,3",
591 "EventName": "OFFCORE_RESPONSE.PF_L2_DATA_RD.L2_MISS.SNOOP_MISS_OR_NO_SNOOP_NEEDED",
592 "PDIR_COUNTER": "na",
593 "MSRIndex": "0x1a6, 0x1a7",
594 "SampleAfterValue": "100007",
595 "BriefDescription": "Counts data cacheline reads generated by hardware L2 cache prefetcher true miss for the L2 cache with a snoop miss in the other processor module. ",
596 "Offcore": "1"
597 },
598 {
599 "CollectPEBSRecord": "1",
600 "PublicDescription": "Counts data cacheline reads generated by hardware L2 cache prefetcher miss the L2 cache with a snoop hit in the other processor module, data forwarding is required. Requires MSR_OFFCORE_RESP[0,1] to specify request type and response. (duplicated for both MSRs)",
601 "EventCode": "0xB7",
602 "MSRValue": "0x1000000010",
603 "Counter": "0,1,2,3",
604 "UMask": "0x1",
605 "PEBScounters": "0,1,2,3",
606 "EventName": "OFFCORE_RESPONSE.PF_L2_DATA_RD.L2_MISS.HITM_OTHER_CORE",
607 "PDIR_COUNTER": "na",
608 "MSRIndex": "0x1a6, 0x1a7",
609 "SampleAfterValue": "100007",
610 "BriefDescription": "Counts data cacheline reads generated by hardware L2 cache prefetcher miss the L2 cache with a snoop hit in the other processor module, data forwarding is required.",
611 "Offcore": "1"
612 },
613 {
614 "CollectPEBSRecord": "1",
615 "PublicDescription": "Counts data cacheline reads generated by hardware L2 cache prefetcher outstanding, per cycle, from the time of the L2 miss to when any response is received. Requires MSR_OFFCORE_RESP[0,1] to specify request type and response. (duplicated for both MSRs)",
616 "EventCode": "0xB7",
617 "MSRValue": "0x4000000010",
618 "Counter": "0,1,2,3",
619 "UMask": "0x1",
620 "PEBScounters": "0,1,2,3",
621 "EventName": "OFFCORE_RESPONSE.PF_L2_DATA_RD.OUTSTANDING",
622 "PDIR_COUNTER": "na",
623 "MSRIndex": "0x1a6",
624 "SampleAfterValue": "100007",
625 "BriefDescription": "Counts data cacheline reads generated by hardware L2 cache prefetcher outstanding, per cycle, from the time of the L2 miss to when any response is received.",
626 "Offcore": "1"
627 },
628 {
629 "CollectPEBSRecord": "1",
630 "PublicDescription": "Counts reads for ownership (RFO) requests generated by L2 prefetcher have any transaction responses from the uncore subsystem. Requires MSR_OFFCORE_RESP[0,1] to specify request type and response. (duplicated for both MSRs)",
631 "EventCode": "0xB7",
632 "MSRValue": "0x0000010020",
633 "Counter": "0,1,2,3",
634 "UMask": "0x1",
635 "PEBScounters": "0,1,2,3",
636 "EventName": "OFFCORE_RESPONSE.PF_L2_RFO.ANY_RESPONSE",
637 "PDIR_COUNTER": "na",
638 "MSRIndex": "0x1a6, 0x1a7",
639 "SampleAfterValue": "100007",
640 "BriefDescription": "Counts reads for ownership (RFO) requests generated by L2 prefetcher have any transaction responses from the uncore subsystem.",
641 "Offcore": "1"
642 },
643 {
644 "CollectPEBSRecord": "1",
645 "PublicDescription": "Counts reads for ownership (RFO) requests generated by L2 prefetcher hit the L2 cache. Requires MSR_OFFCORE_RESP[0,1] to specify request type and response. (duplicated for both MSRs)",
646 "EventCode": "0xB7",
647 "MSRValue": "0x0000040020",
648 "Counter": "0,1,2,3",
649 "UMask": "0x1",
650 "PEBScounters": "0,1,2,3",
651 "EventName": "OFFCORE_RESPONSE.PF_L2_RFO.L2_HIT",
652 "PDIR_COUNTER": "na",
653 "MSRIndex": "0x1a6, 0x1a7",
654 "SampleAfterValue": "100007",
655 "BriefDescription": "Counts reads for ownership (RFO) requests generated by L2 prefetcher hit the L2 cache.",
656 "Offcore": "1"
657 },
658 {
659 "CollectPEBSRecord": "1",
660 "PublicDescription": "Counts reads for ownership (RFO) requests generated by L2 prefetcher true miss for the L2 cache with a snoop miss in the other processor module. Requires MSR_OFFCORE_RESP[0,1] to specify request type and response. (duplicated for both MSRs)",
661 "EventCode": "0xB7",
662 "MSRValue": "0x0200000020",
663 "Counter": "0,1,2,3",
664 "UMask": "0x1",
665 "PEBScounters": "0,1,2,3",
666 "EventName": "OFFCORE_RESPONSE.PF_L2_RFO.L2_MISS.SNOOP_MISS_OR_NO_SNOOP_NEEDED",
667 "PDIR_COUNTER": "na",
668 "MSRIndex": "0x1a6, 0x1a7",
669 "SampleAfterValue": "100007",
670 "BriefDescription": "Counts reads for ownership (RFO) requests generated by L2 prefetcher true miss for the L2 cache with a snoop miss in the other processor module. ",
671 "Offcore": "1"
672 },
673 {
674 "CollectPEBSRecord": "1",
675 "PublicDescription": "Counts reads for ownership (RFO) requests generated by L2 prefetcher miss the L2 cache with a snoop hit in the other processor module, data forwarding is required. Requires MSR_OFFCORE_RESP[0,1] to specify request type and response. (duplicated for both MSRs)",
676 "EventCode": "0xB7",
677 "MSRValue": "0x1000000020",
678 "Counter": "0,1,2,3",
679 "UMask": "0x1",
680 "PEBScounters": "0,1,2,3",
681 "EventName": "OFFCORE_RESPONSE.PF_L2_RFO.L2_MISS.HITM_OTHER_CORE",
682 "PDIR_COUNTER": "na",
683 "MSRIndex": "0x1a6, 0x1a7",
684 "SampleAfterValue": "100007",
685 "BriefDescription": "Counts reads for ownership (RFO) requests generated by L2 prefetcher miss the L2 cache with a snoop hit in the other processor module, data forwarding is required.",
686 "Offcore": "1"
687 },
688 {
689 "CollectPEBSRecord": "1",
690 "PublicDescription": "Counts reads for ownership (RFO) requests generated by L2 prefetcher outstanding, per cycle, from the time of the L2 miss to when any response is received. Requires MSR_OFFCORE_RESP[0,1] to specify request type and response. (duplicated for both MSRs)",
691 "EventCode": "0xB7",
692 "MSRValue": "0x4000000020",
693 "Counter": "0,1,2,3",
694 "UMask": "0x1",
695 "PEBScounters": "0,1,2,3",
696 "EventName": "OFFCORE_RESPONSE.PF_L2_RFO.OUTSTANDING",
697 "PDIR_COUNTER": "na",
698 "MSRIndex": "0x1a6",
699 "SampleAfterValue": "100007",
700 "BriefDescription": "Counts reads for ownership (RFO) requests generated by L2 prefetcher outstanding, per cycle, from the time of the L2 miss to when any response is received.",
701 "Offcore": "1"
702 },
703 {
704 "CollectPEBSRecord": "1",
705 "PublicDescription": "Counts bus lock and split lock requests have any transaction responses from the uncore subsystem. Requires MSR_OFFCORE_RESP[0,1] to specify request type and response. (duplicated for both MSRs)",
706 "EventCode": "0xB7",
707 "MSRValue": "0x0000010400",
708 "Counter": "0,1,2,3",
709 "UMask": "0x1",
710 "PEBScounters": "0,1,2,3",
711 "EventName": "OFFCORE_RESPONSE.BUS_LOCKS.ANY_RESPONSE",
712 "PDIR_COUNTER": "na",
713 "MSRIndex": "0x1a6, 0x1a7",
714 "SampleAfterValue": "100007",
715 "BriefDescription": "Counts bus lock and split lock requests have any transaction responses from the uncore subsystem.",
716 "Offcore": "1"
717 },
718 {
719 "CollectPEBSRecord": "1",
720 "PublicDescription": "Counts bus lock and split lock requests hit the L2 cache. Requires MSR_OFFCORE_RESP[0,1] to specify request type and response. (duplicated for both MSRs)",
721 "EventCode": "0xB7",
722 "MSRValue": "0x0000040400",
723 "Counter": "0,1,2,3",
724 "UMask": "0x1",
725 "PEBScounters": "0,1,2,3",
726 "EventName": "OFFCORE_RESPONSE.BUS_LOCKS.L2_HIT",
727 "PDIR_COUNTER": "na",
728 "MSRIndex": "0x1a6, 0x1a7",
729 "SampleAfterValue": "100007",
730 "BriefDescription": "Counts bus lock and split lock requests hit the L2 cache.",
731 "Offcore": "1"
732 },
733 {
734 "CollectPEBSRecord": "1",
735 "PublicDescription": "Counts bus lock and split lock requests true miss for the L2 cache with a snoop miss in the other processor module. Requires MSR_OFFCORE_RESP[0,1] to specify request type and response. (duplicated for both MSRs)",
736 "EventCode": "0xB7",
737 "MSRValue": "0x0200000400",
738 "Counter": "0,1,2,3",
739 "UMask": "0x1",
740 "PEBScounters": "0,1,2,3",
741 "EventName": "OFFCORE_RESPONSE.BUS_LOCKS.L2_MISS.SNOOP_MISS_OR_NO_SNOOP_NEEDED",
742 "PDIR_COUNTER": "na",
743 "MSRIndex": "0x1a6, 0x1a7",
744 "SampleAfterValue": "100007",
745 "BriefDescription": "Counts bus lock and split lock requests true miss for the L2 cache with a snoop miss in the other processor module. ",
746 "Offcore": "1"
747 },
748 {
749 "CollectPEBSRecord": "1",
750 "PublicDescription": "Counts bus lock and split lock requests miss the L2 cache with a snoop hit in the other processor module, data forwarding is required. Requires MSR_OFFCORE_RESP[0,1] to specify request type and response. (duplicated for both MSRs)",
751 "EventCode": "0xB7",
752 "MSRValue": "0x1000000400",
753 "Counter": "0,1,2,3",
754 "UMask": "0x1",
755 "PEBScounters": "0,1,2,3",
756 "EventName": "OFFCORE_RESPONSE.BUS_LOCKS.L2_MISS.HITM_OTHER_CORE",
757 "PDIR_COUNTER": "na",
758 "MSRIndex": "0x1a6, 0x1a7",
759 "SampleAfterValue": "100007",
760 "BriefDescription": "Counts bus lock and split lock requests miss the L2 cache with a snoop hit in the other processor module, data forwarding is required.",
761 "Offcore": "1"
762 },
763 {
764 "CollectPEBSRecord": "1",
765 "PublicDescription": "Counts bus lock and split lock requests outstanding, per cycle, from the time of the L2 miss to when any response is received. Requires MSR_OFFCORE_RESP[0,1] to specify request type and response. (duplicated for both MSRs)",
766 "EventCode": "0xB7",
767 "MSRValue": "0x4000000400",
768 "Counter": "0,1,2,3",
769 "UMask": "0x1",
770 "PEBScounters": "0,1,2,3",
771 "EventName": "OFFCORE_RESPONSE.BUS_LOCKS.OUTSTANDING",
772 "PDIR_COUNTER": "na",
773 "MSRIndex": "0x1a6",
774 "SampleAfterValue": "100007",
775 "BriefDescription": "Counts bus lock and split lock requests outstanding, per cycle, from the time of the L2 miss to when any response is received.",
776 "Offcore": "1"
777 },
778 {
779 "CollectPEBSRecord": "1",
780 "PublicDescription": "Counts full cache line data writes to uncacheable write combining (USWC) memory region and full cache-line non-temporal writes have any transaction responses from the uncore subsystem. Requires MSR_OFFCORE_RESP[0,1] to specify request type and response. (duplicated for both MSRs)",
781 "EventCode": "0xB7",
782 "MSRValue": "0x0000010800",
783 "Counter": "0,1,2,3",
784 "UMask": "0x1",
785 "PEBScounters": "0,1,2,3",
786 "EventName": "OFFCORE_RESPONSE.FULL_STREAMING_STORES.ANY_RESPONSE",
787 "PDIR_COUNTER": "na",
788 "MSRIndex": "0x1a6, 0x1a7",
789 "SampleAfterValue": "100007",
790 "BriefDescription": "Counts full cache line data writes to uncacheable write combining (USWC) memory region and full cache-line non-temporal writes have any transaction responses from the uncore subsystem.",
791 "Offcore": "1"
792 },
793 {
794 "CollectPEBSRecord": "1",
795 "PublicDescription": "Counts full cache line data writes to uncacheable write combining (USWC) memory region and full cache-line non-temporal writes hit the L2 cache. Requires MSR_OFFCORE_RESP[0,1] to specify request type and response. (duplicated for both MSRs)",
796 "EventCode": "0xB7",
797 "MSRValue": "0x0000040800",
798 "Counter": "0,1,2,3",
799 "UMask": "0x1",
800 "PEBScounters": "0,1,2,3",
801 "EventName": "OFFCORE_RESPONSE.FULL_STREAMING_STORES.L2_HIT",
802 "PDIR_COUNTER": "na",
803 "MSRIndex": "0x1a6, 0x1a7",
804 "SampleAfterValue": "100007",
805 "BriefDescription": "Counts full cache line data writes to uncacheable write combining (USWC) memory region and full cache-line non-temporal writes hit the L2 cache.",
806 "Offcore": "1"
807 },
808 {
809 "CollectPEBSRecord": "1",
810 "PublicDescription": "Counts full cache line data writes to uncacheable write combining (USWC) memory region and full cache-line non-temporal writes true miss for the L2 cache with a snoop miss in the other processor module. Requires MSR_OFFCORE_RESP[0,1] to specify request type and response. (duplicated for both MSRs)",
811 "EventCode": "0xB7",
812 "MSRValue": "0x0200000800",
813 "Counter": "0,1,2,3",
814 "UMask": "0x1",
815 "PEBScounters": "0,1,2,3",
816 "EventName": "OFFCORE_RESPONSE.FULL_STREAMING_STORES.L2_MISS.SNOOP_MISS_OR_NO_SNOOP_NEEDED",
817 "PDIR_COUNTER": "na",
818 "MSRIndex": "0x1a6, 0x1a7",
819 "SampleAfterValue": "100007",
820 "BriefDescription": "Counts full cache line data writes to uncacheable write combining (USWC) memory region and full cache-line non-temporal writes true miss for the L2 cache with a snoop miss in the other processor module. ",
821 "Offcore": "1"
822 },
823 {
824 "CollectPEBSRecord": "1",
825 "PublicDescription": "Counts full cache line data writes to uncacheable write combining (USWC) memory region and full cache-line non-temporal writes miss the L2 cache with a snoop hit in the other processor module, data forwarding is required. Requires MSR_OFFCORE_RESP[0,1] to specify request type and response. (duplicated for both MSRs)",
826 "EventCode": "0xB7",
827 "MSRValue": "0x1000000800",
828 "Counter": "0,1,2,3",
829 "UMask": "0x1",
830 "PEBScounters": "0,1,2,3",
831 "EventName": "OFFCORE_RESPONSE.FULL_STREAMING_STORES.L2_MISS.HITM_OTHER_CORE",
832 "PDIR_COUNTER": "na",
833 "MSRIndex": "0x1a6, 0x1a7",
834 "SampleAfterValue": "100007",
835 "BriefDescription": "Counts full cache line data writes to uncacheable write combining (USWC) memory region and full cache-line non-temporal writes miss the L2 cache with a snoop hit in the other processor module, data forwarding is required.",
836 "Offcore": "1"
837 },
838 {
839 "CollectPEBSRecord": "1",
840 "PublicDescription": "Counts full cache line data writes to uncacheable write combining (USWC) memory region and full cache-line non-temporal writes outstanding, per cycle, from the time of the L2 miss to when any response is received. Requires MSR_OFFCORE_RESP[0,1] to specify request type and response. (duplicated for both MSRs)",
841 "EventCode": "0xB7",
842 "MSRValue": "0x4000000800",
843 "Counter": "0,1,2,3",
844 "UMask": "0x1",
845 "PEBScounters": "0,1,2,3",
846 "EventName": "OFFCORE_RESPONSE.FULL_STREAMING_STORES.OUTSTANDING",
847 "PDIR_COUNTER": "na",
848 "MSRIndex": "0x1a6",
849 "SampleAfterValue": "100007",
850 "BriefDescription": "Counts full cache line data writes to uncacheable write combining (USWC) memory region and full cache-line non-temporal writes outstanding, per cycle, from the time of the L2 miss to when any response is received.",
851 "Offcore": "1"
852 },
853 {
854 "CollectPEBSRecord": "1",
855 "PublicDescription": "Counts data cache lines requests by software prefetch instructions have any transaction responses from the uncore subsystem. Requires MSR_OFFCORE_RESP[0,1] to specify request type and response. (duplicated for both MSRs)",
856 "EventCode": "0xB7",
857 "MSRValue": "0x0000011000",
858 "Counter": "0,1,2,3",
859 "UMask": "0x1",
860 "PEBScounters": "0,1,2,3",
861 "EventName": "OFFCORE_RESPONSE.SW_PREFETCH.ANY_RESPONSE",
862 "PDIR_COUNTER": "na",
863 "MSRIndex": "0x1a6, 0x1a7",
864 "SampleAfterValue": "100007",
865 "BriefDescription": "Counts data cache lines requests by software prefetch instructions have any transaction responses from the uncore subsystem.",
866 "Offcore": "1"
867 },
868 {
869 "CollectPEBSRecord": "1",
870 "PublicDescription": "Counts data cache lines requests by software prefetch instructions hit the L2 cache. Requires MSR_OFFCORE_RESP[0,1] to specify request type and response. (duplicated for both MSRs)",
871 "EventCode": "0xB7",
872 "MSRValue": "0x0000041000",
873 "Counter": "0,1,2,3",
874 "UMask": "0x1",
875 "PEBScounters": "0,1,2,3",
876 "EventName": "OFFCORE_RESPONSE.SW_PREFETCH.L2_HIT",
877 "PDIR_COUNTER": "na",
878 "MSRIndex": "0x1a6, 0x1a7",
879 "SampleAfterValue": "100007",
880 "BriefDescription": "Counts data cache lines requests by software prefetch instructions hit the L2 cache.",
881 "Offcore": "1"
882 },
883 {
884 "CollectPEBSRecord": "1",
885 "PublicDescription": "Counts data cache lines requests by software prefetch instructions true miss for the L2 cache with a snoop miss in the other processor module. Requires MSR_OFFCORE_RESP[0,1] to specify request type and response. (duplicated for both MSRs)",
886 "EventCode": "0xB7",
887 "MSRValue": "0x0200001000",
888 "Counter": "0,1,2,3",
889 "UMask": "0x1",
890 "PEBScounters": "0,1,2,3",
891 "EventName": "OFFCORE_RESPONSE.SW_PREFETCH.L2_MISS.SNOOP_MISS_OR_NO_SNOOP_NEEDED",
892 "PDIR_COUNTER": "na",
893 "MSRIndex": "0x1a6, 0x1a7",
894 "SampleAfterValue": "100007",
895 "BriefDescription": "Counts data cache lines requests by software prefetch instructions true miss for the L2 cache with a snoop miss in the other processor module. ",
896 "Offcore": "1"
897 },
898 {
899 "CollectPEBSRecord": "1",
900 "PublicDescription": "Counts data cache lines requests by software prefetch instructions miss the L2 cache with a snoop hit in the other processor module, data forwarding is required. Requires MSR_OFFCORE_RESP[0,1] to specify request type and response. (duplicated for both MSRs)",
901 "EventCode": "0xB7",
902 "MSRValue": "0x1000001000",
903 "Counter": "0,1,2,3",
904 "UMask": "0x1",
905 "PEBScounters": "0,1,2,3",
906 "EventName": "OFFCORE_RESPONSE.SW_PREFETCH.L2_MISS.HITM_OTHER_CORE",
907 "PDIR_COUNTER": "na",
908 "MSRIndex": "0x1a6, 0x1a7",
909 "SampleAfterValue": "100007",
910 "BriefDescription": "Counts data cache lines requests by software prefetch instructions miss the L2 cache with a snoop hit in the other processor module, data forwarding is required.",
911 "Offcore": "1"
912 },
913 {
914 "CollectPEBSRecord": "1",
915 "PublicDescription": "Counts data cache lines requests by software prefetch instructions outstanding, per cycle, from the time of the L2 miss to when any response is received. Requires MSR_OFFCORE_RESP[0,1] to specify request type and response. (duplicated for both MSRs)",
916 "EventCode": "0xB7",
917 "MSRValue": "0x4000001000",
918 "Counter": "0,1,2,3",
919 "UMask": "0x1",
920 "PEBScounters": "0,1,2,3",
921 "EventName": "OFFCORE_RESPONSE.SW_PREFETCH.OUTSTANDING",
922 "PDIR_COUNTER": "na",
923 "MSRIndex": "0x1a6",
924 "SampleAfterValue": "100007",
925 "BriefDescription": "Counts data cache lines requests by software prefetch instructions outstanding, per cycle, from the time of the L2 miss to when any response is received.",
926 "Offcore": "1"
927 },
928 {
929 "CollectPEBSRecord": "1",
930 "PublicDescription": "Counts data cache line reads generated by hardware L1 data cache prefetcher have any transaction responses from the uncore subsystem. Requires MSR_OFFCORE_RESP[0,1] to specify request type and response. (duplicated for both MSRs)",
931 "EventCode": "0xB7",
932 "MSRValue": "0x0000012000",
933 "Counter": "0,1,2,3",
934 "UMask": "0x1",
935 "PEBScounters": "0,1,2,3",
936 "EventName": "OFFCORE_RESPONSE.PF_L1_DATA_RD.ANY_RESPONSE",
937 "PDIR_COUNTER": "na",
938 "MSRIndex": "0x1a6, 0x1a7",
939 "SampleAfterValue": "100007",
940 "BriefDescription": "Counts data cache line reads generated by hardware L1 data cache prefetcher have any transaction responses from the uncore subsystem.",
941 "Offcore": "1"
942 },
943 {
944 "CollectPEBSRecord": "1",
945 "PublicDescription": "Counts data cache line reads generated by hardware L1 data cache prefetcher hit the L2 cache. Requires MSR_OFFCORE_RESP[0,1] to specify request type and response. (duplicated for both MSRs)",
946 "EventCode": "0xB7",
947 "MSRValue": "0x0000042000",
948 "Counter": "0,1,2,3",
949 "UMask": "0x1",
950 "PEBScounters": "0,1,2,3",
951 "EventName": "OFFCORE_RESPONSE.PF_L1_DATA_RD.L2_HIT",
952 "PDIR_COUNTER": "na",
953 "MSRIndex": "0x1a6, 0x1a7",
954 "SampleAfterValue": "100007",
955 "BriefDescription": "Counts data cache line reads generated by hardware L1 data cache prefetcher hit the L2 cache.",
956 "Offcore": "1"
957 },
958 {
959 "CollectPEBSRecord": "1",
960 "PublicDescription": "Counts data cache line reads generated by hardware L1 data cache prefetcher true miss for the L2 cache with a snoop miss in the other processor module. Requires MSR_OFFCORE_RESP[0,1] to specify request type and response. (duplicated for both MSRs)",
961 "EventCode": "0xB7",
962 "MSRValue": "0x0200002000",
963 "Counter": "0,1,2,3",
964 "UMask": "0x1",
965 "PEBScounters": "0,1,2,3",
966 "EventName": "OFFCORE_RESPONSE.PF_L1_DATA_RD.L2_MISS.SNOOP_MISS_OR_NO_SNOOP_NEEDED",
967 "PDIR_COUNTER": "na",
968 "MSRIndex": "0x1a6, 0x1a7",
969 "SampleAfterValue": "100007",
970 "BriefDescription": "Counts data cache line reads generated by hardware L1 data cache prefetcher true miss for the L2 cache with a snoop miss in the other processor module. ",
971 "Offcore": "1"
972 },
973 {
974 "CollectPEBSRecord": "1",
975 "PublicDescription": "Counts data cache line reads generated by hardware L1 data cache prefetcher miss the L2 cache with a snoop hit in the other processor module, data forwarding is required. Requires MSR_OFFCORE_RESP[0,1] to specify request type and response. (duplicated for both MSRs)",
976 "EventCode": "0xB7",
977 "MSRValue": "0x1000002000",
978 "Counter": "0,1,2,3",
979 "UMask": "0x1",
980 "PEBScounters": "0,1,2,3",
981 "EventName": "OFFCORE_RESPONSE.PF_L1_DATA_RD.L2_MISS.HITM_OTHER_CORE",
982 "PDIR_COUNTER": "na",
983 "MSRIndex": "0x1a6, 0x1a7",
984 "SampleAfterValue": "100007",
985 "BriefDescription": "Counts data cache line reads generated by hardware L1 data cache prefetcher miss the L2 cache with a snoop hit in the other processor module, data forwarding is required.",
986 "Offcore": "1"
987 },
988 {
989 "CollectPEBSRecord": "1",
990 "PublicDescription": "Counts data cache line reads generated by hardware L1 data cache prefetcher outstanding, per cycle, from the time of the L2 miss to when any response is received. Requires MSR_OFFCORE_RESP[0,1] to specify request type and response. (duplicated for both MSRs)",
991 "EventCode": "0xB7",
992 "MSRValue": "0x4000002000",
993 "Counter": "0,1,2,3",
994 "UMask": "0x1",
995 "PEBScounters": "0,1,2,3",
996 "EventName": "OFFCORE_RESPONSE.PF_L1_DATA_RD.OUTSTANDING",
997 "PDIR_COUNTER": "na",
998 "MSRIndex": "0x1a6",
999 "SampleAfterValue": "100007",
1000 "BriefDescription": "Counts data cache line reads generated by hardware L1 data cache prefetcher outstanding, per cycle, from the time of the L2 miss to when any response is received.",
1001 "Offcore": "1"
1002 },
1003 {
1004 "CollectPEBSRecord": "1",
1005 "PublicDescription": "Counts any data writes to uncacheable write combining (USWC) memory region have any transaction responses from the uncore subsystem. Requires MSR_OFFCORE_RESP[0,1] to specify request type and response. (duplicated for both MSRs)",
1006 "EventCode": "0xB7",
1007 "MSRValue": "0x0000014800",
1008 "Counter": "0,1,2,3",
1009 "UMask": "0x1",
1010 "PEBScounters": "0,1,2,3",
1011 "EventName": "OFFCORE_RESPONSE.STREAMING_STORES.ANY_RESPONSE",
1012 "PDIR_COUNTER": "na",
1013 "MSRIndex": "0x1a6, 0x1a7",
1014 "SampleAfterValue": "100007",
1015 "BriefDescription": "Counts any data writes to uncacheable write combining (USWC) memory region have any transaction responses from the uncore subsystem.",
1016 "Offcore": "1"
1017 },
1018 {
1019 "CollectPEBSRecord": "1",
1020 "PublicDescription": "Counts any data writes to uncacheable write combining (USWC) memory region hit the L2 cache. Requires MSR_OFFCORE_RESP[0,1] to specify request type and response. (duplicated for both MSRs)",
1021 "EventCode": "0xB7",
1022 "MSRValue": "0x0000044800",
1023 "Counter": "0,1,2,3",
1024 "UMask": "0x1",
1025 "PEBScounters": "0,1,2,3",
1026 "EventName": "OFFCORE_RESPONSE.STREAMING_STORES.L2_HIT",
1027 "PDIR_COUNTER": "na",
1028 "MSRIndex": "0x1a6, 0x1a7",
1029 "SampleAfterValue": "100007",
1030 "BriefDescription": "Counts any data writes to uncacheable write combining (USWC) memory region hit the L2 cache.",
1031 "Offcore": "1"
1032 },
1033 {
1034 "CollectPEBSRecord": "1",
1035 "PublicDescription": "Counts any data writes to uncacheable write combining (USWC) memory region true miss for the L2 cache with a snoop miss in the other processor module. Requires MSR_OFFCORE_RESP[0,1] to specify request type and response. (duplicated for both MSRs)",
1036 "EventCode": "0xB7",
1037 "MSRValue": "0x0200004800",
1038 "Counter": "0,1,2,3",
1039 "UMask": "0x1",
1040 "PEBScounters": "0,1,2,3",
1041 "EventName": "OFFCORE_RESPONSE.STREAMING_STORES.L2_MISS.SNOOP_MISS_OR_NO_SNOOP_NEEDED",
1042 "PDIR_COUNTER": "na",
1043 "MSRIndex": "0x1a6, 0x1a7",
1044 "SampleAfterValue": "100007",
1045 "BriefDescription": "Counts any data writes to uncacheable write combining (USWC) memory region true miss for the L2 cache with a snoop miss in the other processor module. ",
1046 "Offcore": "1"
1047 },
1048 {
1049 "CollectPEBSRecord": "1",
1050 "PublicDescription": "Counts any data writes to uncacheable write combining (USWC) memory region miss the L2 cache with a snoop hit in the other processor module, data forwarding is required. Requires MSR_OFFCORE_RESP[0,1] to specify request type and response. (duplicated for both MSRs)",
1051 "EventCode": "0xB7",
1052 "MSRValue": "0x1000004800",
1053 "Counter": "0,1,2,3",
1054 "UMask": "0x1",
1055 "PEBScounters": "0,1,2,3",
1056 "EventName": "OFFCORE_RESPONSE.STREAMING_STORES.L2_MISS.HITM_OTHER_CORE",
1057 "PDIR_COUNTER": "na",
1058 "MSRIndex": "0x1a6, 0x1a7",
1059 "SampleAfterValue": "100007",
1060 "BriefDescription": "Counts any data writes to uncacheable write combining (USWC) memory region miss the L2 cache with a snoop hit in the other processor module, data forwarding is required.",
1061 "Offcore": "1"
1062 },
1063 {
1064 "CollectPEBSRecord": "1",
1065 "PublicDescription": "Counts any data writes to uncacheable write combining (USWC) memory region outstanding, per cycle, from the time of the L2 miss to when any response is received. Requires MSR_OFFCORE_RESP[0,1] to specify request type and response. (duplicated for both MSRs)",
1066 "EventCode": "0xB7",
1067 "MSRValue": "0x4000004800",
1068 "Counter": "0,1,2,3",
1069 "UMask": "0x1",
1070 "PEBScounters": "0,1,2,3",
1071 "EventName": "OFFCORE_RESPONSE.STREAMING_STORES.OUTSTANDING",
1072 "PDIR_COUNTER": "na",
1073 "MSRIndex": "0x1a6",
1074 "SampleAfterValue": "100007",
1075 "BriefDescription": "Counts any data writes to uncacheable write combining (USWC) memory region outstanding, per cycle, from the time of the L2 miss to when any response is received.",
1076 "Offcore": "1"
1077 },
1078 {
1079 "CollectPEBSRecord": "1",
1080 "PublicDescription": "Counts requests to the uncore subsystem have any transaction responses from the uncore subsystem. Requires MSR_OFFCORE_RESP[0,1] to specify request type and response. (duplicated for both MSRs)",
1081 "EventCode": "0xB7",
1082 "MSRValue": "0x0000018000",
1083 "Counter": "0,1,2,3",
1084 "UMask": "0x1",
1085 "PEBScounters": "0,1,2,3",
1086 "EventName": "OFFCORE_RESPONSE.ANY_REQUEST.ANY_RESPONSE",
1087 "PDIR_COUNTER": "na",
1088 "MSRIndex": "0x1a6, 0x1a7",
1089 "SampleAfterValue": "100007",
1090 "BriefDescription": "Counts requests to the uncore subsystem have any transaction responses from the uncore subsystem.",
1091 "Offcore": "1"
1092 },
1093 {
1094 "CollectPEBSRecord": "1",
1095 "PublicDescription": "Counts requests to the uncore subsystem hit the L2 cache. Requires MSR_OFFCORE_RESP[0,1] to specify request type and response. (duplicated for both MSRs)",
1096 "EventCode": "0xB7",
1097 "MSRValue": "0x0000048000",
1098 "Counter": "0,1,2,3",
1099 "UMask": "0x1",
1100 "PEBScounters": "0,1,2,3",
1101 "EventName": "OFFCORE_RESPONSE.ANY_REQUEST.L2_HIT",
1102 "PDIR_COUNTER": "na",
1103 "MSRIndex": "0x1a6, 0x1a7",
1104 "SampleAfterValue": "100007",
1105 "BriefDescription": "Counts requests to the uncore subsystem hit the L2 cache.",
1106 "Offcore": "1"
1107 },
1108 {
1109 "CollectPEBSRecord": "1",
1110 "PublicDescription": "Counts requests to the uncore subsystem true miss for the L2 cache with a snoop miss in the other processor module. Requires MSR_OFFCORE_RESP[0,1] to specify request type and response. (duplicated for both MSRs)",
1111 "EventCode": "0xB7",
1112 "MSRValue": "0x0200008000",
1113 "Counter": "0,1,2,3",
1114 "UMask": "0x1",
1115 "PEBScounters": "0,1,2,3",
1116 "EventName": "OFFCORE_RESPONSE.ANY_REQUEST.L2_MISS.SNOOP_MISS_OR_NO_SNOOP_NEEDED",
1117 "PDIR_COUNTER": "na",
1118 "MSRIndex": "0x1a6, 0x1a7",
1119 "SampleAfterValue": "100007",
1120 "BriefDescription": "Counts requests to the uncore subsystem true miss for the L2 cache with a snoop miss in the other processor module. ",
1121 "Offcore": "1"
1122 },
1123 {
1124 "CollectPEBSRecord": "1",
1125 "PublicDescription": "Counts requests to the uncore subsystem miss the L2 cache with a snoop hit in the other processor module, data forwarding is required. Requires MSR_OFFCORE_RESP[0,1] to specify request type and response. (duplicated for both MSRs)",
1126 "EventCode": "0xB7",
1127 "MSRValue": "0x1000008000",
1128 "Counter": "0,1,2,3",
1129 "UMask": "0x1",
1130 "PEBScounters": "0,1,2,3",
1131 "EventName": "OFFCORE_RESPONSE.ANY_REQUEST.L2_MISS.HITM_OTHER_CORE",
1132 "PDIR_COUNTER": "na",
1133 "MSRIndex": "0x1a6, 0x1a7",
1134 "SampleAfterValue": "100007",
1135 "BriefDescription": "Counts requests to the uncore subsystem miss the L2 cache with a snoop hit in the other processor module, data forwarding is required.",
1136 "Offcore": "1"
1137 },
1138 {
1139 "CollectPEBSRecord": "1",
1140 "PublicDescription": "Counts requests to the uncore subsystem outstanding, per cycle, from the time of the L2 miss to when any response is received. Requires MSR_OFFCORE_RESP[0,1] to specify request type and response. (duplicated for both MSRs)",
1141 "EventCode": "0xB7",
1142 "MSRValue": "0x4000008000",
1143 "Counter": "0,1,2,3",
1144 "UMask": "0x1",
1145 "PEBScounters": "0,1,2,3",
1146 "EventName": "OFFCORE_RESPONSE.ANY_REQUEST.OUTSTANDING",
1147 "PDIR_COUNTER": "na",
1148 "MSRIndex": "0x1a6",
1149 "SampleAfterValue": "100007",
1150 "BriefDescription": "Counts requests to the uncore subsystem outstanding, per cycle, from the time of the L2 miss to when any response is received.",
1151 "Offcore": "1"
1152 },
1153 {
1154 "CollectPEBSRecord": "1",
1155 "PublicDescription": "Counts data reads generated by L1 or L2 prefetchers have any transaction responses from the uncore subsystem. Requires MSR_OFFCORE_RESP[0,1] to specify request type and response. (duplicated for both MSRs)",
1156 "EventCode": "0xB7",
1157 "MSRValue": "0x0000013010",
1158 "Counter": "0,1,2,3",
1159 "UMask": "0x1",
1160 "PEBScounters": "0,1,2,3",
1161 "EventName": "OFFCORE_RESPONSE.ANY_PF_DATA_RD.ANY_RESPONSE",
1162 "PDIR_COUNTER": "na",
1163 "MSRIndex": "0x1a6, 0x1a7",
1164 "SampleAfterValue": "100007",
1165 "BriefDescription": "Counts data reads generated by L1 or L2 prefetchers have any transaction responses from the uncore subsystem.",
1166 "Offcore": "1"
1167 },
1168 {
1169 "CollectPEBSRecord": "1",
1170 "PublicDescription": "Counts data reads generated by L1 or L2 prefetchers hit the L2 cache. Requires MSR_OFFCORE_RESP[0,1] to specify request type and response. (duplicated for both MSRs)",
1171 "EventCode": "0xB7",
1172 "MSRValue": "0x0000043010",
1173 "Counter": "0,1,2,3",
1174 "UMask": "0x1",
1175 "PEBScounters": "0,1,2,3",
1176 "EventName": "OFFCORE_RESPONSE.ANY_PF_DATA_RD.L2_HIT",
1177 "PDIR_COUNTER": "na",
1178 "MSRIndex": "0x1a6, 0x1a7",
1179 "SampleAfterValue": "100007",
1180 "BriefDescription": "Counts data reads generated by L1 or L2 prefetchers hit the L2 cache.",
1181 "Offcore": "1"
1182 },
1183 {
1184 "CollectPEBSRecord": "1",
1185 "PublicDescription": "Counts data reads generated by L1 or L2 prefetchers true miss for the L2 cache with a snoop miss in the other processor module. Requires MSR_OFFCORE_RESP[0,1] to specify request type and response. (duplicated for both MSRs)",
1186 "EventCode": "0xB7",
1187 "MSRValue": "0x0200003010",
1188 "Counter": "0,1,2,3",
1189 "UMask": "0x1",
1190 "PEBScounters": "0,1,2,3",
1191 "EventName": "OFFCORE_RESPONSE.ANY_PF_DATA_RD.L2_MISS.SNOOP_MISS_OR_NO_SNOOP_NEEDED",
1192 "PDIR_COUNTER": "na",
1193 "MSRIndex": "0x1a6, 0x1a7",
1194 "SampleAfterValue": "100007",
1195 "BriefDescription": "Counts data reads generated by L1 or L2 prefetchers true miss for the L2 cache with a snoop miss in the other processor module. ",
1196 "Offcore": "1"
1197 },
1198 {
1199 "CollectPEBSRecord": "1",
1200 "PublicDescription": "Counts data reads generated by L1 or L2 prefetchers miss the L2 cache with a snoop hit in the other processor module, data forwarding is required. Requires MSR_OFFCORE_RESP[0,1] to specify request type and response. (duplicated for both MSRs)",
1201 "EventCode": "0xB7",
1202 "MSRValue": "0x1000003010",
1203 "Counter": "0,1,2,3",
1204 "UMask": "0x1",
1205 "PEBScounters": "0,1,2,3",
1206 "EventName": "OFFCORE_RESPONSE.ANY_PF_DATA_RD.L2_MISS.HITM_OTHER_CORE",
1207 "PDIR_COUNTER": "na",
1208 "MSRIndex": "0x1a6, 0x1a7",
1209 "SampleAfterValue": "100007",
1210 "BriefDescription": "Counts data reads generated by L1 or L2 prefetchers miss the L2 cache with a snoop hit in the other processor module, data forwarding is required.",
1211 "Offcore": "1"
1212 },
1213 {
1214 "CollectPEBSRecord": "1",
1215 "PublicDescription": "Counts data reads generated by L1 or L2 prefetchers outstanding, per cycle, from the time of the L2 miss to when any response is received. Requires MSR_OFFCORE_RESP[0,1] to specify request type and response. (duplicated for both MSRs)",
1216 "EventCode": "0xB7",
1217 "MSRValue": "0x4000003010",
1218 "Counter": "0,1,2,3",
1219 "UMask": "0x1",
1220 "PEBScounters": "0,1,2,3",
1221 "EventName": "OFFCORE_RESPONSE.ANY_PF_DATA_RD.OUTSTANDING",
1222 "PDIR_COUNTER": "na",
1223 "MSRIndex": "0x1a6",
1224 "SampleAfterValue": "100007",
1225 "BriefDescription": "Counts data reads generated by L1 or L2 prefetchers outstanding, per cycle, from the time of the L2 miss to when any response is received.",
1226 "Offcore": "1"
1227 },
1228 {
1229 "CollectPEBSRecord": "1",
1230 "PublicDescription": "Counts data reads (demand & prefetch) have any transaction responses from the uncore subsystem. Requires MSR_OFFCORE_RESP[0,1] to specify request type and response. (duplicated for both MSRs)",
1231 "EventCode": "0xB7",
1232 "MSRValue": "0x0000013091",
1233 "Counter": "0,1,2,3",
1234 "UMask": "0x1",
1235 "PEBScounters": "0,1,2,3",
1236 "EventName": "OFFCORE_RESPONSE.ANY_DATA_RD.ANY_RESPONSE",
1237 "PDIR_COUNTER": "na",
1238 "MSRIndex": "0x1a6, 0x1a7",
1239 "SampleAfterValue": "100007",
1240 "BriefDescription": "Counts data reads (demand & prefetch) have any transaction responses from the uncore subsystem.",
1241 "Offcore": "1"
1242 },
1243 {
1244 "CollectPEBSRecord": "1",
1245 "PublicDescription": "Counts data reads (demand & prefetch) hit the L2 cache. Requires MSR_OFFCORE_RESP[0,1] to specify request type and response. (duplicated for both MSRs)",
1246 "EventCode": "0xB7",
1247 "MSRValue": "0x0000043091",
1248 "Counter": "0,1,2,3",
1249 "UMask": "0x1",
1250 "PEBScounters": "0,1,2,3",
1251 "EventName": "OFFCORE_RESPONSE.ANY_DATA_RD.L2_HIT",
1252 "PDIR_COUNTER": "na",
1253 "MSRIndex": "0x1a6, 0x1a7",
1254 "SampleAfterValue": "100007",
1255 "BriefDescription": "Counts data reads (demand & prefetch) hit the L2 cache.",
1256 "Offcore": "1"
1257 },
1258 {
1259 "CollectPEBSRecord": "1",
1260 "PublicDescription": "Counts data reads (demand & prefetch) true miss for the L2 cache with a snoop miss in the other processor module. Requires MSR_OFFCORE_RESP[0,1] to specify request type and response. (duplicated for both MSRs)",
1261 "EventCode": "0xB7",
1262 "MSRValue": "0x0200003091",
1263 "Counter": "0,1,2,3",
1264 "UMask": "0x1",
1265 "PEBScounters": "0,1,2,3",
1266 "EventName": "OFFCORE_RESPONSE.ANY_DATA_RD.L2_MISS.SNOOP_MISS_OR_NO_SNOOP_NEEDED",
1267 "PDIR_COUNTER": "na",
1268 "MSRIndex": "0x1a6, 0x1a7",
1269 "SampleAfterValue": "100007",
1270 "BriefDescription": "Counts data reads (demand & prefetch) true miss for the L2 cache with a snoop miss in the other processor module. ",
1271 "Offcore": "1"
1272 },
1273 {
1274 "CollectPEBSRecord": "1",
1275 "PublicDescription": "Counts data reads (demand & prefetch) miss the L2 cache with a snoop hit in the other processor module, data forwarding is required. Requires MSR_OFFCORE_RESP[0,1] to specify request type and response. (duplicated for both MSRs)",
1276 "EventCode": "0xB7",
1277 "MSRValue": "0x1000003091",
1278 "Counter": "0,1,2,3",
1279 "UMask": "0x1",
1280 "PEBScounters": "0,1,2,3",
1281 "EventName": "OFFCORE_RESPONSE.ANY_DATA_RD.L2_MISS.HITM_OTHER_CORE",
1282 "PDIR_COUNTER": "na",
1283 "MSRIndex": "0x1a6, 0x1a7",
1284 "SampleAfterValue": "100007",
1285 "BriefDescription": "Counts data reads (demand & prefetch) miss the L2 cache with a snoop hit in the other processor module, data forwarding is required.",
1286 "Offcore": "1"
1287 },
1288 {
1289 "CollectPEBSRecord": "1",
1290 "PublicDescription": "Counts data reads (demand & prefetch) outstanding, per cycle, from the time of the L2 miss to when any response is received. Requires MSR_OFFCORE_RESP[0,1] to specify request type and response. (duplicated for both MSRs)",
1291 "EventCode": "0xB7",
1292 "MSRValue": "0x4000003091",
1293 "Counter": "0,1,2,3",
1294 "UMask": "0x1",
1295 "PEBScounters": "0,1,2,3",
1296 "EventName": "OFFCORE_RESPONSE.ANY_DATA_RD.OUTSTANDING",
1297 "PDIR_COUNTER": "na",
1298 "MSRIndex": "0x1a6",
1299 "SampleAfterValue": "100007",
1300 "BriefDescription": "Counts data reads (demand & prefetch) outstanding, per cycle, from the time of the L2 miss to when any response is received.",
1301 "Offcore": "1"
1302 },
1303 {
1304 "CollectPEBSRecord": "1",
1305 "PublicDescription": "Counts reads for ownership (RFO) requests (demand & prefetch) have any transaction responses from the uncore subsystem. Requires MSR_OFFCORE_RESP[0,1] to specify request type and response. (duplicated for both MSRs)",
1306 "EventCode": "0xB7",
1307 "MSRValue": "0x0000010022",
1308 "Counter": "0,1,2,3",
1309 "UMask": "0x1",
1310 "PEBScounters": "0,1,2,3",
1311 "EventName": "OFFCORE_RESPONSE.ANY_RFO.ANY_RESPONSE",
1312 "PDIR_COUNTER": "na",
1313 "MSRIndex": "0x1a6, 0x1a7",
1314 "SampleAfterValue": "100007",
1315 "BriefDescription": "Counts reads for ownership (RFO) requests (demand & prefetch) have any transaction responses from the uncore subsystem.",
1316 "Offcore": "1"
1317 },
1318 {
1319 "CollectPEBSRecord": "1",
1320 "PublicDescription": "Counts reads for ownership (RFO) requests (demand & prefetch) hit the L2 cache. Requires MSR_OFFCORE_RESP[0,1] to specify request type and response. (duplicated for both MSRs)",
1321 "EventCode": "0xB7",
1322 "MSRValue": "0x0000040022",
1323 "Counter": "0,1,2,3",
1324 "UMask": "0x1",
1325 "PEBScounters": "0,1,2,3",
1326 "EventName": "OFFCORE_RESPONSE.ANY_RFO.L2_HIT",
1327 "PDIR_COUNTER": "na",
1328 "MSRIndex": "0x1a6, 0x1a7",
1329 "SampleAfterValue": "100007",
1330 "BriefDescription": "Counts reads for ownership (RFO) requests (demand & prefetch) hit the L2 cache.",
1331 "Offcore": "1"
1332 },
1333 {
1334 "CollectPEBSRecord": "1",
1335 "PublicDescription": "Counts reads for ownership (RFO) requests (demand & prefetch) true miss for the L2 cache with a snoop miss in the other processor module. Requires MSR_OFFCORE_RESP[0,1] to specify request type and response. (duplicated for both MSRs)",
1336 "EventCode": "0xB7",
1337 "MSRValue": "0x0200000022",
1338 "Counter": "0,1,2,3",
1339 "UMask": "0x1",
1340 "PEBScounters": "0,1,2,3",
1341 "EventName": "OFFCORE_RESPONSE.ANY_RFO.L2_MISS.SNOOP_MISS_OR_NO_SNOOP_NEEDED",
1342 "PDIR_COUNTER": "na",
1343 "MSRIndex": "0x1a6, 0x1a7",
1344 "SampleAfterValue": "100007",
1345 "BriefDescription": "Counts reads for ownership (RFO) requests (demand & prefetch) true miss for the L2 cache with a snoop miss in the other processor module. ",
1346 "Offcore": "1"
1347 },
1348 {
1349 "CollectPEBSRecord": "1",
1350 "PublicDescription": "Counts reads for ownership (RFO) requests (demand & prefetch) miss the L2 cache with a snoop hit in the other processor module, data forwarding is required. Requires MSR_OFFCORE_RESP[0,1] to specify request type and response. (duplicated for both MSRs)",
1351 "EventCode": "0xB7",
1352 "MSRValue": "0x1000000022",
1353 "Counter": "0,1,2,3",
1354 "UMask": "0x1",
1355 "PEBScounters": "0,1,2,3",
1356 "EventName": "OFFCORE_RESPONSE.ANY_RFO.L2_MISS.HITM_OTHER_CORE",
1357 "PDIR_COUNTER": "na",
1358 "MSRIndex": "0x1a6, 0x1a7",
1359 "SampleAfterValue": "100007",
1360 "BriefDescription": "Counts reads for ownership (RFO) requests (demand & prefetch) miss the L2 cache with a snoop hit in the other processor module, data forwarding is required.",
1361 "Offcore": "1"
1362 },
1363 {
1364 "CollectPEBSRecord": "1",
1365 "PublicDescription": "Counts reads for ownership (RFO) requests (demand & prefetch) outstanding, per cycle, from the time of the L2 miss to when any response is received. Requires MSR_OFFCORE_RESP[0,1] to specify request type and response. (duplicated for both MSRs)",
1366 "EventCode": "0xB7",
1367 "MSRValue": "0x4000000022",
1368 "Counter": "0,1,2,3",
1369 "UMask": "0x1",
1370 "PEBScounters": "0,1,2,3",
1371 "EventName": "OFFCORE_RESPONSE.ANY_RFO.OUTSTANDING",
1372 "PDIR_COUNTER": "na",
1373 "MSRIndex": "0x1a6",
1374 "SampleAfterValue": "100007",
1375 "BriefDescription": "Counts reads for ownership (RFO) requests (demand & prefetch) outstanding, per cycle, from the time of the L2 miss to when any response is received.",
1376 "Offcore": "1"
1377 },
1378 {
1379 "CollectPEBSRecord": "1",
1380 "PublicDescription": "Counts data read, code read, and read for ownership (RFO) requests (demand & prefetch) have any transaction responses from the uncore subsystem. Requires MSR_OFFCORE_RESP[0,1] to specify request type and response. (duplicated for both MSRs)",
1381 "EventCode": "0xB7",
1382 "MSRValue": "0x00000132b7",
1383 "Counter": "0,1,2,3",
1384 "UMask": "0x1",
1385 "PEBScounters": "0,1,2,3",
1386 "EventName": "OFFCORE_RESPONSE.ANY_READ.ANY_RESPONSE",
1387 "PDIR_COUNTER": "na",
1388 "MSRIndex": "0x1a6, 0x1a7",
1389 "SampleAfterValue": "100007",
1390 "BriefDescription": "Counts data read, code read, and read for ownership (RFO) requests (demand & prefetch) have any transaction responses from the uncore subsystem.",
1391 "Offcore": "1"
1392 },
1393 {
1394 "CollectPEBSRecord": "1",
1395 "PublicDescription": "Counts data read, code read, and read for ownership (RFO) requests (demand & prefetch) hit the L2 cache. Requires MSR_OFFCORE_RESP[0,1] to specify request type and response. (duplicated for both MSRs)",
1396 "EventCode": "0xB7",
1397 "MSRValue": "0x00000432b7",
1398 "Counter": "0,1,2,3",
1399 "UMask": "0x1",
1400 "PEBScounters": "0,1,2,3",
1401 "EventName": "OFFCORE_RESPONSE.ANY_READ.L2_HIT",
1402 "PDIR_COUNTER": "na",
1403 "MSRIndex": "0x1a6, 0x1a7",
1404 "SampleAfterValue": "100007",
1405 "BriefDescription": "Counts data read, code read, and read for ownership (RFO) requests (demand & prefetch) hit the L2 cache.",
1406 "Offcore": "1"
1407 },
1408 {
1409 "CollectPEBSRecord": "1",
1410 "PublicDescription": "Counts data read, code read, and read for ownership (RFO) requests (demand & prefetch) true miss for the L2 cache with a snoop miss in the other processor module. Requires MSR_OFFCORE_RESP[0,1] to specify request type and response. (duplicated for both MSRs)",
1411 "EventCode": "0xB7",
1412 "MSRValue": "0x02000032b7",
1413 "Counter": "0,1,2,3",
1414 "UMask": "0x1",
1415 "PEBScounters": "0,1,2,3",
1416 "EventName": "OFFCORE_RESPONSE.ANY_READ.L2_MISS.SNOOP_MISS_OR_NO_SNOOP_NEEDED",
1417 "PDIR_COUNTER": "na",
1418 "MSRIndex": "0x1a6, 0x1a7",
1419 "SampleAfterValue": "100007",
1420 "BriefDescription": "Counts data read, code read, and read for ownership (RFO) requests (demand & prefetch) true miss for the L2 cache with a snoop miss in the other processor module. ",
1421 "Offcore": "1"
1422 },
1423 {
1424 "CollectPEBSRecord": "1",
1425 "PublicDescription": "Counts data read, code read, and read for ownership (RFO) requests (demand & prefetch) miss the L2 cache with a snoop hit in the other processor module, data forwarding is required. Requires MSR_OFFCORE_RESP[0,1] to specify request type and response. (duplicated for both MSRs)",
1426 "EventCode": "0xB7",
1427 "MSRValue": "0x10000032b7",
1428 "Counter": "0,1,2,3",
1429 "UMask": "0x1",
1430 "PEBScounters": "0,1,2,3",
1431 "EventName": "OFFCORE_RESPONSE.ANY_READ.L2_MISS.HITM_OTHER_CORE",
1432 "PDIR_COUNTER": "na",
1433 "MSRIndex": "0x1a6, 0x1a7",
1434 "SampleAfterValue": "100007",
1435 "BriefDescription": "Counts data read, code read, and read for ownership (RFO) requests (demand & prefetch) miss the L2 cache with a snoop hit in the other processor module, data forwarding is required.",
1436 "Offcore": "1"
1437 },
1438 {
1439 "CollectPEBSRecord": "1",
1440 "PublicDescription": "Counts data read, code read, and read for ownership (RFO) requests (demand & prefetch) outstanding, per cycle, from the time of the L2 miss to when any response is received. Requires MSR_OFFCORE_RESP[0,1] to specify request type and response. (duplicated for both MSRs)",
1441 "EventCode": "0xB7",
1442 "MSRValue": "0x40000032b7",
1443 "Counter": "0,1,2,3",
1444 "UMask": "0x1",
1445 "PEBScounters": "0,1,2,3",
1446 "EventName": "OFFCORE_RESPONSE.ANY_READ.OUTSTANDING",
1447 "PDIR_COUNTER": "na",
1448 "MSRIndex": "0x1a6",
1449 "SampleAfterValue": "100007",
1450 "BriefDescription": "Counts data read, code read, and read for ownership (RFO) requests (demand & prefetch) outstanding, per cycle, from the time of the L2 miss to when any response is received.",
1451 "Offcore": "1"
1452 }
1453] \ No newline at end of file
diff --git a/tools/perf/pmu-events/arch/x86/goldmontplus/frontend.json b/tools/perf/pmu-events/arch/x86/goldmontplus/frontend.json
new file mode 100644
index 000000000000..a7878965ceab
--- /dev/null
+++ b/tools/perf/pmu-events/arch/x86/goldmontplus/frontend.json
@@ -0,0 +1,62 @@
1[
2 {
3 "CollectPEBSRecord": "1",
4 "PublicDescription": "Counts requests to the Instruction Cache (ICache) for one or more bytes in an ICache Line and that cache line is in the ICache (hit). The event strives to count on a cache line basis, so that multiple accesses which hit in a single cache line count as one ICACHE.HIT. Specifically, the event counts when straight line code crosses the cache line boundary, or when a branch target is to a new line, and that cache line is in the ICache. This event counts differently than Intel processors based on Silvermont microarchitecture.",
5 "EventCode": "0x80",
6 "Counter": "0,1,2,3",
7 "UMask": "0x1",
8 "PEBScounters": "0,1,2,3",
9 "EventName": "ICACHE.HIT",
10 "PDIR_COUNTER": "na",
11 "SampleAfterValue": "200003",
12 "BriefDescription": "References per ICache line that are available in the ICache (hit). This event counts differently than Intel processors based on Silvermont microarchitecture"
13 },
14 {
15 "CollectPEBSRecord": "1",
16 "PublicDescription": "Counts requests to the Instruction Cache (ICache) for one or more bytes in an ICache Line and that cache line is not in the ICache (miss). The event strives to count on a cache line basis, so that multiple accesses which miss in a single cache line count as one ICACHE.MISS. Specifically, the event counts when straight line code crosses the cache line boundary, or when a branch target is to a new line, and that cache line is not in the ICache. This event counts differently than Intel processors based on Silvermont microarchitecture.",
17 "EventCode": "0x80",
18 "Counter": "0,1,2,3",
19 "UMask": "0x2",
20 "PEBScounters": "0,1,2,3",
21 "EventName": "ICACHE.MISSES",
22 "PDIR_COUNTER": "na",
23 "SampleAfterValue": "200003",
24 "BriefDescription": "References per ICache line that are not available in the ICache (miss). This event counts differently than Intel processors based on Silvermont microarchitecture"
25 },
26 {
27 "CollectPEBSRecord": "1",
28 "PublicDescription": "Counts requests to the Instruction Cache (ICache) for one or more bytes in an ICache Line. The event strives to count on a cache line basis, so that multiple fetches to a single cache line count as one ICACHE.ACCESS. Specifically, the event counts when accesses from straight line code crosses the cache line boundary, or when a branch target is to a new line.\r\nThis event counts differently than Intel processors based on Silvermont microarchitecture.",
29 "EventCode": "0x80",
30 "Counter": "0,1,2,3",
31 "UMask": "0x3",
32 "PEBScounters": "0,1,2,3",
33 "EventName": "ICACHE.ACCESSES",
34 "PDIR_COUNTER": "na",
35 "SampleAfterValue": "200003",
36 "BriefDescription": "References per ICache line. This event counts differently than Intel processors based on Silvermont microarchitecture"
37 },
38 {
39 "CollectPEBSRecord": "1",
40 "PublicDescription": "Counts the number of times the Microcode Sequencer (MS) starts a flow of uops from the MSROM. It does not count every time a uop is read from the MSROM. The most common case that this counts is when a micro-coded instruction is encountered by the front end of the machine. Other cases include when an instruction encounters a fault, trap, or microcode assist of any sort that initiates a flow of uops. The event will count MS startups for uops that are speculative, and subsequently cleared by branch mispredict or a machine clear.",
41 "EventCode": "0xE7",
42 "Counter": "0,1,2,3",
43 "UMask": "0x1",
44 "PEBScounters": "0,1,2,3",
45 "EventName": "MS_DECODED.MS_ENTRY",
46 "PDIR_COUNTER": "na",
47 "SampleAfterValue": "200003",
48 "BriefDescription": "MS decode starts"
49 },
50 {
51 "CollectPEBSRecord": "1",
52 "PublicDescription": "Counts the number of times the prediction (from the predecode cache) for instruction length is incorrect.",
53 "EventCode": "0xE9",
54 "Counter": "0,1,2,3",
55 "UMask": "0x1",
56 "PEBScounters": "0,1,2,3",
57 "EventName": "DECODE_RESTRICTION.PREDECODE_WRONG",
58 "PDIR_COUNTER": "na",
59 "SampleAfterValue": "200003",
60 "BriefDescription": "Decode restrictions due to predicting wrong instruction length"
61 }
62] \ No newline at end of file
diff --git a/tools/perf/pmu-events/arch/x86/goldmontplus/memory.json b/tools/perf/pmu-events/arch/x86/goldmontplus/memory.json
new file mode 100644
index 000000000000..91e0815f3ffb
--- /dev/null
+++ b/tools/perf/pmu-events/arch/x86/goldmontplus/memory.json
@@ -0,0 +1,38 @@
1[
2 {
3 "PEBS": "2",
4 "CollectPEBSRecord": "2",
5 "PublicDescription": "Counts when a memory load of a uop spans a page boundary (a split) is retired.",
6 "EventCode": "0x13",
7 "Counter": "0,1,2,3",
8 "UMask": "0x2",
9 "PEBScounters": "0,1,2,3",
10 "EventName": "MISALIGN_MEM_REF.LOAD_PAGE_SPLIT",
11 "SampleAfterValue": "200003",
12 "BriefDescription": "Load uops that split a page (Precise event capable)"
13 },
14 {
15 "PEBS": "2",
16 "CollectPEBSRecord": "2",
17 "PublicDescription": "Counts when a memory store of a uop spans a page boundary (a split) is retired.",
18 "EventCode": "0x13",
19 "Counter": "0,1,2,3",
20 "UMask": "0x4",
21 "PEBScounters": "0,1,2,3",
22 "EventName": "MISALIGN_MEM_REF.STORE_PAGE_SPLIT",
23 "SampleAfterValue": "200003",
24 "BriefDescription": "Store uops that split a page (Precise event capable)"
25 },
26 {
27 "CollectPEBSRecord": "1",
28 "PublicDescription": "Counts machine clears due to memory ordering issues. This occurs when a snoop request happens and the machine is uncertain if memory ordering will be preserved - as another core is in the process of modifying the data.",
29 "EventCode": "0xC3",
30 "Counter": "0,1,2,3",
31 "UMask": "0x2",
32 "PEBScounters": "0,1,2,3",
33 "EventName": "MACHINE_CLEARS.MEMORY_ORDERING",
34 "PDIR_COUNTER": "na",
35 "SampleAfterValue": "20003",
36 "BriefDescription": "Machine clears due to memory ordering issue"
37 }
38] \ No newline at end of file
diff --git a/tools/perf/pmu-events/arch/x86/goldmontplus/other.json b/tools/perf/pmu-events/arch/x86/goldmontplus/other.json
new file mode 100644
index 000000000000..b860374418ab
--- /dev/null
+++ b/tools/perf/pmu-events/arch/x86/goldmontplus/other.json
@@ -0,0 +1,98 @@
1[
2 {
3 "CollectPEBSRecord": "1",
4 "PublicDescription": "Counts cycles that fetch is stalled due to any reason. That is, the decoder queue is able to accept bytes, but the fetch unit is unable to provide bytes. This will include cycles due to an ITLB miss, ICache miss and other events.",
5 "EventCode": "0x86",
6 "Counter": "0,1,2,3",
7 "UMask": "0x0",
8 "PEBScounters": "0,1,2,3",
9 "EventName": "FETCH_STALL.ALL",
10 "PDIR_COUNTER": "na",
11 "SampleAfterValue": "200003",
12 "BriefDescription": "Cycles code-fetch stalled due to any reason."
13 },
14 {
15 "CollectPEBSRecord": "1",
16 "PublicDescription": "Counts cycles that fetch is stalled due to an outstanding ITLB miss. That is, the decoder queue is able to accept bytes, but the fetch unit is unable to provide bytes due to an ITLB miss. Note: this event is not the same as page walk cycles to retrieve an instruction translation.",
17 "EventCode": "0x86",
18 "Counter": "0,1,2,3",
19 "UMask": "0x1",
20 "PEBScounters": "0,1,2,3",
21 "EventName": "FETCH_STALL.ITLB_FILL_PENDING_CYCLES",
22 "PDIR_COUNTER": "na",
23 "SampleAfterValue": "200003",
24 "BriefDescription": "Cycles the code-fetch stalls and an ITLB miss is outstanding."
25 },
26 {
27 "CollectPEBSRecord": "1",
28 "PublicDescription": "Counts the number of issue slots per core cycle that were not consumed by the backend due to either a full resource in the backend (RESOURCE_FULL) or due to the processor recovering from some event (RECOVERY).",
29 "EventCode": "0xCA",
30 "Counter": "0,1,2,3",
31 "UMask": "0x0",
32 "PEBScounters": "0,1,2,3",
33 "EventName": "ISSUE_SLOTS_NOT_CONSUMED.ANY",
34 "PDIR_COUNTER": "na",
35 "SampleAfterValue": "200003",
36 "BriefDescription": "Unfilled issue slots per cycle"
37 },
38 {
39 "CollectPEBSRecord": "1",
40 "PublicDescription": "Counts the number of issue slots per core cycle that were not consumed because of a full resource in the backend. Including but not limited to resources such as the Re-order Buffer (ROB), reservation stations (RS), load/store buffers, physical registers, or any other needed machine resource that is currently unavailable. Note that uops must be available for consumption in order for this event to fire. If a uop is not available (Instruction Queue is empty), this event will not count.",
41 "EventCode": "0xCA",
42 "Counter": "0,1,2,3",
43 "UMask": "0x1",
44 "PEBScounters": "0,1,2,3",
45 "EventName": "ISSUE_SLOTS_NOT_CONSUMED.RESOURCE_FULL",
46 "PDIR_COUNTER": "na",
47 "SampleAfterValue": "200003",
48 "BriefDescription": "Unfilled issue slots per cycle because of a full resource in the backend"
49 },
50 {
51 "CollectPEBSRecord": "1",
52 "PublicDescription": "Counts the number of issue slots per core cycle that were not consumed by the backend because allocation is stalled waiting for a mispredicted jump to retire or other branch-like conditions (e.g. the event is relevant during certain microcode flows). Counts all issue slots blocked while within this window including slots where uops were not available in the Instruction Queue.",
53 "EventCode": "0xCA",
54 "Counter": "0,1,2,3",
55 "UMask": "0x2",
56 "PEBScounters": "0,1,2,3",
57 "EventName": "ISSUE_SLOTS_NOT_CONSUMED.RECOVERY",
58 "PDIR_COUNTER": "na",
59 "SampleAfterValue": "200003",
60 "BriefDescription": "Unfilled issue slots per cycle to recover"
61 },
62 {
63 "CollectPEBSRecord": "2",
64 "PublicDescription": "Counts hardware interrupts received by the processor.",
65 "EventCode": "0xCB",
66 "Counter": "0,1,2,3",
67 "UMask": "0x1",
68 "PEBScounters": "0,1,2,3",
69 "EventName": "HW_INTERRUPTS.RECEIVED",
70 "PDIR_COUNTER": "na",
71 "SampleAfterValue": "203",
72 "BriefDescription": "Hardware interrupts received"
73 },
74 {
75 "CollectPEBSRecord": "2",
76 "PublicDescription": "Counts the number of core cycles during which interrupts are masked (disabled). Increments by 1 each core cycle that EFLAGS.IF is 0, regardless of whether interrupts are pending or not.",
77 "EventCode": "0xCB",
78 "Counter": "0,1,2,3",
79 "UMask": "0x2",
80 "PEBScounters": "0,1,2,3",
81 "EventName": "HW_INTERRUPTS.MASKED",
82 "PDIR_COUNTER": "na",
83 "SampleAfterValue": "200003",
84 "BriefDescription": "Cycles hardware interrupts are masked"
85 },
86 {
87 "CollectPEBSRecord": "2",
88 "PublicDescription": "Counts core cycles during which there are pending interrupts, but interrupts are masked (EFLAGS.IF = 0).",
89 "EventCode": "0xCB",
90 "Counter": "0,1,2,3",
91 "UMask": "0x4",
92 "PEBScounters": "0,1,2,3",
93 "EventName": "HW_INTERRUPTS.PENDING_AND_MASKED",
94 "PDIR_COUNTER": "na",
95 "SampleAfterValue": "200003",
96 "BriefDescription": "Cycles pending interrupts are masked"
97 }
98] \ No newline at end of file
diff --git a/tools/perf/pmu-events/arch/x86/goldmontplus/pipeline.json b/tools/perf/pmu-events/arch/x86/goldmontplus/pipeline.json
new file mode 100644
index 000000000000..ccf1aed69197
--- /dev/null
+++ b/tools/perf/pmu-events/arch/x86/goldmontplus/pipeline.json
@@ -0,0 +1,544 @@
1[
2 {
3 "PEBS": "2",
4 "CollectPEBSRecord": "1",
5 "PublicDescription": "Counts the number of instructions that retire execution. For instructions that consist of multiple uops, this event counts the retirement of the last uop of the instruction. The counter continues counting during hardware interrupts, traps, and inside interrupt handlers. This event uses fixed counter 0. You cannot collect a PEBs record for this event.",
6 "EventCode": "0x00",
7 "Counter": "Fixed counter 0",
8 "UMask": "0x1",
9 "PEBScounters": "32",
10 "EventName": "INST_RETIRED.ANY",
11 "PDIR_COUNTER": "na",
12 "SampleAfterValue": "2000003",
13 "BriefDescription": "Instructions retired (Fixed event)"
14 },
15 {
16 "CollectPEBSRecord": "1",
17 "PublicDescription": "Counts the number of core cycles while the core is not in a halt state. The core enters the halt state when it is running the HLT instruction. In mobile systems the core frequency may change from time to time. For this reason this event may have a changing ratio with regards to time. This event uses fixed counter 1. You cannot collect a PEBs record for this event.",
18 "EventCode": "0x00",
19 "Counter": "Fixed counter 1",
20 "UMask": "0x2",
21 "PEBScounters": "33",
22 "EventName": "CPU_CLK_UNHALTED.CORE",
23 "PDIR_COUNTER": "na",
24 "SampleAfterValue": "2000003",
25 "BriefDescription": "Core cycles when core is not halted (Fixed event)"
26 },
27 {
28 "CollectPEBSRecord": "1",
29 "PublicDescription": "Counts the number of reference cycles that the core is not in a halt state. The core enters the halt state when it is running the HLT instruction. In mobile systems the core frequency may change from time. This event is not affected by core frequency changes but counts as if the core is running at the maximum frequency all the time. This event uses fixed counter 2. You cannot collect a PEBs record for this event.",
30 "EventCode": "0x00",
31 "Counter": "Fixed counter 2",
32 "UMask": "0x3",
33 "PEBScounters": "34",
34 "EventName": "CPU_CLK_UNHALTED.REF_TSC",
35 "PDIR_COUNTER": "na",
36 "SampleAfterValue": "2000003",
37 "BriefDescription": "Reference cycles when core is not halted (Fixed event)"
38 },
39 {
40 "PEBS": "2",
41 "CollectPEBSRecord": "2",
42 "PublicDescription": "Counts a load blocked from using a store forward, but did not occur because the store data was not available at the right time. The forward might occur subsequently when the data is available.",
43 "EventCode": "0x03",
44 "Counter": "0,1,2,3",
45 "UMask": "0x1",
46 "PEBScounters": "0,1,2,3",
47 "EventName": "LD_BLOCKS.DATA_UNKNOWN",
48 "SampleAfterValue": "200003",
49 "BriefDescription": "Loads blocked due to store data not ready (Precise event capable)"
50 },
51 {
52 "PEBS": "2",
53 "CollectPEBSRecord": "2",
54 "PublicDescription": "Counts a load blocked from using a store forward because of an address/size mismatch, only one of the loads blocked from each store will be counted.",
55 "EventCode": "0x03",
56 "Counter": "0,1,2,3",
57 "UMask": "0x2",
58 "PEBScounters": "0,1,2,3",
59 "EventName": "LD_BLOCKS.STORE_FORWARD",
60 "SampleAfterValue": "200003",
61 "BriefDescription": "Loads blocked due to store forward restriction (Precise event capable)"
62 },
63 {
64 "PEBS": "2",
65 "CollectPEBSRecord": "2",
66 "PublicDescription": "Counts loads that block because their address modulo 4K matches a pending store.",
67 "EventCode": "0x03",
68 "Counter": "0,1,2,3",
69 "UMask": "0x4",
70 "PEBScounters": "0,1,2,3",
71 "EventName": "LD_BLOCKS.4K_ALIAS",
72 "SampleAfterValue": "200003",
73 "BriefDescription": "Loads blocked because address has 4k partial address false dependence (Precise event capable)"
74 },
75 {
76 "PEBS": "2",
77 "CollectPEBSRecord": "2",
78 "PublicDescription": "Counts loads blocked because they are unable to find their physical address in the micro TLB (UTLB).",
79 "EventCode": "0x03",
80 "Counter": "0,1,2,3",
81 "UMask": "0x8",
82 "PEBScounters": "0,1,2,3",
83 "EventName": "LD_BLOCKS.UTLB_MISS",
84 "SampleAfterValue": "200003",
85 "BriefDescription": "Loads blocked because address in not in the UTLB (Precise event capable)"
86 },
87 {
88 "PEBS": "2",
89 "CollectPEBSRecord": "2",
90 "PublicDescription": "Counts anytime a load that retires is blocked for any reason.",
91 "EventCode": "0x03",
92 "Counter": "0,1,2,3",
93 "UMask": "0x10",
94 "PEBScounters": "0,1,2,3",
95 "EventName": "LD_BLOCKS.ALL_BLOCK",
96 "SampleAfterValue": "200003",
97 "BriefDescription": "Loads blocked (Precise event capable)"
98 },
99 {
100 "CollectPEBSRecord": "1",
101 "PublicDescription": "Counts uops issued by the front end and allocated into the back end of the machine. This event counts uops that retire as well as uops that were speculatively executed but didn't retire. The sort of speculative uops that might be counted includes, but is not limited to those uops issued in the shadow of a miss-predicted branch, those uops that are inserted during an assist (such as for a denormal floating point result), and (previously allocated) uops that might be canceled during a machine clear.",
102 "EventCode": "0x0E",
103 "Counter": "0,1,2,3",
104 "UMask": "0x0",
105 "PEBScounters": "0,1,2,3",
106 "EventName": "UOPS_ISSUED.ANY",
107 "PDIR_COUNTER": "na",
108 "SampleAfterValue": "200003",
109 "BriefDescription": "Uops issued to the back end per cycle"
110 },
111 {
112 "CollectPEBSRecord": "1",
113 "PublicDescription": "Core cycles when core is not halted. This event uses a (_P)rogrammable general purpose performance counter.",
114 "EventCode": "0x3C",
115 "Counter": "0,1,2,3",
116 "UMask": "0x0",
117 "PEBScounters": "0,1,2,3",
118 "EventName": "CPU_CLK_UNHALTED.CORE_P",
119 "PDIR_COUNTER": "na",
120 "SampleAfterValue": "2000003",
121 "BriefDescription": "Core cycles when core is not halted"
122 },
123 {
124 "CollectPEBSRecord": "1",
125 "PublicDescription": "Reference cycles when core is not halted. This event uses a (_P)rogrammable general purpose performance counter.",
126 "EventCode": "0x3C",
127 "Counter": "0,1,2,3",
128 "UMask": "0x1",
129 "PEBScounters": "0,1,2,3",
130 "EventName": "CPU_CLK_UNHALTED.REF",
131 "PDIR_COUNTER": "na",
132 "SampleAfterValue": "2000003",
133 "BriefDescription": "Reference cycles when core is not halted"
134 },
135 {
136 "CollectPEBSRecord": "1",
137 "PublicDescription": "This event used to measure front-end inefficiencies. I.e. when front-end of the machine is not delivering uops to the back-end and the back-end has is not stalled. This event can be used to identify if the machine is truly front-end bound. When this event occurs, it is an indication that the front-end of the machine is operating at less than its theoretical peak performance. Background: We can think of the processor pipeline as being divided into 2 broader parts: Front-end and Back-end. Front-end is responsible for fetching the instruction, decoding into uops in machine understandable format and putting them into a uop queue to be consumed by back end. The back-end then takes these uops, allocates the required resources. When all resources are ready, uops are executed. If the back-end is not ready to accept uops from the front-end, then we do not want to count these as front-end bottlenecks. However, whenever we have bottlenecks in the back-end, we will have allocation unit stalls and eventually forcing the front-end to wait until the back-end is ready to receive more uops. This event counts only when back-end is requesting more uops and front-end is not able to provide them. When 3 uops are requested and no uops are delivered, the event counts 3. When 3 are requested, and only 1 is delivered, the event counts 2. When only 2 are delivered, the event counts 1. Alternatively stated, the event will not count if 3 uops are delivered, or if the back end is stalled and not requesting any uops at all. Counts indicate missed opportunities for the front-end to deliver a uop to the back end. Some examples of conditions that cause front-end efficiencies are: ICache misses, ITLB misses, and decoder restrictions that limit the front-end bandwidth. Known Issues: Some uops require multiple allocation slots. These uops will not be charged as a front end 'not delivered' opportunity, and will be regarded as a back end problem. For example, the INC instruction has one uop that requires 2 issue slots. A stream of INC instructions will not count as UOPS_NOT_DELIVERED, even though only one instruction can be issued per clock. The low uop issue rate for a stream of INC instructions is considered to be a back end issue.",
138 "EventCode": "0x9C",
139 "Counter": "0,1,2,3",
140 "UMask": "0x0",
141 "PEBScounters": "0,1,2,3",
142 "EventName": "UOPS_NOT_DELIVERED.ANY",
143 "PDIR_COUNTER": "na",
144 "SampleAfterValue": "200003",
145 "BriefDescription": "Uops requested but not-delivered to the back-end per cycle"
146 },
147 {
148 "PEBS": "2",
149 "CollectPEBSRecord": "1",
150 "PublicDescription": "Counts the number of instructions that retire execution. For instructions that consist of multiple uops, this event counts the retirement of the last uop of the instruction. The event continues counting during hardware interrupts, traps, and inside interrupt handlers. This is an architectural performance event. This event uses a (_P)rogrammable general purpose performance counter. *This event is Precise Event capable: The EventingRIP field in the PEBS record is precise to the address of the instruction which caused the event. Note: Because PEBS records can be collected only on IA32_PMC0, only one event can use the PEBS facility at a time.",
151 "EventCode": "0xC0",
152 "Counter": "0,1,2,3",
153 "UMask": "0x0",
154 "PEBScounters": "0,1,2,3",
155 "EventName": "INST_RETIRED.ANY_P",
156 "SampleAfterValue": "2000003",
157 "BriefDescription": "Instructions retired (Precise event capable)"
158 },
159 {
160 "PEBS": "2",
161 "CollectPEBSRecord": "2",
162 "PublicDescription": "Counts INST_RETIRED.ANY using the Reduced Skid PEBS feature that reduces the shadow in which events aren't counted allowing for a more unbiased distribution of samples across instructions retired.",
163 "EventCode": "0xC0",
164 "Counter": "0,1,2,3",
165 "UMask": "0x0",
166 "EventName": "INST_RETIRED.PREC_DIST",
167 "SampleAfterValue": "2000003",
168 "BriefDescription": "Instructions retired - using Reduced Skid PEBS feature"
169 },
170 {
171 "PEBS": "2",
172 "CollectPEBSRecord": "2",
173 "PublicDescription": "Counts uops which retired.",
174 "EventCode": "0xC2",
175 "Counter": "0,1,2,3",
176 "UMask": "0x0",
177 "PEBScounters": "0,1,2,3",
178 "EventName": "UOPS_RETIRED.ANY",
179 "PDIR_COUNTER": "na",
180 "SampleAfterValue": "2000003",
181 "BriefDescription": "Uops retired (Precise event capable)"
182 },
183 {
184 "PEBS": "2",
185 "CollectPEBSRecord": "2",
186 "PublicDescription": "Counts uops retired that are from the complex flows issued by the micro-sequencer (MS). Counts both the uops from a micro-coded instruction, and the uops that might be generated from a micro-coded assist.",
187 "EventCode": "0xC2",
188 "Counter": "0,1,2,3",
189 "UMask": "0x1",
190 "PEBScounters": "0,1,2,3",
191 "EventName": "UOPS_RETIRED.MS",
192 "PDIR_COUNTER": "na",
193 "SampleAfterValue": "2000003",
194 "BriefDescription": "MS uops retired (Precise event capable)"
195 },
196 {
197 "PEBS": "2",
198 "CollectPEBSRecord": "1",
199 "PublicDescription": "Counts the number of floating point divide uops retired.",
200 "EventCode": "0xC2",
201 "Counter": "0,1,2,3",
202 "UMask": "0x8",
203 "PEBScounters": "0,1,2,3",
204 "EventName": "UOPS_RETIRED.FPDIV",
205 "SampleAfterValue": "2000003",
206 "BriefDescription": "Floating point divide uops retired (Precise Event Capable)"
207 },
208 {
209 "PEBS": "2",
210 "CollectPEBSRecord": "1",
211 "PublicDescription": "Counts the number of integer divide uops retired.",
212 "EventCode": "0xC2",
213 "Counter": "0,1,2,3",
214 "UMask": "0x10",
215 "PEBScounters": "0,1,2,3",
216 "EventName": "UOPS_RETIRED.IDIV",
217 "SampleAfterValue": "2000003",
218 "BriefDescription": "Integer divide uops retired (Precise Event Capable)"
219 },
220 {
221 "CollectPEBSRecord": "1",
222 "PublicDescription": "Counts machine clears for any reason.",
223 "EventCode": "0xC3",
224 "Counter": "0,1,2,3",
225 "UMask": "0x0",
226 "PEBScounters": "0,1,2,3",
227 "EventName": "MACHINE_CLEARS.ALL",
228 "PDIR_COUNTER": "na",
229 "SampleAfterValue": "20003",
230 "BriefDescription": "All machine clears"
231 },
232 {
233 "CollectPEBSRecord": "1",
234 "PublicDescription": "Counts the number of times that the processor detects that a program is writing to a code section and has to perform a machine clear because of that modification. Self-modifying code (SMC) causes a severe penalty in all Intel architecture processors.",
235 "EventCode": "0xC3",
236 "Counter": "0,1,2,3",
237 "UMask": "0x1",
238 "PEBScounters": "0,1,2,3",
239 "EventName": "MACHINE_CLEARS.SMC",
240 "PDIR_COUNTER": "na",
241 "SampleAfterValue": "20003",
242 "BriefDescription": "Self-Modifying Code detected"
243 },
244 {
245 "CollectPEBSRecord": "1",
246 "PublicDescription": "Counts machine clears due to floating point (FP) operations needing assists. For instance, if the result was a floating point denormal, the hardware clears the pipeline and reissues uops to produce the correct IEEE compliant denormal result.",
247 "EventCode": "0xC3",
248 "Counter": "0,1,2,3",
249 "UMask": "0x4",
250 "PEBScounters": "0,1,2,3",
251 "EventName": "MACHINE_CLEARS.FP_ASSIST",
252 "PDIR_COUNTER": "na",
253 "SampleAfterValue": "20003",
254 "BriefDescription": "Machine clears due to FP assists"
255 },
256 {
257 "CollectPEBSRecord": "1",
258 "PublicDescription": "Counts machine clears due to memory disambiguation. Memory disambiguation happens when a load which has been issued conflicts with a previous unretired store in the pipeline whose address was not known at issue time, but is later resolved to be the same as the load address.",
259 "EventCode": "0xC3",
260 "Counter": "0,1,2,3",
261 "UMask": "0x8",
262 "PEBScounters": "0,1,2,3",
263 "EventName": "MACHINE_CLEARS.DISAMBIGUATION",
264 "PDIR_COUNTER": "na",
265 "SampleAfterValue": "20003",
266 "BriefDescription": "Machine clears due to memory disambiguation"
267 },
268 {
269 "CollectPEBSRecord": "1",
270 "PublicDescription": "Counts the number of times that the machines clears due to a page fault. Covers both I-side and D-side(Loads/Stores) page faults. A page fault occurs when either page is not present, or an access violation",
271 "EventCode": "0xC3",
272 "Counter": "0,1,2,3",
273 "UMask": "0x20",
274 "PEBScounters": "0,1,2,3",
275 "EventName": "MACHINE_CLEARS.PAGE_FAULT",
276 "PDIR_COUNTER": "na",
277 "SampleAfterValue": "20003",
278 "BriefDescription": "Machines clear due to a page fault"
279 },
280 {
281 "PEBS": "2",
282 "CollectPEBSRecord": "2",
283 "PublicDescription": "Counts branch instructions retired for all branch types. This is an architectural performance event.",
284 "EventCode": "0xC4",
285 "Counter": "0,1,2,3",
286 "UMask": "0x0",
287 "PEBScounters": "0,1,2,3",
288 "EventName": "BR_INST_RETIRED.ALL_BRANCHES",
289 "SampleAfterValue": "200003",
290 "BriefDescription": "Retired branch instructions (Precise event capable)"
291 },
292 {
293 "PEBS": "2",
294 "CollectPEBSRecord": "2",
295 "PublicDescription": "Counts retired Jcc (Jump on Conditional Code/Jump if Condition is Met) branch instructions retired, including both when the branch was taken and when it was not taken.",
296 "EventCode": "0xC4",
297 "Counter": "0,1,2,3",
298 "UMask": "0x7e",
299 "PEBScounters": "0,1,2,3",
300 "EventName": "BR_INST_RETIRED.JCC",
301 "SampleAfterValue": "200003",
302 "BriefDescription": "Retired conditional branch instructions (Precise event capable)"
303 },
304 {
305 "PEBS": "2",
306 "CollectPEBSRecord": "2",
307 "PublicDescription": "Counts the number of taken branch instructions retired.",
308 "EventCode": "0xC4",
309 "Counter": "0,1,2,3",
310 "UMask": "0x80",
311 "PEBScounters": "0,1,2,3",
312 "EventName": "BR_INST_RETIRED.ALL_TAKEN_BRANCHES",
313 "SampleAfterValue": "200003",
314 "BriefDescription": "Retired taken branch instructions (Precise event capable)"
315 },
316 {
317 "PEBS": "2",
318 "CollectPEBSRecord": "2",
319 "PublicDescription": "Counts far branch instructions retired. This includes far jump, far call and return, and Interrupt call and return.",
320 "EventCode": "0xC4",
321 "Counter": "0,1,2,3",
322 "UMask": "0xbf",
323 "PEBScounters": "0,1,2,3",
324 "EventName": "BR_INST_RETIRED.FAR_BRANCH",
325 "SampleAfterValue": "200003",
326 "BriefDescription": "Retired far branch instructions (Precise event capable)"
327 },
328 {
329 "PEBS": "2",
330 "CollectPEBSRecord": "2",
331 "PublicDescription": "Counts near indirect call or near indirect jmp branch instructions retired.",
332 "EventCode": "0xC4",
333 "Counter": "0,1,2,3",
334 "UMask": "0xeb",
335 "PEBScounters": "0,1,2,3",
336 "EventName": "BR_INST_RETIRED.NON_RETURN_IND",
337 "SampleAfterValue": "200003",
338 "BriefDescription": "Retired instructions of near indirect Jmp or call (Precise event capable)"
339 },
340 {
341 "PEBS": "2",
342 "CollectPEBSRecord": "2",
343 "PublicDescription": "Counts near return branch instructions retired.",
344 "EventCode": "0xC4",
345 "Counter": "0,1,2,3",
346 "UMask": "0xf7",
347 "PEBScounters": "0,1,2,3",
348 "EventName": "BR_INST_RETIRED.RETURN",
349 "SampleAfterValue": "200003",
350 "BriefDescription": "Retired near return instructions (Precise event capable)"
351 },
352 {
353 "PEBS": "2",
354 "CollectPEBSRecord": "2",
355 "PublicDescription": "Counts near CALL branch instructions retired.",
356 "EventCode": "0xC4",
357 "Counter": "0,1,2,3",
358 "UMask": "0xf9",
359 "PEBScounters": "0,1,2,3",
360 "EventName": "BR_INST_RETIRED.CALL",
361 "SampleAfterValue": "200003",
362 "BriefDescription": "Retired near call instructions (Precise event capable)"
363 },
364 {
365 "PEBS": "2",
366 "CollectPEBSRecord": "2",
367 "PublicDescription": "Counts near indirect CALL branch instructions retired.",
368 "EventCode": "0xC4",
369 "Counter": "0,1,2,3",
370 "UMask": "0xfb",
371 "PEBScounters": "0,1,2,3",
372 "EventName": "BR_INST_RETIRED.IND_CALL",
373 "SampleAfterValue": "200003",
374 "BriefDescription": "Retired near indirect call instructions (Precise event capable)"
375 },
376 {
377 "PEBS": "2",
378 "CollectPEBSRecord": "2",
379 "PublicDescription": "Counts near relative CALL branch instructions retired.",
380 "EventCode": "0xC4",
381 "Counter": "0,1,2,3",
382 "UMask": "0xfd",
383 "PEBScounters": "0,1,2,3",
384 "EventName": "BR_INST_RETIRED.REL_CALL",
385 "SampleAfterValue": "200003",
386 "BriefDescription": "Retired near relative call instructions (Precise event capable)"
387 },
388 {
389 "PEBS": "2",
390 "CollectPEBSRecord": "2",
391 "PublicDescription": "Counts Jcc (Jump on Conditional Code/Jump if Condition is Met) branch instructions retired that were taken and does not count when the Jcc branch instruction were not taken.",
392 "EventCode": "0xC4",
393 "Counter": "0,1,2,3",
394 "UMask": "0xfe",
395 "PEBScounters": "0,1,2,3",
396 "EventName": "BR_INST_RETIRED.TAKEN_JCC",
397 "SampleAfterValue": "200003",
398 "BriefDescription": "Retired conditional branch instructions that were taken (Precise event capable)"
399 },
400 {
401 "PEBS": "2",
402 "CollectPEBSRecord": "2",
403 "PublicDescription": "Counts mispredicted branch instructions retired including all branch types.",
404 "EventCode": "0xC5",
405 "Counter": "0,1,2,3",
406 "UMask": "0x0",
407 "PEBScounters": "0,1,2,3",
408 "EventName": "BR_MISP_RETIRED.ALL_BRANCHES",
409 "SampleAfterValue": "200003",
410 "BriefDescription": "Retired mispredicted branch instructions (Precise event capable)"
411 },
412 {
413 "PEBS": "2",
414 "CollectPEBSRecord": "2",
415 "PublicDescription": "Counts mispredicted retired Jcc (Jump on Conditional Code/Jump if Condition is Met) branch instructions retired, including both when the branch was supposed to be taken and when it was not supposed to be taken (but the processor predicted the opposite condition).",
416 "EventCode": "0xC5",
417 "Counter": "0,1,2,3",
418 "UMask": "0x7e",
419 "PEBScounters": "0,1,2,3",
420 "EventName": "BR_MISP_RETIRED.JCC",
421 "SampleAfterValue": "200003",
422 "BriefDescription": "Retired mispredicted conditional branch instructions (Precise event capable)"
423 },
424 {
425 "PEBS": "2",
426 "CollectPEBSRecord": "2",
427 "PublicDescription": "Counts mispredicted branch instructions retired that were near indirect call or near indirect jmp, where the target address taken was not what the processor predicted.",
428 "EventCode": "0xC5",
429 "Counter": "0,1,2,3",
430 "UMask": "0xeb",
431 "PEBScounters": "0,1,2,3",
432 "EventName": "BR_MISP_RETIRED.NON_RETURN_IND",
433 "SampleAfterValue": "200003",
434 "BriefDescription": "Retired mispredicted instructions of near indirect Jmp or near indirect call (Precise event capable)"
435 },
436 {
437 "PEBS": "2",
438 "CollectPEBSRecord": "2",
439 "PublicDescription": "Counts mispredicted near RET branch instructions retired, where the return address taken was not what the processor predicted.",
440 "EventCode": "0xC5",
441 "Counter": "0,1,2,3",
442 "UMask": "0xf7",
443 "PEBScounters": "0,1,2,3",
444 "EventName": "BR_MISP_RETIRED.RETURN",
445 "SampleAfterValue": "200003",
446 "BriefDescription": "Retired mispredicted near return instructions (Precise event capable)"
447 },
448 {
449 "PEBS": "2",
450 "CollectPEBSRecord": "2",
451 "PublicDescription": "Counts mispredicted near indirect CALL branch instructions retired, where the target address taken was not what the processor predicted.",
452 "EventCode": "0xC5",
453 "Counter": "0,1,2,3",
454 "UMask": "0xfb",
455 "PEBScounters": "0,1,2,3",
456 "EventName": "BR_MISP_RETIRED.IND_CALL",
457 "SampleAfterValue": "200003",
458 "BriefDescription": "Retired mispredicted near indirect call instructions (Precise event capable)"
459 },
460 {
461 "PEBS": "2",
462 "CollectPEBSRecord": "2",
463 "PublicDescription": "Counts mispredicted retired Jcc (Jump on Conditional Code/Jump if Condition is Met) branch instructions retired that were supposed to be taken but the processor predicted that it would not be taken.",
464 "EventCode": "0xC5",
465 "Counter": "0,1,2,3",
466 "UMask": "0xfe",
467 "PEBScounters": "0,1,2,3",
468 "EventName": "BR_MISP_RETIRED.TAKEN_JCC",
469 "SampleAfterValue": "200003",
470 "BriefDescription": "Retired mispredicted conditional branch instructions that were taken (Precise event capable)"
471 },
472 {
473 "CollectPEBSRecord": "1",
474 "PublicDescription": "Counts core cycles if either divide unit is busy.",
475 "EventCode": "0xCD",
476 "Counter": "0,1,2,3",
477 "UMask": "0x0",
478 "PEBScounters": "0,1,2,3",
479 "EventName": "CYCLES_DIV_BUSY.ALL",
480 "PDIR_COUNTER": "na",
481 "SampleAfterValue": "2000003",
482 "BriefDescription": "Cycles a divider is busy"
483 },
484 {
485 "CollectPEBSRecord": "1",
486 "PublicDescription": "Counts core cycles the integer divide unit is busy.",
487 "EventCode": "0xCD",
488 "Counter": "0,1,2,3",
489 "UMask": "0x1",
490 "PEBScounters": "0,1,2,3",
491 "EventName": "CYCLES_DIV_BUSY.IDIV",
492 "PDIR_COUNTER": "na",
493 "SampleAfterValue": "200003",
494 "BriefDescription": "Cycles the integer divide unit is busy"
495 },
496 {
497 "CollectPEBSRecord": "1",
498 "PublicDescription": "Counts core cycles the floating point divide unit is busy.",
499 "EventCode": "0xCD",
500 "Counter": "0,1,2,3",
501 "UMask": "0x2",
502 "PEBScounters": "0,1,2,3",
503 "EventName": "CYCLES_DIV_BUSY.FPDIV",
504 "PDIR_COUNTER": "na",
505 "SampleAfterValue": "200003",
506 "BriefDescription": "Cycles the FP divide unit is busy"
507 },
508 {
509 "CollectPEBSRecord": "1",
510 "PublicDescription": "Counts the number of times a BACLEAR is signaled for any reason, including, but not limited to indirect branch/call, Jcc (Jump on Conditional Code/Jump if Condition is Met) branch, unconditional branch/call, and returns.",
511 "EventCode": "0xE6",
512 "Counter": "0,1,2,3",
513 "UMask": "0x1",
514 "PEBScounters": "0,1,2,3",
515 "EventName": "BACLEARS.ALL",
516 "PDIR_COUNTER": "na",
517 "SampleAfterValue": "200003",
518 "BriefDescription": "BACLEARs asserted for any branch type"
519 },
520 {
521 "CollectPEBSRecord": "1",
522 "PublicDescription": "Counts BACLEARS on return instructions.",
523 "EventCode": "0xE6",
524 "Counter": "0,1,2,3",
525 "UMask": "0x8",
526 "PEBScounters": "0,1,2,3",
527 "EventName": "BACLEARS.RETURN",
528 "PDIR_COUNTER": "na",
529 "SampleAfterValue": "200003",
530 "BriefDescription": "BACLEARs asserted for return branch"
531 },
532 {
533 "CollectPEBSRecord": "1",
534 "PublicDescription": "Counts BACLEARS on Jcc (Jump on Conditional Code/Jump if Condition is Met) branches.",
535 "EventCode": "0xE6",
536 "Counter": "0,1,2,3",
537 "UMask": "0x10",
538 "PEBScounters": "0,1,2,3",
539 "EventName": "BACLEARS.COND",
540 "PDIR_COUNTER": "na",
541 "SampleAfterValue": "200003",
542 "BriefDescription": "BACLEARs asserted for conditional branch"
543 }
544] \ No newline at end of file
diff --git a/tools/perf/pmu-events/arch/x86/goldmontplus/virtual-memory.json b/tools/perf/pmu-events/arch/x86/goldmontplus/virtual-memory.json
new file mode 100644
index 000000000000..0b53a3b0dfb8
--- /dev/null
+++ b/tools/perf/pmu-events/arch/x86/goldmontplus/virtual-memory.json
@@ -0,0 +1,218 @@
1[
2 {
3 "CollectPEBSRecord": "1",
4 "PublicDescription": "Counts page walks completed due to demand data loads (including SW prefetches) whose address translations missed in all TLB levels and were mapped to 4K pages. The page walks can end with or without a page fault.",
5 "EventCode": "0x08",
6 "Counter": "0,1,2,3",
7 "UMask": "0x2",
8 "PEBScounters": "0,1,2,3",
9 "EventName": "DTLB_LOAD_MISSES.WALK_COMPLETED_4K",
10 "PDIR_COUNTER": "na",
11 "SampleAfterValue": "200003",
12 "BriefDescription": "Page walk completed due to a demand load to a 4K page"
13 },
14 {
15 "CollectPEBSRecord": "1",
16 "PublicDescription": "Counts page walks completed due to demand data loads (including SW prefetches) whose address translations missed in all TLB levels and were mapped to 2M or 4M pages. The page walks can end with or without a page fault.",
17 "EventCode": "0x08",
18 "Counter": "0,1,2,3",
19 "UMask": "0x4",
20 "PEBScounters": "0,1,2,3",
21 "EventName": "DTLB_LOAD_MISSES.WALK_COMPLETED_2M_4M",
22 "PDIR_COUNTER": "na",
23 "SampleAfterValue": "200003",
24 "BriefDescription": "Page walk completed due to a demand load to a 2M or 4M page"
25 },
26 {
27 "CollectPEBSRecord": "1",
28 "PublicDescription": "Counts page walks completed due to demand data loads (including SW prefetches) whose address translations missed in all TLB levels and were mapped to 1GB pages. The page walks can end with or without a page fault.",
29 "EventCode": "0x08",
30 "Counter": "0,1,2,3",
31 "UMask": "0x8",
32 "PEBScounters": "0,1,2,3",
33 "EventName": "DTLB_LOAD_MISSES.WALK_COMPLETED_1GB",
34 "PDIR_COUNTER": "na",
35 "SampleAfterValue": "200003",
36 "BriefDescription": "Page walk completed due to a demand load to a 1GB page"
37 },
38 {
39 "CollectPEBSRecord": "1",
40 "PublicDescription": "Counts once per cycle for each page walk occurring due to a load (demand data loads or SW prefetches). Includes cycles spent traversing the Extended Page Table (EPT). Average cycles per walk can be calculated by dividing by the number of walks.",
41 "EventCode": "0x08",
42 "Counter": "0,1,2,3",
43 "UMask": "0x10",
44 "PEBScounters": "0,1,2,3",
45 "EventName": "DTLB_LOAD_MISSES.WALK_PENDING",
46 "PDIR_COUNTER": "na",
47 "SampleAfterValue": "200003",
48 "BriefDescription": "Page walks outstanding due to a demand load every cycle."
49 },
50 {
51 "CollectPEBSRecord": "1",
52 "PublicDescription": "Counts page walks completed due to demand data stores whose address translations missed in the TLB and were mapped to 4K pages. The page walks can end with or without a page fault.",
53 "EventCode": "0x49",
54 "Counter": "0,1,2,3",
55 "UMask": "0x2",
56 "PEBScounters": "0,1,2,3",
57 "EventName": "DTLB_STORE_MISSES.WALK_COMPLETED_4K",
58 "PDIR_COUNTER": "na",
59 "SampleAfterValue": "2000003",
60 "BriefDescription": "Page walk completed due to a demand data store to a 4K page"
61 },
62 {
63 "CollectPEBSRecord": "1",
64 "PublicDescription": "Counts page walks completed due to demand data stores whose address translations missed in the TLB and were mapped to 2M or 4M pages. The page walks can end with or without a page fault.",
65 "EventCode": "0x49",
66 "Counter": "0,1,2,3",
67 "UMask": "0x4",
68 "PEBScounters": "0,1,2,3",
69 "EventName": "DTLB_STORE_MISSES.WALK_COMPLETED_2M_4M",
70 "PDIR_COUNTER": "na",
71 "SampleAfterValue": "2000003",
72 "BriefDescription": "Page walk completed due to a demand data store to a 2M or 4M page"
73 },
74 {
75 "CollectPEBSRecord": "1",
76 "PublicDescription": "Counts page walks completed due to demand data stores whose address translations missed in the TLB and were mapped to 1GB pages. The page walks can end with or without a page fault.",
77 "EventCode": "0x49",
78 "Counter": "0,1,2,3",
79 "UMask": "0x8",
80 "PEBScounters": "0,1,2,3",
81 "EventName": "DTLB_STORE_MISSES.WALK_COMPLETED_1GB",
82 "PDIR_COUNTER": "na",
83 "SampleAfterValue": "2000003",
84 "BriefDescription": "Page walk completed due to a demand data store to a 1GB page"
85 },
86 {
87 "CollectPEBSRecord": "1",
88 "PublicDescription": "Counts once per cycle for each page walk occurring due to a demand data store. Includes cycles spent traversing the Extended Page Table (EPT). Average cycles per walk can be calculated by dividing by the number of walks.",
89 "EventCode": "0x49",
90 "Counter": "0,1,2,3",
91 "UMask": "0x10",
92 "PEBScounters": "0,1,2,3",
93 "EventName": "DTLB_STORE_MISSES.WALK_PENDING",
94 "PDIR_COUNTER": "na",
95 "SampleAfterValue": "200003",
96 "BriefDescription": "Page walks outstanding due to a demand data store every cycle."
97 },
98 {
99 "CollectPEBSRecord": "1",
100 "PublicDescription": "Counts once per cycle for each page walk only while traversing the Extended Page Table (EPT), and does not count during the rest of the translation. The EPT is used for translating Guest-Physical Addresses to Physical Addresses for Virtual Machine Monitors (VMMs). Average cycles per walk can be calculated by dividing the count by number of walks.",
101 "EventCode": "0x4F",
102 "Counter": "0,1,2,3",
103 "UMask": "0x10",
104 "PEBScounters": "0,1,2,3",
105 "EventName": "EPT.WALK_PENDING",
106 "PDIR_COUNTER": "na",
107 "SampleAfterValue": "200003",
108 "BriefDescription": "Page walks outstanding due to walking the EPT every cycle"
109 },
110 {
111 "CollectPEBSRecord": "1",
112 "PublicDescription": "Counts the number of times the machine was unable to find a translation in the Instruction Translation Lookaside Buffer (ITLB) for a linear address of an instruction fetch. It counts when new translation are filled into the ITLB. The event is speculative in nature, but will not count translations (page walks) that are begun and not finished, or translations that are finished but not filled into the ITLB.",
113 "EventCode": "0x81",
114 "Counter": "0,1,2,3",
115 "UMask": "0x4",
116 "PEBScounters": "0,1,2,3",
117 "EventName": "ITLB.MISS",
118 "PDIR_COUNTER": "na",
119 "SampleAfterValue": "200003",
120 "BriefDescription": "ITLB misses"
121 },
122 {
123 "CollectPEBSRecord": "1",
124 "PublicDescription": "Counts page walks completed due to instruction fetches whose address translations missed in the TLB and were mapped to 4K pages. The page walks can end with or without a page fault.",
125 "EventCode": "0x85",
126 "Counter": "0,1,2,3",
127 "UMask": "0x2",
128 "PEBScounters": "0,1,2,3",
129 "EventName": "ITLB_MISSES.WALK_COMPLETED_4K",
130 "PDIR_COUNTER": "na",
131 "SampleAfterValue": "2000003",
132 "BriefDescription": "Page walk completed due to an instruction fetch in a 4K page"
133 },
134 {
135 "CollectPEBSRecord": "1",
136 "PublicDescription": "Counts page walks completed due to instruction fetches whose address translations missed in the TLB and were mapped to 2M or 4M pages. The page walks can end with or without a page fault.",
137 "EventCode": "0x85",
138 "Counter": "0,1,2,3",
139 "UMask": "0x4",
140 "PEBScounters": "0,1,2,3",
141 "EventName": "ITLB_MISSES.WALK_COMPLETED_2M_4M",
142 "PDIR_COUNTER": "na",
143 "SampleAfterValue": "2000003",
144 "BriefDescription": "Page walk completed due to an instruction fetch in a 2M or 4M page"
145 },
146 {
147 "CollectPEBSRecord": "1",
148 "PublicDescription": "Counts page walks completed due to instruction fetches whose address translations missed in the TLB and were mapped to 1GB pages. The page walks can end with or without a page fault.",
149 "EventCode": "0x85",
150 "Counter": "0,1,2,3",
151 "UMask": "0x8",
152 "PEBScounters": "0,1,2,3",
153 "EventName": "ITLB_MISSES.WALK_COMPLETED_1GB",
154 "PDIR_COUNTER": "na",
155 "SampleAfterValue": "2000003",
156 "BriefDescription": "Page walk completed due to an instruction fetch in a 1GB page"
157 },
158 {
159 "CollectPEBSRecord": "1",
160 "PublicDescription": "Counts once per cycle for each page walk occurring due to an instruction fetch. Includes cycles spent traversing the Extended Page Table (EPT). Average cycles per walk can be calculated by dividing by the number of walks.",
161 "EventCode": "0x85",
162 "Counter": "0,1,2,3",
163 "UMask": "0x10",
164 "PEBScounters": "0,1,2,3",
165 "EventName": "ITLB_MISSES.WALK_PENDING",
166 "PDIR_COUNTER": "na",
167 "SampleAfterValue": "200003",
168 "BriefDescription": "Page walks outstanding due to an instruction fetch every cycle."
169 },
170 {
171 "CollectPEBSRecord": "1",
172 "PublicDescription": "Counts STLB flushes. The TLBs are flushed on instructions like INVLPG and MOV to CR3.",
173 "EventCode": "0xBD",
174 "Counter": "0,1,2,3",
175 "UMask": "0x20",
176 "PEBScounters": "0,1,2,3",
177 "EventName": "TLB_FLUSHES.STLB_ANY",
178 "PDIR_COUNTER": "na",
179 "SampleAfterValue": "20003",
180 "BriefDescription": "STLB flushes"
181 },
182 {
183 "PEBS": "2",
184 "CollectPEBSRecord": "2",
185 "PublicDescription": "Counts load uops retired that caused a DTLB miss.",
186 "EventCode": "0xD0",
187 "Counter": "0,1,2,3",
188 "UMask": "0x11",
189 "PEBScounters": "0,1,2,3",
190 "EventName": "MEM_UOPS_RETIRED.DTLB_MISS_LOADS",
191 "SampleAfterValue": "200003",
192 "BriefDescription": "Load uops retired that missed the DTLB (Precise event capable)"
193 },
194 {
195 "PEBS": "2",
196 "CollectPEBSRecord": "2",
197 "PublicDescription": "Counts store uops retired that caused a DTLB miss.",
198 "EventCode": "0xD0",
199 "Counter": "0,1,2,3",
200 "UMask": "0x12",
201 "PEBScounters": "0,1,2,3",
202 "EventName": "MEM_UOPS_RETIRED.DTLB_MISS_STORES",
203 "SampleAfterValue": "200003",
204 "BriefDescription": "Store uops retired that missed the DTLB (Precise event capable)"
205 },
206 {
207 "PEBS": "2",
208 "CollectPEBSRecord": "2",
209 "PublicDescription": "Counts uops retired that had a DTLB miss on load, store or either. Note that when two distinct memory operations to the same page miss the DTLB, only one of them will be recorded as a DTLB miss.",
210 "EventCode": "0xD0",
211 "Counter": "0,1,2,3",
212 "UMask": "0x13",
213 "PEBScounters": "0,1,2,3",
214 "EventName": "MEM_UOPS_RETIRED.DTLB_MISS",
215 "SampleAfterValue": "200003",
216 "BriefDescription": "Memory uops retired that missed the DTLB (Precise event capable)"
217 }
218] \ No newline at end of file
diff --git a/tools/perf/pmu-events/arch/x86/haswell/cache.json b/tools/perf/pmu-events/arch/x86/haswell/cache.json
index bfb5ebf48c54..da4d6ddd4f92 100644
--- a/tools/perf/pmu-events/arch/x86/haswell/cache.json
+++ b/tools/perf/pmu-events/arch/x86/haswell/cache.json
@@ -11,14 +11,34 @@
11 "CounterHTOff": "0,1,2,3,4,5,6,7" 11 "CounterHTOff": "0,1,2,3,4,5,6,7"
12 }, 12 },
13 { 13 {
14 "PublicDescription": "Demand data read requests that hit L2 cache.", 14 "PublicDescription": "Counts the number of store RFO requests that miss the L2 cache.",
15 "EventCode": "0x24", 15 "EventCode": "0x24",
16 "Counter": "0,1,2,3", 16 "Counter": "0,1,2,3",
17 "UMask": "0x41", 17 "UMask": "0x22",
18 "EventName": "L2_RQSTS.RFO_MISS",
19 "SampleAfterValue": "200003",
20 "BriefDescription": "RFO requests that miss L2 cache",
21 "CounterHTOff": "0,1,2,3,4,5,6,7"
22 },
23 {
24 "PublicDescription": "Number of instruction fetches that missed the L2 cache.",
25 "EventCode": "0x24",
26 "Counter": "0,1,2,3",
27 "UMask": "0x24",
28 "EventName": "L2_RQSTS.CODE_RD_MISS",
29 "SampleAfterValue": "200003",
30 "BriefDescription": "L2 cache misses when fetching instructions",
31 "CounterHTOff": "0,1,2,3,4,5,6,7"
32 },
33 {
34 "PublicDescription": "Demand requests that miss L2 cache.",
35 "EventCode": "0x24",
36 "Counter": "0,1,2,3",
37 "UMask": "0x27",
18 "Errata": "HSD78", 38 "Errata": "HSD78",
19 "EventName": "L2_RQSTS.DEMAND_DATA_RD_HIT", 39 "EventName": "L2_RQSTS.ALL_DEMAND_MISS",
20 "SampleAfterValue": "200003", 40 "SampleAfterValue": "200003",
21 "BriefDescription": "Demand Data Read requests that hit L2 cache", 41 "BriefDescription": "Demand requests that miss L2 cache",
22 "CounterHTOff": "0,1,2,3,4,5,6,7" 42 "CounterHTOff": "0,1,2,3,4,5,6,7"
23 }, 43 },
24 { 44 {
@@ -32,6 +52,48 @@
32 "CounterHTOff": "0,1,2,3,4,5,6,7" 52 "CounterHTOff": "0,1,2,3,4,5,6,7"
33 }, 53 },
34 { 54 {
55 "PublicDescription": "All requests that missed L2.",
56 "EventCode": "0x24",
57 "Counter": "0,1,2,3",
58 "UMask": "0x3f",
59 "Errata": "HSD78",
60 "EventName": "L2_RQSTS.MISS",
61 "SampleAfterValue": "200003",
62 "BriefDescription": "All requests that miss L2 cache",
63 "CounterHTOff": "0,1,2,3,4,5,6,7"
64 },
65 {
66 "PublicDescription": "Demand data read requests that hit L2 cache.",
67 "EventCode": "0x24",
68 "Counter": "0,1,2,3",
69 "UMask": "0x41",
70 "Errata": "HSD78",
71 "EventName": "L2_RQSTS.DEMAND_DATA_RD_HIT",
72 "SampleAfterValue": "200003",
73 "BriefDescription": "Demand Data Read requests that hit L2 cache",
74 "CounterHTOff": "0,1,2,3,4,5,6,7"
75 },
76 {
77 "PublicDescription": "Counts the number of store RFO requests that hit the L2 cache.",
78 "EventCode": "0x24",
79 "Counter": "0,1,2,3",
80 "UMask": "0x42",
81 "EventName": "L2_RQSTS.RFO_HIT",
82 "SampleAfterValue": "200003",
83 "BriefDescription": "RFO requests that hit L2 cache",
84 "CounterHTOff": "0,1,2,3,4,5,6,7"
85 },
86 {
87 "PublicDescription": "Number of instruction fetches that hit the L2 cache.",
88 "EventCode": "0x24",
89 "Counter": "0,1,2,3",
90 "UMask": "0x44",
91 "EventName": "L2_RQSTS.CODE_RD_HIT",
92 "SampleAfterValue": "200003",
93 "BriefDescription": "L2 cache hits when fetching instructions, code reads.",
94 "CounterHTOff": "0,1,2,3,4,5,6,7"
95 },
96 {
35 "PublicDescription": "Counts all L2 HW prefetcher requests that hit L2.", 97 "PublicDescription": "Counts all L2 HW prefetcher requests that hit L2.",
36 "EventCode": "0x24", 98 "EventCode": "0x24",
37 "Counter": "0,1,2,3", 99 "Counter": "0,1,2,3",
@@ -73,6 +135,17 @@
73 "CounterHTOff": "0,1,2,3,4,5,6,7" 135 "CounterHTOff": "0,1,2,3,4,5,6,7"
74 }, 136 },
75 { 137 {
138 "PublicDescription": "Demand requests to L2 cache.",
139 "EventCode": "0x24",
140 "Counter": "0,1,2,3",
141 "UMask": "0xe7",
142 "Errata": "HSD78",
143 "EventName": "L2_RQSTS.ALL_DEMAND_REFERENCES",
144 "SampleAfterValue": "200003",
145 "BriefDescription": "Demand requests to L2 cache",
146 "CounterHTOff": "0,1,2,3,4,5,6,7"
147 },
148 {
76 "PublicDescription": "Counts all L2 HW prefetcher requests.", 149 "PublicDescription": "Counts all L2 HW prefetcher requests.",
77 "EventCode": "0x24", 150 "EventCode": "0x24",
78 "Counter": "0,1,2,3", 151 "Counter": "0,1,2,3",
@@ -83,6 +156,17 @@
83 "CounterHTOff": "0,1,2,3,4,5,6,7" 156 "CounterHTOff": "0,1,2,3,4,5,6,7"
84 }, 157 },
85 { 158 {
159 "PublicDescription": "All requests to L2 cache.",
160 "EventCode": "0x24",
161 "Counter": "0,1,2,3",
162 "UMask": "0xff",
163 "Errata": "HSD78",
164 "EventName": "L2_RQSTS.REFERENCES",
165 "SampleAfterValue": "200003",
166 "BriefDescription": "All L2 requests",
167 "CounterHTOff": "0,1,2,3,4,5,6,7"
168 },
169 {
86 "PublicDescription": "Not rejected writebacks that hit L2 cache.", 170 "PublicDescription": "Not rejected writebacks that hit L2 cache.",
87 "EventCode": "0x27", 171 "EventCode": "0x27",
88 "Counter": "0,1,2,3", 172 "Counter": "0,1,2,3",
@@ -124,6 +208,27 @@
124 }, 208 },
125 { 209 {
126 "EventCode": "0x48", 210 "EventCode": "0x48",
211 "Counter": "2",
212 "UMask": "0x1",
213 "EventName": "L1D_PEND_MISS.PENDING_CYCLES",
214 "SampleAfterValue": "2000003",
215 "BriefDescription": "Cycles with L1D load Misses outstanding.",
216 "CounterMask": "1",
217 "CounterHTOff": "2"
218 },
219 {
220 "EventCode": "0x48",
221 "Counter": "2",
222 "UMask": "0x1",
223 "AnyThread": "1",
224 "EventName": "L1D_PEND_MISS.PENDING_CYCLES_ANY",
225 "SampleAfterValue": "2000003",
226 "BriefDescription": "Cycles with L1D load Misses outstanding from any thread on physical core.",
227 "CounterMask": "1",
228 "CounterHTOff": "2"
229 },
230 {
231 "EventCode": "0x48",
127 "Counter": "0,1,2,3", 232 "Counter": "0,1,2,3",
128 "UMask": "0x2", 233 "UMask": "0x2",
129 "EventName": "L1D_PEND_MISS.REQUEST_FB_FULL", 234 "EventName": "L1D_PEND_MISS.REQUEST_FB_FULL",
@@ -133,13 +238,13 @@
133 }, 238 },
134 { 239 {
135 "EventCode": "0x48", 240 "EventCode": "0x48",
136 "Counter": "2", 241 "Counter": "0,1,2,3",
137 "UMask": "0x1", 242 "UMask": "0x2",
138 "EventName": "L1D_PEND_MISS.PENDING_CYCLES", 243 "EventName": "L1D_PEND_MISS.FB_FULL",
139 "SampleAfterValue": "2000003", 244 "SampleAfterValue": "2000003",
140 "BriefDescription": "Cycles with L1D load Misses outstanding.", 245 "BriefDescription": "Cycles a demand request was blocked due to Fill Buffers inavailability.",
141 "CounterMask": "1", 246 "CounterMask": "1",
142 "CounterHTOff": "2" 247 "CounterHTOff": "0,1,2,3,4,5,6,7"
143 }, 248 },
144 { 249 {
145 "PublicDescription": "This event counts when new data lines are brought into the L1 Data cache, which cause other lines to be evicted from the cache.", 250 "PublicDescription": "This event counts when new data lines are brought into the L1 Data cache, which cause other lines to be evicted from the cache.",
@@ -163,6 +268,28 @@
163 "CounterHTOff": "0,1,2,3,4,5,6,7" 268 "CounterHTOff": "0,1,2,3,4,5,6,7"
164 }, 269 },
165 { 270 {
271 "EventCode": "0x60",
272 "Counter": "0,1,2,3",
273 "UMask": "0x1",
274 "Errata": "HSD78, HSD62, HSD61",
275 "EventName": "OFFCORE_REQUESTS_OUTSTANDING.CYCLES_WITH_DEMAND_DATA_RD",
276 "SampleAfterValue": "2000003",
277 "BriefDescription": "Cycles when offcore outstanding Demand Data Read transactions are present in SuperQueue (SQ), queue to uncore.",
278 "CounterMask": "1",
279 "CounterHTOff": "0,1,2,3,4,5,6,7"
280 },
281 {
282 "EventCode": "0x60",
283 "Counter": "0,1,2,3",
284 "UMask": "0x1",
285 "Errata": "HSD78, HSD62, HSD61",
286 "EventName": "OFFCORE_REQUESTS_OUTSTANDING.DEMAND_DATA_RD_GE_6",
287 "SampleAfterValue": "2000003",
288 "BriefDescription": "Cycles with at least 6 offcore outstanding Demand Data Read transactions in uncore queue.",
289 "CounterMask": "6",
290 "CounterHTOff": "0,1,2,3,4,5,6,7"
291 },
292 {
166 "PublicDescription": "Offcore outstanding Demand code Read transactions in SQ to uncore. Set Cmask=1 to count cycles.", 293 "PublicDescription": "Offcore outstanding Demand code Read transactions in SQ to uncore. Set Cmask=1 to count cycles.",
167 "EventCode": "0x60", 294 "EventCode": "0x60",
168 "Counter": "0,1,2,3", 295 "Counter": "0,1,2,3",
@@ -185,46 +312,35 @@
185 "CounterHTOff": "0,1,2,3,4,5,6,7" 312 "CounterHTOff": "0,1,2,3,4,5,6,7"
186 }, 313 },
187 { 314 {
188 "PublicDescription": "Offcore outstanding cacheable data read transactions in SQ to uncore. Set Cmask=1 to count cycles.",
189 "EventCode": "0x60", 315 "EventCode": "0x60",
190 "Counter": "0,1,2,3", 316 "Counter": "0,1,2,3",
191 "UMask": "0x8", 317 "UMask": "0x4",
192 "Errata": "HSD62, HSD61", 318 "Errata": "HSD62, HSD61",
193 "EventName": "OFFCORE_REQUESTS_OUTSTANDING.ALL_DATA_RD", 319 "EventName": "OFFCORE_REQUESTS_OUTSTANDING.CYCLES_WITH_DEMAND_RFO",
194 "SampleAfterValue": "2000003",
195 "BriefDescription": "Offcore outstanding cacheable Core Data Read transactions in SuperQueue (SQ), queue to uncore",
196 "CounterHTOff": "0,1,2,3,4,5,6,7"
197 },
198 {
199 "EventCode": "0x60",
200 "Counter": "0,1,2,3",
201 "UMask": "0x1",
202 "Errata": "HSD78, HSD62, HSD61",
203 "EventName": "OFFCORE_REQUESTS_OUTSTANDING.CYCLES_WITH_DEMAND_DATA_RD",
204 "SampleAfterValue": "2000003", 320 "SampleAfterValue": "2000003",
205 "BriefDescription": "Cycles when offcore outstanding Demand Data Read transactions are present in SuperQueue (SQ), queue to uncore.", 321 "BriefDescription": "Offcore outstanding demand rfo reads transactions in SuperQueue (SQ), queue to uncore, every cycle.",
206 "CounterMask": "1", 322 "CounterMask": "1",
207 "CounterHTOff": "0,1,2,3,4,5,6,7" 323 "CounterHTOff": "0,1,2,3,4,5,6,7"
208 }, 324 },
209 { 325 {
326 "PublicDescription": "Offcore outstanding cacheable data read transactions in SQ to uncore. Set Cmask=1 to count cycles.",
210 "EventCode": "0x60", 327 "EventCode": "0x60",
211 "Counter": "0,1,2,3", 328 "Counter": "0,1,2,3",
212 "UMask": "0x8", 329 "UMask": "0x8",
213 "Errata": "HSD62, HSD61", 330 "Errata": "HSD62, HSD61",
214 "EventName": "OFFCORE_REQUESTS_OUTSTANDING.CYCLES_WITH_DATA_RD", 331 "EventName": "OFFCORE_REQUESTS_OUTSTANDING.ALL_DATA_RD",
215 "SampleAfterValue": "2000003", 332 "SampleAfterValue": "2000003",
216 "BriefDescription": "Cycles when offcore outstanding cacheable Core Data Read transactions are present in SuperQueue (SQ), queue to uncore.", 333 "BriefDescription": "Offcore outstanding cacheable Core Data Read transactions in SuperQueue (SQ), queue to uncore",
217 "CounterMask": "1",
218 "CounterHTOff": "0,1,2,3,4,5,6,7" 334 "CounterHTOff": "0,1,2,3,4,5,6,7"
219 }, 335 },
220 { 336 {
221 "EventCode": "0x60", 337 "EventCode": "0x60",
222 "Counter": "0,1,2,3", 338 "Counter": "0,1,2,3",
223 "UMask": "0x4", 339 "UMask": "0x8",
224 "Errata": "HSD62, HSD61", 340 "Errata": "HSD62, HSD61",
225 "EventName": "OFFCORE_REQUESTS_OUTSTANDING.CYCLES_WITH_DEMAND_RFO", 341 "EventName": "OFFCORE_REQUESTS_OUTSTANDING.CYCLES_WITH_DATA_RD",
226 "SampleAfterValue": "2000003", 342 "SampleAfterValue": "2000003",
227 "BriefDescription": "Offcore outstanding demand rfo reads transactions in SuperQueue (SQ), queue to uncore, every cycle.", 343 "BriefDescription": "Cycles when offcore outstanding cacheable Core Data Read transactions are present in SuperQueue (SQ), queue to uncore.",
228 "CounterMask": "1", 344 "CounterMask": "1",
229 "CounterHTOff": "0,1,2,3,4,5,6,7" 345 "CounterHTOff": "0,1,2,3,4,5,6,7"
230 }, 346 },
@@ -289,6 +405,15 @@
289 "CounterHTOff": "0,1,2,3,4,5,6,7" 405 "CounterHTOff": "0,1,2,3,4,5,6,7"
290 }, 406 },
291 { 407 {
408 "EventCode": "0xB7, 0xBB",
409 "Counter": "0,1,2,3",
410 "UMask": "0x1",
411 "EventName": "OFFCORE_RESPONSE",
412 "SampleAfterValue": "100003",
413 "BriefDescription": "Offcore response can be programmed only with a specific pair of event select and counter MSR, and with specific event codes and predefine mask bit value in a dedicated MSR to specify attributes of the offcore transaction.",
414 "CounterHTOff": "0,1,2,3"
415 },
416 {
292 "PEBS": "1", 417 "PEBS": "1",
293 "EventCode": "0xD0", 418 "EventCode": "0xD0",
294 "Counter": "0,1,2,3", 419 "Counter": "0,1,2,3",
@@ -296,7 +421,7 @@
296 "Errata": "HSD29, HSM30", 421 "Errata": "HSD29, HSM30",
297 "EventName": "MEM_UOPS_RETIRED.STLB_MISS_LOADS", 422 "EventName": "MEM_UOPS_RETIRED.STLB_MISS_LOADS",
298 "SampleAfterValue": "100003", 423 "SampleAfterValue": "100003",
299 "BriefDescription": "Retired load uops that miss the STLB.", 424 "BriefDescription": "Retired load uops that miss the STLB. (precise Event)",
300 "CounterHTOff": "0,1,2,3", 425 "CounterHTOff": "0,1,2,3",
301 "Data_LA": "1" 426 "Data_LA": "1"
302 }, 427 },
@@ -308,7 +433,7 @@
308 "Errata": "HSD29, HSM30", 433 "Errata": "HSD29, HSM30",
309 "EventName": "MEM_UOPS_RETIRED.STLB_MISS_STORES", 434 "EventName": "MEM_UOPS_RETIRED.STLB_MISS_STORES",
310 "SampleAfterValue": "100003", 435 "SampleAfterValue": "100003",
311 "BriefDescription": "Retired store uops that miss the STLB.", 436 "BriefDescription": "Retired store uops that miss the STLB. (precise Event)",
312 "CounterHTOff": "0,1,2,3", 437 "CounterHTOff": "0,1,2,3",
313 "Data_LA": "1", 438 "Data_LA": "1",
314 "L1_Hit_Indication": "1" 439 "L1_Hit_Indication": "1"
@@ -321,31 +446,33 @@
321 "Errata": "HSD76, HSD29, HSM30", 446 "Errata": "HSD76, HSD29, HSM30",
322 "EventName": "MEM_UOPS_RETIRED.LOCK_LOADS", 447 "EventName": "MEM_UOPS_RETIRED.LOCK_LOADS",
323 "SampleAfterValue": "100003", 448 "SampleAfterValue": "100003",
324 "BriefDescription": "Retired load uops with locked access.", 449 "BriefDescription": "Retired load uops with locked access. (precise Event)",
325 "CounterHTOff": "0,1,2,3", 450 "CounterHTOff": "0,1,2,3",
326 "Data_LA": "1" 451 "Data_LA": "1"
327 }, 452 },
328 { 453 {
329 "PEBS": "1", 454 "PEBS": "1",
455 "PublicDescription": "This event counts load uops retired which had memory addresses spilt across 2 cache lines. A line split is across 64B cache-lines which may include a page split (4K). This is a precise event.",
330 "EventCode": "0xD0", 456 "EventCode": "0xD0",
331 "Counter": "0,1,2,3", 457 "Counter": "0,1,2,3",
332 "UMask": "0x41", 458 "UMask": "0x41",
333 "Errata": "HSD29, HSM30", 459 "Errata": "HSD29, HSM30",
334 "EventName": "MEM_UOPS_RETIRED.SPLIT_LOADS", 460 "EventName": "MEM_UOPS_RETIRED.SPLIT_LOADS",
335 "SampleAfterValue": "100003", 461 "SampleAfterValue": "100003",
336 "BriefDescription": "Retired load uops that split across a cacheline boundary.", 462 "BriefDescription": "Retired load uops that split across a cacheline boundary. (precise Event)",
337 "CounterHTOff": "0,1,2,3", 463 "CounterHTOff": "0,1,2,3",
338 "Data_LA": "1" 464 "Data_LA": "1"
339 }, 465 },
340 { 466 {
341 "PEBS": "1", 467 "PEBS": "1",
468 "PublicDescription": "This event counts store uops retired which had memory addresses spilt across 2 cache lines. A line split is across 64B cache-lines which may include a page split (4K). This is a precise event.",
342 "EventCode": "0xD0", 469 "EventCode": "0xD0",
343 "Counter": "0,1,2,3", 470 "Counter": "0,1,2,3",
344 "UMask": "0x42", 471 "UMask": "0x42",
345 "Errata": "HSD29, HSM30", 472 "Errata": "HSD29, HSM30",
346 "EventName": "MEM_UOPS_RETIRED.SPLIT_STORES", 473 "EventName": "MEM_UOPS_RETIRED.SPLIT_STORES",
347 "SampleAfterValue": "100003", 474 "SampleAfterValue": "100003",
348 "BriefDescription": "Retired store uops that split across a cacheline boundary.", 475 "BriefDescription": "Retired store uops that split across a cacheline boundary. (precise Event)",
349 "CounterHTOff": "0,1,2,3", 476 "CounterHTOff": "0,1,2,3",
350 "Data_LA": "1", 477 "Data_LA": "1",
351 "L1_Hit_Indication": "1" 478 "L1_Hit_Indication": "1"
@@ -358,19 +485,20 @@
358 "Errata": "HSD29, HSM30", 485 "Errata": "HSD29, HSM30",
359 "EventName": "MEM_UOPS_RETIRED.ALL_LOADS", 486 "EventName": "MEM_UOPS_RETIRED.ALL_LOADS",
360 "SampleAfterValue": "2000003", 487 "SampleAfterValue": "2000003",
361 "BriefDescription": "All retired load uops.", 488 "BriefDescription": "All retired load uops. (precise Event)",
362 "CounterHTOff": "0,1,2,3", 489 "CounterHTOff": "0,1,2,3",
363 "Data_LA": "1" 490 "Data_LA": "1"
364 }, 491 },
365 { 492 {
366 "PEBS": "1", 493 "PEBS": "1",
494 "PublicDescription": "This event counts all store uops retired. This is a precise event.",
367 "EventCode": "0xD0", 495 "EventCode": "0xD0",
368 "Counter": "0,1,2,3", 496 "Counter": "0,1,2,3",
369 "UMask": "0x82", 497 "UMask": "0x82",
370 "Errata": "HSD29, HSM30", 498 "Errata": "HSD29, HSM30",
371 "EventName": "MEM_UOPS_RETIRED.ALL_STORES", 499 "EventName": "MEM_UOPS_RETIRED.ALL_STORES",
372 "SampleAfterValue": "2000003", 500 "SampleAfterValue": "2000003",
373 "BriefDescription": "All retired store uops.", 501 "BriefDescription": "All retired store uops. (precise Event)",
374 "CounterHTOff": "0,1,2,3", 502 "CounterHTOff": "0,1,2,3",
375 "Data_LA": "1", 503 "Data_LA": "1",
376 "L1_Hit_Indication": "1" 504 "L1_Hit_Indication": "1"
@@ -401,20 +529,20 @@
401 }, 529 },
402 { 530 {
403 "PEBS": "1", 531 "PEBS": "1",
404 "PublicDescription": "Retired load uops with L3 cache hits as data sources.", 532 "PublicDescription": "This event counts retired load uops in which data sources were data hits in the L3 cache without snoops required. This does not include hardware prefetches. This is a precise event.",
405 "EventCode": "0xD1", 533 "EventCode": "0xD1",
406 "Counter": "0,1,2,3", 534 "Counter": "0,1,2,3",
407 "UMask": "0x4", 535 "UMask": "0x4",
408 "Errata": "HSD74, HSD29, HSD25, HSM26, HSM30", 536 "Errata": "HSD74, HSD29, HSD25, HSM26, HSM30",
409 "EventName": "MEM_LOAD_UOPS_RETIRED.L3_HIT", 537 "EventName": "MEM_LOAD_UOPS_RETIRED.L3_HIT",
410 "SampleAfterValue": "50021", 538 "SampleAfterValue": "50021",
411 "BriefDescription": "Retired load uops which data sources were data hits in L3 without snoops required.", 539 "BriefDescription": "Miss in last-level (L3) cache. Excludes Unknown data-source.",
412 "CounterHTOff": "0,1,2,3", 540 "CounterHTOff": "0,1,2,3",
413 "Data_LA": "1" 541 "Data_LA": "1"
414 }, 542 },
415 { 543 {
416 "PEBS": "1", 544 "PEBS": "1",
417 "PublicDescription": "Retired load uops missed L1 cache as data sources.", 545 "PublicDescription": "This event counts retired load uops in which data sources missed in the L1 cache. This does not include hardware prefetches. This is a precise event.",
418 "EventCode": "0xD1", 546 "EventCode": "0xD1",
419 "Counter": "0,1,2,3", 547 "Counter": "0,1,2,3",
420 "UMask": "0x8", 548 "UMask": "0x8",
@@ -427,20 +555,18 @@
427 }, 555 },
428 { 556 {
429 "PEBS": "1", 557 "PEBS": "1",
430 "PublicDescription": "Retired load uops missed L2. Unknown data source excluded.",
431 "EventCode": "0xD1", 558 "EventCode": "0xD1",
432 "Counter": "0,1,2,3", 559 "Counter": "0,1,2,3",
433 "UMask": "0x10", 560 "UMask": "0x10",
434 "Errata": "HSD29, HSM30", 561 "Errata": "HSD29, HSM30",
435 "EventName": "MEM_LOAD_UOPS_RETIRED.L2_MISS", 562 "EventName": "MEM_LOAD_UOPS_RETIRED.L2_MISS",
436 "SampleAfterValue": "50021", 563 "SampleAfterValue": "50021",
437 "BriefDescription": "Miss in mid-level (L2) cache. Excludes Unknown data-source.", 564 "BriefDescription": "Retired load uops with L2 cache misses as data sources.",
438 "CounterHTOff": "0,1,2,3", 565 "CounterHTOff": "0,1,2,3",
439 "Data_LA": "1" 566 "Data_LA": "1"
440 }, 567 },
441 { 568 {
442 "PEBS": "1", 569 "PEBS": "1",
443 "PublicDescription": "Retired load uops missed L3. Excludes unknown data source .",
444 "EventCode": "0xD1", 570 "EventCode": "0xD1",
445 "Counter": "0,1,2,3", 571 "Counter": "0,1,2,3",
446 "UMask": "0x20", 572 "UMask": "0x20",
@@ -477,25 +603,27 @@
477 }, 603 },
478 { 604 {
479 "PEBS": "1", 605 "PEBS": "1",
606 "PublicDescription": "This event counts retired load uops that hit in the L3 cache, but required a cross-core snoop which resulted in a HIT in an on-pkg core cache. This does not include hardware prefetches. This is a precise event.",
480 "EventCode": "0xD2", 607 "EventCode": "0xD2",
481 "Counter": "0,1,2,3", 608 "Counter": "0,1,2,3",
482 "UMask": "0x2", 609 "UMask": "0x2",
483 "Errata": "HSD29, HSD25, HSM26, HSM30", 610 "Errata": "HSD29, HSD25, HSM26, HSM30",
484 "EventName": "MEM_LOAD_UOPS_L3_HIT_RETIRED.XSNP_HIT", 611 "EventName": "MEM_LOAD_UOPS_L3_HIT_RETIRED.XSNP_HIT",
485 "SampleAfterValue": "20011", 612 "SampleAfterValue": "20011",
486 "BriefDescription": "Retired load uops which data sources were L3 and cross-core snoop hits in on-pkg core cache.", 613 "BriefDescription": "Retired load uops which data sources were L3 and cross-core snoop hits in on-pkg core cache. ",
487 "CounterHTOff": "0,1,2,3", 614 "CounterHTOff": "0,1,2,3",
488 "Data_LA": "1" 615 "Data_LA": "1"
489 }, 616 },
490 { 617 {
491 "PEBS": "1", 618 "PEBS": "1",
619 "PublicDescription": "This event counts retired load uops that hit in the L3 cache, but required a cross-core snoop which resulted in a HITM (hit modified) in an on-pkg core cache. This does not include hardware prefetches. This is a precise event.",
492 "EventCode": "0xD2", 620 "EventCode": "0xD2",
493 "Counter": "0,1,2,3", 621 "Counter": "0,1,2,3",
494 "UMask": "0x4", 622 "UMask": "0x4",
495 "Errata": "HSD29, HSD25, HSM26, HSM30", 623 "Errata": "HSD29, HSD25, HSM26, HSM30",
496 "EventName": "MEM_LOAD_UOPS_L3_HIT_RETIRED.XSNP_HITM", 624 "EventName": "MEM_LOAD_UOPS_L3_HIT_RETIRED.XSNP_HITM",
497 "SampleAfterValue": "20011", 625 "SampleAfterValue": "20011",
498 "BriefDescription": "Retired load uops which data sources were HitM responses from shared L3.", 626 "BriefDescription": "Retired load uops which data sources were HitM responses from shared L3. ",
499 "CounterHTOff": "0,1,2,3", 627 "CounterHTOff": "0,1,2,3",
500 "Data_LA": "1" 628 "Data_LA": "1"
501 }, 629 },
@@ -513,14 +641,13 @@
513 }, 641 },
514 { 642 {
515 "PEBS": "1", 643 "PEBS": "1",
516 "PublicDescription": "This event counts retired load uops where the data came from local DRAM. This does not include hardware prefetches.", 644 "PublicDescription": "This event counts retired load uops where the data came from local DRAM. This does not include hardware prefetches. This is a precise event.",
517 "EventCode": "0xD3", 645 "EventCode": "0xD3",
518 "Counter": "0,1,2,3", 646 "Counter": "0,1,2,3",
519 "UMask": "0x1", 647 "UMask": "0x1",
520 "Errata": "HSD74, HSD29, HSD25, HSM30", 648 "Errata": "HSD74, HSD29, HSD25, HSM30",
521 "EventName": "MEM_LOAD_UOPS_L3_MISS_RETIRED.LOCAL_DRAM", 649 "EventName": "MEM_LOAD_UOPS_L3_MISS_RETIRED.LOCAL_DRAM",
522 "SampleAfterValue": "100003", 650 "SampleAfterValue": "100003",
523 "BriefDescription": "Data from local DRAM either Snoop not needed or Snoop Miss (RspI)",
524 "CounterHTOff": "0,1,2,3", 651 "CounterHTOff": "0,1,2,3",
525 "Data_LA": "1" 652 "Data_LA": "1"
526 }, 653 },
@@ -665,6 +792,7 @@
665 "CounterHTOff": "0,1,2,3,4,5,6,7" 792 "CounterHTOff": "0,1,2,3,4,5,6,7"
666 }, 793 },
667 { 794 {
795 "PublicDescription": "",
668 "EventCode": "0xf4", 796 "EventCode": "0xf4",
669 "Counter": "0,1,2,3", 797 "Counter": "0,1,2,3",
670 "UMask": "0x10", 798 "UMask": "0x10",
@@ -674,131 +802,7 @@
674 "CounterHTOff": "0,1,2,3,4,5,6,7" 802 "CounterHTOff": "0,1,2,3,4,5,6,7"
675 }, 803 },
676 { 804 {
677 "PublicDescription": "Counts the number of store RFO requests that hit the L2 cache.", 805 "PublicDescription": "Counts all requests that hit in the L3 Offcore response can be programmed only with a specific pair of event select and counter MSR, and with specific event codes and predefine mask bit value in a dedicated MSR to specify attributes of the offcore transaction.",
678 "EventCode": "0x24",
679 "Counter": "0,1,2,3",
680 "UMask": "0x42",
681 "EventName": "L2_RQSTS.RFO_HIT",
682 "SampleAfterValue": "200003",
683 "BriefDescription": "RFO requests that hit L2 cache",
684 "CounterHTOff": "0,1,2,3,4,5,6,7"
685 },
686 {
687 "PublicDescription": "Counts the number of store RFO requests that miss the L2 cache.",
688 "EventCode": "0x24",
689 "Counter": "0,1,2,3",
690 "UMask": "0x22",
691 "EventName": "L2_RQSTS.RFO_MISS",
692 "SampleAfterValue": "200003",
693 "BriefDescription": "RFO requests that miss L2 cache",
694 "CounterHTOff": "0,1,2,3,4,5,6,7"
695 },
696 {
697 "PublicDescription": "Number of instruction fetches that hit the L2 cache.",
698 "EventCode": "0x24",
699 "Counter": "0,1,2,3",
700 "UMask": "0x44",
701 "EventName": "L2_RQSTS.CODE_RD_HIT",
702 "SampleAfterValue": "200003",
703 "BriefDescription": "L2 cache hits when fetching instructions, code reads.",
704 "CounterHTOff": "0,1,2,3,4,5,6,7"
705 },
706 {
707 "PublicDescription": "Number of instruction fetches that missed the L2 cache.",
708 "EventCode": "0x24",
709 "Counter": "0,1,2,3",
710 "UMask": "0x24",
711 "EventName": "L2_RQSTS.CODE_RD_MISS",
712 "SampleAfterValue": "200003",
713 "BriefDescription": "L2 cache misses when fetching instructions",
714 "CounterHTOff": "0,1,2,3,4,5,6,7"
715 },
716 {
717 "PublicDescription": "Demand requests that miss L2 cache.",
718 "EventCode": "0x24",
719 "Counter": "0,1,2,3",
720 "UMask": "0x27",
721 "Errata": "HSD78",
722 "EventName": "L2_RQSTS.ALL_DEMAND_MISS",
723 "SampleAfterValue": "200003",
724 "BriefDescription": "Demand requests that miss L2 cache",
725 "CounterHTOff": "0,1,2,3,4,5,6,7"
726 },
727 {
728 "PublicDescription": "Demand requests to L2 cache.",
729 "EventCode": "0x24",
730 "Counter": "0,1,2,3",
731 "UMask": "0xe7",
732 "Errata": "HSD78",
733 "EventName": "L2_RQSTS.ALL_DEMAND_REFERENCES",
734 "SampleAfterValue": "200003",
735 "BriefDescription": "Demand requests to L2 cache",
736 "CounterHTOff": "0,1,2,3,4,5,6,7"
737 },
738 {
739 "PublicDescription": "All requests that missed L2.",
740 "EventCode": "0x24",
741 "Counter": "0,1,2,3",
742 "UMask": "0x3f",
743 "Errata": "HSD78",
744 "EventName": "L2_RQSTS.MISS",
745 "SampleAfterValue": "200003",
746 "BriefDescription": "All requests that miss L2 cache",
747 "CounterHTOff": "0,1,2,3,4,5,6,7"
748 },
749 {
750 "PublicDescription": "All requests to L2 cache.",
751 "EventCode": "0x24",
752 "Counter": "0,1,2,3",
753 "UMask": "0xff",
754 "Errata": "HSD78",
755 "EventName": "L2_RQSTS.REFERENCES",
756 "SampleAfterValue": "200003",
757 "BriefDescription": "All L2 requests",
758 "CounterHTOff": "0,1,2,3,4,5,6,7"
759 },
760 {
761 "EventCode": "0xB7, 0xBB",
762 "Counter": "0,1,2,3",
763 "UMask": "0x1",
764 "EventName": "OFFCORE_RESPONSE",
765 "SampleAfterValue": "100003",
766 "BriefDescription": "Offcore response can be programmed only with a specific pair of event select and counter MSR, and with specific event codes and predefine mask bit value in a dedicated MSR to specify attributes of the offcore transaction.",
767 "CounterHTOff": "0,1,2,3"
768 },
769 {
770 "EventCode": "0x60",
771 "Counter": "0,1,2,3",
772 "UMask": "0x1",
773 "Errata": "HSD78, HSD62, HSD61",
774 "EventName": "OFFCORE_REQUESTS_OUTSTANDING.DEMAND_DATA_RD_GE_6",
775 "SampleAfterValue": "2000003",
776 "BriefDescription": "Cycles with at least 6 offcore outstanding Demand Data Read transactions in uncore queue.",
777 "CounterMask": "6",
778 "CounterHTOff": "0,1,2,3,4,5,6,7"
779 },
780 {
781 "EventCode": "0x48",
782 "Counter": "2",
783 "UMask": "0x1",
784 "AnyThread": "1",
785 "EventName": "L1D_PEND_MISS.PENDING_CYCLES_ANY",
786 "SampleAfterValue": "2000003",
787 "BriefDescription": "Cycles with L1D load Misses outstanding from any thread on physical core.",
788 "CounterMask": "1",
789 "CounterHTOff": "2"
790 },
791 {
792 "EventCode": "0x48",
793 "Counter": "0,1,2,3",
794 "UMask": "0x2",
795 "EventName": "L1D_PEND_MISS.FB_FULL",
796 "SampleAfterValue": "2000003",
797 "BriefDescription": "Cycles a demand request was blocked due to Fill Buffers inavailability.",
798 "CounterMask": "1",
799 "CounterHTOff": "0,1,2,3,4,5,6,7"
800 },
801 {
802 "EventCode": "0xB7, 0xBB", 806 "EventCode": "0xB7, 0xBB",
803 "MSRValue": "0x3f803c8fff", 807 "MSRValue": "0x3f803c8fff",
804 "Counter": "0,1,2,3", 808 "Counter": "0,1,2,3",
@@ -811,6 +815,7 @@
811 "CounterHTOff": "0,1,2,3" 815 "CounterHTOff": "0,1,2,3"
812 }, 816 },
813 { 817 {
818 "PublicDescription": "Counts all data/code/rfo reads (demand & prefetch) that hit in the L3 and the snoop to one of the sibling cores hits the line in M state and the line is forwarded Offcore response can be programmed only with a specific pair of event select and counter MSR, and with specific event codes and predefine mask bit value in a dedicated MSR to specify attributes of the offcore transaction.",
814 "EventCode": "0xB7, 0xBB", 819 "EventCode": "0xB7, 0xBB",
815 "MSRValue": "0x10003c07f7", 820 "MSRValue": "0x10003c07f7",
816 "Counter": "0,1,2,3", 821 "Counter": "0,1,2,3",
@@ -823,6 +828,7 @@
823 "CounterHTOff": "0,1,2,3" 828 "CounterHTOff": "0,1,2,3"
824 }, 829 },
825 { 830 {
831 "PublicDescription": "Counts all data/code/rfo reads (demand & prefetch) that hit in the L3 and the snoops to sibling cores hit in either E/S state and the line is not forwarded Offcore response can be programmed only with a specific pair of event select and counter MSR, and with specific event codes and predefine mask bit value in a dedicated MSR to specify attributes of the offcore transaction.",
826 "EventCode": "0xB7, 0xBB", 832 "EventCode": "0xB7, 0xBB",
827 "MSRValue": "0x04003c07f7", 833 "MSRValue": "0x04003c07f7",
828 "Counter": "0,1,2,3", 834 "Counter": "0,1,2,3",
@@ -835,6 +841,7 @@
835 "CounterHTOff": "0,1,2,3" 841 "CounterHTOff": "0,1,2,3"
836 }, 842 },
837 { 843 {
844 "PublicDescription": "Counts all demand & prefetch code reads that hit in the L3 and the snoops to sibling cores hit in either E/S state and the line is not forwarded Offcore response can be programmed only with a specific pair of event select and counter MSR, and with specific event codes and predefine mask bit value in a dedicated MSR to specify attributes of the offcore transaction.",
838 "EventCode": "0xB7, 0xBB", 845 "EventCode": "0xB7, 0xBB",
839 "MSRValue": "0x04003c0244", 846 "MSRValue": "0x04003c0244",
840 "Counter": "0,1,2,3", 847 "Counter": "0,1,2,3",
@@ -847,6 +854,7 @@
847 "CounterHTOff": "0,1,2,3" 854 "CounterHTOff": "0,1,2,3"
848 }, 855 },
849 { 856 {
857 "PublicDescription": "Counts all demand & prefetch RFOs that hit in the L3 and the snoop to one of the sibling cores hits the line in M state and the line is forwarded Offcore response can be programmed only with a specific pair of event select and counter MSR, and with specific event codes and predefine mask bit value in a dedicated MSR to specify attributes of the offcore transaction.",
850 "EventCode": "0xB7, 0xBB", 858 "EventCode": "0xB7, 0xBB",
851 "MSRValue": "0x10003c0122", 859 "MSRValue": "0x10003c0122",
852 "Counter": "0,1,2,3", 860 "Counter": "0,1,2,3",
@@ -859,6 +867,7 @@
859 "CounterHTOff": "0,1,2,3" 867 "CounterHTOff": "0,1,2,3"
860 }, 868 },
861 { 869 {
870 "PublicDescription": "Counts all demand & prefetch RFOs that hit in the L3 and the snoops to sibling cores hit in either E/S state and the line is not forwarded Offcore response can be programmed only with a specific pair of event select and counter MSR, and with specific event codes and predefine mask bit value in a dedicated MSR to specify attributes of the offcore transaction.",
862 "EventCode": "0xB7, 0xBB", 871 "EventCode": "0xB7, 0xBB",
863 "MSRValue": "0x04003c0122", 872 "MSRValue": "0x04003c0122",
864 "Counter": "0,1,2,3", 873 "Counter": "0,1,2,3",
@@ -871,6 +880,7 @@
871 "CounterHTOff": "0,1,2,3" 880 "CounterHTOff": "0,1,2,3"
872 }, 881 },
873 { 882 {
883 "PublicDescription": "Counts all demand & prefetch data reads that hit in the L3 and the snoop to one of the sibling cores hits the line in M state and the line is forwarded Offcore response can be programmed only with a specific pair of event select and counter MSR, and with specific event codes and predefine mask bit value in a dedicated MSR to specify attributes of the offcore transaction.",
874 "EventCode": "0xB7, 0xBB", 884 "EventCode": "0xB7, 0xBB",
875 "MSRValue": "0x10003c0091", 885 "MSRValue": "0x10003c0091",
876 "Counter": "0,1,2,3", 886 "Counter": "0,1,2,3",
@@ -883,6 +893,7 @@
883 "CounterHTOff": "0,1,2,3" 893 "CounterHTOff": "0,1,2,3"
884 }, 894 },
885 { 895 {
896 "PublicDescription": "Counts all demand & prefetch data reads that hit in the L3 and the snoops to sibling cores hit in either E/S state and the line is not forwarded Offcore response can be programmed only with a specific pair of event select and counter MSR, and with specific event codes and predefine mask bit value in a dedicated MSR to specify attributes of the offcore transaction.",
886 "EventCode": "0xB7, 0xBB", 897 "EventCode": "0xB7, 0xBB",
887 "MSRValue": "0x04003c0091", 898 "MSRValue": "0x04003c0091",
888 "Counter": "0,1,2,3", 899 "Counter": "0,1,2,3",
@@ -895,6 +906,7 @@
895 "CounterHTOff": "0,1,2,3" 906 "CounterHTOff": "0,1,2,3"
896 }, 907 },
897 { 908 {
909 "PublicDescription": "Counts prefetch (that bring data to LLC only) code reads that hit in the L3 Offcore response can be programmed only with a specific pair of event select and counter MSR, and with specific event codes and predefine mask bit value in a dedicated MSR to specify attributes of the offcore transaction.",
898 "EventCode": "0xB7, 0xBB", 910 "EventCode": "0xB7, 0xBB",
899 "MSRValue": "0x3f803c0200", 911 "MSRValue": "0x3f803c0200",
900 "Counter": "0,1,2,3", 912 "Counter": "0,1,2,3",
@@ -907,6 +919,7 @@
907 "CounterHTOff": "0,1,2,3" 919 "CounterHTOff": "0,1,2,3"
908 }, 920 },
909 { 921 {
922 "PublicDescription": "Counts all prefetch (that bring data to LLC only) RFOs that hit in the L3 Offcore response can be programmed only with a specific pair of event select and counter MSR, and with specific event codes and predefine mask bit value in a dedicated MSR to specify attributes of the offcore transaction.",
910 "EventCode": "0xB7, 0xBB", 923 "EventCode": "0xB7, 0xBB",
911 "MSRValue": "0x3f803c0100", 924 "MSRValue": "0x3f803c0100",
912 "Counter": "0,1,2,3", 925 "Counter": "0,1,2,3",
@@ -919,6 +932,7 @@
919 "CounterHTOff": "0,1,2,3" 932 "CounterHTOff": "0,1,2,3"
920 }, 933 },
921 { 934 {
935 "PublicDescription": "Counts all prefetch (that bring data to LLC only) data reads that hit in the L3 Offcore response can be programmed only with a specific pair of event select and counter MSR, and with specific event codes and predefine mask bit value in a dedicated MSR to specify attributes of the offcore transaction.",
922 "EventCode": "0xB7, 0xBB", 936 "EventCode": "0xB7, 0xBB",
923 "MSRValue": "0x3f803c0080", 937 "MSRValue": "0x3f803c0080",
924 "Counter": "0,1,2,3", 938 "Counter": "0,1,2,3",
@@ -931,6 +945,7 @@
931 "CounterHTOff": "0,1,2,3" 945 "CounterHTOff": "0,1,2,3"
932 }, 946 },
933 { 947 {
948 "PublicDescription": "Counts all prefetch (that bring data to LLC only) code reads that hit in the L3 Offcore response can be programmed only with a specific pair of event select and counter MSR, and with specific event codes and predefine mask bit value in a dedicated MSR to specify attributes of the offcore transaction.",
934 "EventCode": "0xB7, 0xBB", 949 "EventCode": "0xB7, 0xBB",
935 "MSRValue": "0x3f803c0040", 950 "MSRValue": "0x3f803c0040",
936 "Counter": "0,1,2,3", 951 "Counter": "0,1,2,3",
@@ -943,6 +958,7 @@
943 "CounterHTOff": "0,1,2,3" 958 "CounterHTOff": "0,1,2,3"
944 }, 959 },
945 { 960 {
961 "PublicDescription": "Counts all prefetch (that bring data to L2) RFOs that hit in the L3 Offcore response can be programmed only with a specific pair of event select and counter MSR, and with specific event codes and predefine mask bit value in a dedicated MSR to specify attributes of the offcore transaction.",
946 "EventCode": "0xB7, 0xBB", 962 "EventCode": "0xB7, 0xBB",
947 "MSRValue": "0x3f803c0020", 963 "MSRValue": "0x3f803c0020",
948 "Counter": "0,1,2,3", 964 "Counter": "0,1,2,3",
@@ -955,6 +971,7 @@
955 "CounterHTOff": "0,1,2,3" 971 "CounterHTOff": "0,1,2,3"
956 }, 972 },
957 { 973 {
974 "PublicDescription": "Counts prefetch (that bring data to L2) data reads that hit in the L3 Offcore response can be programmed only with a specific pair of event select and counter MSR, and with specific event codes and predefine mask bit value in a dedicated MSR to specify attributes of the offcore transaction.",
958 "EventCode": "0xB7, 0xBB", 975 "EventCode": "0xB7, 0xBB",
959 "MSRValue": "0x3f803c0010", 976 "MSRValue": "0x3f803c0010",
960 "Counter": "0,1,2,3", 977 "Counter": "0,1,2,3",
@@ -967,6 +984,7 @@
967 "CounterHTOff": "0,1,2,3" 984 "CounterHTOff": "0,1,2,3"
968 }, 985 },
969 { 986 {
987 "PublicDescription": "Counts all demand code reads that hit in the L3 and the snoop to one of the sibling cores hits the line in M state and the line is forwarded Offcore response can be programmed only with a specific pair of event select and counter MSR, and with specific event codes and predefine mask bit value in a dedicated MSR to specify attributes of the offcore transaction.",
970 "EventCode": "0xB7, 0xBB", 988 "EventCode": "0xB7, 0xBB",
971 "MSRValue": "0x10003c0004", 989 "MSRValue": "0x10003c0004",
972 "Counter": "0,1,2,3", 990 "Counter": "0,1,2,3",
@@ -979,6 +997,7 @@
979 "CounterHTOff": "0,1,2,3" 997 "CounterHTOff": "0,1,2,3"
980 }, 998 },
981 { 999 {
1000 "PublicDescription": "Counts all demand code reads that hit in the L3 and the snoops to sibling cores hit in either E/S state and the line is not forwarded Offcore response can be programmed only with a specific pair of event select and counter MSR, and with specific event codes and predefine mask bit value in a dedicated MSR to specify attributes of the offcore transaction.",
982 "EventCode": "0xB7, 0xBB", 1001 "EventCode": "0xB7, 0xBB",
983 "MSRValue": "0x04003c0004", 1002 "MSRValue": "0x04003c0004",
984 "Counter": "0,1,2,3", 1003 "Counter": "0,1,2,3",
@@ -991,6 +1010,7 @@
991 "CounterHTOff": "0,1,2,3" 1010 "CounterHTOff": "0,1,2,3"
992 }, 1011 },
993 { 1012 {
1013 "PublicDescription": "Counts all demand data writes (RFOs) that hit in the L3 and the snoop to one of the sibling cores hits the line in M state and the line is forwarded Offcore response can be programmed only with a specific pair of event select and counter MSR, and with specific event codes and predefine mask bit value in a dedicated MSR to specify attributes of the offcore transaction.",
994 "EventCode": "0xB7, 0xBB", 1014 "EventCode": "0xB7, 0xBB",
995 "MSRValue": "0x10003c0002", 1015 "MSRValue": "0x10003c0002",
996 "Counter": "0,1,2,3", 1016 "Counter": "0,1,2,3",
@@ -1003,6 +1023,7 @@
1003 "CounterHTOff": "0,1,2,3" 1023 "CounterHTOff": "0,1,2,3"
1004 }, 1024 },
1005 { 1025 {
1026 "PublicDescription": "Counts all demand data writes (RFOs) that hit in the L3 and the snoops to sibling cores hit in either E/S state and the line is not forwarded Offcore response can be programmed only with a specific pair of event select and counter MSR, and with specific event codes and predefine mask bit value in a dedicated MSR to specify attributes of the offcore transaction.",
1006 "EventCode": "0xB7, 0xBB", 1027 "EventCode": "0xB7, 0xBB",
1007 "MSRValue": "0x04003c0002", 1028 "MSRValue": "0x04003c0002",
1008 "Counter": "0,1,2,3", 1029 "Counter": "0,1,2,3",
@@ -1015,6 +1036,7 @@
1015 "CounterHTOff": "0,1,2,3" 1036 "CounterHTOff": "0,1,2,3"
1016 }, 1037 },
1017 { 1038 {
1039 "PublicDescription": "Counts demand data reads that hit in the L3 and the snoop to one of the sibling cores hits the line in M state and the line is forwarded Offcore response can be programmed only with a specific pair of event select and counter MSR, and with specific event codes and predefine mask bit value in a dedicated MSR to specify attributes of the offcore transaction.",
1018 "EventCode": "0xB7, 0xBB", 1040 "EventCode": "0xB7, 0xBB",
1019 "MSRValue": "0x10003c0001", 1041 "MSRValue": "0x10003c0001",
1020 "Counter": "0,1,2,3", 1042 "Counter": "0,1,2,3",
@@ -1027,6 +1049,7 @@
1027 "CounterHTOff": "0,1,2,3" 1049 "CounterHTOff": "0,1,2,3"
1028 }, 1050 },
1029 { 1051 {
1052 "PublicDescription": "Counts demand data reads that hit in the L3 and the snoops to sibling cores hit in either E/S state and the line is not forwarded Offcore response can be programmed only with a specific pair of event select and counter MSR, and with specific event codes and predefine mask bit value in a dedicated MSR to specify attributes of the offcore transaction.",
1030 "EventCode": "0xB7, 0xBB", 1053 "EventCode": "0xB7, 0xBB",
1031 "MSRValue": "0x04003c0001", 1054 "MSRValue": "0x04003c0001",
1032 "Counter": "0,1,2,3", 1055 "Counter": "0,1,2,3",
diff --git a/tools/perf/pmu-events/arch/x86/haswell/floating-point.json b/tools/perf/pmu-events/arch/x86/haswell/floating-point.json
index 1732fa49c6d2..f9843e5a9b42 100644
--- a/tools/perf/pmu-events/arch/x86/haswell/floating-point.json
+++ b/tools/perf/pmu-events/arch/x86/haswell/floating-point.json
@@ -20,6 +20,16 @@
20 "CounterHTOff": "0,1,2,3,4,5,6,7" 20 "CounterHTOff": "0,1,2,3,4,5,6,7"
21 }, 21 },
22 { 22 {
23 "PublicDescription": "Note that a whole rep string only counts AVX_INST.ALL once.",
24 "EventCode": "0xC6",
25 "Counter": "0,1,2,3",
26 "UMask": "0x7",
27 "EventName": "AVX_INSTS.ALL",
28 "SampleAfterValue": "2000003",
29 "BriefDescription": "Approximate counts of AVX & AVX2 256-bit instructions, including non-arithmetic instructions, loads, and stores. May count non-AVX instructions that employ 256-bit operations, including (but not necessarily limited to) rep string instructions that use 256-bit loads and stores for optimized performance, XSAVE* and XRSTOR*, and operations that transition the x87 FPU data registers between x87 and MMX.",
30 "CounterHTOff": "0,1,2,3,4,5,6,7"
31 },
32 {
23 "PublicDescription": "Number of X87 FP assists due to output values.", 33 "PublicDescription": "Number of X87 FP assists due to output values.",
24 "EventCode": "0xCA", 34 "EventCode": "0xCA",
25 "Counter": "0,1,2,3", 35 "Counter": "0,1,2,3",
@@ -69,15 +79,5 @@
69 "BriefDescription": "Cycles with any input/output SSE or FP assist", 79 "BriefDescription": "Cycles with any input/output SSE or FP assist",
70 "CounterMask": "1", 80 "CounterMask": "1",
71 "CounterHTOff": "0,1,2,3" 81 "CounterHTOff": "0,1,2,3"
72 },
73 {
74 "PublicDescription": "Note that a whole rep string only counts AVX_INST.ALL once.",
75 "EventCode": "0xC6",
76 "Counter": "0,1,2,3",
77 "UMask": "0x7",
78 "EventName": "AVX_INSTS.ALL",
79 "SampleAfterValue": "2000003",
80 "BriefDescription": "Approximate counts of AVX & AVX2 256-bit instructions, including non-arithmetic instructions, loads, and stores. May count non-AVX instructions that employ 256-bit operations, including (but not necessarily limited to) rep string instructions that use 256-bit loads and stores for optimized performance, XSAVE* and XRSTOR*, and operations that transition the x87 FPU data registers between x87 and MMX.",
81 "CounterHTOff": "0,1,2,3,4,5,6,7"
82 } 82 }
83] \ No newline at end of file 83] \ No newline at end of file
diff --git a/tools/perf/pmu-events/arch/x86/haswell/frontend.json b/tools/perf/pmu-events/arch/x86/haswell/frontend.json
index 57a1ce46971f..c0a5bedcc15c 100644
--- a/tools/perf/pmu-events/arch/x86/haswell/frontend.json
+++ b/tools/perf/pmu-events/arch/x86/haswell/frontend.json
@@ -21,74 +21,43 @@
21 "CounterHTOff": "0,1,2,3,4,5,6,7" 21 "CounterHTOff": "0,1,2,3,4,5,6,7"
22 }, 22 },
23 { 23 {
24 "PublicDescription": "Increment each cycle. # of uops delivered to IDQ from DSB path. Set Cmask = 1 to count cycles.",
25 "EventCode": "0x79", 24 "EventCode": "0x79",
26 "Counter": "0,1,2,3", 25 "Counter": "0,1,2,3",
27 "UMask": "0x8", 26 "UMask": "0x4",
28 "EventName": "IDQ.DSB_UOPS", 27 "EventName": "IDQ.MITE_CYCLES",
29 "SampleAfterValue": "2000003",
30 "BriefDescription": "Uops delivered to Instruction Decode Queue (IDQ) from the Decode Stream Buffer (DSB) path",
31 "CounterHTOff": "0,1,2,3,4,5,6,7"
32 },
33 {
34 "PublicDescription": "Increment each cycle # of uops delivered to IDQ when MS_busy by DSB. Set Cmask = 1 to count cycles. Add Edge=1 to count # of delivery.",
35 "EventCode": "0x79",
36 "Counter": "0,1,2,3",
37 "UMask": "0x10",
38 "EventName": "IDQ.MS_DSB_UOPS",
39 "SampleAfterValue": "2000003",
40 "BriefDescription": "Uops initiated by Decode Stream Buffer (DSB) that are being delivered to Instruction Decode Queue (IDQ) while Microcode Sequenser (MS) is busy",
41 "CounterHTOff": "0,1,2,3,4,5,6,7"
42 },
43 {
44 "PublicDescription": "Increment each cycle # of uops delivered to IDQ when MS_busy by MITE. Set Cmask = 1 to count cycles.",
45 "EventCode": "0x79",
46 "Counter": "0,1,2,3",
47 "UMask": "0x20",
48 "EventName": "IDQ.MS_MITE_UOPS",
49 "SampleAfterValue": "2000003",
50 "BriefDescription": "Uops initiated by MITE and delivered to Instruction Decode Queue (IDQ) while Microcode Sequenser (MS) is busy",
51 "CounterHTOff": "0,1,2,3,4,5,6,7"
52 },
53 {
54 "PublicDescription": "This event counts uops delivered by the Front-end with the assistance of the microcode sequencer. Microcode assists are used for complex instructions or scenarios that can't be handled by the standard decoder. Using other instructions, if possible, will usually improve performance.",
55 "EventCode": "0x79",
56 "Counter": "0,1,2,3",
57 "UMask": "0x30",
58 "EventName": "IDQ.MS_UOPS",
59 "SampleAfterValue": "2000003", 28 "SampleAfterValue": "2000003",
60 "BriefDescription": "Uops delivered to Instruction Decode Queue (IDQ) while Microcode Sequenser (MS) is busy", 29 "BriefDescription": "Cycles when uops are being delivered to Instruction Decode Queue (IDQ) from MITE path.",
30 "CounterMask": "1",
61 "CounterHTOff": "0,1,2,3,4,5,6,7" 31 "CounterHTOff": "0,1,2,3,4,5,6,7"
62 }, 32 },
63 { 33 {
64 "PublicDescription": "This event counts cycles during which the microcode sequencer assisted the Front-end in delivering uops. Microcode assists are used for complex instructions or scenarios that can't be handled by the standard decoder. Using other instructions, if possible, will usually improve performance.", 34 "PublicDescription": "Increment each cycle. # of uops delivered to IDQ from DSB path. Set Cmask = 1 to count cycles.",
65 "EventCode": "0x79", 35 "EventCode": "0x79",
66 "Counter": "0,1,2,3", 36 "Counter": "0,1,2,3",
67 "UMask": "0x30", 37 "UMask": "0x8",
68 "EventName": "IDQ.MS_CYCLES", 38 "EventName": "IDQ.DSB_UOPS",
69 "SampleAfterValue": "2000003", 39 "SampleAfterValue": "2000003",
70 "BriefDescription": "Cycles when uops are being delivered to Instruction Decode Queue (IDQ) while Microcode Sequenser (MS) is busy", 40 "BriefDescription": "Uops delivered to Instruction Decode Queue (IDQ) from the Decode Stream Buffer (DSB) path",
71 "CounterMask": "1",
72 "CounterHTOff": "0,1,2,3,4,5,6,7" 41 "CounterHTOff": "0,1,2,3,4,5,6,7"
73 }, 42 },
74 { 43 {
75 "EventCode": "0x79", 44 "EventCode": "0x79",
76 "Counter": "0,1,2,3", 45 "Counter": "0,1,2,3",
77 "UMask": "0x4", 46 "UMask": "0x8",
78 "EventName": "IDQ.MITE_CYCLES", 47 "EventName": "IDQ.DSB_CYCLES",
79 "SampleAfterValue": "2000003", 48 "SampleAfterValue": "2000003",
80 "BriefDescription": "Cycles when uops are being delivered to Instruction Decode Queue (IDQ) from MITE path.", 49 "BriefDescription": "Cycles when uops are being delivered to Instruction Decode Queue (IDQ) from Decode Stream Buffer (DSB) path.",
81 "CounterMask": "1", 50 "CounterMask": "1",
82 "CounterHTOff": "0,1,2,3,4,5,6,7" 51 "CounterHTOff": "0,1,2,3,4,5,6,7"
83 }, 52 },
84 { 53 {
54 "PublicDescription": "Increment each cycle # of uops delivered to IDQ when MS_busy by DSB. Set Cmask = 1 to count cycles. Add Edge=1 to count # of delivery.",
85 "EventCode": "0x79", 55 "EventCode": "0x79",
86 "Counter": "0,1,2,3", 56 "Counter": "0,1,2,3",
87 "UMask": "0x8", 57 "UMask": "0x10",
88 "EventName": "IDQ.DSB_CYCLES", 58 "EventName": "IDQ.MS_DSB_UOPS",
89 "SampleAfterValue": "2000003", 59 "SampleAfterValue": "2000003",
90 "BriefDescription": "Cycles when uops are being delivered to Instruction Decode Queue (IDQ) from Decode Stream Buffer (DSB) path.", 60 "BriefDescription": "Uops initiated by Decode Stream Buffer (DSB) that are being delivered to Instruction Decode Queue (IDQ) while Microcode Sequenser (MS) is busy",
91 "CounterMask": "1",
92 "CounterHTOff": "0,1,2,3,4,5,6,7" 61 "CounterHTOff": "0,1,2,3,4,5,6,7"
93 }, 62 },
94 { 63 {
@@ -135,6 +104,16 @@
135 "CounterHTOff": "0,1,2,3,4,5,6,7" 104 "CounterHTOff": "0,1,2,3,4,5,6,7"
136 }, 105 },
137 { 106 {
107 "PublicDescription": "Increment each cycle # of uops delivered to IDQ when MS_busy by MITE. Set Cmask = 1 to count cycles.",
108 "EventCode": "0x79",
109 "Counter": "0,1,2,3",
110 "UMask": "0x20",
111 "EventName": "IDQ.MS_MITE_UOPS",
112 "SampleAfterValue": "2000003",
113 "BriefDescription": "Uops initiated by MITE and delivered to Instruction Decode Queue (IDQ) while Microcode Sequenser (MS) is busy",
114 "CounterHTOff": "0,1,2,3,4,5,6,7"
115 },
116 {
138 "PublicDescription": "Counts cycles MITE is delivered four uops. Set Cmask = 4.", 117 "PublicDescription": "Counts cycles MITE is delivered four uops. Set Cmask = 4.",
139 "EventCode": "0x79", 118 "EventCode": "0x79",
140 "Counter": "0,1,2,3", 119 "Counter": "0,1,2,3",
@@ -157,6 +136,38 @@
157 "CounterHTOff": "0,1,2,3,4,5,6,7" 136 "CounterHTOff": "0,1,2,3,4,5,6,7"
158 }, 137 },
159 { 138 {
139 "PublicDescription": "This event counts uops delivered by the Front-end with the assistance of the microcode sequencer. Microcode assists are used for complex instructions or scenarios that can't be handled by the standard decoder. Using other instructions, if possible, will usually improve performance.",
140 "EventCode": "0x79",
141 "Counter": "0,1,2,3",
142 "UMask": "0x30",
143 "EventName": "IDQ.MS_UOPS",
144 "SampleAfterValue": "2000003",
145 "BriefDescription": "Uops delivered to Instruction Decode Queue (IDQ) while Microcode Sequenser (MS) is busy",
146 "CounterHTOff": "0,1,2,3,4,5,6,7"
147 },
148 {
149 "PublicDescription": "This event counts cycles during which the microcode sequencer assisted the Front-end in delivering uops. Microcode assists are used for complex instructions or scenarios that can't be handled by the standard decoder. Using other instructions, if possible, will usually improve performance.",
150 "EventCode": "0x79",
151 "Counter": "0,1,2,3",
152 "UMask": "0x30",
153 "EventName": "IDQ.MS_CYCLES",
154 "SampleAfterValue": "2000003",
155 "BriefDescription": "Cycles when uops are being delivered to Instruction Decode Queue (IDQ) while Microcode Sequenser (MS) is busy",
156 "CounterMask": "1",
157 "CounterHTOff": "0,1,2,3,4,5,6,7"
158 },
159 {
160 "EventCode": "0x79",
161 "Counter": "0,1,2,3",
162 "UMask": "0x30",
163 "EdgeDetect": "1",
164 "EventName": "IDQ.MS_SWITCHES",
165 "SampleAfterValue": "2000003",
166 "BriefDescription": "Number of switches from DSB (Decode Stream Buffer) or MITE (legacy decode pipeline) to the Microcode Sequencer.",
167 "CounterMask": "1",
168 "CounterHTOff": "0,1,2,3,4,5,6,7"
169 },
170 {
160 "PublicDescription": "Number of uops delivered to IDQ from any path.", 171 "PublicDescription": "Number of uops delivered to IDQ from any path.",
161 "EventCode": "0x79", 172 "EventCode": "0x79",
162 "Counter": "0,1,2,3", 173 "Counter": "0,1,2,3",
@@ -195,6 +206,15 @@
195 "CounterHTOff": "0,1,2,3,4,5,6,7" 206 "CounterHTOff": "0,1,2,3,4,5,6,7"
196 }, 207 },
197 { 208 {
209 "EventCode": "0x80",
210 "Counter": "0,1,2,3",
211 "UMask": "0x4",
212 "EventName": "ICACHE.IFDATA_STALL",
213 "SampleAfterValue": "2000003",
214 "BriefDescription": "Cycles where a code fetch is stalled due to L1 instruction-cache miss.",
215 "CounterHTOff": "0,1,2,3,4,5,6,7"
216 },
217 {
198 "PublicDescription": "This event count the number of undelivered (unallocated) uops from the Front-end to the Resource Allocation Table (RAT) while the Back-end of the processor is not stalled. The Front-end can allocate up to 4 uops per cycle so this event can increment 0-4 times per cycle depending on the number of unallocated uops. This event is counted on a per-core basis.", 218 "PublicDescription": "This event count the number of undelivered (unallocated) uops from the Front-end to the Resource Allocation Table (RAT) while the Back-end of the processor is not stalled. The Front-end can allocate up to 4 uops per cycle so this event can increment 0-4 times per cycle depending on the number of unallocated uops. This event is counted on a per-core basis.",
199 "EventCode": "0x9C", 219 "EventCode": "0x9C",
200 "Counter": "0,1,2,3", 220 "Counter": "0,1,2,3",
@@ -270,25 +290,5 @@
270 "SampleAfterValue": "2000003", 290 "SampleAfterValue": "2000003",
271 "BriefDescription": "Decode Stream Buffer (DSB)-to-MITE switch true penalty cycles.", 291 "BriefDescription": "Decode Stream Buffer (DSB)-to-MITE switch true penalty cycles.",
272 "CounterHTOff": "0,1,2,3,4,5,6,7" 292 "CounterHTOff": "0,1,2,3,4,5,6,7"
273 },
274 {
275 "EventCode": "0x79",
276 "Counter": "0,1,2,3",
277 "UMask": "0x30",
278 "EdgeDetect": "1",
279 "EventName": "IDQ.MS_SWITCHES",
280 "SampleAfterValue": "2000003",
281 "BriefDescription": "Number of switches from DSB (Decode Stream Buffer) or MITE (legacy decode pipeline) to the Microcode Sequencer.",
282 "CounterMask": "1",
283 "CounterHTOff": "0,1,2,3,4,5,6,7"
284 },
285 {
286 "EventCode": "0x80",
287 "Counter": "0,1,2,3",
288 "UMask": "0x4",
289 "EventName": "ICACHE.IFDATA_STALL",
290 "SampleAfterValue": "2000003",
291 "BriefDescription": "Cycles where a code fetch is stalled due to L1 instruction-cache miss.",
292 "CounterHTOff": "0,1,2,3,4,5,6,7"
293 } 293 }
294] \ No newline at end of file 294] \ No newline at end of file
diff --git a/tools/perf/pmu-events/arch/x86/haswell/hsw-metrics.json b/tools/perf/pmu-events/arch/x86/haswell/hsw-metrics.json
new file mode 100644
index 000000000000..5ab5c78fe580
--- /dev/null
+++ b/tools/perf/pmu-events/arch/x86/haswell/hsw-metrics.json
@@ -0,0 +1,158 @@
1[
2 {
3 "BriefDescription": "Instructions Per Cycle (per logical thread)",
4 "MetricExpr": "INST_RETIRED.ANY / CPU_CLK_UNHALTED.THREAD",
5 "MetricGroup": "TopDownL1",
6 "MetricName": "IPC"
7 },
8 {
9 "BriefDescription": "Uops Per Instruction",
10 "MetricExpr": "UOPS_RETIRED.RETIRE_SLOTS / INST_RETIRED.ANY",
11 "MetricGroup": "Pipeline",
12 "MetricName": "UPI"
13 },
14 {
15 "BriefDescription": "Rough Estimation of fraction of fetched lines bytes that were likely consumed by program instructions",
16 "MetricExpr": "min( 1 , IDQ.MITE_UOPS / ( (UOPS_RETIRED.RETIRE_SLOTS / INST_RETIRED.ANY) * 16 * ( ICACHE.HIT + ICACHE.MISSES ) / 4.0 ) )",
17 "MetricGroup": "Frontend",
18 "MetricName": "IFetch_Line_Utilization"
19 },
20 {
21 "BriefDescription": "Fraction of Uops delivered by the DSB (aka Decoded Icache; or Uop Cache)",
22 "MetricExpr": "IDQ.DSB_UOPS / ( IDQ.DSB_UOPS + LSD.UOPS + IDQ.MITE_UOPS + IDQ.MS_UOPS )",
23 "MetricGroup": "DSB; Frontend_Bandwidth",
24 "MetricName": "DSB_Coverage"
25 },
26 {
27 "BriefDescription": "Cycles Per Instruction (threaded)",
28 "MetricExpr": "1 / (INST_RETIRED.ANY / cycles)",
29 "MetricGroup": "Pipeline;Summary",
30 "MetricName": "CPI"
31 },
32 {
33 "BriefDescription": "Per-thread actual clocks when the logical processor is active. This is called 'Clockticks' in VTune.",
34 "MetricExpr": "CPU_CLK_UNHALTED.THREAD",
35 "MetricGroup": "Summary",
36 "MetricName": "CLKS"
37 },
38 {
39 "BriefDescription": "Total issue-pipeline slots",
40 "MetricExpr": "4*(( CPU_CLK_UNHALTED.THREAD_ANY / 2 ) if #SMT_on else cycles)",
41 "MetricGroup": "TopDownL1",
42 "MetricName": "SLOTS"
43 },
44 {
45 "BriefDescription": "Total number of retired Instructions",
46 "MetricExpr": "INST_RETIRED.ANY",
47 "MetricGroup": "Summary",
48 "MetricName": "Instructions"
49 },
50 {
51 "BriefDescription": "Instructions Per Cycle (per physical core)",
52 "MetricExpr": "INST_RETIRED.ANY / (( CPU_CLK_UNHALTED.THREAD_ANY / 2 ) if #SMT_on else cycles)",
53 "MetricGroup": "SMT",
54 "MetricName": "CoreIPC"
55 },
56 {
57 "BriefDescription": "Instruction-Level-Parallelism (average number of uops executed when there is at least 1 uop executed)",
58 "MetricExpr": "( UOPS_EXECUTED.CORE / 2 / (( cpu@UOPS_EXECUTED.CORE\\,cmask\\=1@ / 2) if #SMT_on else cpu@UOPS_EXECUTED.CORE\\,cmask\\=1@) ) if #SMT_on else UOPS_EXECUTED.CORE / (( cpu@UOPS_EXECUTED.CORE\\,cmask\\=1@ / 2) if #SMT_on else cpu@UOPS_EXECUTED.CORE\\,cmask\\=1@)",
59 "MetricGroup": "Pipeline;Ports_Utilization",
60 "MetricName": "ILP"
61 },
62 {
63 "BriefDescription": "Average Branch Address Clear Cost (fraction of cycles)",
64 "MetricExpr": "2* (( RS_EVENTS.EMPTY_CYCLES - ICACHE.IFDATA_STALL - (( 14 * ITLB_MISSES.STLB_HIT + ITLB_MISSES.WALK_DURATION )) ) / RS_EVENTS.EMPTY_END)",
65 "MetricGroup": "Unknown_Branches",
66 "MetricName": "BAClear_Cost"
67 },
68 {
69 "BriefDescription": "Core actual clocks when any thread is active on the physical core",
70 "MetricExpr": "( CPU_CLK_UNHALTED.THREAD_ANY / 2 ) if #SMT_on else CPU_CLK_UNHALTED.THREAD",
71 "MetricGroup": "SMT",
72 "MetricName": "CORE_CLKS"
73 },
74 {
75 "BriefDescription": "Actual Average Latency for L1 data-cache miss demand loads",
76 "MetricExpr": "L1D_PEND_MISS.PENDING / ( MEM_LOAD_UOPS_RETIRED.L1_MISS + mem_load_uops_retired.hit_lfb )",
77 "MetricGroup": "Memory_Bound;Memory_Lat",
78 "MetricName": "Load_Miss_Real_Latency"
79 },
80 {
81 "BriefDescription": "Memory-Level-Parallelism (average number of L1 miss demand load when there is at least 1 such miss)",
82 "MetricExpr": "L1D_PEND_MISS.PENDING / (( cpu@l1d_pend_miss.pending_cycles\\,any\\=1@ / 2) if #SMT_on else L1D_PEND_MISS.PENDING_CYCLES)",
83 "MetricGroup": "Memory_Bound;Memory_BW",
84 "MetricName": "MLP"
85 },
86 {
87 "BriefDescription": "Utilization of the core's Page Walker(s) serving STLB misses triggered by instruction/Load/Store accesses",
88 "MetricExpr": "( ITLB_MISSES.WALK_DURATION + DTLB_LOAD_MISSES.WALK_DURATION + DTLB_STORE_MISSES.WALK_DURATION ) / (( CPU_CLK_UNHALTED.THREAD_ANY / 2 ) if #SMT_on else cycles)",
89 "MetricGroup": "TLB",
90 "MetricName": "Page_Walks_Utilization"
91 },
92 {
93 "BriefDescription": "Average CPU Utilization",
94 "MetricExpr": "CPU_CLK_UNHALTED.REF_TSC / msr@tsc@",
95 "MetricGroup": "Summary",
96 "MetricName": "CPU_Utilization"
97 },
98 {
99 "BriefDescription": "Average Frequency Utilization relative nominal frequency",
100 "MetricExpr": "CPU_CLK_UNHALTED.THREAD / CPU_CLK_UNHALTED.REF_TSC",
101 "MetricGroup": "Power",
102 "MetricName": "Turbo_Utilization"
103 },
104 {
105 "BriefDescription": "Fraction of cycles where both hardware threads were active",
106 "MetricExpr": "1 - CPU_CLK_THREAD_UNHALTED.ONE_THREAD_ACTIVE / ( CPU_CLK_THREAD_UNHALTED.REF_XCLK_ANY / 2 ) if #SMT_on else 0",
107 "MetricGroup": "SMT;Summary",
108 "MetricName": "SMT_2T_Utilization"
109 },
110 {
111 "BriefDescription": "Fraction of cycles spent in Kernel mode",
112 "MetricExpr": "CPU_CLK_UNHALTED.REF_TSC:u / CPU_CLK_UNHALTED.REF_TSC",
113 "MetricGroup": "Summary",
114 "MetricName": "Kernel_Utilization"
115 },
116 {
117 "BriefDescription": "C3 residency percent per core",
118 "MetricExpr": "(cstate_core@c3\\-residency@ / msr@tsc@) * 100",
119 "MetricGroup": "Power",
120 "MetricName": "C3_Core_Residency"
121 },
122 {
123 "BriefDescription": "C6 residency percent per core",
124 "MetricExpr": "(cstate_core@c6\\-residency@ / msr@tsc@) * 100",
125 "MetricGroup": "Power",
126 "MetricName": "C6_Core_Residency"
127 },
128 {
129 "BriefDescription": "C7 residency percent per core",
130 "MetricExpr": "(cstate_core@c7\\-residency@ / msr@tsc@) * 100",
131 "MetricGroup": "Power",
132 "MetricName": "C7_Core_Residency"
133 },
134 {
135 "BriefDescription": "C2 residency percent per package",
136 "MetricExpr": "(cstate_pkg@c2\\-residency@ / msr@tsc@) * 100",
137 "MetricGroup": "Power",
138 "MetricName": "C2_Pkg_Residency"
139 },
140 {
141 "BriefDescription": "C3 residency percent per package",
142 "MetricExpr": "(cstate_pkg@c3\\-residency@ / msr@tsc@) * 100",
143 "MetricGroup": "Power",
144 "MetricName": "C3_Pkg_Residency"
145 },
146 {
147 "BriefDescription": "C6 residency percent per package",
148 "MetricExpr": "(cstate_pkg@c6\\-residency@ / msr@tsc@) * 100",
149 "MetricGroup": "Power",
150 "MetricName": "C6_Pkg_Residency"
151 },
152 {
153 "BriefDescription": "C7 residency percent per package",
154 "MetricExpr": "(cstate_pkg@c7\\-residency@ / msr@tsc@) * 100",
155 "MetricGroup": "Power",
156 "MetricName": "C7_Pkg_Residency"
157 }
158]
diff --git a/tools/perf/pmu-events/arch/x86/haswell/memory.json b/tools/perf/pmu-events/arch/x86/haswell/memory.json
index aab981b42339..e5f9fa6655b3 100644
--- a/tools/perf/pmu-events/arch/x86/haswell/memory.json
+++ b/tools/perf/pmu-events/arch/x86/haswell/memory.json
@@ -401,6 +401,7 @@
401 "CounterHTOff": "3" 401 "CounterHTOff": "3"
402 }, 402 },
403 { 403 {
404 "PublicDescription": "Counts all requests that miss in the L3 Offcore response can be programmed only with a specific pair of event select and counter MSR, and with specific event codes and predefine mask bit value in a dedicated MSR to specify attributes of the offcore transaction.",
404 "EventCode": "0xB7, 0xBB", 405 "EventCode": "0xB7, 0xBB",
405 "MSRValue": "0x3fffc08fff", 406 "MSRValue": "0x3fffc08fff",
406 "Counter": "0,1,2,3", 407 "Counter": "0,1,2,3",
@@ -413,6 +414,7 @@
413 "CounterHTOff": "0,1,2,3" 414 "CounterHTOff": "0,1,2,3"
414 }, 415 },
415 { 416 {
417 "PublicDescription": "Counts all data/code/rfo reads (demand & prefetch) that miss the L3 and the data is returned from local dram Offcore response can be programmed only with a specific pair of event select and counter MSR, and with specific event codes and predefine mask bit value in a dedicated MSR to specify attributes of the offcore transaction.",
416 "EventCode": "0xB7, 0xBB", 418 "EventCode": "0xB7, 0xBB",
417 "MSRValue": "0x01004007f7", 419 "MSRValue": "0x01004007f7",
418 "Counter": "0,1,2,3", 420 "Counter": "0,1,2,3",
@@ -425,6 +427,7 @@
425 "CounterHTOff": "0,1,2,3" 427 "CounterHTOff": "0,1,2,3"
426 }, 428 },
427 { 429 {
430 "PublicDescription": "Counts all data/code/rfo reads (demand & prefetch) that miss in the L3 Offcore response can be programmed only with a specific pair of event select and counter MSR, and with specific event codes and predefine mask bit value in a dedicated MSR to specify attributes of the offcore transaction.",
428 "EventCode": "0xB7, 0xBB", 431 "EventCode": "0xB7, 0xBB",
429 "MSRValue": "0x3fffc007f7", 432 "MSRValue": "0x3fffc007f7",
430 "Counter": "0,1,2,3", 433 "Counter": "0,1,2,3",
@@ -437,6 +440,7 @@
437 "CounterHTOff": "0,1,2,3" 440 "CounterHTOff": "0,1,2,3"
438 }, 441 },
439 { 442 {
443 "PublicDescription": "Counts all demand & prefetch code reads that miss the L3 and the data is returned from local dram Offcore response can be programmed only with a specific pair of event select and counter MSR, and with specific event codes and predefine mask bit value in a dedicated MSR to specify attributes of the offcore transaction.",
440 "EventCode": "0xB7, 0xBB", 444 "EventCode": "0xB7, 0xBB",
441 "MSRValue": "0x0100400244", 445 "MSRValue": "0x0100400244",
442 "Counter": "0,1,2,3", 446 "Counter": "0,1,2,3",
@@ -449,6 +453,7 @@
449 "CounterHTOff": "0,1,2,3" 453 "CounterHTOff": "0,1,2,3"
450 }, 454 },
451 { 455 {
456 "PublicDescription": "Counts all demand & prefetch code reads that miss in the L3 Offcore response can be programmed only with a specific pair of event select and counter MSR, and with specific event codes and predefine mask bit value in a dedicated MSR to specify attributes of the offcore transaction.",
452 "EventCode": "0xB7, 0xBB", 457 "EventCode": "0xB7, 0xBB",
453 "MSRValue": "0x3fffc00244", 458 "MSRValue": "0x3fffc00244",
454 "Counter": "0,1,2,3", 459 "Counter": "0,1,2,3",
@@ -461,6 +466,7 @@
461 "CounterHTOff": "0,1,2,3" 466 "CounterHTOff": "0,1,2,3"
462 }, 467 },
463 { 468 {
469 "PublicDescription": "Counts all demand & prefetch RFOs that miss the L3 and the data is returned from local dram Offcore response can be programmed only with a specific pair of event select and counter MSR, and with specific event codes and predefine mask bit value in a dedicated MSR to specify attributes of the offcore transaction.",
464 "EventCode": "0xB7, 0xBB", 470 "EventCode": "0xB7, 0xBB",
465 "MSRValue": "0x0100400122", 471 "MSRValue": "0x0100400122",
466 "Counter": "0,1,2,3", 472 "Counter": "0,1,2,3",
@@ -473,6 +479,7 @@
473 "CounterHTOff": "0,1,2,3" 479 "CounterHTOff": "0,1,2,3"
474 }, 480 },
475 { 481 {
482 "PublicDescription": "Counts all demand & prefetch RFOs that miss in the L3 Offcore response can be programmed only with a specific pair of event select and counter MSR, and with specific event codes and predefine mask bit value in a dedicated MSR to specify attributes of the offcore transaction.",
476 "EventCode": "0xB7, 0xBB", 483 "EventCode": "0xB7, 0xBB",
477 "MSRValue": "0x3fffc00122", 484 "MSRValue": "0x3fffc00122",
478 "Counter": "0,1,2,3", 485 "Counter": "0,1,2,3",
@@ -485,6 +492,7 @@
485 "CounterHTOff": "0,1,2,3" 492 "CounterHTOff": "0,1,2,3"
486 }, 493 },
487 { 494 {
495 "PublicDescription": "Counts all demand & prefetch data reads that miss the L3 and the data is returned from local dram Offcore response can be programmed only with a specific pair of event select and counter MSR, and with specific event codes and predefine mask bit value in a dedicated MSR to specify attributes of the offcore transaction.",
488 "EventCode": "0xB7, 0xBB", 496 "EventCode": "0xB7, 0xBB",
489 "MSRValue": "0x0100400091", 497 "MSRValue": "0x0100400091",
490 "Counter": "0,1,2,3", 498 "Counter": "0,1,2,3",
@@ -497,6 +505,7 @@
497 "CounterHTOff": "0,1,2,3" 505 "CounterHTOff": "0,1,2,3"
498 }, 506 },
499 { 507 {
508 "PublicDescription": "Counts all demand & prefetch data reads that miss in the L3 Offcore response can be programmed only with a specific pair of event select and counter MSR, and with specific event codes and predefine mask bit value in a dedicated MSR to specify attributes of the offcore transaction.",
500 "EventCode": "0xB7, 0xBB", 509 "EventCode": "0xB7, 0xBB",
501 "MSRValue": "0x3fffc00091", 510 "MSRValue": "0x3fffc00091",
502 "Counter": "0,1,2,3", 511 "Counter": "0,1,2,3",
@@ -509,6 +518,7 @@
509 "CounterHTOff": "0,1,2,3" 518 "CounterHTOff": "0,1,2,3"
510 }, 519 },
511 { 520 {
521 "PublicDescription": "Counts prefetch (that bring data to LLC only) code reads that miss in the L3 Offcore response can be programmed only with a specific pair of event select and counter MSR, and with specific event codes and predefine mask bit value in a dedicated MSR to specify attributes of the offcore transaction.",
512 "EventCode": "0xB7, 0xBB", 522 "EventCode": "0xB7, 0xBB",
513 "MSRValue": "0x3fffc00200", 523 "MSRValue": "0x3fffc00200",
514 "Counter": "0,1,2,3", 524 "Counter": "0,1,2,3",
@@ -521,6 +531,7 @@
521 "CounterHTOff": "0,1,2,3" 531 "CounterHTOff": "0,1,2,3"
522 }, 532 },
523 { 533 {
534 "PublicDescription": "Counts all prefetch (that bring data to LLC only) RFOs that miss in the L3 Offcore response can be programmed only with a specific pair of event select and counter MSR, and with specific event codes and predefine mask bit value in a dedicated MSR to specify attributes of the offcore transaction.",
524 "EventCode": "0xB7, 0xBB", 535 "EventCode": "0xB7, 0xBB",
525 "MSRValue": "0x3fffc00100", 536 "MSRValue": "0x3fffc00100",
526 "Counter": "0,1,2,3", 537 "Counter": "0,1,2,3",
@@ -533,6 +544,7 @@
533 "CounterHTOff": "0,1,2,3" 544 "CounterHTOff": "0,1,2,3"
534 }, 545 },
535 { 546 {
547 "PublicDescription": "Counts all prefetch (that bring data to LLC only) data reads that miss in the L3 Offcore response can be programmed only with a specific pair of event select and counter MSR, and with specific event codes and predefine mask bit value in a dedicated MSR to specify attributes of the offcore transaction.",
536 "EventCode": "0xB7, 0xBB", 548 "EventCode": "0xB7, 0xBB",
537 "MSRValue": "0x3fffc00080", 549 "MSRValue": "0x3fffc00080",
538 "Counter": "0,1,2,3", 550 "Counter": "0,1,2,3",
@@ -545,6 +557,7 @@
545 "CounterHTOff": "0,1,2,3" 557 "CounterHTOff": "0,1,2,3"
546 }, 558 },
547 { 559 {
560 "PublicDescription": "Counts all prefetch (that bring data to LLC only) code reads that miss in the L3 Offcore response can be programmed only with a specific pair of event select and counter MSR, and with specific event codes and predefine mask bit value in a dedicated MSR to specify attributes of the offcore transaction.",
548 "EventCode": "0xB7, 0xBB", 561 "EventCode": "0xB7, 0xBB",
549 "MSRValue": "0x3fffc00040", 562 "MSRValue": "0x3fffc00040",
550 "Counter": "0,1,2,3", 563 "Counter": "0,1,2,3",
@@ -557,6 +570,7 @@
557 "CounterHTOff": "0,1,2,3" 570 "CounterHTOff": "0,1,2,3"
558 }, 571 },
559 { 572 {
573 "PublicDescription": "Counts all prefetch (that bring data to L2) RFOs that miss in the L3 Offcore response can be programmed only with a specific pair of event select and counter MSR, and with specific event codes and predefine mask bit value in a dedicated MSR to specify attributes of the offcore transaction.",
560 "EventCode": "0xB7, 0xBB", 574 "EventCode": "0xB7, 0xBB",
561 "MSRValue": "0x3fffc00020", 575 "MSRValue": "0x3fffc00020",
562 "Counter": "0,1,2,3", 576 "Counter": "0,1,2,3",
@@ -569,6 +583,7 @@
569 "CounterHTOff": "0,1,2,3" 583 "CounterHTOff": "0,1,2,3"
570 }, 584 },
571 { 585 {
586 "PublicDescription": "Counts prefetch (that bring data to L2) data reads that miss in the L3 Offcore response can be programmed only with a specific pair of event select and counter MSR, and with specific event codes and predefine mask bit value in a dedicated MSR to specify attributes of the offcore transaction.",
572 "EventCode": "0xB7, 0xBB", 587 "EventCode": "0xB7, 0xBB",
573 "MSRValue": "0x3fffc00010", 588 "MSRValue": "0x3fffc00010",
574 "Counter": "0,1,2,3", 589 "Counter": "0,1,2,3",
@@ -581,6 +596,7 @@
581 "CounterHTOff": "0,1,2,3" 596 "CounterHTOff": "0,1,2,3"
582 }, 597 },
583 { 598 {
599 "PublicDescription": "Counts all demand code reads that miss the L3 and the data is returned from local dram Offcore response can be programmed only with a specific pair of event select and counter MSR, and with specific event codes and predefine mask bit value in a dedicated MSR to specify attributes of the offcore transaction.",
584 "EventCode": "0xB7, 0xBB", 600 "EventCode": "0xB7, 0xBB",
585 "MSRValue": "0x0100400004", 601 "MSRValue": "0x0100400004",
586 "Counter": "0,1,2,3", 602 "Counter": "0,1,2,3",
@@ -593,6 +609,7 @@
593 "CounterHTOff": "0,1,2,3" 609 "CounterHTOff": "0,1,2,3"
594 }, 610 },
595 { 611 {
612 "PublicDescription": "Counts all demand code reads that miss in the L3 Offcore response can be programmed only with a specific pair of event select and counter MSR, and with specific event codes and predefine mask bit value in a dedicated MSR to specify attributes of the offcore transaction.",
596 "EventCode": "0xB7, 0xBB", 613 "EventCode": "0xB7, 0xBB",
597 "MSRValue": "0x3fffc00004", 614 "MSRValue": "0x3fffc00004",
598 "Counter": "0,1,2,3", 615 "Counter": "0,1,2,3",
@@ -605,6 +622,7 @@
605 "CounterHTOff": "0,1,2,3" 622 "CounterHTOff": "0,1,2,3"
606 }, 623 },
607 { 624 {
625 "PublicDescription": "Counts all demand data writes (RFOs) that miss the L3 and the data is returned from local dram Offcore response can be programmed only with a specific pair of event select and counter MSR, and with specific event codes and predefine mask bit value in a dedicated MSR to specify attributes of the offcore transaction.",
608 "EventCode": "0xB7, 0xBB", 626 "EventCode": "0xB7, 0xBB",
609 "MSRValue": "0x0100400002", 627 "MSRValue": "0x0100400002",
610 "Counter": "0,1,2,3", 628 "Counter": "0,1,2,3",
@@ -617,6 +635,7 @@
617 "CounterHTOff": "0,1,2,3" 635 "CounterHTOff": "0,1,2,3"
618 }, 636 },
619 { 637 {
638 "PublicDescription": "Counts all demand data writes (RFOs) that miss in the L3 Offcore response can be programmed only with a specific pair of event select and counter MSR, and with specific event codes and predefine mask bit value in a dedicated MSR to specify attributes of the offcore transaction.",
620 "EventCode": "0xB7, 0xBB", 639 "EventCode": "0xB7, 0xBB",
621 "MSRValue": "0x3fffc00002", 640 "MSRValue": "0x3fffc00002",
622 "Counter": "0,1,2,3", 641 "Counter": "0,1,2,3",
@@ -629,6 +648,7 @@
629 "CounterHTOff": "0,1,2,3" 648 "CounterHTOff": "0,1,2,3"
630 }, 649 },
631 { 650 {
651 "PublicDescription": "Counts demand data reads that miss the L3 and the data is returned from local dram Offcore response can be programmed only with a specific pair of event select and counter MSR, and with specific event codes and predefine mask bit value in a dedicated MSR to specify attributes of the offcore transaction.",
632 "EventCode": "0xB7, 0xBB", 652 "EventCode": "0xB7, 0xBB",
633 "MSRValue": "0x0100400001", 653 "MSRValue": "0x0100400001",
634 "Counter": "0,1,2,3", 654 "Counter": "0,1,2,3",
@@ -641,6 +661,7 @@
641 "CounterHTOff": "0,1,2,3" 661 "CounterHTOff": "0,1,2,3"
642 }, 662 },
643 { 663 {
664 "PublicDescription": "Counts demand data reads that miss in the L3 Offcore response can be programmed only with a specific pair of event select and counter MSR, and with specific event codes and predefine mask bit value in a dedicated MSR to specify attributes of the offcore transaction.",
644 "EventCode": "0xB7, 0xBB", 665 "EventCode": "0xB7, 0xBB",
645 "MSRValue": "0x3fffc00001", 666 "MSRValue": "0x3fffc00001",
646 "Counter": "0,1,2,3", 667 "Counter": "0,1,2,3",
diff --git a/tools/perf/pmu-events/arch/x86/haswell/other.json b/tools/perf/pmu-events/arch/x86/haswell/other.json
index 85d6a14baf9d..8a4d898d76c1 100644
--- a/tools/perf/pmu-events/arch/x86/haswell/other.json
+++ b/tools/perf/pmu-events/arch/x86/haswell/other.json
@@ -10,16 +10,6 @@
10 "CounterHTOff": "0,1,2,3,4,5,6,7" 10 "CounterHTOff": "0,1,2,3,4,5,6,7"
11 }, 11 },
12 { 12 {
13 "PublicDescription": "Unhalted core cycles when the thread is not in ring 0.",
14 "EventCode": "0x5C",
15 "Counter": "0,1,2,3",
16 "UMask": "0x2",
17 "EventName": "CPL_CYCLES.RING123",
18 "SampleAfterValue": "2000003",
19 "BriefDescription": "Unhalted core cycles when thread is in rings 1, 2, or 3",
20 "CounterHTOff": "0,1,2,3,4,5,6,7"
21 },
22 {
23 "EventCode": "0x5C", 13 "EventCode": "0x5C",
24 "Counter": "0,1,2,3", 14 "Counter": "0,1,2,3",
25 "UMask": "0x1", 15 "UMask": "0x1",
@@ -31,6 +21,16 @@
31 "CounterHTOff": "0,1,2,3,4,5,6,7" 21 "CounterHTOff": "0,1,2,3,4,5,6,7"
32 }, 22 },
33 { 23 {
24 "PublicDescription": "Unhalted core cycles when the thread is not in ring 0.",
25 "EventCode": "0x5C",
26 "Counter": "0,1,2,3",
27 "UMask": "0x2",
28 "EventName": "CPL_CYCLES.RING123",
29 "SampleAfterValue": "2000003",
30 "BriefDescription": "Unhalted core cycles when thread is in rings 1, 2, or 3",
31 "CounterHTOff": "0,1,2,3,4,5,6,7"
32 },
33 {
34 "PublicDescription": "Cycles in which the L1D and L2 are locked, due to a UC lock or split lock.", 34 "PublicDescription": "Cycles in which the L1D and L2 are locked, due to a UC lock or split lock.",
35 "EventCode": "0x63", 35 "EventCode": "0x63",
36 "Counter": "0,1,2,3", 36 "Counter": "0,1,2,3",
diff --git a/tools/perf/pmu-events/arch/x86/haswell/pipeline.json b/tools/perf/pmu-events/arch/x86/haswell/pipeline.json
index 0099848607ad..a4dcfce4a512 100644
--- a/tools/perf/pmu-events/arch/x86/haswell/pipeline.json
+++ b/tools/perf/pmu-events/arch/x86/haswell/pipeline.json
@@ -2,33 +2,43 @@
2 { 2 {
3 "PublicDescription": "This event counts the number of instructions retired from execution. For instructions that consist of multiple micro-ops, this event counts the retirement of the last micro-op of the instruction. Counting continues during hardware interrupts, traps, and inside interrupt handlers. INST_RETIRED.ANY is counted by a designated fixed counter, leaving the programmable counters available for other events. Faulting executions of GETSEC/VM entry/VM Exit/MWait will not count as retired instructions.", 3 "PublicDescription": "This event counts the number of instructions retired from execution. For instructions that consist of multiple micro-ops, this event counts the retirement of the last micro-op of the instruction. Counting continues during hardware interrupts, traps, and inside interrupt handlers. INST_RETIRED.ANY is counted by a designated fixed counter, leaving the programmable counters available for other events. Faulting executions of GETSEC/VM entry/VM Exit/MWait will not count as retired instructions.",
4 "EventCode": "0x00", 4 "EventCode": "0x00",
5 "Counter": "Fixed counter 1", 5 "Counter": "Fixed counter 0",
6 "UMask": "0x1", 6 "UMask": "0x1",
7 "Errata": "HSD140, HSD143", 7 "Errata": "HSD140, HSD143",
8 "EventName": "INST_RETIRED.ANY", 8 "EventName": "INST_RETIRED.ANY",
9 "SampleAfterValue": "2000003", 9 "SampleAfterValue": "2000003",
10 "BriefDescription": "Instructions retired from execution.", 10 "BriefDescription": "Instructions retired from execution.",
11 "CounterHTOff": "Fixed counter 1" 11 "CounterHTOff": "Fixed counter 0"
12 }, 12 },
13 { 13 {
14 "PublicDescription": "This event counts the number of thread cycles while the thread is not in a halt state. The thread enters the halt state when it is running the HLT instruction. The core frequency may change from time to time due to power or thermal throttling.", 14 "PublicDescription": "This event counts the number of thread cycles while the thread is not in a halt state. The thread enters the halt state when it is running the HLT instruction. The core frequency may change from time to time due to power or thermal throttling.",
15 "EventCode": "0x00", 15 "EventCode": "0x00",
16 "Counter": "Fixed counter 2", 16 "Counter": "Fixed counter 1",
17 "UMask": "0x2", 17 "UMask": "0x2",
18 "EventName": "CPU_CLK_UNHALTED.THREAD", 18 "EventName": "CPU_CLK_UNHALTED.THREAD",
19 "SampleAfterValue": "2000003", 19 "SampleAfterValue": "2000003",
20 "BriefDescription": "Core cycles when the thread is not in halt state.", 20 "BriefDescription": "Core cycles when the thread is not in halt state.",
21 "CounterHTOff": "Fixed counter 2" 21 "CounterHTOff": "Fixed counter 1"
22 },
23 {
24 "EventCode": "0x00",
25 "Counter": "Fixed counter 1",
26 "UMask": "0x2",
27 "AnyThread": "1",
28 "EventName": "CPU_CLK_UNHALTED.THREAD_ANY",
29 "SampleAfterValue": "2000003",
30 "BriefDescription": "Core cycles when at least one thread on the physical core is not in halt state.",
31 "CounterHTOff": "Fixed counter 1"
22 }, 32 },
23 { 33 {
24 "PublicDescription": "This event counts the number of reference cycles when the core is not in a halt state. The core enters the halt state when it is running the HLT instruction or the MWAIT instruction. This event is not affected by core frequency changes (for example, P states, TM2 transitions) but has the same incrementing frequency as the time stamp counter. This event can approximate elapsed time while the core was not in a halt state.", 34 "PublicDescription": "This event counts the number of reference cycles when the core is not in a halt state. The core enters the halt state when it is running the HLT instruction or the MWAIT instruction. This event is not affected by core frequency changes (for example, P states, TM2 transitions) but has the same incrementing frequency as the time stamp counter. This event can approximate elapsed time while the core was not in a halt state.",
25 "EventCode": "0x00", 35 "EventCode": "0x00",
26 "Counter": "Fixed counter 3", 36 "Counter": "Fixed counter 2",
27 "UMask": "0x3", 37 "UMask": "0x3",
28 "EventName": "CPU_CLK_UNHALTED.REF_TSC", 38 "EventName": "CPU_CLK_UNHALTED.REF_TSC",
29 "SampleAfterValue": "2000003", 39 "SampleAfterValue": "2000003",
30 "BriefDescription": "Reference cycles when the core is not in halt state.", 40 "BriefDescription": "Reference cycles when the core is not in halt state.",
31 "CounterHTOff": "Fixed counter 3" 41 "CounterHTOff": "Fixed counter 2"
32 }, 42 },
33 { 43 {
34 "PublicDescription": "This event counts loads that followed a store to the same address, where the data could not be forwarded inside the pipeline from the store to the load. The most common reason why store forwarding would be blocked is when a load's address range overlaps with a preceding smaller uncompleted store. The penalty for blocked store forwarding is that the load must wait for the store to write its value to the cache before it can be issued.", 44 "PublicDescription": "This event counts loads that followed a store to the same address, where the data could not be forwarded inside the pipeline from the store to the load. The most common reason why store forwarding would be blocked is when a load's address range overlaps with a preceding smaller uncompleted store. The penalty for blocked store forwarding is that the load must wait for the store to write its value to the cache before it can be issued.",
@@ -67,7 +77,19 @@
67 "UMask": "0x3", 77 "UMask": "0x3",
68 "EventName": "INT_MISC.RECOVERY_CYCLES", 78 "EventName": "INT_MISC.RECOVERY_CYCLES",
69 "SampleAfterValue": "2000003", 79 "SampleAfterValue": "2000003",
70 "BriefDescription": "Number of cycles waiting for the checkpoints in Resource Allocation Table (RAT) to be recovered after Nuke due to all other cases except JEClear (e.g. whenever a ucode assist is needed like SSE exception, memory disambiguation, etc...)", 80 "BriefDescription": "Core cycles the allocator was stalled due to recovery from earlier clear event for this thread (e.g. misprediction or memory nuke)",
81 "CounterMask": "1",
82 "CounterHTOff": "0,1,2,3,4,5,6,7"
83 },
84 {
85 "PublicDescription": "Core cycles the allocator was stalled due to recovery from earlier clear event for any thread running on the physical core (e.g. misprediction or memory nuke).",
86 "EventCode": "0x0D",
87 "Counter": "0,1,2,3",
88 "UMask": "0x3",
89 "AnyThread": "1",
90 "EventName": "INT_MISC.RECOVERY_CYCLES_ANY",
91 "SampleAfterValue": "2000003",
92 "BriefDescription": "Core cycles the allocator was stalled due to recovery from earlier clear event for any thread running on the physical core (e.g. misprediction or memory nuke)",
71 "CounterMask": "1", 93 "CounterMask": "1",
72 "CounterHTOff": "0,1,2,3,4,5,6,7" 94 "CounterHTOff": "0,1,2,3,4,5,6,7"
73 }, 95 },
@@ -82,6 +104,29 @@
82 "CounterHTOff": "0,1,2,3,4,5,6,7" 104 "CounterHTOff": "0,1,2,3,4,5,6,7"
83 }, 105 },
84 { 106 {
107 "EventCode": "0x0E",
108 "Invert": "1",
109 "Counter": "0,1,2,3",
110 "UMask": "0x1",
111 "EventName": "UOPS_ISSUED.STALL_CYCLES",
112 "SampleAfterValue": "2000003",
113 "BriefDescription": "Cycles when Resource Allocation Table (RAT) does not issue Uops to Reservation Station (RS) for the thread.",
114 "CounterMask": "1",
115 "CounterHTOff": "0,1,2,3"
116 },
117 {
118 "EventCode": "0x0E",
119 "Invert": "1",
120 "Counter": "0,1,2,3",
121 "UMask": "0x1",
122 "AnyThread": "1",
123 "EventName": "UOPS_ISSUED.CORE_STALL_CYCLES",
124 "SampleAfterValue": "2000003",
125 "BriefDescription": "Cycles when Resource Allocation Table (RAT) does not issue Uops to Reservation Station (RS) for all threads.",
126 "CounterMask": "1",
127 "CounterHTOff": "0,1,2,3"
128 },
129 {
85 "PublicDescription": "Number of flags-merge uops allocated. Such uops add delay.", 130 "PublicDescription": "Number of flags-merge uops allocated. Such uops add delay.",
86 "EventCode": "0x0E", 131 "EventCode": "0x0E",
87 "Counter": "0,1,2,3", 132 "Counter": "0,1,2,3",
@@ -112,35 +157,32 @@
112 "CounterHTOff": "0,1,2,3,4,5,6,7" 157 "CounterHTOff": "0,1,2,3,4,5,6,7"
113 }, 158 },
114 { 159 {
115 "EventCode": "0x0E", 160 "EventCode": "0x14",
116 "Invert": "1",
117 "Counter": "0,1,2,3", 161 "Counter": "0,1,2,3",
118 "UMask": "0x1", 162 "UMask": "0x2",
119 "EventName": "UOPS_ISSUED.STALL_CYCLES", 163 "EventName": "ARITH.DIVIDER_UOPS",
120 "SampleAfterValue": "2000003", 164 "SampleAfterValue": "2000003",
121 "BriefDescription": "Cycles when Resource Allocation Table (RAT) does not issue Uops to Reservation Station (RS) for the thread.", 165 "BriefDescription": "Any uop executed by the Divider. (This includes all divide uops, sqrt, ...)",
122 "CounterMask": "1", 166 "CounterHTOff": "0,1,2,3,4,5,6,7"
123 "CounterHTOff": "0,1,2,3"
124 }, 167 },
125 { 168 {
126 "EventCode": "0x0E", 169 "PublicDescription": "Counts the number of thread cycles while the thread is not in a halt state. The thread enters the halt state when it is running the HLT instruction. The core frequency may change from time to time due to power or thermal throttling.",
127 "Invert": "1", 170 "EventCode": "0x3C",
128 "Counter": "0,1,2,3", 171 "Counter": "0,1,2,3",
129 "UMask": "0x1", 172 "UMask": "0x0",
130 "AnyThread": "1", 173 "EventName": "CPU_CLK_UNHALTED.THREAD_P",
131 "EventName": "UOPS_ISSUED.CORE_STALL_CYCLES",
132 "SampleAfterValue": "2000003", 174 "SampleAfterValue": "2000003",
133 "BriefDescription": "Cycles when Resource Allocation Table (RAT) does not issue Uops to Reservation Station (RS) for all threads.", 175 "BriefDescription": "Thread cycles when thread is not in halt state",
134 "CounterMask": "1", 176 "CounterHTOff": "0,1,2,3,4,5,6,7"
135 "CounterHTOff": "0,1,2,3"
136 }, 177 },
137 { 178 {
138 "EventCode": "0x14", 179 "EventCode": "0x3C",
139 "Counter": "0,1,2,3", 180 "Counter": "0,1,2,3",
140 "UMask": "0x2", 181 "UMask": "0x0",
141 "EventName": "ARITH.DIVIDER_UOPS", 182 "AnyThread": "1",
183 "EventName": "CPU_CLK_UNHALTED.THREAD_P_ANY",
142 "SampleAfterValue": "2000003", 184 "SampleAfterValue": "2000003",
143 "BriefDescription": "Any uop executed by the Divider. (This includes all divide uops, sqrt, ...)", 185 "BriefDescription": "Core cycles when at least one thread on the physical core is not in halt state.",
144 "CounterHTOff": "0,1,2,3,4,5,6,7" 186 "CounterHTOff": "0,1,2,3,4,5,6,7"
145 }, 187 },
146 { 188 {
@@ -154,6 +196,38 @@
154 "CounterHTOff": "0,1,2,3,4,5,6,7" 196 "CounterHTOff": "0,1,2,3,4,5,6,7"
155 }, 197 },
156 { 198 {
199 "PublicDescription": "Reference cycles when the at least one thread on the physical core is unhalted (counts at 100 MHz rate).",
200 "EventCode": "0x3C",
201 "Counter": "0,1,2,3",
202 "UMask": "0x1",
203 "AnyThread": "1",
204 "EventName": "CPU_CLK_THREAD_UNHALTED.REF_XCLK_ANY",
205 "SampleAfterValue": "2000003",
206 "BriefDescription": "Reference cycles when the at least one thread on the physical core is unhalted (counts at 100 MHz rate)",
207 "CounterHTOff": "0,1,2,3,4,5,6,7"
208 },
209 {
210 "PublicDescription": "Reference cycles when the thread is unhalted. (counts at 100 MHz rate)",
211 "EventCode": "0x3C",
212 "Counter": "0,1,2,3",
213 "UMask": "0x1",
214 "EventName": "CPU_CLK_UNHALTED.REF_XCLK",
215 "SampleAfterValue": "2000003",
216 "BriefDescription": "Reference cycles when the thread is unhalted (counts at 100 MHz rate)",
217 "CounterHTOff": "0,1,2,3,4,5,6,7"
218 },
219 {
220 "PublicDescription": "Reference cycles when the at least one thread on the physical core is unhalted (counts at 100 MHz rate).",
221 "EventCode": "0x3C",
222 "Counter": "0,1,2,3",
223 "UMask": "0x1",
224 "AnyThread": "1",
225 "EventName": "CPU_CLK_UNHALTED.REF_XCLK_ANY",
226 "SampleAfterValue": "2000003",
227 "BriefDescription": "Reference cycles when the at least one thread on the physical core is unhalted (counts at 100 MHz rate)",
228 "CounterHTOff": "0,1,2,3,4,5,6,7"
229 },
230 {
157 "EventCode": "0x3c", 231 "EventCode": "0x3c",
158 "Counter": "0,1,2,3", 232 "Counter": "0,1,2,3",
159 "UMask": "0x2", 233 "UMask": "0x2",
@@ -163,6 +237,15 @@
163 "CounterHTOff": "0,1,2,3" 237 "CounterHTOff": "0,1,2,3"
164 }, 238 },
165 { 239 {
240 "EventCode": "0x3C",
241 "Counter": "0,1,2,3",
242 "UMask": "0x2",
243 "EventName": "CPU_CLK_UNHALTED.ONE_THREAD_ACTIVE",
244 "SampleAfterValue": "2000003",
245 "BriefDescription": "Count XClk pulses when this thread is unhalted and the other thread is halted.",
246 "CounterHTOff": "0,1,2,3,4,5,6,7"
247 },
248 {
166 "PublicDescription": "Non-SW-prefetch load dispatches that hit fill buffer allocated for S/W prefetch.", 249 "PublicDescription": "Non-SW-prefetch load dispatches that hit fill buffer allocated for S/W prefetch.",
167 "EventCode": "0x4c", 250 "EventCode": "0x4c",
168 "Counter": "0,1,2,3", 251 "Counter": "0,1,2,3",
@@ -233,6 +316,18 @@
233 "CounterHTOff": "0,1,2,3,4,5,6,7" 316 "CounterHTOff": "0,1,2,3,4,5,6,7"
234 }, 317 },
235 { 318 {
319 "EventCode": "0x5E",
320 "Invert": "1",
321 "Counter": "0,1,2,3",
322 "UMask": "0x1",
323 "EdgeDetect": "1",
324 "EventName": "RS_EVENTS.EMPTY_END",
325 "SampleAfterValue": "200003",
326 "BriefDescription": "Counts end of periods where the Reservation Station (RS) was empty. Could be useful to precisely locate Frontend Latency Bound issues.",
327 "CounterMask": "1",
328 "CounterHTOff": "0,1,2,3,4,5,6,7"
329 },
330 {
236 "PublicDescription": "This event counts cycles where the decoder is stalled on an instruction with a length changing prefix (LCP).", 331 "PublicDescription": "This event counts cycles where the decoder is stalled on an instruction with a length changing prefix (LCP).",
237 "EventCode": "0x87", 332 "EventCode": "0x87",
238 "Counter": "0,1,2,3", 333 "Counter": "0,1,2,3",
@@ -409,6 +504,15 @@
409 { 504 {
410 "EventCode": "0x89", 505 "EventCode": "0x89",
411 "Counter": "0,1,2,3", 506 "Counter": "0,1,2,3",
507 "UMask": "0xa0",
508 "EventName": "BR_MISP_EXEC.TAKEN_INDIRECT_NEAR_CALL",
509 "SampleAfterValue": "200003",
510 "BriefDescription": "Taken speculative and retired mispredicted indirect calls.",
511 "CounterHTOff": "0,1,2,3,4,5,6,7"
512 },
513 {
514 "EventCode": "0x89",
515 "Counter": "0,1,2,3",
412 "UMask": "0xc1", 516 "UMask": "0xc1",
413 "EventName": "BR_MISP_EXEC.ALL_CONDITIONAL", 517 "EventName": "BR_MISP_EXEC.ALL_CONDITIONAL",
414 "SampleAfterValue": "200003", 518 "SampleAfterValue": "200003",
@@ -445,6 +549,26 @@
445 "CounterHTOff": "0,1,2,3,4,5,6,7" 549 "CounterHTOff": "0,1,2,3,4,5,6,7"
446 }, 550 },
447 { 551 {
552 "PublicDescription": "Cycles per core when uops are exectuted in port 0.",
553 "EventCode": "0xA1",
554 "Counter": "0,1,2,3",
555 "UMask": "0x1",
556 "AnyThread": "1",
557 "EventName": "UOPS_EXECUTED_PORT.PORT_0_CORE",
558 "SampleAfterValue": "2000003",
559 "BriefDescription": "Cycles per core when uops are executed in port 0.",
560 "CounterHTOff": "0,1,2,3,4,5,6,7"
561 },
562 {
563 "EventCode": "0xA1",
564 "Counter": "0,1,2,3",
565 "UMask": "0x1",
566 "EventName": "UOPS_DISPATCHED_PORT.PORT_0",
567 "SampleAfterValue": "2000003",
568 "BriefDescription": "Cycles per thread when uops are executed in port 0.",
569 "CounterHTOff": "0,1,2,3,4,5,6,7"
570 },
571 {
448 "PublicDescription": "Cycles which a uop is dispatched on port 1 in this thread.", 572 "PublicDescription": "Cycles which a uop is dispatched on port 1 in this thread.",
449 "EventCode": "0xA1", 573 "EventCode": "0xA1",
450 "Counter": "0,1,2,3", 574 "Counter": "0,1,2,3",
@@ -455,6 +579,26 @@
455 "CounterHTOff": "0,1,2,3,4,5,6,7" 579 "CounterHTOff": "0,1,2,3,4,5,6,7"
456 }, 580 },
457 { 581 {
582 "PublicDescription": "Cycles per core when uops are exectuted in port 1.",
583 "EventCode": "0xA1",
584 "Counter": "0,1,2,3",
585 "UMask": "0x2",
586 "AnyThread": "1",
587 "EventName": "UOPS_EXECUTED_PORT.PORT_1_CORE",
588 "SampleAfterValue": "2000003",
589 "BriefDescription": "Cycles per core when uops are executed in port 1.",
590 "CounterHTOff": "0,1,2,3,4,5,6,7"
591 },
592 {
593 "EventCode": "0xA1",
594 "Counter": "0,1,2,3",
595 "UMask": "0x2",
596 "EventName": "UOPS_DISPATCHED_PORT.PORT_1",
597 "SampleAfterValue": "2000003",
598 "BriefDescription": "Cycles per thread when uops are executed in port 1.",
599 "CounterHTOff": "0,1,2,3,4,5,6,7"
600 },
601 {
458 "PublicDescription": "Cycles which a uop is dispatched on port 2 in this thread.", 602 "PublicDescription": "Cycles which a uop is dispatched on port 2 in this thread.",
459 "EventCode": "0xA1", 603 "EventCode": "0xA1",
460 "Counter": "0,1,2,3", 604 "Counter": "0,1,2,3",
@@ -465,6 +609,25 @@
465 "CounterHTOff": "0,1,2,3,4,5,6,7" 609 "CounterHTOff": "0,1,2,3,4,5,6,7"
466 }, 610 },
467 { 611 {
612 "EventCode": "0xA1",
613 "Counter": "0,1,2,3",
614 "UMask": "0x4",
615 "AnyThread": "1",
616 "EventName": "UOPS_EXECUTED_PORT.PORT_2_CORE",
617 "SampleAfterValue": "2000003",
618 "BriefDescription": "Cycles per core when uops are dispatched to port 2.",
619 "CounterHTOff": "0,1,2,3,4,5,6,7"
620 },
621 {
622 "EventCode": "0xA1",
623 "Counter": "0,1,2,3",
624 "UMask": "0x4",
625 "EventName": "UOPS_DISPATCHED_PORT.PORT_2",
626 "SampleAfterValue": "2000003",
627 "BriefDescription": "Cycles per thread when uops are executed in port 2.",
628 "CounterHTOff": "0,1,2,3,4,5,6,7"
629 },
630 {
468 "PublicDescription": "Cycles which a uop is dispatched on port 3 in this thread.", 631 "PublicDescription": "Cycles which a uop is dispatched on port 3 in this thread.",
469 "EventCode": "0xA1", 632 "EventCode": "0xA1",
470 "Counter": "0,1,2,3", 633 "Counter": "0,1,2,3",
@@ -475,6 +638,25 @@
475 "CounterHTOff": "0,1,2,3,4,5,6,7" 638 "CounterHTOff": "0,1,2,3,4,5,6,7"
476 }, 639 },
477 { 640 {
641 "EventCode": "0xA1",
642 "Counter": "0,1,2,3",
643 "UMask": "0x8",
644 "AnyThread": "1",
645 "EventName": "UOPS_EXECUTED_PORT.PORT_3_CORE",
646 "SampleAfterValue": "2000003",
647 "BriefDescription": "Cycles per core when uops are dispatched to port 3.",
648 "CounterHTOff": "0,1,2,3,4,5,6,7"
649 },
650 {
651 "EventCode": "0xA1",
652 "Counter": "0,1,2,3",
653 "UMask": "0x8",
654 "EventName": "UOPS_DISPATCHED_PORT.PORT_3",
655 "SampleAfterValue": "2000003",
656 "BriefDescription": "Cycles per thread when uops are executed in port 3.",
657 "CounterHTOff": "0,1,2,3,4,5,6,7"
658 },
659 {
478 "PublicDescription": "Cycles which a uop is dispatched on port 4 in this thread.", 660 "PublicDescription": "Cycles which a uop is dispatched on port 4 in this thread.",
479 "EventCode": "0xA1", 661 "EventCode": "0xA1",
480 "Counter": "0,1,2,3", 662 "Counter": "0,1,2,3",
@@ -485,6 +667,26 @@
485 "CounterHTOff": "0,1,2,3,4,5,6,7" 667 "CounterHTOff": "0,1,2,3,4,5,6,7"
486 }, 668 },
487 { 669 {
670 "PublicDescription": "Cycles per core when uops are exectuted in port 4.",
671 "EventCode": "0xA1",
672 "Counter": "0,1,2,3",
673 "UMask": "0x10",
674 "AnyThread": "1",
675 "EventName": "UOPS_EXECUTED_PORT.PORT_4_CORE",
676 "SampleAfterValue": "2000003",
677 "BriefDescription": "Cycles per core when uops are executed in port 4.",
678 "CounterHTOff": "0,1,2,3,4,5,6,7"
679 },
680 {
681 "EventCode": "0xA1",
682 "Counter": "0,1,2,3",
683 "UMask": "0x10",
684 "EventName": "UOPS_DISPATCHED_PORT.PORT_4",
685 "SampleAfterValue": "2000003",
686 "BriefDescription": "Cycles per thread when uops are executed in port 4.",
687 "CounterHTOff": "0,1,2,3,4,5,6,7"
688 },
689 {
488 "PublicDescription": "Cycles which a uop is dispatched on port 5 in this thread.", 690 "PublicDescription": "Cycles which a uop is dispatched on port 5 in this thread.",
489 "EventCode": "0xA1", 691 "EventCode": "0xA1",
490 "Counter": "0,1,2,3", 692 "Counter": "0,1,2,3",
@@ -495,6 +697,26 @@
495 "CounterHTOff": "0,1,2,3,4,5,6,7" 697 "CounterHTOff": "0,1,2,3,4,5,6,7"
496 }, 698 },
497 { 699 {
700 "PublicDescription": "Cycles per core when uops are exectuted in port 5.",
701 "EventCode": "0xA1",
702 "Counter": "0,1,2,3",
703 "UMask": "0x20",
704 "AnyThread": "1",
705 "EventName": "UOPS_EXECUTED_PORT.PORT_5_CORE",
706 "SampleAfterValue": "2000003",
707 "BriefDescription": "Cycles per core when uops are executed in port 5.",
708 "CounterHTOff": "0,1,2,3,4,5,6,7"
709 },
710 {
711 "EventCode": "0xA1",
712 "Counter": "0,1,2,3",
713 "UMask": "0x20",
714 "EventName": "UOPS_DISPATCHED_PORT.PORT_5",
715 "SampleAfterValue": "2000003",
716 "BriefDescription": "Cycles per thread when uops are executed in port 5.",
717 "CounterHTOff": "0,1,2,3,4,5,6,7"
718 },
719 {
498 "PublicDescription": "Cycles which a uop is dispatched on port 6 in this thread.", 720 "PublicDescription": "Cycles which a uop is dispatched on port 6 in this thread.",
499 "EventCode": "0xA1", 721 "EventCode": "0xA1",
500 "Counter": "0,1,2,3", 722 "Counter": "0,1,2,3",
@@ -505,6 +727,26 @@
505 "CounterHTOff": "0,1,2,3,4,5,6,7" 727 "CounterHTOff": "0,1,2,3,4,5,6,7"
506 }, 728 },
507 { 729 {
730 "PublicDescription": "Cycles per core when uops are exectuted in port 6.",
731 "EventCode": "0xA1",
732 "Counter": "0,1,2,3",
733 "UMask": "0x40",
734 "AnyThread": "1",
735 "EventName": "UOPS_EXECUTED_PORT.PORT_6_CORE",
736 "SampleAfterValue": "2000003",
737 "BriefDescription": "Cycles per core when uops are executed in port 6.",
738 "CounterHTOff": "0,1,2,3,4,5,6,7"
739 },
740 {
741 "EventCode": "0xA1",
742 "Counter": "0,1,2,3",
743 "UMask": "0x40",
744 "EventName": "UOPS_DISPATCHED_PORT.PORT_6",
745 "SampleAfterValue": "2000003",
746 "BriefDescription": "Cycles per thread when uops are executed in port 6.",
747 "CounterHTOff": "0,1,2,3,4,5,6,7"
748 },
749 {
508 "PublicDescription": "Cycles which a uop is dispatched on port 7 in this thread.", 750 "PublicDescription": "Cycles which a uop is dispatched on port 7 in this thread.",
509 "EventCode": "0xA1", 751 "EventCode": "0xA1",
510 "Counter": "0,1,2,3", 752 "Counter": "0,1,2,3",
@@ -515,6 +757,25 @@
515 "CounterHTOff": "0,1,2,3,4,5,6,7" 757 "CounterHTOff": "0,1,2,3,4,5,6,7"
516 }, 758 },
517 { 759 {
760 "EventCode": "0xA1",
761 "Counter": "0,1,2,3",
762 "UMask": "0x80",
763 "AnyThread": "1",
764 "EventName": "UOPS_EXECUTED_PORT.PORT_7_CORE",
765 "SampleAfterValue": "2000003",
766 "BriefDescription": "Cycles per core when uops are dispatched to port 7.",
767 "CounterHTOff": "0,1,2,3,4,5,6,7"
768 },
769 {
770 "EventCode": "0xA1",
771 "Counter": "0,1,2,3",
772 "UMask": "0x80",
773 "EventName": "UOPS_DISPATCHED_PORT.PORT_7",
774 "SampleAfterValue": "2000003",
775 "BriefDescription": "Cycles per thread when uops are executed in port 7.",
776 "CounterHTOff": "0,1,2,3,4,5,6,7"
777 },
778 {
518 "PublicDescription": "Cycles allocation is stalled due to resource related reason.", 779 "PublicDescription": "Cycles allocation is stalled due to resource related reason.",
519 "EventCode": "0xA2", 780 "EventCode": "0xA2",
520 "Counter": "0,1,2,3", 781 "Counter": "0,1,2,3",
@@ -566,17 +827,6 @@
566 "CounterHTOff": "0,1,2,3,4,5,6,7" 827 "CounterHTOff": "0,1,2,3,4,5,6,7"
567 }, 828 },
568 { 829 {
569 "PublicDescription": "Cycles with pending L1 data cache miss loads. Set Cmask=8 to count cycle.",
570 "EventCode": "0xA3",
571 "Counter": "2",
572 "UMask": "0x8",
573 "EventName": "CYCLE_ACTIVITY.CYCLES_L1D_PENDING",
574 "SampleAfterValue": "2000003",
575 "BriefDescription": "Cycles with pending L1 cache miss loads.",
576 "CounterMask": "8",
577 "CounterHTOff": "2"
578 },
579 {
580 "PublicDescription": "Cycles with pending memory loads. Set Cmask=2 to count cycle.", 830 "PublicDescription": "Cycles with pending memory loads. Set Cmask=2 to count cycle.",
581 "EventCode": "0xA3", 831 "EventCode": "0xA3",
582 "Counter": "0,1,2,3", 832 "Counter": "0,1,2,3",
@@ -594,7 +844,7 @@
594 "UMask": "0x4", 844 "UMask": "0x4",
595 "EventName": "CYCLE_ACTIVITY.CYCLES_NO_EXECUTE", 845 "EventName": "CYCLE_ACTIVITY.CYCLES_NO_EXECUTE",
596 "SampleAfterValue": "2000003", 846 "SampleAfterValue": "2000003",
597 "BriefDescription": "Total execution stalls", 847 "BriefDescription": "This event increments by 1 for every cycle where there was no execute for this thread.",
598 "CounterMask": "4", 848 "CounterMask": "4",
599 "CounterHTOff": "0,1,2,3" 849 "CounterHTOff": "0,1,2,3"
600 }, 850 },
@@ -621,6 +871,17 @@
621 "CounterHTOff": "0,1,2,3" 871 "CounterHTOff": "0,1,2,3"
622 }, 872 },
623 { 873 {
874 "PublicDescription": "Cycles with pending L1 data cache miss loads. Set Cmask=8 to count cycle.",
875 "EventCode": "0xA3",
876 "Counter": "2",
877 "UMask": "0x8",
878 "EventName": "CYCLE_ACTIVITY.CYCLES_L1D_PENDING",
879 "SampleAfterValue": "2000003",
880 "BriefDescription": "Cycles with pending L1 cache miss loads.",
881 "CounterMask": "8",
882 "CounterHTOff": "2"
883 },
884 {
624 "PublicDescription": "Execution stalls due to L1 data cache miss loads. Set Cmask=0CH.", 885 "PublicDescription": "Execution stalls due to L1 data cache miss loads. Set Cmask=0CH.",
625 "EventCode": "0xA3", 886 "EventCode": "0xA3",
626 "Counter": "2", 887 "Counter": "2",
@@ -642,14 +903,23 @@
642 "CounterHTOff": "0,1,2,3,4,5,6,7" 903 "CounterHTOff": "0,1,2,3,4,5,6,7"
643 }, 904 },
644 { 905 {
645 "PublicDescription": "Counts total number of uops to be executed per-core each cycle.", 906 "EventCode": "0xA8",
646 "EventCode": "0xB1",
647 "Counter": "0,1,2,3", 907 "Counter": "0,1,2,3",
648 "UMask": "0x2", 908 "UMask": "0x1",
649 "Errata": "HSD30, HSM31", 909 "EventName": "LSD.CYCLES_ACTIVE",
650 "EventName": "UOPS_EXECUTED.CORE",
651 "SampleAfterValue": "2000003", 910 "SampleAfterValue": "2000003",
652 "BriefDescription": "Number of uops executed on the core.", 911 "BriefDescription": "Cycles Uops delivered by the LSD, but didn't come from the decoder.",
912 "CounterMask": "1",
913 "CounterHTOff": "0,1,2,3,4,5,6,7"
914 },
915 {
916 "EventCode": "0xA8",
917 "Counter": "0,1,2,3",
918 "UMask": "0x1",
919 "EventName": "LSD.CYCLES_4_UOPS",
920 "SampleAfterValue": "2000003",
921 "BriefDescription": "Cycles 4 Uops delivered by the LSD, but didn't come from the decoder.",
922 "CounterMask": "4",
653 "CounterHTOff": "0,1,2,3,4,5,6,7" 923 "CounterHTOff": "0,1,2,3,4,5,6,7"
654 }, 924 },
655 { 925 {
@@ -665,24 +935,127 @@
665 "CounterHTOff": "0,1,2,3" 935 "CounterHTOff": "0,1,2,3"
666 }, 936 },
667 { 937 {
668 "PublicDescription": "Number of instructions at retirement.", 938 "PublicDescription": "This events counts the cycles where at least one uop was executed. It is counted per thread.",
669 "EventCode": "0xC0", 939 "EventCode": "0xB1",
670 "Counter": "0,1,2,3", 940 "Counter": "0,1,2,3",
671 "UMask": "0x0", 941 "UMask": "0x1",
672 "Errata": "HSD11, HSD140", 942 "Errata": "HSD144, HSD30, HSM31",
673 "EventName": "INST_RETIRED.ANY_P", 943 "EventName": "UOPS_EXECUTED.CYCLES_GE_1_UOP_EXEC",
674 "SampleAfterValue": "2000003", 944 "SampleAfterValue": "2000003",
675 "BriefDescription": "Number of instructions retired. General Counter - architectural event", 945 "BriefDescription": "Cycles where at least 1 uop was executed per-thread",
946 "CounterMask": "1",
947 "CounterHTOff": "0,1,2,3"
948 },
949 {
950 "PublicDescription": "This events counts the cycles where at least two uop were executed. It is counted per thread.",
951 "EventCode": "0xB1",
952 "Counter": "0,1,2,3",
953 "UMask": "0x1",
954 "Errata": "HSD144, HSD30, HSM31",
955 "EventName": "UOPS_EXECUTED.CYCLES_GE_2_UOPS_EXEC",
956 "SampleAfterValue": "2000003",
957 "BriefDescription": "Cycles where at least 2 uops were executed per-thread",
958 "CounterMask": "2",
959 "CounterHTOff": "0,1,2,3"
960 },
961 {
962 "PublicDescription": "This events counts the cycles where at least three uop were executed. It is counted per thread.",
963 "EventCode": "0xB1",
964 "Counter": "0,1,2,3",
965 "UMask": "0x1",
966 "Errata": "HSD144, HSD30, HSM31",
967 "EventName": "UOPS_EXECUTED.CYCLES_GE_3_UOPS_EXEC",
968 "SampleAfterValue": "2000003",
969 "BriefDescription": "Cycles where at least 3 uops were executed per-thread",
970 "CounterMask": "3",
971 "CounterHTOff": "0,1,2,3"
972 },
973 {
974 "EventCode": "0xB1",
975 "Counter": "0,1,2,3",
976 "UMask": "0x1",
977 "Errata": "HSD144, HSD30, HSM31",
978 "EventName": "UOPS_EXECUTED.CYCLES_GE_4_UOPS_EXEC",
979 "SampleAfterValue": "2000003",
980 "BriefDescription": "Cycles where at least 4 uops were executed per-thread.",
981 "CounterMask": "4",
982 "CounterHTOff": "0,1,2,3"
983 },
984 {
985 "PublicDescription": "Counts total number of uops to be executed per-core each cycle.",
986 "EventCode": "0xB1",
987 "Counter": "0,1,2,3",
988 "UMask": "0x2",
989 "Errata": "HSD30, HSM31",
990 "EventName": "UOPS_EXECUTED.CORE",
991 "SampleAfterValue": "2000003",
992 "BriefDescription": "Number of uops executed on the core.",
676 "CounterHTOff": "0,1,2,3,4,5,6,7" 993 "CounterHTOff": "0,1,2,3,4,5,6,7"
677 }, 994 },
678 { 995 {
679 "PublicDescription": "This is a non-precise version (that is, does not use PEBS) of the event that counts FP operations retired. For X87 FP operations that have no exceptions counting also includes flows that have several X87, or flows that use X87 uops in the exception handling.", 996 "EventCode": "0xb1",
680 "EventCode": "0xC0",
681 "Counter": "0,1,2,3", 997 "Counter": "0,1,2,3",
682 "UMask": "0x2", 998 "UMask": "0x2",
683 "EventName": "INST_RETIRED.X87", 999 "Errata": "HSD30, HSM31",
1000 "EventName": "UOPS_EXECUTED.CORE_CYCLES_GE_1",
684 "SampleAfterValue": "2000003", 1001 "SampleAfterValue": "2000003",
685 "BriefDescription": "FP operations retired. X87 FP operations that have no exceptions: Counts also flows that have several X87 or flows that use X87 uops in the exception handling.", 1002 "BriefDescription": "Cycles at least 1 micro-op is executed from any thread on physical core.",
1003 "CounterMask": "1",
1004 "CounterHTOff": "0,1,2,3,4,5,6,7"
1005 },
1006 {
1007 "EventCode": "0xb1",
1008 "Counter": "0,1,2,3",
1009 "UMask": "0x2",
1010 "Errata": "HSD30, HSM31",
1011 "EventName": "UOPS_EXECUTED.CORE_CYCLES_GE_2",
1012 "SampleAfterValue": "2000003",
1013 "BriefDescription": "Cycles at least 2 micro-op is executed from any thread on physical core.",
1014 "CounterMask": "2",
1015 "CounterHTOff": "0,1,2,3,4,5,6,7"
1016 },
1017 {
1018 "EventCode": "0xb1",
1019 "Counter": "0,1,2,3",
1020 "UMask": "0x2",
1021 "Errata": "HSD30, HSM31",
1022 "EventName": "UOPS_EXECUTED.CORE_CYCLES_GE_3",
1023 "SampleAfterValue": "2000003",
1024 "BriefDescription": "Cycles at least 3 micro-op is executed from any thread on physical core.",
1025 "CounterMask": "3",
1026 "CounterHTOff": "0,1,2,3,4,5,6,7"
1027 },
1028 {
1029 "EventCode": "0xb1",
1030 "Counter": "0,1,2,3",
1031 "UMask": "0x2",
1032 "Errata": "HSD30, HSM31",
1033 "EventName": "UOPS_EXECUTED.CORE_CYCLES_GE_4",
1034 "SampleAfterValue": "2000003",
1035 "BriefDescription": "Cycles at least 4 micro-op is executed from any thread on physical core.",
1036 "CounterMask": "4",
1037 "CounterHTOff": "0,1,2,3,4,5,6,7"
1038 },
1039 {
1040 "EventCode": "0xb1",
1041 "Invert": "1",
1042 "Counter": "0,1,2,3",
1043 "UMask": "0x2",
1044 "Errata": "HSD30, HSM31",
1045 "EventName": "UOPS_EXECUTED.CORE_CYCLES_NONE",
1046 "SampleAfterValue": "2000003",
1047 "BriefDescription": "Cycles with no micro-ops executed from any thread on physical core.",
1048 "CounterHTOff": "0,1,2,3,4,5,6,7"
1049 },
1050 {
1051 "PublicDescription": "Number of instructions at retirement.",
1052 "EventCode": "0xC0",
1053 "Counter": "0,1,2,3",
1054 "UMask": "0x0",
1055 "Errata": "HSD11, HSD140",
1056 "EventName": "INST_RETIRED.ANY_P",
1057 "SampleAfterValue": "2000003",
1058 "BriefDescription": "Number of instructions retired. General Counter - architectural event",
686 "CounterHTOff": "0,1,2,3,4,5,6,7" 1059 "CounterHTOff": "0,1,2,3,4,5,6,7"
687 }, 1060 },
688 { 1061 {
@@ -698,6 +1071,16 @@
698 "CounterHTOff": "1" 1071 "CounterHTOff": "1"
699 }, 1072 },
700 { 1073 {
1074 "PublicDescription": "This is a non-precise version (that is, does not use PEBS) of the event that counts FP operations retired. For X87 FP operations that have no exceptions counting also includes flows that have several X87, or flows that use X87 uops in the exception handling.",
1075 "EventCode": "0xC0",
1076 "Counter": "0,1,2,3",
1077 "UMask": "0x2",
1078 "EventName": "INST_RETIRED.X87",
1079 "SampleAfterValue": "2000003",
1080 "BriefDescription": "FP operations retired. X87 FP operations that have no exceptions: Counts also flows that have several X87 or flows that use X87 uops in the exception handling.",
1081 "CounterHTOff": "0,1,2,3,4,5,6,7"
1082 },
1083 {
701 "PublicDescription": "Number of microcode assists invoked by HW upon uop writeback.", 1084 "PublicDescription": "Number of microcode assists invoked by HW upon uop writeback.",
702 "EventCode": "0xC1", 1085 "EventCode": "0xC1",
703 "Counter": "0,1,2,3", 1086 "Counter": "0,1,2,3",
@@ -709,7 +1092,6 @@
709 }, 1092 },
710 { 1093 {
711 "PEBS": "1", 1094 "PEBS": "1",
712 "PublicDescription": "Counts the number of micro-ops retired. Use Cmask=1 and invert to count active cycles or stalled cycles.",
713 "EventCode": "0xC2", 1095 "EventCode": "0xC2",
714 "Counter": "0,1,2,3", 1096 "Counter": "0,1,2,3",
715 "UMask": "0x1", 1097 "UMask": "0x1",
@@ -720,17 +1102,6 @@
720 "Data_LA": "1" 1102 "Data_LA": "1"
721 }, 1103 },
722 { 1104 {
723 "PEBS": "1",
724 "PublicDescription": "This event counts the number of retirement slots used each cycle. There are potentially 4 slots that can be used each cycle - meaning, 4 uops or 4 instructions could retire each cycle.",
725 "EventCode": "0xC2",
726 "Counter": "0,1,2,3",
727 "UMask": "0x2",
728 "EventName": "UOPS_RETIRED.RETIRE_SLOTS",
729 "SampleAfterValue": "2000003",
730 "BriefDescription": "Retirement slots used.",
731 "CounterHTOff": "0,1,2,3,4,5,6,7"
732 },
733 {
734 "EventCode": "0xC2", 1105 "EventCode": "0xC2",
735 "Invert": "1", 1106 "Invert": "1",
736 "Counter": "0,1,2,3", 1107 "Counter": "0,1,2,3",
@@ -765,6 +1136,16 @@
765 "CounterHTOff": "0,1,2,3" 1136 "CounterHTOff": "0,1,2,3"
766 }, 1137 },
767 { 1138 {
1139 "PEBS": "1",
1140 "EventCode": "0xC2",
1141 "Counter": "0,1,2,3",
1142 "UMask": "0x2",
1143 "EventName": "UOPS_RETIRED.RETIRE_SLOTS",
1144 "SampleAfterValue": "2000003",
1145 "BriefDescription": "Retirement slots used.",
1146 "CounterHTOff": "0,1,2,3,4,5,6,7"
1147 },
1148 {
768 "EventCode": "0xC3", 1149 "EventCode": "0xC3",
769 "Counter": "0,1,2,3", 1150 "Counter": "0,1,2,3",
770 "UMask": "0x1", 1151 "UMask": "0x1",
@@ -774,6 +1155,17 @@
774 "CounterHTOff": "0,1,2,3,4,5,6,7" 1155 "CounterHTOff": "0,1,2,3,4,5,6,7"
775 }, 1156 },
776 { 1157 {
1158 "EventCode": "0xC3",
1159 "Counter": "0,1,2,3",
1160 "UMask": "0x1",
1161 "EdgeDetect": "1",
1162 "EventName": "MACHINE_CLEARS.COUNT",
1163 "SampleAfterValue": "100003",
1164 "BriefDescription": "Number of machine clears (nukes) of any type.",
1165 "CounterMask": "1",
1166 "CounterHTOff": "0,1,2,3,4,5,6,7"
1167 },
1168 {
777 "PublicDescription": "This event is incremented when self-modifying code (SMC) is detected, which causes a machine clear. Machine clears can have a significant performance impact if they are happening frequently.", 1169 "PublicDescription": "This event is incremented when self-modifying code (SMC) is detected, which causes a machine clear. Machine clears can have a significant performance impact if they are happening frequently.",
778 "EventCode": "0xC3", 1170 "EventCode": "0xC3",
779 "Counter": "0,1,2,3", 1171 "Counter": "0,1,2,3",
@@ -793,8 +1185,17 @@
793 "CounterHTOff": "0,1,2,3,4,5,6,7" 1185 "CounterHTOff": "0,1,2,3,4,5,6,7"
794 }, 1186 },
795 { 1187 {
1188 "PublicDescription": "Branch instructions at retirement.",
1189 "EventCode": "0xC4",
1190 "Counter": "0,1,2,3",
1191 "UMask": "0x0",
1192 "EventName": "BR_INST_RETIRED.ALL_BRANCHES",
1193 "SampleAfterValue": "400009",
1194 "BriefDescription": "All (macro) branch instructions retired.",
1195 "CounterHTOff": "0,1,2,3,4,5,6,7"
1196 },
1197 {
796 "PEBS": "1", 1198 "PEBS": "1",
797 "PublicDescription": "Counts the number of conditional branch instructions retired.",
798 "EventCode": "0xC4", 1199 "EventCode": "0xC4",
799 "Counter": "0,1,2,3", 1200 "Counter": "0,1,2,3",
800 "UMask": "0x1", 1201 "UMask": "0x1",
@@ -814,18 +1215,27 @@
814 "CounterHTOff": "0,1,2,3,4,5,6,7" 1215 "CounterHTOff": "0,1,2,3,4,5,6,7"
815 }, 1216 },
816 { 1217 {
817 "PublicDescription": "Branch instructions at retirement.", 1218 "PEBS": "1",
818 "EventCode": "0xC4", 1219 "EventCode": "0xC4",
819 "Counter": "0,1,2,3", 1220 "Counter": "0,1,2,3",
820 "UMask": "0x0", 1221 "UMask": "0x2",
821 "EventName": "BR_INST_RETIRED.ALL_BRANCHES", 1222 "EventName": "BR_INST_RETIRED.NEAR_CALL_R3",
1223 "SampleAfterValue": "100003",
1224 "BriefDescription": "Direct and indirect macro near call instructions retired (captured in ring 3).",
1225 "CounterHTOff": "0,1,2,3,4,5,6,7"
1226 },
1227 {
1228 "PEBS": "2",
1229 "EventCode": "0xC4",
1230 "Counter": "0,1,2,3",
1231 "UMask": "0x4",
1232 "EventName": "BR_INST_RETIRED.ALL_BRANCHES_PEBS",
822 "SampleAfterValue": "400009", 1233 "SampleAfterValue": "400009",
823 "BriefDescription": "All (macro) branch instructions retired.", 1234 "BriefDescription": "All (macro) branch instructions retired.",
824 "CounterHTOff": "0,1,2,3,4,5,6,7" 1235 "CounterHTOff": "0,1,2,3"
825 }, 1236 },
826 { 1237 {
827 "PEBS": "1", 1238 "PEBS": "1",
828 "PublicDescription": "Counts the number of near return instructions retired.",
829 "EventCode": "0xC4", 1239 "EventCode": "0xC4",
830 "Counter": "0,1,2,3", 1240 "Counter": "0,1,2,3",
831 "UMask": "0x8", 1241 "UMask": "0x8",
@@ -846,7 +1256,6 @@
846 }, 1256 },
847 { 1257 {
848 "PEBS": "1", 1258 "PEBS": "1",
849 "PublicDescription": "Number of near taken branches retired.",
850 "EventCode": "0xC4", 1259 "EventCode": "0xC4",
851 "Counter": "0,1,2,3", 1260 "Counter": "0,1,2,3",
852 "UMask": "0x20", 1261 "UMask": "0x20",
@@ -866,14 +1275,14 @@
866 "CounterHTOff": "0,1,2,3,4,5,6,7" 1275 "CounterHTOff": "0,1,2,3,4,5,6,7"
867 }, 1276 },
868 { 1277 {
869 "PEBS": "2", 1278 "PublicDescription": "Mispredicted branch instructions at retirement.",
870 "EventCode": "0xC4", 1279 "EventCode": "0xC5",
871 "Counter": "0,1,2,3", 1280 "Counter": "0,1,2,3",
872 "UMask": "0x4", 1281 "UMask": "0x0",
873 "EventName": "BR_INST_RETIRED.ALL_BRANCHES_PEBS", 1282 "EventName": "BR_MISP_RETIRED.ALL_BRANCHES",
874 "SampleAfterValue": "400009", 1283 "SampleAfterValue": "400009",
875 "BriefDescription": "All (macro) branch instructions retired.", 1284 "BriefDescription": "All mispredicted macro branch instructions retired.",
876 "CounterHTOff": "0,1,2,3" 1285 "CounterHTOff": "0,1,2,3,4,5,6,7"
877 }, 1286 },
878 { 1287 {
879 "PEBS": "1", 1288 "PEBS": "1",
@@ -886,16 +1295,6 @@
886 "CounterHTOff": "0,1,2,3,4,5,6,7" 1295 "CounterHTOff": "0,1,2,3,4,5,6,7"
887 }, 1296 },
888 { 1297 {
889 "PublicDescription": "Mispredicted branch instructions at retirement.",
890 "EventCode": "0xC5",
891 "Counter": "0,1,2,3",
892 "UMask": "0x0",
893 "EventName": "BR_MISP_RETIRED.ALL_BRANCHES",
894 "SampleAfterValue": "400009",
895 "BriefDescription": "All mispredicted macro branch instructions retired.",
896 "CounterHTOff": "0,1,2,3,4,5,6,7"
897 },
898 {
899 "PEBS": "2", 1298 "PEBS": "2",
900 "PublicDescription": "This event counts all mispredicted branch instructions retired. This is a precise event.", 1299 "PublicDescription": "This event counts all mispredicted branch instructions retired. This is a precise event.",
901 "EventCode": "0xC5", 1300 "EventCode": "0xC5",
@@ -903,121 +1302,11 @@
903 "UMask": "0x4", 1302 "UMask": "0x4",
904 "EventName": "BR_MISP_RETIRED.ALL_BRANCHES_PEBS", 1303 "EventName": "BR_MISP_RETIRED.ALL_BRANCHES_PEBS",
905 "SampleAfterValue": "400009", 1304 "SampleAfterValue": "400009",
906 "BriefDescription": "Mispredicted macro branch instructions retired. ", 1305 "BriefDescription": "Mispredicted macro branch instructions retired.",
907 "CounterHTOff": "0,1,2,3" 1306 "CounterHTOff": "0,1,2,3"
908 }, 1307 },
909 { 1308 {
910 "PublicDescription": "Count cases of saving new LBR records by hardware.",
911 "EventCode": "0xCC",
912 "Counter": "0,1,2,3",
913 "UMask": "0x20",
914 "EventName": "ROB_MISC_EVENTS.LBR_INSERTS",
915 "SampleAfterValue": "2000003",
916 "BriefDescription": "Count cases of saving new LBR",
917 "CounterHTOff": "0,1,2,3,4,5,6,7"
918 },
919 {
920 "PublicDescription": "Counts the number of thread cycles while the thread is not in a halt state. The thread enters the halt state when it is running the HLT instruction. The core frequency may change from time to time due to power or thermal throttling.",
921 "EventCode": "0x3C",
922 "Counter": "0,1,2,3",
923 "UMask": "0x0",
924 "EventName": "CPU_CLK_UNHALTED.THREAD_P",
925 "SampleAfterValue": "2000003",
926 "BriefDescription": "Thread cycles when thread is not in halt state",
927 "CounterHTOff": "0,1,2,3,4,5,6,7"
928 },
929 {
930 "EventCode": "0x89",
931 "Counter": "0,1,2,3",
932 "UMask": "0xa0",
933 "EventName": "BR_MISP_EXEC.TAKEN_INDIRECT_NEAR_CALL",
934 "SampleAfterValue": "200003",
935 "BriefDescription": "Taken speculative and retired mispredicted indirect calls.",
936 "CounterHTOff": "0,1,2,3,4,5,6,7"
937 },
938 {
939 "EventCode": "0xA1",
940 "Counter": "0,1,2,3",
941 "UMask": "0x1",
942 "AnyThread": "1",
943 "EventName": "UOPS_EXECUTED_PORT.PORT_0_CORE",
944 "SampleAfterValue": "2000003",
945 "BriefDescription": "Cycles per core when uops are exectuted in port 0.",
946 "CounterHTOff": "0,1,2,3,4,5,6,7"
947 },
948 {
949 "EventCode": "0xA1",
950 "Counter": "0,1,2,3",
951 "UMask": "0x2",
952 "AnyThread": "1",
953 "EventName": "UOPS_EXECUTED_PORT.PORT_1_CORE",
954 "SampleAfterValue": "2000003",
955 "BriefDescription": "Cycles per core when uops are exectuted in port 1.",
956 "CounterHTOff": "0,1,2,3,4,5,6,7"
957 },
958 {
959 "EventCode": "0xA1",
960 "Counter": "0,1,2,3",
961 "UMask": "0x4",
962 "AnyThread": "1",
963 "EventName": "UOPS_EXECUTED_PORT.PORT_2_CORE",
964 "SampleAfterValue": "2000003",
965 "BriefDescription": "Cycles per core when uops are dispatched to port 2.",
966 "CounterHTOff": "0,1,2,3,4,5,6,7"
967 },
968 {
969 "EventCode": "0xA1",
970 "Counter": "0,1,2,3",
971 "UMask": "0x8",
972 "AnyThread": "1",
973 "EventName": "UOPS_EXECUTED_PORT.PORT_3_CORE",
974 "SampleAfterValue": "2000003",
975 "BriefDescription": "Cycles per core when uops are dispatched to port 3.",
976 "CounterHTOff": "0,1,2,3,4,5,6,7"
977 },
978 {
979 "EventCode": "0xA1",
980 "Counter": "0,1,2,3",
981 "UMask": "0x10",
982 "AnyThread": "1",
983 "EventName": "UOPS_EXECUTED_PORT.PORT_4_CORE",
984 "SampleAfterValue": "2000003",
985 "BriefDescription": "Cycles per core when uops are exectuted in port 4.",
986 "CounterHTOff": "0,1,2,3,4,5,6,7"
987 },
988 {
989 "EventCode": "0xA1",
990 "Counter": "0,1,2,3",
991 "UMask": "0x20",
992 "AnyThread": "1",
993 "EventName": "UOPS_EXECUTED_PORT.PORT_5_CORE",
994 "SampleAfterValue": "2000003",
995 "BriefDescription": "Cycles per core when uops are exectuted in port 5.",
996 "CounterHTOff": "0,1,2,3,4,5,6,7"
997 },
998 {
999 "EventCode": "0xA1",
1000 "Counter": "0,1,2,3",
1001 "UMask": "0x40",
1002 "AnyThread": "1",
1003 "EventName": "UOPS_EXECUTED_PORT.PORT_6_CORE",
1004 "SampleAfterValue": "2000003",
1005 "BriefDescription": "Cycles per core when uops are exectuted in port 6.",
1006 "CounterHTOff": "0,1,2,3,4,5,6,7"
1007 },
1008 {
1009 "EventCode": "0xA1",
1010 "Counter": "0,1,2,3",
1011 "UMask": "0x80",
1012 "AnyThread": "1",
1013 "EventName": "UOPS_EXECUTED_PORT.PORT_7_CORE",
1014 "SampleAfterValue": "2000003",
1015 "BriefDescription": "Cycles per core when uops are dispatched to port 7.",
1016 "CounterHTOff": "0,1,2,3,4,5,6,7"
1017 },
1018 {
1019 "PEBS": "1", 1309 "PEBS": "1",
1020 "PublicDescription": "Number of near branch instructions retired that were taken but mispredicted.",
1021 "EventCode": "0xC5", 1310 "EventCode": "0xC5",
1022 "Counter": "0,1,2,3", 1311 "Counter": "0,1,2,3",
1023 "UMask": "0x20", 1312 "UMask": "0x20",
@@ -1027,51 +1316,14 @@
1027 "CounterHTOff": "0,1,2,3,4,5,6,7" 1316 "CounterHTOff": "0,1,2,3,4,5,6,7"
1028 }, 1317 },
1029 { 1318 {
1030 "PublicDescription": "This events counts the cycles where at least one uop was executed. It is counted per thread.", 1319 "PublicDescription": "Count cases of saving new LBR records by hardware.",
1031 "EventCode": "0xB1", 1320 "EventCode": "0xCC",
1032 "Counter": "0,1,2,3",
1033 "UMask": "0x1",
1034 "Errata": "HSD144, HSD30, HSM31",
1035 "EventName": "UOPS_EXECUTED.CYCLES_GE_1_UOP_EXEC",
1036 "SampleAfterValue": "2000003",
1037 "BriefDescription": "Cycles where at least 1 uop was executed per-thread",
1038 "CounterMask": "1",
1039 "CounterHTOff": "0,1,2,3"
1040 },
1041 {
1042 "PublicDescription": "This events counts the cycles where at least two uop were executed. It is counted per thread.",
1043 "EventCode": "0xB1",
1044 "Counter": "0,1,2,3",
1045 "UMask": "0x1",
1046 "Errata": "HSD144, HSD30, HSM31",
1047 "EventName": "UOPS_EXECUTED.CYCLES_GE_2_UOPS_EXEC",
1048 "SampleAfterValue": "2000003",
1049 "BriefDescription": "Cycles where at least 2 uops were executed per-thread",
1050 "CounterMask": "2",
1051 "CounterHTOff": "0,1,2,3"
1052 },
1053 {
1054 "PublicDescription": "This events counts the cycles where at least three uop were executed. It is counted per thread.",
1055 "EventCode": "0xB1",
1056 "Counter": "0,1,2,3",
1057 "UMask": "0x1",
1058 "Errata": "HSD144, HSD30, HSM31",
1059 "EventName": "UOPS_EXECUTED.CYCLES_GE_3_UOPS_EXEC",
1060 "SampleAfterValue": "2000003",
1061 "BriefDescription": "Cycles where at least 3 uops were executed per-thread",
1062 "CounterMask": "3",
1063 "CounterHTOff": "0,1,2,3"
1064 },
1065 {
1066 "EventCode": "0xB1",
1067 "Counter": "0,1,2,3", 1321 "Counter": "0,1,2,3",
1068 "UMask": "0x1", 1322 "UMask": "0x20",
1069 "Errata": "HSD144, HSD30, HSM31", 1323 "EventName": "ROB_MISC_EVENTS.LBR_INSERTS",
1070 "EventName": "UOPS_EXECUTED.CYCLES_GE_4_UOPS_EXEC",
1071 "SampleAfterValue": "2000003", 1324 "SampleAfterValue": "2000003",
1072 "BriefDescription": "Cycles where at least 4 uops were executed per-thread.", 1325 "BriefDescription": "Count cases of saving new LBR",
1073 "CounterMask": "4", 1326 "CounterHTOff": "0,1,2,3,4,5,6,7"
1074 "CounterHTOff": "0,1,2,3"
1075 }, 1327 },
1076 { 1328 {
1077 "PublicDescription": "Number of front end re-steers due to BPU misprediction.", 1329 "PublicDescription": "Number of front end re-steers due to BPU misprediction.",
@@ -1082,248 +1334,5 @@
1082 "SampleAfterValue": "100003", 1334 "SampleAfterValue": "100003",
1083 "BriefDescription": "Counts the total number when the front end is resteered, mainly when the BPU cannot provide a correct prediction and this is corrected by other branch handling mechanisms at the front end.", 1335 "BriefDescription": "Counts the total number when the front end is resteered, mainly when the BPU cannot provide a correct prediction and this is corrected by other branch handling mechanisms at the front end.",
1084 "CounterHTOff": "0,1,2,3,4,5,6,7" 1336 "CounterHTOff": "0,1,2,3,4,5,6,7"
1085 },
1086 {
1087 "EventCode": "0xC3",
1088 "Counter": "0,1,2,3",
1089 "UMask": "0x1",
1090 "EdgeDetect": "1",
1091 "EventName": "MACHINE_CLEARS.COUNT",
1092 "SampleAfterValue": "100003",
1093 "BriefDescription": "Number of machine clears (nukes) of any type.",
1094 "CounterMask": "1",
1095 "CounterHTOff": "0,1,2,3,4,5,6,7"
1096 },
1097 {
1098 "EventCode": "0xA8",
1099 "Counter": "0,1,2,3",
1100 "UMask": "0x1",
1101 "EventName": "LSD.CYCLES_ACTIVE",
1102 "SampleAfterValue": "2000003",
1103 "BriefDescription": "Cycles Uops delivered by the LSD, but didn't come from the decoder.",
1104 "CounterMask": "1",
1105 "CounterHTOff": "0,1,2,3,4,5,6,7"
1106 },
1107 {
1108 "EventCode": "0xA8",
1109 "Counter": "0,1,2,3",
1110 "UMask": "0x1",
1111 "EventName": "LSD.CYCLES_4_UOPS",
1112 "SampleAfterValue": "2000003",
1113 "BriefDescription": "Cycles 4 Uops delivered by the LSD, but didn't come from the decoder.",
1114 "CounterMask": "4",
1115 "CounterHTOff": "0,1,2,3,4,5,6,7"
1116 },
1117 {
1118 "EventCode": "0x5E",
1119 "Invert": "1",
1120 "Counter": "0,1,2,3",
1121 "UMask": "0x1",
1122 "EdgeDetect": "1",
1123 "EventName": "RS_EVENTS.EMPTY_END",
1124 "SampleAfterValue": "200003",
1125 "BriefDescription": "Counts end of periods where the Reservation Station (RS) was empty. Could be useful to precisely locate Frontend Latency Bound issues.",
1126 "CounterMask": "1",
1127 "CounterHTOff": "0,1,2,3,4,5,6,7"
1128 },
1129 {
1130 "EventCode": "0xA1",
1131 "Counter": "0,1,2,3",
1132 "UMask": "0x1",
1133 "EventName": "UOPS_DISPATCHED_PORT.PORT_0",
1134 "SampleAfterValue": "2000003",
1135 "BriefDescription": "Cycles per thread when uops are executed in port 0.",
1136 "CounterHTOff": "0,1,2,3,4,5,6,7"
1137 },
1138 {
1139 "EventCode": "0xA1",
1140 "Counter": "0,1,2,3",
1141 "UMask": "0x2",
1142 "EventName": "UOPS_DISPATCHED_PORT.PORT_1",
1143 "SampleAfterValue": "2000003",
1144 "BriefDescription": "Cycles per thread when uops are executed in port 1.",
1145 "CounterHTOff": "0,1,2,3,4,5,6,7"
1146 },
1147 {
1148 "EventCode": "0xA1",
1149 "Counter": "0,1,2,3",
1150 "UMask": "0x4",
1151 "EventName": "UOPS_DISPATCHED_PORT.PORT_2",
1152 "SampleAfterValue": "2000003",
1153 "BriefDescription": "Cycles per thread when uops are executed in port 2.",
1154 "CounterHTOff": "0,1,2,3,4,5,6,7"
1155 },
1156 {
1157 "EventCode": "0xA1",
1158 "Counter": "0,1,2,3",
1159 "UMask": "0x8",
1160 "EventName": "UOPS_DISPATCHED_PORT.PORT_3",
1161 "SampleAfterValue": "2000003",
1162 "BriefDescription": "Cycles per thread when uops are executed in port 3.",
1163 "CounterHTOff": "0,1,2,3,4,5,6,7"
1164 },
1165 {
1166 "EventCode": "0xA1",
1167 "Counter": "0,1,2,3",
1168 "UMask": "0x10",
1169 "EventName": "UOPS_DISPATCHED_PORT.PORT_4",
1170 "SampleAfterValue": "2000003",
1171 "BriefDescription": "Cycles per thread when uops are executed in port 4.",
1172 "CounterHTOff": "0,1,2,3,4,5,6,7"
1173 },
1174 {
1175 "EventCode": "0xA1",
1176 "Counter": "0,1,2,3",
1177 "UMask": "0x20",
1178 "EventName": "UOPS_DISPATCHED_PORT.PORT_5",
1179 "SampleAfterValue": "2000003",
1180 "BriefDescription": "Cycles per thread when uops are executed in port 5.",
1181 "CounterHTOff": "0,1,2,3,4,5,6,7"
1182 },
1183 {
1184 "EventCode": "0xA1",
1185 "Counter": "0,1,2,3",
1186 "UMask": "0x40",
1187 "EventName": "UOPS_DISPATCHED_PORT.PORT_6",
1188 "SampleAfterValue": "2000003",
1189 "BriefDescription": "Cycles per thread when uops are executed in port 6.",
1190 "CounterHTOff": "0,1,2,3,4,5,6,7"
1191 },
1192 {
1193 "EventCode": "0xA1",
1194 "Counter": "0,1,2,3",
1195 "UMask": "0x80",
1196 "EventName": "UOPS_DISPATCHED_PORT.PORT_7",
1197 "SampleAfterValue": "2000003",
1198 "BriefDescription": "Cycles per thread when uops are executed in port 7.",
1199 "CounterHTOff": "0,1,2,3,4,5,6,7"
1200 },
1201 {
1202 "EventCode": "0x00",
1203 "Counter": "Fixed counter 2",
1204 "UMask": "0x2",
1205 "AnyThread": "1",
1206 "EventName": "CPU_CLK_UNHALTED.THREAD_ANY",
1207 "SampleAfterValue": "2000003",
1208 "BriefDescription": "Core cycles when at least one thread on the physical core is not in halt state.",
1209 "CounterHTOff": "Fixed counter 2"
1210 },
1211 {
1212 "EventCode": "0x3C",
1213 "Counter": "0,1,2,3",
1214 "UMask": "0x0",
1215 "AnyThread": "1",
1216 "EventName": "CPU_CLK_UNHALTED.THREAD_P_ANY",
1217 "SampleAfterValue": "2000003",
1218 "BriefDescription": "Core cycles when at least one thread on the physical core is not in halt state.",
1219 "CounterHTOff": "0,1,2,3,4,5,6,7"
1220 },
1221 {
1222 "PublicDescription": "Reference cycles when the at least one thread on the physical core is unhalted (counts at 100 MHz rate).",
1223 "EventCode": "0x3C",
1224 "Counter": "0,1,2,3",
1225 "UMask": "0x1",
1226 "AnyThread": "1",
1227 "EventName": "CPU_CLK_THREAD_UNHALTED.REF_XCLK_ANY",
1228 "SampleAfterValue": "2000003",
1229 "BriefDescription": "Reference cycles when the at least one thread on the physical core is unhalted (counts at 100 MHz rate)",
1230 "CounterHTOff": "0,1,2,3,4,5,6,7"
1231 },
1232 {
1233 "PublicDescription": "Core cycles the allocator was stalled due to recovery from earlier clear event for any thread running on the physical core (e.g. misprediction or memory nuke).",
1234 "EventCode": "0x0D",
1235 "Counter": "0,1,2,3",
1236 "UMask": "0x3",
1237 "AnyThread": "1",
1238 "EventName": "INT_MISC.RECOVERY_CYCLES_ANY",
1239 "SampleAfterValue": "2000003",
1240 "BriefDescription": "Core cycles the allocator was stalled due to recovery from earlier clear event for any thread running on the physical core (e.g. misprediction or memory nuke)",
1241 "CounterMask": "1",
1242 "CounterHTOff": "0,1,2,3,4,5,6,7"
1243 },
1244 {
1245 "EventCode": "0xb1",
1246 "Counter": "0,1,2,3",
1247 "UMask": "0x2",
1248 "Errata": "HSD30, HSM31",
1249 "EventName": "UOPS_EXECUTED.CORE_CYCLES_GE_1",
1250 "SampleAfterValue": "2000003",
1251 "BriefDescription": "Cycles at least 1 micro-op is executed from any thread on physical core.",
1252 "CounterMask": "1",
1253 "CounterHTOff": "0,1,2,3,4,5,6,7"
1254 },
1255 {
1256 "EventCode": "0xb1",
1257 "Counter": "0,1,2,3",
1258 "UMask": "0x2",
1259 "Errata": "HSD30, HSM31",
1260 "EventName": "UOPS_EXECUTED.CORE_CYCLES_GE_2",
1261 "SampleAfterValue": "2000003",
1262 "BriefDescription": "Cycles at least 2 micro-op is executed from any thread on physical core.",
1263 "CounterMask": "2",
1264 "CounterHTOff": "0,1,2,3,4,5,6,7"
1265 },
1266 {
1267 "EventCode": "0xb1",
1268 "Counter": "0,1,2,3",
1269 "UMask": "0x2",
1270 "Errata": "HSD30, HSM31",
1271 "EventName": "UOPS_EXECUTED.CORE_CYCLES_GE_3",
1272 "SampleAfterValue": "2000003",
1273 "BriefDescription": "Cycles at least 3 micro-op is executed from any thread on physical core.",
1274 "CounterMask": "3",
1275 "CounterHTOff": "0,1,2,3,4,5,6,7"
1276 },
1277 {
1278 "EventCode": "0xb1",
1279 "Counter": "0,1,2,3",
1280 "UMask": "0x2",
1281 "Errata": "HSD30, HSM31",
1282 "EventName": "UOPS_EXECUTED.CORE_CYCLES_GE_4",
1283 "SampleAfterValue": "2000003",
1284 "BriefDescription": "Cycles at least 4 micro-op is executed from any thread on physical core.",
1285 "CounterMask": "4",
1286 "CounterHTOff": "0,1,2,3,4,5,6,7"
1287 },
1288 {
1289 "EventCode": "0xb1",
1290 "Invert": "1",
1291 "Counter": "0,1,2,3",
1292 "UMask": "0x2",
1293 "Errata": "HSD30, HSM31",
1294 "EventName": "UOPS_EXECUTED.CORE_CYCLES_NONE",
1295 "SampleAfterValue": "2000003",
1296 "BriefDescription": "Cycles with no micro-ops executed from any thread on physical core.",
1297 "CounterHTOff": "0,1,2,3,4,5,6,7"
1298 },
1299 {
1300 "PublicDescription": "Reference cycles when the thread is unhalted. (counts at 100 MHz rate)",
1301 "EventCode": "0x3C",
1302 "Counter": "0,1,2,3",
1303 "UMask": "0x1",
1304 "EventName": "CPU_CLK_UNHALTED.REF_XCLK",
1305 "SampleAfterValue": "2000003",
1306 "BriefDescription": "Reference cycles when the thread is unhalted (counts at 100 MHz rate)",
1307 "CounterHTOff": "0,1,2,3,4,5,6,7"
1308 },
1309 {
1310 "PublicDescription": "Reference cycles when the at least one thread on the physical core is unhalted (counts at 100 MHz rate).",
1311 "EventCode": "0x3C",
1312 "Counter": "0,1,2,3",
1313 "UMask": "0x1",
1314 "AnyThread": "1",
1315 "EventName": "CPU_CLK_UNHALTED.REF_XCLK_ANY",
1316 "SampleAfterValue": "2000003",
1317 "BriefDescription": "Reference cycles when the at least one thread on the physical core is unhalted (counts at 100 MHz rate)",
1318 "CounterHTOff": "0,1,2,3,4,5,6,7"
1319 },
1320 {
1321 "EventCode": "0x3C",
1322 "Counter": "0,1,2,3",
1323 "UMask": "0x2",
1324 "EventName": "CPU_CLK_UNHALTED.ONE_THREAD_ACTIVE",
1325 "SampleAfterValue": "2000003",
1326 "BriefDescription": "Count XClk pulses when this thread is unhalted and the other thread is halted.",
1327 "CounterHTOff": "0,1,2,3,4,5,6,7"
1328 } 1337 }
1329] \ No newline at end of file 1338] \ No newline at end of file
diff --git a/tools/perf/pmu-events/arch/x86/haswell/virtual-memory.json b/tools/perf/pmu-events/arch/x86/haswell/virtual-memory.json
index ce80a08d0f08..777b500a5c9f 100644
--- a/tools/perf/pmu-events/arch/x86/haswell/virtual-memory.json
+++ b/tools/perf/pmu-events/arch/x86/haswell/virtual-memory.json
@@ -39,6 +39,16 @@
39 "CounterHTOff": "0,1,2,3,4,5,6,7" 39 "CounterHTOff": "0,1,2,3,4,5,6,7"
40 }, 40 },
41 { 41 {
42 "PublicDescription": "Completed page walks in any TLB of any page size due to demand load misses.",
43 "EventCode": "0x08",
44 "Counter": "0,1,2,3",
45 "UMask": "0xe",
46 "EventName": "DTLB_LOAD_MISSES.WALK_COMPLETED",
47 "SampleAfterValue": "100003",
48 "BriefDescription": "Demand load Miss in all translation lookaside buffer (TLB) levels causes a page walk that completes of any page size.",
49 "CounterHTOff": "0,1,2,3,4,5,6,7"
50 },
51 {
42 "PublicDescription": "This event counts cycles when the page miss handler (PMH) is servicing page walks caused by DTLB load misses.", 52 "PublicDescription": "This event counts cycles when the page miss handler (PMH) is servicing page walks caused by DTLB load misses.",
43 "EventCode": "0x08", 53 "EventCode": "0x08",
44 "Counter": "0,1,2,3", 54 "Counter": "0,1,2,3",
@@ -69,6 +79,16 @@
69 "CounterHTOff": "0,1,2,3,4,5,6,7" 79 "CounterHTOff": "0,1,2,3,4,5,6,7"
70 }, 80 },
71 { 81 {
82 "PublicDescription": "Number of cache load STLB hits. No page walk.",
83 "EventCode": "0x08",
84 "Counter": "0,1,2,3",
85 "UMask": "0x60",
86 "EventName": "DTLB_LOAD_MISSES.STLB_HIT",
87 "SampleAfterValue": "2000003",
88 "BriefDescription": "Load operations that miss the first DTLB level but hit the second and do not cause page walks",
89 "CounterHTOff": "0,1,2,3,4,5,6,7"
90 },
91 {
72 "PublicDescription": "DTLB demand load misses with low part of linear-to-physical address translation missed.", 92 "PublicDescription": "DTLB demand load misses with low part of linear-to-physical address translation missed.",
73 "EventCode": "0x08", 93 "EventCode": "0x08",
74 "Counter": "0,1,2,3", 94 "Counter": "0,1,2,3",
@@ -118,6 +138,16 @@
118 "CounterHTOff": "0,1,2,3,4,5,6,7" 138 "CounterHTOff": "0,1,2,3,4,5,6,7"
119 }, 139 },
120 { 140 {
141 "PublicDescription": "Completed page walks due to store miss in any TLB levels of any page size (4K/2M/4M/1G).",
142 "EventCode": "0x49",
143 "Counter": "0,1,2,3",
144 "UMask": "0xe",
145 "EventName": "DTLB_STORE_MISSES.WALK_COMPLETED",
146 "SampleAfterValue": "100003",
147 "BriefDescription": "Store misses in all DTLB levels that cause completed page walks",
148 "CounterHTOff": "0,1,2,3,4,5,6,7"
149 },
150 {
121 "PublicDescription": "This event counts cycles when the page miss handler (PMH) is servicing page walks caused by DTLB store misses.", 151 "PublicDescription": "This event counts cycles when the page miss handler (PMH) is servicing page walks caused by DTLB store misses.",
122 "EventCode": "0x49", 152 "EventCode": "0x49",
123 "Counter": "0,1,2,3", 153 "Counter": "0,1,2,3",
@@ -148,6 +178,16 @@
148 "CounterHTOff": "0,1,2,3,4,5,6,7" 178 "CounterHTOff": "0,1,2,3,4,5,6,7"
149 }, 179 },
150 { 180 {
181 "PublicDescription": "Store operations that miss the first TLB level but hit the second and do not cause page walks.",
182 "EventCode": "0x49",
183 "Counter": "0,1,2,3",
184 "UMask": "0x60",
185 "EventName": "DTLB_STORE_MISSES.STLB_HIT",
186 "SampleAfterValue": "100003",
187 "BriefDescription": "Store operations that miss the first TLB level but hit the second and do not cause page walks",
188 "CounterHTOff": "0,1,2,3,4,5,6,7"
189 },
190 {
151 "PublicDescription": "DTLB store misses with low part of linear-to-physical address translation missed.", 191 "PublicDescription": "DTLB store misses with low part of linear-to-physical address translation missed.",
152 "EventCode": "0x49", 192 "EventCode": "0x49",
153 "Counter": "0,1,2,3", 193 "Counter": "0,1,2,3",
@@ -206,6 +246,16 @@
206 "CounterHTOff": "0,1,2,3,4,5,6,7" 246 "CounterHTOff": "0,1,2,3,4,5,6,7"
207 }, 247 },
208 { 248 {
249 "PublicDescription": "Completed page walks in ITLB of any page size.",
250 "EventCode": "0x85",
251 "Counter": "0,1,2,3",
252 "UMask": "0xe",
253 "EventName": "ITLB_MISSES.WALK_COMPLETED",
254 "SampleAfterValue": "100003",
255 "BriefDescription": "Misses in all ITLB levels that cause completed page walks",
256 "CounterHTOff": "0,1,2,3,4,5,6,7"
257 },
258 {
209 "PublicDescription": "This event counts cycles when the page miss handler (PMH) is servicing page walks caused by ITLB misses.", 259 "PublicDescription": "This event counts cycles when the page miss handler (PMH) is servicing page walks caused by ITLB misses.",
210 "EventCode": "0x85", 260 "EventCode": "0x85",
211 "Counter": "0,1,2,3", 261 "Counter": "0,1,2,3",
@@ -236,6 +286,16 @@
236 "CounterHTOff": "0,1,2,3,4,5,6,7" 286 "CounterHTOff": "0,1,2,3,4,5,6,7"
237 }, 287 },
238 { 288 {
289 "PublicDescription": "ITLB misses that hit STLB. No page walk.",
290 "EventCode": "0x85",
291 "Counter": "0,1,2,3",
292 "UMask": "0x60",
293 "EventName": "ITLB_MISSES.STLB_HIT",
294 "SampleAfterValue": "100003",
295 "BriefDescription": "Operations that miss the first ITLB level but hit the second and do not cause any page walks",
296 "CounterHTOff": "0,1,2,3,4,5,6,7"
297 },
298 {
239 "PublicDescription": "Counts the number of ITLB flushes, includes 4k/2M/4M pages.", 299 "PublicDescription": "Counts the number of ITLB flushes, includes 4k/2M/4M pages.",
240 "EventCode": "0xae", 300 "EventCode": "0xae",
241 "Counter": "0,1,2,3", 301 "Counter": "0,1,2,3",
@@ -256,41 +316,45 @@
256 "CounterHTOff": "0,1,2,3" 316 "CounterHTOff": "0,1,2,3"
257 }, 317 },
258 { 318 {
259 "PublicDescription": "Number of ITLB page walker loads that hit in the L1+FB.", 319 "PublicDescription": "Number of DTLB page walker loads that hit in the L2.",
260 "EventCode": "0xBC", 320 "EventCode": "0xBC",
261 "Counter": "0,1,2,3", 321 "Counter": "0,1,2,3",
262 "UMask": "0x21", 322 "UMask": "0x12",
263 "EventName": "PAGE_WALKER_LOADS.ITLB_L1", 323 "EventName": "PAGE_WALKER_LOADS.DTLB_L2",
264 "SampleAfterValue": "2000003", 324 "SampleAfterValue": "2000003",
265 "BriefDescription": "Number of ITLB page walker hits in the L1+FB", 325 "BriefDescription": "Number of DTLB page walker hits in the L2",
266 "CounterHTOff": "0,1,2,3" 326 "CounterHTOff": "0,1,2,3"
267 }, 327 },
268 { 328 {
329 "PublicDescription": "Number of DTLB page walker loads that hit in the L3.",
269 "EventCode": "0xBC", 330 "EventCode": "0xBC",
270 "Counter": "0,1,2,3", 331 "Counter": "0,1,2,3",
271 "UMask": "0x41", 332 "UMask": "0x14",
272 "EventName": "PAGE_WALKER_LOADS.EPT_DTLB_L1", 333 "Errata": "HSD25",
334 "EventName": "PAGE_WALKER_LOADS.DTLB_L3",
273 "SampleAfterValue": "2000003", 335 "SampleAfterValue": "2000003",
274 "BriefDescription": "Counts the number of Extended Page Table walks from the DTLB that hit in the L1 and FB.", 336 "BriefDescription": "Number of DTLB page walker hits in the L3 + XSNP",
275 "CounterHTOff": "0,1,2,3" 337 "CounterHTOff": "0,1,2,3"
276 }, 338 },
277 { 339 {
340 "PublicDescription": "Number of DTLB page walker loads from memory.",
278 "EventCode": "0xBC", 341 "EventCode": "0xBC",
279 "Counter": "0,1,2,3", 342 "Counter": "0,1,2,3",
280 "UMask": "0x81", 343 "UMask": "0x18",
281 "EventName": "PAGE_WALKER_LOADS.EPT_ITLB_L1", 344 "Errata": "HSD25",
345 "EventName": "PAGE_WALKER_LOADS.DTLB_MEMORY",
282 "SampleAfterValue": "2000003", 346 "SampleAfterValue": "2000003",
283 "BriefDescription": "Counts the number of Extended Page Table walks from the ITLB that hit in the L1 and FB.", 347 "BriefDescription": "Number of DTLB page walker hits in Memory",
284 "CounterHTOff": "0,1,2,3" 348 "CounterHTOff": "0,1,2,3"
285 }, 349 },
286 { 350 {
287 "PublicDescription": "Number of DTLB page walker loads that hit in the L2.", 351 "PublicDescription": "Number of ITLB page walker loads that hit in the L1+FB.",
288 "EventCode": "0xBC", 352 "EventCode": "0xBC",
289 "Counter": "0,1,2,3", 353 "Counter": "0,1,2,3",
290 "UMask": "0x12", 354 "UMask": "0x21",
291 "EventName": "PAGE_WALKER_LOADS.DTLB_L2", 355 "EventName": "PAGE_WALKER_LOADS.ITLB_L1",
292 "SampleAfterValue": "2000003", 356 "SampleAfterValue": "2000003",
293 "BriefDescription": "Number of DTLB page walker hits in the L2", 357 "BriefDescription": "Number of ITLB page walker hits in the L1+FB",
294 "CounterHTOff": "0,1,2,3" 358 "CounterHTOff": "0,1,2,3"
295 }, 359 },
296 { 360 {
@@ -304,43 +368,43 @@
304 "CounterHTOff": "0,1,2,3" 368 "CounterHTOff": "0,1,2,3"
305 }, 369 },
306 { 370 {
371 "PublicDescription": "Number of ITLB page walker loads that hit in the L3.",
307 "EventCode": "0xBC", 372 "EventCode": "0xBC",
308 "Counter": "0,1,2,3", 373 "Counter": "0,1,2,3",
309 "UMask": "0x42", 374 "UMask": "0x24",
310 "EventName": "PAGE_WALKER_LOADS.EPT_DTLB_L2", 375 "Errata": "HSD25",
376 "EventName": "PAGE_WALKER_LOADS.ITLB_L3",
311 "SampleAfterValue": "2000003", 377 "SampleAfterValue": "2000003",
312 "BriefDescription": "Counts the number of Extended Page Table walks from the DTLB that hit in the L2.", 378 "BriefDescription": "Number of ITLB page walker hits in the L3 + XSNP",
313 "CounterHTOff": "0,1,2,3" 379 "CounterHTOff": "0,1,2,3"
314 }, 380 },
315 { 381 {
382 "PublicDescription": "Number of ITLB page walker loads from memory.",
316 "EventCode": "0xBC", 383 "EventCode": "0xBC",
317 "Counter": "0,1,2,3", 384 "Counter": "0,1,2,3",
318 "UMask": "0x82", 385 "UMask": "0x28",
319 "EventName": "PAGE_WALKER_LOADS.EPT_ITLB_L2", 386 "Errata": "HSD25",
387 "EventName": "PAGE_WALKER_LOADS.ITLB_MEMORY",
320 "SampleAfterValue": "2000003", 388 "SampleAfterValue": "2000003",
321 "BriefDescription": "Counts the number of Extended Page Table walks from the ITLB that hit in the L2.", 389 "BriefDescription": "Number of ITLB page walker hits in Memory",
322 "CounterHTOff": "0,1,2,3" 390 "CounterHTOff": "0,1,2,3"
323 }, 391 },
324 { 392 {
325 "PublicDescription": "Number of DTLB page walker loads that hit in the L3.",
326 "EventCode": "0xBC", 393 "EventCode": "0xBC",
327 "Counter": "0,1,2,3", 394 "Counter": "0,1,2,3",
328 "UMask": "0x14", 395 "UMask": "0x41",
329 "Errata": "HSD25", 396 "EventName": "PAGE_WALKER_LOADS.EPT_DTLB_L1",
330 "EventName": "PAGE_WALKER_LOADS.DTLB_L3",
331 "SampleAfterValue": "2000003", 397 "SampleAfterValue": "2000003",
332 "BriefDescription": "Number of DTLB page walker hits in the L3 + XSNP", 398 "BriefDescription": "Counts the number of Extended Page Table walks from the DTLB that hit in the L1 and FB.",
333 "CounterHTOff": "0,1,2,3" 399 "CounterHTOff": "0,1,2,3"
334 }, 400 },
335 { 401 {
336 "PublicDescription": "Number of ITLB page walker loads that hit in the L3.",
337 "EventCode": "0xBC", 402 "EventCode": "0xBC",
338 "Counter": "0,1,2,3", 403 "Counter": "0,1,2,3",
339 "UMask": "0x24", 404 "UMask": "0x42",
340 "Errata": "HSD25", 405 "EventName": "PAGE_WALKER_LOADS.EPT_DTLB_L2",
341 "EventName": "PAGE_WALKER_LOADS.ITLB_L3",
342 "SampleAfterValue": "2000003", 406 "SampleAfterValue": "2000003",
343 "BriefDescription": "Number of ITLB page walker hits in the L3 + XSNP", 407 "BriefDescription": "Counts the number of Extended Page Table walks from the DTLB that hit in the L2.",
344 "CounterHTOff": "0,1,2,3" 408 "CounterHTOff": "0,1,2,3"
345 }, 409 },
346 { 410 {
@@ -355,41 +419,37 @@
355 { 419 {
356 "EventCode": "0xBC", 420 "EventCode": "0xBC",
357 "Counter": "0,1,2,3", 421 "Counter": "0,1,2,3",
358 "UMask": "0x84", 422 "UMask": "0x48",
359 "EventName": "PAGE_WALKER_LOADS.EPT_ITLB_L3", 423 "EventName": "PAGE_WALKER_LOADS.EPT_DTLB_MEMORY",
360 "SampleAfterValue": "2000003", 424 "SampleAfterValue": "2000003",
361 "BriefDescription": "Counts the number of Extended Page Table walks from the ITLB that hit in the L2.", 425 "BriefDescription": "Counts the number of Extended Page Table walks from the DTLB that hit in memory.",
362 "CounterHTOff": "0,1,2,3" 426 "CounterHTOff": "0,1,2,3"
363 }, 427 },
364 { 428 {
365 "PublicDescription": "Number of DTLB page walker loads from memory.",
366 "EventCode": "0xBC", 429 "EventCode": "0xBC",
367 "Counter": "0,1,2,3", 430 "Counter": "0,1,2,3",
368 "UMask": "0x18", 431 "UMask": "0x81",
369 "Errata": "HSD25", 432 "EventName": "PAGE_WALKER_LOADS.EPT_ITLB_L1",
370 "EventName": "PAGE_WALKER_LOADS.DTLB_MEMORY",
371 "SampleAfterValue": "2000003", 433 "SampleAfterValue": "2000003",
372 "BriefDescription": "Number of DTLB page walker hits in Memory", 434 "BriefDescription": "Counts the number of Extended Page Table walks from the ITLB that hit in the L1 and FB.",
373 "CounterHTOff": "0,1,2,3" 435 "CounterHTOff": "0,1,2,3"
374 }, 436 },
375 { 437 {
376 "PublicDescription": "Number of ITLB page walker loads from memory.",
377 "EventCode": "0xBC", 438 "EventCode": "0xBC",
378 "Counter": "0,1,2,3", 439 "Counter": "0,1,2,3",
379 "UMask": "0x28", 440 "UMask": "0x82",
380 "Errata": "HSD25", 441 "EventName": "PAGE_WALKER_LOADS.EPT_ITLB_L2",
381 "EventName": "PAGE_WALKER_LOADS.ITLB_MEMORY",
382 "SampleAfterValue": "2000003", 442 "SampleAfterValue": "2000003",
383 "BriefDescription": "Number of ITLB page walker hits in Memory", 443 "BriefDescription": "Counts the number of Extended Page Table walks from the ITLB that hit in the L2.",
384 "CounterHTOff": "0,1,2,3" 444 "CounterHTOff": "0,1,2,3"
385 }, 445 },
386 { 446 {
387 "EventCode": "0xBC", 447 "EventCode": "0xBC",
388 "Counter": "0,1,2,3", 448 "Counter": "0,1,2,3",
389 "UMask": "0x48", 449 "UMask": "0x84",
390 "EventName": "PAGE_WALKER_LOADS.EPT_DTLB_MEMORY", 450 "EventName": "PAGE_WALKER_LOADS.EPT_ITLB_L3",
391 "SampleAfterValue": "2000003", 451 "SampleAfterValue": "2000003",
392 "BriefDescription": "Counts the number of Extended Page Table walks from the DTLB that hit in memory.", 452 "BriefDescription": "Counts the number of Extended Page Table walks from the ITLB that hit in the L2.",
393 "CounterHTOff": "0,1,2,3" 453 "CounterHTOff": "0,1,2,3"
394 }, 454 },
395 { 455 {
@@ -420,65 +480,5 @@
420 "SampleAfterValue": "100003", 480 "SampleAfterValue": "100003",
421 "BriefDescription": "STLB flush attempts", 481 "BriefDescription": "STLB flush attempts",
422 "CounterHTOff": "0,1,2,3,4,5,6,7" 482 "CounterHTOff": "0,1,2,3,4,5,6,7"
423 },
424 {
425 "PublicDescription": "Completed page walks in any TLB of any page size due to demand load misses.",
426 "EventCode": "0x08",
427 "Counter": "0,1,2,3",
428 "UMask": "0xe",
429 "EventName": "DTLB_LOAD_MISSES.WALK_COMPLETED",
430 "SampleAfterValue": "100003",
431 "BriefDescription": "Demand load Miss in all translation lookaside buffer (TLB) levels causes a page walk that completes of any page size.",
432 "CounterHTOff": "0,1,2,3,4,5,6,7"
433 },
434 {
435 "PublicDescription": "Number of cache load STLB hits. No page walk.",
436 "EventCode": "0x08",
437 "Counter": "0,1,2,3",
438 "UMask": "0x60",
439 "EventName": "DTLB_LOAD_MISSES.STLB_HIT",
440 "SampleAfterValue": "2000003",
441 "BriefDescription": "Load operations that miss the first DTLB level but hit the second and do not cause page walks",
442 "CounterHTOff": "0,1,2,3,4,5,6,7"
443 },
444 {
445 "PublicDescription": "Completed page walks due to store miss in any TLB levels of any page size (4K/2M/4M/1G).",
446 "EventCode": "0x49",
447 "Counter": "0,1,2,3",
448 "UMask": "0xe",
449 "EventName": "DTLB_STORE_MISSES.WALK_COMPLETED",
450 "SampleAfterValue": "100003",
451 "BriefDescription": "Store misses in all DTLB levels that cause completed page walks",
452 "CounterHTOff": "0,1,2,3,4,5,6,7"
453 },
454 {
455 "PublicDescription": "Store operations that miss the first TLB level but hit the second and do not cause page walks.",
456 "EventCode": "0x49",
457 "Counter": "0,1,2,3",
458 "UMask": "0x60",
459 "EventName": "DTLB_STORE_MISSES.STLB_HIT",
460 "SampleAfterValue": "100003",
461 "BriefDescription": "Store operations that miss the first TLB level but hit the second and do not cause page walks",
462 "CounterHTOff": "0,1,2,3,4,5,6,7"
463 },
464 {
465 "PublicDescription": "Completed page walks in ITLB of any page size.",
466 "EventCode": "0x85",
467 "Counter": "0,1,2,3",
468 "UMask": "0xe",
469 "EventName": "ITLB_MISSES.WALK_COMPLETED",
470 "SampleAfterValue": "100003",
471 "BriefDescription": "Misses in all ITLB levels that cause completed page walks",
472 "CounterHTOff": "0,1,2,3,4,5,6,7"
473 },
474 {
475 "PublicDescription": "ITLB misses that hit STLB. No page walk.",
476 "EventCode": "0x85",
477 "Counter": "0,1,2,3",
478 "UMask": "0x60",
479 "EventName": "ITLB_MISSES.STLB_HIT",
480 "SampleAfterValue": "100003",
481 "BriefDescription": "Operations that miss the first ITLB level but hit the second and do not cause any page walks",
482 "CounterHTOff": "0,1,2,3,4,5,6,7"
483 } 483 }
484] \ No newline at end of file 484] \ No newline at end of file
diff --git a/tools/perf/pmu-events/arch/x86/haswellx/cache.json b/tools/perf/pmu-events/arch/x86/haswellx/cache.json
index f1bae0817a6f..b2fbd617306a 100644
--- a/tools/perf/pmu-events/arch/x86/haswellx/cache.json
+++ b/tools/perf/pmu-events/arch/x86/haswellx/cache.json
@@ -12,12 +12,32 @@
12 }, 12 },
13 { 13 {
14 "EventCode": "0x24", 14 "EventCode": "0x24",
15 "UMask": "0x41", 15 "UMask": "0x22",
16 "BriefDescription": "Demand Data Read requests that hit L2 cache", 16 "BriefDescription": "RFO requests that miss L2 cache",
17 "Counter": "0,1,2,3", 17 "Counter": "0,1,2,3",
18 "EventName": "L2_RQSTS.DEMAND_DATA_RD_HIT", 18 "EventName": "L2_RQSTS.RFO_MISS",
19 "PublicDescription": "Counts the number of store RFO requests that miss the L2 cache.",
20 "SampleAfterValue": "200003",
21 "CounterHTOff": "0,1,2,3,4,5,6,7"
22 },
23 {
24 "EventCode": "0x24",
25 "UMask": "0x24",
26 "BriefDescription": "L2 cache misses when fetching instructions",
27 "Counter": "0,1,2,3",
28 "EventName": "L2_RQSTS.CODE_RD_MISS",
29 "PublicDescription": "Number of instruction fetches that missed the L2 cache.",
30 "SampleAfterValue": "200003",
31 "CounterHTOff": "0,1,2,3,4,5,6,7"
32 },
33 {
34 "EventCode": "0x24",
35 "UMask": "0x27",
36 "BriefDescription": "Demand requests that miss L2 cache",
37 "Counter": "0,1,2,3",
38 "EventName": "L2_RQSTS.ALL_DEMAND_MISS",
19 "Errata": "HSD78", 39 "Errata": "HSD78",
20 "PublicDescription": "Demand data read requests that hit L2 cache.", 40 "PublicDescription": "Demand requests that miss L2 cache.",
21 "SampleAfterValue": "200003", 41 "SampleAfterValue": "200003",
22 "CounterHTOff": "0,1,2,3,4,5,6,7" 42 "CounterHTOff": "0,1,2,3,4,5,6,7"
23 }, 43 },
@@ -33,6 +53,48 @@
33 }, 53 },
34 { 54 {
35 "EventCode": "0x24", 55 "EventCode": "0x24",
56 "UMask": "0x3f",
57 "BriefDescription": "All requests that miss L2 cache",
58 "Counter": "0,1,2,3",
59 "EventName": "L2_RQSTS.MISS",
60 "Errata": "HSD78",
61 "PublicDescription": "All requests that missed L2.",
62 "SampleAfterValue": "200003",
63 "CounterHTOff": "0,1,2,3,4,5,6,7"
64 },
65 {
66 "EventCode": "0x24",
67 "UMask": "0x41",
68 "BriefDescription": "Demand Data Read requests that hit L2 cache",
69 "Counter": "0,1,2,3",
70 "EventName": "L2_RQSTS.DEMAND_DATA_RD_HIT",
71 "Errata": "HSD78",
72 "PublicDescription": "Demand data read requests that hit L2 cache.",
73 "SampleAfterValue": "200003",
74 "CounterHTOff": "0,1,2,3,4,5,6,7"
75 },
76 {
77 "EventCode": "0x24",
78 "UMask": "0x42",
79 "BriefDescription": "RFO requests that hit L2 cache",
80 "Counter": "0,1,2,3",
81 "EventName": "L2_RQSTS.RFO_HIT",
82 "PublicDescription": "Counts the number of store RFO requests that hit the L2 cache.",
83 "SampleAfterValue": "200003",
84 "CounterHTOff": "0,1,2,3,4,5,6,7"
85 },
86 {
87 "EventCode": "0x24",
88 "UMask": "0x44",
89 "BriefDescription": "L2 cache hits when fetching instructions, code reads.",
90 "Counter": "0,1,2,3",
91 "EventName": "L2_RQSTS.CODE_RD_HIT",
92 "PublicDescription": "Number of instruction fetches that hit the L2 cache.",
93 "SampleAfterValue": "200003",
94 "CounterHTOff": "0,1,2,3,4,5,6,7"
95 },
96 {
97 "EventCode": "0x24",
36 "UMask": "0x50", 98 "UMask": "0x50",
37 "BriefDescription": "L2 prefetch requests that hit L2 cache", 99 "BriefDescription": "L2 prefetch requests that hit L2 cache",
38 "Counter": "0,1,2,3", 100 "Counter": "0,1,2,3",
@@ -74,6 +136,17 @@
74 }, 136 },
75 { 137 {
76 "EventCode": "0x24", 138 "EventCode": "0x24",
139 "UMask": "0xe7",
140 "BriefDescription": "Demand requests to L2 cache",
141 "Counter": "0,1,2,3",
142 "EventName": "L2_RQSTS.ALL_DEMAND_REFERENCES",
143 "Errata": "HSD78",
144 "PublicDescription": "Demand requests to L2 cache.",
145 "SampleAfterValue": "200003",
146 "CounterHTOff": "0,1,2,3,4,5,6,7"
147 },
148 {
149 "EventCode": "0x24",
77 "UMask": "0xf8", 150 "UMask": "0xf8",
78 "BriefDescription": "Requests from L2 hardware prefetchers", 151 "BriefDescription": "Requests from L2 hardware prefetchers",
79 "Counter": "0,1,2,3", 152 "Counter": "0,1,2,3",
@@ -83,6 +156,17 @@
83 "CounterHTOff": "0,1,2,3,4,5,6,7" 156 "CounterHTOff": "0,1,2,3,4,5,6,7"
84 }, 157 },
85 { 158 {
159 "EventCode": "0x24",
160 "UMask": "0xff",
161 "BriefDescription": "All L2 requests",
162 "Counter": "0,1,2,3",
163 "EventName": "L2_RQSTS.REFERENCES",
164 "Errata": "HSD78",
165 "PublicDescription": "All requests to L2 cache.",
166 "SampleAfterValue": "200003",
167 "CounterHTOff": "0,1,2,3,4,5,6,7"
168 },
169 {
86 "EventCode": "0x27", 170 "EventCode": "0x27",
87 "UMask": "0x50", 171 "UMask": "0x50",
88 "BriefDescription": "Not rejected writebacks that hit L2 cache", 172 "BriefDescription": "Not rejected writebacks that hit L2 cache",
@@ -124,6 +208,27 @@
124 }, 208 },
125 { 209 {
126 "EventCode": "0x48", 210 "EventCode": "0x48",
211 "UMask": "0x1",
212 "BriefDescription": "Cycles with L1D load Misses outstanding.",
213 "Counter": "2",
214 "EventName": "L1D_PEND_MISS.PENDING_CYCLES",
215 "CounterMask": "1",
216 "SampleAfterValue": "2000003",
217 "CounterHTOff": "2"
218 },
219 {
220 "EventCode": "0x48",
221 "UMask": "0x1",
222 "BriefDescription": "Cycles with L1D load Misses outstanding from any thread on physical core.",
223 "Counter": "2",
224 "EventName": "L1D_PEND_MISS.PENDING_CYCLES_ANY",
225 "AnyThread": "1",
226 "CounterMask": "1",
227 "SampleAfterValue": "2000003",
228 "CounterHTOff": "2"
229 },
230 {
231 "EventCode": "0x48",
127 "UMask": "0x2", 232 "UMask": "0x2",
128 "BriefDescription": "Number of times a request needed a FB entry but there was no entry available for it. That is the FB unavailability was dominant reason for blocking the request. A request includes cacheable/uncacheable demands that is load, store or SW prefetch. HWP are e.", 233 "BriefDescription": "Number of times a request needed a FB entry but there was no entry available for it. That is the FB unavailability was dominant reason for blocking the request. A request includes cacheable/uncacheable demands that is load, store or SW prefetch. HWP are e.",
129 "Counter": "0,1,2,3", 234 "Counter": "0,1,2,3",
@@ -133,13 +238,13 @@
133 }, 238 },
134 { 239 {
135 "EventCode": "0x48", 240 "EventCode": "0x48",
136 "UMask": "0x1", 241 "UMask": "0x2",
137 "BriefDescription": "Cycles with L1D load Misses outstanding.", 242 "BriefDescription": "Cycles a demand request was blocked due to Fill Buffers inavailability.",
138 "Counter": "2", 243 "Counter": "0,1,2,3",
139 "EventName": "L1D_PEND_MISS.PENDING_CYCLES", 244 "EventName": "L1D_PEND_MISS.FB_FULL",
140 "CounterMask": "1", 245 "CounterMask": "1",
141 "SampleAfterValue": "2000003", 246 "SampleAfterValue": "2000003",
142 "CounterHTOff": "2" 247 "CounterHTOff": "0,1,2,3,4,5,6,7"
143 }, 248 },
144 { 249 {
145 "EventCode": "0x51", 250 "EventCode": "0x51",
@@ -164,6 +269,28 @@
164 }, 269 },
165 { 270 {
166 "EventCode": "0x60", 271 "EventCode": "0x60",
272 "UMask": "0x1",
273 "BriefDescription": "Cycles when offcore outstanding Demand Data Read transactions are present in SuperQueue (SQ), queue to uncore.",
274 "Counter": "0,1,2,3",
275 "EventName": "OFFCORE_REQUESTS_OUTSTANDING.CYCLES_WITH_DEMAND_DATA_RD",
276 "CounterMask": "1",
277 "Errata": "HSD78, HSD62, HSD61",
278 "SampleAfterValue": "2000003",
279 "CounterHTOff": "0,1,2,3,4,5,6,7"
280 },
281 {
282 "EventCode": "0x60",
283 "UMask": "0x1",
284 "BriefDescription": "Cycles with at least 6 offcore outstanding Demand Data Read transactions in uncore queue.",
285 "Counter": "0,1,2,3",
286 "EventName": "OFFCORE_REQUESTS_OUTSTANDING.DEMAND_DATA_RD_GE_6",
287 "CounterMask": "6",
288 "Errata": "HSD78, HSD62, HSD61",
289 "SampleAfterValue": "2000003",
290 "CounterHTOff": "0,1,2,3,4,5,6,7"
291 },
292 {
293 "EventCode": "0x60",
167 "UMask": "0x2", 294 "UMask": "0x2",
168 "BriefDescription": "Offcore outstanding code reads transactions in SuperQueue (SQ), queue to uncore, every cycle", 295 "BriefDescription": "Offcore outstanding code reads transactions in SuperQueue (SQ), queue to uncore, every cycle",
169 "Counter": "0,1,2,3", 296 "Counter": "0,1,2,3",
@@ -186,23 +313,23 @@
186 }, 313 },
187 { 314 {
188 "EventCode": "0x60", 315 "EventCode": "0x60",
189 "UMask": "0x8", 316 "UMask": "0x4",
190 "BriefDescription": "Offcore outstanding cacheable Core Data Read transactions in SuperQueue (SQ), queue to uncore", 317 "BriefDescription": "Offcore outstanding demand rfo reads transactions in SuperQueue (SQ), queue to uncore, every cycle.",
191 "Counter": "0,1,2,3", 318 "Counter": "0,1,2,3",
192 "EventName": "OFFCORE_REQUESTS_OUTSTANDING.ALL_DATA_RD", 319 "EventName": "OFFCORE_REQUESTS_OUTSTANDING.CYCLES_WITH_DEMAND_RFO",
320 "CounterMask": "1",
193 "Errata": "HSD62, HSD61", 321 "Errata": "HSD62, HSD61",
194 "PublicDescription": "Offcore outstanding cacheable data read transactions in SQ to uncore. Set Cmask=1 to count cycles.",
195 "SampleAfterValue": "2000003", 322 "SampleAfterValue": "2000003",
196 "CounterHTOff": "0,1,2,3,4,5,6,7" 323 "CounterHTOff": "0,1,2,3,4,5,6,7"
197 }, 324 },
198 { 325 {
199 "EventCode": "0x60", 326 "EventCode": "0x60",
200 "UMask": "0x1", 327 "UMask": "0x8",
201 "BriefDescription": "Cycles when offcore outstanding Demand Data Read transactions are present in SuperQueue (SQ), queue to uncore.", 328 "BriefDescription": "Offcore outstanding cacheable Core Data Read transactions in SuperQueue (SQ), queue to uncore",
202 "Counter": "0,1,2,3", 329 "Counter": "0,1,2,3",
203 "EventName": "OFFCORE_REQUESTS_OUTSTANDING.CYCLES_WITH_DEMAND_DATA_RD", 330 "EventName": "OFFCORE_REQUESTS_OUTSTANDING.ALL_DATA_RD",
204 "CounterMask": "1", 331 "Errata": "HSD62, HSD61",
205 "Errata": "HSD78, HSD62, HSD61", 332 "PublicDescription": "Offcore outstanding cacheable data read transactions in SQ to uncore. Set Cmask=1 to count cycles.",
206 "SampleAfterValue": "2000003", 333 "SampleAfterValue": "2000003",
207 "CounterHTOff": "0,1,2,3,4,5,6,7" 334 "CounterHTOff": "0,1,2,3,4,5,6,7"
208 }, 335 },
@@ -218,17 +345,6 @@
218 "CounterHTOff": "0,1,2,3,4,5,6,7" 345 "CounterHTOff": "0,1,2,3,4,5,6,7"
219 }, 346 },
220 { 347 {
221 "EventCode": "0x60",
222 "UMask": "0x4",
223 "BriefDescription": "Offcore outstanding demand rfo reads transactions in SuperQueue (SQ), queue to uncore, every cycle.",
224 "Counter": "0,1,2,3",
225 "EventName": "OFFCORE_REQUESTS_OUTSTANDING.CYCLES_WITH_DEMAND_RFO",
226 "CounterMask": "1",
227 "Errata": "HSD62, HSD61",
228 "SampleAfterValue": "2000003",
229 "CounterHTOff": "0,1,2,3,4,5,6,7"
230 },
231 {
232 "EventCode": "0x63", 348 "EventCode": "0x63",
233 "UMask": "0x2", 349 "UMask": "0x2",
234 "BriefDescription": "Cycles when L1D is locked", 350 "BriefDescription": "Cycles when L1D is locked",
@@ -289,9 +405,18 @@
289 "CounterHTOff": "0,1,2,3,4,5,6,7" 405 "CounterHTOff": "0,1,2,3,4,5,6,7"
290 }, 406 },
291 { 407 {
408 "EventCode": "0xB7, 0xBB",
409 "UMask": "0x1",
410 "BriefDescription": "Offcore response can be programmed only with a specific pair of event select and counter MSR, and with specific event codes and predefine mask bit value in a dedicated MSR to specify attributes of the offcore transaction.",
411 "Counter": "0,1,2,3",
412 "EventName": "OFFCORE_RESPONSE",
413 "SampleAfterValue": "100003",
414 "CounterHTOff": "0,1,2,3"
415 },
416 {
292 "EventCode": "0xD0", 417 "EventCode": "0xD0",
293 "UMask": "0x11", 418 "UMask": "0x11",
294 "BriefDescription": "Retired load uops that miss the STLB.", 419 "BriefDescription": "Retired load uops that miss the STLB. (precise Event)",
295 "Data_LA": "1", 420 "Data_LA": "1",
296 "PEBS": "1", 421 "PEBS": "1",
297 "Counter": "0,1,2,3", 422 "Counter": "0,1,2,3",
@@ -303,20 +428,20 @@
303 { 428 {
304 "EventCode": "0xD0", 429 "EventCode": "0xD0",
305 "UMask": "0x12", 430 "UMask": "0x12",
306 "BriefDescription": "Retired store uops that miss the STLB.", 431 "BriefDescription": "Retired store uops that miss the STLB. (precise Event)",
307 "Data_LA": "1", 432 "Data_LA": "1",
308 "PEBS": "1", 433 "PEBS": "1",
309 "Counter": "0,1,2,3", 434 "Counter": "0,1,2,3",
310 "EventName": "MEM_UOPS_RETIRED.STLB_MISS_STORES", 435 "EventName": "MEM_UOPS_RETIRED.STLB_MISS_STORES",
311 "Errata": "HSD29, HSM30", 436 "Errata": "HSD29, HSM30",
312 "SampleAfterValue": "100003",
313 "L1_Hit_Indication": "1", 437 "L1_Hit_Indication": "1",
438 "SampleAfterValue": "100003",
314 "CounterHTOff": "0,1,2,3" 439 "CounterHTOff": "0,1,2,3"
315 }, 440 },
316 { 441 {
317 "EventCode": "0xD0", 442 "EventCode": "0xD0",
318 "UMask": "0x21", 443 "UMask": "0x21",
319 "BriefDescription": "Retired load uops with locked access.", 444 "BriefDescription": "Retired load uops with locked access. (precise Event)",
320 "Data_LA": "1", 445 "Data_LA": "1",
321 "PEBS": "1", 446 "PEBS": "1",
322 "Counter": "0,1,2,3", 447 "Counter": "0,1,2,3",
@@ -328,32 +453,34 @@
328 { 453 {
329 "EventCode": "0xD0", 454 "EventCode": "0xD0",
330 "UMask": "0x41", 455 "UMask": "0x41",
331 "BriefDescription": "Retired load uops that split across a cacheline boundary.", 456 "BriefDescription": "Retired load uops that split across a cacheline boundary. (precise Event)",
332 "Data_LA": "1", 457 "Data_LA": "1",
333 "PEBS": "1", 458 "PEBS": "1",
334 "Counter": "0,1,2,3", 459 "Counter": "0,1,2,3",
335 "EventName": "MEM_UOPS_RETIRED.SPLIT_LOADS", 460 "EventName": "MEM_UOPS_RETIRED.SPLIT_LOADS",
336 "Errata": "HSD29, HSM30", 461 "Errata": "HSD29, HSM30",
462 "PublicDescription": "This event counts load uops retired which had memory addresses spilt across 2 cache lines. A line split is across 64B cache-lines which may include a page split (4K). This is a precise event.",
337 "SampleAfterValue": "100003", 463 "SampleAfterValue": "100003",
338 "CounterHTOff": "0,1,2,3" 464 "CounterHTOff": "0,1,2,3"
339 }, 465 },
340 { 466 {
341 "EventCode": "0xD0", 467 "EventCode": "0xD0",
342 "UMask": "0x42", 468 "UMask": "0x42",
343 "BriefDescription": "Retired store uops that split across a cacheline boundary.", 469 "BriefDescription": "Retired store uops that split across a cacheline boundary. (precise Event)",
344 "Data_LA": "1", 470 "Data_LA": "1",
345 "PEBS": "1", 471 "PEBS": "1",
346 "Counter": "0,1,2,3", 472 "Counter": "0,1,2,3",
347 "EventName": "MEM_UOPS_RETIRED.SPLIT_STORES", 473 "EventName": "MEM_UOPS_RETIRED.SPLIT_STORES",
348 "Errata": "HSD29, HSM30", 474 "Errata": "HSD29, HSM30",
349 "SampleAfterValue": "100003",
350 "L1_Hit_Indication": "1", 475 "L1_Hit_Indication": "1",
476 "PublicDescription": "This event counts store uops retired which had memory addresses spilt across 2 cache lines. A line split is across 64B cache-lines which may include a page split (4K). This is a precise event.",
477 "SampleAfterValue": "100003",
351 "CounterHTOff": "0,1,2,3" 478 "CounterHTOff": "0,1,2,3"
352 }, 479 },
353 { 480 {
354 "EventCode": "0xD0", 481 "EventCode": "0xD0",
355 "UMask": "0x81", 482 "UMask": "0x81",
356 "BriefDescription": "All retired load uops.", 483 "BriefDescription": "All retired load uops. (precise Event)",
357 "Data_LA": "1", 484 "Data_LA": "1",
358 "PEBS": "1", 485 "PEBS": "1",
359 "Counter": "0,1,2,3", 486 "Counter": "0,1,2,3",
@@ -365,14 +492,15 @@
365 { 492 {
366 "EventCode": "0xD0", 493 "EventCode": "0xD0",
367 "UMask": "0x82", 494 "UMask": "0x82",
368 "BriefDescription": "All retired store uops.", 495 "BriefDescription": "All retired store uops. (precise Event)",
369 "Data_LA": "1", 496 "Data_LA": "1",
370 "PEBS": "1", 497 "PEBS": "1",
371 "Counter": "0,1,2,3", 498 "Counter": "0,1,2,3",
372 "EventName": "MEM_UOPS_RETIRED.ALL_STORES", 499 "EventName": "MEM_UOPS_RETIRED.ALL_STORES",
373 "Errata": "HSD29, HSM30", 500 "Errata": "HSD29, HSM30",
374 "SampleAfterValue": "2000003",
375 "L1_Hit_Indication": "1", 501 "L1_Hit_Indication": "1",
502 "PublicDescription": "This event counts all store uops retired. This is a precise event.",
503 "SampleAfterValue": "2000003",
376 "CounterHTOff": "0,1,2,3" 504 "CounterHTOff": "0,1,2,3"
377 }, 505 },
378 { 506 {
@@ -402,13 +530,13 @@
402 { 530 {
403 "EventCode": "0xD1", 531 "EventCode": "0xD1",
404 "UMask": "0x4", 532 "UMask": "0x4",
405 "BriefDescription": "Retired load uops which data sources were data hits in L3 without snoops required.", 533 "BriefDescription": "Miss in last-level (L3) cache. Excludes Unknown data-source.",
406 "Data_LA": "1", 534 "Data_LA": "1",
407 "PEBS": "1", 535 "PEBS": "1",
408 "Counter": "0,1,2,3", 536 "Counter": "0,1,2,3",
409 "EventName": "MEM_LOAD_UOPS_RETIRED.L3_HIT", 537 "EventName": "MEM_LOAD_UOPS_RETIRED.L3_HIT",
410 "Errata": "HSD74, HSD29, HSD25, HSM26, HSM30", 538 "Errata": "HSD74, HSD29, HSD25, HSM26, HSM30",
411 "PublicDescription": "Retired load uops with L3 cache hits as data sources.", 539 "PublicDescription": "This event counts retired load uops in which data sources were data hits in the L3 cache without snoops required. This does not include hardware prefetches. This is a precise event.",
412 "SampleAfterValue": "50021", 540 "SampleAfterValue": "50021",
413 "CounterHTOff": "0,1,2,3" 541 "CounterHTOff": "0,1,2,3"
414 }, 542 },
@@ -421,20 +549,19 @@
421 "Counter": "0,1,2,3", 549 "Counter": "0,1,2,3",
422 "EventName": "MEM_LOAD_UOPS_RETIRED.L1_MISS", 550 "EventName": "MEM_LOAD_UOPS_RETIRED.L1_MISS",
423 "Errata": "HSM30", 551 "Errata": "HSM30",
424 "PublicDescription": "Retired load uops missed L1 cache as data sources.", 552 "PublicDescription": "This event counts retired load uops in which data sources missed in the L1 cache. This does not include hardware prefetches. This is a precise event.",
425 "SampleAfterValue": "100003", 553 "SampleAfterValue": "100003",
426 "CounterHTOff": "0,1,2,3" 554 "CounterHTOff": "0,1,2,3"
427 }, 555 },
428 { 556 {
429 "EventCode": "0xD1", 557 "EventCode": "0xD1",
430 "UMask": "0x10", 558 "UMask": "0x10",
431 "BriefDescription": "Miss in mid-level (L2) cache. Excludes Unknown data-source.", 559 "BriefDescription": "Retired load uops with L2 cache misses as data sources.",
432 "Data_LA": "1", 560 "Data_LA": "1",
433 "PEBS": "1", 561 "PEBS": "1",
434 "Counter": "0,1,2,3", 562 "Counter": "0,1,2,3",
435 "EventName": "MEM_LOAD_UOPS_RETIRED.L2_MISS", 563 "EventName": "MEM_LOAD_UOPS_RETIRED.L2_MISS",
436 "Errata": "HSD29, HSM30", 564 "Errata": "HSD29, HSM30",
437 "PublicDescription": "Retired load uops missed L2. Unknown data source excluded.",
438 "SampleAfterValue": "50021", 565 "SampleAfterValue": "50021",
439 "CounterHTOff": "0,1,2,3" 566 "CounterHTOff": "0,1,2,3"
440 }, 567 },
@@ -447,7 +574,6 @@
447 "Counter": "0,1,2,3", 574 "Counter": "0,1,2,3",
448 "EventName": "MEM_LOAD_UOPS_RETIRED.L3_MISS", 575 "EventName": "MEM_LOAD_UOPS_RETIRED.L3_MISS",
449 "Errata": "HSD74, HSD29, HSD25, HSM26, HSM30", 576 "Errata": "HSD74, HSD29, HSD25, HSM26, HSM30",
450 "PublicDescription": "Retired load uops missed L3. Excludes unknown data source .",
451 "SampleAfterValue": "100003", 577 "SampleAfterValue": "100003",
452 "CounterHTOff": "0,1,2,3" 578 "CounterHTOff": "0,1,2,3"
453 }, 579 },
@@ -478,24 +604,26 @@
478 { 604 {
479 "EventCode": "0xD2", 605 "EventCode": "0xD2",
480 "UMask": "0x2", 606 "UMask": "0x2",
481 "BriefDescription": "Retired load uops which data sources were L3 and cross-core snoop hits in on-pkg core cache.", 607 "BriefDescription": "Retired load uops which data sources were L3 and cross-core snoop hits in on-pkg core cache. ",
482 "Data_LA": "1", 608 "Data_LA": "1",
483 "PEBS": "1", 609 "PEBS": "1",
484 "Counter": "0,1,2,3", 610 "Counter": "0,1,2,3",
485 "EventName": "MEM_LOAD_UOPS_L3_HIT_RETIRED.XSNP_HIT", 611 "EventName": "MEM_LOAD_UOPS_L3_HIT_RETIRED.XSNP_HIT",
486 "Errata": "HSD29, HSD25, HSM26, HSM30", 612 "Errata": "HSD29, HSD25, HSM26, HSM30",
613 "PublicDescription": "This event counts retired load uops that hit in the L3 cache, but required a cross-core snoop which resulted in a HIT in an on-pkg core cache. This does not include hardware prefetches. This is a precise event.",
487 "SampleAfterValue": "20011", 614 "SampleAfterValue": "20011",
488 "CounterHTOff": "0,1,2,3" 615 "CounterHTOff": "0,1,2,3"
489 }, 616 },
490 { 617 {
491 "EventCode": "0xD2", 618 "EventCode": "0xD2",
492 "UMask": "0x4", 619 "UMask": "0x4",
493 "BriefDescription": "Retired load uops which data sources were HitM responses from shared L3.", 620 "BriefDescription": "Retired load uops which data sources were HitM responses from shared L3. ",
494 "Data_LA": "1", 621 "Data_LA": "1",
495 "PEBS": "1", 622 "PEBS": "1",
496 "Counter": "0,1,2,3", 623 "Counter": "0,1,2,3",
497 "EventName": "MEM_LOAD_UOPS_L3_HIT_RETIRED.XSNP_HITM", 624 "EventName": "MEM_LOAD_UOPS_L3_HIT_RETIRED.XSNP_HITM",
498 "Errata": "HSD29, HSD25, HSM26, HSM30", 625 "Errata": "HSD29, HSD25, HSM26, HSM30",
626 "PublicDescription": "This event counts retired load uops that hit in the L3 cache, but required a cross-core snoop which resulted in a HITM (hit modified) in an on-pkg core cache. This does not include hardware prefetches. This is a precise event.",
499 "SampleAfterValue": "20011", 627 "SampleAfterValue": "20011",
500 "CounterHTOff": "0,1,2,3" 628 "CounterHTOff": "0,1,2,3"
501 }, 629 },
@@ -514,20 +642,19 @@
514 { 642 {
515 "EventCode": "0xD3", 643 "EventCode": "0xD3",
516 "UMask": "0x1", 644 "UMask": "0x1",
517 "BriefDescription": "Data from local DRAM either Snoop not needed or Snoop Miss (RspI)",
518 "Data_LA": "1", 645 "Data_LA": "1",
519 "PEBS": "1", 646 "PEBS": "1",
520 "Counter": "0,1,2,3", 647 "Counter": "0,1,2,3",
521 "EventName": "MEM_LOAD_UOPS_L3_MISS_RETIRED.LOCAL_DRAM", 648 "EventName": "MEM_LOAD_UOPS_L3_MISS_RETIRED.LOCAL_DRAM",
522 "Errata": "HSD74, HSD29, HSD25, HSM30", 649 "Errata": "HSD74, HSD29, HSD25, HSM30",
523 "PublicDescription": "This event counts retired load uops where the data came from local DRAM. This does not include hardware prefetches.", 650 "PublicDescription": "This event counts retired load uops where the data came from local DRAM. This does not include hardware prefetches. This is a precise event.",
524 "SampleAfterValue": "100003", 651 "SampleAfterValue": "100003",
525 "CounterHTOff": "0,1,2,3" 652 "CounterHTOff": "0,1,2,3"
526 }, 653 },
527 { 654 {
528 "EventCode": "0xD3", 655 "EventCode": "0xD3",
529 "UMask": "0x4", 656 "UMask": "0x4",
530 "BriefDescription": "Retired load uop whose Data Source was: remote DRAM either Snoop not needed or Snoop Miss (RspI)", 657 "BriefDescription": "Retired load uop whose Data Source was: remote DRAM either Snoop not needed or Snoop Miss (RspI) (Precise Event)",
531 "Data_LA": "1", 658 "Data_LA": "1",
532 "PEBS": "1", 659 "PEBS": "1",
533 "Counter": "0,1,2,3", 660 "Counter": "0,1,2,3",
@@ -539,7 +666,7 @@
539 { 666 {
540 "EventCode": "0xD3", 667 "EventCode": "0xD3",
541 "UMask": "0x10", 668 "UMask": "0x10",
542 "BriefDescription": "Retired load uop whose Data Source was: Remote cache HITM", 669 "BriefDescription": "Retired load uop whose Data Source was: Remote cache HITM (Precise Event)",
543 "Data_LA": "1", 670 "Data_LA": "1",
544 "PEBS": "1", 671 "PEBS": "1",
545 "Counter": "0,1,2,3", 672 "Counter": "0,1,2,3",
@@ -551,7 +678,7 @@
551 { 678 {
552 "EventCode": "0xD3", 679 "EventCode": "0xD3",
553 "UMask": "0x20", 680 "UMask": "0x20",
554 "BriefDescription": "Retired load uop whose Data Source was: forwarded from remote cache", 681 "BriefDescription": "Retired load uop whose Data Source was: forwarded from remote cache (Precise Event)",
555 "Data_LA": "1", 682 "Data_LA": "1",
556 "PEBS": "1", 683 "PEBS": "1",
557 "Counter": "0,1,2,3", 684 "Counter": "0,1,2,3",
@@ -706,135 +833,11 @@
706 "BriefDescription": "Split locks in SQ", 833 "BriefDescription": "Split locks in SQ",
707 "Counter": "0,1,2,3", 834 "Counter": "0,1,2,3",
708 "EventName": "SQ_MISC.SPLIT_LOCK", 835 "EventName": "SQ_MISC.SPLIT_LOCK",
836 "PublicDescription": "",
709 "SampleAfterValue": "100003", 837 "SampleAfterValue": "100003",
710 "CounterHTOff": "0,1,2,3,4,5,6,7" 838 "CounterHTOff": "0,1,2,3,4,5,6,7"
711 }, 839 },
712 { 840 {
713 "EventCode": "0x24",
714 "UMask": "0x42",
715 "BriefDescription": "RFO requests that hit L2 cache",
716 "Counter": "0,1,2,3",
717 "EventName": "L2_RQSTS.RFO_HIT",
718 "PublicDescription": "Counts the number of store RFO requests that hit the L2 cache.",
719 "SampleAfterValue": "200003",
720 "CounterHTOff": "0,1,2,3,4,5,6,7"
721 },
722 {
723 "EventCode": "0x24",
724 "UMask": "0x22",
725 "BriefDescription": "RFO requests that miss L2 cache",
726 "Counter": "0,1,2,3",
727 "EventName": "L2_RQSTS.RFO_MISS",
728 "PublicDescription": "Counts the number of store RFO requests that miss the L2 cache.",
729 "SampleAfterValue": "200003",
730 "CounterHTOff": "0,1,2,3,4,5,6,7"
731 },
732 {
733 "EventCode": "0x24",
734 "UMask": "0x44",
735 "BriefDescription": "L2 cache hits when fetching instructions, code reads.",
736 "Counter": "0,1,2,3",
737 "EventName": "L2_RQSTS.CODE_RD_HIT",
738 "PublicDescription": "Number of instruction fetches that hit the L2 cache.",
739 "SampleAfterValue": "200003",
740 "CounterHTOff": "0,1,2,3,4,5,6,7"
741 },
742 {
743 "EventCode": "0x24",
744 "UMask": "0x24",
745 "BriefDescription": "L2 cache misses when fetching instructions",
746 "Counter": "0,1,2,3",
747 "EventName": "L2_RQSTS.CODE_RD_MISS",
748 "PublicDescription": "Number of instruction fetches that missed the L2 cache.",
749 "SampleAfterValue": "200003",
750 "CounterHTOff": "0,1,2,3,4,5,6,7"
751 },
752 {
753 "EventCode": "0x24",
754 "UMask": "0x27",
755 "BriefDescription": "Demand requests that miss L2 cache",
756 "Counter": "0,1,2,3",
757 "EventName": "L2_RQSTS.ALL_DEMAND_MISS",
758 "Errata": "HSD78",
759 "PublicDescription": "Demand requests that miss L2 cache.",
760 "SampleAfterValue": "200003",
761 "CounterHTOff": "0,1,2,3,4,5,6,7"
762 },
763 {
764 "EventCode": "0x24",
765 "UMask": "0xe7",
766 "BriefDescription": "Demand requests to L2 cache",
767 "Counter": "0,1,2,3",
768 "EventName": "L2_RQSTS.ALL_DEMAND_REFERENCES",
769 "Errata": "HSD78",
770 "PublicDescription": "Demand requests to L2 cache.",
771 "SampleAfterValue": "200003",
772 "CounterHTOff": "0,1,2,3,4,5,6,7"
773 },
774 {
775 "EventCode": "0x24",
776 "UMask": "0x3f",
777 "BriefDescription": "All requests that miss L2 cache",
778 "Counter": "0,1,2,3",
779 "EventName": "L2_RQSTS.MISS",
780 "Errata": "HSD78",
781 "PublicDescription": "All requests that missed L2.",
782 "SampleAfterValue": "200003",
783 "CounterHTOff": "0,1,2,3,4,5,6,7"
784 },
785 {
786 "EventCode": "0x24",
787 "UMask": "0xff",
788 "BriefDescription": "All L2 requests",
789 "Counter": "0,1,2,3",
790 "EventName": "L2_RQSTS.REFERENCES",
791 "Errata": "HSD78",
792 "PublicDescription": "All requests to L2 cache.",
793 "SampleAfterValue": "200003",
794 "CounterHTOff": "0,1,2,3,4,5,6,7"
795 },
796 {
797 "EventCode": "0xB7, 0xBB",
798 "UMask": "0x1",
799 "BriefDescription": "Offcore response can be programmed only with a specific pair of event select and counter MSR, and with specific event codes and predefine mask bit value in a dedicated MSR to specify attributes of the offcore transaction.",
800 "Counter": "0,1,2,3",
801 "EventName": "OFFCORE_RESPONSE",
802 "SampleAfterValue": "100003",
803 "CounterHTOff": "0,1,2,3"
804 },
805 {
806 "EventCode": "0x60",
807 "UMask": "0x1",
808 "BriefDescription": "Cycles with at least 6 offcore outstanding Demand Data Read transactions in uncore queue.",
809 "Counter": "0,1,2,3",
810 "EventName": "OFFCORE_REQUESTS_OUTSTANDING.DEMAND_DATA_RD_GE_6",
811 "CounterMask": "6",
812 "Errata": "HSD78, HSD62, HSD61",
813 "SampleAfterValue": "2000003",
814 "CounterHTOff": "0,1,2,3,4,5,6,7"
815 },
816 {
817 "EventCode": "0x48",
818 "UMask": "0x1",
819 "BriefDescription": "Cycles with L1D load Misses outstanding from any thread on physical core.",
820 "Counter": "2",
821 "EventName": "L1D_PEND_MISS.PENDING_CYCLES_ANY",
822 "AnyThread": "1",
823 "CounterMask": "1",
824 "SampleAfterValue": "2000003",
825 "CounterHTOff": "2"
826 },
827 {
828 "EventCode": "0x48",
829 "UMask": "0x2",
830 "BriefDescription": "Cycles a demand request was blocked due to Fill Buffers inavailability.",
831 "Counter": "0,1,2,3",
832 "EventName": "L1D_PEND_MISS.FB_FULL",
833 "CounterMask": "1",
834 "SampleAfterValue": "2000003",
835 "CounterHTOff": "0,1,2,3,4,5,6,7"
836 },
837 {
838 "Offcore": "1", 841 "Offcore": "1",
839 "EventCode": "0xB7, 0xBB", 842 "EventCode": "0xB7, 0xBB",
840 "UMask": "0x1", 843 "UMask": "0x1",
@@ -843,6 +846,7 @@
843 "Counter": "0,1,2,3", 846 "Counter": "0,1,2,3",
844 "EventName": "OFFCORE_RESPONSE.DEMAND_DATA_RD.LLC_HIT.HIT_OTHER_CORE_NO_FWD", 847 "EventName": "OFFCORE_RESPONSE.DEMAND_DATA_RD.LLC_HIT.HIT_OTHER_CORE_NO_FWD",
845 "MSRIndex": "0x1a6,0x1a7", 848 "MSRIndex": "0x1a6,0x1a7",
849 "PublicDescription": "Counts demand data reads that hit in the L3 and the snoops to sibling cores hit in either E/S state and the line is not forwarded Offcore response can be programmed only with a specific pair of event select and counter MSR, and with specific event codes and predefine mask bit value in a dedicated MSR to specify attributes of the offcore transaction.",
846 "SampleAfterValue": "100003", 850 "SampleAfterValue": "100003",
847 "CounterHTOff": "0,1,2,3" 851 "CounterHTOff": "0,1,2,3"
848 }, 852 },
@@ -855,6 +859,7 @@
855 "Counter": "0,1,2,3", 859 "Counter": "0,1,2,3",
856 "EventName": "OFFCORE_RESPONSE.DEMAND_DATA_RD.LLC_HIT.HITM_OTHER_CORE", 860 "EventName": "OFFCORE_RESPONSE.DEMAND_DATA_RD.LLC_HIT.HITM_OTHER_CORE",
857 "MSRIndex": "0x1a6,0x1a7", 861 "MSRIndex": "0x1a6,0x1a7",
862 "PublicDescription": "Counts demand data reads that hit in the L3 and the snoop to one of the sibling cores hits the line in M state and the line is forwarded Offcore response can be programmed only with a specific pair of event select and counter MSR, and with specific event codes and predefine mask bit value in a dedicated MSR to specify attributes of the offcore transaction.",
858 "SampleAfterValue": "100003", 863 "SampleAfterValue": "100003",
859 "CounterHTOff": "0,1,2,3" 864 "CounterHTOff": "0,1,2,3"
860 }, 865 },
@@ -867,6 +872,7 @@
867 "Counter": "0,1,2,3", 872 "Counter": "0,1,2,3",
868 "EventName": "OFFCORE_RESPONSE.DEMAND_RFO.LLC_HIT.HIT_OTHER_CORE_NO_FWD", 873 "EventName": "OFFCORE_RESPONSE.DEMAND_RFO.LLC_HIT.HIT_OTHER_CORE_NO_FWD",
869 "MSRIndex": "0x1a6,0x1a7", 874 "MSRIndex": "0x1a6,0x1a7",
875 "PublicDescription": "Counts all demand data writes (RFOs) that hit in the L3 and the snoops to sibling cores hit in either E/S state and the line is not forwarded Offcore response can be programmed only with a specific pair of event select and counter MSR, and with specific event codes and predefine mask bit value in a dedicated MSR to specify attributes of the offcore transaction.",
870 "SampleAfterValue": "100003", 876 "SampleAfterValue": "100003",
871 "CounterHTOff": "0,1,2,3" 877 "CounterHTOff": "0,1,2,3"
872 }, 878 },
@@ -879,6 +885,7 @@
879 "Counter": "0,1,2,3", 885 "Counter": "0,1,2,3",
880 "EventName": "OFFCORE_RESPONSE.DEMAND_RFO.LLC_HIT.HITM_OTHER_CORE", 886 "EventName": "OFFCORE_RESPONSE.DEMAND_RFO.LLC_HIT.HITM_OTHER_CORE",
881 "MSRIndex": "0x1a6,0x1a7", 887 "MSRIndex": "0x1a6,0x1a7",
888 "PublicDescription": "Counts all demand data writes (RFOs) that hit in the L3 and the snoop to one of the sibling cores hits the line in M state and the line is forwarded Offcore response can be programmed only with a specific pair of event select and counter MSR, and with specific event codes and predefine mask bit value in a dedicated MSR to specify attributes of the offcore transaction.",
882 "SampleAfterValue": "100003", 889 "SampleAfterValue": "100003",
883 "CounterHTOff": "0,1,2,3" 890 "CounterHTOff": "0,1,2,3"
884 }, 891 },
@@ -891,6 +898,7 @@
891 "Counter": "0,1,2,3", 898 "Counter": "0,1,2,3",
892 "EventName": "OFFCORE_RESPONSE.DEMAND_CODE_RD.LLC_HIT.HIT_OTHER_CORE_NO_FWD", 899 "EventName": "OFFCORE_RESPONSE.DEMAND_CODE_RD.LLC_HIT.HIT_OTHER_CORE_NO_FWD",
893 "MSRIndex": "0x1a6,0x1a7", 900 "MSRIndex": "0x1a6,0x1a7",
901 "PublicDescription": "Counts all demand code reads that hit in the L3 and the snoops to sibling cores hit in either E/S state and the line is not forwarded Offcore response can be programmed only with a specific pair of event select and counter MSR, and with specific event codes and predefine mask bit value in a dedicated MSR to specify attributes of the offcore transaction.",
894 "SampleAfterValue": "100003", 902 "SampleAfterValue": "100003",
895 "CounterHTOff": "0,1,2,3" 903 "CounterHTOff": "0,1,2,3"
896 }, 904 },
@@ -903,6 +911,7 @@
903 "Counter": "0,1,2,3", 911 "Counter": "0,1,2,3",
904 "EventName": "OFFCORE_RESPONSE.DEMAND_CODE_RD.LLC_HIT.HITM_OTHER_CORE", 912 "EventName": "OFFCORE_RESPONSE.DEMAND_CODE_RD.LLC_HIT.HITM_OTHER_CORE",
905 "MSRIndex": "0x1a6,0x1a7", 913 "MSRIndex": "0x1a6,0x1a7",
914 "PublicDescription": "Counts all demand code reads that hit in the L3 and the snoop to one of the sibling cores hits the line in M state and the line is forwarded Offcore response can be programmed only with a specific pair of event select and counter MSR, and with specific event codes and predefine mask bit value in a dedicated MSR to specify attributes of the offcore transaction.",
906 "SampleAfterValue": "100003", 915 "SampleAfterValue": "100003",
907 "CounterHTOff": "0,1,2,3" 916 "CounterHTOff": "0,1,2,3"
908 }, 917 },
@@ -915,6 +924,7 @@
915 "Counter": "0,1,2,3", 924 "Counter": "0,1,2,3",
916 "EventName": "OFFCORE_RESPONSE.PF_L2_DATA_RD.LLC_HIT.ANY_RESPONSE", 925 "EventName": "OFFCORE_RESPONSE.PF_L2_DATA_RD.LLC_HIT.ANY_RESPONSE",
917 "MSRIndex": "0x1a6,0x1a7", 926 "MSRIndex": "0x1a6,0x1a7",
927 "PublicDescription": "Counts prefetch (that bring data to L2) data reads that hit in the L3 Offcore response can be programmed only with a specific pair of event select and counter MSR, and with specific event codes and predefine mask bit value in a dedicated MSR to specify attributes of the offcore transaction.",
918 "SampleAfterValue": "100003", 928 "SampleAfterValue": "100003",
919 "CounterHTOff": "0,1,2,3" 929 "CounterHTOff": "0,1,2,3"
920 }, 930 },
@@ -927,6 +937,7 @@
927 "Counter": "0,1,2,3", 937 "Counter": "0,1,2,3",
928 "EventName": "OFFCORE_RESPONSE.PF_L2_RFO.LLC_HIT.ANY_RESPONSE", 938 "EventName": "OFFCORE_RESPONSE.PF_L2_RFO.LLC_HIT.ANY_RESPONSE",
929 "MSRIndex": "0x1a6,0x1a7", 939 "MSRIndex": "0x1a6,0x1a7",
940 "PublicDescription": "Counts all prefetch (that bring data to L2) RFOs that hit in the L3 Offcore response can be programmed only with a specific pair of event select and counter MSR, and with specific event codes and predefine mask bit value in a dedicated MSR to specify attributes of the offcore transaction.",
930 "SampleAfterValue": "100003", 941 "SampleAfterValue": "100003",
931 "CounterHTOff": "0,1,2,3" 942 "CounterHTOff": "0,1,2,3"
932 }, 943 },
@@ -939,6 +950,7 @@
939 "Counter": "0,1,2,3", 950 "Counter": "0,1,2,3",
940 "EventName": "OFFCORE_RESPONSE.PF_L2_CODE_RD.LLC_HIT.ANY_RESPONSE", 951 "EventName": "OFFCORE_RESPONSE.PF_L2_CODE_RD.LLC_HIT.ANY_RESPONSE",
941 "MSRIndex": "0x1a6,0x1a7", 952 "MSRIndex": "0x1a6,0x1a7",
953 "PublicDescription": "Counts all prefetch (that bring data to LLC only) code reads that hit in the L3 Offcore response can be programmed only with a specific pair of event select and counter MSR, and with specific event codes and predefine mask bit value in a dedicated MSR to specify attributes of the offcore transaction.",
942 "SampleAfterValue": "100003", 954 "SampleAfterValue": "100003",
943 "CounterHTOff": "0,1,2,3" 955 "CounterHTOff": "0,1,2,3"
944 }, 956 },
@@ -951,6 +963,7 @@
951 "Counter": "0,1,2,3", 963 "Counter": "0,1,2,3",
952 "EventName": "OFFCORE_RESPONSE.PF_LLC_DATA_RD.LLC_HIT.ANY_RESPONSE", 964 "EventName": "OFFCORE_RESPONSE.PF_LLC_DATA_RD.LLC_HIT.ANY_RESPONSE",
953 "MSRIndex": "0x1a6,0x1a7", 965 "MSRIndex": "0x1a6,0x1a7",
966 "PublicDescription": "Counts all prefetch (that bring data to LLC only) data reads that hit in the L3 Offcore response can be programmed only with a specific pair of event select and counter MSR, and with specific event codes and predefine mask bit value in a dedicated MSR to specify attributes of the offcore transaction.",
954 "SampleAfterValue": "100003", 967 "SampleAfterValue": "100003",
955 "CounterHTOff": "0,1,2,3" 968 "CounterHTOff": "0,1,2,3"
956 }, 969 },
@@ -963,6 +976,7 @@
963 "Counter": "0,1,2,3", 976 "Counter": "0,1,2,3",
964 "EventName": "OFFCORE_RESPONSE.PF_LLC_RFO.LLC_HIT.ANY_RESPONSE", 977 "EventName": "OFFCORE_RESPONSE.PF_LLC_RFO.LLC_HIT.ANY_RESPONSE",
965 "MSRIndex": "0x1a6,0x1a7", 978 "MSRIndex": "0x1a6,0x1a7",
979 "PublicDescription": "Counts all prefetch (that bring data to LLC only) RFOs that hit in the L3 Offcore response can be programmed only with a specific pair of event select and counter MSR, and with specific event codes and predefine mask bit value in a dedicated MSR to specify attributes of the offcore transaction.",
966 "SampleAfterValue": "100003", 980 "SampleAfterValue": "100003",
967 "CounterHTOff": "0,1,2,3" 981 "CounterHTOff": "0,1,2,3"
968 }, 982 },
@@ -975,6 +989,7 @@
975 "Counter": "0,1,2,3", 989 "Counter": "0,1,2,3",
976 "EventName": "OFFCORE_RESPONSE.PF_LLC_CODE_RD.LLC_HIT.ANY_RESPONSE", 990 "EventName": "OFFCORE_RESPONSE.PF_LLC_CODE_RD.LLC_HIT.ANY_RESPONSE",
977 "MSRIndex": "0x1a6,0x1a7", 991 "MSRIndex": "0x1a6,0x1a7",
992 "PublicDescription": "Counts prefetch (that bring data to LLC only) code reads that hit in the L3 Offcore response can be programmed only with a specific pair of event select and counter MSR, and with specific event codes and predefine mask bit value in a dedicated MSR to specify attributes of the offcore transaction.",
978 "SampleAfterValue": "100003", 993 "SampleAfterValue": "100003",
979 "CounterHTOff": "0,1,2,3" 994 "CounterHTOff": "0,1,2,3"
980 }, 995 },
@@ -987,6 +1002,7 @@
987 "Counter": "0,1,2,3", 1002 "Counter": "0,1,2,3",
988 "EventName": "OFFCORE_RESPONSE.ALL_DATA_RD.LLC_HIT.HIT_OTHER_CORE_NO_FWD", 1003 "EventName": "OFFCORE_RESPONSE.ALL_DATA_RD.LLC_HIT.HIT_OTHER_CORE_NO_FWD",
989 "MSRIndex": "0x1a6,0x1a7", 1004 "MSRIndex": "0x1a6,0x1a7",
1005 "PublicDescription": "Counts all demand & prefetch data reads that hit in the L3 and the snoops to sibling cores hit in either E/S state and the line is not forwarded Offcore response can be programmed only with a specific pair of event select and counter MSR, and with specific event codes and predefine mask bit value in a dedicated MSR to specify attributes of the offcore transaction.",
990 "SampleAfterValue": "100003", 1006 "SampleAfterValue": "100003",
991 "CounterHTOff": "0,1,2,3" 1007 "CounterHTOff": "0,1,2,3"
992 }, 1008 },
@@ -999,6 +1015,7 @@
999 "Counter": "0,1,2,3", 1015 "Counter": "0,1,2,3",
1000 "EventName": "OFFCORE_RESPONSE.ALL_DATA_RD.LLC_HIT.HITM_OTHER_CORE", 1016 "EventName": "OFFCORE_RESPONSE.ALL_DATA_RD.LLC_HIT.HITM_OTHER_CORE",
1001 "MSRIndex": "0x1a6,0x1a7", 1017 "MSRIndex": "0x1a6,0x1a7",
1018 "PublicDescription": "Counts all demand & prefetch data reads that hit in the L3 and the snoop to one of the sibling cores hits the line in M state and the line is forwarded Offcore response can be programmed only with a specific pair of event select and counter MSR, and with specific event codes and predefine mask bit value in a dedicated MSR to specify attributes of the offcore transaction.",
1002 "SampleAfterValue": "100003", 1019 "SampleAfterValue": "100003",
1003 "CounterHTOff": "0,1,2,3" 1020 "CounterHTOff": "0,1,2,3"
1004 }, 1021 },
@@ -1011,6 +1028,7 @@
1011 "Counter": "0,1,2,3", 1028 "Counter": "0,1,2,3",
1012 "EventName": "OFFCORE_RESPONSE.ALL_RFO.LLC_HIT.HIT_OTHER_CORE_NO_FWD", 1029 "EventName": "OFFCORE_RESPONSE.ALL_RFO.LLC_HIT.HIT_OTHER_CORE_NO_FWD",
1013 "MSRIndex": "0x1a6,0x1a7", 1030 "MSRIndex": "0x1a6,0x1a7",
1031 "PublicDescription": "Counts all demand & prefetch RFOs that hit in the L3 and the snoops to sibling cores hit in either E/S state and the line is not forwarded Offcore response can be programmed only with a specific pair of event select and counter MSR, and with specific event codes and predefine mask bit value in a dedicated MSR to specify attributes of the offcore transaction.",
1014 "SampleAfterValue": "100003", 1032 "SampleAfterValue": "100003",
1015 "CounterHTOff": "0,1,2,3" 1033 "CounterHTOff": "0,1,2,3"
1016 }, 1034 },
@@ -1023,6 +1041,7 @@
1023 "Counter": "0,1,2,3", 1041 "Counter": "0,1,2,3",
1024 "EventName": "OFFCORE_RESPONSE.ALL_RFO.LLC_HIT.HITM_OTHER_CORE", 1042 "EventName": "OFFCORE_RESPONSE.ALL_RFO.LLC_HIT.HITM_OTHER_CORE",
1025 "MSRIndex": "0x1a6,0x1a7", 1043 "MSRIndex": "0x1a6,0x1a7",
1044 "PublicDescription": "Counts all demand & prefetch RFOs that hit in the L3 and the snoop to one of the sibling cores hits the line in M state and the line is forwarded Offcore response can be programmed only with a specific pair of event select and counter MSR, and with specific event codes and predefine mask bit value in a dedicated MSR to specify attributes of the offcore transaction.",
1026 "SampleAfterValue": "100003", 1045 "SampleAfterValue": "100003",
1027 "CounterHTOff": "0,1,2,3" 1046 "CounterHTOff": "0,1,2,3"
1028 }, 1047 },
@@ -1035,6 +1054,7 @@
1035 "Counter": "0,1,2,3", 1054 "Counter": "0,1,2,3",
1036 "EventName": "OFFCORE_RESPONSE.ALL_CODE_RD.LLC_HIT.HIT_OTHER_CORE_NO_FWD", 1055 "EventName": "OFFCORE_RESPONSE.ALL_CODE_RD.LLC_HIT.HIT_OTHER_CORE_NO_FWD",
1037 "MSRIndex": "0x1a6,0x1a7", 1056 "MSRIndex": "0x1a6,0x1a7",
1057 "PublicDescription": "Counts all demand & prefetch code reads that hit in the L3 and the snoops to sibling cores hit in either E/S state and the line is not forwarded Offcore response can be programmed only with a specific pair of event select and counter MSR, and with specific event codes and predefine mask bit value in a dedicated MSR to specify attributes of the offcore transaction.",
1038 "SampleAfterValue": "100003", 1058 "SampleAfterValue": "100003",
1039 "CounterHTOff": "0,1,2,3" 1059 "CounterHTOff": "0,1,2,3"
1040 }, 1060 },
@@ -1047,6 +1067,7 @@
1047 "Counter": "0,1,2,3", 1067 "Counter": "0,1,2,3",
1048 "EventName": "OFFCORE_RESPONSE.ALL_READS.LLC_HIT.HIT_OTHER_CORE_NO_FWD", 1068 "EventName": "OFFCORE_RESPONSE.ALL_READS.LLC_HIT.HIT_OTHER_CORE_NO_FWD",
1049 "MSRIndex": "0x1a6,0x1a7", 1069 "MSRIndex": "0x1a6,0x1a7",
1070 "PublicDescription": "Counts all data/code/rfo reads (demand & prefetch) that hit in the L3 and the snoops to sibling cores hit in either E/S state and the line is not forwarded Offcore response can be programmed only with a specific pair of event select and counter MSR, and with specific event codes and predefine mask bit value in a dedicated MSR to specify attributes of the offcore transaction.",
1050 "SampleAfterValue": "100003", 1071 "SampleAfterValue": "100003",
1051 "CounterHTOff": "0,1,2,3" 1072 "CounterHTOff": "0,1,2,3"
1052 }, 1073 },
@@ -1059,6 +1080,7 @@
1059 "Counter": "0,1,2,3", 1080 "Counter": "0,1,2,3",
1060 "EventName": "OFFCORE_RESPONSE.ALL_READS.LLC_HIT.HITM_OTHER_CORE", 1081 "EventName": "OFFCORE_RESPONSE.ALL_READS.LLC_HIT.HITM_OTHER_CORE",
1061 "MSRIndex": "0x1a6,0x1a7", 1082 "MSRIndex": "0x1a6,0x1a7",
1083 "PublicDescription": "Counts all data/code/rfo reads (demand & prefetch) that hit in the L3 and the snoop to one of the sibling cores hits the line in M state and the line is forwarded Offcore response can be programmed only with a specific pair of event select and counter MSR, and with specific event codes and predefine mask bit value in a dedicated MSR to specify attributes of the offcore transaction.",
1062 "SampleAfterValue": "100003", 1084 "SampleAfterValue": "100003",
1063 "CounterHTOff": "0,1,2,3" 1085 "CounterHTOff": "0,1,2,3"
1064 }, 1086 },
@@ -1071,6 +1093,7 @@
1071 "Counter": "0,1,2,3", 1093 "Counter": "0,1,2,3",
1072 "EventName": "OFFCORE_RESPONSE.ALL_REQUESTS.LLC_HIT.ANY_RESPONSE", 1094 "EventName": "OFFCORE_RESPONSE.ALL_REQUESTS.LLC_HIT.ANY_RESPONSE",
1073 "MSRIndex": "0x1a6,0x1a7", 1095 "MSRIndex": "0x1a6,0x1a7",
1096 "PublicDescription": "Counts all requests that hit in the L3 Offcore response can be programmed only with a specific pair of event select and counter MSR, and with specific event codes and predefine mask bit value in a dedicated MSR to specify attributes of the offcore transaction.",
1074 "SampleAfterValue": "100003", 1097 "SampleAfterValue": "100003",
1075 "CounterHTOff": "0,1,2,3" 1098 "CounterHTOff": "0,1,2,3"
1076 } 1099 }
diff --git a/tools/perf/pmu-events/arch/x86/haswellx/floating-point.json b/tools/perf/pmu-events/arch/x86/haswellx/floating-point.json
index 6282aed6e090..bc08cc1f2f7e 100644
--- a/tools/perf/pmu-events/arch/x86/haswellx/floating-point.json
+++ b/tools/perf/pmu-events/arch/x86/haswellx/floating-point.json
@@ -20,6 +20,16 @@
20 "CounterHTOff": "0,1,2,3,4,5,6,7" 20 "CounterHTOff": "0,1,2,3,4,5,6,7"
21 }, 21 },
22 { 22 {
23 "EventCode": "0xC6",
24 "UMask": "0x7",
25 "BriefDescription": "Approximate counts of AVX & AVX2 256-bit instructions, including non-arithmetic instructions, loads, and stores. May count non-AVX instructions that employ 256-bit operations, including (but not necessarily limited to) rep string instructions that use 256-bit loads and stores for optimized performance, XSAVE* and XRSTOR*, and operations that transition the x87 FPU data registers between x87 and MMX.",
26 "Counter": "0,1,2,3",
27 "EventName": "AVX_INSTS.ALL",
28 "PublicDescription": "Note that a whole rep string only counts AVX_INST.ALL once.",
29 "SampleAfterValue": "2000003",
30 "CounterHTOff": "0,1,2,3,4,5,6,7"
31 },
32 {
23 "EventCode": "0xCA", 33 "EventCode": "0xCA",
24 "UMask": "0x2", 34 "UMask": "0x2",
25 "BriefDescription": "Number of X87 assists due to output value.", 35 "BriefDescription": "Number of X87 assists due to output value.",
@@ -69,15 +79,5 @@
69 "PublicDescription": "Cycles with any input/output SSE* or FP assists.", 79 "PublicDescription": "Cycles with any input/output SSE* or FP assists.",
70 "SampleAfterValue": "100003", 80 "SampleAfterValue": "100003",
71 "CounterHTOff": "0,1,2,3" 81 "CounterHTOff": "0,1,2,3"
72 },
73 {
74 "EventCode": "0xC6",
75 "UMask": "0x7",
76 "BriefDescription": "Approximate counts of AVX & AVX2 256-bit instructions, including non-arithmetic instructions, loads, and stores. May count non-AVX instructions that employ 256-bit operations, including (but not necessarily limited to) rep string instructions that use 256-bit loads and stores for optimized performance, XSAVE* and XRSTOR*, and operations that transition the x87 FPU data registers between x87 and MMX.",
77 "Counter": "0,1,2,3",
78 "EventName": "AVX_INSTS.ALL",
79 "PublicDescription": "Note that a whole rep string only counts AVX_INST.ALL once.",
80 "SampleAfterValue": "2000003",
81 "CounterHTOff": "0,1,2,3,4,5,6,7"
82 } 82 }
83] \ No newline at end of file 83] \ No newline at end of file
diff --git a/tools/perf/pmu-events/arch/x86/haswellx/frontend.json b/tools/perf/pmu-events/arch/x86/haswellx/frontend.json
index 2d0c7aac1e61..a4d9f1fcf940 100644
--- a/tools/perf/pmu-events/arch/x86/haswellx/frontend.json
+++ b/tools/perf/pmu-events/arch/x86/haswellx/frontend.json
@@ -22,72 +22,41 @@
22 }, 22 },
23 { 23 {
24 "EventCode": "0x79", 24 "EventCode": "0x79",
25 "UMask": "0x8", 25 "UMask": "0x4",
26 "BriefDescription": "Uops delivered to Instruction Decode Queue (IDQ) from the Decode Stream Buffer (DSB) path", 26 "BriefDescription": "Cycles when uops are being delivered to Instruction Decode Queue (IDQ) from MITE path.",
27 "Counter": "0,1,2,3",
28 "EventName": "IDQ.DSB_UOPS",
29 "PublicDescription": "Increment each cycle. # of uops delivered to IDQ from DSB path. Set Cmask = 1 to count cycles.",
30 "SampleAfterValue": "2000003",
31 "CounterHTOff": "0,1,2,3,4,5,6,7"
32 },
33 {
34 "EventCode": "0x79",
35 "UMask": "0x10",
36 "BriefDescription": "Uops initiated by Decode Stream Buffer (DSB) that are being delivered to Instruction Decode Queue (IDQ) while Microcode Sequenser (MS) is busy",
37 "Counter": "0,1,2,3",
38 "EventName": "IDQ.MS_DSB_UOPS",
39 "PublicDescription": "Increment each cycle # of uops delivered to IDQ when MS_busy by DSB. Set Cmask = 1 to count cycles. Add Edge=1 to count # of delivery.",
40 "SampleAfterValue": "2000003",
41 "CounterHTOff": "0,1,2,3,4,5,6,7"
42 },
43 {
44 "EventCode": "0x79",
45 "UMask": "0x20",
46 "BriefDescription": "Uops initiated by MITE and delivered to Instruction Decode Queue (IDQ) while Microcode Sequenser (MS) is busy",
47 "Counter": "0,1,2,3",
48 "EventName": "IDQ.MS_MITE_UOPS",
49 "PublicDescription": "Increment each cycle # of uops delivered to IDQ when MS_busy by MITE. Set Cmask = 1 to count cycles.",
50 "SampleAfterValue": "2000003",
51 "CounterHTOff": "0,1,2,3,4,5,6,7"
52 },
53 {
54 "EventCode": "0x79",
55 "UMask": "0x30",
56 "BriefDescription": "Uops delivered to Instruction Decode Queue (IDQ) while Microcode Sequenser (MS) is busy",
57 "Counter": "0,1,2,3", 27 "Counter": "0,1,2,3",
58 "EventName": "IDQ.MS_UOPS", 28 "EventName": "IDQ.MITE_CYCLES",
59 "PublicDescription": "This event counts uops delivered by the Front-end with the assistance of the microcode sequencer. Microcode assists are used for complex instructions or scenarios that can't be handled by the standard decoder. Using other instructions, if possible, will usually improve performance.", 29 "CounterMask": "1",
60 "SampleAfterValue": "2000003", 30 "SampleAfterValue": "2000003",
61 "CounterHTOff": "0,1,2,3,4,5,6,7" 31 "CounterHTOff": "0,1,2,3,4,5,6,7"
62 }, 32 },
63 { 33 {
64 "EventCode": "0x79", 34 "EventCode": "0x79",
65 "UMask": "0x30", 35 "UMask": "0x8",
66 "BriefDescription": "Cycles when uops are being delivered to Instruction Decode Queue (IDQ) while Microcode Sequenser (MS) is busy", 36 "BriefDescription": "Uops delivered to Instruction Decode Queue (IDQ) from the Decode Stream Buffer (DSB) path",
67 "Counter": "0,1,2,3", 37 "Counter": "0,1,2,3",
68 "EventName": "IDQ.MS_CYCLES", 38 "EventName": "IDQ.DSB_UOPS",
69 "CounterMask": "1", 39 "PublicDescription": "Increment each cycle. # of uops delivered to IDQ from DSB path. Set Cmask = 1 to count cycles.",
70 "PublicDescription": "This event counts cycles during which the microcode sequencer assisted the Front-end in delivering uops. Microcode assists are used for complex instructions or scenarios that can't be handled by the standard decoder. Using other instructions, if possible, will usually improve performance.",
71 "SampleAfterValue": "2000003", 40 "SampleAfterValue": "2000003",
72 "CounterHTOff": "0,1,2,3,4,5,6,7" 41 "CounterHTOff": "0,1,2,3,4,5,6,7"
73 }, 42 },
74 { 43 {
75 "EventCode": "0x79", 44 "EventCode": "0x79",
76 "UMask": "0x4", 45 "UMask": "0x8",
77 "BriefDescription": "Cycles when uops are being delivered to Instruction Decode Queue (IDQ) from MITE path.", 46 "BriefDescription": "Cycles when uops are being delivered to Instruction Decode Queue (IDQ) from Decode Stream Buffer (DSB) path.",
78 "Counter": "0,1,2,3", 47 "Counter": "0,1,2,3",
79 "EventName": "IDQ.MITE_CYCLES", 48 "EventName": "IDQ.DSB_CYCLES",
80 "CounterMask": "1", 49 "CounterMask": "1",
81 "SampleAfterValue": "2000003", 50 "SampleAfterValue": "2000003",
82 "CounterHTOff": "0,1,2,3,4,5,6,7" 51 "CounterHTOff": "0,1,2,3,4,5,6,7"
83 }, 52 },
84 { 53 {
85 "EventCode": "0x79", 54 "EventCode": "0x79",
86 "UMask": "0x8", 55 "UMask": "0x10",
87 "BriefDescription": "Cycles when uops are being delivered to Instruction Decode Queue (IDQ) from Decode Stream Buffer (DSB) path.", 56 "BriefDescription": "Uops initiated by Decode Stream Buffer (DSB) that are being delivered to Instruction Decode Queue (IDQ) while Microcode Sequenser (MS) is busy",
88 "Counter": "0,1,2,3", 57 "Counter": "0,1,2,3",
89 "EventName": "IDQ.DSB_CYCLES", 58 "EventName": "IDQ.MS_DSB_UOPS",
90 "CounterMask": "1", 59 "PublicDescription": "Increment each cycle # of uops delivered to IDQ when MS_busy by DSB. Set Cmask = 1 to count cycles. Add Edge=1 to count # of delivery.",
91 "SampleAfterValue": "2000003", 60 "SampleAfterValue": "2000003",
92 "CounterHTOff": "0,1,2,3,4,5,6,7" 61 "CounterHTOff": "0,1,2,3,4,5,6,7"
93 }, 62 },
@@ -136,6 +105,16 @@
136 }, 105 },
137 { 106 {
138 "EventCode": "0x79", 107 "EventCode": "0x79",
108 "UMask": "0x20",
109 "BriefDescription": "Uops initiated by MITE and delivered to Instruction Decode Queue (IDQ) while Microcode Sequenser (MS) is busy",
110 "Counter": "0,1,2,3",
111 "EventName": "IDQ.MS_MITE_UOPS",
112 "PublicDescription": "Increment each cycle # of uops delivered to IDQ when MS_busy by MITE. Set Cmask = 1 to count cycles.",
113 "SampleAfterValue": "2000003",
114 "CounterHTOff": "0,1,2,3,4,5,6,7"
115 },
116 {
117 "EventCode": "0x79",
139 "UMask": "0x24", 118 "UMask": "0x24",
140 "BriefDescription": "Cycles MITE is delivering 4 Uops", 119 "BriefDescription": "Cycles MITE is delivering 4 Uops",
141 "Counter": "0,1,2,3", 120 "Counter": "0,1,2,3",
@@ -158,6 +137,38 @@
158 }, 137 },
159 { 138 {
160 "EventCode": "0x79", 139 "EventCode": "0x79",
140 "UMask": "0x30",
141 "BriefDescription": "Uops delivered to Instruction Decode Queue (IDQ) while Microcode Sequenser (MS) is busy",
142 "Counter": "0,1,2,3",
143 "EventName": "IDQ.MS_UOPS",
144 "PublicDescription": "This event counts uops delivered by the Front-end with the assistance of the microcode sequencer. Microcode assists are used for complex instructions or scenarios that can't be handled by the standard decoder. Using other instructions, if possible, will usually improve performance.",
145 "SampleAfterValue": "2000003",
146 "CounterHTOff": "0,1,2,3,4,5,6,7"
147 },
148 {
149 "EventCode": "0x79",
150 "UMask": "0x30",
151 "BriefDescription": "Cycles when uops are being delivered to Instruction Decode Queue (IDQ) while Microcode Sequenser (MS) is busy",
152 "Counter": "0,1,2,3",
153 "EventName": "IDQ.MS_CYCLES",
154 "CounterMask": "1",
155 "PublicDescription": "This event counts cycles during which the microcode sequencer assisted the Front-end in delivering uops. Microcode assists are used for complex instructions or scenarios that can't be handled by the standard decoder. Using other instructions, if possible, will usually improve performance.",
156 "SampleAfterValue": "2000003",
157 "CounterHTOff": "0,1,2,3,4,5,6,7"
158 },
159 {
160 "EdgeDetect": "1",
161 "EventCode": "0x79",
162 "UMask": "0x30",
163 "BriefDescription": "Number of switches from DSB (Decode Stream Buffer) or MITE (legacy decode pipeline) to the Microcode Sequencer.",
164 "Counter": "0,1,2,3",
165 "EventName": "IDQ.MS_SWITCHES",
166 "CounterMask": "1",
167 "SampleAfterValue": "2000003",
168 "CounterHTOff": "0,1,2,3,4,5,6,7"
169 },
170 {
171 "EventCode": "0x79",
161 "UMask": "0x3c", 172 "UMask": "0x3c",
162 "BriefDescription": "Uops delivered to Instruction Decode Queue (IDQ) from MITE path", 173 "BriefDescription": "Uops delivered to Instruction Decode Queue (IDQ) from MITE path",
163 "Counter": "0,1,2,3", 174 "Counter": "0,1,2,3",
@@ -195,6 +206,15 @@
195 "CounterHTOff": "0,1,2,3,4,5,6,7" 206 "CounterHTOff": "0,1,2,3,4,5,6,7"
196 }, 207 },
197 { 208 {
209 "EventCode": "0x80",
210 "UMask": "0x4",
211 "BriefDescription": "Cycles where a code fetch is stalled due to L1 instruction-cache miss.",
212 "Counter": "0,1,2,3",
213 "EventName": "ICACHE.IFDATA_STALL",
214 "SampleAfterValue": "2000003",
215 "CounterHTOff": "0,1,2,3,4,5,6,7"
216 },
217 {
198 "EventCode": "0x9C", 218 "EventCode": "0x9C",
199 "UMask": "0x1", 219 "UMask": "0x1",
200 "BriefDescription": "Uops not delivered to Resource Allocation Table (RAT) per thread when backend of the machine is not stalled", 220 "BriefDescription": "Uops not delivered to Resource Allocation Table (RAT) per thread when backend of the machine is not stalled",
@@ -270,25 +290,5 @@
270 "EventName": "DSB2MITE_SWITCHES.PENALTY_CYCLES", 290 "EventName": "DSB2MITE_SWITCHES.PENALTY_CYCLES",
271 "SampleAfterValue": "2000003", 291 "SampleAfterValue": "2000003",
272 "CounterHTOff": "0,1,2,3,4,5,6,7" 292 "CounterHTOff": "0,1,2,3,4,5,6,7"
273 },
274 {
275 "EdgeDetect": "1",
276 "EventCode": "0x79",
277 "UMask": "0x30",
278 "BriefDescription": "Number of switches from DSB (Decode Stream Buffer) or MITE (legacy decode pipeline) to the Microcode Sequencer.",
279 "Counter": "0,1,2,3",
280 "EventName": "IDQ.MS_SWITCHES",
281 "CounterMask": "1",
282 "SampleAfterValue": "2000003",
283 "CounterHTOff": "0,1,2,3,4,5,6,7"
284 },
285 {
286 "EventCode": "0x80",
287 "UMask": "0x4",
288 "BriefDescription": "Cycles where a code fetch is stalled due to L1 instruction-cache miss.",
289 "Counter": "0,1,2,3",
290 "EventName": "ICACHE.IFDATA_STALL",
291 "SampleAfterValue": "2000003",
292 "CounterHTOff": "0,1,2,3,4,5,6,7"
293 } 293 }
294] \ No newline at end of file 294] \ No newline at end of file
diff --git a/tools/perf/pmu-events/arch/x86/haswellx/hsx-metrics.json b/tools/perf/pmu-events/arch/x86/haswellx/hsx-metrics.json
new file mode 100644
index 000000000000..5ab5c78fe580
--- /dev/null
+++ b/tools/perf/pmu-events/arch/x86/haswellx/hsx-metrics.json
@@ -0,0 +1,158 @@
1[
2 {
3 "BriefDescription": "Instructions Per Cycle (per logical thread)",
4 "MetricExpr": "INST_RETIRED.ANY / CPU_CLK_UNHALTED.THREAD",
5 "MetricGroup": "TopDownL1",
6 "MetricName": "IPC"
7 },
8 {
9 "BriefDescription": "Uops Per Instruction",
10 "MetricExpr": "UOPS_RETIRED.RETIRE_SLOTS / INST_RETIRED.ANY",
11 "MetricGroup": "Pipeline",
12 "MetricName": "UPI"
13 },
14 {
15 "BriefDescription": "Rough Estimation of fraction of fetched lines bytes that were likely consumed by program instructions",
16 "MetricExpr": "min( 1 , IDQ.MITE_UOPS / ( (UOPS_RETIRED.RETIRE_SLOTS / INST_RETIRED.ANY) * 16 * ( ICACHE.HIT + ICACHE.MISSES ) / 4.0 ) )",
17 "MetricGroup": "Frontend",
18 "MetricName": "IFetch_Line_Utilization"
19 },
20 {
21 "BriefDescription": "Fraction of Uops delivered by the DSB (aka Decoded Icache; or Uop Cache)",
22 "MetricExpr": "IDQ.DSB_UOPS / ( IDQ.DSB_UOPS + LSD.UOPS + IDQ.MITE_UOPS + IDQ.MS_UOPS )",
23 "MetricGroup": "DSB; Frontend_Bandwidth",
24 "MetricName": "DSB_Coverage"
25 },
26 {
27 "BriefDescription": "Cycles Per Instruction (threaded)",
28 "MetricExpr": "1 / (INST_RETIRED.ANY / cycles)",
29 "MetricGroup": "Pipeline;Summary",
30 "MetricName": "CPI"
31 },
32 {
33 "BriefDescription": "Per-thread actual clocks when the logical processor is active. This is called 'Clockticks' in VTune.",
34 "MetricExpr": "CPU_CLK_UNHALTED.THREAD",
35 "MetricGroup": "Summary",
36 "MetricName": "CLKS"
37 },
38 {
39 "BriefDescription": "Total issue-pipeline slots",
40 "MetricExpr": "4*(( CPU_CLK_UNHALTED.THREAD_ANY / 2 ) if #SMT_on else cycles)",
41 "MetricGroup": "TopDownL1",
42 "MetricName": "SLOTS"
43 },
44 {
45 "BriefDescription": "Total number of retired Instructions",
46 "MetricExpr": "INST_RETIRED.ANY",
47 "MetricGroup": "Summary",
48 "MetricName": "Instructions"
49 },
50 {
51 "BriefDescription": "Instructions Per Cycle (per physical core)",
52 "MetricExpr": "INST_RETIRED.ANY / (( CPU_CLK_UNHALTED.THREAD_ANY / 2 ) if #SMT_on else cycles)",
53 "MetricGroup": "SMT",
54 "MetricName": "CoreIPC"
55 },
56 {
57 "BriefDescription": "Instruction-Level-Parallelism (average number of uops executed when there is at least 1 uop executed)",
58 "MetricExpr": "( UOPS_EXECUTED.CORE / 2 / (( cpu@UOPS_EXECUTED.CORE\\,cmask\\=1@ / 2) if #SMT_on else cpu@UOPS_EXECUTED.CORE\\,cmask\\=1@) ) if #SMT_on else UOPS_EXECUTED.CORE / (( cpu@UOPS_EXECUTED.CORE\\,cmask\\=1@ / 2) if #SMT_on else cpu@UOPS_EXECUTED.CORE\\,cmask\\=1@)",
59 "MetricGroup": "Pipeline;Ports_Utilization",
60 "MetricName": "ILP"
61 },
62 {
63 "BriefDescription": "Average Branch Address Clear Cost (fraction of cycles)",
64 "MetricExpr": "2* (( RS_EVENTS.EMPTY_CYCLES - ICACHE.IFDATA_STALL - (( 14 * ITLB_MISSES.STLB_HIT + ITLB_MISSES.WALK_DURATION )) ) / RS_EVENTS.EMPTY_END)",
65 "MetricGroup": "Unknown_Branches",
66 "MetricName": "BAClear_Cost"
67 },
68 {
69 "BriefDescription": "Core actual clocks when any thread is active on the physical core",
70 "MetricExpr": "( CPU_CLK_UNHALTED.THREAD_ANY / 2 ) if #SMT_on else CPU_CLK_UNHALTED.THREAD",
71 "MetricGroup": "SMT",
72 "MetricName": "CORE_CLKS"
73 },
74 {
75 "BriefDescription": "Actual Average Latency for L1 data-cache miss demand loads",
76 "MetricExpr": "L1D_PEND_MISS.PENDING / ( MEM_LOAD_UOPS_RETIRED.L1_MISS + mem_load_uops_retired.hit_lfb )",
77 "MetricGroup": "Memory_Bound;Memory_Lat",
78 "MetricName": "Load_Miss_Real_Latency"
79 },
80 {
81 "BriefDescription": "Memory-Level-Parallelism (average number of L1 miss demand load when there is at least 1 such miss)",
82 "MetricExpr": "L1D_PEND_MISS.PENDING / (( cpu@l1d_pend_miss.pending_cycles\\,any\\=1@ / 2) if #SMT_on else L1D_PEND_MISS.PENDING_CYCLES)",
83 "MetricGroup": "Memory_Bound;Memory_BW",
84 "MetricName": "MLP"
85 },
86 {
87 "BriefDescription": "Utilization of the core's Page Walker(s) serving STLB misses triggered by instruction/Load/Store accesses",
88 "MetricExpr": "( ITLB_MISSES.WALK_DURATION + DTLB_LOAD_MISSES.WALK_DURATION + DTLB_STORE_MISSES.WALK_DURATION ) / (( CPU_CLK_UNHALTED.THREAD_ANY / 2 ) if #SMT_on else cycles)",
89 "MetricGroup": "TLB",
90 "MetricName": "Page_Walks_Utilization"
91 },
92 {
93 "BriefDescription": "Average CPU Utilization",
94 "MetricExpr": "CPU_CLK_UNHALTED.REF_TSC / msr@tsc@",
95 "MetricGroup": "Summary",
96 "MetricName": "CPU_Utilization"
97 },
98 {
99 "BriefDescription": "Average Frequency Utilization relative nominal frequency",
100 "MetricExpr": "CPU_CLK_UNHALTED.THREAD / CPU_CLK_UNHALTED.REF_TSC",
101 "MetricGroup": "Power",
102 "MetricName": "Turbo_Utilization"
103 },
104 {
105 "BriefDescription": "Fraction of cycles where both hardware threads were active",
106 "MetricExpr": "1 - CPU_CLK_THREAD_UNHALTED.ONE_THREAD_ACTIVE / ( CPU_CLK_THREAD_UNHALTED.REF_XCLK_ANY / 2 ) if #SMT_on else 0",
107 "MetricGroup": "SMT;Summary",
108 "MetricName": "SMT_2T_Utilization"
109 },
110 {
111 "BriefDescription": "Fraction of cycles spent in Kernel mode",
112 "MetricExpr": "CPU_CLK_UNHALTED.REF_TSC:u / CPU_CLK_UNHALTED.REF_TSC",
113 "MetricGroup": "Summary",
114 "MetricName": "Kernel_Utilization"
115 },
116 {
117 "BriefDescription": "C3 residency percent per core",
118 "MetricExpr": "(cstate_core@c3\\-residency@ / msr@tsc@) * 100",
119 "MetricGroup": "Power",
120 "MetricName": "C3_Core_Residency"
121 },
122 {
123 "BriefDescription": "C6 residency percent per core",
124 "MetricExpr": "(cstate_core@c6\\-residency@ / msr@tsc@) * 100",
125 "MetricGroup": "Power",
126 "MetricName": "C6_Core_Residency"
127 },
128 {
129 "BriefDescription": "C7 residency percent per core",
130 "MetricExpr": "(cstate_core@c7\\-residency@ / msr@tsc@) * 100",
131 "MetricGroup": "Power",
132 "MetricName": "C7_Core_Residency"
133 },
134 {
135 "BriefDescription": "C2 residency percent per package",
136 "MetricExpr": "(cstate_pkg@c2\\-residency@ / msr@tsc@) * 100",
137 "MetricGroup": "Power",
138 "MetricName": "C2_Pkg_Residency"
139 },
140 {
141 "BriefDescription": "C3 residency percent per package",
142 "MetricExpr": "(cstate_pkg@c3\\-residency@ / msr@tsc@) * 100",
143 "MetricGroup": "Power",
144 "MetricName": "C3_Pkg_Residency"
145 },
146 {
147 "BriefDescription": "C6 residency percent per package",
148 "MetricExpr": "(cstate_pkg@c6\\-residency@ / msr@tsc@) * 100",
149 "MetricGroup": "Power",
150 "MetricName": "C6_Pkg_Residency"
151 },
152 {
153 "BriefDescription": "C7 residency percent per package",
154 "MetricExpr": "(cstate_pkg@c7\\-residency@ / msr@tsc@) * 100",
155 "MetricGroup": "Power",
156 "MetricName": "C7_Pkg_Residency"
157 }
158]
diff --git a/tools/perf/pmu-events/arch/x86/haswellx/memory.json b/tools/perf/pmu-events/arch/x86/haswellx/memory.json
index 0886cc000d22..56b0f24b8029 100644
--- a/tools/perf/pmu-events/arch/x86/haswellx/memory.json
+++ b/tools/perf/pmu-events/arch/x86/haswellx/memory.json
@@ -409,6 +409,7 @@
409 "Counter": "0,1,2,3", 409 "Counter": "0,1,2,3",
410 "EventName": "OFFCORE_RESPONSE.DEMAND_DATA_RD.LLC_MISS.ANY_RESPONSE", 410 "EventName": "OFFCORE_RESPONSE.DEMAND_DATA_RD.LLC_MISS.ANY_RESPONSE",
411 "MSRIndex": "0x1a6,0x1a7", 411 "MSRIndex": "0x1a6,0x1a7",
412 "PublicDescription": "Counts demand data reads that miss in the L3 Offcore response can be programmed only with a specific pair of event select and counter MSR, and with specific event codes and predefine mask bit value in a dedicated MSR to specify attributes of the offcore transaction.",
412 "SampleAfterValue": "100003", 413 "SampleAfterValue": "100003",
413 "CounterHTOff": "0,1,2,3" 414 "CounterHTOff": "0,1,2,3"
414 }, 415 },
@@ -421,6 +422,7 @@
421 "Counter": "0,1,2,3", 422 "Counter": "0,1,2,3",
422 "EventName": "OFFCORE_RESPONSE.DEMAND_DATA_RD.LLC_MISS.LOCAL_DRAM", 423 "EventName": "OFFCORE_RESPONSE.DEMAND_DATA_RD.LLC_MISS.LOCAL_DRAM",
423 "MSRIndex": "0x1a6,0x1a7", 424 "MSRIndex": "0x1a6,0x1a7",
425 "PublicDescription": "Counts demand data reads that miss the L3 and the data is returned from local dram Offcore response can be programmed only with a specific pair of event select and counter MSR, and with specific event codes and predefine mask bit value in a dedicated MSR to specify attributes of the offcore transaction.",
424 "SampleAfterValue": "100003", 426 "SampleAfterValue": "100003",
425 "CounterHTOff": "0,1,2,3" 427 "CounterHTOff": "0,1,2,3"
426 }, 428 },
@@ -433,6 +435,7 @@
433 "Counter": "0,1,2,3", 435 "Counter": "0,1,2,3",
434 "EventName": "OFFCORE_RESPONSE.DEMAND_RFO.LLC_MISS.ANY_RESPONSE", 436 "EventName": "OFFCORE_RESPONSE.DEMAND_RFO.LLC_MISS.ANY_RESPONSE",
435 "MSRIndex": "0x1a6,0x1a7", 437 "MSRIndex": "0x1a6,0x1a7",
438 "PublicDescription": "Counts all demand data writes (RFOs) that miss in the L3 Offcore response can be programmed only with a specific pair of event select and counter MSR, and with specific event codes and predefine mask bit value in a dedicated MSR to specify attributes of the offcore transaction.",
436 "SampleAfterValue": "100003", 439 "SampleAfterValue": "100003",
437 "CounterHTOff": "0,1,2,3" 440 "CounterHTOff": "0,1,2,3"
438 }, 441 },
@@ -445,6 +448,7 @@
445 "Counter": "0,1,2,3", 448 "Counter": "0,1,2,3",
446 "EventName": "OFFCORE_RESPONSE.DEMAND_RFO.LLC_MISS.LOCAL_DRAM", 449 "EventName": "OFFCORE_RESPONSE.DEMAND_RFO.LLC_MISS.LOCAL_DRAM",
447 "MSRIndex": "0x1a6,0x1a7", 450 "MSRIndex": "0x1a6,0x1a7",
451 "PublicDescription": "Counts all demand data writes (RFOs) that miss the L3 and the data is returned from local dram Offcore response can be programmed only with a specific pair of event select and counter MSR, and with specific event codes and predefine mask bit value in a dedicated MSR to specify attributes of the offcore transaction.",
448 "SampleAfterValue": "100003", 452 "SampleAfterValue": "100003",
449 "CounterHTOff": "0,1,2,3" 453 "CounterHTOff": "0,1,2,3"
450 }, 454 },
@@ -457,6 +461,7 @@
457 "Counter": "0,1,2,3", 461 "Counter": "0,1,2,3",
458 "EventName": "OFFCORE_RESPONSE.DEMAND_RFO.LLC_MISS.REMOTE_HITM", 462 "EventName": "OFFCORE_RESPONSE.DEMAND_RFO.LLC_MISS.REMOTE_HITM",
459 "MSRIndex": "0x1a6,0x1a7", 463 "MSRIndex": "0x1a6,0x1a7",
464 "PublicDescription": "Counts all demand data writes (RFOs) that miss the L3 and the modified data is transferred from remote cache Offcore response can be programmed only with a specific pair of event select and counter MSR, and with specific event codes and predefine mask bit value in a dedicated MSR to specify attributes of the offcore transaction.",
460 "SampleAfterValue": "100003", 465 "SampleAfterValue": "100003",
461 "CounterHTOff": "0,1,2,3" 466 "CounterHTOff": "0,1,2,3"
462 }, 467 },
@@ -469,6 +474,7 @@
469 "Counter": "0,1,2,3", 474 "Counter": "0,1,2,3",
470 "EventName": "OFFCORE_RESPONSE.DEMAND_CODE_RD.LLC_MISS.ANY_RESPONSE", 475 "EventName": "OFFCORE_RESPONSE.DEMAND_CODE_RD.LLC_MISS.ANY_RESPONSE",
471 "MSRIndex": "0x1a6,0x1a7", 476 "MSRIndex": "0x1a6,0x1a7",
477 "PublicDescription": "Counts all demand code reads that miss in the L3 Offcore response can be programmed only with a specific pair of event select and counter MSR, and with specific event codes and predefine mask bit value in a dedicated MSR to specify attributes of the offcore transaction.",
472 "SampleAfterValue": "100003", 478 "SampleAfterValue": "100003",
473 "CounterHTOff": "0,1,2,3" 479 "CounterHTOff": "0,1,2,3"
474 }, 480 },
@@ -481,6 +487,7 @@
481 "Counter": "0,1,2,3", 487 "Counter": "0,1,2,3",
482 "EventName": "OFFCORE_RESPONSE.DEMAND_CODE_RD.LLC_MISS.LOCAL_DRAM", 488 "EventName": "OFFCORE_RESPONSE.DEMAND_CODE_RD.LLC_MISS.LOCAL_DRAM",
483 "MSRIndex": "0x1a6,0x1a7", 489 "MSRIndex": "0x1a6,0x1a7",
490 "PublicDescription": "Counts all demand code reads that miss the L3 and the data is returned from local dram Offcore response can be programmed only with a specific pair of event select and counter MSR, and with specific event codes and predefine mask bit value in a dedicated MSR to specify attributes of the offcore transaction.",
484 "SampleAfterValue": "100003", 491 "SampleAfterValue": "100003",
485 "CounterHTOff": "0,1,2,3" 492 "CounterHTOff": "0,1,2,3"
486 }, 493 },
@@ -493,6 +500,7 @@
493 "Counter": "0,1,2,3", 500 "Counter": "0,1,2,3",
494 "EventName": "OFFCORE_RESPONSE.PF_L2_DATA_RD.LLC_MISS.ANY_RESPONSE", 501 "EventName": "OFFCORE_RESPONSE.PF_L2_DATA_RD.LLC_MISS.ANY_RESPONSE",
495 "MSRIndex": "0x1a6,0x1a7", 502 "MSRIndex": "0x1a6,0x1a7",
503 "PublicDescription": "Counts prefetch (that bring data to L2) data reads that miss in the L3 Offcore response can be programmed only with a specific pair of event select and counter MSR, and with specific event codes and predefine mask bit value in a dedicated MSR to specify attributes of the offcore transaction.",
496 "SampleAfterValue": "100003", 504 "SampleAfterValue": "100003",
497 "CounterHTOff": "0,1,2,3" 505 "CounterHTOff": "0,1,2,3"
498 }, 506 },
@@ -505,6 +513,7 @@
505 "Counter": "0,1,2,3", 513 "Counter": "0,1,2,3",
506 "EventName": "OFFCORE_RESPONSE.PF_L2_RFO.LLC_MISS.ANY_RESPONSE", 514 "EventName": "OFFCORE_RESPONSE.PF_L2_RFO.LLC_MISS.ANY_RESPONSE",
507 "MSRIndex": "0x1a6,0x1a7", 515 "MSRIndex": "0x1a6,0x1a7",
516 "PublicDescription": "Counts all prefetch (that bring data to L2) RFOs that miss in the L3 Offcore response can be programmed only with a specific pair of event select and counter MSR, and with specific event codes and predefine mask bit value in a dedicated MSR to specify attributes of the offcore transaction.",
508 "SampleAfterValue": "100003", 517 "SampleAfterValue": "100003",
509 "CounterHTOff": "0,1,2,3" 518 "CounterHTOff": "0,1,2,3"
510 }, 519 },
@@ -517,6 +526,7 @@
517 "Counter": "0,1,2,3", 526 "Counter": "0,1,2,3",
518 "EventName": "OFFCORE_RESPONSE.PF_L2_CODE_RD.LLC_MISS.ANY_RESPONSE", 527 "EventName": "OFFCORE_RESPONSE.PF_L2_CODE_RD.LLC_MISS.ANY_RESPONSE",
519 "MSRIndex": "0x1a6,0x1a7", 528 "MSRIndex": "0x1a6,0x1a7",
529 "PublicDescription": "Counts all prefetch (that bring data to LLC only) code reads that miss in the L3 Offcore response can be programmed only with a specific pair of event select and counter MSR, and with specific event codes and predefine mask bit value in a dedicated MSR to specify attributes of the offcore transaction.",
520 "SampleAfterValue": "100003", 530 "SampleAfterValue": "100003",
521 "CounterHTOff": "0,1,2,3" 531 "CounterHTOff": "0,1,2,3"
522 }, 532 },
@@ -529,6 +539,7 @@
529 "Counter": "0,1,2,3", 539 "Counter": "0,1,2,3",
530 "EventName": "OFFCORE_RESPONSE.PF_LLC_DATA_RD.LLC_MISS.ANY_RESPONSE", 540 "EventName": "OFFCORE_RESPONSE.PF_LLC_DATA_RD.LLC_MISS.ANY_RESPONSE",
531 "MSRIndex": "0x1a6,0x1a7", 541 "MSRIndex": "0x1a6,0x1a7",
542 "PublicDescription": "Counts all prefetch (that bring data to LLC only) data reads that miss in the L3 Offcore response can be programmed only with a specific pair of event select and counter MSR, and with specific event codes and predefine mask bit value in a dedicated MSR to specify attributes of the offcore transaction.",
532 "SampleAfterValue": "100003", 543 "SampleAfterValue": "100003",
533 "CounterHTOff": "0,1,2,3" 544 "CounterHTOff": "0,1,2,3"
534 }, 545 },
@@ -541,6 +552,7 @@
541 "Counter": "0,1,2,3", 552 "Counter": "0,1,2,3",
542 "EventName": "OFFCORE_RESPONSE.PF_LLC_RFO.LLC_MISS.ANY_RESPONSE", 553 "EventName": "OFFCORE_RESPONSE.PF_LLC_RFO.LLC_MISS.ANY_RESPONSE",
543 "MSRIndex": "0x1a6,0x1a7", 554 "MSRIndex": "0x1a6,0x1a7",
555 "PublicDescription": "Counts all prefetch (that bring data to LLC only) RFOs that miss in the L3 Offcore response can be programmed only with a specific pair of event select and counter MSR, and with specific event codes and predefine mask bit value in a dedicated MSR to specify attributes of the offcore transaction.",
544 "SampleAfterValue": "100003", 556 "SampleAfterValue": "100003",
545 "CounterHTOff": "0,1,2,3" 557 "CounterHTOff": "0,1,2,3"
546 }, 558 },
@@ -553,6 +565,7 @@
553 "Counter": "0,1,2,3", 565 "Counter": "0,1,2,3",
554 "EventName": "OFFCORE_RESPONSE.PF_LLC_CODE_RD.LLC_MISS.ANY_RESPONSE", 566 "EventName": "OFFCORE_RESPONSE.PF_LLC_CODE_RD.LLC_MISS.ANY_RESPONSE",
555 "MSRIndex": "0x1a6,0x1a7", 567 "MSRIndex": "0x1a6,0x1a7",
568 "PublicDescription": "Counts prefetch (that bring data to LLC only) code reads that miss in the L3 Offcore response can be programmed only with a specific pair of event select and counter MSR, and with specific event codes and predefine mask bit value in a dedicated MSR to specify attributes of the offcore transaction.",
556 "SampleAfterValue": "100003", 569 "SampleAfterValue": "100003",
557 "CounterHTOff": "0,1,2,3" 570 "CounterHTOff": "0,1,2,3"
558 }, 571 },
@@ -565,6 +578,7 @@
565 "Counter": "0,1,2,3", 578 "Counter": "0,1,2,3",
566 "EventName": "OFFCORE_RESPONSE.ALL_DATA_RD.LLC_MISS.ANY_RESPONSE", 579 "EventName": "OFFCORE_RESPONSE.ALL_DATA_RD.LLC_MISS.ANY_RESPONSE",
567 "MSRIndex": "0x1a6,0x1a7", 580 "MSRIndex": "0x1a6,0x1a7",
581 "PublicDescription": "Counts all demand & prefetch data reads that miss in the L3 Offcore response can be programmed only with a specific pair of event select and counter MSR, and with specific event codes and predefine mask bit value in a dedicated MSR to specify attributes of the offcore transaction.",
568 "SampleAfterValue": "100003", 582 "SampleAfterValue": "100003",
569 "CounterHTOff": "0,1,2,3" 583 "CounterHTOff": "0,1,2,3"
570 }, 584 },
@@ -577,6 +591,7 @@
577 "Counter": "0,1,2,3", 591 "Counter": "0,1,2,3",
578 "EventName": "OFFCORE_RESPONSE.ALL_DATA_RD.LLC_MISS.LOCAL_DRAM", 592 "EventName": "OFFCORE_RESPONSE.ALL_DATA_RD.LLC_MISS.LOCAL_DRAM",
579 "MSRIndex": "0x1a6,0x1a7", 593 "MSRIndex": "0x1a6,0x1a7",
594 "PublicDescription": "Counts all demand & prefetch data reads that miss the L3 and the data is returned from local dram Offcore response can be programmed only with a specific pair of event select and counter MSR, and with specific event codes and predefine mask bit value in a dedicated MSR to specify attributes of the offcore transaction.",
580 "SampleAfterValue": "100003", 595 "SampleAfterValue": "100003",
581 "CounterHTOff": "0,1,2,3" 596 "CounterHTOff": "0,1,2,3"
582 }, 597 },
@@ -589,6 +604,7 @@
589 "Counter": "0,1,2,3", 604 "Counter": "0,1,2,3",
590 "EventName": "OFFCORE_RESPONSE.ALL_DATA_RD.LLC_MISS.REMOTE_DRAM", 605 "EventName": "OFFCORE_RESPONSE.ALL_DATA_RD.LLC_MISS.REMOTE_DRAM",
591 "MSRIndex": "0x1a6,0x1a7", 606 "MSRIndex": "0x1a6,0x1a7",
607 "PublicDescription": "Counts all demand & prefetch data reads that miss the L3 and the data is returned from remote dram Offcore response can be programmed only with a specific pair of event select and counter MSR, and with specific event codes and predefine mask bit value in a dedicated MSR to specify attributes of the offcore transaction.",
592 "SampleAfterValue": "100003", 608 "SampleAfterValue": "100003",
593 "CounterHTOff": "0,1,2,3" 609 "CounterHTOff": "0,1,2,3"
594 }, 610 },
@@ -601,6 +617,7 @@
601 "Counter": "0,1,2,3", 617 "Counter": "0,1,2,3",
602 "EventName": "OFFCORE_RESPONSE.ALL_DATA_RD.LLC_MISS.REMOTE_HITM", 618 "EventName": "OFFCORE_RESPONSE.ALL_DATA_RD.LLC_MISS.REMOTE_HITM",
603 "MSRIndex": "0x1a6,0x1a7", 619 "MSRIndex": "0x1a6,0x1a7",
620 "PublicDescription": "Counts all demand & prefetch data reads that miss the L3 and the modified data is transferred from remote cache Offcore response can be programmed only with a specific pair of event select and counter MSR, and with specific event codes and predefine mask bit value in a dedicated MSR to specify attributes of the offcore transaction.",
604 "SampleAfterValue": "100003", 621 "SampleAfterValue": "100003",
605 "CounterHTOff": "0,1,2,3" 622 "CounterHTOff": "0,1,2,3"
606 }, 623 },
@@ -613,6 +630,7 @@
613 "Counter": "0,1,2,3", 630 "Counter": "0,1,2,3",
614 "EventName": "OFFCORE_RESPONSE.ALL_DATA_RD.LLC_MISS.REMOTE_HIT_FORWARD", 631 "EventName": "OFFCORE_RESPONSE.ALL_DATA_RD.LLC_MISS.REMOTE_HIT_FORWARD",
615 "MSRIndex": "0x1a6,0x1a7", 632 "MSRIndex": "0x1a6,0x1a7",
633 "PublicDescription": "Counts all demand & prefetch data reads that miss the L3 and clean or shared data is transferred from remote cache Offcore response can be programmed only with a specific pair of event select and counter MSR, and with specific event codes and predefine mask bit value in a dedicated MSR to specify attributes of the offcore transaction.",
616 "SampleAfterValue": "100003", 634 "SampleAfterValue": "100003",
617 "CounterHTOff": "0,1,2,3" 635 "CounterHTOff": "0,1,2,3"
618 }, 636 },
@@ -625,6 +643,7 @@
625 "Counter": "0,1,2,3", 643 "Counter": "0,1,2,3",
626 "EventName": "OFFCORE_RESPONSE.ALL_RFO.LLC_MISS.ANY_RESPONSE", 644 "EventName": "OFFCORE_RESPONSE.ALL_RFO.LLC_MISS.ANY_RESPONSE",
627 "MSRIndex": "0x1a6,0x1a7", 645 "MSRIndex": "0x1a6,0x1a7",
646 "PublicDescription": "Counts all demand & prefetch RFOs that miss in the L3 Offcore response can be programmed only with a specific pair of event select and counter MSR, and with specific event codes and predefine mask bit value in a dedicated MSR to specify attributes of the offcore transaction.",
628 "SampleAfterValue": "100003", 647 "SampleAfterValue": "100003",
629 "CounterHTOff": "0,1,2,3" 648 "CounterHTOff": "0,1,2,3"
630 }, 649 },
@@ -637,6 +656,7 @@
637 "Counter": "0,1,2,3", 656 "Counter": "0,1,2,3",
638 "EventName": "OFFCORE_RESPONSE.ALL_RFO.LLC_MISS.LOCAL_DRAM", 657 "EventName": "OFFCORE_RESPONSE.ALL_RFO.LLC_MISS.LOCAL_DRAM",
639 "MSRIndex": "0x1a6,0x1a7", 658 "MSRIndex": "0x1a6,0x1a7",
659 "PublicDescription": "Counts all demand & prefetch RFOs that miss the L3 and the data is returned from local dram Offcore response can be programmed only with a specific pair of event select and counter MSR, and with specific event codes and predefine mask bit value in a dedicated MSR to specify attributes of the offcore transaction.",
640 "SampleAfterValue": "100003", 660 "SampleAfterValue": "100003",
641 "CounterHTOff": "0,1,2,3" 661 "CounterHTOff": "0,1,2,3"
642 }, 662 },
@@ -649,6 +669,7 @@
649 "Counter": "0,1,2,3", 669 "Counter": "0,1,2,3",
650 "EventName": "OFFCORE_RESPONSE.ALL_CODE_RD.LLC_MISS.ANY_RESPONSE", 670 "EventName": "OFFCORE_RESPONSE.ALL_CODE_RD.LLC_MISS.ANY_RESPONSE",
651 "MSRIndex": "0x1a6,0x1a7", 671 "MSRIndex": "0x1a6,0x1a7",
672 "PublicDescription": "Counts all demand & prefetch code reads that miss in the L3 Offcore response can be programmed only with a specific pair of event select and counter MSR, and with specific event codes and predefine mask bit value in a dedicated MSR to specify attributes of the offcore transaction.",
652 "SampleAfterValue": "100003", 673 "SampleAfterValue": "100003",
653 "CounterHTOff": "0,1,2,3" 674 "CounterHTOff": "0,1,2,3"
654 }, 675 },
@@ -661,6 +682,7 @@
661 "Counter": "0,1,2,3", 682 "Counter": "0,1,2,3",
662 "EventName": "OFFCORE_RESPONSE.ALL_CODE_RD.LLC_MISS.LOCAL_DRAM", 683 "EventName": "OFFCORE_RESPONSE.ALL_CODE_RD.LLC_MISS.LOCAL_DRAM",
663 "MSRIndex": "0x1a6,0x1a7", 684 "MSRIndex": "0x1a6,0x1a7",
685 "PublicDescription": "Counts all demand & prefetch code reads that miss the L3 and the data is returned from local dram Offcore response can be programmed only with a specific pair of event select and counter MSR, and with specific event codes and predefine mask bit value in a dedicated MSR to specify attributes of the offcore transaction.",
664 "SampleAfterValue": "100003", 686 "SampleAfterValue": "100003",
665 "CounterHTOff": "0,1,2,3" 687 "CounterHTOff": "0,1,2,3"
666 }, 688 },
@@ -673,6 +695,7 @@
673 "Counter": "0,1,2,3", 695 "Counter": "0,1,2,3",
674 "EventName": "OFFCORE_RESPONSE.ALL_READS.LLC_MISS.ANY_RESPONSE", 696 "EventName": "OFFCORE_RESPONSE.ALL_READS.LLC_MISS.ANY_RESPONSE",
675 "MSRIndex": "0x1a6,0x1a7", 697 "MSRIndex": "0x1a6,0x1a7",
698 "PublicDescription": "Counts all data/code/rfo reads (demand & prefetch) that miss in the L3 Offcore response can be programmed only with a specific pair of event select and counter MSR, and with specific event codes and predefine mask bit value in a dedicated MSR to specify attributes of the offcore transaction.",
676 "SampleAfterValue": "100003", 699 "SampleAfterValue": "100003",
677 "CounterHTOff": "0,1,2,3" 700 "CounterHTOff": "0,1,2,3"
678 }, 701 },
@@ -685,6 +708,7 @@
685 "Counter": "0,1,2,3", 708 "Counter": "0,1,2,3",
686 "EventName": "OFFCORE_RESPONSE.ALL_READS.LLC_MISS.LOCAL_DRAM", 709 "EventName": "OFFCORE_RESPONSE.ALL_READS.LLC_MISS.LOCAL_DRAM",
687 "MSRIndex": "0x1a6,0x1a7", 710 "MSRIndex": "0x1a6,0x1a7",
711 "PublicDescription": "Counts all data/code/rfo reads (demand & prefetch) that miss the L3 and the data is returned from local dram Offcore response can be programmed only with a specific pair of event select and counter MSR, and with specific event codes and predefine mask bit value in a dedicated MSR to specify attributes of the offcore transaction.",
688 "SampleAfterValue": "100003", 712 "SampleAfterValue": "100003",
689 "CounterHTOff": "0,1,2,3" 713 "CounterHTOff": "0,1,2,3"
690 }, 714 },
@@ -697,6 +721,7 @@
697 "Counter": "0,1,2,3", 721 "Counter": "0,1,2,3",
698 "EventName": "OFFCORE_RESPONSE.ALL_READS.LLC_MISS.REMOTE_DRAM", 722 "EventName": "OFFCORE_RESPONSE.ALL_READS.LLC_MISS.REMOTE_DRAM",
699 "MSRIndex": "0x1a6,0x1a7", 723 "MSRIndex": "0x1a6,0x1a7",
724 "PublicDescription": "Counts all data/code/rfo reads (demand & prefetch) that miss the L3 and the data is returned from remote dram Offcore response can be programmed only with a specific pair of event select and counter MSR, and with specific event codes and predefine mask bit value in a dedicated MSR to specify attributes of the offcore transaction.",
700 "SampleAfterValue": "100003", 725 "SampleAfterValue": "100003",
701 "CounterHTOff": "0,1,2,3" 726 "CounterHTOff": "0,1,2,3"
702 }, 727 },
@@ -709,6 +734,7 @@
709 "Counter": "0,1,2,3", 734 "Counter": "0,1,2,3",
710 "EventName": "OFFCORE_RESPONSE.ALL_READS.LLC_MISS.REMOTE_HITM", 735 "EventName": "OFFCORE_RESPONSE.ALL_READS.LLC_MISS.REMOTE_HITM",
711 "MSRIndex": "0x1a6,0x1a7", 736 "MSRIndex": "0x1a6,0x1a7",
737 "PublicDescription": "Counts all data/code/rfo reads (demand & prefetch) that miss the L3 and the modified data is transferred from remote cache Offcore response can be programmed only with a specific pair of event select and counter MSR, and with specific event codes and predefine mask bit value in a dedicated MSR to specify attributes of the offcore transaction.",
712 "SampleAfterValue": "100003", 738 "SampleAfterValue": "100003",
713 "CounterHTOff": "0,1,2,3" 739 "CounterHTOff": "0,1,2,3"
714 }, 740 },
@@ -721,6 +747,7 @@
721 "Counter": "0,1,2,3", 747 "Counter": "0,1,2,3",
722 "EventName": "OFFCORE_RESPONSE.ALL_READS.LLC_MISS.REMOTE_HIT_FORWARD", 748 "EventName": "OFFCORE_RESPONSE.ALL_READS.LLC_MISS.REMOTE_HIT_FORWARD",
723 "MSRIndex": "0x1a6,0x1a7", 749 "MSRIndex": "0x1a6,0x1a7",
750 "PublicDescription": "Counts all data/code/rfo reads (demand & prefetch) that miss the L3 and clean or shared data is transferred from remote cache Offcore response can be programmed only with a specific pair of event select and counter MSR, and with specific event codes and predefine mask bit value in a dedicated MSR to specify attributes of the offcore transaction.",
724 "SampleAfterValue": "100003", 751 "SampleAfterValue": "100003",
725 "CounterHTOff": "0,1,2,3" 752 "CounterHTOff": "0,1,2,3"
726 }, 753 },
@@ -733,6 +760,7 @@
733 "Counter": "0,1,2,3", 760 "Counter": "0,1,2,3",
734 "EventName": "OFFCORE_RESPONSE.ALL_REQUESTS.LLC_MISS.ANY_RESPONSE", 761 "EventName": "OFFCORE_RESPONSE.ALL_REQUESTS.LLC_MISS.ANY_RESPONSE",
735 "MSRIndex": "0x1a6,0x1a7", 762 "MSRIndex": "0x1a6,0x1a7",
763 "PublicDescription": "Counts all requests that miss in the L3 Offcore response can be programmed only with a specific pair of event select and counter MSR, and with specific event codes and predefine mask bit value in a dedicated MSR to specify attributes of the offcore transaction.",
736 "SampleAfterValue": "100003", 764 "SampleAfterValue": "100003",
737 "CounterHTOff": "0,1,2,3" 765 "CounterHTOff": "0,1,2,3"
738 } 766 }
diff --git a/tools/perf/pmu-events/arch/x86/haswellx/other.json b/tools/perf/pmu-events/arch/x86/haswellx/other.json
index 4e1b6ce96ca3..800e65df31bc 100644
--- a/tools/perf/pmu-events/arch/x86/haswellx/other.json
+++ b/tools/perf/pmu-events/arch/x86/haswellx/other.json
@@ -10,16 +10,6 @@
10 "CounterHTOff": "0,1,2,3,4,5,6,7" 10 "CounterHTOff": "0,1,2,3,4,5,6,7"
11 }, 11 },
12 { 12 {
13 "EventCode": "0x5C",
14 "UMask": "0x2",
15 "BriefDescription": "Unhalted core cycles when thread is in rings 1, 2, or 3",
16 "Counter": "0,1,2,3",
17 "EventName": "CPL_CYCLES.RING123",
18 "PublicDescription": "Unhalted core cycles when the thread is not in ring 0.",
19 "SampleAfterValue": "2000003",
20 "CounterHTOff": "0,1,2,3,4,5,6,7"
21 },
22 {
23 "EdgeDetect": "1", 13 "EdgeDetect": "1",
24 "EventCode": "0x5C", 14 "EventCode": "0x5C",
25 "UMask": "0x1", 15 "UMask": "0x1",
@@ -31,6 +21,16 @@
31 "CounterHTOff": "0,1,2,3,4,5,6,7" 21 "CounterHTOff": "0,1,2,3,4,5,6,7"
32 }, 22 },
33 { 23 {
24 "EventCode": "0x5C",
25 "UMask": "0x2",
26 "BriefDescription": "Unhalted core cycles when thread is in rings 1, 2, or 3",
27 "Counter": "0,1,2,3",
28 "EventName": "CPL_CYCLES.RING123",
29 "PublicDescription": "Unhalted core cycles when the thread is not in ring 0.",
30 "SampleAfterValue": "2000003",
31 "CounterHTOff": "0,1,2,3,4,5,6,7"
32 },
33 {
34 "EventCode": "0x63", 34 "EventCode": "0x63",
35 "UMask": "0x1", 35 "UMask": "0x1",
36 "BriefDescription": "Cycles when L1 and L2 are locked due to UC or split lock", 36 "BriefDescription": "Cycles when L1 and L2 are locked due to UC or split lock",
diff --git a/tools/perf/pmu-events/arch/x86/haswellx/pipeline.json b/tools/perf/pmu-events/arch/x86/haswellx/pipeline.json
index c3a163d34bd7..8a18bfe9e3e4 100644
--- a/tools/perf/pmu-events/arch/x86/haswellx/pipeline.json
+++ b/tools/perf/pmu-events/arch/x86/haswellx/pipeline.json
@@ -3,32 +3,42 @@
3 "EventCode": "0x00", 3 "EventCode": "0x00",
4 "UMask": "0x1", 4 "UMask": "0x1",
5 "BriefDescription": "Instructions retired from execution.", 5 "BriefDescription": "Instructions retired from execution.",
6 "Counter": "Fixed counter 1", 6 "Counter": "Fixed counter 0",
7 "EventName": "INST_RETIRED.ANY", 7 "EventName": "INST_RETIRED.ANY",
8 "Errata": "HSD140, HSD143", 8 "Errata": "HSD140, HSD143",
9 "PublicDescription": "This event counts the number of instructions retired from execution. For instructions that consist of multiple micro-ops, this event counts the retirement of the last micro-op of the instruction. Counting continues during hardware interrupts, traps, and inside interrupt handlers. INST_RETIRED.ANY is counted by a designated fixed counter, leaving the programmable counters available for other events. Faulting executions of GETSEC/VM entry/VM Exit/MWait will not count as retired instructions.", 9 "PublicDescription": "This event counts the number of instructions retired from execution. For instructions that consist of multiple micro-ops, this event counts the retirement of the last micro-op of the instruction. Counting continues during hardware interrupts, traps, and inside interrupt handlers. INST_RETIRED.ANY is counted by a designated fixed counter, leaving the programmable counters available for other events. Faulting executions of GETSEC/VM entry/VM Exit/MWait will not count as retired instructions.",
10 "SampleAfterValue": "2000003", 10 "SampleAfterValue": "2000003",
11 "CounterHTOff": "Fixed counter 1" 11 "CounterHTOff": "Fixed counter 0"
12 }, 12 },
13 { 13 {
14 "EventCode": "0x00", 14 "EventCode": "0x00",
15 "UMask": "0x2", 15 "UMask": "0x2",
16 "BriefDescription": "Core cycles when the thread is not in halt state.", 16 "BriefDescription": "Core cycles when the thread is not in halt state.",
17 "Counter": "Fixed counter 2", 17 "Counter": "Fixed counter 1",
18 "EventName": "CPU_CLK_UNHALTED.THREAD", 18 "EventName": "CPU_CLK_UNHALTED.THREAD",
19 "PublicDescription": "This event counts the number of thread cycles while the thread is not in a halt state. The thread enters the halt state when it is running the HLT instruction. The core frequency may change from time to time due to power or thermal throttling.", 19 "PublicDescription": "This event counts the number of thread cycles while the thread is not in a halt state. The thread enters the halt state when it is running the HLT instruction. The core frequency may change from time to time due to power or thermal throttling.",
20 "SampleAfterValue": "2000003", 20 "SampleAfterValue": "2000003",
21 "CounterHTOff": "Fixed counter 2" 21 "CounterHTOff": "Fixed counter 1"
22 },
23 {
24 "EventCode": "0x00",
25 "UMask": "0x2",
26 "BriefDescription": "Core cycles when at least one thread on the physical core is not in halt state.",
27 "Counter": "Fixed counter 1",
28 "EventName": "CPU_CLK_UNHALTED.THREAD_ANY",
29 "AnyThread": "1",
30 "SampleAfterValue": "2000003",
31 "CounterHTOff": "Fixed counter 1"
22 }, 32 },
23 { 33 {
24 "EventCode": "0x00", 34 "EventCode": "0x00",
25 "UMask": "0x3", 35 "UMask": "0x3",
26 "BriefDescription": "Reference cycles when the core is not in halt state.", 36 "BriefDescription": "Reference cycles when the core is not in halt state.",
27 "Counter": "Fixed counter 3", 37 "Counter": "Fixed counter 2",
28 "EventName": "CPU_CLK_UNHALTED.REF_TSC", 38 "EventName": "CPU_CLK_UNHALTED.REF_TSC",
29 "PublicDescription": "This event counts the number of reference cycles when the core is not in a halt state. The core enters the halt state when it is running the HLT instruction or the MWAIT instruction. This event is not affected by core frequency changes (for example, P states, TM2 transitions) but has the same incrementing frequency as the time stamp counter. This event can approximate elapsed time while the core was not in a halt state.", 39 "PublicDescription": "This event counts the number of reference cycles when the core is not in a halt state. The core enters the halt state when it is running the HLT instruction or the MWAIT instruction. This event is not affected by core frequency changes (for example, P states, TM2 transitions) but has the same incrementing frequency as the time stamp counter. This event can approximate elapsed time while the core was not in a halt state.",
30 "SampleAfterValue": "2000003", 40 "SampleAfterValue": "2000003",
31 "CounterHTOff": "Fixed counter 3" 41 "CounterHTOff": "Fixed counter 2"
32 }, 42 },
33 { 43 {
34 "EventCode": "0x03", 44 "EventCode": "0x03",
@@ -63,7 +73,7 @@
63 { 73 {
64 "EventCode": "0x0D", 74 "EventCode": "0x0D",
65 "UMask": "0x3", 75 "UMask": "0x3",
66 "BriefDescription": "Number of cycles waiting for the checkpoints in Resource Allocation Table (RAT) to be recovered after Nuke due to all other cases except JEClear (e.g. whenever a ucode assist is needed like SSE exception, memory disambiguation, etc...)", 76 "BriefDescription": "Core cycles the allocator was stalled due to recovery from earlier clear event for this thread (e.g. misprediction or memory nuke)",
67 "Counter": "0,1,2,3", 77 "Counter": "0,1,2,3",
68 "EventName": "INT_MISC.RECOVERY_CYCLES", 78 "EventName": "INT_MISC.RECOVERY_CYCLES",
69 "CounterMask": "1", 79 "CounterMask": "1",
@@ -72,6 +82,18 @@
72 "CounterHTOff": "0,1,2,3,4,5,6,7" 82 "CounterHTOff": "0,1,2,3,4,5,6,7"
73 }, 83 },
74 { 84 {
85 "EventCode": "0x0D",
86 "UMask": "0x3",
87 "BriefDescription": "Core cycles the allocator was stalled due to recovery from earlier clear event for any thread running on the physical core (e.g. misprediction or memory nuke)",
88 "Counter": "0,1,2,3",
89 "EventName": "INT_MISC.RECOVERY_CYCLES_ANY",
90 "AnyThread": "1",
91 "CounterMask": "1",
92 "PublicDescription": "Core cycles the allocator was stalled due to recovery from earlier clear event for any thread running on the physical core (e.g. misprediction or memory nuke).",
93 "SampleAfterValue": "2000003",
94 "CounterHTOff": "0,1,2,3,4,5,6,7"
95 },
96 {
75 "EventCode": "0x0E", 97 "EventCode": "0x0E",
76 "UMask": "0x1", 98 "UMask": "0x1",
77 "BriefDescription": "Uops that Resource Allocation Table (RAT) issues to Reservation Station (RS)", 99 "BriefDescription": "Uops that Resource Allocation Table (RAT) issues to Reservation Station (RS)",
@@ -82,6 +104,29 @@
82 "CounterHTOff": "0,1,2,3,4,5,6,7" 104 "CounterHTOff": "0,1,2,3,4,5,6,7"
83 }, 105 },
84 { 106 {
107 "Invert": "1",
108 "EventCode": "0x0E",
109 "UMask": "0x1",
110 "BriefDescription": "Cycles when Resource Allocation Table (RAT) does not issue Uops to Reservation Station (RS) for the thread.",
111 "Counter": "0,1,2,3",
112 "EventName": "UOPS_ISSUED.STALL_CYCLES",
113 "CounterMask": "1",
114 "SampleAfterValue": "2000003",
115 "CounterHTOff": "0,1,2,3"
116 },
117 {
118 "Invert": "1",
119 "EventCode": "0x0E",
120 "UMask": "0x1",
121 "BriefDescription": "Cycles when Resource Allocation Table (RAT) does not issue Uops to Reservation Station (RS) for all threads.",
122 "Counter": "0,1,2,3",
123 "EventName": "UOPS_ISSUED.CORE_STALL_CYCLES",
124 "AnyThread": "1",
125 "CounterMask": "1",
126 "SampleAfterValue": "2000003",
127 "CounterHTOff": "0,1,2,3"
128 },
129 {
85 "EventCode": "0x0E", 130 "EventCode": "0x0E",
86 "UMask": "0x10", 131 "UMask": "0x10",
87 "BriefDescription": "Number of flags-merge uops being allocated. Such uops considered perf sensitive; added by GSR u-arch.", 132 "BriefDescription": "Number of flags-merge uops being allocated. Such uops considered perf sensitive; added by GSR u-arch.",
@@ -112,34 +157,31 @@
112 "CounterHTOff": "0,1,2,3,4,5,6,7" 157 "CounterHTOff": "0,1,2,3,4,5,6,7"
113 }, 158 },
114 { 159 {
115 "Invert": "1", 160 "EventCode": "0x14",
116 "EventCode": "0x0E", 161 "UMask": "0x2",
117 "UMask": "0x1", 162 "BriefDescription": "Any uop executed by the Divider. (This includes all divide uops, sqrt, ...)",
118 "BriefDescription": "Cycles when Resource Allocation Table (RAT) does not issue Uops to Reservation Station (RS) for the thread.",
119 "Counter": "0,1,2,3", 163 "Counter": "0,1,2,3",
120 "EventName": "UOPS_ISSUED.STALL_CYCLES", 164 "EventName": "ARITH.DIVIDER_UOPS",
121 "CounterMask": "1",
122 "SampleAfterValue": "2000003", 165 "SampleAfterValue": "2000003",
123 "CounterHTOff": "0,1,2,3" 166 "CounterHTOff": "0,1,2,3,4,5,6,7"
124 }, 167 },
125 { 168 {
126 "Invert": "1", 169 "EventCode": "0x3C",
127 "EventCode": "0x0E", 170 "UMask": "0x0",
128 "UMask": "0x1", 171 "BriefDescription": "Thread cycles when thread is not in halt state",
129 "BriefDescription": "Cycles when Resource Allocation Table (RAT) does not issue Uops to Reservation Station (RS) for all threads.",
130 "Counter": "0,1,2,3", 172 "Counter": "0,1,2,3",
131 "EventName": "UOPS_ISSUED.CORE_STALL_CYCLES", 173 "EventName": "CPU_CLK_UNHALTED.THREAD_P",
132 "AnyThread": "1", 174 "PublicDescription": "Counts the number of thread cycles while the thread is not in a halt state. The thread enters the halt state when it is running the HLT instruction. The core frequency may change from time to time due to power or thermal throttling.",
133 "CounterMask": "1",
134 "SampleAfterValue": "2000003", 175 "SampleAfterValue": "2000003",
135 "CounterHTOff": "0,1,2,3" 176 "CounterHTOff": "0,1,2,3,4,5,6,7"
136 }, 177 },
137 { 178 {
138 "EventCode": "0x14", 179 "EventCode": "0x3C",
139 "UMask": "0x2", 180 "UMask": "0x0",
140 "BriefDescription": "Any uop executed by the Divider. (This includes all divide uops, sqrt, ...)", 181 "BriefDescription": "Core cycles when at least one thread on the physical core is not in halt state.",
141 "Counter": "0,1,2,3", 182 "Counter": "0,1,2,3",
142 "EventName": "ARITH.DIVIDER_UOPS", 183 "EventName": "CPU_CLK_UNHALTED.THREAD_P_ANY",
184 "AnyThread": "1",
143 "SampleAfterValue": "2000003", 185 "SampleAfterValue": "2000003",
144 "CounterHTOff": "0,1,2,3,4,5,6,7" 186 "CounterHTOff": "0,1,2,3,4,5,6,7"
145 }, 187 },
@@ -154,6 +196,38 @@
154 "CounterHTOff": "0,1,2,3,4,5,6,7" 196 "CounterHTOff": "0,1,2,3,4,5,6,7"
155 }, 197 },
156 { 198 {
199 "EventCode": "0x3C",
200 "UMask": "0x1",
201 "BriefDescription": "Reference cycles when the at least one thread on the physical core is unhalted (counts at 100 MHz rate)",
202 "Counter": "0,1,2,3",
203 "EventName": "CPU_CLK_THREAD_UNHALTED.REF_XCLK_ANY",
204 "AnyThread": "1",
205 "PublicDescription": "Reference cycles when the at least one thread on the physical core is unhalted (counts at 100 MHz rate).",
206 "SampleAfterValue": "2000003",
207 "CounterHTOff": "0,1,2,3,4,5,6,7"
208 },
209 {
210 "EventCode": "0x3C",
211 "UMask": "0x1",
212 "BriefDescription": "Reference cycles when the thread is unhalted (counts at 100 MHz rate)",
213 "Counter": "0,1,2,3",
214 "EventName": "CPU_CLK_UNHALTED.REF_XCLK",
215 "PublicDescription": "Reference cycles when the thread is unhalted. (counts at 100 MHz rate)",
216 "SampleAfterValue": "2000003",
217 "CounterHTOff": "0,1,2,3,4,5,6,7"
218 },
219 {
220 "EventCode": "0x3C",
221 "UMask": "0x1",
222 "BriefDescription": "Reference cycles when the at least one thread on the physical core is unhalted (counts at 100 MHz rate)",
223 "Counter": "0,1,2,3",
224 "EventName": "CPU_CLK_UNHALTED.REF_XCLK_ANY",
225 "AnyThread": "1",
226 "PublicDescription": "Reference cycles when the at least one thread on the physical core is unhalted (counts at 100 MHz rate).",
227 "SampleAfterValue": "2000003",
228 "CounterHTOff": "0,1,2,3,4,5,6,7"
229 },
230 {
157 "EventCode": "0x3c", 231 "EventCode": "0x3c",
158 "UMask": "0x2", 232 "UMask": "0x2",
159 "BriefDescription": "Count XClk pulses when this thread is unhalted and the other thread is halted.", 233 "BriefDescription": "Count XClk pulses when this thread is unhalted and the other thread is halted.",
@@ -163,6 +237,15 @@
163 "CounterHTOff": "0,1,2,3" 237 "CounterHTOff": "0,1,2,3"
164 }, 238 },
165 { 239 {
240 "EventCode": "0x3C",
241 "UMask": "0x2",
242 "BriefDescription": "Count XClk pulses when this thread is unhalted and the other thread is halted.",
243 "Counter": "0,1,2,3",
244 "EventName": "CPU_CLK_UNHALTED.ONE_THREAD_ACTIVE",
245 "SampleAfterValue": "2000003",
246 "CounterHTOff": "0,1,2,3,4,5,6,7"
247 },
248 {
166 "EventCode": "0x4c", 249 "EventCode": "0x4c",
167 "UMask": "0x1", 250 "UMask": "0x1",
168 "BriefDescription": "Not software-prefetch load dispatches that hit FB allocated for software prefetch", 251 "BriefDescription": "Not software-prefetch load dispatches that hit FB allocated for software prefetch",
@@ -233,6 +316,18 @@
233 "CounterHTOff": "0,1,2,3,4,5,6,7" 316 "CounterHTOff": "0,1,2,3,4,5,6,7"
234 }, 317 },
235 { 318 {
319 "EdgeDetect": "1",
320 "Invert": "1",
321 "EventCode": "0x5E",
322 "UMask": "0x1",
323 "BriefDescription": "Counts end of periods where the Reservation Station (RS) was empty. Could be useful to precisely locate Frontend Latency Bound issues.",
324 "Counter": "0,1,2,3",
325 "EventName": "RS_EVENTS.EMPTY_END",
326 "CounterMask": "1",
327 "SampleAfterValue": "200003",
328 "CounterHTOff": "0,1,2,3,4,5,6,7"
329 },
330 {
236 "EventCode": "0x87", 331 "EventCode": "0x87",
237 "UMask": "0x1", 332 "UMask": "0x1",
238 "BriefDescription": "Stalls caused by changing prefix length of the instruction.", 333 "BriefDescription": "Stalls caused by changing prefix length of the instruction.",
@@ -408,6 +503,15 @@
408 }, 503 },
409 { 504 {
410 "EventCode": "0x89", 505 "EventCode": "0x89",
506 "UMask": "0xa0",
507 "BriefDescription": "Taken speculative and retired mispredicted indirect calls.",
508 "Counter": "0,1,2,3",
509 "EventName": "BR_MISP_EXEC.TAKEN_INDIRECT_NEAR_CALL",
510 "SampleAfterValue": "200003",
511 "CounterHTOff": "0,1,2,3,4,5,6,7"
512 },
513 {
514 "EventCode": "0x89",
411 "UMask": "0xc1", 515 "UMask": "0xc1",
412 "BriefDescription": "Speculative and retired mispredicted macro conditional branches.", 516 "BriefDescription": "Speculative and retired mispredicted macro conditional branches.",
413 "Counter": "0,1,2,3", 517 "Counter": "0,1,2,3",
@@ -446,6 +550,26 @@
446 }, 550 },
447 { 551 {
448 "EventCode": "0xA1", 552 "EventCode": "0xA1",
553 "UMask": "0x1",
554 "BriefDescription": "Cycles per core when uops are executed in port 0.",
555 "Counter": "0,1,2,3",
556 "EventName": "UOPS_EXECUTED_PORT.PORT_0_CORE",
557 "AnyThread": "1",
558 "PublicDescription": "Cycles per core when uops are exectuted in port 0.",
559 "SampleAfterValue": "2000003",
560 "CounterHTOff": "0,1,2,3,4,5,6,7"
561 },
562 {
563 "EventCode": "0xA1",
564 "UMask": "0x1",
565 "BriefDescription": "Cycles per thread when uops are executed in port 0.",
566 "Counter": "0,1,2,3",
567 "EventName": "UOPS_DISPATCHED_PORT.PORT_0",
568 "SampleAfterValue": "2000003",
569 "CounterHTOff": "0,1,2,3,4,5,6,7"
570 },
571 {
572 "EventCode": "0xA1",
449 "UMask": "0x2", 573 "UMask": "0x2",
450 "BriefDescription": "Cycles per thread when uops are executed in port 1", 574 "BriefDescription": "Cycles per thread when uops are executed in port 1",
451 "Counter": "0,1,2,3", 575 "Counter": "0,1,2,3",
@@ -456,6 +580,26 @@
456 }, 580 },
457 { 581 {
458 "EventCode": "0xA1", 582 "EventCode": "0xA1",
583 "UMask": "0x2",
584 "BriefDescription": "Cycles per core when uops are executed in port 1.",
585 "Counter": "0,1,2,3",
586 "EventName": "UOPS_EXECUTED_PORT.PORT_1_CORE",
587 "AnyThread": "1",
588 "PublicDescription": "Cycles per core when uops are exectuted in port 1.",
589 "SampleAfterValue": "2000003",
590 "CounterHTOff": "0,1,2,3,4,5,6,7"
591 },
592 {
593 "EventCode": "0xA1",
594 "UMask": "0x2",
595 "BriefDescription": "Cycles per thread when uops are executed in port 1.",
596 "Counter": "0,1,2,3",
597 "EventName": "UOPS_DISPATCHED_PORT.PORT_1",
598 "SampleAfterValue": "2000003",
599 "CounterHTOff": "0,1,2,3,4,5,6,7"
600 },
601 {
602 "EventCode": "0xA1",
459 "UMask": "0x4", 603 "UMask": "0x4",
460 "BriefDescription": "Cycles per thread when uops are executed in port 2", 604 "BriefDescription": "Cycles per thread when uops are executed in port 2",
461 "Counter": "0,1,2,3", 605 "Counter": "0,1,2,3",
@@ -466,6 +610,25 @@
466 }, 610 },
467 { 611 {
468 "EventCode": "0xA1", 612 "EventCode": "0xA1",
613 "UMask": "0x4",
614 "BriefDescription": "Cycles per core when uops are dispatched to port 2.",
615 "Counter": "0,1,2,3",
616 "EventName": "UOPS_EXECUTED_PORT.PORT_2_CORE",
617 "AnyThread": "1",
618 "SampleAfterValue": "2000003",
619 "CounterHTOff": "0,1,2,3,4,5,6,7"
620 },
621 {
622 "EventCode": "0xA1",
623 "UMask": "0x4",
624 "BriefDescription": "Cycles per thread when uops are executed in port 2.",
625 "Counter": "0,1,2,3",
626 "EventName": "UOPS_DISPATCHED_PORT.PORT_2",
627 "SampleAfterValue": "2000003",
628 "CounterHTOff": "0,1,2,3,4,5,6,7"
629 },
630 {
631 "EventCode": "0xA1",
469 "UMask": "0x8", 632 "UMask": "0x8",
470 "BriefDescription": "Cycles per thread when uops are executed in port 3", 633 "BriefDescription": "Cycles per thread when uops are executed in port 3",
471 "Counter": "0,1,2,3", 634 "Counter": "0,1,2,3",
@@ -476,6 +639,25 @@
476 }, 639 },
477 { 640 {
478 "EventCode": "0xA1", 641 "EventCode": "0xA1",
642 "UMask": "0x8",
643 "BriefDescription": "Cycles per core when uops are dispatched to port 3.",
644 "Counter": "0,1,2,3",
645 "EventName": "UOPS_EXECUTED_PORT.PORT_3_CORE",
646 "AnyThread": "1",
647 "SampleAfterValue": "2000003",
648 "CounterHTOff": "0,1,2,3,4,5,6,7"
649 },
650 {
651 "EventCode": "0xA1",
652 "UMask": "0x8",
653 "BriefDescription": "Cycles per thread when uops are executed in port 3.",
654 "Counter": "0,1,2,3",
655 "EventName": "UOPS_DISPATCHED_PORT.PORT_3",
656 "SampleAfterValue": "2000003",
657 "CounterHTOff": "0,1,2,3,4,5,6,7"
658 },
659 {
660 "EventCode": "0xA1",
479 "UMask": "0x10", 661 "UMask": "0x10",
480 "BriefDescription": "Cycles per thread when uops are executed in port 4", 662 "BriefDescription": "Cycles per thread when uops are executed in port 4",
481 "Counter": "0,1,2,3", 663 "Counter": "0,1,2,3",
@@ -486,6 +668,26 @@
486 }, 668 },
487 { 669 {
488 "EventCode": "0xA1", 670 "EventCode": "0xA1",
671 "UMask": "0x10",
672 "BriefDescription": "Cycles per core when uops are executed in port 4.",
673 "Counter": "0,1,2,3",
674 "EventName": "UOPS_EXECUTED_PORT.PORT_4_CORE",
675 "AnyThread": "1",
676 "PublicDescription": "Cycles per core when uops are exectuted in port 4.",
677 "SampleAfterValue": "2000003",
678 "CounterHTOff": "0,1,2,3,4,5,6,7"
679 },
680 {
681 "EventCode": "0xA1",
682 "UMask": "0x10",
683 "BriefDescription": "Cycles per thread when uops are executed in port 4.",
684 "Counter": "0,1,2,3",
685 "EventName": "UOPS_DISPATCHED_PORT.PORT_4",
686 "SampleAfterValue": "2000003",
687 "CounterHTOff": "0,1,2,3,4,5,6,7"
688 },
689 {
690 "EventCode": "0xA1",
489 "UMask": "0x20", 691 "UMask": "0x20",
490 "BriefDescription": "Cycles per thread when uops are executed in port 5", 692 "BriefDescription": "Cycles per thread when uops are executed in port 5",
491 "Counter": "0,1,2,3", 693 "Counter": "0,1,2,3",
@@ -496,6 +698,26 @@
496 }, 698 },
497 { 699 {
498 "EventCode": "0xA1", 700 "EventCode": "0xA1",
701 "UMask": "0x20",
702 "BriefDescription": "Cycles per core when uops are executed in port 5.",
703 "Counter": "0,1,2,3",
704 "EventName": "UOPS_EXECUTED_PORT.PORT_5_CORE",
705 "AnyThread": "1",
706 "PublicDescription": "Cycles per core when uops are exectuted in port 5.",
707 "SampleAfterValue": "2000003",
708 "CounterHTOff": "0,1,2,3,4,5,6,7"
709 },
710 {
711 "EventCode": "0xA1",
712 "UMask": "0x20",
713 "BriefDescription": "Cycles per thread when uops are executed in port 5.",
714 "Counter": "0,1,2,3",
715 "EventName": "UOPS_DISPATCHED_PORT.PORT_5",
716 "SampleAfterValue": "2000003",
717 "CounterHTOff": "0,1,2,3,4,5,6,7"
718 },
719 {
720 "EventCode": "0xA1",
499 "UMask": "0x40", 721 "UMask": "0x40",
500 "BriefDescription": "Cycles per thread when uops are executed in port 6", 722 "BriefDescription": "Cycles per thread when uops are executed in port 6",
501 "Counter": "0,1,2,3", 723 "Counter": "0,1,2,3",
@@ -506,6 +728,26 @@
506 }, 728 },
507 { 729 {
508 "EventCode": "0xA1", 730 "EventCode": "0xA1",
731 "UMask": "0x40",
732 "BriefDescription": "Cycles per core when uops are executed in port 6.",
733 "Counter": "0,1,2,3",
734 "EventName": "UOPS_EXECUTED_PORT.PORT_6_CORE",
735 "AnyThread": "1",
736 "PublicDescription": "Cycles per core when uops are exectuted in port 6.",
737 "SampleAfterValue": "2000003",
738 "CounterHTOff": "0,1,2,3,4,5,6,7"
739 },
740 {
741 "EventCode": "0xA1",
742 "UMask": "0x40",
743 "BriefDescription": "Cycles per thread when uops are executed in port 6.",
744 "Counter": "0,1,2,3",
745 "EventName": "UOPS_DISPATCHED_PORT.PORT_6",
746 "SampleAfterValue": "2000003",
747 "CounterHTOff": "0,1,2,3,4,5,6,7"
748 },
749 {
750 "EventCode": "0xA1",
509 "UMask": "0x80", 751 "UMask": "0x80",
510 "BriefDescription": "Cycles per thread when uops are executed in port 7", 752 "BriefDescription": "Cycles per thread when uops are executed in port 7",
511 "Counter": "0,1,2,3", 753 "Counter": "0,1,2,3",
@@ -515,6 +757,25 @@
515 "CounterHTOff": "0,1,2,3,4,5,6,7" 757 "CounterHTOff": "0,1,2,3,4,5,6,7"
516 }, 758 },
517 { 759 {
760 "EventCode": "0xA1",
761 "UMask": "0x80",
762 "BriefDescription": "Cycles per core when uops are dispatched to port 7.",
763 "Counter": "0,1,2,3",
764 "EventName": "UOPS_EXECUTED_PORT.PORT_7_CORE",
765 "AnyThread": "1",
766 "SampleAfterValue": "2000003",
767 "CounterHTOff": "0,1,2,3,4,5,6,7"
768 },
769 {
770 "EventCode": "0xA1",
771 "UMask": "0x80",
772 "BriefDescription": "Cycles per thread when uops are executed in port 7.",
773 "Counter": "0,1,2,3",
774 "EventName": "UOPS_DISPATCHED_PORT.PORT_7",
775 "SampleAfterValue": "2000003",
776 "CounterHTOff": "0,1,2,3,4,5,6,7"
777 },
778 {
518 "EventCode": "0xA2", 779 "EventCode": "0xA2",
519 "UMask": "0x1", 780 "UMask": "0x1",
520 "BriefDescription": "Resource-related stall cycles", 781 "BriefDescription": "Resource-related stall cycles",
@@ -567,17 +828,6 @@
567 }, 828 },
568 { 829 {
569 "EventCode": "0xA3", 830 "EventCode": "0xA3",
570 "UMask": "0x8",
571 "BriefDescription": "Cycles with pending L1 cache miss loads.",
572 "Counter": "2",
573 "EventName": "CYCLE_ACTIVITY.CYCLES_L1D_PENDING",
574 "CounterMask": "8",
575 "PublicDescription": "Cycles with pending L1 data cache miss loads. Set Cmask=8 to count cycle.",
576 "SampleAfterValue": "2000003",
577 "CounterHTOff": "2"
578 },
579 {
580 "EventCode": "0xA3",
581 "UMask": "0x2", 831 "UMask": "0x2",
582 "BriefDescription": "Cycles with pending memory loads.", 832 "BriefDescription": "Cycles with pending memory loads.",
583 "Counter": "0,1,2,3", 833 "Counter": "0,1,2,3",
@@ -590,7 +840,7 @@
590 { 840 {
591 "EventCode": "0xA3", 841 "EventCode": "0xA3",
592 "UMask": "0x4", 842 "UMask": "0x4",
593 "BriefDescription": "Total execution stalls", 843 "BriefDescription": "This event increments by 1 for every cycle where there was no execute for this thread.",
594 "Counter": "0,1,2,3", 844 "Counter": "0,1,2,3",
595 "EventName": "CYCLE_ACTIVITY.CYCLES_NO_EXECUTE", 845 "EventName": "CYCLE_ACTIVITY.CYCLES_NO_EXECUTE",
596 "CounterMask": "4", 846 "CounterMask": "4",
@@ -622,6 +872,17 @@
622 }, 872 },
623 { 873 {
624 "EventCode": "0xA3", 874 "EventCode": "0xA3",
875 "UMask": "0x8",
876 "BriefDescription": "Cycles with pending L1 cache miss loads.",
877 "Counter": "2",
878 "EventName": "CYCLE_ACTIVITY.CYCLES_L1D_PENDING",
879 "CounterMask": "8",
880 "PublicDescription": "Cycles with pending L1 data cache miss loads. Set Cmask=8 to count cycle.",
881 "SampleAfterValue": "2000003",
882 "CounterHTOff": "2"
883 },
884 {
885 "EventCode": "0xA3",
625 "UMask": "0xc", 886 "UMask": "0xc",
626 "BriefDescription": "Execution stalls due to L1 data cache misses", 887 "BriefDescription": "Execution stalls due to L1 data cache misses",
627 "Counter": "2", 888 "Counter": "2",
@@ -642,13 +903,22 @@
642 "CounterHTOff": "0,1,2,3,4,5,6,7" 903 "CounterHTOff": "0,1,2,3,4,5,6,7"
643 }, 904 },
644 { 905 {
645 "EventCode": "0xB1", 906 "EventCode": "0xA8",
646 "UMask": "0x2", 907 "UMask": "0x1",
647 "BriefDescription": "Number of uops executed on the core.", 908 "BriefDescription": "Cycles Uops delivered by the LSD, but didn't come from the decoder.",
648 "Counter": "0,1,2,3", 909 "Counter": "0,1,2,3",
649 "EventName": "UOPS_EXECUTED.CORE", 910 "EventName": "LSD.CYCLES_ACTIVE",
650 "Errata": "HSD30, HSM31", 911 "CounterMask": "1",
651 "PublicDescription": "Counts total number of uops to be executed per-core each cycle.", 912 "SampleAfterValue": "2000003",
913 "CounterHTOff": "0,1,2,3,4,5,6,7"
914 },
915 {
916 "EventCode": "0xA8",
917 "UMask": "0x1",
918 "BriefDescription": "Cycles 4 Uops delivered by the LSD, but didn't come from the decoder.",
919 "Counter": "0,1,2,3",
920 "EventName": "LSD.CYCLES_4_UOPS",
921 "CounterMask": "4",
652 "SampleAfterValue": "2000003", 922 "SampleAfterValue": "2000003",
653 "CounterHTOff": "0,1,2,3,4,5,6,7" 923 "CounterHTOff": "0,1,2,3,4,5,6,7"
654 }, 924 },
@@ -665,23 +935,126 @@
665 "CounterHTOff": "0,1,2,3" 935 "CounterHTOff": "0,1,2,3"
666 }, 936 },
667 { 937 {
668 "EventCode": "0xC0", 938 "EventCode": "0xB1",
669 "UMask": "0x0", 939 "UMask": "0x1",
670 "BriefDescription": "Number of instructions retired. General Counter - architectural event", 940 "BriefDescription": "Cycles where at least 1 uop was executed per-thread",
671 "Counter": "0,1,2,3", 941 "Counter": "0,1,2,3",
672 "EventName": "INST_RETIRED.ANY_P", 942 "EventName": "UOPS_EXECUTED.CYCLES_GE_1_UOP_EXEC",
673 "Errata": "HSD11, HSD140", 943 "CounterMask": "1",
674 "PublicDescription": "Number of instructions at retirement.", 944 "Errata": "HSD144, HSD30, HSM31",
945 "PublicDescription": "This events counts the cycles where at least one uop was executed. It is counted per thread.",
946 "SampleAfterValue": "2000003",
947 "CounterHTOff": "0,1,2,3"
948 },
949 {
950 "EventCode": "0xB1",
951 "UMask": "0x1",
952 "BriefDescription": "Cycles where at least 2 uops were executed per-thread",
953 "Counter": "0,1,2,3",
954 "EventName": "UOPS_EXECUTED.CYCLES_GE_2_UOPS_EXEC",
955 "CounterMask": "2",
956 "Errata": "HSD144, HSD30, HSM31",
957 "PublicDescription": "This events counts the cycles where at least two uop were executed. It is counted per thread.",
958 "SampleAfterValue": "2000003",
959 "CounterHTOff": "0,1,2,3"
960 },
961 {
962 "EventCode": "0xB1",
963 "UMask": "0x1",
964 "BriefDescription": "Cycles where at least 3 uops were executed per-thread",
965 "Counter": "0,1,2,3",
966 "EventName": "UOPS_EXECUTED.CYCLES_GE_3_UOPS_EXEC",
967 "CounterMask": "3",
968 "Errata": "HSD144, HSD30, HSM31",
969 "PublicDescription": "This events counts the cycles where at least three uop were executed. It is counted per thread.",
970 "SampleAfterValue": "2000003",
971 "CounterHTOff": "0,1,2,3"
972 },
973 {
974 "EventCode": "0xB1",
975 "UMask": "0x1",
976 "BriefDescription": "Cycles where at least 4 uops were executed per-thread.",
977 "Counter": "0,1,2,3",
978 "EventName": "UOPS_EXECUTED.CYCLES_GE_4_UOPS_EXEC",
979 "CounterMask": "4",
980 "Errata": "HSD144, HSD30, HSM31",
981 "SampleAfterValue": "2000003",
982 "CounterHTOff": "0,1,2,3"
983 },
984 {
985 "EventCode": "0xB1",
986 "UMask": "0x2",
987 "BriefDescription": "Number of uops executed on the core.",
988 "Counter": "0,1,2,3",
989 "EventName": "UOPS_EXECUTED.CORE",
990 "Errata": "HSD30, HSM31",
991 "PublicDescription": "Counts total number of uops to be executed per-core each cycle.",
675 "SampleAfterValue": "2000003", 992 "SampleAfterValue": "2000003",
676 "CounterHTOff": "0,1,2,3,4,5,6,7" 993 "CounterHTOff": "0,1,2,3,4,5,6,7"
677 }, 994 },
678 { 995 {
679 "EventCode": "0xC0", 996 "EventCode": "0xb1",
680 "UMask": "0x2", 997 "UMask": "0x2",
681 "BriefDescription": "FP operations retired. X87 FP operations that have no exceptions: Counts also flows that have several X87 or flows that use X87 uops in the exception handling.", 998 "BriefDescription": "Cycles at least 1 micro-op is executed from any thread on physical core.",
682 "Counter": "0,1,2,3", 999 "Counter": "0,1,2,3",
683 "EventName": "INST_RETIRED.X87", 1000 "EventName": "UOPS_EXECUTED.CORE_CYCLES_GE_1",
684 "PublicDescription": "This is a non-precise version (that is, does not use PEBS) of the event that counts FP operations retired. For X87 FP operations that have no exceptions counting also includes flows that have several X87, or flows that use X87 uops in the exception handling.", 1001 "CounterMask": "1",
1002 "Errata": "HSD30, HSM31",
1003 "SampleAfterValue": "2000003",
1004 "CounterHTOff": "0,1,2,3,4,5,6,7"
1005 },
1006 {
1007 "EventCode": "0xb1",
1008 "UMask": "0x2",
1009 "BriefDescription": "Cycles at least 2 micro-op is executed from any thread on physical core.",
1010 "Counter": "0,1,2,3",
1011 "EventName": "UOPS_EXECUTED.CORE_CYCLES_GE_2",
1012 "CounterMask": "2",
1013 "Errata": "HSD30, HSM31",
1014 "SampleAfterValue": "2000003",
1015 "CounterHTOff": "0,1,2,3,4,5,6,7"
1016 },
1017 {
1018 "EventCode": "0xb1",
1019 "UMask": "0x2",
1020 "BriefDescription": "Cycles at least 3 micro-op is executed from any thread on physical core.",
1021 "Counter": "0,1,2,3",
1022 "EventName": "UOPS_EXECUTED.CORE_CYCLES_GE_3",
1023 "CounterMask": "3",
1024 "Errata": "HSD30, HSM31",
1025 "SampleAfterValue": "2000003",
1026 "CounterHTOff": "0,1,2,3,4,5,6,7"
1027 },
1028 {
1029 "EventCode": "0xb1",
1030 "UMask": "0x2",
1031 "BriefDescription": "Cycles at least 4 micro-op is executed from any thread on physical core.",
1032 "Counter": "0,1,2,3",
1033 "EventName": "UOPS_EXECUTED.CORE_CYCLES_GE_4",
1034 "CounterMask": "4",
1035 "Errata": "HSD30, HSM31",
1036 "SampleAfterValue": "2000003",
1037 "CounterHTOff": "0,1,2,3,4,5,6,7"
1038 },
1039 {
1040 "Invert": "1",
1041 "EventCode": "0xb1",
1042 "UMask": "0x2",
1043 "BriefDescription": "Cycles with no micro-ops executed from any thread on physical core.",
1044 "Counter": "0,1,2,3",
1045 "EventName": "UOPS_EXECUTED.CORE_CYCLES_NONE",
1046 "Errata": "HSD30, HSM31",
1047 "SampleAfterValue": "2000003",
1048 "CounterHTOff": "0,1,2,3,4,5,6,7"
1049 },
1050 {
1051 "EventCode": "0xC0",
1052 "UMask": "0x0",
1053 "BriefDescription": "Number of instructions retired. General Counter - architectural event",
1054 "Counter": "0,1,2,3",
1055 "EventName": "INST_RETIRED.ANY_P",
1056 "Errata": "HSD11, HSD140",
1057 "PublicDescription": "Number of instructions at retirement.",
685 "SampleAfterValue": "2000003", 1058 "SampleAfterValue": "2000003",
686 "CounterHTOff": "0,1,2,3,4,5,6,7" 1059 "CounterHTOff": "0,1,2,3,4,5,6,7"
687 }, 1060 },
@@ -698,6 +1071,16 @@
698 "CounterHTOff": "1" 1071 "CounterHTOff": "1"
699 }, 1072 },
700 { 1073 {
1074 "EventCode": "0xC0",
1075 "UMask": "0x2",
1076 "BriefDescription": "FP operations retired. X87 FP operations that have no exceptions: Counts also flows that have several X87 or flows that use X87 uops in the exception handling.",
1077 "Counter": "0,1,2,3",
1078 "EventName": "INST_RETIRED.X87",
1079 "PublicDescription": "This is a non-precise version (that is, does not use PEBS) of the event that counts FP operations retired. For X87 FP operations that have no exceptions counting also includes flows that have several X87, or flows that use X87 uops in the exception handling.",
1080 "SampleAfterValue": "2000003",
1081 "CounterHTOff": "0,1,2,3,4,5,6,7"
1082 },
1083 {
701 "EventCode": "0xC1", 1084 "EventCode": "0xC1",
702 "UMask": "0x40", 1085 "UMask": "0x40",
703 "BriefDescription": "Number of times any microcode assist is invoked by HW upon uop writeback.", 1086 "BriefDescription": "Number of times any microcode assist is invoked by HW upon uop writeback.",
@@ -715,18 +1098,6 @@
715 "PEBS": "1", 1098 "PEBS": "1",
716 "Counter": "0,1,2,3", 1099 "Counter": "0,1,2,3",
717 "EventName": "UOPS_RETIRED.ALL", 1100 "EventName": "UOPS_RETIRED.ALL",
718 "PublicDescription": "Counts the number of micro-ops retired. Use Cmask=1 and invert to count active cycles or stalled cycles.",
719 "SampleAfterValue": "2000003",
720 "CounterHTOff": "0,1,2,3,4,5,6,7"
721 },
722 {
723 "EventCode": "0xC2",
724 "UMask": "0x2",
725 "BriefDescription": "Retirement slots used.",
726 "PEBS": "1",
727 "Counter": "0,1,2,3",
728 "EventName": "UOPS_RETIRED.RETIRE_SLOTS",
729 "PublicDescription": "This event counts the number of retirement slots used each cycle. There are potentially 4 slots that can be used each cycle - meaning, 4 uops or 4 instructions could retire each cycle.",
730 "SampleAfterValue": "2000003", 1101 "SampleAfterValue": "2000003",
731 "CounterHTOff": "0,1,2,3,4,5,6,7" 1102 "CounterHTOff": "0,1,2,3,4,5,6,7"
732 }, 1103 },
@@ -765,6 +1136,16 @@
765 "CounterHTOff": "0,1,2,3" 1136 "CounterHTOff": "0,1,2,3"
766 }, 1137 },
767 { 1138 {
1139 "EventCode": "0xC2",
1140 "UMask": "0x2",
1141 "BriefDescription": "Retirement slots used.",
1142 "PEBS": "1",
1143 "Counter": "0,1,2,3",
1144 "EventName": "UOPS_RETIRED.RETIRE_SLOTS",
1145 "SampleAfterValue": "2000003",
1146 "CounterHTOff": "0,1,2,3,4,5,6,7"
1147 },
1148 {
768 "EventCode": "0xC3", 1149 "EventCode": "0xC3",
769 "UMask": "0x1", 1150 "UMask": "0x1",
770 "BriefDescription": "Cycles there was a Nuke. Account for both thread-specific and All Thread Nukes.", 1151 "BriefDescription": "Cycles there was a Nuke. Account for both thread-specific and All Thread Nukes.",
@@ -774,6 +1155,17 @@
774 "CounterHTOff": "0,1,2,3,4,5,6,7" 1155 "CounterHTOff": "0,1,2,3,4,5,6,7"
775 }, 1156 },
776 { 1157 {
1158 "EdgeDetect": "1",
1159 "EventCode": "0xC3",
1160 "UMask": "0x1",
1161 "BriefDescription": "Number of machine clears (nukes) of any type.",
1162 "Counter": "0,1,2,3",
1163 "EventName": "MACHINE_CLEARS.COUNT",
1164 "CounterMask": "1",
1165 "SampleAfterValue": "100003",
1166 "CounterHTOff": "0,1,2,3,4,5,6,7"
1167 },
1168 {
777 "EventCode": "0xC3", 1169 "EventCode": "0xC3",
778 "UMask": "0x4", 1170 "UMask": "0x4",
779 "BriefDescription": "Self-modifying code (SMC) detected.", 1171 "BriefDescription": "Self-modifying code (SMC) detected.",
@@ -794,12 +1186,21 @@
794 }, 1186 },
795 { 1187 {
796 "EventCode": "0xC4", 1188 "EventCode": "0xC4",
1189 "UMask": "0x0",
1190 "BriefDescription": "All (macro) branch instructions retired.",
1191 "Counter": "0,1,2,3",
1192 "EventName": "BR_INST_RETIRED.ALL_BRANCHES",
1193 "PublicDescription": "Branch instructions at retirement.",
1194 "SampleAfterValue": "400009",
1195 "CounterHTOff": "0,1,2,3,4,5,6,7"
1196 },
1197 {
1198 "EventCode": "0xC4",
797 "UMask": "0x1", 1199 "UMask": "0x1",
798 "BriefDescription": "Conditional branch instructions retired.", 1200 "BriefDescription": "Conditional branch instructions retired.",
799 "PEBS": "1", 1201 "PEBS": "1",
800 "Counter": "0,1,2,3", 1202 "Counter": "0,1,2,3",
801 "EventName": "BR_INST_RETIRED.CONDITIONAL", 1203 "EventName": "BR_INST_RETIRED.CONDITIONAL",
802 "PublicDescription": "Counts the number of conditional branch instructions retired.",
803 "SampleAfterValue": "400009", 1204 "SampleAfterValue": "400009",
804 "CounterHTOff": "0,1,2,3,4,5,6,7" 1205 "CounterHTOff": "0,1,2,3,4,5,6,7"
805 }, 1206 },
@@ -815,13 +1216,23 @@
815 }, 1216 },
816 { 1217 {
817 "EventCode": "0xC4", 1218 "EventCode": "0xC4",
818 "UMask": "0x0", 1219 "UMask": "0x2",
1220 "BriefDescription": "Direct and indirect macro near call instructions retired (captured in ring 3).",
1221 "PEBS": "1",
1222 "Counter": "0,1,2,3",
1223 "EventName": "BR_INST_RETIRED.NEAR_CALL_R3",
1224 "SampleAfterValue": "100003",
1225 "CounterHTOff": "0,1,2,3,4,5,6,7"
1226 },
1227 {
1228 "EventCode": "0xC4",
1229 "UMask": "0x4",
819 "BriefDescription": "All (macro) branch instructions retired.", 1230 "BriefDescription": "All (macro) branch instructions retired.",
1231 "PEBS": "2",
820 "Counter": "0,1,2,3", 1232 "Counter": "0,1,2,3",
821 "EventName": "BR_INST_RETIRED.ALL_BRANCHES", 1233 "EventName": "BR_INST_RETIRED.ALL_BRANCHES_PEBS",
822 "PublicDescription": "Branch instructions at retirement.",
823 "SampleAfterValue": "400009", 1234 "SampleAfterValue": "400009",
824 "CounterHTOff": "0,1,2,3,4,5,6,7" 1235 "CounterHTOff": "0,1,2,3"
825 }, 1236 },
826 { 1237 {
827 "EventCode": "0xC4", 1238 "EventCode": "0xC4",
@@ -830,7 +1241,6 @@
830 "PEBS": "1", 1241 "PEBS": "1",
831 "Counter": "0,1,2,3", 1242 "Counter": "0,1,2,3",
832 "EventName": "BR_INST_RETIRED.NEAR_RETURN", 1243 "EventName": "BR_INST_RETIRED.NEAR_RETURN",
833 "PublicDescription": "Counts the number of near return instructions retired.",
834 "SampleAfterValue": "100003", 1244 "SampleAfterValue": "100003",
835 "CounterHTOff": "0,1,2,3,4,5,6,7" 1245 "CounterHTOff": "0,1,2,3,4,5,6,7"
836 }, 1246 },
@@ -851,7 +1261,6 @@
851 "PEBS": "1", 1261 "PEBS": "1",
852 "Counter": "0,1,2,3", 1262 "Counter": "0,1,2,3",
853 "EventName": "BR_INST_RETIRED.NEAR_TAKEN", 1263 "EventName": "BR_INST_RETIRED.NEAR_TAKEN",
854 "PublicDescription": "Number of near taken branches retired.",
855 "SampleAfterValue": "400009", 1264 "SampleAfterValue": "400009",
856 "CounterHTOff": "0,1,2,3,4,5,6,7" 1265 "CounterHTOff": "0,1,2,3,4,5,6,7"
857 }, 1266 },
@@ -866,14 +1275,14 @@
866 "CounterHTOff": "0,1,2,3,4,5,6,7" 1275 "CounterHTOff": "0,1,2,3,4,5,6,7"
867 }, 1276 },
868 { 1277 {
869 "EventCode": "0xC4", 1278 "EventCode": "0xC5",
870 "UMask": "0x4", 1279 "UMask": "0x0",
871 "BriefDescription": "All (macro) branch instructions retired.", 1280 "BriefDescription": "All mispredicted macro branch instructions retired.",
872 "PEBS": "2",
873 "Counter": "0,1,2,3", 1281 "Counter": "0,1,2,3",
874 "EventName": "BR_INST_RETIRED.ALL_BRANCHES_PEBS", 1282 "EventName": "BR_MISP_RETIRED.ALL_BRANCHES",
1283 "PublicDescription": "Mispredicted branch instructions at retirement.",
875 "SampleAfterValue": "400009", 1284 "SampleAfterValue": "400009",
876 "CounterHTOff": "0,1,2,3" 1285 "CounterHTOff": "0,1,2,3,4,5,6,7"
877 }, 1286 },
878 { 1287 {
879 "EventCode": "0xC5", 1288 "EventCode": "0xC5",
@@ -887,18 +1296,8 @@
887 }, 1296 },
888 { 1297 {
889 "EventCode": "0xC5", 1298 "EventCode": "0xC5",
890 "UMask": "0x0",
891 "BriefDescription": "All mispredicted macro branch instructions retired.",
892 "Counter": "0,1,2,3",
893 "EventName": "BR_MISP_RETIRED.ALL_BRANCHES",
894 "PublicDescription": "Mispredicted branch instructions at retirement.",
895 "SampleAfterValue": "400009",
896 "CounterHTOff": "0,1,2,3,4,5,6,7"
897 },
898 {
899 "EventCode": "0xC5",
900 "UMask": "0x4", 1299 "UMask": "0x4",
901 "BriefDescription": "Mispredicted macro branch instructions retired. ", 1300 "BriefDescription": "Mispredicted macro branch instructions retired.",
902 "PEBS": "2", 1301 "PEBS": "2",
903 "Counter": "0,1,2,3", 1302 "Counter": "0,1,2,3",
904 "EventName": "BR_MISP_RETIRED.ALL_BRANCHES_PEBS", 1303 "EventName": "BR_MISP_RETIRED.ALL_BRANCHES_PEBS",
@@ -907,171 +1306,24 @@
907 "CounterHTOff": "0,1,2,3" 1306 "CounterHTOff": "0,1,2,3"
908 }, 1307 },
909 { 1308 {
910 "EventCode": "0xCC",
911 "UMask": "0x20",
912 "BriefDescription": "Count cases of saving new LBR",
913 "Counter": "0,1,2,3",
914 "EventName": "ROB_MISC_EVENTS.LBR_INSERTS",
915 "PublicDescription": "Count cases of saving new LBR records by hardware.",
916 "SampleAfterValue": "2000003",
917 "CounterHTOff": "0,1,2,3,4,5,6,7"
918 },
919 {
920 "EventCode": "0x3C",
921 "UMask": "0x0",
922 "BriefDescription": "Thread cycles when thread is not in halt state",
923 "Counter": "0,1,2,3",
924 "EventName": "CPU_CLK_UNHALTED.THREAD_P",
925 "PublicDescription": "Counts the number of thread cycles while the thread is not in a halt state. The thread enters the halt state when it is running the HLT instruction. The core frequency may change from time to time due to power or thermal throttling.",
926 "SampleAfterValue": "2000003",
927 "CounterHTOff": "0,1,2,3,4,5,6,7"
928 },
929 {
930 "EventCode": "0x89",
931 "UMask": "0xa0",
932 "BriefDescription": "Taken speculative and retired mispredicted indirect calls.",
933 "Counter": "0,1,2,3",
934 "EventName": "BR_MISP_EXEC.TAKEN_INDIRECT_NEAR_CALL",
935 "SampleAfterValue": "200003",
936 "CounterHTOff": "0,1,2,3,4,5,6,7"
937 },
938 {
939 "EventCode": "0xA1",
940 "UMask": "0x1",
941 "BriefDescription": "Cycles per core when uops are exectuted in port 0.",
942 "Counter": "0,1,2,3",
943 "EventName": "UOPS_EXECUTED_PORT.PORT_0_CORE",
944 "AnyThread": "1",
945 "SampleAfterValue": "2000003",
946 "CounterHTOff": "0,1,2,3,4,5,6,7"
947 },
948 {
949 "EventCode": "0xA1",
950 "UMask": "0x2",
951 "BriefDescription": "Cycles per core when uops are exectuted in port 1.",
952 "Counter": "0,1,2,3",
953 "EventName": "UOPS_EXECUTED_PORT.PORT_1_CORE",
954 "AnyThread": "1",
955 "SampleAfterValue": "2000003",
956 "CounterHTOff": "0,1,2,3,4,5,6,7"
957 },
958 {
959 "EventCode": "0xA1",
960 "UMask": "0x4",
961 "BriefDescription": "Cycles per core when uops are dispatched to port 2.",
962 "Counter": "0,1,2,3",
963 "EventName": "UOPS_EXECUTED_PORT.PORT_2_CORE",
964 "AnyThread": "1",
965 "SampleAfterValue": "2000003",
966 "CounterHTOff": "0,1,2,3,4,5,6,7"
967 },
968 {
969 "EventCode": "0xA1",
970 "UMask": "0x8",
971 "BriefDescription": "Cycles per core when uops are dispatched to port 3.",
972 "Counter": "0,1,2,3",
973 "EventName": "UOPS_EXECUTED_PORT.PORT_3_CORE",
974 "AnyThread": "1",
975 "SampleAfterValue": "2000003",
976 "CounterHTOff": "0,1,2,3,4,5,6,7"
977 },
978 {
979 "EventCode": "0xA1",
980 "UMask": "0x10",
981 "BriefDescription": "Cycles per core when uops are exectuted in port 4.",
982 "Counter": "0,1,2,3",
983 "EventName": "UOPS_EXECUTED_PORT.PORT_4_CORE",
984 "AnyThread": "1",
985 "SampleAfterValue": "2000003",
986 "CounterHTOff": "0,1,2,3,4,5,6,7"
987 },
988 {
989 "EventCode": "0xA1",
990 "UMask": "0x20",
991 "BriefDescription": "Cycles per core when uops are exectuted in port 5.",
992 "Counter": "0,1,2,3",
993 "EventName": "UOPS_EXECUTED_PORT.PORT_5_CORE",
994 "AnyThread": "1",
995 "SampleAfterValue": "2000003",
996 "CounterHTOff": "0,1,2,3,4,5,6,7"
997 },
998 {
999 "EventCode": "0xA1",
1000 "UMask": "0x40",
1001 "BriefDescription": "Cycles per core when uops are exectuted in port 6.",
1002 "Counter": "0,1,2,3",
1003 "EventName": "UOPS_EXECUTED_PORT.PORT_6_CORE",
1004 "AnyThread": "1",
1005 "SampleAfterValue": "2000003",
1006 "CounterHTOff": "0,1,2,3,4,5,6,7"
1007 },
1008 {
1009 "EventCode": "0xA1",
1010 "UMask": "0x80",
1011 "BriefDescription": "Cycles per core when uops are dispatched to port 7.",
1012 "Counter": "0,1,2,3",
1013 "EventName": "UOPS_EXECUTED_PORT.PORT_7_CORE",
1014 "AnyThread": "1",
1015 "SampleAfterValue": "2000003",
1016 "CounterHTOff": "0,1,2,3,4,5,6,7"
1017 },
1018 {
1019 "EventCode": "0xC5", 1309 "EventCode": "0xC5",
1020 "UMask": "0x20", 1310 "UMask": "0x20",
1021 "BriefDescription": "number of near branch instructions retired that were mispredicted and taken.", 1311 "BriefDescription": "number of near branch instructions retired that were mispredicted and taken.",
1022 "PEBS": "1", 1312 "PEBS": "1",
1023 "Counter": "0,1,2,3", 1313 "Counter": "0,1,2,3",
1024 "EventName": "BR_MISP_RETIRED.NEAR_TAKEN", 1314 "EventName": "BR_MISP_RETIRED.NEAR_TAKEN",
1025 "PublicDescription": "Number of near branch instructions retired that were taken but mispredicted.",
1026 "SampleAfterValue": "400009", 1315 "SampleAfterValue": "400009",
1027 "CounterHTOff": "0,1,2,3,4,5,6,7" 1316 "CounterHTOff": "0,1,2,3,4,5,6,7"
1028 }, 1317 },
1029 { 1318 {
1030 "EventCode": "0xB1", 1319 "EventCode": "0xCC",
1031 "UMask": "0x1", 1320 "UMask": "0x20",
1032 "BriefDescription": "Cycles where at least 1 uop was executed per-thread", 1321 "BriefDescription": "Count cases of saving new LBR",
1033 "Counter": "0,1,2,3",
1034 "EventName": "UOPS_EXECUTED.CYCLES_GE_1_UOP_EXEC",
1035 "CounterMask": "1",
1036 "Errata": "HSD144, HSD30, HSM31",
1037 "PublicDescription": "This events counts the cycles where at least one uop was executed. It is counted per thread.",
1038 "SampleAfterValue": "2000003",
1039 "CounterHTOff": "0,1,2,3"
1040 },
1041 {
1042 "EventCode": "0xB1",
1043 "UMask": "0x1",
1044 "BriefDescription": "Cycles where at least 2 uops were executed per-thread",
1045 "Counter": "0,1,2,3",
1046 "EventName": "UOPS_EXECUTED.CYCLES_GE_2_UOPS_EXEC",
1047 "CounterMask": "2",
1048 "Errata": "HSD144, HSD30, HSM31",
1049 "PublicDescription": "This events counts the cycles where at least two uop were executed. It is counted per thread.",
1050 "SampleAfterValue": "2000003",
1051 "CounterHTOff": "0,1,2,3"
1052 },
1053 {
1054 "EventCode": "0xB1",
1055 "UMask": "0x1",
1056 "BriefDescription": "Cycles where at least 3 uops were executed per-thread",
1057 "Counter": "0,1,2,3",
1058 "EventName": "UOPS_EXECUTED.CYCLES_GE_3_UOPS_EXEC",
1059 "CounterMask": "3",
1060 "Errata": "HSD144, HSD30, HSM31",
1061 "PublicDescription": "This events counts the cycles where at least three uop were executed. It is counted per thread.",
1062 "SampleAfterValue": "2000003",
1063 "CounterHTOff": "0,1,2,3"
1064 },
1065 {
1066 "EventCode": "0xB1",
1067 "UMask": "0x1",
1068 "BriefDescription": "Cycles where at least 4 uops were executed per-thread.",
1069 "Counter": "0,1,2,3", 1322 "Counter": "0,1,2,3",
1070 "EventName": "UOPS_EXECUTED.CYCLES_GE_4_UOPS_EXEC", 1323 "EventName": "ROB_MISC_EVENTS.LBR_INSERTS",
1071 "CounterMask": "4", 1324 "PublicDescription": "Count cases of saving new LBR records by hardware.",
1072 "Errata": "HSD144, HSD30, HSM31",
1073 "SampleAfterValue": "2000003", 1325 "SampleAfterValue": "2000003",
1074 "CounterHTOff": "0,1,2,3" 1326 "CounterHTOff": "0,1,2,3,4,5,6,7"
1075 }, 1327 },
1076 { 1328 {
1077 "EventCode": "0xe6", 1329 "EventCode": "0xe6",
@@ -1082,248 +1334,5 @@
1082 "PublicDescription": "Number of front end re-steers due to BPU misprediction.", 1334 "PublicDescription": "Number of front end re-steers due to BPU misprediction.",
1083 "SampleAfterValue": "100003", 1335 "SampleAfterValue": "100003",
1084 "CounterHTOff": "0,1,2,3,4,5,6,7" 1336 "CounterHTOff": "0,1,2,3,4,5,6,7"
1085 },
1086 {
1087 "EdgeDetect": "1",
1088 "EventCode": "0xC3",
1089 "UMask": "0x1",
1090 "BriefDescription": "Number of machine clears (nukes) of any type.",
1091 "Counter": "0,1,2,3",
1092 "EventName": "MACHINE_CLEARS.COUNT",
1093 "CounterMask": "1",
1094 "SampleAfterValue": "100003",
1095 "CounterHTOff": "0,1,2,3,4,5,6,7"
1096 },
1097 {
1098 "EventCode": "0xA8",
1099 "UMask": "0x1",
1100 "BriefDescription": "Cycles Uops delivered by the LSD, but didn't come from the decoder.",
1101 "Counter": "0,1,2,3",
1102 "EventName": "LSD.CYCLES_ACTIVE",
1103 "CounterMask": "1",
1104 "SampleAfterValue": "2000003",
1105 "CounterHTOff": "0,1,2,3,4,5,6,7"
1106 },
1107 {
1108 "EventCode": "0xA8",
1109 "UMask": "0x1",
1110 "BriefDescription": "Cycles 4 Uops delivered by the LSD, but didn't come from the decoder.",
1111 "Counter": "0,1,2,3",
1112 "EventName": "LSD.CYCLES_4_UOPS",
1113 "CounterMask": "4",
1114 "SampleAfterValue": "2000003",
1115 "CounterHTOff": "0,1,2,3,4,5,6,7"
1116 },
1117 {
1118 "EdgeDetect": "1",
1119 "Invert": "1",
1120 "EventCode": "0x5E",
1121 "UMask": "0x1",
1122 "BriefDescription": "Counts end of periods where the Reservation Station (RS) was empty. Could be useful to precisely locate Frontend Latency Bound issues.",
1123 "Counter": "0,1,2,3",
1124 "EventName": "RS_EVENTS.EMPTY_END",
1125 "CounterMask": "1",
1126 "SampleAfterValue": "200003",
1127 "CounterHTOff": "0,1,2,3,4,5,6,7"
1128 },
1129 {
1130 "EventCode": "0xA1",
1131 "UMask": "0x1",
1132 "BriefDescription": "Cycles per thread when uops are executed in port 0.",
1133 "Counter": "0,1,2,3",
1134 "EventName": "UOPS_DISPATCHED_PORT.PORT_0",
1135 "SampleAfterValue": "2000003",
1136 "CounterHTOff": "0,1,2,3,4,5,6,7"
1137 },
1138 {
1139 "EventCode": "0xA1",
1140 "UMask": "0x2",
1141 "BriefDescription": "Cycles per thread when uops are executed in port 1.",
1142 "Counter": "0,1,2,3",
1143 "EventName": "UOPS_DISPATCHED_PORT.PORT_1",
1144 "SampleAfterValue": "2000003",
1145 "CounterHTOff": "0,1,2,3,4,5,6,7"
1146 },
1147 {
1148 "EventCode": "0xA1",
1149 "UMask": "0x4",
1150 "BriefDescription": "Cycles per thread when uops are executed in port 2.",
1151 "Counter": "0,1,2,3",
1152 "EventName": "UOPS_DISPATCHED_PORT.PORT_2",
1153 "SampleAfterValue": "2000003",
1154 "CounterHTOff": "0,1,2,3,4,5,6,7"
1155 },
1156 {
1157 "EventCode": "0xA1",
1158 "UMask": "0x8",
1159 "BriefDescription": "Cycles per thread when uops are executed in port 3.",
1160 "Counter": "0,1,2,3",
1161 "EventName": "UOPS_DISPATCHED_PORT.PORT_3",
1162 "SampleAfterValue": "2000003",
1163 "CounterHTOff": "0,1,2,3,4,5,6,7"
1164 },
1165 {
1166 "EventCode": "0xA1",
1167 "UMask": "0x10",
1168 "BriefDescription": "Cycles per thread when uops are executed in port 4.",
1169 "Counter": "0,1,2,3",
1170 "EventName": "UOPS_DISPATCHED_PORT.PORT_4",
1171 "SampleAfterValue": "2000003",
1172 "CounterHTOff": "0,1,2,3,4,5,6,7"
1173 },
1174 {
1175 "EventCode": "0xA1",
1176 "UMask": "0x20",
1177 "BriefDescription": "Cycles per thread when uops are executed in port 5.",
1178 "Counter": "0,1,2,3",
1179 "EventName": "UOPS_DISPATCHED_PORT.PORT_5",
1180 "SampleAfterValue": "2000003",
1181 "CounterHTOff": "0,1,2,3,4,5,6,7"
1182 },
1183 {
1184 "EventCode": "0xA1",
1185 "UMask": "0x40",
1186 "BriefDescription": "Cycles per thread when uops are executed in port 6.",
1187 "Counter": "0,1,2,3",
1188 "EventName": "UOPS_DISPATCHED_PORT.PORT_6",
1189 "SampleAfterValue": "2000003",
1190 "CounterHTOff": "0,1,2,3,4,5,6,7"
1191 },
1192 {
1193 "EventCode": "0xA1",
1194 "UMask": "0x80",
1195 "BriefDescription": "Cycles per thread when uops are executed in port 7.",
1196 "Counter": "0,1,2,3",
1197 "EventName": "UOPS_DISPATCHED_PORT.PORT_7",
1198 "SampleAfterValue": "2000003",
1199 "CounterHTOff": "0,1,2,3,4,5,6,7"
1200 },
1201 {
1202 "EventCode": "0x00",
1203 "UMask": "0x2",
1204 "BriefDescription": "Core cycles when at least one thread on the physical core is not in halt state.",
1205 "Counter": "Fixed counter 2",
1206 "EventName": "CPU_CLK_UNHALTED.THREAD_ANY",
1207 "AnyThread": "1",
1208 "SampleAfterValue": "2000003",
1209 "CounterHTOff": "Fixed counter 2"
1210 },
1211 {
1212 "EventCode": "0x3C",
1213 "UMask": "0x0",
1214 "BriefDescription": "Core cycles when at least one thread on the physical core is not in halt state.",
1215 "Counter": "0,1,2,3",
1216 "EventName": "CPU_CLK_UNHALTED.THREAD_P_ANY",
1217 "AnyThread": "1",
1218 "SampleAfterValue": "2000003",
1219 "CounterHTOff": "0,1,2,3,4,5,6,7"
1220 },
1221 {
1222 "EventCode": "0x3C",
1223 "UMask": "0x1",
1224 "BriefDescription": "Reference cycles when the at least one thread on the physical core is unhalted (counts at 100 MHz rate)",
1225 "Counter": "0,1,2,3",
1226 "EventName": "CPU_CLK_THREAD_UNHALTED.REF_XCLK_ANY",
1227 "AnyThread": "1",
1228 "PublicDescription": "Reference cycles when the at least one thread on the physical core is unhalted (counts at 100 MHz rate).",
1229 "SampleAfterValue": "2000003",
1230 "CounterHTOff": "0,1,2,3,4,5,6,7"
1231 },
1232 {
1233 "EventCode": "0x0D",
1234 "UMask": "0x3",
1235 "BriefDescription": "Core cycles the allocator was stalled due to recovery from earlier clear event for any thread running on the physical core (e.g. misprediction or memory nuke)",
1236 "Counter": "0,1,2,3",
1237 "EventName": "INT_MISC.RECOVERY_CYCLES_ANY",
1238 "AnyThread": "1",
1239 "CounterMask": "1",
1240 "PublicDescription": "Core cycles the allocator was stalled due to recovery from earlier clear event for any thread running on the physical core (e.g. misprediction or memory nuke).",
1241 "SampleAfterValue": "2000003",
1242 "CounterHTOff": "0,1,2,3,4,5,6,7"
1243 },
1244 {
1245 "EventCode": "0xb1",
1246 "UMask": "0x2",
1247 "BriefDescription": "Cycles at least 1 micro-op is executed from any thread on physical core.",
1248 "Counter": "0,1,2,3",
1249 "EventName": "UOPS_EXECUTED.CORE_CYCLES_GE_1",
1250 "CounterMask": "1",
1251 "Errata": "HSD30, HSM31",
1252 "SampleAfterValue": "2000003",
1253 "CounterHTOff": "0,1,2,3,4,5,6,7"
1254 },
1255 {
1256 "EventCode": "0xb1",
1257 "UMask": "0x2",
1258 "BriefDescription": "Cycles at least 2 micro-op is executed from any thread on physical core.",
1259 "Counter": "0,1,2,3",
1260 "EventName": "UOPS_EXECUTED.CORE_CYCLES_GE_2",
1261 "CounterMask": "2",
1262 "Errata": "HSD30, HSM31",
1263 "SampleAfterValue": "2000003",
1264 "CounterHTOff": "0,1,2,3,4,5,6,7"
1265 },
1266 {
1267 "EventCode": "0xb1",
1268 "UMask": "0x2",
1269 "BriefDescription": "Cycles at least 3 micro-op is executed from any thread on physical core.",
1270 "Counter": "0,1,2,3",
1271 "EventName": "UOPS_EXECUTED.CORE_CYCLES_GE_3",
1272 "CounterMask": "3",
1273 "Errata": "HSD30, HSM31",
1274 "SampleAfterValue": "2000003",
1275 "CounterHTOff": "0,1,2,3,4,5,6,7"
1276 },
1277 {
1278 "EventCode": "0xb1",
1279 "UMask": "0x2",
1280 "BriefDescription": "Cycles at least 4 micro-op is executed from any thread on physical core.",
1281 "Counter": "0,1,2,3",
1282 "EventName": "UOPS_EXECUTED.CORE_CYCLES_GE_4",
1283 "CounterMask": "4",
1284 "Errata": "HSD30, HSM31",
1285 "SampleAfterValue": "2000003",
1286 "CounterHTOff": "0,1,2,3,4,5,6,7"
1287 },
1288 {
1289 "Invert": "1",
1290 "EventCode": "0xb1",
1291 "UMask": "0x2",
1292 "BriefDescription": "Cycles with no micro-ops executed from any thread on physical core.",
1293 "Counter": "0,1,2,3",
1294 "EventName": "UOPS_EXECUTED.CORE_CYCLES_NONE",
1295 "Errata": "HSD30, HSM31",
1296 "SampleAfterValue": "2000003",
1297 "CounterHTOff": "0,1,2,3,4,5,6,7"
1298 },
1299 {
1300 "EventCode": "0x3C",
1301 "UMask": "0x1",
1302 "BriefDescription": "Reference cycles when the thread is unhalted (counts at 100 MHz rate)",
1303 "Counter": "0,1,2,3",
1304 "EventName": "CPU_CLK_UNHALTED.REF_XCLK",
1305 "PublicDescription": "Reference cycles when the thread is unhalted. (counts at 100 MHz rate)",
1306 "SampleAfterValue": "2000003",
1307 "CounterHTOff": "0,1,2,3,4,5,6,7"
1308 },
1309 {
1310 "EventCode": "0x3C",
1311 "UMask": "0x1",
1312 "BriefDescription": "Reference cycles when the at least one thread on the physical core is unhalted (counts at 100 MHz rate)",
1313 "Counter": "0,1,2,3",
1314 "EventName": "CPU_CLK_UNHALTED.REF_XCLK_ANY",
1315 "AnyThread": "1",
1316 "PublicDescription": "Reference cycles when the at least one thread on the physical core is unhalted (counts at 100 MHz rate).",
1317 "SampleAfterValue": "2000003",
1318 "CounterHTOff": "0,1,2,3,4,5,6,7"
1319 },
1320 {
1321 "EventCode": "0x3C",
1322 "UMask": "0x2",
1323 "BriefDescription": "Count XClk pulses when this thread is unhalted and the other thread is halted.",
1324 "Counter": "0,1,2,3",
1325 "EventName": "CPU_CLK_UNHALTED.ONE_THREAD_ACTIVE",
1326 "SampleAfterValue": "2000003",
1327 "CounterHTOff": "0,1,2,3,4,5,6,7"
1328 } 1337 }
1329] \ No newline at end of file 1338] \ No newline at end of file
diff --git a/tools/perf/pmu-events/arch/x86/haswellx/virtual-memory.json b/tools/perf/pmu-events/arch/x86/haswellx/virtual-memory.json
index 9c00f8ef6a07..168df552b1a8 100644
--- a/tools/perf/pmu-events/arch/x86/haswellx/virtual-memory.json
+++ b/tools/perf/pmu-events/arch/x86/haswellx/virtual-memory.json
@@ -40,6 +40,16 @@
40 }, 40 },
41 { 41 {
42 "EventCode": "0x08", 42 "EventCode": "0x08",
43 "UMask": "0xe",
44 "BriefDescription": "Demand load Miss in all translation lookaside buffer (TLB) levels causes a page walk that completes of any page size.",
45 "Counter": "0,1,2,3",
46 "EventName": "DTLB_LOAD_MISSES.WALK_COMPLETED",
47 "PublicDescription": "Completed page walks in any TLB of any page size due to demand load misses.",
48 "SampleAfterValue": "100003",
49 "CounterHTOff": "0,1,2,3,4,5,6,7"
50 },
51 {
52 "EventCode": "0x08",
43 "UMask": "0x10", 53 "UMask": "0x10",
44 "BriefDescription": "Cycles when PMH is busy with page walks", 54 "BriefDescription": "Cycles when PMH is busy with page walks",
45 "Counter": "0,1,2,3", 55 "Counter": "0,1,2,3",
@@ -70,6 +80,16 @@
70 }, 80 },
71 { 81 {
72 "EventCode": "0x08", 82 "EventCode": "0x08",
83 "UMask": "0x60",
84 "BriefDescription": "Load operations that miss the first DTLB level but hit the second and do not cause page walks",
85 "Counter": "0,1,2,3",
86 "EventName": "DTLB_LOAD_MISSES.STLB_HIT",
87 "PublicDescription": "Number of cache load STLB hits. No page walk.",
88 "SampleAfterValue": "2000003",
89 "CounterHTOff": "0,1,2,3,4,5,6,7"
90 },
91 {
92 "EventCode": "0x08",
73 "UMask": "0x80", 93 "UMask": "0x80",
74 "BriefDescription": "DTLB demand load misses with low part of linear-to-physical address translation missed", 94 "BriefDescription": "DTLB demand load misses with low part of linear-to-physical address translation missed",
75 "Counter": "0,1,2,3", 95 "Counter": "0,1,2,3",
@@ -119,6 +139,16 @@
119 }, 139 },
120 { 140 {
121 "EventCode": "0x49", 141 "EventCode": "0x49",
142 "UMask": "0xe",
143 "BriefDescription": "Store misses in all DTLB levels that cause completed page walks",
144 "Counter": "0,1,2,3",
145 "EventName": "DTLB_STORE_MISSES.WALK_COMPLETED",
146 "PublicDescription": "Completed page walks due to store miss in any TLB levels of any page size (4K/2M/4M/1G).",
147 "SampleAfterValue": "100003",
148 "CounterHTOff": "0,1,2,3,4,5,6,7"
149 },
150 {
151 "EventCode": "0x49",
122 "UMask": "0x10", 152 "UMask": "0x10",
123 "BriefDescription": "Cycles when PMH is busy with page walks", 153 "BriefDescription": "Cycles when PMH is busy with page walks",
124 "Counter": "0,1,2,3", 154 "Counter": "0,1,2,3",
@@ -149,6 +179,16 @@
149 }, 179 },
150 { 180 {
151 "EventCode": "0x49", 181 "EventCode": "0x49",
182 "UMask": "0x60",
183 "BriefDescription": "Store operations that miss the first TLB level but hit the second and do not cause page walks",
184 "Counter": "0,1,2,3",
185 "EventName": "DTLB_STORE_MISSES.STLB_HIT",
186 "PublicDescription": "Store operations that miss the first TLB level but hit the second and do not cause page walks.",
187 "SampleAfterValue": "100003",
188 "CounterHTOff": "0,1,2,3,4,5,6,7"
189 },
190 {
191 "EventCode": "0x49",
152 "UMask": "0x80", 192 "UMask": "0x80",
153 "BriefDescription": "DTLB store misses with low part of linear-to-physical address translation missed", 193 "BriefDescription": "DTLB store misses with low part of linear-to-physical address translation missed",
154 "Counter": "0,1,2,3", 194 "Counter": "0,1,2,3",
@@ -207,6 +247,16 @@
207 }, 247 },
208 { 248 {
209 "EventCode": "0x85", 249 "EventCode": "0x85",
250 "UMask": "0xe",
251 "BriefDescription": "Misses in all ITLB levels that cause completed page walks",
252 "Counter": "0,1,2,3",
253 "EventName": "ITLB_MISSES.WALK_COMPLETED",
254 "PublicDescription": "Completed page walks in ITLB of any page size.",
255 "SampleAfterValue": "100003",
256 "CounterHTOff": "0,1,2,3,4,5,6,7"
257 },
258 {
259 "EventCode": "0x85",
210 "UMask": "0x10", 260 "UMask": "0x10",
211 "BriefDescription": "Cycles when PMH is busy with page walks", 261 "BriefDescription": "Cycles when PMH is busy with page walks",
212 "Counter": "0,1,2,3", 262 "Counter": "0,1,2,3",
@@ -236,6 +286,16 @@
236 "CounterHTOff": "0,1,2,3,4,5,6,7" 286 "CounterHTOff": "0,1,2,3,4,5,6,7"
237 }, 287 },
238 { 288 {
289 "EventCode": "0x85",
290 "UMask": "0x60",
291 "BriefDescription": "Operations that miss the first ITLB level but hit the second and do not cause any page walks",
292 "Counter": "0,1,2,3",
293 "EventName": "ITLB_MISSES.STLB_HIT",
294 "PublicDescription": "ITLB misses that hit STLB. No page walk.",
295 "SampleAfterValue": "100003",
296 "CounterHTOff": "0,1,2,3,4,5,6,7"
297 },
298 {
239 "EventCode": "0xae", 299 "EventCode": "0xae",
240 "UMask": "0x1", 300 "UMask": "0x1",
241 "BriefDescription": "Flushing of the Instruction TLB (ITLB) pages, includes 4k/2M/4M pages.", 301 "BriefDescription": "Flushing of the Instruction TLB (ITLB) pages, includes 4k/2M/4M pages.",
@@ -257,39 +317,43 @@
257 }, 317 },
258 { 318 {
259 "EventCode": "0xBC", 319 "EventCode": "0xBC",
260 "UMask": "0x21", 320 "UMask": "0x12",
261 "BriefDescription": "Number of ITLB page walker hits in the L1+FB", 321 "BriefDescription": "Number of DTLB page walker hits in the L2",
262 "Counter": "0,1,2,3", 322 "Counter": "0,1,2,3",
263 "EventName": "PAGE_WALKER_LOADS.ITLB_L1", 323 "EventName": "PAGE_WALKER_LOADS.DTLB_L2",
264 "PublicDescription": "Number of ITLB page walker loads that hit in the L1+FB.", 324 "PublicDescription": "Number of DTLB page walker loads that hit in the L2.",
265 "SampleAfterValue": "2000003", 325 "SampleAfterValue": "2000003",
266 "CounterHTOff": "0,1,2,3" 326 "CounterHTOff": "0,1,2,3"
267 }, 327 },
268 { 328 {
269 "EventCode": "0xBC", 329 "EventCode": "0xBC",
270 "UMask": "0x41", 330 "UMask": "0x14",
271 "BriefDescription": "Counts the number of Extended Page Table walks from the DTLB that hit in the L1 and FB.", 331 "BriefDescription": "Number of DTLB page walker hits in the L3 + XSNP",
272 "Counter": "0,1,2,3", 332 "Counter": "0,1,2,3",
273 "EventName": "PAGE_WALKER_LOADS.EPT_DTLB_L1", 333 "EventName": "PAGE_WALKER_LOADS.DTLB_L3",
334 "Errata": "HSD25",
335 "PublicDescription": "Number of DTLB page walker loads that hit in the L3.",
274 "SampleAfterValue": "2000003", 336 "SampleAfterValue": "2000003",
275 "CounterHTOff": "0,1,2,3" 337 "CounterHTOff": "0,1,2,3"
276 }, 338 },
277 { 339 {
278 "EventCode": "0xBC", 340 "EventCode": "0xBC",
279 "UMask": "0x81", 341 "UMask": "0x18",
280 "BriefDescription": "Counts the number of Extended Page Table walks from the ITLB that hit in the L1 and FB.", 342 "BriefDescription": "Number of DTLB page walker hits in Memory",
281 "Counter": "0,1,2,3", 343 "Counter": "0,1,2,3",
282 "EventName": "PAGE_WALKER_LOADS.EPT_ITLB_L1", 344 "EventName": "PAGE_WALKER_LOADS.DTLB_MEMORY",
345 "Errata": "HSD25",
346 "PublicDescription": "Number of DTLB page walker loads from memory.",
283 "SampleAfterValue": "2000003", 347 "SampleAfterValue": "2000003",
284 "CounterHTOff": "0,1,2,3" 348 "CounterHTOff": "0,1,2,3"
285 }, 349 },
286 { 350 {
287 "EventCode": "0xBC", 351 "EventCode": "0xBC",
288 "UMask": "0x12", 352 "UMask": "0x21",
289 "BriefDescription": "Number of DTLB page walker hits in the L2", 353 "BriefDescription": "Number of ITLB page walker hits in the L1+FB",
290 "Counter": "0,1,2,3", 354 "Counter": "0,1,2,3",
291 "EventName": "PAGE_WALKER_LOADS.DTLB_L2", 355 "EventName": "PAGE_WALKER_LOADS.ITLB_L1",
292 "PublicDescription": "Number of DTLB page walker loads that hit in the L2.", 356 "PublicDescription": "Number of ITLB page walker loads that hit in the L1+FB.",
293 "SampleAfterValue": "2000003", 357 "SampleAfterValue": "2000003",
294 "CounterHTOff": "0,1,2,3" 358 "CounterHTOff": "0,1,2,3"
295 }, 359 },
@@ -305,41 +369,41 @@
305 }, 369 },
306 { 370 {
307 "EventCode": "0xBC", 371 "EventCode": "0xBC",
308 "UMask": "0x42", 372 "UMask": "0x24",
309 "BriefDescription": "Counts the number of Extended Page Table walks from the DTLB that hit in the L2.", 373 "BriefDescription": "Number of ITLB page walker hits in the L3 + XSNP",
310 "Counter": "0,1,2,3", 374 "Counter": "0,1,2,3",
311 "EventName": "PAGE_WALKER_LOADS.EPT_DTLB_L2", 375 "EventName": "PAGE_WALKER_LOADS.ITLB_L3",
376 "Errata": "HSD25",
377 "PublicDescription": "Number of ITLB page walker loads that hit in the L3.",
312 "SampleAfterValue": "2000003", 378 "SampleAfterValue": "2000003",
313 "CounterHTOff": "0,1,2,3" 379 "CounterHTOff": "0,1,2,3"
314 }, 380 },
315 { 381 {
316 "EventCode": "0xBC", 382 "EventCode": "0xBC",
317 "UMask": "0x82", 383 "UMask": "0x28",
318 "BriefDescription": "Counts the number of Extended Page Table walks from the ITLB that hit in the L2.", 384 "BriefDescription": "Number of ITLB page walker hits in Memory",
319 "Counter": "0,1,2,3", 385 "Counter": "0,1,2,3",
320 "EventName": "PAGE_WALKER_LOADS.EPT_ITLB_L2", 386 "EventName": "PAGE_WALKER_LOADS.ITLB_MEMORY",
387 "Errata": "HSD25",
388 "PublicDescription": "Number of ITLB page walker loads from memory.",
321 "SampleAfterValue": "2000003", 389 "SampleAfterValue": "2000003",
322 "CounterHTOff": "0,1,2,3" 390 "CounterHTOff": "0,1,2,3"
323 }, 391 },
324 { 392 {
325 "EventCode": "0xBC", 393 "EventCode": "0xBC",
326 "UMask": "0x14", 394 "UMask": "0x41",
327 "BriefDescription": "Number of DTLB page walker hits in the L3 + XSNP", 395 "BriefDescription": "Counts the number of Extended Page Table walks from the DTLB that hit in the L1 and FB.",
328 "Counter": "0,1,2,3", 396 "Counter": "0,1,2,3",
329 "EventName": "PAGE_WALKER_LOADS.DTLB_L3", 397 "EventName": "PAGE_WALKER_LOADS.EPT_DTLB_L1",
330 "Errata": "HSD25",
331 "PublicDescription": "Number of DTLB page walker loads that hit in the L3.",
332 "SampleAfterValue": "2000003", 398 "SampleAfterValue": "2000003",
333 "CounterHTOff": "0,1,2,3" 399 "CounterHTOff": "0,1,2,3"
334 }, 400 },
335 { 401 {
336 "EventCode": "0xBC", 402 "EventCode": "0xBC",
337 "UMask": "0x24", 403 "UMask": "0x42",
338 "BriefDescription": "Number of ITLB page walker hits in the L3 + XSNP", 404 "BriefDescription": "Counts the number of Extended Page Table walks from the DTLB that hit in the L2.",
339 "Counter": "0,1,2,3", 405 "Counter": "0,1,2,3",
340 "EventName": "PAGE_WALKER_LOADS.ITLB_L3", 406 "EventName": "PAGE_WALKER_LOADS.EPT_DTLB_L2",
341 "Errata": "HSD25",
342 "PublicDescription": "Number of ITLB page walker loads that hit in the L3.",
343 "SampleAfterValue": "2000003", 407 "SampleAfterValue": "2000003",
344 "CounterHTOff": "0,1,2,3" 408 "CounterHTOff": "0,1,2,3"
345 }, 409 },
@@ -354,41 +418,37 @@
354 }, 418 },
355 { 419 {
356 "EventCode": "0xBC", 420 "EventCode": "0xBC",
357 "UMask": "0x84", 421 "UMask": "0x48",
358 "BriefDescription": "Counts the number of Extended Page Table walks from the ITLB that hit in the L2.", 422 "BriefDescription": "Counts the number of Extended Page Table walks from the DTLB that hit in memory.",
359 "Counter": "0,1,2,3", 423 "Counter": "0,1,2,3",
360 "EventName": "PAGE_WALKER_LOADS.EPT_ITLB_L3", 424 "EventName": "PAGE_WALKER_LOADS.EPT_DTLB_MEMORY",
361 "SampleAfterValue": "2000003", 425 "SampleAfterValue": "2000003",
362 "CounterHTOff": "0,1,2,3" 426 "CounterHTOff": "0,1,2,3"
363 }, 427 },
364 { 428 {
365 "EventCode": "0xBC", 429 "EventCode": "0xBC",
366 "UMask": "0x18", 430 "UMask": "0x81",
367 "BriefDescription": "Number of DTLB page walker hits in Memory", 431 "BriefDescription": "Counts the number of Extended Page Table walks from the ITLB that hit in the L1 and FB.",
368 "Counter": "0,1,2,3", 432 "Counter": "0,1,2,3",
369 "EventName": "PAGE_WALKER_LOADS.DTLB_MEMORY", 433 "EventName": "PAGE_WALKER_LOADS.EPT_ITLB_L1",
370 "Errata": "HSD25",
371 "PublicDescription": "Number of DTLB page walker loads from memory.",
372 "SampleAfterValue": "2000003", 434 "SampleAfterValue": "2000003",
373 "CounterHTOff": "0,1,2,3" 435 "CounterHTOff": "0,1,2,3"
374 }, 436 },
375 { 437 {
376 "EventCode": "0xBC", 438 "EventCode": "0xBC",
377 "UMask": "0x28", 439 "UMask": "0x82",
378 "BriefDescription": "Number of ITLB page walker hits in Memory", 440 "BriefDescription": "Counts the number of Extended Page Table walks from the ITLB that hit in the L2.",
379 "Counter": "0,1,2,3", 441 "Counter": "0,1,2,3",
380 "EventName": "PAGE_WALKER_LOADS.ITLB_MEMORY", 442 "EventName": "PAGE_WALKER_LOADS.EPT_ITLB_L2",
381 "Errata": "HSD25",
382 "PublicDescription": "Number of ITLB page walker loads from memory.",
383 "SampleAfterValue": "2000003", 443 "SampleAfterValue": "2000003",
384 "CounterHTOff": "0,1,2,3" 444 "CounterHTOff": "0,1,2,3"
385 }, 445 },
386 { 446 {
387 "EventCode": "0xBC", 447 "EventCode": "0xBC",
388 "UMask": "0x48", 448 "UMask": "0x84",
389 "BriefDescription": "Counts the number of Extended Page Table walks from the DTLB that hit in memory.", 449 "BriefDescription": "Counts the number of Extended Page Table walks from the ITLB that hit in the L2.",
390 "Counter": "0,1,2,3", 450 "Counter": "0,1,2,3",
391 "EventName": "PAGE_WALKER_LOADS.EPT_DTLB_MEMORY", 451 "EventName": "PAGE_WALKER_LOADS.EPT_ITLB_L3",
392 "SampleAfterValue": "2000003", 452 "SampleAfterValue": "2000003",
393 "CounterHTOff": "0,1,2,3" 453 "CounterHTOff": "0,1,2,3"
394 }, 454 },
@@ -420,65 +480,5 @@
420 "PublicDescription": "Count number of STLB flush attempts.", 480 "PublicDescription": "Count number of STLB flush attempts.",
421 "SampleAfterValue": "100003", 481 "SampleAfterValue": "100003",
422 "CounterHTOff": "0,1,2,3,4,5,6,7" 482 "CounterHTOff": "0,1,2,3,4,5,6,7"
423 },
424 {
425 "EventCode": "0x08",
426 "UMask": "0xe",
427 "BriefDescription": "Demand load Miss in all translation lookaside buffer (TLB) levels causes a page walk that completes of any page size.",
428 "Counter": "0,1,2,3",
429 "EventName": "DTLB_LOAD_MISSES.WALK_COMPLETED",
430 "PublicDescription": "Completed page walks in any TLB of any page size due to demand load misses.",
431 "SampleAfterValue": "100003",
432 "CounterHTOff": "0,1,2,3,4,5,6,7"
433 },
434 {
435 "EventCode": "0x08",
436 "UMask": "0x60",
437 "BriefDescription": "Load operations that miss the first DTLB level but hit the second and do not cause page walks",
438 "Counter": "0,1,2,3",
439 "EventName": "DTLB_LOAD_MISSES.STLB_HIT",
440 "PublicDescription": "Number of cache load STLB hits. No page walk.",
441 "SampleAfterValue": "2000003",
442 "CounterHTOff": "0,1,2,3,4,5,6,7"
443 },
444 {
445 "EventCode": "0x49",
446 "UMask": "0xe",
447 "BriefDescription": "Store misses in all DTLB levels that cause completed page walks",
448 "Counter": "0,1,2,3",
449 "EventName": "DTLB_STORE_MISSES.WALK_COMPLETED",
450 "PublicDescription": "Completed page walks due to store miss in any TLB levels of any page size (4K/2M/4M/1G).",
451 "SampleAfterValue": "100003",
452 "CounterHTOff": "0,1,2,3,4,5,6,7"
453 },
454 {
455 "EventCode": "0x49",
456 "UMask": "0x60",
457 "BriefDescription": "Store operations that miss the first TLB level but hit the second and do not cause page walks",
458 "Counter": "0,1,2,3",
459 "EventName": "DTLB_STORE_MISSES.STLB_HIT",
460 "PublicDescription": "Store operations that miss the first TLB level but hit the second and do not cause page walks.",
461 "SampleAfterValue": "100003",
462 "CounterHTOff": "0,1,2,3,4,5,6,7"
463 },
464 {
465 "EventCode": "0x85",
466 "UMask": "0xe",
467 "BriefDescription": "Misses in all ITLB levels that cause completed page walks",
468 "Counter": "0,1,2,3",
469 "EventName": "ITLB_MISSES.WALK_COMPLETED",
470 "PublicDescription": "Completed page walks in ITLB of any page size.",
471 "SampleAfterValue": "100003",
472 "CounterHTOff": "0,1,2,3,4,5,6,7"
473 },
474 {
475 "EventCode": "0x85",
476 "UMask": "0x60",
477 "BriefDescription": "Operations that miss the first ITLB level but hit the second and do not cause any page walks",
478 "Counter": "0,1,2,3",
479 "EventName": "ITLB_MISSES.STLB_HIT",
480 "PublicDescription": "ITLB misses that hit STLB. No page walk.",
481 "SampleAfterValue": "100003",
482 "CounterHTOff": "0,1,2,3,4,5,6,7"
483 } 483 }
484] \ No newline at end of file 484] \ No newline at end of file
diff --git a/tools/perf/pmu-events/arch/x86/ivybridge/cache.json b/tools/perf/pmu-events/arch/x86/ivybridge/cache.json
index f1ee6d4853c5..999a01bc6467 100644
--- a/tools/perf/pmu-events/arch/x86/ivybridge/cache.json
+++ b/tools/perf/pmu-events/arch/x86/ivybridge/cache.json
@@ -10,6 +10,16 @@
10 "CounterHTOff": "0,1,2,3,4,5,6,7" 10 "CounterHTOff": "0,1,2,3,4,5,6,7"
11 }, 11 },
12 { 12 {
13 "PublicDescription": "Counts any demand and L1 HW prefetch data load requests to L2.",
14 "EventCode": "0x24",
15 "Counter": "0,1,2,3",
16 "UMask": "0x3",
17 "EventName": "L2_RQSTS.ALL_DEMAND_DATA_RD",
18 "SampleAfterValue": "200003",
19 "BriefDescription": "Demand Data Read requests",
20 "CounterHTOff": "0,1,2,3,4,5,6,7"
21 },
22 {
13 "PublicDescription": "RFO requests that hit L2 cache.", 23 "PublicDescription": "RFO requests that hit L2 cache.",
14 "EventCode": "0x24", 24 "EventCode": "0x24",
15 "Counter": "0,1,2,3", 25 "Counter": "0,1,2,3",
@@ -30,6 +40,16 @@
30 "CounterHTOff": "0,1,2,3,4,5,6,7" 40 "CounterHTOff": "0,1,2,3,4,5,6,7"
31 }, 41 },
32 { 42 {
43 "PublicDescription": "Counts all L2 store RFO requests.",
44 "EventCode": "0x24",
45 "Counter": "0,1,2,3",
46 "UMask": "0xc",
47 "EventName": "L2_RQSTS.ALL_RFO",
48 "SampleAfterValue": "200003",
49 "BriefDescription": "RFO requests to L2 cache",
50 "CounterHTOff": "0,1,2,3,4,5,6,7"
51 },
52 {
33 "PublicDescription": "Number of instruction fetches that hit the L2 cache.", 53 "PublicDescription": "Number of instruction fetches that hit the L2 cache.",
34 "EventCode": "0x24", 54 "EventCode": "0x24",
35 "Counter": "0,1,2,3", 55 "Counter": "0,1,2,3",
@@ -50,6 +70,16 @@
50 "CounterHTOff": "0,1,2,3,4,5,6,7" 70 "CounterHTOff": "0,1,2,3,4,5,6,7"
51 }, 71 },
52 { 72 {
73 "PublicDescription": "Counts all L2 code requests.",
74 "EventCode": "0x24",
75 "Counter": "0,1,2,3",
76 "UMask": "0x30",
77 "EventName": "L2_RQSTS.ALL_CODE_RD",
78 "SampleAfterValue": "200003",
79 "BriefDescription": "L2 code requests",
80 "CounterHTOff": "0,1,2,3,4,5,6,7"
81 },
82 {
53 "PublicDescription": "Counts all L2 HW prefetcher requests that hit L2.", 83 "PublicDescription": "Counts all L2 HW prefetcher requests that hit L2.",
54 "EventCode": "0x24", 84 "EventCode": "0x24",
55 "Counter": "0,1,2,3", 85 "Counter": "0,1,2,3",
@@ -70,36 +100,6 @@
70 "CounterHTOff": "0,1,2,3,4,5,6,7" 100 "CounterHTOff": "0,1,2,3,4,5,6,7"
71 }, 101 },
72 { 102 {
73 "PublicDescription": "Counts any demand and L1 HW prefetch data load requests to L2.",
74 "EventCode": "0x24",
75 "Counter": "0,1,2,3",
76 "UMask": "0x3",
77 "EventName": "L2_RQSTS.ALL_DEMAND_DATA_RD",
78 "SampleAfterValue": "200003",
79 "BriefDescription": "Demand Data Read requests",
80 "CounterHTOff": "0,1,2,3,4,5,6,7"
81 },
82 {
83 "PublicDescription": "Counts all L2 store RFO requests.",
84 "EventCode": "0x24",
85 "Counter": "0,1,2,3",
86 "UMask": "0xc",
87 "EventName": "L2_RQSTS.ALL_RFO",
88 "SampleAfterValue": "200003",
89 "BriefDescription": "RFO requests to L2 cache",
90 "CounterHTOff": "0,1,2,3,4,5,6,7"
91 },
92 {
93 "PublicDescription": "Counts all L2 code requests.",
94 "EventCode": "0x24",
95 "Counter": "0,1,2,3",
96 "UMask": "0x30",
97 "EventName": "L2_RQSTS.ALL_CODE_RD",
98 "SampleAfterValue": "200003",
99 "BriefDescription": "L2 code requests",
100 "CounterHTOff": "0,1,2,3,4,5,6,7"
101 },
102 {
103 "PublicDescription": "Counts all L2 HW prefetcher requests.", 103 "PublicDescription": "Counts all L2 HW prefetcher requests.",
104 "EventCode": "0x24", 104 "EventCode": "0x24",
105 "Counter": "0,1,2,3", 105 "Counter": "0,1,2,3",
@@ -219,6 +219,29 @@
219 "CounterHTOff": "2" 219 "CounterHTOff": "2"
220 }, 220 },
221 { 221 {
222 "PublicDescription": "Cycles with L1D load Misses outstanding from any thread on physical core.",
223 "EventCode": "0x48",
224 "Counter": "2",
225 "UMask": "0x1",
226 "AnyThread": "1",
227 "EventName": "L1D_PEND_MISS.PENDING_CYCLES_ANY",
228 "SampleAfterValue": "2000003",
229 "BriefDescription": "Cycles with L1D load Misses outstanding from any thread on physical core",
230 "CounterMask": "1",
231 "CounterHTOff": "2"
232 },
233 {
234 "PublicDescription": "Cycles a demand request was blocked due to Fill Buffers inavailability.",
235 "EventCode": "0x48",
236 "Counter": "0,1,2,3",
237 "UMask": "0x2",
238 "EventName": "L1D_PEND_MISS.FB_FULL",
239 "SampleAfterValue": "2000003",
240 "BriefDescription": "Cycles a demand request was blocked due to Fill Buffers inavailability",
241 "CounterMask": "1",
242 "CounterHTOff": "0,1,2,3,4,5,6,7"
243 },
244 {
222 "PublicDescription": "Counts the number of lines brought into the L1 data cache.", 245 "PublicDescription": "Counts the number of lines brought into the L1 data cache.",
223 "EventCode": "0x51", 246 "EventCode": "0x51",
224 "Counter": "0,1,2,3", 247 "Counter": "0,1,2,3",
@@ -239,76 +262,87 @@
239 "CounterHTOff": "0,1,2,3,4,5,6,7" 262 "CounterHTOff": "0,1,2,3,4,5,6,7"
240 }, 263 },
241 { 264 {
242 "PublicDescription": "Offcore outstanding Demand Code Read transactions in SQ to uncore. Set Cmask=1 to count cycles.", 265 "PublicDescription": "Cycles when offcore outstanding Demand Data Read transactions are present in SuperQueue (SQ), queue to uncore.",
243 "EventCode": "0x60", 266 "EventCode": "0x60",
244 "Counter": "0,1,2,3", 267 "Counter": "0,1,2,3",
245 "UMask": "0x2", 268 "UMask": "0x1",
246 "EventName": "OFFCORE_REQUESTS_OUTSTANDING.DEMAND_CODE_RD", 269 "EventName": "OFFCORE_REQUESTS_OUTSTANDING.CYCLES_WITH_DEMAND_DATA_RD",
247 "SampleAfterValue": "2000003", 270 "SampleAfterValue": "2000003",
248 "BriefDescription": "Offcore outstanding code reads transactions in SuperQueue (SQ), queue to uncore, every cycle", 271 "BriefDescription": "Cycles when offcore outstanding Demand Data Read transactions are present in SuperQueue (SQ), queue to uncore",
272 "CounterMask": "1",
249 "CounterHTOff": "0,1,2,3,4,5,6,7" 273 "CounterHTOff": "0,1,2,3,4,5,6,7"
250 }, 274 },
251 { 275 {
252 "PublicDescription": "Offcore outstanding RFO store transactions in SQ to uncore. Set Cmask=1 to count cycles.", 276 "PublicDescription": "Cycles with at least 6 offcore outstanding Demand Data Read transactions in uncore queue.",
253 "EventCode": "0x60", 277 "EventCode": "0x60",
254 "Counter": "0,1,2,3", 278 "Counter": "0,1,2,3",
255 "UMask": "0x4", 279 "UMask": "0x1",
256 "EventName": "OFFCORE_REQUESTS_OUTSTANDING.DEMAND_RFO", 280 "EventName": "OFFCORE_REQUESTS_OUTSTANDING.DEMAND_DATA_RD_GE_6",
257 "SampleAfterValue": "2000003", 281 "SampleAfterValue": "2000003",
258 "BriefDescription": "Offcore outstanding RFO store transactions in SuperQueue (SQ), queue to uncore", 282 "BriefDescription": "Cycles with at least 6 offcore outstanding Demand Data Read transactions in uncore queue",
283 "CounterMask": "6",
259 "CounterHTOff": "0,1,2,3,4,5,6,7" 284 "CounterHTOff": "0,1,2,3,4,5,6,7"
260 }, 285 },
261 { 286 {
262 "PublicDescription": "Offcore outstanding cacheable data read transactions in SQ to uncore. Set Cmask=1 to count cycles.", 287 "PublicDescription": "Offcore outstanding Demand Code Read transactions in SQ to uncore. Set Cmask=1 to count cycles.",
263 "EventCode": "0x60", 288 "EventCode": "0x60",
264 "Counter": "0,1,2,3", 289 "Counter": "0,1,2,3",
265 "UMask": "0x8", 290 "UMask": "0x2",
266 "EventName": "OFFCORE_REQUESTS_OUTSTANDING.ALL_DATA_RD", 291 "EventName": "OFFCORE_REQUESTS_OUTSTANDING.DEMAND_CODE_RD",
267 "SampleAfterValue": "2000003", 292 "SampleAfterValue": "2000003",
268 "BriefDescription": "Offcore outstanding cacheable Core Data Read transactions in SuperQueue (SQ), queue to uncore", 293 "BriefDescription": "Offcore outstanding code reads transactions in SuperQueue (SQ), queue to uncore, every cycle",
269 "CounterHTOff": "0,1,2,3,4,5,6,7" 294 "CounterHTOff": "0,1,2,3,4,5,6,7"
270 }, 295 },
271 { 296 {
272 "PublicDescription": "Cycles when offcore outstanding Demand Data Read transactions are present in SuperQueue (SQ), queue to uncore.", 297 "PublicDescription": "Offcore outstanding code reads transactions in SuperQueue (SQ), queue to uncore, every cycle.",
273 "EventCode": "0x60", 298 "EventCode": "0x60",
274 "Counter": "0,1,2,3", 299 "Counter": "0,1,2,3",
275 "UMask": "0x1", 300 "UMask": "0x2",
276 "EventName": "OFFCORE_REQUESTS_OUTSTANDING.CYCLES_WITH_DEMAND_DATA_RD", 301 "EventName": "OFFCORE_REQUESTS_OUTSTANDING.CYCLES_WITH_DEMAND_CODE_RD",
277 "SampleAfterValue": "2000003", 302 "SampleAfterValue": "2000003",
278 "BriefDescription": "Cycles when offcore outstanding Demand Data Read transactions are present in SuperQueue (SQ), queue to uncore", 303 "BriefDescription": "Offcore outstanding code reads transactions in SuperQueue (SQ), queue to uncore, every cycle",
279 "CounterMask": "1", 304 "CounterMask": "1",
280 "CounterHTOff": "0,1,2,3,4,5,6,7" 305 "CounterHTOff": "0,1,2,3,4,5,6,7"
281 }, 306 },
282 { 307 {
283 "PublicDescription": "Cycles when offcore outstanding cacheable Core Data Read transactions are present in SuperQueue (SQ), queue to uncore.", 308 "PublicDescription": "Offcore outstanding RFO store transactions in SQ to uncore. Set Cmask=1 to count cycles.",
284 "EventCode": "0x60", 309 "EventCode": "0x60",
285 "Counter": "0,1,2,3", 310 "Counter": "0,1,2,3",
286 "UMask": "0x8", 311 "UMask": "0x4",
287 "EventName": "OFFCORE_REQUESTS_OUTSTANDING.CYCLES_WITH_DATA_RD", 312 "EventName": "OFFCORE_REQUESTS_OUTSTANDING.DEMAND_RFO",
288 "SampleAfterValue": "2000003", 313 "SampleAfterValue": "2000003",
289 "BriefDescription": "Cycles when offcore outstanding cacheable Core Data Read transactions are present in SuperQueue (SQ), queue to uncore", 314 "BriefDescription": "Offcore outstanding RFO store transactions in SuperQueue (SQ), queue to uncore",
290 "CounterMask": "1",
291 "CounterHTOff": "0,1,2,3,4,5,6,7" 315 "CounterHTOff": "0,1,2,3,4,5,6,7"
292 }, 316 },
293 { 317 {
294 "PublicDescription": "Offcore outstanding code reads transactions in SuperQueue (SQ), queue to uncore, every cycle.", 318 "PublicDescription": "Offcore outstanding demand rfo reads transactions in SuperQueue (SQ), queue to uncore, every cycle.",
295 "EventCode": "0x60", 319 "EventCode": "0x60",
296 "Counter": "0,1,2,3", 320 "Counter": "0,1,2,3",
297 "UMask": "0x2", 321 "UMask": "0x4",
298 "EventName": "OFFCORE_REQUESTS_OUTSTANDING.CYCLES_WITH_DEMAND_CODE_RD", 322 "EventName": "OFFCORE_REQUESTS_OUTSTANDING.CYCLES_WITH_DEMAND_RFO",
299 "SampleAfterValue": "2000003", 323 "SampleAfterValue": "2000003",
300 "BriefDescription": "Offcore outstanding code reads transactions in SuperQueue (SQ), queue to uncore, every cycle", 324 "BriefDescription": "Offcore outstanding demand rfo reads transactions in SuperQueue (SQ), queue to uncore, every cycle",
301 "CounterMask": "1", 325 "CounterMask": "1",
302 "CounterHTOff": "0,1,2,3,4,5,6,7" 326 "CounterHTOff": "0,1,2,3,4,5,6,7"
303 }, 327 },
304 { 328 {
305 "PublicDescription": "Offcore outstanding demand rfo reads transactions in SuperQueue (SQ), queue to uncore, every cycle.", 329 "PublicDescription": "Offcore outstanding cacheable data read transactions in SQ to uncore. Set Cmask=1 to count cycles.",
306 "EventCode": "0x60", 330 "EventCode": "0x60",
307 "Counter": "0,1,2,3", 331 "Counter": "0,1,2,3",
308 "UMask": "0x4", 332 "UMask": "0x8",
309 "EventName": "OFFCORE_REQUESTS_OUTSTANDING.CYCLES_WITH_DEMAND_RFO", 333 "EventName": "OFFCORE_REQUESTS_OUTSTANDING.ALL_DATA_RD",
310 "SampleAfterValue": "2000003", 334 "SampleAfterValue": "2000003",
311 "BriefDescription": "Offcore outstanding demand rfo reads transactions in SuperQueue (SQ), queue to uncore, every cycle", 335 "BriefDescription": "Offcore outstanding cacheable Core Data Read transactions in SuperQueue (SQ), queue to uncore",
336 "CounterHTOff": "0,1,2,3,4,5,6,7"
337 },
338 {
339 "PublicDescription": "Cycles when offcore outstanding cacheable Core Data Read transactions are present in SuperQueue (SQ), queue to uncore.",
340 "EventCode": "0x60",
341 "Counter": "0,1,2,3",
342 "UMask": "0x8",
343 "EventName": "OFFCORE_REQUESTS_OUTSTANDING.CYCLES_WITH_DATA_RD",
344 "SampleAfterValue": "2000003",
345 "BriefDescription": "Cycles when offcore outstanding cacheable Core Data Read transactions are present in SuperQueue (SQ), queue to uncore",
312 "CounterMask": "1", 346 "CounterMask": "1",
313 "CounterHTOff": "0,1,2,3,4,5,6,7" 347 "CounterHTOff": "0,1,2,3,4,5,6,7"
314 }, 348 },
@@ -379,7 +413,7 @@
379 "UMask": "0x11", 413 "UMask": "0x11",
380 "EventName": "MEM_UOPS_RETIRED.STLB_MISS_LOADS", 414 "EventName": "MEM_UOPS_RETIRED.STLB_MISS_LOADS",
381 "SampleAfterValue": "100003", 415 "SampleAfterValue": "100003",
382 "BriefDescription": "Retired load uops that miss the STLB.", 416 "BriefDescription": "Retired load uops that miss the STLB. (Precise Event)",
383 "CounterHTOff": "0,1,2,3" 417 "CounterHTOff": "0,1,2,3"
384 }, 418 },
385 { 419 {
@@ -389,7 +423,7 @@
389 "UMask": "0x12", 423 "UMask": "0x12",
390 "EventName": "MEM_UOPS_RETIRED.STLB_MISS_STORES", 424 "EventName": "MEM_UOPS_RETIRED.STLB_MISS_STORES",
391 "SampleAfterValue": "100003", 425 "SampleAfterValue": "100003",
392 "BriefDescription": "Retired store uops that miss the STLB.", 426 "BriefDescription": "Retired store uops that miss the STLB. (Precise Event)",
393 "CounterHTOff": "0,1,2,3" 427 "CounterHTOff": "0,1,2,3"
394 }, 428 },
395 { 429 {
@@ -399,7 +433,7 @@
399 "UMask": "0x21", 433 "UMask": "0x21",
400 "EventName": "MEM_UOPS_RETIRED.LOCK_LOADS", 434 "EventName": "MEM_UOPS_RETIRED.LOCK_LOADS",
401 "SampleAfterValue": "100007", 435 "SampleAfterValue": "100007",
402 "BriefDescription": "Retired load uops with locked access.", 436 "BriefDescription": "Retired load uops with locked access. (Precise Event)",
403 "CounterHTOff": "0,1,2,3" 437 "CounterHTOff": "0,1,2,3"
404 }, 438 },
405 { 439 {
@@ -409,7 +443,7 @@
409 "UMask": "0x41", 443 "UMask": "0x41",
410 "EventName": "MEM_UOPS_RETIRED.SPLIT_LOADS", 444 "EventName": "MEM_UOPS_RETIRED.SPLIT_LOADS",
411 "SampleAfterValue": "100003", 445 "SampleAfterValue": "100003",
412 "BriefDescription": "Retired load uops that split across a cacheline boundary.", 446 "BriefDescription": "Retired load uops that split across a cacheline boundary. (Precise Event)",
413 "CounterHTOff": "0,1,2,3" 447 "CounterHTOff": "0,1,2,3"
414 }, 448 },
415 { 449 {
@@ -419,7 +453,7 @@
419 "UMask": "0x42", 453 "UMask": "0x42",
420 "EventName": "MEM_UOPS_RETIRED.SPLIT_STORES", 454 "EventName": "MEM_UOPS_RETIRED.SPLIT_STORES",
421 "SampleAfterValue": "100003", 455 "SampleAfterValue": "100003",
422 "BriefDescription": "Retired store uops that split across a cacheline boundary.", 456 "BriefDescription": "Retired store uops that split across a cacheline boundary. (Precise Event)",
423 "CounterHTOff": "0,1,2,3" 457 "CounterHTOff": "0,1,2,3"
424 }, 458 },
425 { 459 {
@@ -429,7 +463,7 @@
429 "UMask": "0x81", 463 "UMask": "0x81",
430 "EventName": "MEM_UOPS_RETIRED.ALL_LOADS", 464 "EventName": "MEM_UOPS_RETIRED.ALL_LOADS",
431 "SampleAfterValue": "2000003", 465 "SampleAfterValue": "2000003",
432 "BriefDescription": "All retired load uops.", 466 "BriefDescription": "All retired load uops. (Precise Event)",
433 "CounterHTOff": "0,1,2,3" 467 "CounterHTOff": "0,1,2,3"
434 }, 468 },
435 { 469 {
@@ -439,67 +473,61 @@
439 "UMask": "0x82", 473 "UMask": "0x82",
440 "EventName": "MEM_UOPS_RETIRED.ALL_STORES", 474 "EventName": "MEM_UOPS_RETIRED.ALL_STORES",
441 "SampleAfterValue": "2000003", 475 "SampleAfterValue": "2000003",
442 "BriefDescription": "All retired store uops.", 476 "BriefDescription": "All retired store uops. (Precise Event)",
443 "CounterHTOff": "0,1,2,3" 477 "CounterHTOff": "0,1,2,3"
444 }, 478 },
445 { 479 {
446 "PEBS": "1", 480 "PEBS": "1",
447 "PublicDescription": "Retired load uops with L1 cache hits as data sources.",
448 "EventCode": "0xD1", 481 "EventCode": "0xD1",
449 "Counter": "0,1,2,3", 482 "Counter": "0,1,2,3",
450 "UMask": "0x1", 483 "UMask": "0x1",
451 "EventName": "MEM_LOAD_UOPS_RETIRED.L1_HIT", 484 "EventName": "MEM_LOAD_UOPS_RETIRED.L1_HIT",
452 "SampleAfterValue": "2000003", 485 "SampleAfterValue": "2000003",
453 "BriefDescription": "Retired load uops with L1 cache hits as data sources. ", 486 "BriefDescription": "Retired load uops with L1 cache hits as data sources.",
454 "CounterHTOff": "0,1,2,3" 487 "CounterHTOff": "0,1,2,3"
455 }, 488 },
456 { 489 {
457 "PEBS": "1", 490 "PEBS": "1",
458 "PublicDescription": "Retired load uops with L2 cache hits as data sources.",
459 "EventCode": "0xD1", 491 "EventCode": "0xD1",
460 "Counter": "0,1,2,3", 492 "Counter": "0,1,2,3",
461 "UMask": "0x2", 493 "UMask": "0x2",
462 "EventName": "MEM_LOAD_UOPS_RETIRED.L2_HIT", 494 "EventName": "MEM_LOAD_UOPS_RETIRED.L2_HIT",
463 "SampleAfterValue": "100003", 495 "SampleAfterValue": "100003",
464 "BriefDescription": "Retired load uops with L2 cache hits as data sources. ", 496 "BriefDescription": "Retired load uops with L2 cache hits as data sources.",
465 "CounterHTOff": "0,1,2,3" 497 "CounterHTOff": "0,1,2,3"
466 }, 498 },
467 { 499 {
468 "PEBS": "1", 500 "PEBS": "1",
469 "PublicDescription": "Retired load uops whose data source was LLC hit with no snoop required.",
470 "EventCode": "0xD1", 501 "EventCode": "0xD1",
471 "Counter": "0,1,2,3", 502 "Counter": "0,1,2,3",
472 "UMask": "0x4", 503 "UMask": "0x4",
473 "EventName": "MEM_LOAD_UOPS_RETIRED.LLC_HIT", 504 "EventName": "MEM_LOAD_UOPS_RETIRED.LLC_HIT",
474 "SampleAfterValue": "50021", 505 "SampleAfterValue": "50021",
475 "BriefDescription": "Retired load uops which data sources were data hits in LLC without snoops required. ", 506 "BriefDescription": "Retired load uops which data sources were data hits in LLC without snoops required.",
476 "CounterHTOff": "0,1,2,3" 507 "CounterHTOff": "0,1,2,3"
477 }, 508 },
478 { 509 {
479 "PEBS": "1", 510 "PEBS": "1",
480 "PublicDescription": "Retired load uops whose data source followed an L1 miss.",
481 "EventCode": "0xD1", 511 "EventCode": "0xD1",
482 "Counter": "0,1,2,3", 512 "Counter": "0,1,2,3",
483 "UMask": "0x8", 513 "UMask": "0x8",
484 "EventName": "MEM_LOAD_UOPS_RETIRED.L1_MISS", 514 "EventName": "MEM_LOAD_UOPS_RETIRED.L1_MISS",
485 "SampleAfterValue": "100003", 515 "SampleAfterValue": "100003",
486 "BriefDescription": "Retired load uops which data sources following L1 data-cache miss", 516 "BriefDescription": "Retired load uops which data sources following L1 data-cache miss.",
487 "CounterHTOff": "0,1,2,3" 517 "CounterHTOff": "0,1,2,3"
488 }, 518 },
489 { 519 {
490 "PEBS": "1", 520 "PEBS": "1",
491 "PublicDescription": "Retired load uops that missed L2, excluding unknown sources.",
492 "EventCode": "0xD1", 521 "EventCode": "0xD1",
493 "Counter": "0,1,2,3", 522 "Counter": "0,1,2,3",
494 "UMask": "0x10", 523 "UMask": "0x10",
495 "EventName": "MEM_LOAD_UOPS_RETIRED.L2_MISS", 524 "EventName": "MEM_LOAD_UOPS_RETIRED.L2_MISS",
496 "SampleAfterValue": "50021", 525 "SampleAfterValue": "50021",
497 "BriefDescription": "Miss in mid-level (L2) cache. Excludes Unknown data-source.", 526 "BriefDescription": "Retired load uops with L2 cache misses as data sources.",
498 "CounterHTOff": "0,1,2,3" 527 "CounterHTOff": "0,1,2,3"
499 }, 528 },
500 { 529 {
501 "PEBS": "1", 530 "PEBS": "1",
502 "PublicDescription": "Retired load uops whose data source is LLC miss.",
503 "EventCode": "0xD1", 531 "EventCode": "0xD1",
504 "Counter": "0,1,2,3", 532 "Counter": "0,1,2,3",
505 "UMask": "0x20", 533 "UMask": "0x20",
@@ -510,61 +538,56 @@
510 }, 538 },
511 { 539 {
512 "PEBS": "1", 540 "PEBS": "1",
513 "PublicDescription": "Retired load uops which data sources were load uops missed L1 but hit FB due to preceding miss to the same cache line with data not ready.",
514 "EventCode": "0xD1", 541 "EventCode": "0xD1",
515 "Counter": "0,1,2,3", 542 "Counter": "0,1,2,3",
516 "UMask": "0x40", 543 "UMask": "0x40",
517 "EventName": "MEM_LOAD_UOPS_RETIRED.HIT_LFB", 544 "EventName": "MEM_LOAD_UOPS_RETIRED.HIT_LFB",
518 "SampleAfterValue": "100003", 545 "SampleAfterValue": "100003",
519 "BriefDescription": "Retired load uops which data sources were load uops missed L1 but hit FB due to preceding miss to the same cache line with data not ready. ", 546 "BriefDescription": "Retired load uops which data sources were load uops missed L1 but hit FB due to preceding miss to the same cache line with data not ready.",
520 "CounterHTOff": "0,1,2,3" 547 "CounterHTOff": "0,1,2,3"
521 }, 548 },
522 { 549 {
523 "PEBS": "1", 550 "PEBS": "1",
524 "PublicDescription": "Retired load uops whose data source was an on-package core cache LLC hit and cross-core snoop missed.",
525 "EventCode": "0xD2", 551 "EventCode": "0xD2",
526 "Counter": "0,1,2,3", 552 "Counter": "0,1,2,3",
527 "UMask": "0x1", 553 "UMask": "0x1",
528 "EventName": "MEM_LOAD_UOPS_LLC_HIT_RETIRED.XSNP_MISS", 554 "EventName": "MEM_LOAD_UOPS_LLC_HIT_RETIRED.XSNP_MISS",
529 "SampleAfterValue": "20011", 555 "SampleAfterValue": "20011",
530 "BriefDescription": "Retired load uops which data sources were LLC hit and cross-core snoop missed in on-pkg core cache. ", 556 "BriefDescription": "Retired load uops which data sources were LLC hit and cross-core snoop missed in on-pkg core cache.",
531 "CounterHTOff": "0,1,2,3" 557 "CounterHTOff": "0,1,2,3"
532 }, 558 },
533 { 559 {
534 "PEBS": "1", 560 "PEBS": "1",
535 "PublicDescription": "Retired load uops whose data source was an on-package LLC hit and cross-core snoop hits.",
536 "EventCode": "0xD2", 561 "EventCode": "0xD2",
537 "Counter": "0,1,2,3", 562 "Counter": "0,1,2,3",
538 "UMask": "0x2", 563 "UMask": "0x2",
539 "EventName": "MEM_LOAD_UOPS_LLC_HIT_RETIRED.XSNP_HIT", 564 "EventName": "MEM_LOAD_UOPS_LLC_HIT_RETIRED.XSNP_HIT",
540 "SampleAfterValue": "20011", 565 "SampleAfterValue": "20011",
541 "BriefDescription": "Retired load uops which data sources were LLC and cross-core snoop hits in on-pkg core cache. ", 566 "BriefDescription": "Retired load uops which data sources were LLC and cross-core snoop hits in on-pkg core cache.",
542 "CounterHTOff": "0,1,2,3" 567 "CounterHTOff": "0,1,2,3"
543 }, 568 },
544 { 569 {
545 "PEBS": "1", 570 "PEBS": "1",
546 "PublicDescription": "Retired load uops whose data source was an on-package core cache with HitM responses.",
547 "EventCode": "0xD2", 571 "EventCode": "0xD2",
548 "Counter": "0,1,2,3", 572 "Counter": "0,1,2,3",
549 "UMask": "0x4", 573 "UMask": "0x4",
550 "EventName": "MEM_LOAD_UOPS_LLC_HIT_RETIRED.XSNP_HITM", 574 "EventName": "MEM_LOAD_UOPS_LLC_HIT_RETIRED.XSNP_HITM",
551 "SampleAfterValue": "20011", 575 "SampleAfterValue": "20011",
552 "BriefDescription": "Retired load uops which data sources were HitM responses from shared LLC. ", 576 "BriefDescription": "Retired load uops which data sources were HitM responses from shared LLC.",
553 "CounterHTOff": "0,1,2,3" 577 "CounterHTOff": "0,1,2,3"
554 }, 578 },
555 { 579 {
556 "PEBS": "1", 580 "PEBS": "1",
557 "PublicDescription": "Retired load uops whose data source was LLC hit with no snoop required.",
558 "EventCode": "0xD2", 581 "EventCode": "0xD2",
559 "Counter": "0,1,2,3", 582 "Counter": "0,1,2,3",
560 "UMask": "0x8", 583 "UMask": "0x8",
561 "EventName": "MEM_LOAD_UOPS_LLC_HIT_RETIRED.XSNP_NONE", 584 "EventName": "MEM_LOAD_UOPS_LLC_HIT_RETIRED.XSNP_NONE",
562 "SampleAfterValue": "100003", 585 "SampleAfterValue": "100003",
563 "BriefDescription": "Retired load uops which data sources were hits in LLC without snoops required. ", 586 "BriefDescription": "Retired load uops which data sources were hits in LLC without snoops required.",
564 "CounterHTOff": "0,1,2,3" 587 "CounterHTOff": "0,1,2,3"
565 }, 588 },
566 { 589 {
567 "PublicDescription": "Retired load uop whose Data Source was: local DRAM either Snoop not needed or Snoop Miss (RspI)", 590 "PublicDescription": "Retired load uops whose data source was local memory (cross-socket snoop not needed or missed).",
568 "EventCode": "0xD3", 591 "EventCode": "0xD3",
569 "Counter": "0,1,2,3", 592 "Counter": "0,1,2,3",
570 "UMask": "0x1", 593 "UMask": "0x1",
@@ -753,50 +776,6 @@
753 "CounterHTOff": "0,1,2,3,4,5,6,7" 776 "CounterHTOff": "0,1,2,3,4,5,6,7"
754 }, 777 },
755 { 778 {
756 "PublicDescription": "Retired load uops whose data source was local memory (cross-socket snoop not needed or missed).",
757 "EventCode": "0xD3",
758 "Counter": "0,1,2,3",
759 "UMask": "0x1",
760 "EventName": "MEM_LOAD_UOPS_LLC_MISS_RETIRED.LOCAL_DRAM",
761 "SampleAfterValue": "100007",
762 "BriefDescription": "Retired load uops which data sources missed LLC but serviced from local dram.",
763 "CounterHTOff": "0,1,2,3"
764 },
765 {
766 "PublicDescription": "Cycles with at least 6 offcore outstanding Demand Data Read transactions in uncore queue.",
767 "EventCode": "0x60",
768 "Counter": "0,1,2,3",
769 "UMask": "0x1",
770 "EventName": "OFFCORE_REQUESTS_OUTSTANDING.DEMAND_DATA_RD_GE_6",
771 "SampleAfterValue": "2000003",
772 "BriefDescription": "Cycles with at least 6 offcore outstanding Demand Data Read transactions in uncore queue",
773 "CounterMask": "6",
774 "CounterHTOff": "0,1,2,3,4,5,6,7"
775 },
776 {
777 "PublicDescription": "Cycles with L1D load Misses outstanding from any thread on physical core.",
778 "EventCode": "0x48",
779 "Counter": "2",
780 "UMask": "0x1",
781 "AnyThread": "1",
782 "EventName": "L1D_PEND_MISS.PENDING_CYCLES_ANY",
783 "SampleAfterValue": "2000003",
784 "BriefDescription": "Cycles with L1D load Misses outstanding from any thread on physical core",
785 "CounterMask": "1",
786 "CounterHTOff": "2"
787 },
788 {
789 "PublicDescription": "Cycles a demand request was blocked due to Fill Buffers inavailability.",
790 "EventCode": "0x48",
791 "Counter": "0,1,2,3",
792 "UMask": "0x2",
793 "EventName": "L1D_PEND_MISS.FB_FULL",
794 "SampleAfterValue": "2000003",
795 "BriefDescription": "Cycles a demand request was blocked due to Fill Buffers inavailability",
796 "CounterMask": "1",
797 "CounterHTOff": "0,1,2,3,4,5,6,7"
798 },
799 {
800 "EventCode": "0xB7, 0xBB", 779 "EventCode": "0xB7, 0xBB",
801 "MSRValue": "0x3f803c0244", 780 "MSRValue": "0x3f803c0244",
802 "Counter": "0,1,2,3", 781 "Counter": "0,1,2,3",
diff --git a/tools/perf/pmu-events/arch/x86/ivybridge/frontend.json b/tools/perf/pmu-events/arch/x86/ivybridge/frontend.json
index de72b84b3536..efaa949ead31 100644
--- a/tools/perf/pmu-events/arch/x86/ivybridge/frontend.json
+++ b/tools/perf/pmu-events/arch/x86/ivybridge/frontend.json
@@ -20,76 +20,45 @@
20 "CounterHTOff": "0,1,2,3,4,5,6,7" 20 "CounterHTOff": "0,1,2,3,4,5,6,7"
21 }, 21 },
22 { 22 {
23 "PublicDescription": "Increment each cycle. # of uops delivered to IDQ from DSB path. Set Cmask = 1 to count cycles.", 23 "PublicDescription": "Cycles when uops are being delivered to Instruction Decode Queue (IDQ) from MITE path.",
24 "EventCode": "0x79",
25 "Counter": "0,1,2,3",
26 "UMask": "0x8",
27 "EventName": "IDQ.DSB_UOPS",
28 "SampleAfterValue": "2000003",
29 "BriefDescription": "Uops delivered to Instruction Decode Queue (IDQ) from the Decode Stream Buffer (DSB) path",
30 "CounterHTOff": "0,1,2,3,4,5,6,7"
31 },
32 {
33 "PublicDescription": "Increment each cycle # of uops delivered to IDQ when MS_busy by DSB. Set Cmask = 1 to count cycles. Add Edge=1 to count # of delivery.",
34 "EventCode": "0x79",
35 "Counter": "0,1,2,3",
36 "UMask": "0x10",
37 "EventName": "IDQ.MS_DSB_UOPS",
38 "SampleAfterValue": "2000003",
39 "BriefDescription": "Uops initiated by Decode Stream Buffer (DSB) that are being delivered to Instruction Decode Queue (IDQ) while Microcode Sequenser (MS) is busy",
40 "CounterHTOff": "0,1,2,3,4,5,6,7"
41 },
42 {
43 "PublicDescription": "Increment each cycle # of uops delivered to IDQ when MS_busy by MITE. Set Cmask = 1 to count cycles.",
44 "EventCode": "0x79",
45 "Counter": "0,1,2,3",
46 "UMask": "0x20",
47 "EventName": "IDQ.MS_MITE_UOPS",
48 "SampleAfterValue": "2000003",
49 "BriefDescription": "Uops initiated by MITE and delivered to Instruction Decode Queue (IDQ) while Microcode Sequenser (MS) is busy",
50 "CounterHTOff": "0,1,2,3,4,5,6,7"
51 },
52 {
53 "PublicDescription": "Increment each cycle # of uops delivered to IDQ from MS by either DSB or MITE. Set Cmask = 1 to count cycles.",
54 "EventCode": "0x79", 24 "EventCode": "0x79",
55 "Counter": "0,1,2,3", 25 "Counter": "0,1,2,3",
56 "UMask": "0x30", 26 "UMask": "0x4",
57 "EventName": "IDQ.MS_UOPS", 27 "EventName": "IDQ.MITE_CYCLES",
58 "SampleAfterValue": "2000003", 28 "SampleAfterValue": "2000003",
59 "BriefDescription": "Uops delivered to Instruction Decode Queue (IDQ) while Microcode Sequenser (MS) is busy", 29 "BriefDescription": "Cycles when uops are being delivered to Instruction Decode Queue (IDQ) from MITE path",
30 "CounterMask": "1",
60 "CounterHTOff": "0,1,2,3,4,5,6,7" 31 "CounterHTOff": "0,1,2,3,4,5,6,7"
61 }, 32 },
62 { 33 {
63 "PublicDescription": "Cycles when uops are being delivered to Instruction Decode Queue (IDQ) while Microcode Sequenser (MS) is busy.", 34 "PublicDescription": "Increment each cycle. # of uops delivered to IDQ from DSB path. Set Cmask = 1 to count cycles.",
64 "EventCode": "0x79", 35 "EventCode": "0x79",
65 "Counter": "0,1,2,3", 36 "Counter": "0,1,2,3",
66 "UMask": "0x30", 37 "UMask": "0x8",
67 "EventName": "IDQ.MS_CYCLES", 38 "EventName": "IDQ.DSB_UOPS",
68 "SampleAfterValue": "2000003", 39 "SampleAfterValue": "2000003",
69 "BriefDescription": "Cycles when uops are being delivered to Instruction Decode Queue (IDQ) while Microcode Sequenser (MS) is busy", 40 "BriefDescription": "Uops delivered to Instruction Decode Queue (IDQ) from the Decode Stream Buffer (DSB) path",
70 "CounterMask": "1",
71 "CounterHTOff": "0,1,2,3,4,5,6,7" 41 "CounterHTOff": "0,1,2,3,4,5,6,7"
72 }, 42 },
73 { 43 {
74 "PublicDescription": "Cycles when uops are being delivered to Instruction Decode Queue (IDQ) from MITE path.", 44 "PublicDescription": "Cycles when uops are being delivered to Instruction Decode Queue (IDQ) from Decode Stream Buffer (DSB) path.",
75 "EventCode": "0x79", 45 "EventCode": "0x79",
76 "Counter": "0,1,2,3", 46 "Counter": "0,1,2,3",
77 "UMask": "0x4", 47 "UMask": "0x8",
78 "EventName": "IDQ.MITE_CYCLES", 48 "EventName": "IDQ.DSB_CYCLES",
79 "SampleAfterValue": "2000003", 49 "SampleAfterValue": "2000003",
80 "BriefDescription": "Cycles when uops are being delivered to Instruction Decode Queue (IDQ) from MITE path", 50 "BriefDescription": "Cycles when uops are being delivered to Instruction Decode Queue (IDQ) from Decode Stream Buffer (DSB) path",
81 "CounterMask": "1", 51 "CounterMask": "1",
82 "CounterHTOff": "0,1,2,3,4,5,6,7" 52 "CounterHTOff": "0,1,2,3,4,5,6,7"
83 }, 53 },
84 { 54 {
85 "PublicDescription": "Cycles when uops are being delivered to Instruction Decode Queue (IDQ) from Decode Stream Buffer (DSB) path.", 55 "PublicDescription": "Increment each cycle # of uops delivered to IDQ when MS_busy by DSB. Set Cmask = 1 to count cycles. Add Edge=1 to count # of delivery.",
86 "EventCode": "0x79", 56 "EventCode": "0x79",
87 "Counter": "0,1,2,3", 57 "Counter": "0,1,2,3",
88 "UMask": "0x8", 58 "UMask": "0x10",
89 "EventName": "IDQ.DSB_CYCLES", 59 "EventName": "IDQ.MS_DSB_UOPS",
90 "SampleAfterValue": "2000003", 60 "SampleAfterValue": "2000003",
91 "BriefDescription": "Cycles when uops are being delivered to Instruction Decode Queue (IDQ) from Decode Stream Buffer (DSB) path", 61 "BriefDescription": "Uops initiated by Decode Stream Buffer (DSB) that are being delivered to Instruction Decode Queue (IDQ) while Microcode Sequenser (MS) is busy",
92 "CounterMask": "1",
93 "CounterHTOff": "0,1,2,3,4,5,6,7" 62 "CounterHTOff": "0,1,2,3,4,5,6,7"
94 }, 63 },
95 { 64 {
@@ -138,6 +107,16 @@
138 "CounterHTOff": "0,1,2,3,4,5,6,7" 107 "CounterHTOff": "0,1,2,3,4,5,6,7"
139 }, 108 },
140 { 109 {
110 "PublicDescription": "Increment each cycle # of uops delivered to IDQ when MS_busy by MITE. Set Cmask = 1 to count cycles.",
111 "EventCode": "0x79",
112 "Counter": "0,1,2,3",
113 "UMask": "0x20",
114 "EventName": "IDQ.MS_MITE_UOPS",
115 "SampleAfterValue": "2000003",
116 "BriefDescription": "Uops initiated by MITE and delivered to Instruction Decode Queue (IDQ) while Microcode Sequenser (MS) is busy",
117 "CounterHTOff": "0,1,2,3,4,5,6,7"
118 },
119 {
141 "PublicDescription": "Counts cycles MITE is delivered four uops. Set Cmask = 4.", 120 "PublicDescription": "Counts cycles MITE is delivered four uops. Set Cmask = 4.",
142 "EventCode": "0x79", 121 "EventCode": "0x79",
143 "Counter": "0,1,2,3", 122 "Counter": "0,1,2,3",
@@ -160,6 +139,39 @@
160 "CounterHTOff": "0,1,2,3,4,5,6,7" 139 "CounterHTOff": "0,1,2,3,4,5,6,7"
161 }, 140 },
162 { 141 {
142 "PublicDescription": "Increment each cycle # of uops delivered to IDQ from MS by either DSB or MITE. Set Cmask = 1 to count cycles.",
143 "EventCode": "0x79",
144 "Counter": "0,1,2,3",
145 "UMask": "0x30",
146 "EventName": "IDQ.MS_UOPS",
147 "SampleAfterValue": "2000003",
148 "BriefDescription": "Uops delivered to Instruction Decode Queue (IDQ) while Microcode Sequenser (MS) is busy",
149 "CounterHTOff": "0,1,2,3,4,5,6,7"
150 },
151 {
152 "PublicDescription": "Cycles when uops are being delivered to Instruction Decode Queue (IDQ) while Microcode Sequenser (MS) is busy.",
153 "EventCode": "0x79",
154 "Counter": "0,1,2,3",
155 "UMask": "0x30",
156 "EventName": "IDQ.MS_CYCLES",
157 "SampleAfterValue": "2000003",
158 "BriefDescription": "Cycles when uops are being delivered to Instruction Decode Queue (IDQ) while Microcode Sequenser (MS) is busy",
159 "CounterMask": "1",
160 "CounterHTOff": "0,1,2,3,4,5,6,7"
161 },
162 {
163 "PublicDescription": "Number of switches from DSB (Decode Stream Buffer) or MITE (legacy decode pipeline) to the Microcode Sequencer.",
164 "EventCode": "0x79",
165 "Counter": "0,1,2,3",
166 "UMask": "0x30",
167 "EdgeDetect": "1",
168 "EventName": "IDQ.MS_SWITCHES",
169 "SampleAfterValue": "2000003",
170 "BriefDescription": "Number of switches from DSB (Decode Stream Buffer) or MITE (legacy decode pipeline) to the Microcode Sequencer",
171 "CounterMask": "1",
172 "CounterHTOff": "0,1,2,3,4,5,6,7"
173 },
174 {
163 "PublicDescription": "Number of uops delivered to IDQ from any path.", 175 "PublicDescription": "Number of uops delivered to IDQ from any path.",
164 "EventCode": "0x79", 176 "EventCode": "0x79",
165 "Counter": "0,1,2,3", 177 "Counter": "0,1,2,3",
@@ -206,7 +218,7 @@
206 "UMask": "0x1", 218 "UMask": "0x1",
207 "EventName": "IDQ_UOPS_NOT_DELIVERED.CORE", 219 "EventName": "IDQ_UOPS_NOT_DELIVERED.CORE",
208 "SampleAfterValue": "2000003", 220 "SampleAfterValue": "2000003",
209 "BriefDescription": "Uops not delivered to Resource Allocation Table (RAT) per thread when backend of the machine is not stalled ", 221 "BriefDescription": "Uops not delivered to Resource Allocation Table (RAT) per thread when backend of the machine is not stalled",
210 "CounterHTOff": "0,1,2,3" 222 "CounterHTOff": "0,1,2,3"
211 }, 223 },
212 { 224 {
@@ -289,17 +301,5 @@
289 "SampleAfterValue": "2000003", 301 "SampleAfterValue": "2000003",
290 "BriefDescription": "Cycles when Decode Stream Buffer (DSB) fill encounter more than 3 Decode Stream Buffer (DSB) lines", 302 "BriefDescription": "Cycles when Decode Stream Buffer (DSB) fill encounter more than 3 Decode Stream Buffer (DSB) lines",
291 "CounterHTOff": "0,1,2,3,4,5,6,7" 303 "CounterHTOff": "0,1,2,3,4,5,6,7"
292 },
293 {
294 "PublicDescription": "Number of switches from DSB (Decode Stream Buffer) or MITE (legacy decode pipeline) to the Microcode Sequencer.",
295 "EventCode": "0x79",
296 "Counter": "0,1,2,3",
297 "UMask": "0x30",
298 "EdgeDetect": "1",
299 "EventName": "IDQ.MS_SWITCHES",
300 "SampleAfterValue": "2000003",
301 "BriefDescription": "Number of switches from DSB (Decode Stream Buffer) or MITE (legacy decode pipeline) to the Microcode Sequencer",
302 "CounterMask": "1",
303 "CounterHTOff": "0,1,2,3,4,5,6,7"
304 } 304 }
305] \ No newline at end of file 305] \ No newline at end of file
diff --git a/tools/perf/pmu-events/arch/x86/ivybridge/ivb-metrics.json b/tools/perf/pmu-events/arch/x86/ivybridge/ivb-metrics.json
new file mode 100644
index 000000000000..7c2679514efb
--- /dev/null
+++ b/tools/perf/pmu-events/arch/x86/ivybridge/ivb-metrics.json
@@ -0,0 +1,164 @@
1[
2 {
3 "BriefDescription": "Instructions Per Cycle (per logical thread)",
4 "MetricExpr": "INST_RETIRED.ANY / CPU_CLK_UNHALTED.THREAD",
5 "MetricGroup": "TopDownL1",
6 "MetricName": "IPC"
7 },
8 {
9 "BriefDescription": "Uops Per Instruction",
10 "MetricExpr": "UOPS_RETIRED.RETIRE_SLOTS / INST_RETIRED.ANY",
11 "MetricGroup": "Pipeline",
12 "MetricName": "UPI"
13 },
14 {
15 "BriefDescription": "Rough Estimation of fraction of fetched lines bytes that were likely consumed by program instructions",
16 "MetricExpr": "min( 1 , UOPS_ISSUED.ANY / ( (UOPS_RETIRED.RETIRE_SLOTS / INST_RETIRED.ANY) * 32 * ( ICACHE.HIT + ICACHE.MISSES ) / 4) )",
17 "MetricGroup": "Frontend",
18 "MetricName": "IFetch_Line_Utilization"
19 },
20 {
21 "BriefDescription": "Fraction of Uops delivered by the DSB (aka Decoded Icache; or Uop Cache)",
22 "MetricExpr": "IDQ.DSB_UOPS / ( IDQ.DSB_UOPS + LSD.UOPS + IDQ.MITE_UOPS + IDQ.MS_UOPS )",
23 "MetricGroup": "DSB; Frontend_Bandwidth",
24 "MetricName": "DSB_Coverage"
25 },
26 {
27 "BriefDescription": "Cycles Per Instruction (threaded)",
28 "MetricExpr": "1 / (INST_RETIRED.ANY / cycles)",
29 "MetricGroup": "Pipeline;Summary",
30 "MetricName": "CPI"
31 },
32 {
33 "BriefDescription": "Per-thread actual clocks when the logical processor is active. This is called 'Clockticks' in VTune.",
34 "MetricExpr": "CPU_CLK_UNHALTED.THREAD",
35 "MetricGroup": "Summary",
36 "MetricName": "CLKS"
37 },
38 {
39 "BriefDescription": "Total issue-pipeline slots",
40 "MetricExpr": "4*(( CPU_CLK_UNHALTED.THREAD_ANY / 2 ) if #SMT_on else cycles)",
41 "MetricGroup": "TopDownL1",
42 "MetricName": "SLOTS"
43 },
44 {
45 "BriefDescription": "Total number of retired Instructions",
46 "MetricExpr": "INST_RETIRED.ANY",
47 "MetricGroup": "Summary",
48 "MetricName": "Instructions"
49 },
50 {
51 "BriefDescription": "Instructions Per Cycle (per physical core)",
52 "MetricExpr": "INST_RETIRED.ANY / (( CPU_CLK_UNHALTED.THREAD_ANY / 2 ) if #SMT_on else cycles)",
53 "MetricGroup": "SMT",
54 "MetricName": "CoreIPC"
55 },
56 {
57 "BriefDescription": "Instruction-Level-Parallelism (average number of uops executed when there is at least 1 uop executed)",
58 "MetricExpr": "UOPS_EXECUTED.THREAD / (( cpu@UOPS_EXECUTED.CORE\\,cmask\\=1@ / 2) if #SMT_on else UOPS_EXECUTED.CYCLES_GE_1_UOP_EXEC)",
59 "MetricGroup": "Pipeline;Ports_Utilization",
60 "MetricName": "ILP"
61 },
62 {
63 "BriefDescription": "Average Branch Address Clear Cost (fraction of cycles)",
64 "MetricExpr": "2* (( RS_EVENTS.EMPTY_CYCLES - ICACHE.IFETCH_STALL ) / RS_EVENTS.EMPTY_END)",
65 "MetricGroup": "Unknown_Branches",
66 "MetricName": "BAClear_Cost"
67 },
68 {
69 "BriefDescription": "Core actual clocks when any thread is active on the physical core",
70 "MetricExpr": "( CPU_CLK_UNHALTED.THREAD_ANY / 2 ) if #SMT_on else CPU_CLK_UNHALTED.THREAD",
71 "MetricGroup": "SMT",
72 "MetricName": "CORE_CLKS"
73 },
74 {
75 "BriefDescription": "Actual Average Latency for L1 data-cache miss demand loads",
76 "MetricExpr": "L1D_PEND_MISS.PENDING / ( MEM_LOAD_UOPS_RETIRED.L1_MISS + mem_load_uops_retired.hit_lfb )",
77 "MetricGroup": "Memory_Bound;Memory_Lat",
78 "MetricName": "Load_Miss_Real_Latency"
79 },
80 {
81 "BriefDescription": "Memory-Level-Parallelism (average number of L1 miss demand load when there is at least 1 such miss)",
82 "MetricExpr": "L1D_PEND_MISS.PENDING / (( cpu@l1d_pend_miss.pending_cycles\\,any\\=1@ / 2) if #SMT_on else L1D_PEND_MISS.PENDING_CYCLES)",
83 "MetricGroup": "Memory_Bound;Memory_BW",
84 "MetricName": "MLP"
85 },
86 {
87 "BriefDescription": "Utilization of the core's Page Walker(s) serving STLB misses triggered by instruction/Load/Store accesses",
88 "MetricExpr": "( ITLB_MISSES.WALK_DURATION + DTLB_LOAD_MISSES.WALK_DURATION + DTLB_STORE_MISSES.WALK_DURATION ) / (( CPU_CLK_UNHALTED.THREAD_ANY / 2 ) if #SMT_on else cycles)",
89 "MetricGroup": "TLB",
90 "MetricName": "Page_Walks_Utilization"
91 },
92 {
93 "BriefDescription": "Average CPU Utilization",
94 "MetricExpr": "CPU_CLK_UNHALTED.REF_TSC / msr@tsc@",
95 "MetricGroup": "Summary",
96 "MetricName": "CPU_Utilization"
97 },
98 {
99 "BriefDescription": "Giga Floating Point Operations Per Second",
100 "MetricExpr": "(( 1*( FP_COMP_OPS_EXE.SSE_SCALAR_SINGLE + FP_COMP_OPS_EXE.SSE_SCALAR_DOUBLE ) + 2* FP_COMP_OPS_EXE.SSE_PACKED_DOUBLE + 4*( FP_COMP_OPS_EXE.SSE_PACKED_SINGLE + SIMD_FP_256.PACKED_DOUBLE ) + 8* SIMD_FP_256.PACKED_SINGLE )) / 1000000000 / duration_time",
101 "MetricGroup": "FLOPS;Summary",
102 "MetricName": "GFLOPs"
103 },
104 {
105 "BriefDescription": "Average Frequency Utilization relative nominal frequency",
106 "MetricExpr": "CPU_CLK_UNHALTED.THREAD / CPU_CLK_UNHALTED.REF_TSC",
107 "MetricGroup": "Power",
108 "MetricName": "Turbo_Utilization"
109 },
110 {
111 "BriefDescription": "Fraction of cycles where both hardware threads were active",
112 "MetricExpr": "1 - CPU_CLK_THREAD_UNHALTED.ONE_THREAD_ACTIVE / ( CPU_CLK_THREAD_UNHALTED.REF_XCLK_ANY / 2 ) if #SMT_on else 0",
113 "MetricGroup": "SMT;Summary",
114 "MetricName": "SMT_2T_Utilization"
115 },
116 {
117 "BriefDescription": "Fraction of cycles spent in Kernel mode",
118 "MetricExpr": "CPU_CLK_UNHALTED.REF_TSC:u / CPU_CLK_UNHALTED.REF_TSC",
119 "MetricGroup": "Summary",
120 "MetricName": "Kernel_Utilization"
121 },
122 {
123 "BriefDescription": "C3 residency percent per core",
124 "MetricExpr": "(cstate_core@c3\\-residency@ / msr@tsc@) * 100",
125 "MetricGroup": "Power",
126 "MetricName": "C3_Core_Residency"
127 },
128 {
129 "BriefDescription": "C6 residency percent per core",
130 "MetricExpr": "(cstate_core@c6\\-residency@ / msr@tsc@) * 100",
131 "MetricGroup": "Power",
132 "MetricName": "C6_Core_Residency"
133 },
134 {
135 "BriefDescription": "C7 residency percent per core",
136 "MetricExpr": "(cstate_core@c7\\-residency@ / msr@tsc@) * 100",
137 "MetricGroup": "Power",
138 "MetricName": "C7_Core_Residency"
139 },
140 {
141 "BriefDescription": "C2 residency percent per package",
142 "MetricExpr": "(cstate_pkg@c2\\-residency@ / msr@tsc@) * 100",
143 "MetricGroup": "Power",
144 "MetricName": "C2_Pkg_Residency"
145 },
146 {
147 "BriefDescription": "C3 residency percent per package",
148 "MetricExpr": "(cstate_pkg@c3\\-residency@ / msr@tsc@) * 100",
149 "MetricGroup": "Power",
150 "MetricName": "C3_Pkg_Residency"
151 },
152 {
153 "BriefDescription": "C6 residency percent per package",
154 "MetricExpr": "(cstate_pkg@c6\\-residency@ / msr@tsc@) * 100",
155 "MetricGroup": "Power",
156 "MetricName": "C6_Pkg_Residency"
157 },
158 {
159 "BriefDescription": "C7 residency percent per package",
160 "MetricExpr": "(cstate_pkg@c7\\-residency@ / msr@tsc@) * 100",
161 "MetricGroup": "Power",
162 "MetricName": "C7_Pkg_Residency"
163 }
164]
diff --git a/tools/perf/pmu-events/arch/x86/ivybridge/memory.json b/tools/perf/pmu-events/arch/x86/ivybridge/memory.json
index e1c6a1d4a4d5..a74d54f56192 100644
--- a/tools/perf/pmu-events/arch/x86/ivybridge/memory.json
+++ b/tools/perf/pmu-events/arch/x86/ivybridge/memory.json
@@ -39,18 +39,6 @@
39 }, 39 },
40 { 40 {
41 "PEBS": "2", 41 "PEBS": "2",
42 "EventCode": "0xCD",
43 "Counter": "3",
44 "UMask": "0x2",
45 "EventName": "MEM_TRANS_RETIRED.PRECISE_STORE",
46 "SampleAfterValue": "2000003",
47 "BriefDescription": "Sample stores and collect precise store operation via PEBS record. PMC3 only.",
48 "PRECISE_STORE": "1",
49 "TakenAlone": "1",
50 "CounterHTOff": "3"
51 },
52 {
53 "PEBS": "2",
54 "PublicDescription": "Loads with latency value being above 4.", 42 "PublicDescription": "Loads with latency value being above 4.",
55 "EventCode": "0xCD", 43 "EventCode": "0xCD",
56 "MSRValue": "0x4", 44 "MSRValue": "0x4",
@@ -162,6 +150,18 @@
162 "CounterHTOff": "3" 150 "CounterHTOff": "3"
163 }, 151 },
164 { 152 {
153 "PEBS": "2",
154 "EventCode": "0xCD",
155 "Counter": "3",
156 "UMask": "0x2",
157 "EventName": "MEM_TRANS_RETIRED.PRECISE_STORE",
158 "SampleAfterValue": "2000003",
159 "BriefDescription": "Sample stores and collect precise store operation via PEBS record. PMC3 only.",
160 "PRECISE_STORE": "1",
161 "TakenAlone": "1",
162 "CounterHTOff": "3"
163 },
164 {
165 "EventCode": "0xB7, 0xBB", 165 "EventCode": "0xB7, 0xBB",
166 "MSRValue": "0x300400244", 166 "MSRValue": "0x300400244",
167 "Counter": "0,1,2,3", 167 "Counter": "0,1,2,3",
diff --git a/tools/perf/pmu-events/arch/x86/ivybridge/other.json b/tools/perf/pmu-events/arch/x86/ivybridge/other.json
index 9c2dd0511a32..4eb83ee40412 100644
--- a/tools/perf/pmu-events/arch/x86/ivybridge/other.json
+++ b/tools/perf/pmu-events/arch/x86/ivybridge/other.json
@@ -10,16 +10,6 @@
10 "CounterHTOff": "0,1,2,3,4,5,6,7" 10 "CounterHTOff": "0,1,2,3,4,5,6,7"
11 }, 11 },
12 { 12 {
13 "PublicDescription": "Unhalted core cycles when the thread is not in ring 0.",
14 "EventCode": "0x5C",
15 "Counter": "0,1,2,3",
16 "UMask": "0x2",
17 "EventName": "CPL_CYCLES.RING123",
18 "SampleAfterValue": "2000003",
19 "BriefDescription": "Unhalted core cycles when thread is in rings 1, 2, or 3",
20 "CounterHTOff": "0,1,2,3,4,5,6,7"
21 },
22 {
23 "PublicDescription": "Number of intervals between processor halts while thread is in ring 0.", 13 "PublicDescription": "Number of intervals between processor halts while thread is in ring 0.",
24 "EventCode": "0x5C", 14 "EventCode": "0x5C",
25 "Counter": "0,1,2,3", 15 "Counter": "0,1,2,3",
@@ -32,6 +22,16 @@
32 "CounterHTOff": "0,1,2,3,4,5,6,7" 22 "CounterHTOff": "0,1,2,3,4,5,6,7"
33 }, 23 },
34 { 24 {
25 "PublicDescription": "Unhalted core cycles when the thread is not in ring 0.",
26 "EventCode": "0x5C",
27 "Counter": "0,1,2,3",
28 "UMask": "0x2",
29 "EventName": "CPL_CYCLES.RING123",
30 "SampleAfterValue": "2000003",
31 "BriefDescription": "Unhalted core cycles when thread is in rings 1, 2, or 3",
32 "CounterHTOff": "0,1,2,3,4,5,6,7"
33 },
34 {
35 "PublicDescription": "Cycles in which the L1D and L2 are locked, due to a UC lock or split lock.", 35 "PublicDescription": "Cycles in which the L1D and L2 are locked, due to a UC lock or split lock.",
36 "EventCode": "0x63", 36 "EventCode": "0x63",
37 "Counter": "0,1,2,3", 37 "Counter": "0,1,2,3",
diff --git a/tools/perf/pmu-events/arch/x86/ivybridge/pipeline.json b/tools/perf/pmu-events/arch/x86/ivybridge/pipeline.json
index 2145c28193f7..0afbfd95ea30 100644
--- a/tools/perf/pmu-events/arch/x86/ivybridge/pipeline.json
+++ b/tools/perf/pmu-events/arch/x86/ivybridge/pipeline.json
@@ -1,30 +1,41 @@
1[ 1[
2 { 2 {
3 "EventCode": "0x00", 3 "EventCode": "0x00",
4 "Counter": "Fixed counter 1", 4 "Counter": "Fixed counter 0",
5 "UMask": "0x1", 5 "UMask": "0x1",
6 "EventName": "INST_RETIRED.ANY", 6 "EventName": "INST_RETIRED.ANY",
7 "SampleAfterValue": "2000003", 7 "SampleAfterValue": "2000003",
8 "BriefDescription": "Instructions retired from execution.", 8 "BriefDescription": "Instructions retired from execution.",
9 "CounterHTOff": "Fixed counter 1" 9 "CounterHTOff": "Fixed counter 0"
10 }, 10 },
11 { 11 {
12 "EventCode": "0x00", 12 "EventCode": "0x00",
13 "Counter": "Fixed counter 2", 13 "Counter": "Fixed counter 1",
14 "UMask": "0x2", 14 "UMask": "0x2",
15 "EventName": "CPU_CLK_UNHALTED.THREAD", 15 "EventName": "CPU_CLK_UNHALTED.THREAD",
16 "SampleAfterValue": "2000003", 16 "SampleAfterValue": "2000003",
17 "BriefDescription": "Core cycles when the thread is not in halt state.", 17 "BriefDescription": "Core cycles when the thread is not in halt state.",
18 "CounterHTOff": "Fixed counter 2" 18 "CounterHTOff": "Fixed counter 1"
19 }, 19 },
20 { 20 {
21 "PublicDescription": "Core cycles when at least one thread on the physical core is not in halt state.",
21 "EventCode": "0x00", 22 "EventCode": "0x00",
22 "Counter": "Fixed counter 3", 23 "Counter": "Fixed counter 1",
24 "UMask": "0x2",
25 "AnyThread": "1",
26 "EventName": "CPU_CLK_UNHALTED.THREAD_ANY",
27 "SampleAfterValue": "2000003",
28 "BriefDescription": "Core cycles when at least one thread on the physical core is not in halt state",
29 "CounterHTOff": "Fixed counter 1"
30 },
31 {
32 "EventCode": "0x00",
33 "Counter": "Fixed counter 2",
23 "UMask": "0x3", 34 "UMask": "0x3",
24 "EventName": "CPU_CLK_UNHALTED.REF_TSC", 35 "EventName": "CPU_CLK_UNHALTED.REF_TSC",
25 "SampleAfterValue": "2000003", 36 "SampleAfterValue": "2000003",
26 "BriefDescription": "Reference cycles when the core is not in halt state.", 37 "BriefDescription": "Reference cycles when the core is not in halt state.",
27 "CounterHTOff": "Fixed counter 3" 38 "CounterHTOff": "Fixed counter 2"
28 }, 39 },
29 { 40 {
30 "PublicDescription": "Loads blocked by overlapping with store buffer that cannot be forwarded.", 41 "PublicDescription": "Loads blocked by overlapping with store buffer that cannot be forwarded.",
@@ -78,6 +89,17 @@
78 "CounterHTOff": "0,1,2,3,4,5,6,7" 89 "CounterHTOff": "0,1,2,3,4,5,6,7"
79 }, 90 },
80 { 91 {
92 "EventCode": "0x0D",
93 "Counter": "0,1,2,3",
94 "UMask": "0x3",
95 "AnyThread": "1",
96 "EventName": "INT_MISC.RECOVERY_CYCLES_ANY",
97 "SampleAfterValue": "2000003",
98 "BriefDescription": "Core cycles the allocator was stalled due to recovery from earlier clear event for any thread running on the physical core (e.g. misprediction or memory nuke).",
99 "CounterMask": "1",
100 "CounterHTOff": "0,1,2,3,4,5,6,7"
101 },
102 {
81 "PublicDescription": "Increments each cycle the # of Uops issued by the RAT to RS. Set Cmask = 1, Inv = 1, Any= 1to count stalled cycles of this core.", 103 "PublicDescription": "Increments each cycle the # of Uops issued by the RAT to RS. Set Cmask = 1, Inv = 1, Any= 1to count stalled cycles of this core.",
82 "EventCode": "0x0E", 104 "EventCode": "0x0E",
83 "Counter": "0,1,2,3", 105 "Counter": "0,1,2,3",
@@ -175,6 +197,17 @@
175 "CounterHTOff": "0,1,2,3,4,5,6,7" 197 "CounterHTOff": "0,1,2,3,4,5,6,7"
176 }, 198 },
177 { 199 {
200 "PublicDescription": "Core cycles when at least one thread on the physical core is not in halt state.",
201 "EventCode": "0x3C",
202 "Counter": "0,1,2,3",
203 "UMask": "0x0",
204 "AnyThread": "1",
205 "EventName": "CPU_CLK_UNHALTED.THREAD_P_ANY",
206 "SampleAfterValue": "2000003",
207 "BriefDescription": "Core cycles when at least one thread on the physical core is not in halt state",
208 "CounterHTOff": "0,1,2,3,4,5,6,7"
209 },
210 {
178 "PublicDescription": "Increments at the frequency of XCLK (100 MHz) when not halted.", 211 "PublicDescription": "Increments at the frequency of XCLK (100 MHz) when not halted.",
179 "EventCode": "0x3C", 212 "EventCode": "0x3C",
180 "Counter": "0,1,2,3", 213 "Counter": "0,1,2,3",
@@ -187,6 +220,36 @@
187 { 220 {
188 "EventCode": "0x3C", 221 "EventCode": "0x3C",
189 "Counter": "0,1,2,3", 222 "Counter": "0,1,2,3",
223 "UMask": "0x1",
224 "AnyThread": "1",
225 "EventName": "CPU_CLK_THREAD_UNHALTED.REF_XCLK_ANY",
226 "SampleAfterValue": "2000003",
227 "BriefDescription": "Reference cycles when the at least one thread on the physical core is unhalted. (counts at 100 MHz rate)",
228 "CounterHTOff": "0,1,2,3,4,5,6,7"
229 },
230 {
231 "PublicDescription": "Reference cycles when the thread is unhalted. (counts at 100 MHz rate)",
232 "EventCode": "0x3C",
233 "Counter": "0,1,2,3",
234 "UMask": "0x1",
235 "EventName": "CPU_CLK_UNHALTED.REF_XCLK",
236 "SampleAfterValue": "2000003",
237 "BriefDescription": "Reference cycles when the thread is unhalted (counts at 100 MHz rate)",
238 "CounterHTOff": "0,1,2,3,4,5,6,7"
239 },
240 {
241 "EventCode": "0x3C",
242 "Counter": "0,1,2,3",
243 "UMask": "0x1",
244 "AnyThread": "1",
245 "EventName": "CPU_CLK_UNHALTED.REF_XCLK_ANY",
246 "SampleAfterValue": "2000003",
247 "BriefDescription": "Reference cycles when the at least one thread on the physical core is unhalted. (counts at 100 MHz rate)",
248 "CounterHTOff": "0,1,2,3,4,5,6,7"
249 },
250 {
251 "EventCode": "0x3C",
252 "Counter": "0,1,2,3",
190 "UMask": "0x2", 253 "UMask": "0x2",
191 "EventName": "CPU_CLK_THREAD_UNHALTED.ONE_THREAD_ACTIVE", 254 "EventName": "CPU_CLK_THREAD_UNHALTED.ONE_THREAD_ACTIVE",
192 "SampleAfterValue": "2000003", 255 "SampleAfterValue": "2000003",
@@ -194,6 +257,15 @@
194 "CounterHTOff": "0,1,2,3" 257 "CounterHTOff": "0,1,2,3"
195 }, 258 },
196 { 259 {
260 "EventCode": "0x3C",
261 "Counter": "0,1,2,3",
262 "UMask": "0x2",
263 "EventName": "CPU_CLK_UNHALTED.ONE_THREAD_ACTIVE",
264 "SampleAfterValue": "2000003",
265 "BriefDescription": "Count XClk pulses when this thread is unhalted and the other thread is halted.",
266 "CounterHTOff": "0,1,2,3,4,5,6,7"
267 },
268 {
197 "PublicDescription": "Non-SW-prefetch load dispatches that hit fill buffer allocated for S/W prefetch.", 269 "PublicDescription": "Non-SW-prefetch load dispatches that hit fill buffer allocated for S/W prefetch.",
198 "EventCode": "0x4C", 270 "EventCode": "0x4C",
199 "Counter": "0,1,2,3", 271 "Counter": "0,1,2,3",
@@ -216,37 +288,37 @@
216 { 288 {
217 "EventCode": "0x58", 289 "EventCode": "0x58",
218 "Counter": "0,1,2,3", 290 "Counter": "0,1,2,3",
219 "UMask": "0x4", 291 "UMask": "0x1",
220 "EventName": "MOVE_ELIMINATION.INT_NOT_ELIMINATED", 292 "EventName": "MOVE_ELIMINATION.INT_ELIMINATED",
221 "SampleAfterValue": "1000003", 293 "SampleAfterValue": "1000003",
222 "BriefDescription": "Number of integer Move Elimination candidate uops that were not eliminated.", 294 "BriefDescription": "Number of integer Move Elimination candidate uops that were eliminated.",
223 "CounterHTOff": "0,1,2,3,4,5,6,7" 295 "CounterHTOff": "0,1,2,3,4,5,6,7"
224 }, 296 },
225 { 297 {
226 "EventCode": "0x58", 298 "EventCode": "0x58",
227 "Counter": "0,1,2,3", 299 "Counter": "0,1,2,3",
228 "UMask": "0x8", 300 "UMask": "0x2",
229 "EventName": "MOVE_ELIMINATION.SIMD_NOT_ELIMINATED", 301 "EventName": "MOVE_ELIMINATION.SIMD_ELIMINATED",
230 "SampleAfterValue": "1000003", 302 "SampleAfterValue": "1000003",
231 "BriefDescription": "Number of SIMD Move Elimination candidate uops that were not eliminated.", 303 "BriefDescription": "Number of SIMD Move Elimination candidate uops that were eliminated.",
232 "CounterHTOff": "0,1,2,3,4,5,6,7" 304 "CounterHTOff": "0,1,2,3,4,5,6,7"
233 }, 305 },
234 { 306 {
235 "EventCode": "0x58", 307 "EventCode": "0x58",
236 "Counter": "0,1,2,3", 308 "Counter": "0,1,2,3",
237 "UMask": "0x1", 309 "UMask": "0x4",
238 "EventName": "MOVE_ELIMINATION.INT_ELIMINATED", 310 "EventName": "MOVE_ELIMINATION.INT_NOT_ELIMINATED",
239 "SampleAfterValue": "1000003", 311 "SampleAfterValue": "1000003",
240 "BriefDescription": "Number of integer Move Elimination candidate uops that were eliminated.", 312 "BriefDescription": "Number of integer Move Elimination candidate uops that were not eliminated.",
241 "CounterHTOff": "0,1,2,3,4,5,6,7" 313 "CounterHTOff": "0,1,2,3,4,5,6,7"
242 }, 314 },
243 { 315 {
244 "EventCode": "0x58", 316 "EventCode": "0x58",
245 "Counter": "0,1,2,3", 317 "Counter": "0,1,2,3",
246 "UMask": "0x2", 318 "UMask": "0x8",
247 "EventName": "MOVE_ELIMINATION.SIMD_ELIMINATED", 319 "EventName": "MOVE_ELIMINATION.SIMD_NOT_ELIMINATED",
248 "SampleAfterValue": "1000003", 320 "SampleAfterValue": "1000003",
249 "BriefDescription": "Number of SIMD Move Elimination candidate uops that were eliminated.", 321 "BriefDescription": "Number of SIMD Move Elimination candidate uops that were not eliminated.",
250 "CounterHTOff": "0,1,2,3,4,5,6,7" 322 "CounterHTOff": "0,1,2,3,4,5,6,7"
251 }, 323 },
252 { 324 {
@@ -260,6 +332,18 @@
260 "CounterHTOff": "0,1,2,3,4,5,6,7" 332 "CounterHTOff": "0,1,2,3,4,5,6,7"
261 }, 333 },
262 { 334 {
335 "EventCode": "0x5E",
336 "Invert": "1",
337 "Counter": "0,1,2,3",
338 "UMask": "0x1",
339 "EdgeDetect": "1",
340 "EventName": "RS_EVENTS.EMPTY_END",
341 "SampleAfterValue": "200003",
342 "BriefDescription": "Counts end of periods where the Reservation Station (RS) was empty. Could be useful to precisely locate Frontend Latency Bound issues.",
343 "CounterMask": "1",
344 "CounterHTOff": "0,1,2,3,4,5,6,7"
345 },
346 {
263 "EventCode": "0x87", 347 "EventCode": "0x87",
264 "Counter": "0,1,2,3", 348 "Counter": "0,1,2,3",
265 "UMask": "0x1", 349 "UMask": "0x1",
@@ -498,118 +582,118 @@
498 "CounterHTOff": "0,1,2,3,4,5,6,7" 582 "CounterHTOff": "0,1,2,3,4,5,6,7"
499 }, 583 },
500 { 584 {
501 "PublicDescription": "Cycles which a Uop is dispatched on port 1.", 585 "PublicDescription": "Cycles per core when uops are dispatched to port 0.",
502 "EventCode": "0xA1", 586 "EventCode": "0xA1",
503 "Counter": "0,1,2,3", 587 "Counter": "0,1,2,3",
504 "UMask": "0x2", 588 "UMask": "0x1",
505 "EventName": "UOPS_DISPATCHED_PORT.PORT_1", 589 "AnyThread": "1",
590 "EventName": "UOPS_DISPATCHED_PORT.PORT_0_CORE",
506 "SampleAfterValue": "2000003", 591 "SampleAfterValue": "2000003",
507 "BriefDescription": "Cycles per thread when uops are dispatched to port 1", 592 "BriefDescription": "Cycles per core when uops are dispatched to port 0",
508 "CounterHTOff": "0,1,2,3,4,5,6,7" 593 "CounterHTOff": "0,1,2,3,4,5,6,7"
509 }, 594 },
510 { 595 {
511 "PublicDescription": "Cycles which a Uop is dispatched on port 4.", 596 "PublicDescription": "Cycles which a Uop is dispatched on port 1.",
512 "EventCode": "0xA1", 597 "EventCode": "0xA1",
513 "Counter": "0,1,2,3", 598 "Counter": "0,1,2,3",
514 "UMask": "0x40", 599 "UMask": "0x2",
515 "EventName": "UOPS_DISPATCHED_PORT.PORT_4", 600 "EventName": "UOPS_DISPATCHED_PORT.PORT_1",
516 "SampleAfterValue": "2000003", 601 "SampleAfterValue": "2000003",
517 "BriefDescription": "Cycles per thread when uops are dispatched to port 4", 602 "BriefDescription": "Cycles per thread when uops are dispatched to port 1",
518 "CounterHTOff": "0,1,2,3,4,5,6,7" 603 "CounterHTOff": "0,1,2,3,4,5,6,7"
519 }, 604 },
520 { 605 {
521 "PublicDescription": "Cycles which a Uop is dispatched on port 5.", 606 "PublicDescription": "Cycles per core when uops are dispatched to port 1.",
522 "EventCode": "0xA1", 607 "EventCode": "0xA1",
523 "Counter": "0,1,2,3", 608 "Counter": "0,1,2,3",
524 "UMask": "0x80", 609 "UMask": "0x2",
525 "EventName": "UOPS_DISPATCHED_PORT.PORT_5", 610 "AnyThread": "1",
611 "EventName": "UOPS_DISPATCHED_PORT.PORT_1_CORE",
526 "SampleAfterValue": "2000003", 612 "SampleAfterValue": "2000003",
527 "BriefDescription": "Cycles per thread when uops are dispatched to port 5", 613 "BriefDescription": "Cycles per core when uops are dispatched to port 1",
528 "CounterHTOff": "0,1,2,3,4,5,6,7" 614 "CounterHTOff": "0,1,2,3,4,5,6,7"
529 }, 615 },
530 { 616 {
531 "PublicDescription": "Cycles per core when uops are dispatched to port 0.", 617 "PublicDescription": "Cycles which a Uop is dispatched on port 2.",
532 "EventCode": "0xA1", 618 "EventCode": "0xA1",
533 "Counter": "0,1,2,3", 619 "Counter": "0,1,2,3",
534 "UMask": "0x1", 620 "UMask": "0xc",
535 "AnyThread": "1", 621 "EventName": "UOPS_DISPATCHED_PORT.PORT_2",
536 "EventName": "UOPS_DISPATCHED_PORT.PORT_0_CORE",
537 "SampleAfterValue": "2000003", 622 "SampleAfterValue": "2000003",
538 "BriefDescription": "Cycles per core when uops are dispatched to port 0", 623 "BriefDescription": "Cycles per thread when load or STA uops are dispatched to port 2",
539 "CounterHTOff": "0,1,2,3,4,5,6,7" 624 "CounterHTOff": "0,1,2,3,4,5,6,7"
540 }, 625 },
541 { 626 {
542 "PublicDescription": "Cycles per core when uops are dispatched to port 1.",
543 "EventCode": "0xA1", 627 "EventCode": "0xA1",
544 "Counter": "0,1,2,3", 628 "Counter": "0,1,2,3",
545 "UMask": "0x2", 629 "UMask": "0xc",
546 "AnyThread": "1", 630 "AnyThread": "1",
547 "EventName": "UOPS_DISPATCHED_PORT.PORT_1_CORE", 631 "EventName": "UOPS_DISPATCHED_PORT.PORT_2_CORE",
548 "SampleAfterValue": "2000003", 632 "SampleAfterValue": "2000003",
549 "BriefDescription": "Cycles per core when uops are dispatched to port 1", 633 "BriefDescription": "Uops dispatched to port 2, loads and stores per core (speculative and retired).",
550 "CounterHTOff": "0,1,2,3,4,5,6,7" 634 "CounterHTOff": "0,1,2,3,4,5,6,7"
551 }, 635 },
552 { 636 {
553 "PublicDescription": "Cycles per core when uops are dispatched to port 4.", 637 "PublicDescription": "Cycles which a Uop is dispatched on port 3.",
554 "EventCode": "0xA1", 638 "EventCode": "0xA1",
555 "Counter": "0,1,2,3", 639 "Counter": "0,1,2,3",
556 "UMask": "0x40", 640 "UMask": "0x30",
557 "AnyThread": "1", 641 "EventName": "UOPS_DISPATCHED_PORT.PORT_3",
558 "EventName": "UOPS_DISPATCHED_PORT.PORT_4_CORE",
559 "SampleAfterValue": "2000003", 642 "SampleAfterValue": "2000003",
560 "BriefDescription": "Cycles per core when uops are dispatched to port 4", 643 "BriefDescription": "Cycles per thread when load or STA uops are dispatched to port 3",
561 "CounterHTOff": "0,1,2,3,4,5,6,7" 644 "CounterHTOff": "0,1,2,3,4,5,6,7"
562 }, 645 },
563 { 646 {
564 "PublicDescription": "Cycles per core when uops are dispatched to port 5.", 647 "PublicDescription": "Cycles per core when load or STA uops are dispatched to port 3.",
565 "EventCode": "0xA1", 648 "EventCode": "0xA1",
566 "Counter": "0,1,2,3", 649 "Counter": "0,1,2,3",
567 "UMask": "0x80", 650 "UMask": "0x30",
568 "AnyThread": "1", 651 "AnyThread": "1",
569 "EventName": "UOPS_DISPATCHED_PORT.PORT_5_CORE", 652 "EventName": "UOPS_DISPATCHED_PORT.PORT_3_CORE",
570 "SampleAfterValue": "2000003", 653 "SampleAfterValue": "2000003",
571 "BriefDescription": "Cycles per core when uops are dispatched to port 5", 654 "BriefDescription": "Cycles per core when load or STA uops are dispatched to port 3",
572 "CounterHTOff": "0,1,2,3,4,5,6,7" 655 "CounterHTOff": "0,1,2,3,4,5,6,7"
573 }, 656 },
574 { 657 {
575 "PublicDescription": "Cycles which a Uop is dispatched on port 2.", 658 "PublicDescription": "Cycles which a Uop is dispatched on port 4.",
576 "EventCode": "0xA1", 659 "EventCode": "0xA1",
577 "Counter": "0,1,2,3", 660 "Counter": "0,1,2,3",
578 "UMask": "0xc", 661 "UMask": "0x40",
579 "EventName": "UOPS_DISPATCHED_PORT.PORT_2", 662 "EventName": "UOPS_DISPATCHED_PORT.PORT_4",
580 "SampleAfterValue": "2000003", 663 "SampleAfterValue": "2000003",
581 "BriefDescription": "Cycles per thread when load or STA uops are dispatched to port 2", 664 "BriefDescription": "Cycles per thread when uops are dispatched to port 4",
582 "CounterHTOff": "0,1,2,3,4,5,6,7" 665 "CounterHTOff": "0,1,2,3,4,5,6,7"
583 }, 666 },
584 { 667 {
585 "PublicDescription": "Cycles which a Uop is dispatched on port 3.", 668 "PublicDescription": "Cycles per core when uops are dispatched to port 4.",
586 "EventCode": "0xA1", 669 "EventCode": "0xA1",
587 "Counter": "0,1,2,3", 670 "Counter": "0,1,2,3",
588 "UMask": "0x30", 671 "UMask": "0x40",
589 "EventName": "UOPS_DISPATCHED_PORT.PORT_3", 672 "AnyThread": "1",
673 "EventName": "UOPS_DISPATCHED_PORT.PORT_4_CORE",
590 "SampleAfterValue": "2000003", 674 "SampleAfterValue": "2000003",
591 "BriefDescription": "Cycles per thread when load or STA uops are dispatched to port 3", 675 "BriefDescription": "Cycles per core when uops are dispatched to port 4",
592 "CounterHTOff": "0,1,2,3,4,5,6,7" 676 "CounterHTOff": "0,1,2,3,4,5,6,7"
593 }, 677 },
594 { 678 {
679 "PublicDescription": "Cycles which a Uop is dispatched on port 5.",
595 "EventCode": "0xA1", 680 "EventCode": "0xA1",
596 "Counter": "0,1,2,3", 681 "Counter": "0,1,2,3",
597 "UMask": "0xc", 682 "UMask": "0x80",
598 "AnyThread": "1", 683 "EventName": "UOPS_DISPATCHED_PORT.PORT_5",
599 "EventName": "UOPS_DISPATCHED_PORT.PORT_2_CORE",
600 "SampleAfterValue": "2000003", 684 "SampleAfterValue": "2000003",
601 "BriefDescription": "Uops dispatched to port 2, loads and stores per core (speculative and retired).", 685 "BriefDescription": "Cycles per thread when uops are dispatched to port 5",
602 "CounterHTOff": "0,1,2,3,4,5,6,7" 686 "CounterHTOff": "0,1,2,3,4,5,6,7"
603 }, 687 },
604 { 688 {
605 "PublicDescription": "Cycles per core when load or STA uops are dispatched to port 3.", 689 "PublicDescription": "Cycles per core when uops are dispatched to port 5.",
606 "EventCode": "0xA1", 690 "EventCode": "0xA1",
607 "Counter": "0,1,2,3", 691 "Counter": "0,1,2,3",
608 "UMask": "0x30", 692 "UMask": "0x80",
609 "AnyThread": "1", 693 "AnyThread": "1",
610 "EventName": "UOPS_DISPATCHED_PORT.PORT_3_CORE", 694 "EventName": "UOPS_DISPATCHED_PORT.PORT_5_CORE",
611 "SampleAfterValue": "2000003", 695 "SampleAfterValue": "2000003",
612 "BriefDescription": "Cycles per core when load or STA uops are dispatched to port 3", 696 "BriefDescription": "Cycles per core when uops are dispatched to port 5",
613 "CounterHTOff": "0,1,2,3,4,5,6,7" 697 "CounterHTOff": "0,1,2,3,4,5,6,7"
614 }, 698 },
615 { 699 {
@@ -662,15 +746,14 @@
662 "CounterHTOff": "0,1,2,3,4,5,6,7" 746 "CounterHTOff": "0,1,2,3,4,5,6,7"
663 }, 747 },
664 { 748 {
665 "PublicDescription": "Cycles with pending L1 cache miss loads. Set AnyThread to count per core.",
666 "EventCode": "0xA3", 749 "EventCode": "0xA3",
667 "Counter": "2", 750 "Counter": "0,1,2,3",
668 "UMask": "0x8", 751 "UMask": "0x1",
669 "EventName": "CYCLE_ACTIVITY.CYCLES_L1D_PENDING", 752 "EventName": "CYCLE_ACTIVITY.CYCLES_L2_MISS",
670 "SampleAfterValue": "2000003", 753 "SampleAfterValue": "2000003",
671 "BriefDescription": "Cycles with pending L1 cache miss loads.", 754 "BriefDescription": "Cycles while L2 cache miss load* is outstanding.",
672 "CounterMask": "8", 755 "CounterMask": "1",
673 "CounterHTOff": "2" 756 "CounterHTOff": "0,1,2,3,4,5,6,7"
674 }, 757 },
675 { 758 {
676 "PublicDescription": "Cycles with pending memory loads. Set AnyThread to count per core.", 759 "PublicDescription": "Cycles with pending memory loads. Set AnyThread to count per core.",
@@ -684,13 +767,33 @@
684 "CounterHTOff": "0,1,2,3" 767 "CounterHTOff": "0,1,2,3"
685 }, 768 },
686 { 769 {
770 "EventCode": "0xA3",
771 "Counter": "0,1,2,3",
772 "UMask": "0x2",
773 "EventName": "CYCLE_ACTIVITY.CYCLES_MEM_ANY",
774 "SampleAfterValue": "2000003",
775 "BriefDescription": "Cycles while memory subsystem has an outstanding load.",
776 "CounterMask": "2",
777 "CounterHTOff": "0,1,2,3"
778 },
779 {
687 "PublicDescription": "Total execution stalls.", 780 "PublicDescription": "Total execution stalls.",
688 "EventCode": "0xA3", 781 "EventCode": "0xA3",
689 "Counter": "0,1,2,3", 782 "Counter": "0,1,2,3",
690 "UMask": "0x4", 783 "UMask": "0x4",
691 "EventName": "CYCLE_ACTIVITY.CYCLES_NO_EXECUTE", 784 "EventName": "CYCLE_ACTIVITY.CYCLES_NO_EXECUTE",
692 "SampleAfterValue": "2000003", 785 "SampleAfterValue": "2000003",
693 "BriefDescription": "Total execution stalls", 786 "BriefDescription": "This event increments by 1 for every cycle where there was no execute for this thread.",
787 "CounterMask": "4",
788 "CounterHTOff": "0,1,2,3"
789 },
790 {
791 "EventCode": "0xA3",
792 "Counter": "0,1,2,3",
793 "UMask": "0x4",
794 "EventName": "CYCLE_ACTIVITY.STALLS_TOTAL",
795 "SampleAfterValue": "2000003",
796 "BriefDescription": "Total execution stalls.",
694 "CounterMask": "4", 797 "CounterMask": "4",
695 "CounterHTOff": "0,1,2,3" 798 "CounterHTOff": "0,1,2,3"
696 }, 799 },
@@ -708,6 +811,16 @@
708 { 811 {
709 "EventCode": "0xA3", 812 "EventCode": "0xA3",
710 "Counter": "0,1,2,3", 813 "Counter": "0,1,2,3",
814 "UMask": "0x5",
815 "EventName": "CYCLE_ACTIVITY.STALLS_L2_MISS",
816 "SampleAfterValue": "2000003",
817 "BriefDescription": "Execution stalls while L2 cache miss load* is outstanding.",
818 "CounterMask": "5",
819 "CounterHTOff": "0,1,2,3"
820 },
821 {
822 "EventCode": "0xA3",
823 "Counter": "0,1,2,3",
711 "UMask": "0x6", 824 "UMask": "0x6",
712 "EventName": "CYCLE_ACTIVITY.STALLS_LDM_PENDING", 825 "EventName": "CYCLE_ACTIVITY.STALLS_LDM_PENDING",
713 "SampleAfterValue": "2000003", 826 "SampleAfterValue": "2000003",
@@ -716,6 +829,37 @@
716 "CounterHTOff": "0,1,2,3" 829 "CounterHTOff": "0,1,2,3"
717 }, 830 },
718 { 831 {
832 "EventCode": "0xA3",
833 "Counter": "0,1,2,3",
834 "UMask": "0x6",
835 "EventName": "CYCLE_ACTIVITY.STALLS_MEM_ANY",
836 "SampleAfterValue": "2000003",
837 "BriefDescription": "Execution stalls while memory subsystem has an outstanding load.",
838 "CounterMask": "6",
839 "CounterHTOff": "0,1,2,3"
840 },
841 {
842 "PublicDescription": "Cycles with pending L1 cache miss loads. Set AnyThread to count per core.",
843 "EventCode": "0xA3",
844 "Counter": "2",
845 "UMask": "0x8",
846 "EventName": "CYCLE_ACTIVITY.CYCLES_L1D_PENDING",
847 "SampleAfterValue": "2000003",
848 "BriefDescription": "Cycles with pending L1 cache miss loads.",
849 "CounterMask": "8",
850 "CounterHTOff": "2"
851 },
852 {
853 "EventCode": "0xA3",
854 "Counter": "2",
855 "UMask": "0x8",
856 "EventName": "CYCLE_ACTIVITY.CYCLES_L1D_MISS",
857 "SampleAfterValue": "2000003",
858 "BriefDescription": "Cycles while L1 cache miss demand load is outstanding.",
859 "CounterMask": "8",
860 "CounterHTOff": "2"
861 },
862 {
719 "PublicDescription": "Execution stalls due to L1 data cache miss loads. Set Cmask=0CH.", 863 "PublicDescription": "Execution stalls due to L1 data cache miss loads. Set Cmask=0CH.",
720 "EventCode": "0xA3", 864 "EventCode": "0xA3",
721 "Counter": "2", 865 "Counter": "2",
@@ -727,6 +871,16 @@
727 "CounterHTOff": "2" 871 "CounterHTOff": "2"
728 }, 872 },
729 { 873 {
874 "EventCode": "0xA3",
875 "Counter": "2",
876 "UMask": "0xc",
877 "EventName": "CYCLE_ACTIVITY.STALLS_L1D_MISS",
878 "SampleAfterValue": "2000003",
879 "BriefDescription": "Execution stalls while L1 cache miss demand load is outstanding.",
880 "CounterMask": "12",
881 "CounterHTOff": "2"
882 },
883 {
730 "EventCode": "0xA8", 884 "EventCode": "0xA8",
731 "Counter": "0,1,2,3", 885 "Counter": "0,1,2,3",
732 "UMask": "0x1", 886 "UMask": "0x1",
@@ -747,6 +901,17 @@
747 "CounterHTOff": "0,1,2,3,4,5,6,7" 901 "CounterHTOff": "0,1,2,3,4,5,6,7"
748 }, 902 },
749 { 903 {
904 "PublicDescription": "Cycles 4 Uops delivered by the LSD, but didn't come from the decoder.",
905 "EventCode": "0xA8",
906 "Counter": "0,1,2,3",
907 "UMask": "0x1",
908 "EventName": "LSD.CYCLES_4_UOPS",
909 "SampleAfterValue": "2000003",
910 "BriefDescription": "Cycles 4 Uops delivered by the LSD, but didn't come from the decoder",
911 "CounterMask": "4",
912 "CounterHTOff": "0,1,2,3,4,5,6,7"
913 },
914 {
750 "PublicDescription": "Counts total number of uops to be executed per-thread each cycle. Set Cmask = 1, INV =1 to count stall cycles.", 915 "PublicDescription": "Counts total number of uops to be executed per-thread each cycle. Set Cmask = 1, INV =1 to count stall cycles.",
751 "EventCode": "0xB1", 916 "EventCode": "0xB1",
752 "Counter": "0,1,2,3", 917 "Counter": "0,1,2,3",
@@ -757,6 +922,61 @@
757 "CounterHTOff": "0,1,2,3,4,5,6,7" 922 "CounterHTOff": "0,1,2,3,4,5,6,7"
758 }, 923 },
759 { 924 {
925 "EventCode": "0xB1",
926 "Invert": "1",
927 "Counter": "0,1,2,3",
928 "UMask": "0x1",
929 "EventName": "UOPS_EXECUTED.STALL_CYCLES",
930 "SampleAfterValue": "2000003",
931 "BriefDescription": "Counts number of cycles no uops were dispatched to be executed on this thread.",
932 "CounterMask": "1",
933 "CounterHTOff": "0,1,2,3"
934 },
935 {
936 "PublicDescription": "Cycles where at least 1 uop was executed per-thread.",
937 "EventCode": "0xB1",
938 "Counter": "0,1,2,3",
939 "UMask": "0x1",
940 "EventName": "UOPS_EXECUTED.CYCLES_GE_1_UOP_EXEC",
941 "SampleAfterValue": "2000003",
942 "BriefDescription": "Cycles where at least 1 uop was executed per-thread",
943 "CounterMask": "1",
944 "CounterHTOff": "0,1,2,3,4,5,6,7"
945 },
946 {
947 "PublicDescription": "Cycles where at least 2 uops were executed per-thread.",
948 "EventCode": "0xB1",
949 "Counter": "0,1,2,3",
950 "UMask": "0x1",
951 "EventName": "UOPS_EXECUTED.CYCLES_GE_2_UOPS_EXEC",
952 "SampleAfterValue": "2000003",
953 "BriefDescription": "Cycles where at least 2 uops were executed per-thread",
954 "CounterMask": "2",
955 "CounterHTOff": "0,1,2,3,4,5,6,7"
956 },
957 {
958 "PublicDescription": "Cycles where at least 3 uops were executed per-thread.",
959 "EventCode": "0xB1",
960 "Counter": "0,1,2,3",
961 "UMask": "0x1",
962 "EventName": "UOPS_EXECUTED.CYCLES_GE_3_UOPS_EXEC",
963 "SampleAfterValue": "2000003",
964 "BriefDescription": "Cycles where at least 3 uops were executed per-thread",
965 "CounterMask": "3",
966 "CounterHTOff": "0,1,2,3,4,5,6,7"
967 },
968 {
969 "PublicDescription": "Cycles where at least 4 uops were executed per-thread.",
970 "EventCode": "0xB1",
971 "Counter": "0,1,2,3",
972 "UMask": "0x1",
973 "EventName": "UOPS_EXECUTED.CYCLES_GE_4_UOPS_EXEC",
974 "SampleAfterValue": "2000003",
975 "BriefDescription": "Cycles where at least 4 uops were executed per-thread",
976 "CounterMask": "4",
977 "CounterHTOff": "0,1,2,3,4,5,6,7"
978 },
979 {
760 "PublicDescription": "Counts total number of uops to be executed per-core each cycle.", 980 "PublicDescription": "Counts total number of uops to be executed per-core each cycle.",
761 "EventCode": "0xB1", 981 "EventCode": "0xB1",
762 "Counter": "0,1,2,3", 982 "Counter": "0,1,2,3",
@@ -767,15 +987,59 @@
767 "CounterHTOff": "0,1,2,3,4,5,6,7" 987 "CounterHTOff": "0,1,2,3,4,5,6,7"
768 }, 988 },
769 { 989 {
990 "PublicDescription": "Cycles at least 1 micro-op is executed from any thread on physical core.",
770 "EventCode": "0xB1", 991 "EventCode": "0xB1",
771 "Invert": "1",
772 "Counter": "0,1,2,3", 992 "Counter": "0,1,2,3",
773 "UMask": "0x1", 993 "UMask": "0x2",
774 "EventName": "UOPS_EXECUTED.STALL_CYCLES", 994 "EventName": "UOPS_EXECUTED.CORE_CYCLES_GE_1",
775 "SampleAfterValue": "2000003", 995 "SampleAfterValue": "2000003",
776 "BriefDescription": "Counts number of cycles no uops were dispatched to be executed on this thread.", 996 "BriefDescription": "Cycles at least 1 micro-op is executed from any thread on physical core",
777 "CounterMask": "1", 997 "CounterMask": "1",
778 "CounterHTOff": "0,1,2,3" 998 "CounterHTOff": "0,1,2,3,4,5,6,7"
999 },
1000 {
1001 "PublicDescription": "Cycles at least 2 micro-op is executed from any thread on physical core.",
1002 "EventCode": "0xB1",
1003 "Counter": "0,1,2,3",
1004 "UMask": "0x2",
1005 "EventName": "UOPS_EXECUTED.CORE_CYCLES_GE_2",
1006 "SampleAfterValue": "2000003",
1007 "BriefDescription": "Cycles at least 2 micro-op is executed from any thread on physical core",
1008 "CounterMask": "2",
1009 "CounterHTOff": "0,1,2,3,4,5,6,7"
1010 },
1011 {
1012 "PublicDescription": "Cycles at least 3 micro-op is executed from any thread on physical core.",
1013 "EventCode": "0xB1",
1014 "Counter": "0,1,2,3",
1015 "UMask": "0x2",
1016 "EventName": "UOPS_EXECUTED.CORE_CYCLES_GE_3",
1017 "SampleAfterValue": "2000003",
1018 "BriefDescription": "Cycles at least 3 micro-op is executed from any thread on physical core",
1019 "CounterMask": "3",
1020 "CounterHTOff": "0,1,2,3,4,5,6,7"
1021 },
1022 {
1023 "PublicDescription": "Cycles at least 4 micro-op is executed from any thread on physical core.",
1024 "EventCode": "0xB1",
1025 "Counter": "0,1,2,3",
1026 "UMask": "0x2",
1027 "EventName": "UOPS_EXECUTED.CORE_CYCLES_GE_4",
1028 "SampleAfterValue": "2000003",
1029 "BriefDescription": "Cycles at least 4 micro-op is executed from any thread on physical core",
1030 "CounterMask": "4",
1031 "CounterHTOff": "0,1,2,3,4,5,6,7"
1032 },
1033 {
1034 "PublicDescription": "Cycles with no micro-ops executed from any thread on physical core.",
1035 "EventCode": "0xB1",
1036 "Invert": "1",
1037 "Counter": "0,1,2,3",
1038 "UMask": "0x2",
1039 "EventName": "UOPS_EXECUTED.CORE_CYCLES_NONE",
1040 "SampleAfterValue": "2000003",
1041 "BriefDescription": "Cycles with no micro-ops executed from any thread on physical core",
1042 "CounterHTOff": "0,1,2,3,4,5,6,7"
779 }, 1043 },
780 { 1044 {
781 "PublicDescription": "Number of instructions at retirement.", 1045 "PublicDescription": "Number of instructions at retirement.",
@@ -809,24 +1073,12 @@
809 }, 1073 },
810 { 1074 {
811 "PEBS": "1", 1075 "PEBS": "1",
812 "PublicDescription": "Counts the number of micro-ops retired, Use cmask=1 and invert to count active cycles or stalled cycles.",
813 "EventCode": "0xC2", 1076 "EventCode": "0xC2",
814 "Counter": "0,1,2,3", 1077 "Counter": "0,1,2,3",
815 "UMask": "0x1", 1078 "UMask": "0x1",
816 "EventName": "UOPS_RETIRED.ALL", 1079 "EventName": "UOPS_RETIRED.ALL",
817 "SampleAfterValue": "2000003", 1080 "SampleAfterValue": "2000003",
818 "BriefDescription": "Actually retired uops. ", 1081 "BriefDescription": "Retired uops.",
819 "CounterHTOff": "0,1,2,3,4,5,6,7"
820 },
821 {
822 "PEBS": "1",
823 "PublicDescription": "Counts the number of retirement slots used each cycle.",
824 "EventCode": "0xC2",
825 "Counter": "0,1,2,3",
826 "UMask": "0x2",
827 "EventName": "UOPS_RETIRED.RETIRE_SLOTS",
828 "SampleAfterValue": "2000003",
829 "BriefDescription": "Retirement slots used. ",
830 "CounterHTOff": "0,1,2,3,4,5,6,7" 1082 "CounterHTOff": "0,1,2,3,4,5,6,7"
831 }, 1083 },
832 { 1084 {
@@ -864,6 +1116,27 @@
864 "CounterHTOff": "0,1,2,3" 1116 "CounterHTOff": "0,1,2,3"
865 }, 1117 },
866 { 1118 {
1119 "PEBS": "1",
1120 "EventCode": "0xC2",
1121 "Counter": "0,1,2,3",
1122 "UMask": "0x2",
1123 "EventName": "UOPS_RETIRED.RETIRE_SLOTS",
1124 "SampleAfterValue": "2000003",
1125 "BriefDescription": "Retirement slots used.",
1126 "CounterHTOff": "0,1,2,3,4,5,6,7"
1127 },
1128 {
1129 "EventCode": "0xC3",
1130 "Counter": "0,1,2,3",
1131 "UMask": "0x1",
1132 "EdgeDetect": "1",
1133 "EventName": "MACHINE_CLEARS.COUNT",
1134 "SampleAfterValue": "100003",
1135 "BriefDescription": "Number of machine clears (nukes) of any type.",
1136 "CounterMask": "1",
1137 "CounterHTOff": "0,1,2,3,4,5,6,7"
1138 },
1139 {
867 "PublicDescription": "Number of self-modifying-code machine clears detected.", 1140 "PublicDescription": "Number of self-modifying-code machine clears detected.",
868 "EventCode": "0xC3", 1141 "EventCode": "0xC3",
869 "Counter": "0,1,2,3", 1142 "Counter": "0,1,2,3",
@@ -880,50 +1153,67 @@
880 "UMask": "0x20", 1153 "UMask": "0x20",
881 "EventName": "MACHINE_CLEARS.MASKMOV", 1154 "EventName": "MACHINE_CLEARS.MASKMOV",
882 "SampleAfterValue": "100003", 1155 "SampleAfterValue": "100003",
883 "BriefDescription": "This event counts the number of executed Intel AVX masked load operations that refer to an illegal address range with the mask bits set to 0. ", 1156 "BriefDescription": "This event counts the number of executed Intel AVX masked load operations that refer to an illegal address range with the mask bits set to 0.",
1157 "CounterHTOff": "0,1,2,3,4,5,6,7"
1158 },
1159 {
1160 "PublicDescription": "Branch instructions at retirement.",
1161 "EventCode": "0xC4",
1162 "Counter": "0,1,2,3",
1163 "UMask": "0x0",
1164 "EventName": "BR_INST_RETIRED.ALL_BRANCHES",
1165 "SampleAfterValue": "400009",
1166 "BriefDescription": "All (macro) branch instructions retired.",
884 "CounterHTOff": "0,1,2,3,4,5,6,7" 1167 "CounterHTOff": "0,1,2,3,4,5,6,7"
885 }, 1168 },
886 { 1169 {
887 "PEBS": "1", 1170 "PEBS": "1",
888 "PublicDescription": "Counts the number of conditional branch instructions retired.",
889 "EventCode": "0xC4", 1171 "EventCode": "0xC4",
890 "Counter": "0,1,2,3", 1172 "Counter": "0,1,2,3",
891 "UMask": "0x1", 1173 "UMask": "0x1",
892 "EventName": "BR_INST_RETIRED.CONDITIONAL", 1174 "EventName": "BR_INST_RETIRED.CONDITIONAL",
893 "SampleAfterValue": "400009", 1175 "SampleAfterValue": "400009",
894 "BriefDescription": "Conditional branch instructions retired. ", 1176 "BriefDescription": "Conditional branch instructions retired.",
895 "CounterHTOff": "0,1,2,3,4,5,6,7" 1177 "CounterHTOff": "0,1,2,3,4,5,6,7"
896 }, 1178 },
897 { 1179 {
898 "PEBS": "1", 1180 "PEBS": "1",
899 "PublicDescription": "Direct and indirect near call instructions retired.",
900 "EventCode": "0xC4", 1181 "EventCode": "0xC4",
901 "Counter": "0,1,2,3", 1182 "Counter": "0,1,2,3",
902 "UMask": "0x2", 1183 "UMask": "0x2",
903 "EventName": "BR_INST_RETIRED.NEAR_CALL", 1184 "EventName": "BR_INST_RETIRED.NEAR_CALL",
904 "SampleAfterValue": "100007", 1185 "SampleAfterValue": "100007",
905 "BriefDescription": "Direct and indirect near call instructions retired. ", 1186 "BriefDescription": "Direct and indirect near call instructions retired.",
906 "CounterHTOff": "0,1,2,3,4,5,6,7" 1187 "CounterHTOff": "0,1,2,3,4,5,6,7"
907 }, 1188 },
908 { 1189 {
909 "PublicDescription": "Branch instructions at retirement.", 1190 "PEBS": "1",
910 "EventCode": "0xC4", 1191 "EventCode": "0xC4",
911 "Counter": "0,1,2,3", 1192 "Counter": "0,1,2,3",
912 "UMask": "0x0", 1193 "UMask": "0x2",
913 "EventName": "BR_INST_RETIRED.ALL_BRANCHES", 1194 "EventName": "BR_INST_RETIRED.NEAR_CALL_R3",
1195 "SampleAfterValue": "100007",
1196 "BriefDescription": "Direct and indirect macro near call instructions retired (captured in ring 3).",
1197 "CounterHTOff": "0,1,2,3,4,5,6,7"
1198 },
1199 {
1200 "PEBS": "2",
1201 "EventCode": "0xC4",
1202 "Counter": "0,1,2,3",
1203 "UMask": "0x4",
1204 "EventName": "BR_INST_RETIRED.ALL_BRANCHES_PEBS",
914 "SampleAfterValue": "400009", 1205 "SampleAfterValue": "400009",
915 "BriefDescription": "All (macro) branch instructions retired.", 1206 "BriefDescription": "All (macro) branch instructions retired.",
916 "CounterHTOff": "0,1,2,3,4,5,6,7" 1207 "CounterHTOff": "0,1,2,3"
917 }, 1208 },
918 { 1209 {
919 "PEBS": "1", 1210 "PEBS": "1",
920 "PublicDescription": "Counts the number of near return instructions retired.",
921 "EventCode": "0xC4", 1211 "EventCode": "0xC4",
922 "Counter": "0,1,2,3", 1212 "Counter": "0,1,2,3",
923 "UMask": "0x8", 1213 "UMask": "0x8",
924 "EventName": "BR_INST_RETIRED.NEAR_RETURN", 1214 "EventName": "BR_INST_RETIRED.NEAR_RETURN",
925 "SampleAfterValue": "100007", 1215 "SampleAfterValue": "100007",
926 "BriefDescription": "Return instructions retired. ", 1216 "BriefDescription": "Return instructions retired.",
927 "CounterHTOff": "0,1,2,3,4,5,6,7" 1217 "CounterHTOff": "0,1,2,3,4,5,6,7"
928 }, 1218 },
929 { 1219 {
@@ -933,18 +1223,17 @@
933 "UMask": "0x10", 1223 "UMask": "0x10",
934 "EventName": "BR_INST_RETIRED.NOT_TAKEN", 1224 "EventName": "BR_INST_RETIRED.NOT_TAKEN",
935 "SampleAfterValue": "400009", 1225 "SampleAfterValue": "400009",
936 "BriefDescription": "Not taken branch instructions retired. ", 1226 "BriefDescription": "Not taken branch instructions retired.",
937 "CounterHTOff": "0,1,2,3,4,5,6,7" 1227 "CounterHTOff": "0,1,2,3,4,5,6,7"
938 }, 1228 },
939 { 1229 {
940 "PEBS": "1", 1230 "PEBS": "1",
941 "PublicDescription": "Number of near taken branches retired.",
942 "EventCode": "0xC4", 1231 "EventCode": "0xC4",
943 "Counter": "0,1,2,3", 1232 "Counter": "0,1,2,3",
944 "UMask": "0x20", 1233 "UMask": "0x20",
945 "EventName": "BR_INST_RETIRED.NEAR_TAKEN", 1234 "EventName": "BR_INST_RETIRED.NEAR_TAKEN",
946 "SampleAfterValue": "400009", 1235 "SampleAfterValue": "400009",
947 "BriefDescription": "Taken branch instructions retired. ", 1236 "BriefDescription": "Taken branch instructions retired.",
948 "CounterHTOff": "0,1,2,3,4,5,6,7" 1237 "CounterHTOff": "0,1,2,3,4,5,6,7"
949 }, 1238 },
950 { 1239 {
@@ -954,28 +1243,7 @@
954 "UMask": "0x40", 1243 "UMask": "0x40",
955 "EventName": "BR_INST_RETIRED.FAR_BRANCH", 1244 "EventName": "BR_INST_RETIRED.FAR_BRANCH",
956 "SampleAfterValue": "100007", 1245 "SampleAfterValue": "100007",
957 "BriefDescription": "Far branch instructions retired. ", 1246 "BriefDescription": "Far branch instructions retired.",
958 "CounterHTOff": "0,1,2,3,4,5,6,7"
959 },
960 {
961 "PEBS": "2",
962 "EventCode": "0xC4",
963 "Counter": "0,1,2,3",
964 "UMask": "0x4",
965 "EventName": "BR_INST_RETIRED.ALL_BRANCHES_PEBS",
966 "SampleAfterValue": "400009",
967 "BriefDescription": "All (macro) branch instructions retired.",
968 "CounterHTOff": "0,1,2,3"
969 },
970 {
971 "PEBS": "1",
972 "PublicDescription": "Mispredicted conditional branch instructions retired.",
973 "EventCode": "0xC5",
974 "Counter": "0,1,2,3",
975 "UMask": "0x1",
976 "EventName": "BR_MISP_RETIRED.CONDITIONAL",
977 "SampleAfterValue": "400009",
978 "BriefDescription": "Mispredicted conditional branch instructions retired. ",
979 "CounterHTOff": "0,1,2,3,4,5,6,7" 1247 "CounterHTOff": "0,1,2,3,4,5,6,7"
980 }, 1248 },
981 { 1249 {
@@ -990,13 +1258,12 @@
990 }, 1258 },
991 { 1259 {
992 "PEBS": "1", 1260 "PEBS": "1",
993 "PublicDescription": "Mispredicted taken branch instructions retired.",
994 "EventCode": "0xC5", 1261 "EventCode": "0xC5",
995 "Counter": "0,1,2,3", 1262 "Counter": "0,1,2,3",
996 "UMask": "0x20", 1263 "UMask": "0x1",
997 "EventName": "BR_MISP_RETIRED.NEAR_TAKEN", 1264 "EventName": "BR_MISP_RETIRED.CONDITIONAL",
998 "SampleAfterValue": "400009", 1265 "SampleAfterValue": "400009",
999 "BriefDescription": "number of near branch instructions retired that were mispredicted and taken. ", 1266 "BriefDescription": "Mispredicted conditional branch instructions retired.",
1000 "CounterHTOff": "0,1,2,3,4,5,6,7" 1267 "CounterHTOff": "0,1,2,3,4,5,6,7"
1001 }, 1268 },
1002 { 1269 {
@@ -1010,6 +1277,16 @@
1010 "CounterHTOff": "0,1,2,3" 1277 "CounterHTOff": "0,1,2,3"
1011 }, 1278 },
1012 { 1279 {
1280 "PEBS": "1",
1281 "EventCode": "0xC5",
1282 "Counter": "0,1,2,3",
1283 "UMask": "0x20",
1284 "EventName": "BR_MISP_RETIRED.NEAR_TAKEN",
1285 "SampleAfterValue": "400009",
1286 "BriefDescription": "number of near branch instructions retired that were mispredicted and taken.",
1287 "CounterHTOff": "0,1,2,3,4,5,6,7"
1288 },
1289 {
1013 "PublicDescription": "Count cases of saving new LBR records by hardware.", 1290 "PublicDescription": "Count cases of saving new LBR records by hardware.",
1014 "EventCode": "0xCC", 1291 "EventCode": "0xCC",
1015 "Counter": "0,1,2,3", 1292 "Counter": "0,1,2,3",
@@ -1028,280 +1305,5 @@
1028 "SampleAfterValue": "100003", 1305 "SampleAfterValue": "100003",
1029 "BriefDescription": "Counts the total number when the front end is resteered, mainly when the BPU cannot provide a correct prediction and this is corrected by other branch handling mechanisms at the front end.", 1306 "BriefDescription": "Counts the total number when the front end is resteered, mainly when the BPU cannot provide a correct prediction and this is corrected by other branch handling mechanisms at the front end.",
1030 "CounterHTOff": "0,1,2,3,4,5,6,7" 1307 "CounterHTOff": "0,1,2,3,4,5,6,7"
1031 },
1032 {
1033 "PublicDescription": "Cycles where at least 1 uop was executed per-thread.",
1034 "EventCode": "0xB1",
1035 "Counter": "0,1,2,3",
1036 "UMask": "0x1",
1037 "EventName": "UOPS_EXECUTED.CYCLES_GE_1_UOP_EXEC",
1038 "SampleAfterValue": "2000003",
1039 "BriefDescription": "Cycles where at least 1 uop was executed per-thread",
1040 "CounterMask": "1",
1041 "CounterHTOff": "0,1,2,3,4,5,6,7"
1042 },
1043 {
1044 "PublicDescription": "Cycles where at least 2 uops were executed per-thread.",
1045 "EventCode": "0xB1",
1046 "Counter": "0,1,2,3",
1047 "UMask": "0x1",
1048 "EventName": "UOPS_EXECUTED.CYCLES_GE_2_UOPS_EXEC",
1049 "SampleAfterValue": "2000003",
1050 "BriefDescription": "Cycles where at least 2 uops were executed per-thread",
1051 "CounterMask": "2",
1052 "CounterHTOff": "0,1,2,3,4,5,6,7"
1053 },
1054 {
1055 "PublicDescription": "Cycles where at least 3 uops were executed per-thread.",
1056 "EventCode": "0xB1",
1057 "Counter": "0,1,2,3",
1058 "UMask": "0x1",
1059 "EventName": "UOPS_EXECUTED.CYCLES_GE_3_UOPS_EXEC",
1060 "SampleAfterValue": "2000003",
1061 "BriefDescription": "Cycles where at least 3 uops were executed per-thread",
1062 "CounterMask": "3",
1063 "CounterHTOff": "0,1,2,3,4,5,6,7"
1064 },
1065 {
1066 "PublicDescription": "Cycles where at least 4 uops were executed per-thread.",
1067 "EventCode": "0xB1",
1068 "Counter": "0,1,2,3",
1069 "UMask": "0x1",
1070 "EventName": "UOPS_EXECUTED.CYCLES_GE_4_UOPS_EXEC",
1071 "SampleAfterValue": "2000003",
1072 "BriefDescription": "Cycles where at least 4 uops were executed per-thread",
1073 "CounterMask": "4",
1074 "CounterHTOff": "0,1,2,3,4,5,6,7"
1075 },
1076 {
1077 "EventCode": "0x5E",
1078 "Invert": "1",
1079 "Counter": "0,1,2,3",
1080 "UMask": "0x1",
1081 "EdgeDetect": "1",
1082 "EventName": "RS_EVENTS.EMPTY_END",
1083 "SampleAfterValue": "200003",
1084 "BriefDescription": "Counts end of periods where the Reservation Station (RS) was empty. Could be useful to precisely locate Frontend Latency Bound issues.",
1085 "CounterMask": "1",
1086 "CounterHTOff": "0,1,2,3,4,5,6,7"
1087 },
1088 {
1089 "EventCode": "0xC3",
1090 "Counter": "0,1,2,3",
1091 "UMask": "0x1",
1092 "EdgeDetect": "1",
1093 "EventName": "MACHINE_CLEARS.COUNT",
1094 "SampleAfterValue": "100003",
1095 "BriefDescription": "Number of machine clears (nukes) of any type.",
1096 "CounterMask": "1",
1097 "CounterHTOff": "0,1,2,3,4,5,6,7"
1098 },
1099 {
1100 "PublicDescription": "Cycles 4 Uops delivered by the LSD, but didn't come from the decoder.",
1101 "EventCode": "0xA8",
1102 "Counter": "0,1,2,3",
1103 "UMask": "0x1",
1104 "EventName": "LSD.CYCLES_4_UOPS",
1105 "SampleAfterValue": "2000003",
1106 "BriefDescription": "Cycles 4 Uops delivered by the LSD, but didn't come from the decoder",
1107 "CounterMask": "4",
1108 "CounterHTOff": "0,1,2,3,4,5,6,7"
1109 },
1110 {
1111 "EventCode": "0xA3",
1112 "Counter": "2",
1113 "UMask": "0x8",
1114 "EventName": "CYCLE_ACTIVITY.CYCLES_L1D_MISS",
1115 "SampleAfterValue": "2000003",
1116 "BriefDescription": "Cycles while L1 cache miss demand load is outstanding.",
1117 "CounterMask": "8",
1118 "CounterHTOff": "2"
1119 },
1120 {
1121 "EventCode": "0xA3",
1122 "Counter": "0,1,2,3",
1123 "UMask": "0x1",
1124 "EventName": "CYCLE_ACTIVITY.CYCLES_L2_MISS",
1125 "SampleAfterValue": "2000003",
1126 "BriefDescription": "Cycles while L2 cache miss load* is outstanding.",
1127 "CounterMask": "1",
1128 "CounterHTOff": "0,1,2,3,4,5,6,7"
1129 },
1130 {
1131 "EventCode": "0xA3",
1132 "Counter": "0,1,2,3",
1133 "UMask": "0x2",
1134 "EventName": "CYCLE_ACTIVITY.CYCLES_MEM_ANY",
1135 "SampleAfterValue": "2000003",
1136 "BriefDescription": "Cycles while memory subsystem has an outstanding load.",
1137 "CounterMask": "2",
1138 "CounterHTOff": "0,1,2,3"
1139 },
1140 {
1141 "EventCode": "0xA3",
1142 "Counter": "0,1,2,3",
1143 "UMask": "0x4",
1144 "EventName": "CYCLE_ACTIVITY.STALLS_TOTAL",
1145 "SampleAfterValue": "2000003",
1146 "BriefDescription": "Total execution stalls.",
1147 "CounterMask": "4",
1148 "CounterHTOff": "0,1,2,3"
1149 },
1150 {
1151 "EventCode": "0xA3",
1152 "Counter": "2",
1153 "UMask": "0xc",
1154 "EventName": "CYCLE_ACTIVITY.STALLS_L1D_MISS",
1155 "SampleAfterValue": "2000003",
1156 "BriefDescription": "Execution stalls while L1 cache miss demand load is outstanding.",
1157 "CounterMask": "12",
1158 "CounterHTOff": "2"
1159 },
1160 {
1161 "EventCode": "0xA3",
1162 "Counter": "0,1,2,3",
1163 "UMask": "0x5",
1164 "EventName": "CYCLE_ACTIVITY.STALLS_L2_MISS",
1165 "SampleAfterValue": "2000003",
1166 "BriefDescription": "Execution stalls while L2 cache miss load* is outstanding.",
1167 "CounterMask": "5",
1168 "CounterHTOff": "0,1,2,3"
1169 },
1170 {
1171 "EventCode": "0xA3",
1172 "Counter": "0,1,2,3",
1173 "UMask": "0x6",
1174 "EventName": "CYCLE_ACTIVITY.STALLS_MEM_ANY",
1175 "SampleAfterValue": "2000003",
1176 "BriefDescription": "Execution stalls while memory subsystem has an outstanding load.",
1177 "CounterMask": "6",
1178 "CounterHTOff": "0,1,2,3"
1179 },
1180 {
1181 "PublicDescription": "Core cycles when at least one thread on the physical core is not in halt state.",
1182 "EventCode": "0x00",
1183 "Counter": "Fixed counter 2",
1184 "UMask": "0x2",
1185 "AnyThread": "1",
1186 "EventName": "CPU_CLK_UNHALTED.THREAD_ANY",
1187 "SampleAfterValue": "2000003",
1188 "BriefDescription": "Core cycles when at least one thread on the physical core is not in halt state",
1189 "CounterHTOff": "Fixed counter 2"
1190 },
1191 {
1192 "PublicDescription": "Core cycles when at least one thread on the physical core is not in halt state.",
1193 "EventCode": "0x3C",
1194 "Counter": "0,1,2,3",
1195 "UMask": "0x0",
1196 "AnyThread": "1",
1197 "EventName": "CPU_CLK_UNHALTED.THREAD_P_ANY",
1198 "SampleAfterValue": "2000003",
1199 "BriefDescription": "Core cycles when at least one thread on the physical core is not in halt state",
1200 "CounterHTOff": "0,1,2,3,4,5,6,7"
1201 },
1202 {
1203 "EventCode": "0x3C",
1204 "Counter": "0,1,2,3",
1205 "UMask": "0x1",
1206 "AnyThread": "1",
1207 "EventName": "CPU_CLK_THREAD_UNHALTED.REF_XCLK_ANY",
1208 "SampleAfterValue": "2000003",
1209 "BriefDescription": "Reference cycles when the at least one thread on the physical core is unhalted. (counts at 100 MHz rate)",
1210 "CounterHTOff": "0,1,2,3,4,5,6,7"
1211 },
1212 {
1213 "EventCode": "0x0D",
1214 "Counter": "0,1,2,3",
1215 "UMask": "0x3",
1216 "AnyThread": "1",
1217 "EventName": "INT_MISC.RECOVERY_CYCLES_ANY",
1218 "SampleAfterValue": "2000003",
1219 "BriefDescription": "Core cycles the allocator was stalled due to recovery from earlier clear event for any thread running on the physical core (e.g. misprediction or memory nuke).",
1220 "CounterMask": "1",
1221 "CounterHTOff": "0,1,2,3,4,5,6,7"
1222 },
1223 {
1224 "PublicDescription": "Cycles at least 1 micro-op is executed from any thread on physical core.",
1225 "EventCode": "0xB1",
1226 "Counter": "0,1,2,3",
1227 "UMask": "0x2",
1228 "EventName": "UOPS_EXECUTED.CORE_CYCLES_GE_1",
1229 "SampleAfterValue": "2000003",
1230 "BriefDescription": "Cycles at least 1 micro-op is executed from any thread on physical core",
1231 "CounterMask": "1",
1232 "CounterHTOff": "0,1,2,3,4,5,6,7"
1233 },
1234 {
1235 "PublicDescription": "Cycles at least 2 micro-op is executed from any thread on physical core.",
1236 "EventCode": "0xB1",
1237 "Counter": "0,1,2,3",
1238 "UMask": "0x2",
1239 "EventName": "UOPS_EXECUTED.CORE_CYCLES_GE_2",
1240 "SampleAfterValue": "2000003",
1241 "BriefDescription": "Cycles at least 2 micro-op is executed from any thread on physical core",
1242 "CounterMask": "2",
1243 "CounterHTOff": "0,1,2,3,4,5,6,7"
1244 },
1245 {
1246 "PublicDescription": "Cycles at least 3 micro-op is executed from any thread on physical core.",
1247 "EventCode": "0xB1",
1248 "Counter": "0,1,2,3",
1249 "UMask": "0x2",
1250 "EventName": "UOPS_EXECUTED.CORE_CYCLES_GE_3",
1251 "SampleAfterValue": "2000003",
1252 "BriefDescription": "Cycles at least 3 micro-op is executed from any thread on physical core",
1253 "CounterMask": "3",
1254 "CounterHTOff": "0,1,2,3,4,5,6,7"
1255 },
1256 {
1257 "PublicDescription": "Cycles at least 4 micro-op is executed from any thread on physical core.",
1258 "EventCode": "0xB1",
1259 "Counter": "0,1,2,3",
1260 "UMask": "0x2",
1261 "EventName": "UOPS_EXECUTED.CORE_CYCLES_GE_4",
1262 "SampleAfterValue": "2000003",
1263 "BriefDescription": "Cycles at least 4 micro-op is executed from any thread on physical core",
1264 "CounterMask": "4",
1265 "CounterHTOff": "0,1,2,3,4,5,6,7"
1266 },
1267 {
1268 "PublicDescription": "Cycles with no micro-ops executed from any thread on physical core.",
1269 "EventCode": "0xB1",
1270 "Invert": "1",
1271 "Counter": "0,1,2,3",
1272 "UMask": "0x2",
1273 "EventName": "UOPS_EXECUTED.CORE_CYCLES_NONE",
1274 "SampleAfterValue": "2000003",
1275 "BriefDescription": "Cycles with no micro-ops executed from any thread on physical core",
1276 "CounterHTOff": "0,1,2,3,4,5,6,7"
1277 },
1278 {
1279 "PublicDescription": "Reference cycles when the thread is unhalted. (counts at 100 MHz rate)",
1280 "EventCode": "0x3C",
1281 "Counter": "0,1,2,3",
1282 "UMask": "0x1",
1283 "EventName": "CPU_CLK_UNHALTED.REF_XCLK",
1284 "SampleAfterValue": "2000003",
1285 "BriefDescription": "Reference cycles when the thread is unhalted (counts at 100 MHz rate)",
1286 "CounterHTOff": "0,1,2,3,4,5,6,7"
1287 },
1288 {
1289 "EventCode": "0x3C",
1290 "Counter": "0,1,2,3",
1291 "UMask": "0x1",
1292 "AnyThread": "1",
1293 "EventName": "CPU_CLK_UNHALTED.REF_XCLK_ANY",
1294 "SampleAfterValue": "2000003",
1295 "BriefDescription": "Reference cycles when the at least one thread on the physical core is unhalted. (counts at 100 MHz rate)",
1296 "CounterHTOff": "0,1,2,3,4,5,6,7"
1297 },
1298 {
1299 "EventCode": "0x3C",
1300 "Counter": "0,1,2,3",
1301 "UMask": "0x2",
1302 "EventName": "CPU_CLK_UNHALTED.ONE_THREAD_ACTIVE",
1303 "SampleAfterValue": "2000003",
1304 "BriefDescription": "Count XClk pulses when this thread is unhalted and the other thread is halted.",
1305 "CounterHTOff": "0,1,2,3,4,5,6,7"
1306 } 1308 }
1307] \ No newline at end of file 1309] \ No newline at end of file
diff --git a/tools/perf/pmu-events/arch/x86/ivybridge/virtual-memory.json b/tools/perf/pmu-events/arch/x86/ivybridge/virtual-memory.json
index f036f5398906..f243551b4d12 100644
--- a/tools/perf/pmu-events/arch/x86/ivybridge/virtual-memory.json
+++ b/tools/perf/pmu-events/arch/x86/ivybridge/virtual-memory.json
@@ -1,5 +1,35 @@
1[ 1[
2 { 2 {
3 "PublicDescription": "Misses in all TLB levels that cause a page walk of any page size from demand loads.",
4 "EventCode": "0x08",
5 "Counter": "0,1,2,3",
6 "UMask": "0x81",
7 "EventName": "DTLB_LOAD_MISSES.MISS_CAUSES_A_WALK",
8 "SampleAfterValue": "100003",
9 "BriefDescription": "Demand load Miss in all translation lookaside buffer (TLB) levels causes an page walk of any page size.",
10 "CounterHTOff": "0,1,2,3,4,5,6,7"
11 },
12 {
13 "PublicDescription": "Misses in all TLB levels that caused page walk completed of any size by demand loads.",
14 "EventCode": "0x08",
15 "Counter": "0,1,2,3",
16 "UMask": "0x82",
17 "EventName": "DTLB_LOAD_MISSES.WALK_COMPLETED",
18 "SampleAfterValue": "100003",
19 "BriefDescription": "Demand load Miss in all translation lookaside buffer (TLB) levels causes a page walk that completes of any page size.",
20 "CounterHTOff": "0,1,2,3,4,5,6,7"
21 },
22 {
23 "PublicDescription": "Cycle PMH is busy with a walk due to demand loads.",
24 "EventCode": "0x08",
25 "Counter": "0,1,2,3",
26 "UMask": "0x84",
27 "EventName": "DTLB_LOAD_MISSES.WALK_DURATION",
28 "SampleAfterValue": "2000003",
29 "BriefDescription": "Demand load cycles page miss handler (PMH) is busy with this walk.",
30 "CounterHTOff": "0,1,2,3,4,5,6,7"
31 },
32 {
3 "EventCode": "0x08", 33 "EventCode": "0x08",
4 "Counter": "0,1,2,3", 34 "Counter": "0,1,2,3",
5 "UMask": "0x88", 35 "UMask": "0x88",
@@ -146,35 +176,5 @@
146 "SampleAfterValue": "100007", 176 "SampleAfterValue": "100007",
147 "BriefDescription": "STLB flush attempts", 177 "BriefDescription": "STLB flush attempts",
148 "CounterHTOff": "0,1,2,3,4,5,6,7" 178 "CounterHTOff": "0,1,2,3,4,5,6,7"
149 },
150 {
151 "PublicDescription": "Misses in all TLB levels that cause a page walk of any page size from demand loads.",
152 "EventCode": "0x08",
153 "Counter": "0,1,2,3",
154 "UMask": "0x81",
155 "EventName": "DTLB_LOAD_MISSES.MISS_CAUSES_A_WALK",
156 "SampleAfterValue": "100003",
157 "BriefDescription": "Demand load Miss in all translation lookaside buffer (TLB) levels causes an page walk of any page size.",
158 "CounterHTOff": "0,1,2,3,4,5,6,7"
159 },
160 {
161 "PublicDescription": "Misses in all TLB levels that caused page walk completed of any size by demand loads.",
162 "EventCode": "0x08",
163 "Counter": "0,1,2,3",
164 "UMask": "0x82",
165 "EventName": "DTLB_LOAD_MISSES.WALK_COMPLETED",
166 "SampleAfterValue": "100003",
167 "BriefDescription": "Demand load Miss in all translation lookaside buffer (TLB) levels causes a page walk that completes of any page size.",
168 "CounterHTOff": "0,1,2,3,4,5,6,7"
169 },
170 {
171 "PublicDescription": "Cycle PMH is busy with a walk due to demand loads.",
172 "EventCode": "0x08",
173 "Counter": "0,1,2,3",
174 "UMask": "0x84",
175 "EventName": "DTLB_LOAD_MISSES.WALK_DURATION",
176 "SampleAfterValue": "2000003",
177 "BriefDescription": "Demand load cycles page miss handler (PMH) is busy with this walk.",
178 "CounterHTOff": "0,1,2,3,4,5,6,7"
179 } 179 }
180] \ No newline at end of file 180] \ No newline at end of file
diff --git a/tools/perf/pmu-events/arch/x86/ivytown/cache.json b/tools/perf/pmu-events/arch/x86/ivytown/cache.json
index ff27a620edd8..6dad3ad6b102 100644
--- a/tools/perf/pmu-events/arch/x86/ivytown/cache.json
+++ b/tools/perf/pmu-events/arch/x86/ivytown/cache.json
@@ -10,6 +10,16 @@
10 "CounterHTOff": "0,1,2,3,4,5,6,7" 10 "CounterHTOff": "0,1,2,3,4,5,6,7"
11 }, 11 },
12 { 12 {
13 "PublicDescription": "Counts any demand and L1 HW prefetch data load requests to L2.",
14 "EventCode": "0x24",
15 "Counter": "0,1,2,3",
16 "UMask": "0x3",
17 "EventName": "L2_RQSTS.ALL_DEMAND_DATA_RD",
18 "SampleAfterValue": "200003",
19 "BriefDescription": "Demand Data Read requests",
20 "CounterHTOff": "0,1,2,3,4,5,6,7"
21 },
22 {
13 "PublicDescription": "RFO requests that hit L2 cache.", 23 "PublicDescription": "RFO requests that hit L2 cache.",
14 "EventCode": "0x24", 24 "EventCode": "0x24",
15 "Counter": "0,1,2,3", 25 "Counter": "0,1,2,3",
@@ -30,6 +40,16 @@
30 "CounterHTOff": "0,1,2,3,4,5,6,7" 40 "CounterHTOff": "0,1,2,3,4,5,6,7"
31 }, 41 },
32 { 42 {
43 "PublicDescription": "Counts all L2 store RFO requests.",
44 "EventCode": "0x24",
45 "Counter": "0,1,2,3",
46 "UMask": "0xc",
47 "EventName": "L2_RQSTS.ALL_RFO",
48 "SampleAfterValue": "200003",
49 "BriefDescription": "RFO requests to L2 cache",
50 "CounterHTOff": "0,1,2,3,4,5,6,7"
51 },
52 {
33 "PublicDescription": "Number of instruction fetches that hit the L2 cache.", 53 "PublicDescription": "Number of instruction fetches that hit the L2 cache.",
34 "EventCode": "0x24", 54 "EventCode": "0x24",
35 "Counter": "0,1,2,3", 55 "Counter": "0,1,2,3",
@@ -50,6 +70,16 @@
50 "CounterHTOff": "0,1,2,3,4,5,6,7" 70 "CounterHTOff": "0,1,2,3,4,5,6,7"
51 }, 71 },
52 { 72 {
73 "PublicDescription": "Counts all L2 code requests.",
74 "EventCode": "0x24",
75 "Counter": "0,1,2,3",
76 "UMask": "0x30",
77 "EventName": "L2_RQSTS.ALL_CODE_RD",
78 "SampleAfterValue": "200003",
79 "BriefDescription": "L2 code requests",
80 "CounterHTOff": "0,1,2,3,4,5,6,7"
81 },
82 {
53 "PublicDescription": "Counts all L2 HW prefetcher requests that hit L2.", 83 "PublicDescription": "Counts all L2 HW prefetcher requests that hit L2.",
54 "EventCode": "0x24", 84 "EventCode": "0x24",
55 "Counter": "0,1,2,3", 85 "Counter": "0,1,2,3",
@@ -70,36 +100,6 @@
70 "CounterHTOff": "0,1,2,3,4,5,6,7" 100 "CounterHTOff": "0,1,2,3,4,5,6,7"
71 }, 101 },
72 { 102 {
73 "PublicDescription": "Counts any demand and L1 HW prefetch data load requests to L2.",
74 "EventCode": "0x24",
75 "Counter": "0,1,2,3",
76 "UMask": "0x3",
77 "EventName": "L2_RQSTS.ALL_DEMAND_DATA_RD",
78 "SampleAfterValue": "200003",
79 "BriefDescription": "Demand Data Read requests",
80 "CounterHTOff": "0,1,2,3,4,5,6,7"
81 },
82 {
83 "PublicDescription": "Counts all L2 store RFO requests.",
84 "EventCode": "0x24",
85 "Counter": "0,1,2,3",
86 "UMask": "0xc",
87 "EventName": "L2_RQSTS.ALL_RFO",
88 "SampleAfterValue": "200003",
89 "BriefDescription": "RFO requests to L2 cache",
90 "CounterHTOff": "0,1,2,3,4,5,6,7"
91 },
92 {
93 "PublicDescription": "Counts all L2 code requests.",
94 "EventCode": "0x24",
95 "Counter": "0,1,2,3",
96 "UMask": "0x30",
97 "EventName": "L2_RQSTS.ALL_CODE_RD",
98 "SampleAfterValue": "200003",
99 "BriefDescription": "L2 code requests",
100 "CounterHTOff": "0,1,2,3,4,5,6,7"
101 },
102 {
103 "PublicDescription": "Counts all L2 HW prefetcher requests.", 103 "PublicDescription": "Counts all L2 HW prefetcher requests.",
104 "EventCode": "0x24", 104 "EventCode": "0x24",
105 "Counter": "0,1,2,3", 105 "Counter": "0,1,2,3",
@@ -219,6 +219,29 @@
219 "CounterHTOff": "2" 219 "CounterHTOff": "2"
220 }, 220 },
221 { 221 {
222 "PublicDescription": "Cycles with L1D load Misses outstanding from any thread on physical core.",
223 "EventCode": "0x48",
224 "Counter": "2",
225 "UMask": "0x1",
226 "AnyThread": "1",
227 "EventName": "L1D_PEND_MISS.PENDING_CYCLES_ANY",
228 "SampleAfterValue": "2000003",
229 "BriefDescription": "Cycles with L1D load Misses outstanding from any thread on physical core",
230 "CounterMask": "1",
231 "CounterHTOff": "2"
232 },
233 {
234 "PublicDescription": "Cycles a demand request was blocked due to Fill Buffers inavailability.",
235 "EventCode": "0x48",
236 "Counter": "0,1,2,3",
237 "UMask": "0x2",
238 "EventName": "L1D_PEND_MISS.FB_FULL",
239 "SampleAfterValue": "2000003",
240 "BriefDescription": "Cycles a demand request was blocked due to Fill Buffers inavailability",
241 "CounterMask": "1",
242 "CounterHTOff": "0,1,2,3,4,5,6,7"
243 },
244 {
222 "PublicDescription": "Counts the number of lines brought into the L1 data cache.", 245 "PublicDescription": "Counts the number of lines brought into the L1 data cache.",
223 "EventCode": "0x51", 246 "EventCode": "0x51",
224 "Counter": "0,1,2,3", 247 "Counter": "0,1,2,3",
@@ -239,76 +262,87 @@
239 "CounterHTOff": "0,1,2,3,4,5,6,7" 262 "CounterHTOff": "0,1,2,3,4,5,6,7"
240 }, 263 },
241 { 264 {
242 "PublicDescription": "Offcore outstanding Demand Code Read transactions in SQ to uncore. Set Cmask=1 to count cycles.", 265 "PublicDescription": "Cycles when offcore outstanding Demand Data Read transactions are present in SuperQueue (SQ), queue to uncore.",
243 "EventCode": "0x60", 266 "EventCode": "0x60",
244 "Counter": "0,1,2,3", 267 "Counter": "0,1,2,3",
245 "UMask": "0x2", 268 "UMask": "0x1",
246 "EventName": "OFFCORE_REQUESTS_OUTSTANDING.DEMAND_CODE_RD", 269 "EventName": "OFFCORE_REQUESTS_OUTSTANDING.CYCLES_WITH_DEMAND_DATA_RD",
247 "SampleAfterValue": "2000003", 270 "SampleAfterValue": "2000003",
248 "BriefDescription": "Offcore outstanding code reads transactions in SuperQueue (SQ), queue to uncore, every cycle", 271 "BriefDescription": "Cycles when offcore outstanding Demand Data Read transactions are present in SuperQueue (SQ), queue to uncore",
272 "CounterMask": "1",
249 "CounterHTOff": "0,1,2,3,4,5,6,7" 273 "CounterHTOff": "0,1,2,3,4,5,6,7"
250 }, 274 },
251 { 275 {
252 "PublicDescription": "Offcore outstanding RFO store transactions in SQ to uncore. Set Cmask=1 to count cycles.", 276 "PublicDescription": "Cycles with at least 6 offcore outstanding Demand Data Read transactions in uncore queue.",
253 "EventCode": "0x60", 277 "EventCode": "0x60",
254 "Counter": "0,1,2,3", 278 "Counter": "0,1,2,3",
255 "UMask": "0x4", 279 "UMask": "0x1",
256 "EventName": "OFFCORE_REQUESTS_OUTSTANDING.DEMAND_RFO", 280 "EventName": "OFFCORE_REQUESTS_OUTSTANDING.DEMAND_DATA_RD_GE_6",
257 "SampleAfterValue": "2000003", 281 "SampleAfterValue": "2000003",
258 "BriefDescription": "Offcore outstanding RFO store transactions in SuperQueue (SQ), queue to uncore", 282 "BriefDescription": "Cycles with at least 6 offcore outstanding Demand Data Read transactions in uncore queue",
283 "CounterMask": "6",
259 "CounterHTOff": "0,1,2,3,4,5,6,7" 284 "CounterHTOff": "0,1,2,3,4,5,6,7"
260 }, 285 },
261 { 286 {
262 "PublicDescription": "Offcore outstanding cacheable data read transactions in SQ to uncore. Set Cmask=1 to count cycles.", 287 "PublicDescription": "Offcore outstanding Demand Code Read transactions in SQ to uncore. Set Cmask=1 to count cycles.",
263 "EventCode": "0x60", 288 "EventCode": "0x60",
264 "Counter": "0,1,2,3", 289 "Counter": "0,1,2,3",
265 "UMask": "0x8", 290 "UMask": "0x2",
266 "EventName": "OFFCORE_REQUESTS_OUTSTANDING.ALL_DATA_RD", 291 "EventName": "OFFCORE_REQUESTS_OUTSTANDING.DEMAND_CODE_RD",
267 "SampleAfterValue": "2000003", 292 "SampleAfterValue": "2000003",
268 "BriefDescription": "Offcore outstanding cacheable Core Data Read transactions in SuperQueue (SQ), queue to uncore", 293 "BriefDescription": "Offcore outstanding code reads transactions in SuperQueue (SQ), queue to uncore, every cycle",
269 "CounterHTOff": "0,1,2,3,4,5,6,7" 294 "CounterHTOff": "0,1,2,3,4,5,6,7"
270 }, 295 },
271 { 296 {
272 "PublicDescription": "Cycles when offcore outstanding Demand Data Read transactions are present in SuperQueue (SQ), queue to uncore.", 297 "PublicDescription": "Offcore outstanding code reads transactions in SuperQueue (SQ), queue to uncore, every cycle.",
273 "EventCode": "0x60", 298 "EventCode": "0x60",
274 "Counter": "0,1,2,3", 299 "Counter": "0,1,2,3",
275 "UMask": "0x1", 300 "UMask": "0x2",
276 "EventName": "OFFCORE_REQUESTS_OUTSTANDING.CYCLES_WITH_DEMAND_DATA_RD", 301 "EventName": "OFFCORE_REQUESTS_OUTSTANDING.CYCLES_WITH_DEMAND_CODE_RD",
277 "SampleAfterValue": "2000003", 302 "SampleAfterValue": "2000003",
278 "BriefDescription": "Cycles when offcore outstanding Demand Data Read transactions are present in SuperQueue (SQ), queue to uncore", 303 "BriefDescription": "Offcore outstanding code reads transactions in SuperQueue (SQ), queue to uncore, every cycle",
279 "CounterMask": "1", 304 "CounterMask": "1",
280 "CounterHTOff": "0,1,2,3,4,5,6,7" 305 "CounterHTOff": "0,1,2,3,4,5,6,7"
281 }, 306 },
282 { 307 {
283 "PublicDescription": "Cycles when offcore outstanding cacheable Core Data Read transactions are present in SuperQueue (SQ), queue to uncore.", 308 "PublicDescription": "Offcore outstanding RFO store transactions in SQ to uncore. Set Cmask=1 to count cycles.",
284 "EventCode": "0x60", 309 "EventCode": "0x60",
285 "Counter": "0,1,2,3", 310 "Counter": "0,1,2,3",
286 "UMask": "0x8", 311 "UMask": "0x4",
287 "EventName": "OFFCORE_REQUESTS_OUTSTANDING.CYCLES_WITH_DATA_RD", 312 "EventName": "OFFCORE_REQUESTS_OUTSTANDING.DEMAND_RFO",
288 "SampleAfterValue": "2000003", 313 "SampleAfterValue": "2000003",
289 "BriefDescription": "Cycles when offcore outstanding cacheable Core Data Read transactions are present in SuperQueue (SQ), queue to uncore", 314 "BriefDescription": "Offcore outstanding RFO store transactions in SuperQueue (SQ), queue to uncore",
290 "CounterMask": "1",
291 "CounterHTOff": "0,1,2,3,4,5,6,7" 315 "CounterHTOff": "0,1,2,3,4,5,6,7"
292 }, 316 },
293 { 317 {
294 "PublicDescription": "Offcore outstanding code reads transactions in SuperQueue (SQ), queue to uncore, every cycle.", 318 "PublicDescription": "Offcore outstanding demand rfo reads transactions in SuperQueue (SQ), queue to uncore, every cycle.",
295 "EventCode": "0x60", 319 "EventCode": "0x60",
296 "Counter": "0,1,2,3", 320 "Counter": "0,1,2,3",
297 "UMask": "0x2", 321 "UMask": "0x4",
298 "EventName": "OFFCORE_REQUESTS_OUTSTANDING.CYCLES_WITH_DEMAND_CODE_RD", 322 "EventName": "OFFCORE_REQUESTS_OUTSTANDING.CYCLES_WITH_DEMAND_RFO",
299 "SampleAfterValue": "2000003", 323 "SampleAfterValue": "2000003",
300 "BriefDescription": "Offcore outstanding code reads transactions in SuperQueue (SQ), queue to uncore, every cycle", 324 "BriefDescription": "Offcore outstanding demand rfo reads transactions in SuperQueue (SQ), queue to uncore, every cycle",
301 "CounterMask": "1", 325 "CounterMask": "1",
302 "CounterHTOff": "0,1,2,3,4,5,6,7" 326 "CounterHTOff": "0,1,2,3,4,5,6,7"
303 }, 327 },
304 { 328 {
305 "PublicDescription": "Offcore outstanding demand rfo reads transactions in SuperQueue (SQ), queue to uncore, every cycle.", 329 "PublicDescription": "Offcore outstanding cacheable data read transactions in SQ to uncore. Set Cmask=1 to count cycles.",
306 "EventCode": "0x60", 330 "EventCode": "0x60",
307 "Counter": "0,1,2,3", 331 "Counter": "0,1,2,3",
308 "UMask": "0x4", 332 "UMask": "0x8",
309 "EventName": "OFFCORE_REQUESTS_OUTSTANDING.CYCLES_WITH_DEMAND_RFO", 333 "EventName": "OFFCORE_REQUESTS_OUTSTANDING.ALL_DATA_RD",
310 "SampleAfterValue": "2000003", 334 "SampleAfterValue": "2000003",
311 "BriefDescription": "Offcore outstanding demand rfo reads transactions in SuperQueue (SQ), queue to uncore, every cycle", 335 "BriefDescription": "Offcore outstanding cacheable Core Data Read transactions in SuperQueue (SQ), queue to uncore",
336 "CounterHTOff": "0,1,2,3,4,5,6,7"
337 },
338 {
339 "PublicDescription": "Cycles when offcore outstanding cacheable Core Data Read transactions are present in SuperQueue (SQ), queue to uncore.",
340 "EventCode": "0x60",
341 "Counter": "0,1,2,3",
342 "UMask": "0x8",
343 "EventName": "OFFCORE_REQUESTS_OUTSTANDING.CYCLES_WITH_DATA_RD",
344 "SampleAfterValue": "2000003",
345 "BriefDescription": "Cycles when offcore outstanding cacheable Core Data Read transactions are present in SuperQueue (SQ), queue to uncore",
312 "CounterMask": "1", 346 "CounterMask": "1",
313 "CounterHTOff": "0,1,2,3,4,5,6,7" 347 "CounterHTOff": "0,1,2,3,4,5,6,7"
314 }, 348 },
@@ -379,7 +413,7 @@
379 "UMask": "0x11", 413 "UMask": "0x11",
380 "EventName": "MEM_UOPS_RETIRED.STLB_MISS_LOADS", 414 "EventName": "MEM_UOPS_RETIRED.STLB_MISS_LOADS",
381 "SampleAfterValue": "100003", 415 "SampleAfterValue": "100003",
382 "BriefDescription": "Retired load uops that miss the STLB.", 416 "BriefDescription": "Retired load uops that miss the STLB. (Precise Event)",
383 "CounterHTOff": "0,1,2,3" 417 "CounterHTOff": "0,1,2,3"
384 }, 418 },
385 { 419 {
@@ -389,7 +423,7 @@
389 "UMask": "0x12", 423 "UMask": "0x12",
390 "EventName": "MEM_UOPS_RETIRED.STLB_MISS_STORES", 424 "EventName": "MEM_UOPS_RETIRED.STLB_MISS_STORES",
391 "SampleAfterValue": "100003", 425 "SampleAfterValue": "100003",
392 "BriefDescription": "Retired store uops that miss the STLB.", 426 "BriefDescription": "Retired store uops that miss the STLB. (Precise Event)",
393 "CounterHTOff": "0,1,2,3" 427 "CounterHTOff": "0,1,2,3"
394 }, 428 },
395 { 429 {
@@ -399,7 +433,7 @@
399 "UMask": "0x21", 433 "UMask": "0x21",
400 "EventName": "MEM_UOPS_RETIRED.LOCK_LOADS", 434 "EventName": "MEM_UOPS_RETIRED.LOCK_LOADS",
401 "SampleAfterValue": "100007", 435 "SampleAfterValue": "100007",
402 "BriefDescription": "Retired load uops with locked access.", 436 "BriefDescription": "Retired load uops with locked access. (Precise Event)",
403 "CounterHTOff": "0,1,2,3" 437 "CounterHTOff": "0,1,2,3"
404 }, 438 },
405 { 439 {
@@ -409,7 +443,7 @@
409 "UMask": "0x41", 443 "UMask": "0x41",
410 "EventName": "MEM_UOPS_RETIRED.SPLIT_LOADS", 444 "EventName": "MEM_UOPS_RETIRED.SPLIT_LOADS",
411 "SampleAfterValue": "100003", 445 "SampleAfterValue": "100003",
412 "BriefDescription": "Retired load uops that split across a cacheline boundary.", 446 "BriefDescription": "Retired load uops that split across a cacheline boundary. (Precise Event)",
413 "CounterHTOff": "0,1,2,3" 447 "CounterHTOff": "0,1,2,3"
414 }, 448 },
415 { 449 {
@@ -419,7 +453,7 @@
419 "UMask": "0x42", 453 "UMask": "0x42",
420 "EventName": "MEM_UOPS_RETIRED.SPLIT_STORES", 454 "EventName": "MEM_UOPS_RETIRED.SPLIT_STORES",
421 "SampleAfterValue": "100003", 455 "SampleAfterValue": "100003",
422 "BriefDescription": "Retired store uops that split across a cacheline boundary.", 456 "BriefDescription": "Retired store uops that split across a cacheline boundary. (Precise Event)",
423 "CounterHTOff": "0,1,2,3" 457 "CounterHTOff": "0,1,2,3"
424 }, 458 },
425 { 459 {
@@ -429,7 +463,7 @@
429 "UMask": "0x81", 463 "UMask": "0x81",
430 "EventName": "MEM_UOPS_RETIRED.ALL_LOADS", 464 "EventName": "MEM_UOPS_RETIRED.ALL_LOADS",
431 "SampleAfterValue": "2000003", 465 "SampleAfterValue": "2000003",
432 "BriefDescription": "All retired load uops.", 466 "BriefDescription": "All retired load uops. (Precise Event)",
433 "CounterHTOff": "0,1,2,3" 467 "CounterHTOff": "0,1,2,3"
434 }, 468 },
435 { 469 {
@@ -439,67 +473,61 @@
439 "UMask": "0x82", 473 "UMask": "0x82",
440 "EventName": "MEM_UOPS_RETIRED.ALL_STORES", 474 "EventName": "MEM_UOPS_RETIRED.ALL_STORES",
441 "SampleAfterValue": "2000003", 475 "SampleAfterValue": "2000003",
442 "BriefDescription": "All retired store uops.", 476 "BriefDescription": "All retired store uops. (Precise Event)",
443 "CounterHTOff": "0,1,2,3" 477 "CounterHTOff": "0,1,2,3"
444 }, 478 },
445 { 479 {
446 "PEBS": "1", 480 "PEBS": "1",
447 "PublicDescription": "Retired load uops with L1 cache hits as data sources.",
448 "EventCode": "0xD1", 481 "EventCode": "0xD1",
449 "Counter": "0,1,2,3", 482 "Counter": "0,1,2,3",
450 "UMask": "0x1", 483 "UMask": "0x1",
451 "EventName": "MEM_LOAD_UOPS_RETIRED.L1_HIT", 484 "EventName": "MEM_LOAD_UOPS_RETIRED.L1_HIT",
452 "SampleAfterValue": "2000003", 485 "SampleAfterValue": "2000003",
453 "BriefDescription": "Retired load uops with L1 cache hits as data sources. ", 486 "BriefDescription": "Retired load uops with L1 cache hits as data sources.",
454 "CounterHTOff": "0,1,2,3" 487 "CounterHTOff": "0,1,2,3"
455 }, 488 },
456 { 489 {
457 "PEBS": "1", 490 "PEBS": "1",
458 "PublicDescription": "Retired load uops with L2 cache hits as data sources.",
459 "EventCode": "0xD1", 491 "EventCode": "0xD1",
460 "Counter": "0,1,2,3", 492 "Counter": "0,1,2,3",
461 "UMask": "0x2", 493 "UMask": "0x2",
462 "EventName": "MEM_LOAD_UOPS_RETIRED.L2_HIT", 494 "EventName": "MEM_LOAD_UOPS_RETIRED.L2_HIT",
463 "SampleAfterValue": "100003", 495 "SampleAfterValue": "100003",
464 "BriefDescription": "Retired load uops with L2 cache hits as data sources. ", 496 "BriefDescription": "Retired load uops with L2 cache hits as data sources.",
465 "CounterHTOff": "0,1,2,3" 497 "CounterHTOff": "0,1,2,3"
466 }, 498 },
467 { 499 {
468 "PEBS": "1", 500 "PEBS": "1",
469 "PublicDescription": "Retired load uops whose data source was LLC hit with no snoop required.",
470 "EventCode": "0xD1", 501 "EventCode": "0xD1",
471 "Counter": "0,1,2,3", 502 "Counter": "0,1,2,3",
472 "UMask": "0x4", 503 "UMask": "0x4",
473 "EventName": "MEM_LOAD_UOPS_RETIRED.LLC_HIT", 504 "EventName": "MEM_LOAD_UOPS_RETIRED.LLC_HIT",
474 "SampleAfterValue": "50021", 505 "SampleAfterValue": "50021",
475 "BriefDescription": "Retired load uops which data sources were data hits in LLC without snoops required. ", 506 "BriefDescription": "Retired load uops which data sources were data hits in LLC without snoops required.",
476 "CounterHTOff": "0,1,2,3" 507 "CounterHTOff": "0,1,2,3"
477 }, 508 },
478 { 509 {
479 "PEBS": "1", 510 "PEBS": "1",
480 "PublicDescription": "Retired load uops whose data source followed an L1 miss.",
481 "EventCode": "0xD1", 511 "EventCode": "0xD1",
482 "Counter": "0,1,2,3", 512 "Counter": "0,1,2,3",
483 "UMask": "0x8", 513 "UMask": "0x8",
484 "EventName": "MEM_LOAD_UOPS_RETIRED.L1_MISS", 514 "EventName": "MEM_LOAD_UOPS_RETIRED.L1_MISS",
485 "SampleAfterValue": "100003", 515 "SampleAfterValue": "100003",
486 "BriefDescription": "Retired load uops which data sources following L1 data-cache miss", 516 "BriefDescription": "Retired load uops which data sources following L1 data-cache miss.",
487 "CounterHTOff": "0,1,2,3" 517 "CounterHTOff": "0,1,2,3"
488 }, 518 },
489 { 519 {
490 "PEBS": "1", 520 "PEBS": "1",
491 "PublicDescription": "Retired load uops that missed L2, excluding unknown sources.",
492 "EventCode": "0xD1", 521 "EventCode": "0xD1",
493 "Counter": "0,1,2,3", 522 "Counter": "0,1,2,3",
494 "UMask": "0x10", 523 "UMask": "0x10",
495 "EventName": "MEM_LOAD_UOPS_RETIRED.L2_MISS", 524 "EventName": "MEM_LOAD_UOPS_RETIRED.L2_MISS",
496 "SampleAfterValue": "50021", 525 "SampleAfterValue": "50021",
497 "BriefDescription": "Miss in mid-level (L2) cache. Excludes Unknown data-source.", 526 "BriefDescription": "Retired load uops with L2 cache misses as data sources.",
498 "CounterHTOff": "0,1,2,3" 527 "CounterHTOff": "0,1,2,3"
499 }, 528 },
500 { 529 {
501 "PEBS": "1", 530 "PEBS": "1",
502 "PublicDescription": "Retired load uops whose data source is LLC miss.",
503 "EventCode": "0xD1", 531 "EventCode": "0xD1",
504 "Counter": "0,1,2,3", 532 "Counter": "0,1,2,3",
505 "UMask": "0x20", 533 "UMask": "0x20",
@@ -510,67 +538,61 @@
510 }, 538 },
511 { 539 {
512 "PEBS": "1", 540 "PEBS": "1",
513 "PublicDescription": "Retired load uops which data sources were load uops missed L1 but hit FB due to preceding miss to the same cache line with data not ready.",
514 "EventCode": "0xD1", 541 "EventCode": "0xD1",
515 "Counter": "0,1,2,3", 542 "Counter": "0,1,2,3",
516 "UMask": "0x40", 543 "UMask": "0x40",
517 "EventName": "MEM_LOAD_UOPS_RETIRED.HIT_LFB", 544 "EventName": "MEM_LOAD_UOPS_RETIRED.HIT_LFB",
518 "SampleAfterValue": "100003", 545 "SampleAfterValue": "100003",
519 "BriefDescription": "Retired load uops which data sources were load uops missed L1 but hit FB due to preceding miss to the same cache line with data not ready. ", 546 "BriefDescription": "Retired load uops which data sources were load uops missed L1 but hit FB due to preceding miss to the same cache line with data not ready.",
520 "CounterHTOff": "0,1,2,3" 547 "CounterHTOff": "0,1,2,3"
521 }, 548 },
522 { 549 {
523 "PEBS": "1", 550 "PEBS": "1",
524 "PublicDescription": "Retired load uops whose data source was an on-package core cache LLC hit and cross-core snoop missed.",
525 "EventCode": "0xD2", 551 "EventCode": "0xD2",
526 "Counter": "0,1,2,3", 552 "Counter": "0,1,2,3",
527 "UMask": "0x1", 553 "UMask": "0x1",
528 "EventName": "MEM_LOAD_UOPS_LLC_HIT_RETIRED.XSNP_MISS", 554 "EventName": "MEM_LOAD_UOPS_LLC_HIT_RETIRED.XSNP_MISS",
529 "SampleAfterValue": "20011", 555 "SampleAfterValue": "20011",
530 "BriefDescription": "Retired load uops which data sources were LLC hit and cross-core snoop missed in on-pkg core cache. ", 556 "BriefDescription": "Retired load uops which data sources were LLC hit and cross-core snoop missed in on-pkg core cache.",
531 "CounterHTOff": "0,1,2,3" 557 "CounterHTOff": "0,1,2,3"
532 }, 558 },
533 { 559 {
534 "PEBS": "1", 560 "PEBS": "1",
535 "PublicDescription": "Retired load uops whose data source was an on-package LLC hit and cross-core snoop hits.",
536 "EventCode": "0xD2", 561 "EventCode": "0xD2",
537 "Counter": "0,1,2,3", 562 "Counter": "0,1,2,3",
538 "UMask": "0x2", 563 "UMask": "0x2",
539 "EventName": "MEM_LOAD_UOPS_LLC_HIT_RETIRED.XSNP_HIT", 564 "EventName": "MEM_LOAD_UOPS_LLC_HIT_RETIRED.XSNP_HIT",
540 "SampleAfterValue": "20011", 565 "SampleAfterValue": "20011",
541 "BriefDescription": "Retired load uops which data sources were LLC and cross-core snoop hits in on-pkg core cache. ", 566 "BriefDescription": "Retired load uops which data sources were LLC and cross-core snoop hits in on-pkg core cache.",
542 "CounterHTOff": "0,1,2,3" 567 "CounterHTOff": "0,1,2,3"
543 }, 568 },
544 { 569 {
545 "PEBS": "1", 570 "PEBS": "1",
546 "PublicDescription": "Retired load uops whose data source was an on-package core cache with HitM responses.",
547 "EventCode": "0xD2", 571 "EventCode": "0xD2",
548 "Counter": "0,1,2,3", 572 "Counter": "0,1,2,3",
549 "UMask": "0x4", 573 "UMask": "0x4",
550 "EventName": "MEM_LOAD_UOPS_LLC_HIT_RETIRED.XSNP_HITM", 574 "EventName": "MEM_LOAD_UOPS_LLC_HIT_RETIRED.XSNP_HITM",
551 "SampleAfterValue": "20011", 575 "SampleAfterValue": "20011",
552 "BriefDescription": "Retired load uops which data sources were HitM responses from shared LLC. ", 576 "BriefDescription": "Retired load uops which data sources were HitM responses from shared LLC.",
553 "CounterHTOff": "0,1,2,3" 577 "CounterHTOff": "0,1,2,3"
554 }, 578 },
555 { 579 {
556 "PEBS": "1", 580 "PEBS": "1",
557 "PublicDescription": "Retired load uops whose data source was LLC hit with no snoop required.",
558 "EventCode": "0xD2", 581 "EventCode": "0xD2",
559 "Counter": "0,1,2,3", 582 "Counter": "0,1,2,3",
560 "UMask": "0x8", 583 "UMask": "0x8",
561 "EventName": "MEM_LOAD_UOPS_LLC_HIT_RETIRED.XSNP_NONE", 584 "EventName": "MEM_LOAD_UOPS_LLC_HIT_RETIRED.XSNP_NONE",
562 "SampleAfterValue": "100003", 585 "SampleAfterValue": "100003",
563 "BriefDescription": "Retired load uops which data sources were hits in LLC without snoops required. ", 586 "BriefDescription": "Retired load uops which data sources were hits in LLC without snoops required.",
564 "CounterHTOff": "0,1,2,3" 587 "CounterHTOff": "0,1,2,3"
565 }, 588 },
566 { 589 {
567 "PublicDescription": "Retired load uop whose Data Source was: local DRAM either Snoop not needed or Snoop Miss (RspI)",
568 "EventCode": "0xD3", 590 "EventCode": "0xD3",
569 "Counter": "0,1,2,3", 591 "Counter": "0,1,2,3",
570 "UMask": "0x1", 592 "UMask": "0x3",
571 "EventName": "MEM_LOAD_UOPS_LLC_MISS_RETIRED.LOCAL_DRAM", 593 "EventName": "MEM_LOAD_UOPS_LLC_MISS_RETIRED.LOCAL_DRAM",
572 "SampleAfterValue": "100007", 594 "SampleAfterValue": "100007",
573 "BriefDescription": "Retired load uops which data sources missed LLC but serviced from local dram.", 595 "BriefDescription": "Retired load uops whose data source was local DRAM (Snoop not needed, Snoop Miss, or Snoop Hit data not forwarded).",
574 "CounterHTOff": "0,1,2,3" 596 "CounterHTOff": "0,1,2,3"
575 }, 597 },
576 { 598 {
@@ -780,40 +802,6 @@
780 "CounterHTOff": "0,1,2,3,4,5,6,7" 802 "CounterHTOff": "0,1,2,3,4,5,6,7"
781 }, 803 },
782 { 804 {
783 "PublicDescription": "Cycles with at least 6 offcore outstanding Demand Data Read transactions in uncore queue.",
784 "EventCode": "0x60",
785 "Counter": "0,1,2,3",
786 "UMask": "0x1",
787 "EventName": "OFFCORE_REQUESTS_OUTSTANDING.DEMAND_DATA_RD_GE_6",
788 "SampleAfterValue": "2000003",
789 "BriefDescription": "Cycles with at least 6 offcore outstanding Demand Data Read transactions in uncore queue",
790 "CounterMask": "6",
791 "CounterHTOff": "0,1,2,3,4,5,6,7"
792 },
793 {
794 "PublicDescription": "Cycles with L1D load Misses outstanding from any thread on physical core.",
795 "EventCode": "0x48",
796 "Counter": "2",
797 "UMask": "0x1",
798 "AnyThread": "1",
799 "EventName": "L1D_PEND_MISS.PENDING_CYCLES_ANY",
800 "SampleAfterValue": "2000003",
801 "BriefDescription": "Cycles with L1D load Misses outstanding from any thread on physical core",
802 "CounterMask": "1",
803 "CounterHTOff": "2"
804 },
805 {
806 "PublicDescription": "Cycles a demand request was blocked due to Fill Buffers inavailability.",
807 "EventCode": "0x48",
808 "Counter": "0,1,2,3",
809 "UMask": "0x2",
810 "EventName": "L1D_PEND_MISS.FB_FULL",
811 "SampleAfterValue": "2000003",
812 "BriefDescription": "Cycles a demand request was blocked due to Fill Buffers inavailability",
813 "CounterMask": "1",
814 "CounterHTOff": "0,1,2,3,4,5,6,7"
815 },
816 {
817 "EventCode": "0xB7, 0xBB", 805 "EventCode": "0xB7, 0xBB",
818 "MSRValue": "0x4003c0091", 806 "MSRValue": "0x4003c0091",
819 "Counter": "0,1,2,3", 807 "Counter": "0,1,2,3",
diff --git a/tools/perf/pmu-events/arch/x86/ivytown/frontend.json b/tools/perf/pmu-events/arch/x86/ivytown/frontend.json
index de72b84b3536..efaa949ead31 100644
--- a/tools/perf/pmu-events/arch/x86/ivytown/frontend.json
+++ b/tools/perf/pmu-events/arch/x86/ivytown/frontend.json
@@ -20,76 +20,45 @@
20 "CounterHTOff": "0,1,2,3,4,5,6,7" 20 "CounterHTOff": "0,1,2,3,4,5,6,7"
21 }, 21 },
22 { 22 {
23 "PublicDescription": "Increment each cycle. # of uops delivered to IDQ from DSB path. Set Cmask = 1 to count cycles.", 23 "PublicDescription": "Cycles when uops are being delivered to Instruction Decode Queue (IDQ) from MITE path.",
24 "EventCode": "0x79",
25 "Counter": "0,1,2,3",
26 "UMask": "0x8",
27 "EventName": "IDQ.DSB_UOPS",
28 "SampleAfterValue": "2000003",
29 "BriefDescription": "Uops delivered to Instruction Decode Queue (IDQ) from the Decode Stream Buffer (DSB) path",
30 "CounterHTOff": "0,1,2,3,4,5,6,7"
31 },
32 {
33 "PublicDescription": "Increment each cycle # of uops delivered to IDQ when MS_busy by DSB. Set Cmask = 1 to count cycles. Add Edge=1 to count # of delivery.",
34 "EventCode": "0x79",
35 "Counter": "0,1,2,3",
36 "UMask": "0x10",
37 "EventName": "IDQ.MS_DSB_UOPS",
38 "SampleAfterValue": "2000003",
39 "BriefDescription": "Uops initiated by Decode Stream Buffer (DSB) that are being delivered to Instruction Decode Queue (IDQ) while Microcode Sequenser (MS) is busy",
40 "CounterHTOff": "0,1,2,3,4,5,6,7"
41 },
42 {
43 "PublicDescription": "Increment each cycle # of uops delivered to IDQ when MS_busy by MITE. Set Cmask = 1 to count cycles.",
44 "EventCode": "0x79",
45 "Counter": "0,1,2,3",
46 "UMask": "0x20",
47 "EventName": "IDQ.MS_MITE_UOPS",
48 "SampleAfterValue": "2000003",
49 "BriefDescription": "Uops initiated by MITE and delivered to Instruction Decode Queue (IDQ) while Microcode Sequenser (MS) is busy",
50 "CounterHTOff": "0,1,2,3,4,5,6,7"
51 },
52 {
53 "PublicDescription": "Increment each cycle # of uops delivered to IDQ from MS by either DSB or MITE. Set Cmask = 1 to count cycles.",
54 "EventCode": "0x79", 24 "EventCode": "0x79",
55 "Counter": "0,1,2,3", 25 "Counter": "0,1,2,3",
56 "UMask": "0x30", 26 "UMask": "0x4",
57 "EventName": "IDQ.MS_UOPS", 27 "EventName": "IDQ.MITE_CYCLES",
58 "SampleAfterValue": "2000003", 28 "SampleAfterValue": "2000003",
59 "BriefDescription": "Uops delivered to Instruction Decode Queue (IDQ) while Microcode Sequenser (MS) is busy", 29 "BriefDescription": "Cycles when uops are being delivered to Instruction Decode Queue (IDQ) from MITE path",
30 "CounterMask": "1",
60 "CounterHTOff": "0,1,2,3,4,5,6,7" 31 "CounterHTOff": "0,1,2,3,4,5,6,7"
61 }, 32 },
62 { 33 {
63 "PublicDescription": "Cycles when uops are being delivered to Instruction Decode Queue (IDQ) while Microcode Sequenser (MS) is busy.", 34 "PublicDescription": "Increment each cycle. # of uops delivered to IDQ from DSB path. Set Cmask = 1 to count cycles.",
64 "EventCode": "0x79", 35 "EventCode": "0x79",
65 "Counter": "0,1,2,3", 36 "Counter": "0,1,2,3",
66 "UMask": "0x30", 37 "UMask": "0x8",
67 "EventName": "IDQ.MS_CYCLES", 38 "EventName": "IDQ.DSB_UOPS",
68 "SampleAfterValue": "2000003", 39 "SampleAfterValue": "2000003",
69 "BriefDescription": "Cycles when uops are being delivered to Instruction Decode Queue (IDQ) while Microcode Sequenser (MS) is busy", 40 "BriefDescription": "Uops delivered to Instruction Decode Queue (IDQ) from the Decode Stream Buffer (DSB) path",
70 "CounterMask": "1",
71 "CounterHTOff": "0,1,2,3,4,5,6,7" 41 "CounterHTOff": "0,1,2,3,4,5,6,7"
72 }, 42 },
73 { 43 {
74 "PublicDescription": "Cycles when uops are being delivered to Instruction Decode Queue (IDQ) from MITE path.", 44 "PublicDescription": "Cycles when uops are being delivered to Instruction Decode Queue (IDQ) from Decode Stream Buffer (DSB) path.",
75 "EventCode": "0x79", 45 "EventCode": "0x79",
76 "Counter": "0,1,2,3", 46 "Counter": "0,1,2,3",
77 "UMask": "0x4", 47 "UMask": "0x8",
78 "EventName": "IDQ.MITE_CYCLES", 48 "EventName": "IDQ.DSB_CYCLES",
79 "SampleAfterValue": "2000003", 49 "SampleAfterValue": "2000003",
80 "BriefDescription": "Cycles when uops are being delivered to Instruction Decode Queue (IDQ) from MITE path", 50 "BriefDescription": "Cycles when uops are being delivered to Instruction Decode Queue (IDQ) from Decode Stream Buffer (DSB) path",
81 "CounterMask": "1", 51 "CounterMask": "1",
82 "CounterHTOff": "0,1,2,3,4,5,6,7" 52 "CounterHTOff": "0,1,2,3,4,5,6,7"
83 }, 53 },
84 { 54 {
85 "PublicDescription": "Cycles when uops are being delivered to Instruction Decode Queue (IDQ) from Decode Stream Buffer (DSB) path.", 55 "PublicDescription": "Increment each cycle # of uops delivered to IDQ when MS_busy by DSB. Set Cmask = 1 to count cycles. Add Edge=1 to count # of delivery.",
86 "EventCode": "0x79", 56 "EventCode": "0x79",
87 "Counter": "0,1,2,3", 57 "Counter": "0,1,2,3",
88 "UMask": "0x8", 58 "UMask": "0x10",
89 "EventName": "IDQ.DSB_CYCLES", 59 "EventName": "IDQ.MS_DSB_UOPS",
90 "SampleAfterValue": "2000003", 60 "SampleAfterValue": "2000003",
91 "BriefDescription": "Cycles when uops are being delivered to Instruction Decode Queue (IDQ) from Decode Stream Buffer (DSB) path", 61 "BriefDescription": "Uops initiated by Decode Stream Buffer (DSB) that are being delivered to Instruction Decode Queue (IDQ) while Microcode Sequenser (MS) is busy",
92 "CounterMask": "1",
93 "CounterHTOff": "0,1,2,3,4,5,6,7" 62 "CounterHTOff": "0,1,2,3,4,5,6,7"
94 }, 63 },
95 { 64 {
@@ -138,6 +107,16 @@
138 "CounterHTOff": "0,1,2,3,4,5,6,7" 107 "CounterHTOff": "0,1,2,3,4,5,6,7"
139 }, 108 },
140 { 109 {
110 "PublicDescription": "Increment each cycle # of uops delivered to IDQ when MS_busy by MITE. Set Cmask = 1 to count cycles.",
111 "EventCode": "0x79",
112 "Counter": "0,1,2,3",
113 "UMask": "0x20",
114 "EventName": "IDQ.MS_MITE_UOPS",
115 "SampleAfterValue": "2000003",
116 "BriefDescription": "Uops initiated by MITE and delivered to Instruction Decode Queue (IDQ) while Microcode Sequenser (MS) is busy",
117 "CounterHTOff": "0,1,2,3,4,5,6,7"
118 },
119 {
141 "PublicDescription": "Counts cycles MITE is delivered four uops. Set Cmask = 4.", 120 "PublicDescription": "Counts cycles MITE is delivered four uops. Set Cmask = 4.",
142 "EventCode": "0x79", 121 "EventCode": "0x79",
143 "Counter": "0,1,2,3", 122 "Counter": "0,1,2,3",
@@ -160,6 +139,39 @@
160 "CounterHTOff": "0,1,2,3,4,5,6,7" 139 "CounterHTOff": "0,1,2,3,4,5,6,7"
161 }, 140 },
162 { 141 {
142 "PublicDescription": "Increment each cycle # of uops delivered to IDQ from MS by either DSB or MITE. Set Cmask = 1 to count cycles.",
143 "EventCode": "0x79",
144 "Counter": "0,1,2,3",
145 "UMask": "0x30",
146 "EventName": "IDQ.MS_UOPS",
147 "SampleAfterValue": "2000003",
148 "BriefDescription": "Uops delivered to Instruction Decode Queue (IDQ) while Microcode Sequenser (MS) is busy",
149 "CounterHTOff": "0,1,2,3,4,5,6,7"
150 },
151 {
152 "PublicDescription": "Cycles when uops are being delivered to Instruction Decode Queue (IDQ) while Microcode Sequenser (MS) is busy.",
153 "EventCode": "0x79",
154 "Counter": "0,1,2,3",
155 "UMask": "0x30",
156 "EventName": "IDQ.MS_CYCLES",
157 "SampleAfterValue": "2000003",
158 "BriefDescription": "Cycles when uops are being delivered to Instruction Decode Queue (IDQ) while Microcode Sequenser (MS) is busy",
159 "CounterMask": "1",
160 "CounterHTOff": "0,1,2,3,4,5,6,7"
161 },
162 {
163 "PublicDescription": "Number of switches from DSB (Decode Stream Buffer) or MITE (legacy decode pipeline) to the Microcode Sequencer.",
164 "EventCode": "0x79",
165 "Counter": "0,1,2,3",
166 "UMask": "0x30",
167 "EdgeDetect": "1",
168 "EventName": "IDQ.MS_SWITCHES",
169 "SampleAfterValue": "2000003",
170 "BriefDescription": "Number of switches from DSB (Decode Stream Buffer) or MITE (legacy decode pipeline) to the Microcode Sequencer",
171 "CounterMask": "1",
172 "CounterHTOff": "0,1,2,3,4,5,6,7"
173 },
174 {
163 "PublicDescription": "Number of uops delivered to IDQ from any path.", 175 "PublicDescription": "Number of uops delivered to IDQ from any path.",
164 "EventCode": "0x79", 176 "EventCode": "0x79",
165 "Counter": "0,1,2,3", 177 "Counter": "0,1,2,3",
@@ -206,7 +218,7 @@
206 "UMask": "0x1", 218 "UMask": "0x1",
207 "EventName": "IDQ_UOPS_NOT_DELIVERED.CORE", 219 "EventName": "IDQ_UOPS_NOT_DELIVERED.CORE",
208 "SampleAfterValue": "2000003", 220 "SampleAfterValue": "2000003",
209 "BriefDescription": "Uops not delivered to Resource Allocation Table (RAT) per thread when backend of the machine is not stalled ", 221 "BriefDescription": "Uops not delivered to Resource Allocation Table (RAT) per thread when backend of the machine is not stalled",
210 "CounterHTOff": "0,1,2,3" 222 "CounterHTOff": "0,1,2,3"
211 }, 223 },
212 { 224 {
@@ -289,17 +301,5 @@
289 "SampleAfterValue": "2000003", 301 "SampleAfterValue": "2000003",
290 "BriefDescription": "Cycles when Decode Stream Buffer (DSB) fill encounter more than 3 Decode Stream Buffer (DSB) lines", 302 "BriefDescription": "Cycles when Decode Stream Buffer (DSB) fill encounter more than 3 Decode Stream Buffer (DSB) lines",
291 "CounterHTOff": "0,1,2,3,4,5,6,7" 303 "CounterHTOff": "0,1,2,3,4,5,6,7"
292 },
293 {
294 "PublicDescription": "Number of switches from DSB (Decode Stream Buffer) or MITE (legacy decode pipeline) to the Microcode Sequencer.",
295 "EventCode": "0x79",
296 "Counter": "0,1,2,3",
297 "UMask": "0x30",
298 "EdgeDetect": "1",
299 "EventName": "IDQ.MS_SWITCHES",
300 "SampleAfterValue": "2000003",
301 "BriefDescription": "Number of switches from DSB (Decode Stream Buffer) or MITE (legacy decode pipeline) to the Microcode Sequencer",
302 "CounterMask": "1",
303 "CounterHTOff": "0,1,2,3,4,5,6,7"
304 } 304 }
305] \ No newline at end of file 305] \ No newline at end of file
diff --git a/tools/perf/pmu-events/arch/x86/ivytown/ivt-metrics.json b/tools/perf/pmu-events/arch/x86/ivytown/ivt-metrics.json
new file mode 100644
index 000000000000..7c2679514efb
--- /dev/null
+++ b/tools/perf/pmu-events/arch/x86/ivytown/ivt-metrics.json
@@ -0,0 +1,164 @@
1[
2 {
3 "BriefDescription": "Instructions Per Cycle (per logical thread)",
4 "MetricExpr": "INST_RETIRED.ANY / CPU_CLK_UNHALTED.THREAD",
5 "MetricGroup": "TopDownL1",
6 "MetricName": "IPC"
7 },
8 {
9 "BriefDescription": "Uops Per Instruction",
10 "MetricExpr": "UOPS_RETIRED.RETIRE_SLOTS / INST_RETIRED.ANY",
11 "MetricGroup": "Pipeline",
12 "MetricName": "UPI"
13 },
14 {
15 "BriefDescription": "Rough Estimation of fraction of fetched lines bytes that were likely consumed by program instructions",
16 "MetricExpr": "min( 1 , UOPS_ISSUED.ANY / ( (UOPS_RETIRED.RETIRE_SLOTS / INST_RETIRED.ANY) * 32 * ( ICACHE.HIT + ICACHE.MISSES ) / 4) )",
17 "MetricGroup": "Frontend",
18 "MetricName": "IFetch_Line_Utilization"
19 },
20 {
21 "BriefDescription": "Fraction of Uops delivered by the DSB (aka Decoded Icache; or Uop Cache)",
22 "MetricExpr": "IDQ.DSB_UOPS / ( IDQ.DSB_UOPS + LSD.UOPS + IDQ.MITE_UOPS + IDQ.MS_UOPS )",
23 "MetricGroup": "DSB; Frontend_Bandwidth",
24 "MetricName": "DSB_Coverage"
25 },
26 {
27 "BriefDescription": "Cycles Per Instruction (threaded)",
28 "MetricExpr": "1 / (INST_RETIRED.ANY / cycles)",
29 "MetricGroup": "Pipeline;Summary",
30 "MetricName": "CPI"
31 },
32 {
33 "BriefDescription": "Per-thread actual clocks when the logical processor is active. This is called 'Clockticks' in VTune.",
34 "MetricExpr": "CPU_CLK_UNHALTED.THREAD",
35 "MetricGroup": "Summary",
36 "MetricName": "CLKS"
37 },
38 {
39 "BriefDescription": "Total issue-pipeline slots",
40 "MetricExpr": "4*(( CPU_CLK_UNHALTED.THREAD_ANY / 2 ) if #SMT_on else cycles)",
41 "MetricGroup": "TopDownL1",
42 "MetricName": "SLOTS"
43 },
44 {
45 "BriefDescription": "Total number of retired Instructions",
46 "MetricExpr": "INST_RETIRED.ANY",
47 "MetricGroup": "Summary",
48 "MetricName": "Instructions"
49 },
50 {
51 "BriefDescription": "Instructions Per Cycle (per physical core)",
52 "MetricExpr": "INST_RETIRED.ANY / (( CPU_CLK_UNHALTED.THREAD_ANY / 2 ) if #SMT_on else cycles)",
53 "MetricGroup": "SMT",
54 "MetricName": "CoreIPC"
55 },
56 {
57 "BriefDescription": "Instruction-Level-Parallelism (average number of uops executed when there is at least 1 uop executed)",
58 "MetricExpr": "UOPS_EXECUTED.THREAD / (( cpu@UOPS_EXECUTED.CORE\\,cmask\\=1@ / 2) if #SMT_on else UOPS_EXECUTED.CYCLES_GE_1_UOP_EXEC)",
59 "MetricGroup": "Pipeline;Ports_Utilization",
60 "MetricName": "ILP"
61 },
62 {
63 "BriefDescription": "Average Branch Address Clear Cost (fraction of cycles)",
64 "MetricExpr": "2* (( RS_EVENTS.EMPTY_CYCLES - ICACHE.IFETCH_STALL ) / RS_EVENTS.EMPTY_END)",
65 "MetricGroup": "Unknown_Branches",
66 "MetricName": "BAClear_Cost"
67 },
68 {
69 "BriefDescription": "Core actual clocks when any thread is active on the physical core",
70 "MetricExpr": "( CPU_CLK_UNHALTED.THREAD_ANY / 2 ) if #SMT_on else CPU_CLK_UNHALTED.THREAD",
71 "MetricGroup": "SMT",
72 "MetricName": "CORE_CLKS"
73 },
74 {
75 "BriefDescription": "Actual Average Latency for L1 data-cache miss demand loads",
76 "MetricExpr": "L1D_PEND_MISS.PENDING / ( MEM_LOAD_UOPS_RETIRED.L1_MISS + mem_load_uops_retired.hit_lfb )",
77 "MetricGroup": "Memory_Bound;Memory_Lat",
78 "MetricName": "Load_Miss_Real_Latency"
79 },
80 {
81 "BriefDescription": "Memory-Level-Parallelism (average number of L1 miss demand load when there is at least 1 such miss)",
82 "MetricExpr": "L1D_PEND_MISS.PENDING / (( cpu@l1d_pend_miss.pending_cycles\\,any\\=1@ / 2) if #SMT_on else L1D_PEND_MISS.PENDING_CYCLES)",
83 "MetricGroup": "Memory_Bound;Memory_BW",
84 "MetricName": "MLP"
85 },
86 {
87 "BriefDescription": "Utilization of the core's Page Walker(s) serving STLB misses triggered by instruction/Load/Store accesses",
88 "MetricExpr": "( ITLB_MISSES.WALK_DURATION + DTLB_LOAD_MISSES.WALK_DURATION + DTLB_STORE_MISSES.WALK_DURATION ) / (( CPU_CLK_UNHALTED.THREAD_ANY / 2 ) if #SMT_on else cycles)",
89 "MetricGroup": "TLB",
90 "MetricName": "Page_Walks_Utilization"
91 },
92 {
93 "BriefDescription": "Average CPU Utilization",
94 "MetricExpr": "CPU_CLK_UNHALTED.REF_TSC / msr@tsc@",
95 "MetricGroup": "Summary",
96 "MetricName": "CPU_Utilization"
97 },
98 {
99 "BriefDescription": "Giga Floating Point Operations Per Second",
100 "MetricExpr": "(( 1*( FP_COMP_OPS_EXE.SSE_SCALAR_SINGLE + FP_COMP_OPS_EXE.SSE_SCALAR_DOUBLE ) + 2* FP_COMP_OPS_EXE.SSE_PACKED_DOUBLE + 4*( FP_COMP_OPS_EXE.SSE_PACKED_SINGLE + SIMD_FP_256.PACKED_DOUBLE ) + 8* SIMD_FP_256.PACKED_SINGLE )) / 1000000000 / duration_time",
101 "MetricGroup": "FLOPS;Summary",
102 "MetricName": "GFLOPs"
103 },
104 {
105 "BriefDescription": "Average Frequency Utilization relative nominal frequency",
106 "MetricExpr": "CPU_CLK_UNHALTED.THREAD / CPU_CLK_UNHALTED.REF_TSC",
107 "MetricGroup": "Power",
108 "MetricName": "Turbo_Utilization"
109 },
110 {
111 "BriefDescription": "Fraction of cycles where both hardware threads were active",
112 "MetricExpr": "1 - CPU_CLK_THREAD_UNHALTED.ONE_THREAD_ACTIVE / ( CPU_CLK_THREAD_UNHALTED.REF_XCLK_ANY / 2 ) if #SMT_on else 0",
113 "MetricGroup": "SMT;Summary",
114 "MetricName": "SMT_2T_Utilization"
115 },
116 {
117 "BriefDescription": "Fraction of cycles spent in Kernel mode",
118 "MetricExpr": "CPU_CLK_UNHALTED.REF_TSC:u / CPU_CLK_UNHALTED.REF_TSC",
119 "MetricGroup": "Summary",
120 "MetricName": "Kernel_Utilization"
121 },
122 {
123 "BriefDescription": "C3 residency percent per core",
124 "MetricExpr": "(cstate_core@c3\\-residency@ / msr@tsc@) * 100",
125 "MetricGroup": "Power",
126 "MetricName": "C3_Core_Residency"
127 },
128 {
129 "BriefDescription": "C6 residency percent per core",
130 "MetricExpr": "(cstate_core@c6\\-residency@ / msr@tsc@) * 100",
131 "MetricGroup": "Power",
132 "MetricName": "C6_Core_Residency"
133 },
134 {
135 "BriefDescription": "C7 residency percent per core",
136 "MetricExpr": "(cstate_core@c7\\-residency@ / msr@tsc@) * 100",
137 "MetricGroup": "Power",
138 "MetricName": "C7_Core_Residency"
139 },
140 {
141 "BriefDescription": "C2 residency percent per package",
142 "MetricExpr": "(cstate_pkg@c2\\-residency@ / msr@tsc@) * 100",
143 "MetricGroup": "Power",
144 "MetricName": "C2_Pkg_Residency"
145 },
146 {
147 "BriefDescription": "C3 residency percent per package",
148 "MetricExpr": "(cstate_pkg@c3\\-residency@ / msr@tsc@) * 100",
149 "MetricGroup": "Power",
150 "MetricName": "C3_Pkg_Residency"
151 },
152 {
153 "BriefDescription": "C6 residency percent per package",
154 "MetricExpr": "(cstate_pkg@c6\\-residency@ / msr@tsc@) * 100",
155 "MetricGroup": "Power",
156 "MetricName": "C6_Pkg_Residency"
157 },
158 {
159 "BriefDescription": "C7 residency percent per package",
160 "MetricExpr": "(cstate_pkg@c7\\-residency@ / msr@tsc@) * 100",
161 "MetricGroup": "Power",
162 "MetricName": "C7_Pkg_Residency"
163 }
164]
diff --git a/tools/perf/pmu-events/arch/x86/ivytown/memory.json b/tools/perf/pmu-events/arch/x86/ivytown/memory.json
index 437d98f3e344..3a7b86af8816 100644
--- a/tools/perf/pmu-events/arch/x86/ivytown/memory.json
+++ b/tools/perf/pmu-events/arch/x86/ivytown/memory.json
@@ -30,18 +30,6 @@
30 }, 30 },
31 { 31 {
32 "PEBS": "2", 32 "PEBS": "2",
33 "EventCode": "0xCD",
34 "Counter": "3",
35 "UMask": "0x2",
36 "EventName": "MEM_TRANS_RETIRED.PRECISE_STORE",
37 "SampleAfterValue": "2000003",
38 "BriefDescription": "Sample stores and collect precise store operation via PEBS record. PMC3 only.",
39 "PRECISE_STORE": "1",
40 "TakenAlone": "1",
41 "CounterHTOff": "3"
42 },
43 {
44 "PEBS": "2",
45 "PublicDescription": "Loads with latency value being above 4.", 33 "PublicDescription": "Loads with latency value being above 4.",
46 "EventCode": "0xCD", 34 "EventCode": "0xCD",
47 "MSRValue": "0x4", 35 "MSRValue": "0x4",
@@ -153,6 +141,18 @@
153 "CounterHTOff": "3" 141 "CounterHTOff": "3"
154 }, 142 },
155 { 143 {
144 "PEBS": "2",
145 "EventCode": "0xCD",
146 "Counter": "3",
147 "UMask": "0x2",
148 "EventName": "MEM_TRANS_RETIRED.PRECISE_STORE",
149 "SampleAfterValue": "2000003",
150 "BriefDescription": "Sample stores and collect precise store operation via PEBS record. PMC3 only.",
151 "PRECISE_STORE": "1",
152 "TakenAlone": "1",
153 "CounterHTOff": "3"
154 },
155 {
156 "EventCode": "0xB7, 0xBB", 156 "EventCode": "0xB7, 0xBB",
157 "MSRValue": "0x3fffc00244", 157 "MSRValue": "0x3fffc00244",
158 "Counter": "0,1,2,3", 158 "Counter": "0,1,2,3",
diff --git a/tools/perf/pmu-events/arch/x86/ivytown/other.json b/tools/perf/pmu-events/arch/x86/ivytown/other.json
index 9c2dd0511a32..4eb83ee40412 100644
--- a/tools/perf/pmu-events/arch/x86/ivytown/other.json
+++ b/tools/perf/pmu-events/arch/x86/ivytown/other.json
@@ -10,16 +10,6 @@
10 "CounterHTOff": "0,1,2,3,4,5,6,7" 10 "CounterHTOff": "0,1,2,3,4,5,6,7"
11 }, 11 },
12 { 12 {
13 "PublicDescription": "Unhalted core cycles when the thread is not in ring 0.",
14 "EventCode": "0x5C",
15 "Counter": "0,1,2,3",
16 "UMask": "0x2",
17 "EventName": "CPL_CYCLES.RING123",
18 "SampleAfterValue": "2000003",
19 "BriefDescription": "Unhalted core cycles when thread is in rings 1, 2, or 3",
20 "CounterHTOff": "0,1,2,3,4,5,6,7"
21 },
22 {
23 "PublicDescription": "Number of intervals between processor halts while thread is in ring 0.", 13 "PublicDescription": "Number of intervals between processor halts while thread is in ring 0.",
24 "EventCode": "0x5C", 14 "EventCode": "0x5C",
25 "Counter": "0,1,2,3", 15 "Counter": "0,1,2,3",
@@ -32,6 +22,16 @@
32 "CounterHTOff": "0,1,2,3,4,5,6,7" 22 "CounterHTOff": "0,1,2,3,4,5,6,7"
33 }, 23 },
34 { 24 {
25 "PublicDescription": "Unhalted core cycles when the thread is not in ring 0.",
26 "EventCode": "0x5C",
27 "Counter": "0,1,2,3",
28 "UMask": "0x2",
29 "EventName": "CPL_CYCLES.RING123",
30 "SampleAfterValue": "2000003",
31 "BriefDescription": "Unhalted core cycles when thread is in rings 1, 2, or 3",
32 "CounterHTOff": "0,1,2,3,4,5,6,7"
33 },
34 {
35 "PublicDescription": "Cycles in which the L1D and L2 are locked, due to a UC lock or split lock.", 35 "PublicDescription": "Cycles in which the L1D and L2 are locked, due to a UC lock or split lock.",
36 "EventCode": "0x63", 36 "EventCode": "0x63",
37 "Counter": "0,1,2,3", 37 "Counter": "0,1,2,3",
diff --git a/tools/perf/pmu-events/arch/x86/ivytown/pipeline.json b/tools/perf/pmu-events/arch/x86/ivytown/pipeline.json
index 2145c28193f7..0afbfd95ea30 100644
--- a/tools/perf/pmu-events/arch/x86/ivytown/pipeline.json
+++ b/tools/perf/pmu-events/arch/x86/ivytown/pipeline.json
@@ -1,30 +1,41 @@
1[ 1[
2 { 2 {
3 "EventCode": "0x00", 3 "EventCode": "0x00",
4 "Counter": "Fixed counter 1", 4 "Counter": "Fixed counter 0",
5 "UMask": "0x1", 5 "UMask": "0x1",
6 "EventName": "INST_RETIRED.ANY", 6 "EventName": "INST_RETIRED.ANY",
7 "SampleAfterValue": "2000003", 7 "SampleAfterValue": "2000003",
8 "BriefDescription": "Instructions retired from execution.", 8 "BriefDescription": "Instructions retired from execution.",
9 "CounterHTOff": "Fixed counter 1" 9 "CounterHTOff": "Fixed counter 0"
10 }, 10 },
11 { 11 {
12 "EventCode": "0x00", 12 "EventCode": "0x00",
13 "Counter": "Fixed counter 2", 13 "Counter": "Fixed counter 1",
14 "UMask": "0x2", 14 "UMask": "0x2",
15 "EventName": "CPU_CLK_UNHALTED.THREAD", 15 "EventName": "CPU_CLK_UNHALTED.THREAD",
16 "SampleAfterValue": "2000003", 16 "SampleAfterValue": "2000003",
17 "BriefDescription": "Core cycles when the thread is not in halt state.", 17 "BriefDescription": "Core cycles when the thread is not in halt state.",
18 "CounterHTOff": "Fixed counter 2" 18 "CounterHTOff": "Fixed counter 1"
19 }, 19 },
20 { 20 {
21 "PublicDescription": "Core cycles when at least one thread on the physical core is not in halt state.",
21 "EventCode": "0x00", 22 "EventCode": "0x00",
22 "Counter": "Fixed counter 3", 23 "Counter": "Fixed counter 1",
24 "UMask": "0x2",
25 "AnyThread": "1",
26 "EventName": "CPU_CLK_UNHALTED.THREAD_ANY",
27 "SampleAfterValue": "2000003",
28 "BriefDescription": "Core cycles when at least one thread on the physical core is not in halt state",
29 "CounterHTOff": "Fixed counter 1"
30 },
31 {
32 "EventCode": "0x00",
33 "Counter": "Fixed counter 2",
23 "UMask": "0x3", 34 "UMask": "0x3",
24 "EventName": "CPU_CLK_UNHALTED.REF_TSC", 35 "EventName": "CPU_CLK_UNHALTED.REF_TSC",
25 "SampleAfterValue": "2000003", 36 "SampleAfterValue": "2000003",
26 "BriefDescription": "Reference cycles when the core is not in halt state.", 37 "BriefDescription": "Reference cycles when the core is not in halt state.",
27 "CounterHTOff": "Fixed counter 3" 38 "CounterHTOff": "Fixed counter 2"
28 }, 39 },
29 { 40 {
30 "PublicDescription": "Loads blocked by overlapping with store buffer that cannot be forwarded.", 41 "PublicDescription": "Loads blocked by overlapping with store buffer that cannot be forwarded.",
@@ -78,6 +89,17 @@
78 "CounterHTOff": "0,1,2,3,4,5,6,7" 89 "CounterHTOff": "0,1,2,3,4,5,6,7"
79 }, 90 },
80 { 91 {
92 "EventCode": "0x0D",
93 "Counter": "0,1,2,3",
94 "UMask": "0x3",
95 "AnyThread": "1",
96 "EventName": "INT_MISC.RECOVERY_CYCLES_ANY",
97 "SampleAfterValue": "2000003",
98 "BriefDescription": "Core cycles the allocator was stalled due to recovery from earlier clear event for any thread running on the physical core (e.g. misprediction or memory nuke).",
99 "CounterMask": "1",
100 "CounterHTOff": "0,1,2,3,4,5,6,7"
101 },
102 {
81 "PublicDescription": "Increments each cycle the # of Uops issued by the RAT to RS. Set Cmask = 1, Inv = 1, Any= 1to count stalled cycles of this core.", 103 "PublicDescription": "Increments each cycle the # of Uops issued by the RAT to RS. Set Cmask = 1, Inv = 1, Any= 1to count stalled cycles of this core.",
82 "EventCode": "0x0E", 104 "EventCode": "0x0E",
83 "Counter": "0,1,2,3", 105 "Counter": "0,1,2,3",
@@ -175,6 +197,17 @@
175 "CounterHTOff": "0,1,2,3,4,5,6,7" 197 "CounterHTOff": "0,1,2,3,4,5,6,7"
176 }, 198 },
177 { 199 {
200 "PublicDescription": "Core cycles when at least one thread on the physical core is not in halt state.",
201 "EventCode": "0x3C",
202 "Counter": "0,1,2,3",
203 "UMask": "0x0",
204 "AnyThread": "1",
205 "EventName": "CPU_CLK_UNHALTED.THREAD_P_ANY",
206 "SampleAfterValue": "2000003",
207 "BriefDescription": "Core cycles when at least one thread on the physical core is not in halt state",
208 "CounterHTOff": "0,1,2,3,4,5,6,7"
209 },
210 {
178 "PublicDescription": "Increments at the frequency of XCLK (100 MHz) when not halted.", 211 "PublicDescription": "Increments at the frequency of XCLK (100 MHz) when not halted.",
179 "EventCode": "0x3C", 212 "EventCode": "0x3C",
180 "Counter": "0,1,2,3", 213 "Counter": "0,1,2,3",
@@ -187,6 +220,36 @@
187 { 220 {
188 "EventCode": "0x3C", 221 "EventCode": "0x3C",
189 "Counter": "0,1,2,3", 222 "Counter": "0,1,2,3",
223 "UMask": "0x1",
224 "AnyThread": "1",
225 "EventName": "CPU_CLK_THREAD_UNHALTED.REF_XCLK_ANY",
226 "SampleAfterValue": "2000003",
227 "BriefDescription": "Reference cycles when the at least one thread on the physical core is unhalted. (counts at 100 MHz rate)",
228 "CounterHTOff": "0,1,2,3,4,5,6,7"
229 },
230 {
231 "PublicDescription": "Reference cycles when the thread is unhalted. (counts at 100 MHz rate)",
232 "EventCode": "0x3C",
233 "Counter": "0,1,2,3",
234 "UMask": "0x1",
235 "EventName": "CPU_CLK_UNHALTED.REF_XCLK",
236 "SampleAfterValue": "2000003",
237 "BriefDescription": "Reference cycles when the thread is unhalted (counts at 100 MHz rate)",
238 "CounterHTOff": "0,1,2,3,4,5,6,7"
239 },
240 {
241 "EventCode": "0x3C",
242 "Counter": "0,1,2,3",
243 "UMask": "0x1",
244 "AnyThread": "1",
245 "EventName": "CPU_CLK_UNHALTED.REF_XCLK_ANY",
246 "SampleAfterValue": "2000003",
247 "BriefDescription": "Reference cycles when the at least one thread on the physical core is unhalted. (counts at 100 MHz rate)",
248 "CounterHTOff": "0,1,2,3,4,5,6,7"
249 },
250 {
251 "EventCode": "0x3C",
252 "Counter": "0,1,2,3",
190 "UMask": "0x2", 253 "UMask": "0x2",
191 "EventName": "CPU_CLK_THREAD_UNHALTED.ONE_THREAD_ACTIVE", 254 "EventName": "CPU_CLK_THREAD_UNHALTED.ONE_THREAD_ACTIVE",
192 "SampleAfterValue": "2000003", 255 "SampleAfterValue": "2000003",
@@ -194,6 +257,15 @@
194 "CounterHTOff": "0,1,2,3" 257 "CounterHTOff": "0,1,2,3"
195 }, 258 },
196 { 259 {
260 "EventCode": "0x3C",
261 "Counter": "0,1,2,3",
262 "UMask": "0x2",
263 "EventName": "CPU_CLK_UNHALTED.ONE_THREAD_ACTIVE",
264 "SampleAfterValue": "2000003",
265 "BriefDescription": "Count XClk pulses when this thread is unhalted and the other thread is halted.",
266 "CounterHTOff": "0,1,2,3,4,5,6,7"
267 },
268 {
197 "PublicDescription": "Non-SW-prefetch load dispatches that hit fill buffer allocated for S/W prefetch.", 269 "PublicDescription": "Non-SW-prefetch load dispatches that hit fill buffer allocated for S/W prefetch.",
198 "EventCode": "0x4C", 270 "EventCode": "0x4C",
199 "Counter": "0,1,2,3", 271 "Counter": "0,1,2,3",
@@ -216,37 +288,37 @@
216 { 288 {
217 "EventCode": "0x58", 289 "EventCode": "0x58",
218 "Counter": "0,1,2,3", 290 "Counter": "0,1,2,3",
219 "UMask": "0x4", 291 "UMask": "0x1",
220 "EventName": "MOVE_ELIMINATION.INT_NOT_ELIMINATED", 292 "EventName": "MOVE_ELIMINATION.INT_ELIMINATED",
221 "SampleAfterValue": "1000003", 293 "SampleAfterValue": "1000003",
222 "BriefDescription": "Number of integer Move Elimination candidate uops that were not eliminated.", 294 "BriefDescription": "Number of integer Move Elimination candidate uops that were eliminated.",
223 "CounterHTOff": "0,1,2,3,4,5,6,7" 295 "CounterHTOff": "0,1,2,3,4,5,6,7"
224 }, 296 },
225 { 297 {
226 "EventCode": "0x58", 298 "EventCode": "0x58",
227 "Counter": "0,1,2,3", 299 "Counter": "0,1,2,3",
228 "UMask": "0x8", 300 "UMask": "0x2",
229 "EventName": "MOVE_ELIMINATION.SIMD_NOT_ELIMINATED", 301 "EventName": "MOVE_ELIMINATION.SIMD_ELIMINATED",
230 "SampleAfterValue": "1000003", 302 "SampleAfterValue": "1000003",
231 "BriefDescription": "Number of SIMD Move Elimination candidate uops that were not eliminated.", 303 "BriefDescription": "Number of SIMD Move Elimination candidate uops that were eliminated.",
232 "CounterHTOff": "0,1,2,3,4,5,6,7" 304 "CounterHTOff": "0,1,2,3,4,5,6,7"
233 }, 305 },
234 { 306 {
235 "EventCode": "0x58", 307 "EventCode": "0x58",
236 "Counter": "0,1,2,3", 308 "Counter": "0,1,2,3",
237 "UMask": "0x1", 309 "UMask": "0x4",
238 "EventName": "MOVE_ELIMINATION.INT_ELIMINATED", 310 "EventName": "MOVE_ELIMINATION.INT_NOT_ELIMINATED",
239 "SampleAfterValue": "1000003", 311 "SampleAfterValue": "1000003",
240 "BriefDescription": "Number of integer Move Elimination candidate uops that were eliminated.", 312 "BriefDescription": "Number of integer Move Elimination candidate uops that were not eliminated.",
241 "CounterHTOff": "0,1,2,3,4,5,6,7" 313 "CounterHTOff": "0,1,2,3,4,5,6,7"
242 }, 314 },
243 { 315 {
244 "EventCode": "0x58", 316 "EventCode": "0x58",
245 "Counter": "0,1,2,3", 317 "Counter": "0,1,2,3",
246 "UMask": "0x2", 318 "UMask": "0x8",
247 "EventName": "MOVE_ELIMINATION.SIMD_ELIMINATED", 319 "EventName": "MOVE_ELIMINATION.SIMD_NOT_ELIMINATED",
248 "SampleAfterValue": "1000003", 320 "SampleAfterValue": "1000003",
249 "BriefDescription": "Number of SIMD Move Elimination candidate uops that were eliminated.", 321 "BriefDescription": "Number of SIMD Move Elimination candidate uops that were not eliminated.",
250 "CounterHTOff": "0,1,2,3,4,5,6,7" 322 "CounterHTOff": "0,1,2,3,4,5,6,7"
251 }, 323 },
252 { 324 {
@@ -260,6 +332,18 @@
260 "CounterHTOff": "0,1,2,3,4,5,6,7" 332 "CounterHTOff": "0,1,2,3,4,5,6,7"
261 }, 333 },
262 { 334 {
335 "EventCode": "0x5E",
336 "Invert": "1",
337 "Counter": "0,1,2,3",
338 "UMask": "0x1",
339 "EdgeDetect": "1",
340 "EventName": "RS_EVENTS.EMPTY_END",
341 "SampleAfterValue": "200003",
342 "BriefDescription": "Counts end of periods where the Reservation Station (RS) was empty. Could be useful to precisely locate Frontend Latency Bound issues.",
343 "CounterMask": "1",
344 "CounterHTOff": "0,1,2,3,4,5,6,7"
345 },
346 {
263 "EventCode": "0x87", 347 "EventCode": "0x87",
264 "Counter": "0,1,2,3", 348 "Counter": "0,1,2,3",
265 "UMask": "0x1", 349 "UMask": "0x1",
@@ -498,118 +582,118 @@
498 "CounterHTOff": "0,1,2,3,4,5,6,7" 582 "CounterHTOff": "0,1,2,3,4,5,6,7"
499 }, 583 },
500 { 584 {
501 "PublicDescription": "Cycles which a Uop is dispatched on port 1.", 585 "PublicDescription": "Cycles per core when uops are dispatched to port 0.",
502 "EventCode": "0xA1", 586 "EventCode": "0xA1",
503 "Counter": "0,1,2,3", 587 "Counter": "0,1,2,3",
504 "UMask": "0x2", 588 "UMask": "0x1",
505 "EventName": "UOPS_DISPATCHED_PORT.PORT_1", 589 "AnyThread": "1",
590 "EventName": "UOPS_DISPATCHED_PORT.PORT_0_CORE",
506 "SampleAfterValue": "2000003", 591 "SampleAfterValue": "2000003",
507 "BriefDescription": "Cycles per thread when uops are dispatched to port 1", 592 "BriefDescription": "Cycles per core when uops are dispatched to port 0",
508 "CounterHTOff": "0,1,2,3,4,5,6,7" 593 "CounterHTOff": "0,1,2,3,4,5,6,7"
509 }, 594 },
510 { 595 {
511 "PublicDescription": "Cycles which a Uop is dispatched on port 4.", 596 "PublicDescription": "Cycles which a Uop is dispatched on port 1.",
512 "EventCode": "0xA1", 597 "EventCode": "0xA1",
513 "Counter": "0,1,2,3", 598 "Counter": "0,1,2,3",
514 "UMask": "0x40", 599 "UMask": "0x2",
515 "EventName": "UOPS_DISPATCHED_PORT.PORT_4", 600 "EventName": "UOPS_DISPATCHED_PORT.PORT_1",
516 "SampleAfterValue": "2000003", 601 "SampleAfterValue": "2000003",
517 "BriefDescription": "Cycles per thread when uops are dispatched to port 4", 602 "BriefDescription": "Cycles per thread when uops are dispatched to port 1",
518 "CounterHTOff": "0,1,2,3,4,5,6,7" 603 "CounterHTOff": "0,1,2,3,4,5,6,7"
519 }, 604 },
520 { 605 {
521 "PublicDescription": "Cycles which a Uop is dispatched on port 5.", 606 "PublicDescription": "Cycles per core when uops are dispatched to port 1.",
522 "EventCode": "0xA1", 607 "EventCode": "0xA1",
523 "Counter": "0,1,2,3", 608 "Counter": "0,1,2,3",
524 "UMask": "0x80", 609 "UMask": "0x2",
525 "EventName": "UOPS_DISPATCHED_PORT.PORT_5", 610 "AnyThread": "1",
611 "EventName": "UOPS_DISPATCHED_PORT.PORT_1_CORE",
526 "SampleAfterValue": "2000003", 612 "SampleAfterValue": "2000003",
527 "BriefDescription": "Cycles per thread when uops are dispatched to port 5", 613 "BriefDescription": "Cycles per core when uops are dispatched to port 1",
528 "CounterHTOff": "0,1,2,3,4,5,6,7" 614 "CounterHTOff": "0,1,2,3,4,5,6,7"
529 }, 615 },
530 { 616 {
531 "PublicDescription": "Cycles per core when uops are dispatched to port 0.", 617 "PublicDescription": "Cycles which a Uop is dispatched on port 2.",
532 "EventCode": "0xA1", 618 "EventCode": "0xA1",
533 "Counter": "0,1,2,3", 619 "Counter": "0,1,2,3",
534 "UMask": "0x1", 620 "UMask": "0xc",
535 "AnyThread": "1", 621 "EventName": "UOPS_DISPATCHED_PORT.PORT_2",
536 "EventName": "UOPS_DISPATCHED_PORT.PORT_0_CORE",
537 "SampleAfterValue": "2000003", 622 "SampleAfterValue": "2000003",
538 "BriefDescription": "Cycles per core when uops are dispatched to port 0", 623 "BriefDescription": "Cycles per thread when load or STA uops are dispatched to port 2",
539 "CounterHTOff": "0,1,2,3,4,5,6,7" 624 "CounterHTOff": "0,1,2,3,4,5,6,7"
540 }, 625 },
541 { 626 {
542 "PublicDescription": "Cycles per core when uops are dispatched to port 1.",
543 "EventCode": "0xA1", 627 "EventCode": "0xA1",
544 "Counter": "0,1,2,3", 628 "Counter": "0,1,2,3",
545 "UMask": "0x2", 629 "UMask": "0xc",
546 "AnyThread": "1", 630 "AnyThread": "1",
547 "EventName": "UOPS_DISPATCHED_PORT.PORT_1_CORE", 631 "EventName": "UOPS_DISPATCHED_PORT.PORT_2_CORE",
548 "SampleAfterValue": "2000003", 632 "SampleAfterValue": "2000003",
549 "BriefDescription": "Cycles per core when uops are dispatched to port 1", 633 "BriefDescription": "Uops dispatched to port 2, loads and stores per core (speculative and retired).",
550 "CounterHTOff": "0,1,2,3,4,5,6,7" 634 "CounterHTOff": "0,1,2,3,4,5,6,7"
551 }, 635 },
552 { 636 {
553 "PublicDescription": "Cycles per core when uops are dispatched to port 4.", 637 "PublicDescription": "Cycles which a Uop is dispatched on port 3.",
554 "EventCode": "0xA1", 638 "EventCode": "0xA1",
555 "Counter": "0,1,2,3", 639 "Counter": "0,1,2,3",
556 "UMask": "0x40", 640 "UMask": "0x30",
557 "AnyThread": "1", 641 "EventName": "UOPS_DISPATCHED_PORT.PORT_3",
558 "EventName": "UOPS_DISPATCHED_PORT.PORT_4_CORE",
559 "SampleAfterValue": "2000003", 642 "SampleAfterValue": "2000003",
560 "BriefDescription": "Cycles per core when uops are dispatched to port 4", 643 "BriefDescription": "Cycles per thread when load or STA uops are dispatched to port 3",
561 "CounterHTOff": "0,1,2,3,4,5,6,7" 644 "CounterHTOff": "0,1,2,3,4,5,6,7"
562 }, 645 },
563 { 646 {
564 "PublicDescription": "Cycles per core when uops are dispatched to port 5.", 647 "PublicDescription": "Cycles per core when load or STA uops are dispatched to port 3.",
565 "EventCode": "0xA1", 648 "EventCode": "0xA1",
566 "Counter": "0,1,2,3", 649 "Counter": "0,1,2,3",
567 "UMask": "0x80", 650 "UMask": "0x30",
568 "AnyThread": "1", 651 "AnyThread": "1",
569 "EventName": "UOPS_DISPATCHED_PORT.PORT_5_CORE", 652 "EventName": "UOPS_DISPATCHED_PORT.PORT_3_CORE",
570 "SampleAfterValue": "2000003", 653 "SampleAfterValue": "2000003",
571 "BriefDescription": "Cycles per core when uops are dispatched to port 5", 654 "BriefDescription": "Cycles per core when load or STA uops are dispatched to port 3",
572 "CounterHTOff": "0,1,2,3,4,5,6,7" 655 "CounterHTOff": "0,1,2,3,4,5,6,7"
573 }, 656 },
574 { 657 {
575 "PublicDescription": "Cycles which a Uop is dispatched on port 2.", 658 "PublicDescription": "Cycles which a Uop is dispatched on port 4.",
576 "EventCode": "0xA1", 659 "EventCode": "0xA1",
577 "Counter": "0,1,2,3", 660 "Counter": "0,1,2,3",
578 "UMask": "0xc", 661 "UMask": "0x40",
579 "EventName": "UOPS_DISPATCHED_PORT.PORT_2", 662 "EventName": "UOPS_DISPATCHED_PORT.PORT_4",
580 "SampleAfterValue": "2000003", 663 "SampleAfterValue": "2000003",
581 "BriefDescription": "Cycles per thread when load or STA uops are dispatched to port 2", 664 "BriefDescription": "Cycles per thread when uops are dispatched to port 4",
582 "CounterHTOff": "0,1,2,3,4,5,6,7" 665 "CounterHTOff": "0,1,2,3,4,5,6,7"
583 }, 666 },
584 { 667 {
585 "PublicDescription": "Cycles which a Uop is dispatched on port 3.", 668 "PublicDescription": "Cycles per core when uops are dispatched to port 4.",
586 "EventCode": "0xA1", 669 "EventCode": "0xA1",
587 "Counter": "0,1,2,3", 670 "Counter": "0,1,2,3",
588 "UMask": "0x30", 671 "UMask": "0x40",
589 "EventName": "UOPS_DISPATCHED_PORT.PORT_3", 672 "AnyThread": "1",
673 "EventName": "UOPS_DISPATCHED_PORT.PORT_4_CORE",
590 "SampleAfterValue": "2000003", 674 "SampleAfterValue": "2000003",
591 "BriefDescription": "Cycles per thread when load or STA uops are dispatched to port 3", 675 "BriefDescription": "Cycles per core when uops are dispatched to port 4",
592 "CounterHTOff": "0,1,2,3,4,5,6,7" 676 "CounterHTOff": "0,1,2,3,4,5,6,7"
593 }, 677 },
594 { 678 {
679 "PublicDescription": "Cycles which a Uop is dispatched on port 5.",
595 "EventCode": "0xA1", 680 "EventCode": "0xA1",
596 "Counter": "0,1,2,3", 681 "Counter": "0,1,2,3",
597 "UMask": "0xc", 682 "UMask": "0x80",
598 "AnyThread": "1", 683 "EventName": "UOPS_DISPATCHED_PORT.PORT_5",
599 "EventName": "UOPS_DISPATCHED_PORT.PORT_2_CORE",
600 "SampleAfterValue": "2000003", 684 "SampleAfterValue": "2000003",
601 "BriefDescription": "Uops dispatched to port 2, loads and stores per core (speculative and retired).", 685 "BriefDescription": "Cycles per thread when uops are dispatched to port 5",
602 "CounterHTOff": "0,1,2,3,4,5,6,7" 686 "CounterHTOff": "0,1,2,3,4,5,6,7"
603 }, 687 },
604 { 688 {
605 "PublicDescription": "Cycles per core when load or STA uops are dispatched to port 3.", 689 "PublicDescription": "Cycles per core when uops are dispatched to port 5.",
606 "EventCode": "0xA1", 690 "EventCode": "0xA1",
607 "Counter": "0,1,2,3", 691 "Counter": "0,1,2,3",
608 "UMask": "0x30", 692 "UMask": "0x80",
609 "AnyThread": "1", 693 "AnyThread": "1",
610 "EventName": "UOPS_DISPATCHED_PORT.PORT_3_CORE", 694 "EventName": "UOPS_DISPATCHED_PORT.PORT_5_CORE",
611 "SampleAfterValue": "2000003", 695 "SampleAfterValue": "2000003",
612 "BriefDescription": "Cycles per core when load or STA uops are dispatched to port 3", 696 "BriefDescription": "Cycles per core when uops are dispatched to port 5",
613 "CounterHTOff": "0,1,2,3,4,5,6,7" 697 "CounterHTOff": "0,1,2,3,4,5,6,7"
614 }, 698 },
615 { 699 {
@@ -662,15 +746,14 @@
662 "CounterHTOff": "0,1,2,3,4,5,6,7" 746 "CounterHTOff": "0,1,2,3,4,5,6,7"
663 }, 747 },
664 { 748 {
665 "PublicDescription": "Cycles with pending L1 cache miss loads. Set AnyThread to count per core.",
666 "EventCode": "0xA3", 749 "EventCode": "0xA3",
667 "Counter": "2", 750 "Counter": "0,1,2,3",
668 "UMask": "0x8", 751 "UMask": "0x1",
669 "EventName": "CYCLE_ACTIVITY.CYCLES_L1D_PENDING", 752 "EventName": "CYCLE_ACTIVITY.CYCLES_L2_MISS",
670 "SampleAfterValue": "2000003", 753 "SampleAfterValue": "2000003",
671 "BriefDescription": "Cycles with pending L1 cache miss loads.", 754 "BriefDescription": "Cycles while L2 cache miss load* is outstanding.",
672 "CounterMask": "8", 755 "CounterMask": "1",
673 "CounterHTOff": "2" 756 "CounterHTOff": "0,1,2,3,4,5,6,7"
674 }, 757 },
675 { 758 {
676 "PublicDescription": "Cycles with pending memory loads. Set AnyThread to count per core.", 759 "PublicDescription": "Cycles with pending memory loads. Set AnyThread to count per core.",
@@ -684,13 +767,33 @@
684 "CounterHTOff": "0,1,2,3" 767 "CounterHTOff": "0,1,2,3"
685 }, 768 },
686 { 769 {
770 "EventCode": "0xA3",
771 "Counter": "0,1,2,3",
772 "UMask": "0x2",
773 "EventName": "CYCLE_ACTIVITY.CYCLES_MEM_ANY",
774 "SampleAfterValue": "2000003",
775 "BriefDescription": "Cycles while memory subsystem has an outstanding load.",
776 "CounterMask": "2",
777 "CounterHTOff": "0,1,2,3"
778 },
779 {
687 "PublicDescription": "Total execution stalls.", 780 "PublicDescription": "Total execution stalls.",
688 "EventCode": "0xA3", 781 "EventCode": "0xA3",
689 "Counter": "0,1,2,3", 782 "Counter": "0,1,2,3",
690 "UMask": "0x4", 783 "UMask": "0x4",
691 "EventName": "CYCLE_ACTIVITY.CYCLES_NO_EXECUTE", 784 "EventName": "CYCLE_ACTIVITY.CYCLES_NO_EXECUTE",
692 "SampleAfterValue": "2000003", 785 "SampleAfterValue": "2000003",
693 "BriefDescription": "Total execution stalls", 786 "BriefDescription": "This event increments by 1 for every cycle where there was no execute for this thread.",
787 "CounterMask": "4",
788 "CounterHTOff": "0,1,2,3"
789 },
790 {
791 "EventCode": "0xA3",
792 "Counter": "0,1,2,3",
793 "UMask": "0x4",
794 "EventName": "CYCLE_ACTIVITY.STALLS_TOTAL",
795 "SampleAfterValue": "2000003",
796 "BriefDescription": "Total execution stalls.",
694 "CounterMask": "4", 797 "CounterMask": "4",
695 "CounterHTOff": "0,1,2,3" 798 "CounterHTOff": "0,1,2,3"
696 }, 799 },
@@ -708,6 +811,16 @@
708 { 811 {
709 "EventCode": "0xA3", 812 "EventCode": "0xA3",
710 "Counter": "0,1,2,3", 813 "Counter": "0,1,2,3",
814 "UMask": "0x5",
815 "EventName": "CYCLE_ACTIVITY.STALLS_L2_MISS",
816 "SampleAfterValue": "2000003",
817 "BriefDescription": "Execution stalls while L2 cache miss load* is outstanding.",
818 "CounterMask": "5",
819 "CounterHTOff": "0,1,2,3"
820 },
821 {
822 "EventCode": "0xA3",
823 "Counter": "0,1,2,3",
711 "UMask": "0x6", 824 "UMask": "0x6",
712 "EventName": "CYCLE_ACTIVITY.STALLS_LDM_PENDING", 825 "EventName": "CYCLE_ACTIVITY.STALLS_LDM_PENDING",
713 "SampleAfterValue": "2000003", 826 "SampleAfterValue": "2000003",
@@ -716,6 +829,37 @@
716 "CounterHTOff": "0,1,2,3" 829 "CounterHTOff": "0,1,2,3"
717 }, 830 },
718 { 831 {
832 "EventCode": "0xA3",
833 "Counter": "0,1,2,3",
834 "UMask": "0x6",
835 "EventName": "CYCLE_ACTIVITY.STALLS_MEM_ANY",
836 "SampleAfterValue": "2000003",
837 "BriefDescription": "Execution stalls while memory subsystem has an outstanding load.",
838 "CounterMask": "6",
839 "CounterHTOff": "0,1,2,3"
840 },
841 {
842 "PublicDescription": "Cycles with pending L1 cache miss loads. Set AnyThread to count per core.",
843 "EventCode": "0xA3",
844 "Counter": "2",
845 "UMask": "0x8",
846 "EventName": "CYCLE_ACTIVITY.CYCLES_L1D_PENDING",
847 "SampleAfterValue": "2000003",
848 "BriefDescription": "Cycles with pending L1 cache miss loads.",
849 "CounterMask": "8",
850 "CounterHTOff": "2"
851 },
852 {
853 "EventCode": "0xA3",
854 "Counter": "2",
855 "UMask": "0x8",
856 "EventName": "CYCLE_ACTIVITY.CYCLES_L1D_MISS",
857 "SampleAfterValue": "2000003",
858 "BriefDescription": "Cycles while L1 cache miss demand load is outstanding.",
859 "CounterMask": "8",
860 "CounterHTOff": "2"
861 },
862 {
719 "PublicDescription": "Execution stalls due to L1 data cache miss loads. Set Cmask=0CH.", 863 "PublicDescription": "Execution stalls due to L1 data cache miss loads. Set Cmask=0CH.",
720 "EventCode": "0xA3", 864 "EventCode": "0xA3",
721 "Counter": "2", 865 "Counter": "2",
@@ -727,6 +871,16 @@
727 "CounterHTOff": "2" 871 "CounterHTOff": "2"
728 }, 872 },
729 { 873 {
874 "EventCode": "0xA3",
875 "Counter": "2",
876 "UMask": "0xc",
877 "EventName": "CYCLE_ACTIVITY.STALLS_L1D_MISS",
878 "SampleAfterValue": "2000003",
879 "BriefDescription": "Execution stalls while L1 cache miss demand load is outstanding.",
880 "CounterMask": "12",
881 "CounterHTOff": "2"
882 },
883 {
730 "EventCode": "0xA8", 884 "EventCode": "0xA8",
731 "Counter": "0,1,2,3", 885 "Counter": "0,1,2,3",
732 "UMask": "0x1", 886 "UMask": "0x1",
@@ -747,6 +901,17 @@
747 "CounterHTOff": "0,1,2,3,4,5,6,7" 901 "CounterHTOff": "0,1,2,3,4,5,6,7"
748 }, 902 },
749 { 903 {
904 "PublicDescription": "Cycles 4 Uops delivered by the LSD, but didn't come from the decoder.",
905 "EventCode": "0xA8",
906 "Counter": "0,1,2,3",
907 "UMask": "0x1",
908 "EventName": "LSD.CYCLES_4_UOPS",
909 "SampleAfterValue": "2000003",
910 "BriefDescription": "Cycles 4 Uops delivered by the LSD, but didn't come from the decoder",
911 "CounterMask": "4",
912 "CounterHTOff": "0,1,2,3,4,5,6,7"
913 },
914 {
750 "PublicDescription": "Counts total number of uops to be executed per-thread each cycle. Set Cmask = 1, INV =1 to count stall cycles.", 915 "PublicDescription": "Counts total number of uops to be executed per-thread each cycle. Set Cmask = 1, INV =1 to count stall cycles.",
751 "EventCode": "0xB1", 916 "EventCode": "0xB1",
752 "Counter": "0,1,2,3", 917 "Counter": "0,1,2,3",
@@ -757,6 +922,61 @@
757 "CounterHTOff": "0,1,2,3,4,5,6,7" 922 "CounterHTOff": "0,1,2,3,4,5,6,7"
758 }, 923 },
759 { 924 {
925 "EventCode": "0xB1",
926 "Invert": "1",
927 "Counter": "0,1,2,3",
928 "UMask": "0x1",
929 "EventName": "UOPS_EXECUTED.STALL_CYCLES",
930 "SampleAfterValue": "2000003",
931 "BriefDescription": "Counts number of cycles no uops were dispatched to be executed on this thread.",
932 "CounterMask": "1",
933 "CounterHTOff": "0,1,2,3"
934 },
935 {
936 "PublicDescription": "Cycles where at least 1 uop was executed per-thread.",
937 "EventCode": "0xB1",
938 "Counter": "0,1,2,3",
939 "UMask": "0x1",
940 "EventName": "UOPS_EXECUTED.CYCLES_GE_1_UOP_EXEC",
941 "SampleAfterValue": "2000003",
942 "BriefDescription": "Cycles where at least 1 uop was executed per-thread",
943 "CounterMask": "1",
944 "CounterHTOff": "0,1,2,3,4,5,6,7"
945 },
946 {
947 "PublicDescription": "Cycles where at least 2 uops were executed per-thread.",
948 "EventCode": "0xB1",
949 "Counter": "0,1,2,3",
950 "UMask": "0x1",
951 "EventName": "UOPS_EXECUTED.CYCLES_GE_2_UOPS_EXEC",
952 "SampleAfterValue": "2000003",
953 "BriefDescription": "Cycles where at least 2 uops were executed per-thread",
954 "CounterMask": "2",
955 "CounterHTOff": "0,1,2,3,4,5,6,7"
956 },
957 {
958 "PublicDescription": "Cycles where at least 3 uops were executed per-thread.",
959 "EventCode": "0xB1",
960 "Counter": "0,1,2,3",
961 "UMask": "0x1",
962 "EventName": "UOPS_EXECUTED.CYCLES_GE_3_UOPS_EXEC",
963 "SampleAfterValue": "2000003",
964 "BriefDescription": "Cycles where at least 3 uops were executed per-thread",
965 "CounterMask": "3",
966 "CounterHTOff": "0,1,2,3,4,5,6,7"
967 },
968 {
969 "PublicDescription": "Cycles where at least 4 uops were executed per-thread.",
970 "EventCode": "0xB1",
971 "Counter": "0,1,2,3",
972 "UMask": "0x1",
973 "EventName": "UOPS_EXECUTED.CYCLES_GE_4_UOPS_EXEC",
974 "SampleAfterValue": "2000003",
975 "BriefDescription": "Cycles where at least 4 uops were executed per-thread",
976 "CounterMask": "4",
977 "CounterHTOff": "0,1,2,3,4,5,6,7"
978 },
979 {
760 "PublicDescription": "Counts total number of uops to be executed per-core each cycle.", 980 "PublicDescription": "Counts total number of uops to be executed per-core each cycle.",
761 "EventCode": "0xB1", 981 "EventCode": "0xB1",
762 "Counter": "0,1,2,3", 982 "Counter": "0,1,2,3",
@@ -767,15 +987,59 @@
767 "CounterHTOff": "0,1,2,3,4,5,6,7" 987 "CounterHTOff": "0,1,2,3,4,5,6,7"
768 }, 988 },
769 { 989 {
990 "PublicDescription": "Cycles at least 1 micro-op is executed from any thread on physical core.",
770 "EventCode": "0xB1", 991 "EventCode": "0xB1",
771 "Invert": "1",
772 "Counter": "0,1,2,3", 992 "Counter": "0,1,2,3",
773 "UMask": "0x1", 993 "UMask": "0x2",
774 "EventName": "UOPS_EXECUTED.STALL_CYCLES", 994 "EventName": "UOPS_EXECUTED.CORE_CYCLES_GE_1",
775 "SampleAfterValue": "2000003", 995 "SampleAfterValue": "2000003",
776 "BriefDescription": "Counts number of cycles no uops were dispatched to be executed on this thread.", 996 "BriefDescription": "Cycles at least 1 micro-op is executed from any thread on physical core",
777 "CounterMask": "1", 997 "CounterMask": "1",
778 "CounterHTOff": "0,1,2,3" 998 "CounterHTOff": "0,1,2,3,4,5,6,7"
999 },
1000 {
1001 "PublicDescription": "Cycles at least 2 micro-op is executed from any thread on physical core.",
1002 "EventCode": "0xB1",
1003 "Counter": "0,1,2,3",
1004 "UMask": "0x2",
1005 "EventName": "UOPS_EXECUTED.CORE_CYCLES_GE_2",
1006 "SampleAfterValue": "2000003",
1007 "BriefDescription": "Cycles at least 2 micro-op is executed from any thread on physical core",
1008 "CounterMask": "2",
1009 "CounterHTOff": "0,1,2,3,4,5,6,7"
1010 },
1011 {
1012 "PublicDescription": "Cycles at least 3 micro-op is executed from any thread on physical core.",
1013 "EventCode": "0xB1",
1014 "Counter": "0,1,2,3",
1015 "UMask": "0x2",
1016 "EventName": "UOPS_EXECUTED.CORE_CYCLES_GE_3",
1017 "SampleAfterValue": "2000003",
1018 "BriefDescription": "Cycles at least 3 micro-op is executed from any thread on physical core",
1019 "CounterMask": "3",
1020 "CounterHTOff": "0,1,2,3,4,5,6,7"
1021 },
1022 {
1023 "PublicDescription": "Cycles at least 4 micro-op is executed from any thread on physical core.",
1024 "EventCode": "0xB1",
1025 "Counter": "0,1,2,3",
1026 "UMask": "0x2",
1027 "EventName": "UOPS_EXECUTED.CORE_CYCLES_GE_4",
1028 "SampleAfterValue": "2000003",
1029 "BriefDescription": "Cycles at least 4 micro-op is executed from any thread on physical core",
1030 "CounterMask": "4",
1031 "CounterHTOff": "0,1,2,3,4,5,6,7"
1032 },
1033 {
1034 "PublicDescription": "Cycles with no micro-ops executed from any thread on physical core.",
1035 "EventCode": "0xB1",
1036 "Invert": "1",
1037 "Counter": "0,1,2,3",
1038 "UMask": "0x2",
1039 "EventName": "UOPS_EXECUTED.CORE_CYCLES_NONE",
1040 "SampleAfterValue": "2000003",
1041 "BriefDescription": "Cycles with no micro-ops executed from any thread on physical core",
1042 "CounterHTOff": "0,1,2,3,4,5,6,7"
779 }, 1043 },
780 { 1044 {
781 "PublicDescription": "Number of instructions at retirement.", 1045 "PublicDescription": "Number of instructions at retirement.",
@@ -809,24 +1073,12 @@
809 }, 1073 },
810 { 1074 {
811 "PEBS": "1", 1075 "PEBS": "1",
812 "PublicDescription": "Counts the number of micro-ops retired, Use cmask=1 and invert to count active cycles or stalled cycles.",
813 "EventCode": "0xC2", 1076 "EventCode": "0xC2",
814 "Counter": "0,1,2,3", 1077 "Counter": "0,1,2,3",
815 "UMask": "0x1", 1078 "UMask": "0x1",
816 "EventName": "UOPS_RETIRED.ALL", 1079 "EventName": "UOPS_RETIRED.ALL",
817 "SampleAfterValue": "2000003", 1080 "SampleAfterValue": "2000003",
818 "BriefDescription": "Actually retired uops. ", 1081 "BriefDescription": "Retired uops.",
819 "CounterHTOff": "0,1,2,3,4,5,6,7"
820 },
821 {
822 "PEBS": "1",
823 "PublicDescription": "Counts the number of retirement slots used each cycle.",
824 "EventCode": "0xC2",
825 "Counter": "0,1,2,3",
826 "UMask": "0x2",
827 "EventName": "UOPS_RETIRED.RETIRE_SLOTS",
828 "SampleAfterValue": "2000003",
829 "BriefDescription": "Retirement slots used. ",
830 "CounterHTOff": "0,1,2,3,4,5,6,7" 1082 "CounterHTOff": "0,1,2,3,4,5,6,7"
831 }, 1083 },
832 { 1084 {
@@ -864,6 +1116,27 @@
864 "CounterHTOff": "0,1,2,3" 1116 "CounterHTOff": "0,1,2,3"
865 }, 1117 },
866 { 1118 {
1119 "PEBS": "1",
1120 "EventCode": "0xC2",
1121 "Counter": "0,1,2,3",
1122 "UMask": "0x2",
1123 "EventName": "UOPS_RETIRED.RETIRE_SLOTS",
1124 "SampleAfterValue": "2000003",
1125 "BriefDescription": "Retirement slots used.",
1126 "CounterHTOff": "0,1,2,3,4,5,6,7"
1127 },
1128 {
1129 "EventCode": "0xC3",
1130 "Counter": "0,1,2,3",
1131 "UMask": "0x1",
1132 "EdgeDetect": "1",
1133 "EventName": "MACHINE_CLEARS.COUNT",
1134 "SampleAfterValue": "100003",
1135 "BriefDescription": "Number of machine clears (nukes) of any type.",
1136 "CounterMask": "1",
1137 "CounterHTOff": "0,1,2,3,4,5,6,7"
1138 },
1139 {
867 "PublicDescription": "Number of self-modifying-code machine clears detected.", 1140 "PublicDescription": "Number of self-modifying-code machine clears detected.",
868 "EventCode": "0xC3", 1141 "EventCode": "0xC3",
869 "Counter": "0,1,2,3", 1142 "Counter": "0,1,2,3",
@@ -880,50 +1153,67 @@
880 "UMask": "0x20", 1153 "UMask": "0x20",
881 "EventName": "MACHINE_CLEARS.MASKMOV", 1154 "EventName": "MACHINE_CLEARS.MASKMOV",
882 "SampleAfterValue": "100003", 1155 "SampleAfterValue": "100003",
883 "BriefDescription": "This event counts the number of executed Intel AVX masked load operations that refer to an illegal address range with the mask bits set to 0. ", 1156 "BriefDescription": "This event counts the number of executed Intel AVX masked load operations that refer to an illegal address range with the mask bits set to 0.",
1157 "CounterHTOff": "0,1,2,3,4,5,6,7"
1158 },
1159 {
1160 "PublicDescription": "Branch instructions at retirement.",
1161 "EventCode": "0xC4",
1162 "Counter": "0,1,2,3",
1163 "UMask": "0x0",
1164 "EventName": "BR_INST_RETIRED.ALL_BRANCHES",
1165 "SampleAfterValue": "400009",
1166 "BriefDescription": "All (macro) branch instructions retired.",
884 "CounterHTOff": "0,1,2,3,4,5,6,7" 1167 "CounterHTOff": "0,1,2,3,4,5,6,7"
885 }, 1168 },
886 { 1169 {
887 "PEBS": "1", 1170 "PEBS": "1",
888 "PublicDescription": "Counts the number of conditional branch instructions retired.",
889 "EventCode": "0xC4", 1171 "EventCode": "0xC4",
890 "Counter": "0,1,2,3", 1172 "Counter": "0,1,2,3",
891 "UMask": "0x1", 1173 "UMask": "0x1",
892 "EventName": "BR_INST_RETIRED.CONDITIONAL", 1174 "EventName": "BR_INST_RETIRED.CONDITIONAL",
893 "SampleAfterValue": "400009", 1175 "SampleAfterValue": "400009",
894 "BriefDescription": "Conditional branch instructions retired. ", 1176 "BriefDescription": "Conditional branch instructions retired.",
895 "CounterHTOff": "0,1,2,3,4,5,6,7" 1177 "CounterHTOff": "0,1,2,3,4,5,6,7"
896 }, 1178 },
897 { 1179 {
898 "PEBS": "1", 1180 "PEBS": "1",
899 "PublicDescription": "Direct and indirect near call instructions retired.",
900 "EventCode": "0xC4", 1181 "EventCode": "0xC4",
901 "Counter": "0,1,2,3", 1182 "Counter": "0,1,2,3",
902 "UMask": "0x2", 1183 "UMask": "0x2",
903 "EventName": "BR_INST_RETIRED.NEAR_CALL", 1184 "EventName": "BR_INST_RETIRED.NEAR_CALL",
904 "SampleAfterValue": "100007", 1185 "SampleAfterValue": "100007",
905 "BriefDescription": "Direct and indirect near call instructions retired. ", 1186 "BriefDescription": "Direct and indirect near call instructions retired.",
906 "CounterHTOff": "0,1,2,3,4,5,6,7" 1187 "CounterHTOff": "0,1,2,3,4,5,6,7"
907 }, 1188 },
908 { 1189 {
909 "PublicDescription": "Branch instructions at retirement.", 1190 "PEBS": "1",
910 "EventCode": "0xC4", 1191 "EventCode": "0xC4",
911 "Counter": "0,1,2,3", 1192 "Counter": "0,1,2,3",
912 "UMask": "0x0", 1193 "UMask": "0x2",
913 "EventName": "BR_INST_RETIRED.ALL_BRANCHES", 1194 "EventName": "BR_INST_RETIRED.NEAR_CALL_R3",
1195 "SampleAfterValue": "100007",
1196 "BriefDescription": "Direct and indirect macro near call instructions retired (captured in ring 3).",
1197 "CounterHTOff": "0,1,2,3,4,5,6,7"
1198 },
1199 {
1200 "PEBS": "2",
1201 "EventCode": "0xC4",
1202 "Counter": "0,1,2,3",
1203 "UMask": "0x4",
1204 "EventName": "BR_INST_RETIRED.ALL_BRANCHES_PEBS",
914 "SampleAfterValue": "400009", 1205 "SampleAfterValue": "400009",
915 "BriefDescription": "All (macro) branch instructions retired.", 1206 "BriefDescription": "All (macro) branch instructions retired.",
916 "CounterHTOff": "0,1,2,3,4,5,6,7" 1207 "CounterHTOff": "0,1,2,3"
917 }, 1208 },
918 { 1209 {
919 "PEBS": "1", 1210 "PEBS": "1",
920 "PublicDescription": "Counts the number of near return instructions retired.",
921 "EventCode": "0xC4", 1211 "EventCode": "0xC4",
922 "Counter": "0,1,2,3", 1212 "Counter": "0,1,2,3",
923 "UMask": "0x8", 1213 "UMask": "0x8",
924 "EventName": "BR_INST_RETIRED.NEAR_RETURN", 1214 "EventName": "BR_INST_RETIRED.NEAR_RETURN",
925 "SampleAfterValue": "100007", 1215 "SampleAfterValue": "100007",
926 "BriefDescription": "Return instructions retired. ", 1216 "BriefDescription": "Return instructions retired.",
927 "CounterHTOff": "0,1,2,3,4,5,6,7" 1217 "CounterHTOff": "0,1,2,3,4,5,6,7"
928 }, 1218 },
929 { 1219 {
@@ -933,18 +1223,17 @@
933 "UMask": "0x10", 1223 "UMask": "0x10",
934 "EventName": "BR_INST_RETIRED.NOT_TAKEN", 1224 "EventName": "BR_INST_RETIRED.NOT_TAKEN",
935 "SampleAfterValue": "400009", 1225 "SampleAfterValue": "400009",
936 "BriefDescription": "Not taken branch instructions retired. ", 1226 "BriefDescription": "Not taken branch instructions retired.",
937 "CounterHTOff": "0,1,2,3,4,5,6,7" 1227 "CounterHTOff": "0,1,2,3,4,5,6,7"
938 }, 1228 },
939 { 1229 {
940 "PEBS": "1", 1230 "PEBS": "1",
941 "PublicDescription": "Number of near taken branches retired.",
942 "EventCode": "0xC4", 1231 "EventCode": "0xC4",
943 "Counter": "0,1,2,3", 1232 "Counter": "0,1,2,3",
944 "UMask": "0x20", 1233 "UMask": "0x20",
945 "EventName": "BR_INST_RETIRED.NEAR_TAKEN", 1234 "EventName": "BR_INST_RETIRED.NEAR_TAKEN",
946 "SampleAfterValue": "400009", 1235 "SampleAfterValue": "400009",
947 "BriefDescription": "Taken branch instructions retired. ", 1236 "BriefDescription": "Taken branch instructions retired.",
948 "CounterHTOff": "0,1,2,3,4,5,6,7" 1237 "CounterHTOff": "0,1,2,3,4,5,6,7"
949 }, 1238 },
950 { 1239 {
@@ -954,28 +1243,7 @@
954 "UMask": "0x40", 1243 "UMask": "0x40",
955 "EventName": "BR_INST_RETIRED.FAR_BRANCH", 1244 "EventName": "BR_INST_RETIRED.FAR_BRANCH",
956 "SampleAfterValue": "100007", 1245 "SampleAfterValue": "100007",
957 "BriefDescription": "Far branch instructions retired. ", 1246 "BriefDescription": "Far branch instructions retired.",
958 "CounterHTOff": "0,1,2,3,4,5,6,7"
959 },
960 {
961 "PEBS": "2",
962 "EventCode": "0xC4",
963 "Counter": "0,1,2,3",
964 "UMask": "0x4",
965 "EventName": "BR_INST_RETIRED.ALL_BRANCHES_PEBS",
966 "SampleAfterValue": "400009",
967 "BriefDescription": "All (macro) branch instructions retired.",
968 "CounterHTOff": "0,1,2,3"
969 },
970 {
971 "PEBS": "1",
972 "PublicDescription": "Mispredicted conditional branch instructions retired.",
973 "EventCode": "0xC5",
974 "Counter": "0,1,2,3",
975 "UMask": "0x1",
976 "EventName": "BR_MISP_RETIRED.CONDITIONAL",
977 "SampleAfterValue": "400009",
978 "BriefDescription": "Mispredicted conditional branch instructions retired. ",
979 "CounterHTOff": "0,1,2,3,4,5,6,7" 1247 "CounterHTOff": "0,1,2,3,4,5,6,7"
980 }, 1248 },
981 { 1249 {
@@ -990,13 +1258,12 @@
990 }, 1258 },
991 { 1259 {
992 "PEBS": "1", 1260 "PEBS": "1",
993 "PublicDescription": "Mispredicted taken branch instructions retired.",
994 "EventCode": "0xC5", 1261 "EventCode": "0xC5",
995 "Counter": "0,1,2,3", 1262 "Counter": "0,1,2,3",
996 "UMask": "0x20", 1263 "UMask": "0x1",
997 "EventName": "BR_MISP_RETIRED.NEAR_TAKEN", 1264 "EventName": "BR_MISP_RETIRED.CONDITIONAL",
998 "SampleAfterValue": "400009", 1265 "SampleAfterValue": "400009",
999 "BriefDescription": "number of near branch instructions retired that were mispredicted and taken. ", 1266 "BriefDescription": "Mispredicted conditional branch instructions retired.",
1000 "CounterHTOff": "0,1,2,3,4,5,6,7" 1267 "CounterHTOff": "0,1,2,3,4,5,6,7"
1001 }, 1268 },
1002 { 1269 {
@@ -1010,6 +1277,16 @@
1010 "CounterHTOff": "0,1,2,3" 1277 "CounterHTOff": "0,1,2,3"
1011 }, 1278 },
1012 { 1279 {
1280 "PEBS": "1",
1281 "EventCode": "0xC5",
1282 "Counter": "0,1,2,3",
1283 "UMask": "0x20",
1284 "EventName": "BR_MISP_RETIRED.NEAR_TAKEN",
1285 "SampleAfterValue": "400009",
1286 "BriefDescription": "number of near branch instructions retired that were mispredicted and taken.",
1287 "CounterHTOff": "0,1,2,3,4,5,6,7"
1288 },
1289 {
1013 "PublicDescription": "Count cases of saving new LBR records by hardware.", 1290 "PublicDescription": "Count cases of saving new LBR records by hardware.",
1014 "EventCode": "0xCC", 1291 "EventCode": "0xCC",
1015 "Counter": "0,1,2,3", 1292 "Counter": "0,1,2,3",
@@ -1028,280 +1305,5 @@
1028 "SampleAfterValue": "100003", 1305 "SampleAfterValue": "100003",
1029 "BriefDescription": "Counts the total number when the front end is resteered, mainly when the BPU cannot provide a correct prediction and this is corrected by other branch handling mechanisms at the front end.", 1306 "BriefDescription": "Counts the total number when the front end is resteered, mainly when the BPU cannot provide a correct prediction and this is corrected by other branch handling mechanisms at the front end.",
1030 "CounterHTOff": "0,1,2,3,4,5,6,7" 1307 "CounterHTOff": "0,1,2,3,4,5,6,7"
1031 },
1032 {
1033 "PublicDescription": "Cycles where at least 1 uop was executed per-thread.",
1034 "EventCode": "0xB1",
1035 "Counter": "0,1,2,3",
1036 "UMask": "0x1",
1037 "EventName": "UOPS_EXECUTED.CYCLES_GE_1_UOP_EXEC",
1038 "SampleAfterValue": "2000003",
1039 "BriefDescription": "Cycles where at least 1 uop was executed per-thread",
1040 "CounterMask": "1",
1041 "CounterHTOff": "0,1,2,3,4,5,6,7"
1042 },
1043 {
1044 "PublicDescription": "Cycles where at least 2 uops were executed per-thread.",
1045 "EventCode": "0xB1",
1046 "Counter": "0,1,2,3",
1047 "UMask": "0x1",
1048 "EventName": "UOPS_EXECUTED.CYCLES_GE_2_UOPS_EXEC",
1049 "SampleAfterValue": "2000003",
1050 "BriefDescription": "Cycles where at least 2 uops were executed per-thread",
1051 "CounterMask": "2",
1052 "CounterHTOff": "0,1,2,3,4,5,6,7"
1053 },
1054 {
1055 "PublicDescription": "Cycles where at least 3 uops were executed per-thread.",
1056 "EventCode": "0xB1",
1057 "Counter": "0,1,2,3",
1058 "UMask": "0x1",
1059 "EventName": "UOPS_EXECUTED.CYCLES_GE_3_UOPS_EXEC",
1060 "SampleAfterValue": "2000003",
1061 "BriefDescription": "Cycles where at least 3 uops were executed per-thread",
1062 "CounterMask": "3",
1063 "CounterHTOff": "0,1,2,3,4,5,6,7"
1064 },
1065 {
1066 "PublicDescription": "Cycles where at least 4 uops were executed per-thread.",
1067 "EventCode": "0xB1",
1068 "Counter": "0,1,2,3",
1069 "UMask": "0x1",
1070 "EventName": "UOPS_EXECUTED.CYCLES_GE_4_UOPS_EXEC",
1071 "SampleAfterValue": "2000003",
1072 "BriefDescription": "Cycles where at least 4 uops were executed per-thread",
1073 "CounterMask": "4",
1074 "CounterHTOff": "0,1,2,3,4,5,6,7"
1075 },
1076 {
1077 "EventCode": "0x5E",
1078 "Invert": "1",
1079 "Counter": "0,1,2,3",
1080 "UMask": "0x1",
1081 "EdgeDetect": "1",
1082 "EventName": "RS_EVENTS.EMPTY_END",
1083 "SampleAfterValue": "200003",
1084 "BriefDescription": "Counts end of periods where the Reservation Station (RS) was empty. Could be useful to precisely locate Frontend Latency Bound issues.",
1085 "CounterMask": "1",
1086 "CounterHTOff": "0,1,2,3,4,5,6,7"
1087 },
1088 {
1089 "EventCode": "0xC3",
1090 "Counter": "0,1,2,3",
1091 "UMask": "0x1",
1092 "EdgeDetect": "1",
1093 "EventName": "MACHINE_CLEARS.COUNT",
1094 "SampleAfterValue": "100003",
1095 "BriefDescription": "Number of machine clears (nukes) of any type.",
1096 "CounterMask": "1",
1097 "CounterHTOff": "0,1,2,3,4,5,6,7"
1098 },
1099 {
1100 "PublicDescription": "Cycles 4 Uops delivered by the LSD, but didn't come from the decoder.",
1101 "EventCode": "0xA8",
1102 "Counter": "0,1,2,3",
1103 "UMask": "0x1",
1104 "EventName": "LSD.CYCLES_4_UOPS",
1105 "SampleAfterValue": "2000003",
1106 "BriefDescription": "Cycles 4 Uops delivered by the LSD, but didn't come from the decoder",
1107 "CounterMask": "4",
1108 "CounterHTOff": "0,1,2,3,4,5,6,7"
1109 },
1110 {
1111 "EventCode": "0xA3",
1112 "Counter": "2",
1113 "UMask": "0x8",
1114 "EventName": "CYCLE_ACTIVITY.CYCLES_L1D_MISS",
1115 "SampleAfterValue": "2000003",
1116 "BriefDescription": "Cycles while L1 cache miss demand load is outstanding.",
1117 "CounterMask": "8",
1118 "CounterHTOff": "2"
1119 },
1120 {
1121 "EventCode": "0xA3",
1122 "Counter": "0,1,2,3",
1123 "UMask": "0x1",
1124 "EventName": "CYCLE_ACTIVITY.CYCLES_L2_MISS",
1125 "SampleAfterValue": "2000003",
1126 "BriefDescription": "Cycles while L2 cache miss load* is outstanding.",
1127 "CounterMask": "1",
1128 "CounterHTOff": "0,1,2,3,4,5,6,7"
1129 },
1130 {
1131 "EventCode": "0xA3",
1132 "Counter": "0,1,2,3",
1133 "UMask": "0x2",
1134 "EventName": "CYCLE_ACTIVITY.CYCLES_MEM_ANY",
1135 "SampleAfterValue": "2000003",
1136 "BriefDescription": "Cycles while memory subsystem has an outstanding load.",
1137 "CounterMask": "2",
1138 "CounterHTOff": "0,1,2,3"
1139 },
1140 {
1141 "EventCode": "0xA3",
1142 "Counter": "0,1,2,3",
1143 "UMask": "0x4",
1144 "EventName": "CYCLE_ACTIVITY.STALLS_TOTAL",
1145 "SampleAfterValue": "2000003",
1146 "BriefDescription": "Total execution stalls.",
1147 "CounterMask": "4",
1148 "CounterHTOff": "0,1,2,3"
1149 },
1150 {
1151 "EventCode": "0xA3",
1152 "Counter": "2",
1153 "UMask": "0xc",
1154 "EventName": "CYCLE_ACTIVITY.STALLS_L1D_MISS",
1155 "SampleAfterValue": "2000003",
1156 "BriefDescription": "Execution stalls while L1 cache miss demand load is outstanding.",
1157 "CounterMask": "12",
1158 "CounterHTOff": "2"
1159 },
1160 {
1161 "EventCode": "0xA3",
1162 "Counter": "0,1,2,3",
1163 "UMask": "0x5",
1164 "EventName": "CYCLE_ACTIVITY.STALLS_L2_MISS",
1165 "SampleAfterValue": "2000003",
1166 "BriefDescription": "Execution stalls while L2 cache miss load* is outstanding.",
1167 "CounterMask": "5",
1168 "CounterHTOff": "0,1,2,3"
1169 },
1170 {
1171 "EventCode": "0xA3",
1172 "Counter": "0,1,2,3",
1173 "UMask": "0x6",
1174 "EventName": "CYCLE_ACTIVITY.STALLS_MEM_ANY",
1175 "SampleAfterValue": "2000003",
1176 "BriefDescription": "Execution stalls while memory subsystem has an outstanding load.",
1177 "CounterMask": "6",
1178 "CounterHTOff": "0,1,2,3"
1179 },
1180 {
1181 "PublicDescription": "Core cycles when at least one thread on the physical core is not in halt state.",
1182 "EventCode": "0x00",
1183 "Counter": "Fixed counter 2",
1184 "UMask": "0x2",
1185 "AnyThread": "1",
1186 "EventName": "CPU_CLK_UNHALTED.THREAD_ANY",
1187 "SampleAfterValue": "2000003",
1188 "BriefDescription": "Core cycles when at least one thread on the physical core is not in halt state",
1189 "CounterHTOff": "Fixed counter 2"
1190 },
1191 {
1192 "PublicDescription": "Core cycles when at least one thread on the physical core is not in halt state.",
1193 "EventCode": "0x3C",
1194 "Counter": "0,1,2,3",
1195 "UMask": "0x0",
1196 "AnyThread": "1",
1197 "EventName": "CPU_CLK_UNHALTED.THREAD_P_ANY",
1198 "SampleAfterValue": "2000003",
1199 "BriefDescription": "Core cycles when at least one thread on the physical core is not in halt state",
1200 "CounterHTOff": "0,1,2,3,4,5,6,7"
1201 },
1202 {
1203 "EventCode": "0x3C",
1204 "Counter": "0,1,2,3",
1205 "UMask": "0x1",
1206 "AnyThread": "1",
1207 "EventName": "CPU_CLK_THREAD_UNHALTED.REF_XCLK_ANY",
1208 "SampleAfterValue": "2000003",
1209 "BriefDescription": "Reference cycles when the at least one thread on the physical core is unhalted. (counts at 100 MHz rate)",
1210 "CounterHTOff": "0,1,2,3,4,5,6,7"
1211 },
1212 {
1213 "EventCode": "0x0D",
1214 "Counter": "0,1,2,3",
1215 "UMask": "0x3",
1216 "AnyThread": "1",
1217 "EventName": "INT_MISC.RECOVERY_CYCLES_ANY",
1218 "SampleAfterValue": "2000003",
1219 "BriefDescription": "Core cycles the allocator was stalled due to recovery from earlier clear event for any thread running on the physical core (e.g. misprediction or memory nuke).",
1220 "CounterMask": "1",
1221 "CounterHTOff": "0,1,2,3,4,5,6,7"
1222 },
1223 {
1224 "PublicDescription": "Cycles at least 1 micro-op is executed from any thread on physical core.",
1225 "EventCode": "0xB1",
1226 "Counter": "0,1,2,3",
1227 "UMask": "0x2",
1228 "EventName": "UOPS_EXECUTED.CORE_CYCLES_GE_1",
1229 "SampleAfterValue": "2000003",
1230 "BriefDescription": "Cycles at least 1 micro-op is executed from any thread on physical core",
1231 "CounterMask": "1",
1232 "CounterHTOff": "0,1,2,3,4,5,6,7"
1233 },
1234 {
1235 "PublicDescription": "Cycles at least 2 micro-op is executed from any thread on physical core.",
1236 "EventCode": "0xB1",
1237 "Counter": "0,1,2,3",
1238 "UMask": "0x2",
1239 "EventName": "UOPS_EXECUTED.CORE_CYCLES_GE_2",
1240 "SampleAfterValue": "2000003",
1241 "BriefDescription": "Cycles at least 2 micro-op is executed from any thread on physical core",
1242 "CounterMask": "2",
1243 "CounterHTOff": "0,1,2,3,4,5,6,7"
1244 },
1245 {
1246 "PublicDescription": "Cycles at least 3 micro-op is executed from any thread on physical core.",
1247 "EventCode": "0xB1",
1248 "Counter": "0,1,2,3",
1249 "UMask": "0x2",
1250 "EventName": "UOPS_EXECUTED.CORE_CYCLES_GE_3",
1251 "SampleAfterValue": "2000003",
1252 "BriefDescription": "Cycles at least 3 micro-op is executed from any thread on physical core",
1253 "CounterMask": "3",
1254 "CounterHTOff": "0,1,2,3,4,5,6,7"
1255 },
1256 {
1257 "PublicDescription": "Cycles at least 4 micro-op is executed from any thread on physical core.",
1258 "EventCode": "0xB1",
1259 "Counter": "0,1,2,3",
1260 "UMask": "0x2",
1261 "EventName": "UOPS_EXECUTED.CORE_CYCLES_GE_4",
1262 "SampleAfterValue": "2000003",
1263 "BriefDescription": "Cycles at least 4 micro-op is executed from any thread on physical core",
1264 "CounterMask": "4",
1265 "CounterHTOff": "0,1,2,3,4,5,6,7"
1266 },
1267 {
1268 "PublicDescription": "Cycles with no micro-ops executed from any thread on physical core.",
1269 "EventCode": "0xB1",
1270 "Invert": "1",
1271 "Counter": "0,1,2,3",
1272 "UMask": "0x2",
1273 "EventName": "UOPS_EXECUTED.CORE_CYCLES_NONE",
1274 "SampleAfterValue": "2000003",
1275 "BriefDescription": "Cycles with no micro-ops executed from any thread on physical core",
1276 "CounterHTOff": "0,1,2,3,4,5,6,7"
1277 },
1278 {
1279 "PublicDescription": "Reference cycles when the thread is unhalted. (counts at 100 MHz rate)",
1280 "EventCode": "0x3C",
1281 "Counter": "0,1,2,3",
1282 "UMask": "0x1",
1283 "EventName": "CPU_CLK_UNHALTED.REF_XCLK",
1284 "SampleAfterValue": "2000003",
1285 "BriefDescription": "Reference cycles when the thread is unhalted (counts at 100 MHz rate)",
1286 "CounterHTOff": "0,1,2,3,4,5,6,7"
1287 },
1288 {
1289 "EventCode": "0x3C",
1290 "Counter": "0,1,2,3",
1291 "UMask": "0x1",
1292 "AnyThread": "1",
1293 "EventName": "CPU_CLK_UNHALTED.REF_XCLK_ANY",
1294 "SampleAfterValue": "2000003",
1295 "BriefDescription": "Reference cycles when the at least one thread on the physical core is unhalted. (counts at 100 MHz rate)",
1296 "CounterHTOff": "0,1,2,3,4,5,6,7"
1297 },
1298 {
1299 "EventCode": "0x3C",
1300 "Counter": "0,1,2,3",
1301 "UMask": "0x2",
1302 "EventName": "CPU_CLK_UNHALTED.ONE_THREAD_ACTIVE",
1303 "SampleAfterValue": "2000003",
1304 "BriefDescription": "Count XClk pulses when this thread is unhalted and the other thread is halted.",
1305 "CounterHTOff": "0,1,2,3,4,5,6,7"
1306 } 1308 }
1307] \ No newline at end of file 1309] \ No newline at end of file
diff --git a/tools/perf/pmu-events/arch/x86/ivytown/virtual-memory.json b/tools/perf/pmu-events/arch/x86/ivytown/virtual-memory.json
index c8de548b78fa..4645e9d3f460 100644
--- a/tools/perf/pmu-events/arch/x86/ivytown/virtual-memory.json
+++ b/tools/perf/pmu-events/arch/x86/ivytown/virtual-memory.json
@@ -1,5 +1,15 @@
1[ 1[
2 { 2 {
3 "PublicDescription": "Misses in all TLB levels that cause a page walk of any page size from demand loads.",
4 "EventCode": "0x08",
5 "Counter": "0,1,2,3",
6 "UMask": "0x81",
7 "EventName": "DTLB_LOAD_MISSES.MISS_CAUSES_A_WALK",
8 "SampleAfterValue": "100003",
9 "BriefDescription": "Demand load Miss in all translation lookaside buffer (TLB) levels causes an page walk of any page size.",
10 "CounterHTOff": "0,1,2,3,4,5,6,7"
11 },
12 {
3 "EventCode": "0x08", 13 "EventCode": "0x08",
4 "Counter": "0,1,2,3", 14 "Counter": "0,1,2,3",
5 "UMask": "0x82", 15 "UMask": "0x82",
@@ -9,6 +19,16 @@
9 "CounterHTOff": "0,1,2,3,4,5,6,7" 19 "CounterHTOff": "0,1,2,3,4,5,6,7"
10 }, 20 },
11 { 21 {
22 "PublicDescription": "Misses in all TLB levels that caused page walk completed of any size by demand loads.",
23 "EventCode": "0x08",
24 "Counter": "0,1,2,3",
25 "UMask": "0x82",
26 "EventName": "DTLB_LOAD_MISSES.WALK_COMPLETED",
27 "SampleAfterValue": "100003",
28 "BriefDescription": "Demand load Miss in all translation lookaside buffer (TLB) levels causes a page walk that completes of any page size.",
29 "CounterHTOff": "0,1,2,3,4,5,6,7"
30 },
31 {
12 "EventCode": "0x08", 32 "EventCode": "0x08",
13 "Counter": "0,1,2,3", 33 "Counter": "0,1,2,3",
14 "UMask": "0x84", 34 "UMask": "0x84",
@@ -18,6 +38,16 @@
18 "CounterHTOff": "0,1,2,3,4,5,6,7" 38 "CounterHTOff": "0,1,2,3,4,5,6,7"
19 }, 39 },
20 { 40 {
41 "PublicDescription": "Cycle PMH is busy with a walk due to demand loads.",
42 "EventCode": "0x08",
43 "Counter": "0,1,2,3",
44 "UMask": "0x84",
45 "EventName": "DTLB_LOAD_MISSES.WALK_DURATION",
46 "SampleAfterValue": "2000003",
47 "BriefDescription": "Demand load cycles page miss handler (PMH) is busy with this walk.",
48 "CounterHTOff": "0,1,2,3,4,5,6,7"
49 },
50 {
21 "EventCode": "0x08", 51 "EventCode": "0x08",
22 "Counter": "0,1,2,3", 52 "Counter": "0,1,2,3",
23 "UMask": "0x88", 53 "UMask": "0x88",
@@ -164,35 +194,5 @@
164 "SampleAfterValue": "100007", 194 "SampleAfterValue": "100007",
165 "BriefDescription": "STLB flush attempts", 195 "BriefDescription": "STLB flush attempts",
166 "CounterHTOff": "0,1,2,3,4,5,6,7" 196 "CounterHTOff": "0,1,2,3,4,5,6,7"
167 },
168 {
169 "PublicDescription": "Misses in all TLB levels that cause a page walk of any page size from demand loads.",
170 "EventCode": "0x08",
171 "Counter": "0,1,2,3",
172 "UMask": "0x81",
173 "EventName": "DTLB_LOAD_MISSES.MISS_CAUSES_A_WALK",
174 "SampleAfterValue": "100003",
175 "BriefDescription": "Demand load Miss in all translation lookaside buffer (TLB) levels causes an page walk of any page size.",
176 "CounterHTOff": "0,1,2,3,4,5,6,7"
177 },
178 {
179 "PublicDescription": "Misses in all TLB levels that caused page walk completed of any size by demand loads.",
180 "EventCode": "0x08",
181 "Counter": "0,1,2,3",
182 "UMask": "0x82",
183 "EventName": "DTLB_LOAD_MISSES.WALK_COMPLETED",
184 "SampleAfterValue": "100003",
185 "BriefDescription": "Demand load Miss in all translation lookaside buffer (TLB) levels causes a page walk that completes of any page size.",
186 "CounterHTOff": "0,1,2,3,4,5,6,7"
187 },
188 {
189 "PublicDescription": "Cycle PMH is busy with a walk due to demand loads.",
190 "EventCode": "0x08",
191 "Counter": "0,1,2,3",
192 "UMask": "0x84",
193 "EventName": "DTLB_LOAD_MISSES.WALK_DURATION",
194 "SampleAfterValue": "2000003",
195 "BriefDescription": "Demand load cycles page miss handler (PMH) is busy with this walk.",
196 "CounterHTOff": "0,1,2,3,4,5,6,7"
197 } 197 }
198] \ No newline at end of file 198] \ No newline at end of file
diff --git a/tools/perf/pmu-events/arch/x86/jaketown/jkt-metrics.json b/tools/perf/pmu-events/arch/x86/jaketown/jkt-metrics.json
new file mode 100644
index 000000000000..fd7d7c438226
--- /dev/null
+++ b/tools/perf/pmu-events/arch/x86/jaketown/jkt-metrics.json
@@ -0,0 +1,140 @@
1[
2 {
3 "BriefDescription": "Instructions Per Cycle (per logical thread)",
4 "MetricExpr": "INST_RETIRED.ANY / CPU_CLK_UNHALTED.THREAD",
5 "MetricGroup": "TopDownL1",
6 "MetricName": "IPC"
7 },
8 {
9 "BriefDescription": "Uops Per Instruction",
10 "MetricExpr": "UOPS_RETIRED.RETIRE_SLOTS / INST_RETIRED.ANY",
11 "MetricGroup": "Pipeline",
12 "MetricName": "UPI"
13 },
14 {
15 "BriefDescription": "Rough Estimation of fraction of fetched lines bytes that were likely consumed by program instructions",
16 "MetricExpr": "min( 1 , UOPS_ISSUED.ANY / ( (UOPS_RETIRED.RETIRE_SLOTS / INST_RETIRED.ANY) * 32 * ( ICACHE.HIT + ICACHE.MISSES ) / 4) )",
17 "MetricGroup": "Frontend",
18 "MetricName": "IFetch_Line_Utilization"
19 },
20 {
21 "BriefDescription": "Fraction of Uops delivered by the DSB (aka Decoded Icache; or Uop Cache)",
22 "MetricExpr": "IDQ.DSB_UOPS / ( IDQ.DSB_UOPS + LSD.UOPS + IDQ.MITE_UOPS + IDQ.MS_UOPS )",
23 "MetricGroup": "DSB; Frontend_Bandwidth",
24 "MetricName": "DSB_Coverage"
25 },
26 {
27 "BriefDescription": "Cycles Per Instruction (threaded)",
28 "MetricExpr": "1 / (INST_RETIRED.ANY / cycles)",
29 "MetricGroup": "Pipeline;Summary",
30 "MetricName": "CPI"
31 },
32 {
33 "BriefDescription": "Per-thread actual clocks when the logical processor is active. This is called 'Clockticks' in VTune.",
34 "MetricExpr": "CPU_CLK_UNHALTED.THREAD",
35 "MetricGroup": "Summary",
36 "MetricName": "CLKS"
37 },
38 {
39 "BriefDescription": "Total issue-pipeline slots",
40 "MetricExpr": "4*(( CPU_CLK_UNHALTED.THREAD_ANY / 2 ) if #SMT_on else cycles)",
41 "MetricGroup": "TopDownL1",
42 "MetricName": "SLOTS"
43 },
44 {
45 "BriefDescription": "Total number of retired Instructions",
46 "MetricExpr": "INST_RETIRED.ANY",
47 "MetricGroup": "Summary",
48 "MetricName": "Instructions"
49 },
50 {
51 "BriefDescription": "Instructions Per Cycle (per physical core)",
52 "MetricExpr": "INST_RETIRED.ANY / (( CPU_CLK_UNHALTED.THREAD_ANY / 2 ) if #SMT_on else cycles)",
53 "MetricGroup": "SMT",
54 "MetricName": "CoreIPC"
55 },
56 {
57 "BriefDescription": "Instruction-Level-Parallelism (average number of uops executed when there is at least 1 uop executed)",
58 "MetricExpr": "UOPS_DISPATCHED.THREAD / (( cpu@UOPS_DISPATCHED.CORE\\,cmask\\=1@ / 2) if #SMT_on else cpu@UOPS_DISPATCHED.CORE\\,cmask\\=1@)",
59 "MetricGroup": "Pipeline;Ports_Utilization",
60 "MetricName": "ILP"
61 },
62 {
63 "BriefDescription": "Core actual clocks when any thread is active on the physical core",
64 "MetricExpr": "( CPU_CLK_UNHALTED.THREAD_ANY / 2 ) if #SMT_on else CPU_CLK_UNHALTED.THREAD",
65 "MetricGroup": "SMT",
66 "MetricName": "CORE_CLKS"
67 },
68 {
69 "BriefDescription": "Average CPU Utilization",
70 "MetricExpr": "CPU_CLK_UNHALTED.REF_TSC / msr@tsc@",
71 "MetricGroup": "Summary",
72 "MetricName": "CPU_Utilization"
73 },
74 {
75 "BriefDescription": "Giga Floating Point Operations Per Second",
76 "MetricExpr": "(( 1*( FP_COMP_OPS_EXE.SSE_SCALAR_SINGLE + FP_COMP_OPS_EXE.SSE_SCALAR_DOUBLE ) + 2* FP_COMP_OPS_EXE.SSE_PACKED_DOUBLE + 4*( FP_COMP_OPS_EXE.SSE_PACKED_SINGLE + SIMD_FP_256.PACKED_DOUBLE ) + 8* SIMD_FP_256.PACKED_SINGLE )) / 1000000000 / duration_time",
77 "MetricGroup": "FLOPS;Summary",
78 "MetricName": "GFLOPs"
79 },
80 {
81 "BriefDescription": "Average Frequency Utilization relative nominal frequency",
82 "MetricExpr": "CPU_CLK_UNHALTED.THREAD / CPU_CLK_UNHALTED.REF_TSC",
83 "MetricGroup": "Power",
84 "MetricName": "Turbo_Utilization"
85 },
86 {
87 "BriefDescription": "Fraction of cycles where both hardware threads were active",
88 "MetricExpr": "1 - CPU_CLK_THREAD_UNHALTED.ONE_THREAD_ACTIVE / ( CPU_CLK_THREAD_UNHALTED.REF_XCLK_ANY / 2 ) if #SMT_on else 0",
89 "MetricGroup": "SMT;Summary",
90 "MetricName": "SMT_2T_Utilization"
91 },
92 {
93 "BriefDescription": "Fraction of cycles spent in Kernel mode",
94 "MetricExpr": "CPU_CLK_UNHALTED.REF_TSC:u / CPU_CLK_UNHALTED.REF_TSC",
95 "MetricGroup": "Summary",
96 "MetricName": "Kernel_Utilization"
97 },
98 {
99 "BriefDescription": "C3 residency percent per core",
100 "MetricExpr": "(cstate_core@c3\\-residency@ / msr@tsc@) * 100",
101 "MetricGroup": "Power",
102 "MetricName": "C3_Core_Residency"
103 },
104 {
105 "BriefDescription": "C6 residency percent per core",
106 "MetricExpr": "(cstate_core@c6\\-residency@ / msr@tsc@) * 100",
107 "MetricGroup": "Power",
108 "MetricName": "C6_Core_Residency"
109 },
110 {
111 "BriefDescription": "C7 residency percent per core",
112 "MetricExpr": "(cstate_core@c7\\-residency@ / msr@tsc@) * 100",
113 "MetricGroup": "Power",
114 "MetricName": "C7_Core_Residency"
115 },
116 {
117 "BriefDescription": "C2 residency percent per package",
118 "MetricExpr": "(cstate_pkg@c2\\-residency@ / msr@tsc@) * 100",
119 "MetricGroup": "Power",
120 "MetricName": "C2_Pkg_Residency"
121 },
122 {
123 "BriefDescription": "C3 residency percent per package",
124 "MetricExpr": "(cstate_pkg@c3\\-residency@ / msr@tsc@) * 100",
125 "MetricGroup": "Power",
126 "MetricName": "C3_Pkg_Residency"
127 },
128 {
129 "BriefDescription": "C6 residency percent per package",
130 "MetricExpr": "(cstate_pkg@c6\\-residency@ / msr@tsc@) * 100",
131 "MetricGroup": "Power",
132 "MetricName": "C6_Pkg_Residency"
133 },
134 {
135 "BriefDescription": "C7 residency percent per package",
136 "MetricExpr": "(cstate_pkg@c7\\-residency@ / msr@tsc@) * 100",
137 "MetricGroup": "Power",
138 "MetricName": "C7_Pkg_Residency"
139 }
140]
diff --git a/tools/perf/pmu-events/arch/x86/mapfile.csv b/tools/perf/pmu-events/arch/x86/mapfile.csv
index 4ea068366c3e..93656f2fd53a 100644
--- a/tools/perf/pmu-events/arch/x86/mapfile.csv
+++ b/tools/perf/pmu-events/arch/x86/mapfile.csv
@@ -9,6 +9,7 @@ GenuineIntel-6-27,v4,bonnell,core
9GenuineIntel-6-36,v4,bonnell,core 9GenuineIntel-6-36,v4,bonnell,core
10GenuineIntel-6-35,v4,bonnell,core 10GenuineIntel-6-35,v4,bonnell,core
11GenuineIntel-6-5C,v8,goldmont,core 11GenuineIntel-6-5C,v8,goldmont,core
12GenuineIntel-6-7A,v1,goldmontplus,core
12GenuineIntel-6-3C,v24,haswell,core 13GenuineIntel-6-3C,v24,haswell,core
13GenuineIntel-6-45,v24,haswell,core 14GenuineIntel-6-45,v24,haswell,core
14GenuineIntel-6-46,v24,haswell,core 15GenuineIntel-6-46,v24,haswell,core
@@ -22,10 +23,7 @@ GenuineIntel-6-1E,v2,nehalemep,core
22GenuineIntel-6-1F,v2,nehalemep,core 23GenuineIntel-6-1F,v2,nehalemep,core
23GenuineIntel-6-1A,v2,nehalemep,core 24GenuineIntel-6-1A,v2,nehalemep,core
24GenuineIntel-6-2E,v2,nehalemex,core 25GenuineIntel-6-2E,v2,nehalemex,core
25GenuineIntel-6-4E,v24,skylake,core 26GenuineIntel-6-[4589]E,v24,skylake,core
26GenuineIntel-6-5E,v24,skylake,core
27GenuineIntel-6-8E,v24,skylake,core
28GenuineIntel-6-9E,v24,skylake,core
29GenuineIntel-6-37,v13,silvermont,core 27GenuineIntel-6-37,v13,silvermont,core
30GenuineIntel-6-4D,v13,silvermont,core 28GenuineIntel-6-4D,v13,silvermont,core
31GenuineIntel-6-4C,v13,silvermont,core 29GenuineIntel-6-4C,v13,silvermont,core
diff --git a/tools/perf/pmu-events/arch/x86/sandybridge/snb-metrics.json b/tools/perf/pmu-events/arch/x86/sandybridge/snb-metrics.json
new file mode 100644
index 000000000000..fd7d7c438226
--- /dev/null
+++ b/tools/perf/pmu-events/arch/x86/sandybridge/snb-metrics.json
@@ -0,0 +1,140 @@
1[
2 {
3 "BriefDescription": "Instructions Per Cycle (per logical thread)",
4 "MetricExpr": "INST_RETIRED.ANY / CPU_CLK_UNHALTED.THREAD",
5 "MetricGroup": "TopDownL1",
6 "MetricName": "IPC"
7 },
8 {
9 "BriefDescription": "Uops Per Instruction",
10 "MetricExpr": "UOPS_RETIRED.RETIRE_SLOTS / INST_RETIRED.ANY",
11 "MetricGroup": "Pipeline",
12 "MetricName": "UPI"
13 },
14 {
15 "BriefDescription": "Rough Estimation of fraction of fetched lines bytes that were likely consumed by program instructions",
16 "MetricExpr": "min( 1 , UOPS_ISSUED.ANY / ( (UOPS_RETIRED.RETIRE_SLOTS / INST_RETIRED.ANY) * 32 * ( ICACHE.HIT + ICACHE.MISSES ) / 4) )",
17 "MetricGroup": "Frontend",
18 "MetricName": "IFetch_Line_Utilization"
19 },
20 {
21 "BriefDescription": "Fraction of Uops delivered by the DSB (aka Decoded Icache; or Uop Cache)",
22 "MetricExpr": "IDQ.DSB_UOPS / ( IDQ.DSB_UOPS + LSD.UOPS + IDQ.MITE_UOPS + IDQ.MS_UOPS )",
23 "MetricGroup": "DSB; Frontend_Bandwidth",
24 "MetricName": "DSB_Coverage"
25 },
26 {
27 "BriefDescription": "Cycles Per Instruction (threaded)",
28 "MetricExpr": "1 / (INST_RETIRED.ANY / cycles)",
29 "MetricGroup": "Pipeline;Summary",
30 "MetricName": "CPI"
31 },
32 {
33 "BriefDescription": "Per-thread actual clocks when the logical processor is active. This is called 'Clockticks' in VTune.",
34 "MetricExpr": "CPU_CLK_UNHALTED.THREAD",
35 "MetricGroup": "Summary",
36 "MetricName": "CLKS"
37 },
38 {
39 "BriefDescription": "Total issue-pipeline slots",
40 "MetricExpr": "4*(( CPU_CLK_UNHALTED.THREAD_ANY / 2 ) if #SMT_on else cycles)",
41 "MetricGroup": "TopDownL1",
42 "MetricName": "SLOTS"
43 },
44 {
45 "BriefDescription": "Total number of retired Instructions",
46 "MetricExpr": "INST_RETIRED.ANY",
47 "MetricGroup": "Summary",
48 "MetricName": "Instructions"
49 },
50 {
51 "BriefDescription": "Instructions Per Cycle (per physical core)",
52 "MetricExpr": "INST_RETIRED.ANY / (( CPU_CLK_UNHALTED.THREAD_ANY / 2 ) if #SMT_on else cycles)",
53 "MetricGroup": "SMT",
54 "MetricName": "CoreIPC"
55 },
56 {
57 "BriefDescription": "Instruction-Level-Parallelism (average number of uops executed when there is at least 1 uop executed)",
58 "MetricExpr": "UOPS_DISPATCHED.THREAD / (( cpu@UOPS_DISPATCHED.CORE\\,cmask\\=1@ / 2) if #SMT_on else cpu@UOPS_DISPATCHED.CORE\\,cmask\\=1@)",
59 "MetricGroup": "Pipeline;Ports_Utilization",
60 "MetricName": "ILP"
61 },
62 {
63 "BriefDescription": "Core actual clocks when any thread is active on the physical core",
64 "MetricExpr": "( CPU_CLK_UNHALTED.THREAD_ANY / 2 ) if #SMT_on else CPU_CLK_UNHALTED.THREAD",
65 "MetricGroup": "SMT",
66 "MetricName": "CORE_CLKS"
67 },
68 {
69 "BriefDescription": "Average CPU Utilization",
70 "MetricExpr": "CPU_CLK_UNHALTED.REF_TSC / msr@tsc@",
71 "MetricGroup": "Summary",
72 "MetricName": "CPU_Utilization"
73 },
74 {
75 "BriefDescription": "Giga Floating Point Operations Per Second",
76 "MetricExpr": "(( 1*( FP_COMP_OPS_EXE.SSE_SCALAR_SINGLE + FP_COMP_OPS_EXE.SSE_SCALAR_DOUBLE ) + 2* FP_COMP_OPS_EXE.SSE_PACKED_DOUBLE + 4*( FP_COMP_OPS_EXE.SSE_PACKED_SINGLE + SIMD_FP_256.PACKED_DOUBLE ) + 8* SIMD_FP_256.PACKED_SINGLE )) / 1000000000 / duration_time",
77 "MetricGroup": "FLOPS;Summary",
78 "MetricName": "GFLOPs"
79 },
80 {
81 "BriefDescription": "Average Frequency Utilization relative nominal frequency",
82 "MetricExpr": "CPU_CLK_UNHALTED.THREAD / CPU_CLK_UNHALTED.REF_TSC",
83 "MetricGroup": "Power",
84 "MetricName": "Turbo_Utilization"
85 },
86 {
87 "BriefDescription": "Fraction of cycles where both hardware threads were active",
88 "MetricExpr": "1 - CPU_CLK_THREAD_UNHALTED.ONE_THREAD_ACTIVE / ( CPU_CLK_THREAD_UNHALTED.REF_XCLK_ANY / 2 ) if #SMT_on else 0",
89 "MetricGroup": "SMT;Summary",
90 "MetricName": "SMT_2T_Utilization"
91 },
92 {
93 "BriefDescription": "Fraction of cycles spent in Kernel mode",
94 "MetricExpr": "CPU_CLK_UNHALTED.REF_TSC:u / CPU_CLK_UNHALTED.REF_TSC",
95 "MetricGroup": "Summary",
96 "MetricName": "Kernel_Utilization"
97 },
98 {
99 "BriefDescription": "C3 residency percent per core",
100 "MetricExpr": "(cstate_core@c3\\-residency@ / msr@tsc@) * 100",
101 "MetricGroup": "Power",
102 "MetricName": "C3_Core_Residency"
103 },
104 {
105 "BriefDescription": "C6 residency percent per core",
106 "MetricExpr": "(cstate_core@c6\\-residency@ / msr@tsc@) * 100",
107 "MetricGroup": "Power",
108 "MetricName": "C6_Core_Residency"
109 },
110 {
111 "BriefDescription": "C7 residency percent per core",
112 "MetricExpr": "(cstate_core@c7\\-residency@ / msr@tsc@) * 100",
113 "MetricGroup": "Power",
114 "MetricName": "C7_Core_Residency"
115 },
116 {
117 "BriefDescription": "C2 residency percent per package",
118 "MetricExpr": "(cstate_pkg@c2\\-residency@ / msr@tsc@) * 100",
119 "MetricGroup": "Power",
120 "MetricName": "C2_Pkg_Residency"
121 },
122 {
123 "BriefDescription": "C3 residency percent per package",
124 "MetricExpr": "(cstate_pkg@c3\\-residency@ / msr@tsc@) * 100",
125 "MetricGroup": "Power",
126 "MetricName": "C3_Pkg_Residency"
127 },
128 {
129 "BriefDescription": "C6 residency percent per package",
130 "MetricExpr": "(cstate_pkg@c6\\-residency@ / msr@tsc@) * 100",
131 "MetricGroup": "Power",
132 "MetricName": "C6_Pkg_Residency"
133 },
134 {
135 "BriefDescription": "C7 residency percent per package",
136 "MetricExpr": "(cstate_pkg@c7\\-residency@ / msr@tsc@) * 100",
137 "MetricGroup": "Power",
138 "MetricName": "C7_Pkg_Residency"
139 }
140]
diff --git a/tools/perf/pmu-events/arch/x86/silvermont/cache.json b/tools/perf/pmu-events/arch/x86/silvermont/cache.json
index 0bd1bc5302de..82be7d1b8b81 100644
--- a/tools/perf/pmu-events/arch/x86/silvermont/cache.json
+++ b/tools/perf/pmu-events/arch/x86/silvermont/cache.json
@@ -36,12 +36,13 @@
36 "BriefDescription": "L2 cache request misses" 36 "BriefDescription": "L2 cache request misses"
37 }, 37 },
38 { 38 {
39 "PublicDescription": "Counts cycles that fetch is stalled due to an outstanding ICache miss. That is, the decoder queue is able to accept bytes, but the fetch unit is unable to provide bytes due to an ICache miss. Note: this event is not the same as the total number of cycles spent retrieving instruction cache lines from the memory hierarchy.\r\nCounts cycles that fetch is stalled due to any reason. That is, the decoder queue is able to accept bytes, but the fetch unit is unable to provide bytes. This will include cycles due to an ITLB miss, ICache miss and other events. \r\n",
39 "EventCode": "0x86", 40 "EventCode": "0x86",
40 "Counter": "0,1", 41 "Counter": "0,1",
41 "UMask": "0x4", 42 "UMask": "0x4",
42 "EventName": "FETCH_STALL.ICACHE_FILL_PENDING_CYCLES", 43 "EventName": "FETCH_STALL.ICACHE_FILL_PENDING_CYCLES",
43 "SampleAfterValue": "200003", 44 "SampleAfterValue": "200003",
44 "BriefDescription": "Counts the number of cycles the NIP stalls because of an icache miss. This is a cumulative count of cycles the NIP stalled for all icache misses." 45 "BriefDescription": "Cycles code-fetch stalled due to an outstanding ICache miss."
45 }, 46 },
46 { 47 {
47 "PEBS": "1", 48 "PEBS": "1",
diff --git a/tools/perf/pmu-events/arch/x86/skylake/cache.json b/tools/perf/pmu-events/arch/x86/skylake/cache.json
index 0551a9ba865d..54bfe9e4045c 100644
--- a/tools/perf/pmu-events/arch/x86/skylake/cache.json
+++ b/tools/perf/pmu-events/arch/x86/skylake/cache.json
@@ -1,442 +1,6 @@
1[ 1[
2 { 2 {
3 "PEBS": "1", 3 "PublicDescription": "Counts the number of demand Data Read requests that miss L2 cache. Only not rejected loads are counted.",
4 "EventCode": "0xD0",
5 "Counter": "0,1,2,3",
6 "UMask": "0x11",
7 "EventName": "MEM_INST_RETIRED.STLB_MISS_LOADS",
8 "SampleAfterValue": "100003",
9 "BriefDescription": "Retired load instructions that miss the STLB.",
10 "CounterHTOff": "0,1,2,3",
11 "Data_LA": "1"
12 },
13 {
14 "PEBS": "1",
15 "EventCode": "0xD0",
16 "Counter": "0,1,2,3",
17 "UMask": "0x12",
18 "EventName": "MEM_INST_RETIRED.STLB_MISS_STORES",
19 "SampleAfterValue": "100003",
20 "BriefDescription": "Retired store instructions that miss the STLB.",
21 "CounterHTOff": "0,1,2,3",
22 "Data_LA": "1",
23 "L1_Hit_Indication": "1"
24 },
25 {
26 "PEBS": "1",
27 "EventCode": "0xD0",
28 "Counter": "0,1,2,3",
29 "UMask": "0x21",
30 "EventName": "MEM_INST_RETIRED.LOCK_LOADS",
31 "SampleAfterValue": "100007",
32 "BriefDescription": "Retired load instructions with locked access.",
33 "CounterHTOff": "0,1,2,3",
34 "Data_LA": "1"
35 },
36 {
37 "PEBS": "1",
38 "EventCode": "0xD0",
39 "Counter": "0,1,2,3",
40 "UMask": "0x41",
41 "EventName": "MEM_INST_RETIRED.SPLIT_LOADS",
42 "SampleAfterValue": "100003",
43 "BriefDescription": "Retired load instructions that split across a cacheline boundary.",
44 "CounterHTOff": "0,1,2,3",
45 "Data_LA": "1"
46 },
47 {
48 "PEBS": "1",
49 "EventCode": "0xD0",
50 "Counter": "0,1,2,3",
51 "UMask": "0x42",
52 "EventName": "MEM_INST_RETIRED.SPLIT_STORES",
53 "SampleAfterValue": "100003",
54 "BriefDescription": "Retired store instructions that split across a cacheline boundary.",
55 "CounterHTOff": "0,1,2,3",
56 "Data_LA": "1",
57 "L1_Hit_Indication": "1"
58 },
59 {
60 "PEBS": "1",
61 "EventCode": "0xD0",
62 "Counter": "0,1,2,3",
63 "UMask": "0x81",
64 "EventName": "MEM_INST_RETIRED.ALL_LOADS",
65 "SampleAfterValue": "2000003",
66 "BriefDescription": "All retired load instructions.",
67 "CounterHTOff": "0,1,2,3",
68 "Data_LA": "1"
69 },
70 {
71 "PEBS": "1",
72 "EventCode": "0xD0",
73 "Counter": "0,1,2,3",
74 "UMask": "0x82",
75 "EventName": "MEM_INST_RETIRED.ALL_STORES",
76 "SampleAfterValue": "2000003",
77 "BriefDescription": "All retired store instructions.",
78 "CounterHTOff": "0,1,2,3",
79 "Data_LA": "1",
80 "L1_Hit_Indication": "1"
81 },
82 {
83 "PEBS": "1",
84 "PublicDescription": "Retired load instructions with L1 cache hits as data sources.",
85 "EventCode": "0xD1",
86 "Counter": "0,1,2,3",
87 "UMask": "0x1",
88 "EventName": "MEM_LOAD_RETIRED.L1_HIT",
89 "SampleAfterValue": "2000003",
90 "BriefDescription": "Retired load instructions with L1 cache hits as data sources",
91 "CounterHTOff": "0,1,2,3",
92 "Data_LA": "1"
93 },
94 {
95 "PEBS": "1",
96 "PublicDescription": "Retired load instructions with L2 cache hits as data sources.",
97 "EventCode": "0xD1",
98 "Counter": "0,1,2,3",
99 "UMask": "0x2",
100 "EventName": "MEM_LOAD_RETIRED.L2_HIT",
101 "SampleAfterValue": "100003",
102 "BriefDescription": "Retired load instructions with L2 cache hits as data sources",
103 "CounterHTOff": "0,1,2,3",
104 "Data_LA": "1"
105 },
106 {
107 "PEBS": "1",
108 "PublicDescription": "Retired load instructions with L3 cache hits as data sources.",
109 "EventCode": "0xD1",
110 "Counter": "0,1,2,3",
111 "UMask": "0x4",
112 "EventName": "MEM_LOAD_RETIRED.L3_HIT",
113 "SampleAfterValue": "50021",
114 "BriefDescription": "Retired load instructions with L3 cache hits as data sources",
115 "CounterHTOff": "0,1,2,3",
116 "Data_LA": "1"
117 },
118 {
119 "PEBS": "1",
120 "PublicDescription": "Retired load instructions missed L1 cache as data sources.",
121 "EventCode": "0xD1",
122 "Counter": "0,1,2,3",
123 "UMask": "0x8",
124 "EventName": "MEM_LOAD_RETIRED.L1_MISS",
125 "SampleAfterValue": "100003",
126 "BriefDescription": "Retired load instructions missed L1 cache as data sources",
127 "CounterHTOff": "0,1,2,3",
128 "Data_LA": "1"
129 },
130 {
131 "PEBS": "1",
132 "PublicDescription": "Retired load instructions missed L2 cache as data sources.",
133 "EventCode": "0xD1",
134 "Counter": "0,1,2,3",
135 "UMask": "0x10",
136 "EventName": "MEM_LOAD_RETIRED.L2_MISS",
137 "SampleAfterValue": "50021",
138 "BriefDescription": "Retired load instructions missed L2 cache as data sources",
139 "CounterHTOff": "0,1,2,3",
140 "Data_LA": "1"
141 },
142 {
143 "PEBS": "1",
144 "PublicDescription": "Retired load instructions missed L3 cache as data sources.",
145 "EventCode": "0xD1",
146 "Counter": "0,1,2,3",
147 "UMask": "0x20",
148 "EventName": "MEM_LOAD_RETIRED.L3_MISS",
149 "SampleAfterValue": "100007",
150 "BriefDescription": "Retired load instructions missed L3 cache as data sources",
151 "CounterHTOff": "0,1,2,3",
152 "Data_LA": "1"
153 },
154 {
155 "PEBS": "1",
156 "PublicDescription": "Retired load instructions which data sources were load missed L1 but hit FB due to preceding miss to the same cache line with data not ready.",
157 "EventCode": "0xD1",
158 "Counter": "0,1,2,3",
159 "UMask": "0x40",
160 "EventName": "MEM_LOAD_RETIRED.FB_HIT",
161 "SampleAfterValue": "100007",
162 "BriefDescription": "Retired load instructions which data sources were load missed L1 but hit FB due to preceding miss to the same cache line with data not ready",
163 "CounterHTOff": "0,1,2,3",
164 "Data_LA": "1"
165 },
166 {
167 "PEBS": "1",
168 "EventCode": "0xD2",
169 "Counter": "0,1,2,3",
170 "UMask": "0x1",
171 "EventName": "MEM_LOAD_L3_HIT_RETIRED.XSNP_MISS",
172 "SampleAfterValue": "20011",
173 "BriefDescription": "Retired load instructions which data sources were L3 hit and cross-core snoop missed in on-pkg core cache.",
174 "CounterHTOff": "0,1,2,3",
175 "Data_LA": "1"
176 },
177 {
178 "PEBS": "1",
179 "PublicDescription": "Retired load instructions which data sources were L3 and cross-core snoop hits in on-pkg core cache.",
180 "EventCode": "0xD2",
181 "Counter": "0,1,2,3",
182 "UMask": "0x2",
183 "EventName": "MEM_LOAD_L3_HIT_RETIRED.XSNP_HIT",
184 "SampleAfterValue": "20011",
185 "BriefDescription": "Retired load instructions which data sources were L3 and cross-core snoop hits in on-pkg core cache",
186 "CounterHTOff": "0,1,2,3",
187 "Data_LA": "1"
188 },
189 {
190 "PEBS": "1",
191 "PublicDescription": "Retired load instructions which data sources were HitM responses from shared L3.",
192 "EventCode": "0xD2",
193 "Counter": "0,1,2,3",
194 "UMask": "0x4",
195 "EventName": "MEM_LOAD_L3_HIT_RETIRED.XSNP_HITM",
196 "SampleAfterValue": "20011",
197 "BriefDescription": "Retired load instructions which data sources were HitM responses from shared L3",
198 "CounterHTOff": "0,1,2,3",
199 "Data_LA": "1"
200 },
201 {
202 "PEBS": "1",
203 "PublicDescription": "Retired load instructions which data sources were hits in L3 without snoops required.",
204 "EventCode": "0xD2",
205 "Counter": "0,1,2,3",
206 "UMask": "0x8",
207 "EventName": "MEM_LOAD_L3_HIT_RETIRED.XSNP_NONE",
208 "SampleAfterValue": "100003",
209 "BriefDescription": "Retired load instructions which data sources were hits in L3 without snoops required",
210 "CounterHTOff": "0,1,2,3",
211 "Data_LA": "1"
212 },
213 {
214 "PEBS": "1",
215 "EventCode": "0xD4",
216 "Counter": "0,1,2,3",
217 "UMask": "0x4",
218 "EventName": "MEM_LOAD_MISC_RETIRED.UC",
219 "SampleAfterValue": "100007",
220 "BriefDescription": "Retired instructions with at least 1 uncacheable load or lock.",
221 "CounterHTOff": "0,1,2,3",
222 "Data_LA": "1"
223 },
224 {
225 "PublicDescription": "This event counts L1D data line replacements including opportunistic replacements, and replacements that require stall-for-replace or block-for-replace.",
226 "EventCode": "0x51",
227 "Counter": "0,1,2,3",
228 "UMask": "0x1",
229 "EventName": "L1D.REPLACEMENT",
230 "SampleAfterValue": "2000003",
231 "BriefDescription": "L1D data line replacements",
232 "CounterHTOff": "0,1,2,3,4,5,6,7"
233 },
234 {
235 "PublicDescription": "This event counts duration of L1D miss outstanding, that is each cycle number of Fill Buffers (FB) outstanding required by Demand Reads. FB either is held by demand loads, or it is held by non-demand loads and gets hit at least once by demand. The valid outstanding interval is defined until the FB deallocation by one of the following ways: from FB allocation, if FB is allocated by demand\n from the demand Hit FB, if it is allocated by hardware or software prefetch.\nNote: In the L1D, a Demand Read contains cacheable or noncacheable demand loads, including ones causing cache-line splits and reads due to page walks resulted from any request type.",
236 "EventCode": "0x48",
237 "Counter": "0,1,2,3",
238 "UMask": "0x1",
239 "EventName": "L1D_PEND_MISS.PENDING",
240 "SampleAfterValue": "2000003",
241 "BriefDescription": "L1D miss outstandings duration in cycles",
242 "CounterHTOff": "0,1,2,3,4,5,6,7"
243 },
244 {
245 "EventCode": "0x48",
246 "Counter": "0,1,2,3",
247 "UMask": "0x2",
248 "EventName": "L1D_PEND_MISS.FB_FULL",
249 "SampleAfterValue": "2000003",
250 "BriefDescription": "Number of times a request needed a FB entry but there was no entry available for it. That is the FB unavailability was dominant reason for blocking the request. A request includes cacheable/uncacheable demands that is load, store or SW prefetch.",
251 "CounterHTOff": "0,1,2,3,4,5,6,7"
252 },
253 {
254 "PublicDescription": "This event counts duration of L1D miss outstanding in cycles.",
255 "EventCode": "0x48",
256 "Counter": "0,1,2,3",
257 "UMask": "0x1",
258 "EventName": "L1D_PEND_MISS.PENDING_CYCLES",
259 "SampleAfterValue": "2000003",
260 "BriefDescription": "Cycles with L1D load Misses outstanding.",
261 "CounterMask": "1",
262 "CounterHTOff": "0,1,2,3,4,5,6,7"
263 },
264 {
265 "PublicDescription": "This event counts the Demand Data Read requests sent to uncore. Use it in conjunction with OFFCORE_REQUESTS_OUTSTANDING to determine average latency in the uncore.",
266 "EventCode": "0xB0",
267 "Counter": "0,1,2,3",
268 "UMask": "0x1",
269 "EventName": "OFFCORE_REQUESTS.DEMAND_DATA_RD",
270 "SampleAfterValue": "100003",
271 "BriefDescription": "Demand Data Read requests sent to uncore",
272 "CounterHTOff": "0,1,2,3,4,5,6,7"
273 },
274 {
275 "PublicDescription": "This event counts both cacheable and noncachaeble code read requests.",
276 "EventCode": "0xB0",
277 "Counter": "0,1,2,3",
278 "UMask": "0x2",
279 "EventName": "OFFCORE_REQUESTS.DEMAND_CODE_RD",
280 "SampleAfterValue": "100003",
281 "BriefDescription": "Cacheable and noncachaeble code read requests",
282 "CounterHTOff": "0,1,2,3,4,5,6,7"
283 },
284 {
285 "PublicDescription": "This event counts the demand RFO (read for ownership) requests including regular RFOs, locks, ItoM.",
286 "EventCode": "0xB0",
287 "Counter": "0,1,2,3",
288 "UMask": "0x4",
289 "EventName": "OFFCORE_REQUESTS.DEMAND_RFO",
290 "SampleAfterValue": "100003",
291 "BriefDescription": "Demand RFO requests including regular RFOs, locks, ItoM",
292 "CounterHTOff": "0,1,2,3,4,5,6,7"
293 },
294 {
295 "PublicDescription": "This event counts the demand and prefetch data reads. All Core Data Reads include cacheable 'Demands' and L2 prefetchers (not L3 prefetchers). Counting also covers reads due to page walks resulted from any request type.",
296 "EventCode": "0xB0",
297 "Counter": "0,1,2,3",
298 "UMask": "0x8",
299 "EventName": "OFFCORE_REQUESTS.ALL_DATA_RD",
300 "SampleAfterValue": "100003",
301 "BriefDescription": "Demand and prefetch data reads",
302 "CounterHTOff": "0,1,2,3,4,5,6,7"
303 },
304 {
305 "PublicDescription": "This event counts memory transactions reached the super queue including requests initiated by the core, all L3 prefetches, page walks, and so on.",
306 "EventCode": "0xB0",
307 "Counter": "0,1,2,3",
308 "UMask": "0x80",
309 "EventName": "OFFCORE_REQUESTS.ALL_REQUESTS",
310 "SampleAfterValue": "100003",
311 "BriefDescription": "Any memory transaction that reached the SQ.",
312 "CounterHTOff": "0,1,2,3,4,5,6,7"
313 },
314 {
315 "PublicDescription": "This event counts the number of offcore outstanding Demand Data Read transactions in the super queue (SQ) every cycle. A transaction is considered to be in the Offcore outstanding state between L2 miss and transaction completion sent to requestor. See the corresponding Umask under OFFCORE_REQUESTS.\nNote: A prefetch promoted to Demand is counted from the promotion point.",
316 "EventCode": "0x60",
317 "Counter": "0,1,2,3",
318 "UMask": "0x1",
319 "EventName": "OFFCORE_REQUESTS_OUTSTANDING.DEMAND_DATA_RD",
320 "SampleAfterValue": "2000003",
321 "BriefDescription": "Offcore outstanding Demand Data Read transactions in uncore queue.",
322 "CounterHTOff": "0,1,2,3,4,5,6,7"
323 },
324 {
325 "PublicDescription": "This event counts the number of offcore outstanding Code Reads transactions in the super queue every cycle. The 'Offcore outstanding' state of the transaction lasts from the L2 miss until the sending transaction completion to requestor (SQ deallocation). See the corresponding Umask under OFFCORE_REQUESTS.",
326 "EventCode": "0x60",
327 "Counter": "0,1,2,3",
328 "UMask": "0x2",
329 "EventName": "OFFCORE_REQUESTS_OUTSTANDING.DEMAND_CODE_RD",
330 "SampleAfterValue": "2000003",
331 "BriefDescription": "Offcore outstanding Code Reads transactions in the SuperQueue (SQ), queue to uncore, every cycle. ",
332 "CounterHTOff": "0,1,2,3,4,5,6,7"
333 },
334 {
335 "PublicDescription": "This event counts the number of offcore outstanding RFO (store) transactions in the super queue (SQ) every cycle. A transaction is considered to be in the Offcore outstanding state between L2 miss and transaction completion sent to requestor (SQ de-allocation). See corresponding Umask under OFFCORE_REQUESTS.",
336 "EventCode": "0x60",
337 "Counter": "0,1,2,3",
338 "UMask": "0x4",
339 "EventName": "OFFCORE_REQUESTS_OUTSTANDING.DEMAND_RFO",
340 "SampleAfterValue": "2000003",
341 "BriefDescription": "Offcore outstanding demand rfo reads transactions in SuperQueue (SQ), queue to uncore, every cycle",
342 "CounterHTOff": "0,1,2,3,4,5,6,7"
343 },
344 {
345 "PublicDescription": "This event counts the number of offcore outstanding cacheable Core Data Read transactions in the super queue every cycle. A transaction is considered to be in the Offcore outstanding state between L2 miss and transaction completion sent to requestor (SQ de-allocation). See corresponding Umask under OFFCORE_REQUESTS.",
346 "EventCode": "0x60",
347 "Counter": "0,1,2,3",
348 "UMask": "0x8",
349 "EventName": "OFFCORE_REQUESTS_OUTSTANDING.ALL_DATA_RD",
350 "SampleAfterValue": "2000003",
351 "BriefDescription": "Offcore outstanding cacheable Core Data Read transactions in SuperQueue (SQ), queue to uncore",
352 "CounterHTOff": "0,1,2,3,4,5,6,7"
353 },
354 {
355 "PublicDescription": "This event counts cycles when offcore outstanding Demand Data Read transactions are present in the super queue (SQ). A transaction is considered to be in the Offcore outstanding state between L2 miss and transaction completion sent to requestor (SQ de-allocation).",
356 "EventCode": "0x60",
357 "Counter": "0,1,2,3",
358 "UMask": "0x1",
359 "EventName": "OFFCORE_REQUESTS_OUTSTANDING.CYCLES_WITH_DEMAND_DATA_RD",
360 "SampleAfterValue": "2000003",
361 "BriefDescription": "Cycles when offcore outstanding Demand Data Read transactions are present in SuperQueue (SQ), queue to uncore",
362 "CounterMask": "1",
363 "CounterHTOff": "0,1,2,3,4,5,6,7"
364 },
365 {
366 "PublicDescription": "This event counts cycles when offcore outstanding cacheable Core Data Read transactions are present in the super queue. A transaction is considered to be in the Offcore outstanding state between L2 miss and transaction completion sent to requestor (SQ de-allocation). See corresponding Umask under OFFCORE_REQUESTS.",
367 "EventCode": "0x60",
368 "Counter": "0,1,2,3",
369 "UMask": "0x8",
370 "EventName": "OFFCORE_REQUESTS_OUTSTANDING.CYCLES_WITH_DATA_RD",
371 "SampleAfterValue": "2000003",
372 "BriefDescription": "Cycles when offcore outstanding cacheable Core Data Read transactions are present in SuperQueue (SQ), queue to uncore.",
373 "CounterMask": "1",
374 "CounterHTOff": "0,1,2,3,4,5,6,7"
375 },
376 {
377 "PublicDescription": "This event counts the number of cases when the offcore requests buffer cannot take more entries for the core. This can happen when the superqueue does not contain eligible entries, or when L1D writeback pending FIFO requests is full.\nNote: Writeback pending FIFO has six entries.",
378 "EventCode": "0xB2",
379 "Counter": "0,1,2,3",
380 "UMask": "0x1",
381 "EventName": "OFFCORE_REQUESTS_BUFFER.SQ_FULL",
382 "SampleAfterValue": "2000003",
383 "BriefDescription": "Offcore requests buffer cannot take more entries for this thread core.",
384 "CounterHTOff": "0,1,2,3,4,5,6,7"
385 },
386 {
387 "PublicDescription": "This event counts L2 writebacks that access L2 cache.",
388 "EventCode": "0xF0",
389 "Counter": "0,1,2,3",
390 "UMask": "0x40",
391 "EventName": "L2_TRANS.L2_WB",
392 "SampleAfterValue": "200003",
393 "BriefDescription": "L2 writebacks that access L2 cache",
394 "CounterHTOff": "0,1,2,3,4,5,6,7"
395 },
396 {
397 "PublicDescription": "This event counts core-originated cacheable demand requests that miss the last level cache (LLC). Demand requests include loads, RFOs, and hardware prefetches from L1D, and instruction fetches from IFU.",
398 "EventCode": "0x2E",
399 "Counter": "0,1,2,3",
400 "UMask": "0x41",
401 "Errata": "SKL057",
402 "EventName": "LONGEST_LAT_CACHE.MISS",
403 "SampleAfterValue": "100003",
404 "BriefDescription": "Core-originated cacheable demand requests missed L3",
405 "CounterHTOff": "0,1,2,3,4,5,6,7"
406 },
407 {
408 "PublicDescription": "This event counts core-originated cacheable demand requests that refer to the last level cache (LLC). Demand requests include loads, RFOs, and hardware prefetches from L1D, and instruction fetches from IFU.",
409 "EventCode": "0x2E",
410 "Counter": "0,1,2,3",
411 "UMask": "0x4f",
412 "Errata": "SKL057",
413 "EventName": "LONGEST_LAT_CACHE.REFERENCE",
414 "SampleAfterValue": "100003",
415 "BriefDescription": "Core-originated cacheable demand requests that refer to L3",
416 "CounterHTOff": "0,1,2,3,4,5,6,7"
417 },
418 {
419 "PublicDescription": "This event counts the number of cache line split locks sent to the uncore.",
420 "EventCode": "0xF4",
421 "Counter": "0,1,2,3",
422 "UMask": "0x10",
423 "EventName": "SQ_MISC.SPLIT_LOCK",
424 "SampleAfterValue": "100003",
425 "BriefDescription": "Number of cache line split locks sent to uncore.",
426 "CounterHTOff": "0,1,2,3,4,5,6,7"
427 },
428 {
429 "PublicDescription": "Offcore response can be programmed only with a specific pair of event select and counter MSR, and with specific event codes and predefine mask bit value in a dedicated MSR to specify attributes of the offcore transaction.",
430 "EventCode": "0xB7, 0xBB",
431 "Counter": "0,1,2,3",
432 "UMask": "0x1",
433 "EventName": "OFFCORE_RESPONSE",
434 "SampleAfterValue": "100003",
435 "BriefDescription": "Offcore response can be programmed only with a specific pair of event select and counter MSR, and with specific event codes and predefine mask bit value in a dedicated MSR to specify attributes of the offcore transaction",
436 "CounterHTOff": "0,1,2,3"
437 },
438 {
439 "PublicDescription": "This event counts the number of demand Data Read requests that miss L2 cache. Only not rejected loads are counted.",
440 "EventCode": "0x24", 4 "EventCode": "0x24",
441 "Counter": "0,1,2,3", 5 "Counter": "0,1,2,3",
442 "UMask": "0x21", 6 "UMask": "0x21",
@@ -446,122 +10,123 @@
446 "CounterHTOff": "0,1,2,3,4,5,6,7" 10 "CounterHTOff": "0,1,2,3,4,5,6,7"
447 }, 11 },
448 { 12 {
449 "PublicDescription": "This event counts the number of demand Data Read requests that hit L2 cache. Only not rejected loads are counted.", 13 "PublicDescription": "Counts the RFO (Read-for-Ownership) requests that miss L2 cache.",
450 "EventCode": "0x24", 14 "EventCode": "0x24",
451 "Counter": "0,1,2,3", 15 "Counter": "0,1,2,3",
452 "UMask": "0x41", 16 "UMask": "0x22",
453 "EventName": "L2_RQSTS.DEMAND_DATA_RD_HIT", 17 "EventName": "L2_RQSTS.RFO_MISS",
454 "SampleAfterValue": "200003", 18 "SampleAfterValue": "200003",
455 "BriefDescription": "Demand Data Read requests that hit L2 cache", 19 "BriefDescription": "RFO requests that miss L2 cache",
456 "CounterHTOff": "0,1,2,3,4,5,6,7" 20 "CounterHTOff": "0,1,2,3,4,5,6,7"
457 }, 21 },
458 { 22 {
459 "PublicDescription": "This event counts the number of demand Data Read requests (including requests from L1D hardware prefetchers). These loads may hit or miss L2 cache. Only non rejected loads are counted.", 23 "PublicDescription": "Counts L2 cache misses when fetching instructions.",
460 "EventCode": "0x24", 24 "EventCode": "0x24",
461 "Counter": "0,1,2,3", 25 "Counter": "0,1,2,3",
462 "UMask": "0xe1", 26 "UMask": "0x24",
463 "EventName": "L2_RQSTS.ALL_DEMAND_DATA_RD", 27 "EventName": "L2_RQSTS.CODE_RD_MISS",
464 "SampleAfterValue": "200003", 28 "SampleAfterValue": "200003",
465 "BriefDescription": "Demand Data Read requests", 29 "BriefDescription": "L2 cache misses when fetching instructions",
466 "CounterHTOff": "0,1,2,3,4,5,6,7" 30 "CounterHTOff": "0,1,2,3,4,5,6,7"
467 }, 31 },
468 { 32 {
469 "PublicDescription": "This event counts the total number of RFO (read for ownership) requests to L2 cache. L2 RFO requests include both L1D demand RFO misses as well as L1D RFO prefetches.", 33 "PublicDescription": "Demand requests that miss L2 cache.",
470 "EventCode": "0x24", 34 "EventCode": "0x24",
471 "Counter": "0,1,2,3", 35 "Counter": "0,1,2,3",
472 "UMask": "0xe2", 36 "UMask": "0x27",
473 "EventName": "L2_RQSTS.ALL_RFO", 37 "EventName": "L2_RQSTS.ALL_DEMAND_MISS",
474 "SampleAfterValue": "200003", 38 "SampleAfterValue": "200003",
475 "BriefDescription": "RFO requests to L2 cache", 39 "BriefDescription": "Demand requests that miss L2 cache",
476 "CounterHTOff": "0,1,2,3,4,5,6,7" 40 "CounterHTOff": "0,1,2,3,4,5,6,7"
477 }, 41 },
478 { 42 {
479 "PublicDescription": "This event counts the total number of L2 code requests.", 43 "PublicDescription": "Counts requests from the L1/L2/L3 hardware prefetchers or Load software prefetches that miss L2 cache.",
480 "EventCode": "0x24", 44 "EventCode": "0x24",
481 "Counter": "0,1,2,3", 45 "Counter": "0,1,2,3",
482 "UMask": "0xe4", 46 "UMask": "0x38",
483 "EventName": "L2_RQSTS.ALL_CODE_RD", 47 "EventName": "L2_RQSTS.PF_MISS",
484 "SampleAfterValue": "200003", 48 "SampleAfterValue": "200003",
485 "BriefDescription": "L2 code requests", 49 "BriefDescription": "Requests from the L1/L2/L3 hardware prefetchers or Load software prefetches that miss L2 cache",
486 "CounterHTOff": "0,1,2,3,4,5,6,7" 50 "CounterHTOff": "0,1,2,3,4,5,6,7"
487 }, 51 },
488 { 52 {
489 "PublicDescription": "This event counts the total number of requests from the L2 hardware prefetchers.", 53 "PublicDescription": "All requests that miss L2 cache.",
490 "EventCode": "0x24", 54 "EventCode": "0x24",
491 "Counter": "0,1,2,3", 55 "Counter": "0,1,2,3",
492 "UMask": "0xf8", 56 "UMask": "0x3f",
493 "EventName": "L2_RQSTS.ALL_PF", 57 "EventName": "L2_RQSTS.MISS",
494 "SampleAfterValue": "200003", 58 "SampleAfterValue": "200003",
495 "BriefDescription": "Requests from the L1/L2/L3 hardware prefetchers or Load software prefetches", 59 "BriefDescription": "All requests that miss L2 cache",
496 "CounterHTOff": "0,1,2,3,4,5,6,7" 60 "CounterHTOff": "0,1,2,3,4,5,6,7"
497 }, 61 },
498 { 62 {
499 "PublicDescription": "Requests from the L1/L2/L3 hardware prefetchers or Load software prefetches that miss L2 cache.", 63 "PublicDescription": "Counts the number of demand Data Read requests that hit L2 cache. Only non rejected loads are counted.",
500 "EventCode": "0x24", 64 "EventCode": "0x24",
501 "Counter": "0,1,2,3", 65 "Counter": "0,1,2,3",
502 "UMask": "0x38", 66 "UMask": "0x41",
503 "EventName": "L2_RQSTS.PF_MISS", 67 "EventName": "L2_RQSTS.DEMAND_DATA_RD_HIT",
504 "SampleAfterValue": "200003", 68 "SampleAfterValue": "200003",
505 "BriefDescription": "Requests from the L1/L2/L3 hardware prefetchers or Load software prefetches that miss L2 cache", 69 "BriefDescription": "Demand Data Read requests that hit L2 cache",
506 "CounterHTOff": "0,1,2,3,4,5,6,7" 70 "CounterHTOff": "0,1,2,3,4,5,6,7"
507 }, 71 },
508 { 72 {
509 "PublicDescription": "Requests from the L1/L2/L3 hardware prefetchers or Load software prefetches that hit L2 cache.", 73 "PublicDescription": "Counts the RFO (Read-for-Ownership) requests that hit L2 cache.",
510 "EventCode": "0x24", 74 "EventCode": "0x24",
511 "Counter": "0,1,2,3", 75 "Counter": "0,1,2,3",
512 "UMask": "0xd8", 76 "UMask": "0x42",
513 "EventName": "L2_RQSTS.PF_HIT", 77 "EventName": "L2_RQSTS.RFO_HIT",
514 "SampleAfterValue": "200003", 78 "SampleAfterValue": "200003",
515 "BriefDescription": "Requests from the L1/L2/L3 hardware prefetchers or Load software prefetches that hit L2 cache", 79 "BriefDescription": "RFO requests that hit L2 cache",
516 "CounterHTOff": "0,1,2,3,4,5,6,7" 80 "CounterHTOff": "0,1,2,3,4,5,6,7"
517 }, 81 },
518 { 82 {
519 "PublicDescription": "RFO requests that hit L2 cache.", 83 "PublicDescription": "Counts L2 cache hits when fetching instructions, code reads.",
520 "EventCode": "0x24", 84 "EventCode": "0x24",
521 "Counter": "0,1,2,3", 85 "Counter": "0,1,2,3",
522 "UMask": "0x42", 86 "UMask": "0x44",
523 "EventName": "L2_RQSTS.RFO_HIT", 87 "EventName": "L2_RQSTS.CODE_RD_HIT",
524 "SampleAfterValue": "200003", 88 "SampleAfterValue": "200003",
525 "BriefDescription": "RFO requests that hit L2 cache", 89 "BriefDescription": "L2 cache hits when fetching instructions, code reads.",
526 "CounterHTOff": "0,1,2,3,4,5,6,7" 90 "CounterHTOff": "0,1,2,3,4,5,6,7"
527 }, 91 },
528 { 92 {
529 "PublicDescription": "RFO requests that miss L2 cache.", 93 "PublicDescription": "Counts requests from the L1/L2/L3 hardware prefetchers or Load software prefetches that hit L2 cache.",
530 "EventCode": "0x24", 94 "EventCode": "0x24",
531 "Counter": "0,1,2,3", 95 "Counter": "0,1,2,3",
532 "UMask": "0x22", 96 "UMask": "0xd8",
533 "EventName": "L2_RQSTS.RFO_MISS", 97 "EventName": "L2_RQSTS.PF_HIT",
534 "SampleAfterValue": "200003", 98 "SampleAfterValue": "200003",
535 "BriefDescription": "RFO requests that miss L2 cache", 99 "BriefDescription": "Requests from the L1/L2/L3 hardware prefetchers or Load software prefetches that hit L2 cache",
536 "CounterHTOff": "0,1,2,3,4,5,6,7" 100 "CounterHTOff": "0,1,2,3,4,5,6,7"
537 }, 101 },
538 { 102 {
103 "PublicDescription": "Counts the number of demand Data Read requests (including requests from L1D hardware prefetchers). These loads may hit or miss L2 cache. Only non rejected loads are counted.",
539 "EventCode": "0x24", 104 "EventCode": "0x24",
540 "Counter": "0,1,2,3", 105 "Counter": "0,1,2,3",
541 "UMask": "0x44", 106 "UMask": "0xe1",
542 "EventName": "L2_RQSTS.CODE_RD_HIT", 107 "EventName": "L2_RQSTS.ALL_DEMAND_DATA_RD",
543 "SampleAfterValue": "200003", 108 "SampleAfterValue": "200003",
544 "BriefDescription": "L2 cache hits when fetching instructions, code reads.", 109 "BriefDescription": "Demand Data Read requests",
545 "CounterHTOff": "0,1,2,3,4,5,6,7" 110 "CounterHTOff": "0,1,2,3,4,5,6,7"
546 }, 111 },
547 { 112 {
548 "PublicDescription": "L2 cache misses when fetching instructions.", 113 "PublicDescription": "Counts the total number of RFO (read for ownership) requests to L2 cache. L2 RFO requests include both L1D demand RFO misses as well as L1D RFO prefetches.",
549 "EventCode": "0x24", 114 "EventCode": "0x24",
550 "Counter": "0,1,2,3", 115 "Counter": "0,1,2,3",
551 "UMask": "0x24", 116 "UMask": "0xe2",
552 "EventName": "L2_RQSTS.CODE_RD_MISS", 117 "EventName": "L2_RQSTS.ALL_RFO",
553 "SampleAfterValue": "200003", 118 "SampleAfterValue": "200003",
554 "BriefDescription": "L2 cache misses when fetching instructions", 119 "BriefDescription": "RFO requests to L2 cache",
555 "CounterHTOff": "0,1,2,3,4,5,6,7" 120 "CounterHTOff": "0,1,2,3,4,5,6,7"
556 }, 121 },
557 { 122 {
558 "PublicDescription": "Demand requests that miss L2 cache.", 123 "PublicDescription": "Counts the total number of L2 code requests.",
559 "EventCode": "0x24", 124 "EventCode": "0x24",
560 "Counter": "0,1,2,3", 125 "Counter": "0,1,2,3",
561 "UMask": "0x27", 126 "UMask": "0xe4",
562 "EventName": "L2_RQSTS.ALL_DEMAND_MISS", 127 "EventName": "L2_RQSTS.ALL_CODE_RD",
563 "SampleAfterValue": "200003", 128 "SampleAfterValue": "200003",
564 "BriefDescription": "Demand requests that miss L2 cache", 129 "BriefDescription": "L2 code requests",
565 "CounterHTOff": "0,1,2,3,4,5,6,7" 130 "CounterHTOff": "0,1,2,3,4,5,6,7"
566 }, 131 },
567 { 132 {
@@ -575,13 +140,13 @@
575 "CounterHTOff": "0,1,2,3,4,5,6,7" 140 "CounterHTOff": "0,1,2,3,4,5,6,7"
576 }, 141 },
577 { 142 {
578 "PublicDescription": "All requests that miss L2 cache.", 143 "PublicDescription": "Counts the total number of requests from the L2 hardware prefetchers.",
579 "EventCode": "0x24", 144 "EventCode": "0x24",
580 "Counter": "0,1,2,3", 145 "Counter": "0,1,2,3",
581 "UMask": "0x3f", 146 "UMask": "0xf8",
582 "EventName": "L2_RQSTS.MISS", 147 "EventName": "L2_RQSTS.ALL_PF",
583 "SampleAfterValue": "200003", 148 "SampleAfterValue": "200003",
584 "BriefDescription": "All requests that miss L2 cache", 149 "BriefDescription": "Requests from the L1/L2/L3 hardware prefetchers or Load software prefetches",
585 "CounterHTOff": "0,1,2,3,4,5,6,7" 150 "CounterHTOff": "0,1,2,3,4,5,6,7"
586 }, 151 },
587 { 152 {
@@ -595,62 +160,45 @@
595 "CounterHTOff": "0,1,2,3,4,5,6,7" 160 "CounterHTOff": "0,1,2,3,4,5,6,7"
596 }, 161 },
597 { 162 {
598 "EventCode": "0xF2", 163 "PublicDescription": "Counts core-originated cacheable requests that miss the L3 cache (Longest Latency cache). Requests include data and code reads, Reads-for-Ownership (RFOs), speculative accesses and hardware prefetches from L1 and L2. It does not include all misses to the L3.",
599 "Counter": "0,1,2,3", 164 "EventCode": "0x2E",
600 "UMask": "0x1",
601 "EventName": "L2_LINES_OUT.SILENT",
602 "SampleAfterValue": "200003",
603 "BriefDescription": "Counts the number of lines that are silently dropped by L2 cache when triggered by an L2 cache fill. These lines are typically in Shared or Exclusive state. A non-threaded event.",
604 "CounterHTOff": "0,1,2,3,4,5,6,7"
605 },
606 {
607 "EventCode": "0xF2",
608 "Counter": "0,1,2,3",
609 "UMask": "0x2",
610 "EventName": "L2_LINES_OUT.NON_SILENT",
611 "SampleAfterValue": "200003",
612 "BriefDescription": "Counts the number of lines that are evicted by L2 cache when triggered by an L2 cache fill. Those lines are in Modified state. Modified lines are written back to L3",
613 "CounterHTOff": "0,1,2,3,4,5,6,7"
614 },
615 {
616 "PublicDescription": "Counts the number of lines that have been hardware prefetched but not used and now evicted by L2 cache.",
617 "EventCode": "0xF2",
618 "Counter": "0,1,2,3", 165 "Counter": "0,1,2,3",
619 "UMask": "0x4", 166 "UMask": "0x41",
620 "EventName": "L2_LINES_OUT.USELESS_PREF", 167 "Errata": "SKL057",
621 "SampleAfterValue": "200003", 168 "EventName": "LONGEST_LAT_CACHE.MISS",
622 "BriefDescription": "Counts the number of lines that have been hardware prefetched but not used and now evicted by L2 cache", 169 "SampleAfterValue": "100003",
170 "BriefDescription": "Core-originated cacheable demand requests missed L3",
623 "CounterHTOff": "0,1,2,3,4,5,6,7" 171 "CounterHTOff": "0,1,2,3,4,5,6,7"
624 }, 172 },
625 { 173 {
626 "PublicDescription": "This event counts the number of L2 cache lines filling the L2. Counting does not cover rejects.", 174 "PublicDescription": "Counts core-originated cacheable requests to the L3 cache (Longest Latency cache). Requests include data and code reads, Reads-for-Ownership (RFOs), speculative accesses and hardware prefetches from L1 and L2. It does not include all accesses to the L3.",
627 "EventCode": "0xF1", 175 "EventCode": "0x2E",
628 "Counter": "0,1,2,3", 176 "Counter": "0,1,2,3",
629 "UMask": "0x1f", 177 "UMask": "0x4f",
630 "EventName": "L2_LINES_IN.ALL", 178 "Errata": "SKL057",
179 "EventName": "LONGEST_LAT_CACHE.REFERENCE",
631 "SampleAfterValue": "100003", 180 "SampleAfterValue": "100003",
632 "BriefDescription": "L2 cache lines filling L2", 181 "BriefDescription": "Core-originated cacheable demand requests that refer to L3",
633 "CounterHTOff": "0,1,2,3,4,5,6,7" 182 "CounterHTOff": "0,1,2,3,4,5,6,7"
634 }, 183 },
635 { 184 {
636 "PublicDescription": "This event counts the number of offcore outstanding Code Reads transactions in the super queue every cycle. The 'Offcore outstanding' state of the transaction lasts from the L2 miss until the sending transaction completion to requestor (SQ deallocation). See the corresponding Umask under OFFCORE_REQUESTS.", 185 "PublicDescription": "Counts duration of L1D miss outstanding, that is each cycle number of Fill Buffers (FB) outstanding required by Demand Reads. FB either is held by demand loads, or it is held by non-demand loads and gets hit at least once by demand. The valid outstanding interval is defined until the FB deallocation by one of the following ways: from FB allocation, if FB is allocated by demand from the demand Hit FB, if it is allocated by hardware or software prefetch.Note: In the L1D, a Demand Read contains cacheable or noncacheable demand loads, including ones causing cache-line splits and reads due to page walks resulted from any request type.",
637 "EventCode": "0x60", 186 "EventCode": "0x48",
638 "Counter": "0,1,2,3", 187 "Counter": "0,1,2,3",
639 "UMask": "0x2", 188 "UMask": "0x1",
640 "EventName": "OFFCORE_REQUESTS_OUTSTANDING.CYCLES_WITH_DEMAND_CODE_RD", 189 "EventName": "L1D_PEND_MISS.PENDING",
641 "SampleAfterValue": "2000003", 190 "SampleAfterValue": "2000003",
642 "BriefDescription": "Cycles with offcore outstanding Code Reads transactions in the SuperQueue (SQ), queue to uncore.", 191 "BriefDescription": "L1D miss outstandings duration in cycles",
643 "CounterMask": "1",
644 "CounterHTOff": "0,1,2,3,4,5,6,7" 192 "CounterHTOff": "0,1,2,3,4,5,6,7"
645 }, 193 },
646 { 194 {
647 "PublicDescription": "This event counts the number of offcore outstanding demand rfo Reads transactions in the super queue every cycle. The 'Offcore outstanding' state of the transaction lasts from the L2 miss until the sending transaction completion to requestor (SQ deallocation). See the corresponding Umask under OFFCORE_REQUESTS.", 195 "PublicDescription": "Counts duration of L1D miss outstanding in cycles.",
648 "EventCode": "0x60", 196 "EventCode": "0x48",
649 "Counter": "0,1,2,3", 197 "Counter": "0,1,2,3",
650 "UMask": "0x4", 198 "UMask": "0x1",
651 "EventName": "OFFCORE_REQUESTS_OUTSTANDING.CYCLES_WITH_DEMAND_RFO", 199 "EventName": "L1D_PEND_MISS.PENDING_CYCLES",
652 "SampleAfterValue": "2000003", 200 "SampleAfterValue": "2000003",
653 "BriefDescription": "Cycles with offcore outstanding demand rfo reads transactions in SuperQueue (SQ), queue to uncore.", 201 "BriefDescription": "Cycles with L1D load Misses outstanding.",
654 "CounterMask": "1", 202 "CounterMask": "1",
655 "CounterHTOff": "0,1,2,3,4,5,6,7" 203 "CounterHTOff": "0,1,2,3,4,5,6,7"
656 }, 204 },
@@ -666,3121 +214,483 @@
666 "CounterHTOff": "0,1,2,3,4,5,6,7" 214 "CounterHTOff": "0,1,2,3,4,5,6,7"
667 }, 215 },
668 { 216 {
669 "EventCode": "0x60", 217 "PublicDescription": "Number of times a request needed a FB (Fill Buffer) entry but there was no entry available for it. A request includes cacheable/uncacheable demands that are load, store or SW prefetch instructions.",
218 "EventCode": "0x48",
670 "Counter": "0,1,2,3", 219 "Counter": "0,1,2,3",
671 "UMask": "0x1", 220 "UMask": "0x2",
672 "EventName": "OFFCORE_REQUESTS_OUTSTANDING.DEMAND_DATA_RD_GE_6", 221 "EventName": "L1D_PEND_MISS.FB_FULL",
673 "SampleAfterValue": "2000003", 222 "SampleAfterValue": "2000003",
674 "BriefDescription": "Cycles with at least 6 offcore outstanding Demand Data Read transactions in uncore queue.", 223 "BriefDescription": "Number of times a request needed a FB entry but there was no entry available for it. That is the FB unavailability was dominant reason for blocking the request. A request includes cacheable/uncacheable demands that is load, store or SW prefetch.",
675 "CounterMask": "6",
676 "CounterHTOff": "0,1,2,3,4,5,6,7"
677 },
678 {
679 "EventCode": "0xF2",
680 "Counter": "0,1,2,3",
681 "UMask": "0x4",
682 "EventName": "L2_LINES_OUT.USELESS_HWPF",
683 "SampleAfterValue": "200003",
684 "BriefDescription": "Counts the number of lines that have been hardware prefetched but not used and now evicted by L2 cache",
685 "CounterHTOff": "0,1,2,3,4,5,6,7" 224 "CounterHTOff": "0,1,2,3,4,5,6,7"
686 }, 225 },
687 { 226 {
688 "EventCode": "0xB7, 0xBB", 227 "PublicDescription": "Counts L1D data line replacements including opportunistic replacements, and replacements that require stall-for-replace or block-for-replace.",
689 "MSRValue": "0x3fc0408000 ", 228 "EventCode": "0x51",
690 "Counter": "0,1,2,3",
691 "UMask": "0x1",
692 "EventName": "OFFCORE_RESPONSE.OTHER.L4_HIT_LOCAL_L4.ANY_SNOOP",
693 "MSRIndex": "0x1a6,0x1a7",
694 "SampleAfterValue": "100003",
695 "BriefDescription": "OTHER & L4_HIT_LOCAL_L4 & ANY_SNOOP",
696 "Offcore": "1",
697 "CounterHTOff": "0,1,2,3"
698 },
699 {
700 "EventCode": "0xB7, 0xBB",
701 "MSRValue": "0x1000408000 ",
702 "Counter": "0,1,2,3",
703 "UMask": "0x1",
704 "EventName": "OFFCORE_RESPONSE.OTHER.L4_HIT_LOCAL_L4.SNOOP_HITM",
705 "MSRIndex": "0x1a6,0x1a7",
706 "SampleAfterValue": "100003",
707 "BriefDescription": "OTHER & L4_HIT_LOCAL_L4 & SNOOP_HITM",
708 "Offcore": "1",
709 "CounterHTOff": "0,1,2,3"
710 },
711 {
712 "EventCode": "0xB7, 0xBB",
713 "MSRValue": "0x0400408000 ",
714 "Counter": "0,1,2,3",
715 "UMask": "0x1",
716 "EventName": "OFFCORE_RESPONSE.OTHER.L4_HIT_LOCAL_L4.SNOOP_HIT_NO_FWD",
717 "MSRIndex": "0x1a6,0x1a7",
718 "SampleAfterValue": "100003",
719 "BriefDescription": "OTHER & L4_HIT_LOCAL_L4 & SNOOP_HIT_NO_FWD",
720 "Offcore": "1",
721 "CounterHTOff": "0,1,2,3"
722 },
723 {
724 "EventCode": "0xB7, 0xBB",
725 "MSRValue": "0x0200408000 ",
726 "Counter": "0,1,2,3",
727 "UMask": "0x1",
728 "EventName": "OFFCORE_RESPONSE.OTHER.L4_HIT_LOCAL_L4.SNOOP_MISS",
729 "MSRIndex": "0x1a6,0x1a7",
730 "SampleAfterValue": "100003",
731 "BriefDescription": "OTHER & L4_HIT_LOCAL_L4 & SNOOP_MISS",
732 "Offcore": "1",
733 "CounterHTOff": "0,1,2,3"
734 },
735 {
736 "EventCode": "0xB7, 0xBB",
737 "MSRValue": "0x0100408000 ",
738 "Counter": "0,1,2,3",
739 "UMask": "0x1",
740 "EventName": "OFFCORE_RESPONSE.OTHER.L4_HIT_LOCAL_L4.SNOOP_NOT_NEEDED",
741 "MSRIndex": "0x1a6,0x1a7",
742 "SampleAfterValue": "100003",
743 "BriefDescription": "OTHER & L4_HIT_LOCAL_L4 & SNOOP_NOT_NEEDED",
744 "Offcore": "1",
745 "CounterHTOff": "0,1,2,3"
746 },
747 {
748 "EventCode": "0xB7, 0xBB",
749 "MSRValue": "0x0080408000 ",
750 "Counter": "0,1,2,3",
751 "UMask": "0x1",
752 "EventName": "OFFCORE_RESPONSE.OTHER.L4_HIT_LOCAL_L4.SNOOP_NONE",
753 "MSRIndex": "0x1a6,0x1a7",
754 "SampleAfterValue": "100003",
755 "BriefDescription": "OTHER & L4_HIT_LOCAL_L4 & SNOOP_NONE",
756 "Offcore": "1",
757 "CounterHTOff": "0,1,2,3"
758 },
759 {
760 "EventCode": "0xB7, 0xBB",
761 "MSRValue": "0x0040408000 ",
762 "Counter": "0,1,2,3",
763 "UMask": "0x1",
764 "EventName": "OFFCORE_RESPONSE.OTHER.L4_HIT_LOCAL_L4.SPL_HIT",
765 "MSRIndex": "0x1a6,0x1a7",
766 "SampleAfterValue": "100003",
767 "BriefDescription": "OTHER & L4_HIT_LOCAL_L4 & SPL_HIT",
768 "Offcore": "1",
769 "CounterHTOff": "0,1,2,3"
770 },
771 {
772 "EventCode": "0xB7, 0xBB",
773 "MSRValue": "0x3fc01c8000 ",
774 "Counter": "0,1,2,3",
775 "UMask": "0x1",
776 "EventName": "OFFCORE_RESPONSE.OTHER.L3_HIT.ANY_SNOOP",
777 "MSRIndex": "0x1a6,0x1a7",
778 "SampleAfterValue": "100003",
779 "BriefDescription": "OTHER & L3_HIT & ANY_SNOOP",
780 "Offcore": "1",
781 "CounterHTOff": "0,1,2,3"
782 },
783 {
784 "EventCode": "0xB7, 0xBB",
785 "MSRValue": "0x10001c8000 ",
786 "Counter": "0,1,2,3",
787 "UMask": "0x1",
788 "EventName": "OFFCORE_RESPONSE.OTHER.L3_HIT.SNOOP_HITM",
789 "MSRIndex": "0x1a6,0x1a7",
790 "SampleAfterValue": "100003",
791 "BriefDescription": "OTHER & L3_HIT & SNOOP_HITM",
792 "Offcore": "1",
793 "CounterHTOff": "0,1,2,3"
794 },
795 {
796 "EventCode": "0xB7, 0xBB",
797 "MSRValue": "0x04001c8000 ",
798 "Counter": "0,1,2,3",
799 "UMask": "0x1",
800 "EventName": "OFFCORE_RESPONSE.OTHER.L3_HIT.SNOOP_HIT_NO_FWD",
801 "MSRIndex": "0x1a6,0x1a7",
802 "SampleAfterValue": "100003",
803 "BriefDescription": "Counts any other requests that hit in the L3 and the snoops to sibling cores hit in either E/S state and the line is not forwarded.",
804 "Offcore": "1",
805 "CounterHTOff": "0,1,2,3"
806 },
807 {
808 "EventCode": "0xB7, 0xBB",
809 "MSRValue": "0x02001c8000 ",
810 "Counter": "0,1,2,3",
811 "UMask": "0x1",
812 "EventName": "OFFCORE_RESPONSE.OTHER.L3_HIT.SNOOP_MISS",
813 "MSRIndex": "0x1a6,0x1a7",
814 "SampleAfterValue": "100003",
815 "BriefDescription": "Counts any other requests that hit in the L3 and the snoops sent to sibling cores return clean response.",
816 "Offcore": "1",
817 "CounterHTOff": "0,1,2,3"
818 },
819 {
820 "EventCode": "0xB7, 0xBB",
821 "MSRValue": "0x01001c8000 ",
822 "Counter": "0,1,2,3",
823 "UMask": "0x1",
824 "EventName": "OFFCORE_RESPONSE.OTHER.L3_HIT.SNOOP_NOT_NEEDED",
825 "MSRIndex": "0x1a6,0x1a7",
826 "SampleAfterValue": "100003",
827 "BriefDescription": "Counts any other requests that hit in the L3 and sibling core snoops are not needed as either the core-valid bit is not set or the shared line is present in multiple cores.",
828 "Offcore": "1",
829 "CounterHTOff": "0,1,2,3"
830 },
831 {
832 "EventCode": "0xB7, 0xBB",
833 "MSRValue": "0x00801c8000 ",
834 "Counter": "0,1,2,3",
835 "UMask": "0x1",
836 "EventName": "OFFCORE_RESPONSE.OTHER.L3_HIT.SNOOP_NONE",
837 "MSRIndex": "0x1a6,0x1a7",
838 "SampleAfterValue": "100003",
839 "BriefDescription": "OTHER & L3_HIT & SNOOP_NONE",
840 "Offcore": "1",
841 "CounterHTOff": "0,1,2,3"
842 },
843 {
844 "EventCode": "0xB7, 0xBB",
845 "MSRValue": "0x00401c8000 ",
846 "Counter": "0,1,2,3",
847 "UMask": "0x1",
848 "EventName": "OFFCORE_RESPONSE.OTHER.L3_HIT.SPL_HIT",
849 "MSRIndex": "0x1a6,0x1a7",
850 "SampleAfterValue": "100003",
851 "BriefDescription": "OTHER & L3_HIT & SPL_HIT",
852 "Offcore": "1",
853 "CounterHTOff": "0,1,2,3"
854 },
855 {
856 "EventCode": "0xB7, 0xBB",
857 "MSRValue": "0x3fc0108000 ",
858 "Counter": "0,1,2,3",
859 "UMask": "0x1",
860 "EventName": "OFFCORE_RESPONSE.OTHER.L3_HIT_S.ANY_SNOOP",
861 "MSRIndex": "0x1a6,0x1a7",
862 "SampleAfterValue": "100003",
863 "BriefDescription": "OTHER & L3_HIT_S & ANY_SNOOP",
864 "Offcore": "1",
865 "CounterHTOff": "0,1,2,3"
866 },
867 {
868 "EventCode": "0xB7, 0xBB",
869 "MSRValue": "0x1000108000 ",
870 "Counter": "0,1,2,3",
871 "UMask": "0x1",
872 "EventName": "OFFCORE_RESPONSE.OTHER.L3_HIT_S.SNOOP_HITM",
873 "MSRIndex": "0x1a6,0x1a7",
874 "SampleAfterValue": "100003",
875 "BriefDescription": "OTHER & L3_HIT_S & SNOOP_HITM",
876 "Offcore": "1",
877 "CounterHTOff": "0,1,2,3"
878 },
879 {
880 "EventCode": "0xB7, 0xBB",
881 "MSRValue": "0x0400108000 ",
882 "Counter": "0,1,2,3",
883 "UMask": "0x1",
884 "EventName": "OFFCORE_RESPONSE.OTHER.L3_HIT_S.SNOOP_HIT_NO_FWD",
885 "MSRIndex": "0x1a6,0x1a7",
886 "SampleAfterValue": "100003",
887 "BriefDescription": "OTHER & L3_HIT_S & SNOOP_HIT_NO_FWD",
888 "Offcore": "1",
889 "CounterHTOff": "0,1,2,3"
890 },
891 {
892 "EventCode": "0xB7, 0xBB",
893 "MSRValue": "0x0200108000 ",
894 "Counter": "0,1,2,3",
895 "UMask": "0x1",
896 "EventName": "OFFCORE_RESPONSE.OTHER.L3_HIT_S.SNOOP_MISS",
897 "MSRIndex": "0x1a6,0x1a7",
898 "SampleAfterValue": "100003",
899 "BriefDescription": "OTHER & L3_HIT_S & SNOOP_MISS",
900 "Offcore": "1",
901 "CounterHTOff": "0,1,2,3"
902 },
903 {
904 "EventCode": "0xB7, 0xBB",
905 "MSRValue": "0x0100108000 ",
906 "Counter": "0,1,2,3",
907 "UMask": "0x1",
908 "EventName": "OFFCORE_RESPONSE.OTHER.L3_HIT_S.SNOOP_NOT_NEEDED",
909 "MSRIndex": "0x1a6,0x1a7",
910 "SampleAfterValue": "100003",
911 "BriefDescription": "OTHER & L3_HIT_S & SNOOP_NOT_NEEDED",
912 "Offcore": "1",
913 "CounterHTOff": "0,1,2,3"
914 },
915 {
916 "EventCode": "0xB7, 0xBB",
917 "MSRValue": "0x0080108000 ",
918 "Counter": "0,1,2,3",
919 "UMask": "0x1",
920 "EventName": "OFFCORE_RESPONSE.OTHER.L3_HIT_S.SNOOP_NONE",
921 "MSRIndex": "0x1a6,0x1a7",
922 "SampleAfterValue": "100003",
923 "BriefDescription": "OTHER & L3_HIT_S & SNOOP_NONE",
924 "Offcore": "1",
925 "CounterHTOff": "0,1,2,3"
926 },
927 {
928 "EventCode": "0xB7, 0xBB",
929 "MSRValue": "0x0040108000 ",
930 "Counter": "0,1,2,3",
931 "UMask": "0x1",
932 "EventName": "OFFCORE_RESPONSE.OTHER.L3_HIT_S.SPL_HIT",
933 "MSRIndex": "0x1a6,0x1a7",
934 "SampleAfterValue": "100003",
935 "BriefDescription": "OTHER & L3_HIT_S & SPL_HIT",
936 "Offcore": "1",
937 "CounterHTOff": "0,1,2,3"
938 },
939 {
940 "EventCode": "0xB7, 0xBB",
941 "MSRValue": "0x3fc0088000 ",
942 "Counter": "0,1,2,3",
943 "UMask": "0x1",
944 "EventName": "OFFCORE_RESPONSE.OTHER.L3_HIT_E.ANY_SNOOP",
945 "MSRIndex": "0x1a6,0x1a7",
946 "SampleAfterValue": "100003",
947 "BriefDescription": "OTHER & L3_HIT_E & ANY_SNOOP",
948 "Offcore": "1",
949 "CounterHTOff": "0,1,2,3"
950 },
951 {
952 "EventCode": "0xB7, 0xBB",
953 "MSRValue": "0x1000088000 ",
954 "Counter": "0,1,2,3",
955 "UMask": "0x1",
956 "EventName": "OFFCORE_RESPONSE.OTHER.L3_HIT_E.SNOOP_HITM",
957 "MSRIndex": "0x1a6,0x1a7",
958 "SampleAfterValue": "100003",
959 "BriefDescription": "OTHER & L3_HIT_E & SNOOP_HITM",
960 "Offcore": "1",
961 "CounterHTOff": "0,1,2,3"
962 },
963 {
964 "EventCode": "0xB7, 0xBB",
965 "MSRValue": "0x0400088000 ",
966 "Counter": "0,1,2,3",
967 "UMask": "0x1",
968 "EventName": "OFFCORE_RESPONSE.OTHER.L3_HIT_E.SNOOP_HIT_NO_FWD",
969 "MSRIndex": "0x1a6,0x1a7",
970 "SampleAfterValue": "100003",
971 "BriefDescription": "OTHER & L3_HIT_E & SNOOP_HIT_NO_FWD",
972 "Offcore": "1",
973 "CounterHTOff": "0,1,2,3"
974 },
975 {
976 "EventCode": "0xB7, 0xBB",
977 "MSRValue": "0x0200088000 ",
978 "Counter": "0,1,2,3",
979 "UMask": "0x1",
980 "EventName": "OFFCORE_RESPONSE.OTHER.L3_HIT_E.SNOOP_MISS",
981 "MSRIndex": "0x1a6,0x1a7",
982 "SampleAfterValue": "100003",
983 "BriefDescription": "OTHER & L3_HIT_E & SNOOP_MISS",
984 "Offcore": "1",
985 "CounterHTOff": "0,1,2,3"
986 },
987 {
988 "EventCode": "0xB7, 0xBB",
989 "MSRValue": "0x0100088000 ",
990 "Counter": "0,1,2,3",
991 "UMask": "0x1",
992 "EventName": "OFFCORE_RESPONSE.OTHER.L3_HIT_E.SNOOP_NOT_NEEDED",
993 "MSRIndex": "0x1a6,0x1a7",
994 "SampleAfterValue": "100003",
995 "BriefDescription": "OTHER & L3_HIT_E & SNOOP_NOT_NEEDED",
996 "Offcore": "1",
997 "CounterHTOff": "0,1,2,3"
998 },
999 {
1000 "EventCode": "0xB7, 0xBB",
1001 "MSRValue": "0x0080088000 ",
1002 "Counter": "0,1,2,3",
1003 "UMask": "0x1",
1004 "EventName": "OFFCORE_RESPONSE.OTHER.L3_HIT_E.SNOOP_NONE",
1005 "MSRIndex": "0x1a6,0x1a7",
1006 "SampleAfterValue": "100003",
1007 "BriefDescription": "OTHER & L3_HIT_E & SNOOP_NONE",
1008 "Offcore": "1",
1009 "CounterHTOff": "0,1,2,3"
1010 },
1011 {
1012 "EventCode": "0xB7, 0xBB",
1013 "MSRValue": "0x0040088000 ",
1014 "Counter": "0,1,2,3",
1015 "UMask": "0x1",
1016 "EventName": "OFFCORE_RESPONSE.OTHER.L3_HIT_E.SPL_HIT",
1017 "MSRIndex": "0x1a6,0x1a7",
1018 "SampleAfterValue": "100003",
1019 "BriefDescription": "OTHER & L3_HIT_E & SPL_HIT",
1020 "Offcore": "1",
1021 "CounterHTOff": "0,1,2,3"
1022 },
1023 {
1024 "EventCode": "0xB7, 0xBB",
1025 "MSRValue": "0x3fc0048000 ",
1026 "Counter": "0,1,2,3",
1027 "UMask": "0x1",
1028 "EventName": "OFFCORE_RESPONSE.OTHER.L3_HIT_M.ANY_SNOOP",
1029 "MSRIndex": "0x1a6,0x1a7",
1030 "SampleAfterValue": "100003",
1031 "BriefDescription": "OTHER & L3_HIT_M & ANY_SNOOP",
1032 "Offcore": "1",
1033 "CounterHTOff": "0,1,2,3"
1034 },
1035 {
1036 "EventCode": "0xB7, 0xBB",
1037 "MSRValue": "0x1000048000 ",
1038 "Counter": "0,1,2,3",
1039 "UMask": "0x1",
1040 "EventName": "OFFCORE_RESPONSE.OTHER.L3_HIT_M.SNOOP_HITM",
1041 "MSRIndex": "0x1a6,0x1a7",
1042 "SampleAfterValue": "100003",
1043 "BriefDescription": "OTHER & L3_HIT_M & SNOOP_HITM",
1044 "Offcore": "1",
1045 "CounterHTOff": "0,1,2,3"
1046 },
1047 {
1048 "EventCode": "0xB7, 0xBB",
1049 "MSRValue": "0x0400048000 ",
1050 "Counter": "0,1,2,3",
1051 "UMask": "0x1",
1052 "EventName": "OFFCORE_RESPONSE.OTHER.L3_HIT_M.SNOOP_HIT_NO_FWD",
1053 "MSRIndex": "0x1a6,0x1a7",
1054 "SampleAfterValue": "100003",
1055 "BriefDescription": "OTHER & L3_HIT_M & SNOOP_HIT_NO_FWD",
1056 "Offcore": "1",
1057 "CounterHTOff": "0,1,2,3"
1058 },
1059 {
1060 "EventCode": "0xB7, 0xBB",
1061 "MSRValue": "0x0200048000 ",
1062 "Counter": "0,1,2,3",
1063 "UMask": "0x1",
1064 "EventName": "OFFCORE_RESPONSE.OTHER.L3_HIT_M.SNOOP_MISS",
1065 "MSRIndex": "0x1a6,0x1a7",
1066 "SampleAfterValue": "100003",
1067 "BriefDescription": "OTHER & L3_HIT_M & SNOOP_MISS",
1068 "Offcore": "1",
1069 "CounterHTOff": "0,1,2,3"
1070 },
1071 {
1072 "EventCode": "0xB7, 0xBB",
1073 "MSRValue": "0x0100048000 ",
1074 "Counter": "0,1,2,3",
1075 "UMask": "0x1",
1076 "EventName": "OFFCORE_RESPONSE.OTHER.L3_HIT_M.SNOOP_NOT_NEEDED",
1077 "MSRIndex": "0x1a6,0x1a7",
1078 "SampleAfterValue": "100003",
1079 "BriefDescription": "OTHER & L3_HIT_M & SNOOP_NOT_NEEDED",
1080 "Offcore": "1",
1081 "CounterHTOff": "0,1,2,3"
1082 },
1083 {
1084 "EventCode": "0xB7, 0xBB",
1085 "MSRValue": "0x0080048000 ",
1086 "Counter": "0,1,2,3",
1087 "UMask": "0x1",
1088 "EventName": "OFFCORE_RESPONSE.OTHER.L3_HIT_M.SNOOP_NONE",
1089 "MSRIndex": "0x1a6,0x1a7",
1090 "SampleAfterValue": "100003",
1091 "BriefDescription": "OTHER & L3_HIT_M & SNOOP_NONE",
1092 "Offcore": "1",
1093 "CounterHTOff": "0,1,2,3"
1094 },
1095 {
1096 "EventCode": "0xB7, 0xBB",
1097 "MSRValue": "0x0040048000 ",
1098 "Counter": "0,1,2,3",
1099 "UMask": "0x1",
1100 "EventName": "OFFCORE_RESPONSE.OTHER.L3_HIT_M.SPL_HIT",
1101 "MSRIndex": "0x1a6,0x1a7",
1102 "SampleAfterValue": "100003",
1103 "BriefDescription": "OTHER & L3_HIT_M & SPL_HIT",
1104 "Offcore": "1",
1105 "CounterHTOff": "0,1,2,3"
1106 },
1107 {
1108 "EventCode": "0xB7, 0xBB",
1109 "MSRValue": "0x3fc0028000 ",
1110 "Counter": "0,1,2,3",
1111 "UMask": "0x1",
1112 "EventName": "OFFCORE_RESPONSE.OTHER.SUPPLIER_NONE.ANY_SNOOP",
1113 "MSRIndex": "0x1a6,0x1a7",
1114 "SampleAfterValue": "100003",
1115 "BriefDescription": "OTHER & SUPPLIER_NONE & ANY_SNOOP",
1116 "Offcore": "1",
1117 "CounterHTOff": "0,1,2,3"
1118 },
1119 {
1120 "EventCode": "0xB7, 0xBB",
1121 "MSRValue": "0x1000028000 ",
1122 "Counter": "0,1,2,3",
1123 "UMask": "0x1",
1124 "EventName": "OFFCORE_RESPONSE.OTHER.SUPPLIER_NONE.SNOOP_HITM",
1125 "MSRIndex": "0x1a6,0x1a7",
1126 "SampleAfterValue": "100003",
1127 "BriefDescription": "OTHER & SUPPLIER_NONE & SNOOP_HITM",
1128 "Offcore": "1",
1129 "CounterHTOff": "0,1,2,3"
1130 },
1131 {
1132 "EventCode": "0xB7, 0xBB",
1133 "MSRValue": "0x0400028000 ",
1134 "Counter": "0,1,2,3",
1135 "UMask": "0x1",
1136 "EventName": "OFFCORE_RESPONSE.OTHER.SUPPLIER_NONE.SNOOP_HIT_NO_FWD",
1137 "MSRIndex": "0x1a6,0x1a7",
1138 "SampleAfterValue": "100003",
1139 "BriefDescription": "OTHER & SUPPLIER_NONE & SNOOP_HIT_NO_FWD",
1140 "Offcore": "1",
1141 "CounterHTOff": "0,1,2,3"
1142 },
1143 {
1144 "EventCode": "0xB7, 0xBB",
1145 "MSRValue": "0x0200028000 ",
1146 "Counter": "0,1,2,3",
1147 "UMask": "0x1",
1148 "EventName": "OFFCORE_RESPONSE.OTHER.SUPPLIER_NONE.SNOOP_MISS",
1149 "MSRIndex": "0x1a6,0x1a7",
1150 "SampleAfterValue": "100003",
1151 "BriefDescription": "OTHER & SUPPLIER_NONE & SNOOP_MISS",
1152 "Offcore": "1",
1153 "CounterHTOff": "0,1,2,3"
1154 },
1155 {
1156 "EventCode": "0xB7, 0xBB",
1157 "MSRValue": "0x0100028000 ",
1158 "Counter": "0,1,2,3",
1159 "UMask": "0x1",
1160 "EventName": "OFFCORE_RESPONSE.OTHER.SUPPLIER_NONE.SNOOP_NOT_NEEDED",
1161 "MSRIndex": "0x1a6,0x1a7",
1162 "SampleAfterValue": "100003",
1163 "BriefDescription": "OTHER & SUPPLIER_NONE & SNOOP_NOT_NEEDED",
1164 "Offcore": "1",
1165 "CounterHTOff": "0,1,2,3"
1166 },
1167 {
1168 "EventCode": "0xB7, 0xBB",
1169 "MSRValue": "0x0080028000 ",
1170 "Counter": "0,1,2,3",
1171 "UMask": "0x1",
1172 "EventName": "OFFCORE_RESPONSE.OTHER.SUPPLIER_NONE.SNOOP_NONE",
1173 "MSRIndex": "0x1a6,0x1a7",
1174 "SampleAfterValue": "100003",
1175 "BriefDescription": "OTHER & SUPPLIER_NONE & SNOOP_NONE",
1176 "Offcore": "1",
1177 "CounterHTOff": "0,1,2,3"
1178 },
1179 {
1180 "EventCode": "0xB7, 0xBB",
1181 "MSRValue": "0x0040028000 ",
1182 "Counter": "0,1,2,3",
1183 "UMask": "0x1",
1184 "EventName": "OFFCORE_RESPONSE.OTHER.SUPPLIER_NONE.SPL_HIT",
1185 "MSRIndex": "0x1a6,0x1a7",
1186 "SampleAfterValue": "100003",
1187 "BriefDescription": "OTHER & SUPPLIER_NONE & SPL_HIT",
1188 "Offcore": "1",
1189 "CounterHTOff": "0,1,2,3"
1190 },
1191 {
1192 "EventCode": "0xB7, 0xBB",
1193 "MSRValue": "0x0000018000 ",
1194 "Counter": "0,1,2,3",
1195 "UMask": "0x1",
1196 "EventName": "OFFCORE_RESPONSE.OTHER.ANY_RESPONSE",
1197 "MSRIndex": "0x1a6,0x1a7",
1198 "SampleAfterValue": "100003",
1199 "BriefDescription": "Counts any other requests that have any response type.",
1200 "Offcore": "1",
1201 "CounterHTOff": "0,1,2,3"
1202 },
1203 {
1204 "EventCode": "0xB7, 0xBB",
1205 "MSRValue": "0x3fc0400800 ",
1206 "Counter": "0,1,2,3",
1207 "UMask": "0x1",
1208 "EventName": "OFFCORE_RESPONSE.STREAMING_STORES.L4_HIT_LOCAL_L4.ANY_SNOOP",
1209 "MSRIndex": "0x1a6,0x1a7",
1210 "SampleAfterValue": "100003",
1211 "BriefDescription": "STREAMING_STORES & L4_HIT_LOCAL_L4 & ANY_SNOOP",
1212 "Offcore": "1",
1213 "CounterHTOff": "0,1,2,3"
1214 },
1215 {
1216 "EventCode": "0xB7, 0xBB",
1217 "MSRValue": "0x1000400800 ",
1218 "Counter": "0,1,2,3",
1219 "UMask": "0x1",
1220 "EventName": "OFFCORE_RESPONSE.STREAMING_STORES.L4_HIT_LOCAL_L4.SNOOP_HITM",
1221 "MSRIndex": "0x1a6,0x1a7",
1222 "SampleAfterValue": "100003",
1223 "BriefDescription": "STREAMING_STORES & L4_HIT_LOCAL_L4 & SNOOP_HITM",
1224 "Offcore": "1",
1225 "CounterHTOff": "0,1,2,3"
1226 },
1227 {
1228 "EventCode": "0xB7, 0xBB",
1229 "MSRValue": "0x0400400800 ",
1230 "Counter": "0,1,2,3",
1231 "UMask": "0x1",
1232 "EventName": "OFFCORE_RESPONSE.STREAMING_STORES.L4_HIT_LOCAL_L4.SNOOP_HIT_NO_FWD",
1233 "MSRIndex": "0x1a6,0x1a7",
1234 "SampleAfterValue": "100003",
1235 "BriefDescription": "STREAMING_STORES & L4_HIT_LOCAL_L4 & SNOOP_HIT_NO_FWD",
1236 "Offcore": "1",
1237 "CounterHTOff": "0,1,2,3"
1238 },
1239 {
1240 "EventCode": "0xB7, 0xBB",
1241 "MSRValue": "0x0200400800 ",
1242 "Counter": "0,1,2,3",
1243 "UMask": "0x1",
1244 "EventName": "OFFCORE_RESPONSE.STREAMING_STORES.L4_HIT_LOCAL_L4.SNOOP_MISS",
1245 "MSRIndex": "0x1a6,0x1a7",
1246 "SampleAfterValue": "100003",
1247 "BriefDescription": "STREAMING_STORES & L4_HIT_LOCAL_L4 & SNOOP_MISS",
1248 "Offcore": "1",
1249 "CounterHTOff": "0,1,2,3"
1250 },
1251 {
1252 "EventCode": "0xB7, 0xBB",
1253 "MSRValue": "0x0100400800 ",
1254 "Counter": "0,1,2,3",
1255 "UMask": "0x1",
1256 "EventName": "OFFCORE_RESPONSE.STREAMING_STORES.L4_HIT_LOCAL_L4.SNOOP_NOT_NEEDED",
1257 "MSRIndex": "0x1a6,0x1a7",
1258 "SampleAfterValue": "100003",
1259 "BriefDescription": "STREAMING_STORES & L4_HIT_LOCAL_L4 & SNOOP_NOT_NEEDED",
1260 "Offcore": "1",
1261 "CounterHTOff": "0,1,2,3"
1262 },
1263 {
1264 "EventCode": "0xB7, 0xBB",
1265 "MSRValue": "0x0080400800 ",
1266 "Counter": "0,1,2,3",
1267 "UMask": "0x1",
1268 "EventName": "OFFCORE_RESPONSE.STREAMING_STORES.L4_HIT_LOCAL_L4.SNOOP_NONE",
1269 "MSRIndex": "0x1a6,0x1a7",
1270 "SampleAfterValue": "100003",
1271 "BriefDescription": "STREAMING_STORES & L4_HIT_LOCAL_L4 & SNOOP_NONE",
1272 "Offcore": "1",
1273 "CounterHTOff": "0,1,2,3"
1274 },
1275 {
1276 "EventCode": "0xB7, 0xBB",
1277 "MSRValue": "0x0040400800 ",
1278 "Counter": "0,1,2,3",
1279 "UMask": "0x1",
1280 "EventName": "OFFCORE_RESPONSE.STREAMING_STORES.L4_HIT_LOCAL_L4.SPL_HIT",
1281 "MSRIndex": "0x1a6,0x1a7",
1282 "SampleAfterValue": "100003",
1283 "BriefDescription": "STREAMING_STORES & L4_HIT_LOCAL_L4 & SPL_HIT",
1284 "Offcore": "1",
1285 "CounterHTOff": "0,1,2,3"
1286 },
1287 {
1288 "EventCode": "0xB7, 0xBB",
1289 "MSRValue": "0x3fc01c0800 ",
1290 "Counter": "0,1,2,3",
1291 "UMask": "0x1",
1292 "EventName": "OFFCORE_RESPONSE.STREAMING_STORES.L3_HIT.ANY_SNOOP",
1293 "MSRIndex": "0x1a6,0x1a7",
1294 "SampleAfterValue": "100003",
1295 "BriefDescription": "STREAMING_STORES & L3_HIT & ANY_SNOOP",
1296 "Offcore": "1",
1297 "CounterHTOff": "0,1,2,3"
1298 },
1299 {
1300 "EventCode": "0xB7, 0xBB",
1301 "MSRValue": "0x10001c0800 ",
1302 "Counter": "0,1,2,3",
1303 "UMask": "0x1",
1304 "EventName": "OFFCORE_RESPONSE.STREAMING_STORES.L3_HIT.SNOOP_HITM",
1305 "MSRIndex": "0x1a6,0x1a7",
1306 "SampleAfterValue": "100003",
1307 "BriefDescription": "STREAMING_STORES & L3_HIT & SNOOP_HITM",
1308 "Offcore": "1",
1309 "CounterHTOff": "0,1,2,3"
1310 },
1311 {
1312 "EventCode": "0xB7, 0xBB",
1313 "MSRValue": "0x04001c0800 ",
1314 "Counter": "0,1,2,3",
1315 "UMask": "0x1",
1316 "EventName": "OFFCORE_RESPONSE.STREAMING_STORES.L3_HIT.SNOOP_HIT_NO_FWD",
1317 "MSRIndex": "0x1a6,0x1a7",
1318 "SampleAfterValue": "100003",
1319 "BriefDescription": "Counts streaming stores that hit in the L3 and the snoops to sibling cores hit in either E/S state and the line is not forwarded.",
1320 "Offcore": "1",
1321 "CounterHTOff": "0,1,2,3"
1322 },
1323 {
1324 "EventCode": "0xB7, 0xBB",
1325 "MSRValue": "0x02001c0800 ",
1326 "Counter": "0,1,2,3",
1327 "UMask": "0x1",
1328 "EventName": "OFFCORE_RESPONSE.STREAMING_STORES.L3_HIT.SNOOP_MISS",
1329 "MSRIndex": "0x1a6,0x1a7",
1330 "SampleAfterValue": "100003",
1331 "BriefDescription": "Counts streaming stores that hit in the L3 and the snoops sent to sibling cores return clean response.",
1332 "Offcore": "1",
1333 "CounterHTOff": "0,1,2,3"
1334 },
1335 {
1336 "EventCode": "0xB7, 0xBB",
1337 "MSRValue": "0x01001c0800 ",
1338 "Counter": "0,1,2,3",
1339 "UMask": "0x1",
1340 "EventName": "OFFCORE_RESPONSE.STREAMING_STORES.L3_HIT.SNOOP_NOT_NEEDED",
1341 "MSRIndex": "0x1a6,0x1a7",
1342 "SampleAfterValue": "100003",
1343 "BriefDescription": "Counts streaming stores that hit in the L3 and sibling core snoops are not needed as either the core-valid bit is not set or the shared line is present in multiple cores.",
1344 "Offcore": "1",
1345 "CounterHTOff": "0,1,2,3"
1346 },
1347 {
1348 "EventCode": "0xB7, 0xBB",
1349 "MSRValue": "0x00801c0800 ",
1350 "Counter": "0,1,2,3",
1351 "UMask": "0x1",
1352 "EventName": "OFFCORE_RESPONSE.STREAMING_STORES.L3_HIT.SNOOP_NONE",
1353 "MSRIndex": "0x1a6,0x1a7",
1354 "SampleAfterValue": "100003",
1355 "BriefDescription": "STREAMING_STORES & L3_HIT & SNOOP_NONE",
1356 "Offcore": "1",
1357 "CounterHTOff": "0,1,2,3"
1358 },
1359 {
1360 "EventCode": "0xB7, 0xBB",
1361 "MSRValue": "0x00401c0800 ",
1362 "Counter": "0,1,2,3",
1363 "UMask": "0x1",
1364 "EventName": "OFFCORE_RESPONSE.STREAMING_STORES.L3_HIT.SPL_HIT",
1365 "MSRIndex": "0x1a6,0x1a7",
1366 "SampleAfterValue": "100003",
1367 "BriefDescription": "STREAMING_STORES & L3_HIT & SPL_HIT",
1368 "Offcore": "1",
1369 "CounterHTOff": "0,1,2,3"
1370 },
1371 {
1372 "EventCode": "0xB7, 0xBB",
1373 "MSRValue": "0x3fc0100800 ",
1374 "Counter": "0,1,2,3",
1375 "UMask": "0x1",
1376 "EventName": "OFFCORE_RESPONSE.STREAMING_STORES.L3_HIT_S.ANY_SNOOP",
1377 "MSRIndex": "0x1a6,0x1a7",
1378 "SampleAfterValue": "100003",
1379 "BriefDescription": "STREAMING_STORES & L3_HIT_S & ANY_SNOOP",
1380 "Offcore": "1",
1381 "CounterHTOff": "0,1,2,3"
1382 },
1383 {
1384 "EventCode": "0xB7, 0xBB",
1385 "MSRValue": "0x1000100800 ",
1386 "Counter": "0,1,2,3",
1387 "UMask": "0x1",
1388 "EventName": "OFFCORE_RESPONSE.STREAMING_STORES.L3_HIT_S.SNOOP_HITM",
1389 "MSRIndex": "0x1a6,0x1a7",
1390 "SampleAfterValue": "100003",
1391 "BriefDescription": "STREAMING_STORES & L3_HIT_S & SNOOP_HITM",
1392 "Offcore": "1",
1393 "CounterHTOff": "0,1,2,3"
1394 },
1395 {
1396 "EventCode": "0xB7, 0xBB",
1397 "MSRValue": "0x0400100800 ",
1398 "Counter": "0,1,2,3",
1399 "UMask": "0x1",
1400 "EventName": "OFFCORE_RESPONSE.STREAMING_STORES.L3_HIT_S.SNOOP_HIT_NO_FWD",
1401 "MSRIndex": "0x1a6,0x1a7",
1402 "SampleAfterValue": "100003",
1403 "BriefDescription": "STREAMING_STORES & L3_HIT_S & SNOOP_HIT_NO_FWD",
1404 "Offcore": "1",
1405 "CounterHTOff": "0,1,2,3"
1406 },
1407 {
1408 "EventCode": "0xB7, 0xBB",
1409 "MSRValue": "0x0200100800 ",
1410 "Counter": "0,1,2,3",
1411 "UMask": "0x1",
1412 "EventName": "OFFCORE_RESPONSE.STREAMING_STORES.L3_HIT_S.SNOOP_MISS",
1413 "MSRIndex": "0x1a6,0x1a7",
1414 "SampleAfterValue": "100003",
1415 "BriefDescription": "STREAMING_STORES & L3_HIT_S & SNOOP_MISS",
1416 "Offcore": "1",
1417 "CounterHTOff": "0,1,2,3"
1418 },
1419 {
1420 "EventCode": "0xB7, 0xBB",
1421 "MSRValue": "0x0100100800 ",
1422 "Counter": "0,1,2,3",
1423 "UMask": "0x1",
1424 "EventName": "OFFCORE_RESPONSE.STREAMING_STORES.L3_HIT_S.SNOOP_NOT_NEEDED",
1425 "MSRIndex": "0x1a6,0x1a7",
1426 "SampleAfterValue": "100003",
1427 "BriefDescription": "STREAMING_STORES & L3_HIT_S & SNOOP_NOT_NEEDED",
1428 "Offcore": "1",
1429 "CounterHTOff": "0,1,2,3"
1430 },
1431 {
1432 "EventCode": "0xB7, 0xBB",
1433 "MSRValue": "0x0080100800 ",
1434 "Counter": "0,1,2,3",
1435 "UMask": "0x1",
1436 "EventName": "OFFCORE_RESPONSE.STREAMING_STORES.L3_HIT_S.SNOOP_NONE",
1437 "MSRIndex": "0x1a6,0x1a7",
1438 "SampleAfterValue": "100003",
1439 "BriefDescription": "STREAMING_STORES & L3_HIT_S & SNOOP_NONE",
1440 "Offcore": "1",
1441 "CounterHTOff": "0,1,2,3"
1442 },
1443 {
1444 "EventCode": "0xB7, 0xBB",
1445 "MSRValue": "0x0040100800 ",
1446 "Counter": "0,1,2,3",
1447 "UMask": "0x1",
1448 "EventName": "OFFCORE_RESPONSE.STREAMING_STORES.L3_HIT_S.SPL_HIT",
1449 "MSRIndex": "0x1a6,0x1a7",
1450 "SampleAfterValue": "100003",
1451 "BriefDescription": "STREAMING_STORES & L3_HIT_S & SPL_HIT",
1452 "Offcore": "1",
1453 "CounterHTOff": "0,1,2,3"
1454 },
1455 {
1456 "EventCode": "0xB7, 0xBB",
1457 "MSRValue": "0x3fc0080800 ",
1458 "Counter": "0,1,2,3",
1459 "UMask": "0x1",
1460 "EventName": "OFFCORE_RESPONSE.STREAMING_STORES.L3_HIT_E.ANY_SNOOP",
1461 "MSRIndex": "0x1a6,0x1a7",
1462 "SampleAfterValue": "100003",
1463 "BriefDescription": "STREAMING_STORES & L3_HIT_E & ANY_SNOOP",
1464 "Offcore": "1",
1465 "CounterHTOff": "0,1,2,3"
1466 },
1467 {
1468 "EventCode": "0xB7, 0xBB",
1469 "MSRValue": "0x1000080800 ",
1470 "Counter": "0,1,2,3",
1471 "UMask": "0x1",
1472 "EventName": "OFFCORE_RESPONSE.STREAMING_STORES.L3_HIT_E.SNOOP_HITM",
1473 "MSRIndex": "0x1a6,0x1a7",
1474 "SampleAfterValue": "100003",
1475 "BriefDescription": "STREAMING_STORES & L3_HIT_E & SNOOP_HITM",
1476 "Offcore": "1",
1477 "CounterHTOff": "0,1,2,3"
1478 },
1479 {
1480 "EventCode": "0xB7, 0xBB",
1481 "MSRValue": "0x0400080800 ",
1482 "Counter": "0,1,2,3",
1483 "UMask": "0x1",
1484 "EventName": "OFFCORE_RESPONSE.STREAMING_STORES.L3_HIT_E.SNOOP_HIT_NO_FWD",
1485 "MSRIndex": "0x1a6,0x1a7",
1486 "SampleAfterValue": "100003",
1487 "BriefDescription": "STREAMING_STORES & L3_HIT_E & SNOOP_HIT_NO_FWD",
1488 "Offcore": "1",
1489 "CounterHTOff": "0,1,2,3"
1490 },
1491 {
1492 "EventCode": "0xB7, 0xBB",
1493 "MSRValue": "0x0200080800 ",
1494 "Counter": "0,1,2,3",
1495 "UMask": "0x1",
1496 "EventName": "OFFCORE_RESPONSE.STREAMING_STORES.L3_HIT_E.SNOOP_MISS",
1497 "MSRIndex": "0x1a6,0x1a7",
1498 "SampleAfterValue": "100003",
1499 "BriefDescription": "STREAMING_STORES & L3_HIT_E & SNOOP_MISS",
1500 "Offcore": "1",
1501 "CounterHTOff": "0,1,2,3"
1502 },
1503 {
1504 "EventCode": "0xB7, 0xBB",
1505 "MSRValue": "0x0100080800 ",
1506 "Counter": "0,1,2,3",
1507 "UMask": "0x1",
1508 "EventName": "OFFCORE_RESPONSE.STREAMING_STORES.L3_HIT_E.SNOOP_NOT_NEEDED",
1509 "MSRIndex": "0x1a6,0x1a7",
1510 "SampleAfterValue": "100003",
1511 "BriefDescription": "STREAMING_STORES & L3_HIT_E & SNOOP_NOT_NEEDED",
1512 "Offcore": "1",
1513 "CounterHTOff": "0,1,2,3"
1514 },
1515 {
1516 "EventCode": "0xB7, 0xBB",
1517 "MSRValue": "0x0080080800 ",
1518 "Counter": "0,1,2,3",
1519 "UMask": "0x1",
1520 "EventName": "OFFCORE_RESPONSE.STREAMING_STORES.L3_HIT_E.SNOOP_NONE",
1521 "MSRIndex": "0x1a6,0x1a7",
1522 "SampleAfterValue": "100003",
1523 "BriefDescription": "STREAMING_STORES & L3_HIT_E & SNOOP_NONE",
1524 "Offcore": "1",
1525 "CounterHTOff": "0,1,2,3"
1526 },
1527 {
1528 "EventCode": "0xB7, 0xBB",
1529 "MSRValue": "0x0040080800 ",
1530 "Counter": "0,1,2,3",
1531 "UMask": "0x1",
1532 "EventName": "OFFCORE_RESPONSE.STREAMING_STORES.L3_HIT_E.SPL_HIT",
1533 "MSRIndex": "0x1a6,0x1a7",
1534 "SampleAfterValue": "100003",
1535 "BriefDescription": "STREAMING_STORES & L3_HIT_E & SPL_HIT",
1536 "Offcore": "1",
1537 "CounterHTOff": "0,1,2,3"
1538 },
1539 {
1540 "EventCode": "0xB7, 0xBB",
1541 "MSRValue": "0x3fc0040800 ",
1542 "Counter": "0,1,2,3",
1543 "UMask": "0x1",
1544 "EventName": "OFFCORE_RESPONSE.STREAMING_STORES.L3_HIT_M.ANY_SNOOP",
1545 "MSRIndex": "0x1a6,0x1a7",
1546 "SampleAfterValue": "100003",
1547 "BriefDescription": "STREAMING_STORES & L3_HIT_M & ANY_SNOOP",
1548 "Offcore": "1",
1549 "CounterHTOff": "0,1,2,3"
1550 },
1551 {
1552 "EventCode": "0xB7, 0xBB",
1553 "MSRValue": "0x1000040800 ",
1554 "Counter": "0,1,2,3",
1555 "UMask": "0x1",
1556 "EventName": "OFFCORE_RESPONSE.STREAMING_STORES.L3_HIT_M.SNOOP_HITM",
1557 "MSRIndex": "0x1a6,0x1a7",
1558 "SampleAfterValue": "100003",
1559 "BriefDescription": "STREAMING_STORES & L3_HIT_M & SNOOP_HITM",
1560 "Offcore": "1",
1561 "CounterHTOff": "0,1,2,3"
1562 },
1563 {
1564 "EventCode": "0xB7, 0xBB",
1565 "MSRValue": "0x0400040800 ",
1566 "Counter": "0,1,2,3",
1567 "UMask": "0x1",
1568 "EventName": "OFFCORE_RESPONSE.STREAMING_STORES.L3_HIT_M.SNOOP_HIT_NO_FWD",
1569 "MSRIndex": "0x1a6,0x1a7",
1570 "SampleAfterValue": "100003",
1571 "BriefDescription": "STREAMING_STORES & L3_HIT_M & SNOOP_HIT_NO_FWD",
1572 "Offcore": "1",
1573 "CounterHTOff": "0,1,2,3"
1574 },
1575 {
1576 "EventCode": "0xB7, 0xBB",
1577 "MSRValue": "0x0200040800 ",
1578 "Counter": "0,1,2,3",
1579 "UMask": "0x1",
1580 "EventName": "OFFCORE_RESPONSE.STREAMING_STORES.L3_HIT_M.SNOOP_MISS",
1581 "MSRIndex": "0x1a6,0x1a7",
1582 "SampleAfterValue": "100003",
1583 "BriefDescription": "STREAMING_STORES & L3_HIT_M & SNOOP_MISS",
1584 "Offcore": "1",
1585 "CounterHTOff": "0,1,2,3"
1586 },
1587 {
1588 "EventCode": "0xB7, 0xBB",
1589 "MSRValue": "0x0100040800 ",
1590 "Counter": "0,1,2,3",
1591 "UMask": "0x1",
1592 "EventName": "OFFCORE_RESPONSE.STREAMING_STORES.L3_HIT_M.SNOOP_NOT_NEEDED",
1593 "MSRIndex": "0x1a6,0x1a7",
1594 "SampleAfterValue": "100003",
1595 "BriefDescription": "STREAMING_STORES & L3_HIT_M & SNOOP_NOT_NEEDED",
1596 "Offcore": "1",
1597 "CounterHTOff": "0,1,2,3"
1598 },
1599 {
1600 "EventCode": "0xB7, 0xBB",
1601 "MSRValue": "0x0080040800 ",
1602 "Counter": "0,1,2,3",
1603 "UMask": "0x1",
1604 "EventName": "OFFCORE_RESPONSE.STREAMING_STORES.L3_HIT_M.SNOOP_NONE",
1605 "MSRIndex": "0x1a6,0x1a7",
1606 "SampleAfterValue": "100003",
1607 "BriefDescription": "STREAMING_STORES & L3_HIT_M & SNOOP_NONE",
1608 "Offcore": "1",
1609 "CounterHTOff": "0,1,2,3"
1610 },
1611 {
1612 "EventCode": "0xB7, 0xBB",
1613 "MSRValue": "0x0040040800 ",
1614 "Counter": "0,1,2,3",
1615 "UMask": "0x1",
1616 "EventName": "OFFCORE_RESPONSE.STREAMING_STORES.L3_HIT_M.SPL_HIT",
1617 "MSRIndex": "0x1a6,0x1a7",
1618 "SampleAfterValue": "100003",
1619 "BriefDescription": "STREAMING_STORES & L3_HIT_M & SPL_HIT",
1620 "Offcore": "1",
1621 "CounterHTOff": "0,1,2,3"
1622 },
1623 {
1624 "EventCode": "0xB7, 0xBB",
1625 "MSRValue": "0x3fc0020800 ",
1626 "Counter": "0,1,2,3",
1627 "UMask": "0x1",
1628 "EventName": "OFFCORE_RESPONSE.STREAMING_STORES.SUPPLIER_NONE.ANY_SNOOP",
1629 "MSRIndex": "0x1a6,0x1a7",
1630 "SampleAfterValue": "100003",
1631 "BriefDescription": "STREAMING_STORES & SUPPLIER_NONE & ANY_SNOOP",
1632 "Offcore": "1",
1633 "CounterHTOff": "0,1,2,3"
1634 },
1635 {
1636 "EventCode": "0xB7, 0xBB",
1637 "MSRValue": "0x1000020800 ",
1638 "Counter": "0,1,2,3",
1639 "UMask": "0x1",
1640 "EventName": "OFFCORE_RESPONSE.STREAMING_STORES.SUPPLIER_NONE.SNOOP_HITM",
1641 "MSRIndex": "0x1a6,0x1a7",
1642 "SampleAfterValue": "100003",
1643 "BriefDescription": "STREAMING_STORES & SUPPLIER_NONE & SNOOP_HITM",
1644 "Offcore": "1",
1645 "CounterHTOff": "0,1,2,3"
1646 },
1647 {
1648 "EventCode": "0xB7, 0xBB",
1649 "MSRValue": "0x0400020800 ",
1650 "Counter": "0,1,2,3",
1651 "UMask": "0x1",
1652 "EventName": "OFFCORE_RESPONSE.STREAMING_STORES.SUPPLIER_NONE.SNOOP_HIT_NO_FWD",
1653 "MSRIndex": "0x1a6,0x1a7",
1654 "SampleAfterValue": "100003",
1655 "BriefDescription": "STREAMING_STORES & SUPPLIER_NONE & SNOOP_HIT_NO_FWD",
1656 "Offcore": "1",
1657 "CounterHTOff": "0,1,2,3"
1658 },
1659 {
1660 "EventCode": "0xB7, 0xBB",
1661 "MSRValue": "0x0200020800 ",
1662 "Counter": "0,1,2,3",
1663 "UMask": "0x1",
1664 "EventName": "OFFCORE_RESPONSE.STREAMING_STORES.SUPPLIER_NONE.SNOOP_MISS",
1665 "MSRIndex": "0x1a6,0x1a7",
1666 "SampleAfterValue": "100003",
1667 "BriefDescription": "STREAMING_STORES & SUPPLIER_NONE & SNOOP_MISS",
1668 "Offcore": "1",
1669 "CounterHTOff": "0,1,2,3"
1670 },
1671 {
1672 "EventCode": "0xB7, 0xBB",
1673 "MSRValue": "0x0100020800 ",
1674 "Counter": "0,1,2,3",
1675 "UMask": "0x1",
1676 "EventName": "OFFCORE_RESPONSE.STREAMING_STORES.SUPPLIER_NONE.SNOOP_NOT_NEEDED",
1677 "MSRIndex": "0x1a6,0x1a7",
1678 "SampleAfterValue": "100003",
1679 "BriefDescription": "STREAMING_STORES & SUPPLIER_NONE & SNOOP_NOT_NEEDED",
1680 "Offcore": "1",
1681 "CounterHTOff": "0,1,2,3"
1682 },
1683 {
1684 "EventCode": "0xB7, 0xBB",
1685 "MSRValue": "0x0080020800 ",
1686 "Counter": "0,1,2,3",
1687 "UMask": "0x1",
1688 "EventName": "OFFCORE_RESPONSE.STREAMING_STORES.SUPPLIER_NONE.SNOOP_NONE",
1689 "MSRIndex": "0x1a6,0x1a7",
1690 "SampleAfterValue": "100003",
1691 "BriefDescription": "STREAMING_STORES & SUPPLIER_NONE & SNOOP_NONE",
1692 "Offcore": "1",
1693 "CounterHTOff": "0,1,2,3"
1694 },
1695 {
1696 "EventCode": "0xB7, 0xBB",
1697 "MSRValue": "0x0040020800 ",
1698 "Counter": "0,1,2,3",
1699 "UMask": "0x1",
1700 "EventName": "OFFCORE_RESPONSE.STREAMING_STORES.SUPPLIER_NONE.SPL_HIT",
1701 "MSRIndex": "0x1a6,0x1a7",
1702 "SampleAfterValue": "100003",
1703 "BriefDescription": "STREAMING_STORES & SUPPLIER_NONE & SPL_HIT",
1704 "Offcore": "1",
1705 "CounterHTOff": "0,1,2,3"
1706 },
1707 {
1708 "EventCode": "0xB7, 0xBB",
1709 "MSRValue": "0x0000010800 ",
1710 "Counter": "0,1,2,3",
1711 "UMask": "0x1",
1712 "EventName": "OFFCORE_RESPONSE.STREAMING_STORES.ANY_RESPONSE",
1713 "MSRIndex": "0x1a6,0x1a7",
1714 "SampleAfterValue": "100003",
1715 "BriefDescription": "Counts streaming stores that have any response type.",
1716 "Offcore": "1",
1717 "CounterHTOff": "0,1,2,3"
1718 },
1719 {
1720 "EventCode": "0xB7, 0xBB",
1721 "MSRValue": "0x3fc0400100 ",
1722 "Counter": "0,1,2,3",
1723 "UMask": "0x1",
1724 "EventName": "OFFCORE_RESPONSE.PF_L3_RFO.L4_HIT_LOCAL_L4.ANY_SNOOP",
1725 "MSRIndex": "0x1a6,0x1a7",
1726 "SampleAfterValue": "100003",
1727 "BriefDescription": "PF_L3_RFO & L4_HIT_LOCAL_L4 & ANY_SNOOP",
1728 "Offcore": "1",
1729 "CounterHTOff": "0,1,2,3"
1730 },
1731 {
1732 "EventCode": "0xB7, 0xBB",
1733 "MSRValue": "0x1000400100 ",
1734 "Counter": "0,1,2,3",
1735 "UMask": "0x1",
1736 "EventName": "OFFCORE_RESPONSE.PF_L3_RFO.L4_HIT_LOCAL_L4.SNOOP_HITM",
1737 "MSRIndex": "0x1a6,0x1a7",
1738 "SampleAfterValue": "100003",
1739 "BriefDescription": "PF_L3_RFO & L4_HIT_LOCAL_L4 & SNOOP_HITM",
1740 "Offcore": "1",
1741 "CounterHTOff": "0,1,2,3"
1742 },
1743 {
1744 "EventCode": "0xB7, 0xBB",
1745 "MSRValue": "0x0400400100 ",
1746 "Counter": "0,1,2,3",
1747 "UMask": "0x1",
1748 "EventName": "OFFCORE_RESPONSE.PF_L3_RFO.L4_HIT_LOCAL_L4.SNOOP_HIT_NO_FWD",
1749 "MSRIndex": "0x1a6,0x1a7",
1750 "SampleAfterValue": "100003",
1751 "BriefDescription": "PF_L3_RFO & L4_HIT_LOCAL_L4 & SNOOP_HIT_NO_FWD",
1752 "Offcore": "1",
1753 "CounterHTOff": "0,1,2,3"
1754 },
1755 {
1756 "EventCode": "0xB7, 0xBB",
1757 "MSRValue": "0x0200400100 ",
1758 "Counter": "0,1,2,3",
1759 "UMask": "0x1",
1760 "EventName": "OFFCORE_RESPONSE.PF_L3_RFO.L4_HIT_LOCAL_L4.SNOOP_MISS",
1761 "MSRIndex": "0x1a6,0x1a7",
1762 "SampleAfterValue": "100003",
1763 "BriefDescription": "PF_L3_RFO & L4_HIT_LOCAL_L4 & SNOOP_MISS",
1764 "Offcore": "1",
1765 "CounterHTOff": "0,1,2,3"
1766 },
1767 {
1768 "EventCode": "0xB7, 0xBB",
1769 "MSRValue": "0x0100400100 ",
1770 "Counter": "0,1,2,3",
1771 "UMask": "0x1",
1772 "EventName": "OFFCORE_RESPONSE.PF_L3_RFO.L4_HIT_LOCAL_L4.SNOOP_NOT_NEEDED",
1773 "MSRIndex": "0x1a6,0x1a7",
1774 "SampleAfterValue": "100003",
1775 "BriefDescription": "PF_L3_RFO & L4_HIT_LOCAL_L4 & SNOOP_NOT_NEEDED",
1776 "Offcore": "1",
1777 "CounterHTOff": "0,1,2,3"
1778 },
1779 {
1780 "EventCode": "0xB7, 0xBB",
1781 "MSRValue": "0x0080400100 ",
1782 "Counter": "0,1,2,3",
1783 "UMask": "0x1",
1784 "EventName": "OFFCORE_RESPONSE.PF_L3_RFO.L4_HIT_LOCAL_L4.SNOOP_NONE",
1785 "MSRIndex": "0x1a6,0x1a7",
1786 "SampleAfterValue": "100003",
1787 "BriefDescription": "PF_L3_RFO & L4_HIT_LOCAL_L4 & SNOOP_NONE",
1788 "Offcore": "1",
1789 "CounterHTOff": "0,1,2,3"
1790 },
1791 {
1792 "EventCode": "0xB7, 0xBB",
1793 "MSRValue": "0x0040400100 ",
1794 "Counter": "0,1,2,3",
1795 "UMask": "0x1",
1796 "EventName": "OFFCORE_RESPONSE.PF_L3_RFO.L4_HIT_LOCAL_L4.SPL_HIT",
1797 "MSRIndex": "0x1a6,0x1a7",
1798 "SampleAfterValue": "100003",
1799 "BriefDescription": "PF_L3_RFO & L4_HIT_LOCAL_L4 & SPL_HIT",
1800 "Offcore": "1",
1801 "CounterHTOff": "0,1,2,3"
1802 },
1803 {
1804 "EventCode": "0xB7, 0xBB",
1805 "MSRValue": "0x3fc01c0100 ",
1806 "Counter": "0,1,2,3",
1807 "UMask": "0x1",
1808 "EventName": "OFFCORE_RESPONSE.PF_L3_RFO.L3_HIT.ANY_SNOOP",
1809 "MSRIndex": "0x1a6,0x1a7",
1810 "SampleAfterValue": "100003",
1811 "BriefDescription": "PF_L3_RFO & L3_HIT & ANY_SNOOP",
1812 "Offcore": "1",
1813 "CounterHTOff": "0,1,2,3"
1814 },
1815 {
1816 "EventCode": "0xB7, 0xBB",
1817 "MSRValue": "0x10001c0100 ",
1818 "Counter": "0,1,2,3",
1819 "UMask": "0x1",
1820 "EventName": "OFFCORE_RESPONSE.PF_L3_RFO.L3_HIT.SNOOP_HITM",
1821 "MSRIndex": "0x1a6,0x1a7",
1822 "SampleAfterValue": "100003",
1823 "BriefDescription": "PF_L3_RFO & L3_HIT & SNOOP_HITM",
1824 "Offcore": "1",
1825 "CounterHTOff": "0,1,2,3"
1826 },
1827 {
1828 "EventCode": "0xB7, 0xBB",
1829 "MSRValue": "0x04001c0100 ",
1830 "Counter": "0,1,2,3",
1831 "UMask": "0x1",
1832 "EventName": "OFFCORE_RESPONSE.PF_L3_RFO.L3_HIT.SNOOP_HIT_NO_FWD",
1833 "MSRIndex": "0x1a6,0x1a7",
1834 "SampleAfterValue": "100003",
1835 "BriefDescription": "Counts all prefetch (that bring data to LLC only) RFOs that hit in the L3 and the snoops to sibling cores hit in either E/S state and the line is not forwarded.",
1836 "Offcore": "1",
1837 "CounterHTOff": "0,1,2,3"
1838 },
1839 {
1840 "EventCode": "0xB7, 0xBB",
1841 "MSRValue": "0x02001c0100 ",
1842 "Counter": "0,1,2,3",
1843 "UMask": "0x1",
1844 "EventName": "OFFCORE_RESPONSE.PF_L3_RFO.L3_HIT.SNOOP_MISS",
1845 "MSRIndex": "0x1a6,0x1a7",
1846 "SampleAfterValue": "100003",
1847 "BriefDescription": "Counts all prefetch (that bring data to LLC only) RFOs that hit in the L3 and the snoops sent to sibling cores return clean response.",
1848 "Offcore": "1",
1849 "CounterHTOff": "0,1,2,3"
1850 },
1851 {
1852 "EventCode": "0xB7, 0xBB",
1853 "MSRValue": "0x01001c0100 ",
1854 "Counter": "0,1,2,3",
1855 "UMask": "0x1",
1856 "EventName": "OFFCORE_RESPONSE.PF_L3_RFO.L3_HIT.SNOOP_NOT_NEEDED",
1857 "MSRIndex": "0x1a6,0x1a7",
1858 "SampleAfterValue": "100003",
1859 "BriefDescription": "Counts all prefetch (that bring data to LLC only) RFOs that hit in the L3 and sibling core snoops are not needed as either the core-valid bit is not set or the shared line is present in multiple cores.",
1860 "Offcore": "1",
1861 "CounterHTOff": "0,1,2,3"
1862 },
1863 {
1864 "EventCode": "0xB7, 0xBB",
1865 "MSRValue": "0x00801c0100 ",
1866 "Counter": "0,1,2,3",
1867 "UMask": "0x1",
1868 "EventName": "OFFCORE_RESPONSE.PF_L3_RFO.L3_HIT.SNOOP_NONE",
1869 "MSRIndex": "0x1a6,0x1a7",
1870 "SampleAfterValue": "100003",
1871 "BriefDescription": "PF_L3_RFO & L3_HIT & SNOOP_NONE",
1872 "Offcore": "1",
1873 "CounterHTOff": "0,1,2,3"
1874 },
1875 {
1876 "EventCode": "0xB7, 0xBB",
1877 "MSRValue": "0x00401c0100 ",
1878 "Counter": "0,1,2,3",
1879 "UMask": "0x1",
1880 "EventName": "OFFCORE_RESPONSE.PF_L3_RFO.L3_HIT.SPL_HIT",
1881 "MSRIndex": "0x1a6,0x1a7",
1882 "SampleAfterValue": "100003",
1883 "BriefDescription": "PF_L3_RFO & L3_HIT & SPL_HIT",
1884 "Offcore": "1",
1885 "CounterHTOff": "0,1,2,3"
1886 },
1887 {
1888 "EventCode": "0xB7, 0xBB",
1889 "MSRValue": "0x3fc0100100 ",
1890 "Counter": "0,1,2,3",
1891 "UMask": "0x1",
1892 "EventName": "OFFCORE_RESPONSE.PF_L3_RFO.L3_HIT_S.ANY_SNOOP",
1893 "MSRIndex": "0x1a6,0x1a7",
1894 "SampleAfterValue": "100003",
1895 "BriefDescription": "PF_L3_RFO & L3_HIT_S & ANY_SNOOP",
1896 "Offcore": "1",
1897 "CounterHTOff": "0,1,2,3"
1898 },
1899 {
1900 "EventCode": "0xB7, 0xBB",
1901 "MSRValue": "0x1000100100 ",
1902 "Counter": "0,1,2,3",
1903 "UMask": "0x1",
1904 "EventName": "OFFCORE_RESPONSE.PF_L3_RFO.L3_HIT_S.SNOOP_HITM",
1905 "MSRIndex": "0x1a6,0x1a7",
1906 "SampleAfterValue": "100003",
1907 "BriefDescription": "PF_L3_RFO & L3_HIT_S & SNOOP_HITM",
1908 "Offcore": "1",
1909 "CounterHTOff": "0,1,2,3"
1910 },
1911 {
1912 "EventCode": "0xB7, 0xBB",
1913 "MSRValue": "0x0400100100 ",
1914 "Counter": "0,1,2,3",
1915 "UMask": "0x1",
1916 "EventName": "OFFCORE_RESPONSE.PF_L3_RFO.L3_HIT_S.SNOOP_HIT_NO_FWD",
1917 "MSRIndex": "0x1a6,0x1a7",
1918 "SampleAfterValue": "100003",
1919 "BriefDescription": "PF_L3_RFO & L3_HIT_S & SNOOP_HIT_NO_FWD",
1920 "Offcore": "1",
1921 "CounterHTOff": "0,1,2,3"
1922 },
1923 {
1924 "EventCode": "0xB7, 0xBB",
1925 "MSRValue": "0x0200100100 ",
1926 "Counter": "0,1,2,3",
1927 "UMask": "0x1",
1928 "EventName": "OFFCORE_RESPONSE.PF_L3_RFO.L3_HIT_S.SNOOP_MISS",
1929 "MSRIndex": "0x1a6,0x1a7",
1930 "SampleAfterValue": "100003",
1931 "BriefDescription": "PF_L3_RFO & L3_HIT_S & SNOOP_MISS",
1932 "Offcore": "1",
1933 "CounterHTOff": "0,1,2,3"
1934 },
1935 {
1936 "EventCode": "0xB7, 0xBB",
1937 "MSRValue": "0x0100100100 ",
1938 "Counter": "0,1,2,3",
1939 "UMask": "0x1",
1940 "EventName": "OFFCORE_RESPONSE.PF_L3_RFO.L3_HIT_S.SNOOP_NOT_NEEDED",
1941 "MSRIndex": "0x1a6,0x1a7",
1942 "SampleAfterValue": "100003",
1943 "BriefDescription": "PF_L3_RFO & L3_HIT_S & SNOOP_NOT_NEEDED",
1944 "Offcore": "1",
1945 "CounterHTOff": "0,1,2,3"
1946 },
1947 {
1948 "EventCode": "0xB7, 0xBB",
1949 "MSRValue": "0x0080100100 ",
1950 "Counter": "0,1,2,3",
1951 "UMask": "0x1",
1952 "EventName": "OFFCORE_RESPONSE.PF_L3_RFO.L3_HIT_S.SNOOP_NONE",
1953 "MSRIndex": "0x1a6,0x1a7",
1954 "SampleAfterValue": "100003",
1955 "BriefDescription": "PF_L3_RFO & L3_HIT_S & SNOOP_NONE",
1956 "Offcore": "1",
1957 "CounterHTOff": "0,1,2,3"
1958 },
1959 {
1960 "EventCode": "0xB7, 0xBB",
1961 "MSRValue": "0x0040100100 ",
1962 "Counter": "0,1,2,3",
1963 "UMask": "0x1",
1964 "EventName": "OFFCORE_RESPONSE.PF_L3_RFO.L3_HIT_S.SPL_HIT",
1965 "MSRIndex": "0x1a6,0x1a7",
1966 "SampleAfterValue": "100003",
1967 "BriefDescription": "PF_L3_RFO & L3_HIT_S & SPL_HIT",
1968 "Offcore": "1",
1969 "CounterHTOff": "0,1,2,3"
1970 },
1971 {
1972 "EventCode": "0xB7, 0xBB",
1973 "MSRValue": "0x3fc0080100 ",
1974 "Counter": "0,1,2,3",
1975 "UMask": "0x1",
1976 "EventName": "OFFCORE_RESPONSE.PF_L3_RFO.L3_HIT_E.ANY_SNOOP",
1977 "MSRIndex": "0x1a6,0x1a7",
1978 "SampleAfterValue": "100003",
1979 "BriefDescription": "PF_L3_RFO & L3_HIT_E & ANY_SNOOP",
1980 "Offcore": "1",
1981 "CounterHTOff": "0,1,2,3"
1982 },
1983 {
1984 "EventCode": "0xB7, 0xBB",
1985 "MSRValue": "0x1000080100 ",
1986 "Counter": "0,1,2,3",
1987 "UMask": "0x1",
1988 "EventName": "OFFCORE_RESPONSE.PF_L3_RFO.L3_HIT_E.SNOOP_HITM",
1989 "MSRIndex": "0x1a6,0x1a7",
1990 "SampleAfterValue": "100003",
1991 "BriefDescription": "PF_L3_RFO & L3_HIT_E & SNOOP_HITM",
1992 "Offcore": "1",
1993 "CounterHTOff": "0,1,2,3"
1994 },
1995 {
1996 "EventCode": "0xB7, 0xBB",
1997 "MSRValue": "0x0400080100 ",
1998 "Counter": "0,1,2,3",
1999 "UMask": "0x1",
2000 "EventName": "OFFCORE_RESPONSE.PF_L3_RFO.L3_HIT_E.SNOOP_HIT_NO_FWD",
2001 "MSRIndex": "0x1a6,0x1a7",
2002 "SampleAfterValue": "100003",
2003 "BriefDescription": "PF_L3_RFO & L3_HIT_E & SNOOP_HIT_NO_FWD",
2004 "Offcore": "1",
2005 "CounterHTOff": "0,1,2,3"
2006 },
2007 {
2008 "EventCode": "0xB7, 0xBB",
2009 "MSRValue": "0x0200080100 ",
2010 "Counter": "0,1,2,3",
2011 "UMask": "0x1",
2012 "EventName": "OFFCORE_RESPONSE.PF_L3_RFO.L3_HIT_E.SNOOP_MISS",
2013 "MSRIndex": "0x1a6,0x1a7",
2014 "SampleAfterValue": "100003",
2015 "BriefDescription": "PF_L3_RFO & L3_HIT_E & SNOOP_MISS",
2016 "Offcore": "1",
2017 "CounterHTOff": "0,1,2,3"
2018 },
2019 {
2020 "EventCode": "0xB7, 0xBB",
2021 "MSRValue": "0x0100080100 ",
2022 "Counter": "0,1,2,3",
2023 "UMask": "0x1",
2024 "EventName": "OFFCORE_RESPONSE.PF_L3_RFO.L3_HIT_E.SNOOP_NOT_NEEDED",
2025 "MSRIndex": "0x1a6,0x1a7",
2026 "SampleAfterValue": "100003",
2027 "BriefDescription": "PF_L3_RFO & L3_HIT_E & SNOOP_NOT_NEEDED",
2028 "Offcore": "1",
2029 "CounterHTOff": "0,1,2,3"
2030 },
2031 {
2032 "EventCode": "0xB7, 0xBB",
2033 "MSRValue": "0x0080080100 ",
2034 "Counter": "0,1,2,3",
2035 "UMask": "0x1",
2036 "EventName": "OFFCORE_RESPONSE.PF_L3_RFO.L3_HIT_E.SNOOP_NONE",
2037 "MSRIndex": "0x1a6,0x1a7",
2038 "SampleAfterValue": "100003",
2039 "BriefDescription": "PF_L3_RFO & L3_HIT_E & SNOOP_NONE",
2040 "Offcore": "1",
2041 "CounterHTOff": "0,1,2,3"
2042 },
2043 {
2044 "EventCode": "0xB7, 0xBB",
2045 "MSRValue": "0x0040080100 ",
2046 "Counter": "0,1,2,3",
2047 "UMask": "0x1",
2048 "EventName": "OFFCORE_RESPONSE.PF_L3_RFO.L3_HIT_E.SPL_HIT",
2049 "MSRIndex": "0x1a6,0x1a7",
2050 "SampleAfterValue": "100003",
2051 "BriefDescription": "PF_L3_RFO & L3_HIT_E & SPL_HIT",
2052 "Offcore": "1",
2053 "CounterHTOff": "0,1,2,3"
2054 },
2055 {
2056 "EventCode": "0xB7, 0xBB",
2057 "MSRValue": "0x3fc0040100 ",
2058 "Counter": "0,1,2,3",
2059 "UMask": "0x1",
2060 "EventName": "OFFCORE_RESPONSE.PF_L3_RFO.L3_HIT_M.ANY_SNOOP",
2061 "MSRIndex": "0x1a6,0x1a7",
2062 "SampleAfterValue": "100003",
2063 "BriefDescription": "PF_L3_RFO & L3_HIT_M & ANY_SNOOP",
2064 "Offcore": "1",
2065 "CounterHTOff": "0,1,2,3"
2066 },
2067 {
2068 "EventCode": "0xB7, 0xBB",
2069 "MSRValue": "0x1000040100 ",
2070 "Counter": "0,1,2,3",
2071 "UMask": "0x1",
2072 "EventName": "OFFCORE_RESPONSE.PF_L3_RFO.L3_HIT_M.SNOOP_HITM",
2073 "MSRIndex": "0x1a6,0x1a7",
2074 "SampleAfterValue": "100003",
2075 "BriefDescription": "PF_L3_RFO & L3_HIT_M & SNOOP_HITM",
2076 "Offcore": "1",
2077 "CounterHTOff": "0,1,2,3"
2078 },
2079 {
2080 "EventCode": "0xB7, 0xBB",
2081 "MSRValue": "0x0400040100 ",
2082 "Counter": "0,1,2,3",
2083 "UMask": "0x1",
2084 "EventName": "OFFCORE_RESPONSE.PF_L3_RFO.L3_HIT_M.SNOOP_HIT_NO_FWD",
2085 "MSRIndex": "0x1a6,0x1a7",
2086 "SampleAfterValue": "100003",
2087 "BriefDescription": "PF_L3_RFO & L3_HIT_M & SNOOP_HIT_NO_FWD",
2088 "Offcore": "1",
2089 "CounterHTOff": "0,1,2,3"
2090 },
2091 {
2092 "EventCode": "0xB7, 0xBB",
2093 "MSRValue": "0x0200040100 ",
2094 "Counter": "0,1,2,3",
2095 "UMask": "0x1",
2096 "EventName": "OFFCORE_RESPONSE.PF_L3_RFO.L3_HIT_M.SNOOP_MISS",
2097 "MSRIndex": "0x1a6,0x1a7",
2098 "SampleAfterValue": "100003",
2099 "BriefDescription": "PF_L3_RFO & L3_HIT_M & SNOOP_MISS",
2100 "Offcore": "1",
2101 "CounterHTOff": "0,1,2,3"
2102 },
2103 {
2104 "EventCode": "0xB7, 0xBB",
2105 "MSRValue": "0x0100040100 ",
2106 "Counter": "0,1,2,3",
2107 "UMask": "0x1",
2108 "EventName": "OFFCORE_RESPONSE.PF_L3_RFO.L3_HIT_M.SNOOP_NOT_NEEDED",
2109 "MSRIndex": "0x1a6,0x1a7",
2110 "SampleAfterValue": "100003",
2111 "BriefDescription": "PF_L3_RFO & L3_HIT_M & SNOOP_NOT_NEEDED",
2112 "Offcore": "1",
2113 "CounterHTOff": "0,1,2,3"
2114 },
2115 {
2116 "EventCode": "0xB7, 0xBB",
2117 "MSRValue": "0x0080040100 ",
2118 "Counter": "0,1,2,3",
2119 "UMask": "0x1",
2120 "EventName": "OFFCORE_RESPONSE.PF_L3_RFO.L3_HIT_M.SNOOP_NONE",
2121 "MSRIndex": "0x1a6,0x1a7",
2122 "SampleAfterValue": "100003",
2123 "BriefDescription": "PF_L3_RFO & L3_HIT_M & SNOOP_NONE",
2124 "Offcore": "1",
2125 "CounterHTOff": "0,1,2,3"
2126 },
2127 {
2128 "EventCode": "0xB7, 0xBB",
2129 "MSRValue": "0x0040040100 ",
2130 "Counter": "0,1,2,3",
2131 "UMask": "0x1",
2132 "EventName": "OFFCORE_RESPONSE.PF_L3_RFO.L3_HIT_M.SPL_HIT",
2133 "MSRIndex": "0x1a6,0x1a7",
2134 "SampleAfterValue": "100003",
2135 "BriefDescription": "PF_L3_RFO & L3_HIT_M & SPL_HIT",
2136 "Offcore": "1",
2137 "CounterHTOff": "0,1,2,3"
2138 },
2139 {
2140 "EventCode": "0xB7, 0xBB",
2141 "MSRValue": "0x3fc0020100 ",
2142 "Counter": "0,1,2,3",
2143 "UMask": "0x1",
2144 "EventName": "OFFCORE_RESPONSE.PF_L3_RFO.SUPPLIER_NONE.ANY_SNOOP",
2145 "MSRIndex": "0x1a6,0x1a7",
2146 "SampleAfterValue": "100003",
2147 "BriefDescription": "PF_L3_RFO & SUPPLIER_NONE & ANY_SNOOP",
2148 "Offcore": "1",
2149 "CounterHTOff": "0,1,2,3"
2150 },
2151 {
2152 "EventCode": "0xB7, 0xBB",
2153 "MSRValue": "0x1000020100 ",
2154 "Counter": "0,1,2,3",
2155 "UMask": "0x1",
2156 "EventName": "OFFCORE_RESPONSE.PF_L3_RFO.SUPPLIER_NONE.SNOOP_HITM",
2157 "MSRIndex": "0x1a6,0x1a7",
2158 "SampleAfterValue": "100003",
2159 "BriefDescription": "PF_L3_RFO & SUPPLIER_NONE & SNOOP_HITM",
2160 "Offcore": "1",
2161 "CounterHTOff": "0,1,2,3"
2162 },
2163 {
2164 "EventCode": "0xB7, 0xBB",
2165 "MSRValue": "0x0400020100 ",
2166 "Counter": "0,1,2,3",
2167 "UMask": "0x1",
2168 "EventName": "OFFCORE_RESPONSE.PF_L3_RFO.SUPPLIER_NONE.SNOOP_HIT_NO_FWD",
2169 "MSRIndex": "0x1a6,0x1a7",
2170 "SampleAfterValue": "100003",
2171 "BriefDescription": "PF_L3_RFO & SUPPLIER_NONE & SNOOP_HIT_NO_FWD",
2172 "Offcore": "1",
2173 "CounterHTOff": "0,1,2,3"
2174 },
2175 {
2176 "EventCode": "0xB7, 0xBB",
2177 "MSRValue": "0x0200020100 ",
2178 "Counter": "0,1,2,3",
2179 "UMask": "0x1",
2180 "EventName": "OFFCORE_RESPONSE.PF_L3_RFO.SUPPLIER_NONE.SNOOP_MISS",
2181 "MSRIndex": "0x1a6,0x1a7",
2182 "SampleAfterValue": "100003",
2183 "BriefDescription": "PF_L3_RFO & SUPPLIER_NONE & SNOOP_MISS",
2184 "Offcore": "1",
2185 "CounterHTOff": "0,1,2,3"
2186 },
2187 {
2188 "EventCode": "0xB7, 0xBB",
2189 "MSRValue": "0x0100020100 ",
2190 "Counter": "0,1,2,3",
2191 "UMask": "0x1",
2192 "EventName": "OFFCORE_RESPONSE.PF_L3_RFO.SUPPLIER_NONE.SNOOP_NOT_NEEDED",
2193 "MSRIndex": "0x1a6,0x1a7",
2194 "SampleAfterValue": "100003",
2195 "BriefDescription": "PF_L3_RFO & SUPPLIER_NONE & SNOOP_NOT_NEEDED",
2196 "Offcore": "1",
2197 "CounterHTOff": "0,1,2,3"
2198 },
2199 {
2200 "EventCode": "0xB7, 0xBB",
2201 "MSRValue": "0x0080020100 ",
2202 "Counter": "0,1,2,3",
2203 "UMask": "0x1",
2204 "EventName": "OFFCORE_RESPONSE.PF_L3_RFO.SUPPLIER_NONE.SNOOP_NONE",
2205 "MSRIndex": "0x1a6,0x1a7",
2206 "SampleAfterValue": "100003",
2207 "BriefDescription": "PF_L3_RFO & SUPPLIER_NONE & SNOOP_NONE",
2208 "Offcore": "1",
2209 "CounterHTOff": "0,1,2,3"
2210 },
2211 {
2212 "EventCode": "0xB7, 0xBB",
2213 "MSRValue": "0x0040020100 ",
2214 "Counter": "0,1,2,3",
2215 "UMask": "0x1",
2216 "EventName": "OFFCORE_RESPONSE.PF_L3_RFO.SUPPLIER_NONE.SPL_HIT",
2217 "MSRIndex": "0x1a6,0x1a7",
2218 "SampleAfterValue": "100003",
2219 "BriefDescription": "PF_L3_RFO & SUPPLIER_NONE & SPL_HIT",
2220 "Offcore": "1",
2221 "CounterHTOff": "0,1,2,3"
2222 },
2223 {
2224 "EventCode": "0xB7, 0xBB",
2225 "MSRValue": "0x0000010100 ",
2226 "Counter": "0,1,2,3",
2227 "UMask": "0x1",
2228 "EventName": "OFFCORE_RESPONSE.PF_L3_RFO.ANY_RESPONSE",
2229 "MSRIndex": "0x1a6,0x1a7",
2230 "SampleAfterValue": "100003",
2231 "BriefDescription": "Counts all prefetch (that bring data to LLC only) RFOs that have any response type.",
2232 "Offcore": "1",
2233 "CounterHTOff": "0,1,2,3"
2234 },
2235 {
2236 "EventCode": "0xB7, 0xBB",
2237 "MSRValue": "0x3fc0400080 ",
2238 "Counter": "0,1,2,3",
2239 "UMask": "0x1",
2240 "EventName": "OFFCORE_RESPONSE.PF_L3_DATA_RD.L4_HIT_LOCAL_L4.ANY_SNOOP",
2241 "MSRIndex": "0x1a6,0x1a7",
2242 "SampleAfterValue": "100003",
2243 "BriefDescription": "PF_L3_DATA_RD & L4_HIT_LOCAL_L4 & ANY_SNOOP",
2244 "Offcore": "1",
2245 "CounterHTOff": "0,1,2,3"
2246 },
2247 {
2248 "EventCode": "0xB7, 0xBB",
2249 "MSRValue": "0x1000400080 ",
2250 "Counter": "0,1,2,3",
2251 "UMask": "0x1",
2252 "EventName": "OFFCORE_RESPONSE.PF_L3_DATA_RD.L4_HIT_LOCAL_L4.SNOOP_HITM",
2253 "MSRIndex": "0x1a6,0x1a7",
2254 "SampleAfterValue": "100003",
2255 "BriefDescription": "PF_L3_DATA_RD & L4_HIT_LOCAL_L4 & SNOOP_HITM",
2256 "Offcore": "1",
2257 "CounterHTOff": "0,1,2,3"
2258 },
2259 {
2260 "EventCode": "0xB7, 0xBB",
2261 "MSRValue": "0x0400400080 ",
2262 "Counter": "0,1,2,3",
2263 "UMask": "0x1",
2264 "EventName": "OFFCORE_RESPONSE.PF_L3_DATA_RD.L4_HIT_LOCAL_L4.SNOOP_HIT_NO_FWD",
2265 "MSRIndex": "0x1a6,0x1a7",
2266 "SampleAfterValue": "100003",
2267 "BriefDescription": "PF_L3_DATA_RD & L4_HIT_LOCAL_L4 & SNOOP_HIT_NO_FWD",
2268 "Offcore": "1",
2269 "CounterHTOff": "0,1,2,3"
2270 },
2271 {
2272 "EventCode": "0xB7, 0xBB",
2273 "MSRValue": "0x0200400080 ",
2274 "Counter": "0,1,2,3",
2275 "UMask": "0x1",
2276 "EventName": "OFFCORE_RESPONSE.PF_L3_DATA_RD.L4_HIT_LOCAL_L4.SNOOP_MISS",
2277 "MSRIndex": "0x1a6,0x1a7",
2278 "SampleAfterValue": "100003",
2279 "BriefDescription": "PF_L3_DATA_RD & L4_HIT_LOCAL_L4 & SNOOP_MISS",
2280 "Offcore": "1",
2281 "CounterHTOff": "0,1,2,3"
2282 },
2283 {
2284 "EventCode": "0xB7, 0xBB",
2285 "MSRValue": "0x0100400080 ",
2286 "Counter": "0,1,2,3",
2287 "UMask": "0x1",
2288 "EventName": "OFFCORE_RESPONSE.PF_L3_DATA_RD.L4_HIT_LOCAL_L4.SNOOP_NOT_NEEDED",
2289 "MSRIndex": "0x1a6,0x1a7",
2290 "SampleAfterValue": "100003",
2291 "BriefDescription": "PF_L3_DATA_RD & L4_HIT_LOCAL_L4 & SNOOP_NOT_NEEDED",
2292 "Offcore": "1",
2293 "CounterHTOff": "0,1,2,3"
2294 },
2295 {
2296 "EventCode": "0xB7, 0xBB",
2297 "MSRValue": "0x0080400080 ",
2298 "Counter": "0,1,2,3",
2299 "UMask": "0x1",
2300 "EventName": "OFFCORE_RESPONSE.PF_L3_DATA_RD.L4_HIT_LOCAL_L4.SNOOP_NONE",
2301 "MSRIndex": "0x1a6,0x1a7",
2302 "SampleAfterValue": "100003",
2303 "BriefDescription": "PF_L3_DATA_RD & L4_HIT_LOCAL_L4 & SNOOP_NONE",
2304 "Offcore": "1",
2305 "CounterHTOff": "0,1,2,3"
2306 },
2307 {
2308 "EventCode": "0xB7, 0xBB",
2309 "MSRValue": "0x0040400080 ",
2310 "Counter": "0,1,2,3",
2311 "UMask": "0x1",
2312 "EventName": "OFFCORE_RESPONSE.PF_L3_DATA_RD.L4_HIT_LOCAL_L4.SPL_HIT",
2313 "MSRIndex": "0x1a6,0x1a7",
2314 "SampleAfterValue": "100003",
2315 "BriefDescription": "PF_L3_DATA_RD & L4_HIT_LOCAL_L4 & SPL_HIT",
2316 "Offcore": "1",
2317 "CounterHTOff": "0,1,2,3"
2318 },
2319 {
2320 "EventCode": "0xB7, 0xBB",
2321 "MSRValue": "0x3fc01c0080 ",
2322 "Counter": "0,1,2,3",
2323 "UMask": "0x1",
2324 "EventName": "OFFCORE_RESPONSE.PF_L3_DATA_RD.L3_HIT.ANY_SNOOP",
2325 "MSRIndex": "0x1a6,0x1a7",
2326 "SampleAfterValue": "100003",
2327 "BriefDescription": "PF_L3_DATA_RD & L3_HIT & ANY_SNOOP",
2328 "Offcore": "1",
2329 "CounterHTOff": "0,1,2,3"
2330 },
2331 {
2332 "EventCode": "0xB7, 0xBB",
2333 "MSRValue": "0x10001c0080 ",
2334 "Counter": "0,1,2,3",
2335 "UMask": "0x1",
2336 "EventName": "OFFCORE_RESPONSE.PF_L3_DATA_RD.L3_HIT.SNOOP_HITM",
2337 "MSRIndex": "0x1a6,0x1a7",
2338 "SampleAfterValue": "100003",
2339 "BriefDescription": "PF_L3_DATA_RD & L3_HIT & SNOOP_HITM",
2340 "Offcore": "1",
2341 "CounterHTOff": "0,1,2,3"
2342 },
2343 {
2344 "EventCode": "0xB7, 0xBB",
2345 "MSRValue": "0x04001c0080 ",
2346 "Counter": "0,1,2,3",
2347 "UMask": "0x1",
2348 "EventName": "OFFCORE_RESPONSE.PF_L3_DATA_RD.L3_HIT.SNOOP_HIT_NO_FWD",
2349 "MSRIndex": "0x1a6,0x1a7",
2350 "SampleAfterValue": "100003",
2351 "BriefDescription": "Counts all prefetch (that bring data to LLC only) data reads that hit in the L3 and the snoops to sibling cores hit in either E/S state and the line is not forwarded.",
2352 "Offcore": "1",
2353 "CounterHTOff": "0,1,2,3"
2354 },
2355 {
2356 "EventCode": "0xB7, 0xBB",
2357 "MSRValue": "0x02001c0080 ",
2358 "Counter": "0,1,2,3",
2359 "UMask": "0x1",
2360 "EventName": "OFFCORE_RESPONSE.PF_L3_DATA_RD.L3_HIT.SNOOP_MISS",
2361 "MSRIndex": "0x1a6,0x1a7",
2362 "SampleAfterValue": "100003",
2363 "BriefDescription": "Counts all prefetch (that bring data to LLC only) data reads that hit in the L3 and the snoops sent to sibling cores return clean response.",
2364 "Offcore": "1",
2365 "CounterHTOff": "0,1,2,3"
2366 },
2367 {
2368 "EventCode": "0xB7, 0xBB",
2369 "MSRValue": "0x01001c0080 ",
2370 "Counter": "0,1,2,3",
2371 "UMask": "0x1",
2372 "EventName": "OFFCORE_RESPONSE.PF_L3_DATA_RD.L3_HIT.SNOOP_NOT_NEEDED",
2373 "MSRIndex": "0x1a6,0x1a7",
2374 "SampleAfterValue": "100003",
2375 "BriefDescription": "Counts all prefetch (that bring data to LLC only) data reads that hit in the L3 and sibling core snoops are not needed as either the core-valid bit is not set or the shared line is present in multiple cores.",
2376 "Offcore": "1",
2377 "CounterHTOff": "0,1,2,3"
2378 },
2379 {
2380 "EventCode": "0xB7, 0xBB",
2381 "MSRValue": "0x00801c0080 ",
2382 "Counter": "0,1,2,3",
2383 "UMask": "0x1",
2384 "EventName": "OFFCORE_RESPONSE.PF_L3_DATA_RD.L3_HIT.SNOOP_NONE",
2385 "MSRIndex": "0x1a6,0x1a7",
2386 "SampleAfterValue": "100003",
2387 "BriefDescription": "PF_L3_DATA_RD & L3_HIT & SNOOP_NONE",
2388 "Offcore": "1",
2389 "CounterHTOff": "0,1,2,3"
2390 },
2391 {
2392 "EventCode": "0xB7, 0xBB",
2393 "MSRValue": "0x00401c0080 ",
2394 "Counter": "0,1,2,3",
2395 "UMask": "0x1",
2396 "EventName": "OFFCORE_RESPONSE.PF_L3_DATA_RD.L3_HIT.SPL_HIT",
2397 "MSRIndex": "0x1a6,0x1a7",
2398 "SampleAfterValue": "100003",
2399 "BriefDescription": "PF_L3_DATA_RD & L3_HIT & SPL_HIT",
2400 "Offcore": "1",
2401 "CounterHTOff": "0,1,2,3"
2402 },
2403 {
2404 "EventCode": "0xB7, 0xBB",
2405 "MSRValue": "0x3fc0100080 ",
2406 "Counter": "0,1,2,3",
2407 "UMask": "0x1",
2408 "EventName": "OFFCORE_RESPONSE.PF_L3_DATA_RD.L3_HIT_S.ANY_SNOOP",
2409 "MSRIndex": "0x1a6,0x1a7",
2410 "SampleAfterValue": "100003",
2411 "BriefDescription": "PF_L3_DATA_RD & L3_HIT_S & ANY_SNOOP",
2412 "Offcore": "1",
2413 "CounterHTOff": "0,1,2,3"
2414 },
2415 {
2416 "EventCode": "0xB7, 0xBB",
2417 "MSRValue": "0x1000100080 ",
2418 "Counter": "0,1,2,3",
2419 "UMask": "0x1",
2420 "EventName": "OFFCORE_RESPONSE.PF_L3_DATA_RD.L3_HIT_S.SNOOP_HITM",
2421 "MSRIndex": "0x1a6,0x1a7",
2422 "SampleAfterValue": "100003",
2423 "BriefDescription": "PF_L3_DATA_RD & L3_HIT_S & SNOOP_HITM",
2424 "Offcore": "1",
2425 "CounterHTOff": "0,1,2,3"
2426 },
2427 {
2428 "EventCode": "0xB7, 0xBB",
2429 "MSRValue": "0x0400100080 ",
2430 "Counter": "0,1,2,3",
2431 "UMask": "0x1",
2432 "EventName": "OFFCORE_RESPONSE.PF_L3_DATA_RD.L3_HIT_S.SNOOP_HIT_NO_FWD",
2433 "MSRIndex": "0x1a6,0x1a7",
2434 "SampleAfterValue": "100003",
2435 "BriefDescription": "PF_L3_DATA_RD & L3_HIT_S & SNOOP_HIT_NO_FWD",
2436 "Offcore": "1",
2437 "CounterHTOff": "0,1,2,3"
2438 },
2439 {
2440 "EventCode": "0xB7, 0xBB",
2441 "MSRValue": "0x0200100080 ",
2442 "Counter": "0,1,2,3",
2443 "UMask": "0x1",
2444 "EventName": "OFFCORE_RESPONSE.PF_L3_DATA_RD.L3_HIT_S.SNOOP_MISS",
2445 "MSRIndex": "0x1a6,0x1a7",
2446 "SampleAfterValue": "100003",
2447 "BriefDescription": "PF_L3_DATA_RD & L3_HIT_S & SNOOP_MISS",
2448 "Offcore": "1",
2449 "CounterHTOff": "0,1,2,3"
2450 },
2451 {
2452 "EventCode": "0xB7, 0xBB",
2453 "MSRValue": "0x0100100080 ",
2454 "Counter": "0,1,2,3",
2455 "UMask": "0x1",
2456 "EventName": "OFFCORE_RESPONSE.PF_L3_DATA_RD.L3_HIT_S.SNOOP_NOT_NEEDED",
2457 "MSRIndex": "0x1a6,0x1a7",
2458 "SampleAfterValue": "100003",
2459 "BriefDescription": "PF_L3_DATA_RD & L3_HIT_S & SNOOP_NOT_NEEDED",
2460 "Offcore": "1",
2461 "CounterHTOff": "0,1,2,3"
2462 },
2463 {
2464 "EventCode": "0xB7, 0xBB",
2465 "MSRValue": "0x0080100080 ",
2466 "Counter": "0,1,2,3",
2467 "UMask": "0x1",
2468 "EventName": "OFFCORE_RESPONSE.PF_L3_DATA_RD.L3_HIT_S.SNOOP_NONE",
2469 "MSRIndex": "0x1a6,0x1a7",
2470 "SampleAfterValue": "100003",
2471 "BriefDescription": "PF_L3_DATA_RD & L3_HIT_S & SNOOP_NONE",
2472 "Offcore": "1",
2473 "CounterHTOff": "0,1,2,3"
2474 },
2475 {
2476 "EventCode": "0xB7, 0xBB",
2477 "MSRValue": "0x0040100080 ",
2478 "Counter": "0,1,2,3",
2479 "UMask": "0x1",
2480 "EventName": "OFFCORE_RESPONSE.PF_L3_DATA_RD.L3_HIT_S.SPL_HIT",
2481 "MSRIndex": "0x1a6,0x1a7",
2482 "SampleAfterValue": "100003",
2483 "BriefDescription": "PF_L3_DATA_RD & L3_HIT_S & SPL_HIT",
2484 "Offcore": "1",
2485 "CounterHTOff": "0,1,2,3"
2486 },
2487 {
2488 "EventCode": "0xB7, 0xBB",
2489 "MSRValue": "0x3fc0080080 ",
2490 "Counter": "0,1,2,3",
2491 "UMask": "0x1",
2492 "EventName": "OFFCORE_RESPONSE.PF_L3_DATA_RD.L3_HIT_E.ANY_SNOOP",
2493 "MSRIndex": "0x1a6,0x1a7",
2494 "SampleAfterValue": "100003",
2495 "BriefDescription": "PF_L3_DATA_RD & L3_HIT_E & ANY_SNOOP",
2496 "Offcore": "1",
2497 "CounterHTOff": "0,1,2,3"
2498 },
2499 {
2500 "EventCode": "0xB7, 0xBB",
2501 "MSRValue": "0x1000080080 ",
2502 "Counter": "0,1,2,3",
2503 "UMask": "0x1",
2504 "EventName": "OFFCORE_RESPONSE.PF_L3_DATA_RD.L3_HIT_E.SNOOP_HITM",
2505 "MSRIndex": "0x1a6,0x1a7",
2506 "SampleAfterValue": "100003",
2507 "BriefDescription": "PF_L3_DATA_RD & L3_HIT_E & SNOOP_HITM",
2508 "Offcore": "1",
2509 "CounterHTOff": "0,1,2,3"
2510 },
2511 {
2512 "EventCode": "0xB7, 0xBB",
2513 "MSRValue": "0x0400080080 ",
2514 "Counter": "0,1,2,3",
2515 "UMask": "0x1",
2516 "EventName": "OFFCORE_RESPONSE.PF_L3_DATA_RD.L3_HIT_E.SNOOP_HIT_NO_FWD",
2517 "MSRIndex": "0x1a6,0x1a7",
2518 "SampleAfterValue": "100003",
2519 "BriefDescription": "PF_L3_DATA_RD & L3_HIT_E & SNOOP_HIT_NO_FWD",
2520 "Offcore": "1",
2521 "CounterHTOff": "0,1,2,3"
2522 },
2523 {
2524 "EventCode": "0xB7, 0xBB",
2525 "MSRValue": "0x0200080080 ",
2526 "Counter": "0,1,2,3",
2527 "UMask": "0x1",
2528 "EventName": "OFFCORE_RESPONSE.PF_L3_DATA_RD.L3_HIT_E.SNOOP_MISS",
2529 "MSRIndex": "0x1a6,0x1a7",
2530 "SampleAfterValue": "100003",
2531 "BriefDescription": "PF_L3_DATA_RD & L3_HIT_E & SNOOP_MISS",
2532 "Offcore": "1",
2533 "CounterHTOff": "0,1,2,3"
2534 },
2535 {
2536 "EventCode": "0xB7, 0xBB",
2537 "MSRValue": "0x0100080080 ",
2538 "Counter": "0,1,2,3",
2539 "UMask": "0x1",
2540 "EventName": "OFFCORE_RESPONSE.PF_L3_DATA_RD.L3_HIT_E.SNOOP_NOT_NEEDED",
2541 "MSRIndex": "0x1a6,0x1a7",
2542 "SampleAfterValue": "100003",
2543 "BriefDescription": "PF_L3_DATA_RD & L3_HIT_E & SNOOP_NOT_NEEDED",
2544 "Offcore": "1",
2545 "CounterHTOff": "0,1,2,3"
2546 },
2547 {
2548 "EventCode": "0xB7, 0xBB",
2549 "MSRValue": "0x0080080080 ",
2550 "Counter": "0,1,2,3",
2551 "UMask": "0x1",
2552 "EventName": "OFFCORE_RESPONSE.PF_L3_DATA_RD.L3_HIT_E.SNOOP_NONE",
2553 "MSRIndex": "0x1a6,0x1a7",
2554 "SampleAfterValue": "100003",
2555 "BriefDescription": "PF_L3_DATA_RD & L3_HIT_E & SNOOP_NONE",
2556 "Offcore": "1",
2557 "CounterHTOff": "0,1,2,3"
2558 },
2559 {
2560 "EventCode": "0xB7, 0xBB",
2561 "MSRValue": "0x0040080080 ",
2562 "Counter": "0,1,2,3",
2563 "UMask": "0x1",
2564 "EventName": "OFFCORE_RESPONSE.PF_L3_DATA_RD.L3_HIT_E.SPL_HIT",
2565 "MSRIndex": "0x1a6,0x1a7",
2566 "SampleAfterValue": "100003",
2567 "BriefDescription": "PF_L3_DATA_RD & L3_HIT_E & SPL_HIT",
2568 "Offcore": "1",
2569 "CounterHTOff": "0,1,2,3"
2570 },
2571 {
2572 "EventCode": "0xB7, 0xBB",
2573 "MSRValue": "0x3fc0040080 ",
2574 "Counter": "0,1,2,3",
2575 "UMask": "0x1",
2576 "EventName": "OFFCORE_RESPONSE.PF_L3_DATA_RD.L3_HIT_M.ANY_SNOOP",
2577 "MSRIndex": "0x1a6,0x1a7",
2578 "SampleAfterValue": "100003",
2579 "BriefDescription": "PF_L3_DATA_RD & L3_HIT_M & ANY_SNOOP",
2580 "Offcore": "1",
2581 "CounterHTOff": "0,1,2,3"
2582 },
2583 {
2584 "EventCode": "0xB7, 0xBB",
2585 "MSRValue": "0x1000040080 ",
2586 "Counter": "0,1,2,3",
2587 "UMask": "0x1",
2588 "EventName": "OFFCORE_RESPONSE.PF_L3_DATA_RD.L3_HIT_M.SNOOP_HITM",
2589 "MSRIndex": "0x1a6,0x1a7",
2590 "SampleAfterValue": "100003",
2591 "BriefDescription": "PF_L3_DATA_RD & L3_HIT_M & SNOOP_HITM",
2592 "Offcore": "1",
2593 "CounterHTOff": "0,1,2,3"
2594 },
2595 {
2596 "EventCode": "0xB7, 0xBB",
2597 "MSRValue": "0x0400040080 ",
2598 "Counter": "0,1,2,3",
2599 "UMask": "0x1",
2600 "EventName": "OFFCORE_RESPONSE.PF_L3_DATA_RD.L3_HIT_M.SNOOP_HIT_NO_FWD",
2601 "MSRIndex": "0x1a6,0x1a7",
2602 "SampleAfterValue": "100003",
2603 "BriefDescription": "PF_L3_DATA_RD & L3_HIT_M & SNOOP_HIT_NO_FWD",
2604 "Offcore": "1",
2605 "CounterHTOff": "0,1,2,3"
2606 },
2607 {
2608 "EventCode": "0xB7, 0xBB",
2609 "MSRValue": "0x0200040080 ",
2610 "Counter": "0,1,2,3",
2611 "UMask": "0x1",
2612 "EventName": "OFFCORE_RESPONSE.PF_L3_DATA_RD.L3_HIT_M.SNOOP_MISS",
2613 "MSRIndex": "0x1a6,0x1a7",
2614 "SampleAfterValue": "100003",
2615 "BriefDescription": "PF_L3_DATA_RD & L3_HIT_M & SNOOP_MISS",
2616 "Offcore": "1",
2617 "CounterHTOff": "0,1,2,3"
2618 },
2619 {
2620 "EventCode": "0xB7, 0xBB",
2621 "MSRValue": "0x0100040080 ",
2622 "Counter": "0,1,2,3",
2623 "UMask": "0x1",
2624 "EventName": "OFFCORE_RESPONSE.PF_L3_DATA_RD.L3_HIT_M.SNOOP_NOT_NEEDED",
2625 "MSRIndex": "0x1a6,0x1a7",
2626 "SampleAfterValue": "100003",
2627 "BriefDescription": "PF_L3_DATA_RD & L3_HIT_M & SNOOP_NOT_NEEDED",
2628 "Offcore": "1",
2629 "CounterHTOff": "0,1,2,3"
2630 },
2631 {
2632 "EventCode": "0xB7, 0xBB",
2633 "MSRValue": "0x0080040080 ",
2634 "Counter": "0,1,2,3",
2635 "UMask": "0x1",
2636 "EventName": "OFFCORE_RESPONSE.PF_L3_DATA_RD.L3_HIT_M.SNOOP_NONE",
2637 "MSRIndex": "0x1a6,0x1a7",
2638 "SampleAfterValue": "100003",
2639 "BriefDescription": "PF_L3_DATA_RD & L3_HIT_M & SNOOP_NONE",
2640 "Offcore": "1",
2641 "CounterHTOff": "0,1,2,3"
2642 },
2643 {
2644 "EventCode": "0xB7, 0xBB",
2645 "MSRValue": "0x0040040080 ",
2646 "Counter": "0,1,2,3",
2647 "UMask": "0x1",
2648 "EventName": "OFFCORE_RESPONSE.PF_L3_DATA_RD.L3_HIT_M.SPL_HIT",
2649 "MSRIndex": "0x1a6,0x1a7",
2650 "SampleAfterValue": "100003",
2651 "BriefDescription": "PF_L3_DATA_RD & L3_HIT_M & SPL_HIT",
2652 "Offcore": "1",
2653 "CounterHTOff": "0,1,2,3"
2654 },
2655 {
2656 "EventCode": "0xB7, 0xBB",
2657 "MSRValue": "0x3fc0020080 ",
2658 "Counter": "0,1,2,3",
2659 "UMask": "0x1",
2660 "EventName": "OFFCORE_RESPONSE.PF_L3_DATA_RD.SUPPLIER_NONE.ANY_SNOOP",
2661 "MSRIndex": "0x1a6,0x1a7",
2662 "SampleAfterValue": "100003",
2663 "BriefDescription": "PF_L3_DATA_RD & SUPPLIER_NONE & ANY_SNOOP",
2664 "Offcore": "1",
2665 "CounterHTOff": "0,1,2,3"
2666 },
2667 {
2668 "EventCode": "0xB7, 0xBB",
2669 "MSRValue": "0x1000020080 ",
2670 "Counter": "0,1,2,3",
2671 "UMask": "0x1",
2672 "EventName": "OFFCORE_RESPONSE.PF_L3_DATA_RD.SUPPLIER_NONE.SNOOP_HITM",
2673 "MSRIndex": "0x1a6,0x1a7",
2674 "SampleAfterValue": "100003",
2675 "BriefDescription": "PF_L3_DATA_RD & SUPPLIER_NONE & SNOOP_HITM",
2676 "Offcore": "1",
2677 "CounterHTOff": "0,1,2,3"
2678 },
2679 {
2680 "EventCode": "0xB7, 0xBB",
2681 "MSRValue": "0x0400020080 ",
2682 "Counter": "0,1,2,3",
2683 "UMask": "0x1",
2684 "EventName": "OFFCORE_RESPONSE.PF_L3_DATA_RD.SUPPLIER_NONE.SNOOP_HIT_NO_FWD",
2685 "MSRIndex": "0x1a6,0x1a7",
2686 "SampleAfterValue": "100003",
2687 "BriefDescription": "PF_L3_DATA_RD & SUPPLIER_NONE & SNOOP_HIT_NO_FWD",
2688 "Offcore": "1",
2689 "CounterHTOff": "0,1,2,3"
2690 },
2691 {
2692 "EventCode": "0xB7, 0xBB",
2693 "MSRValue": "0x0200020080 ",
2694 "Counter": "0,1,2,3",
2695 "UMask": "0x1",
2696 "EventName": "OFFCORE_RESPONSE.PF_L3_DATA_RD.SUPPLIER_NONE.SNOOP_MISS",
2697 "MSRIndex": "0x1a6,0x1a7",
2698 "SampleAfterValue": "100003",
2699 "BriefDescription": "PF_L3_DATA_RD & SUPPLIER_NONE & SNOOP_MISS",
2700 "Offcore": "1",
2701 "CounterHTOff": "0,1,2,3"
2702 },
2703 {
2704 "EventCode": "0xB7, 0xBB",
2705 "MSRValue": "0x0100020080 ",
2706 "Counter": "0,1,2,3",
2707 "UMask": "0x1",
2708 "EventName": "OFFCORE_RESPONSE.PF_L3_DATA_RD.SUPPLIER_NONE.SNOOP_NOT_NEEDED",
2709 "MSRIndex": "0x1a6,0x1a7",
2710 "SampleAfterValue": "100003",
2711 "BriefDescription": "PF_L3_DATA_RD & SUPPLIER_NONE & SNOOP_NOT_NEEDED",
2712 "Offcore": "1",
2713 "CounterHTOff": "0,1,2,3"
2714 },
2715 {
2716 "EventCode": "0xB7, 0xBB",
2717 "MSRValue": "0x0080020080 ",
2718 "Counter": "0,1,2,3",
2719 "UMask": "0x1",
2720 "EventName": "OFFCORE_RESPONSE.PF_L3_DATA_RD.SUPPLIER_NONE.SNOOP_NONE",
2721 "MSRIndex": "0x1a6,0x1a7",
2722 "SampleAfterValue": "100003",
2723 "BriefDescription": "PF_L3_DATA_RD & SUPPLIER_NONE & SNOOP_NONE",
2724 "Offcore": "1",
2725 "CounterHTOff": "0,1,2,3"
2726 },
2727 {
2728 "EventCode": "0xB7, 0xBB",
2729 "MSRValue": "0x0040020080 ",
2730 "Counter": "0,1,2,3",
2731 "UMask": "0x1",
2732 "EventName": "OFFCORE_RESPONSE.PF_L3_DATA_RD.SUPPLIER_NONE.SPL_HIT",
2733 "MSRIndex": "0x1a6,0x1a7",
2734 "SampleAfterValue": "100003",
2735 "BriefDescription": "PF_L3_DATA_RD & SUPPLIER_NONE & SPL_HIT",
2736 "Offcore": "1",
2737 "CounterHTOff": "0,1,2,3"
2738 },
2739 {
2740 "EventCode": "0xB7, 0xBB",
2741 "MSRValue": "0x0000010080 ",
2742 "Counter": "0,1,2,3",
2743 "UMask": "0x1",
2744 "EventName": "OFFCORE_RESPONSE.PF_L3_DATA_RD.ANY_RESPONSE",
2745 "MSRIndex": "0x1a6,0x1a7",
2746 "SampleAfterValue": "100003",
2747 "BriefDescription": "Counts all prefetch (that bring data to LLC only) data reads that have any response type.",
2748 "Offcore": "1",
2749 "CounterHTOff": "0,1,2,3"
2750 },
2751 {
2752 "EventCode": "0xB7, 0xBB",
2753 "MSRValue": "0x3fc0400004 ",
2754 "Counter": "0,1,2,3",
2755 "UMask": "0x1",
2756 "EventName": "OFFCORE_RESPONSE.DEMAND_CODE_RD.L4_HIT_LOCAL_L4.ANY_SNOOP",
2757 "MSRIndex": "0x1a6,0x1a7",
2758 "SampleAfterValue": "100003",
2759 "BriefDescription": "DEMAND_CODE_RD & L4_HIT_LOCAL_L4 & ANY_SNOOP",
2760 "Offcore": "1",
2761 "CounterHTOff": "0,1,2,3"
2762 },
2763 {
2764 "EventCode": "0xB7, 0xBB",
2765 "MSRValue": "0x1000400004 ",
2766 "Counter": "0,1,2,3",
2767 "UMask": "0x1",
2768 "EventName": "OFFCORE_RESPONSE.DEMAND_CODE_RD.L4_HIT_LOCAL_L4.SNOOP_HITM",
2769 "MSRIndex": "0x1a6,0x1a7",
2770 "SampleAfterValue": "100003",
2771 "BriefDescription": "DEMAND_CODE_RD & L4_HIT_LOCAL_L4 & SNOOP_HITM",
2772 "Offcore": "1",
2773 "CounterHTOff": "0,1,2,3"
2774 },
2775 {
2776 "EventCode": "0xB7, 0xBB",
2777 "MSRValue": "0x0400400004 ",
2778 "Counter": "0,1,2,3",
2779 "UMask": "0x1",
2780 "EventName": "OFFCORE_RESPONSE.DEMAND_CODE_RD.L4_HIT_LOCAL_L4.SNOOP_HIT_NO_FWD",
2781 "MSRIndex": "0x1a6,0x1a7",
2782 "SampleAfterValue": "100003",
2783 "BriefDescription": "DEMAND_CODE_RD & L4_HIT_LOCAL_L4 & SNOOP_HIT_NO_FWD",
2784 "Offcore": "1",
2785 "CounterHTOff": "0,1,2,3"
2786 },
2787 {
2788 "EventCode": "0xB7, 0xBB",
2789 "MSRValue": "0x0200400004 ",
2790 "Counter": "0,1,2,3",
2791 "UMask": "0x1",
2792 "EventName": "OFFCORE_RESPONSE.DEMAND_CODE_RD.L4_HIT_LOCAL_L4.SNOOP_MISS",
2793 "MSRIndex": "0x1a6,0x1a7",
2794 "SampleAfterValue": "100003",
2795 "BriefDescription": "DEMAND_CODE_RD & L4_HIT_LOCAL_L4 & SNOOP_MISS",
2796 "Offcore": "1",
2797 "CounterHTOff": "0,1,2,3"
2798 },
2799 {
2800 "EventCode": "0xB7, 0xBB",
2801 "MSRValue": "0x0100400004 ",
2802 "Counter": "0,1,2,3",
2803 "UMask": "0x1",
2804 "EventName": "OFFCORE_RESPONSE.DEMAND_CODE_RD.L4_HIT_LOCAL_L4.SNOOP_NOT_NEEDED",
2805 "MSRIndex": "0x1a6,0x1a7",
2806 "SampleAfterValue": "100003",
2807 "BriefDescription": "DEMAND_CODE_RD & L4_HIT_LOCAL_L4 & SNOOP_NOT_NEEDED",
2808 "Offcore": "1",
2809 "CounterHTOff": "0,1,2,3"
2810 },
2811 {
2812 "EventCode": "0xB7, 0xBB",
2813 "MSRValue": "0x0080400004 ",
2814 "Counter": "0,1,2,3",
2815 "UMask": "0x1",
2816 "EventName": "OFFCORE_RESPONSE.DEMAND_CODE_RD.L4_HIT_LOCAL_L4.SNOOP_NONE",
2817 "MSRIndex": "0x1a6,0x1a7",
2818 "SampleAfterValue": "100003",
2819 "BriefDescription": "DEMAND_CODE_RD & L4_HIT_LOCAL_L4 & SNOOP_NONE",
2820 "Offcore": "1",
2821 "CounterHTOff": "0,1,2,3"
2822 },
2823 {
2824 "EventCode": "0xB7, 0xBB",
2825 "MSRValue": "0x0040400004 ",
2826 "Counter": "0,1,2,3",
2827 "UMask": "0x1",
2828 "EventName": "OFFCORE_RESPONSE.DEMAND_CODE_RD.L4_HIT_LOCAL_L4.SPL_HIT",
2829 "MSRIndex": "0x1a6,0x1a7",
2830 "SampleAfterValue": "100003",
2831 "BriefDescription": "DEMAND_CODE_RD & L4_HIT_LOCAL_L4 & SPL_HIT",
2832 "Offcore": "1",
2833 "CounterHTOff": "0,1,2,3"
2834 },
2835 {
2836 "EventCode": "0xB7, 0xBB",
2837 "MSRValue": "0x3fc01c0004 ",
2838 "Counter": "0,1,2,3",
2839 "UMask": "0x1",
2840 "EventName": "OFFCORE_RESPONSE.DEMAND_CODE_RD.L3_HIT.ANY_SNOOP",
2841 "MSRIndex": "0x1a6,0x1a7",
2842 "SampleAfterValue": "100003",
2843 "BriefDescription": "DEMAND_CODE_RD & L3_HIT & ANY_SNOOP",
2844 "Offcore": "1",
2845 "CounterHTOff": "0,1,2,3"
2846 },
2847 {
2848 "EventCode": "0xB7, 0xBB",
2849 "MSRValue": "0x10001c0004 ",
2850 "Counter": "0,1,2,3",
2851 "UMask": "0x1",
2852 "EventName": "OFFCORE_RESPONSE.DEMAND_CODE_RD.L3_HIT.SNOOP_HITM",
2853 "MSRIndex": "0x1a6,0x1a7",
2854 "SampleAfterValue": "100003",
2855 "BriefDescription": "DEMAND_CODE_RD & L3_HIT & SNOOP_HITM",
2856 "Offcore": "1",
2857 "CounterHTOff": "0,1,2,3"
2858 },
2859 {
2860 "EventCode": "0xB7, 0xBB",
2861 "MSRValue": "0x04001c0004 ",
2862 "Counter": "0,1,2,3",
2863 "UMask": "0x1",
2864 "EventName": "OFFCORE_RESPONSE.DEMAND_CODE_RD.L3_HIT.SNOOP_HIT_NO_FWD",
2865 "MSRIndex": "0x1a6,0x1a7",
2866 "SampleAfterValue": "100003",
2867 "BriefDescription": "Counts all demand code reads that hit in the L3 and the snoops to sibling cores hit in either E/S state and the line is not forwarded.",
2868 "Offcore": "1",
2869 "CounterHTOff": "0,1,2,3"
2870 },
2871 {
2872 "EventCode": "0xB7, 0xBB",
2873 "MSRValue": "0x02001c0004 ",
2874 "Counter": "0,1,2,3",
2875 "UMask": "0x1",
2876 "EventName": "OFFCORE_RESPONSE.DEMAND_CODE_RD.L3_HIT.SNOOP_MISS",
2877 "MSRIndex": "0x1a6,0x1a7",
2878 "SampleAfterValue": "100003",
2879 "BriefDescription": "Counts all demand code reads that hit in the L3 and the snoops sent to sibling cores return clean response.",
2880 "Offcore": "1",
2881 "CounterHTOff": "0,1,2,3"
2882 },
2883 {
2884 "EventCode": "0xB7, 0xBB",
2885 "MSRValue": "0x01001c0004 ",
2886 "Counter": "0,1,2,3",
2887 "UMask": "0x1",
2888 "EventName": "OFFCORE_RESPONSE.DEMAND_CODE_RD.L3_HIT.SNOOP_NOT_NEEDED",
2889 "MSRIndex": "0x1a6,0x1a7",
2890 "SampleAfterValue": "100003",
2891 "BriefDescription": "Counts all demand code reads that hit in the L3 and sibling core snoops are not needed as either the core-valid bit is not set or the shared line is present in multiple cores.",
2892 "Offcore": "1",
2893 "CounterHTOff": "0,1,2,3"
2894 },
2895 {
2896 "EventCode": "0xB7, 0xBB",
2897 "MSRValue": "0x00801c0004 ",
2898 "Counter": "0,1,2,3",
2899 "UMask": "0x1",
2900 "EventName": "OFFCORE_RESPONSE.DEMAND_CODE_RD.L3_HIT.SNOOP_NONE",
2901 "MSRIndex": "0x1a6,0x1a7",
2902 "SampleAfterValue": "100003",
2903 "BriefDescription": "DEMAND_CODE_RD & L3_HIT & SNOOP_NONE",
2904 "Offcore": "1",
2905 "CounterHTOff": "0,1,2,3"
2906 },
2907 {
2908 "EventCode": "0xB7, 0xBB",
2909 "MSRValue": "0x00401c0004 ",
2910 "Counter": "0,1,2,3",
2911 "UMask": "0x1",
2912 "EventName": "OFFCORE_RESPONSE.DEMAND_CODE_RD.L3_HIT.SPL_HIT",
2913 "MSRIndex": "0x1a6,0x1a7",
2914 "SampleAfterValue": "100003",
2915 "BriefDescription": "DEMAND_CODE_RD & L3_HIT & SPL_HIT",
2916 "Offcore": "1",
2917 "CounterHTOff": "0,1,2,3"
2918 },
2919 {
2920 "EventCode": "0xB7, 0xBB",
2921 "MSRValue": "0x3fc0100004 ",
2922 "Counter": "0,1,2,3",
2923 "UMask": "0x1",
2924 "EventName": "OFFCORE_RESPONSE.DEMAND_CODE_RD.L3_HIT_S.ANY_SNOOP",
2925 "MSRIndex": "0x1a6,0x1a7",
2926 "SampleAfterValue": "100003",
2927 "BriefDescription": "DEMAND_CODE_RD & L3_HIT_S & ANY_SNOOP",
2928 "Offcore": "1",
2929 "CounterHTOff": "0,1,2,3"
2930 },
2931 {
2932 "EventCode": "0xB7, 0xBB",
2933 "MSRValue": "0x1000100004 ",
2934 "Counter": "0,1,2,3",
2935 "UMask": "0x1",
2936 "EventName": "OFFCORE_RESPONSE.DEMAND_CODE_RD.L3_HIT_S.SNOOP_HITM",
2937 "MSRIndex": "0x1a6,0x1a7",
2938 "SampleAfterValue": "100003",
2939 "BriefDescription": "DEMAND_CODE_RD & L3_HIT_S & SNOOP_HITM",
2940 "Offcore": "1",
2941 "CounterHTOff": "0,1,2,3"
2942 },
2943 {
2944 "EventCode": "0xB7, 0xBB",
2945 "MSRValue": "0x0400100004 ",
2946 "Counter": "0,1,2,3",
2947 "UMask": "0x1",
2948 "EventName": "OFFCORE_RESPONSE.DEMAND_CODE_RD.L3_HIT_S.SNOOP_HIT_NO_FWD",
2949 "MSRIndex": "0x1a6,0x1a7",
2950 "SampleAfterValue": "100003",
2951 "BriefDescription": "DEMAND_CODE_RD & L3_HIT_S & SNOOP_HIT_NO_FWD",
2952 "Offcore": "1",
2953 "CounterHTOff": "0,1,2,3"
2954 },
2955 {
2956 "EventCode": "0xB7, 0xBB",
2957 "MSRValue": "0x0200100004 ",
2958 "Counter": "0,1,2,3",
2959 "UMask": "0x1",
2960 "EventName": "OFFCORE_RESPONSE.DEMAND_CODE_RD.L3_HIT_S.SNOOP_MISS",
2961 "MSRIndex": "0x1a6,0x1a7",
2962 "SampleAfterValue": "100003",
2963 "BriefDescription": "DEMAND_CODE_RD & L3_HIT_S & SNOOP_MISS",
2964 "Offcore": "1",
2965 "CounterHTOff": "0,1,2,3"
2966 },
2967 {
2968 "EventCode": "0xB7, 0xBB",
2969 "MSRValue": "0x0100100004 ",
2970 "Counter": "0,1,2,3",
2971 "UMask": "0x1",
2972 "EventName": "OFFCORE_RESPONSE.DEMAND_CODE_RD.L3_HIT_S.SNOOP_NOT_NEEDED",
2973 "MSRIndex": "0x1a6,0x1a7",
2974 "SampleAfterValue": "100003",
2975 "BriefDescription": "DEMAND_CODE_RD & L3_HIT_S & SNOOP_NOT_NEEDED",
2976 "Offcore": "1",
2977 "CounterHTOff": "0,1,2,3"
2978 },
2979 {
2980 "EventCode": "0xB7, 0xBB",
2981 "MSRValue": "0x0080100004 ",
2982 "Counter": "0,1,2,3",
2983 "UMask": "0x1",
2984 "EventName": "OFFCORE_RESPONSE.DEMAND_CODE_RD.L3_HIT_S.SNOOP_NONE",
2985 "MSRIndex": "0x1a6,0x1a7",
2986 "SampleAfterValue": "100003",
2987 "BriefDescription": "DEMAND_CODE_RD & L3_HIT_S & SNOOP_NONE",
2988 "Offcore": "1",
2989 "CounterHTOff": "0,1,2,3"
2990 },
2991 {
2992 "EventCode": "0xB7, 0xBB",
2993 "MSRValue": "0x0040100004 ",
2994 "Counter": "0,1,2,3",
2995 "UMask": "0x1",
2996 "EventName": "OFFCORE_RESPONSE.DEMAND_CODE_RD.L3_HIT_S.SPL_HIT",
2997 "MSRIndex": "0x1a6,0x1a7",
2998 "SampleAfterValue": "100003",
2999 "BriefDescription": "DEMAND_CODE_RD & L3_HIT_S & SPL_HIT",
3000 "Offcore": "1",
3001 "CounterHTOff": "0,1,2,3"
3002 },
3003 {
3004 "EventCode": "0xB7, 0xBB",
3005 "MSRValue": "0x3fc0080004 ",
3006 "Counter": "0,1,2,3",
3007 "UMask": "0x1",
3008 "EventName": "OFFCORE_RESPONSE.DEMAND_CODE_RD.L3_HIT_E.ANY_SNOOP",
3009 "MSRIndex": "0x1a6,0x1a7",
3010 "SampleAfterValue": "100003",
3011 "BriefDescription": "DEMAND_CODE_RD & L3_HIT_E & ANY_SNOOP",
3012 "Offcore": "1",
3013 "CounterHTOff": "0,1,2,3"
3014 },
3015 {
3016 "EventCode": "0xB7, 0xBB",
3017 "MSRValue": "0x1000080004 ",
3018 "Counter": "0,1,2,3",
3019 "UMask": "0x1",
3020 "EventName": "OFFCORE_RESPONSE.DEMAND_CODE_RD.L3_HIT_E.SNOOP_HITM",
3021 "MSRIndex": "0x1a6,0x1a7",
3022 "SampleAfterValue": "100003",
3023 "BriefDescription": "DEMAND_CODE_RD & L3_HIT_E & SNOOP_HITM",
3024 "Offcore": "1",
3025 "CounterHTOff": "0,1,2,3"
3026 },
3027 {
3028 "EventCode": "0xB7, 0xBB",
3029 "MSRValue": "0x0400080004 ",
3030 "Counter": "0,1,2,3",
3031 "UMask": "0x1",
3032 "EventName": "OFFCORE_RESPONSE.DEMAND_CODE_RD.L3_HIT_E.SNOOP_HIT_NO_FWD",
3033 "MSRIndex": "0x1a6,0x1a7",
3034 "SampleAfterValue": "100003",
3035 "BriefDescription": "DEMAND_CODE_RD & L3_HIT_E & SNOOP_HIT_NO_FWD",
3036 "Offcore": "1",
3037 "CounterHTOff": "0,1,2,3"
3038 },
3039 {
3040 "EventCode": "0xB7, 0xBB",
3041 "MSRValue": "0x0200080004 ",
3042 "Counter": "0,1,2,3",
3043 "UMask": "0x1",
3044 "EventName": "OFFCORE_RESPONSE.DEMAND_CODE_RD.L3_HIT_E.SNOOP_MISS",
3045 "MSRIndex": "0x1a6,0x1a7",
3046 "SampleAfterValue": "100003",
3047 "BriefDescription": "DEMAND_CODE_RD & L3_HIT_E & SNOOP_MISS",
3048 "Offcore": "1",
3049 "CounterHTOff": "0,1,2,3"
3050 },
3051 {
3052 "EventCode": "0xB7, 0xBB",
3053 "MSRValue": "0x0100080004 ",
3054 "Counter": "0,1,2,3",
3055 "UMask": "0x1",
3056 "EventName": "OFFCORE_RESPONSE.DEMAND_CODE_RD.L3_HIT_E.SNOOP_NOT_NEEDED",
3057 "MSRIndex": "0x1a6,0x1a7",
3058 "SampleAfterValue": "100003",
3059 "BriefDescription": "DEMAND_CODE_RD & L3_HIT_E & SNOOP_NOT_NEEDED",
3060 "Offcore": "1",
3061 "CounterHTOff": "0,1,2,3"
3062 },
3063 {
3064 "EventCode": "0xB7, 0xBB",
3065 "MSRValue": "0x0080080004 ",
3066 "Counter": "0,1,2,3",
3067 "UMask": "0x1",
3068 "EventName": "OFFCORE_RESPONSE.DEMAND_CODE_RD.L3_HIT_E.SNOOP_NONE",
3069 "MSRIndex": "0x1a6,0x1a7",
3070 "SampleAfterValue": "100003",
3071 "BriefDescription": "DEMAND_CODE_RD & L3_HIT_E & SNOOP_NONE",
3072 "Offcore": "1",
3073 "CounterHTOff": "0,1,2,3"
3074 },
3075 {
3076 "EventCode": "0xB7, 0xBB",
3077 "MSRValue": "0x0040080004 ",
3078 "Counter": "0,1,2,3",
3079 "UMask": "0x1",
3080 "EventName": "OFFCORE_RESPONSE.DEMAND_CODE_RD.L3_HIT_E.SPL_HIT",
3081 "MSRIndex": "0x1a6,0x1a7",
3082 "SampleAfterValue": "100003",
3083 "BriefDescription": "DEMAND_CODE_RD & L3_HIT_E & SPL_HIT",
3084 "Offcore": "1",
3085 "CounterHTOff": "0,1,2,3"
3086 },
3087 {
3088 "EventCode": "0xB7, 0xBB",
3089 "MSRValue": "0x3fc0040004 ",
3090 "Counter": "0,1,2,3",
3091 "UMask": "0x1",
3092 "EventName": "OFFCORE_RESPONSE.DEMAND_CODE_RD.L3_HIT_M.ANY_SNOOP",
3093 "MSRIndex": "0x1a6,0x1a7",
3094 "SampleAfterValue": "100003",
3095 "BriefDescription": "DEMAND_CODE_RD & L3_HIT_M & ANY_SNOOP",
3096 "Offcore": "1",
3097 "CounterHTOff": "0,1,2,3"
3098 },
3099 {
3100 "EventCode": "0xB7, 0xBB",
3101 "MSRValue": "0x1000040004 ",
3102 "Counter": "0,1,2,3",
3103 "UMask": "0x1",
3104 "EventName": "OFFCORE_RESPONSE.DEMAND_CODE_RD.L3_HIT_M.SNOOP_HITM",
3105 "MSRIndex": "0x1a6,0x1a7",
3106 "SampleAfterValue": "100003",
3107 "BriefDescription": "DEMAND_CODE_RD & L3_HIT_M & SNOOP_HITM",
3108 "Offcore": "1",
3109 "CounterHTOff": "0,1,2,3"
3110 },
3111 {
3112 "EventCode": "0xB7, 0xBB",
3113 "MSRValue": "0x0400040004 ",
3114 "Counter": "0,1,2,3",
3115 "UMask": "0x1",
3116 "EventName": "OFFCORE_RESPONSE.DEMAND_CODE_RD.L3_HIT_M.SNOOP_HIT_NO_FWD",
3117 "MSRIndex": "0x1a6,0x1a7",
3118 "SampleAfterValue": "100003",
3119 "BriefDescription": "DEMAND_CODE_RD & L3_HIT_M & SNOOP_HIT_NO_FWD",
3120 "Offcore": "1",
3121 "CounterHTOff": "0,1,2,3"
3122 },
3123 {
3124 "EventCode": "0xB7, 0xBB",
3125 "MSRValue": "0x0200040004 ",
3126 "Counter": "0,1,2,3",
3127 "UMask": "0x1",
3128 "EventName": "OFFCORE_RESPONSE.DEMAND_CODE_RD.L3_HIT_M.SNOOP_MISS",
3129 "MSRIndex": "0x1a6,0x1a7",
3130 "SampleAfterValue": "100003",
3131 "BriefDescription": "DEMAND_CODE_RD & L3_HIT_M & SNOOP_MISS",
3132 "Offcore": "1",
3133 "CounterHTOff": "0,1,2,3"
3134 },
3135 {
3136 "EventCode": "0xB7, 0xBB",
3137 "MSRValue": "0x0100040004 ",
3138 "Counter": "0,1,2,3",
3139 "UMask": "0x1",
3140 "EventName": "OFFCORE_RESPONSE.DEMAND_CODE_RD.L3_HIT_M.SNOOP_NOT_NEEDED",
3141 "MSRIndex": "0x1a6,0x1a7",
3142 "SampleAfterValue": "100003",
3143 "BriefDescription": "DEMAND_CODE_RD & L3_HIT_M & SNOOP_NOT_NEEDED",
3144 "Offcore": "1",
3145 "CounterHTOff": "0,1,2,3"
3146 },
3147 {
3148 "EventCode": "0xB7, 0xBB",
3149 "MSRValue": "0x0080040004 ",
3150 "Counter": "0,1,2,3",
3151 "UMask": "0x1",
3152 "EventName": "OFFCORE_RESPONSE.DEMAND_CODE_RD.L3_HIT_M.SNOOP_NONE",
3153 "MSRIndex": "0x1a6,0x1a7",
3154 "SampleAfterValue": "100003",
3155 "BriefDescription": "DEMAND_CODE_RD & L3_HIT_M & SNOOP_NONE",
3156 "Offcore": "1",
3157 "CounterHTOff": "0,1,2,3"
3158 },
3159 {
3160 "EventCode": "0xB7, 0xBB",
3161 "MSRValue": "0x0040040004 ",
3162 "Counter": "0,1,2,3",
3163 "UMask": "0x1",
3164 "EventName": "OFFCORE_RESPONSE.DEMAND_CODE_RD.L3_HIT_M.SPL_HIT",
3165 "MSRIndex": "0x1a6,0x1a7",
3166 "SampleAfterValue": "100003",
3167 "BriefDescription": "DEMAND_CODE_RD & L3_HIT_M & SPL_HIT",
3168 "Offcore": "1",
3169 "CounterHTOff": "0,1,2,3"
3170 },
3171 {
3172 "EventCode": "0xB7, 0xBB",
3173 "MSRValue": "0x3fc0020004 ",
3174 "Counter": "0,1,2,3",
3175 "UMask": "0x1",
3176 "EventName": "OFFCORE_RESPONSE.DEMAND_CODE_RD.SUPPLIER_NONE.ANY_SNOOP",
3177 "MSRIndex": "0x1a6,0x1a7",
3178 "SampleAfterValue": "100003",
3179 "BriefDescription": "DEMAND_CODE_RD & SUPPLIER_NONE & ANY_SNOOP",
3180 "Offcore": "1",
3181 "CounterHTOff": "0,1,2,3"
3182 },
3183 {
3184 "EventCode": "0xB7, 0xBB",
3185 "MSRValue": "0x1000020004 ",
3186 "Counter": "0,1,2,3",
3187 "UMask": "0x1",
3188 "EventName": "OFFCORE_RESPONSE.DEMAND_CODE_RD.SUPPLIER_NONE.SNOOP_HITM",
3189 "MSRIndex": "0x1a6,0x1a7",
3190 "SampleAfterValue": "100003",
3191 "BriefDescription": "DEMAND_CODE_RD & SUPPLIER_NONE & SNOOP_HITM",
3192 "Offcore": "1",
3193 "CounterHTOff": "0,1,2,3"
3194 },
3195 {
3196 "EventCode": "0xB7, 0xBB",
3197 "MSRValue": "0x0400020004 ",
3198 "Counter": "0,1,2,3",
3199 "UMask": "0x1",
3200 "EventName": "OFFCORE_RESPONSE.DEMAND_CODE_RD.SUPPLIER_NONE.SNOOP_HIT_NO_FWD",
3201 "MSRIndex": "0x1a6,0x1a7",
3202 "SampleAfterValue": "100003",
3203 "BriefDescription": "DEMAND_CODE_RD & SUPPLIER_NONE & SNOOP_HIT_NO_FWD",
3204 "Offcore": "1",
3205 "CounterHTOff": "0,1,2,3"
3206 },
3207 {
3208 "EventCode": "0xB7, 0xBB",
3209 "MSRValue": "0x0200020004 ",
3210 "Counter": "0,1,2,3",
3211 "UMask": "0x1",
3212 "EventName": "OFFCORE_RESPONSE.DEMAND_CODE_RD.SUPPLIER_NONE.SNOOP_MISS",
3213 "MSRIndex": "0x1a6,0x1a7",
3214 "SampleAfterValue": "100003",
3215 "BriefDescription": "DEMAND_CODE_RD & SUPPLIER_NONE & SNOOP_MISS",
3216 "Offcore": "1",
3217 "CounterHTOff": "0,1,2,3"
3218 },
3219 {
3220 "EventCode": "0xB7, 0xBB",
3221 "MSRValue": "0x0100020004 ",
3222 "Counter": "0,1,2,3",
3223 "UMask": "0x1",
3224 "EventName": "OFFCORE_RESPONSE.DEMAND_CODE_RD.SUPPLIER_NONE.SNOOP_NOT_NEEDED",
3225 "MSRIndex": "0x1a6,0x1a7",
3226 "SampleAfterValue": "100003",
3227 "BriefDescription": "DEMAND_CODE_RD & SUPPLIER_NONE & SNOOP_NOT_NEEDED",
3228 "Offcore": "1",
3229 "CounterHTOff": "0,1,2,3"
3230 },
3231 {
3232 "EventCode": "0xB7, 0xBB",
3233 "MSRValue": "0x0080020004 ",
3234 "Counter": "0,1,2,3",
3235 "UMask": "0x1",
3236 "EventName": "OFFCORE_RESPONSE.DEMAND_CODE_RD.SUPPLIER_NONE.SNOOP_NONE",
3237 "MSRIndex": "0x1a6,0x1a7",
3238 "SampleAfterValue": "100003",
3239 "BriefDescription": "DEMAND_CODE_RD & SUPPLIER_NONE & SNOOP_NONE",
3240 "Offcore": "1",
3241 "CounterHTOff": "0,1,2,3"
3242 },
3243 {
3244 "EventCode": "0xB7, 0xBB",
3245 "MSRValue": "0x0040020004 ",
3246 "Counter": "0,1,2,3",
3247 "UMask": "0x1",
3248 "EventName": "OFFCORE_RESPONSE.DEMAND_CODE_RD.SUPPLIER_NONE.SPL_HIT",
3249 "MSRIndex": "0x1a6,0x1a7",
3250 "SampleAfterValue": "100003",
3251 "BriefDescription": "DEMAND_CODE_RD & SUPPLIER_NONE & SPL_HIT",
3252 "Offcore": "1",
3253 "CounterHTOff": "0,1,2,3"
3254 },
3255 {
3256 "EventCode": "0xB7, 0xBB",
3257 "MSRValue": "0x0000010004 ",
3258 "Counter": "0,1,2,3",
3259 "UMask": "0x1",
3260 "EventName": "OFFCORE_RESPONSE.DEMAND_CODE_RD.ANY_RESPONSE",
3261 "MSRIndex": "0x1a6,0x1a7",
3262 "SampleAfterValue": "100003",
3263 "BriefDescription": "Counts all demand code reads that have any response type.",
3264 "Offcore": "1",
3265 "CounterHTOff": "0,1,2,3"
3266 },
3267 {
3268 "EventCode": "0xB7, 0xBB",
3269 "MSRValue": "0x3fc0400002 ",
3270 "Counter": "0,1,2,3", 229 "Counter": "0,1,2,3",
3271 "UMask": "0x1", 230 "UMask": "0x1",
3272 "EventName": "OFFCORE_RESPONSE.DEMAND_RFO.L4_HIT_LOCAL_L4.ANY_SNOOP", 231 "EventName": "L1D.REPLACEMENT",
3273 "MSRIndex": "0x1a6,0x1a7", 232 "SampleAfterValue": "2000003",
3274 "SampleAfterValue": "100003", 233 "BriefDescription": "L1D data line replacements",
3275 "BriefDescription": "DEMAND_RFO & L4_HIT_LOCAL_L4 & ANY_SNOOP", 234 "CounterHTOff": "0,1,2,3,4,5,6,7"
3276 "Offcore": "1",
3277 "CounterHTOff": "0,1,2,3"
3278 }, 235 },
3279 { 236 {
3280 "EventCode": "0xB7, 0xBB", 237 "PublicDescription": "Counts the number of offcore outstanding Demand Data Read transactions in the super queue (SQ) every cycle. A transaction is considered to be in the Offcore outstanding state between L2 miss and transaction completion sent to requestor. See the corresponding Umask under OFFCORE_REQUESTS.Note: A prefetch promoted to Demand is counted from the promotion point.",
3281 "MSRValue": "0x1000400002 ", 238 "EventCode": "0x60",
3282 "Counter": "0,1,2,3", 239 "Counter": "0,1,2,3",
3283 "UMask": "0x1", 240 "UMask": "0x1",
3284 "EventName": "OFFCORE_RESPONSE.DEMAND_RFO.L4_HIT_LOCAL_L4.SNOOP_HITM", 241 "EventName": "OFFCORE_REQUESTS_OUTSTANDING.DEMAND_DATA_RD",
3285 "MSRIndex": "0x1a6,0x1a7", 242 "SampleAfterValue": "2000003",
3286 "SampleAfterValue": "100003", 243 "BriefDescription": "Offcore outstanding Demand Data Read transactions in uncore queue.",
3287 "BriefDescription": "DEMAND_RFO & L4_HIT_LOCAL_L4 & SNOOP_HITM", 244 "CounterHTOff": "0,1,2,3,4,5,6,7"
3288 "Offcore": "1",
3289 "CounterHTOff": "0,1,2,3"
3290 }, 245 },
3291 { 246 {
3292 "EventCode": "0xB7, 0xBB", 247 "PublicDescription": "Counts cycles when offcore outstanding Demand Data Read transactions are present in the super queue (SQ). A transaction is considered to be in the Offcore outstanding state between L2 miss and transaction completion sent to requestor (SQ de-allocation).",
3293 "MSRValue": "0x0400400002 ", 248 "EventCode": "0x60",
3294 "Counter": "0,1,2,3", 249 "Counter": "0,1,2,3",
3295 "UMask": "0x1", 250 "UMask": "0x1",
3296 "EventName": "OFFCORE_RESPONSE.DEMAND_RFO.L4_HIT_LOCAL_L4.SNOOP_HIT_NO_FWD", 251 "EventName": "OFFCORE_REQUESTS_OUTSTANDING.CYCLES_WITH_DEMAND_DATA_RD",
3297 "MSRIndex": "0x1a6,0x1a7", 252 "SampleAfterValue": "2000003",
3298 "SampleAfterValue": "100003", 253 "BriefDescription": "Cycles when offcore outstanding Demand Data Read transactions are present in SuperQueue (SQ), queue to uncore",
3299 "BriefDescription": "DEMAND_RFO & L4_HIT_LOCAL_L4 & SNOOP_HIT_NO_FWD", 254 "CounterMask": "1",
3300 "Offcore": "1", 255 "CounterHTOff": "0,1,2,3,4,5,6,7"
3301 "CounterHTOff": "0,1,2,3"
3302 }, 256 },
3303 { 257 {
3304 "EventCode": "0xB7, 0xBB", 258 "EventCode": "0x60",
3305 "MSRValue": "0x0200400002 ",
3306 "Counter": "0,1,2,3", 259 "Counter": "0,1,2,3",
3307 "UMask": "0x1", 260 "UMask": "0x1",
3308 "EventName": "OFFCORE_RESPONSE.DEMAND_RFO.L4_HIT_LOCAL_L4.SNOOP_MISS", 261 "EventName": "OFFCORE_REQUESTS_OUTSTANDING.DEMAND_DATA_RD_GE_6",
3309 "MSRIndex": "0x1a6,0x1a7", 262 "SampleAfterValue": "2000003",
3310 "SampleAfterValue": "100003", 263 "BriefDescription": "Cycles with at least 6 offcore outstanding Demand Data Read transactions in uncore queue.",
3311 "BriefDescription": "DEMAND_RFO & L4_HIT_LOCAL_L4 & SNOOP_MISS", 264 "CounterMask": "6",
3312 "Offcore": "1", 265 "CounterHTOff": "0,1,2,3,4,5,6,7"
3313 "CounterHTOff": "0,1,2,3"
3314 }, 266 },
3315 { 267 {
3316 "EventCode": "0xB7, 0xBB", 268 "PublicDescription": "Counts the number of offcore outstanding Code Reads transactions in the super queue every cycle. The 'Offcore outstanding' state of the transaction lasts from the L2 miss until the sending transaction completion to requestor (SQ deallocation). See the corresponding Umask under OFFCORE_REQUESTS.",
3317 "MSRValue": "0x0100400002 ", 269 "EventCode": "0x60",
3318 "Counter": "0,1,2,3", 270 "Counter": "0,1,2,3",
3319 "UMask": "0x1", 271 "UMask": "0x2",
3320 "EventName": "OFFCORE_RESPONSE.DEMAND_RFO.L4_HIT_LOCAL_L4.SNOOP_NOT_NEEDED", 272 "EventName": "OFFCORE_REQUESTS_OUTSTANDING.DEMAND_CODE_RD",
3321 "MSRIndex": "0x1a6,0x1a7", 273 "SampleAfterValue": "2000003",
3322 "SampleAfterValue": "100003", 274 "BriefDescription": "Offcore outstanding Code Reads transactions in the SuperQueue (SQ), queue to uncore, every cycle.",
3323 "BriefDescription": "DEMAND_RFO & L4_HIT_LOCAL_L4 & SNOOP_NOT_NEEDED", 275 "CounterHTOff": "0,1,2,3,4,5,6,7"
3324 "Offcore": "1",
3325 "CounterHTOff": "0,1,2,3"
3326 }, 276 },
3327 { 277 {
3328 "EventCode": "0xB7, 0xBB", 278 "PublicDescription": "Counts the number of offcore outstanding Code Reads transactions in the super queue every cycle. The 'Offcore outstanding' state of the transaction lasts from the L2 miss until the sending transaction completion to requestor (SQ deallocation). See the corresponding Umask under OFFCORE_REQUESTS.",
3329 "MSRValue": "0x0080400002 ", 279 "EventCode": "0x60",
3330 "Counter": "0,1,2,3", 280 "Counter": "0,1,2,3",
3331 "UMask": "0x1", 281 "UMask": "0x2",
3332 "EventName": "OFFCORE_RESPONSE.DEMAND_RFO.L4_HIT_LOCAL_L4.SNOOP_NONE", 282 "EventName": "OFFCORE_REQUESTS_OUTSTANDING.CYCLES_WITH_DEMAND_CODE_RD",
3333 "MSRIndex": "0x1a6,0x1a7", 283 "SampleAfterValue": "2000003",
3334 "SampleAfterValue": "100003", 284 "BriefDescription": "Cycles with offcore outstanding Code Reads transactions in the SuperQueue (SQ), queue to uncore.",
3335 "BriefDescription": "DEMAND_RFO & L4_HIT_LOCAL_L4 & SNOOP_NONE", 285 "CounterMask": "1",
3336 "Offcore": "1", 286 "CounterHTOff": "0,1,2,3,4,5,6,7"
3337 "CounterHTOff": "0,1,2,3"
3338 }, 287 },
3339 { 288 {
3340 "EventCode": "0xB7, 0xBB", 289 "PublicDescription": "Counts the number of offcore outstanding RFO (store) transactions in the super queue (SQ) every cycle. A transaction is considered to be in the Offcore outstanding state between L2 miss and transaction completion sent to requestor (SQ de-allocation). See corresponding Umask under OFFCORE_REQUESTS.",
3341 "MSRValue": "0x0040400002 ", 290 "EventCode": "0x60",
3342 "Counter": "0,1,2,3", 291 "Counter": "0,1,2,3",
3343 "UMask": "0x1", 292 "UMask": "0x4",
3344 "EventName": "OFFCORE_RESPONSE.DEMAND_RFO.L4_HIT_LOCAL_L4.SPL_HIT", 293 "EventName": "OFFCORE_REQUESTS_OUTSTANDING.DEMAND_RFO",
3345 "MSRIndex": "0x1a6,0x1a7", 294 "SampleAfterValue": "2000003",
3346 "SampleAfterValue": "100003", 295 "BriefDescription": "Offcore outstanding demand rfo reads transactions in SuperQueue (SQ), queue to uncore, every cycle",
3347 "BriefDescription": "DEMAND_RFO & L4_HIT_LOCAL_L4 & SPL_HIT", 296 "CounterHTOff": "0,1,2,3,4,5,6,7"
3348 "Offcore": "1",
3349 "CounterHTOff": "0,1,2,3"
3350 }, 297 },
3351 { 298 {
3352 "EventCode": "0xB7, 0xBB", 299 "PublicDescription": "Counts the number of offcore outstanding demand rfo Reads transactions in the super queue every cycle. The 'Offcore outstanding' state of the transaction lasts from the L2 miss until the sending transaction completion to requestor (SQ deallocation). See the corresponding Umask under OFFCORE_REQUESTS.",
3353 "MSRValue": "0x3fc01c0002 ", 300 "EventCode": "0x60",
3354 "Counter": "0,1,2,3", 301 "Counter": "0,1,2,3",
3355 "UMask": "0x1", 302 "UMask": "0x4",
3356 "EventName": "OFFCORE_RESPONSE.DEMAND_RFO.L3_HIT.ANY_SNOOP", 303 "EventName": "OFFCORE_REQUESTS_OUTSTANDING.CYCLES_WITH_DEMAND_RFO",
3357 "MSRIndex": "0x1a6,0x1a7", 304 "SampleAfterValue": "2000003",
3358 "SampleAfterValue": "100003", 305 "BriefDescription": "Cycles with offcore outstanding demand rfo reads transactions in SuperQueue (SQ), queue to uncore.",
3359 "BriefDescription": "DEMAND_RFO & L3_HIT & ANY_SNOOP", 306 "CounterMask": "1",
3360 "Offcore": "1", 307 "CounterHTOff": "0,1,2,3,4,5,6,7"
3361 "CounterHTOff": "0,1,2,3"
3362 }, 308 },
3363 { 309 {
3364 "EventCode": "0xB7, 0xBB", 310 "PublicDescription": "Counts the number of offcore outstanding cacheable Core Data Read transactions in the super queue every cycle. A transaction is considered to be in the Offcore outstanding state between L2 miss and transaction completion sent to requestor (SQ de-allocation). See corresponding Umask under OFFCORE_REQUESTS.",
3365 "MSRValue": "0x10001c0002 ", 311 "EventCode": "0x60",
3366 "Counter": "0,1,2,3", 312 "Counter": "0,1,2,3",
3367 "UMask": "0x1", 313 "UMask": "0x8",
3368 "EventName": "OFFCORE_RESPONSE.DEMAND_RFO.L3_HIT.SNOOP_HITM", 314 "EventName": "OFFCORE_REQUESTS_OUTSTANDING.ALL_DATA_RD",
3369 "MSRIndex": "0x1a6,0x1a7", 315 "SampleAfterValue": "2000003",
3370 "SampleAfterValue": "100003", 316 "BriefDescription": "Offcore outstanding cacheable Core Data Read transactions in SuperQueue (SQ), queue to uncore",
3371 "BriefDescription": "DEMAND_RFO & L3_HIT & SNOOP_HITM", 317 "CounterHTOff": "0,1,2,3,4,5,6,7"
3372 "Offcore": "1",
3373 "CounterHTOff": "0,1,2,3"
3374 }, 318 },
3375 { 319 {
3376 "EventCode": "0xB7, 0xBB", 320 "PublicDescription": "Counts cycles when offcore outstanding cacheable Core Data Read transactions are present in the super queue. A transaction is considered to be in the Offcore outstanding state between L2 miss and transaction completion sent to requestor (SQ de-allocation). See corresponding Umask under OFFCORE_REQUESTS.",
3377 "MSRValue": "0x04001c0002 ", 321 "EventCode": "0x60",
3378 "Counter": "0,1,2,3", 322 "Counter": "0,1,2,3",
3379 "UMask": "0x1", 323 "UMask": "0x8",
3380 "EventName": "OFFCORE_RESPONSE.DEMAND_RFO.L3_HIT.SNOOP_HIT_NO_FWD", 324 "EventName": "OFFCORE_REQUESTS_OUTSTANDING.CYCLES_WITH_DATA_RD",
3381 "MSRIndex": "0x1a6,0x1a7", 325 "SampleAfterValue": "2000003",
3382 "SampleAfterValue": "100003", 326 "BriefDescription": "Cycles when offcore outstanding cacheable Core Data Read transactions are present in SuperQueue (SQ), queue to uncore.",
3383 "BriefDescription": "Counts all demand data writes (RFOs) that hit in the L3 and the snoops to sibling cores hit in either E/S state and the line is not forwarded.", 327 "CounterMask": "1",
3384 "Offcore": "1", 328 "CounterHTOff": "0,1,2,3,4,5,6,7"
3385 "CounterHTOff": "0,1,2,3"
3386 }, 329 },
3387 { 330 {
3388 "EventCode": "0xB7, 0xBB", 331 "PublicDescription": "Counts the Demand Data Read requests sent to uncore. Use it in conjunction with OFFCORE_REQUESTS_OUTSTANDING to determine average latency in the uncore.",
3389 "MSRValue": "0x02001c0002 ", 332 "EventCode": "0xB0",
3390 "Counter": "0,1,2,3", 333 "Counter": "0,1,2,3",
3391 "UMask": "0x1", 334 "UMask": "0x1",
3392 "EventName": "OFFCORE_RESPONSE.DEMAND_RFO.L3_HIT.SNOOP_MISS", 335 "EventName": "OFFCORE_REQUESTS.DEMAND_DATA_RD",
3393 "MSRIndex": "0x1a6,0x1a7",
3394 "SampleAfterValue": "100003", 336 "SampleAfterValue": "100003",
3395 "BriefDescription": "Counts all demand data writes (RFOs) that hit in the L3 and the snoops sent to sibling cores return clean response.", 337 "BriefDescription": "Demand Data Read requests sent to uncore",
3396 "Offcore": "1", 338 "CounterHTOff": "0,1,2,3,4,5,6,7"
3397 "CounterHTOff": "0,1,2,3"
3398 }, 339 },
3399 { 340 {
3400 "EventCode": "0xB7, 0xBB", 341 "PublicDescription": "Counts both cacheable and non-cacheable code read requests.",
3401 "MSRValue": "0x01001c0002 ", 342 "EventCode": "0xB0",
3402 "Counter": "0,1,2,3", 343 "Counter": "0,1,2,3",
3403 "UMask": "0x1", 344 "UMask": "0x2",
3404 "EventName": "OFFCORE_RESPONSE.DEMAND_RFO.L3_HIT.SNOOP_NOT_NEEDED", 345 "EventName": "OFFCORE_REQUESTS.DEMAND_CODE_RD",
3405 "MSRIndex": "0x1a6,0x1a7",
3406 "SampleAfterValue": "100003", 346 "SampleAfterValue": "100003",
3407 "BriefDescription": "Counts all demand data writes (RFOs) that hit in the L3 and sibling core snoops are not needed as either the core-valid bit is not set or the shared line is present in multiple cores.", 347 "BriefDescription": "Cacheable and noncachaeble code read requests",
3408 "Offcore": "1", 348 "CounterHTOff": "0,1,2,3,4,5,6,7"
3409 "CounterHTOff": "0,1,2,3"
3410 }, 349 },
3411 { 350 {
3412 "EventCode": "0xB7, 0xBB", 351 "PublicDescription": "Counts the demand RFO (read for ownership) requests including regular RFOs, locks, ItoM.",
3413 "MSRValue": "0x00801c0002 ", 352 "EventCode": "0xB0",
3414 "Counter": "0,1,2,3", 353 "Counter": "0,1,2,3",
3415 "UMask": "0x1", 354 "UMask": "0x4",
3416 "EventName": "OFFCORE_RESPONSE.DEMAND_RFO.L3_HIT.SNOOP_NONE", 355 "EventName": "OFFCORE_REQUESTS.DEMAND_RFO",
3417 "MSRIndex": "0x1a6,0x1a7",
3418 "SampleAfterValue": "100003", 356 "SampleAfterValue": "100003",
3419 "BriefDescription": "DEMAND_RFO & L3_HIT & SNOOP_NONE", 357 "BriefDescription": "Demand RFO requests including regular RFOs, locks, ItoM",
3420 "Offcore": "1", 358 "CounterHTOff": "0,1,2,3,4,5,6,7"
3421 "CounterHTOff": "0,1,2,3"
3422 }, 359 },
3423 { 360 {
3424 "EventCode": "0xB7, 0xBB", 361 "PublicDescription": "Counts the demand and prefetch data reads. All Core Data Reads include cacheable 'Demands' and L2 prefetchers (not L3 prefetchers). Counting also covers reads due to page walks resulted from any request type.",
3425 "MSRValue": "0x00401c0002 ", 362 "EventCode": "0xB0",
3426 "Counter": "0,1,2,3", 363 "Counter": "0,1,2,3",
3427 "UMask": "0x1", 364 "UMask": "0x8",
3428 "EventName": "OFFCORE_RESPONSE.DEMAND_RFO.L3_HIT.SPL_HIT", 365 "EventName": "OFFCORE_REQUESTS.ALL_DATA_RD",
3429 "MSRIndex": "0x1a6,0x1a7",
3430 "SampleAfterValue": "100003", 366 "SampleAfterValue": "100003",
3431 "BriefDescription": "DEMAND_RFO & L3_HIT & SPL_HIT", 367 "BriefDescription": "Demand and prefetch data reads",
3432 "Offcore": "1", 368 "CounterHTOff": "0,1,2,3,4,5,6,7"
3433 "CounterHTOff": "0,1,2,3"
3434 }, 369 },
3435 { 370 {
3436 "EventCode": "0xB7, 0xBB", 371 "PublicDescription": "Counts memory transactions reached the super queue including requests initiated by the core, all L3 prefetches, page walks, etc..",
3437 "MSRValue": "0x3fc0100002 ", 372 "EventCode": "0xB0",
3438 "Counter": "0,1,2,3", 373 "Counter": "0,1,2,3",
3439 "UMask": "0x1", 374 "UMask": "0x80",
3440 "EventName": "OFFCORE_RESPONSE.DEMAND_RFO.L3_HIT_S.ANY_SNOOP", 375 "EventName": "OFFCORE_REQUESTS.ALL_REQUESTS",
3441 "MSRIndex": "0x1a6,0x1a7",
3442 "SampleAfterValue": "100003", 376 "SampleAfterValue": "100003",
3443 "BriefDescription": "DEMAND_RFO & L3_HIT_S & ANY_SNOOP", 377 "BriefDescription": "Any memory transaction that reached the SQ.",
3444 "Offcore": "1", 378 "CounterHTOff": "0,1,2,3,4,5,6,7"
3445 "CounterHTOff": "0,1,2,3"
3446 }, 379 },
3447 { 380 {
3448 "EventCode": "0xB7, 0xBB", 381 "PublicDescription": "Counts the number of cases when the offcore requests buffer cannot take more entries for the core. This can happen when the superqueue does not contain eligible entries, or when L1D writeback pending FIFO requests is full.Note: Writeback pending FIFO has six entries.",
3449 "MSRValue": "0x1000100002 ", 382 "EventCode": "0xB2",
3450 "Counter": "0,1,2,3", 383 "Counter": "0,1,2,3",
3451 "UMask": "0x1", 384 "UMask": "0x1",
3452 "EventName": "OFFCORE_RESPONSE.DEMAND_RFO.L3_HIT_S.SNOOP_HITM", 385 "EventName": "OFFCORE_REQUESTS_BUFFER.SQ_FULL",
3453 "MSRIndex": "0x1a6,0x1a7", 386 "SampleAfterValue": "2000003",
3454 "SampleAfterValue": "100003", 387 "BriefDescription": "Offcore requests buffer cannot take more entries for this thread core.",
3455 "BriefDescription": "DEMAND_RFO & L3_HIT_S & SNOOP_HITM", 388 "CounterHTOff": "0,1,2,3,4,5,6,7"
3456 "Offcore": "1",
3457 "CounterHTOff": "0,1,2,3"
3458 }, 389 },
3459 { 390 {
391 "PublicDescription": "Offcore response can be programmed only with a specific pair of event select and counter MSR, and with specific event codes and predefine mask bit value in a dedicated MSR to specify attributes of the offcore transaction.",
3460 "EventCode": "0xB7, 0xBB", 392 "EventCode": "0xB7, 0xBB",
3461 "MSRValue": "0x0400100002 ",
3462 "Counter": "0,1,2,3", 393 "Counter": "0,1,2,3",
3463 "UMask": "0x1", 394 "UMask": "0x1",
3464 "EventName": "OFFCORE_RESPONSE.DEMAND_RFO.L3_HIT_S.SNOOP_HIT_NO_FWD", 395 "EventName": "OFFCORE_RESPONSE",
3465 "MSRIndex": "0x1a6,0x1a7",
3466 "SampleAfterValue": "100003", 396 "SampleAfterValue": "100003",
3467 "BriefDescription": "DEMAND_RFO & L3_HIT_S & SNOOP_HIT_NO_FWD", 397 "BriefDescription": "Offcore response can be programmed only with a specific pair of event select and counter MSR, and with specific event codes and predefine mask bit value in a dedicated MSR to specify attributes of the offcore transaction",
3468 "Offcore": "1",
3469 "CounterHTOff": "0,1,2,3" 398 "CounterHTOff": "0,1,2,3"
3470 }, 399 },
3471 { 400 {
3472 "EventCode": "0xB7, 0xBB", 401 "PEBS": "1",
3473 "MSRValue": "0x0200100002 ", 402 "PublicDescription": "Retired load instructions that miss the STLB.",
403 "EventCode": "0xD0",
3474 "Counter": "0,1,2,3", 404 "Counter": "0,1,2,3",
3475 "UMask": "0x1", 405 "UMask": "0x11",
3476 "EventName": "OFFCORE_RESPONSE.DEMAND_RFO.L3_HIT_S.SNOOP_MISS", 406 "EventName": "MEM_INST_RETIRED.STLB_MISS_LOADS",
3477 "MSRIndex": "0x1a6,0x1a7",
3478 "SampleAfterValue": "100003", 407 "SampleAfterValue": "100003",
3479 "BriefDescription": "DEMAND_RFO & L3_HIT_S & SNOOP_MISS", 408 "BriefDescription": "Retired load instructions that miss the STLB. (Precise Event)",
3480 "Offcore": "1", 409 "CounterHTOff": "0,1,2,3",
3481 "CounterHTOff": "0,1,2,3" 410 "Data_LA": "1"
3482 }, 411 },
3483 { 412 {
3484 "EventCode": "0xB7, 0xBB", 413 "PEBS": "1",
3485 "MSRValue": "0x0100100002 ", 414 "PublicDescription": "Retired store instructions that miss the STLB.",
415 "EventCode": "0xD0",
3486 "Counter": "0,1,2,3", 416 "Counter": "0,1,2,3",
3487 "UMask": "0x1", 417 "UMask": "0x12",
3488 "EventName": "OFFCORE_RESPONSE.DEMAND_RFO.L3_HIT_S.SNOOP_NOT_NEEDED", 418 "EventName": "MEM_INST_RETIRED.STLB_MISS_STORES",
3489 "MSRIndex": "0x1a6,0x1a7",
3490 "SampleAfterValue": "100003", 419 "SampleAfterValue": "100003",
3491 "BriefDescription": "DEMAND_RFO & L3_HIT_S & SNOOP_NOT_NEEDED", 420 "BriefDescription": "Retired store instructions that miss the STLB. (Precise Event)",
3492 "Offcore": "1", 421 "CounterHTOff": "0,1,2,3",
3493 "CounterHTOff": "0,1,2,3" 422 "Data_LA": "1",
423 "L1_Hit_Indication": "1"
3494 }, 424 },
3495 { 425 {
3496 "EventCode": "0xB7, 0xBB", 426 "PEBS": "1",
3497 "MSRValue": "0x0080100002 ", 427 "EventCode": "0xD0",
3498 "Counter": "0,1,2,3", 428 "Counter": "0,1,2,3",
3499 "UMask": "0x1", 429 "UMask": "0x21",
3500 "EventName": "OFFCORE_RESPONSE.DEMAND_RFO.L3_HIT_S.SNOOP_NONE", 430 "EventName": "MEM_INST_RETIRED.LOCK_LOADS",
3501 "MSRIndex": "0x1a6,0x1a7", 431 "SampleAfterValue": "100007",
3502 "SampleAfterValue": "100003", 432 "BriefDescription": "Retired load instructions with locked access. (Precise Event)",
3503 "BriefDescription": "DEMAND_RFO & L3_HIT_S & SNOOP_NONE", 433 "CounterHTOff": "0,1,2,3",
3504 "Offcore": "1", 434 "Data_LA": "1"
3505 "CounterHTOff": "0,1,2,3"
3506 }, 435 },
3507 { 436 {
3508 "EventCode": "0xB7, 0xBB", 437 "PEBS": "1",
3509 "MSRValue": "0x0040100002 ", 438 "EventCode": "0xD0",
3510 "Counter": "0,1,2,3", 439 "Counter": "0,1,2,3",
3511 "UMask": "0x1", 440 "UMask": "0x41",
3512 "EventName": "OFFCORE_RESPONSE.DEMAND_RFO.L3_HIT_S.SPL_HIT", 441 "EventName": "MEM_INST_RETIRED.SPLIT_LOADS",
3513 "MSRIndex": "0x1a6,0x1a7",
3514 "SampleAfterValue": "100003", 442 "SampleAfterValue": "100003",
3515 "BriefDescription": "DEMAND_RFO & L3_HIT_S & SPL_HIT", 443 "BriefDescription": "Retired load instructions that split across a cacheline boundary. (Precise Event)",
3516 "Offcore": "1", 444 "CounterHTOff": "0,1,2,3",
3517 "CounterHTOff": "0,1,2,3" 445 "Data_LA": "1"
3518 }, 446 },
3519 { 447 {
3520 "EventCode": "0xB7, 0xBB", 448 "PEBS": "1",
3521 "MSRValue": "0x3fc0080002 ", 449 "EventCode": "0xD0",
3522 "Counter": "0,1,2,3", 450 "Counter": "0,1,2,3",
3523 "UMask": "0x1", 451 "UMask": "0x42",
3524 "EventName": "OFFCORE_RESPONSE.DEMAND_RFO.L3_HIT_E.ANY_SNOOP", 452 "EventName": "MEM_INST_RETIRED.SPLIT_STORES",
3525 "MSRIndex": "0x1a6,0x1a7",
3526 "SampleAfterValue": "100003", 453 "SampleAfterValue": "100003",
3527 "BriefDescription": "DEMAND_RFO & L3_HIT_E & ANY_SNOOP", 454 "BriefDescription": "Retired store instructions that split across a cacheline boundary. (Precise Event)",
3528 "Offcore": "1", 455 "CounterHTOff": "0,1,2,3",
3529 "CounterHTOff": "0,1,2,3" 456 "Data_LA": "1",
457 "L1_Hit_Indication": "1"
3530 }, 458 },
3531 { 459 {
3532 "EventCode": "0xB7, 0xBB", 460 "PEBS": "1",
3533 "MSRValue": "0x1000080002 ", 461 "EventCode": "0xD0",
3534 "Counter": "0,1,2,3", 462 "Counter": "0,1,2,3",
3535 "UMask": "0x1", 463 "UMask": "0x81",
3536 "EventName": "OFFCORE_RESPONSE.DEMAND_RFO.L3_HIT_E.SNOOP_HITM", 464 "EventName": "MEM_INST_RETIRED.ALL_LOADS",
3537 "MSRIndex": "0x1a6,0x1a7", 465 "SampleAfterValue": "2000003",
3538 "SampleAfterValue": "100003", 466 "BriefDescription": "All retired load instructions. (Precise Event)",
3539 "BriefDescription": "DEMAND_RFO & L3_HIT_E & SNOOP_HITM", 467 "CounterHTOff": "0,1,2,3",
3540 "Offcore": "1", 468 "Data_LA": "1"
3541 "CounterHTOff": "0,1,2,3"
3542 }, 469 },
3543 { 470 {
3544 "EventCode": "0xB7, 0xBB", 471 "PEBS": "1",
3545 "MSRValue": "0x0400080002 ", 472 "PublicDescription": "All retired store instructions.",
473 "EventCode": "0xD0",
3546 "Counter": "0,1,2,3", 474 "Counter": "0,1,2,3",
3547 "UMask": "0x1", 475 "UMask": "0x82",
3548 "EventName": "OFFCORE_RESPONSE.DEMAND_RFO.L3_HIT_E.SNOOP_HIT_NO_FWD", 476 "EventName": "MEM_INST_RETIRED.ALL_STORES",
3549 "MSRIndex": "0x1a6,0x1a7", 477 "SampleAfterValue": "2000003",
3550 "SampleAfterValue": "100003", 478 "BriefDescription": "All retired store instructions. (Precise Event)",
3551 "BriefDescription": "DEMAND_RFO & L3_HIT_E & SNOOP_HIT_NO_FWD", 479 "CounterHTOff": "0,1,2,3",
3552 "Offcore": "1", 480 "Data_LA": "1",
3553 "CounterHTOff": "0,1,2,3" 481 "L1_Hit_Indication": "1"
3554 }, 482 },
3555 { 483 {
3556 "EventCode": "0xB7, 0xBB", 484 "PEBS": "1",
3557 "MSRValue": "0x0200080002 ", 485 "PublicDescription": "Counts retired load instructions with at least one uop that hit in the L1 data cache. This event includes all SW prefetches and lock instructions regardless of the data source.\r\n",
486 "EventCode": "0xD1",
3558 "Counter": "0,1,2,3", 487 "Counter": "0,1,2,3",
3559 "UMask": "0x1", 488 "UMask": "0x1",
3560 "EventName": "OFFCORE_RESPONSE.DEMAND_RFO.L3_HIT_E.SNOOP_MISS", 489 "EventName": "MEM_LOAD_RETIRED.L1_HIT",
3561 "MSRIndex": "0x1a6,0x1a7", 490 "SampleAfterValue": "2000003",
3562 "SampleAfterValue": "100003", 491 "BriefDescription": "Retired load instructions with L1 cache hits as data sources",
3563 "BriefDescription": "DEMAND_RFO & L3_HIT_E & SNOOP_MISS", 492 "CounterHTOff": "0,1,2,3",
3564 "Offcore": "1", 493 "Data_LA": "1"
3565 "CounterHTOff": "0,1,2,3"
3566 }, 494 },
3567 { 495 {
3568 "EventCode": "0xB7, 0xBB", 496 "PEBS": "1",
3569 "MSRValue": "0x0100080002 ", 497 "PublicDescription": "Retired load instructions with L2 cache hits as data sources.",
498 "EventCode": "0xD1",
3570 "Counter": "0,1,2,3", 499 "Counter": "0,1,2,3",
3571 "UMask": "0x1", 500 "UMask": "0x2",
3572 "EventName": "OFFCORE_RESPONSE.DEMAND_RFO.L3_HIT_E.SNOOP_NOT_NEEDED", 501 "EventName": "MEM_LOAD_RETIRED.L2_HIT",
3573 "MSRIndex": "0x1a6,0x1a7",
3574 "SampleAfterValue": "100003", 502 "SampleAfterValue": "100003",
3575 "BriefDescription": "DEMAND_RFO & L3_HIT_E & SNOOP_NOT_NEEDED", 503 "BriefDescription": "Retired load instructions with L2 cache hits as data sources",
3576 "Offcore": "1", 504 "CounterHTOff": "0,1,2,3",
3577 "CounterHTOff": "0,1,2,3" 505 "Data_LA": "1"
3578 }, 506 },
3579 { 507 {
3580 "EventCode": "0xB7, 0xBB", 508 "PEBS": "1",
3581 "MSRValue": "0x0080080002 ", 509 "PublicDescription": "Retired load instructions with L3 cache hits as data sources.",
510 "EventCode": "0xD1",
3582 "Counter": "0,1,2,3", 511 "Counter": "0,1,2,3",
3583 "UMask": "0x1", 512 "UMask": "0x4",
3584 "EventName": "OFFCORE_RESPONSE.DEMAND_RFO.L3_HIT_E.SNOOP_NONE", 513 "EventName": "MEM_LOAD_RETIRED.L3_HIT",
3585 "MSRIndex": "0x1a6,0x1a7", 514 "SampleAfterValue": "50021",
3586 "SampleAfterValue": "100003", 515 "BriefDescription": "Retired load instructions with L3 cache hits as data sources",
3587 "BriefDescription": "DEMAND_RFO & L3_HIT_E & SNOOP_NONE", 516 "CounterHTOff": "0,1,2,3",
3588 "Offcore": "1", 517 "Data_LA": "1"
3589 "CounterHTOff": "0,1,2,3"
3590 }, 518 },
3591 { 519 {
3592 "EventCode": "0xB7, 0xBB", 520 "PEBS": "1",
3593 "MSRValue": "0x0040080002 ", 521 "PublicDescription": "Counts retired load instructions with at least one uop that missed in the L1 cache.",
522 "EventCode": "0xD1",
3594 "Counter": "0,1,2,3", 523 "Counter": "0,1,2,3",
3595 "UMask": "0x1", 524 "UMask": "0x8",
3596 "EventName": "OFFCORE_RESPONSE.DEMAND_RFO.L3_HIT_E.SPL_HIT", 525 "EventName": "MEM_LOAD_RETIRED.L1_MISS",
3597 "MSRIndex": "0x1a6,0x1a7",
3598 "SampleAfterValue": "100003", 526 "SampleAfterValue": "100003",
3599 "BriefDescription": "DEMAND_RFO & L3_HIT_E & SPL_HIT", 527 "BriefDescription": "Retired load instructions missed L1 cache as data sources",
3600 "Offcore": "1", 528 "CounterHTOff": "0,1,2,3",
3601 "CounterHTOff": "0,1,2,3" 529 "Data_LA": "1"
3602 }, 530 },
3603 { 531 {
3604 "EventCode": "0xB7, 0xBB", 532 "PEBS": "1",
3605 "MSRValue": "0x3fc0040002 ", 533 "PublicDescription": "Retired load instructions missed L2 cache as data sources.",
534 "EventCode": "0xD1",
3606 "Counter": "0,1,2,3", 535 "Counter": "0,1,2,3",
3607 "UMask": "0x1", 536 "UMask": "0x10",
3608 "EventName": "OFFCORE_RESPONSE.DEMAND_RFO.L3_HIT_M.ANY_SNOOP", 537 "EventName": "MEM_LOAD_RETIRED.L2_MISS",
3609 "MSRIndex": "0x1a6,0x1a7", 538 "SampleAfterValue": "50021",
3610 "SampleAfterValue": "100003", 539 "BriefDescription": "Retired load instructions missed L2 cache as data sources",
3611 "BriefDescription": "DEMAND_RFO & L3_HIT_M & ANY_SNOOP", 540 "CounterHTOff": "0,1,2,3",
3612 "Offcore": "1", 541 "Data_LA": "1"
3613 "CounterHTOff": "0,1,2,3"
3614 }, 542 },
3615 { 543 {
3616 "EventCode": "0xB7, 0xBB", 544 "PEBS": "1",
3617 "MSRValue": "0x1000040002 ", 545 "PublicDescription": "Retired load instructions missed L3 cache as data sources.",
546 "EventCode": "0xD1",
3618 "Counter": "0,1,2,3", 547 "Counter": "0,1,2,3",
3619 "UMask": "0x1", 548 "UMask": "0x20",
3620 "EventName": "OFFCORE_RESPONSE.DEMAND_RFO.L3_HIT_M.SNOOP_HITM", 549 "EventName": "MEM_LOAD_RETIRED.L3_MISS",
3621 "MSRIndex": "0x1a6,0x1a7", 550 "SampleAfterValue": "100007",
3622 "SampleAfterValue": "100003", 551 "BriefDescription": "Retired load instructions missed L3 cache as data sources",
3623 "BriefDescription": "DEMAND_RFO & L3_HIT_M & SNOOP_HITM", 552 "CounterHTOff": "0,1,2,3",
3624 "Offcore": "1", 553 "Data_LA": "1"
3625 "CounterHTOff": "0,1,2,3"
3626 }, 554 },
3627 { 555 {
3628 "EventCode": "0xB7, 0xBB", 556 "PEBS": "1",
3629 "MSRValue": "0x0400040002 ", 557 "PublicDescription": "Counts retired load instructions with at least one uop was load missed in L1 but hit FB (Fill Buffers) due to preceding miss to the same cache line with data not ready. \r\n",
558 "EventCode": "0xD1",
3630 "Counter": "0,1,2,3", 559 "Counter": "0,1,2,3",
3631 "UMask": "0x1", 560 "UMask": "0x40",
3632 "EventName": "OFFCORE_RESPONSE.DEMAND_RFO.L3_HIT_M.SNOOP_HIT_NO_FWD", 561 "EventName": "MEM_LOAD_RETIRED.FB_HIT",
3633 "MSRIndex": "0x1a6,0x1a7", 562 "SampleAfterValue": "100007",
3634 "SampleAfterValue": "100003", 563 "BriefDescription": "Retired load instructions which data sources were load missed L1 but hit FB due to preceding miss to the same cache line with data not ready",
3635 "BriefDescription": "DEMAND_RFO & L3_HIT_M & SNOOP_HIT_NO_FWD", 564 "CounterHTOff": "0,1,2,3",
3636 "Offcore": "1", 565 "Data_LA": "1"
3637 "CounterHTOff": "0,1,2,3"
3638 }, 566 },
3639 { 567 {
3640 "EventCode": "0xB7, 0xBB", 568 "PEBS": "1",
3641 "MSRValue": "0x0200040002 ", 569 "EventCode": "0xD2",
3642 "Counter": "0,1,2,3", 570 "Counter": "0,1,2,3",
3643 "UMask": "0x1", 571 "UMask": "0x1",
3644 "EventName": "OFFCORE_RESPONSE.DEMAND_RFO.L3_HIT_M.SNOOP_MISS", 572 "EventName": "MEM_LOAD_L3_HIT_RETIRED.XSNP_MISS",
3645 "MSRIndex": "0x1a6,0x1a7", 573 "SampleAfterValue": "20011",
3646 "SampleAfterValue": "100003", 574 "BriefDescription": "Retired load instructions which data sources were L3 hit and cross-core snoop missed in on-pkg core cache.",
3647 "BriefDescription": "DEMAND_RFO & L3_HIT_M & SNOOP_MISS", 575 "CounterHTOff": "0,1,2,3",
3648 "Offcore": "1", 576 "Data_LA": "1"
3649 "CounterHTOff": "0,1,2,3"
3650 }, 577 },
3651 { 578 {
3652 "EventCode": "0xB7, 0xBB", 579 "PEBS": "1",
3653 "MSRValue": "0x0100040002 ", 580 "PublicDescription": "Retired load instructions which data sources were L3 and cross-core snoop hits in on-pkg core cache.",
581 "EventCode": "0xD2",
3654 "Counter": "0,1,2,3", 582 "Counter": "0,1,2,3",
3655 "UMask": "0x1", 583 "UMask": "0x2",
3656 "EventName": "OFFCORE_RESPONSE.DEMAND_RFO.L3_HIT_M.SNOOP_NOT_NEEDED", 584 "EventName": "MEM_LOAD_L3_HIT_RETIRED.XSNP_HIT",
3657 "MSRIndex": "0x1a6,0x1a7", 585 "SampleAfterValue": "20011",
3658 "SampleAfterValue": "100003", 586 "BriefDescription": "Retired load instructions which data sources were L3 and cross-core snoop hits in on-pkg core cache",
3659 "BriefDescription": "DEMAND_RFO & L3_HIT_M & SNOOP_NOT_NEEDED", 587 "CounterHTOff": "0,1,2,3",
3660 "Offcore": "1", 588 "Data_LA": "1"
3661 "CounterHTOff": "0,1,2,3"
3662 }, 589 },
3663 { 590 {
3664 "EventCode": "0xB7, 0xBB", 591 "PEBS": "1",
3665 "MSRValue": "0x0080040002 ", 592 "PublicDescription": "Retired load instructions which data sources were HitM responses from shared L3.",
593 "EventCode": "0xD2",
3666 "Counter": "0,1,2,3", 594 "Counter": "0,1,2,3",
3667 "UMask": "0x1", 595 "UMask": "0x4",
3668 "EventName": "OFFCORE_RESPONSE.DEMAND_RFO.L3_HIT_M.SNOOP_NONE", 596 "EventName": "MEM_LOAD_L3_HIT_RETIRED.XSNP_HITM",
3669 "MSRIndex": "0x1a6,0x1a7", 597 "SampleAfterValue": "20011",
3670 "SampleAfterValue": "100003", 598 "BriefDescription": "Retired load instructions which data sources were HitM responses from shared L3",
3671 "BriefDescription": "DEMAND_RFO & L3_HIT_M & SNOOP_NONE", 599 "CounterHTOff": "0,1,2,3",
3672 "Offcore": "1", 600 "Data_LA": "1"
3673 "CounterHTOff": "0,1,2,3"
3674 }, 601 },
3675 { 602 {
3676 "EventCode": "0xB7, 0xBB", 603 "PEBS": "1",
3677 "MSRValue": "0x0040040002 ", 604 "PublicDescription": "Retired load instructions which data sources were hits in L3 without snoops required.",
605 "EventCode": "0xD2",
3678 "Counter": "0,1,2,3", 606 "Counter": "0,1,2,3",
3679 "UMask": "0x1", 607 "UMask": "0x8",
3680 "EventName": "OFFCORE_RESPONSE.DEMAND_RFO.L3_HIT_M.SPL_HIT", 608 "EventName": "MEM_LOAD_L3_HIT_RETIRED.XSNP_NONE",
3681 "MSRIndex": "0x1a6,0x1a7",
3682 "SampleAfterValue": "100003", 609 "SampleAfterValue": "100003",
3683 "BriefDescription": "DEMAND_RFO & L3_HIT_M & SPL_HIT", 610 "BriefDescription": "Retired load instructions which data sources were hits in L3 without snoops required",
3684 "Offcore": "1", 611 "CounterHTOff": "0,1,2,3",
3685 "CounterHTOff": "0,1,2,3" 612 "Data_LA": "1"
3686 }, 613 },
3687 { 614 {
3688 "EventCode": "0xB7, 0xBB", 615 "PEBS": "1",
3689 "MSRValue": "0x3fc0020002 ", 616 "EventCode": "0xD4",
3690 "Counter": "0,1,2,3", 617 "Counter": "0,1,2,3",
3691 "UMask": "0x1", 618 "UMask": "0x4",
3692 "EventName": "OFFCORE_RESPONSE.DEMAND_RFO.SUPPLIER_NONE.ANY_SNOOP", 619 "EventName": "MEM_LOAD_MISC_RETIRED.UC",
3693 "MSRIndex": "0x1a6,0x1a7", 620 "SampleAfterValue": "100007",
3694 "SampleAfterValue": "100003", 621 "BriefDescription": "Retired instructions with at least 1 uncacheable load or lock.",
3695 "BriefDescription": "DEMAND_RFO & SUPPLIER_NONE & ANY_SNOOP", 622 "CounterHTOff": "0,1,2,3",
3696 "Offcore": "1", 623 "Data_LA": "1"
3697 "CounterHTOff": "0,1,2,3"
3698 }, 624 },
3699 { 625 {
3700 "EventCode": "0xB7, 0xBB", 626 "PublicDescription": "Counts L2 writebacks that access L2 cache.",
3701 "MSRValue": "0x1000020002 ", 627 "EventCode": "0xF0",
3702 "Counter": "0,1,2,3", 628 "Counter": "0,1,2,3",
3703 "UMask": "0x1", 629 "UMask": "0x40",
3704 "EventName": "OFFCORE_RESPONSE.DEMAND_RFO.SUPPLIER_NONE.SNOOP_HITM", 630 "EventName": "L2_TRANS.L2_WB",
3705 "MSRIndex": "0x1a6,0x1a7", 631 "SampleAfterValue": "200003",
3706 "SampleAfterValue": "100003", 632 "BriefDescription": "L2 writebacks that access L2 cache",
3707 "BriefDescription": "DEMAND_RFO & SUPPLIER_NONE & SNOOP_HITM", 633 "CounterHTOff": "0,1,2,3,4,5,6,7"
3708 "Offcore": "1",
3709 "CounterHTOff": "0,1,2,3"
3710 }, 634 },
3711 { 635 {
3712 "EventCode": "0xB7, 0xBB", 636 "PublicDescription": "Counts the number of L2 cache lines filling the L2. Counting does not cover rejects.",
3713 "MSRValue": "0x0400020002 ", 637 "EventCode": "0xF1",
3714 "Counter": "0,1,2,3", 638 "Counter": "0,1,2,3",
3715 "UMask": "0x1", 639 "UMask": "0x1f",
3716 "EventName": "OFFCORE_RESPONSE.DEMAND_RFO.SUPPLIER_NONE.SNOOP_HIT_NO_FWD", 640 "EventName": "L2_LINES_IN.ALL",
3717 "MSRIndex": "0x1a6,0x1a7",
3718 "SampleAfterValue": "100003", 641 "SampleAfterValue": "100003",
3719 "BriefDescription": "DEMAND_RFO & SUPPLIER_NONE & SNOOP_HIT_NO_FWD", 642 "BriefDescription": "L2 cache lines filling L2",
3720 "Offcore": "1", 643 "CounterHTOff": "0,1,2,3,4,5,6,7"
3721 "CounterHTOff": "0,1,2,3"
3722 }, 644 },
3723 { 645 {
3724 "EventCode": "0xB7, 0xBB", 646 "EventCode": "0xF2",
3725 "MSRValue": "0x0200020002 ",
3726 "Counter": "0,1,2,3", 647 "Counter": "0,1,2,3",
3727 "UMask": "0x1", 648 "UMask": "0x1",
3728 "EventName": "OFFCORE_RESPONSE.DEMAND_RFO.SUPPLIER_NONE.SNOOP_MISS", 649 "EventName": "L2_LINES_OUT.SILENT",
3729 "MSRIndex": "0x1a6,0x1a7", 650 "SampleAfterValue": "200003",
3730 "SampleAfterValue": "100003", 651 "BriefDescription": "Counts the number of lines that are silently dropped by L2 cache when triggered by an L2 cache fill. These lines are typically in Shared or Exclusive state. A non-threaded event.",
3731 "BriefDescription": "DEMAND_RFO & SUPPLIER_NONE & SNOOP_MISS", 652 "CounterHTOff": "0,1,2,3,4,5,6,7"
3732 "Offcore": "1",
3733 "CounterHTOff": "0,1,2,3"
3734 }, 653 },
3735 { 654 {
3736 "EventCode": "0xB7, 0xBB", 655 "EventCode": "0xF2",
3737 "MSRValue": "0x0100020002 ",
3738 "Counter": "0,1,2,3", 656 "Counter": "0,1,2,3",
3739 "UMask": "0x1", 657 "UMask": "0x2",
3740 "EventName": "OFFCORE_RESPONSE.DEMAND_RFO.SUPPLIER_NONE.SNOOP_NOT_NEEDED", 658 "EventName": "L2_LINES_OUT.NON_SILENT",
3741 "MSRIndex": "0x1a6,0x1a7", 659 "SampleAfterValue": "200003",
3742 "SampleAfterValue": "100003", 660 "BriefDescription": "Counts the number of lines that are evicted by L2 cache when triggered by an L2 cache fill. Those lines are in Modified state. Modified lines are written back to L3",
3743 "BriefDescription": "DEMAND_RFO & SUPPLIER_NONE & SNOOP_NOT_NEEDED", 661 "CounterHTOff": "0,1,2,3,4,5,6,7"
3744 "Offcore": "1",
3745 "CounterHTOff": "0,1,2,3"
3746 }, 662 },
3747 { 663 {
3748 "EventCode": "0xB7, 0xBB", 664 "PublicDescription": "Counts the number of lines that have been hardware prefetched but not used and now evicted by L2 cache.",
3749 "MSRValue": "0x0080020002 ", 665 "EventCode": "0xF2",
3750 "Counter": "0,1,2,3", 666 "Counter": "0,1,2,3",
3751 "UMask": "0x1", 667 "UMask": "0x4",
3752 "EventName": "OFFCORE_RESPONSE.DEMAND_RFO.SUPPLIER_NONE.SNOOP_NONE", 668 "EventName": "L2_LINES_OUT.USELESS_PREF",
3753 "MSRIndex": "0x1a6,0x1a7", 669 "SampleAfterValue": "200003",
3754 "SampleAfterValue": "100003", 670 "BriefDescription": "Counts the number of lines that have been hardware prefetched but not used and now evicted by L2 cache",
3755 "BriefDescription": "DEMAND_RFO & SUPPLIER_NONE & SNOOP_NONE", 671 "CounterHTOff": "0,1,2,3,4,5,6,7"
3756 "Offcore": "1",
3757 "CounterHTOff": "0,1,2,3"
3758 }, 672 },
3759 { 673 {
3760 "EventCode": "0xB7, 0xBB", 674 "EventCode": "0xF2",
3761 "MSRValue": "0x0040020002 ",
3762 "Counter": "0,1,2,3", 675 "Counter": "0,1,2,3",
3763 "UMask": "0x1", 676 "UMask": "0x4",
3764 "EventName": "OFFCORE_RESPONSE.DEMAND_RFO.SUPPLIER_NONE.SPL_HIT", 677 "EventName": "L2_LINES_OUT.USELESS_HWPF",
3765 "MSRIndex": "0x1a6,0x1a7", 678 "SampleAfterValue": "200003",
3766 "SampleAfterValue": "100003", 679 "BriefDescription": "Counts the number of lines that have been hardware prefetched but not used and now evicted by L2 cache",
3767 "BriefDescription": "DEMAND_RFO & SUPPLIER_NONE & SPL_HIT", 680 "CounterHTOff": "0,1,2,3,4,5,6,7"
3768 "Offcore": "1",
3769 "CounterHTOff": "0,1,2,3"
3770 }, 681 },
3771 { 682 {
3772 "EventCode": "0xB7, 0xBB", 683 "PublicDescription": "Counts the number of cache line split locks sent to the uncore.",
3773 "MSRValue": "0x0000010002 ", 684 "EventCode": "0xF4",
3774 "Counter": "0,1,2,3", 685 "Counter": "0,1,2,3",
3775 "UMask": "0x1", 686 "UMask": "0x10",
3776 "EventName": "OFFCORE_RESPONSE.DEMAND_RFO.ANY_RESPONSE", 687 "EventName": "SQ_MISC.SPLIT_LOCK",
3777 "MSRIndex": "0x1a6,0x1a7",
3778 "SampleAfterValue": "100003", 688 "SampleAfterValue": "100003",
3779 "BriefDescription": "Counts all demand data writes (RFOs) that have any response type.", 689 "BriefDescription": "Number of cache line split locks sent to uncore.",
3780 "Offcore": "1", 690 "CounterHTOff": "0,1,2,3,4,5,6,7"
3781 "CounterHTOff": "0,1,2,3"
3782 }, 691 },
3783 { 692 {
693 "PublicDescription": "tbd Offcore response can be programmed only with a specific pair of event select and counter MSR, and with specific event codes and predefine mask bit value in a dedicated MSR to specify attributes of the offcore transaction.",
3784 "EventCode": "0xB7, 0xBB", 694 "EventCode": "0xB7, 0xBB",
3785 "MSRValue": "0x3fc0400001 ", 695 "MSRValue": "0x3fc0400001 ",
3786 "Counter": "0,1,2,3", 696 "Counter": "0,1,2,3",
@@ -3793,6 +703,7 @@
3793 "CounterHTOff": "0,1,2,3" 703 "CounterHTOff": "0,1,2,3"
3794 }, 704 },
3795 { 705 {
706 "PublicDescription": "tbd Offcore response can be programmed only with a specific pair of event select and counter MSR, and with specific event codes and predefine mask bit value in a dedicated MSR to specify attributes of the offcore transaction.",
3796 "EventCode": "0xB7, 0xBB", 707 "EventCode": "0xB7, 0xBB",
3797 "MSRValue": "0x1000400001 ", 708 "MSRValue": "0x1000400001 ",
3798 "Counter": "0,1,2,3", 709 "Counter": "0,1,2,3",
@@ -3805,6 +716,7 @@
3805 "CounterHTOff": "0,1,2,3" 716 "CounterHTOff": "0,1,2,3"
3806 }, 717 },
3807 { 718 {
719 "PublicDescription": "tbd Offcore response can be programmed only with a specific pair of event select and counter MSR, and with specific event codes and predefine mask bit value in a dedicated MSR to specify attributes of the offcore transaction.",
3808 "EventCode": "0xB7, 0xBB", 720 "EventCode": "0xB7, 0xBB",
3809 "MSRValue": "0x0400400001 ", 721 "MSRValue": "0x0400400001 ",
3810 "Counter": "0,1,2,3", 722 "Counter": "0,1,2,3",
@@ -3817,6 +729,7 @@
3817 "CounterHTOff": "0,1,2,3" 729 "CounterHTOff": "0,1,2,3"
3818 }, 730 },
3819 { 731 {
732 "PublicDescription": "tbd Offcore response can be programmed only with a specific pair of event select and counter MSR, and with specific event codes and predefine mask bit value in a dedicated MSR to specify attributes of the offcore transaction.",
3820 "EventCode": "0xB7, 0xBB", 733 "EventCode": "0xB7, 0xBB",
3821 "MSRValue": "0x0200400001 ", 734 "MSRValue": "0x0200400001 ",
3822 "Counter": "0,1,2,3", 735 "Counter": "0,1,2,3",
@@ -3829,6 +742,7 @@
3829 "CounterHTOff": "0,1,2,3" 742 "CounterHTOff": "0,1,2,3"
3830 }, 743 },
3831 { 744 {
745 "PublicDescription": "tbd Offcore response can be programmed only with a specific pair of event select and counter MSR, and with specific event codes and predefine mask bit value in a dedicated MSR to specify attributes of the offcore transaction.",
3832 "EventCode": "0xB7, 0xBB", 746 "EventCode": "0xB7, 0xBB",
3833 "MSRValue": "0x0100400001 ", 747 "MSRValue": "0x0100400001 ",
3834 "Counter": "0,1,2,3", 748 "Counter": "0,1,2,3",
@@ -3841,6 +755,7 @@
3841 "CounterHTOff": "0,1,2,3" 755 "CounterHTOff": "0,1,2,3"
3842 }, 756 },
3843 { 757 {
758 "PublicDescription": "tbd Offcore response can be programmed only with a specific pair of event select and counter MSR, and with specific event codes and predefine mask bit value in a dedicated MSR to specify attributes of the offcore transaction.",
3844 "EventCode": "0xB7, 0xBB", 759 "EventCode": "0xB7, 0xBB",
3845 "MSRValue": "0x0080400001 ", 760 "MSRValue": "0x0080400001 ",
3846 "Counter": "0,1,2,3", 761 "Counter": "0,1,2,3",
@@ -3853,18 +768,7 @@
3853 "CounterHTOff": "0,1,2,3" 768 "CounterHTOff": "0,1,2,3"
3854 }, 769 },
3855 { 770 {
3856 "EventCode": "0xB7, 0xBB", 771 "PublicDescription": "tbd Offcore response can be programmed only with a specific pair of event select and counter MSR, and with specific event codes and predefine mask bit value in a dedicated MSR to specify attributes of the offcore transaction.",
3857 "MSRValue": "0x0040400001 ",
3858 "Counter": "0,1,2,3",
3859 "UMask": "0x1",
3860 "EventName": "OFFCORE_RESPONSE.DEMAND_DATA_RD.L4_HIT_LOCAL_L4.SPL_HIT",
3861 "MSRIndex": "0x1a6,0x1a7",
3862 "SampleAfterValue": "100003",
3863 "BriefDescription": "DEMAND_DATA_RD & L4_HIT_LOCAL_L4 & SPL_HIT",
3864 "Offcore": "1",
3865 "CounterHTOff": "0,1,2,3"
3866 },
3867 {
3868 "EventCode": "0xB7, 0xBB", 772 "EventCode": "0xB7, 0xBB",
3869 "MSRValue": "0x3fc01c0001 ", 773 "MSRValue": "0x3fc01c0001 ",
3870 "Counter": "0,1,2,3", 774 "Counter": "0,1,2,3",
@@ -3877,6 +781,7 @@
3877 "CounterHTOff": "0,1,2,3" 781 "CounterHTOff": "0,1,2,3"
3878 }, 782 },
3879 { 783 {
784 "PublicDescription": "tbd Offcore response can be programmed only with a specific pair of event select and counter MSR, and with specific event codes and predefine mask bit value in a dedicated MSR to specify attributes of the offcore transaction.",
3880 "EventCode": "0xB7, 0xBB", 785 "EventCode": "0xB7, 0xBB",
3881 "MSRValue": "0x10001c0001 ", 786 "MSRValue": "0x10001c0001 ",
3882 "Counter": "0,1,2,3", 787 "Counter": "0,1,2,3",
@@ -3889,6 +794,7 @@
3889 "CounterHTOff": "0,1,2,3" 794 "CounterHTOff": "0,1,2,3"
3890 }, 795 },
3891 { 796 {
797 "PublicDescription": "Counts demand data reads that hit in the L3 and the snoops to sibling cores hit in either E/S state and the line is not forwarded. Offcore response can be programmed only with a specific pair of event select and counter MSR, and with specific event codes and predefine mask bit value in a dedicated MSR to specify attributes of the offcore transaction.",
3892 "EventCode": "0xB7, 0xBB", 798 "EventCode": "0xB7, 0xBB",
3893 "MSRValue": "0x04001c0001 ", 799 "MSRValue": "0x04001c0001 ",
3894 "Counter": "0,1,2,3", 800 "Counter": "0,1,2,3",
@@ -3901,6 +807,7 @@
3901 "CounterHTOff": "0,1,2,3" 807 "CounterHTOff": "0,1,2,3"
3902 }, 808 },
3903 { 809 {
810 "PublicDescription": "Counts demand data reads that hit in the L3 and the snoops sent to sibling cores return clean response. Offcore response can be programmed only with a specific pair of event select and counter MSR, and with specific event codes and predefine mask bit value in a dedicated MSR to specify attributes of the offcore transaction.",
3904 "EventCode": "0xB7, 0xBB", 811 "EventCode": "0xB7, 0xBB",
3905 "MSRValue": "0x02001c0001 ", 812 "MSRValue": "0x02001c0001 ",
3906 "Counter": "0,1,2,3", 813 "Counter": "0,1,2,3",
@@ -3913,6 +820,7 @@
3913 "CounterHTOff": "0,1,2,3" 820 "CounterHTOff": "0,1,2,3"
3914 }, 821 },
3915 { 822 {
823 "PublicDescription": "Counts demand data reads that hit in the L3 and sibling core snoops are not needed as either the core-valid bit is not set or the shared line is present in multiple cores. Offcore response can be programmed only with a specific pair of event select and counter MSR, and with specific event codes and predefine mask bit value in a dedicated MSR to specify attributes of the offcore transaction.",
3916 "EventCode": "0xB7, 0xBB", 824 "EventCode": "0xB7, 0xBB",
3917 "MSRValue": "0x01001c0001 ", 825 "MSRValue": "0x01001c0001 ",
3918 "Counter": "0,1,2,3", 826 "Counter": "0,1,2,3",
@@ -3925,6 +833,7 @@
3925 "CounterHTOff": "0,1,2,3" 833 "CounterHTOff": "0,1,2,3"
3926 }, 834 },
3927 { 835 {
836 "PublicDescription": "tbd Offcore response can be programmed only with a specific pair of event select and counter MSR, and with specific event codes and predefine mask bit value in a dedicated MSR to specify attributes of the offcore transaction.",
3928 "EventCode": "0xB7, 0xBB", 837 "EventCode": "0xB7, 0xBB",
3929 "MSRValue": "0x00801c0001 ", 838 "MSRValue": "0x00801c0001 ",
3930 "Counter": "0,1,2,3", 839 "Counter": "0,1,2,3",
@@ -3937,270 +846,7 @@
3937 "CounterHTOff": "0,1,2,3" 846 "CounterHTOff": "0,1,2,3"
3938 }, 847 },
3939 { 848 {
3940 "EventCode": "0xB7, 0xBB", 849 "PublicDescription": "tbd Offcore response can be programmed only with a specific pair of event select and counter MSR, and with specific event codes and predefine mask bit value in a dedicated MSR to specify attributes of the offcore transaction.",
3941 "MSRValue": "0x00401c0001 ",
3942 "Counter": "0,1,2,3",
3943 "UMask": "0x1",
3944 "EventName": "OFFCORE_RESPONSE.DEMAND_DATA_RD.L3_HIT.SPL_HIT",
3945 "MSRIndex": "0x1a6,0x1a7",
3946 "SampleAfterValue": "100003",
3947 "BriefDescription": "DEMAND_DATA_RD & L3_HIT & SPL_HIT",
3948 "Offcore": "1",
3949 "CounterHTOff": "0,1,2,3"
3950 },
3951 {
3952 "EventCode": "0xB7, 0xBB",
3953 "MSRValue": "0x3fc0100001 ",
3954 "Counter": "0,1,2,3",
3955 "UMask": "0x1",
3956 "EventName": "OFFCORE_RESPONSE.DEMAND_DATA_RD.L3_HIT_S.ANY_SNOOP",
3957 "MSRIndex": "0x1a6,0x1a7",
3958 "SampleAfterValue": "100003",
3959 "BriefDescription": "DEMAND_DATA_RD & L3_HIT_S & ANY_SNOOP",
3960 "Offcore": "1",
3961 "CounterHTOff": "0,1,2,3"
3962 },
3963 {
3964 "EventCode": "0xB7, 0xBB",
3965 "MSRValue": "0x1000100001 ",
3966 "Counter": "0,1,2,3",
3967 "UMask": "0x1",
3968 "EventName": "OFFCORE_RESPONSE.DEMAND_DATA_RD.L3_HIT_S.SNOOP_HITM",
3969 "MSRIndex": "0x1a6,0x1a7",
3970 "SampleAfterValue": "100003",
3971 "BriefDescription": "DEMAND_DATA_RD & L3_HIT_S & SNOOP_HITM",
3972 "Offcore": "1",
3973 "CounterHTOff": "0,1,2,3"
3974 },
3975 {
3976 "EventCode": "0xB7, 0xBB",
3977 "MSRValue": "0x0400100001 ",
3978 "Counter": "0,1,2,3",
3979 "UMask": "0x1",
3980 "EventName": "OFFCORE_RESPONSE.DEMAND_DATA_RD.L3_HIT_S.SNOOP_HIT_NO_FWD",
3981 "MSRIndex": "0x1a6,0x1a7",
3982 "SampleAfterValue": "100003",
3983 "BriefDescription": "DEMAND_DATA_RD & L3_HIT_S & SNOOP_HIT_NO_FWD",
3984 "Offcore": "1",
3985 "CounterHTOff": "0,1,2,3"
3986 },
3987 {
3988 "EventCode": "0xB7, 0xBB",
3989 "MSRValue": "0x0200100001 ",
3990 "Counter": "0,1,2,3",
3991 "UMask": "0x1",
3992 "EventName": "OFFCORE_RESPONSE.DEMAND_DATA_RD.L3_HIT_S.SNOOP_MISS",
3993 "MSRIndex": "0x1a6,0x1a7",
3994 "SampleAfterValue": "100003",
3995 "BriefDescription": "DEMAND_DATA_RD & L3_HIT_S & SNOOP_MISS",
3996 "Offcore": "1",
3997 "CounterHTOff": "0,1,2,3"
3998 },
3999 {
4000 "EventCode": "0xB7, 0xBB",
4001 "MSRValue": "0x0100100001 ",
4002 "Counter": "0,1,2,3",
4003 "UMask": "0x1",
4004 "EventName": "OFFCORE_RESPONSE.DEMAND_DATA_RD.L3_HIT_S.SNOOP_NOT_NEEDED",
4005 "MSRIndex": "0x1a6,0x1a7",
4006 "SampleAfterValue": "100003",
4007 "BriefDescription": "DEMAND_DATA_RD & L3_HIT_S & SNOOP_NOT_NEEDED",
4008 "Offcore": "1",
4009 "CounterHTOff": "0,1,2,3"
4010 },
4011 {
4012 "EventCode": "0xB7, 0xBB",
4013 "MSRValue": "0x0080100001 ",
4014 "Counter": "0,1,2,3",
4015 "UMask": "0x1",
4016 "EventName": "OFFCORE_RESPONSE.DEMAND_DATA_RD.L3_HIT_S.SNOOP_NONE",
4017 "MSRIndex": "0x1a6,0x1a7",
4018 "SampleAfterValue": "100003",
4019 "BriefDescription": "DEMAND_DATA_RD & L3_HIT_S & SNOOP_NONE",
4020 "Offcore": "1",
4021 "CounterHTOff": "0,1,2,3"
4022 },
4023 {
4024 "EventCode": "0xB7, 0xBB",
4025 "MSRValue": "0x0040100001 ",
4026 "Counter": "0,1,2,3",
4027 "UMask": "0x1",
4028 "EventName": "OFFCORE_RESPONSE.DEMAND_DATA_RD.L3_HIT_S.SPL_HIT",
4029 "MSRIndex": "0x1a6,0x1a7",
4030 "SampleAfterValue": "100003",
4031 "BriefDescription": "DEMAND_DATA_RD & L3_HIT_S & SPL_HIT",
4032 "Offcore": "1",
4033 "CounterHTOff": "0,1,2,3"
4034 },
4035 {
4036 "EventCode": "0xB7, 0xBB",
4037 "MSRValue": "0x3fc0080001 ",
4038 "Counter": "0,1,2,3",
4039 "UMask": "0x1",
4040 "EventName": "OFFCORE_RESPONSE.DEMAND_DATA_RD.L3_HIT_E.ANY_SNOOP",
4041 "MSRIndex": "0x1a6,0x1a7",
4042 "SampleAfterValue": "100003",
4043 "BriefDescription": "DEMAND_DATA_RD & L3_HIT_E & ANY_SNOOP",
4044 "Offcore": "1",
4045 "CounterHTOff": "0,1,2,3"
4046 },
4047 {
4048 "EventCode": "0xB7, 0xBB",
4049 "MSRValue": "0x1000080001 ",
4050 "Counter": "0,1,2,3",
4051 "UMask": "0x1",
4052 "EventName": "OFFCORE_RESPONSE.DEMAND_DATA_RD.L3_HIT_E.SNOOP_HITM",
4053 "MSRIndex": "0x1a6,0x1a7",
4054 "SampleAfterValue": "100003",
4055 "BriefDescription": "DEMAND_DATA_RD & L3_HIT_E & SNOOP_HITM",
4056 "Offcore": "1",
4057 "CounterHTOff": "0,1,2,3"
4058 },
4059 {
4060 "EventCode": "0xB7, 0xBB",
4061 "MSRValue": "0x0400080001 ",
4062 "Counter": "0,1,2,3",
4063 "UMask": "0x1",
4064 "EventName": "OFFCORE_RESPONSE.DEMAND_DATA_RD.L3_HIT_E.SNOOP_HIT_NO_FWD",
4065 "MSRIndex": "0x1a6,0x1a7",
4066 "SampleAfterValue": "100003",
4067 "BriefDescription": "DEMAND_DATA_RD & L3_HIT_E & SNOOP_HIT_NO_FWD",
4068 "Offcore": "1",
4069 "CounterHTOff": "0,1,2,3"
4070 },
4071 {
4072 "EventCode": "0xB7, 0xBB",
4073 "MSRValue": "0x0200080001 ",
4074 "Counter": "0,1,2,3",
4075 "UMask": "0x1",
4076 "EventName": "OFFCORE_RESPONSE.DEMAND_DATA_RD.L3_HIT_E.SNOOP_MISS",
4077 "MSRIndex": "0x1a6,0x1a7",
4078 "SampleAfterValue": "100003",
4079 "BriefDescription": "DEMAND_DATA_RD & L3_HIT_E & SNOOP_MISS",
4080 "Offcore": "1",
4081 "CounterHTOff": "0,1,2,3"
4082 },
4083 {
4084 "EventCode": "0xB7, 0xBB",
4085 "MSRValue": "0x0100080001 ",
4086 "Counter": "0,1,2,3",
4087 "UMask": "0x1",
4088 "EventName": "OFFCORE_RESPONSE.DEMAND_DATA_RD.L3_HIT_E.SNOOP_NOT_NEEDED",
4089 "MSRIndex": "0x1a6,0x1a7",
4090 "SampleAfterValue": "100003",
4091 "BriefDescription": "DEMAND_DATA_RD & L3_HIT_E & SNOOP_NOT_NEEDED",
4092 "Offcore": "1",
4093 "CounterHTOff": "0,1,2,3"
4094 },
4095 {
4096 "EventCode": "0xB7, 0xBB",
4097 "MSRValue": "0x0080080001 ",
4098 "Counter": "0,1,2,3",
4099 "UMask": "0x1",
4100 "EventName": "OFFCORE_RESPONSE.DEMAND_DATA_RD.L3_HIT_E.SNOOP_NONE",
4101 "MSRIndex": "0x1a6,0x1a7",
4102 "SampleAfterValue": "100003",
4103 "BriefDescription": "DEMAND_DATA_RD & L3_HIT_E & SNOOP_NONE",
4104 "Offcore": "1",
4105 "CounterHTOff": "0,1,2,3"
4106 },
4107 {
4108 "EventCode": "0xB7, 0xBB",
4109 "MSRValue": "0x0040080001 ",
4110 "Counter": "0,1,2,3",
4111 "UMask": "0x1",
4112 "EventName": "OFFCORE_RESPONSE.DEMAND_DATA_RD.L3_HIT_E.SPL_HIT",
4113 "MSRIndex": "0x1a6,0x1a7",
4114 "SampleAfterValue": "100003",
4115 "BriefDescription": "DEMAND_DATA_RD & L3_HIT_E & SPL_HIT",
4116 "Offcore": "1",
4117 "CounterHTOff": "0,1,2,3"
4118 },
4119 {
4120 "EventCode": "0xB7, 0xBB",
4121 "MSRValue": "0x3fc0040001 ",
4122 "Counter": "0,1,2,3",
4123 "UMask": "0x1",
4124 "EventName": "OFFCORE_RESPONSE.DEMAND_DATA_RD.L3_HIT_M.ANY_SNOOP",
4125 "MSRIndex": "0x1a6,0x1a7",
4126 "SampleAfterValue": "100003",
4127 "BriefDescription": "DEMAND_DATA_RD & L3_HIT_M & ANY_SNOOP",
4128 "Offcore": "1",
4129 "CounterHTOff": "0,1,2,3"
4130 },
4131 {
4132 "EventCode": "0xB7, 0xBB",
4133 "MSRValue": "0x1000040001 ",
4134 "Counter": "0,1,2,3",
4135 "UMask": "0x1",
4136 "EventName": "OFFCORE_RESPONSE.DEMAND_DATA_RD.L3_HIT_M.SNOOP_HITM",
4137 "MSRIndex": "0x1a6,0x1a7",
4138 "SampleAfterValue": "100003",
4139 "BriefDescription": "DEMAND_DATA_RD & L3_HIT_M & SNOOP_HITM",
4140 "Offcore": "1",
4141 "CounterHTOff": "0,1,2,3"
4142 },
4143 {
4144 "EventCode": "0xB7, 0xBB",
4145 "MSRValue": "0x0400040001 ",
4146 "Counter": "0,1,2,3",
4147 "UMask": "0x1",
4148 "EventName": "OFFCORE_RESPONSE.DEMAND_DATA_RD.L3_HIT_M.SNOOP_HIT_NO_FWD",
4149 "MSRIndex": "0x1a6,0x1a7",
4150 "SampleAfterValue": "100003",
4151 "BriefDescription": "DEMAND_DATA_RD & L3_HIT_M & SNOOP_HIT_NO_FWD",
4152 "Offcore": "1",
4153 "CounterHTOff": "0,1,2,3"
4154 },
4155 {
4156 "EventCode": "0xB7, 0xBB",
4157 "MSRValue": "0x0200040001 ",
4158 "Counter": "0,1,2,3",
4159 "UMask": "0x1",
4160 "EventName": "OFFCORE_RESPONSE.DEMAND_DATA_RD.L3_HIT_M.SNOOP_MISS",
4161 "MSRIndex": "0x1a6,0x1a7",
4162 "SampleAfterValue": "100003",
4163 "BriefDescription": "DEMAND_DATA_RD & L3_HIT_M & SNOOP_MISS",
4164 "Offcore": "1",
4165 "CounterHTOff": "0,1,2,3"
4166 },
4167 {
4168 "EventCode": "0xB7, 0xBB",
4169 "MSRValue": "0x0100040001 ",
4170 "Counter": "0,1,2,3",
4171 "UMask": "0x1",
4172 "EventName": "OFFCORE_RESPONSE.DEMAND_DATA_RD.L3_HIT_M.SNOOP_NOT_NEEDED",
4173 "MSRIndex": "0x1a6,0x1a7",
4174 "SampleAfterValue": "100003",
4175 "BriefDescription": "DEMAND_DATA_RD & L3_HIT_M & SNOOP_NOT_NEEDED",
4176 "Offcore": "1",
4177 "CounterHTOff": "0,1,2,3"
4178 },
4179 {
4180 "EventCode": "0xB7, 0xBB",
4181 "MSRValue": "0x0080040001 ",
4182 "Counter": "0,1,2,3",
4183 "UMask": "0x1",
4184 "EventName": "OFFCORE_RESPONSE.DEMAND_DATA_RD.L3_HIT_M.SNOOP_NONE",
4185 "MSRIndex": "0x1a6,0x1a7",
4186 "SampleAfterValue": "100003",
4187 "BriefDescription": "DEMAND_DATA_RD & L3_HIT_M & SNOOP_NONE",
4188 "Offcore": "1",
4189 "CounterHTOff": "0,1,2,3"
4190 },
4191 {
4192 "EventCode": "0xB7, 0xBB",
4193 "MSRValue": "0x0040040001 ",
4194 "Counter": "0,1,2,3",
4195 "UMask": "0x1",
4196 "EventName": "OFFCORE_RESPONSE.DEMAND_DATA_RD.L3_HIT_M.SPL_HIT",
4197 "MSRIndex": "0x1a6,0x1a7",
4198 "SampleAfterValue": "100003",
4199 "BriefDescription": "DEMAND_DATA_RD & L3_HIT_M & SPL_HIT",
4200 "Offcore": "1",
4201 "CounterHTOff": "0,1,2,3"
4202 },
4203 {
4204 "EventCode": "0xB7, 0xBB", 850 "EventCode": "0xB7, 0xBB",
4205 "MSRValue": "0x3fc0020001 ", 851 "MSRValue": "0x3fc0020001 ",
4206 "Counter": "0,1,2,3", 852 "Counter": "0,1,2,3",
@@ -4213,6 +859,7 @@
4213 "CounterHTOff": "0,1,2,3" 859 "CounterHTOff": "0,1,2,3"
4214 }, 860 },
4215 { 861 {
862 "PublicDescription": "tbd Offcore response can be programmed only with a specific pair of event select and counter MSR, and with specific event codes and predefine mask bit value in a dedicated MSR to specify attributes of the offcore transaction.",
4216 "EventCode": "0xB7, 0xBB", 863 "EventCode": "0xB7, 0xBB",
4217 "MSRValue": "0x1000020001 ", 864 "MSRValue": "0x1000020001 ",
4218 "Counter": "0,1,2,3", 865 "Counter": "0,1,2,3",
@@ -4225,6 +872,7 @@
4225 "CounterHTOff": "0,1,2,3" 872 "CounterHTOff": "0,1,2,3"
4226 }, 873 },
4227 { 874 {
875 "PublicDescription": "tbd Offcore response can be programmed only with a specific pair of event select and counter MSR, and with specific event codes and predefine mask bit value in a dedicated MSR to specify attributes of the offcore transaction.",
4228 "EventCode": "0xB7, 0xBB", 876 "EventCode": "0xB7, 0xBB",
4229 "MSRValue": "0x0400020001 ", 877 "MSRValue": "0x0400020001 ",
4230 "Counter": "0,1,2,3", 878 "Counter": "0,1,2,3",
@@ -4237,6 +885,7 @@
4237 "CounterHTOff": "0,1,2,3" 885 "CounterHTOff": "0,1,2,3"
4238 }, 886 },
4239 { 887 {
888 "PublicDescription": "tbd Offcore response can be programmed only with a specific pair of event select and counter MSR, and with specific event codes and predefine mask bit value in a dedicated MSR to specify attributes of the offcore transaction.",
4240 "EventCode": "0xB7, 0xBB", 889 "EventCode": "0xB7, 0xBB",
4241 "MSRValue": "0x0200020001 ", 890 "MSRValue": "0x0200020001 ",
4242 "Counter": "0,1,2,3", 891 "Counter": "0,1,2,3",
@@ -4249,6 +898,7 @@
4249 "CounterHTOff": "0,1,2,3" 898 "CounterHTOff": "0,1,2,3"
4250 }, 899 },
4251 { 900 {
901 "PublicDescription": "tbd Offcore response can be programmed only with a specific pair of event select and counter MSR, and with specific event codes and predefine mask bit value in a dedicated MSR to specify attributes of the offcore transaction.",
4252 "EventCode": "0xB7, 0xBB", 902 "EventCode": "0xB7, 0xBB",
4253 "MSRValue": "0x0100020001 ", 903 "MSRValue": "0x0100020001 ",
4254 "Counter": "0,1,2,3", 904 "Counter": "0,1,2,3",
@@ -4261,6 +911,7 @@
4261 "CounterHTOff": "0,1,2,3" 911 "CounterHTOff": "0,1,2,3"
4262 }, 912 },
4263 { 913 {
914 "PublicDescription": "tbd Offcore response can be programmed only with a specific pair of event select and counter MSR, and with specific event codes and predefine mask bit value in a dedicated MSR to specify attributes of the offcore transaction.",
4264 "EventCode": "0xB7, 0xBB", 915 "EventCode": "0xB7, 0xBB",
4265 "MSRValue": "0x0080020001 ", 916 "MSRValue": "0x0080020001 ",
4266 "Counter": "0,1,2,3", 917 "Counter": "0,1,2,3",
@@ -4273,18 +924,7 @@
4273 "CounterHTOff": "0,1,2,3" 924 "CounterHTOff": "0,1,2,3"
4274 }, 925 },
4275 { 926 {
4276 "EventCode": "0xB7, 0xBB", 927 "PublicDescription": "Counts demand data reads that have any response type. Offcore response can be programmed only with a specific pair of event select and counter MSR, and with specific event codes and predefine mask bit value in a dedicated MSR to specify attributes of the offcore transaction.",
4277 "MSRValue": "0x0040020001 ",
4278 "Counter": "0,1,2,3",
4279 "UMask": "0x1",
4280 "EventName": "OFFCORE_RESPONSE.DEMAND_DATA_RD.SUPPLIER_NONE.SPL_HIT",
4281 "MSRIndex": "0x1a6,0x1a7",
4282 "SampleAfterValue": "100003",
4283 "BriefDescription": "DEMAND_DATA_RD & SUPPLIER_NONE & SPL_HIT",
4284 "Offcore": "1",
4285 "CounterHTOff": "0,1,2,3"
4286 },
4287 {
4288 "EventCode": "0xB7, 0xBB", 928 "EventCode": "0xB7, 0xBB",
4289 "MSRValue": "0x0000010001 ", 929 "MSRValue": "0x0000010001 ",
4290 "Counter": "0,1,2,3", 930 "Counter": "0,1,2,3",
diff --git a/tools/perf/pmu-events/arch/x86/skylake/floating-point.json b/tools/perf/pmu-events/arch/x86/skylake/floating-point.json
index 3c6b59af5d54..213dd6230cf2 100644
--- a/tools/perf/pmu-events/arch/x86/skylake/floating-point.json
+++ b/tools/perf/pmu-events/arch/x86/skylake/floating-point.json
@@ -27,13 +27,12 @@
27 "CounterHTOff": "0,1,2,3,4,5,6,7" 27 "CounterHTOff": "0,1,2,3,4,5,6,7"
28 }, 28 },
29 { 29 {
30 "PublicDescription": "Number of SSE/AVX computational 128-bit packed single precision floating-point instructions retired. Each count represents 4 computations. Applies to SSE* and AVX* packed single precision floating-point instructions: ADD SUB MUL DIV MIN MAX RCP RSQRT SQRT DPP FM(N)ADD/SUB. DPP and FM(N)ADD/SUB instructions count twice as they perform multiple calculations per element.",
31 "EventCode": "0xC7", 30 "EventCode": "0xC7",
32 "Counter": "0,1,2,3", 31 "Counter": "0,1,2,3",
33 "UMask": "0x8", 32 "UMask": "0x8",
34 "EventName": "FP_ARITH_INST_RETIRED.128B_PACKED_SINGLE", 33 "EventName": "FP_ARITH_INST_RETIRED.128B_PACKED_SINGLE",
35 "SampleAfterValue": "2000003", 34 "SampleAfterValue": "2000003",
36 "BriefDescription": "Number of SSE/AVX computational 128-bit packed single precision floating-point instructions retired. Each count represents 4 computations. Applies to SSE* and AVX* packed single precision floating-point instructions: ADD SUB MUL DIV MIN MAX RCP RSQRT SQRT DPP FM(N)ADD/SUB. DPP and FM(N)ADD/SUB instructions count twice as they perform multiple calculations per element. ", 35 "BriefDescription": "Number of SSE/AVX computational 128-bit packed single precision floating-point instructions retired. Each count represents 4 computations. Applies to SSE* and AVX* packed single precision floating-point instructions: ADD SUB MUL DIV MIN MAX RCP RSQRT SQRT DPP FM(N)ADD/SUB. DPP and FM(N)ADD/SUB instructions count twice as they perform multiple calculations per element.",
37 "CounterHTOff": "0,1,2,3,4,5,6,7" 36 "CounterHTOff": "0,1,2,3,4,5,6,7"
38 }, 37 },
39 { 38 {
@@ -55,7 +54,7 @@
55 "CounterHTOff": "0,1,2,3,4,5,6,7" 54 "CounterHTOff": "0,1,2,3,4,5,6,7"
56 }, 55 },
57 { 56 {
58 "PublicDescription": "This event counts cycles with any input and output SSE or x87 FP assist. If an input and output assist are detected on the same cycle the event increments by 1.", 57 "PublicDescription": "Counts cycles with any input and output SSE or x87 FP assist. If an input and output assist are detected on the same cycle the event increments by 1.",
59 "EventCode": "0xCA", 58 "EventCode": "0xCA",
60 "Counter": "0,1,2,3", 59 "Counter": "0,1,2,3",
61 "UMask": "0x1e", 60 "UMask": "0x1e",
diff --git a/tools/perf/pmu-events/arch/x86/skylake/frontend.json b/tools/perf/pmu-events/arch/x86/skylake/frontend.json
index e697dbd63e6e..578dff5bd823 100644
--- a/tools/perf/pmu-events/arch/x86/skylake/frontend.json
+++ b/tools/perf/pmu-events/arch/x86/skylake/frontend.json
@@ -1,62 +1,81 @@
1[ 1[
2 { 2 {
3 "EventCode": "0x80", 3 "PublicDescription": "Counts the number of uops delivered to Instruction Decode Queue (IDQ) from the MITE path. Counting includes uops that may 'bypass' the IDQ. This also means that uops are not being delivered from the Decode Stream Buffer (DSB).",
4 "EventCode": "0x79",
4 "Counter": "0,1,2,3", 5 "Counter": "0,1,2,3",
5 "UMask": "0x4", 6 "UMask": "0x4",
6 "EventName": "ICACHE_16B.IFDATA_STALL", 7 "EventName": "IDQ.MITE_UOPS",
7 "SampleAfterValue": "2000003", 8 "SampleAfterValue": "2000003",
8 "BriefDescription": "Cycles where a code fetch is stalled due to L1 instruction cache miss.", 9 "BriefDescription": "Uops delivered to Instruction Decode Queue (IDQ) from MITE path",
9 "CounterHTOff": "0,1,2,3,4,5,6,7" 10 "CounterHTOff": "0,1,2,3,4,5,6,7"
10 }, 11 },
11 { 12 {
12 "EventCode": "0x83", 13 "PublicDescription": "Counts cycles during which uops are being delivered to Instruction Decode Queue (IDQ) from the MITE path. Counting includes uops that may 'bypass' the IDQ.",
14 "EventCode": "0x79",
13 "Counter": "0,1,2,3", 15 "Counter": "0,1,2,3",
14 "UMask": "0x1", 16 "UMask": "0x4",
15 "EventName": "ICACHE_64B.IFTAG_HIT", 17 "EventName": "IDQ.MITE_CYCLES",
16 "SampleAfterValue": "200003", 18 "SampleAfterValue": "2000003",
17 "BriefDescription": "Instruction fetch tag lookups that hit in the instruction cache (L1I). Counts at 64-byte cache-line granularity.", 19 "BriefDescription": "Cycles when uops are being delivered to Instruction Decode Queue (IDQ) from MITE path",
20 "CounterMask": "1",
18 "CounterHTOff": "0,1,2,3,4,5,6,7" 21 "CounterHTOff": "0,1,2,3,4,5,6,7"
19 }, 22 },
20 { 23 {
21 "EventCode": "0x83", 24 "PublicDescription": "Counts the number of uops delivered to Instruction Decode Queue (IDQ) from the Decode Stream Buffer (DSB) path. Counting includes uops that may 'bypass' the IDQ.",
25 "EventCode": "0x79",
22 "Counter": "0,1,2,3", 26 "Counter": "0,1,2,3",
23 "UMask": "0x2", 27 "UMask": "0x8",
24 "EventName": "ICACHE_64B.IFTAG_MISS", 28 "EventName": "IDQ.DSB_UOPS",
25 "SampleAfterValue": "200003", 29 "SampleAfterValue": "2000003",
26 "BriefDescription": "Instruction fetch tag lookups that miss in the instruction cache (L1I). Counts at 64-byte cache-line granularity.", 30 "BriefDescription": "Uops delivered to Instruction Decode Queue (IDQ) from the Decode Stream Buffer (DSB) path",
27 "CounterHTOff": "0,1,2,3,4,5,6,7" 31 "CounterHTOff": "0,1,2,3,4,5,6,7"
28 }, 32 },
29 { 33 {
30 "EventCode": "0x83", 34 "PublicDescription": "Counts cycles during which uops are being delivered to Instruction Decode Queue (IDQ) from the Decode Stream Buffer (DSB) path. Counting includes uops that may 'bypass' the IDQ.",
35 "EventCode": "0x79",
31 "Counter": "0,1,2,3", 36 "Counter": "0,1,2,3",
32 "UMask": "0x4", 37 "UMask": "0x8",
33 "EventName": "ICACHE_64B.IFTAG_STALL", 38 "EventName": "IDQ.DSB_CYCLES",
34 "SampleAfterValue": "200003", 39 "SampleAfterValue": "2000003",
35 "BriefDescription": "Cycles where a code fetch is stalled due to L1 instruction cache tag miss.", 40 "BriefDescription": "Cycles when uops are being delivered to Instruction Decode Queue (IDQ) from Decode Stream Buffer (DSB) path",
41 "CounterMask": "1",
36 "CounterHTOff": "0,1,2,3,4,5,6,7" 42 "CounterHTOff": "0,1,2,3,4,5,6,7"
37 }, 43 },
38 { 44 {
39 "PublicDescription": "This event counts the number of uops delivered to Instruction Decode Queue (IDQ) from the MITE path. Counting includes uops that may 'bypass' the IDQ. This also means that uops are not being delivered from the Decode Stream Buffer (DSB).", 45 "PublicDescription": "Counts cycles during which uops initiated by Decode Stream Buffer (DSB) are being delivered to Instruction Decode Queue (IDQ) while the Microcode Sequencer (MS) is busy. Counting includes uops that may 'bypass' the IDQ.",
40 "EventCode": "0x79", 46 "EventCode": "0x79",
41 "Counter": "0,1,2,3", 47 "Counter": "0,1,2,3",
42 "UMask": "0x4", 48 "UMask": "0x10",
43 "EventName": "IDQ.MITE_UOPS", 49 "EventName": "IDQ.MS_DSB_CYCLES",
44 "SampleAfterValue": "2000003", 50 "SampleAfterValue": "2000003",
45 "BriefDescription": "Uops delivered to Instruction Decode Queue (IDQ) from MITE path", 51 "BriefDescription": "Cycles when uops initiated by Decode Stream Buffer (DSB) are being delivered to Instruction Decode Queue (IDQ) while Microcode Sequenser (MS) is busy",
52 "CounterMask": "1",
46 "CounterHTOff": "0,1,2,3,4,5,6,7" 53 "CounterHTOff": "0,1,2,3,4,5,6,7"
47 }, 54 },
48 { 55 {
49 "PublicDescription": "This event counts the number of uops delivered to Instruction Decode Queue (IDQ) from the Decode Stream Buffer (DSB) path. Counting includes uops that may 'bypass' the IDQ.", 56 "PublicDescription": "Counts the number of cycles 4 uops were delivered to Instruction Decode Queue (IDQ) from the Decode Stream Buffer (DSB) path. Count includes uops that may 'bypass' the IDQ.",
50 "EventCode": "0x79", 57 "EventCode": "0x79",
51 "Counter": "0,1,2,3", 58 "Counter": "0,1,2,3",
52 "UMask": "0x8", 59 "UMask": "0x18",
53 "EventName": "IDQ.DSB_UOPS", 60 "EventName": "IDQ.ALL_DSB_CYCLES_4_UOPS",
54 "SampleAfterValue": "2000003", 61 "SampleAfterValue": "2000003",
55 "BriefDescription": "Uops delivered to Instruction Decode Queue (IDQ) from the Decode Stream Buffer (DSB) path", 62 "BriefDescription": "Cycles Decode Stream Buffer (DSB) is delivering 4 Uops",
63 "CounterMask": "4",
56 "CounterHTOff": "0,1,2,3,4,5,6,7" 64 "CounterHTOff": "0,1,2,3,4,5,6,7"
57 }, 65 },
58 { 66 {
59 "PublicDescription": "This event counts the number of uops initiated by MITE and delivered to Instruction Decode Queue (IDQ) while the Microcode Sequenser (MS) is busy. Counting includes uops that may 'bypass' the IDQ.", 67 "PublicDescription": "Counts the number of cycles uops were delivered to Instruction Decode Queue (IDQ) from the Decode Stream Buffer (DSB) path. Count includes uops that may 'bypass' the IDQ.",
68 "EventCode": "0x79",
69 "Counter": "0,1,2,3",
70 "UMask": "0x18",
71 "EventName": "IDQ.ALL_DSB_CYCLES_ANY_UOPS",
72 "SampleAfterValue": "2000003",
73 "BriefDescription": "Cycles Decode Stream Buffer (DSB) is delivering any Uop",
74 "CounterMask": "1",
75 "CounterHTOff": "0,1,2,3,4,5,6,7"
76 },
77 {
78 "PublicDescription": "Counts the number of uops initiated by MITE and delivered to Instruction Decode Queue (IDQ) while the Microcode Sequencer (MS) is busy. Counting includes uops that may 'bypass' the IDQ.",
60 "EventCode": "0x79", 79 "EventCode": "0x79",
61 "Counter": "0,1,2,3", 80 "Counter": "0,1,2,3",
62 "UMask": "0x20", 81 "UMask": "0x20",
@@ -66,95 +85,99 @@
66 "CounterHTOff": "0,1,2,3,4,5,6,7" 85 "CounterHTOff": "0,1,2,3,4,5,6,7"
67 }, 86 },
68 { 87 {
69 "PublicDescription": "This event counts cycles during which uops are being delivered to Instruction Decode Queue (IDQ) while the Microcode Sequenser (MS) is busy. Counting includes uops that may 'bypass' the IDQ. Uops maybe initiated by Decode Stream Buffer (DSB) or MITE.", 88 "PublicDescription": "Counts the number of cycles 4 uops were delivered to the Instruction Decode Queue (IDQ) from the MITE (legacy decode pipeline) path. Counting includes uops that may 'bypass' the IDQ. During these cycles uops are not being delivered from the Decode Stream Buffer (DSB).",
70 "EventCode": "0x79", 89 "EventCode": "0x79",
71 "Counter": "0,1,2,3", 90 "Counter": "0,1,2,3",
72 "UMask": "0x30", 91 "UMask": "0x24",
73 "EventName": "IDQ.MS_CYCLES", 92 "EventName": "IDQ.ALL_MITE_CYCLES_4_UOPS",
74 "SampleAfterValue": "2000003", 93 "SampleAfterValue": "2000003",
75 "BriefDescription": "Cycles when uops are being delivered to Instruction Decode Queue (IDQ) while Microcode Sequenser (MS) is busy", 94 "BriefDescription": "Cycles MITE is delivering 4 Uops",
76 "CounterMask": "1", 95 "CounterMask": "4",
77 "CounterHTOff": "0,1,2,3,4,5,6,7" 96 "CounterHTOff": "0,1,2,3,4,5,6,7"
78 }, 97 },
79 { 98 {
80 "PublicDescription": "This event counts cycles during which uops are being delivered to Instruction Decode Queue (IDQ) from the MITE path. Counting includes uops that may 'bypass' the IDQ.", 99 "PublicDescription": "Counts the number of cycles uops were delivered to the Instruction Decode Queue (IDQ) from the MITE (legacy decode pipeline) path. Counting includes uops that may 'bypass' the IDQ. During these cycles uops are not being delivered from the Decode Stream Buffer (DSB).",
81 "EventCode": "0x79", 100 "EventCode": "0x79",
82 "Counter": "0,1,2,3", 101 "Counter": "0,1,2,3",
83 "UMask": "0x4", 102 "UMask": "0x24",
84 "EventName": "IDQ.MITE_CYCLES", 103 "EventName": "IDQ.ALL_MITE_CYCLES_ANY_UOPS",
85 "SampleAfterValue": "2000003", 104 "SampleAfterValue": "2000003",
86 "BriefDescription": "Cycles when uops are being delivered to Instruction Decode Queue (IDQ) from MITE path", 105 "BriefDescription": "Cycles MITE is delivering any Uop",
87 "CounterMask": "1", 106 "CounterMask": "1",
88 "CounterHTOff": "0,1,2,3,4,5,6,7" 107 "CounterHTOff": "0,1,2,3,4,5,6,7"
89 }, 108 },
90 { 109 {
91 "PublicDescription": "This event counts cycles during which uops are being delivered to Instruction Decode Queue (IDQ) from the Decode Stream Buffer (DSB) path. Counting includes uops that may 'bypass' the IDQ.", 110 "PublicDescription": "Counts cycles during which uops are being delivered to Instruction Decode Queue (IDQ) while the Microcode Sequencer (MS) is busy. Counting includes uops that may 'bypass' the IDQ. Uops maybe initiated by Decode Stream Buffer (DSB) or MITE.",
92 "EventCode": "0x79", 111 "EventCode": "0x79",
93 "Counter": "0,1,2,3", 112 "Counter": "0,1,2,3",
94 "UMask": "0x8", 113 "UMask": "0x30",
95 "EventName": "IDQ.DSB_CYCLES", 114 "EventName": "IDQ.MS_CYCLES",
96 "SampleAfterValue": "2000003", 115 "SampleAfterValue": "2000003",
97 "BriefDescription": "Cycles when uops are being delivered to Instruction Decode Queue (IDQ) from Decode Stream Buffer (DSB) path", 116 "BriefDescription": "Cycles when uops are being delivered to Instruction Decode Queue (IDQ) while Microcode Sequenser (MS) is busy",
98 "CounterMask": "1", 117 "CounterMask": "1",
99 "CounterHTOff": "0,1,2,3,4,5,6,7" 118 "CounterHTOff": "0,1,2,3,4,5,6,7"
100 }, 119 },
101 { 120 {
102 "PublicDescription": "This event counts cycles during which uops initiated by Decode Stream Buffer (DSB) are being delivered to Instruction Decode Queue (IDQ) while the Microcode Sequencer (MS) is busy. Counting includes uops that may 'bypass' the IDQ.", 121 "PublicDescription": "Number of switches from DSB (Decode Stream Buffer) or MITE (legacy decode pipeline) to the Microcode Sequencer.",
103 "EventCode": "0x79", 122 "EventCode": "0x79",
104 "Counter": "0,1,2,3", 123 "Counter": "0,1,2,3",
105 "UMask": "0x10", 124 "UMask": "0x30",
106 "EventName": "IDQ.MS_DSB_CYCLES", 125 "EdgeDetect": "1",
126 "EventName": "IDQ.MS_SWITCHES",
107 "SampleAfterValue": "2000003", 127 "SampleAfterValue": "2000003",
108 "BriefDescription": "Cycles when uops initiated by Decode Stream Buffer (DSB) are being delivered to Instruction Decode Queue (IDQ) while Microcode Sequenser (MS) is busy", 128 "BriefDescription": "Number of switches from DSB (Decode Stream Buffer) or MITE (legacy decode pipeline) to the Microcode Sequencer",
109 "CounterMask": "1", 129 "CounterMask": "1",
110 "CounterHTOff": "0,1,2,3,4,5,6,7" 130 "CounterHTOff": "0,1,2,3,4,5,6,7"
111 }, 131 },
112 { 132 {
113 "PublicDescription": "This event counts the number of cycles 4 uops were delivered to Instruction Decode Queue (IDQ) from the Decode Stream Buffer (DSB) path. Counting includes uops that may 'bypass' the IDQ.", 133 "PublicDescription": "Counts the total number of uops delivered by the Microcode Sequencer (MS). Any instruction over 4 uops will be delivered by the MS. Some instructions such as transcendentals may additionally generate uops from the MS.",
114 "EventCode": "0x79", 134 "EventCode": "0x79",
115 "Counter": "0,1,2,3", 135 "Counter": "0,1,2,3",
116 "UMask": "0x18", 136 "UMask": "0x30",
117 "EventName": "IDQ.ALL_DSB_CYCLES_4_UOPS", 137 "EventName": "IDQ.MS_UOPS",
118 "SampleAfterValue": "2000003", 138 "SampleAfterValue": "2000003",
119 "BriefDescription": "Cycles Decode Stream Buffer (DSB) is delivering 4 Uops", 139 "BriefDescription": "Uops delivered to Instruction Decode Queue (IDQ) while Microcode Sequenser (MS) is busy",
120 "CounterMask": "4",
121 "CounterHTOff": "0,1,2,3,4,5,6,7" 140 "CounterHTOff": "0,1,2,3,4,5,6,7"
122 }, 141 },
123 { 142 {
124 "PublicDescription": "This event counts the number of cycles uops were delivered to Instruction Decode Queue (IDQ) from the Decode Stream Buffer (DSB) path. Counting includes uops that may 'bypass' the IDQ.", 143 "PublicDescription": "Cycles where a code line fetch is stalled due to an L1 instruction cache miss. The legacy decode pipeline works at a 16 Byte granularity.",
125 "EventCode": "0x79", 144 "EventCode": "0x80",
126 "Counter": "0,1,2,3", 145 "Counter": "0,1,2,3",
127 "UMask": "0x18", 146 "UMask": "0x4",
128 "EventName": "IDQ.ALL_DSB_CYCLES_ANY_UOPS", 147 "EventName": "ICACHE_16B.IFDATA_STALL",
129 "SampleAfterValue": "2000003", 148 "SampleAfterValue": "2000003",
130 "BriefDescription": "Cycles Decode Stream Buffer (DSB) is delivering any Uop", 149 "BriefDescription": "Cycles where a code fetch is stalled due to L1 instruction cache miss.",
131 "CounterMask": "1",
132 "CounterHTOff": "0,1,2,3,4,5,6,7" 150 "CounterHTOff": "0,1,2,3,4,5,6,7"
133 }, 151 },
134 { 152 {
135 "PublicDescription": "This event counts the number of cycles 4 uops were delivered to Instruction Decode Queue (IDQ) from the MITE path. Counting includes uops that may 'bypass' the IDQ. This also means that uops are not being delivered from the Decode Stream Buffer (DSB).", 153 "EventCode": "0x83",
136 "EventCode": "0x79",
137 "Counter": "0,1,2,3", 154 "Counter": "0,1,2,3",
138 "UMask": "0x24", 155 "UMask": "0x1",
139 "EventName": "IDQ.ALL_MITE_CYCLES_4_UOPS", 156 "EventName": "ICACHE_64B.IFTAG_HIT",
140 "SampleAfterValue": "2000003", 157 "SampleAfterValue": "200003",
141 "BriefDescription": "Cycles MITE is delivering 4 Uops", 158 "BriefDescription": "Instruction fetch tag lookups that hit in the instruction cache (L1I). Counts at 64-byte cache-line granularity.",
142 "CounterMask": "4",
143 "CounterHTOff": "0,1,2,3,4,5,6,7" 159 "CounterHTOff": "0,1,2,3,4,5,6,7"
144 }, 160 },
145 { 161 {
146 "PublicDescription": "This event counts the number of cycles uops were delivered to Instruction Decode Queue (IDQ) from the MITE path. Counting includes uops that may 'bypass' the IDQ. This also means that uops are not being delivered from the Decode Stream Buffer (DSB).", 162 "EventCode": "0x83",
147 "EventCode": "0x79",
148 "Counter": "0,1,2,3", 163 "Counter": "0,1,2,3",
149 "UMask": "0x24", 164 "UMask": "0x2",
150 "EventName": "IDQ.ALL_MITE_CYCLES_ANY_UOPS", 165 "EventName": "ICACHE_64B.IFTAG_MISS",
151 "SampleAfterValue": "2000003", 166 "SampleAfterValue": "200003",
152 "BriefDescription": "Cycles MITE is delivering any Uop", 167 "BriefDescription": "Instruction fetch tag lookups that miss in the instruction cache (L1I). Counts at 64-byte cache-line granularity.",
153 "CounterMask": "1", 168 "CounterHTOff": "0,1,2,3,4,5,6,7"
169 },
170 {
171 "EventCode": "0x83",
172 "Counter": "0,1,2,3",
173 "UMask": "0x4",
174 "EventName": "ICACHE_64B.IFTAG_STALL",
175 "SampleAfterValue": "200003",
176 "BriefDescription": "Cycles where a code fetch is stalled due to L1 instruction cache tag miss.",
154 "CounterHTOff": "0,1,2,3,4,5,6,7" 177 "CounterHTOff": "0,1,2,3,4,5,6,7"
155 }, 178 },
156 { 179 {
157 "PublicDescription": "This event counts the number of uops not delivered to Resource Allocation Table (RAT) per thread adding ?4 ? x? when Resource Allocation Table (RAT) is not stalled and Instruction Decode Queue (IDQ) delivers x uops to Resource Allocation Table (RAT) (where x belongs to {0,1,2,3}). Counting does not cover cases when:\n a. IDQ-Resource Allocation Table (RAT) pipe serves the other thread\n\n b. Resource Allocation Table (RAT) is stalled for the thread (including uop drops and clear BE conditions)\n \n c. Instruction Decode Queue (IDQ) delivers four uops.", 180 "PublicDescription": "Counts the number of uops not delivered to Resource Allocation Table (RAT) per thread adding 4 x when Resource Allocation Table (RAT) is not stalled and Instruction Decode Queue (IDQ) delivers x uops to Resource Allocation Table (RAT) (where x belongs to {0,1,2,3}). Counting does not cover cases when: a. IDQ-Resource Allocation Table (RAT) pipe serves the other thread. b. Resource Allocation Table (RAT) is stalled for the thread (including uop drops and clear BE conditions). c. Instruction Decode Queue (IDQ) delivers four uops.",
158 "EventCode": "0x9C", 181 "EventCode": "0x9C",
159 "Counter": "0,1,2,3", 182 "Counter": "0,1,2,3",
160 "UMask": "0x1", 183 "UMask": "0x1",
@@ -164,7 +187,7 @@
164 "CounterHTOff": "0,1,2,3,4,5,6,7" 187 "CounterHTOff": "0,1,2,3,4,5,6,7"
165 }, 188 },
166 { 189 {
167 "PublicDescription": "This event counts, on the per-thread basis, cycles when no uops are delivered to Resource Allocation Table (RAT). IDQ_Uops_Not_Delivered.core =4.", 190 "PublicDescription": "Counts, on the per-thread basis, cycles when no uops are delivered to Resource Allocation Table (RAT). IDQ_Uops_Not_Delivered.core =4.",
168 "EventCode": "0x9C", 191 "EventCode": "0x9C",
169 "Counter": "0,1,2,3", 192 "Counter": "0,1,2,3",
170 "UMask": "0x1", 193 "UMask": "0x1",
@@ -175,7 +198,7 @@
175 "CounterHTOff": "0,1,2,3,4,5,6,7" 198 "CounterHTOff": "0,1,2,3,4,5,6,7"
176 }, 199 },
177 { 200 {
178 "PublicDescription": "This event counts, on the per-thread basis, cycles when less than 1 uop is delivered to Resource Allocation Table (RAT). IDQ_Uops_Not_Delivered.core >=3.", 201 "PublicDescription": "Counts, on the per-thread basis, cycles when less than 1 uop is delivered to Resource Allocation Table (RAT). IDQ_Uops_Not_Delivered.core >= 3.",
179 "EventCode": "0x9C", 202 "EventCode": "0x9C",
180 "Counter": "0,1,2,3", 203 "Counter": "0,1,2,3",
181 "UMask": "0x1", 204 "UMask": "0x1",
@@ -186,6 +209,7 @@
186 "CounterHTOff": "0,1,2,3,4,5,6,7" 209 "CounterHTOff": "0,1,2,3,4,5,6,7"
187 }, 210 },
188 { 211 {
212 "PublicDescription": "Cycles with less than 2 uops delivered by the front-end.",
189 "EventCode": "0x9C", 213 "EventCode": "0x9C",
190 "Counter": "0,1,2,3", 214 "Counter": "0,1,2,3",
191 "UMask": "0x1", 215 "UMask": "0x1",
@@ -196,6 +220,7 @@
196 "CounterHTOff": "0,1,2,3,4,5,6,7" 220 "CounterHTOff": "0,1,2,3,4,5,6,7"
197 }, 221 },
198 { 222 {
223 "PublicDescription": "Cycles with less than 3 uops delivered by the front-end.",
199 "EventCode": "0x9C", 224 "EventCode": "0x9C",
200 "Counter": "0,1,2,3", 225 "Counter": "0,1,2,3",
201 "UMask": "0x1", 226 "UMask": "0x1",
@@ -217,7 +242,7 @@
217 "CounterHTOff": "0,1,2,3,4,5,6,7" 242 "CounterHTOff": "0,1,2,3,4,5,6,7"
218 }, 243 },
219 { 244 {
220 "PublicDescription": "This event counts Decode Stream Buffer (DSB)-to-MITE switch true penalty cycles. These cycles do not include uops routed through because of the switch itself, for example, when Instruction Decode Queue (IDQ) pre-allocation is unavailable, or Instruction Decode Queue (IDQ) is full. SBD-to-MITE switch true penalty cycles happen after the merge mux (MM) receives Decode Stream Buffer (DSB) Sync-indication until receiving the first MITE uop. \nMM is placed before Instruction Decode Queue (IDQ) to merge uops being fed from the MITE and Decode Stream Buffer (DSB) paths. Decode Stream Buffer (DSB) inserts the Sync-indication whenever a Decode Stream Buffer (DSB)-to-MITE switch occurs.\nPenalty: A Decode Stream Buffer (DSB) hit followed by a Decode Stream Buffer (DSB) miss can cost up to six cycles in which no uops are delivered to the IDQ. Most often, such switches from the Decode Stream Buffer (DSB) to the legacy pipeline cost 0?2 cycles.", 245 "PublicDescription": "Counts Decode Stream Buffer (DSB)-to-MITE switch true penalty cycles. These cycles do not include uops routed through because of the switch itself, for example, when Instruction Decode Queue (IDQ) pre-allocation is unavailable, or Instruction Decode Queue (IDQ) is full. SBD-to-MITE switch true penalty cycles happen after the merge mux (MM) receives Decode Stream Buffer (DSB) Sync-indication until receiving the first MITE uop. MM is placed before Instruction Decode Queue (IDQ) to merge uops being fed from the MITE and Decode Stream Buffer (DSB) paths. Decode Stream Buffer (DSB) inserts the Sync-indication whenever a Decode Stream Buffer (DSB)-to-MITE switch occurs.Penalty: A Decode Stream Buffer (DSB) hit followed by a Decode Stream Buffer (DSB) miss can cost up to six cycles in which no uops are delivered to the IDQ. Most often, such switches from the Decode Stream Buffer (DSB) to the legacy pipeline cost 02 cycles.",
221 "EventCode": "0xAB", 246 "EventCode": "0xAB",
222 "Counter": "0,1,2,3", 247 "Counter": "0,1,2,3",
223 "UMask": "0x2", 248 "UMask": "0x2",
@@ -228,6 +253,7 @@
228 }, 253 },
229 { 254 {
230 "PEBS": "1", 255 "PEBS": "1",
256 "PublicDescription": "Counts retired Instructions that experienced DSB (Decode stream buffer i.e. the decoded instruction-cache) miss. \r\n",
231 "EventCode": "0xC6", 257 "EventCode": "0xC6",
232 "MSRValue": "0x11", 258 "MSRValue": "0x11",
233 "Counter": "0,1,2,3", 259 "Counter": "0,1,2,3",
@@ -235,7 +261,7 @@
235 "EventName": "FRONTEND_RETIRED.DSB_MISS", 261 "EventName": "FRONTEND_RETIRED.DSB_MISS",
236 "MSRIndex": "0x3F7", 262 "MSRIndex": "0x3F7",
237 "SampleAfterValue": "100007", 263 "SampleAfterValue": "100007",
238 "BriefDescription": "Retired Instructions who experienced decode stream buffer (DSB - the decoded instruction-cache) miss.", 264 "BriefDescription": "Retired Instructions who experienced decode stream buffer (DSB - the decoded instruction-cache) miss. Precise Event.",
239 "TakenAlone": "1", 265 "TakenAlone": "1",
240 "CounterHTOff": "0,1,2,3" 266 "CounterHTOff": "0,1,2,3"
241 }, 267 },
@@ -248,7 +274,7 @@
248 "EventName": "FRONTEND_RETIRED.L1I_MISS", 274 "EventName": "FRONTEND_RETIRED.L1I_MISS",
249 "MSRIndex": "0x3F7", 275 "MSRIndex": "0x3F7",
250 "SampleAfterValue": "100007", 276 "SampleAfterValue": "100007",
251 "BriefDescription": "Retired Instructions who experienced Instruction L1 Cache true miss.", 277 "BriefDescription": "Retired Instructions who experienced Instruction L1 Cache true miss. Precise Event.",
252 "TakenAlone": "1", 278 "TakenAlone": "1",
253 "CounterHTOff": "0,1,2,3" 279 "CounterHTOff": "0,1,2,3"
254 }, 280 },
@@ -261,12 +287,13 @@
261 "EventName": "FRONTEND_RETIRED.L2_MISS", 287 "EventName": "FRONTEND_RETIRED.L2_MISS",
262 "MSRIndex": "0x3F7", 288 "MSRIndex": "0x3F7",
263 "SampleAfterValue": "100007", 289 "SampleAfterValue": "100007",
264 "BriefDescription": "Retired Instructions who experienced Instruction L2 Cache true miss.", 290 "BriefDescription": "Retired Instructions who experienced Instruction L2 Cache true miss. Precise Event.",
265 "TakenAlone": "1", 291 "TakenAlone": "1",
266 "CounterHTOff": "0,1,2,3" 292 "CounterHTOff": "0,1,2,3"
267 }, 293 },
268 { 294 {
269 "PEBS": "1", 295 "PEBS": "1",
296 "PublicDescription": "Counts retired Instructions that experienced iTLB (Instruction TLB) true miss.",
270 "EventCode": "0xC6", 297 "EventCode": "0xC6",
271 "MSRValue": "0x14", 298 "MSRValue": "0x14",
272 "Counter": "0,1,2,3", 299 "Counter": "0,1,2,3",
@@ -274,12 +301,13 @@
274 "EventName": "FRONTEND_RETIRED.ITLB_MISS", 301 "EventName": "FRONTEND_RETIRED.ITLB_MISS",
275 "MSRIndex": "0x3F7", 302 "MSRIndex": "0x3F7",
276 "SampleAfterValue": "100007", 303 "SampleAfterValue": "100007",
277 "BriefDescription": "Retired Instructions who experienced iTLB true miss.", 304 "BriefDescription": "Retired Instructions who experienced iTLB true miss. Precise Event.",
278 "TakenAlone": "1", 305 "TakenAlone": "1",
279 "CounterHTOff": "0,1,2,3" 306 "CounterHTOff": "0,1,2,3"
280 }, 307 },
281 { 308 {
282 "PEBS": "1", 309 "PEBS": "1",
310 "PublicDescription": "Counts retired Instructions that experienced STLB (2nd level TLB) true miss.",
283 "EventCode": "0xC6", 311 "EventCode": "0xC6",
284 "MSRValue": "0x15", 312 "MSRValue": "0x15",
285 "Counter": "0,1,2,3", 313 "Counter": "0,1,2,3",
@@ -287,7 +315,7 @@
287 "EventName": "FRONTEND_RETIRED.STLB_MISS", 315 "EventName": "FRONTEND_RETIRED.STLB_MISS",
288 "MSRIndex": "0x3F7", 316 "MSRIndex": "0x3F7",
289 "SampleAfterValue": "100007", 317 "SampleAfterValue": "100007",
290 "BriefDescription": "Retired Instructions who experienced STLB (2nd level TLB) true miss.", 318 "BriefDescription": "Retired Instructions who experienced STLB (2nd level TLB) true miss. Precise Event.",
291 "TakenAlone": "1", 319 "TakenAlone": "1",
292 "CounterHTOff": "0,1,2,3" 320 "CounterHTOff": "0,1,2,3"
293 }, 321 },
@@ -300,7 +328,7 @@
300 "EventName": "FRONTEND_RETIRED.LATENCY_GE_2", 328 "EventName": "FRONTEND_RETIRED.LATENCY_GE_2",
301 "MSRIndex": "0x3F7", 329 "MSRIndex": "0x3F7",
302 "SampleAfterValue": "100007", 330 "SampleAfterValue": "100007",
303 "BriefDescription": "Retired instructions that are fetched after an interval where the front-end delivered no uops for a period of 2 cycles which was not interrupted by a back-end stall.", 331 "BriefDescription": "Retired instructions that are fetched after an interval where the front-end delivered no uops for a period of 2 cycles which was not interrupted by a back-end stall. Precise Event.",
304 "TakenAlone": "1", 332 "TakenAlone": "1",
305 "CounterHTOff": "0,1,2,3" 333 "CounterHTOff": "0,1,2,3"
306 }, 334 },
@@ -313,7 +341,7 @@
313 "EventName": "FRONTEND_RETIRED.LATENCY_GE_2_BUBBLES_GE_2", 341 "EventName": "FRONTEND_RETIRED.LATENCY_GE_2_BUBBLES_GE_2",
314 "MSRIndex": "0x3F7", 342 "MSRIndex": "0x3F7",
315 "SampleAfterValue": "100007", 343 "SampleAfterValue": "100007",
316 "BriefDescription": "Retired instructions that are fetched after an interval where the front-end had at least 2 bubble-slots for a period of 2 cycles which was not interrupted by a back-end stall.", 344 "BriefDescription": "Retired instructions that are fetched after an interval where the front-end had at least 2 bubble-slots for a period of 2 cycles which was not interrupted by a back-end stall. Precise Event.",
317 "TakenAlone": "1", 345 "TakenAlone": "1",
318 "CounterHTOff": "0,1,2,3" 346 "CounterHTOff": "0,1,2,3"
319 }, 347 },
@@ -326,34 +354,13 @@
326 "EventName": "FRONTEND_RETIRED.LATENCY_GE_4", 354 "EventName": "FRONTEND_RETIRED.LATENCY_GE_4",
327 "MSRIndex": "0x3F7", 355 "MSRIndex": "0x3F7",
328 "SampleAfterValue": "100007", 356 "SampleAfterValue": "100007",
329 "BriefDescription": "Retired instructions that are fetched after an interval where the front-end delivered no uops for a period of 4 cycles which was not interrupted by a back-end stall.", 357 "BriefDescription": "Retired instructions that are fetched after an interval where the front-end delivered no uops for a period of 4 cycles which was not interrupted by a back-end stall. Precise Event.",
330 "TakenAlone": "1", 358 "TakenAlone": "1",
331 "CounterHTOff": "0,1,2,3" 359 "CounterHTOff": "0,1,2,3"
332 }, 360 },
333 { 361 {
334 "PublicDescription": "Number of switches from DSB (Decode Stream Buffer) or MITE (legacy decode pipeline) to the Microcode Sequencer.",
335 "EventCode": "0x79",
336 "Counter": "0,1,2,3",
337 "UMask": "0x30",
338 "EdgeDetect": "1",
339 "EventName": "IDQ.MS_SWITCHES",
340 "SampleAfterValue": "2000003",
341 "BriefDescription": "Number of switches from DSB (Decode Stream Buffer) or MITE (legacy decode pipeline) to the Microcode Sequencer",
342 "CounterMask": "1",
343 "CounterHTOff": "0,1,2,3,4,5,6,7"
344 },
345 {
346 "PublicDescription": "This event counts the total number of uops delivered to Instruction Decode Queue (IDQ) while the Microcode Sequenser (MS) is busy. Counting includes uops that may 'bypass' the IDQ. Uops maybe initiated by Decode Stream Buffer (DSB) or MITE.",
347 "EventCode": "0x79",
348 "Counter": "0,1,2,3",
349 "UMask": "0x30",
350 "EventName": "IDQ.MS_UOPS",
351 "SampleAfterValue": "2000003",
352 "BriefDescription": "Uops delivered to Instruction Decode Queue (IDQ) while Microcode Sequenser (MS) is busy",
353 "CounterHTOff": "0,1,2,3,4,5,6,7"
354 },
355 {
356 "PEBS": "1", 362 "PEBS": "1",
363 "PublicDescription": "Counts retired instructions that are delivered to the back-end after a front-end stall of at least 8 cycles. During this period the front-end delivered no uops. \r\n",
357 "EventCode": "0xC6", 364 "EventCode": "0xC6",
358 "MSRValue": "0x400806", 365 "MSRValue": "0x400806",
359 "Counter": "0,1,2,3", 366 "Counter": "0,1,2,3",
@@ -367,6 +374,7 @@
367 }, 374 },
368 { 375 {
369 "PEBS": "1", 376 "PEBS": "1",
377 "PublicDescription": "Counts retired instructions that are delivered to the back-end after a front-end stall of at least 16 cycles. During this period the front-end delivered no uops.\r\n",
370 "EventCode": "0xC6", 378 "EventCode": "0xC6",
371 "MSRValue": "0x401006", 379 "MSRValue": "0x401006",
372 "Counter": "0,1,2,3", 380 "Counter": "0,1,2,3",
@@ -374,12 +382,13 @@
374 "EventName": "FRONTEND_RETIRED.LATENCY_GE_16", 382 "EventName": "FRONTEND_RETIRED.LATENCY_GE_16",
375 "MSRIndex": "0x3F7", 383 "MSRIndex": "0x3F7",
376 "SampleAfterValue": "100007", 384 "SampleAfterValue": "100007",
377 "BriefDescription": "Retired instructions that are fetched after an interval where the front-end delivered no uops for a period of 16 cycles which was not interrupted by a back-end stall.", 385 "BriefDescription": "Retired instructions that are fetched after an interval where the front-end delivered no uops for a period of 16 cycles which was not interrupted by a back-end stall. Precise Event.",
378 "TakenAlone": "1", 386 "TakenAlone": "1",
379 "CounterHTOff": "0,1,2,3" 387 "CounterHTOff": "0,1,2,3"
380 }, 388 },
381 { 389 {
382 "PEBS": "1", 390 "PEBS": "1",
391 "PublicDescription": "Counts retired instructions that are delivered to the back-end after a front-end stall of at least 32 cycles. During this period the front-end delivered no uops.\r\n",
383 "EventCode": "0xC6", 392 "EventCode": "0xC6",
384 "MSRValue": "0x402006", 393 "MSRValue": "0x402006",
385 "Counter": "0,1,2,3", 394 "Counter": "0,1,2,3",
@@ -387,7 +396,7 @@
387 "EventName": "FRONTEND_RETIRED.LATENCY_GE_32", 396 "EventName": "FRONTEND_RETIRED.LATENCY_GE_32",
388 "MSRIndex": "0x3F7", 397 "MSRIndex": "0x3F7",
389 "SampleAfterValue": "100007", 398 "SampleAfterValue": "100007",
390 "BriefDescription": "Retired instructions that are fetched after an interval where the front-end delivered no uops for a period of 32 cycles which was not interrupted by a back-end stall.", 399 "BriefDescription": "Retired instructions that are fetched after an interval where the front-end delivered no uops for a period of 32 cycles which was not interrupted by a back-end stall. Precise Event.",
391 "TakenAlone": "1", 400 "TakenAlone": "1",
392 "CounterHTOff": "0,1,2,3" 401 "CounterHTOff": "0,1,2,3"
393 }, 402 },
@@ -400,7 +409,7 @@
400 "EventName": "FRONTEND_RETIRED.LATENCY_GE_64", 409 "EventName": "FRONTEND_RETIRED.LATENCY_GE_64",
401 "MSRIndex": "0x3F7", 410 "MSRIndex": "0x3F7",
402 "SampleAfterValue": "100007", 411 "SampleAfterValue": "100007",
403 "BriefDescription": "Retired instructions that are fetched after an interval where the front-end delivered no uops for a period of 64 cycles which was not interrupted by a back-end stall.", 412 "BriefDescription": "Retired instructions that are fetched after an interval where the front-end delivered no uops for a period of 64 cycles which was not interrupted by a back-end stall. Precise Event.",
404 "TakenAlone": "1", 413 "TakenAlone": "1",
405 "CounterHTOff": "0,1,2,3" 414 "CounterHTOff": "0,1,2,3"
406 }, 415 },
@@ -413,7 +422,7 @@
413 "EventName": "FRONTEND_RETIRED.LATENCY_GE_128", 422 "EventName": "FRONTEND_RETIRED.LATENCY_GE_128",
414 "MSRIndex": "0x3F7", 423 "MSRIndex": "0x3F7",
415 "SampleAfterValue": "100007", 424 "SampleAfterValue": "100007",
416 "BriefDescription": "Retired instructions that are fetched after an interval where the front-end delivered no uops for a period of 128 cycles which was not interrupted by a back-end stall.", 425 "BriefDescription": "Retired instructions that are fetched after an interval where the front-end delivered no uops for a period of 128 cycles which was not interrupted by a back-end stall. Precise Event.",
417 "TakenAlone": "1", 426 "TakenAlone": "1",
418 "CounterHTOff": "0,1,2,3" 427 "CounterHTOff": "0,1,2,3"
419 }, 428 },
@@ -426,7 +435,7 @@
426 "EventName": "FRONTEND_RETIRED.LATENCY_GE_256", 435 "EventName": "FRONTEND_RETIRED.LATENCY_GE_256",
427 "MSRIndex": "0x3F7", 436 "MSRIndex": "0x3F7",
428 "SampleAfterValue": "100007", 437 "SampleAfterValue": "100007",
429 "BriefDescription": "Retired instructions that are fetched after an interval where the front-end delivered no uops for a period of 256 cycles which was not interrupted by a back-end stall.", 438 "BriefDescription": "Retired instructions that are fetched after an interval where the front-end delivered no uops for a period of 256 cycles which was not interrupted by a back-end stall. Precise Event.",
430 "TakenAlone": "1", 439 "TakenAlone": "1",
431 "CounterHTOff": "0,1,2,3" 440 "CounterHTOff": "0,1,2,3"
432 }, 441 },
@@ -439,12 +448,13 @@
439 "EventName": "FRONTEND_RETIRED.LATENCY_GE_512", 448 "EventName": "FRONTEND_RETIRED.LATENCY_GE_512",
440 "MSRIndex": "0x3F7", 449 "MSRIndex": "0x3F7",
441 "SampleAfterValue": "100007", 450 "SampleAfterValue": "100007",
442 "BriefDescription": "Retired instructions that are fetched after an interval where the front-end delivered no uops for a period of 512 cycles which was not interrupted by a back-end stall.", 451 "BriefDescription": "Retired instructions that are fetched after an interval where the front-end delivered no uops for a period of 512 cycles which was not interrupted by a back-end stall. Precise Event.",
443 "TakenAlone": "1", 452 "TakenAlone": "1",
444 "CounterHTOff": "0,1,2,3" 453 "CounterHTOff": "0,1,2,3"
445 }, 454 },
446 { 455 {
447 "PEBS": "1", 456 "PEBS": "1",
457 "PublicDescription": "Counts retired instructions that are delivered to the back-end after the front-end had at least 1 bubble-slot for a period of 2 cycles. A bubble-slot is an empty issue-pipeline slot while there was no RAT stall.\r\n",
448 "EventCode": "0xC6", 458 "EventCode": "0xC6",
449 "MSRValue": "0x100206", 459 "MSRValue": "0x100206",
450 "Counter": "0,1,2,3", 460 "Counter": "0,1,2,3",
@@ -452,7 +462,7 @@
452 "EventName": "FRONTEND_RETIRED.LATENCY_GE_2_BUBBLES_GE_1", 462 "EventName": "FRONTEND_RETIRED.LATENCY_GE_2_BUBBLES_GE_1",
453 "MSRIndex": "0x3F7", 463 "MSRIndex": "0x3F7",
454 "SampleAfterValue": "100007", 464 "SampleAfterValue": "100007",
455 "BriefDescription": "Retired instructions that are fetched after an interval where the front-end had at least 1 bubble-slot for a period of 2 cycles which was not interrupted by a back-end stall.", 465 "BriefDescription": "Retired instructions that are fetched after an interval where the front-end had at least 1 bubble-slot for a period of 2 cycles which was not interrupted by a back-end stall. Precise Event.",
456 "TakenAlone": "1", 466 "TakenAlone": "1",
457 "CounterHTOff": "0,1,2,3" 467 "CounterHTOff": "0,1,2,3"
458 }, 468 },
@@ -465,7 +475,7 @@
465 "EventName": "FRONTEND_RETIRED.LATENCY_GE_2_BUBBLES_GE_3", 475 "EventName": "FRONTEND_RETIRED.LATENCY_GE_2_BUBBLES_GE_3",
466 "MSRIndex": "0x3F7", 476 "MSRIndex": "0x3F7",
467 "SampleAfterValue": "100007", 477 "SampleAfterValue": "100007",
468 "BriefDescription": "Retired instructions that are fetched after an interval where the front-end had at least 3 bubble-slots for a period of 2 cycles which was not interrupted by a back-end stall.", 478 "BriefDescription": "Retired instructions that are fetched after an interval where the front-end had at least 3 bubble-slots for a period of 2 cycles which was not interrupted by a back-end stall. Precise Event.",
469 "TakenAlone": "1", 479 "TakenAlone": "1",
470 "CounterHTOff": "0,1,2,3" 480 "CounterHTOff": "0,1,2,3"
471 } 481 }
diff --git a/tools/perf/pmu-events/arch/x86/skylake/memory.json b/tools/perf/pmu-events/arch/x86/skylake/memory.json
index d7fd5b06825b..3bd8b712c889 100644
--- a/tools/perf/pmu-events/arch/x86/skylake/memory.json
+++ b/tools/perf/pmu-events/arch/x86/skylake/memory.json
@@ -1,6 +1,74 @@
1[ 1[
2 { 2 {
3 "PublicDescription": "Unfriendly TSX abort triggered by a flowmarker.", 3 "PublicDescription": "Number of times a TSX line had a cache conflict.",
4 "EventCode": "0x54",
5 "Counter": "0,1,2,3",
6 "UMask": "0x1",
7 "EventName": "TX_MEM.ABORT_CONFLICT",
8 "SampleAfterValue": "2000003",
9 "BriefDescription": "Number of times a transactional abort was signaled due to a data conflict on a transactionally accessed address",
10 "CounterHTOff": "0,1,2,3,4,5,6,7"
11 },
12 {
13 "EventCode": "0x54",
14 "Counter": "0,1,2,3",
15 "UMask": "0x2",
16 "EventName": "TX_MEM.ABORT_CAPACITY",
17 "SampleAfterValue": "2000003",
18 "BriefDescription": "Number of times a transactional abort was signaled due to a data capacity limitation for transactional reads or writes.",
19 "CounterHTOff": "0,1,2,3,4,5,6,7"
20 },
21 {
22 "PublicDescription": "Number of times a TSX Abort was triggered due to a non-release/commit store to lock.",
23 "EventCode": "0x54",
24 "Counter": "0,1,2,3",
25 "UMask": "0x4",
26 "EventName": "TX_MEM.ABORT_HLE_STORE_TO_ELIDED_LOCK",
27 "SampleAfterValue": "2000003",
28 "BriefDescription": "Number of times a HLE transactional region aborted due to a non XRELEASE prefixed instruction writing to an elided lock in the elision buffer",
29 "CounterHTOff": "0,1,2,3,4,5,6,7"
30 },
31 {
32 "PublicDescription": "Number of times a TSX Abort was triggered due to commit but Lock Buffer not empty.",
33 "EventCode": "0x54",
34 "Counter": "0,1,2,3",
35 "UMask": "0x8",
36 "EventName": "TX_MEM.ABORT_HLE_ELISION_BUFFER_NOT_EMPTY",
37 "SampleAfterValue": "2000003",
38 "BriefDescription": "Number of times an HLE transactional execution aborted due to NoAllocatedElisionBuffer being non-zero.",
39 "CounterHTOff": "0,1,2,3,4,5,6,7"
40 },
41 {
42 "PublicDescription": "Number of times a TSX Abort was triggered due to release/commit but data and address mismatch.",
43 "EventCode": "0x54",
44 "Counter": "0,1,2,3",
45 "UMask": "0x10",
46 "EventName": "TX_MEM.ABORT_HLE_ELISION_BUFFER_MISMATCH",
47 "SampleAfterValue": "2000003",
48 "BriefDescription": "Number of times an HLE transactional execution aborted due to XRELEASE lock not satisfying the address and value requirements in the elision buffer",
49 "CounterHTOff": "0,1,2,3,4,5,6,7"
50 },
51 {
52 "PublicDescription": "Number of times a TSX Abort was triggered due to attempting an unsupported alignment from Lock Buffer.",
53 "EventCode": "0x54",
54 "Counter": "0,1,2,3",
55 "UMask": "0x20",
56 "EventName": "TX_MEM.ABORT_HLE_ELISION_BUFFER_UNSUPPORTED_ALIGNMENT",
57 "SampleAfterValue": "2000003",
58 "BriefDescription": "Number of times an HLE transactional execution aborted due to an unsupported read alignment from the elision buffer.",
59 "CounterHTOff": "0,1,2,3,4,5,6,7"
60 },
61 {
62 "PublicDescription": "Number of times we could not allocate Lock Buffer.",
63 "EventCode": "0x54",
64 "Counter": "0,1,2,3",
65 "UMask": "0x40",
66 "EventName": "TX_MEM.HLE_ELISION_BUFFER_FULL",
67 "SampleAfterValue": "2000003",
68 "BriefDescription": "Number of times HLE lock could not be elided due to ElisionBufferAvailable being zero.",
69 "CounterHTOff": "0,1,2,3,4,5,6,7"
70 },
71 {
4 "EventCode": "0x5d", 72 "EventCode": "0x5d",
5 "Counter": "0,1,2,3", 73 "Counter": "0,1,2,3",
6 "UMask": "0x1", 74 "UMask": "0x1",
@@ -10,7 +78,7 @@
10 "CounterHTOff": "0,1,2,3,4,5,6,7" 78 "CounterHTOff": "0,1,2,3,4,5,6,7"
11 }, 79 },
12 { 80 {
13 "PublicDescription": "Unfriendly TSX abort triggered by a vzeroupper instruction.", 81 "PublicDescription": "Unfriendly TSX abort triggered by a vzeroupper instruction.",
14 "EventCode": "0x5d", 82 "EventCode": "0x5d",
15 "Counter": "0,1,2,3", 83 "Counter": "0,1,2,3",
16 "UMask": "0x2", 84 "UMask": "0x2",
@@ -50,7 +118,77 @@
50 "CounterHTOff": "0,1,2,3,4,5,6,7" 118 "CounterHTOff": "0,1,2,3,4,5,6,7"
51 }, 119 },
52 { 120 {
53 "PublicDescription": "Number of times we entered an HLE region\n does not count nested transactions.", 121 "EventCode": "0x60",
122 "Counter": "0,1,2,3",
123 "UMask": "0x10",
124 "EventName": "OFFCORE_REQUESTS_OUTSTANDING.L3_MISS_DEMAND_DATA_RD",
125 "SampleAfterValue": "2000003",
126 "BriefDescription": "Counts number of Offcore outstanding Demand Data Read requests that miss L3 cache in the superQ every cycle.",
127 "CounterHTOff": "0,1,2,3,4,5,6,7"
128 },
129 {
130 "EventCode": "0x60",
131 "Counter": "0,1,2,3",
132 "UMask": "0x10",
133 "EventName": "OFFCORE_REQUESTS_OUTSTANDING.CYCLES_WITH_L3_MISS_DEMAND_DATA_RD",
134 "SampleAfterValue": "2000003",
135 "BriefDescription": "Cycles with at least 1 Demand Data Read requests who miss L3 cache in the superQ.",
136 "CounterMask": "1",
137 "CounterHTOff": "0,1,2,3,4,5,6,7"
138 },
139 {
140 "EventCode": "0x60",
141 "Counter": "0,1,2,3",
142 "UMask": "0x10",
143 "EventName": "OFFCORE_REQUESTS_OUTSTANDING.L3_MISS_DEMAND_DATA_RD_GE_6",
144 "SampleAfterValue": "2000003",
145 "BriefDescription": "Cycles with at least 6 Demand Data Read requests that miss L3 cache in the superQ.",
146 "CounterMask": "6",
147 "CounterHTOff": "0,1,2,3,4,5,6,7"
148 },
149 {
150 "EventCode": "0xA3",
151 "Counter": "0,1,2,3",
152 "UMask": "0x2",
153 "EventName": "CYCLE_ACTIVITY.CYCLES_L3_MISS",
154 "SampleAfterValue": "2000003",
155 "BriefDescription": "Cycles while L3 cache miss demand load is outstanding.",
156 "CounterMask": "2",
157 "CounterHTOff": "0,1,2,3,4,5,6,7"
158 },
159 {
160 "EventCode": "0xA3",
161 "Counter": "0,1,2,3",
162 "UMask": "0x6",
163 "EventName": "CYCLE_ACTIVITY.STALLS_L3_MISS",
164 "SampleAfterValue": "2000003",
165 "BriefDescription": "Execution stalls while L3 cache miss demand load is outstanding.",
166 "CounterMask": "6",
167 "CounterHTOff": "0,1,2,3,4,5,6,7"
168 },
169 {
170 "PublicDescription": "Demand Data Read requests who miss L3 cache.",
171 "EventCode": "0xB0",
172 "Counter": "0,1,2,3",
173 "UMask": "0x10",
174 "EventName": "OFFCORE_REQUESTS.L3_MISS_DEMAND_DATA_RD",
175 "SampleAfterValue": "100003",
176 "BriefDescription": "Demand Data Read requests who miss L3 cache",
177 "CounterHTOff": "0,1,2,3,4,5,6,7"
178 },
179 {
180 "PublicDescription": "Counts the number of memory ordering Machine Clears detected. Memory Ordering Machine Clears can result from one of the following:a. memory disambiguation,b. external snoop, orc. cross SMT-HW-thread snoop (stores) hitting load buffer.",
181 "EventCode": "0xC3",
182 "Counter": "0,1,2,3",
183 "UMask": "0x2",
184 "Errata": "SKL089",
185 "EventName": "MACHINE_CLEARS.MEMORY_ORDERING",
186 "SampleAfterValue": "100003",
187 "BriefDescription": "Counts the number of machine clears due to memory order conflicts.",
188 "CounterHTOff": "0,1,2,3,4,5,6,7"
189 },
190 {
191 "PublicDescription": "Number of times we entered an HLE region. Does not count nested transactions.",
54 "EventCode": "0xC8", 192 "EventCode": "0xC8",
55 "Counter": "0,1,2,3", 193 "Counter": "0,1,2,3",
56 "UMask": "0x1", 194 "UMask": "0x1",
@@ -71,7 +209,7 @@
71 }, 209 },
72 { 210 {
73 "PEBS": "1", 211 "PEBS": "1",
74 "PublicDescription": "Number of times HLE abort was triggered.", 212 "PublicDescription": "Number of times HLE abort was triggered. (PEBS)",
75 "EventCode": "0xC8", 213 "EventCode": "0xC8",
76 "Counter": "0,1,2,3", 214 "Counter": "0,1,2,3",
77 "UMask": "0x4", 215 "UMask": "0x4",
@@ -99,13 +237,12 @@
99 "CounterHTOff": "0,1,2,3,4,5,6,7" 237 "CounterHTOff": "0,1,2,3,4,5,6,7"
100 }, 238 },
101 { 239 {
102 "PublicDescription": "Number of times an HLE execution aborted due to HLE-unfriendly instructions and certain unfriendly events (such as AD assists etc.).",
103 "EventCode": "0xC8", 240 "EventCode": "0xC8",
104 "Counter": "0,1,2,3", 241 "Counter": "0,1,2,3",
105 "UMask": "0x20", 242 "UMask": "0x20",
106 "EventName": "HLE_RETIRED.ABORTED_UNFRIENDLY", 243 "EventName": "HLE_RETIRED.ABORTED_UNFRIENDLY",
107 "SampleAfterValue": "2000003", 244 "SampleAfterValue": "2000003",
108 "BriefDescription": "Number of times an HLE execution aborted due to HLE-unfriendly instructions and certain unfriendly events (such as AD assists etc.). ", 245 "BriefDescription": "Number of times an HLE execution aborted due to HLE-unfriendly instructions and certain unfriendly events (such as AD assists etc.).",
109 "CounterHTOff": "0,1,2,3,4,5,6,7" 246 "CounterHTOff": "0,1,2,3,4,5,6,7"
110 }, 247 },
111 { 248 {
@@ -128,7 +265,7 @@
128 "CounterHTOff": "0,1,2,3,4,5,6,7" 265 "CounterHTOff": "0,1,2,3,4,5,6,7"
129 }, 266 },
130 { 267 {
131 "PublicDescription": "Number of times we entered an RTM region\n does not count nested transactions.", 268 "PublicDescription": "Number of times we entered an RTM region. Does not count nested transactions.",
132 "EventCode": "0xC9", 269 "EventCode": "0xC9",
133 "Counter": "0,1,2,3", 270 "Counter": "0,1,2,3",
134 "UMask": "0x1", 271 "UMask": "0x1",
@@ -149,7 +286,7 @@
149 }, 286 },
150 { 287 {
151 "PEBS": "1", 288 "PEBS": "1",
152 "PublicDescription": "Number of times RTM abort was triggered.", 289 "PublicDescription": "Number of times RTM abort was triggered. (PEBS)",
153 "EventCode": "0xC9", 290 "EventCode": "0xC9",
154 "Counter": "0,1,2,3", 291 "Counter": "0,1,2,3",
155 "UMask": "0x4", 292 "UMask": "0x4",
@@ -208,17 +345,6 @@
208 "CounterHTOff": "0,1,2,3,4,5,6,7" 345 "CounterHTOff": "0,1,2,3,4,5,6,7"
209 }, 346 },
210 { 347 {
211 "PublicDescription": "This event counts the number of memory ordering Machine Clears detected. Memory Ordering Machine Clears can result from one of the following:\n1. memory disambiguation,\n2. external snoop, or\n3. cross SMT-HW-thread snoop (stores) hitting load buffer.",
212 "EventCode": "0xC3",
213 "Counter": "0,1,2,3",
214 "UMask": "0x2",
215 "Errata": "SKL089",
216 "EventName": "MACHINE_CLEARS.MEMORY_ORDERING",
217 "SampleAfterValue": "100003",
218 "BriefDescription": "Counts the number of machine clears due to memory order conflicts.",
219 "CounterHTOff": "0,1,2,3,4,5,6,7"
220 },
221 {
222 "PEBS": "2", 348 "PEBS": "2",
223 "PublicDescription": "Counts loads when the latency from first dispatch to completion is greater than 4 cycles. Reported latency may be longer than just the memory latency.", 349 "PublicDescription": "Counts loads when the latency from first dispatch to completion is greater than 4 cycles. Reported latency may be longer than just the memory latency.",
224 "EventCode": "0xCD", 350 "EventCode": "0xCD",
@@ -331,1718 +457,7 @@
331 "CounterHTOff": "0,1,2,3" 457 "CounterHTOff": "0,1,2,3"
332 }, 458 },
333 { 459 {
334 "PublicDescription": "Number of times a TSX line had a cache conflict.", 460 "PublicDescription": "tbd Offcore response can be programmed only with a specific pair of event select and counter MSR, and with specific event codes and predefine mask bit value in a dedicated MSR to specify attributes of the offcore transaction.",
335 "EventCode": "0x54",
336 "Counter": "0,1,2,3",
337 "UMask": "0x1",
338 "EventName": "TX_MEM.ABORT_CONFLICT",
339 "SampleAfterValue": "2000003",
340 "BriefDescription": "Number of times a transactional abort was signaled due to a data conflict on a transactionally accessed address",
341 "CounterHTOff": "0,1,2,3,4,5,6,7"
342 },
343 {
344 "EventCode": "0x54",
345 "Counter": "0,1,2,3",
346 "UMask": "0x2",
347 "EventName": "TX_MEM.ABORT_CAPACITY",
348 "SampleAfterValue": "2000003",
349 "BriefDescription": "Number of times a transactional abort was signaled due to a data capacity limitation for transactional reads or writes.",
350 "CounterHTOff": "0,1,2,3,4,5,6,7"
351 },
352 {
353 "PublicDescription": "Number of times a TSX Abort was triggered due to a non-release/commit store to lock.",
354 "EventCode": "0x54",
355 "Counter": "0,1,2,3",
356 "UMask": "0x4",
357 "EventName": "TX_MEM.ABORT_HLE_STORE_TO_ELIDED_LOCK",
358 "SampleAfterValue": "2000003",
359 "BriefDescription": "Number of times a HLE transactional region aborted due to a non XRELEASE prefixed instruction writing to an elided lock in the elision buffer",
360 "CounterHTOff": "0,1,2,3,4,5,6,7"
361 },
362 {
363 "PublicDescription": "Number of times a TSX Abort was triggered due to commit but Lock Buffer not empty.",
364 "EventCode": "0x54",
365 "Counter": "0,1,2,3",
366 "UMask": "0x8",
367 "EventName": "TX_MEM.ABORT_HLE_ELISION_BUFFER_NOT_EMPTY",
368 "SampleAfterValue": "2000003",
369 "BriefDescription": "Number of times an HLE transactional execution aborted due to NoAllocatedElisionBuffer being non-zero.",
370 "CounterHTOff": "0,1,2,3,4,5,6,7"
371 },
372 {
373 "PublicDescription": "Number of times a TSX Abort was triggered due to release/commit but data and address mismatch.",
374 "EventCode": "0x54",
375 "Counter": "0,1,2,3",
376 "UMask": "0x10",
377 "EventName": "TX_MEM.ABORT_HLE_ELISION_BUFFER_MISMATCH",
378 "SampleAfterValue": "2000003",
379 "BriefDescription": "Number of times an HLE transactional execution aborted due to XRELEASE lock not satisfying the address and value requirements in the elision buffer",
380 "CounterHTOff": "0,1,2,3,4,5,6,7"
381 },
382 {
383 "PublicDescription": "Number of times a TSX Abort was triggered due to attempting an unsupported alignment from Lock Buffer.",
384 "EventCode": "0x54",
385 "Counter": "0,1,2,3",
386 "UMask": "0x20",
387 "EventName": "TX_MEM.ABORT_HLE_ELISION_BUFFER_UNSUPPORTED_ALIGNMENT",
388 "SampleAfterValue": "2000003",
389 "BriefDescription": "Number of times an HLE transactional execution aborted due to an unsupported read alignment from the elision buffer.",
390 "CounterHTOff": "0,1,2,3,4,5,6,7"
391 },
392 {
393 "PublicDescription": "Number of times we could not allocate Lock Buffer.",
394 "EventCode": "0x54",
395 "Counter": "0,1,2,3",
396 "UMask": "0x40",
397 "EventName": "TX_MEM.HLE_ELISION_BUFFER_FULL",
398 "SampleAfterValue": "2000003",
399 "BriefDescription": "Number of times HLE lock could not be elided due to ElisionBufferAvailable being zero.",
400 "CounterHTOff": "0,1,2,3,4,5,6,7"
401 },
402 {
403 "PublicDescription": "Demand Data Read requests who miss L3 cache.",
404 "EventCode": "0xB0",
405 "Counter": "0,1,2,3",
406 "UMask": "0x10",
407 "EventName": "OFFCORE_REQUESTS.L3_MISS_DEMAND_DATA_RD",
408 "SampleAfterValue": "100003",
409 "BriefDescription": "Demand Data Read requests who miss L3 cache",
410 "CounterHTOff": "0,1,2,3,4,5,6,7"
411 },
412 {
413 "EventCode": "0x60",
414 "Counter": "0,1,2,3",
415 "UMask": "0x10",
416 "EventName": "OFFCORE_REQUESTS_OUTSTANDING.L3_MISS_DEMAND_DATA_RD",
417 "SampleAfterValue": "2000003",
418 "BriefDescription": "Counts number of Offcore outstanding Demand Data Read requests that miss L3 cache in the superQ every cycle.",
419 "CounterHTOff": "0,1,2,3,4,5,6,7"
420 },
421 {
422 "EventCode": "0xA3",
423 "Counter": "0,1,2,3",
424 "UMask": "0x2",
425 "EventName": "CYCLE_ACTIVITY.CYCLES_L3_MISS",
426 "SampleAfterValue": "2000003",
427 "BriefDescription": "Cycles while L3 cache miss demand load is outstanding.",
428 "CounterMask": "2",
429 "CounterHTOff": "0,1,2,3,4,5,6,7"
430 },
431 {
432 "EventCode": "0xA3",
433 "Counter": "0,1,2,3",
434 "UMask": "0x6",
435 "EventName": "CYCLE_ACTIVITY.STALLS_L3_MISS",
436 "SampleAfterValue": "2000003",
437 "BriefDescription": "Execution stalls while L3 cache miss demand load is outstanding.",
438 "CounterMask": "6",
439 "CounterHTOff": "0,1,2,3,4,5,6,7"
440 },
441 {
442 "EventCode": "0x60",
443 "Counter": "0,1,2,3",
444 "UMask": "0x10",
445 "EventName": "OFFCORE_REQUESTS_OUTSTANDING.CYCLES_WITH_L3_MISS_DEMAND_DATA_RD",
446 "SampleAfterValue": "2000003",
447 "BriefDescription": "Cycles with at least 1 Demand Data Read requests who miss L3 cache in the superQ.",
448 "CounterMask": "1",
449 "CounterHTOff": "0,1,2,3,4,5,6,7"
450 },
451 {
452 "EventCode": "0x60",
453 "Counter": "0,1,2,3",
454 "UMask": "0x10",
455 "EventName": "OFFCORE_REQUESTS_OUTSTANDING.L3_MISS_DEMAND_DATA_RD_GE_6",
456 "SampleAfterValue": "2000003",
457 "BriefDescription": "Cycles with at least 6 Demand Data Read requests that miss L3 cache in the superQ.",
458 "CounterMask": "6",
459 "CounterHTOff": "0,1,2,3,4,5,6,7"
460 },
461 {
462 "EventCode": "0xB7, 0xBB",
463 "MSRValue": "0x3ffc008000 ",
464 "Counter": "0,1,2,3",
465 "UMask": "0x1",
466 "EventName": "OFFCORE_RESPONSE.OTHER.L3_MISS.ANY_SNOOP",
467 "MSRIndex": "0x1a6,0x1a7",
468 "SampleAfterValue": "100003",
469 "BriefDescription": "OTHER & L3_MISS & ANY_SNOOP",
470 "Offcore": "1",
471 "CounterHTOff": "0,1,2,3"
472 },
473 {
474 "EventCode": "0xB7, 0xBB",
475 "MSRValue": "0x203c008000 ",
476 "Counter": "0,1,2,3",
477 "UMask": "0x1",
478 "EventName": "OFFCORE_RESPONSE.OTHER.L3_MISS.SNOOP_NON_DRAM",
479 "MSRIndex": "0x1a6,0x1a7",
480 "SampleAfterValue": "100003",
481 "BriefDescription": "OTHER & L3_MISS & SNOOP_NON_DRAM",
482 "Offcore": "1",
483 "CounterHTOff": "0,1,2,3"
484 },
485 {
486 "EventCode": "0xB7, 0xBB",
487 "MSRValue": "0x103c008000 ",
488 "Counter": "0,1,2,3",
489 "UMask": "0x1",
490 "EventName": "OFFCORE_RESPONSE.OTHER.L3_MISS.SNOOP_HITM",
491 "MSRIndex": "0x1a6,0x1a7",
492 "SampleAfterValue": "100003",
493 "BriefDescription": "OTHER & L3_MISS & SNOOP_HITM",
494 "Offcore": "1",
495 "CounterHTOff": "0,1,2,3"
496 },
497 {
498 "EventCode": "0xB7, 0xBB",
499 "MSRValue": "0x043c008000 ",
500 "Counter": "0,1,2,3",
501 "UMask": "0x1",
502 "EventName": "OFFCORE_RESPONSE.OTHER.L3_MISS.SNOOP_HIT_NO_FWD",
503 "MSRIndex": "0x1a6,0x1a7",
504 "SampleAfterValue": "100003",
505 "BriefDescription": "OTHER & L3_MISS & SNOOP_HIT_NO_FWD",
506 "Offcore": "1",
507 "CounterHTOff": "0,1,2,3"
508 },
509 {
510 "EventCode": "0xB7, 0xBB",
511 "MSRValue": "0x023c008000 ",
512 "Counter": "0,1,2,3",
513 "UMask": "0x1",
514 "EventName": "OFFCORE_RESPONSE.OTHER.L3_MISS.SNOOP_MISS",
515 "MSRIndex": "0x1a6,0x1a7",
516 "SampleAfterValue": "100003",
517 "BriefDescription": "OTHER & L3_MISS & SNOOP_MISS",
518 "Offcore": "1",
519 "CounterHTOff": "0,1,2,3"
520 },
521 {
522 "EventCode": "0xB7, 0xBB",
523 "MSRValue": "0x013c008000 ",
524 "Counter": "0,1,2,3",
525 "UMask": "0x1",
526 "EventName": "OFFCORE_RESPONSE.OTHER.L3_MISS.SNOOP_NOT_NEEDED",
527 "MSRIndex": "0x1a6,0x1a7",
528 "SampleAfterValue": "100003",
529 "BriefDescription": "OTHER & L3_MISS & SNOOP_NOT_NEEDED",
530 "Offcore": "1",
531 "CounterHTOff": "0,1,2,3"
532 },
533 {
534 "EventCode": "0xB7, 0xBB",
535 "MSRValue": "0x00bc008000 ",
536 "Counter": "0,1,2,3",
537 "UMask": "0x1",
538 "EventName": "OFFCORE_RESPONSE.OTHER.L3_MISS.SNOOP_NONE",
539 "MSRIndex": "0x1a6,0x1a7",
540 "SampleAfterValue": "100003",
541 "BriefDescription": "OTHER & L3_MISS & SNOOP_NONE",
542 "Offcore": "1",
543 "CounterHTOff": "0,1,2,3"
544 },
545 {
546 "EventCode": "0xB7, 0xBB",
547 "MSRValue": "0x007c008000 ",
548 "Counter": "0,1,2,3",
549 "UMask": "0x1",
550 "EventName": "OFFCORE_RESPONSE.OTHER.L3_MISS.SPL_HIT",
551 "MSRIndex": "0x1a6,0x1a7",
552 "SampleAfterValue": "100003",
553 "BriefDescription": "OTHER & L3_MISS & SPL_HIT",
554 "Offcore": "1",
555 "CounterHTOff": "0,1,2,3"
556 },
557 {
558 "EventCode": "0xB7, 0xBB",
559 "MSRValue": "0x3fc4008000 ",
560 "Counter": "0,1,2,3",
561 "UMask": "0x1",
562 "EventName": "OFFCORE_RESPONSE.OTHER.L3_MISS_LOCAL_DRAM.ANY_SNOOP",
563 "MSRIndex": "0x1a6,0x1a7",
564 "SampleAfterValue": "100003",
565 "BriefDescription": "OTHER & L3_MISS_LOCAL_DRAM & ANY_SNOOP",
566 "Offcore": "1",
567 "CounterHTOff": "0,1,2,3"
568 },
569 {
570 "EventCode": "0xB7, 0xBB",
571 "MSRValue": "0x2004008000 ",
572 "Counter": "0,1,2,3",
573 "UMask": "0x1",
574 "EventName": "OFFCORE_RESPONSE.OTHER.L3_MISS_LOCAL_DRAM.SNOOP_NON_DRAM",
575 "MSRIndex": "0x1a6,0x1a7",
576 "SampleAfterValue": "100003",
577 "BriefDescription": "OTHER & L3_MISS_LOCAL_DRAM & SNOOP_NON_DRAM",
578 "Offcore": "1",
579 "CounterHTOff": "0,1,2,3"
580 },
581 {
582 "EventCode": "0xB7, 0xBB",
583 "MSRValue": "0x1004008000 ",
584 "Counter": "0,1,2,3",
585 "UMask": "0x1",
586 "EventName": "OFFCORE_RESPONSE.OTHER.L3_MISS_LOCAL_DRAM.SNOOP_HITM",
587 "MSRIndex": "0x1a6,0x1a7",
588 "SampleAfterValue": "100003",
589 "BriefDescription": "OTHER & L3_MISS_LOCAL_DRAM & SNOOP_HITM",
590 "Offcore": "1",
591 "CounterHTOff": "0,1,2,3"
592 },
593 {
594 "EventCode": "0xB7, 0xBB",
595 "MSRValue": "0x0404008000 ",
596 "Counter": "0,1,2,3",
597 "UMask": "0x1",
598 "EventName": "OFFCORE_RESPONSE.OTHER.L3_MISS_LOCAL_DRAM.SNOOP_HIT_NO_FWD",
599 "MSRIndex": "0x1a6,0x1a7",
600 "SampleAfterValue": "100003",
601 "BriefDescription": "OTHER & L3_MISS_LOCAL_DRAM & SNOOP_HIT_NO_FWD",
602 "Offcore": "1",
603 "CounterHTOff": "0,1,2,3"
604 },
605 {
606 "EventCode": "0xB7, 0xBB",
607 "MSRValue": "0x0204008000 ",
608 "Counter": "0,1,2,3",
609 "UMask": "0x1",
610 "EventName": "OFFCORE_RESPONSE.OTHER.L3_MISS_LOCAL_DRAM.SNOOP_MISS",
611 "MSRIndex": "0x1a6,0x1a7",
612 "SampleAfterValue": "100003",
613 "BriefDescription": "OTHER & L3_MISS_LOCAL_DRAM & SNOOP_MISS",
614 "Offcore": "1",
615 "CounterHTOff": "0,1,2,3"
616 },
617 {
618 "EventCode": "0xB7, 0xBB",
619 "MSRValue": "0x0104008000 ",
620 "Counter": "0,1,2,3",
621 "UMask": "0x1",
622 "EventName": "OFFCORE_RESPONSE.OTHER.L3_MISS_LOCAL_DRAM.SNOOP_NOT_NEEDED",
623 "MSRIndex": "0x1a6,0x1a7",
624 "SampleAfterValue": "100003",
625 "BriefDescription": "OTHER & L3_MISS_LOCAL_DRAM & SNOOP_NOT_NEEDED",
626 "Offcore": "1",
627 "CounterHTOff": "0,1,2,3"
628 },
629 {
630 "EventCode": "0xB7, 0xBB",
631 "MSRValue": "0x0084008000 ",
632 "Counter": "0,1,2,3",
633 "UMask": "0x1",
634 "EventName": "OFFCORE_RESPONSE.OTHER.L3_MISS_LOCAL_DRAM.SNOOP_NONE",
635 "MSRIndex": "0x1a6,0x1a7",
636 "SampleAfterValue": "100003",
637 "BriefDescription": "OTHER & L3_MISS_LOCAL_DRAM & SNOOP_NONE",
638 "Offcore": "1",
639 "CounterHTOff": "0,1,2,3"
640 },
641 {
642 "EventCode": "0xB7, 0xBB",
643 "MSRValue": "0x0044008000 ",
644 "Counter": "0,1,2,3",
645 "UMask": "0x1",
646 "EventName": "OFFCORE_RESPONSE.OTHER.L3_MISS_LOCAL_DRAM.SPL_HIT",
647 "MSRIndex": "0x1a6,0x1a7",
648 "SampleAfterValue": "100003",
649 "BriefDescription": "OTHER & L3_MISS_LOCAL_DRAM & SPL_HIT",
650 "Offcore": "1",
651 "CounterHTOff": "0,1,2,3"
652 },
653 {
654 "EventCode": "0xB7, 0xBB",
655 "MSRValue": "0x2000408000 ",
656 "Counter": "0,1,2,3",
657 "UMask": "0x1",
658 "EventName": "OFFCORE_RESPONSE.OTHER.L4_HIT_LOCAL_L4.SNOOP_NON_DRAM",
659 "MSRIndex": "0x1a6,0x1a7",
660 "SampleAfterValue": "100003",
661 "BriefDescription": "OTHER & L4_HIT_LOCAL_L4 & SNOOP_NON_DRAM",
662 "Offcore": "1",
663 "CounterHTOff": "0,1,2,3"
664 },
665 {
666 "EventCode": "0xB7, 0xBB",
667 "MSRValue": "0x20001c8000 ",
668 "Counter": "0,1,2,3",
669 "UMask": "0x1",
670 "EventName": "OFFCORE_RESPONSE.OTHER.L3_HIT.SNOOP_NON_DRAM",
671 "MSRIndex": "0x1a6,0x1a7",
672 "SampleAfterValue": "100003",
673 "BriefDescription": "OTHER & L3_HIT & SNOOP_NON_DRAM",
674 "Offcore": "1",
675 "CounterHTOff": "0,1,2,3"
676 },
677 {
678 "EventCode": "0xB7, 0xBB",
679 "MSRValue": "0x2000108000 ",
680 "Counter": "0,1,2,3",
681 "UMask": "0x1",
682 "EventName": "OFFCORE_RESPONSE.OTHER.L3_HIT_S.SNOOP_NON_DRAM",
683 "MSRIndex": "0x1a6,0x1a7",
684 "SampleAfterValue": "100003",
685 "BriefDescription": "OTHER & L3_HIT_S & SNOOP_NON_DRAM",
686 "Offcore": "1",
687 "CounterHTOff": "0,1,2,3"
688 },
689 {
690 "EventCode": "0xB7, 0xBB",
691 "MSRValue": "0x2000088000 ",
692 "Counter": "0,1,2,3",
693 "UMask": "0x1",
694 "EventName": "OFFCORE_RESPONSE.OTHER.L3_HIT_E.SNOOP_NON_DRAM",
695 "MSRIndex": "0x1a6,0x1a7",
696 "SampleAfterValue": "100003",
697 "BriefDescription": "OTHER & L3_HIT_E & SNOOP_NON_DRAM",
698 "Offcore": "1",
699 "CounterHTOff": "0,1,2,3"
700 },
701 {
702 "EventCode": "0xB7, 0xBB",
703 "MSRValue": "0x2000048000 ",
704 "Counter": "0,1,2,3",
705 "UMask": "0x1",
706 "EventName": "OFFCORE_RESPONSE.OTHER.L3_HIT_M.SNOOP_NON_DRAM",
707 "MSRIndex": "0x1a6,0x1a7",
708 "SampleAfterValue": "100003",
709 "BriefDescription": "OTHER & L3_HIT_M & SNOOP_NON_DRAM",
710 "Offcore": "1",
711 "CounterHTOff": "0,1,2,3"
712 },
713 {
714 "EventCode": "0xB7, 0xBB",
715 "MSRValue": "0x2000028000 ",
716 "Counter": "0,1,2,3",
717 "UMask": "0x1",
718 "EventName": "OFFCORE_RESPONSE.OTHER.SUPPLIER_NONE.SNOOP_NON_DRAM",
719 "MSRIndex": "0x1a6,0x1a7",
720 "SampleAfterValue": "100003",
721 "BriefDescription": "OTHER & SUPPLIER_NONE & SNOOP_NON_DRAM",
722 "Offcore": "1",
723 "CounterHTOff": "0,1,2,3"
724 },
725 {
726 "EventCode": "0xB7, 0xBB",
727 "MSRValue": "0x3ffc000800 ",
728 "Counter": "0,1,2,3",
729 "UMask": "0x1",
730 "EventName": "OFFCORE_RESPONSE.STREAMING_STORES.L3_MISS.ANY_SNOOP",
731 "MSRIndex": "0x1a6,0x1a7",
732 "SampleAfterValue": "100003",
733 "BriefDescription": "STREAMING_STORES & L3_MISS & ANY_SNOOP",
734 "Offcore": "1",
735 "CounterHTOff": "0,1,2,3"
736 },
737 {
738 "EventCode": "0xB7, 0xBB",
739 "MSRValue": "0x203c000800 ",
740 "Counter": "0,1,2,3",
741 "UMask": "0x1",
742 "EventName": "OFFCORE_RESPONSE.STREAMING_STORES.L3_MISS.SNOOP_NON_DRAM",
743 "MSRIndex": "0x1a6,0x1a7",
744 "SampleAfterValue": "100003",
745 "BriefDescription": "STREAMING_STORES & L3_MISS & SNOOP_NON_DRAM",
746 "Offcore": "1",
747 "CounterHTOff": "0,1,2,3"
748 },
749 {
750 "EventCode": "0xB7, 0xBB",
751 "MSRValue": "0x103c000800 ",
752 "Counter": "0,1,2,3",
753 "UMask": "0x1",
754 "EventName": "OFFCORE_RESPONSE.STREAMING_STORES.L3_MISS.SNOOP_HITM",
755 "MSRIndex": "0x1a6,0x1a7",
756 "SampleAfterValue": "100003",
757 "BriefDescription": "STREAMING_STORES & L3_MISS & SNOOP_HITM",
758 "Offcore": "1",
759 "CounterHTOff": "0,1,2,3"
760 },
761 {
762 "EventCode": "0xB7, 0xBB",
763 "MSRValue": "0x043c000800 ",
764 "Counter": "0,1,2,3",
765 "UMask": "0x1",
766 "EventName": "OFFCORE_RESPONSE.STREAMING_STORES.L3_MISS.SNOOP_HIT_NO_FWD",
767 "MSRIndex": "0x1a6,0x1a7",
768 "SampleAfterValue": "100003",
769 "BriefDescription": "STREAMING_STORES & L3_MISS & SNOOP_HIT_NO_FWD",
770 "Offcore": "1",
771 "CounterHTOff": "0,1,2,3"
772 },
773 {
774 "EventCode": "0xB7, 0xBB",
775 "MSRValue": "0x023c000800 ",
776 "Counter": "0,1,2,3",
777 "UMask": "0x1",
778 "EventName": "OFFCORE_RESPONSE.STREAMING_STORES.L3_MISS.SNOOP_MISS",
779 "MSRIndex": "0x1a6,0x1a7",
780 "SampleAfterValue": "100003",
781 "BriefDescription": "STREAMING_STORES & L3_MISS & SNOOP_MISS",
782 "Offcore": "1",
783 "CounterHTOff": "0,1,2,3"
784 },
785 {
786 "EventCode": "0xB7, 0xBB",
787 "MSRValue": "0x013c000800 ",
788 "Counter": "0,1,2,3",
789 "UMask": "0x1",
790 "EventName": "OFFCORE_RESPONSE.STREAMING_STORES.L3_MISS.SNOOP_NOT_NEEDED",
791 "MSRIndex": "0x1a6,0x1a7",
792 "SampleAfterValue": "100003",
793 "BriefDescription": "STREAMING_STORES & L3_MISS & SNOOP_NOT_NEEDED",
794 "Offcore": "1",
795 "CounterHTOff": "0,1,2,3"
796 },
797 {
798 "EventCode": "0xB7, 0xBB",
799 "MSRValue": "0x00bc000800 ",
800 "Counter": "0,1,2,3",
801 "UMask": "0x1",
802 "EventName": "OFFCORE_RESPONSE.STREAMING_STORES.L3_MISS.SNOOP_NONE",
803 "MSRIndex": "0x1a6,0x1a7",
804 "SampleAfterValue": "100003",
805 "BriefDescription": "STREAMING_STORES & L3_MISS & SNOOP_NONE",
806 "Offcore": "1",
807 "CounterHTOff": "0,1,2,3"
808 },
809 {
810 "EventCode": "0xB7, 0xBB",
811 "MSRValue": "0x007c000800 ",
812 "Counter": "0,1,2,3",
813 "UMask": "0x1",
814 "EventName": "OFFCORE_RESPONSE.STREAMING_STORES.L3_MISS.SPL_HIT",
815 "MSRIndex": "0x1a6,0x1a7",
816 "SampleAfterValue": "100003",
817 "BriefDescription": "STREAMING_STORES & L3_MISS & SPL_HIT",
818 "Offcore": "1",
819 "CounterHTOff": "0,1,2,3"
820 },
821 {
822 "EventCode": "0xB7, 0xBB",
823 "MSRValue": "0x3fc4000800 ",
824 "Counter": "0,1,2,3",
825 "UMask": "0x1",
826 "EventName": "OFFCORE_RESPONSE.STREAMING_STORES.L3_MISS_LOCAL_DRAM.ANY_SNOOP",
827 "MSRIndex": "0x1a6,0x1a7",
828 "SampleAfterValue": "100003",
829 "BriefDescription": "STREAMING_STORES & L3_MISS_LOCAL_DRAM & ANY_SNOOP",
830 "Offcore": "1",
831 "CounterHTOff": "0,1,2,3"
832 },
833 {
834 "EventCode": "0xB7, 0xBB",
835 "MSRValue": "0x2004000800 ",
836 "Counter": "0,1,2,3",
837 "UMask": "0x1",
838 "EventName": "OFFCORE_RESPONSE.STREAMING_STORES.L3_MISS_LOCAL_DRAM.SNOOP_NON_DRAM",
839 "MSRIndex": "0x1a6,0x1a7",
840 "SampleAfterValue": "100003",
841 "BriefDescription": "STREAMING_STORES & L3_MISS_LOCAL_DRAM & SNOOP_NON_DRAM",
842 "Offcore": "1",
843 "CounterHTOff": "0,1,2,3"
844 },
845 {
846 "EventCode": "0xB7, 0xBB",
847 "MSRValue": "0x1004000800 ",
848 "Counter": "0,1,2,3",
849 "UMask": "0x1",
850 "EventName": "OFFCORE_RESPONSE.STREAMING_STORES.L3_MISS_LOCAL_DRAM.SNOOP_HITM",
851 "MSRIndex": "0x1a6,0x1a7",
852 "SampleAfterValue": "100003",
853 "BriefDescription": "STREAMING_STORES & L3_MISS_LOCAL_DRAM & SNOOP_HITM",
854 "Offcore": "1",
855 "CounterHTOff": "0,1,2,3"
856 },
857 {
858 "EventCode": "0xB7, 0xBB",
859 "MSRValue": "0x0404000800 ",
860 "Counter": "0,1,2,3",
861 "UMask": "0x1",
862 "EventName": "OFFCORE_RESPONSE.STREAMING_STORES.L3_MISS_LOCAL_DRAM.SNOOP_HIT_NO_FWD",
863 "MSRIndex": "0x1a6,0x1a7",
864 "SampleAfterValue": "100003",
865 "BriefDescription": "STREAMING_STORES & L3_MISS_LOCAL_DRAM & SNOOP_HIT_NO_FWD",
866 "Offcore": "1",
867 "CounterHTOff": "0,1,2,3"
868 },
869 {
870 "EventCode": "0xB7, 0xBB",
871 "MSRValue": "0x0204000800 ",
872 "Counter": "0,1,2,3",
873 "UMask": "0x1",
874 "EventName": "OFFCORE_RESPONSE.STREAMING_STORES.L3_MISS_LOCAL_DRAM.SNOOP_MISS",
875 "MSRIndex": "0x1a6,0x1a7",
876 "SampleAfterValue": "100003",
877 "BriefDescription": "STREAMING_STORES & L3_MISS_LOCAL_DRAM & SNOOP_MISS",
878 "Offcore": "1",
879 "CounterHTOff": "0,1,2,3"
880 },
881 {
882 "EventCode": "0xB7, 0xBB",
883 "MSRValue": "0x0104000800 ",
884 "Counter": "0,1,2,3",
885 "UMask": "0x1",
886 "EventName": "OFFCORE_RESPONSE.STREAMING_STORES.L3_MISS_LOCAL_DRAM.SNOOP_NOT_NEEDED",
887 "MSRIndex": "0x1a6,0x1a7",
888 "SampleAfterValue": "100003",
889 "BriefDescription": "STREAMING_STORES & L3_MISS_LOCAL_DRAM & SNOOP_NOT_NEEDED",
890 "Offcore": "1",
891 "CounterHTOff": "0,1,2,3"
892 },
893 {
894 "EventCode": "0xB7, 0xBB",
895 "MSRValue": "0x0084000800 ",
896 "Counter": "0,1,2,3",
897 "UMask": "0x1",
898 "EventName": "OFFCORE_RESPONSE.STREAMING_STORES.L3_MISS_LOCAL_DRAM.SNOOP_NONE",
899 "MSRIndex": "0x1a6,0x1a7",
900 "SampleAfterValue": "100003",
901 "BriefDescription": "STREAMING_STORES & L3_MISS_LOCAL_DRAM & SNOOP_NONE",
902 "Offcore": "1",
903 "CounterHTOff": "0,1,2,3"
904 },
905 {
906 "EventCode": "0xB7, 0xBB",
907 "MSRValue": "0x0044000800 ",
908 "Counter": "0,1,2,3",
909 "UMask": "0x1",
910 "EventName": "OFFCORE_RESPONSE.STREAMING_STORES.L3_MISS_LOCAL_DRAM.SPL_HIT",
911 "MSRIndex": "0x1a6,0x1a7",
912 "SampleAfterValue": "100003",
913 "BriefDescription": "STREAMING_STORES & L3_MISS_LOCAL_DRAM & SPL_HIT",
914 "Offcore": "1",
915 "CounterHTOff": "0,1,2,3"
916 },
917 {
918 "EventCode": "0xB7, 0xBB",
919 "MSRValue": "0x2000400800 ",
920 "Counter": "0,1,2,3",
921 "UMask": "0x1",
922 "EventName": "OFFCORE_RESPONSE.STREAMING_STORES.L4_HIT_LOCAL_L4.SNOOP_NON_DRAM",
923 "MSRIndex": "0x1a6,0x1a7",
924 "SampleAfterValue": "100003",
925 "BriefDescription": "STREAMING_STORES & L4_HIT_LOCAL_L4 & SNOOP_NON_DRAM",
926 "Offcore": "1",
927 "CounterHTOff": "0,1,2,3"
928 },
929 {
930 "EventCode": "0xB7, 0xBB",
931 "MSRValue": "0x20001c0800 ",
932 "Counter": "0,1,2,3",
933 "UMask": "0x1",
934 "EventName": "OFFCORE_RESPONSE.STREAMING_STORES.L3_HIT.SNOOP_NON_DRAM",
935 "MSRIndex": "0x1a6,0x1a7",
936 "SampleAfterValue": "100003",
937 "BriefDescription": "STREAMING_STORES & L3_HIT & SNOOP_NON_DRAM",
938 "Offcore": "1",
939 "CounterHTOff": "0,1,2,3"
940 },
941 {
942 "EventCode": "0xB7, 0xBB",
943 "MSRValue": "0x2000100800 ",
944 "Counter": "0,1,2,3",
945 "UMask": "0x1",
946 "EventName": "OFFCORE_RESPONSE.STREAMING_STORES.L3_HIT_S.SNOOP_NON_DRAM",
947 "MSRIndex": "0x1a6,0x1a7",
948 "SampleAfterValue": "100003",
949 "BriefDescription": "STREAMING_STORES & L3_HIT_S & SNOOP_NON_DRAM",
950 "Offcore": "1",
951 "CounterHTOff": "0,1,2,3"
952 },
953 {
954 "EventCode": "0xB7, 0xBB",
955 "MSRValue": "0x2000080800 ",
956 "Counter": "0,1,2,3",
957 "UMask": "0x1",
958 "EventName": "OFFCORE_RESPONSE.STREAMING_STORES.L3_HIT_E.SNOOP_NON_DRAM",
959 "MSRIndex": "0x1a6,0x1a7",
960 "SampleAfterValue": "100003",
961 "BriefDescription": "STREAMING_STORES & L3_HIT_E & SNOOP_NON_DRAM",
962 "Offcore": "1",
963 "CounterHTOff": "0,1,2,3"
964 },
965 {
966 "EventCode": "0xB7, 0xBB",
967 "MSRValue": "0x2000040800 ",
968 "Counter": "0,1,2,3",
969 "UMask": "0x1",
970 "EventName": "OFFCORE_RESPONSE.STREAMING_STORES.L3_HIT_M.SNOOP_NON_DRAM",
971 "MSRIndex": "0x1a6,0x1a7",
972 "SampleAfterValue": "100003",
973 "BriefDescription": "STREAMING_STORES & L3_HIT_M & SNOOP_NON_DRAM",
974 "Offcore": "1",
975 "CounterHTOff": "0,1,2,3"
976 },
977 {
978 "EventCode": "0xB7, 0xBB",
979 "MSRValue": "0x2000020800 ",
980 "Counter": "0,1,2,3",
981 "UMask": "0x1",
982 "EventName": "OFFCORE_RESPONSE.STREAMING_STORES.SUPPLIER_NONE.SNOOP_NON_DRAM",
983 "MSRIndex": "0x1a6,0x1a7",
984 "SampleAfterValue": "100003",
985 "BriefDescription": "STREAMING_STORES & SUPPLIER_NONE & SNOOP_NON_DRAM",
986 "Offcore": "1",
987 "CounterHTOff": "0,1,2,3"
988 },
989 {
990 "EventCode": "0xB7, 0xBB",
991 "MSRValue": "0x3ffc000100 ",
992 "Counter": "0,1,2,3",
993 "UMask": "0x1",
994 "EventName": "OFFCORE_RESPONSE.PF_L3_RFO.L3_MISS.ANY_SNOOP",
995 "MSRIndex": "0x1a6,0x1a7",
996 "SampleAfterValue": "100003",
997 "BriefDescription": "PF_L3_RFO & L3_MISS & ANY_SNOOP",
998 "Offcore": "1",
999 "CounterHTOff": "0,1,2,3"
1000 },
1001 {
1002 "EventCode": "0xB7, 0xBB",
1003 "MSRValue": "0x203c000100 ",
1004 "Counter": "0,1,2,3",
1005 "UMask": "0x1",
1006 "EventName": "OFFCORE_RESPONSE.PF_L3_RFO.L3_MISS.SNOOP_NON_DRAM",
1007 "MSRIndex": "0x1a6,0x1a7",
1008 "SampleAfterValue": "100003",
1009 "BriefDescription": "PF_L3_RFO & L3_MISS & SNOOP_NON_DRAM",
1010 "Offcore": "1",
1011 "CounterHTOff": "0,1,2,3"
1012 },
1013 {
1014 "EventCode": "0xB7, 0xBB",
1015 "MSRValue": "0x103c000100 ",
1016 "Counter": "0,1,2,3",
1017 "UMask": "0x1",
1018 "EventName": "OFFCORE_RESPONSE.PF_L3_RFO.L3_MISS.SNOOP_HITM",
1019 "MSRIndex": "0x1a6,0x1a7",
1020 "SampleAfterValue": "100003",
1021 "BriefDescription": "PF_L3_RFO & L3_MISS & SNOOP_HITM",
1022 "Offcore": "1",
1023 "CounterHTOff": "0,1,2,3"
1024 },
1025 {
1026 "EventCode": "0xB7, 0xBB",
1027 "MSRValue": "0x043c000100 ",
1028 "Counter": "0,1,2,3",
1029 "UMask": "0x1",
1030 "EventName": "OFFCORE_RESPONSE.PF_L3_RFO.L3_MISS.SNOOP_HIT_NO_FWD",
1031 "MSRIndex": "0x1a6,0x1a7",
1032 "SampleAfterValue": "100003",
1033 "BriefDescription": "PF_L3_RFO & L3_MISS & SNOOP_HIT_NO_FWD",
1034 "Offcore": "1",
1035 "CounterHTOff": "0,1,2,3"
1036 },
1037 {
1038 "EventCode": "0xB7, 0xBB",
1039 "MSRValue": "0x023c000100 ",
1040 "Counter": "0,1,2,3",
1041 "UMask": "0x1",
1042 "EventName": "OFFCORE_RESPONSE.PF_L3_RFO.L3_MISS.SNOOP_MISS",
1043 "MSRIndex": "0x1a6,0x1a7",
1044 "SampleAfterValue": "100003",
1045 "BriefDescription": "PF_L3_RFO & L3_MISS & SNOOP_MISS",
1046 "Offcore": "1",
1047 "CounterHTOff": "0,1,2,3"
1048 },
1049 {
1050 "EventCode": "0xB7, 0xBB",
1051 "MSRValue": "0x013c000100 ",
1052 "Counter": "0,1,2,3",
1053 "UMask": "0x1",
1054 "EventName": "OFFCORE_RESPONSE.PF_L3_RFO.L3_MISS.SNOOP_NOT_NEEDED",
1055 "MSRIndex": "0x1a6,0x1a7",
1056 "SampleAfterValue": "100003",
1057 "BriefDescription": "PF_L3_RFO & L3_MISS & SNOOP_NOT_NEEDED",
1058 "Offcore": "1",
1059 "CounterHTOff": "0,1,2,3"
1060 },
1061 {
1062 "EventCode": "0xB7, 0xBB",
1063 "MSRValue": "0x00bc000100 ",
1064 "Counter": "0,1,2,3",
1065 "UMask": "0x1",
1066 "EventName": "OFFCORE_RESPONSE.PF_L3_RFO.L3_MISS.SNOOP_NONE",
1067 "MSRIndex": "0x1a6,0x1a7",
1068 "SampleAfterValue": "100003",
1069 "BriefDescription": "PF_L3_RFO & L3_MISS & SNOOP_NONE",
1070 "Offcore": "1",
1071 "CounterHTOff": "0,1,2,3"
1072 },
1073 {
1074 "EventCode": "0xB7, 0xBB",
1075 "MSRValue": "0x007c000100 ",
1076 "Counter": "0,1,2,3",
1077 "UMask": "0x1",
1078 "EventName": "OFFCORE_RESPONSE.PF_L3_RFO.L3_MISS.SPL_HIT",
1079 "MSRIndex": "0x1a6,0x1a7",
1080 "SampleAfterValue": "100003",
1081 "BriefDescription": "PF_L3_RFO & L3_MISS & SPL_HIT",
1082 "Offcore": "1",
1083 "CounterHTOff": "0,1,2,3"
1084 },
1085 {
1086 "EventCode": "0xB7, 0xBB",
1087 "MSRValue": "0x3fc4000100 ",
1088 "Counter": "0,1,2,3",
1089 "UMask": "0x1",
1090 "EventName": "OFFCORE_RESPONSE.PF_L3_RFO.L3_MISS_LOCAL_DRAM.ANY_SNOOP",
1091 "MSRIndex": "0x1a6,0x1a7",
1092 "SampleAfterValue": "100003",
1093 "BriefDescription": "PF_L3_RFO & L3_MISS_LOCAL_DRAM & ANY_SNOOP",
1094 "Offcore": "1",
1095 "CounterHTOff": "0,1,2,3"
1096 },
1097 {
1098 "EventCode": "0xB7, 0xBB",
1099 "MSRValue": "0x2004000100 ",
1100 "Counter": "0,1,2,3",
1101 "UMask": "0x1",
1102 "EventName": "OFFCORE_RESPONSE.PF_L3_RFO.L3_MISS_LOCAL_DRAM.SNOOP_NON_DRAM",
1103 "MSRIndex": "0x1a6,0x1a7",
1104 "SampleAfterValue": "100003",
1105 "BriefDescription": "PF_L3_RFO & L3_MISS_LOCAL_DRAM & SNOOP_NON_DRAM",
1106 "Offcore": "1",
1107 "CounterHTOff": "0,1,2,3"
1108 },
1109 {
1110 "EventCode": "0xB7, 0xBB",
1111 "MSRValue": "0x1004000100 ",
1112 "Counter": "0,1,2,3",
1113 "UMask": "0x1",
1114 "EventName": "OFFCORE_RESPONSE.PF_L3_RFO.L3_MISS_LOCAL_DRAM.SNOOP_HITM",
1115 "MSRIndex": "0x1a6,0x1a7",
1116 "SampleAfterValue": "100003",
1117 "BriefDescription": "PF_L3_RFO & L3_MISS_LOCAL_DRAM & SNOOP_HITM",
1118 "Offcore": "1",
1119 "CounterHTOff": "0,1,2,3"
1120 },
1121 {
1122 "EventCode": "0xB7, 0xBB",
1123 "MSRValue": "0x0404000100 ",
1124 "Counter": "0,1,2,3",
1125 "UMask": "0x1",
1126 "EventName": "OFFCORE_RESPONSE.PF_L3_RFO.L3_MISS_LOCAL_DRAM.SNOOP_HIT_NO_FWD",
1127 "MSRIndex": "0x1a6,0x1a7",
1128 "SampleAfterValue": "100003",
1129 "BriefDescription": "PF_L3_RFO & L3_MISS_LOCAL_DRAM & SNOOP_HIT_NO_FWD",
1130 "Offcore": "1",
1131 "CounterHTOff": "0,1,2,3"
1132 },
1133 {
1134 "EventCode": "0xB7, 0xBB",
1135 "MSRValue": "0x0204000100 ",
1136 "Counter": "0,1,2,3",
1137 "UMask": "0x1",
1138 "EventName": "OFFCORE_RESPONSE.PF_L3_RFO.L3_MISS_LOCAL_DRAM.SNOOP_MISS",
1139 "MSRIndex": "0x1a6,0x1a7",
1140 "SampleAfterValue": "100003",
1141 "BriefDescription": "PF_L3_RFO & L3_MISS_LOCAL_DRAM & SNOOP_MISS",
1142 "Offcore": "1",
1143 "CounterHTOff": "0,1,2,3"
1144 },
1145 {
1146 "EventCode": "0xB7, 0xBB",
1147 "MSRValue": "0x0104000100 ",
1148 "Counter": "0,1,2,3",
1149 "UMask": "0x1",
1150 "EventName": "OFFCORE_RESPONSE.PF_L3_RFO.L3_MISS_LOCAL_DRAM.SNOOP_NOT_NEEDED",
1151 "MSRIndex": "0x1a6,0x1a7",
1152 "SampleAfterValue": "100003",
1153 "BriefDescription": "PF_L3_RFO & L3_MISS_LOCAL_DRAM & SNOOP_NOT_NEEDED",
1154 "Offcore": "1",
1155 "CounterHTOff": "0,1,2,3"
1156 },
1157 {
1158 "EventCode": "0xB7, 0xBB",
1159 "MSRValue": "0x0084000100 ",
1160 "Counter": "0,1,2,3",
1161 "UMask": "0x1",
1162 "EventName": "OFFCORE_RESPONSE.PF_L3_RFO.L3_MISS_LOCAL_DRAM.SNOOP_NONE",
1163 "MSRIndex": "0x1a6,0x1a7",
1164 "SampleAfterValue": "100003",
1165 "BriefDescription": "PF_L3_RFO & L3_MISS_LOCAL_DRAM & SNOOP_NONE",
1166 "Offcore": "1",
1167 "CounterHTOff": "0,1,2,3"
1168 },
1169 {
1170 "EventCode": "0xB7, 0xBB",
1171 "MSRValue": "0x0044000100 ",
1172 "Counter": "0,1,2,3",
1173 "UMask": "0x1",
1174 "EventName": "OFFCORE_RESPONSE.PF_L3_RFO.L3_MISS_LOCAL_DRAM.SPL_HIT",
1175 "MSRIndex": "0x1a6,0x1a7",
1176 "SampleAfterValue": "100003",
1177 "BriefDescription": "PF_L3_RFO & L3_MISS_LOCAL_DRAM & SPL_HIT",
1178 "Offcore": "1",
1179 "CounterHTOff": "0,1,2,3"
1180 },
1181 {
1182 "EventCode": "0xB7, 0xBB",
1183 "MSRValue": "0x2000400100 ",
1184 "Counter": "0,1,2,3",
1185 "UMask": "0x1",
1186 "EventName": "OFFCORE_RESPONSE.PF_L3_RFO.L4_HIT_LOCAL_L4.SNOOP_NON_DRAM",
1187 "MSRIndex": "0x1a6,0x1a7",
1188 "SampleAfterValue": "100003",
1189 "BriefDescription": "PF_L3_RFO & L4_HIT_LOCAL_L4 & SNOOP_NON_DRAM",
1190 "Offcore": "1",
1191 "CounterHTOff": "0,1,2,3"
1192 },
1193 {
1194 "EventCode": "0xB7, 0xBB",
1195 "MSRValue": "0x20001c0100 ",
1196 "Counter": "0,1,2,3",
1197 "UMask": "0x1",
1198 "EventName": "OFFCORE_RESPONSE.PF_L3_RFO.L3_HIT.SNOOP_NON_DRAM",
1199 "MSRIndex": "0x1a6,0x1a7",
1200 "SampleAfterValue": "100003",
1201 "BriefDescription": "PF_L3_RFO & L3_HIT & SNOOP_NON_DRAM",
1202 "Offcore": "1",
1203 "CounterHTOff": "0,1,2,3"
1204 },
1205 {
1206 "EventCode": "0xB7, 0xBB",
1207 "MSRValue": "0x2000100100 ",
1208 "Counter": "0,1,2,3",
1209 "UMask": "0x1",
1210 "EventName": "OFFCORE_RESPONSE.PF_L3_RFO.L3_HIT_S.SNOOP_NON_DRAM",
1211 "MSRIndex": "0x1a6,0x1a7",
1212 "SampleAfterValue": "100003",
1213 "BriefDescription": "PF_L3_RFO & L3_HIT_S & SNOOP_NON_DRAM",
1214 "Offcore": "1",
1215 "CounterHTOff": "0,1,2,3"
1216 },
1217 {
1218 "EventCode": "0xB7, 0xBB",
1219 "MSRValue": "0x2000080100 ",
1220 "Counter": "0,1,2,3",
1221 "UMask": "0x1",
1222 "EventName": "OFFCORE_RESPONSE.PF_L3_RFO.L3_HIT_E.SNOOP_NON_DRAM",
1223 "MSRIndex": "0x1a6,0x1a7",
1224 "SampleAfterValue": "100003",
1225 "BriefDescription": "PF_L3_RFO & L3_HIT_E & SNOOP_NON_DRAM",
1226 "Offcore": "1",
1227 "CounterHTOff": "0,1,2,3"
1228 },
1229 {
1230 "EventCode": "0xB7, 0xBB",
1231 "MSRValue": "0x2000040100 ",
1232 "Counter": "0,1,2,3",
1233 "UMask": "0x1",
1234 "EventName": "OFFCORE_RESPONSE.PF_L3_RFO.L3_HIT_M.SNOOP_NON_DRAM",
1235 "MSRIndex": "0x1a6,0x1a7",
1236 "SampleAfterValue": "100003",
1237 "BriefDescription": "PF_L3_RFO & L3_HIT_M & SNOOP_NON_DRAM",
1238 "Offcore": "1",
1239 "CounterHTOff": "0,1,2,3"
1240 },
1241 {
1242 "EventCode": "0xB7, 0xBB",
1243 "MSRValue": "0x2000020100 ",
1244 "Counter": "0,1,2,3",
1245 "UMask": "0x1",
1246 "EventName": "OFFCORE_RESPONSE.PF_L3_RFO.SUPPLIER_NONE.SNOOP_NON_DRAM",
1247 "MSRIndex": "0x1a6,0x1a7",
1248 "SampleAfterValue": "100003",
1249 "BriefDescription": "PF_L3_RFO & SUPPLIER_NONE & SNOOP_NON_DRAM",
1250 "Offcore": "1",
1251 "CounterHTOff": "0,1,2,3"
1252 },
1253 {
1254 "EventCode": "0xB7, 0xBB",
1255 "MSRValue": "0x3ffc000080 ",
1256 "Counter": "0,1,2,3",
1257 "UMask": "0x1",
1258 "EventName": "OFFCORE_RESPONSE.PF_L3_DATA_RD.L3_MISS.ANY_SNOOP",
1259 "MSRIndex": "0x1a6,0x1a7",
1260 "SampleAfterValue": "100003",
1261 "BriefDescription": "PF_L3_DATA_RD & L3_MISS & ANY_SNOOP",
1262 "Offcore": "1",
1263 "CounterHTOff": "0,1,2,3"
1264 },
1265 {
1266 "EventCode": "0xB7, 0xBB",
1267 "MSRValue": "0x203c000080 ",
1268 "Counter": "0,1,2,3",
1269 "UMask": "0x1",
1270 "EventName": "OFFCORE_RESPONSE.PF_L3_DATA_RD.L3_MISS.SNOOP_NON_DRAM",
1271 "MSRIndex": "0x1a6,0x1a7",
1272 "SampleAfterValue": "100003",
1273 "BriefDescription": "PF_L3_DATA_RD & L3_MISS & SNOOP_NON_DRAM",
1274 "Offcore": "1",
1275 "CounterHTOff": "0,1,2,3"
1276 },
1277 {
1278 "EventCode": "0xB7, 0xBB",
1279 "MSRValue": "0x103c000080 ",
1280 "Counter": "0,1,2,3",
1281 "UMask": "0x1",
1282 "EventName": "OFFCORE_RESPONSE.PF_L3_DATA_RD.L3_MISS.SNOOP_HITM",
1283 "MSRIndex": "0x1a6,0x1a7",
1284 "SampleAfterValue": "100003",
1285 "BriefDescription": "PF_L3_DATA_RD & L3_MISS & SNOOP_HITM",
1286 "Offcore": "1",
1287 "CounterHTOff": "0,1,2,3"
1288 },
1289 {
1290 "EventCode": "0xB7, 0xBB",
1291 "MSRValue": "0x043c000080 ",
1292 "Counter": "0,1,2,3",
1293 "UMask": "0x1",
1294 "EventName": "OFFCORE_RESPONSE.PF_L3_DATA_RD.L3_MISS.SNOOP_HIT_NO_FWD",
1295 "MSRIndex": "0x1a6,0x1a7",
1296 "SampleAfterValue": "100003",
1297 "BriefDescription": "PF_L3_DATA_RD & L3_MISS & SNOOP_HIT_NO_FWD",
1298 "Offcore": "1",
1299 "CounterHTOff": "0,1,2,3"
1300 },
1301 {
1302 "EventCode": "0xB7, 0xBB",
1303 "MSRValue": "0x023c000080 ",
1304 "Counter": "0,1,2,3",
1305 "UMask": "0x1",
1306 "EventName": "OFFCORE_RESPONSE.PF_L3_DATA_RD.L3_MISS.SNOOP_MISS",
1307 "MSRIndex": "0x1a6,0x1a7",
1308 "SampleAfterValue": "100003",
1309 "BriefDescription": "PF_L3_DATA_RD & L3_MISS & SNOOP_MISS",
1310 "Offcore": "1",
1311 "CounterHTOff": "0,1,2,3"
1312 },
1313 {
1314 "EventCode": "0xB7, 0xBB",
1315 "MSRValue": "0x013c000080 ",
1316 "Counter": "0,1,2,3",
1317 "UMask": "0x1",
1318 "EventName": "OFFCORE_RESPONSE.PF_L3_DATA_RD.L3_MISS.SNOOP_NOT_NEEDED",
1319 "MSRIndex": "0x1a6,0x1a7",
1320 "SampleAfterValue": "100003",
1321 "BriefDescription": "PF_L3_DATA_RD & L3_MISS & SNOOP_NOT_NEEDED",
1322 "Offcore": "1",
1323 "CounterHTOff": "0,1,2,3"
1324 },
1325 {
1326 "EventCode": "0xB7, 0xBB",
1327 "MSRValue": "0x00bc000080 ",
1328 "Counter": "0,1,2,3",
1329 "UMask": "0x1",
1330 "EventName": "OFFCORE_RESPONSE.PF_L3_DATA_RD.L3_MISS.SNOOP_NONE",
1331 "MSRIndex": "0x1a6,0x1a7",
1332 "SampleAfterValue": "100003",
1333 "BriefDescription": "PF_L3_DATA_RD & L3_MISS & SNOOP_NONE",
1334 "Offcore": "1",
1335 "CounterHTOff": "0,1,2,3"
1336 },
1337 {
1338 "EventCode": "0xB7, 0xBB",
1339 "MSRValue": "0x007c000080 ",
1340 "Counter": "0,1,2,3",
1341 "UMask": "0x1",
1342 "EventName": "OFFCORE_RESPONSE.PF_L3_DATA_RD.L3_MISS.SPL_HIT",
1343 "MSRIndex": "0x1a6,0x1a7",
1344 "SampleAfterValue": "100003",
1345 "BriefDescription": "PF_L3_DATA_RD & L3_MISS & SPL_HIT",
1346 "Offcore": "1",
1347 "CounterHTOff": "0,1,2,3"
1348 },
1349 {
1350 "EventCode": "0xB7, 0xBB",
1351 "MSRValue": "0x3fc4000080 ",
1352 "Counter": "0,1,2,3",
1353 "UMask": "0x1",
1354 "EventName": "OFFCORE_RESPONSE.PF_L3_DATA_RD.L3_MISS_LOCAL_DRAM.ANY_SNOOP",
1355 "MSRIndex": "0x1a6,0x1a7",
1356 "SampleAfterValue": "100003",
1357 "BriefDescription": "PF_L3_DATA_RD & L3_MISS_LOCAL_DRAM & ANY_SNOOP",
1358 "Offcore": "1",
1359 "CounterHTOff": "0,1,2,3"
1360 },
1361 {
1362 "EventCode": "0xB7, 0xBB",
1363 "MSRValue": "0x2004000080 ",
1364 "Counter": "0,1,2,3",
1365 "UMask": "0x1",
1366 "EventName": "OFFCORE_RESPONSE.PF_L3_DATA_RD.L3_MISS_LOCAL_DRAM.SNOOP_NON_DRAM",
1367 "MSRIndex": "0x1a6,0x1a7",
1368 "SampleAfterValue": "100003",
1369 "BriefDescription": "PF_L3_DATA_RD & L3_MISS_LOCAL_DRAM & SNOOP_NON_DRAM",
1370 "Offcore": "1",
1371 "CounterHTOff": "0,1,2,3"
1372 },
1373 {
1374 "EventCode": "0xB7, 0xBB",
1375 "MSRValue": "0x1004000080 ",
1376 "Counter": "0,1,2,3",
1377 "UMask": "0x1",
1378 "EventName": "OFFCORE_RESPONSE.PF_L3_DATA_RD.L3_MISS_LOCAL_DRAM.SNOOP_HITM",
1379 "MSRIndex": "0x1a6,0x1a7",
1380 "SampleAfterValue": "100003",
1381 "BriefDescription": "PF_L3_DATA_RD & L3_MISS_LOCAL_DRAM & SNOOP_HITM",
1382 "Offcore": "1",
1383 "CounterHTOff": "0,1,2,3"
1384 },
1385 {
1386 "EventCode": "0xB7, 0xBB",
1387 "MSRValue": "0x0404000080 ",
1388 "Counter": "0,1,2,3",
1389 "UMask": "0x1",
1390 "EventName": "OFFCORE_RESPONSE.PF_L3_DATA_RD.L3_MISS_LOCAL_DRAM.SNOOP_HIT_NO_FWD",
1391 "MSRIndex": "0x1a6,0x1a7",
1392 "SampleAfterValue": "100003",
1393 "BriefDescription": "PF_L3_DATA_RD & L3_MISS_LOCAL_DRAM & SNOOP_HIT_NO_FWD",
1394 "Offcore": "1",
1395 "CounterHTOff": "0,1,2,3"
1396 },
1397 {
1398 "EventCode": "0xB7, 0xBB",
1399 "MSRValue": "0x0204000080 ",
1400 "Counter": "0,1,2,3",
1401 "UMask": "0x1",
1402 "EventName": "OFFCORE_RESPONSE.PF_L3_DATA_RD.L3_MISS_LOCAL_DRAM.SNOOP_MISS",
1403 "MSRIndex": "0x1a6,0x1a7",
1404 "SampleAfterValue": "100003",
1405 "BriefDescription": "PF_L3_DATA_RD & L3_MISS_LOCAL_DRAM & SNOOP_MISS",
1406 "Offcore": "1",
1407 "CounterHTOff": "0,1,2,3"
1408 },
1409 {
1410 "EventCode": "0xB7, 0xBB",
1411 "MSRValue": "0x0104000080 ",
1412 "Counter": "0,1,2,3",
1413 "UMask": "0x1",
1414 "EventName": "OFFCORE_RESPONSE.PF_L3_DATA_RD.L3_MISS_LOCAL_DRAM.SNOOP_NOT_NEEDED",
1415 "MSRIndex": "0x1a6,0x1a7",
1416 "SampleAfterValue": "100003",
1417 "BriefDescription": "PF_L3_DATA_RD & L3_MISS_LOCAL_DRAM & SNOOP_NOT_NEEDED",
1418 "Offcore": "1",
1419 "CounterHTOff": "0,1,2,3"
1420 },
1421 {
1422 "EventCode": "0xB7, 0xBB",
1423 "MSRValue": "0x0084000080 ",
1424 "Counter": "0,1,2,3",
1425 "UMask": "0x1",
1426 "EventName": "OFFCORE_RESPONSE.PF_L3_DATA_RD.L3_MISS_LOCAL_DRAM.SNOOP_NONE",
1427 "MSRIndex": "0x1a6,0x1a7",
1428 "SampleAfterValue": "100003",
1429 "BriefDescription": "PF_L3_DATA_RD & L3_MISS_LOCAL_DRAM & SNOOP_NONE",
1430 "Offcore": "1",
1431 "CounterHTOff": "0,1,2,3"
1432 },
1433 {
1434 "EventCode": "0xB7, 0xBB",
1435 "MSRValue": "0x0044000080 ",
1436 "Counter": "0,1,2,3",
1437 "UMask": "0x1",
1438 "EventName": "OFFCORE_RESPONSE.PF_L3_DATA_RD.L3_MISS_LOCAL_DRAM.SPL_HIT",
1439 "MSRIndex": "0x1a6,0x1a7",
1440 "SampleAfterValue": "100003",
1441 "BriefDescription": "PF_L3_DATA_RD & L3_MISS_LOCAL_DRAM & SPL_HIT",
1442 "Offcore": "1",
1443 "CounterHTOff": "0,1,2,3"
1444 },
1445 {
1446 "EventCode": "0xB7, 0xBB",
1447 "MSRValue": "0x2000400080 ",
1448 "Counter": "0,1,2,3",
1449 "UMask": "0x1",
1450 "EventName": "OFFCORE_RESPONSE.PF_L3_DATA_RD.L4_HIT_LOCAL_L4.SNOOP_NON_DRAM",
1451 "MSRIndex": "0x1a6,0x1a7",
1452 "SampleAfterValue": "100003",
1453 "BriefDescription": "PF_L3_DATA_RD & L4_HIT_LOCAL_L4 & SNOOP_NON_DRAM",
1454 "Offcore": "1",
1455 "CounterHTOff": "0,1,2,3"
1456 },
1457 {
1458 "EventCode": "0xB7, 0xBB",
1459 "MSRValue": "0x20001c0080 ",
1460 "Counter": "0,1,2,3",
1461 "UMask": "0x1",
1462 "EventName": "OFFCORE_RESPONSE.PF_L3_DATA_RD.L3_HIT.SNOOP_NON_DRAM",
1463 "MSRIndex": "0x1a6,0x1a7",
1464 "SampleAfterValue": "100003",
1465 "BriefDescription": "PF_L3_DATA_RD & L3_HIT & SNOOP_NON_DRAM",
1466 "Offcore": "1",
1467 "CounterHTOff": "0,1,2,3"
1468 },
1469 {
1470 "EventCode": "0xB7, 0xBB",
1471 "MSRValue": "0x2000100080 ",
1472 "Counter": "0,1,2,3",
1473 "UMask": "0x1",
1474 "EventName": "OFFCORE_RESPONSE.PF_L3_DATA_RD.L3_HIT_S.SNOOP_NON_DRAM",
1475 "MSRIndex": "0x1a6,0x1a7",
1476 "SampleAfterValue": "100003",
1477 "BriefDescription": "PF_L3_DATA_RD & L3_HIT_S & SNOOP_NON_DRAM",
1478 "Offcore": "1",
1479 "CounterHTOff": "0,1,2,3"
1480 },
1481 {
1482 "EventCode": "0xB7, 0xBB",
1483 "MSRValue": "0x2000080080 ",
1484 "Counter": "0,1,2,3",
1485 "UMask": "0x1",
1486 "EventName": "OFFCORE_RESPONSE.PF_L3_DATA_RD.L3_HIT_E.SNOOP_NON_DRAM",
1487 "MSRIndex": "0x1a6,0x1a7",
1488 "SampleAfterValue": "100003",
1489 "BriefDescription": "PF_L3_DATA_RD & L3_HIT_E & SNOOP_NON_DRAM",
1490 "Offcore": "1",
1491 "CounterHTOff": "0,1,2,3"
1492 },
1493 {
1494 "EventCode": "0xB7, 0xBB",
1495 "MSRValue": "0x2000040080 ",
1496 "Counter": "0,1,2,3",
1497 "UMask": "0x1",
1498 "EventName": "OFFCORE_RESPONSE.PF_L3_DATA_RD.L3_HIT_M.SNOOP_NON_DRAM",
1499 "MSRIndex": "0x1a6,0x1a7",
1500 "SampleAfterValue": "100003",
1501 "BriefDescription": "PF_L3_DATA_RD & L3_HIT_M & SNOOP_NON_DRAM",
1502 "Offcore": "1",
1503 "CounterHTOff": "0,1,2,3"
1504 },
1505 {
1506 "EventCode": "0xB7, 0xBB",
1507 "MSRValue": "0x2000020080 ",
1508 "Counter": "0,1,2,3",
1509 "UMask": "0x1",
1510 "EventName": "OFFCORE_RESPONSE.PF_L3_DATA_RD.SUPPLIER_NONE.SNOOP_NON_DRAM",
1511 "MSRIndex": "0x1a6,0x1a7",
1512 "SampleAfterValue": "100003",
1513 "BriefDescription": "PF_L3_DATA_RD & SUPPLIER_NONE & SNOOP_NON_DRAM",
1514 "Offcore": "1",
1515 "CounterHTOff": "0,1,2,3"
1516 },
1517 {
1518 "EventCode": "0xB7, 0xBB",
1519 "MSRValue": "0x3ffc000004 ",
1520 "Counter": "0,1,2,3",
1521 "UMask": "0x1",
1522 "EventName": "OFFCORE_RESPONSE.DEMAND_CODE_RD.L3_MISS.ANY_SNOOP",
1523 "MSRIndex": "0x1a6,0x1a7",
1524 "SampleAfterValue": "100003",
1525 "BriefDescription": "DEMAND_CODE_RD & L3_MISS & ANY_SNOOP",
1526 "Offcore": "1",
1527 "CounterHTOff": "0,1,2,3"
1528 },
1529 {
1530 "EventCode": "0xB7, 0xBB",
1531 "MSRValue": "0x203c000004 ",
1532 "Counter": "0,1,2,3",
1533 "UMask": "0x1",
1534 "EventName": "OFFCORE_RESPONSE.DEMAND_CODE_RD.L3_MISS.SNOOP_NON_DRAM",
1535 "MSRIndex": "0x1a6,0x1a7",
1536 "SampleAfterValue": "100003",
1537 "BriefDescription": "DEMAND_CODE_RD & L3_MISS & SNOOP_NON_DRAM",
1538 "Offcore": "1",
1539 "CounterHTOff": "0,1,2,3"
1540 },
1541 {
1542 "EventCode": "0xB7, 0xBB",
1543 "MSRValue": "0x103c000004 ",
1544 "Counter": "0,1,2,3",
1545 "UMask": "0x1",
1546 "EventName": "OFFCORE_RESPONSE.DEMAND_CODE_RD.L3_MISS.SNOOP_HITM",
1547 "MSRIndex": "0x1a6,0x1a7",
1548 "SampleAfterValue": "100003",
1549 "BriefDescription": "DEMAND_CODE_RD & L3_MISS & SNOOP_HITM",
1550 "Offcore": "1",
1551 "CounterHTOff": "0,1,2,3"
1552 },
1553 {
1554 "EventCode": "0xB7, 0xBB",
1555 "MSRValue": "0x043c000004 ",
1556 "Counter": "0,1,2,3",
1557 "UMask": "0x1",
1558 "EventName": "OFFCORE_RESPONSE.DEMAND_CODE_RD.L3_MISS.SNOOP_HIT_NO_FWD",
1559 "MSRIndex": "0x1a6,0x1a7",
1560 "SampleAfterValue": "100003",
1561 "BriefDescription": "DEMAND_CODE_RD & L3_MISS & SNOOP_HIT_NO_FWD",
1562 "Offcore": "1",
1563 "CounterHTOff": "0,1,2,3"
1564 },
1565 {
1566 "EventCode": "0xB7, 0xBB",
1567 "MSRValue": "0x023c000004 ",
1568 "Counter": "0,1,2,3",
1569 "UMask": "0x1",
1570 "EventName": "OFFCORE_RESPONSE.DEMAND_CODE_RD.L3_MISS.SNOOP_MISS",
1571 "MSRIndex": "0x1a6,0x1a7",
1572 "SampleAfterValue": "100003",
1573 "BriefDescription": "DEMAND_CODE_RD & L3_MISS & SNOOP_MISS",
1574 "Offcore": "1",
1575 "CounterHTOff": "0,1,2,3"
1576 },
1577 {
1578 "EventCode": "0xB7, 0xBB",
1579 "MSRValue": "0x013c000004 ",
1580 "Counter": "0,1,2,3",
1581 "UMask": "0x1",
1582 "EventName": "OFFCORE_RESPONSE.DEMAND_CODE_RD.L3_MISS.SNOOP_NOT_NEEDED",
1583 "MSRIndex": "0x1a6,0x1a7",
1584 "SampleAfterValue": "100003",
1585 "BriefDescription": "DEMAND_CODE_RD & L3_MISS & SNOOP_NOT_NEEDED",
1586 "Offcore": "1",
1587 "CounterHTOff": "0,1,2,3"
1588 },
1589 {
1590 "EventCode": "0xB7, 0xBB",
1591 "MSRValue": "0x00bc000004 ",
1592 "Counter": "0,1,2,3",
1593 "UMask": "0x1",
1594 "EventName": "OFFCORE_RESPONSE.DEMAND_CODE_RD.L3_MISS.SNOOP_NONE",
1595 "MSRIndex": "0x1a6,0x1a7",
1596 "SampleAfterValue": "100003",
1597 "BriefDescription": "DEMAND_CODE_RD & L3_MISS & SNOOP_NONE",
1598 "Offcore": "1",
1599 "CounterHTOff": "0,1,2,3"
1600 },
1601 {
1602 "EventCode": "0xB7, 0xBB",
1603 "MSRValue": "0x007c000004 ",
1604 "Counter": "0,1,2,3",
1605 "UMask": "0x1",
1606 "EventName": "OFFCORE_RESPONSE.DEMAND_CODE_RD.L3_MISS.SPL_HIT",
1607 "MSRIndex": "0x1a6,0x1a7",
1608 "SampleAfterValue": "100003",
1609 "BriefDescription": "DEMAND_CODE_RD & L3_MISS & SPL_HIT",
1610 "Offcore": "1",
1611 "CounterHTOff": "0,1,2,3"
1612 },
1613 {
1614 "EventCode": "0xB7, 0xBB",
1615 "MSRValue": "0x3fc4000004 ",
1616 "Counter": "0,1,2,3",
1617 "UMask": "0x1",
1618 "EventName": "OFFCORE_RESPONSE.DEMAND_CODE_RD.L3_MISS_LOCAL_DRAM.ANY_SNOOP",
1619 "MSRIndex": "0x1a6,0x1a7",
1620 "SampleAfterValue": "100003",
1621 "BriefDescription": "DEMAND_CODE_RD & L3_MISS_LOCAL_DRAM & ANY_SNOOP",
1622 "Offcore": "1",
1623 "CounterHTOff": "0,1,2,3"
1624 },
1625 {
1626 "EventCode": "0xB7, 0xBB",
1627 "MSRValue": "0x2004000004 ",
1628 "Counter": "0,1,2,3",
1629 "UMask": "0x1",
1630 "EventName": "OFFCORE_RESPONSE.DEMAND_CODE_RD.L3_MISS_LOCAL_DRAM.SNOOP_NON_DRAM",
1631 "MSRIndex": "0x1a6,0x1a7",
1632 "SampleAfterValue": "100003",
1633 "BriefDescription": "DEMAND_CODE_RD & L3_MISS_LOCAL_DRAM & SNOOP_NON_DRAM",
1634 "Offcore": "1",
1635 "CounterHTOff": "0,1,2,3"
1636 },
1637 {
1638 "EventCode": "0xB7, 0xBB",
1639 "MSRValue": "0x1004000004 ",
1640 "Counter": "0,1,2,3",
1641 "UMask": "0x1",
1642 "EventName": "OFFCORE_RESPONSE.DEMAND_CODE_RD.L3_MISS_LOCAL_DRAM.SNOOP_HITM",
1643 "MSRIndex": "0x1a6,0x1a7",
1644 "SampleAfterValue": "100003",
1645 "BriefDescription": "DEMAND_CODE_RD & L3_MISS_LOCAL_DRAM & SNOOP_HITM",
1646 "Offcore": "1",
1647 "CounterHTOff": "0,1,2,3"
1648 },
1649 {
1650 "EventCode": "0xB7, 0xBB",
1651 "MSRValue": "0x0404000004 ",
1652 "Counter": "0,1,2,3",
1653 "UMask": "0x1",
1654 "EventName": "OFFCORE_RESPONSE.DEMAND_CODE_RD.L3_MISS_LOCAL_DRAM.SNOOP_HIT_NO_FWD",
1655 "MSRIndex": "0x1a6,0x1a7",
1656 "SampleAfterValue": "100003",
1657 "BriefDescription": "DEMAND_CODE_RD & L3_MISS_LOCAL_DRAM & SNOOP_HIT_NO_FWD",
1658 "Offcore": "1",
1659 "CounterHTOff": "0,1,2,3"
1660 },
1661 {
1662 "EventCode": "0xB7, 0xBB",
1663 "MSRValue": "0x0204000004 ",
1664 "Counter": "0,1,2,3",
1665 "UMask": "0x1",
1666 "EventName": "OFFCORE_RESPONSE.DEMAND_CODE_RD.L3_MISS_LOCAL_DRAM.SNOOP_MISS",
1667 "MSRIndex": "0x1a6,0x1a7",
1668 "SampleAfterValue": "100003",
1669 "BriefDescription": "DEMAND_CODE_RD & L3_MISS_LOCAL_DRAM & SNOOP_MISS",
1670 "Offcore": "1",
1671 "CounterHTOff": "0,1,2,3"
1672 },
1673 {
1674 "EventCode": "0xB7, 0xBB",
1675 "MSRValue": "0x0104000004 ",
1676 "Counter": "0,1,2,3",
1677 "UMask": "0x1",
1678 "EventName": "OFFCORE_RESPONSE.DEMAND_CODE_RD.L3_MISS_LOCAL_DRAM.SNOOP_NOT_NEEDED",
1679 "MSRIndex": "0x1a6,0x1a7",
1680 "SampleAfterValue": "100003",
1681 "BriefDescription": "DEMAND_CODE_RD & L3_MISS_LOCAL_DRAM & SNOOP_NOT_NEEDED",
1682 "Offcore": "1",
1683 "CounterHTOff": "0,1,2,3"
1684 },
1685 {
1686 "EventCode": "0xB7, 0xBB",
1687 "MSRValue": "0x0084000004 ",
1688 "Counter": "0,1,2,3",
1689 "UMask": "0x1",
1690 "EventName": "OFFCORE_RESPONSE.DEMAND_CODE_RD.L3_MISS_LOCAL_DRAM.SNOOP_NONE",
1691 "MSRIndex": "0x1a6,0x1a7",
1692 "SampleAfterValue": "100003",
1693 "BriefDescription": "DEMAND_CODE_RD & L3_MISS_LOCAL_DRAM & SNOOP_NONE",
1694 "Offcore": "1",
1695 "CounterHTOff": "0,1,2,3"
1696 },
1697 {
1698 "EventCode": "0xB7, 0xBB",
1699 "MSRValue": "0x0044000004 ",
1700 "Counter": "0,1,2,3",
1701 "UMask": "0x1",
1702 "EventName": "OFFCORE_RESPONSE.DEMAND_CODE_RD.L3_MISS_LOCAL_DRAM.SPL_HIT",
1703 "MSRIndex": "0x1a6,0x1a7",
1704 "SampleAfterValue": "100003",
1705 "BriefDescription": "DEMAND_CODE_RD & L3_MISS_LOCAL_DRAM & SPL_HIT",
1706 "Offcore": "1",
1707 "CounterHTOff": "0,1,2,3"
1708 },
1709 {
1710 "EventCode": "0xB7, 0xBB",
1711 "MSRValue": "0x2000400004 ",
1712 "Counter": "0,1,2,3",
1713 "UMask": "0x1",
1714 "EventName": "OFFCORE_RESPONSE.DEMAND_CODE_RD.L4_HIT_LOCAL_L4.SNOOP_NON_DRAM",
1715 "MSRIndex": "0x1a6,0x1a7",
1716 "SampleAfterValue": "100003",
1717 "BriefDescription": "DEMAND_CODE_RD & L4_HIT_LOCAL_L4 & SNOOP_NON_DRAM",
1718 "Offcore": "1",
1719 "CounterHTOff": "0,1,2,3"
1720 },
1721 {
1722 "EventCode": "0xB7, 0xBB",
1723 "MSRValue": "0x20001c0004 ",
1724 "Counter": "0,1,2,3",
1725 "UMask": "0x1",
1726 "EventName": "OFFCORE_RESPONSE.DEMAND_CODE_RD.L3_HIT.SNOOP_NON_DRAM",
1727 "MSRIndex": "0x1a6,0x1a7",
1728 "SampleAfterValue": "100003",
1729 "BriefDescription": "DEMAND_CODE_RD & L3_HIT & SNOOP_NON_DRAM",
1730 "Offcore": "1",
1731 "CounterHTOff": "0,1,2,3"
1732 },
1733 {
1734 "EventCode": "0xB7, 0xBB",
1735 "MSRValue": "0x2000100004 ",
1736 "Counter": "0,1,2,3",
1737 "UMask": "0x1",
1738 "EventName": "OFFCORE_RESPONSE.DEMAND_CODE_RD.L3_HIT_S.SNOOP_NON_DRAM",
1739 "MSRIndex": "0x1a6,0x1a7",
1740 "SampleAfterValue": "100003",
1741 "BriefDescription": "DEMAND_CODE_RD & L3_HIT_S & SNOOP_NON_DRAM",
1742 "Offcore": "1",
1743 "CounterHTOff": "0,1,2,3"
1744 },
1745 {
1746 "EventCode": "0xB7, 0xBB",
1747 "MSRValue": "0x2000080004 ",
1748 "Counter": "0,1,2,3",
1749 "UMask": "0x1",
1750 "EventName": "OFFCORE_RESPONSE.DEMAND_CODE_RD.L3_HIT_E.SNOOP_NON_DRAM",
1751 "MSRIndex": "0x1a6,0x1a7",
1752 "SampleAfterValue": "100003",
1753 "BriefDescription": "DEMAND_CODE_RD & L3_HIT_E & SNOOP_NON_DRAM",
1754 "Offcore": "1",
1755 "CounterHTOff": "0,1,2,3"
1756 },
1757 {
1758 "EventCode": "0xB7, 0xBB",
1759 "MSRValue": "0x2000040004 ",
1760 "Counter": "0,1,2,3",
1761 "UMask": "0x1",
1762 "EventName": "OFFCORE_RESPONSE.DEMAND_CODE_RD.L3_HIT_M.SNOOP_NON_DRAM",
1763 "MSRIndex": "0x1a6,0x1a7",
1764 "SampleAfterValue": "100003",
1765 "BriefDescription": "DEMAND_CODE_RD & L3_HIT_M & SNOOP_NON_DRAM",
1766 "Offcore": "1",
1767 "CounterHTOff": "0,1,2,3"
1768 },
1769 {
1770 "EventCode": "0xB7, 0xBB",
1771 "MSRValue": "0x2000020004 ",
1772 "Counter": "0,1,2,3",
1773 "UMask": "0x1",
1774 "EventName": "OFFCORE_RESPONSE.DEMAND_CODE_RD.SUPPLIER_NONE.SNOOP_NON_DRAM",
1775 "MSRIndex": "0x1a6,0x1a7",
1776 "SampleAfterValue": "100003",
1777 "BriefDescription": "DEMAND_CODE_RD & SUPPLIER_NONE & SNOOP_NON_DRAM",
1778 "Offcore": "1",
1779 "CounterHTOff": "0,1,2,3"
1780 },
1781 {
1782 "EventCode": "0xB7, 0xBB",
1783 "MSRValue": "0x3ffc000002 ",
1784 "Counter": "0,1,2,3",
1785 "UMask": "0x1",
1786 "EventName": "OFFCORE_RESPONSE.DEMAND_RFO.L3_MISS.ANY_SNOOP",
1787 "MSRIndex": "0x1a6,0x1a7",
1788 "SampleAfterValue": "100003",
1789 "BriefDescription": "DEMAND_RFO & L3_MISS & ANY_SNOOP",
1790 "Offcore": "1",
1791 "CounterHTOff": "0,1,2,3"
1792 },
1793 {
1794 "EventCode": "0xB7, 0xBB",
1795 "MSRValue": "0x203c000002 ",
1796 "Counter": "0,1,2,3",
1797 "UMask": "0x1",
1798 "EventName": "OFFCORE_RESPONSE.DEMAND_RFO.L3_MISS.SNOOP_NON_DRAM",
1799 "MSRIndex": "0x1a6,0x1a7",
1800 "SampleAfterValue": "100003",
1801 "BriefDescription": "DEMAND_RFO & L3_MISS & SNOOP_NON_DRAM",
1802 "Offcore": "1",
1803 "CounterHTOff": "0,1,2,3"
1804 },
1805 {
1806 "EventCode": "0xB7, 0xBB",
1807 "MSRValue": "0x103c000002 ",
1808 "Counter": "0,1,2,3",
1809 "UMask": "0x1",
1810 "EventName": "OFFCORE_RESPONSE.DEMAND_RFO.L3_MISS.SNOOP_HITM",
1811 "MSRIndex": "0x1a6,0x1a7",
1812 "SampleAfterValue": "100003",
1813 "BriefDescription": "DEMAND_RFO & L3_MISS & SNOOP_HITM",
1814 "Offcore": "1",
1815 "CounterHTOff": "0,1,2,3"
1816 },
1817 {
1818 "EventCode": "0xB7, 0xBB",
1819 "MSRValue": "0x043c000002 ",
1820 "Counter": "0,1,2,3",
1821 "UMask": "0x1",
1822 "EventName": "OFFCORE_RESPONSE.DEMAND_RFO.L3_MISS.SNOOP_HIT_NO_FWD",
1823 "MSRIndex": "0x1a6,0x1a7",
1824 "SampleAfterValue": "100003",
1825 "BriefDescription": "DEMAND_RFO & L3_MISS & SNOOP_HIT_NO_FWD",
1826 "Offcore": "1",
1827 "CounterHTOff": "0,1,2,3"
1828 },
1829 {
1830 "EventCode": "0xB7, 0xBB",
1831 "MSRValue": "0x023c000002 ",
1832 "Counter": "0,1,2,3",
1833 "UMask": "0x1",
1834 "EventName": "OFFCORE_RESPONSE.DEMAND_RFO.L3_MISS.SNOOP_MISS",
1835 "MSRIndex": "0x1a6,0x1a7",
1836 "SampleAfterValue": "100003",
1837 "BriefDescription": "DEMAND_RFO & L3_MISS & SNOOP_MISS",
1838 "Offcore": "1",
1839 "CounterHTOff": "0,1,2,3"
1840 },
1841 {
1842 "EventCode": "0xB7, 0xBB",
1843 "MSRValue": "0x013c000002 ",
1844 "Counter": "0,1,2,3",
1845 "UMask": "0x1",
1846 "EventName": "OFFCORE_RESPONSE.DEMAND_RFO.L3_MISS.SNOOP_NOT_NEEDED",
1847 "MSRIndex": "0x1a6,0x1a7",
1848 "SampleAfterValue": "100003",
1849 "BriefDescription": "DEMAND_RFO & L3_MISS & SNOOP_NOT_NEEDED",
1850 "Offcore": "1",
1851 "CounterHTOff": "0,1,2,3"
1852 },
1853 {
1854 "EventCode": "0xB7, 0xBB",
1855 "MSRValue": "0x00bc000002 ",
1856 "Counter": "0,1,2,3",
1857 "UMask": "0x1",
1858 "EventName": "OFFCORE_RESPONSE.DEMAND_RFO.L3_MISS.SNOOP_NONE",
1859 "MSRIndex": "0x1a6,0x1a7",
1860 "SampleAfterValue": "100003",
1861 "BriefDescription": "DEMAND_RFO & L3_MISS & SNOOP_NONE",
1862 "Offcore": "1",
1863 "CounterHTOff": "0,1,2,3"
1864 },
1865 {
1866 "EventCode": "0xB7, 0xBB",
1867 "MSRValue": "0x007c000002 ",
1868 "Counter": "0,1,2,3",
1869 "UMask": "0x1",
1870 "EventName": "OFFCORE_RESPONSE.DEMAND_RFO.L3_MISS.SPL_HIT",
1871 "MSRIndex": "0x1a6,0x1a7",
1872 "SampleAfterValue": "100003",
1873 "BriefDescription": "DEMAND_RFO & L3_MISS & SPL_HIT",
1874 "Offcore": "1",
1875 "CounterHTOff": "0,1,2,3"
1876 },
1877 {
1878 "EventCode": "0xB7, 0xBB",
1879 "MSRValue": "0x3fc4000002 ",
1880 "Counter": "0,1,2,3",
1881 "UMask": "0x1",
1882 "EventName": "OFFCORE_RESPONSE.DEMAND_RFO.L3_MISS_LOCAL_DRAM.ANY_SNOOP",
1883 "MSRIndex": "0x1a6,0x1a7",
1884 "SampleAfterValue": "100003",
1885 "BriefDescription": "DEMAND_RFO & L3_MISS_LOCAL_DRAM & ANY_SNOOP",
1886 "Offcore": "1",
1887 "CounterHTOff": "0,1,2,3"
1888 },
1889 {
1890 "EventCode": "0xB7, 0xBB",
1891 "MSRValue": "0x2004000002 ",
1892 "Counter": "0,1,2,3",
1893 "UMask": "0x1",
1894 "EventName": "OFFCORE_RESPONSE.DEMAND_RFO.L3_MISS_LOCAL_DRAM.SNOOP_NON_DRAM",
1895 "MSRIndex": "0x1a6,0x1a7",
1896 "SampleAfterValue": "100003",
1897 "BriefDescription": "DEMAND_RFO & L3_MISS_LOCAL_DRAM & SNOOP_NON_DRAM",
1898 "Offcore": "1",
1899 "CounterHTOff": "0,1,2,3"
1900 },
1901 {
1902 "EventCode": "0xB7, 0xBB",
1903 "MSRValue": "0x1004000002 ",
1904 "Counter": "0,1,2,3",
1905 "UMask": "0x1",
1906 "EventName": "OFFCORE_RESPONSE.DEMAND_RFO.L3_MISS_LOCAL_DRAM.SNOOP_HITM",
1907 "MSRIndex": "0x1a6,0x1a7",
1908 "SampleAfterValue": "100003",
1909 "BriefDescription": "DEMAND_RFO & L3_MISS_LOCAL_DRAM & SNOOP_HITM",
1910 "Offcore": "1",
1911 "CounterHTOff": "0,1,2,3"
1912 },
1913 {
1914 "EventCode": "0xB7, 0xBB",
1915 "MSRValue": "0x0404000002 ",
1916 "Counter": "0,1,2,3",
1917 "UMask": "0x1",
1918 "EventName": "OFFCORE_RESPONSE.DEMAND_RFO.L3_MISS_LOCAL_DRAM.SNOOP_HIT_NO_FWD",
1919 "MSRIndex": "0x1a6,0x1a7",
1920 "SampleAfterValue": "100003",
1921 "BriefDescription": "DEMAND_RFO & L3_MISS_LOCAL_DRAM & SNOOP_HIT_NO_FWD",
1922 "Offcore": "1",
1923 "CounterHTOff": "0,1,2,3"
1924 },
1925 {
1926 "EventCode": "0xB7, 0xBB",
1927 "MSRValue": "0x0204000002 ",
1928 "Counter": "0,1,2,3",
1929 "UMask": "0x1",
1930 "EventName": "OFFCORE_RESPONSE.DEMAND_RFO.L3_MISS_LOCAL_DRAM.SNOOP_MISS",
1931 "MSRIndex": "0x1a6,0x1a7",
1932 "SampleAfterValue": "100003",
1933 "BriefDescription": "DEMAND_RFO & L3_MISS_LOCAL_DRAM & SNOOP_MISS",
1934 "Offcore": "1",
1935 "CounterHTOff": "0,1,2,3"
1936 },
1937 {
1938 "EventCode": "0xB7, 0xBB",
1939 "MSRValue": "0x0104000002 ",
1940 "Counter": "0,1,2,3",
1941 "UMask": "0x1",
1942 "EventName": "OFFCORE_RESPONSE.DEMAND_RFO.L3_MISS_LOCAL_DRAM.SNOOP_NOT_NEEDED",
1943 "MSRIndex": "0x1a6,0x1a7",
1944 "SampleAfterValue": "100003",
1945 "BriefDescription": "DEMAND_RFO & L3_MISS_LOCAL_DRAM & SNOOP_NOT_NEEDED",
1946 "Offcore": "1",
1947 "CounterHTOff": "0,1,2,3"
1948 },
1949 {
1950 "EventCode": "0xB7, 0xBB",
1951 "MSRValue": "0x0084000002 ",
1952 "Counter": "0,1,2,3",
1953 "UMask": "0x1",
1954 "EventName": "OFFCORE_RESPONSE.DEMAND_RFO.L3_MISS_LOCAL_DRAM.SNOOP_NONE",
1955 "MSRIndex": "0x1a6,0x1a7",
1956 "SampleAfterValue": "100003",
1957 "BriefDescription": "DEMAND_RFO & L3_MISS_LOCAL_DRAM & SNOOP_NONE",
1958 "Offcore": "1",
1959 "CounterHTOff": "0,1,2,3"
1960 },
1961 {
1962 "EventCode": "0xB7, 0xBB",
1963 "MSRValue": "0x0044000002 ",
1964 "Counter": "0,1,2,3",
1965 "UMask": "0x1",
1966 "EventName": "OFFCORE_RESPONSE.DEMAND_RFO.L3_MISS_LOCAL_DRAM.SPL_HIT",
1967 "MSRIndex": "0x1a6,0x1a7",
1968 "SampleAfterValue": "100003",
1969 "BriefDescription": "DEMAND_RFO & L3_MISS_LOCAL_DRAM & SPL_HIT",
1970 "Offcore": "1",
1971 "CounterHTOff": "0,1,2,3"
1972 },
1973 {
1974 "EventCode": "0xB7, 0xBB",
1975 "MSRValue": "0x2000400002 ",
1976 "Counter": "0,1,2,3",
1977 "UMask": "0x1",
1978 "EventName": "OFFCORE_RESPONSE.DEMAND_RFO.L4_HIT_LOCAL_L4.SNOOP_NON_DRAM",
1979 "MSRIndex": "0x1a6,0x1a7",
1980 "SampleAfterValue": "100003",
1981 "BriefDescription": "DEMAND_RFO & L4_HIT_LOCAL_L4 & SNOOP_NON_DRAM",
1982 "Offcore": "1",
1983 "CounterHTOff": "0,1,2,3"
1984 },
1985 {
1986 "EventCode": "0xB7, 0xBB",
1987 "MSRValue": "0x20001c0002 ",
1988 "Counter": "0,1,2,3",
1989 "UMask": "0x1",
1990 "EventName": "OFFCORE_RESPONSE.DEMAND_RFO.L3_HIT.SNOOP_NON_DRAM",
1991 "MSRIndex": "0x1a6,0x1a7",
1992 "SampleAfterValue": "100003",
1993 "BriefDescription": "DEMAND_RFO & L3_HIT & SNOOP_NON_DRAM",
1994 "Offcore": "1",
1995 "CounterHTOff": "0,1,2,3"
1996 },
1997 {
1998 "EventCode": "0xB7, 0xBB",
1999 "MSRValue": "0x2000100002 ",
2000 "Counter": "0,1,2,3",
2001 "UMask": "0x1",
2002 "EventName": "OFFCORE_RESPONSE.DEMAND_RFO.L3_HIT_S.SNOOP_NON_DRAM",
2003 "MSRIndex": "0x1a6,0x1a7",
2004 "SampleAfterValue": "100003",
2005 "BriefDescription": "DEMAND_RFO & L3_HIT_S & SNOOP_NON_DRAM",
2006 "Offcore": "1",
2007 "CounterHTOff": "0,1,2,3"
2008 },
2009 {
2010 "EventCode": "0xB7, 0xBB",
2011 "MSRValue": "0x2000080002 ",
2012 "Counter": "0,1,2,3",
2013 "UMask": "0x1",
2014 "EventName": "OFFCORE_RESPONSE.DEMAND_RFO.L3_HIT_E.SNOOP_NON_DRAM",
2015 "MSRIndex": "0x1a6,0x1a7",
2016 "SampleAfterValue": "100003",
2017 "BriefDescription": "DEMAND_RFO & L3_HIT_E & SNOOP_NON_DRAM",
2018 "Offcore": "1",
2019 "CounterHTOff": "0,1,2,3"
2020 },
2021 {
2022 "EventCode": "0xB7, 0xBB",
2023 "MSRValue": "0x2000040002 ",
2024 "Counter": "0,1,2,3",
2025 "UMask": "0x1",
2026 "EventName": "OFFCORE_RESPONSE.DEMAND_RFO.L3_HIT_M.SNOOP_NON_DRAM",
2027 "MSRIndex": "0x1a6,0x1a7",
2028 "SampleAfterValue": "100003",
2029 "BriefDescription": "DEMAND_RFO & L3_HIT_M & SNOOP_NON_DRAM",
2030 "Offcore": "1",
2031 "CounterHTOff": "0,1,2,3"
2032 },
2033 {
2034 "EventCode": "0xB7, 0xBB",
2035 "MSRValue": "0x2000020002 ",
2036 "Counter": "0,1,2,3",
2037 "UMask": "0x1",
2038 "EventName": "OFFCORE_RESPONSE.DEMAND_RFO.SUPPLIER_NONE.SNOOP_NON_DRAM",
2039 "MSRIndex": "0x1a6,0x1a7",
2040 "SampleAfterValue": "100003",
2041 "BriefDescription": "DEMAND_RFO & SUPPLIER_NONE & SNOOP_NON_DRAM",
2042 "Offcore": "1",
2043 "CounterHTOff": "0,1,2,3"
2044 },
2045 {
2046 "EventCode": "0xB7, 0xBB", 461 "EventCode": "0xB7, 0xBB",
2047 "MSRValue": "0x3ffc000001 ", 462 "MSRValue": "0x3ffc000001 ",
2048 "Counter": "0,1,2,3", 463 "Counter": "0,1,2,3",
@@ -2055,18 +470,7 @@
2055 "CounterHTOff": "0,1,2,3" 470 "CounterHTOff": "0,1,2,3"
2056 }, 471 },
2057 { 472 {
2058 "EventCode": "0xB7, 0xBB", 473 "PublicDescription": "tbd Offcore response can be programmed only with a specific pair of event select and counter MSR, and with specific event codes and predefine mask bit value in a dedicated MSR to specify attributes of the offcore transaction.",
2059 "MSRValue": "0x203c000001 ",
2060 "Counter": "0,1,2,3",
2061 "UMask": "0x1",
2062 "EventName": "OFFCORE_RESPONSE.DEMAND_DATA_RD.L3_MISS.SNOOP_NON_DRAM",
2063 "MSRIndex": "0x1a6,0x1a7",
2064 "SampleAfterValue": "100003",
2065 "BriefDescription": "DEMAND_DATA_RD & L3_MISS & SNOOP_NON_DRAM",
2066 "Offcore": "1",
2067 "CounterHTOff": "0,1,2,3"
2068 },
2069 {
2070 "EventCode": "0xB7, 0xBB", 474 "EventCode": "0xB7, 0xBB",
2071 "MSRValue": "0x103c000001 ", 475 "MSRValue": "0x103c000001 ",
2072 "Counter": "0,1,2,3", 476 "Counter": "0,1,2,3",
@@ -2079,6 +483,7 @@
2079 "CounterHTOff": "0,1,2,3" 483 "CounterHTOff": "0,1,2,3"
2080 }, 484 },
2081 { 485 {
486 "PublicDescription": "tbd Offcore response can be programmed only with a specific pair of event select and counter MSR, and with specific event codes and predefine mask bit value in a dedicated MSR to specify attributes of the offcore transaction.",
2082 "EventCode": "0xB7, 0xBB", 487 "EventCode": "0xB7, 0xBB",
2083 "MSRValue": "0x043c000001 ", 488 "MSRValue": "0x043c000001 ",
2084 "Counter": "0,1,2,3", 489 "Counter": "0,1,2,3",
@@ -2091,6 +496,7 @@
2091 "CounterHTOff": "0,1,2,3" 496 "CounterHTOff": "0,1,2,3"
2092 }, 497 },
2093 { 498 {
499 "PublicDescription": "tbd Offcore response can be programmed only with a specific pair of event select and counter MSR, and with specific event codes and predefine mask bit value in a dedicated MSR to specify attributes of the offcore transaction.",
2094 "EventCode": "0xB7, 0xBB", 500 "EventCode": "0xB7, 0xBB",
2095 "MSRValue": "0x023c000001 ", 501 "MSRValue": "0x023c000001 ",
2096 "Counter": "0,1,2,3", 502 "Counter": "0,1,2,3",
@@ -2103,6 +509,7 @@
2103 "CounterHTOff": "0,1,2,3" 509 "CounterHTOff": "0,1,2,3"
2104 }, 510 },
2105 { 511 {
512 "PublicDescription": "tbd Offcore response can be programmed only with a specific pair of event select and counter MSR, and with specific event codes and predefine mask bit value in a dedicated MSR to specify attributes of the offcore transaction.",
2106 "EventCode": "0xB7, 0xBB", 513 "EventCode": "0xB7, 0xBB",
2107 "MSRValue": "0x013c000001 ", 514 "MSRValue": "0x013c000001 ",
2108 "Counter": "0,1,2,3", 515 "Counter": "0,1,2,3",
@@ -2115,6 +522,7 @@
2115 "CounterHTOff": "0,1,2,3" 522 "CounterHTOff": "0,1,2,3"
2116 }, 523 },
2117 { 524 {
525 "PublicDescription": "tbd Offcore response can be programmed only with a specific pair of event select and counter MSR, and with specific event codes and predefine mask bit value in a dedicated MSR to specify attributes of the offcore transaction.",
2118 "EventCode": "0xB7, 0xBB", 526 "EventCode": "0xB7, 0xBB",
2119 "MSRValue": "0x00bc000001 ", 527 "MSRValue": "0x00bc000001 ",
2120 "Counter": "0,1,2,3", 528 "Counter": "0,1,2,3",
@@ -2127,18 +535,7 @@
2127 "CounterHTOff": "0,1,2,3" 535 "CounterHTOff": "0,1,2,3"
2128 }, 536 },
2129 { 537 {
2130 "EventCode": "0xB7, 0xBB", 538 "PublicDescription": "tbd Offcore response can be programmed only with a specific pair of event select and counter MSR, and with specific event codes and predefine mask bit value in a dedicated MSR to specify attributes of the offcore transaction.",
2131 "MSRValue": "0x007c000001 ",
2132 "Counter": "0,1,2,3",
2133 "UMask": "0x1",
2134 "EventName": "OFFCORE_RESPONSE.DEMAND_DATA_RD.L3_MISS.SPL_HIT",
2135 "MSRIndex": "0x1a6,0x1a7",
2136 "SampleAfterValue": "100003",
2137 "BriefDescription": "DEMAND_DATA_RD & L3_MISS & SPL_HIT",
2138 "Offcore": "1",
2139 "CounterHTOff": "0,1,2,3"
2140 },
2141 {
2142 "EventCode": "0xB7, 0xBB", 539 "EventCode": "0xB7, 0xBB",
2143 "MSRValue": "0x3fc4000001 ", 540 "MSRValue": "0x3fc4000001 ",
2144 "Counter": "0,1,2,3", 541 "Counter": "0,1,2,3",
@@ -2151,18 +548,7 @@
2151 "CounterHTOff": "0,1,2,3" 548 "CounterHTOff": "0,1,2,3"
2152 }, 549 },
2153 { 550 {
2154 "EventCode": "0xB7, 0xBB", 551 "PublicDescription": "tbd Offcore response can be programmed only with a specific pair of event select and counter MSR, and with specific event codes and predefine mask bit value in a dedicated MSR to specify attributes of the offcore transaction.",
2155 "MSRValue": "0x2004000001 ",
2156 "Counter": "0,1,2,3",
2157 "UMask": "0x1",
2158 "EventName": "OFFCORE_RESPONSE.DEMAND_DATA_RD.L3_MISS_LOCAL_DRAM.SNOOP_NON_DRAM",
2159 "MSRIndex": "0x1a6,0x1a7",
2160 "SampleAfterValue": "100003",
2161 "BriefDescription": "DEMAND_DATA_RD & L3_MISS_LOCAL_DRAM & SNOOP_NON_DRAM",
2162 "Offcore": "1",
2163 "CounterHTOff": "0,1,2,3"
2164 },
2165 {
2166 "EventCode": "0xB7, 0xBB", 552 "EventCode": "0xB7, 0xBB",
2167 "MSRValue": "0x1004000001 ", 553 "MSRValue": "0x1004000001 ",
2168 "Counter": "0,1,2,3", 554 "Counter": "0,1,2,3",
@@ -2175,6 +561,7 @@
2175 "CounterHTOff": "0,1,2,3" 561 "CounterHTOff": "0,1,2,3"
2176 }, 562 },
2177 { 563 {
564 "PublicDescription": "tbd Offcore response can be programmed only with a specific pair of event select and counter MSR, and with specific event codes and predefine mask bit value in a dedicated MSR to specify attributes of the offcore transaction.",
2178 "EventCode": "0xB7, 0xBB", 565 "EventCode": "0xB7, 0xBB",
2179 "MSRValue": "0x0404000001 ", 566 "MSRValue": "0x0404000001 ",
2180 "Counter": "0,1,2,3", 567 "Counter": "0,1,2,3",
@@ -2187,6 +574,7 @@
2187 "CounterHTOff": "0,1,2,3" 574 "CounterHTOff": "0,1,2,3"
2188 }, 575 },
2189 { 576 {
577 "PublicDescription": "tbd Offcore response can be programmed only with a specific pair of event select and counter MSR, and with specific event codes and predefine mask bit value in a dedicated MSR to specify attributes of the offcore transaction.",
2190 "EventCode": "0xB7, 0xBB", 578 "EventCode": "0xB7, 0xBB",
2191 "MSRValue": "0x0204000001 ", 579 "MSRValue": "0x0204000001 ",
2192 "Counter": "0,1,2,3", 580 "Counter": "0,1,2,3",
@@ -2199,6 +587,7 @@
2199 "CounterHTOff": "0,1,2,3" 587 "CounterHTOff": "0,1,2,3"
2200 }, 588 },
2201 { 589 {
590 "PublicDescription": "tbd Offcore response can be programmed only with a specific pair of event select and counter MSR, and with specific event codes and predefine mask bit value in a dedicated MSR to specify attributes of the offcore transaction.",
2202 "EventCode": "0xB7, 0xBB", 591 "EventCode": "0xB7, 0xBB",
2203 "MSRValue": "0x0104000001 ", 592 "MSRValue": "0x0104000001 ",
2204 "Counter": "0,1,2,3", 593 "Counter": "0,1,2,3",
@@ -2211,6 +600,7 @@
2211 "CounterHTOff": "0,1,2,3" 600 "CounterHTOff": "0,1,2,3"
2212 }, 601 },
2213 { 602 {
603 "PublicDescription": "tbd Offcore response can be programmed only with a specific pair of event select and counter MSR, and with specific event codes and predefine mask bit value in a dedicated MSR to specify attributes of the offcore transaction.",
2214 "EventCode": "0xB7, 0xBB", 604 "EventCode": "0xB7, 0xBB",
2215 "MSRValue": "0x0084000001 ", 605 "MSRValue": "0x0084000001 ",
2216 "Counter": "0,1,2,3", 606 "Counter": "0,1,2,3",
@@ -2221,89 +611,5 @@
2221 "BriefDescription": "DEMAND_DATA_RD & L3_MISS_LOCAL_DRAM & SNOOP_NONE", 611 "BriefDescription": "DEMAND_DATA_RD & L3_MISS_LOCAL_DRAM & SNOOP_NONE",
2222 "Offcore": "1", 612 "Offcore": "1",
2223 "CounterHTOff": "0,1,2,3" 613 "CounterHTOff": "0,1,2,3"
2224 },
2225 {
2226 "EventCode": "0xB7, 0xBB",
2227 "MSRValue": "0x0044000001 ",
2228 "Counter": "0,1,2,3",
2229 "UMask": "0x1",
2230 "EventName": "OFFCORE_RESPONSE.DEMAND_DATA_RD.L3_MISS_LOCAL_DRAM.SPL_HIT",
2231 "MSRIndex": "0x1a6,0x1a7",
2232 "SampleAfterValue": "100003",
2233 "BriefDescription": "DEMAND_DATA_RD & L3_MISS_LOCAL_DRAM & SPL_HIT",
2234 "Offcore": "1",
2235 "CounterHTOff": "0,1,2,3"
2236 },
2237 {
2238 "EventCode": "0xB7, 0xBB",
2239 "MSRValue": "0x2000400001 ",
2240 "Counter": "0,1,2,3",
2241 "UMask": "0x1",
2242 "EventName": "OFFCORE_RESPONSE.DEMAND_DATA_RD.L4_HIT_LOCAL_L4.SNOOP_NON_DRAM",
2243 "MSRIndex": "0x1a6,0x1a7",
2244 "SampleAfterValue": "100003",
2245 "BriefDescription": "DEMAND_DATA_RD & L4_HIT_LOCAL_L4 & SNOOP_NON_DRAM",
2246 "Offcore": "1",
2247 "CounterHTOff": "0,1,2,3"
2248 },
2249 {
2250 "EventCode": "0xB7, 0xBB",
2251 "MSRValue": "0x20001c0001 ",
2252 "Counter": "0,1,2,3",
2253 "UMask": "0x1",
2254 "EventName": "OFFCORE_RESPONSE.DEMAND_DATA_RD.L3_HIT.SNOOP_NON_DRAM",
2255 "MSRIndex": "0x1a6,0x1a7",
2256 "SampleAfterValue": "100003",
2257 "BriefDescription": "DEMAND_DATA_RD & L3_HIT & SNOOP_NON_DRAM",
2258 "Offcore": "1",
2259 "CounterHTOff": "0,1,2,3"
2260 },
2261 {
2262 "EventCode": "0xB7, 0xBB",
2263 "MSRValue": "0x2000100001 ",
2264 "Counter": "0,1,2,3",
2265 "UMask": "0x1",
2266 "EventName": "OFFCORE_RESPONSE.DEMAND_DATA_RD.L3_HIT_S.SNOOP_NON_DRAM",
2267 "MSRIndex": "0x1a6,0x1a7",
2268 "SampleAfterValue": "100003",
2269 "BriefDescription": "DEMAND_DATA_RD & L3_HIT_S & SNOOP_NON_DRAM",
2270 "Offcore": "1",
2271 "CounterHTOff": "0,1,2,3"
2272 },
2273 {
2274 "EventCode": "0xB7, 0xBB",
2275 "MSRValue": "0x2000080001 ",
2276 "Counter": "0,1,2,3",
2277 "UMask": "0x1",
2278 "EventName": "OFFCORE_RESPONSE.DEMAND_DATA_RD.L3_HIT_E.SNOOP_NON_DRAM",
2279 "MSRIndex": "0x1a6,0x1a7",
2280 "SampleAfterValue": "100003",
2281 "BriefDescription": "DEMAND_DATA_RD & L3_HIT_E & SNOOP_NON_DRAM",
2282 "Offcore": "1",
2283 "CounterHTOff": "0,1,2,3"
2284 },
2285 {
2286 "EventCode": "0xB7, 0xBB",
2287 "MSRValue": "0x2000040001 ",
2288 "Counter": "0,1,2,3",
2289 "UMask": "0x1",
2290 "EventName": "OFFCORE_RESPONSE.DEMAND_DATA_RD.L3_HIT_M.SNOOP_NON_DRAM",
2291 "MSRIndex": "0x1a6,0x1a7",
2292 "SampleAfterValue": "100003",
2293 "BriefDescription": "DEMAND_DATA_RD & L3_HIT_M & SNOOP_NON_DRAM",
2294 "Offcore": "1",
2295 "CounterHTOff": "0,1,2,3"
2296 },
2297 {
2298 "EventCode": "0xB7, 0xBB",
2299 "MSRValue": "0x2000020001 ",
2300 "Counter": "0,1,2,3",
2301 "UMask": "0x1",
2302 "EventName": "OFFCORE_RESPONSE.DEMAND_DATA_RD.SUPPLIER_NONE.SNOOP_NON_DRAM",
2303 "MSRIndex": "0x1a6,0x1a7",
2304 "SampleAfterValue": "100003",
2305 "BriefDescription": "DEMAND_DATA_RD & SUPPLIER_NONE & SNOOP_NON_DRAM",
2306 "Offcore": "1",
2307 "CounterHTOff": "0,1,2,3"
2308 } 614 }
2309] \ No newline at end of file 615] \ No newline at end of file
diff --git a/tools/perf/pmu-events/arch/x86/skylake/other.json b/tools/perf/pmu-events/arch/x86/skylake/other.json
index cfdc323acc82..84a316d380ac 100644
--- a/tools/perf/pmu-events/arch/x86/skylake/other.json
+++ b/tools/perf/pmu-events/arch/x86/skylake/other.json
@@ -1,11 +1,47 @@
1[ 1[
2 { 2 {
3 "PublicDescription": "This event counts the number of hardware interruptions received by the processor.", 3 "EventCode": "0x32",
4 "Counter": "0,1,2,3",
5 "UMask": "0x1",
6 "EventName": "SW_PREFETCH_ACCESS.NTA",
7 "SampleAfterValue": "2000003",
8 "BriefDescription": "Number of PREFETCHNTA instructions executed.",
9 "CounterHTOff": "0,1,2,3,4,5,6,7"
10 },
11 {
12 "EventCode": "0x32",
13 "Counter": "0,1,2,3",
14 "UMask": "0x2",
15 "EventName": "SW_PREFETCH_ACCESS.T0",
16 "SampleAfterValue": "2000003",
17 "BriefDescription": "Number of PREFETCHT0 instructions executed.",
18 "CounterHTOff": "0,1,2,3,4,5,6,7"
19 },
20 {
21 "EventCode": "0x32",
22 "Counter": "0,1,2,3",
23 "UMask": "0x4",
24 "EventName": "SW_PREFETCH_ACCESS.T1_T2",
25 "SampleAfterValue": "2000003",
26 "BriefDescription": "Number of PREFETCHT1 or PREFETCHT2 instructions executed.",
27 "CounterHTOff": "0,1,2,3,4,5,6,7"
28 },
29 {
30 "EventCode": "0x32",
31 "Counter": "0,1,2,3",
32 "UMask": "0x8",
33 "EventName": "SW_PREFETCH_ACCESS.PREFETCHW",
34 "SampleAfterValue": "2000003",
35 "BriefDescription": "Number of PREFETCHW instructions executed.",
36 "CounterHTOff": "0,1,2,3,4,5,6,7"
37 },
38 {
39 "PublicDescription": "Counts the number of hardware interruptions received by the processor.",
4 "EventCode": "0xCB", 40 "EventCode": "0xCB",
5 "Counter": "0,1,2,3", 41 "Counter": "0,1,2,3",
6 "UMask": "0x1", 42 "UMask": "0x1",
7 "EventName": "HW_INTERRUPTS.RECEIVED", 43 "EventName": "HW_INTERRUPTS.RECEIVED",
8 "SampleAfterValue": "100003", 44 "SampleAfterValue": "203",
9 "BriefDescription": "Number of hardware interrupts received by the processor.", 45 "BriefDescription": "Number of hardware interrupts received by the processor.",
10 "CounterHTOff": "0,1,2,3,4,5,6,7" 46 "CounterHTOff": "0,1,2,3,4,5,6,7"
11 } 47 }
diff --git a/tools/perf/pmu-events/arch/x86/skylake/pipeline.json b/tools/perf/pmu-events/arch/x86/skylake/pipeline.json
index 0f7adb809be3..bc6d2afbcd8a 100644
--- a/tools/perf/pmu-events/arch/x86/skylake/pipeline.json
+++ b/tools/perf/pmu-events/arch/x86/skylake/pipeline.json
@@ -1,80 +1,92 @@
1[ 1[
2 { 2 {
3 "PublicDescription": "This event counts the number of instructions retired from execution. For instructions that consist of multiple micro-ops, this event counts the retirement of the last micro-op of the instruction. Counting continues during hardware interrupts, traps, and inside interrupt handlers. \nNotes: INST_RETIRED.ANY is counted by a designated fixed counter, leaving the four (eight when Hyperthreading is disabled) programmable counters available for other events. INST_RETIRED.ANY_P is counted by a programmable counter and it is an architectural performance event. \nCounting: Faulting executions of GETSEC/VM entry/VM Exit/MWait will not count as retired instructions.", 3 "PublicDescription": "Counts the number of instructions retired from execution. For instructions that consist of multiple micro-ops, Counts the retirement of the last micro-op of the instruction. Counting continues during hardware interrupts, traps, and inside interrupt handlers. Notes: INST_RETIRED.ANY is counted by a designated fixed counter, leaving the four (eight when Hyperthreading is disabled) programmable counters available for other events. INST_RETIRED.ANY_P is counted by a programmable counter and it is an architectural performance event. Counting: Faulting executions of GETSEC/VM entry/VM Exit/MWait will not count as retired instructions.",
4 "EventCode": "0x00", 4 "EventCode": "0x00",
5 "Counter": "Fixed counter 1", 5 "Counter": "Fixed counter 0",
6 "UMask": "0x1", 6 "UMask": "0x1",
7 "EventName": "INST_RETIRED.ANY", 7 "EventName": "INST_RETIRED.ANY",
8 "SampleAfterValue": "2000003", 8 "SampleAfterValue": "2000003",
9 "BriefDescription": "Instructions retired from execution.", 9 "BriefDescription": "Instructions retired from execution.",
10 "CounterHTOff": "Fixed counter 1" 10 "CounterHTOff": "Fixed counter 0"
11 }, 11 },
12 { 12 {
13 "PublicDescription": "This event counts the number of core cycles while the thread is not in a halt state. The thread enters the halt state when it is running the HLT instruction. This event is a component in many key event ratios. The core frequency may change from time to time due to transitions associated with Enhanced Intel SpeedStep Technology or TM2. For this reason this event may have a changing ratio with regards to time. When the core frequency is constant, this event can approximate elapsed time while the core was not in the halt state. It is counted on a dedicated fixed counter, leaving the four (eight when Hyperthreading is disabled) programmable counters available for other events.", 13 "PublicDescription": "Counts the number of core cycles while the thread is not in a halt state. The thread enters the halt state when it is running the HLT instruction. This event is a component in many key event ratios. The core frequency may change from time to time due to transitions associated with Enhanced Intel SpeedStep Technology or TM2. For this reason this event may have a changing ratio with regards to time. When the core frequency is constant, this event can approximate elapsed time while the core was not in the halt state. It is counted on a dedicated fixed counter, leaving the four (eight when Hyperthreading is disabled) programmable counters available for other events.",
14 "EventCode": "0x00", 14 "EventCode": "0x00",
15 "Counter": "Fixed counter 2", 15 "Counter": "Fixed counter 1",
16 "UMask": "0x2", 16 "UMask": "0x2",
17 "EventName": "CPU_CLK_UNHALTED.THREAD", 17 "EventName": "CPU_CLK_UNHALTED.THREAD",
18 "SampleAfterValue": "2000003", 18 "SampleAfterValue": "2000003",
19 "BriefDescription": "Core cycles when the thread is not in halt state", 19 "BriefDescription": "Core cycles when the thread is not in halt state",
20 "CounterHTOff": "Fixed counter 2" 20 "CounterHTOff": "Fixed counter 1"
21 },
22 {
23 "EventCode": "0x00",
24 "Counter": "Fixed counter 1",
25 "UMask": "0x2",
26 "AnyThread": "1",
27 "EventName": "CPU_CLK_UNHALTED.THREAD_ANY",
28 "SampleAfterValue": "2000003",
29 "BriefDescription": "Core cycles when at least one thread on the physical core is not in halt state.",
30 "CounterHTOff": "Fixed counter 1"
21 }, 31 },
22 { 32 {
23 "PublicDescription": "This event counts the number of reference cycles when the core is not in a halt state. The core enters the halt state when it is running the HLT instruction or the MWAIT instruction. This event is not affected by core frequency changes (for example, P states, TM2 transitions) but has the same incrementing frequency as the time stamp counter. This event can approximate elapsed time while the core was not in a halt state. This event has a constant ratio with the CPU_CLK_UNHALTED.REF_XCLK event. It is counted on a dedicated fixed counter, leaving the four (eight when Hyperthreading is disabled) programmable counters available for other events. Note: On all current platforms this event stops counting during 'throttling (TM)' states duty off periods the processor is 'halted'. The counter update is done at a lower clock rate then the core clock the overflow status bit for this counter may appear 'sticky'. After the counter has overflowed and software clears the overflow status bit and resets the counter to less than MAX. The reset value to the counter is not clocked immediately so the overflow status bit will flip 'high (1)' and generate another PMI (if enabled) after which the reset value gets clocked into the counter. Therefore, software will get the interrupt, read the overflow status bit '1 for bit 34 while the counter value is less than MAX. Software should ignore this case.", 33 "PublicDescription": "Counts the number of reference cycles when the core is not in a halt state. The core enters the halt state when it is running the HLT instruction or the MWAIT instruction. This event is not affected by core frequency changes (for example, P states, TM2 transitions) but has the same incrementing frequency as the time stamp counter. This event can approximate elapsed time while the core was not in a halt state. This event has a constant ratio with the CPU_CLK_UNHALTED.REF_XCLK event. It is counted on a dedicated fixed counter, leaving the four (eight when Hyperthreading is disabled) programmable counters available for other events. Note: On all current platforms this event stops counting during 'throttling (TM)' states duty off periods the processor is 'halted'. The counter update is done at a lower clock rate then the core clock the overflow status bit for this counter may appear 'sticky'. After the counter has overflowed and software clears the overflow status bit and resets the counter to less than MAX. The reset value to the counter is not clocked immediately so the overflow status bit will flip 'high (1)' and generate another PMI (if enabled) after which the reset value gets clocked into the counter. Therefore, software will get the interrupt, read the overflow status bit '1 for bit 34 while the counter value is less than MAX. Software should ignore this case.",
24 "EventCode": "0x00", 34 "EventCode": "0x00",
25 "Counter": "Fixed counter 3", 35 "Counter": "Fixed counter 2",
26 "UMask": "0x3", 36 "UMask": "0x3",
27 "EventName": "CPU_CLK_UNHALTED.REF_TSC", 37 "EventName": "CPU_CLK_UNHALTED.REF_TSC",
28 "SampleAfterValue": "2000003", 38 "SampleAfterValue": "2000003",
29 "BriefDescription": "Reference cycles when the core is not in halt state.", 39 "BriefDescription": "Reference cycles when the core is not in halt state.",
30 "CounterHTOff": "Fixed counter 3" 40 "CounterHTOff": "Fixed counter 2"
31 }, 41 },
32 { 42 {
33 "PublicDescription": "This is an architectural event that counts the number of thread cycles while the thread is not in a halt state. The thread enters the halt state when it is running the HLT instruction. The core frequency may change from time to time due to power or thermal throttling. For this reason, this event may have a changing ratio with regards to wall clock time.", 43 "PublicDescription": "Counts how many times the load operation got the true Block-on-Store blocking code preventing store forwarding. This includes cases when:a. preceding store conflicts with the load (incomplete overlap),b. store forwarding is impossible due to u-arch limitations,c. preceding lock RMW operations are not forwarded,d. store has the no-forward bit set (uncacheable/page-split/masked stores),e. all-blocking stores are used (mostly, fences and port I/O), and others.The most common case is a load blocked due to its address range overlapping with a preceding smaller uncompleted store. Note: This event does not take into account cases of out-of-SW-control (for example, SbTailHit), unknown physical STA, and cases of blocking loads on store due to being non-WB memory type or a lock. These cases are covered by other events. See the table of not supported store forwards in the Optimization Guide.",
34 "EventCode": "0x3C", 44 "EventCode": "0x03",
35 "Counter": "0,1,2,3", 45 "Counter": "0,1,2,3",
36 "UMask": "0x0", 46 "UMask": "0x2",
37 "EventName": "CPU_CLK_UNHALTED.THREAD_P", 47 "EventName": "LD_BLOCKS.STORE_FORWARD",
38 "SampleAfterValue": "2000003", 48 "SampleAfterValue": "100003",
39 "BriefDescription": "Thread cycles when thread is not in halt state", 49 "BriefDescription": "Loads blocked by overlapping with store buffer that cannot be forwarded .",
40 "CounterHTOff": "0,1,2,3,4,5,6,7" 50 "CounterHTOff": "0,1,2,3,4,5,6,7"
41 }, 51 },
42 { 52 {
43 "EventCode": "0xE6", 53 "PublicDescription": "The number of times that split load operations are temporarily blocked because all resources for handling the split accesses are in use.",
54 "EventCode": "0x03",
44 "Counter": "0,1,2,3", 55 "Counter": "0,1,2,3",
45 "UMask": "0x1", 56 "UMask": "0x8",
46 "EventName": "BACLEARS.ANY", 57 "EventName": "LD_BLOCKS.NO_SR",
47 "SampleAfterValue": "100003", 58 "SampleAfterValue": "100003",
48 "BriefDescription": "Counts the total number when the front end is resteered, mainly when the BPU cannot provide a correct prediction and this is corrected by other branch handling mechanisms at the front end.", 59 "BriefDescription": "The number of times that split load operations are temporarily blocked because all resources for handling the split accesses are in use",
49 "CounterHTOff": "0,1,2,3,4,5,6,7" 60 "CounterHTOff": "0,1,2,3,4,5,6,7"
50 }, 61 },
51 { 62 {
52 "EventCode": "0xA8", 63 "PublicDescription": "Counts false dependencies in MOB when the partial comparison upon loose net check and dependency was resolved by the Enhanced Loose net mechanism. This may not result in high performance penalties. Loose net checks can fail when loads and stores are 4k aliased.",
64 "EventCode": "0x07",
53 "Counter": "0,1,2,3", 65 "Counter": "0,1,2,3",
54 "UMask": "0x1", 66 "UMask": "0x1",
55 "EventName": "LSD.UOPS", 67 "EventName": "LD_BLOCKS_PARTIAL.ADDRESS_ALIAS",
56 "SampleAfterValue": "2000003", 68 "SampleAfterValue": "100003",
57 "BriefDescription": "Number of Uops delivered by the LSD.", 69 "BriefDescription": "False dependencies in MOB due to partial compare on address.",
58 "CounterHTOff": "0,1,2,3,4,5,6,7" 70 "CounterHTOff": "0,1,2,3,4,5,6,7"
59 }, 71 },
60 { 72 {
61 "PublicDescription": "This event counts stalls occured due to changing prefix length (66, 67 or REX.W when they change the length of the decoded instruction). Occurrences counting is proportional to the number of prefixes in a 16B-line. This may result in the following penalties: three-cycle penalty for each LCP in a 16-byte chunk.", 73 "PublicDescription": "Core cycles the Resource allocator was stalled due to recovery from an earlier branch misprediction or machine clear event.",
62 "EventCode": "0x87", 74 "EventCode": "0x0D",
63 "Counter": "0,1,2,3", 75 "Counter": "0,1,2,3",
64 "UMask": "0x1", 76 "UMask": "0x1",
65 "EventName": "ILD_STALL.LCP", 77 "EventName": "INT_MISC.RECOVERY_CYCLES",
66 "SampleAfterValue": "2000003", 78 "SampleAfterValue": "2000003",
67 "BriefDescription": "Stalls caused by changing prefix length of the instruction.", 79 "BriefDescription": "Core cycles the allocator was stalled due to recovery from earlier clear event for this thread (e.g. misprediction or memory nuke)",
68 "CounterHTOff": "0,1,2,3,4,5,6,7" 80 "CounterHTOff": "0,1,2,3,4,5,6,7"
69 }, 81 },
70 { 82 {
71 "PublicDescription": "Cycles checkpoints in Resource Allocation Table (RAT) are recovering from JEClear or machine clear.",
72 "EventCode": "0x0D", 83 "EventCode": "0x0D",
73 "Counter": "0,1,2,3", 84 "Counter": "0,1,2,3",
74 "UMask": "0x1", 85 "UMask": "0x1",
75 "EventName": "INT_MISC.RECOVERY_CYCLES", 86 "AnyThread": "1",
87 "EventName": "INT_MISC.RECOVERY_CYCLES_ANY",
76 "SampleAfterValue": "2000003", 88 "SampleAfterValue": "2000003",
77 "BriefDescription": "Core cycles the allocator was stalled due to recovery from earlier clear event for this thread (e.g. misprediction or memory nuke)", 89 "BriefDescription": "Core cycles the allocator was stalled due to recovery from earlier clear event for any thread running on the physical core (e.g. misprediction or memory nuke).",
78 "CounterHTOff": "0,1,2,3,4,5,6,7" 90 "CounterHTOff": "0,1,2,3,4,5,6,7"
79 }, 91 },
80 { 92 {
@@ -87,33 +99,35 @@
87 "CounterHTOff": "0,1,2,3,4,5,6,7" 99 "CounterHTOff": "0,1,2,3,4,5,6,7"
88 }, 100 },
89 { 101 {
90 "PublicDescription": "This event counts resource-related stall cycles. Reasons for stalls can be as follows:\n - *any* u-arch structure got full (LB, SB, RS, ROB, BOB, LM, Physical Register Reclaim Table (PRRT), or Physical History Table (PHT) slots)\n - *any* u-arch structure got empty (like INT/SIMD FreeLists)\n - FPU control word (FPCW), MXCSR\nand others. This counts cycles that the pipeline backend blocked uop delivery from the front end.", 102 "PublicDescription": "Counts the number of uops that the Resource Allocation Table (RAT) issues to the Reservation Station (RS).",
91 "EventCode": "0xA2", 103 "EventCode": "0x0E",
92 "Counter": "0,1,2,3", 104 "Counter": "0,1,2,3",
93 "UMask": "0x1", 105 "UMask": "0x1",
94 "EventName": "RESOURCE_STALLS.ANY", 106 "EventName": "UOPS_ISSUED.ANY",
95 "SampleAfterValue": "2000003", 107 "SampleAfterValue": "2000003",
96 "BriefDescription": "Resource-related stall cycles", 108 "BriefDescription": "Uops that Resource Allocation Table (RAT) issues to Reservation Station (RS)",
97 "CounterHTOff": "0,1,2,3,4,5,6,7" 109 "CounterHTOff": "0,1,2,3,4,5,6,7"
98 }, 110 },
99 { 111 {
100 "PublicDescription": "This event counts stall cycles caused by the store buffer (SB) overflow (excluding draining from synch). This counts cycles that the pipeline backend blocked uop delivery from the front end.", 112 "PublicDescription": "Counts cycles during which the Resource Allocation Table (RAT) does not issue any Uops to the reservation station (RS) for the current thread.",
101 "EventCode": "0xA2", 113 "EventCode": "0x0E",
114 "Invert": "1",
102 "Counter": "0,1,2,3", 115 "Counter": "0,1,2,3",
103 "UMask": "0x8", 116 "UMask": "0x1",
104 "EventName": "RESOURCE_STALLS.SB", 117 "EventName": "UOPS_ISSUED.STALL_CYCLES",
105 "SampleAfterValue": "2000003", 118 "SampleAfterValue": "2000003",
106 "BriefDescription": "Cycles stalled due to no store buffers available. (not including draining form sync).", 119 "BriefDescription": "Cycles when Resource Allocation Table (RAT) does not issue Uops to Reservation Station (RS) for the thread",
120 "CounterMask": "1",
107 "CounterHTOff": "0,1,2,3,4,5,6,7" 121 "CounterHTOff": "0,1,2,3,4,5,6,7"
108 }, 122 },
109 { 123 {
110 "PublicDescription": "This event counts the number of Uops issued by the Resource Allocation Table (RAT) to the reservation station (RS).", 124 "PublicDescription": "Counts the number of Blend Uops issued by the Resource Allocation Table (RAT) to the reservation station (RS) in order to preserve upper bits of vector registers. Starting with the Skylake microarchitecture, these Blend uops are needed since every Intel SSE instruction executed in Dirty Upper State needs to preserve bits 128-255 of the destination register. For more information, refer to Mixing Intel AVX and Intel SSE Code section of the Optimization Guide.",
111 "EventCode": "0x0E", 125 "EventCode": "0x0E",
112 "Counter": "0,1,2,3", 126 "Counter": "0,1,2,3",
113 "UMask": "0x1", 127 "UMask": "0x2",
114 "EventName": "UOPS_ISSUED.ANY", 128 "EventName": "UOPS_ISSUED.VECTOR_WIDTH_MISMATCH",
115 "SampleAfterValue": "2000003", 129 "SampleAfterValue": "2000003",
116 "BriefDescription": "Uops that Resource Allocation Table (RAT) issues to Reservation Station (RS)", 130 "BriefDescription": "Uops inserted at issue-stage in order to preserve upper bits of vector registers.",
117 "CounterHTOff": "0,1,2,3,4,5,6,7" 131 "CounterHTOff": "0,1,2,3,4,5,6,7"
118 }, 132 },
119 { 133 {
@@ -126,361 +140,318 @@
126 "CounterHTOff": "0,1,2,3,4,5,6,7" 140 "CounterHTOff": "0,1,2,3,4,5,6,7"
127 }, 141 },
128 { 142 {
129 "PublicDescription": "This event counts cycles during which the Resource Allocation Table (RAT) does not issue any Uops to the reservation station (RS) for the current thread.", 143 "EventCode": "0x14",
130 "EventCode": "0x0E",
131 "Invert": "1",
132 "Counter": "0,1,2,3", 144 "Counter": "0,1,2,3",
133 "UMask": "0x1", 145 "UMask": "0x1",
134 "EventName": "UOPS_ISSUED.STALL_CYCLES", 146 "EventName": "ARITH.DIVIDER_ACTIVE",
135 "SampleAfterValue": "2000003", 147 "SampleAfterValue": "2000003",
136 "BriefDescription": "Cycles when Resource Allocation Table (RAT) does not issue Uops to Reservation Station (RS) for the thread", 148 "BriefDescription": "Cycles when divide unit is busy executing divide or square root operations. Accounts for integer and floating-point operations.",
137 "CounterMask": "1", 149 "CounterMask": "1",
138 "CounterHTOff": "0,1,2,3,4,5,6,7" 150 "CounterHTOff": "0,1,2,3,4,5,6,7"
139 }, 151 },
140 { 152 {
141 "PublicDescription": "This event counts cycles during which the reservation station (RS) is empty for the thread.\nNote: In ST-mode, not active thread should drive 0. This is usually caused by severely costly branch mispredictions, or allocator/FE issues.", 153 "PublicDescription": "This is an architectural event that counts the number of thread cycles while the thread is not in a halt state. The thread enters the halt state when it is running the HLT instruction. The core frequency may change from time to time due to power or thermal throttling. For this reason, this event may have a changing ratio with regards to wall clock time.",
142 "EventCode": "0x5E", 154 "EventCode": "0x3C",
143 "Counter": "0,1,2,3", 155 "Counter": "0,1,2,3",
144 "UMask": "0x1", 156 "UMask": "0x0",
145 "EventName": "RS_EVENTS.EMPTY_CYCLES", 157 "EventName": "CPU_CLK_UNHALTED.THREAD_P",
146 "SampleAfterValue": "2000003", 158 "SampleAfterValue": "2000003",
147 "BriefDescription": "Cycles when Reservation Station (RS) is empty for the thread", 159 "BriefDescription": "Thread cycles when thread is not in halt state",
148 "CounterHTOff": "0,1,2,3,4,5,6,7" 160 "CounterHTOff": "0,1,2,3,4,5,6,7"
149 }, 161 },
150 { 162 {
151 "EventCode": "0x5E", 163 "EventCode": "0x3C",
152 "Invert": "1",
153 "Counter": "0,1,2,3", 164 "Counter": "0,1,2,3",
154 "UMask": "0x1", 165 "UMask": "0x0",
155 "EdgeDetect": "1", 166 "AnyThread": "1",
156 "EventName": "RS_EVENTS.EMPTY_END", 167 "EventName": "CPU_CLK_UNHALTED.THREAD_P_ANY",
157 "SampleAfterValue": "2000003", 168 "SampleAfterValue": "2000003",
158 "BriefDescription": "Counts end of periods where the Reservation Station (RS) was empty. Could be useful to precisely locate Frontend Latency Bound issues.", 169 "BriefDescription": "Core cycles when at least one thread on the physical core is not in halt state.",
159 "CounterMask": "1",
160 "CounterHTOff": "0,1,2,3,4,5,6,7" 170 "CounterHTOff": "0,1,2,3,4,5,6,7"
161 }, 171 },
162 { 172 {
163 "PublicDescription": "Increments when an entry is added to the Last Branch Record (LBR) array (or removed from the array in case of RETURNs in call stack mode). The event requires LBR enable via IA32_DEBUGCTL MSR and branch type selection via MSR_LBR_SELECT.", 173 "PublicDescription": "Counts when the Current Privilege Level (CPL) transitions from ring 1, 2 or 3 to ring 0 (Kernel).",
164 "EventCode": "0xCC", 174 "EventCode": "0x3C",
165 "Counter": "0,1,2,3", 175 "Counter": "0,1,2,3",
166 "UMask": "0x20", 176 "UMask": "0x0",
167 "EventName": "ROB_MISC_EVENTS.LBR_INSERTS", 177 "EdgeDetect": "1",
168 "SampleAfterValue": "2000003", 178 "EventName": "CPU_CLK_UNHALTED.RING0_TRANS",
169 "BriefDescription": "Increments whenever there is an update to the LBR array.", 179 "SampleAfterValue": "100007",
180 "BriefDescription": "Counts when there is a transition from ring 1, 2 or 3 to ring 0.",
181 "CounterMask": "1",
170 "CounterHTOff": "0,1,2,3,4,5,6,7" 182 "CounterHTOff": "0,1,2,3,4,5,6,7"
171 }, 183 },
172 { 184 {
173 "PublicDescription": "Number of machine clears (nukes) of any type.", 185 "EventCode": "0x3C",
174 "EventCode": "0xC3",
175 "Counter": "0,1,2,3", 186 "Counter": "0,1,2,3",
176 "UMask": "0x1", 187 "UMask": "0x1",
177 "EdgeDetect": "1", 188 "EventName": "CPU_CLK_THREAD_UNHALTED.REF_XCLK",
178 "EventName": "MACHINE_CLEARS.COUNT", 189 "SampleAfterValue": "2503",
179 "SampleAfterValue": "100003", 190 "BriefDescription": "Core crystal clock cycles when the thread is unhalted.",
180 "BriefDescription": "Number of machine clears (nukes) of any type. ",
181 "CounterMask": "1",
182 "CounterHTOff": "0,1,2,3,4,5,6,7" 191 "CounterHTOff": "0,1,2,3,4,5,6,7"
183 }, 192 },
184 { 193 {
185 "PublicDescription": "This event counts self-modifying code (SMC) detected, which causes a machine clear.", 194 "EventCode": "0x3C",
186 "EventCode": "0xC3",
187 "Counter": "0,1,2,3", 195 "Counter": "0,1,2,3",
188 "UMask": "0x4", 196 "UMask": "0x1",
189 "EventName": "MACHINE_CLEARS.SMC", 197 "AnyThread": "1",
190 "SampleAfterValue": "100003", 198 "EventName": "CPU_CLK_THREAD_UNHALTED.REF_XCLK_ANY",
191 "BriefDescription": "Self-modifying code (SMC) detected.", 199 "SampleAfterValue": "2503",
200 "BriefDescription": "Core crystal clock cycles when at least one thread on the physical core is unhalted.",
192 "CounterHTOff": "0,1,2,3,4,5,6,7" 201 "CounterHTOff": "0,1,2,3,4,5,6,7"
193 }, 202 },
194 { 203 {
195 "PublicDescription": "This event counts the number of instructions (EOMs) retired. Counting covers macro-fused instructions individually (that is, increments by two).", 204 "EventCode": "0x3C",
196 "EventCode": "0xC0",
197 "Counter": "0,1,2,3", 205 "Counter": "0,1,2,3",
198 "UMask": "0x0", 206 "UMask": "0x1",
199 "Errata": "SKL091, SKL044", 207 "EventName": "CPU_CLK_UNHALTED.REF_XCLK",
200 "EventName": "INST_RETIRED.ANY_P", 208 "SampleAfterValue": "2503",
201 "SampleAfterValue": "2000003", 209 "BriefDescription": "Core crystal clock cycles when the thread is unhalted.",
202 "BriefDescription": "Number of instructions retired. General Counter - architectural event",
203 "CounterHTOff": "0,1,2,3,4,5,6,7" 210 "CounterHTOff": "0,1,2,3,4,5,6,7"
204 }, 211 },
205 { 212 {
206 "PEBS": "2", 213 "EventCode": "0x3C",
207 "PublicDescription": "This is a precise version (that is, uses PEBS) of the event that counts instructions retired.", 214 "Counter": "0,1,2,3",
208 "EventCode": "0xC0",
209 "Counter": "1",
210 "UMask": "0x1", 215 "UMask": "0x1",
211 "Errata": "SKL091, SKL044", 216 "AnyThread": "1",
212 "EventName": "INST_RETIRED.PREC_DIST", 217 "EventName": "CPU_CLK_UNHALTED.REF_XCLK_ANY",
213 "SampleAfterValue": "2000003", 218 "SampleAfterValue": "2503",
214 "BriefDescription": "Precise instruction retired event with HW to reduce effect of PEBS shadow in IP distribution", 219 "BriefDescription": "Core crystal clock cycles when at least one thread on the physical core is unhalted.",
215 "CounterHTOff": "1" 220 "CounterHTOff": "0,1,2,3,4,5,6,7"
216 }, 221 },
217 { 222 {
218 "PublicDescription": "This is a non-precise version (that is, does not use PEBS) of the event that counts the number of retirement slots used.", 223 "EventCode": "0x3C",
219 "EventCode": "0xC2",
220 "Counter": "0,1,2,3", 224 "Counter": "0,1,2,3",
221 "UMask": "0x2", 225 "UMask": "0x2",
222 "EventName": "UOPS_RETIRED.RETIRE_SLOTS", 226 "EventName": "CPU_CLK_THREAD_UNHALTED.ONE_THREAD_ACTIVE",
223 "SampleAfterValue": "2000003", 227 "SampleAfterValue": "2000003",
224 "BriefDescription": "Retirement slots used.", 228 "BriefDescription": "Core crystal clock cycles when this thread is unhalted and the other thread is halted.",
225 "CounterHTOff": "0,1,2,3,4,5,6,7" 229 "CounterHTOff": "0,1,2,3,4,5,6,7"
226 }, 230 },
227 { 231 {
228 "PublicDescription": "This is a non-precise version (that is, does not use PEBS) of the event that counts cycles without actually retired uops.", 232 "EventCode": "0x3C",
229 "EventCode": "0xC2",
230 "Invert": "1",
231 "Counter": "0,1,2,3", 233 "Counter": "0,1,2,3",
232 "UMask": "0x1", 234 "UMask": "0x2",
233 "EventName": "UOPS_RETIRED.STALL_CYCLES", 235 "EventName": "CPU_CLK_UNHALTED.ONE_THREAD_ACTIVE",
234 "SampleAfterValue": "2000003", 236 "SampleAfterValue": "2503",
235 "BriefDescription": "Cycles without actually retired uops.", 237 "BriefDescription": "Core crystal clock cycles when this thread is unhalted and the other thread is halted.",
236 "CounterMask": "1",
237 "CounterHTOff": "0,1,2,3,4,5,6,7" 238 "CounterHTOff": "0,1,2,3,4,5,6,7"
238 }, 239 },
239 { 240 {
240 "PublicDescription": "Number of cycles using always true condition (uops_ret < 16) applied to non PEBS uops retired event.", 241 "PublicDescription": "Counts all not software-prefetch load dispatches that hit the fill buffer (FB) allocated for the software prefetch. It can also be incremented by some lock instructions. So it should only be used with profiling so that the locks can be excluded by ASM (Assembly File) inspection of the nearby instructions.",
241 "EventCode": "0xC2", 242 "EventCode": "0x4C",
242 "Invert": "1",
243 "Counter": "0,1,2,3", 243 "Counter": "0,1,2,3",
244 "UMask": "0x1", 244 "UMask": "0x1",
245 "EventName": "UOPS_RETIRED.TOTAL_CYCLES", 245 "EventName": "LOAD_HIT_PRE.SW_PF",
246 "SampleAfterValue": "2000003", 246 "SampleAfterValue": "100003",
247 "BriefDescription": "Cycles with less than 10 actually retired uops.", 247 "BriefDescription": "Demand load dispatches that hit L1D fill buffer (FB) allocated for software prefetch.",
248 "CounterMask": "10",
249 "CounterHTOff": "0,1,2,3,4,5,6,7" 248 "CounterHTOff": "0,1,2,3,4,5,6,7"
250 }, 249 },
251 { 250 {
252 "PEBS": "1", 251 "PublicDescription": "Counts cycles during which the reservation station (RS) is empty for the thread.; Note: In ST-mode, not active thread should drive 0. This is usually caused by severely costly branch mispredictions, or allocator/FE issues.",
253 "PublicDescription": "This is a non-precise version (that is, does not use PEBS) of the event that counts conditional branch instructions retired.", 252 "EventCode": "0x5E",
254 "EventCode": "0xC4",
255 "Counter": "0,1,2,3", 253 "Counter": "0,1,2,3",
256 "UMask": "0x1", 254 "UMask": "0x1",
257 "Errata": "SKL091", 255 "EventName": "RS_EVENTS.EMPTY_CYCLES",
258 "EventName": "BR_INST_RETIRED.CONDITIONAL", 256 "SampleAfterValue": "2000003",
259 "SampleAfterValue": "400009", 257 "BriefDescription": "Cycles when Reservation Station (RS) is empty for the thread",
260 "BriefDescription": "Conditional branch instructions retired.",
261 "CounterHTOff": "0,1,2,3,4,5,6,7" 258 "CounterHTOff": "0,1,2,3,4,5,6,7"
262 }, 259 },
263 { 260 {
264 "PEBS": "1", 261 "PublicDescription": "Counts end of periods where the Reservation Station (RS) was empty. Could be useful to precisely locate front-end Latency Bound issues.",
265 "PublicDescription": "This is a non-precise version (that is, does not use PEBS) of the event that counts both direct and indirect near call instructions retired.", 262 "EventCode": "0x5E",
266 "EventCode": "0xC4", 263 "Invert": "1",
267 "Counter": "0,1,2,3", 264 "Counter": "0,1,2,3",
268 "UMask": "0x2", 265 "UMask": "0x1",
269 "Errata": "SKL091", 266 "EdgeDetect": "1",
270 "EventName": "BR_INST_RETIRED.NEAR_CALL", 267 "EventName": "RS_EVENTS.EMPTY_END",
271 "SampleAfterValue": "100007", 268 "SampleAfterValue": "2000003",
272 "BriefDescription": "Direct and indirect near call instructions retired.", 269 "BriefDescription": "Counts end of periods where the Reservation Station (RS) was empty. Could be useful to precisely locate Frontend Latency Bound issues.",
270 "CounterMask": "1",
273 "CounterHTOff": "0,1,2,3,4,5,6,7" 271 "CounterHTOff": "0,1,2,3,4,5,6,7"
274 }, 272 },
275 { 273 {
276 "PublicDescription": "This event counts all (macro) branch instructions retired.", 274 "PublicDescription": "Counts cycles that the Instruction Length decoder (ILD) stalls occurred due to dynamically changing prefix length of the decoded instruction (by operand size prefix instruction 0x66, address size prefix instruction 0x67 or REX.W for Intel64). Count is proportional to the number of prefixes in a 16B-line. This may result in a three-cycle penalty for each LCP (Length changing prefix) in a 16-byte chunk.",
277 "EventCode": "0xC4", 275 "EventCode": "0x87",
278 "Counter": "0,1,2,3", 276 "Counter": "0,1,2,3",
279 "UMask": "0x0", 277 "UMask": "0x1",
280 "Errata": "SKL091", 278 "EventName": "ILD_STALL.LCP",
281 "EventName": "BR_INST_RETIRED.ALL_BRANCHES", 279 "SampleAfterValue": "2000003",
282 "SampleAfterValue": "400009", 280 "BriefDescription": "Stalls caused by changing prefix length of the instruction.",
283 "BriefDescription": "All (macro) branch instructions retired.",
284 "CounterHTOff": "0,1,2,3,4,5,6,7" 281 "CounterHTOff": "0,1,2,3,4,5,6,7"
285 }, 282 },
286 { 283 {
287 "PEBS": "1", 284 "PublicDescription": "Counts, on the per-thread basis, cycles during which at least one uop is dispatched from the Reservation Station (RS) to port 0.",
288 "PublicDescription": "This is a non-precise version (that is, does not use PEBS) of the event that counts return instructions retired.", 285 "EventCode": "0xA1",
289 "EventCode": "0xC4",
290 "Counter": "0,1,2,3", 286 "Counter": "0,1,2,3",
291 "UMask": "0x8", 287 "UMask": "0x1",
292 "Errata": "SKL091", 288 "EventName": "UOPS_DISPATCHED_PORT.PORT_0",
293 "EventName": "BR_INST_RETIRED.NEAR_RETURN", 289 "SampleAfterValue": "2000003",
294 "SampleAfterValue": "100007", 290 "BriefDescription": "Cycles per thread when uops are executed in port 0",
295 "BriefDescription": "Return instructions retired.",
296 "CounterHTOff": "0,1,2,3,4,5,6,7" 291 "CounterHTOff": "0,1,2,3,4,5,6,7"
297 }, 292 },
298 { 293 {
299 "PublicDescription": "This is a non-precise version (that is, does not use PEBS) of the event that counts not taken branch instructions retired.", 294 "PublicDescription": "Counts, on the per-thread basis, cycles during which at least one uop is dispatched from the Reservation Station (RS) to port 1.",
300 "EventCode": "0xC4", 295 "EventCode": "0xA1",
301 "Counter": "0,1,2,3", 296 "Counter": "0,1,2,3",
302 "UMask": "0x10", 297 "UMask": "0x2",
303 "Errata": "SKL091", 298 "EventName": "UOPS_DISPATCHED_PORT.PORT_1",
304 "EventName": "BR_INST_RETIRED.NOT_TAKEN", 299 "SampleAfterValue": "2000003",
305 "SampleAfterValue": "400009", 300 "BriefDescription": "Cycles per thread when uops are executed in port 1",
306 "BriefDescription": "Not taken branch instructions retired.",
307 "CounterHTOff": "0,1,2,3,4,5,6,7" 301 "CounterHTOff": "0,1,2,3,4,5,6,7"
308 }, 302 },
309 { 303 {
310 "PEBS": "1", 304 "PublicDescription": "Counts, on the per-thread basis, cycles during which at least one uop is dispatched from the Reservation Station (RS) to port 2.",
311 "PublicDescription": "This is a non-precise version (that is, does not use PEBS) of the event that counts taken branch instructions retired.", 305 "EventCode": "0xA1",
312 "EventCode": "0xC4",
313 "Counter": "0,1,2,3", 306 "Counter": "0,1,2,3",
314 "UMask": "0x20", 307 "UMask": "0x4",
315 "Errata": "SKL091", 308 "EventName": "UOPS_DISPATCHED_PORT.PORT_2",
316 "EventName": "BR_INST_RETIRED.NEAR_TAKEN", 309 "SampleAfterValue": "2000003",
317 "SampleAfterValue": "400009", 310 "BriefDescription": "Cycles per thread when uops are executed in port 2",
318 "BriefDescription": "Taken branch instructions retired.",
319 "CounterHTOff": "0,1,2,3,4,5,6,7" 311 "CounterHTOff": "0,1,2,3,4,5,6,7"
320 }, 312 },
321 { 313 {
322 "PEBS": "1", 314 "PublicDescription": "Counts, on the per-thread basis, cycles during which at least one uop is dispatched from the Reservation Station (RS) to port 3.",
323 "PublicDescription": "This is a non-precise version (that is, does not use PEBS) of the event that counts far branch instructions retired.", 315 "EventCode": "0xA1",
324 "EventCode": "0xC4",
325 "Counter": "0,1,2,3", 316 "Counter": "0,1,2,3",
326 "UMask": "0x40", 317 "UMask": "0x8",
327 "Errata": "SKL091", 318 "EventName": "UOPS_DISPATCHED_PORT.PORT_3",
328 "EventName": "BR_INST_RETIRED.FAR_BRANCH", 319 "SampleAfterValue": "2000003",
329 "SampleAfterValue": "100007", 320 "BriefDescription": "Cycles per thread when uops are executed in port 3",
330 "BriefDescription": "Far branch instructions retired.",
331 "CounterHTOff": "0,1,2,3,4,5,6,7" 321 "CounterHTOff": "0,1,2,3,4,5,6,7"
332 }, 322 },
333 { 323 {
334 "PEBS": "2", 324 "PublicDescription": "Counts, on the per-thread basis, cycles during which at least one uop is dispatched from the Reservation Station (RS) to port 4.",
335 "PublicDescription": "This is a precise version of BR_INST_RETIRED.ALL_BRANCHES that counts all (macro) branch instructions retired.", 325 "EventCode": "0xA1",
336 "EventCode": "0xC4",
337 "Counter": "0,1,2,3",
338 "UMask": "0x4",
339 "Errata": "SKL091",
340 "EventName": "BR_INST_RETIRED.ALL_BRANCHES_PEBS",
341 "SampleAfterValue": "400009",
342 "BriefDescription": "All (macro) branch instructions retired. ",
343 "CounterHTOff": "0,1,2,3"
344 },
345 {
346 "PEBS": "1",
347 "PublicDescription": "This is a non-precise version (that is, does not use PEBS) of the event that counts mispredicted conditional branch instructions retired.",
348 "EventCode": "0xC5",
349 "Counter": "0,1,2,3", 326 "Counter": "0,1,2,3",
350 "UMask": "0x1", 327 "UMask": "0x10",
351 "EventName": "BR_MISP_RETIRED.CONDITIONAL", 328 "EventName": "UOPS_DISPATCHED_PORT.PORT_4",
352 "SampleAfterValue": "400009", 329 "SampleAfterValue": "2000003",
353 "BriefDescription": "Mispredicted conditional branch instructions retired.", 330 "BriefDescription": "Cycles per thread when uops are executed in port 4",
354 "CounterHTOff": "0,1,2,3,4,5,6,7" 331 "CounterHTOff": "0,1,2,3,4,5,6,7"
355 }, 332 },
356 { 333 {
357 "PEBS": "1", 334 "PublicDescription": "Counts, on the per-thread basis, cycles during which at least one uop is dispatched from the Reservation Station (RS) to port 5.",
358 "PublicDescription": "This event counts both taken and not taken retired mispredicted direct and indirect near calls, including both register and memory indirect.", 335 "EventCode": "0xA1",
359 "EventCode": "0xC5",
360 "Counter": "0,1,2,3", 336 "Counter": "0,1,2,3",
361 "UMask": "0x2", 337 "UMask": "0x20",
362 "EventName": "BR_MISP_RETIRED.NEAR_CALL", 338 "EventName": "UOPS_DISPATCHED_PORT.PORT_5",
363 "SampleAfterValue": "400009", 339 "SampleAfterValue": "2000003",
364 "BriefDescription": "Mispredicted direct and indirect near call instructions retired.", 340 "BriefDescription": "Cycles per thread when uops are executed in port 5",
365 "CounterHTOff": "0,1,2,3,4,5,6,7" 341 "CounterHTOff": "0,1,2,3,4,5,6,7"
366 }, 342 },
367 { 343 {
368 "PublicDescription": "This event counts all mispredicted macro branch instructions retired.", 344 "PublicDescription": "Counts, on the per-thread basis, cycles during which at least one uop is dispatched from the Reservation Station (RS) to port 6.",
369 "EventCode": "0xC5", 345 "EventCode": "0xA1",
370 "Counter": "0,1,2,3", 346 "Counter": "0,1,2,3",
371 "UMask": "0x0", 347 "UMask": "0x40",
372 "EventName": "BR_MISP_RETIRED.ALL_BRANCHES", 348 "EventName": "UOPS_DISPATCHED_PORT.PORT_6",
373 "SampleAfterValue": "400009", 349 "SampleAfterValue": "2000003",
374 "BriefDescription": "All mispredicted macro branch instructions retired.", 350 "BriefDescription": "Cycles per thread when uops are executed in port 6",
375 "CounterHTOff": "0,1,2,3,4,5,6,7" 351 "CounterHTOff": "0,1,2,3,4,5,6,7"
376 }, 352 },
377 { 353 {
378 "PEBS": "1", 354 "PublicDescription": "Counts, on the per-thread basis, cycles during which at least one uop is dispatched from the Reservation Station (RS) to port 7.",
379 "EventCode": "0xC5", 355 "EventCode": "0xA1",
380 "Counter": "0,1,2,3", 356 "Counter": "0,1,2,3",
381 "UMask": "0x20", 357 "UMask": "0x80",
382 "EventName": "BR_MISP_RETIRED.NEAR_TAKEN", 358 "EventName": "UOPS_DISPATCHED_PORT.PORT_7",
383 "SampleAfterValue": "400009", 359 "SampleAfterValue": "2000003",
384 "BriefDescription": "Number of near branch instructions retired that were mispredicted and taken.", 360 "BriefDescription": "Cycles per thread when uops are executed in port 7",
385 "CounterHTOff": "0,1,2,3,4,5,6,7" 361 "CounterHTOff": "0,1,2,3,4,5,6,7"
386 }, 362 },
387 { 363 {
388 "PEBS": "2", 364 "PublicDescription": "Counts resource-related stall cycles. Reasons for stalls can be as follows:a. *any* u-arch structure got full (LB, SB, RS, ROB, BOB, LM, Physical Register Reclaim Table (PRRT), or Physical History Table (PHT) slots).b. *any* u-arch structure got empty (like INT/SIMD FreeLists).c. FPU control word (FPCW), MXCSR.and others. This counts cycles that the pipeline back-end blocked uop delivery from the front-end.",
389 "PublicDescription": "This is a precise version of BR_MISP_RETIRED.ALL_BRANCHES that counts all mispredicted macro branch instructions retired.", 365 "EventCode": "0xA2",
390 "EventCode": "0xC5",
391 "Counter": "0,1,2,3", 366 "Counter": "0,1,2,3",
392 "UMask": "0x4", 367 "UMask": "0x1",
393 "EventName": "BR_MISP_RETIRED.ALL_BRANCHES_PEBS", 368 "EventName": "RESOURCE_STALLS.ANY",
394 "SampleAfterValue": "400009", 369 "SampleAfterValue": "2000003",
395 "BriefDescription": "Mispredicted macro branch instructions retired. ", 370 "BriefDescription": "Resource-related stall cycles",
396 "CounterHTOff": "0,1,2,3" 371 "CounterHTOff": "0,1,2,3,4,5,6,7"
397 }, 372 },
398 { 373 {
399 "PublicDescription": "Number of uops to be executed per-thread each cycle.", 374 "PublicDescription": "Counts allocation stall cycles caused by the store buffer (SB) being full. This counts cycles that the pipeline back-end blocked uop delivery from the front-end.",
400 "EventCode": "0xB1", 375 "EventCode": "0xA2",
401 "Counter": "0,1,2,3", 376 "Counter": "0,1,2,3",
402 "UMask": "0x1", 377 "UMask": "0x8",
403 "EventName": "UOPS_EXECUTED.THREAD", 378 "EventName": "RESOURCE_STALLS.SB",
404 "SampleAfterValue": "2000003", 379 "SampleAfterValue": "2000003",
405 "BriefDescription": "Counts the number of uops to be executed per-thread each cycle.", 380 "BriefDescription": "Cycles stalled due to no store buffers available. (not including draining form sync).",
406 "CounterHTOff": "0,1,2,3,4,5,6,7" 381 "CounterHTOff": "0,1,2,3,4,5,6,7"
407 }, 382 },
408 { 383 {
409 "PublicDescription": "Number of uops executed from any thread.", 384 "EventCode": "0xA3",
410 "EventCode": "0xB1",
411 "Counter": "0,1,2,3", 385 "Counter": "0,1,2,3",
412 "UMask": "0x2", 386 "UMask": "0x1",
413 "EventName": "UOPS_EXECUTED.CORE", 387 "EventName": "CYCLE_ACTIVITY.CYCLES_L2_MISS",
414 "SampleAfterValue": "2000003", 388 "SampleAfterValue": "2000003",
415 "BriefDescription": "Number of uops executed on the core.", 389 "BriefDescription": "Cycles while L2 cache miss demand load is outstanding.",
390 "CounterMask": "1",
416 "CounterHTOff": "0,1,2,3,4,5,6,7" 391 "CounterHTOff": "0,1,2,3,4,5,6,7"
417 }, 392 },
418 { 393 {
419 "EventCode": "0xB1", 394 "EventCode": "0xA3",
420 "Counter": "0,1,2,3", 395 "Counter": "0,1,2,3",
421 "UMask": "0x10", 396 "UMask": "0x4",
422 "EventName": "UOPS_EXECUTED.X87", 397 "EventName": "CYCLE_ACTIVITY.STALLS_TOTAL",
423 "SampleAfterValue": "2000003", 398 "SampleAfterValue": "2000003",
424 "BriefDescription": "Counts the number of x87 uops dispatched.", 399 "BriefDescription": "Total execution stalls.",
400 "CounterMask": "4",
425 "CounterHTOff": "0,1,2,3,4,5,6,7" 401 "CounterHTOff": "0,1,2,3,4,5,6,7"
426 }, 402 },
427 { 403 {
428 "PublicDescription": "This event counts cycles during which no uops were dispatched from the Reservation Station (RS) per thread.", 404 "EventCode": "0xA3",
429 "EventCode": "0xB1",
430 "Invert": "1",
431 "Counter": "0,1,2,3", 405 "Counter": "0,1,2,3",
432 "UMask": "0x1", 406 "UMask": "0x5",
433 "EventName": "UOPS_EXECUTED.STALL_CYCLES", 407 "EventName": "CYCLE_ACTIVITY.STALLS_L2_MISS",
434 "SampleAfterValue": "2000003", 408 "SampleAfterValue": "2000003",
435 "BriefDescription": "Counts number of cycles no uops were dispatched to be executed on this thread.", 409 "BriefDescription": "Execution stalls while L2 cache miss demand load is outstanding.",
436 "CounterMask": "1", 410 "CounterMask": "5",
437 "CounterHTOff": "0,1,2,3,4,5,6,7" 411 "CounterHTOff": "0,1,2,3,4,5,6,7"
438 }, 412 },
439 { 413 {
440 "PublicDescription": "Cycles where at least 1 uop was executed per-thread.", 414 "EventCode": "0xA3",
441 "EventCode": "0xB1",
442 "Counter": "0,1,2,3", 415 "Counter": "0,1,2,3",
443 "UMask": "0x1", 416 "UMask": "0x8",
444 "EventName": "UOPS_EXECUTED.CYCLES_GE_1_UOP_EXEC", 417 "EventName": "CYCLE_ACTIVITY.CYCLES_L1D_MISS",
445 "SampleAfterValue": "2000003", 418 "SampleAfterValue": "2000003",
446 "BriefDescription": "Cycles where at least 1 uop was executed per-thread", 419 "BriefDescription": "Cycles while L1 cache miss demand load is outstanding.",
447 "CounterMask": "1", 420 "CounterMask": "8",
448 "CounterHTOff": "0,1,2,3,4,5,6,7" 421 "CounterHTOff": "0,1,2,3,4,5,6,7"
449 }, 422 },
450 { 423 {
451 "PublicDescription": "Cycles where at least 2 uops were executed per-thread.", 424 "EventCode": "0xA3",
452 "EventCode": "0xB1",
453 "Counter": "0,1,2,3", 425 "Counter": "0,1,2,3",
454 "UMask": "0x1", 426 "UMask": "0xc",
455 "EventName": "UOPS_EXECUTED.CYCLES_GE_2_UOPS_EXEC", 427 "EventName": "CYCLE_ACTIVITY.STALLS_L1D_MISS",
456 "SampleAfterValue": "2000003", 428 "SampleAfterValue": "2000003",
457 "BriefDescription": "Cycles where at least 2 uops were executed per-thread", 429 "BriefDescription": "Execution stalls while L1 cache miss demand load is outstanding.",
458 "CounterMask": "2", 430 "CounterMask": "12",
459 "CounterHTOff": "0,1,2,3,4,5,6,7" 431 "CounterHTOff": "0,1,2,3,4,5,6,7"
460 }, 432 },
461 { 433 {
462 "PublicDescription": "Cycles where at least 3 uops were executed per-thread.", 434 "EventCode": "0xA3",
463 "EventCode": "0xB1",
464 "Counter": "0,1,2,3", 435 "Counter": "0,1,2,3",
465 "UMask": "0x1", 436 "UMask": "0x10",
466 "EventName": "UOPS_EXECUTED.CYCLES_GE_3_UOPS_EXEC", 437 "EventName": "CYCLE_ACTIVITY.CYCLES_MEM_ANY",
467 "SampleAfterValue": "2000003", 438 "SampleAfterValue": "2000003",
468 "BriefDescription": "Cycles where at least 3 uops were executed per-thread", 439 "BriefDescription": "Cycles while memory subsystem has an outstanding load.",
469 "CounterMask": "3", 440 "CounterMask": "16",
470 "CounterHTOff": "0,1,2,3,4,5,6,7" 441 "CounterHTOff": "0,1,2,3,4,5,6,7"
471 }, 442 },
472 { 443 {
473 "PublicDescription": "Cycles where at least 4 uops were executed per-thread.", 444 "EventCode": "0xA3",
474 "EventCode": "0xB1",
475 "Counter": "0,1,2,3", 445 "Counter": "0,1,2,3",
476 "UMask": "0x1", 446 "UMask": "0x14",
477 "EventName": "UOPS_EXECUTED.CYCLES_GE_4_UOPS_EXEC", 447 "EventName": "CYCLE_ACTIVITY.STALLS_MEM_ANY",
478 "SampleAfterValue": "2000003", 448 "SampleAfterValue": "2000003",
479 "BriefDescription": "Cycles where at least 4 uops were executed per-thread", 449 "BriefDescription": "Execution stalls while memory subsystem has an outstanding load.",
480 "CounterMask": "4", 450 "CounterMask": "20",
481 "CounterHTOff": "0,1,2,3,4,5,6,7" 451 "CounterHTOff": "0,1,2,3"
482 }, 452 },
483 { 453 {
454 "PublicDescription": "Counts cycles during which no uops were executed on all ports and Reservation Station (RS) was not empty.",
484 "EventCode": "0xA6", 455 "EventCode": "0xA6",
485 "Counter": "0,1,2,3", 456 "Counter": "0,1,2,3",
486 "UMask": "0x1", 457 "UMask": "0x1",
@@ -490,6 +461,7 @@
490 "CounterHTOff": "0,1,2,3,4,5,6,7" 461 "CounterHTOff": "0,1,2,3,4,5,6,7"
491 }, 462 },
492 { 463 {
464 "PublicDescription": "Counts cycles during which a total of 1 uop was executed on all ports and Reservation Station (RS) was not empty.",
493 "EventCode": "0xA6", 465 "EventCode": "0xA6",
494 "Counter": "0,1,2,3", 466 "Counter": "0,1,2,3",
495 "UMask": "0x2", 467 "UMask": "0x2",
@@ -499,6 +471,7 @@
499 "CounterHTOff": "0,1,2,3,4,5,6,7" 471 "CounterHTOff": "0,1,2,3,4,5,6,7"
500 }, 472 },
501 { 473 {
474 "PublicDescription": "Counts cycles during which a total of 2 uops were executed on all ports and Reservation Station (RS) was not empty.",
502 "EventCode": "0xA6", 475 "EventCode": "0xA6",
503 "Counter": "0,1,2,3", 476 "Counter": "0,1,2,3",
504 "UMask": "0x4", 477 "UMask": "0x4",
@@ -508,6 +481,7 @@
508 "CounterHTOff": "0,1,2,3,4,5,6,7" 481 "CounterHTOff": "0,1,2,3,4,5,6,7"
509 }, 482 },
510 { 483 {
484 "PublicDescription": "Cycles total of 3 uops are executed on all ports and Reservation Station (RS) was not empty.",
511 "EventCode": "0xA6", 485 "EventCode": "0xA6",
512 "Counter": "0,1,2,3", 486 "Counter": "0,1,2,3",
513 "UMask": "0x8", 487 "UMask": "0x8",
@@ -517,6 +491,7 @@
517 "CounterHTOff": "0,1,2,3,4,5,6,7" 491 "CounterHTOff": "0,1,2,3,4,5,6,7"
518 }, 492 },
519 { 493 {
494 "PublicDescription": "Cycles total of 4 uops are executed on all ports and Reservation Station (RS) was not empty.",
520 "EventCode": "0xA6", 495 "EventCode": "0xA6",
521 "Counter": "0,1,2,3", 496 "Counter": "0,1,2,3",
522 "UMask": "0x10", 497 "UMask": "0x10",
@@ -535,212 +510,196 @@
535 "CounterHTOff": "0,1,2,3,4,5,6,7" 510 "CounterHTOff": "0,1,2,3,4,5,6,7"
536 }, 511 },
537 { 512 {
538 "PublicDescription": "This event counts, on the per-thread basis, cycles during which uops are dispatched from the Reservation Station (RS) to port 0.", 513 "PublicDescription": "Number of uops delivered to the back-end by the LSD(Loop Stream Detector).",
539 "EventCode": "0xA1", 514 "EventCode": "0xA8",
540 "Counter": "0,1,2,3", 515 "Counter": "0,1,2,3",
541 "UMask": "0x1", 516 "UMask": "0x1",
542 "EventName": "UOPS_DISPATCHED_PORT.PORT_0", 517 "EventName": "LSD.UOPS",
543 "SampleAfterValue": "2000003", 518 "SampleAfterValue": "2000003",
544 "BriefDescription": "Cycles per thread when uops are executed in port 0", 519 "BriefDescription": "Number of Uops delivered by the LSD.",
545 "CounterHTOff": "0,1,2,3,4,5,6,7" 520 "CounterHTOff": "0,1,2,3,4,5,6,7"
546 }, 521 },
547 { 522 {
548 "PublicDescription": "This event counts, on the per-thread basis, cycles during which uops are dispatched from the Reservation Station (RS) to port 1.", 523 "PublicDescription": "Counts the cycles when at least one uop is delivered by the LSD (Loop-stream detector).",
549 "EventCode": "0xA1", 524 "EventCode": "0xA8",
550 "Counter": "0,1,2,3", 525 "Counter": "0,1,2,3",
551 "UMask": "0x2", 526 "UMask": "0x1",
552 "EventName": "UOPS_DISPATCHED_PORT.PORT_1", 527 "EventName": "LSD.CYCLES_ACTIVE",
553 "SampleAfterValue": "2000003", 528 "SampleAfterValue": "2000003",
554 "BriefDescription": "Cycles per thread when uops are executed in port 1", 529 "BriefDescription": "Cycles Uops delivered by the LSD, but didn't come from the decoder.",
530 "CounterMask": "1",
555 "CounterHTOff": "0,1,2,3,4,5,6,7" 531 "CounterHTOff": "0,1,2,3,4,5,6,7"
556 }, 532 },
557 { 533 {
558 "PublicDescription": "This event counts, on the per-thread basis, cycles during which uops are dispatched from the Reservation Station (RS) to port 2.", 534 "PublicDescription": "Counts the cycles when 4 uops are delivered by the LSD (Loop-stream detector).",
559 "EventCode": "0xA1", 535 "EventCode": "0xA8",
560 "Counter": "0,1,2,3", 536 "Counter": "0,1,2,3",
561 "UMask": "0x4", 537 "UMask": "0x1",
562 "EventName": "UOPS_DISPATCHED_PORT.PORT_2", 538 "EventName": "LSD.CYCLES_4_UOPS",
563 "SampleAfterValue": "2000003", 539 "SampleAfterValue": "2000003",
564 "BriefDescription": "Cycles per thread when uops are executed in port 2", 540 "BriefDescription": "Cycles 4 Uops delivered by the LSD, but didn't come from the decoder.",
541 "CounterMask": "4",
565 "CounterHTOff": "0,1,2,3,4,5,6,7" 542 "CounterHTOff": "0,1,2,3,4,5,6,7"
566 }, 543 },
567 { 544 {
568 "PublicDescription": "This event counts, on the per-thread basis, cycles during which uops are dispatched from the Reservation Station (RS) to port 3.", 545 "PublicDescription": "Number of uops to be executed per-thread each cycle.",
569 "EventCode": "0xA1", 546 "EventCode": "0xB1",
570 "Counter": "0,1,2,3", 547 "Counter": "0,1,2,3",
571 "UMask": "0x8", 548 "UMask": "0x1",
572 "EventName": "UOPS_DISPATCHED_PORT.PORT_3", 549 "EventName": "UOPS_EXECUTED.THREAD",
573 "SampleAfterValue": "2000003", 550 "SampleAfterValue": "2000003",
574 "BriefDescription": "Cycles per thread when uops are executed in port 3", 551 "BriefDescription": "Counts the number of uops to be executed per-thread each cycle.",
575 "CounterHTOff": "0,1,2,3,4,5,6,7" 552 "CounterHTOff": "0,1,2,3,4,5,6,7"
576 }, 553 },
577 { 554 {
578 "PublicDescription": "This event counts, on the per-thread basis, cycles during which uops are dispatched from the Reservation Station (RS) to port 4.", 555 "PublicDescription": "Counts cycles during which no uops were dispatched from the Reservation Station (RS) per thread.",
579 "EventCode": "0xA1", 556 "EventCode": "0xB1",
557 "Invert": "1",
580 "Counter": "0,1,2,3", 558 "Counter": "0,1,2,3",
581 "UMask": "0x10", 559 "UMask": "0x1",
582 "EventName": "UOPS_DISPATCHED_PORT.PORT_4", 560 "EventName": "UOPS_EXECUTED.STALL_CYCLES",
583 "SampleAfterValue": "2000003", 561 "SampleAfterValue": "2000003",
584 "BriefDescription": "Cycles per thread when uops are executed in port 4", 562 "BriefDescription": "Counts number of cycles no uops were dispatched to be executed on this thread.",
563 "CounterMask": "1",
585 "CounterHTOff": "0,1,2,3,4,5,6,7" 564 "CounterHTOff": "0,1,2,3,4,5,6,7"
586 }, 565 },
587 { 566 {
588 "PublicDescription": "This event counts, on the per-thread basis, cycles during which uops are dispatched from the Reservation Station (RS) to port 5.", 567 "PublicDescription": "Cycles where at least 1 uop was executed per-thread.",
589 "EventCode": "0xA1", 568 "EventCode": "0xB1",
590 "Counter": "0,1,2,3", 569 "Counter": "0,1,2,3",
591 "UMask": "0x20", 570 "UMask": "0x1",
592 "EventName": "UOPS_DISPATCHED_PORT.PORT_5", 571 "EventName": "UOPS_EXECUTED.CYCLES_GE_1_UOP_EXEC",
593 "SampleAfterValue": "2000003", 572 "SampleAfterValue": "2000003",
594 "BriefDescription": "Cycles per thread when uops are executed in port 5", 573 "BriefDescription": "Cycles where at least 1 uop was executed per-thread",
574 "CounterMask": "1",
595 "CounterHTOff": "0,1,2,3,4,5,6,7" 575 "CounterHTOff": "0,1,2,3,4,5,6,7"
596 }, 576 },
597 { 577 {
598 "PublicDescription": "This event counts, on the per-thread basis, cycles during which uops are dispatched from the Reservation Station (RS) to port 6.", 578 "PublicDescription": "Cycles where at least 2 uops were executed per-thread.",
599 "EventCode": "0xA1", 579 "EventCode": "0xB1",
600 "Counter": "0,1,2,3", 580 "Counter": "0,1,2,3",
601 "UMask": "0x40", 581 "UMask": "0x1",
602 "EventName": "UOPS_DISPATCHED_PORT.PORT_6", 582 "EventName": "UOPS_EXECUTED.CYCLES_GE_2_UOPS_EXEC",
603 "SampleAfterValue": "2000003", 583 "SampleAfterValue": "2000003",
604 "BriefDescription": "Cycles per thread when uops are executed in port 6", 584 "BriefDescription": "Cycles where at least 2 uops were executed per-thread",
585 "CounterMask": "2",
605 "CounterHTOff": "0,1,2,3,4,5,6,7" 586 "CounterHTOff": "0,1,2,3,4,5,6,7"
606 }, 587 },
607 { 588 {
608 "PublicDescription": "This event counts, on the per-thread basis, cycles during which uops are dispatched from the Reservation Station (RS) to port 7.", 589 "PublicDescription": "Cycles where at least 3 uops were executed per-thread.",
609 "EventCode": "0xA1", 590 "EventCode": "0xB1",
610 "Counter": "0,1,2,3", 591 "Counter": "0,1,2,3",
611 "UMask": "0x80", 592 "UMask": "0x1",
612 "EventName": "UOPS_DISPATCHED_PORT.PORT_7", 593 "EventName": "UOPS_EXECUTED.CYCLES_GE_3_UOPS_EXEC",
613 "SampleAfterValue": "2000003", 594 "SampleAfterValue": "2000003",
614 "BriefDescription": "Cycles per thread when uops are executed in port 7", 595 "BriefDescription": "Cycles where at least 3 uops were executed per-thread",
596 "CounterMask": "3",
615 "CounterHTOff": "0,1,2,3,4,5,6,7" 597 "CounterHTOff": "0,1,2,3,4,5,6,7"
616 }, 598 },
617 { 599 {
618 "EventCode": "0xA3", 600 "PublicDescription": "Cycles where at least 4 uops were executed per-thread.",
601 "EventCode": "0xB1",
619 "Counter": "0,1,2,3", 602 "Counter": "0,1,2,3",
620 "UMask": "0x4", 603 "UMask": "0x1",
621 "EventName": "CYCLE_ACTIVITY.STALLS_TOTAL", 604 "EventName": "UOPS_EXECUTED.CYCLES_GE_4_UOPS_EXEC",
622 "SampleAfterValue": "2000003", 605 "SampleAfterValue": "2000003",
623 "BriefDescription": "Total execution stalls.", 606 "BriefDescription": "Cycles where at least 4 uops were executed per-thread",
624 "CounterMask": "4", 607 "CounterMask": "4",
625 "CounterHTOff": "0,1,2,3,4,5,6,7" 608 "CounterHTOff": "0,1,2,3,4,5,6,7"
626 }, 609 },
627 { 610 {
628 "EventCode": "0xA3", 611 "PublicDescription": "Number of uops executed from any thread.",
612 "EventCode": "0xB1",
629 "Counter": "0,1,2,3", 613 "Counter": "0,1,2,3",
630 "UMask": "0x8", 614 "UMask": "0x2",
631 "EventName": "CYCLE_ACTIVITY.CYCLES_L1D_MISS", 615 "EventName": "UOPS_EXECUTED.CORE",
632 "SampleAfterValue": "2000003", 616 "SampleAfterValue": "2000003",
633 "BriefDescription": "Cycles while L1 cache miss demand load is outstanding.", 617 "BriefDescription": "Number of uops executed on the core.",
634 "CounterMask": "8",
635 "CounterHTOff": "0,1,2,3,4,5,6,7" 618 "CounterHTOff": "0,1,2,3,4,5,6,7"
636 }, 619 },
637 { 620 {
638 "EventCode": "0xA3", 621 "EventCode": "0xB1",
639 "Counter": "0,1,2,3", 622 "Counter": "0,1,2,3",
640 "UMask": "0xc", 623 "UMask": "0x2",
641 "EventName": "CYCLE_ACTIVITY.STALLS_L1D_MISS", 624 "EventName": "UOPS_EXECUTED.CORE_CYCLES_GE_1",
642 "SampleAfterValue": "2000003", 625 "SampleAfterValue": "2000003",
643 "BriefDescription": "Execution stalls while L1 cache miss demand load is outstanding.", 626 "BriefDescription": "Cycles at least 1 micro-op is executed from any thread on physical core.",
644 "CounterMask": "12", 627 "CounterMask": "1",
645 "CounterHTOff": "0,1,2,3,4,5,6,7"
646 },
647 {
648 "PublicDescription": "This event counts all not software-prefetch load dispatches that hit the fill buffer (FB) allocated for the software prefetch. It can also be incremented by some lock instructions. So it should only be used with profiling so that the locks can be excluded by asm inspection of the nearby instructions.",
649 "EventCode": "0x4C",
650 "Counter": "0,1,2,3",
651 "UMask": "0x1",
652 "EventName": "LOAD_HIT_PRE.SW_PF",
653 "SampleAfterValue": "100003",
654 "BriefDescription": "Demand load dispatches that hit L1D fill buffer (FB) allocated for software prefetch.",
655 "CounterHTOff": "0,1,2,3,4,5,6,7" 628 "CounterHTOff": "0,1,2,3,4,5,6,7"
656 }, 629 },
657 { 630 {
658 "PublicDescription": "This event counts how many times the load operation got the true Block-on-Store blocking code preventing store forwarding. This includes cases when:\n - preceding store conflicts with the load (incomplete overlap)\n\n - store forwarding is impossible due to u-arch limitations\n\n - preceding lock RMW operations are not forwarded\n\n - store has the no-forward bit set (uncacheable/page-split/masked stores)\n\n - all-blocking stores are used (mostly, fences and port I/O)\n\nand others.\nThe most common case is a load blocked due to its address range overlapping with a preceding smaller uncompleted store. Note: This event does not take into account cases of out-of-SW-control (for example, SbTailHit), unknown physical STA, and cases of blocking loads on store due to being non-WB memory type or a lock. These cases are covered by other events.\nSee the table of not supported store forwards in the Optimization Guide.", 631 "EventCode": "0xB1",
659 "EventCode": "0x03",
660 "Counter": "0,1,2,3", 632 "Counter": "0,1,2,3",
661 "UMask": "0x2", 633 "UMask": "0x2",
662 "EventName": "LD_BLOCKS.STORE_FORWARD", 634 "EventName": "UOPS_EXECUTED.CORE_CYCLES_GE_2",
663 "SampleAfterValue": "100003", 635 "SampleAfterValue": "2000003",
664 "BriefDescription": "Loads blocked by overlapping with store buffer that cannot be forwarded .", 636 "BriefDescription": "Cycles at least 2 micro-op is executed from any thread on physical core.",
665 "CounterHTOff": "0,1,2,3,4,5,6,7" 637 "CounterMask": "2",
666 },
667 {
668 "PublicDescription": "The number of times that split load operations are temporarily blocked because all resources for handling the split accesses are in use.",
669 "EventCode": "0x03",
670 "Counter": "0,1,2,3",
671 "UMask": "0x8",
672 "EventName": "LD_BLOCKS.NO_SR",
673 "SampleAfterValue": "100003",
674 "BriefDescription": "The number of times that split load operations are temporarily blocked because all resources for handling the split accesses are in use",
675 "CounterHTOff": "0,1,2,3,4,5,6,7" 638 "CounterHTOff": "0,1,2,3,4,5,6,7"
676 }, 639 },
677 { 640 {
678 "PublicDescription": "This event counts false dependencies in MOB when the partial comparison upon loose net check and dependency was resolved by the Enhanced Loose net mechanism. This may not result in high performance penalties. Loose net checks can fail when loads and stores are 4k aliased.", 641 "EventCode": "0xB1",
679 "EventCode": "0x07",
680 "Counter": "0,1,2,3", 642 "Counter": "0,1,2,3",
681 "UMask": "0x1", 643 "UMask": "0x2",
682 "EventName": "LD_BLOCKS_PARTIAL.ADDRESS_ALIAS", 644 "EventName": "UOPS_EXECUTED.CORE_CYCLES_GE_3",
683 "SampleAfterValue": "100003", 645 "SampleAfterValue": "2000003",
684 "BriefDescription": "False dependencies in MOB due to partial compare on address.", 646 "BriefDescription": "Cycles at least 3 micro-op is executed from any thread on physical core.",
647 "CounterMask": "3",
685 "CounterHTOff": "0,1,2,3,4,5,6,7" 648 "CounterHTOff": "0,1,2,3,4,5,6,7"
686 }, 649 },
687 { 650 {
688 "EventCode": "0xA3", 651 "EventCode": "0xB1",
689 "Counter": "0,1,2,3", 652 "Counter": "0,1,2,3",
690 "UMask": "0x1", 653 "UMask": "0x2",
691 "EventName": "CYCLE_ACTIVITY.CYCLES_L2_MISS", 654 "EventName": "UOPS_EXECUTED.CORE_CYCLES_GE_4",
692 "SampleAfterValue": "2000003", 655 "SampleAfterValue": "2000003",
693 "BriefDescription": "Cycles while L2 cache miss demand load is outstanding.", 656 "BriefDescription": "Cycles at least 4 micro-op is executed from any thread on physical core.",
694 "CounterMask": "1", 657 "CounterMask": "4",
695 "CounterHTOff": "0,1,2,3,4,5,6,7" 658 "CounterHTOff": "0,1,2,3,4,5,6,7"
696 }, 659 },
697 { 660 {
698 "EventCode": "0xA3", 661 "EventCode": "0xB1",
662 "Invert": "1",
699 "Counter": "0,1,2,3", 663 "Counter": "0,1,2,3",
700 "UMask": "0x5", 664 "UMask": "0x2",
701 "EventName": "CYCLE_ACTIVITY.STALLS_L2_MISS", 665 "EventName": "UOPS_EXECUTED.CORE_CYCLES_NONE",
702 "SampleAfterValue": "2000003", 666 "SampleAfterValue": "2000003",
703 "BriefDescription": "Execution stalls while L2 cache miss demand load is outstanding.", 667 "BriefDescription": "Cycles with no micro-ops executed from any thread on physical core.",
704 "CounterMask": "5", 668 "CounterMask": "1",
705 "CounterHTOff": "0,1,2,3,4,5,6,7" 669 "CounterHTOff": "0,1,2,3,4,5,6,7"
706 }, 670 },
707 { 671 {
708 "EventCode": "0xA3", 672 "PublicDescription": "Counts the number of x87 uops executed.",
673 "EventCode": "0xB1",
709 "Counter": "0,1,2,3", 674 "Counter": "0,1,2,3",
710 "UMask": "0x10", 675 "UMask": "0x10",
711 "EventName": "CYCLE_ACTIVITY.CYCLES_MEM_ANY", 676 "EventName": "UOPS_EXECUTED.X87",
712 "SampleAfterValue": "2000003", 677 "SampleAfterValue": "2000003",
713 "BriefDescription": "Cycles while memory subsystem has an outstanding load.", 678 "BriefDescription": "Counts the number of x87 uops dispatched.",
714 "CounterMask": "16",
715 "CounterHTOff": "0,1,2,3,4,5,6,7" 679 "CounterHTOff": "0,1,2,3,4,5,6,7"
716 }, 680 },
717 { 681 {
718 "EventCode": "0xA3", 682 "PublicDescription": "Counts the number of instructions (EOMs) retired. Counting covers macro-fused instructions individually (that is, increments by two).",
683 "EventCode": "0xC0",
719 "Counter": "0,1,2,3", 684 "Counter": "0,1,2,3",
720 "UMask": "0x14", 685 "UMask": "0x0",
721 "EventName": "CYCLE_ACTIVITY.STALLS_MEM_ANY", 686 "Errata": "SKL091, SKL044",
687 "EventName": "INST_RETIRED.ANY_P",
722 "SampleAfterValue": "2000003", 688 "SampleAfterValue": "2000003",
723 "BriefDescription": "Execution stalls while memory subsystem has an outstanding load.", 689 "BriefDescription": "Number of instructions retired. General Counter - architectural event",
724 "CounterMask": "20",
725 "CounterHTOff": "0,1,2,3"
726 },
727 {
728 "EventCode": "0x3C",
729 "Counter": "0,1,2,3",
730 "UMask": "0x1",
731 "EventName": "CPU_CLK_THREAD_UNHALTED.REF_XCLK",
732 "SampleAfterValue": "2503",
733 "BriefDescription": "Core crystal clock cycles when the thread is unhalted.",
734 "CounterHTOff": "0,1,2,3,4,5,6,7" 690 "CounterHTOff": "0,1,2,3,4,5,6,7"
735 }, 691 },
736 { 692 {
737 "EventCode": "0x3C", 693 "PEBS": "2",
738 "Counter": "0,1,2,3", 694 "PublicDescription": "A version of INST_RETIRED that allows for a more unbiased distribution of samples across instructions retired. It utilizes the Precise Distribution of Instructions Retired (PDIR) feature to mitigate some bias in how retired instructions get sampled.",
739 "UMask": "0x2", 695 "EventCode": "0xC0",
740 "EventName": "CPU_CLK_THREAD_UNHALTED.ONE_THREAD_ACTIVE", 696 "Counter": "1",
697 "UMask": "0x1",
698 "Errata": "SKL091, SKL044",
699 "EventName": "INST_RETIRED.PREC_DIST",
741 "SampleAfterValue": "2000003", 700 "SampleAfterValue": "2000003",
742 "BriefDescription": "Core crystal clock cycles when this thread is unhalted and the other thread is halted.", 701 "BriefDescription": "Precise instruction retired event with HW to reduce effect of PEBS shadow in IP distribution",
743 "CounterHTOff": "0,1,2,3,4,5,6,7" 702 "CounterHTOff": "1"
744 }, 703 },
745 { 704 {
746 "PEBS": "2", 705 "PEBS": "2",
@@ -757,183 +716,235 @@
757 "CounterHTOff": "0,2,3" 716 "CounterHTOff": "0,2,3"
758 }, 717 },
759 { 718 {
760 "EventCode": "0x14", 719 "EventCode": "0xC1",
761 "Counter": "0,1,2,3", 720 "Counter": "0,1,2,3",
762 "UMask": "0x1", 721 "UMask": "0x3f",
763 "EventName": "ARITH.DIVIDER_ACTIVE", 722 "EventName": "OTHER_ASSISTS.ANY",
723 "SampleAfterValue": "100003",
724 "BriefDescription": "Number of times a microcode assist is invoked by HW other than FP-assist. Examples include AD (page Access Dirty) and AVX* related assists.",
725 "CounterHTOff": "0,1,2,3,4,5,6,7"
726 },
727 {
728 "PublicDescription": "Counts the retirement slots used.",
729 "EventCode": "0xC2",
730 "Counter": "0,1,2,3",
731 "UMask": "0x2",
732 "EventName": "UOPS_RETIRED.RETIRE_SLOTS",
764 "SampleAfterValue": "2000003", 733 "SampleAfterValue": "2000003",
765 "BriefDescription": "Cycles when divide unit is busy executing divide or square root operations. Accounts for integer and floating-point operations.", 734 "BriefDescription": "Retirement slots used.",
766 "CounterMask": "1",
767 "CounterHTOff": "0,1,2,3,4,5,6,7" 735 "CounterHTOff": "0,1,2,3,4,5,6,7"
768 }, 736 },
769 { 737 {
770 "EventCode": "0xA8", 738 "PublicDescription": "This is a non-precise version (that is, does not use PEBS) of the event that counts cycles without actually retired uops.",
739 "EventCode": "0xC2",
740 "Invert": "1",
771 "Counter": "0,1,2,3", 741 "Counter": "0,1,2,3",
772 "UMask": "0x1", 742 "UMask": "0x2",
773 "EventName": "LSD.CYCLES_ACTIVE", 743 "EventName": "UOPS_RETIRED.STALL_CYCLES",
774 "SampleAfterValue": "2000003", 744 "SampleAfterValue": "2000003",
775 "BriefDescription": "Cycles Uops delivered by the LSD, but didn't come from the decoder.", 745 "BriefDescription": "Cycles without actually retired uops.",
776 "CounterMask": "1", 746 "CounterMask": "1",
777 "CounterHTOff": "0,1,2,3,4,5,6,7" 747 "CounterHTOff": "0,1,2,3,4,5,6,7"
778 }, 748 },
779 { 749 {
780 "EventCode": "0xA8", 750 "PublicDescription": "Number of cycles using always true condition (uops_ret < 16) applied to non PEBS uops retired event.",
751 "EventCode": "0xC2",
752 "Invert": "1",
781 "Counter": "0,1,2,3", 753 "Counter": "0,1,2,3",
782 "UMask": "0x1", 754 "UMask": "0x2",
783 "EventName": "LSD.CYCLES_4_UOPS", 755 "EventName": "UOPS_RETIRED.TOTAL_CYCLES",
784 "SampleAfterValue": "2000003", 756 "SampleAfterValue": "2000003",
785 "BriefDescription": "Cycles 4 Uops delivered by the LSD, but didn't come from the decoder.", 757 "BriefDescription": "Cycles with less than 10 actually retired uops.",
786 "CounterMask": "4", 758 "CounterMask": "10",
787 "CounterHTOff": "0,1,2,3,4,5,6,7" 759 "CounterHTOff": "0,1,2,3,4,5,6,7"
788 }, 760 },
789 { 761 {
790 "EventCode": "0xC1", 762 "EventCode": "0xC3",
791 "Counter": "0,1,2,3", 763 "Counter": "0,1,2,3",
792 "UMask": "0x3f", 764 "UMask": "0x1",
793 "EventName": "OTHER_ASSISTS.ANY", 765 "EdgeDetect": "1",
766 "EventName": "MACHINE_CLEARS.COUNT",
794 "SampleAfterValue": "100003", 767 "SampleAfterValue": "100003",
795 "BriefDescription": "Number of times a microcode assist is invoked by HW other than FP-assist. Examples include AD (page Access Dirty) and AVX* related assists.", 768 "BriefDescription": "Number of machine clears (nukes) of any type.",
769 "CounterMask": "1",
796 "CounterHTOff": "0,1,2,3,4,5,6,7" 770 "CounterHTOff": "0,1,2,3,4,5,6,7"
797 }, 771 },
798 { 772 {
799 "PublicDescription": "This event counts the number of Blend Uops issued by the Resource Allocation Table (RAT) to the reservation station (RS) in order to preserve upper bits of vector registers. Starting the Skylake microarchitecture, these Blend uops are needed since every Intel SSE instruction executed in Dirty Upper State needs to preserve bits 128-255 of the destination register.\r\nFor more information, refer to ?Mixing Intel AVX and Intel SSE Code? section of the Optimization Guide.", 773 "PublicDescription": "Counts self-modifying code (SMC) detected, which causes a machine clear.",
800 "EventCode": "0x0E", 774 "EventCode": "0xC3",
801 "Counter": "0,1,2,3", 775 "Counter": "0,1,2,3",
802 "UMask": "0x2", 776 "UMask": "0x4",
803 "EventName": "UOPS_ISSUED.VECTOR_WIDTH_MISMATCH", 777 "EventName": "MACHINE_CLEARS.SMC",
804 "SampleAfterValue": "2000003", 778 "SampleAfterValue": "100003",
805 "BriefDescription": "Uops inserted at issue-stage in order to preserve upper bits of vector registers.", 779 "BriefDescription": "Self-modifying code (SMC) detected.",
806 "CounterHTOff": "0,1,2,3,4,5,6,7" 780 "CounterHTOff": "0,1,2,3,4,5,6,7"
807 }, 781 },
808 { 782 {
809 "EventCode": "0x00", 783 "PublicDescription": "Counts all (macro) branch instructions retired.",
810 "Counter": "Fixed counter 2", 784 "EventCode": "0xC4",
811 "UMask": "0x2",
812 "AnyThread": "1",
813 "EventName": "CPU_CLK_UNHALTED.THREAD_ANY",
814 "SampleAfterValue": "2000003",
815 "BriefDescription": "Core cycles when at least one thread on the physical core is not in halt state.",
816 "CounterHTOff": "Fixed counter 2"
817 },
818 {
819 "EventCode": "0x3C",
820 "Counter": "0,1,2,3", 785 "Counter": "0,1,2,3",
821 "UMask": "0x0", 786 "UMask": "0x0",
822 "AnyThread": "1", 787 "Errata": "SKL091",
823 "EventName": "CPU_CLK_UNHALTED.THREAD_P_ANY", 788 "EventName": "BR_INST_RETIRED.ALL_BRANCHES",
824 "SampleAfterValue": "2000003", 789 "SampleAfterValue": "400009",
825 "BriefDescription": "Core cycles when at least one thread on the physical core is not in halt state.", 790 "BriefDescription": "All (macro) branch instructions retired.",
826 "CounterHTOff": "0,1,2,3,4,5,6,7" 791 "CounterHTOff": "0,1,2,3,4,5,6,7"
827 }, 792 },
828 { 793 {
829 "EventCode": "0x3C", 794 "PEBS": "1",
795 "PublicDescription": "This is a precise version (that is, uses PEBS) of the event that counts conditional branch instructions retired.",
796 "EventCode": "0xC4",
830 "Counter": "0,1,2,3", 797 "Counter": "0,1,2,3",
831 "UMask": "0x1", 798 "UMask": "0x1",
832 "AnyThread": "1", 799 "Errata": "SKL091",
833 "EventName": "CPU_CLK_THREAD_UNHALTED.REF_XCLK_ANY", 800 "EventName": "BR_INST_RETIRED.CONDITIONAL",
834 "SampleAfterValue": "2503", 801 "SampleAfterValue": "400009",
835 "BriefDescription": "Core crystal clock cycles when at least one thread on the physical core is unhalted.", 802 "BriefDescription": "Conditional branch instructions retired.",
836 "CounterHTOff": "0,1,2,3,4,5,6,7" 803 "CounterHTOff": "0,1,2,3,4,5,6,7"
837 }, 804 },
838 { 805 {
839 "EventCode": "0x0D", 806 "PEBS": "1",
807 "PublicDescription": "This is a precise version (that is, uses PEBS) of the event that counts both direct and indirect near call instructions retired.",
808 "EventCode": "0xC4",
840 "Counter": "0,1,2,3", 809 "Counter": "0,1,2,3",
841 "UMask": "0x1", 810 "UMask": "0x2",
842 "AnyThread": "1", 811 "Errata": "SKL091",
843 "EventName": "INT_MISC.RECOVERY_CYCLES_ANY", 812 "EventName": "BR_INST_RETIRED.NEAR_CALL",
844 "SampleAfterValue": "2000003", 813 "SampleAfterValue": "100007",
845 "BriefDescription": "Core cycles the allocator was stalled due to recovery from earlier clear event for any thread running on the physical core (e.g. misprediction or memory nuke).", 814 "BriefDescription": "Direct and indirect near call instructions retired.",
846 "CounterHTOff": "0,1,2,3,4,5,6,7" 815 "CounterHTOff": "0,1,2,3,4,5,6,7"
847 }, 816 },
848 { 817 {
849 "EventCode": "0xB1", 818 "PEBS": "2",
819 "PublicDescription": "This is a precise version of BR_INST_RETIRED.ALL_BRANCHES that counts all (macro) branch instructions retired.",
820 "EventCode": "0xC4",
850 "Counter": "0,1,2,3", 821 "Counter": "0,1,2,3",
851 "UMask": "0x2", 822 "UMask": "0x4",
852 "EventName": "UOPS_EXECUTED.CORE_CYCLES_GE_1", 823 "Errata": "SKL091",
853 "SampleAfterValue": "2000003", 824 "EventName": "BR_INST_RETIRED.ALL_BRANCHES_PEBS",
854 "BriefDescription": "Cycles at least 1 micro-op is executed from any thread on physical core.", 825 "SampleAfterValue": "400009",
855 "CounterMask": "1", 826 "BriefDescription": "All (macro) branch instructions retired.",
856 "CounterHTOff": "0,1,2,3,4,5,6,7" 827 "CounterHTOff": "0,1,2,3"
857 }, 828 },
858 { 829 {
859 "EventCode": "0xB1", 830 "PEBS": "1",
831 "PublicDescription": "This is a precise version (that is, uses PEBS) of the event that counts return instructions retired.",
832 "EventCode": "0xC4",
860 "Counter": "0,1,2,3", 833 "Counter": "0,1,2,3",
861 "UMask": "0x2", 834 "UMask": "0x8",
862 "EventName": "UOPS_EXECUTED.CORE_CYCLES_GE_2", 835 "Errata": "SKL091",
863 "SampleAfterValue": "2000003", 836 "EventName": "BR_INST_RETIRED.NEAR_RETURN",
864 "BriefDescription": "Cycles at least 2 micro-op is executed from any thread on physical core.", 837 "SampleAfterValue": "100007",
865 "CounterMask": "2", 838 "BriefDescription": "Return instructions retired.",
866 "CounterHTOff": "0,1,2,3,4,5,6,7" 839 "CounterHTOff": "0,1,2,3,4,5,6,7"
867 }, 840 },
868 { 841 {
869 "EventCode": "0xB1", 842 "PublicDescription": "This is a non-precise version (that is, does not use PEBS) of the event that counts not taken branch instructions retired.",
843 "EventCode": "0xC4",
870 "Counter": "0,1,2,3", 844 "Counter": "0,1,2,3",
871 "UMask": "0x2", 845 "UMask": "0x10",
872 "EventName": "UOPS_EXECUTED.CORE_CYCLES_GE_3", 846 "Errata": "SKL091",
873 "SampleAfterValue": "2000003", 847 "EventName": "BR_INST_RETIRED.NOT_TAKEN",
874 "BriefDescription": "Cycles at least 3 micro-op is executed from any thread on physical core.", 848 "SampleAfterValue": "400009",
875 "CounterMask": "3", 849 "BriefDescription": "Not taken branch instructions retired.",
876 "CounterHTOff": "0,1,2,3,4,5,6,7" 850 "CounterHTOff": "0,1,2,3,4,5,6,7"
877 }, 851 },
878 { 852 {
879 "EventCode": "0xB1", 853 "PEBS": "1",
854 "PublicDescription": "This is a precise version (that is, uses PEBS) of the event that counts taken branch instructions retired.",
855 "EventCode": "0xC4",
880 "Counter": "0,1,2,3", 856 "Counter": "0,1,2,3",
881 "UMask": "0x2", 857 "UMask": "0x20",
882 "EventName": "UOPS_EXECUTED.CORE_CYCLES_GE_4", 858 "Errata": "SKL091",
883 "SampleAfterValue": "2000003", 859 "EventName": "BR_INST_RETIRED.NEAR_TAKEN",
884 "BriefDescription": "Cycles at least 4 micro-op is executed from any thread on physical core.", 860 "SampleAfterValue": "400009",
885 "CounterMask": "4", 861 "BriefDescription": "Taken branch instructions retired.",
886 "CounterHTOff": "0,1,2,3,4,5,6,7" 862 "CounterHTOff": "0,1,2,3,4,5,6,7"
887 }, 863 },
888 { 864 {
889 "EventCode": "0xB1", 865 "PEBS": "1",
890 "Invert": "1", 866 "PublicDescription": "This is a precise version (that is, uses PEBS) of the event that counts far branch instructions retired.",
867 "EventCode": "0xC4",
891 "Counter": "0,1,2,3", 868 "Counter": "0,1,2,3",
892 "UMask": "0x2", 869 "UMask": "0x40",
893 "EventName": "UOPS_EXECUTED.CORE_CYCLES_NONE", 870 "Errata": "SKL091",
894 "SampleAfterValue": "2000003", 871 "EventName": "BR_INST_RETIRED.FAR_BRANCH",
895 "BriefDescription": "Cycles with no micro-ops executed from any thread on physical core.", 872 "SampleAfterValue": "100007",
896 "CounterMask": "1", 873 "BriefDescription": "Counts the number of far branch instructions retired.",
897 "CounterHTOff": "0,1,2,3,4,5,6,7" 874 "CounterHTOff": "0,1,2,3,4,5,6,7"
898 }, 875 },
899 { 876 {
900 "PublicDescription": "This event counts when the Current Privilege Level (CPL) transitions from ring 1, 2 or 3 to ring 0 (Kernel).", 877 "PublicDescription": "Counts all the retired branch instructions that were mispredicted by the processor. A branch misprediction occurs when the processor incorrectly predicts the destination of the branch. When the misprediction is discovered at execution, all the instructions executed in the wrong (speculative) path must be discarded, and the processor must start fetching from the correct path.",
901 "EventCode": "0x3C", 878 "EventCode": "0xC5",
902 "Counter": "0,1,2,3", 879 "Counter": "0,1,2,3",
903 "UMask": "0x0", 880 "UMask": "0x0",
904 "EdgeDetect": "1", 881 "EventName": "BR_MISP_RETIRED.ALL_BRANCHES",
905 "EventName": "CPU_CLK_UNHALTED.RING0_TRANS", 882 "SampleAfterValue": "400009",
906 "SampleAfterValue": "100007", 883 "BriefDescription": "All mispredicted macro branch instructions retired.",
907 "BriefDescription": "Counts when there is a transition from ring 1, 2 or 3 to ring 0.",
908 "CounterMask": "1",
909 "CounterHTOff": "0,1,2,3,4,5,6,7" 884 "CounterHTOff": "0,1,2,3,4,5,6,7"
910 }, 885 },
911 { 886 {
912 "EventCode": "0x3C", 887 "PEBS": "1",
888 "PublicDescription": "This is a precise version (that is, uses PEBS) of the event that counts mispredicted conditional branch instructions retired.",
889 "EventCode": "0xC5",
913 "Counter": "0,1,2,3", 890 "Counter": "0,1,2,3",
914 "UMask": "0x1", 891 "UMask": "0x1",
915 "EventName": "CPU_CLK_UNHALTED.REF_XCLK", 892 "EventName": "BR_MISP_RETIRED.CONDITIONAL",
916 "SampleAfterValue": "2503", 893 "SampleAfterValue": "400009",
917 "BriefDescription": "Core crystal clock cycles when the thread is unhalted.", 894 "BriefDescription": "Mispredicted conditional branch instructions retired.",
918 "CounterHTOff": "0,1,2,3,4,5,6,7" 895 "CounterHTOff": "0,1,2,3,4,5,6,7"
919 }, 896 },
920 { 897 {
921 "EventCode": "0x3C", 898 "PEBS": "1",
899 "PublicDescription": "This event counts both taken and not taken retired mispredicted direct and indirect near calls, including both register and memory indirect.",
900 "EventCode": "0xC5",
922 "Counter": "0,1,2,3", 901 "Counter": "0,1,2,3",
923 "UMask": "0x1", 902 "UMask": "0x2",
924 "AnyThread": "1", 903 "EventName": "BR_MISP_RETIRED.NEAR_CALL",
925 "EventName": "CPU_CLK_UNHALTED.REF_XCLK_ANY", 904 "SampleAfterValue": "400009",
926 "SampleAfterValue": "2503", 905 "BriefDescription": "Mispredicted direct and indirect near call instructions retired.",
927 "BriefDescription": "Core crystal clock cycles when at least one thread on the physical core is unhalted.",
928 "CounterHTOff": "0,1,2,3,4,5,6,7" 906 "CounterHTOff": "0,1,2,3,4,5,6,7"
929 }, 907 },
930 { 908 {
931 "EventCode": "0x3C", 909 "PEBS": "2",
910 "PublicDescription": "This is a precise version of BR_MISP_RETIRED.ALL_BRANCHES that counts all mispredicted macro branch instructions retired.",
911 "EventCode": "0xC5",
932 "Counter": "0,1,2,3", 912 "Counter": "0,1,2,3",
933 "UMask": "0x2", 913 "UMask": "0x4",
934 "EventName": "CPU_CLK_UNHALTED.ONE_THREAD_ACTIVE", 914 "EventName": "BR_MISP_RETIRED.ALL_BRANCHES_PEBS",
935 "SampleAfterValue": "2503", 915 "SampleAfterValue": "400009",
936 "BriefDescription": "Core crystal clock cycles when this thread is unhalted and the other thread is halted.", 916 "BriefDescription": "Mispredicted macro branch instructions retired.",
917 "CounterHTOff": "0,1,2,3"
918 },
919 {
920 "PEBS": "1",
921 "PublicDescription": "Number of near branch instructions retired that were mispredicted and taken.",
922 "EventCode": "0xC5",
923 "Counter": "0,1,2,3",
924 "UMask": "0x20",
925 "EventName": "BR_MISP_RETIRED.NEAR_TAKEN",
926 "SampleAfterValue": "400009",
927 "BriefDescription": "Number of near branch instructions retired that were mispredicted and taken. ",
928 "CounterHTOff": "0,1,2,3,4,5,6,7"
929 },
930 {
931 "PublicDescription": "Increments when an entry is added to the Last Branch Record (LBR) array (or removed from the array in case of RETURNs in call stack mode). The event requires LBR enable via IA32_DEBUGCTL MSR and branch type selection via MSR_LBR_SELECT.",
932 "EventCode": "0xCC",
933 "Counter": "0,1,2,3",
934 "UMask": "0x20",
935 "EventName": "ROB_MISC_EVENTS.LBR_INSERTS",
936 "SampleAfterValue": "2000003",
937 "BriefDescription": "Increments whenever there is an update to the LBR array.",
938 "CounterHTOff": "0,1,2,3,4,5,6,7"
939 },
940 {
941 "PublicDescription": "Counts the number of times the front-end is resteered when it finds a branch instruction in a fetch line. This occurs for the first time a branch instruction is fetched or when the branch is not tracked by the BPU (Branch Prediction Unit) anymore.",
942 "EventCode": "0xE6",
943 "Counter": "0,1,2,3",
944 "UMask": "0x1",
945 "EventName": "BACLEARS.ANY",
946 "SampleAfterValue": "100003",
947 "BriefDescription": "Counts the total number when the front end is resteered, mainly when the BPU cannot provide a correct prediction and this is corrected by other branch handling mechanisms at the front end.",
937 "CounterHTOff": "0,1,2,3,4,5,6,7" 948 "CounterHTOff": "0,1,2,3,4,5,6,7"
938 } 949 }
939] \ No newline at end of file 950] \ No newline at end of file
diff --git a/tools/perf/pmu-events/arch/x86/skylake/skl-metrics.json b/tools/perf/pmu-events/arch/x86/skylake/skl-metrics.json
new file mode 100644
index 000000000000..36c903faed0b
--- /dev/null
+++ b/tools/perf/pmu-events/arch/x86/skylake/skl-metrics.json
@@ -0,0 +1,164 @@
1[
2 {
3 "BriefDescription": "Instructions Per Cycle (per logical thread)",
4 "MetricExpr": "INST_RETIRED.ANY / CPU_CLK_UNHALTED.THREAD",
5 "MetricGroup": "TopDownL1",
6 "MetricName": "IPC"
7 },
8 {
9 "BriefDescription": "Uops Per Instruction",
10 "MetricExpr": "UOPS_RETIRED.RETIRE_SLOTS / INST_RETIRED.ANY",
11 "MetricGroup": "Pipeline",
12 "MetricName": "UPI"
13 },
14 {
15 "BriefDescription": "Rough Estimation of fraction of fetched lines bytes that were likely consumed by program instructions",
16 "MetricExpr": "min( 1 , UOPS_ISSUED.ANY / ((UOPS_RETIRED.RETIRE_SLOTS / INST_RETIRED.ANY) * 64 * ( ICACHE_64B.IFTAG_HIT + ICACHE_64B.IFTAG_MISS ) / 4.1) )",
17 "MetricGroup": "Frontend",
18 "MetricName": "IFetch_Line_Utilization"
19 },
20 {
21 "BriefDescription": "Fraction of Uops delivered by the DSB (aka Decoded Icache; or Uop Cache)",
22 "MetricExpr": "IDQ.DSB_UOPS / ( IDQ.DSB_UOPS + LSD.UOPS + IDQ.MITE_UOPS + IDQ.MS_UOPS )",
23 "MetricGroup": "DSB; Frontend_Bandwidth",
24 "MetricName": "DSB_Coverage"
25 },
26 {
27 "BriefDescription": "Cycles Per Instruction (threaded)",
28 "MetricExpr": "1 / (INST_RETIRED.ANY / cycles)",
29 "MetricGroup": "Pipeline;Summary",
30 "MetricName": "CPI"
31 },
32 {
33 "BriefDescription": "Per-thread actual clocks when the logical processor is active. This is called 'Clockticks' in VTune.",
34 "MetricExpr": "CPU_CLK_UNHALTED.THREAD",
35 "MetricGroup": "Summary",
36 "MetricName": "CLKS"
37 },
38 {
39 "BriefDescription": "Total issue-pipeline slots",
40 "MetricExpr": "4*(( CPU_CLK_UNHALTED.THREAD_ANY / 2 ) if #SMT_on else cycles)",
41 "MetricGroup": "TopDownL1",
42 "MetricName": "SLOTS"
43 },
44 {
45 "BriefDescription": "Total number of retired Instructions",
46 "MetricExpr": "INST_RETIRED.ANY",
47 "MetricGroup": "Summary",
48 "MetricName": "Instructions"
49 },
50 {
51 "BriefDescription": "Instructions Per Cycle (per physical core)",
52 "MetricExpr": "INST_RETIRED.ANY / (( CPU_CLK_UNHALTED.THREAD_ANY / 2 ) if #SMT_on else cycles)",
53 "MetricGroup": "SMT",
54 "MetricName": "CoreIPC"
55 },
56 {
57 "BriefDescription": "Instruction-Level-Parallelism (average number of uops executed when there is at least 1 uop executed)",
58 "MetricExpr": "UOPS_EXECUTED.THREAD / (( UOPS_EXECUTED.CORE_CYCLES_GE_1 / 2) if #SMT_on else UOPS_EXECUTED.CORE_CYCLES_GE_1)",
59 "MetricGroup": "Pipeline;Ports_Utilization",
60 "MetricName": "ILP"
61 },
62 {
63 "BriefDescription": "Average Branch Address Clear Cost (fraction of cycles)",
64 "MetricExpr": "2* (( RS_EVENTS.EMPTY_CYCLES - ICACHE_16B.IFDATA_STALL - ICACHE_64B.IFTAG_STALL ) / RS_EVENTS.EMPTY_END)",
65 "MetricGroup": "Unknown_Branches",
66 "MetricName": "BAClear_Cost"
67 },
68 {
69 "BriefDescription": "Core actual clocks when any thread is active on the physical core",
70 "MetricExpr": "( CPU_CLK_UNHALTED.THREAD_ANY / 2 ) if #SMT_on else CPU_CLK_UNHALTED.THREAD",
71 "MetricGroup": "SMT",
72 "MetricName": "CORE_CLKS"
73 },
74 {
75 "BriefDescription": "Actual Average Latency for L1 data-cache miss demand loads",
76 "MetricExpr": "L1D_PEND_MISS.PENDING / ( MEM_LOAD_RETIRED.L1_MISS_PS + MEM_LOAD_RETIRED.FB_HIT_PS )",
77 "MetricGroup": "Memory_Bound;Memory_Lat",
78 "MetricName": "Load_Miss_Real_Latency"
79 },
80 {
81 "BriefDescription": "Memory-Level-Parallelism (average number of L1 miss demand load when there is at least 1 such miss)",
82 "MetricExpr": "L1D_PEND_MISS.PENDING / (( L1D_PEND_MISS.PENDING_CYCLES_ANY / 2) if #SMT_on else L1D_PEND_MISS.PENDING_CYCLES)",
83 "MetricGroup": "Memory_Bound;Memory_BW",
84 "MetricName": "MLP"
85 },
86 {
87 "BriefDescription": "Utilization of the core's Page Walker(s) serving STLB misses triggered by instruction/Load/Store accesses",
88 "MetricExpr": "( ITLB_MISSES.WALK_PENDING + DTLB_LOAD_MISSES.WALK_PENDING + DTLB_STORE_MISSES.WALK_PENDING + EPT.WALK_PENDING ) / ( 2 * (( CPU_CLK_UNHALTED.THREAD_ANY / 2 ) if #SMT_on else cycles) )",
89 "MetricGroup": "TLB",
90 "MetricName": "Page_Walks_Utilization"
91 },
92 {
93 "BriefDescription": "Average CPU Utilization",
94 "MetricExpr": "CPU_CLK_UNHALTED.REF_TSC / msr@tsc@",
95 "MetricGroup": "Summary",
96 "MetricName": "CPU_Utilization"
97 },
98 {
99 "BriefDescription": "Giga Floating Point Operations Per Second",
100 "MetricExpr": "(( 1*( FP_ARITH_INST_RETIRED.SCALAR_SINGLE + FP_ARITH_INST_RETIRED.SCALAR_DOUBLE ) + 2* FP_ARITH_INST_RETIRED.128B_PACKED_DOUBLE + 4*( FP_ARITH_INST_RETIRED.128B_PACKED_SINGLE + FP_ARITH_INST_RETIRED.256B_PACKED_DOUBLE ) + 8* FP_ARITH_INST_RETIRED.256B_PACKED_SINGLE )) / 1000000000 / duration_time",
101 "MetricGroup": "FLOPS;Summary",
102 "MetricName": "GFLOPs"
103 },
104 {
105 "BriefDescription": "Average Frequency Utilization relative nominal frequency",
106 "MetricExpr": "CPU_CLK_UNHALTED.THREAD / CPU_CLK_UNHALTED.REF_TSC",
107 "MetricGroup": "Power",
108 "MetricName": "Turbo_Utilization"
109 },
110 {
111 "BriefDescription": "Fraction of cycles where both hardware threads were active",
112 "MetricExpr": "1 - CPU_CLK_THREAD_UNHALTED.ONE_THREAD_ACTIVE / ( CPU_CLK_THREAD_UNHALTED.REF_XCLK_ANY / 2 ) if #SMT_on else 0",
113 "MetricGroup": "SMT;Summary",
114 "MetricName": "SMT_2T_Utilization"
115 },
116 {
117 "BriefDescription": "Fraction of cycles spent in Kernel mode",
118 "MetricExpr": "CPU_CLK_UNHALTED.REF_TSC:u / CPU_CLK_UNHALTED.REF_TSC",
119 "MetricGroup": "Summary",
120 "MetricName": "Kernel_Utilization"
121 },
122 {
123 "BriefDescription": "C3 residency percent per core",
124 "MetricExpr": "(cstate_core@c3\\-residency@ / msr@tsc@) * 100",
125 "MetricGroup": "Power",
126 "MetricName": "C3_Core_Residency"
127 },
128 {
129 "BriefDescription": "C6 residency percent per core",
130 "MetricExpr": "(cstate_core@c6\\-residency@ / msr@tsc@) * 100",
131 "MetricGroup": "Power",
132 "MetricName": "C6_Core_Residency"
133 },
134 {
135 "BriefDescription": "C7 residency percent per core",
136 "MetricExpr": "(cstate_core@c7\\-residency@ / msr@tsc@) * 100",
137 "MetricGroup": "Power",
138 "MetricName": "C7_Core_Residency"
139 },
140 {
141 "BriefDescription": "C2 residency percent per package",
142 "MetricExpr": "(cstate_pkg@c2\\-residency@ / msr@tsc@) * 100",
143 "MetricGroup": "Power",
144 "MetricName": "C2_Pkg_Residency"
145 },
146 {
147 "BriefDescription": "C3 residency percent per package",
148 "MetricExpr": "(cstate_pkg@c3\\-residency@ / msr@tsc@) * 100",
149 "MetricGroup": "Power",
150 "MetricName": "C3_Pkg_Residency"
151 },
152 {
153 "BriefDescription": "C6 residency percent per package",
154 "MetricExpr": "(cstate_pkg@c6\\-residency@ / msr@tsc@) * 100",
155 "MetricGroup": "Power",
156 "MetricName": "C6_Pkg_Residency"
157 },
158 {
159 "BriefDescription": "C7 residency percent per package",
160 "MetricExpr": "(cstate_pkg@c7\\-residency@ / msr@tsc@) * 100",
161 "MetricGroup": "Power",
162 "MetricName": "C7_Pkg_Residency"
163 }
164]
diff --git a/tools/perf/pmu-events/arch/x86/skylake/virtual-memory.json b/tools/perf/pmu-events/arch/x86/skylake/virtual-memory.json
index 02f32cbf6789..2bcba7daca14 100644
--- a/tools/perf/pmu-events/arch/x86/skylake/virtual-memory.json
+++ b/tools/perf/pmu-events/arch/x86/skylake/virtual-memory.json
@@ -1,83 +1,6 @@
1[ 1[
2 { 2 {
3 "PublicDescription": "This event counts the number of flushes of the big or small ITLB pages. Counting include both TLB Flush (covering all sets) and TLB Set Clear (set-specific).", 3 "PublicDescription": "Counts demand data loads that caused a page walk of any page size (4K/2M/4M/1G). This implies it missed in all TLB levels, but the walk need not have completed.",
4 "EventCode": "0xAE",
5 "Counter": "0,1,2,3",
6 "UMask": "0x1",
7 "EventName": "ITLB.ITLB_FLUSH",
8 "SampleAfterValue": "100007",
9 "BriefDescription": "Flushing of the Instruction TLB (ITLB) pages, includes 4k/2M/4M pages.",
10 "CounterHTOff": "0,1,2,3,4,5,6,7"
11 },
12 {
13 "EventCode": "0x4F",
14 "Counter": "0,1,2,3",
15 "UMask": "0x10",
16 "EventName": "EPT.WALK_PENDING",
17 "SampleAfterValue": "2000003",
18 "BriefDescription": "Counts 1 per cycle for each PMH that is busy with a EPT (Extended Page Table) walk for any request type.",
19 "CounterHTOff": "0,1,2,3,4,5,6,7"
20 },
21 {
22 "PublicDescription": "This event counts store misses in all DTLB levels that cause page walks of any page size (4K/2M/4M/1G).",
23 "EventCode": "0x85",
24 "Counter": "0,1,2,3",
25 "UMask": "0x1",
26 "EventName": "ITLB_MISSES.MISS_CAUSES_A_WALK",
27 "SampleAfterValue": "100003",
28 "BriefDescription": "Misses at all ITLB levels that cause page walks",
29 "CounterHTOff": "0,1,2,3,4,5,6,7"
30 },
31 {
32 "PublicDescription": "This event counts store misses in all DTLB levels that cause a completed page walk (4K page size). The page walk can end with or without a fault.",
33 "EventCode": "0x85",
34 "Counter": "0,1,2,3",
35 "UMask": "0x2",
36 "EventName": "ITLB_MISSES.WALK_COMPLETED_4K",
37 "SampleAfterValue": "100003",
38 "BriefDescription": "Code miss in all TLB levels causes a page walk that completes. (4K)",
39 "CounterHTOff": "0,1,2,3,4,5,6,7"
40 },
41 {
42 "PublicDescription": "This event counts store misses in all DTLB levels that cause a completed page walk (2M and 4M page sizes). The page walk can end with or without a fault.",
43 "EventCode": "0x85",
44 "Counter": "0,1,2,3",
45 "UMask": "0x4",
46 "EventName": "ITLB_MISSES.WALK_COMPLETED_2M_4M",
47 "SampleAfterValue": "100003",
48 "BriefDescription": "Code miss in all TLB levels causes a page walk that completes. (2M/4M)",
49 "CounterHTOff": "0,1,2,3,4,5,6,7"
50 },
51 {
52 "PublicDescription": "This event counts store misses in all DTLB levels that cause a completed page walk (1G page size). The page walk can end with or without a fault.",
53 "EventCode": "0x85",
54 "Counter": "0,1,2,3",
55 "UMask": "0x8",
56 "EventName": "ITLB_MISSES.WALK_COMPLETED_1G",
57 "SampleAfterValue": "100003",
58 "BriefDescription": "Code miss in all TLB levels causes a page walk that completes. (1G)",
59 "CounterHTOff": "0,1,2,3,4,5,6,7"
60 },
61 {
62 "EventCode": "0x85",
63 "Counter": "0,1,2,3",
64 "UMask": "0x10",
65 "EventName": "ITLB_MISSES.WALK_PENDING",
66 "SampleAfterValue": "100003",
67 "BriefDescription": "Counts 1 per cycle for each PMH that is busy with a page walk for an instruction fetch request. EPT page walk duration are excluded in Skylake. ",
68 "CounterHTOff": "0,1,2,3,4,5,6,7"
69 },
70 {
71 "EventCode": "0x85",
72 "Counter": "0,1,2,3",
73 "UMask": "0x20",
74 "EventName": "ITLB_MISSES.STLB_HIT",
75 "SampleAfterValue": "100003",
76 "BriefDescription": "Instruction fetch requests that miss the ITLB and hit the STLB.",
77 "CounterHTOff": "0,1,2,3,4,5,6,7"
78 },
79 {
80 "PublicDescription": "This event counts load misses in all DTLB levels that cause page walks of any page size (4K/2M/4M/1G).",
81 "EventCode": "0x08", 4 "EventCode": "0x08",
82 "Counter": "0,1,2,3", 5 "Counter": "0,1,2,3",
83 "UMask": "0x1", 6 "UMask": "0x1",
@@ -87,45 +10,68 @@
87 "CounterHTOff": "0,1,2,3,4,5,6,7" 10 "CounterHTOff": "0,1,2,3,4,5,6,7"
88 }, 11 },
89 { 12 {
90 "PublicDescription": "This event counts load misses in all DTLB levels that cause a completed page walk (4K page size). The page walk can end with or without a fault.", 13 "PublicDescription": "Counts page walks completed due to demand data loads whose address translations missed in the TLB and were mapped to 4K pages. The page walks can end with or without a page fault.",
91 "EventCode": "0x08", 14 "EventCode": "0x08",
92 "Counter": "0,1,2,3", 15 "Counter": "0,1,2,3",
93 "UMask": "0x2", 16 "UMask": "0x2",
94 "EventName": "DTLB_LOAD_MISSES.WALK_COMPLETED_4K", 17 "EventName": "DTLB_LOAD_MISSES.WALK_COMPLETED_4K",
95 "SampleAfterValue": "2000003", 18 "SampleAfterValue": "2000003",
96 "BriefDescription": "Demand load Miss in all translation lookaside buffer (TLB) levels causes a page walk that completes (4K).", 19 "BriefDescription": "Page walk completed due to a demand data load to a 4K page",
97 "CounterHTOff": "0,1,2,3,4,5,6,7" 20 "CounterHTOff": "0,1,2,3,4,5,6,7"
98 }, 21 },
99 { 22 {
100 "PublicDescription": "This event counts load misses in all DTLB levels that cause a completed page walk (2M and 4M page sizes). The page walk can end with or without a fault.", 23 "PublicDescription": "Counts page walks completed due to demand data loads whose address translations missed in the TLB and were mapped to 2M/4M pages. The page walks can end with or without a page fault.",
101 "EventCode": "0x08", 24 "EventCode": "0x08",
102 "Counter": "0,1,2,3", 25 "Counter": "0,1,2,3",
103 "UMask": "0x4", 26 "UMask": "0x4",
104 "EventName": "DTLB_LOAD_MISSES.WALK_COMPLETED_2M_4M", 27 "EventName": "DTLB_LOAD_MISSES.WALK_COMPLETED_2M_4M",
105 "SampleAfterValue": "2000003", 28 "SampleAfterValue": "2000003",
106 "BriefDescription": "Demand load Miss in all translation lookaside buffer (TLB) levels causes a page walk that completes (2M/4M).", 29 "BriefDescription": "Page walk completed due to a demand data load to a 2M/4M page",
107 "CounterHTOff": "0,1,2,3,4,5,6,7" 30 "CounterHTOff": "0,1,2,3,4,5,6,7"
108 }, 31 },
109 { 32 {
110 "PublicDescription": "This event counts load misses in all DTLB levels that cause a completed page walk (1G page size). The page walk can end with or without a fault.", 33 "PublicDescription": "Counts page walks completed due to demand data loads whose address translations missed in the TLB and were mapped to 4K pages. The page walks can end with or without a page fault.",
111 "EventCode": "0x08", 34 "EventCode": "0x08",
112 "Counter": "0,1,2,3", 35 "Counter": "0,1,2,3",
113 "UMask": "0x8", 36 "UMask": "0x8",
114 "EventName": "DTLB_LOAD_MISSES.WALK_COMPLETED_1G", 37 "EventName": "DTLB_LOAD_MISSES.WALK_COMPLETED_1G",
115 "SampleAfterValue": "2000003", 38 "SampleAfterValue": "2000003",
116 "BriefDescription": "Load miss in all TLB levels causes a page walk that completes. (1G)", 39 "BriefDescription": "Page walk completed due to a demand data load to a 1G page",
117 "CounterHTOff": "0,1,2,3,4,5,6,7" 40 "CounterHTOff": "0,1,2,3,4,5,6,7"
118 }, 41 },
119 { 42 {
43 "PublicDescription": "Counts demand data loads that caused a completed page walk of any page size (4K/2M/4M/1G). This implies it missed in all TLB levels. The page walk can end with or without a fault.",
44 "EventCode": "0x08",
45 "Counter": "0,1,2,3",
46 "UMask": "0xe",
47 "EventName": "DTLB_LOAD_MISSES.WALK_COMPLETED",
48 "SampleAfterValue": "100003",
49 "BriefDescription": "Load miss in all TLB levels causes a page walk that completes. (All page sizes)",
50 "CounterHTOff": "0,1,2,3,4,5,6,7"
51 },
52 {
53 "PublicDescription": "Counts 1 per cycle for each PMH that is busy with a page walk for a load. EPT page walk duration are excluded in Skylake microarchitecture.",
120 "EventCode": "0x08", 54 "EventCode": "0x08",
121 "Counter": "0,1,2,3", 55 "Counter": "0,1,2,3",
122 "UMask": "0x10", 56 "UMask": "0x10",
123 "EventName": "DTLB_LOAD_MISSES.WALK_PENDING", 57 "EventName": "DTLB_LOAD_MISSES.WALK_PENDING",
124 "SampleAfterValue": "2000003", 58 "SampleAfterValue": "2000003",
125 "BriefDescription": "Counts 1 per cycle for each PMH that is busy with a page walk for a load. EPT page walk duration are excluded in Skylake. ", 59 "BriefDescription": "Counts 1 per cycle for each PMH that is busy with a page walk for a load. EPT page walk duration are excluded in Skylake.",
60 "CounterHTOff": "0,1,2,3,4,5,6,7"
61 },
62 {
63 "PublicDescription": "Counts cycles when at least one PMH (Page Miss Handler) is busy with a page walk for a load.",
64 "EventCode": "0x08",
65 "Counter": "0,1,2,3",
66 "UMask": "0x10",
67 "EventName": "DTLB_LOAD_MISSES.WALK_ACTIVE",
68 "SampleAfterValue": "100003",
69 "BriefDescription": "Cycles when at least one PMH is busy with a page walk for a load. EPT page walk duration are excluded in Skylake.",
70 "CounterMask": "1",
126 "CounterHTOff": "0,1,2,3,4,5,6,7" 71 "CounterHTOff": "0,1,2,3,4,5,6,7"
127 }, 72 },
128 { 73 {
74 "PublicDescription": "Counts loads that miss the DTLB (Data TLB) and hit the STLB (Second level TLB).",
129 "EventCode": "0x08", 75 "EventCode": "0x08",
130 "Counter": "0,1,2,3", 76 "Counter": "0,1,2,3",
131 "UMask": "0x20", 77 "UMask": "0x20",
@@ -135,7 +81,7 @@
135 "CounterHTOff": "0,1,2,3,4,5,6,7" 81 "CounterHTOff": "0,1,2,3,4,5,6,7"
136 }, 82 },
137 { 83 {
138 "PublicDescription": "This event counts store misses in all DTLB levels that cause page walks of any page size (4K/2M/4M/1G).", 84 "PublicDescription": "Counts demand data stores that caused a page walk of any page size (4K/2M/4M/1G). This implies it missed in all TLB levels, but the walk need not have completed.",
139 "EventCode": "0x49", 85 "EventCode": "0x49",
140 "Counter": "0,1,2,3", 86 "Counter": "0,1,2,3",
141 "UMask": "0x1", 87 "UMask": "0x1",
@@ -145,45 +91,68 @@
145 "CounterHTOff": "0,1,2,3,4,5,6,7" 91 "CounterHTOff": "0,1,2,3,4,5,6,7"
146 }, 92 },
147 { 93 {
148 "PublicDescription": "This event counts store misses in all DTLB levels that cause a completed page walk (4K page size). The page walk can end with or without a fault.", 94 "PublicDescription": "Counts page walks completed due to demand data stores whose address translations missed in the TLB and were mapped to 4K pages. The page walks can end with or without a page fault.",
149 "EventCode": "0x49", 95 "EventCode": "0x49",
150 "Counter": "0,1,2,3", 96 "Counter": "0,1,2,3",
151 "UMask": "0x2", 97 "UMask": "0x2",
152 "EventName": "DTLB_STORE_MISSES.WALK_COMPLETED_4K", 98 "EventName": "DTLB_STORE_MISSES.WALK_COMPLETED_4K",
153 "SampleAfterValue": "100003", 99 "SampleAfterValue": "100003",
154 "BriefDescription": "Store miss in all TLB levels causes a page walk that completes. (4K)", 100 "BriefDescription": "Page walk completed due to a demand data store to a 4K page",
155 "CounterHTOff": "0,1,2,3,4,5,6,7" 101 "CounterHTOff": "0,1,2,3,4,5,6,7"
156 }, 102 },
157 { 103 {
158 "PublicDescription": "This event counts store misses in all DTLB levels that cause a completed page walk (2M and 4M page sizes). The page walk can end with or without a fault.", 104 "PublicDescription": "Counts page walks completed due to demand data stores whose address translations missed in the TLB and were mapped to 2M/4M pages. The page walks can end with or without a page fault.",
159 "EventCode": "0x49", 105 "EventCode": "0x49",
160 "Counter": "0,1,2,3", 106 "Counter": "0,1,2,3",
161 "UMask": "0x4", 107 "UMask": "0x4",
162 "EventName": "DTLB_STORE_MISSES.WALK_COMPLETED_2M_4M", 108 "EventName": "DTLB_STORE_MISSES.WALK_COMPLETED_2M_4M",
163 "SampleAfterValue": "100003", 109 "SampleAfterValue": "100003",
164 "BriefDescription": "Store misses in all DTLB levels that cause completed page walks (2M/4M)", 110 "BriefDescription": "Page walk completed due to a demand data store to a 2M/4M page",
165 "CounterHTOff": "0,1,2,3,4,5,6,7" 111 "CounterHTOff": "0,1,2,3,4,5,6,7"
166 }, 112 },
167 { 113 {
168 "PublicDescription": "This event counts store misses in all DTLB levels that cause a completed page walk (1G page size). The page walk can end with or without a fault.", 114 "PublicDescription": "Counts page walks completed due to demand data stores whose address translations missed in the TLB and were mapped to 1G pages. The page walks can end with or without a page fault.",
169 "EventCode": "0x49", 115 "EventCode": "0x49",
170 "Counter": "0,1,2,3", 116 "Counter": "0,1,2,3",
171 "UMask": "0x8", 117 "UMask": "0x8",
172 "EventName": "DTLB_STORE_MISSES.WALK_COMPLETED_1G", 118 "EventName": "DTLB_STORE_MISSES.WALK_COMPLETED_1G",
173 "SampleAfterValue": "100003", 119 "SampleAfterValue": "100003",
174 "BriefDescription": "Store misses in all DTLB levels that cause completed page walks (1G)", 120 "BriefDescription": "Page walk completed due to a demand data store to a 1G page",
121 "CounterHTOff": "0,1,2,3,4,5,6,7"
122 },
123 {
124 "PublicDescription": "Counts demand data stores that caused a completed page walk of any page size (4K/2M/4M/1G). This implies it missed in all TLB levels. The page walk can end with or without a fault.",
125 "EventCode": "0x49",
126 "Counter": "0,1,2,3",
127 "UMask": "0xe",
128 "EventName": "DTLB_STORE_MISSES.WALK_COMPLETED",
129 "SampleAfterValue": "100003",
130 "BriefDescription": "Store misses in all TLB levels causes a page walk that completes. (All page sizes)",
175 "CounterHTOff": "0,1,2,3,4,5,6,7" 131 "CounterHTOff": "0,1,2,3,4,5,6,7"
176 }, 132 },
177 { 133 {
134 "PublicDescription": "Counts 1 per cycle for each PMH that is busy with a page walk for a store. EPT page walk duration are excluded in Skylake microarchitecture.",
178 "EventCode": "0x49", 135 "EventCode": "0x49",
179 "Counter": "0,1,2,3", 136 "Counter": "0,1,2,3",
180 "UMask": "0x10", 137 "UMask": "0x10",
181 "EventName": "DTLB_STORE_MISSES.WALK_PENDING", 138 "EventName": "DTLB_STORE_MISSES.WALK_PENDING",
182 "SampleAfterValue": "2000003", 139 "SampleAfterValue": "2000003",
183 "BriefDescription": "Counts 1 per cycle for each PMH that is busy with a page walk for a store. EPT page walk duration are excluded in Skylake. ", 140 "BriefDescription": "Counts 1 per cycle for each PMH that is busy with a page walk for a store. EPT page walk duration are excluded in Skylake.",
141 "CounterHTOff": "0,1,2,3,4,5,6,7"
142 },
143 {
144 "PublicDescription": "Counts cycles when at least one PMH (Page Miss Handler) is busy with a page walk for a store.",
145 "EventCode": "0x49",
146 "Counter": "0,1,2,3",
147 "UMask": "0x10",
148 "EventName": "DTLB_STORE_MISSES.WALK_ACTIVE",
149 "SampleAfterValue": "100003",
150 "BriefDescription": "Cycles when at least one PMH is busy with a page walk for a store. EPT page walk duration are excluded in Skylake.",
151 "CounterMask": "1",
184 "CounterHTOff": "0,1,2,3,4,5,6,7" 152 "CounterHTOff": "0,1,2,3,4,5,6,7"
185 }, 153 },
186 { 154 {
155 "PublicDescription": "Stores that miss the DTLB (Data TLB) and hit the STLB (2nd Level TLB).",
187 "EventCode": "0x49", 156 "EventCode": "0x49",
188 "Counter": "0,1,2,3", 157 "Counter": "0,1,2,3",
189 "UMask": "0x20", 158 "UMask": "0x20",
@@ -193,73 +162,77 @@
193 "CounterHTOff": "0,1,2,3,4,5,6,7" 162 "CounterHTOff": "0,1,2,3,4,5,6,7"
194 }, 163 },
195 { 164 {
196 "PublicDescription": "This event counts the number of DTLB flush attempts of the thread-specific entries.", 165 "PublicDescription": "Counts cycles for each PMH (Page Miss Handler) that is busy with an EPT (Extended Page Table) walk for any request type.",
197 "EventCode": "0xBD", 166 "EventCode": "0x4F",
198 "Counter": "0,1,2,3", 167 "Counter": "0,1,2,3",
199 "UMask": "0x1", 168 "UMask": "0x10",
200 "EventName": "TLB_FLUSH.DTLB_THREAD", 169 "EventName": "EPT.WALK_PENDING",
201 "SampleAfterValue": "100007", 170 "SampleAfterValue": "2000003",
202 "BriefDescription": "DTLB flush attempts of the thread-specific entries", 171 "BriefDescription": "Counts 1 per cycle for each PMH that is busy with a EPT (Extended Page Table) walk for any request type.",
203 "CounterHTOff": "0,1,2,3,4,5,6,7" 172 "CounterHTOff": "0,1,2,3,4,5,6,7"
204 }, 173 },
205 { 174 {
206 "PublicDescription": "This event counts the number of any STLB flush attempts (such as entire, VPID, PCID, InvPage, CR3 write, and so on).", 175 "PublicDescription": "Counts page walks of any page size (4K/2M/4M/1G) caused by a code fetch. This implies it missed in the ITLB and further levels of TLB, but the walk need not have completed.",
207 "EventCode": "0xBD", 176 "EventCode": "0x85",
208 "Counter": "0,1,2,3", 177 "Counter": "0,1,2,3",
209 "UMask": "0x20", 178 "UMask": "0x1",
210 "EventName": "TLB_FLUSH.STLB_ANY", 179 "EventName": "ITLB_MISSES.MISS_CAUSES_A_WALK",
211 "SampleAfterValue": "100007", 180 "SampleAfterValue": "100003",
212 "BriefDescription": "STLB flush attempts", 181 "BriefDescription": "Misses at all ITLB levels that cause page walks",
213 "CounterHTOff": "0,1,2,3,4,5,6,7" 182 "CounterHTOff": "0,1,2,3,4,5,6,7"
214 }, 183 },
215 { 184 {
185 "PublicDescription": "Counts completed page walks (4K page size) caused by a code fetch. This implies it missed in the ITLB and further levels of TLB. The page walk can end with or without a fault.",
216 "EventCode": "0x85", 186 "EventCode": "0x85",
217 "Counter": "0,1,2,3", 187 "Counter": "0,1,2,3",
218 "UMask": "0xe", 188 "UMask": "0x2",
219 "EventName": "ITLB_MISSES.WALK_COMPLETED", 189 "EventName": "ITLB_MISSES.WALK_COMPLETED_4K",
220 "SampleAfterValue": "100003", 190 "SampleAfterValue": "100003",
221 "BriefDescription": "Code miss in all TLB levels causes a page walk that completes. (All page sizes)", 191 "BriefDescription": "Code miss in all TLB levels causes a page walk that completes. (4K)",
222 "CounterHTOff": "0,1,2,3,4,5,6,7" 192 "CounterHTOff": "0,1,2,3,4,5,6,7"
223 }, 193 },
224 { 194 {
225 "EventCode": "0x08", 195 "PublicDescription": "Counts code misses in all ITLB levels that caused a completed page walk (2M and 4M page sizes). The page walk can end with or without a fault.",
196 "EventCode": "0x85",
226 "Counter": "0,1,2,3", 197 "Counter": "0,1,2,3",
227 "UMask": "0xe", 198 "UMask": "0x4",
228 "EventName": "DTLB_LOAD_MISSES.WALK_COMPLETED", 199 "EventName": "ITLB_MISSES.WALK_COMPLETED_2M_4M",
229 "SampleAfterValue": "100003", 200 "SampleAfterValue": "100003",
230 "BriefDescription": "Load miss in all TLB levels causes a page walk that completes. (All page sizes)", 201 "BriefDescription": "Code miss in all TLB levels causes a page walk that completes. (2M/4M)",
231 "CounterHTOff": "0,1,2,3,4,5,6,7" 202 "CounterHTOff": "0,1,2,3,4,5,6,7"
232 }, 203 },
233 { 204 {
234 "EventCode": "0x49", 205 "PublicDescription": "Counts store misses in all DTLB levels that cause a completed page walk (1G page size). The page walk can end with or without a fault.",
206 "EventCode": "0x85",
235 "Counter": "0,1,2,3", 207 "Counter": "0,1,2,3",
236 "UMask": "0xe", 208 "UMask": "0x8",
237 "EventName": "DTLB_STORE_MISSES.WALK_COMPLETED", 209 "EventName": "ITLB_MISSES.WALK_COMPLETED_1G",
238 "SampleAfterValue": "100003", 210 "SampleAfterValue": "100003",
239 "BriefDescription": "Store misses in all TLB levels causes a page walk that completes. (All page sizes)", 211 "BriefDescription": "Code miss in all TLB levels causes a page walk that completes. (1G)",
240 "CounterHTOff": "0,1,2,3,4,5,6,7" 212 "CounterHTOff": "0,1,2,3,4,5,6,7"
241 }, 213 },
242 { 214 {
243 "EventCode": "0x49", 215 "PublicDescription": "Counts completed page walks (2M and 4M page sizes) caused by a code fetch. This implies it missed in the ITLB and further levels of TLB. The page walk can end with or without a fault.",
216 "EventCode": "0x85",
244 "Counter": "0,1,2,3", 217 "Counter": "0,1,2,3",
245 "UMask": "0x10", 218 "UMask": "0xe",
246 "EventName": "DTLB_STORE_MISSES.WALK_ACTIVE", 219 "EventName": "ITLB_MISSES.WALK_COMPLETED",
247 "SampleAfterValue": "100003", 220 "SampleAfterValue": "100003",
248 "BriefDescription": "Cycles when at least one PMH is busy with a page walk for a store. EPT page walk duration are excluded in Skylake. ", 221 "BriefDescription": "Code miss in all TLB levels causes a page walk that completes. (All page sizes)",
249 "CounterMask": "1",
250 "CounterHTOff": "0,1,2,3,4,5,6,7" 222 "CounterHTOff": "0,1,2,3,4,5,6,7"
251 }, 223 },
252 { 224 {
253 "EventCode": "0x08", 225 "PublicDescription": "Counts 1 per cycle for each PMH (Page Miss Handler) that is busy with a page walk for an instruction fetch request. EPT page walk duration are excluded in Skylake michroarchitecture.",
226 "EventCode": "0x85",
254 "Counter": "0,1,2,3", 227 "Counter": "0,1,2,3",
255 "UMask": "0x10", 228 "UMask": "0x10",
256 "EventName": "DTLB_LOAD_MISSES.WALK_ACTIVE", 229 "EventName": "ITLB_MISSES.WALK_PENDING",
257 "SampleAfterValue": "100003", 230 "SampleAfterValue": "100003",
258 "BriefDescription": "Cycles when at least one PMH is busy with a page walk for a load. EPT page walk duration are excluded in Skylake. ", 231 "BriefDescription": "Counts 1 per cycle for each PMH that is busy with a page walk for an instruction fetch request. EPT page walk duration are excluded in Skylake.",
259 "CounterMask": "1",
260 "CounterHTOff": "0,1,2,3,4,5,6,7" 232 "CounterHTOff": "0,1,2,3,4,5,6,7"
261 }, 233 },
262 { 234 {
235 "PublicDescription": "Cycles when at least one PMH is busy with a page walk for code (instruction fetch) request. EPT page walk duration are excluded in Skylake microarchitecture.",
263 "EventCode": "0x85", 236 "EventCode": "0x85",
264 "Counter": "0,1,2,3", 237 "Counter": "0,1,2,3",
265 "UMask": "0x10", 238 "UMask": "0x10",
@@ -268,5 +241,44 @@
268 "BriefDescription": "Cycles when at least one PMH is busy with a page walk for code (instruction fetch) request. EPT page walk duration are excluded in Skylake.", 241 "BriefDescription": "Cycles when at least one PMH is busy with a page walk for code (instruction fetch) request. EPT page walk duration are excluded in Skylake.",
269 "CounterMask": "1", 242 "CounterMask": "1",
270 "CounterHTOff": "0,1,2,3,4,5,6,7" 243 "CounterHTOff": "0,1,2,3,4,5,6,7"
244 },
245 {
246 "EventCode": "0x85",
247 "Counter": "0,1,2,3",
248 "UMask": "0x20",
249 "EventName": "ITLB_MISSES.STLB_HIT",
250 "SampleAfterValue": "100003",
251 "BriefDescription": "Instruction fetch requests that miss the ITLB and hit the STLB.",
252 "CounterHTOff": "0,1,2,3,4,5,6,7"
253 },
254 {
255 "PublicDescription": "Counts the number of flushes of the big or small ITLB pages. Counting include both TLB Flush (covering all sets) and TLB Set Clear (set-specific).",
256 "EventCode": "0xAE",
257 "Counter": "0,1,2,3",
258 "UMask": "0x1",
259 "EventName": "ITLB.ITLB_FLUSH",
260 "SampleAfterValue": "100007",
261 "BriefDescription": "Flushing of the Instruction TLB (ITLB) pages, includes 4k/2M/4M pages.",
262 "CounterHTOff": "0,1,2,3,4,5,6,7"
263 },
264 {
265 "PublicDescription": "Counts the number of DTLB flush attempts of the thread-specific entries.",
266 "EventCode": "0xBD",
267 "Counter": "0,1,2,3",
268 "UMask": "0x1",
269 "EventName": "TLB_FLUSH.DTLB_THREAD",
270 "SampleAfterValue": "100007",
271 "BriefDescription": "DTLB flush attempts of the thread-specific entries",
272 "CounterHTOff": "0,1,2,3,4,5,6,7"
273 },
274 {
275 "PublicDescription": "Counts the number of any STLB flush attempts (such as entire, VPID, PCID, InvPage, CR3 write, etc.).",
276 "EventCode": "0xBD",
277 "Counter": "0,1,2,3",
278 "UMask": "0x20",
279 "EventName": "TLB_FLUSH.STLB_ANY",
280 "SampleAfterValue": "100007",
281 "BriefDescription": "STLB flush attempts",
282 "CounterHTOff": "0,1,2,3,4,5,6,7"
271 } 283 }
272] \ No newline at end of file 284] \ No newline at end of file
diff --git a/tools/perf/pmu-events/arch/x86/skylakex/cache.json b/tools/perf/pmu-events/arch/x86/skylakex/cache.json
index b5bc742b6fbc..5c9940866acd 100644
--- a/tools/perf/pmu-events/arch/x86/skylakex/cache.json
+++ b/tools/perf/pmu-events/arch/x86/skylakex/cache.json
@@ -265,7 +265,7 @@
265 { 265 {
266 "EventCode": "0x60", 266 "EventCode": "0x60",
267 "UMask": "0x2", 267 "UMask": "0x2",
268 "BriefDescription": "Offcore outstanding Code Reads transactions in the SuperQueue (SQ), queue to uncore, every cycle. ", 268 "BriefDescription": "Offcore outstanding Code Reads transactions in the SuperQueue (SQ), queue to uncore, every cycle.",
269 "Counter": "0,1,2,3", 269 "Counter": "0,1,2,3",
270 "EventName": "OFFCORE_REQUESTS_OUTSTANDING.DEMAND_CODE_RD", 270 "EventName": "OFFCORE_REQUESTS_OUTSTANDING.DEMAND_CODE_RD",
271 "PublicDescription": "Counts the number of offcore outstanding Code Reads transactions in the super queue every cycle. The 'Offcore outstanding' state of the transaction lasts from the L2 miss until the sending transaction completion to requestor (SQ deallocation). See the corresponding Umask under OFFCORE_REQUESTS.", 271 "PublicDescription": "Counts the number of offcore outstanding Code Reads transactions in the super queue every cycle. The 'Offcore outstanding' state of the transaction lasts from the L2 miss until the sending transaction completion to requestor (SQ deallocation). See the corresponding Umask under OFFCORE_REQUESTS.",
@@ -398,22 +398,24 @@
398 { 398 {
399 "EventCode": "0xD0", 399 "EventCode": "0xD0",
400 "UMask": "0x11", 400 "UMask": "0x11",
401 "BriefDescription": "Retired load instructions that miss the STLB.", 401 "BriefDescription": "Retired load instructions that miss the STLB. (Precise Event)",
402 "Data_LA": "1", 402 "Data_LA": "1",
403 "PEBS": "1", 403 "PEBS": "1",
404 "Counter": "0,1,2,3", 404 "Counter": "0,1,2,3",
405 "EventName": "MEM_INST_RETIRED.STLB_MISS_LOADS", 405 "EventName": "MEM_INST_RETIRED.STLB_MISS_LOADS",
406 "PublicDescription": "Retired load instructions that miss the STLB.",
406 "SampleAfterValue": "100003", 407 "SampleAfterValue": "100003",
407 "CounterHTOff": "0,1,2,3" 408 "CounterHTOff": "0,1,2,3"
408 }, 409 },
409 { 410 {
410 "EventCode": "0xD0", 411 "EventCode": "0xD0",
411 "UMask": "0x12", 412 "UMask": "0x12",
412 "BriefDescription": "Retired store instructions that miss the STLB.", 413 "BriefDescription": "Retired store instructions that miss the STLB. (Precise Event)",
413 "Data_LA": "1", 414 "Data_LA": "1",
414 "PEBS": "1", 415 "PEBS": "1",
415 "Counter": "0,1,2,3", 416 "Counter": "0,1,2,3",
416 "EventName": "MEM_INST_RETIRED.STLB_MISS_STORES", 417 "EventName": "MEM_INST_RETIRED.STLB_MISS_STORES",
418 "PublicDescription": "Retired store instructions that miss the STLB.",
417 "SampleAfterValue": "100003", 419 "SampleAfterValue": "100003",
418 "L1_Hit_Indication": "1", 420 "L1_Hit_Indication": "1",
419 "CounterHTOff": "0,1,2,3" 421 "CounterHTOff": "0,1,2,3"
@@ -421,7 +423,7 @@
421 { 423 {
422 "EventCode": "0xD0", 424 "EventCode": "0xD0",
423 "UMask": "0x21", 425 "UMask": "0x21",
424 "BriefDescription": "Retired load instructions with locked access.", 426 "BriefDescription": "Retired load instructions with locked access. (Precise Event)",
425 "Data_LA": "1", 427 "Data_LA": "1",
426 "PEBS": "1", 428 "PEBS": "1",
427 "Counter": "0,1,2,3", 429 "Counter": "0,1,2,3",
@@ -432,24 +434,22 @@
432 { 434 {
433 "EventCode": "0xD0", 435 "EventCode": "0xD0",
434 "UMask": "0x41", 436 "UMask": "0x41",
435 "BriefDescription": "Retired load instructions that split across a cacheline boundary.", 437 "BriefDescription": "Retired load instructions that split across a cacheline boundary. (Precise Event)",
436 "Data_LA": "1", 438 "Data_LA": "1",
437 "PEBS": "1", 439 "PEBS": "1",
438 "Counter": "0,1,2,3", 440 "Counter": "0,1,2,3",
439 "EventName": "MEM_INST_RETIRED.SPLIT_LOADS", 441 "EventName": "MEM_INST_RETIRED.SPLIT_LOADS",
440 "PublicDescription": "Counts retired load instructions that split across a cacheline boundary.",
441 "SampleAfterValue": "100003", 442 "SampleAfterValue": "100003",
442 "CounterHTOff": "0,1,2,3" 443 "CounterHTOff": "0,1,2,3"
443 }, 444 },
444 { 445 {
445 "EventCode": "0xD0", 446 "EventCode": "0xD0",
446 "UMask": "0x42", 447 "UMask": "0x42",
447 "BriefDescription": "Retired store instructions that split across a cacheline boundary.", 448 "BriefDescription": "Retired store instructions that split across a cacheline boundary. (Precise Event)",
448 "Data_LA": "1", 449 "Data_LA": "1",
449 "PEBS": "1", 450 "PEBS": "1",
450 "Counter": "0,1,2,3", 451 "Counter": "0,1,2,3",
451 "EventName": "MEM_INST_RETIRED.SPLIT_STORES", 452 "EventName": "MEM_INST_RETIRED.SPLIT_STORES",
452 "PublicDescription": "Counts retired store instructions that split across a cacheline boundary.",
453 "SampleAfterValue": "100003", 453 "SampleAfterValue": "100003",
454 "L1_Hit_Indication": "1", 454 "L1_Hit_Indication": "1",
455 "CounterHTOff": "0,1,2,3" 455 "CounterHTOff": "0,1,2,3"
@@ -457,7 +457,7 @@
457 { 457 {
458 "EventCode": "0xD0", 458 "EventCode": "0xD0",
459 "UMask": "0x81", 459 "UMask": "0x81",
460 "BriefDescription": "All retired load instructions.", 460 "BriefDescription": "All retired load instructions. (Precise Event)",
461 "Data_LA": "1", 461 "Data_LA": "1",
462 "PEBS": "1", 462 "PEBS": "1",
463 "Counter": "0,1,2,3", 463 "Counter": "0,1,2,3",
@@ -468,11 +468,12 @@
468 { 468 {
469 "EventCode": "0xD0", 469 "EventCode": "0xD0",
470 "UMask": "0x82", 470 "UMask": "0x82",
471 "BriefDescription": "All retired store instructions.", 471 "BriefDescription": "All retired store instructions. (Precise Event)",
472 "Data_LA": "1", 472 "Data_LA": "1",
473 "PEBS": "1", 473 "PEBS": "1",
474 "Counter": "0,1,2,3", 474 "Counter": "0,1,2,3",
475 "EventName": "MEM_INST_RETIRED.ALL_STORES", 475 "EventName": "MEM_INST_RETIRED.ALL_STORES",
476 "PublicDescription": "All retired store instructions.",
476 "SampleAfterValue": "2000003", 477 "SampleAfterValue": "2000003",
477 "L1_Hit_Indication": "1", 478 "L1_Hit_Indication": "1",
478 "CounterHTOff": "0,1,2,3" 479 "CounterHTOff": "0,1,2,3"
@@ -485,7 +486,7 @@
485 "PEBS": "1", 486 "PEBS": "1",
486 "Counter": "0,1,2,3", 487 "Counter": "0,1,2,3",
487 "EventName": "MEM_LOAD_RETIRED.L1_HIT", 488 "EventName": "MEM_LOAD_RETIRED.L1_HIT",
488 "PublicDescription": "Counts retired load instructions with at least one uop that hit in the L1 data cache. This event includes all SW prefetches and lock instructions regardless of the data source.", 489 "PublicDescription": "Counts retired load instructions with at least one uop that hit in the L1 data cache. This event includes all SW prefetches and lock instructions regardless of the data source.\r\n",
489 "SampleAfterValue": "2000003", 490 "SampleAfterValue": "2000003",
490 "CounterHTOff": "0,1,2,3" 491 "CounterHTOff": "0,1,2,3"
491 }, 492 },
@@ -509,7 +510,7 @@
509 "PEBS": "1", 510 "PEBS": "1",
510 "Counter": "0,1,2,3", 511 "Counter": "0,1,2,3",
511 "EventName": "MEM_LOAD_RETIRED.L3_HIT", 512 "EventName": "MEM_LOAD_RETIRED.L3_HIT",
512 "PublicDescription": "Counts retired load instructions with at least one uop that hit in the L3 cache. ", 513 "PublicDescription": "Retired load instructions with L3 cache hits as data sources.",
513 "SampleAfterValue": "50021", 514 "SampleAfterValue": "50021",
514 "CounterHTOff": "0,1,2,3" 515 "CounterHTOff": "0,1,2,3"
515 }, 516 },
@@ -545,7 +546,7 @@
545 "PEBS": "1", 546 "PEBS": "1",
546 "Counter": "0,1,2,3", 547 "Counter": "0,1,2,3",
547 "EventName": "MEM_LOAD_RETIRED.L3_MISS", 548 "EventName": "MEM_LOAD_RETIRED.L3_MISS",
548 "PublicDescription": "Counts retired load instructions with at least one uop that missed in the L3 cache. ", 549 "PublicDescription": "Retired load instructions missed L3 cache as data sources.",
549 "SampleAfterValue": "100007", 550 "SampleAfterValue": "100007",
550 "CounterHTOff": "0,1,2,3" 551 "CounterHTOff": "0,1,2,3"
551 }, 552 },
@@ -557,7 +558,7 @@
557 "PEBS": "1", 558 "PEBS": "1",
558 "Counter": "0,1,2,3", 559 "Counter": "0,1,2,3",
559 "EventName": "MEM_LOAD_RETIRED.FB_HIT", 560 "EventName": "MEM_LOAD_RETIRED.FB_HIT",
560 "PublicDescription": "Counts retired load instructions with at least one uop was load missed in L1 but hit FB (Fill Buffers) due to preceding miss to the same cache line with data not ready. ", 561 "PublicDescription": "Counts retired load instructions with at least one uop was load missed in L1 but hit FB (Fill Buffers) due to preceding miss to the same cache line with data not ready. \r\n",
561 "SampleAfterValue": "100007", 562 "SampleAfterValue": "100007",
562 "CounterHTOff": "0,1,2,3" 563 "CounterHTOff": "0,1,2,3"
563 }, 564 },
@@ -616,7 +617,6 @@
616 "PEBS": "1", 617 "PEBS": "1",
617 "Counter": "0,1,2,3", 618 "Counter": "0,1,2,3",
618 "EventName": "MEM_LOAD_L3_MISS_RETIRED.LOCAL_DRAM", 619 "EventName": "MEM_LOAD_L3_MISS_RETIRED.LOCAL_DRAM",
619 "PublicDescription": "Retired load instructions which data sources missed L3 but serviced from local DRAM.",
620 "SampleAfterValue": "100007", 620 "SampleAfterValue": "100007",
621 "CounterHTOff": "0,1,2,3" 621 "CounterHTOff": "0,1,2,3"
622 }, 622 },
@@ -639,7 +639,6 @@
639 "PEBS": "1", 639 "PEBS": "1",
640 "Counter": "0,1,2,3", 640 "Counter": "0,1,2,3",
641 "EventName": "MEM_LOAD_L3_MISS_RETIRED.REMOTE_HITM", 641 "EventName": "MEM_LOAD_L3_MISS_RETIRED.REMOTE_HITM",
642 "PublicDescription": "Retired load instructions whose data sources was remote HITM.",
643 "SampleAfterValue": "100007", 642 "SampleAfterValue": "100007",
644 "CounterHTOff": "0,1,2,3" 643 "CounterHTOff": "0,1,2,3"
645 }, 644 },
@@ -648,9 +647,9 @@
648 "UMask": "0x8", 647 "UMask": "0x8",
649 "BriefDescription": "Retired load instructions whose data sources was forwarded from a remote cache", 648 "BriefDescription": "Retired load instructions whose data sources was forwarded from a remote cache",
650 "Data_LA": "1", 649 "Data_LA": "1",
650 "PEBS": "1",
651 "Counter": "0,1,2,3", 651 "Counter": "0,1,2,3",
652 "EventName": "MEM_LOAD_L3_MISS_RETIRED.REMOTE_FWD", 652 "EventName": "MEM_LOAD_L3_MISS_RETIRED.REMOTE_FWD",
653 "PublicDescription": "Retired load instructions whose data sources was forwarded from a remote cache.",
654 "SampleAfterValue": "100007", 653 "SampleAfterValue": "100007",
655 "CounterHTOff": "0,1,2,3" 654 "CounterHTOff": "0,1,2,3"
656 }, 655 },
@@ -697,7 +696,7 @@
697 { 696 {
698 "EventCode": "0xF2", 697 "EventCode": "0xF2",
699 "UMask": "0x2", 698 "UMask": "0x2",
700 "BriefDescription": "Counts the number of lines that are evicted by L2 cache when triggered by an L2 cache fill. Those lines can be either in modified state or clean state. Modified lines may either be written back to L3 or directly written to memory and not allocated in L3. Clean lines may either be allocated in L3 or dropped ", 699 "BriefDescription": "Counts the number of lines that are evicted by L2 cache when triggered by an L2 cache fill. Those lines can be either in modified state or clean state. Modified lines may either be written back to L3 or directly written to memory and not allocated in L3. Clean lines may either be allocated in L3 or dropped",
701 "Counter": "0,1,2,3", 700 "Counter": "0,1,2,3",
702 "EventName": "L2_LINES_OUT.NON_SILENT", 701 "EventName": "L2_LINES_OUT.NON_SILENT",
703 "PublicDescription": "Counts the number of lines that are evicted by L2 cache when triggered by an L2 cache fill. Those lines can be either in modified state or clean state. Modified lines may either be written back to L3 or directly written to memory and not allocated in L3. Clean lines may either be allocated in L3 or dropped.", 702 "PublicDescription": "Counts the number of lines that are evicted by L2 cache when triggered by an L2 cache fill. Those lines can be either in modified state or clean state. Modified lines may either be written back to L3 or directly written to memory and not allocated in L3. Clean lines may either be allocated in L3 or dropped.",
@@ -742,7 +741,7 @@
742 "Counter": "0,1,2,3", 741 "Counter": "0,1,2,3",
743 "EventName": "OFFCORE_RESPONSE.DEMAND_DATA_RD.ANY_RESPONSE", 742 "EventName": "OFFCORE_RESPONSE.DEMAND_DATA_RD.ANY_RESPONSE",
744 "MSRIndex": "0x1a6,0x1a7", 743 "MSRIndex": "0x1a6,0x1a7",
745 "PublicDescription": "Counts demand data reads that have any response type.; Offcore response can be programmed only with a specific pair of event select and counter MSR, and with specific event codes and predefine mask bit value in a dedicated MSR to specify attributes of the offcore transaction.", 744 "PublicDescription": "Counts demand data reads that have any response type. Offcore response can be programmed only with a specific pair of event select and counter MSR, and with specific event codes and predefine mask bit value in a dedicated MSR to specify attributes of the offcore transaction.",
746 "SampleAfterValue": "100003", 745 "SampleAfterValue": "100003",
747 "CounterHTOff": "0,1,2,3" 746 "CounterHTOff": "0,1,2,3"
748 }, 747 },
@@ -755,7 +754,7 @@
755 "Counter": "0,1,2,3", 754 "Counter": "0,1,2,3",
756 "EventName": "OFFCORE_RESPONSE.DEMAND_DATA_RD.L3_HIT.NO_SNOOP_NEEDED", 755 "EventName": "OFFCORE_RESPONSE.DEMAND_DATA_RD.L3_HIT.NO_SNOOP_NEEDED",
757 "MSRIndex": "0x1a6,0x1a7", 756 "MSRIndex": "0x1a6,0x1a7",
758 "PublicDescription": "Counts demand data reads that hit in the L3 and sibling core snoops are not needed as either the core-valid bit is not set or the shared line is present in multiple cores.; Offcore response can be programmed only with a specific pair of event select and counter MSR, and with specific event codes and predefine mask bit value in a dedicated MSR to specify attributes of the offcore transaction.", 757 "PublicDescription": "Counts demand data reads that hit in the L3 and sibling core snoops are not needed as either the core-valid bit is not set or the shared line is present in multiple cores. Offcore response can be programmed only with a specific pair of event select and counter MSR, and with specific event codes and predefine mask bit value in a dedicated MSR to specify attributes of the offcore transaction.",
759 "SampleAfterValue": "100003", 758 "SampleAfterValue": "100003",
760 "CounterHTOff": "0,1,2,3" 759 "CounterHTOff": "0,1,2,3"
761 }, 760 },
@@ -768,7 +767,7 @@
768 "Counter": "0,1,2,3", 767 "Counter": "0,1,2,3",
769 "EventName": "OFFCORE_RESPONSE.DEMAND_DATA_RD.L3_HIT.HIT_OTHER_CORE_NO_FWD", 768 "EventName": "OFFCORE_RESPONSE.DEMAND_DATA_RD.L3_HIT.HIT_OTHER_CORE_NO_FWD",
770 "MSRIndex": "0x1a6,0x1a7", 769 "MSRIndex": "0x1a6,0x1a7",
771 "PublicDescription": "Counts demand data reads that hit in the L3 and the snoop to one of the sibling cores hits the line in M state and the line is forwarded.; Offcore response can be programmed only with a specific pair of event select and counter MSR, and with specific event codes and predefine mask bit value in a dedicated MSR to specify attributes of the offcore transaction.", 770 "PublicDescription": "Counts demand data reads that hit in the L3 and the snoop to one of the sibling cores hits the line in M state and the line is forwarded. Offcore response can be programmed only with a specific pair of event select and counter MSR, and with specific event codes and predefine mask bit value in a dedicated MSR to specify attributes of the offcore transaction.",
772 "SampleAfterValue": "100003", 771 "SampleAfterValue": "100003",
773 "CounterHTOff": "0,1,2,3" 772 "CounterHTOff": "0,1,2,3"
774 }, 773 },
@@ -781,7 +780,7 @@
781 "Counter": "0,1,2,3", 780 "Counter": "0,1,2,3",
782 "EventName": "OFFCORE_RESPONSE.DEMAND_DATA_RD.L3_HIT.SNOOP_HIT_WITH_FWD", 781 "EventName": "OFFCORE_RESPONSE.DEMAND_DATA_RD.L3_HIT.SNOOP_HIT_WITH_FWD",
783 "MSRIndex": "0x1a6,0x1a7", 782 "MSRIndex": "0x1a6,0x1a7",
784 "PublicDescription": "tbd; Offcore response can be programmed only with a specific pair of event select and counter MSR, and with specific event codes and predefine mask bit value in a dedicated MSR to specify attributes of the offcore transaction.", 783 "PublicDescription": "tbd Offcore response can be programmed only with a specific pair of event select and counter MSR, and with specific event codes and predefine mask bit value in a dedicated MSR to specify attributes of the offcore transaction.",
785 "SampleAfterValue": "100003", 784 "SampleAfterValue": "100003",
786 "CounterHTOff": "0,1,2,3" 785 "CounterHTOff": "0,1,2,3"
787 }, 786 },
@@ -794,7 +793,7 @@
794 "Counter": "0,1,2,3", 793 "Counter": "0,1,2,3",
795 "EventName": "OFFCORE_RESPONSE.DEMAND_DATA_RD.L3_HIT.HITM_OTHER_CORE", 794 "EventName": "OFFCORE_RESPONSE.DEMAND_DATA_RD.L3_HIT.HITM_OTHER_CORE",
796 "MSRIndex": "0x1a6,0x1a7", 795 "MSRIndex": "0x1a6,0x1a7",
797 "PublicDescription": "Counts demand data reads that hit in the L3 and the snoop to one of the sibling cores hits the line in M state and the line is forwarded.; Offcore response can be programmed only with a specific pair of event select and counter MSR, and with specific event codes and predefine mask bit value in a dedicated MSR to specify attributes of the offcore transaction.", 796 "PublicDescription": "Counts demand data reads that hit in the L3 and the snoop to one of the sibling cores hits the line in M state and the line is forwarded. Offcore response can be programmed only with a specific pair of event select and counter MSR, and with specific event codes and predefine mask bit value in a dedicated MSR to specify attributes of the offcore transaction.",
798 "SampleAfterValue": "100003", 797 "SampleAfterValue": "100003",
799 "CounterHTOff": "0,1,2,3" 798 "CounterHTOff": "0,1,2,3"
800 }, 799 },
@@ -807,7 +806,7 @@
807 "Counter": "0,1,2,3", 806 "Counter": "0,1,2,3",
808 "EventName": "OFFCORE_RESPONSE.DEMAND_DATA_RD.L3_HIT.ANY_SNOOP", 807 "EventName": "OFFCORE_RESPONSE.DEMAND_DATA_RD.L3_HIT.ANY_SNOOP",
809 "MSRIndex": "0x1a6,0x1a7", 808 "MSRIndex": "0x1a6,0x1a7",
810 "PublicDescription": "Counts demand data reads that hit in the L3.; Offcore response can be programmed only with a specific pair of event select and counter MSR, and with specific event codes and predefine mask bit value in a dedicated MSR to specify attributes of the offcore transaction.", 809 "PublicDescription": "Counts demand data reads that hit in the L3. Offcore response can be programmed only with a specific pair of event select and counter MSR, and with specific event codes and predefine mask bit value in a dedicated MSR to specify attributes of the offcore transaction.",
811 "SampleAfterValue": "100003", 810 "SampleAfterValue": "100003",
812 "CounterHTOff": "0,1,2,3" 811 "CounterHTOff": "0,1,2,3"
813 }, 812 },
@@ -820,7 +819,7 @@
820 "Counter": "0,1,2,3", 819 "Counter": "0,1,2,3",
821 "EventName": "OFFCORE_RESPONSE.DEMAND_RFO.ANY_RESPONSE", 820 "EventName": "OFFCORE_RESPONSE.DEMAND_RFO.ANY_RESPONSE",
822 "MSRIndex": "0x1a6,0x1a7", 821 "MSRIndex": "0x1a6,0x1a7",
823 "PublicDescription": "Counts all demand data writes (RFOs) that have any response type.; Offcore response can be programmed only with a specific pair of event select and counter MSR, and with specific event codes and predefine mask bit value in a dedicated MSR to specify attributes of the offcore transaction.", 822 "PublicDescription": "Counts all demand data writes (RFOs) that have any response type. Offcore response can be programmed only with a specific pair of event select and counter MSR, and with specific event codes and predefine mask bit value in a dedicated MSR to specify attributes of the offcore transaction.",
824 "SampleAfterValue": "100003", 823 "SampleAfterValue": "100003",
825 "CounterHTOff": "0,1,2,3" 824 "CounterHTOff": "0,1,2,3"
826 }, 825 },
@@ -833,7 +832,7 @@
833 "Counter": "0,1,2,3", 832 "Counter": "0,1,2,3",
834 "EventName": "OFFCORE_RESPONSE.DEMAND_RFO.L3_HIT.NO_SNOOP_NEEDED", 833 "EventName": "OFFCORE_RESPONSE.DEMAND_RFO.L3_HIT.NO_SNOOP_NEEDED",
835 "MSRIndex": "0x1a6,0x1a7", 834 "MSRIndex": "0x1a6,0x1a7",
836 "PublicDescription": "Counts all demand data writes (RFOs) that hit in the L3 and sibling core snoops are not needed as either the core-valid bit is not set or the shared line is present in multiple cores.; Offcore response can be programmed only with a specific pair of event select and counter MSR, and with specific event codes and predefine mask bit value in a dedicated MSR to specify attributes of the offcore transaction.", 835 "PublicDescription": "Counts all demand data writes (RFOs) that hit in the L3 and sibling core snoops are not needed as either the core-valid bit is not set or the shared line is present in multiple cores. Offcore response can be programmed only with a specific pair of event select and counter MSR, and with specific event codes and predefine mask bit value in a dedicated MSR to specify attributes of the offcore transaction.",
837 "SampleAfterValue": "100003", 836 "SampleAfterValue": "100003",
838 "CounterHTOff": "0,1,2,3" 837 "CounterHTOff": "0,1,2,3"
839 }, 838 },
@@ -846,7 +845,7 @@
846 "Counter": "0,1,2,3", 845 "Counter": "0,1,2,3",
847 "EventName": "OFFCORE_RESPONSE.DEMAND_RFO.L3_HIT.HIT_OTHER_CORE_NO_FWD", 846 "EventName": "OFFCORE_RESPONSE.DEMAND_RFO.L3_HIT.HIT_OTHER_CORE_NO_FWD",
848 "MSRIndex": "0x1a6,0x1a7", 847 "MSRIndex": "0x1a6,0x1a7",
849 "PublicDescription": "Counts all demand data writes (RFOs) that hit in the L3 and the snoop to one of the sibling cores hits the line in M state and the line is forwarded.; Offcore response can be programmed only with a specific pair of event select and counter MSR, and with specific event codes and predefine mask bit value in a dedicated MSR to specify attributes of the offcore transaction.", 848 "PublicDescription": "Counts all demand data writes (RFOs) that hit in the L3 and the snoop to one of the sibling cores hits the line in M state and the line is forwarded. Offcore response can be programmed only with a specific pair of event select and counter MSR, and with specific event codes and predefine mask bit value in a dedicated MSR to specify attributes of the offcore transaction.",
850 "SampleAfterValue": "100003", 849 "SampleAfterValue": "100003",
851 "CounterHTOff": "0,1,2,3" 850 "CounterHTOff": "0,1,2,3"
852 }, 851 },
@@ -859,7 +858,7 @@
859 "Counter": "0,1,2,3", 858 "Counter": "0,1,2,3",
860 "EventName": "OFFCORE_RESPONSE.DEMAND_RFO.L3_HIT.SNOOP_HIT_WITH_FWD", 859 "EventName": "OFFCORE_RESPONSE.DEMAND_RFO.L3_HIT.SNOOP_HIT_WITH_FWD",
861 "MSRIndex": "0x1a6,0x1a7", 860 "MSRIndex": "0x1a6,0x1a7",
862 "PublicDescription": "tbd; Offcore response can be programmed only with a specific pair of event select and counter MSR, and with specific event codes and predefine mask bit value in a dedicated MSR to specify attributes of the offcore transaction.", 861 "PublicDescription": "tbd Offcore response can be programmed only with a specific pair of event select and counter MSR, and with specific event codes and predefine mask bit value in a dedicated MSR to specify attributes of the offcore transaction.",
863 "SampleAfterValue": "100003", 862 "SampleAfterValue": "100003",
864 "CounterHTOff": "0,1,2,3" 863 "CounterHTOff": "0,1,2,3"
865 }, 864 },
@@ -872,7 +871,7 @@
872 "Counter": "0,1,2,3", 871 "Counter": "0,1,2,3",
873 "EventName": "OFFCORE_RESPONSE.DEMAND_RFO.L3_HIT.HITM_OTHER_CORE", 872 "EventName": "OFFCORE_RESPONSE.DEMAND_RFO.L3_HIT.HITM_OTHER_CORE",
874 "MSRIndex": "0x1a6,0x1a7", 873 "MSRIndex": "0x1a6,0x1a7",
875 "PublicDescription": "Counts all demand data writes (RFOs) that hit in the L3 and the snoop to one of the sibling cores hits the line in M state and the line is forwarded.; Offcore response can be programmed only with a specific pair of event select and counter MSR, and with specific event codes and predefine mask bit value in a dedicated MSR to specify attributes of the offcore transaction.", 874 "PublicDescription": "Counts all demand data writes (RFOs) that hit in the L3 and the snoop to one of the sibling cores hits the line in M state and the line is forwarded. Offcore response can be programmed only with a specific pair of event select and counter MSR, and with specific event codes and predefine mask bit value in a dedicated MSR to specify attributes of the offcore transaction.",
876 "SampleAfterValue": "100003", 875 "SampleAfterValue": "100003",
877 "CounterHTOff": "0,1,2,3" 876 "CounterHTOff": "0,1,2,3"
878 }, 877 },
@@ -885,7 +884,7 @@
885 "Counter": "0,1,2,3", 884 "Counter": "0,1,2,3",
886 "EventName": "OFFCORE_RESPONSE.DEMAND_RFO.L3_HIT.ANY_SNOOP", 885 "EventName": "OFFCORE_RESPONSE.DEMAND_RFO.L3_HIT.ANY_SNOOP",
887 "MSRIndex": "0x1a6,0x1a7", 886 "MSRIndex": "0x1a6,0x1a7",
888 "PublicDescription": "Counts all demand data writes (RFOs) that hit in the L3.; Offcore response can be programmed only with a specific pair of event select and counter MSR, and with specific event codes and predefine mask bit value in a dedicated MSR to specify attributes of the offcore transaction.", 887 "PublicDescription": "Counts all demand data writes (RFOs) that hit in the L3. Offcore response can be programmed only with a specific pair of event select and counter MSR, and with specific event codes and predefine mask bit value in a dedicated MSR to specify attributes of the offcore transaction.",
889 "SampleAfterValue": "100003", 888 "SampleAfterValue": "100003",
890 "CounterHTOff": "0,1,2,3" 889 "CounterHTOff": "0,1,2,3"
891 }, 890 },
@@ -898,7 +897,7 @@
898 "Counter": "0,1,2,3", 897 "Counter": "0,1,2,3",
899 "EventName": "OFFCORE_RESPONSE.DEMAND_CODE_RD.ANY_RESPONSE", 898 "EventName": "OFFCORE_RESPONSE.DEMAND_CODE_RD.ANY_RESPONSE",
900 "MSRIndex": "0x1a6,0x1a7", 899 "MSRIndex": "0x1a6,0x1a7",
901 "PublicDescription": "Counts all demand code reads that have any response type.; Offcore response can be programmed only with a specific pair of event select and counter MSR, and with specific event codes and predefine mask bit value in a dedicated MSR to specify attributes of the offcore transaction.", 900 "PublicDescription": "Counts all demand code reads that have any response type. Offcore response can be programmed only with a specific pair of event select and counter MSR, and with specific event codes and predefine mask bit value in a dedicated MSR to specify attributes of the offcore transaction.",
902 "SampleAfterValue": "100003", 901 "SampleAfterValue": "100003",
903 "CounterHTOff": "0,1,2,3" 902 "CounterHTOff": "0,1,2,3"
904 }, 903 },
@@ -911,7 +910,7 @@
911 "Counter": "0,1,2,3", 910 "Counter": "0,1,2,3",
912 "EventName": "OFFCORE_RESPONSE.DEMAND_CODE_RD.L3_HIT.NO_SNOOP_NEEDED", 911 "EventName": "OFFCORE_RESPONSE.DEMAND_CODE_RD.L3_HIT.NO_SNOOP_NEEDED",
913 "MSRIndex": "0x1a6,0x1a7", 912 "MSRIndex": "0x1a6,0x1a7",
914 "PublicDescription": "Counts all demand code reads that hit in the L3 and sibling core snoops are not needed as either the core-valid bit is not set or the shared line is present in multiple cores.; Offcore response can be programmed only with a specific pair of event select and counter MSR, and with specific event codes and predefine mask bit value in a dedicated MSR to specify attributes of the offcore transaction.", 913 "PublicDescription": "Counts all demand code reads that hit in the L3 and sibling core snoops are not needed as either the core-valid bit is not set or the shared line is present in multiple cores. Offcore response can be programmed only with a specific pair of event select and counter MSR, and with specific event codes and predefine mask bit value in a dedicated MSR to specify attributes of the offcore transaction.",
915 "SampleAfterValue": "100003", 914 "SampleAfterValue": "100003",
916 "CounterHTOff": "0,1,2,3" 915 "CounterHTOff": "0,1,2,3"
917 }, 916 },
@@ -924,7 +923,7 @@
924 "Counter": "0,1,2,3", 923 "Counter": "0,1,2,3",
925 "EventName": "OFFCORE_RESPONSE.DEMAND_CODE_RD.L3_HIT.HIT_OTHER_CORE_NO_FWD", 924 "EventName": "OFFCORE_RESPONSE.DEMAND_CODE_RD.L3_HIT.HIT_OTHER_CORE_NO_FWD",
926 "MSRIndex": "0x1a6,0x1a7", 925 "MSRIndex": "0x1a6,0x1a7",
927 "PublicDescription": "Counts all demand code reads that hit in the L3 and the snoop to one of the sibling cores hits the line in M state and the line is forwarded.; Offcore response can be programmed only with a specific pair of event select and counter MSR, and with specific event codes and predefine mask bit value in a dedicated MSR to specify attributes of the offcore transaction.", 926 "PublicDescription": "Counts all demand code reads that hit in the L3 and the snoop to one of the sibling cores hits the line in M state and the line is forwarded. Offcore response can be programmed only with a specific pair of event select and counter MSR, and with specific event codes and predefine mask bit value in a dedicated MSR to specify attributes of the offcore transaction.",
928 "SampleAfterValue": "100003", 927 "SampleAfterValue": "100003",
929 "CounterHTOff": "0,1,2,3" 928 "CounterHTOff": "0,1,2,3"
930 }, 929 },
@@ -937,7 +936,7 @@
937 "Counter": "0,1,2,3", 936 "Counter": "0,1,2,3",
938 "EventName": "OFFCORE_RESPONSE.DEMAND_CODE_RD.L3_HIT.SNOOP_HIT_WITH_FWD", 937 "EventName": "OFFCORE_RESPONSE.DEMAND_CODE_RD.L3_HIT.SNOOP_HIT_WITH_FWD",
939 "MSRIndex": "0x1a6,0x1a7", 938 "MSRIndex": "0x1a6,0x1a7",
940 "PublicDescription": "tbd; Offcore response can be programmed only with a specific pair of event select and counter MSR, and with specific event codes and predefine mask bit value in a dedicated MSR to specify attributes of the offcore transaction.", 939 "PublicDescription": "tbd Offcore response can be programmed only with a specific pair of event select and counter MSR, and with specific event codes and predefine mask bit value in a dedicated MSR to specify attributes of the offcore transaction.",
941 "SampleAfterValue": "100003", 940 "SampleAfterValue": "100003",
942 "CounterHTOff": "0,1,2,3" 941 "CounterHTOff": "0,1,2,3"
943 }, 942 },
@@ -950,7 +949,7 @@
950 "Counter": "0,1,2,3", 949 "Counter": "0,1,2,3",
951 "EventName": "OFFCORE_RESPONSE.DEMAND_CODE_RD.L3_HIT.HITM_OTHER_CORE", 950 "EventName": "OFFCORE_RESPONSE.DEMAND_CODE_RD.L3_HIT.HITM_OTHER_CORE",
952 "MSRIndex": "0x1a6,0x1a7", 951 "MSRIndex": "0x1a6,0x1a7",
953 "PublicDescription": "Counts all demand code reads that hit in the L3 and the snoop to one of the sibling cores hits the line in M state and the line is forwarded.; Offcore response can be programmed only with a specific pair of event select and counter MSR, and with specific event codes and predefine mask bit value in a dedicated MSR to specify attributes of the offcore transaction.", 952 "PublicDescription": "Counts all demand code reads that hit in the L3 and the snoop to one of the sibling cores hits the line in M state and the line is forwarded. Offcore response can be programmed only with a specific pair of event select and counter MSR, and with specific event codes and predefine mask bit value in a dedicated MSR to specify attributes of the offcore transaction.",
954 "SampleAfterValue": "100003", 953 "SampleAfterValue": "100003",
955 "CounterHTOff": "0,1,2,3" 954 "CounterHTOff": "0,1,2,3"
956 }, 955 },
@@ -963,7 +962,7 @@
963 "Counter": "0,1,2,3", 962 "Counter": "0,1,2,3",
964 "EventName": "OFFCORE_RESPONSE.DEMAND_CODE_RD.L3_HIT.ANY_SNOOP", 963 "EventName": "OFFCORE_RESPONSE.DEMAND_CODE_RD.L3_HIT.ANY_SNOOP",
965 "MSRIndex": "0x1a6,0x1a7", 964 "MSRIndex": "0x1a6,0x1a7",
966 "PublicDescription": "Counts all demand code reads that hit in the L3.; Offcore response can be programmed only with a specific pair of event select and counter MSR, and with specific event codes and predefine mask bit value in a dedicated MSR to specify attributes of the offcore transaction.", 965 "PublicDescription": "Counts all demand code reads that hit in the L3. Offcore response can be programmed only with a specific pair of event select and counter MSR, and with specific event codes and predefine mask bit value in a dedicated MSR to specify attributes of the offcore transaction.",
967 "SampleAfterValue": "100003", 966 "SampleAfterValue": "100003",
968 "CounterHTOff": "0,1,2,3" 967 "CounterHTOff": "0,1,2,3"
969 }, 968 },
@@ -976,7 +975,7 @@
976 "Counter": "0,1,2,3", 975 "Counter": "0,1,2,3",
977 "EventName": "OFFCORE_RESPONSE.PF_L2_DATA_RD.ANY_RESPONSE", 976 "EventName": "OFFCORE_RESPONSE.PF_L2_DATA_RD.ANY_RESPONSE",
978 "MSRIndex": "0x1a6,0x1a7", 977 "MSRIndex": "0x1a6,0x1a7",
979 "PublicDescription": "Counts prefetch (that bring data to L2) data reads that have any response type.; Offcore response can be programmed only with a specific pair of event select and counter MSR, and with specific event codes and predefine mask bit value in a dedicated MSR to specify attributes of the offcore transaction.", 978 "PublicDescription": "Counts prefetch (that bring data to L2) data reads that have any response type. Offcore response can be programmed only with a specific pair of event select and counter MSR, and with specific event codes and predefine mask bit value in a dedicated MSR to specify attributes of the offcore transaction.",
980 "SampleAfterValue": "100003", 979 "SampleAfterValue": "100003",
981 "CounterHTOff": "0,1,2,3" 980 "CounterHTOff": "0,1,2,3"
982 }, 981 },
@@ -989,7 +988,7 @@
989 "Counter": "0,1,2,3", 988 "Counter": "0,1,2,3",
990 "EventName": "OFFCORE_RESPONSE.PF_L2_DATA_RD.L3_HIT.NO_SNOOP_NEEDED", 989 "EventName": "OFFCORE_RESPONSE.PF_L2_DATA_RD.L3_HIT.NO_SNOOP_NEEDED",
991 "MSRIndex": "0x1a6,0x1a7", 990 "MSRIndex": "0x1a6,0x1a7",
992 "PublicDescription": "Counts prefetch (that bring data to L2) data reads that hit in the L3 and sibling core snoops are not needed as either the core-valid bit is not set or the shared line is present in multiple cores.; Offcore response can be programmed only with a specific pair of event select and counter MSR, and with specific event codes and predefine mask bit value in a dedicated MSR to specify attributes of the offcore transaction.", 991 "PublicDescription": "Counts prefetch (that bring data to L2) data reads that hit in the L3 and sibling core snoops are not needed as either the core-valid bit is not set or the shared line is present in multiple cores. Offcore response can be programmed only with a specific pair of event select and counter MSR, and with specific event codes and predefine mask bit value in a dedicated MSR to specify attributes of the offcore transaction.",
993 "SampleAfterValue": "100003", 992 "SampleAfterValue": "100003",
994 "CounterHTOff": "0,1,2,3" 993 "CounterHTOff": "0,1,2,3"
995 }, 994 },
@@ -1002,7 +1001,7 @@
1002 "Counter": "0,1,2,3", 1001 "Counter": "0,1,2,3",
1003 "EventName": "OFFCORE_RESPONSE.PF_L2_DATA_RD.L3_HIT.HIT_OTHER_CORE_NO_FWD", 1002 "EventName": "OFFCORE_RESPONSE.PF_L2_DATA_RD.L3_HIT.HIT_OTHER_CORE_NO_FWD",
1004 "MSRIndex": "0x1a6,0x1a7", 1003 "MSRIndex": "0x1a6,0x1a7",
1005 "PublicDescription": "Counts prefetch (that bring data to L2) data reads that hit in the L3 and the snoop to one of the sibling cores hits the line in M state and the line is forwarded.; Offcore response can be programmed only with a specific pair of event select and counter MSR, and with specific event codes and predefine mask bit value in a dedicated MSR to specify attributes of the offcore transaction.", 1004 "PublicDescription": "Counts prefetch (that bring data to L2) data reads that hit in the L3 and the snoop to one of the sibling cores hits the line in M state and the line is forwarded. Offcore response can be programmed only with a specific pair of event select and counter MSR, and with specific event codes and predefine mask bit value in a dedicated MSR to specify attributes of the offcore transaction.",
1006 "SampleAfterValue": "100003", 1005 "SampleAfterValue": "100003",
1007 "CounterHTOff": "0,1,2,3" 1006 "CounterHTOff": "0,1,2,3"
1008 }, 1007 },
@@ -1015,7 +1014,7 @@
1015 "Counter": "0,1,2,3", 1014 "Counter": "0,1,2,3",
1016 "EventName": "OFFCORE_RESPONSE.PF_L2_DATA_RD.L3_HIT.SNOOP_HIT_WITH_FWD", 1015 "EventName": "OFFCORE_RESPONSE.PF_L2_DATA_RD.L3_HIT.SNOOP_HIT_WITH_FWD",
1017 "MSRIndex": "0x1a6,0x1a7", 1016 "MSRIndex": "0x1a6,0x1a7",
1018 "PublicDescription": "tbd; Offcore response can be programmed only with a specific pair of event select and counter MSR, and with specific event codes and predefine mask bit value in a dedicated MSR to specify attributes of the offcore transaction.", 1017 "PublicDescription": "tbd Offcore response can be programmed only with a specific pair of event select and counter MSR, and with specific event codes and predefine mask bit value in a dedicated MSR to specify attributes of the offcore transaction.",
1019 "SampleAfterValue": "100003", 1018 "SampleAfterValue": "100003",
1020 "CounterHTOff": "0,1,2,3" 1019 "CounterHTOff": "0,1,2,3"
1021 }, 1020 },
@@ -1028,7 +1027,7 @@
1028 "Counter": "0,1,2,3", 1027 "Counter": "0,1,2,3",
1029 "EventName": "OFFCORE_RESPONSE.PF_L2_DATA_RD.L3_HIT.HITM_OTHER_CORE", 1028 "EventName": "OFFCORE_RESPONSE.PF_L2_DATA_RD.L3_HIT.HITM_OTHER_CORE",
1030 "MSRIndex": "0x1a6,0x1a7", 1029 "MSRIndex": "0x1a6,0x1a7",
1031 "PublicDescription": "Counts prefetch (that bring data to L2) data reads that hit in the L3 and the snoop to one of the sibling cores hits the line in M state and the line is forwarded.; Offcore response can be programmed only with a specific pair of event select and counter MSR, and with specific event codes and predefine mask bit value in a dedicated MSR to specify attributes of the offcore transaction.", 1030 "PublicDescription": "Counts prefetch (that bring data to L2) data reads that hit in the L3 and the snoop to one of the sibling cores hits the line in M state and the line is forwarded. Offcore response can be programmed only with a specific pair of event select and counter MSR, and with specific event codes and predefine mask bit value in a dedicated MSR to specify attributes of the offcore transaction.",
1032 "SampleAfterValue": "100003", 1031 "SampleAfterValue": "100003",
1033 "CounterHTOff": "0,1,2,3" 1032 "CounterHTOff": "0,1,2,3"
1034 }, 1033 },
@@ -1041,7 +1040,7 @@
1041 "Counter": "0,1,2,3", 1040 "Counter": "0,1,2,3",
1042 "EventName": "OFFCORE_RESPONSE.PF_L2_DATA_RD.L3_HIT.ANY_SNOOP", 1041 "EventName": "OFFCORE_RESPONSE.PF_L2_DATA_RD.L3_HIT.ANY_SNOOP",
1043 "MSRIndex": "0x1a6,0x1a7", 1042 "MSRIndex": "0x1a6,0x1a7",
1044 "PublicDescription": "Counts prefetch (that bring data to L2) data reads that hit in the L3.; Offcore response can be programmed only with a specific pair of event select and counter MSR, and with specific event codes and predefine mask bit value in a dedicated MSR to specify attributes of the offcore transaction.", 1043 "PublicDescription": "Counts prefetch (that bring data to L2) data reads that hit in the L3. Offcore response can be programmed only with a specific pair of event select and counter MSR, and with specific event codes and predefine mask bit value in a dedicated MSR to specify attributes of the offcore transaction.",
1045 "SampleAfterValue": "100003", 1044 "SampleAfterValue": "100003",
1046 "CounterHTOff": "0,1,2,3" 1045 "CounterHTOff": "0,1,2,3"
1047 }, 1046 },
@@ -1054,7 +1053,7 @@
1054 "Counter": "0,1,2,3", 1053 "Counter": "0,1,2,3",
1055 "EventName": "OFFCORE_RESPONSE.PF_L2_RFO.ANY_RESPONSE", 1054 "EventName": "OFFCORE_RESPONSE.PF_L2_RFO.ANY_RESPONSE",
1056 "MSRIndex": "0x1a6,0x1a7", 1055 "MSRIndex": "0x1a6,0x1a7",
1057 "PublicDescription": "Counts all prefetch (that bring data to L2) RFOs that have any response type.; Offcore response can be programmed only with a specific pair of event select and counter MSR, and with specific event codes and predefine mask bit value in a dedicated MSR to specify attributes of the offcore transaction.", 1056 "PublicDescription": "Counts all prefetch (that bring data to L2) RFOs that have any response type. Offcore response can be programmed only with a specific pair of event select and counter MSR, and with specific event codes and predefine mask bit value in a dedicated MSR to specify attributes of the offcore transaction.",
1058 "SampleAfterValue": "100003", 1057 "SampleAfterValue": "100003",
1059 "CounterHTOff": "0,1,2,3" 1058 "CounterHTOff": "0,1,2,3"
1060 }, 1059 },
@@ -1067,7 +1066,7 @@
1067 "Counter": "0,1,2,3", 1066 "Counter": "0,1,2,3",
1068 "EventName": "OFFCORE_RESPONSE.PF_L2_RFO.L3_HIT.NO_SNOOP_NEEDED", 1067 "EventName": "OFFCORE_RESPONSE.PF_L2_RFO.L3_HIT.NO_SNOOP_NEEDED",
1069 "MSRIndex": "0x1a6,0x1a7", 1068 "MSRIndex": "0x1a6,0x1a7",
1070 "PublicDescription": "Counts all prefetch (that bring data to L2) RFOs that hit in the L3 and sibling core snoops are not needed as either the core-valid bit is not set or the shared line is present in multiple cores.; Offcore response can be programmed only with a specific pair of event select and counter MSR, and with specific event codes and predefine mask bit value in a dedicated MSR to specify attributes of the offcore transaction.", 1069 "PublicDescription": "Counts all prefetch (that bring data to L2) RFOs that hit in the L3 and sibling core snoops are not needed as either the core-valid bit is not set or the shared line is present in multiple cores. Offcore response can be programmed only with a specific pair of event select and counter MSR, and with specific event codes and predefine mask bit value in a dedicated MSR to specify attributes of the offcore transaction.",
1071 "SampleAfterValue": "100003", 1070 "SampleAfterValue": "100003",
1072 "CounterHTOff": "0,1,2,3" 1071 "CounterHTOff": "0,1,2,3"
1073 }, 1072 },
@@ -1080,7 +1079,7 @@
1080 "Counter": "0,1,2,3", 1079 "Counter": "0,1,2,3",
1081 "EventName": "OFFCORE_RESPONSE.PF_L2_RFO.L3_HIT.HIT_OTHER_CORE_NO_FWD", 1080 "EventName": "OFFCORE_RESPONSE.PF_L2_RFO.L3_HIT.HIT_OTHER_CORE_NO_FWD",
1082 "MSRIndex": "0x1a6,0x1a7", 1081 "MSRIndex": "0x1a6,0x1a7",
1083 "PublicDescription": "Counts all prefetch (that bring data to L2) RFOs that hit in the L3 and the snoop to one of the sibling cores hits the line in M state and the line is forwarded.; Offcore response can be programmed only with a specific pair of event select and counter MSR, and with specific event codes and predefine mask bit value in a dedicated MSR to specify attributes of the offcore transaction.", 1082 "PublicDescription": "Counts all prefetch (that bring data to L2) RFOs that hit in the L3 and the snoop to one of the sibling cores hits the line in M state and the line is forwarded. Offcore response can be programmed only with a specific pair of event select and counter MSR, and with specific event codes and predefine mask bit value in a dedicated MSR to specify attributes of the offcore transaction.",
1084 "SampleAfterValue": "100003", 1083 "SampleAfterValue": "100003",
1085 "CounterHTOff": "0,1,2,3" 1084 "CounterHTOff": "0,1,2,3"
1086 }, 1085 },
@@ -1093,7 +1092,7 @@
1093 "Counter": "0,1,2,3", 1092 "Counter": "0,1,2,3",
1094 "EventName": "OFFCORE_RESPONSE.PF_L2_RFO.L3_HIT.SNOOP_HIT_WITH_FWD", 1093 "EventName": "OFFCORE_RESPONSE.PF_L2_RFO.L3_HIT.SNOOP_HIT_WITH_FWD",
1095 "MSRIndex": "0x1a6,0x1a7", 1094 "MSRIndex": "0x1a6,0x1a7",
1096 "PublicDescription": "tbd; Offcore response can be programmed only with a specific pair of event select and counter MSR, and with specific event codes and predefine mask bit value in a dedicated MSR to specify attributes of the offcore transaction.", 1095 "PublicDescription": "tbd Offcore response can be programmed only with a specific pair of event select and counter MSR, and with specific event codes and predefine mask bit value in a dedicated MSR to specify attributes of the offcore transaction.",
1097 "SampleAfterValue": "100003", 1096 "SampleAfterValue": "100003",
1098 "CounterHTOff": "0,1,2,3" 1097 "CounterHTOff": "0,1,2,3"
1099 }, 1098 },
@@ -1106,7 +1105,7 @@
1106 "Counter": "0,1,2,3", 1105 "Counter": "0,1,2,3",
1107 "EventName": "OFFCORE_RESPONSE.PF_L2_RFO.L3_HIT.HITM_OTHER_CORE", 1106 "EventName": "OFFCORE_RESPONSE.PF_L2_RFO.L3_HIT.HITM_OTHER_CORE",
1108 "MSRIndex": "0x1a6,0x1a7", 1107 "MSRIndex": "0x1a6,0x1a7",
1109 "PublicDescription": "Counts all prefetch (that bring data to L2) RFOs that hit in the L3 and the snoop to one of the sibling cores hits the line in M state and the line is forwarded.; Offcore response can be programmed only with a specific pair of event select and counter MSR, and with specific event codes and predefine mask bit value in a dedicated MSR to specify attributes of the offcore transaction.", 1108 "PublicDescription": "Counts all prefetch (that bring data to L2) RFOs that hit in the L3 and the snoop to one of the sibling cores hits the line in M state and the line is forwarded. Offcore response can be programmed only with a specific pair of event select and counter MSR, and with specific event codes and predefine mask bit value in a dedicated MSR to specify attributes of the offcore transaction.",
1110 "SampleAfterValue": "100003", 1109 "SampleAfterValue": "100003",
1111 "CounterHTOff": "0,1,2,3" 1110 "CounterHTOff": "0,1,2,3"
1112 }, 1111 },
@@ -1119,7 +1118,7 @@
1119 "Counter": "0,1,2,3", 1118 "Counter": "0,1,2,3",
1120 "EventName": "OFFCORE_RESPONSE.PF_L2_RFO.L3_HIT.ANY_SNOOP", 1119 "EventName": "OFFCORE_RESPONSE.PF_L2_RFO.L3_HIT.ANY_SNOOP",
1121 "MSRIndex": "0x1a6,0x1a7", 1120 "MSRIndex": "0x1a6,0x1a7",
1122 "PublicDescription": "Counts all prefetch (that bring data to L2) RFOs that hit in the L3.; Offcore response can be programmed only with a specific pair of event select and counter MSR, and with specific event codes and predefine mask bit value in a dedicated MSR to specify attributes of the offcore transaction.", 1121 "PublicDescription": "Counts all prefetch (that bring data to L2) RFOs that hit in the L3. Offcore response can be programmed only with a specific pair of event select and counter MSR, and with specific event codes and predefine mask bit value in a dedicated MSR to specify attributes of the offcore transaction.",
1123 "SampleAfterValue": "100003", 1122 "SampleAfterValue": "100003",
1124 "CounterHTOff": "0,1,2,3" 1123 "CounterHTOff": "0,1,2,3"
1125 }, 1124 },
@@ -1132,7 +1131,7 @@
1132 "Counter": "0,1,2,3", 1131 "Counter": "0,1,2,3",
1133 "EventName": "OFFCORE_RESPONSE.PF_L3_DATA_RD.ANY_RESPONSE", 1132 "EventName": "OFFCORE_RESPONSE.PF_L3_DATA_RD.ANY_RESPONSE",
1134 "MSRIndex": "0x1a6,0x1a7", 1133 "MSRIndex": "0x1a6,0x1a7",
1135 "PublicDescription": "Counts all prefetch (that bring data to LLC only) data reads that have any response type.; Offcore response can be programmed only with a specific pair of event select and counter MSR, and with specific event codes and predefine mask bit value in a dedicated MSR to specify attributes of the offcore transaction.", 1134 "PublicDescription": "Counts all prefetch (that bring data to LLC only) data reads that have any response type. Offcore response can be programmed only with a specific pair of event select and counter MSR, and with specific event codes and predefine mask bit value in a dedicated MSR to specify attributes of the offcore transaction.",
1136 "SampleAfterValue": "100003", 1135 "SampleAfterValue": "100003",
1137 "CounterHTOff": "0,1,2,3" 1136 "CounterHTOff": "0,1,2,3"
1138 }, 1137 },
@@ -1145,7 +1144,7 @@
1145 "Counter": "0,1,2,3", 1144 "Counter": "0,1,2,3",
1146 "EventName": "OFFCORE_RESPONSE.PF_L3_DATA_RD.L3_HIT.NO_SNOOP_NEEDED", 1145 "EventName": "OFFCORE_RESPONSE.PF_L3_DATA_RD.L3_HIT.NO_SNOOP_NEEDED",
1147 "MSRIndex": "0x1a6,0x1a7", 1146 "MSRIndex": "0x1a6,0x1a7",
1148 "PublicDescription": "Counts all prefetch (that bring data to LLC only) data reads that hit in the L3 and sibling core snoops are not needed as either the core-valid bit is not set or the shared line is present in multiple cores.; Offcore response can be programmed only with a specific pair of event select and counter MSR, and with specific event codes and predefine mask bit value in a dedicated MSR to specify attributes of the offcore transaction.", 1147 "PublicDescription": "Counts all prefetch (that bring data to LLC only) data reads that hit in the L3 and sibling core snoops are not needed as either the core-valid bit is not set or the shared line is present in multiple cores. Offcore response can be programmed only with a specific pair of event select and counter MSR, and with specific event codes and predefine mask bit value in a dedicated MSR to specify attributes of the offcore transaction.",
1149 "SampleAfterValue": "100003", 1148 "SampleAfterValue": "100003",
1150 "CounterHTOff": "0,1,2,3" 1149 "CounterHTOff": "0,1,2,3"
1151 }, 1150 },
@@ -1158,7 +1157,7 @@
1158 "Counter": "0,1,2,3", 1157 "Counter": "0,1,2,3",
1159 "EventName": "OFFCORE_RESPONSE.PF_L3_DATA_RD.L3_HIT.HIT_OTHER_CORE_NO_FWD", 1158 "EventName": "OFFCORE_RESPONSE.PF_L3_DATA_RD.L3_HIT.HIT_OTHER_CORE_NO_FWD",
1160 "MSRIndex": "0x1a6,0x1a7", 1159 "MSRIndex": "0x1a6,0x1a7",
1161 "PublicDescription": "Counts all prefetch (that bring data to LLC only) data reads that hit in the L3 and the snoop to one of the sibling cores hits the line in M state and the line is forwarded.; Offcore response can be programmed only with a specific pair of event select and counter MSR, and with specific event codes and predefine mask bit value in a dedicated MSR to specify attributes of the offcore transaction.", 1160 "PublicDescription": "Counts all prefetch (that bring data to LLC only) data reads that hit in the L3 and the snoop to one of the sibling cores hits the line in M state and the line is forwarded. Offcore response can be programmed only with a specific pair of event select and counter MSR, and with specific event codes and predefine mask bit value in a dedicated MSR to specify attributes of the offcore transaction.",
1162 "SampleAfterValue": "100003", 1161 "SampleAfterValue": "100003",
1163 "CounterHTOff": "0,1,2,3" 1162 "CounterHTOff": "0,1,2,3"
1164 }, 1163 },
@@ -1171,7 +1170,7 @@
1171 "Counter": "0,1,2,3", 1170 "Counter": "0,1,2,3",
1172 "EventName": "OFFCORE_RESPONSE.PF_L3_DATA_RD.L3_HIT.SNOOP_HIT_WITH_FWD", 1171 "EventName": "OFFCORE_RESPONSE.PF_L3_DATA_RD.L3_HIT.SNOOP_HIT_WITH_FWD",
1173 "MSRIndex": "0x1a6,0x1a7", 1172 "MSRIndex": "0x1a6,0x1a7",
1174 "PublicDescription": "tbd; Offcore response can be programmed only with a specific pair of event select and counter MSR, and with specific event codes and predefine mask bit value in a dedicated MSR to specify attributes of the offcore transaction.", 1173 "PublicDescription": "tbd Offcore response can be programmed only with a specific pair of event select and counter MSR, and with specific event codes and predefine mask bit value in a dedicated MSR to specify attributes of the offcore transaction.",
1175 "SampleAfterValue": "100003", 1174 "SampleAfterValue": "100003",
1176 "CounterHTOff": "0,1,2,3" 1175 "CounterHTOff": "0,1,2,3"
1177 }, 1176 },
@@ -1184,7 +1183,7 @@
1184 "Counter": "0,1,2,3", 1183 "Counter": "0,1,2,3",
1185 "EventName": "OFFCORE_RESPONSE.PF_L3_DATA_RD.L3_HIT.HITM_OTHER_CORE", 1184 "EventName": "OFFCORE_RESPONSE.PF_L3_DATA_RD.L3_HIT.HITM_OTHER_CORE",
1186 "MSRIndex": "0x1a6,0x1a7", 1185 "MSRIndex": "0x1a6,0x1a7",
1187 "PublicDescription": "Counts all prefetch (that bring data to LLC only) data reads that hit in the L3 and the snoop to one of the sibling cores hits the line in M state and the line is forwarded.; Offcore response can be programmed only with a specific pair of event select and counter MSR, and with specific event codes and predefine mask bit value in a dedicated MSR to specify attributes of the offcore transaction.", 1186 "PublicDescription": "Counts all prefetch (that bring data to LLC only) data reads that hit in the L3 and the snoop to one of the sibling cores hits the line in M state and the line is forwarded. Offcore response can be programmed only with a specific pair of event select and counter MSR, and with specific event codes and predefine mask bit value in a dedicated MSR to specify attributes of the offcore transaction.",
1188 "SampleAfterValue": "100003", 1187 "SampleAfterValue": "100003",
1189 "CounterHTOff": "0,1,2,3" 1188 "CounterHTOff": "0,1,2,3"
1190 }, 1189 },
@@ -1197,7 +1196,7 @@
1197 "Counter": "0,1,2,3", 1196 "Counter": "0,1,2,3",
1198 "EventName": "OFFCORE_RESPONSE.PF_L3_DATA_RD.L3_HIT.ANY_SNOOP", 1197 "EventName": "OFFCORE_RESPONSE.PF_L3_DATA_RD.L3_HIT.ANY_SNOOP",
1199 "MSRIndex": "0x1a6,0x1a7", 1198 "MSRIndex": "0x1a6,0x1a7",
1200 "PublicDescription": "Counts all prefetch (that bring data to LLC only) data reads that hit in the L3.; Offcore response can be programmed only with a specific pair of event select and counter MSR, and with specific event codes and predefine mask bit value in a dedicated MSR to specify attributes of the offcore transaction.", 1199 "PublicDescription": "Counts all prefetch (that bring data to LLC only) data reads that hit in the L3. Offcore response can be programmed only with a specific pair of event select and counter MSR, and with specific event codes and predefine mask bit value in a dedicated MSR to specify attributes of the offcore transaction.",
1201 "SampleAfterValue": "100003", 1200 "SampleAfterValue": "100003",
1202 "CounterHTOff": "0,1,2,3" 1201 "CounterHTOff": "0,1,2,3"
1203 }, 1202 },
@@ -1210,7 +1209,7 @@
1210 "Counter": "0,1,2,3", 1209 "Counter": "0,1,2,3",
1211 "EventName": "OFFCORE_RESPONSE.PF_L3_RFO.ANY_RESPONSE", 1210 "EventName": "OFFCORE_RESPONSE.PF_L3_RFO.ANY_RESPONSE",
1212 "MSRIndex": "0x1a6,0x1a7", 1211 "MSRIndex": "0x1a6,0x1a7",
1213 "PublicDescription": "Counts all prefetch (that bring data to LLC only) RFOs that have any response type.; Offcore response can be programmed only with a specific pair of event select and counter MSR, and with specific event codes and predefine mask bit value in a dedicated MSR to specify attributes of the offcore transaction.", 1212 "PublicDescription": "Counts all prefetch (that bring data to LLC only) RFOs that have any response type. Offcore response can be programmed only with a specific pair of event select and counter MSR, and with specific event codes and predefine mask bit value in a dedicated MSR to specify attributes of the offcore transaction.",
1214 "SampleAfterValue": "100003", 1213 "SampleAfterValue": "100003",
1215 "CounterHTOff": "0,1,2,3" 1214 "CounterHTOff": "0,1,2,3"
1216 }, 1215 },
@@ -1223,7 +1222,7 @@
1223 "Counter": "0,1,2,3", 1222 "Counter": "0,1,2,3",
1224 "EventName": "OFFCORE_RESPONSE.PF_L3_RFO.L3_HIT.NO_SNOOP_NEEDED", 1223 "EventName": "OFFCORE_RESPONSE.PF_L3_RFO.L3_HIT.NO_SNOOP_NEEDED",
1225 "MSRIndex": "0x1a6,0x1a7", 1224 "MSRIndex": "0x1a6,0x1a7",
1226 "PublicDescription": "Counts all prefetch (that bring data to LLC only) RFOs that hit in the L3 and sibling core snoops are not needed as either the core-valid bit is not set or the shared line is present in multiple cores.; Offcore response can be programmed only with a specific pair of event select and counter MSR, and with specific event codes and predefine mask bit value in a dedicated MSR to specify attributes of the offcore transaction.", 1225 "PublicDescription": "Counts all prefetch (that bring data to LLC only) RFOs that hit in the L3 and sibling core snoops are not needed as either the core-valid bit is not set or the shared line is present in multiple cores. Offcore response can be programmed only with a specific pair of event select and counter MSR, and with specific event codes and predefine mask bit value in a dedicated MSR to specify attributes of the offcore transaction.",
1227 "SampleAfterValue": "100003", 1226 "SampleAfterValue": "100003",
1228 "CounterHTOff": "0,1,2,3" 1227 "CounterHTOff": "0,1,2,3"
1229 }, 1228 },
@@ -1236,7 +1235,7 @@
1236 "Counter": "0,1,2,3", 1235 "Counter": "0,1,2,3",
1237 "EventName": "OFFCORE_RESPONSE.PF_L3_RFO.L3_HIT.HIT_OTHER_CORE_NO_FWD", 1236 "EventName": "OFFCORE_RESPONSE.PF_L3_RFO.L3_HIT.HIT_OTHER_CORE_NO_FWD",
1238 "MSRIndex": "0x1a6,0x1a7", 1237 "MSRIndex": "0x1a6,0x1a7",
1239 "PublicDescription": "Counts all prefetch (that bring data to LLC only) RFOs that hit in the L3 and the snoop to one of the sibling cores hits the line in M state and the line is forwarded.; Offcore response can be programmed only with a specific pair of event select and counter MSR, and with specific event codes and predefine mask bit value in a dedicated MSR to specify attributes of the offcore transaction.", 1238 "PublicDescription": "Counts all prefetch (that bring data to LLC only) RFOs that hit in the L3 and the snoop to one of the sibling cores hits the line in M state and the line is forwarded. Offcore response can be programmed only with a specific pair of event select and counter MSR, and with specific event codes and predefine mask bit value in a dedicated MSR to specify attributes of the offcore transaction.",
1240 "SampleAfterValue": "100003", 1239 "SampleAfterValue": "100003",
1241 "CounterHTOff": "0,1,2,3" 1240 "CounterHTOff": "0,1,2,3"
1242 }, 1241 },
@@ -1249,7 +1248,7 @@
1249 "Counter": "0,1,2,3", 1248 "Counter": "0,1,2,3",
1250 "EventName": "OFFCORE_RESPONSE.PF_L3_RFO.L3_HIT.SNOOP_HIT_WITH_FWD", 1249 "EventName": "OFFCORE_RESPONSE.PF_L3_RFO.L3_HIT.SNOOP_HIT_WITH_FWD",
1251 "MSRIndex": "0x1a6,0x1a7", 1250 "MSRIndex": "0x1a6,0x1a7",
1252 "PublicDescription": "tbd; Offcore response can be programmed only with a specific pair of event select and counter MSR, and with specific event codes and predefine mask bit value in a dedicated MSR to specify attributes of the offcore transaction.", 1251 "PublicDescription": "tbd Offcore response can be programmed only with a specific pair of event select and counter MSR, and with specific event codes and predefine mask bit value in a dedicated MSR to specify attributes of the offcore transaction.",
1253 "SampleAfterValue": "100003", 1252 "SampleAfterValue": "100003",
1254 "CounterHTOff": "0,1,2,3" 1253 "CounterHTOff": "0,1,2,3"
1255 }, 1254 },
@@ -1262,7 +1261,7 @@
1262 "Counter": "0,1,2,3", 1261 "Counter": "0,1,2,3",
1263 "EventName": "OFFCORE_RESPONSE.PF_L3_RFO.L3_HIT.HITM_OTHER_CORE", 1262 "EventName": "OFFCORE_RESPONSE.PF_L3_RFO.L3_HIT.HITM_OTHER_CORE",
1264 "MSRIndex": "0x1a6,0x1a7", 1263 "MSRIndex": "0x1a6,0x1a7",
1265 "PublicDescription": "Counts all prefetch (that bring data to LLC only) RFOs that hit in the L3 and the snoop to one of the sibling cores hits the line in M state and the line is forwarded.; Offcore response can be programmed only with a specific pair of event select and counter MSR, and with specific event codes and predefine mask bit value in a dedicated MSR to specify attributes of the offcore transaction.", 1264 "PublicDescription": "Counts all prefetch (that bring data to LLC only) RFOs that hit in the L3 and the snoop to one of the sibling cores hits the line in M state and the line is forwarded. Offcore response can be programmed only with a specific pair of event select and counter MSR, and with specific event codes and predefine mask bit value in a dedicated MSR to specify attributes of the offcore transaction.",
1266 "SampleAfterValue": "100003", 1265 "SampleAfterValue": "100003",
1267 "CounterHTOff": "0,1,2,3" 1266 "CounterHTOff": "0,1,2,3"
1268 }, 1267 },
@@ -1275,7 +1274,7 @@
1275 "Counter": "0,1,2,3", 1274 "Counter": "0,1,2,3",
1276 "EventName": "OFFCORE_RESPONSE.PF_L3_RFO.L3_HIT.ANY_SNOOP", 1275 "EventName": "OFFCORE_RESPONSE.PF_L3_RFO.L3_HIT.ANY_SNOOP",
1277 "MSRIndex": "0x1a6,0x1a7", 1276 "MSRIndex": "0x1a6,0x1a7",
1278 "PublicDescription": "Counts all prefetch (that bring data to LLC only) RFOs that hit in the L3.; Offcore response can be programmed only with a specific pair of event select and counter MSR, and with specific event codes and predefine mask bit value in a dedicated MSR to specify attributes of the offcore transaction.", 1277 "PublicDescription": "Counts all prefetch (that bring data to LLC only) RFOs that hit in the L3. Offcore response can be programmed only with a specific pair of event select and counter MSR, and with specific event codes and predefine mask bit value in a dedicated MSR to specify attributes of the offcore transaction.",
1279 "SampleAfterValue": "100003", 1278 "SampleAfterValue": "100003",
1280 "CounterHTOff": "0,1,2,3" 1279 "CounterHTOff": "0,1,2,3"
1281 }, 1280 },
@@ -1288,7 +1287,7 @@
1288 "Counter": "0,1,2,3", 1287 "Counter": "0,1,2,3",
1289 "EventName": "OFFCORE_RESPONSE.PF_L1D_AND_SW.ANY_RESPONSE", 1288 "EventName": "OFFCORE_RESPONSE.PF_L1D_AND_SW.ANY_RESPONSE",
1290 "MSRIndex": "0x1a6,0x1a7", 1289 "MSRIndex": "0x1a6,0x1a7",
1291 "PublicDescription": "Counts L1 data cache hardware prefetch requests and software prefetch requests that have any response type.; Offcore response can be programmed only with a specific pair of event select and counter MSR, and with specific event codes and predefine mask bit value in a dedicated MSR to specify attributes of the offcore transaction.", 1290 "PublicDescription": "Counts L1 data cache hardware prefetch requests and software prefetch requests that have any response type. Offcore response can be programmed only with a specific pair of event select and counter MSR, and with specific event codes and predefine mask bit value in a dedicated MSR to specify attributes of the offcore transaction.",
1292 "SampleAfterValue": "100003", 1291 "SampleAfterValue": "100003",
1293 "CounterHTOff": "0,1,2,3" 1292 "CounterHTOff": "0,1,2,3"
1294 }, 1293 },
@@ -1301,7 +1300,7 @@
1301 "Counter": "0,1,2,3", 1300 "Counter": "0,1,2,3",
1302 "EventName": "OFFCORE_RESPONSE.PF_L1D_AND_SW.L3_HIT.NO_SNOOP_NEEDED", 1301 "EventName": "OFFCORE_RESPONSE.PF_L1D_AND_SW.L3_HIT.NO_SNOOP_NEEDED",
1303 "MSRIndex": "0x1a6,0x1a7", 1302 "MSRIndex": "0x1a6,0x1a7",
1304 "PublicDescription": "Counts L1 data cache hardware prefetch requests and software prefetch requests that hit in the L3 and sibling core snoops are not needed as either the core-valid bit is not set or the shared line is present in multiple cores.; Offcore response can be programmed only with a specific pair of event select and counter MSR, and with specific event codes and predefine mask bit value in a dedicated MSR to specify attributes of the offcore transaction.", 1303 "PublicDescription": "Counts L1 data cache hardware prefetch requests and software prefetch requests that hit in the L3 and sibling core snoops are not needed as either the core-valid bit is not set or the shared line is present in multiple cores. Offcore response can be programmed only with a specific pair of event select and counter MSR, and with specific event codes and predefine mask bit value in a dedicated MSR to specify attributes of the offcore transaction.",
1305 "SampleAfterValue": "100003", 1304 "SampleAfterValue": "100003",
1306 "CounterHTOff": "0,1,2,3" 1305 "CounterHTOff": "0,1,2,3"
1307 }, 1306 },
@@ -1314,7 +1313,7 @@
1314 "Counter": "0,1,2,3", 1313 "Counter": "0,1,2,3",
1315 "EventName": "OFFCORE_RESPONSE.PF_L1D_AND_SW.L3_HIT.HIT_OTHER_CORE_NO_FWD", 1314 "EventName": "OFFCORE_RESPONSE.PF_L1D_AND_SW.L3_HIT.HIT_OTHER_CORE_NO_FWD",
1316 "MSRIndex": "0x1a6,0x1a7", 1315 "MSRIndex": "0x1a6,0x1a7",
1317 "PublicDescription": "Counts L1 data cache hardware prefetch requests and software prefetch requests that hit in the L3 and the snoop to one of the sibling cores hits the line in M state and the line is forwarded.; Offcore response can be programmed only with a specific pair of event select and counter MSR, and with specific event codes and predefine mask bit value in a dedicated MSR to specify attributes of the offcore transaction.", 1316 "PublicDescription": "Counts L1 data cache hardware prefetch requests and software prefetch requests that hit in the L3 and the snoop to one of the sibling cores hits the line in M state and the line is forwarded. Offcore response can be programmed only with a specific pair of event select and counter MSR, and with specific event codes and predefine mask bit value in a dedicated MSR to specify attributes of the offcore transaction.",
1318 "SampleAfterValue": "100003", 1317 "SampleAfterValue": "100003",
1319 "CounterHTOff": "0,1,2,3" 1318 "CounterHTOff": "0,1,2,3"
1320 }, 1319 },
@@ -1327,7 +1326,7 @@
1327 "Counter": "0,1,2,3", 1326 "Counter": "0,1,2,3",
1328 "EventName": "OFFCORE_RESPONSE.PF_L1D_AND_SW.L3_HIT.SNOOP_HIT_WITH_FWD", 1327 "EventName": "OFFCORE_RESPONSE.PF_L1D_AND_SW.L3_HIT.SNOOP_HIT_WITH_FWD",
1329 "MSRIndex": "0x1a6,0x1a7", 1328 "MSRIndex": "0x1a6,0x1a7",
1330 "PublicDescription": "tbd; Offcore response can be programmed only with a specific pair of event select and counter MSR, and with specific event codes and predefine mask bit value in a dedicated MSR to specify attributes of the offcore transaction.", 1329 "PublicDescription": "tbd Offcore response can be programmed only with a specific pair of event select and counter MSR, and with specific event codes and predefine mask bit value in a dedicated MSR to specify attributes of the offcore transaction.",
1331 "SampleAfterValue": "100003", 1330 "SampleAfterValue": "100003",
1332 "CounterHTOff": "0,1,2,3" 1331 "CounterHTOff": "0,1,2,3"
1333 }, 1332 },
@@ -1340,7 +1339,7 @@
1340 "Counter": "0,1,2,3", 1339 "Counter": "0,1,2,3",
1341 "EventName": "OFFCORE_RESPONSE.PF_L1D_AND_SW.L3_HIT.HITM_OTHER_CORE", 1340 "EventName": "OFFCORE_RESPONSE.PF_L1D_AND_SW.L3_HIT.HITM_OTHER_CORE",
1342 "MSRIndex": "0x1a6,0x1a7", 1341 "MSRIndex": "0x1a6,0x1a7",
1343 "PublicDescription": "Counts L1 data cache hardware prefetch requests and software prefetch requests that hit in the L3 and the snoop to one of the sibling cores hits the line in M state and the line is forwarded.; Offcore response can be programmed only with a specific pair of event select and counter MSR, and with specific event codes and predefine mask bit value in a dedicated MSR to specify attributes of the offcore transaction.", 1342 "PublicDescription": "Counts L1 data cache hardware prefetch requests and software prefetch requests that hit in the L3 and the snoop to one of the sibling cores hits the line in M state and the line is forwarded. Offcore response can be programmed only with a specific pair of event select and counter MSR, and with specific event codes and predefine mask bit value in a dedicated MSR to specify attributes of the offcore transaction.",
1344 "SampleAfterValue": "100003", 1343 "SampleAfterValue": "100003",
1345 "CounterHTOff": "0,1,2,3" 1344 "CounterHTOff": "0,1,2,3"
1346 }, 1345 },
@@ -1353,7 +1352,85 @@
1353 "Counter": "0,1,2,3", 1352 "Counter": "0,1,2,3",
1354 "EventName": "OFFCORE_RESPONSE.PF_L1D_AND_SW.L3_HIT.ANY_SNOOP", 1353 "EventName": "OFFCORE_RESPONSE.PF_L1D_AND_SW.L3_HIT.ANY_SNOOP",
1355 "MSRIndex": "0x1a6,0x1a7", 1354 "MSRIndex": "0x1a6,0x1a7",
1356 "PublicDescription": "Counts L1 data cache hardware prefetch requests and software prefetch requests that hit in the L3.; Offcore response can be programmed only with a specific pair of event select and counter MSR, and with specific event codes and predefine mask bit value in a dedicated MSR to specify attributes of the offcore transaction.", 1355 "PublicDescription": "Counts L1 data cache hardware prefetch requests and software prefetch requests that hit in the L3. Offcore response can be programmed only with a specific pair of event select and counter MSR, and with specific event codes and predefine mask bit value in a dedicated MSR to specify attributes of the offcore transaction.",
1356 "SampleAfterValue": "100003",
1357 "CounterHTOff": "0,1,2,3"
1358 },
1359 {
1360 "Offcore": "1",
1361 "EventCode": "0xB7, 0xBB",
1362 "UMask": "0x1",
1363 "BriefDescription": "Counts any other requests that have any response type.",
1364 "MSRValue": "0x0000018000 ",
1365 "Counter": "0,1,2,3",
1366 "EventName": "OFFCORE_RESPONSE.OTHER.ANY_RESPONSE",
1367 "MSRIndex": "0x1a6,0x1a7",
1368 "PublicDescription": "Counts any other requests that have any response type. Offcore response can be programmed only with a specific pair of event select and counter MSR, and with specific event codes and predefine mask bit value in a dedicated MSR to specify attributes of the offcore transaction.",
1369 "SampleAfterValue": "100003",
1370 "CounterHTOff": "0,1,2,3"
1371 },
1372 {
1373 "Offcore": "1",
1374 "EventCode": "0xB7, 0xBB",
1375 "UMask": "0x1",
1376 "BriefDescription": "Counts any other requests that hit in the L3 and sibling core snoops are not needed as either the core-valid bit is not set or the shared line is present in multiple cores.",
1377 "MSRValue": "0x01003c8000 ",
1378 "Counter": "0,1,2,3",
1379 "EventName": "OFFCORE_RESPONSE.OTHER.L3_HIT.NO_SNOOP_NEEDED",
1380 "MSRIndex": "0x1a6,0x1a7",
1381 "PublicDescription": "Counts any other requests that hit in the L3 and sibling core snoops are not needed as either the core-valid bit is not set or the shared line is present in multiple cores. Offcore response can be programmed only with a specific pair of event select and counter MSR, and with specific event codes and predefine mask bit value in a dedicated MSR to specify attributes of the offcore transaction.",
1382 "SampleAfterValue": "100003",
1383 "CounterHTOff": "0,1,2,3"
1384 },
1385 {
1386 "Offcore": "1",
1387 "EventCode": "0xB7, 0xBB",
1388 "UMask": "0x1",
1389 "BriefDescription": "Counts any other requests that hit in the L3 and the snoop to one of the sibling cores hits the line in M state and the line is forwarded.",
1390 "MSRValue": "0x04003c8000 ",
1391 "Counter": "0,1,2,3",
1392 "EventName": "OFFCORE_RESPONSE.OTHER.L3_HIT.HIT_OTHER_CORE_NO_FWD",
1393 "MSRIndex": "0x1a6,0x1a7",
1394 "PublicDescription": "Counts any other requests that hit in the L3 and the snoop to one of the sibling cores hits the line in M state and the line is forwarded. Offcore response can be programmed only with a specific pair of event select and counter MSR, and with specific event codes and predefine mask bit value in a dedicated MSR to specify attributes of the offcore transaction.",
1395 "SampleAfterValue": "100003",
1396 "CounterHTOff": "0,1,2,3"
1397 },
1398 {
1399 "Offcore": "1",
1400 "EventCode": "0xB7, 0xBB",
1401 "UMask": "0x1",
1402 "BriefDescription": "OTHER & L3_HIT & SNOOP_HIT_WITH_FWD",
1403 "MSRValue": "0x08003c8000 ",
1404 "Counter": "0,1,2,3",
1405 "EventName": "OFFCORE_RESPONSE.OTHER.L3_HIT.SNOOP_HIT_WITH_FWD",
1406 "MSRIndex": "0x1a6,0x1a7",
1407 "PublicDescription": "tbd Offcore response can be programmed only with a specific pair of event select and counter MSR, and with specific event codes and predefine mask bit value in a dedicated MSR to specify attributes of the offcore transaction.",
1408 "SampleAfterValue": "100003",
1409 "CounterHTOff": "0,1,2,3"
1410 },
1411 {
1412 "Offcore": "1",
1413 "EventCode": "0xB7, 0xBB",
1414 "UMask": "0x1",
1415 "BriefDescription": "Counts any other requests that hit in the L3 and the snoop to one of the sibling cores hits the line in M state and the line is forwarded.",
1416 "MSRValue": "0x10003c8000 ",
1417 "Counter": "0,1,2,3",
1418 "EventName": "OFFCORE_RESPONSE.OTHER.L3_HIT.HITM_OTHER_CORE",
1419 "MSRIndex": "0x1a6,0x1a7",
1420 "PublicDescription": "Counts any other requests that hit in the L3 and the snoop to one of the sibling cores hits the line in M state and the line is forwarded. Offcore response can be programmed only with a specific pair of event select and counter MSR, and with specific event codes and predefine mask bit value in a dedicated MSR to specify attributes of the offcore transaction.",
1421 "SampleAfterValue": "100003",
1422 "CounterHTOff": "0,1,2,3"
1423 },
1424 {
1425 "Offcore": "1",
1426 "EventCode": "0xB7, 0xBB",
1427 "UMask": "0x1",
1428 "BriefDescription": "Counts any other requests that hit in the L3.",
1429 "MSRValue": "0x3f803c8000 ",
1430 "Counter": "0,1,2,3",
1431 "EventName": "OFFCORE_RESPONSE.OTHER.L3_HIT.ANY_SNOOP",
1432 "MSRIndex": "0x1a6,0x1a7",
1433 "PublicDescription": "Counts any other requests that hit in the L3. Offcore response can be programmed only with a specific pair of event select and counter MSR, and with specific event codes and predefine mask bit value in a dedicated MSR to specify attributes of the offcore transaction.",
1357 "SampleAfterValue": "100003", 1434 "SampleAfterValue": "100003",
1358 "CounterHTOff": "0,1,2,3" 1435 "CounterHTOff": "0,1,2,3"
1359 }, 1436 },
@@ -1366,7 +1443,7 @@
1366 "Counter": "0,1,2,3", 1443 "Counter": "0,1,2,3",
1367 "EventName": "OFFCORE_RESPONSE.ALL_PF_DATA_RD.ANY_RESPONSE", 1444 "EventName": "OFFCORE_RESPONSE.ALL_PF_DATA_RD.ANY_RESPONSE",
1368 "MSRIndex": "0x1a6,0x1a7", 1445 "MSRIndex": "0x1a6,0x1a7",
1369 "PublicDescription": "Counts all prefetch data reads that have any response type.; Offcore response can be programmed only with a specific pair of event select and counter MSR, and with specific event codes and predefine mask bit value in a dedicated MSR to specify attributes of the offcore transaction.", 1446 "PublicDescription": "Counts all prefetch data reads that have any response type. Offcore response can be programmed only with a specific pair of event select and counter MSR, and with specific event codes and predefine mask bit value in a dedicated MSR to specify attributes of the offcore transaction.",
1370 "SampleAfterValue": "100003", 1447 "SampleAfterValue": "100003",
1371 "CounterHTOff": "0,1,2,3" 1448 "CounterHTOff": "0,1,2,3"
1372 }, 1449 },
@@ -1379,7 +1456,7 @@
1379 "Counter": "0,1,2,3", 1456 "Counter": "0,1,2,3",
1380 "EventName": "OFFCORE_RESPONSE.ALL_PF_DATA_RD.L3_HIT.NO_SNOOP_NEEDED", 1457 "EventName": "OFFCORE_RESPONSE.ALL_PF_DATA_RD.L3_HIT.NO_SNOOP_NEEDED",
1381 "MSRIndex": "0x1a6,0x1a7", 1458 "MSRIndex": "0x1a6,0x1a7",
1382 "PublicDescription": "Counts all prefetch data reads that hit in the L3 and sibling core snoops are not needed as either the core-valid bit is not set or the shared line is present in multiple cores.; Offcore response can be programmed only with a specific pair of event select and counter MSR, and with specific event codes and predefine mask bit value in a dedicated MSR to specify attributes of the offcore transaction.", 1459 "PublicDescription": "Counts all prefetch data reads that hit in the L3 and sibling core snoops are not needed as either the core-valid bit is not set or the shared line is present in multiple cores. Offcore response can be programmed only with a specific pair of event select and counter MSR, and with specific event codes and predefine mask bit value in a dedicated MSR to specify attributes of the offcore transaction.",
1383 "SampleAfterValue": "100003", 1460 "SampleAfterValue": "100003",
1384 "CounterHTOff": "0,1,2,3" 1461 "CounterHTOff": "0,1,2,3"
1385 }, 1462 },
@@ -1392,7 +1469,7 @@
1392 "Counter": "0,1,2,3", 1469 "Counter": "0,1,2,3",
1393 "EventName": "OFFCORE_RESPONSE.ALL_PF_DATA_RD.L3_HIT.HIT_OTHER_CORE_NO_FWD", 1470 "EventName": "OFFCORE_RESPONSE.ALL_PF_DATA_RD.L3_HIT.HIT_OTHER_CORE_NO_FWD",
1394 "MSRIndex": "0x1a6,0x1a7", 1471 "MSRIndex": "0x1a6,0x1a7",
1395 "PublicDescription": "Counts all prefetch data reads that hit in the L3 and the snoop to one of the sibling cores hits the line in M state and the line is forwarded.; Offcore response can be programmed only with a specific pair of event select and counter MSR, and with specific event codes and predefine mask bit value in a dedicated MSR to specify attributes of the offcore transaction.", 1472 "PublicDescription": "Counts all prefetch data reads that hit in the L3 and the snoop to one of the sibling cores hits the line in M state and the line is forwarded. Offcore response can be programmed only with a specific pair of event select and counter MSR, and with specific event codes and predefine mask bit value in a dedicated MSR to specify attributes of the offcore transaction.",
1396 "SampleAfterValue": "100003", 1473 "SampleAfterValue": "100003",
1397 "CounterHTOff": "0,1,2,3" 1474 "CounterHTOff": "0,1,2,3"
1398 }, 1475 },
@@ -1405,7 +1482,7 @@
1405 "Counter": "0,1,2,3", 1482 "Counter": "0,1,2,3",
1406 "EventName": "OFFCORE_RESPONSE.ALL_PF_DATA_RD.L3_HIT.SNOOP_HIT_WITH_FWD", 1483 "EventName": "OFFCORE_RESPONSE.ALL_PF_DATA_RD.L3_HIT.SNOOP_HIT_WITH_FWD",
1407 "MSRIndex": "0x1a6,0x1a7", 1484 "MSRIndex": "0x1a6,0x1a7",
1408 "PublicDescription": "tbd; Offcore response can be programmed only with a specific pair of event select and counter MSR, and with specific event codes and predefine mask bit value in a dedicated MSR to specify attributes of the offcore transaction.", 1485 "PublicDescription": "tbd Offcore response can be programmed only with a specific pair of event select and counter MSR, and with specific event codes and predefine mask bit value in a dedicated MSR to specify attributes of the offcore transaction.",
1409 "SampleAfterValue": "100003", 1486 "SampleAfterValue": "100003",
1410 "CounterHTOff": "0,1,2,3" 1487 "CounterHTOff": "0,1,2,3"
1411 }, 1488 },
@@ -1418,7 +1495,7 @@
1418 "Counter": "0,1,2,3", 1495 "Counter": "0,1,2,3",
1419 "EventName": "OFFCORE_RESPONSE.ALL_PF_DATA_RD.L3_HIT.HITM_OTHER_CORE", 1496 "EventName": "OFFCORE_RESPONSE.ALL_PF_DATA_RD.L3_HIT.HITM_OTHER_CORE",
1420 "MSRIndex": "0x1a6,0x1a7", 1497 "MSRIndex": "0x1a6,0x1a7",
1421 "PublicDescription": "Counts all prefetch data reads that hit in the L3 and the snoop to one of the sibling cores hits the line in M state and the line is forwarded.; Offcore response can be programmed only with a specific pair of event select and counter MSR, and with specific event codes and predefine mask bit value in a dedicated MSR to specify attributes of the offcore transaction.", 1498 "PublicDescription": "Counts all prefetch data reads that hit in the L3 and the snoop to one of the sibling cores hits the line in M state and the line is forwarded. Offcore response can be programmed only with a specific pair of event select and counter MSR, and with specific event codes and predefine mask bit value in a dedicated MSR to specify attributes of the offcore transaction.",
1422 "SampleAfterValue": "100003", 1499 "SampleAfterValue": "100003",
1423 "CounterHTOff": "0,1,2,3" 1500 "CounterHTOff": "0,1,2,3"
1424 }, 1501 },
@@ -1431,7 +1508,7 @@
1431 "Counter": "0,1,2,3", 1508 "Counter": "0,1,2,3",
1432 "EventName": "OFFCORE_RESPONSE.ALL_PF_DATA_RD.L3_HIT.ANY_SNOOP", 1509 "EventName": "OFFCORE_RESPONSE.ALL_PF_DATA_RD.L3_HIT.ANY_SNOOP",
1433 "MSRIndex": "0x1a6,0x1a7", 1510 "MSRIndex": "0x1a6,0x1a7",
1434 "PublicDescription": "Counts all prefetch data reads that hit in the L3.; Offcore response can be programmed only with a specific pair of event select and counter MSR, and with specific event codes and predefine mask bit value in a dedicated MSR to specify attributes of the offcore transaction.", 1511 "PublicDescription": "Counts all prefetch data reads that hit in the L3. Offcore response can be programmed only with a specific pair of event select and counter MSR, and with specific event codes and predefine mask bit value in a dedicated MSR to specify attributes of the offcore transaction.",
1435 "SampleAfterValue": "100003", 1512 "SampleAfterValue": "100003",
1436 "CounterHTOff": "0,1,2,3" 1513 "CounterHTOff": "0,1,2,3"
1437 }, 1514 },
@@ -1444,7 +1521,7 @@
1444 "Counter": "0,1,2,3", 1521 "Counter": "0,1,2,3",
1445 "EventName": "OFFCORE_RESPONSE.ALL_PF_RFO.ANY_RESPONSE", 1522 "EventName": "OFFCORE_RESPONSE.ALL_PF_RFO.ANY_RESPONSE",
1446 "MSRIndex": "0x1a6,0x1a7", 1523 "MSRIndex": "0x1a6,0x1a7",
1447 "PublicDescription": "Counts prefetch RFOs that have any response type.; Offcore response can be programmed only with a specific pair of event select and counter MSR, and with specific event codes and predefine mask bit value in a dedicated MSR to specify attributes of the offcore transaction.", 1524 "PublicDescription": "Counts prefetch RFOs that have any response type. Offcore response can be programmed only with a specific pair of event select and counter MSR, and with specific event codes and predefine mask bit value in a dedicated MSR to specify attributes of the offcore transaction.",
1448 "SampleAfterValue": "100003", 1525 "SampleAfterValue": "100003",
1449 "CounterHTOff": "0,1,2,3" 1526 "CounterHTOff": "0,1,2,3"
1450 }, 1527 },
@@ -1457,7 +1534,7 @@
1457 "Counter": "0,1,2,3", 1534 "Counter": "0,1,2,3",
1458 "EventName": "OFFCORE_RESPONSE.ALL_PF_RFO.L3_HIT.NO_SNOOP_NEEDED", 1535 "EventName": "OFFCORE_RESPONSE.ALL_PF_RFO.L3_HIT.NO_SNOOP_NEEDED",
1459 "MSRIndex": "0x1a6,0x1a7", 1536 "MSRIndex": "0x1a6,0x1a7",
1460 "PublicDescription": "Counts prefetch RFOs that hit in the L3 and sibling core snoops are not needed as either the core-valid bit is not set or the shared line is present in multiple cores.; Offcore response can be programmed only with a specific pair of event select and counter MSR, and with specific event codes and predefine mask bit value in a dedicated MSR to specify attributes of the offcore transaction.", 1537 "PublicDescription": "Counts prefetch RFOs that hit in the L3 and sibling core snoops are not needed as either the core-valid bit is not set or the shared line is present in multiple cores. Offcore response can be programmed only with a specific pair of event select and counter MSR, and with specific event codes and predefine mask bit value in a dedicated MSR to specify attributes of the offcore transaction.",
1461 "SampleAfterValue": "100003", 1538 "SampleAfterValue": "100003",
1462 "CounterHTOff": "0,1,2,3" 1539 "CounterHTOff": "0,1,2,3"
1463 }, 1540 },
@@ -1470,7 +1547,7 @@
1470 "Counter": "0,1,2,3", 1547 "Counter": "0,1,2,3",
1471 "EventName": "OFFCORE_RESPONSE.ALL_PF_RFO.L3_HIT.HIT_OTHER_CORE_NO_FWD", 1548 "EventName": "OFFCORE_RESPONSE.ALL_PF_RFO.L3_HIT.HIT_OTHER_CORE_NO_FWD",
1472 "MSRIndex": "0x1a6,0x1a7", 1549 "MSRIndex": "0x1a6,0x1a7",
1473 "PublicDescription": "Counts prefetch RFOs that hit in the L3 and the snoop to one of the sibling cores hits the line in M state and the line is forwarded.; Offcore response can be programmed only with a specific pair of event select and counter MSR, and with specific event codes and predefine mask bit value in a dedicated MSR to specify attributes of the offcore transaction.", 1550 "PublicDescription": "Counts prefetch RFOs that hit in the L3 and the snoop to one of the sibling cores hits the line in M state and the line is forwarded. Offcore response can be programmed only with a specific pair of event select and counter MSR, and with specific event codes and predefine mask bit value in a dedicated MSR to specify attributes of the offcore transaction.",
1474 "SampleAfterValue": "100003", 1551 "SampleAfterValue": "100003",
1475 "CounterHTOff": "0,1,2,3" 1552 "CounterHTOff": "0,1,2,3"
1476 }, 1553 },
@@ -1483,7 +1560,7 @@
1483 "Counter": "0,1,2,3", 1560 "Counter": "0,1,2,3",
1484 "EventName": "OFFCORE_RESPONSE.ALL_PF_RFO.L3_HIT.SNOOP_HIT_WITH_FWD", 1561 "EventName": "OFFCORE_RESPONSE.ALL_PF_RFO.L3_HIT.SNOOP_HIT_WITH_FWD",
1485 "MSRIndex": "0x1a6,0x1a7", 1562 "MSRIndex": "0x1a6,0x1a7",
1486 "PublicDescription": "tbd; Offcore response can be programmed only with a specific pair of event select and counter MSR, and with specific event codes and predefine mask bit value in a dedicated MSR to specify attributes of the offcore transaction.", 1563 "PublicDescription": "tbd Offcore response can be programmed only with a specific pair of event select and counter MSR, and with specific event codes and predefine mask bit value in a dedicated MSR to specify attributes of the offcore transaction.",
1487 "SampleAfterValue": "100003", 1564 "SampleAfterValue": "100003",
1488 "CounterHTOff": "0,1,2,3" 1565 "CounterHTOff": "0,1,2,3"
1489 }, 1566 },
@@ -1496,7 +1573,7 @@
1496 "Counter": "0,1,2,3", 1573 "Counter": "0,1,2,3",
1497 "EventName": "OFFCORE_RESPONSE.ALL_PF_RFO.L3_HIT.HITM_OTHER_CORE", 1574 "EventName": "OFFCORE_RESPONSE.ALL_PF_RFO.L3_HIT.HITM_OTHER_CORE",
1498 "MSRIndex": "0x1a6,0x1a7", 1575 "MSRIndex": "0x1a6,0x1a7",
1499 "PublicDescription": "Counts prefetch RFOs that hit in the L3 and the snoop to one of the sibling cores hits the line in M state and the line is forwarded.; Offcore response can be programmed only with a specific pair of event select and counter MSR, and with specific event codes and predefine mask bit value in a dedicated MSR to specify attributes of the offcore transaction.", 1576 "PublicDescription": "Counts prefetch RFOs that hit in the L3 and the snoop to one of the sibling cores hits the line in M state and the line is forwarded. Offcore response can be programmed only with a specific pair of event select and counter MSR, and with specific event codes and predefine mask bit value in a dedicated MSR to specify attributes of the offcore transaction.",
1500 "SampleAfterValue": "100003", 1577 "SampleAfterValue": "100003",
1501 "CounterHTOff": "0,1,2,3" 1578 "CounterHTOff": "0,1,2,3"
1502 }, 1579 },
@@ -1509,7 +1586,7 @@
1509 "Counter": "0,1,2,3", 1586 "Counter": "0,1,2,3",
1510 "EventName": "OFFCORE_RESPONSE.ALL_PF_RFO.L3_HIT.ANY_SNOOP", 1587 "EventName": "OFFCORE_RESPONSE.ALL_PF_RFO.L3_HIT.ANY_SNOOP",
1511 "MSRIndex": "0x1a6,0x1a7", 1588 "MSRIndex": "0x1a6,0x1a7",
1512 "PublicDescription": "Counts prefetch RFOs that hit in the L3.; Offcore response can be programmed only with a specific pair of event select and counter MSR, and with specific event codes and predefine mask bit value in a dedicated MSR to specify attributes of the offcore transaction.", 1589 "PublicDescription": "Counts prefetch RFOs that hit in the L3. Offcore response can be programmed only with a specific pair of event select and counter MSR, and with specific event codes and predefine mask bit value in a dedicated MSR to specify attributes of the offcore transaction.",
1513 "SampleAfterValue": "100003", 1590 "SampleAfterValue": "100003",
1514 "CounterHTOff": "0,1,2,3" 1591 "CounterHTOff": "0,1,2,3"
1515 }, 1592 },
@@ -1522,7 +1599,7 @@
1522 "Counter": "0,1,2,3", 1599 "Counter": "0,1,2,3",
1523 "EventName": "OFFCORE_RESPONSE.ALL_DATA_RD.ANY_RESPONSE", 1600 "EventName": "OFFCORE_RESPONSE.ALL_DATA_RD.ANY_RESPONSE",
1524 "MSRIndex": "0x1a6,0x1a7", 1601 "MSRIndex": "0x1a6,0x1a7",
1525 "PublicDescription": "Counts all demand & prefetch data reads that have any response type.; Offcore response can be programmed only with a specific pair of event select and counter MSR, and with specific event codes and predefine mask bit value in a dedicated MSR to specify attributes of the offcore transaction.", 1602 "PublicDescription": "Counts all demand & prefetch data reads that have any response type. Offcore response can be programmed only with a specific pair of event select and counter MSR, and with specific event codes and predefine mask bit value in a dedicated MSR to specify attributes of the offcore transaction.",
1526 "SampleAfterValue": "100003", 1603 "SampleAfterValue": "100003",
1527 "CounterHTOff": "0,1,2,3" 1604 "CounterHTOff": "0,1,2,3"
1528 }, 1605 },
@@ -1535,7 +1612,7 @@
1535 "Counter": "0,1,2,3", 1612 "Counter": "0,1,2,3",
1536 "EventName": "OFFCORE_RESPONSE.ALL_DATA_RD.L3_HIT.NO_SNOOP_NEEDED", 1613 "EventName": "OFFCORE_RESPONSE.ALL_DATA_RD.L3_HIT.NO_SNOOP_NEEDED",
1537 "MSRIndex": "0x1a6,0x1a7", 1614 "MSRIndex": "0x1a6,0x1a7",
1538 "PublicDescription": "Counts all demand & prefetch data reads that hit in the L3 and sibling core snoops are not needed as either the core-valid bit is not set or the shared line is present in multiple cores.; Offcore response can be programmed only with a specific pair of event select and counter MSR, and with specific event codes and predefine mask bit value in a dedicated MSR to specify attributes of the offcore transaction.", 1615 "PublicDescription": "Counts all demand & prefetch data reads that hit in the L3 and sibling core snoops are not needed as either the core-valid bit is not set or the shared line is present in multiple cores. Offcore response can be programmed only with a specific pair of event select and counter MSR, and with specific event codes and predefine mask bit value in a dedicated MSR to specify attributes of the offcore transaction.",
1539 "SampleAfterValue": "100003", 1616 "SampleAfterValue": "100003",
1540 "CounterHTOff": "0,1,2,3" 1617 "CounterHTOff": "0,1,2,3"
1541 }, 1618 },
@@ -1548,7 +1625,7 @@
1548 "Counter": "0,1,2,3", 1625 "Counter": "0,1,2,3",
1549 "EventName": "OFFCORE_RESPONSE.ALL_DATA_RD.L3_HIT.HIT_OTHER_CORE_NO_FWD", 1626 "EventName": "OFFCORE_RESPONSE.ALL_DATA_RD.L3_HIT.HIT_OTHER_CORE_NO_FWD",
1550 "MSRIndex": "0x1a6,0x1a7", 1627 "MSRIndex": "0x1a6,0x1a7",
1551 "PublicDescription": "Counts all demand & prefetch data reads that hit in the L3 and the snoop to one of the sibling cores hits the line in M state and the line is forwarded.; Offcore response can be programmed only with a specific pair of event select and counter MSR, and with specific event codes and predefine mask bit value in a dedicated MSR to specify attributes of the offcore transaction.", 1628 "PublicDescription": "Counts all demand & prefetch data reads that hit in the L3 and the snoop to one of the sibling cores hits the line in M state and the line is forwarded. Offcore response can be programmed only with a specific pair of event select and counter MSR, and with specific event codes and predefine mask bit value in a dedicated MSR to specify attributes of the offcore transaction.",
1552 "SampleAfterValue": "100003", 1629 "SampleAfterValue": "100003",
1553 "CounterHTOff": "0,1,2,3" 1630 "CounterHTOff": "0,1,2,3"
1554 }, 1631 },
@@ -1561,7 +1638,7 @@
1561 "Counter": "0,1,2,3", 1638 "Counter": "0,1,2,3",
1562 "EventName": "OFFCORE_RESPONSE.ALL_DATA_RD.L3_HIT.SNOOP_HIT_WITH_FWD", 1639 "EventName": "OFFCORE_RESPONSE.ALL_DATA_RD.L3_HIT.SNOOP_HIT_WITH_FWD",
1563 "MSRIndex": "0x1a6,0x1a7", 1640 "MSRIndex": "0x1a6,0x1a7",
1564 "PublicDescription": "tbd; Offcore response can be programmed only with a specific pair of event select and counter MSR, and with specific event codes and predefine mask bit value in a dedicated MSR to specify attributes of the offcore transaction.", 1641 "PublicDescription": "tbd Offcore response can be programmed only with a specific pair of event select and counter MSR, and with specific event codes and predefine mask bit value in a dedicated MSR to specify attributes of the offcore transaction.",
1565 "SampleAfterValue": "100003", 1642 "SampleAfterValue": "100003",
1566 "CounterHTOff": "0,1,2,3" 1643 "CounterHTOff": "0,1,2,3"
1567 }, 1644 },
@@ -1574,7 +1651,7 @@
1574 "Counter": "0,1,2,3", 1651 "Counter": "0,1,2,3",
1575 "EventName": "OFFCORE_RESPONSE.ALL_DATA_RD.L3_HIT.HITM_OTHER_CORE", 1652 "EventName": "OFFCORE_RESPONSE.ALL_DATA_RD.L3_HIT.HITM_OTHER_CORE",
1576 "MSRIndex": "0x1a6,0x1a7", 1653 "MSRIndex": "0x1a6,0x1a7",
1577 "PublicDescription": "Counts all demand & prefetch data reads that hit in the L3 and the snoop to one of the sibling cores hits the line in M state and the line is forwarded.; Offcore response can be programmed only with a specific pair of event select and counter MSR, and with specific event codes and predefine mask bit value in a dedicated MSR to specify attributes of the offcore transaction.", 1654 "PublicDescription": "Counts all demand & prefetch data reads that hit in the L3 and the snoop to one of the sibling cores hits the line in M state and the line is forwarded. Offcore response can be programmed only with a specific pair of event select and counter MSR, and with specific event codes and predefine mask bit value in a dedicated MSR to specify attributes of the offcore transaction.",
1578 "SampleAfterValue": "100003", 1655 "SampleAfterValue": "100003",
1579 "CounterHTOff": "0,1,2,3" 1656 "CounterHTOff": "0,1,2,3"
1580 }, 1657 },
@@ -1587,7 +1664,7 @@
1587 "Counter": "0,1,2,3", 1664 "Counter": "0,1,2,3",
1588 "EventName": "OFFCORE_RESPONSE.ALL_DATA_RD.L3_HIT.ANY_SNOOP", 1665 "EventName": "OFFCORE_RESPONSE.ALL_DATA_RD.L3_HIT.ANY_SNOOP",
1589 "MSRIndex": "0x1a6,0x1a7", 1666 "MSRIndex": "0x1a6,0x1a7",
1590 "PublicDescription": "Counts all demand & prefetch data reads that hit in the L3.; Offcore response can be programmed only with a specific pair of event select and counter MSR, and with specific event codes and predefine mask bit value in a dedicated MSR to specify attributes of the offcore transaction.", 1667 "PublicDescription": "Counts all demand & prefetch data reads that hit in the L3. Offcore response can be programmed only with a specific pair of event select and counter MSR, and with specific event codes and predefine mask bit value in a dedicated MSR to specify attributes of the offcore transaction.",
1591 "SampleAfterValue": "100003", 1668 "SampleAfterValue": "100003",
1592 "CounterHTOff": "0,1,2,3" 1669 "CounterHTOff": "0,1,2,3"
1593 }, 1670 },
@@ -1600,7 +1677,7 @@
1600 "Counter": "0,1,2,3", 1677 "Counter": "0,1,2,3",
1601 "EventName": "OFFCORE_RESPONSE.ALL_RFO.ANY_RESPONSE", 1678 "EventName": "OFFCORE_RESPONSE.ALL_RFO.ANY_RESPONSE",
1602 "MSRIndex": "0x1a6,0x1a7", 1679 "MSRIndex": "0x1a6,0x1a7",
1603 "PublicDescription": "Counts all demand & prefetch RFOs that have any response type.; Offcore response can be programmed only with a specific pair of event select and counter MSR, and with specific event codes and predefine mask bit value in a dedicated MSR to specify attributes of the offcore transaction.", 1680 "PublicDescription": "Counts all demand & prefetch RFOs that have any response type. Offcore response can be programmed only with a specific pair of event select and counter MSR, and with specific event codes and predefine mask bit value in a dedicated MSR to specify attributes of the offcore transaction.",
1604 "SampleAfterValue": "100003", 1681 "SampleAfterValue": "100003",
1605 "CounterHTOff": "0,1,2,3" 1682 "CounterHTOff": "0,1,2,3"
1606 }, 1683 },
@@ -1613,7 +1690,7 @@
1613 "Counter": "0,1,2,3", 1690 "Counter": "0,1,2,3",
1614 "EventName": "OFFCORE_RESPONSE.ALL_RFO.L3_HIT.NO_SNOOP_NEEDED", 1691 "EventName": "OFFCORE_RESPONSE.ALL_RFO.L3_HIT.NO_SNOOP_NEEDED",
1615 "MSRIndex": "0x1a6,0x1a7", 1692 "MSRIndex": "0x1a6,0x1a7",
1616 "PublicDescription": "Counts all demand & prefetch RFOs that hit in the L3 and sibling core snoops are not needed as either the core-valid bit is not set or the shared line is present in multiple cores.; Offcore response can be programmed only with a specific pair of event select and counter MSR, and with specific event codes and predefine mask bit value in a dedicated MSR to specify attributes of the offcore transaction.", 1693 "PublicDescription": "Counts all demand & prefetch RFOs that hit in the L3 and sibling core snoops are not needed as either the core-valid bit is not set or the shared line is present in multiple cores. Offcore response can be programmed only with a specific pair of event select and counter MSR, and with specific event codes and predefine mask bit value in a dedicated MSR to specify attributes of the offcore transaction.",
1617 "SampleAfterValue": "100003", 1694 "SampleAfterValue": "100003",
1618 "CounterHTOff": "0,1,2,3" 1695 "CounterHTOff": "0,1,2,3"
1619 }, 1696 },
@@ -1626,7 +1703,7 @@
1626 "Counter": "0,1,2,3", 1703 "Counter": "0,1,2,3",
1627 "EventName": "OFFCORE_RESPONSE.ALL_RFO.L3_HIT.HIT_OTHER_CORE_NO_FWD", 1704 "EventName": "OFFCORE_RESPONSE.ALL_RFO.L3_HIT.HIT_OTHER_CORE_NO_FWD",
1628 "MSRIndex": "0x1a6,0x1a7", 1705 "MSRIndex": "0x1a6,0x1a7",
1629 "PublicDescription": "Counts all demand & prefetch RFOs that hit in the L3 and the snoop to one of the sibling cores hits the line in M state and the line is forwarded.; Offcore response can be programmed only with a specific pair of event select and counter MSR, and with specific event codes and predefine mask bit value in a dedicated MSR to specify attributes of the offcore transaction.", 1706 "PublicDescription": "Counts all demand & prefetch RFOs that hit in the L3 and the snoop to one of the sibling cores hits the line in M state and the line is forwarded. Offcore response can be programmed only with a specific pair of event select and counter MSR, and with specific event codes and predefine mask bit value in a dedicated MSR to specify attributes of the offcore transaction.",
1630 "SampleAfterValue": "100003", 1707 "SampleAfterValue": "100003",
1631 "CounterHTOff": "0,1,2,3" 1708 "CounterHTOff": "0,1,2,3"
1632 }, 1709 },
@@ -1639,7 +1716,7 @@
1639 "Counter": "0,1,2,3", 1716 "Counter": "0,1,2,3",
1640 "EventName": "OFFCORE_RESPONSE.ALL_RFO.L3_HIT.SNOOP_HIT_WITH_FWD", 1717 "EventName": "OFFCORE_RESPONSE.ALL_RFO.L3_HIT.SNOOP_HIT_WITH_FWD",
1641 "MSRIndex": "0x1a6,0x1a7", 1718 "MSRIndex": "0x1a6,0x1a7",
1642 "PublicDescription": "tbd; Offcore response can be programmed only with a specific pair of event select and counter MSR, and with specific event codes and predefine mask bit value in a dedicated MSR to specify attributes of the offcore transaction.", 1719 "PublicDescription": "tbd Offcore response can be programmed only with a specific pair of event select and counter MSR, and with specific event codes and predefine mask bit value in a dedicated MSR to specify attributes of the offcore transaction.",
1643 "SampleAfterValue": "100003", 1720 "SampleAfterValue": "100003",
1644 "CounterHTOff": "0,1,2,3" 1721 "CounterHTOff": "0,1,2,3"
1645 }, 1722 },
@@ -1652,7 +1729,7 @@
1652 "Counter": "0,1,2,3", 1729 "Counter": "0,1,2,3",
1653 "EventName": "OFFCORE_RESPONSE.ALL_RFO.L3_HIT.HITM_OTHER_CORE", 1730 "EventName": "OFFCORE_RESPONSE.ALL_RFO.L3_HIT.HITM_OTHER_CORE",
1654 "MSRIndex": "0x1a6,0x1a7", 1731 "MSRIndex": "0x1a6,0x1a7",
1655 "PublicDescription": "Counts all demand & prefetch RFOs that hit in the L3 and the snoop to one of the sibling cores hits the line in M state and the line is forwarded.; Offcore response can be programmed only with a specific pair of event select and counter MSR, and with specific event codes and predefine mask bit value in a dedicated MSR to specify attributes of the offcore transaction.", 1732 "PublicDescription": "Counts all demand & prefetch RFOs that hit in the L3 and the snoop to one of the sibling cores hits the line in M state and the line is forwarded. Offcore response can be programmed only with a specific pair of event select and counter MSR, and with specific event codes and predefine mask bit value in a dedicated MSR to specify attributes of the offcore transaction.",
1656 "SampleAfterValue": "100003", 1733 "SampleAfterValue": "100003",
1657 "CounterHTOff": "0,1,2,3" 1734 "CounterHTOff": "0,1,2,3"
1658 }, 1735 },
@@ -1665,7 +1742,7 @@
1665 "Counter": "0,1,2,3", 1742 "Counter": "0,1,2,3",
1666 "EventName": "OFFCORE_RESPONSE.ALL_RFO.L3_HIT.ANY_SNOOP", 1743 "EventName": "OFFCORE_RESPONSE.ALL_RFO.L3_HIT.ANY_SNOOP",
1667 "MSRIndex": "0x1a6,0x1a7", 1744 "MSRIndex": "0x1a6,0x1a7",
1668 "PublicDescription": "Counts all demand & prefetch RFOs that hit in the L3.; Offcore response can be programmed only with a specific pair of event select and counter MSR, and with specific event codes and predefine mask bit value in a dedicated MSR to specify attributes of the offcore transaction.", 1745 "PublicDescription": "Counts all demand & prefetch RFOs that hit in the L3. Offcore response can be programmed only with a specific pair of event select and counter MSR, and with specific event codes and predefine mask bit value in a dedicated MSR to specify attributes of the offcore transaction.",
1669 "SampleAfterValue": "100003", 1746 "SampleAfterValue": "100003",
1670 "CounterHTOff": "0,1,2,3" 1747 "CounterHTOff": "0,1,2,3"
1671 } 1748 }
diff --git a/tools/perf/pmu-events/arch/x86/skylakex/floating-point.json b/tools/perf/pmu-events/arch/x86/skylakex/floating-point.json
index 1c09a328df36..286ed1a37ec9 100644
--- a/tools/perf/pmu-events/arch/x86/skylakex/floating-point.json
+++ b/tools/perf/pmu-events/arch/x86/skylakex/floating-point.json
@@ -29,10 +29,9 @@
29 { 29 {
30 "EventCode": "0xC7", 30 "EventCode": "0xC7",
31 "UMask": "0x8", 31 "UMask": "0x8",
32 "BriefDescription": "Number of SSE/AVX computational 128-bit packed single precision floating-point instructions retired. Each count represents 4 computations. Applies to SSE* and AVX* packed single precision floating-point instructions: ADD SUB MUL DIV MIN MAX RCP RSQRT SQRT DPP FM(N)ADD/SUB. DPP and FM(N)ADD/SUB instructions count twice as they perform multiple calculations per element. ", 32 "BriefDescription": "Number of SSE/AVX computational 128-bit packed single precision floating-point instructions retired. Each count represents 4 computations. Applies to SSE* and AVX* packed single precision floating-point instructions: ADD SUB MUL DIV MIN MAX RCP RSQRT SQRT DPP FM(N)ADD/SUB. DPP and FM(N)ADD/SUB instructions count twice as they perform multiple calculations per element.",
33 "Counter": "0,1,2,3", 33 "Counter": "0,1,2,3",
34 "EventName": "FP_ARITH_INST_RETIRED.128B_PACKED_SINGLE", 34 "EventName": "FP_ARITH_INST_RETIRED.128B_PACKED_SINGLE",
35 "PublicDescription": "Number of SSE/AVX computational 128-bit packed single precision floating-point instructions retired. Each count represents 4 computations. Applies to SSE* and AVX* packed single precision floating-point instructions: ADD SUB MUL DIV MIN MAX RCP RSQRT SQRT DPP FM(N)ADD/SUB. DPP and FM(N)ADD/SUB instructions count twice as they perform multiple calculations per element.",
36 "SampleAfterValue": "2000003", 35 "SampleAfterValue": "2000003",
37 "CounterHTOff": "0,1,2,3,4,5,6,7" 36 "CounterHTOff": "0,1,2,3,4,5,6,7"
38 }, 37 },
diff --git a/tools/perf/pmu-events/arch/x86/skylakex/frontend.json b/tools/perf/pmu-events/arch/x86/skylakex/frontend.json
index 40abc0852cd6..403a4f89e9b2 100644
--- a/tools/perf/pmu-events/arch/x86/skylakex/frontend.json
+++ b/tools/perf/pmu-events/arch/x86/skylakex/frontend.json
@@ -182,7 +182,7 @@
182 "BriefDescription": "Uops not delivered to Resource Allocation Table (RAT) per thread when backend of the machine is not stalled", 182 "BriefDescription": "Uops not delivered to Resource Allocation Table (RAT) per thread when backend of the machine is not stalled",
183 "Counter": "0,1,2,3", 183 "Counter": "0,1,2,3",
184 "EventName": "IDQ_UOPS_NOT_DELIVERED.CORE", 184 "EventName": "IDQ_UOPS_NOT_DELIVERED.CORE",
185 "PublicDescription": "Counts the number of uops not delivered to Resource Allocation Table (RAT) per thread adding \u201c4 \u2013 x\u201d when Resource Allocation Table (RAT) is not stalled and Instruction Decode Queue (IDQ) delivers x uops to Resource Allocation Table (RAT) (where x belongs to {0,1,2,3}). Counting does not cover cases when: a. IDQ-Resource Allocation Table (RAT) pipe serves the other thread. b. Resource Allocation Table (RAT) is stalled for the thread (including uop drops and clear BE conditions). c. Instruction Decode Queue (IDQ) delivers four uops.", 185 "PublicDescription": "Counts the number of uops not delivered to Resource Allocation Table (RAT) per thread adding 4 x when Resource Allocation Table (RAT) is not stalled and Instruction Decode Queue (IDQ) delivers x uops to Resource Allocation Table (RAT) (where x belongs to {0,1,2,3}). Counting does not cover cases when: a. IDQ-Resource Allocation Table (RAT) pipe serves the other thread. b. Resource Allocation Table (RAT) is stalled for the thread (including uop drops and clear BE conditions). c. Instruction Decode Queue (IDQ) delivers four uops.",
186 "SampleAfterValue": "2000003", 186 "SampleAfterValue": "2000003",
187 "CounterHTOff": "0,1,2,3,4,5,6,7" 187 "CounterHTOff": "0,1,2,3,4,5,6,7"
188 }, 188 },
@@ -247,20 +247,20 @@
247 "BriefDescription": "Decode Stream Buffer (DSB)-to-MITE switch true penalty cycles.", 247 "BriefDescription": "Decode Stream Buffer (DSB)-to-MITE switch true penalty cycles.",
248 "Counter": "0,1,2,3", 248 "Counter": "0,1,2,3",
249 "EventName": "DSB2MITE_SWITCHES.PENALTY_CYCLES", 249 "EventName": "DSB2MITE_SWITCHES.PENALTY_CYCLES",
250 "PublicDescription": "Counts Decode Stream Buffer (DSB)-to-MITE switch true penalty cycles. These cycles do not include uops routed through because of the switch itself, for example, when Instruction Decode Queue (IDQ) pre-allocation is unavailable, or Instruction Decode Queue (IDQ) is full. SBD-to-MITE switch true penalty cycles happen after the merge mux (MM) receives Decode Stream Buffer (DSB) Sync-indication until receiving the first MITE uop. MM is placed before Instruction Decode Queue (IDQ) to merge uops being fed from the MITE and Decode Stream Buffer (DSB) paths. Decode Stream Buffer (DSB) inserts the Sync-indication whenever a Decode Stream Buffer (DSB)-to-MITE switch occurs.Penalty: A Decode Stream Buffer (DSB) hit followed by a Decode Stream Buffer (DSB) miss can cost up to six cycles in which no uops are delivered to the IDQ. Most often, such switches from the Decode Stream Buffer (DSB) to the legacy pipeline cost 0\u20132 cycles.", 250 "PublicDescription": "Counts Decode Stream Buffer (DSB)-to-MITE switch true penalty cycles. These cycles do not include uops routed through because of the switch itself, for example, when Instruction Decode Queue (IDQ) pre-allocation is unavailable, or Instruction Decode Queue (IDQ) is full. SBD-to-MITE switch true penalty cycles happen after the merge mux (MM) receives Decode Stream Buffer (DSB) Sync-indication until receiving the first MITE uop. MM is placed before Instruction Decode Queue (IDQ) to merge uops being fed from the MITE and Decode Stream Buffer (DSB) paths. Decode Stream Buffer (DSB) inserts the Sync-indication whenever a Decode Stream Buffer (DSB)-to-MITE switch occurs.Penalty: A Decode Stream Buffer (DSB) hit followed by a Decode Stream Buffer (DSB) miss can cost up to six cycles in which no uops are delivered to the IDQ. Most often, such switches from the Decode Stream Buffer (DSB) to the legacy pipeline cost 02 cycles.",
251 "SampleAfterValue": "2000003", 251 "SampleAfterValue": "2000003",
252 "CounterHTOff": "0,1,2,3,4,5,6,7" 252 "CounterHTOff": "0,1,2,3,4,5,6,7"
253 }, 253 },
254 { 254 {
255 "EventCode": "0xC6", 255 "EventCode": "0xC6",
256 "UMask": "0x1", 256 "UMask": "0x1",
257 "BriefDescription": "Retired Instructions who experienced decode stream buffer (DSB - the decoded instruction-cache) miss.", 257 "BriefDescription": "Retired Instructions who experienced decode stream buffer (DSB - the decoded instruction-cache) miss. Precise Event.",
258 "PEBS": "1", 258 "PEBS": "1",
259 "MSRValue": "0x11", 259 "MSRValue": "0x11",
260 "Counter": "0,1,2,3", 260 "Counter": "0,1,2,3",
261 "EventName": "FRONTEND_RETIRED.DSB_MISS", 261 "EventName": "FRONTEND_RETIRED.DSB_MISS",
262 "MSRIndex": "0x3F7", 262 "MSRIndex": "0x3F7",
263 "PublicDescription": "Counts retired Instructions that experienced DSB (Decode stream buffer i.e. the decoded instruction-cache) miss. ", 263 "PublicDescription": "Counts retired Instructions that experienced DSB (Decode stream buffer i.e. the decoded instruction-cache) miss. \r\n",
264 "TakenAlone": "1", 264 "TakenAlone": "1",
265 "SampleAfterValue": "100007", 265 "SampleAfterValue": "100007",
266 "CounterHTOff": "0,1,2,3" 266 "CounterHTOff": "0,1,2,3"
@@ -268,7 +268,7 @@
268 { 268 {
269 "EventCode": "0xC6", 269 "EventCode": "0xC6",
270 "UMask": "0x1", 270 "UMask": "0x1",
271 "BriefDescription": "Retired Instructions who experienced Instruction L1 Cache true miss.", 271 "BriefDescription": "Retired Instructions who experienced Instruction L1 Cache true miss. Precise Event.",
272 "PEBS": "1", 272 "PEBS": "1",
273 "MSRValue": "0x12", 273 "MSRValue": "0x12",
274 "Counter": "0,1,2,3", 274 "Counter": "0,1,2,3",
@@ -281,7 +281,7 @@
281 { 281 {
282 "EventCode": "0xC6", 282 "EventCode": "0xC6",
283 "UMask": "0x1", 283 "UMask": "0x1",
284 "BriefDescription": "Retired Instructions who experienced Instruction L2 Cache true miss.", 284 "BriefDescription": "Retired Instructions who experienced Instruction L2 Cache true miss. Precise Event.",
285 "PEBS": "1", 285 "PEBS": "1",
286 "MSRValue": "0x13", 286 "MSRValue": "0x13",
287 "Counter": "0,1,2,3", 287 "Counter": "0,1,2,3",
@@ -294,7 +294,7 @@
294 { 294 {
295 "EventCode": "0xC6", 295 "EventCode": "0xC6",
296 "UMask": "0x1", 296 "UMask": "0x1",
297 "BriefDescription": "Retired Instructions who experienced iTLB true miss.", 297 "BriefDescription": "Retired Instructions who experienced iTLB true miss. Precise Event.",
298 "PEBS": "1", 298 "PEBS": "1",
299 "MSRValue": "0x14", 299 "MSRValue": "0x14",
300 "Counter": "0,1,2,3", 300 "Counter": "0,1,2,3",
@@ -308,13 +308,13 @@
308 { 308 {
309 "EventCode": "0xC6", 309 "EventCode": "0xC6",
310 "UMask": "0x1", 310 "UMask": "0x1",
311 "BriefDescription": "Retired Instructions who experienced STLB (2nd level TLB) true miss.", 311 "BriefDescription": "Retired Instructions who experienced STLB (2nd level TLB) true miss. Precise Event.",
312 "PEBS": "1", 312 "PEBS": "1",
313 "MSRValue": "0x15", 313 "MSRValue": "0x15",
314 "Counter": "0,1,2,3", 314 "Counter": "0,1,2,3",
315 "EventName": "FRONTEND_RETIRED.STLB_MISS", 315 "EventName": "FRONTEND_RETIRED.STLB_MISS",
316 "MSRIndex": "0x3F7", 316 "MSRIndex": "0x3F7",
317 "PublicDescription": "Counts retired Instructions that experienced STLB (2nd level TLB) true miss. ", 317 "PublicDescription": "Counts retired Instructions that experienced STLB (2nd level TLB) true miss.",
318 "TakenAlone": "1", 318 "TakenAlone": "1",
319 "SampleAfterValue": "100007", 319 "SampleAfterValue": "100007",
320 "CounterHTOff": "0,1,2,3" 320 "CounterHTOff": "0,1,2,3"
@@ -322,7 +322,7 @@
322 { 322 {
323 "EventCode": "0xC6", 323 "EventCode": "0xC6",
324 "UMask": "0x1", 324 "UMask": "0x1",
325 "BriefDescription": "Retired instructions that are fetched after an interval where the front-end delivered no uops for a period of 2 cycles which was not interrupted by a back-end stall.", 325 "BriefDescription": "Retired instructions that are fetched after an interval where the front-end delivered no uops for a period of 2 cycles which was not interrupted by a back-end stall. Precise Event.",
326 "PEBS": "1", 326 "PEBS": "1",
327 "MSRValue": "0x400206", 327 "MSRValue": "0x400206",
328 "Counter": "0,1,2,3", 328 "Counter": "0,1,2,3",
@@ -335,7 +335,7 @@
335 { 335 {
336 "EventCode": "0xC6", 336 "EventCode": "0xC6",
337 "UMask": "0x1", 337 "UMask": "0x1",
338 "BriefDescription": "Retired instructions that are fetched after an interval where the front-end had at least 2 bubble-slots for a period of 2 cycles which was not interrupted by a back-end stall.", 338 "BriefDescription": "Retired instructions that are fetched after an interval where the front-end had at least 2 bubble-slots for a period of 2 cycles which was not interrupted by a back-end stall. Precise Event.",
339 "PEBS": "1", 339 "PEBS": "1",
340 "MSRValue": "0x200206", 340 "MSRValue": "0x200206",
341 "Counter": "0,1,2,3", 341 "Counter": "0,1,2,3",
@@ -348,7 +348,7 @@
348 { 348 {
349 "EventCode": "0xC6", 349 "EventCode": "0xC6",
350 "UMask": "0x1", 350 "UMask": "0x1",
351 "BriefDescription": "Retired instructions that are fetched after an interval where the front-end delivered no uops for a period of 4 cycles which was not interrupted by a back-end stall.", 351 "BriefDescription": "Retired instructions that are fetched after an interval where the front-end delivered no uops for a period of 4 cycles which was not interrupted by a back-end stall. Precise Event.",
352 "PEBS": "1", 352 "PEBS": "1",
353 "MSRValue": "0x400406", 353 "MSRValue": "0x400406",
354 "Counter": "0,1,2,3", 354 "Counter": "0,1,2,3",
@@ -367,7 +367,7 @@
367 "Counter": "0,1,2,3", 367 "Counter": "0,1,2,3",
368 "EventName": "FRONTEND_RETIRED.LATENCY_GE_8", 368 "EventName": "FRONTEND_RETIRED.LATENCY_GE_8",
369 "MSRIndex": "0x3F7", 369 "MSRIndex": "0x3F7",
370 "PublicDescription": "Counts retired instructions that are delivered to the back-end after a front-end stall of at least 8 cycles. During this period the front-end delivered no uops.", 370 "PublicDescription": "Counts retired instructions that are delivered to the back-end after a front-end stall of at least 8 cycles. During this period the front-end delivered no uops. \r\n",
371 "TakenAlone": "1", 371 "TakenAlone": "1",
372 "SampleAfterValue": "100007", 372 "SampleAfterValue": "100007",
373 "CounterHTOff": "0,1,2,3" 373 "CounterHTOff": "0,1,2,3"
@@ -375,13 +375,13 @@
375 { 375 {
376 "EventCode": "0xC6", 376 "EventCode": "0xC6",
377 "UMask": "0x1", 377 "UMask": "0x1",
378 "BriefDescription": "Retired instructions that are fetched after an interval where the front-end delivered no uops for a period of 16 cycles which was not interrupted by a back-end stall.", 378 "BriefDescription": "Retired instructions that are fetched after an interval where the front-end delivered no uops for a period of 16 cycles which was not interrupted by a back-end stall. Precise Event.",
379 "PEBS": "1", 379 "PEBS": "1",
380 "MSRValue": "0x401006", 380 "MSRValue": "0x401006",
381 "Counter": "0,1,2,3", 381 "Counter": "0,1,2,3",
382 "EventName": "FRONTEND_RETIRED.LATENCY_GE_16", 382 "EventName": "FRONTEND_RETIRED.LATENCY_GE_16",
383 "MSRIndex": "0x3F7", 383 "MSRIndex": "0x3F7",
384 "PublicDescription": "Counts retired instructions that are delivered to the back-end after a front-end stall of at least 16 cycles. During this period the front-end delivered no uops.", 384 "PublicDescription": "Counts retired instructions that are delivered to the back-end after a front-end stall of at least 16 cycles. During this period the front-end delivered no uops.\r\n",
385 "TakenAlone": "1", 385 "TakenAlone": "1",
386 "SampleAfterValue": "100007", 386 "SampleAfterValue": "100007",
387 "CounterHTOff": "0,1,2,3" 387 "CounterHTOff": "0,1,2,3"
@@ -389,13 +389,13 @@
389 { 389 {
390 "EventCode": "0xC6", 390 "EventCode": "0xC6",
391 "UMask": "0x1", 391 "UMask": "0x1",
392 "BriefDescription": "Retired instructions that are fetched after an interval where the front-end delivered no uops for a period of 32 cycles which was not interrupted by a back-end stall.", 392 "BriefDescription": "Retired instructions that are fetched after an interval where the front-end delivered no uops for a period of 32 cycles which was not interrupted by a back-end stall. Precise Event.",
393 "PEBS": "1", 393 "PEBS": "1",
394 "MSRValue": "0x402006", 394 "MSRValue": "0x402006",
395 "Counter": "0,1,2,3", 395 "Counter": "0,1,2,3",
396 "EventName": "FRONTEND_RETIRED.LATENCY_GE_32", 396 "EventName": "FRONTEND_RETIRED.LATENCY_GE_32",
397 "MSRIndex": "0x3F7", 397 "MSRIndex": "0x3F7",
398 "PublicDescription": "Counts retired instructions that are delivered to the back-end after a front-end stall of at least 32 cycles. During this period the front-end delivered no uops.", 398 "PublicDescription": "Counts retired instructions that are delivered to the back-end after a front-end stall of at least 32 cycles. During this period the front-end delivered no uops.\r\n",
399 "TakenAlone": "1", 399 "TakenAlone": "1",
400 "SampleAfterValue": "100007", 400 "SampleAfterValue": "100007",
401 "CounterHTOff": "0,1,2,3" 401 "CounterHTOff": "0,1,2,3"
@@ -403,7 +403,7 @@
403 { 403 {
404 "EventCode": "0xC6", 404 "EventCode": "0xC6",
405 "UMask": "0x1", 405 "UMask": "0x1",
406 "BriefDescription": "Retired instructions that are fetched after an interval where the front-end delivered no uops for a period of 64 cycles which was not interrupted by a back-end stall.", 406 "BriefDescription": "Retired instructions that are fetched after an interval where the front-end delivered no uops for a period of 64 cycles which was not interrupted by a back-end stall. Precise Event.",
407 "PEBS": "1", 407 "PEBS": "1",
408 "MSRValue": "0x404006", 408 "MSRValue": "0x404006",
409 "Counter": "0,1,2,3", 409 "Counter": "0,1,2,3",
@@ -416,7 +416,7 @@
416 { 416 {
417 "EventCode": "0xC6", 417 "EventCode": "0xC6",
418 "UMask": "0x1", 418 "UMask": "0x1",
419 "BriefDescription": "Retired instructions that are fetched after an interval where the front-end delivered no uops for a period of 128 cycles which was not interrupted by a back-end stall.", 419 "BriefDescription": "Retired instructions that are fetched after an interval where the front-end delivered no uops for a period of 128 cycles which was not interrupted by a back-end stall. Precise Event.",
420 "PEBS": "1", 420 "PEBS": "1",
421 "MSRValue": "0x408006", 421 "MSRValue": "0x408006",
422 "Counter": "0,1,2,3", 422 "Counter": "0,1,2,3",
@@ -429,7 +429,7 @@
429 { 429 {
430 "EventCode": "0xC6", 430 "EventCode": "0xC6",
431 "UMask": "0x1", 431 "UMask": "0x1",
432 "BriefDescription": "Retired instructions that are fetched after an interval where the front-end delivered no uops for a period of 256 cycles which was not interrupted by a back-end stall.", 432 "BriefDescription": "Retired instructions that are fetched after an interval where the front-end delivered no uops for a period of 256 cycles which was not interrupted by a back-end stall. Precise Event.",
433 "PEBS": "1", 433 "PEBS": "1",
434 "MSRValue": "0x410006", 434 "MSRValue": "0x410006",
435 "Counter": "0,1,2,3", 435 "Counter": "0,1,2,3",
@@ -442,7 +442,7 @@
442 { 442 {
443 "EventCode": "0xC6", 443 "EventCode": "0xC6",
444 "UMask": "0x1", 444 "UMask": "0x1",
445 "BriefDescription": "Retired instructions that are fetched after an interval where the front-end delivered no uops for a period of 512 cycles which was not interrupted by a back-end stall.", 445 "BriefDescription": "Retired instructions that are fetched after an interval where the front-end delivered no uops for a period of 512 cycles which was not interrupted by a back-end stall. Precise Event.",
446 "PEBS": "1", 446 "PEBS": "1",
447 "MSRValue": "0x420006", 447 "MSRValue": "0x420006",
448 "Counter": "0,1,2,3", 448 "Counter": "0,1,2,3",
@@ -455,13 +455,13 @@
455 { 455 {
456 "EventCode": "0xC6", 456 "EventCode": "0xC6",
457 "UMask": "0x1", 457 "UMask": "0x1",
458 "BriefDescription": "Retired instructions that are fetched after an interval where the front-end had at least 1 bubble-slot for a period of 2 cycles which was not interrupted by a back-end stall.", 458 "BriefDescription": "Retired instructions that are fetched after an interval where the front-end had at least 1 bubble-slot for a period of 2 cycles which was not interrupted by a back-end stall. Precise Event.",
459 "PEBS": "1", 459 "PEBS": "1",
460 "MSRValue": "0x100206", 460 "MSRValue": "0x100206",
461 "Counter": "0,1,2,3", 461 "Counter": "0,1,2,3",
462 "EventName": "FRONTEND_RETIRED.LATENCY_GE_2_BUBBLES_GE_1", 462 "EventName": "FRONTEND_RETIRED.LATENCY_GE_2_BUBBLES_GE_1",
463 "MSRIndex": "0x3F7", 463 "MSRIndex": "0x3F7",
464 "PublicDescription": "Counts retired instructions that are delivered to the back-end after the front-end had at least 1 bubble-slot for a period of 2 cycles. A bubble-slot is an empty issue-pipeline slot while there was no RAT stall.", 464 "PublicDescription": "Counts retired instructions that are delivered to the back-end after the front-end had at least 1 bubble-slot for a period of 2 cycles. A bubble-slot is an empty issue-pipeline slot while there was no RAT stall.\r\n",
465 "TakenAlone": "1", 465 "TakenAlone": "1",
466 "SampleAfterValue": "100007", 466 "SampleAfterValue": "100007",
467 "CounterHTOff": "0,1,2,3" 467 "CounterHTOff": "0,1,2,3"
@@ -469,7 +469,7 @@
469 { 469 {
470 "EventCode": "0xC6", 470 "EventCode": "0xC6",
471 "UMask": "0x1", 471 "UMask": "0x1",
472 "BriefDescription": "Retired instructions that are fetched after an interval where the front-end had at least 3 bubble-slots for a period of 2 cycles which was not interrupted by a back-end stall.", 472 "BriefDescription": "Retired instructions that are fetched after an interval where the front-end had at least 3 bubble-slots for a period of 2 cycles which was not interrupted by a back-end stall. Precise Event.",
473 "PEBS": "1", 473 "PEBS": "1",
474 "MSRValue": "0x300206", 474 "MSRValue": "0x300206",
475 "Counter": "0,1,2,3", 475 "Counter": "0,1,2,3",
diff --git a/tools/perf/pmu-events/arch/x86/skylakex/memory.json b/tools/perf/pmu-events/arch/x86/skylakex/memory.json
index ca22a22c1abd..e7f1aa31226d 100644
--- a/tools/perf/pmu-events/arch/x86/skylakex/memory.json
+++ b/tools/perf/pmu-events/arch/x86/skylakex/memory.json
@@ -214,7 +214,7 @@
214 "PEBS": "1", 214 "PEBS": "1",
215 "Counter": "0,1,2,3", 215 "Counter": "0,1,2,3",
216 "EventName": "HLE_RETIRED.ABORTED", 216 "EventName": "HLE_RETIRED.ABORTED",
217 "PublicDescription": "Number of times HLE abort was triggered.", 217 "PublicDescription": "Number of times HLE abort was triggered. (PEBS)",
218 "SampleAfterValue": "2000003", 218 "SampleAfterValue": "2000003",
219 "CounterHTOff": "0,1,2,3,4,5,6,7" 219 "CounterHTOff": "0,1,2,3,4,5,6,7"
220 }, 220 },
@@ -239,10 +239,9 @@
239 { 239 {
240 "EventCode": "0xC8", 240 "EventCode": "0xC8",
241 "UMask": "0x20", 241 "UMask": "0x20",
242 "BriefDescription": "Number of times an HLE execution aborted due to HLE-unfriendly instructions and certain unfriendly events (such as AD assists etc.). ", 242 "BriefDescription": "Number of times an HLE execution aborted due to HLE-unfriendly instructions and certain unfriendly events (such as AD assists etc.).",
243 "Counter": "0,1,2,3", 243 "Counter": "0,1,2,3",
244 "EventName": "HLE_RETIRED.ABORTED_UNFRIENDLY", 244 "EventName": "HLE_RETIRED.ABORTED_UNFRIENDLY",
245 "PublicDescription": "Number of times an HLE execution aborted due to HLE-unfriendly instructions and certain unfriendly events (such as AD assists etc.).",
246 "SampleAfterValue": "2000003", 245 "SampleAfterValue": "2000003",
247 "CounterHTOff": "0,1,2,3,4,5,6,7" 246 "CounterHTOff": "0,1,2,3,4,5,6,7"
248 }, 247 },
@@ -292,7 +291,7 @@
292 "PEBS": "1", 291 "PEBS": "1",
293 "Counter": "0,1,2,3", 292 "Counter": "0,1,2,3",
294 "EventName": "RTM_RETIRED.ABORTED", 293 "EventName": "RTM_RETIRED.ABORTED",
295 "PublicDescription": "Number of times RTM abort was triggered.", 294 "PublicDescription": "Number of times RTM abort was triggered. (PEBS)",
296 "SampleAfterValue": "2000003", 295 "SampleAfterValue": "2000003",
297 "CounterHTOff": "0,1,2,3,4,5,6,7" 296 "CounterHTOff": "0,1,2,3,4,5,6,7"
298 }, 297 },
@@ -466,7 +465,7 @@
466 "Counter": "0,1,2,3", 465 "Counter": "0,1,2,3",
467 "EventName": "OFFCORE_RESPONSE.DEMAND_DATA_RD.L3_MISS.ANY_SNOOP", 466 "EventName": "OFFCORE_RESPONSE.DEMAND_DATA_RD.L3_MISS.ANY_SNOOP",
468 "MSRIndex": "0x1a6,0x1a7", 467 "MSRIndex": "0x1a6,0x1a7",
469 "PublicDescription": "Counts demand data reads that miss in the L3. ", 468 "PublicDescription": "Counts demand data reads that miss in the L3. Offcore response can be programmed only with a specific pair of event select and counter MSR, and with specific event codes and predefine mask bit value in a dedicated MSR to specify attributes of the offcore transaction.",
470 "SampleAfterValue": "100003", 469 "SampleAfterValue": "100003",
471 "CounterHTOff": "0,1,2,3" 470 "CounterHTOff": "0,1,2,3"
472 }, 471 },
@@ -479,7 +478,7 @@
479 "Counter": "0,1,2,3", 478 "Counter": "0,1,2,3",
480 "EventName": "OFFCORE_RESPONSE.DEMAND_DATA_RD.L3_MISS.REMOTE_HIT_FORWARD", 479 "EventName": "OFFCORE_RESPONSE.DEMAND_DATA_RD.L3_MISS.REMOTE_HIT_FORWARD",
481 "MSRIndex": "0x1a6,0x1a7", 480 "MSRIndex": "0x1a6,0x1a7",
482 "PublicDescription": "Counts demand data reads that miss the L3 and clean or shared data is transferred from remote cache. ", 481 "PublicDescription": "Counts demand data reads that miss the L3 and clean or shared data is transferred from remote cache. Offcore response can be programmed only with a specific pair of event select and counter MSR, and with specific event codes and predefine mask bit value in a dedicated MSR to specify attributes of the offcore transaction.",
483 "SampleAfterValue": "100003", 482 "SampleAfterValue": "100003",
484 "CounterHTOff": "0,1,2,3" 483 "CounterHTOff": "0,1,2,3"
485 }, 484 },
@@ -492,7 +491,7 @@
492 "Counter": "0,1,2,3", 491 "Counter": "0,1,2,3",
493 "EventName": "OFFCORE_RESPONSE.DEMAND_DATA_RD.L3_MISS.REMOTE_HITM", 492 "EventName": "OFFCORE_RESPONSE.DEMAND_DATA_RD.L3_MISS.REMOTE_HITM",
494 "MSRIndex": "0x1a6,0x1a7", 493 "MSRIndex": "0x1a6,0x1a7",
495 "PublicDescription": "Counts demand data reads that miss the L3 and the modified data is transferred from remote cache. ", 494 "PublicDescription": "Counts demand data reads that miss the L3 and the modified data is transferred from remote cache. Offcore response can be programmed only with a specific pair of event select and counter MSR, and with specific event codes and predefine mask bit value in a dedicated MSR to specify attributes of the offcore transaction.",
496 "SampleAfterValue": "100003", 495 "SampleAfterValue": "100003",
497 "CounterHTOff": "0,1,2,3" 496 "CounterHTOff": "0,1,2,3"
498 }, 497 },
@@ -505,7 +504,7 @@
505 "Counter": "0,1,2,3", 504 "Counter": "0,1,2,3",
506 "EventName": "OFFCORE_RESPONSE.DEMAND_DATA_RD.L3_MISS.SNOOP_MISS_OR_NO_FWD", 505 "EventName": "OFFCORE_RESPONSE.DEMAND_DATA_RD.L3_MISS.SNOOP_MISS_OR_NO_FWD",
507 "MSRIndex": "0x1a6,0x1a7", 506 "MSRIndex": "0x1a6,0x1a7",
508 "PublicDescription": "Counts demand data reads that miss the L3 and the data is returned from local or remote dram. ", 507 "PublicDescription": "Counts demand data reads that miss the L3 and the data is returned from local or remote dram. Offcore response can be programmed only with a specific pair of event select and counter MSR, and with specific event codes and predefine mask bit value in a dedicated MSR to specify attributes of the offcore transaction.",
509 "SampleAfterValue": "100003", 508 "SampleAfterValue": "100003",
510 "CounterHTOff": "0,1,2,3" 509 "CounterHTOff": "0,1,2,3"
511 }, 510 },
@@ -518,7 +517,7 @@
518 "Counter": "0,1,2,3", 517 "Counter": "0,1,2,3",
519 "EventName": "OFFCORE_RESPONSE.DEMAND_DATA_RD.L3_MISS_REMOTE_DRAM.SNOOP_MISS_OR_NO_FWD", 518 "EventName": "OFFCORE_RESPONSE.DEMAND_DATA_RD.L3_MISS_REMOTE_DRAM.SNOOP_MISS_OR_NO_FWD",
520 "MSRIndex": "0x1a6,0x1a7", 519 "MSRIndex": "0x1a6,0x1a7",
521 "PublicDescription": "Counts demand data reads that miss the L3 and the data is returned from remote dram. ", 520 "PublicDescription": "Counts demand data reads that miss the L3 and the data is returned from remote dram. Offcore response can be programmed only with a specific pair of event select and counter MSR, and with specific event codes and predefine mask bit value in a dedicated MSR to specify attributes of the offcore transaction.",
522 "SampleAfterValue": "100003", 521 "SampleAfterValue": "100003",
523 "CounterHTOff": "0,1,2,3" 522 "CounterHTOff": "0,1,2,3"
524 }, 523 },
@@ -531,7 +530,7 @@
531 "Counter": "0,1,2,3", 530 "Counter": "0,1,2,3",
532 "EventName": "OFFCORE_RESPONSE.DEMAND_DATA_RD.L3_MISS_LOCAL_DRAM.SNOOP_MISS_OR_NO_FWD", 531 "EventName": "OFFCORE_RESPONSE.DEMAND_DATA_RD.L3_MISS_LOCAL_DRAM.SNOOP_MISS_OR_NO_FWD",
533 "MSRIndex": "0x1a6,0x1a7", 532 "MSRIndex": "0x1a6,0x1a7",
534 "PublicDescription": "Counts demand data reads that miss the L3 and the data is returned from local dram. ", 533 "PublicDescription": "Counts demand data reads that miss the L3 and the data is returned from local dram. Offcore response can be programmed only with a specific pair of event select and counter MSR, and with specific event codes and predefine mask bit value in a dedicated MSR to specify attributes of the offcore transaction.",
535 "SampleAfterValue": "100003", 534 "SampleAfterValue": "100003",
536 "CounterHTOff": "0,1,2,3" 535 "CounterHTOff": "0,1,2,3"
537 }, 536 },
@@ -544,7 +543,7 @@
544 "Counter": "0,1,2,3", 543 "Counter": "0,1,2,3",
545 "EventName": "OFFCORE_RESPONSE.DEMAND_RFO.L3_MISS.ANY_SNOOP", 544 "EventName": "OFFCORE_RESPONSE.DEMAND_RFO.L3_MISS.ANY_SNOOP",
546 "MSRIndex": "0x1a6,0x1a7", 545 "MSRIndex": "0x1a6,0x1a7",
547 "PublicDescription": "Counts all demand data writes (RFOs) that miss in the L3. ", 546 "PublicDescription": "Counts all demand data writes (RFOs) that miss in the L3. Offcore response can be programmed only with a specific pair of event select and counter MSR, and with specific event codes and predefine mask bit value in a dedicated MSR to specify attributes of the offcore transaction.",
548 "SampleAfterValue": "100003", 547 "SampleAfterValue": "100003",
549 "CounterHTOff": "0,1,2,3" 548 "CounterHTOff": "0,1,2,3"
550 }, 549 },
@@ -557,7 +556,7 @@
557 "Counter": "0,1,2,3", 556 "Counter": "0,1,2,3",
558 "EventName": "OFFCORE_RESPONSE.DEMAND_RFO.L3_MISS.REMOTE_HIT_FORWARD", 557 "EventName": "OFFCORE_RESPONSE.DEMAND_RFO.L3_MISS.REMOTE_HIT_FORWARD",
559 "MSRIndex": "0x1a6,0x1a7", 558 "MSRIndex": "0x1a6,0x1a7",
560 "PublicDescription": "Counts all demand data writes (RFOs) that miss the L3 and clean or shared data is transferred from remote cache. ", 559 "PublicDescription": "Counts all demand data writes (RFOs) that miss the L3 and clean or shared data is transferred from remote cache. Offcore response can be programmed only with a specific pair of event select and counter MSR, and with specific event codes and predefine mask bit value in a dedicated MSR to specify attributes of the offcore transaction.",
561 "SampleAfterValue": "100003", 560 "SampleAfterValue": "100003",
562 "CounterHTOff": "0,1,2,3" 561 "CounterHTOff": "0,1,2,3"
563 }, 562 },
@@ -570,7 +569,7 @@
570 "Counter": "0,1,2,3", 569 "Counter": "0,1,2,3",
571 "EventName": "OFFCORE_RESPONSE.DEMAND_RFO.L3_MISS.REMOTE_HITM", 570 "EventName": "OFFCORE_RESPONSE.DEMAND_RFO.L3_MISS.REMOTE_HITM",
572 "MSRIndex": "0x1a6,0x1a7", 571 "MSRIndex": "0x1a6,0x1a7",
573 "PublicDescription": "Counts all demand data writes (RFOs) that miss the L3 and the modified data is transferred from remote cache. ", 572 "PublicDescription": "Counts all demand data writes (RFOs) that miss the L3 and the modified data is transferred from remote cache. Offcore response can be programmed only with a specific pair of event select and counter MSR, and with specific event codes and predefine mask bit value in a dedicated MSR to specify attributes of the offcore transaction.",
574 "SampleAfterValue": "100003", 573 "SampleAfterValue": "100003",
575 "CounterHTOff": "0,1,2,3" 574 "CounterHTOff": "0,1,2,3"
576 }, 575 },
@@ -583,7 +582,7 @@
583 "Counter": "0,1,2,3", 582 "Counter": "0,1,2,3",
584 "EventName": "OFFCORE_RESPONSE.DEMAND_RFO.L3_MISS.SNOOP_MISS_OR_NO_FWD", 583 "EventName": "OFFCORE_RESPONSE.DEMAND_RFO.L3_MISS.SNOOP_MISS_OR_NO_FWD",
585 "MSRIndex": "0x1a6,0x1a7", 584 "MSRIndex": "0x1a6,0x1a7",
586 "PublicDescription": "Counts all demand data writes (RFOs) that miss the L3 and the data is returned from local or remote dram. ", 585 "PublicDescription": "Counts all demand data writes (RFOs) that miss the L3 and the data is returned from local or remote dram. Offcore response can be programmed only with a specific pair of event select and counter MSR, and with specific event codes and predefine mask bit value in a dedicated MSR to specify attributes of the offcore transaction.",
587 "SampleAfterValue": "100003", 586 "SampleAfterValue": "100003",
588 "CounterHTOff": "0,1,2,3" 587 "CounterHTOff": "0,1,2,3"
589 }, 588 },
@@ -596,7 +595,7 @@
596 "Counter": "0,1,2,3", 595 "Counter": "0,1,2,3",
597 "EventName": "OFFCORE_RESPONSE.DEMAND_RFO.L3_MISS_REMOTE_DRAM.SNOOP_MISS_OR_NO_FWD", 596 "EventName": "OFFCORE_RESPONSE.DEMAND_RFO.L3_MISS_REMOTE_DRAM.SNOOP_MISS_OR_NO_FWD",
598 "MSRIndex": "0x1a6,0x1a7", 597 "MSRIndex": "0x1a6,0x1a7",
599 "PublicDescription": "Counts all demand data writes (RFOs) that miss the L3 and the data is returned from remote dram. ", 598 "PublicDescription": "Counts all demand data writes (RFOs) that miss the L3 and the data is returned from remote dram. Offcore response can be programmed only with a specific pair of event select and counter MSR, and with specific event codes and predefine mask bit value in a dedicated MSR to specify attributes of the offcore transaction.",
600 "SampleAfterValue": "100003", 599 "SampleAfterValue": "100003",
601 "CounterHTOff": "0,1,2,3" 600 "CounterHTOff": "0,1,2,3"
602 }, 601 },
@@ -609,7 +608,7 @@
609 "Counter": "0,1,2,3", 608 "Counter": "0,1,2,3",
610 "EventName": "OFFCORE_RESPONSE.DEMAND_RFO.L3_MISS_LOCAL_DRAM.SNOOP_MISS_OR_NO_FWD", 609 "EventName": "OFFCORE_RESPONSE.DEMAND_RFO.L3_MISS_LOCAL_DRAM.SNOOP_MISS_OR_NO_FWD",
611 "MSRIndex": "0x1a6,0x1a7", 610 "MSRIndex": "0x1a6,0x1a7",
612 "PublicDescription": "Counts all demand data writes (RFOs) that miss the L3 and the data is returned from local dram. ", 611 "PublicDescription": "Counts all demand data writes (RFOs) that miss the L3 and the data is returned from local dram. Offcore response can be programmed only with a specific pair of event select and counter MSR, and with specific event codes and predefine mask bit value in a dedicated MSR to specify attributes of the offcore transaction.",
613 "SampleAfterValue": "100003", 612 "SampleAfterValue": "100003",
614 "CounterHTOff": "0,1,2,3" 613 "CounterHTOff": "0,1,2,3"
615 }, 614 },
@@ -622,7 +621,7 @@
622 "Counter": "0,1,2,3", 621 "Counter": "0,1,2,3",
623 "EventName": "OFFCORE_RESPONSE.DEMAND_CODE_RD.L3_MISS.ANY_SNOOP", 622 "EventName": "OFFCORE_RESPONSE.DEMAND_CODE_RD.L3_MISS.ANY_SNOOP",
624 "MSRIndex": "0x1a6,0x1a7", 623 "MSRIndex": "0x1a6,0x1a7",
625 "PublicDescription": "Counts all demand code reads that miss in the L3. ", 624 "PublicDescription": "Counts all demand code reads that miss in the L3. Offcore response can be programmed only with a specific pair of event select and counter MSR, and with specific event codes and predefine mask bit value in a dedicated MSR to specify attributes of the offcore transaction.",
626 "SampleAfterValue": "100003", 625 "SampleAfterValue": "100003",
627 "CounterHTOff": "0,1,2,3" 626 "CounterHTOff": "0,1,2,3"
628 }, 627 },
@@ -635,7 +634,7 @@
635 "Counter": "0,1,2,3", 634 "Counter": "0,1,2,3",
636 "EventName": "OFFCORE_RESPONSE.DEMAND_CODE_RD.L3_MISS.REMOTE_HIT_FORWARD", 635 "EventName": "OFFCORE_RESPONSE.DEMAND_CODE_RD.L3_MISS.REMOTE_HIT_FORWARD",
637 "MSRIndex": "0x1a6,0x1a7", 636 "MSRIndex": "0x1a6,0x1a7",
638 "PublicDescription": "Counts all demand code reads that miss the L3 and clean or shared data is transferred from remote cache. ", 637 "PublicDescription": "Counts all demand code reads that miss the L3 and clean or shared data is transferred from remote cache. Offcore response can be programmed only with a specific pair of event select and counter MSR, and with specific event codes and predefine mask bit value in a dedicated MSR to specify attributes of the offcore transaction.",
639 "SampleAfterValue": "100003", 638 "SampleAfterValue": "100003",
640 "CounterHTOff": "0,1,2,3" 639 "CounterHTOff": "0,1,2,3"
641 }, 640 },
@@ -648,7 +647,7 @@
648 "Counter": "0,1,2,3", 647 "Counter": "0,1,2,3",
649 "EventName": "OFFCORE_RESPONSE.DEMAND_CODE_RD.L3_MISS.REMOTE_HITM", 648 "EventName": "OFFCORE_RESPONSE.DEMAND_CODE_RD.L3_MISS.REMOTE_HITM",
650 "MSRIndex": "0x1a6,0x1a7", 649 "MSRIndex": "0x1a6,0x1a7",
651 "PublicDescription": "Counts all demand code reads that miss the L3 and the modified data is transferred from remote cache. ", 650 "PublicDescription": "Counts all demand code reads that miss the L3 and the modified data is transferred from remote cache. Offcore response can be programmed only with a specific pair of event select and counter MSR, and with specific event codes and predefine mask bit value in a dedicated MSR to specify attributes of the offcore transaction.",
652 "SampleAfterValue": "100003", 651 "SampleAfterValue": "100003",
653 "CounterHTOff": "0,1,2,3" 652 "CounterHTOff": "0,1,2,3"
654 }, 653 },
@@ -661,7 +660,7 @@
661 "Counter": "0,1,2,3", 660 "Counter": "0,1,2,3",
662 "EventName": "OFFCORE_RESPONSE.DEMAND_CODE_RD.L3_MISS.SNOOP_MISS_OR_NO_FWD", 661 "EventName": "OFFCORE_RESPONSE.DEMAND_CODE_RD.L3_MISS.SNOOP_MISS_OR_NO_FWD",
663 "MSRIndex": "0x1a6,0x1a7", 662 "MSRIndex": "0x1a6,0x1a7",
664 "PublicDescription": "Counts all demand code reads that miss the L3 and the data is returned from local or remote dram. ", 663 "PublicDescription": "Counts all demand code reads that miss the L3 and the data is returned from local or remote dram. Offcore response can be programmed only with a specific pair of event select and counter MSR, and with specific event codes and predefine mask bit value in a dedicated MSR to specify attributes of the offcore transaction.",
665 "SampleAfterValue": "100003", 664 "SampleAfterValue": "100003",
666 "CounterHTOff": "0,1,2,3" 665 "CounterHTOff": "0,1,2,3"
667 }, 666 },
@@ -674,7 +673,7 @@
674 "Counter": "0,1,2,3", 673 "Counter": "0,1,2,3",
675 "EventName": "OFFCORE_RESPONSE.DEMAND_CODE_RD.L3_MISS_REMOTE_DRAM.SNOOP_MISS_OR_NO_FWD", 674 "EventName": "OFFCORE_RESPONSE.DEMAND_CODE_RD.L3_MISS_REMOTE_DRAM.SNOOP_MISS_OR_NO_FWD",
676 "MSRIndex": "0x1a6,0x1a7", 675 "MSRIndex": "0x1a6,0x1a7",
677 "PublicDescription": "Counts all demand code reads that miss the L3 and the data is returned from remote dram. ", 676 "PublicDescription": "Counts all demand code reads that miss the L3 and the data is returned from remote dram. Offcore response can be programmed only with a specific pair of event select and counter MSR, and with specific event codes and predefine mask bit value in a dedicated MSR to specify attributes of the offcore transaction.",
678 "SampleAfterValue": "100003", 677 "SampleAfterValue": "100003",
679 "CounterHTOff": "0,1,2,3" 678 "CounterHTOff": "0,1,2,3"
680 }, 679 },
@@ -687,7 +686,7 @@
687 "Counter": "0,1,2,3", 686 "Counter": "0,1,2,3",
688 "EventName": "OFFCORE_RESPONSE.DEMAND_CODE_RD.L3_MISS_LOCAL_DRAM.SNOOP_MISS_OR_NO_FWD", 687 "EventName": "OFFCORE_RESPONSE.DEMAND_CODE_RD.L3_MISS_LOCAL_DRAM.SNOOP_MISS_OR_NO_FWD",
689 "MSRIndex": "0x1a6,0x1a7", 688 "MSRIndex": "0x1a6,0x1a7",
690 "PublicDescription": "Counts all demand code reads that miss the L3 and the data is returned from local dram. ", 689 "PublicDescription": "Counts all demand code reads that miss the L3 and the data is returned from local dram. Offcore response can be programmed only with a specific pair of event select and counter MSR, and with specific event codes and predefine mask bit value in a dedicated MSR to specify attributes of the offcore transaction.",
691 "SampleAfterValue": "100003", 690 "SampleAfterValue": "100003",
692 "CounterHTOff": "0,1,2,3" 691 "CounterHTOff": "0,1,2,3"
693 }, 692 },
@@ -700,7 +699,7 @@
700 "Counter": "0,1,2,3", 699 "Counter": "0,1,2,3",
701 "EventName": "OFFCORE_RESPONSE.PF_L2_DATA_RD.L3_MISS.ANY_SNOOP", 700 "EventName": "OFFCORE_RESPONSE.PF_L2_DATA_RD.L3_MISS.ANY_SNOOP",
702 "MSRIndex": "0x1a6,0x1a7", 701 "MSRIndex": "0x1a6,0x1a7",
703 "PublicDescription": "Counts prefetch (that bring data to L2) data reads that miss in the L3. ", 702 "PublicDescription": "Counts prefetch (that bring data to L2) data reads that miss in the L3. Offcore response can be programmed only with a specific pair of event select and counter MSR, and with specific event codes and predefine mask bit value in a dedicated MSR to specify attributes of the offcore transaction.",
704 "SampleAfterValue": "100003", 703 "SampleAfterValue": "100003",
705 "CounterHTOff": "0,1,2,3" 704 "CounterHTOff": "0,1,2,3"
706 }, 705 },
@@ -713,7 +712,7 @@
713 "Counter": "0,1,2,3", 712 "Counter": "0,1,2,3",
714 "EventName": "OFFCORE_RESPONSE.PF_L2_DATA_RD.L3_MISS.REMOTE_HIT_FORWARD", 713 "EventName": "OFFCORE_RESPONSE.PF_L2_DATA_RD.L3_MISS.REMOTE_HIT_FORWARD",
715 "MSRIndex": "0x1a6,0x1a7", 714 "MSRIndex": "0x1a6,0x1a7",
716 "PublicDescription": "Counts prefetch (that bring data to L2) data reads that miss the L3 and clean or shared data is transferred from remote cache. ", 715 "PublicDescription": "Counts prefetch (that bring data to L2) data reads that miss the L3 and clean or shared data is transferred from remote cache. Offcore response can be programmed only with a specific pair of event select and counter MSR, and with specific event codes and predefine mask bit value in a dedicated MSR to specify attributes of the offcore transaction.",
717 "SampleAfterValue": "100003", 716 "SampleAfterValue": "100003",
718 "CounterHTOff": "0,1,2,3" 717 "CounterHTOff": "0,1,2,3"
719 }, 718 },
@@ -726,7 +725,7 @@
726 "Counter": "0,1,2,3", 725 "Counter": "0,1,2,3",
727 "EventName": "OFFCORE_RESPONSE.PF_L2_DATA_RD.L3_MISS.REMOTE_HITM", 726 "EventName": "OFFCORE_RESPONSE.PF_L2_DATA_RD.L3_MISS.REMOTE_HITM",
728 "MSRIndex": "0x1a6,0x1a7", 727 "MSRIndex": "0x1a6,0x1a7",
729 "PublicDescription": "Counts prefetch (that bring data to L2) data reads that miss the L3 and the modified data is transferred from remote cache. ", 728 "PublicDescription": "Counts prefetch (that bring data to L2) data reads that miss the L3 and the modified data is transferred from remote cache. Offcore response can be programmed only with a specific pair of event select and counter MSR, and with specific event codes and predefine mask bit value in a dedicated MSR to specify attributes of the offcore transaction.",
730 "SampleAfterValue": "100003", 729 "SampleAfterValue": "100003",
731 "CounterHTOff": "0,1,2,3" 730 "CounterHTOff": "0,1,2,3"
732 }, 731 },
@@ -739,7 +738,7 @@
739 "Counter": "0,1,2,3", 738 "Counter": "0,1,2,3",
740 "EventName": "OFFCORE_RESPONSE.PF_L2_DATA_RD.L3_MISS.SNOOP_MISS_OR_NO_FWD", 739 "EventName": "OFFCORE_RESPONSE.PF_L2_DATA_RD.L3_MISS.SNOOP_MISS_OR_NO_FWD",
741 "MSRIndex": "0x1a6,0x1a7", 740 "MSRIndex": "0x1a6,0x1a7",
742 "PublicDescription": "Counts prefetch (that bring data to L2) data reads that miss the L3 and the data is returned from local or remote dram. ", 741 "PublicDescription": "Counts prefetch (that bring data to L2) data reads that miss the L3 and the data is returned from local or remote dram. Offcore response can be programmed only with a specific pair of event select and counter MSR, and with specific event codes and predefine mask bit value in a dedicated MSR to specify attributes of the offcore transaction.",
743 "SampleAfterValue": "100003", 742 "SampleAfterValue": "100003",
744 "CounterHTOff": "0,1,2,3" 743 "CounterHTOff": "0,1,2,3"
745 }, 744 },
@@ -752,7 +751,7 @@
752 "Counter": "0,1,2,3", 751 "Counter": "0,1,2,3",
753 "EventName": "OFFCORE_RESPONSE.PF_L2_DATA_RD.L3_MISS_REMOTE_DRAM.SNOOP_MISS_OR_NO_FWD", 752 "EventName": "OFFCORE_RESPONSE.PF_L2_DATA_RD.L3_MISS_REMOTE_DRAM.SNOOP_MISS_OR_NO_FWD",
754 "MSRIndex": "0x1a6,0x1a7", 753 "MSRIndex": "0x1a6,0x1a7",
755 "PublicDescription": "Counts prefetch (that bring data to L2) data reads that miss the L3 and the data is returned from remote dram. ", 754 "PublicDescription": "Counts prefetch (that bring data to L2) data reads that miss the L3 and the data is returned from remote dram. Offcore response can be programmed only with a specific pair of event select and counter MSR, and with specific event codes and predefine mask bit value in a dedicated MSR to specify attributes of the offcore transaction.",
756 "SampleAfterValue": "100003", 755 "SampleAfterValue": "100003",
757 "CounterHTOff": "0,1,2,3" 756 "CounterHTOff": "0,1,2,3"
758 }, 757 },
@@ -765,7 +764,7 @@
765 "Counter": "0,1,2,3", 764 "Counter": "0,1,2,3",
766 "EventName": "OFFCORE_RESPONSE.PF_L2_DATA_RD.L3_MISS_LOCAL_DRAM.SNOOP_MISS_OR_NO_FWD", 765 "EventName": "OFFCORE_RESPONSE.PF_L2_DATA_RD.L3_MISS_LOCAL_DRAM.SNOOP_MISS_OR_NO_FWD",
767 "MSRIndex": "0x1a6,0x1a7", 766 "MSRIndex": "0x1a6,0x1a7",
768 "PublicDescription": "Counts prefetch (that bring data to L2) data reads that miss the L3 and the data is returned from local dram. ", 767 "PublicDescription": "Counts prefetch (that bring data to L2) data reads that miss the L3 and the data is returned from local dram. Offcore response can be programmed only with a specific pair of event select and counter MSR, and with specific event codes and predefine mask bit value in a dedicated MSR to specify attributes of the offcore transaction.",
769 "SampleAfterValue": "100003", 768 "SampleAfterValue": "100003",
770 "CounterHTOff": "0,1,2,3" 769 "CounterHTOff": "0,1,2,3"
771 }, 770 },
@@ -778,7 +777,7 @@
778 "Counter": "0,1,2,3", 777 "Counter": "0,1,2,3",
779 "EventName": "OFFCORE_RESPONSE.PF_L2_RFO.L3_MISS.ANY_SNOOP", 778 "EventName": "OFFCORE_RESPONSE.PF_L2_RFO.L3_MISS.ANY_SNOOP",
780 "MSRIndex": "0x1a6,0x1a7", 779 "MSRIndex": "0x1a6,0x1a7",
781 "PublicDescription": "Counts all prefetch (that bring data to L2) RFOs that miss in the L3. ", 780 "PublicDescription": "Counts all prefetch (that bring data to L2) RFOs that miss in the L3. Offcore response can be programmed only with a specific pair of event select and counter MSR, and with specific event codes and predefine mask bit value in a dedicated MSR to specify attributes of the offcore transaction.",
782 "SampleAfterValue": "100003", 781 "SampleAfterValue": "100003",
783 "CounterHTOff": "0,1,2,3" 782 "CounterHTOff": "0,1,2,3"
784 }, 783 },
@@ -791,7 +790,7 @@
791 "Counter": "0,1,2,3", 790 "Counter": "0,1,2,3",
792 "EventName": "OFFCORE_RESPONSE.PF_L2_RFO.L3_MISS.REMOTE_HIT_FORWARD", 791 "EventName": "OFFCORE_RESPONSE.PF_L2_RFO.L3_MISS.REMOTE_HIT_FORWARD",
793 "MSRIndex": "0x1a6,0x1a7", 792 "MSRIndex": "0x1a6,0x1a7",
794 "PublicDescription": "Counts all prefetch (that bring data to L2) RFOs that miss the L3 and clean or shared data is transferred from remote cache. ", 793 "PublicDescription": "Counts all prefetch (that bring data to L2) RFOs that miss the L3 and clean or shared data is transferred from remote cache. Offcore response can be programmed only with a specific pair of event select and counter MSR, and with specific event codes and predefine mask bit value in a dedicated MSR to specify attributes of the offcore transaction.",
795 "SampleAfterValue": "100003", 794 "SampleAfterValue": "100003",
796 "CounterHTOff": "0,1,2,3" 795 "CounterHTOff": "0,1,2,3"
797 }, 796 },
@@ -804,7 +803,7 @@
804 "Counter": "0,1,2,3", 803 "Counter": "0,1,2,3",
805 "EventName": "OFFCORE_RESPONSE.PF_L2_RFO.L3_MISS.REMOTE_HITM", 804 "EventName": "OFFCORE_RESPONSE.PF_L2_RFO.L3_MISS.REMOTE_HITM",
806 "MSRIndex": "0x1a6,0x1a7", 805 "MSRIndex": "0x1a6,0x1a7",
807 "PublicDescription": "Counts all prefetch (that bring data to L2) RFOs that miss the L3 and the modified data is transferred from remote cache. ", 806 "PublicDescription": "Counts all prefetch (that bring data to L2) RFOs that miss the L3 and the modified data is transferred from remote cache. Offcore response can be programmed only with a specific pair of event select and counter MSR, and with specific event codes and predefine mask bit value in a dedicated MSR to specify attributes of the offcore transaction.",
808 "SampleAfterValue": "100003", 807 "SampleAfterValue": "100003",
809 "CounterHTOff": "0,1,2,3" 808 "CounterHTOff": "0,1,2,3"
810 }, 809 },
@@ -817,7 +816,7 @@
817 "Counter": "0,1,2,3", 816 "Counter": "0,1,2,3",
818 "EventName": "OFFCORE_RESPONSE.PF_L2_RFO.L3_MISS.SNOOP_MISS_OR_NO_FWD", 817 "EventName": "OFFCORE_RESPONSE.PF_L2_RFO.L3_MISS.SNOOP_MISS_OR_NO_FWD",
819 "MSRIndex": "0x1a6,0x1a7", 818 "MSRIndex": "0x1a6,0x1a7",
820 "PublicDescription": "Counts all prefetch (that bring data to L2) RFOs that miss the L3 and the data is returned from local or remote dram. ", 819 "PublicDescription": "Counts all prefetch (that bring data to L2) RFOs that miss the L3 and the data is returned from local or remote dram. Offcore response can be programmed only with a specific pair of event select and counter MSR, and with specific event codes and predefine mask bit value in a dedicated MSR to specify attributes of the offcore transaction.",
821 "SampleAfterValue": "100003", 820 "SampleAfterValue": "100003",
822 "CounterHTOff": "0,1,2,3" 821 "CounterHTOff": "0,1,2,3"
823 }, 822 },
@@ -830,7 +829,7 @@
830 "Counter": "0,1,2,3", 829 "Counter": "0,1,2,3",
831 "EventName": "OFFCORE_RESPONSE.PF_L2_RFO.L3_MISS_REMOTE_DRAM.SNOOP_MISS_OR_NO_FWD", 830 "EventName": "OFFCORE_RESPONSE.PF_L2_RFO.L3_MISS_REMOTE_DRAM.SNOOP_MISS_OR_NO_FWD",
832 "MSRIndex": "0x1a6,0x1a7", 831 "MSRIndex": "0x1a6,0x1a7",
833 "PublicDescription": "Counts all prefetch (that bring data to L2) RFOs that miss the L3 and the data is returned from remote dram. ", 832 "PublicDescription": "Counts all prefetch (that bring data to L2) RFOs that miss the L3 and the data is returned from remote dram. Offcore response can be programmed only with a specific pair of event select and counter MSR, and with specific event codes and predefine mask bit value in a dedicated MSR to specify attributes of the offcore transaction.",
834 "SampleAfterValue": "100003", 833 "SampleAfterValue": "100003",
835 "CounterHTOff": "0,1,2,3" 834 "CounterHTOff": "0,1,2,3"
836 }, 835 },
@@ -843,7 +842,7 @@
843 "Counter": "0,1,2,3", 842 "Counter": "0,1,2,3",
844 "EventName": "OFFCORE_RESPONSE.PF_L2_RFO.L3_MISS_LOCAL_DRAM.SNOOP_MISS_OR_NO_FWD", 843 "EventName": "OFFCORE_RESPONSE.PF_L2_RFO.L3_MISS_LOCAL_DRAM.SNOOP_MISS_OR_NO_FWD",
845 "MSRIndex": "0x1a6,0x1a7", 844 "MSRIndex": "0x1a6,0x1a7",
846 "PublicDescription": "Counts all prefetch (that bring data to L2) RFOs that miss the L3 and the data is returned from local dram. ", 845 "PublicDescription": "Counts all prefetch (that bring data to L2) RFOs that miss the L3 and the data is returned from local dram. Offcore response can be programmed only with a specific pair of event select and counter MSR, and with specific event codes and predefine mask bit value in a dedicated MSR to specify attributes of the offcore transaction.",
847 "SampleAfterValue": "100003", 846 "SampleAfterValue": "100003",
848 "CounterHTOff": "0,1,2,3" 847 "CounterHTOff": "0,1,2,3"
849 }, 848 },
@@ -856,7 +855,7 @@
856 "Counter": "0,1,2,3", 855 "Counter": "0,1,2,3",
857 "EventName": "OFFCORE_RESPONSE.PF_L3_DATA_RD.L3_MISS.ANY_SNOOP", 856 "EventName": "OFFCORE_RESPONSE.PF_L3_DATA_RD.L3_MISS.ANY_SNOOP",
858 "MSRIndex": "0x1a6,0x1a7", 857 "MSRIndex": "0x1a6,0x1a7",
859 "PublicDescription": "Counts all prefetch (that bring data to LLC only) data reads that miss in the L3. ", 858 "PublicDescription": "Counts all prefetch (that bring data to LLC only) data reads that miss in the L3. Offcore response can be programmed only with a specific pair of event select and counter MSR, and with specific event codes and predefine mask bit value in a dedicated MSR to specify attributes of the offcore transaction.",
860 "SampleAfterValue": "100003", 859 "SampleAfterValue": "100003",
861 "CounterHTOff": "0,1,2,3" 860 "CounterHTOff": "0,1,2,3"
862 }, 861 },
@@ -869,7 +868,7 @@
869 "Counter": "0,1,2,3", 868 "Counter": "0,1,2,3",
870 "EventName": "OFFCORE_RESPONSE.PF_L3_DATA_RD.L3_MISS.REMOTE_HIT_FORWARD", 869 "EventName": "OFFCORE_RESPONSE.PF_L3_DATA_RD.L3_MISS.REMOTE_HIT_FORWARD",
871 "MSRIndex": "0x1a6,0x1a7", 870 "MSRIndex": "0x1a6,0x1a7",
872 "PublicDescription": "Counts all prefetch (that bring data to LLC only) data reads that miss the L3 and clean or shared data is transferred from remote cache. ", 871 "PublicDescription": "Counts all prefetch (that bring data to LLC only) data reads that miss the L3 and clean or shared data is transferred from remote cache. Offcore response can be programmed only with a specific pair of event select and counter MSR, and with specific event codes and predefine mask bit value in a dedicated MSR to specify attributes of the offcore transaction.",
873 "SampleAfterValue": "100003", 872 "SampleAfterValue": "100003",
874 "CounterHTOff": "0,1,2,3" 873 "CounterHTOff": "0,1,2,3"
875 }, 874 },
@@ -882,7 +881,7 @@
882 "Counter": "0,1,2,3", 881 "Counter": "0,1,2,3",
883 "EventName": "OFFCORE_RESPONSE.PF_L3_DATA_RD.L3_MISS.REMOTE_HITM", 882 "EventName": "OFFCORE_RESPONSE.PF_L3_DATA_RD.L3_MISS.REMOTE_HITM",
884 "MSRIndex": "0x1a6,0x1a7", 883 "MSRIndex": "0x1a6,0x1a7",
885 "PublicDescription": "Counts all prefetch (that bring data to LLC only) data reads that miss the L3 and the modified data is transferred from remote cache. ", 884 "PublicDescription": "Counts all prefetch (that bring data to LLC only) data reads that miss the L3 and the modified data is transferred from remote cache. Offcore response can be programmed only with a specific pair of event select and counter MSR, and with specific event codes and predefine mask bit value in a dedicated MSR to specify attributes of the offcore transaction.",
886 "SampleAfterValue": "100003", 885 "SampleAfterValue": "100003",
887 "CounterHTOff": "0,1,2,3" 886 "CounterHTOff": "0,1,2,3"
888 }, 887 },
@@ -895,7 +894,7 @@
895 "Counter": "0,1,2,3", 894 "Counter": "0,1,2,3",
896 "EventName": "OFFCORE_RESPONSE.PF_L3_DATA_RD.L3_MISS.SNOOP_MISS_OR_NO_FWD", 895 "EventName": "OFFCORE_RESPONSE.PF_L3_DATA_RD.L3_MISS.SNOOP_MISS_OR_NO_FWD",
897 "MSRIndex": "0x1a6,0x1a7", 896 "MSRIndex": "0x1a6,0x1a7",
898 "PublicDescription": "Counts all prefetch (that bring data to LLC only) data reads that miss the L3 and the data is returned from local or remote dram. ", 897 "PublicDescription": "Counts all prefetch (that bring data to LLC only) data reads that miss the L3 and the data is returned from local or remote dram. Offcore response can be programmed only with a specific pair of event select and counter MSR, and with specific event codes and predefine mask bit value in a dedicated MSR to specify attributes of the offcore transaction.",
899 "SampleAfterValue": "100003", 898 "SampleAfterValue": "100003",
900 "CounterHTOff": "0,1,2,3" 899 "CounterHTOff": "0,1,2,3"
901 }, 900 },
@@ -908,7 +907,7 @@
908 "Counter": "0,1,2,3", 907 "Counter": "0,1,2,3",
909 "EventName": "OFFCORE_RESPONSE.PF_L3_DATA_RD.L3_MISS_REMOTE_DRAM.SNOOP_MISS_OR_NO_FWD", 908 "EventName": "OFFCORE_RESPONSE.PF_L3_DATA_RD.L3_MISS_REMOTE_DRAM.SNOOP_MISS_OR_NO_FWD",
910 "MSRIndex": "0x1a6,0x1a7", 909 "MSRIndex": "0x1a6,0x1a7",
911 "PublicDescription": "Counts all prefetch (that bring data to LLC only) data reads that miss the L3 and the data is returned from remote dram. ", 910 "PublicDescription": "Counts all prefetch (that bring data to LLC only) data reads that miss the L3 and the data is returned from remote dram. Offcore response can be programmed only with a specific pair of event select and counter MSR, and with specific event codes and predefine mask bit value in a dedicated MSR to specify attributes of the offcore transaction.",
912 "SampleAfterValue": "100003", 911 "SampleAfterValue": "100003",
913 "CounterHTOff": "0,1,2,3" 912 "CounterHTOff": "0,1,2,3"
914 }, 913 },
@@ -921,7 +920,7 @@
921 "Counter": "0,1,2,3", 920 "Counter": "0,1,2,3",
922 "EventName": "OFFCORE_RESPONSE.PF_L3_DATA_RD.L3_MISS_LOCAL_DRAM.SNOOP_MISS_OR_NO_FWD", 921 "EventName": "OFFCORE_RESPONSE.PF_L3_DATA_RD.L3_MISS_LOCAL_DRAM.SNOOP_MISS_OR_NO_FWD",
923 "MSRIndex": "0x1a6,0x1a7", 922 "MSRIndex": "0x1a6,0x1a7",
924 "PublicDescription": "Counts all prefetch (that bring data to LLC only) data reads that miss the L3 and the data is returned from local dram. ", 923 "PublicDescription": "Counts all prefetch (that bring data to LLC only) data reads that miss the L3 and the data is returned from local dram. Offcore response can be programmed only with a specific pair of event select and counter MSR, and with specific event codes and predefine mask bit value in a dedicated MSR to specify attributes of the offcore transaction.",
925 "SampleAfterValue": "100003", 924 "SampleAfterValue": "100003",
926 "CounterHTOff": "0,1,2,3" 925 "CounterHTOff": "0,1,2,3"
927 }, 926 },
@@ -934,7 +933,7 @@
934 "Counter": "0,1,2,3", 933 "Counter": "0,1,2,3",
935 "EventName": "OFFCORE_RESPONSE.PF_L3_RFO.L3_MISS.ANY_SNOOP", 934 "EventName": "OFFCORE_RESPONSE.PF_L3_RFO.L3_MISS.ANY_SNOOP",
936 "MSRIndex": "0x1a6,0x1a7", 935 "MSRIndex": "0x1a6,0x1a7",
937 "PublicDescription": "Counts all prefetch (that bring data to LLC only) RFOs that miss in the L3. ", 936 "PublicDescription": "Counts all prefetch (that bring data to LLC only) RFOs that miss in the L3. Offcore response can be programmed only with a specific pair of event select and counter MSR, and with specific event codes and predefine mask bit value in a dedicated MSR to specify attributes of the offcore transaction.",
938 "SampleAfterValue": "100003", 937 "SampleAfterValue": "100003",
939 "CounterHTOff": "0,1,2,3" 938 "CounterHTOff": "0,1,2,3"
940 }, 939 },
@@ -947,7 +946,7 @@
947 "Counter": "0,1,2,3", 946 "Counter": "0,1,2,3",
948 "EventName": "OFFCORE_RESPONSE.PF_L3_RFO.L3_MISS.REMOTE_HIT_FORWARD", 947 "EventName": "OFFCORE_RESPONSE.PF_L3_RFO.L3_MISS.REMOTE_HIT_FORWARD",
949 "MSRIndex": "0x1a6,0x1a7", 948 "MSRIndex": "0x1a6,0x1a7",
950 "PublicDescription": "Counts all prefetch (that bring data to LLC only) RFOs that miss the L3 and clean or shared data is transferred from remote cache. ", 949 "PublicDescription": "Counts all prefetch (that bring data to LLC only) RFOs that miss the L3 and clean or shared data is transferred from remote cache. Offcore response can be programmed only with a specific pair of event select and counter MSR, and with specific event codes and predefine mask bit value in a dedicated MSR to specify attributes of the offcore transaction.",
951 "SampleAfterValue": "100003", 950 "SampleAfterValue": "100003",
952 "CounterHTOff": "0,1,2,3" 951 "CounterHTOff": "0,1,2,3"
953 }, 952 },
@@ -960,7 +959,7 @@
960 "Counter": "0,1,2,3", 959 "Counter": "0,1,2,3",
961 "EventName": "OFFCORE_RESPONSE.PF_L3_RFO.L3_MISS.REMOTE_HITM", 960 "EventName": "OFFCORE_RESPONSE.PF_L3_RFO.L3_MISS.REMOTE_HITM",
962 "MSRIndex": "0x1a6,0x1a7", 961 "MSRIndex": "0x1a6,0x1a7",
963 "PublicDescription": "Counts all prefetch (that bring data to LLC only) RFOs that miss the L3 and the modified data is transferred from remote cache. ", 962 "PublicDescription": "Counts all prefetch (that bring data to LLC only) RFOs that miss the L3 and the modified data is transferred from remote cache. Offcore response can be programmed only with a specific pair of event select and counter MSR, and with specific event codes and predefine mask bit value in a dedicated MSR to specify attributes of the offcore transaction.",
964 "SampleAfterValue": "100003", 963 "SampleAfterValue": "100003",
965 "CounterHTOff": "0,1,2,3" 964 "CounterHTOff": "0,1,2,3"
966 }, 965 },
@@ -973,7 +972,7 @@
973 "Counter": "0,1,2,3", 972 "Counter": "0,1,2,3",
974 "EventName": "OFFCORE_RESPONSE.PF_L3_RFO.L3_MISS.SNOOP_MISS_OR_NO_FWD", 973 "EventName": "OFFCORE_RESPONSE.PF_L3_RFO.L3_MISS.SNOOP_MISS_OR_NO_FWD",
975 "MSRIndex": "0x1a6,0x1a7", 974 "MSRIndex": "0x1a6,0x1a7",
976 "PublicDescription": "Counts all prefetch (that bring data to LLC only) RFOs that miss the L3 and the data is returned from local or remote dram. ", 975 "PublicDescription": "Counts all prefetch (that bring data to LLC only) RFOs that miss the L3 and the data is returned from local or remote dram. Offcore response can be programmed only with a specific pair of event select and counter MSR, and with specific event codes and predefine mask bit value in a dedicated MSR to specify attributes of the offcore transaction.",
977 "SampleAfterValue": "100003", 976 "SampleAfterValue": "100003",
978 "CounterHTOff": "0,1,2,3" 977 "CounterHTOff": "0,1,2,3"
979 }, 978 },
@@ -986,7 +985,7 @@
986 "Counter": "0,1,2,3", 985 "Counter": "0,1,2,3",
987 "EventName": "OFFCORE_RESPONSE.PF_L3_RFO.L3_MISS_REMOTE_DRAM.SNOOP_MISS_OR_NO_FWD", 986 "EventName": "OFFCORE_RESPONSE.PF_L3_RFO.L3_MISS_REMOTE_DRAM.SNOOP_MISS_OR_NO_FWD",
988 "MSRIndex": "0x1a6,0x1a7", 987 "MSRIndex": "0x1a6,0x1a7",
989 "PublicDescription": "Counts all prefetch (that bring data to LLC only) RFOs that miss the L3 and the data is returned from remote dram. ", 988 "PublicDescription": "Counts all prefetch (that bring data to LLC only) RFOs that miss the L3 and the data is returned from remote dram. Offcore response can be programmed only with a specific pair of event select and counter MSR, and with specific event codes and predefine mask bit value in a dedicated MSR to specify attributes of the offcore transaction.",
990 "SampleAfterValue": "100003", 989 "SampleAfterValue": "100003",
991 "CounterHTOff": "0,1,2,3" 990 "CounterHTOff": "0,1,2,3"
992 }, 991 },
@@ -999,7 +998,7 @@
999 "Counter": "0,1,2,3", 998 "Counter": "0,1,2,3",
1000 "EventName": "OFFCORE_RESPONSE.PF_L3_RFO.L3_MISS_LOCAL_DRAM.SNOOP_MISS_OR_NO_FWD", 999 "EventName": "OFFCORE_RESPONSE.PF_L3_RFO.L3_MISS_LOCAL_DRAM.SNOOP_MISS_OR_NO_FWD",
1001 "MSRIndex": "0x1a6,0x1a7", 1000 "MSRIndex": "0x1a6,0x1a7",
1002 "PublicDescription": "Counts all prefetch (that bring data to LLC only) RFOs that miss the L3 and the data is returned from local dram. ", 1001 "PublicDescription": "Counts all prefetch (that bring data to LLC only) RFOs that miss the L3 and the data is returned from local dram. Offcore response can be programmed only with a specific pair of event select and counter MSR, and with specific event codes and predefine mask bit value in a dedicated MSR to specify attributes of the offcore transaction.",
1003 "SampleAfterValue": "100003", 1002 "SampleAfterValue": "100003",
1004 "CounterHTOff": "0,1,2,3" 1003 "CounterHTOff": "0,1,2,3"
1005 }, 1004 },
@@ -1012,7 +1011,7 @@
1012 "Counter": "0,1,2,3", 1011 "Counter": "0,1,2,3",
1013 "EventName": "OFFCORE_RESPONSE.PF_L1D_AND_SW.L3_MISS.ANY_SNOOP", 1012 "EventName": "OFFCORE_RESPONSE.PF_L1D_AND_SW.L3_MISS.ANY_SNOOP",
1014 "MSRIndex": "0x1a6,0x1a7", 1013 "MSRIndex": "0x1a6,0x1a7",
1015 "PublicDescription": "Counts L1 data cache hardware prefetch requests and software prefetch requests that miss in the L3. ", 1014 "PublicDescription": "Counts L1 data cache hardware prefetch requests and software prefetch requests that miss in the L3. Offcore response can be programmed only with a specific pair of event select and counter MSR, and with specific event codes and predefine mask bit value in a dedicated MSR to specify attributes of the offcore transaction.",
1016 "SampleAfterValue": "100003", 1015 "SampleAfterValue": "100003",
1017 "CounterHTOff": "0,1,2,3" 1016 "CounterHTOff": "0,1,2,3"
1018 }, 1017 },
@@ -1025,7 +1024,7 @@
1025 "Counter": "0,1,2,3", 1024 "Counter": "0,1,2,3",
1026 "EventName": "OFFCORE_RESPONSE.PF_L1D_AND_SW.L3_MISS.REMOTE_HIT_FORWARD", 1025 "EventName": "OFFCORE_RESPONSE.PF_L1D_AND_SW.L3_MISS.REMOTE_HIT_FORWARD",
1027 "MSRIndex": "0x1a6,0x1a7", 1026 "MSRIndex": "0x1a6,0x1a7",
1028 "PublicDescription": "Counts L1 data cache hardware prefetch requests and software prefetch requests that miss the L3 and clean or shared data is transferred from remote cache. ", 1027 "PublicDescription": "Counts L1 data cache hardware prefetch requests and software prefetch requests that miss the L3 and clean or shared data is transferred from remote cache. Offcore response can be programmed only with a specific pair of event select and counter MSR, and with specific event codes and predefine mask bit value in a dedicated MSR to specify attributes of the offcore transaction.",
1029 "SampleAfterValue": "100003", 1028 "SampleAfterValue": "100003",
1030 "CounterHTOff": "0,1,2,3" 1029 "CounterHTOff": "0,1,2,3"
1031 }, 1030 },
@@ -1038,7 +1037,7 @@
1038 "Counter": "0,1,2,3", 1037 "Counter": "0,1,2,3",
1039 "EventName": "OFFCORE_RESPONSE.PF_L1D_AND_SW.L3_MISS.REMOTE_HITM", 1038 "EventName": "OFFCORE_RESPONSE.PF_L1D_AND_SW.L3_MISS.REMOTE_HITM",
1040 "MSRIndex": "0x1a6,0x1a7", 1039 "MSRIndex": "0x1a6,0x1a7",
1041 "PublicDescription": "Counts L1 data cache hardware prefetch requests and software prefetch requests that miss the L3 and the modified data is transferred from remote cache. ", 1040 "PublicDescription": "Counts L1 data cache hardware prefetch requests and software prefetch requests that miss the L3 and the modified data is transferred from remote cache. Offcore response can be programmed only with a specific pair of event select and counter MSR, and with specific event codes and predefine mask bit value in a dedicated MSR to specify attributes of the offcore transaction.",
1042 "SampleAfterValue": "100003", 1041 "SampleAfterValue": "100003",
1043 "CounterHTOff": "0,1,2,3" 1042 "CounterHTOff": "0,1,2,3"
1044 }, 1043 },
@@ -1051,7 +1050,7 @@
1051 "Counter": "0,1,2,3", 1050 "Counter": "0,1,2,3",
1052 "EventName": "OFFCORE_RESPONSE.PF_L1D_AND_SW.L3_MISS.SNOOP_MISS_OR_NO_FWD", 1051 "EventName": "OFFCORE_RESPONSE.PF_L1D_AND_SW.L3_MISS.SNOOP_MISS_OR_NO_FWD",
1053 "MSRIndex": "0x1a6,0x1a7", 1052 "MSRIndex": "0x1a6,0x1a7",
1054 "PublicDescription": "Counts L1 data cache hardware prefetch requests and software prefetch requests that miss the L3 and the data is returned from local or remote dram. ", 1053 "PublicDescription": "Counts L1 data cache hardware prefetch requests and software prefetch requests that miss the L3 and the data is returned from local or remote dram. Offcore response can be programmed only with a specific pair of event select and counter MSR, and with specific event codes and predefine mask bit value in a dedicated MSR to specify attributes of the offcore transaction.",
1055 "SampleAfterValue": "100003", 1054 "SampleAfterValue": "100003",
1056 "CounterHTOff": "0,1,2,3" 1055 "CounterHTOff": "0,1,2,3"
1057 }, 1056 },
@@ -1064,7 +1063,7 @@
1064 "Counter": "0,1,2,3", 1063 "Counter": "0,1,2,3",
1065 "EventName": "OFFCORE_RESPONSE.PF_L1D_AND_SW.L3_MISS_REMOTE_DRAM.SNOOP_MISS_OR_NO_FWD", 1064 "EventName": "OFFCORE_RESPONSE.PF_L1D_AND_SW.L3_MISS_REMOTE_DRAM.SNOOP_MISS_OR_NO_FWD",
1066 "MSRIndex": "0x1a6,0x1a7", 1065 "MSRIndex": "0x1a6,0x1a7",
1067 "PublicDescription": "Counts L1 data cache hardware prefetch requests and software prefetch requests that miss the L3 and the data is returned from remote dram. ", 1066 "PublicDescription": "Counts L1 data cache hardware prefetch requests and software prefetch requests that miss the L3 and the data is returned from remote dram. Offcore response can be programmed only with a specific pair of event select and counter MSR, and with specific event codes and predefine mask bit value in a dedicated MSR to specify attributes of the offcore transaction.",
1068 "SampleAfterValue": "100003", 1067 "SampleAfterValue": "100003",
1069 "CounterHTOff": "0,1,2,3" 1068 "CounterHTOff": "0,1,2,3"
1070 }, 1069 },
@@ -1077,7 +1076,85 @@
1077 "Counter": "0,1,2,3", 1076 "Counter": "0,1,2,3",
1078 "EventName": "OFFCORE_RESPONSE.PF_L1D_AND_SW.L3_MISS_LOCAL_DRAM.SNOOP_MISS_OR_NO_FWD", 1077 "EventName": "OFFCORE_RESPONSE.PF_L1D_AND_SW.L3_MISS_LOCAL_DRAM.SNOOP_MISS_OR_NO_FWD",
1079 "MSRIndex": "0x1a6,0x1a7", 1078 "MSRIndex": "0x1a6,0x1a7",
1080 "PublicDescription": "Counts L1 data cache hardware prefetch requests and software prefetch requests that miss the L3 and the data is returned from local dram. ", 1079 "PublicDescription": "Counts L1 data cache hardware prefetch requests and software prefetch requests that miss the L3 and the data is returned from local dram. Offcore response can be programmed only with a specific pair of event select and counter MSR, and with specific event codes and predefine mask bit value in a dedicated MSR to specify attributes of the offcore transaction.",
1080 "SampleAfterValue": "100003",
1081 "CounterHTOff": "0,1,2,3"
1082 },
1083 {
1084 "Offcore": "1",
1085 "EventCode": "0xB7, 0xBB",
1086 "UMask": "0x1",
1087 "BriefDescription": "Counts any other requests that miss in the L3.",
1088 "MSRValue": "0x3fbc008000 ",
1089 "Counter": "0,1,2,3",
1090 "EventName": "OFFCORE_RESPONSE.OTHER.L3_MISS.ANY_SNOOP",
1091 "MSRIndex": "0x1a6,0x1a7",
1092 "PublicDescription": "Counts any other requests that miss in the L3. Offcore response can be programmed only with a specific pair of event select and counter MSR, and with specific event codes and predefine mask bit value in a dedicated MSR to specify attributes of the offcore transaction.",
1093 "SampleAfterValue": "100003",
1094 "CounterHTOff": "0,1,2,3"
1095 },
1096 {
1097 "Offcore": "1",
1098 "EventCode": "0xB7, 0xBB",
1099 "UMask": "0x1",
1100 "BriefDescription": "Counts any other requests that miss the L3 and clean or shared data is transferred from remote cache.",
1101 "MSRValue": "0x083fc08000 ",
1102 "Counter": "0,1,2,3",
1103 "EventName": "OFFCORE_RESPONSE.OTHER.L3_MISS.REMOTE_HIT_FORWARD",
1104 "MSRIndex": "0x1a6,0x1a7",
1105 "PublicDescription": "Counts any other requests that miss the L3 and clean or shared data is transferred from remote cache. Offcore response can be programmed only with a specific pair of event select and counter MSR, and with specific event codes and predefine mask bit value in a dedicated MSR to specify attributes of the offcore transaction.",
1106 "SampleAfterValue": "100003",
1107 "CounterHTOff": "0,1,2,3"
1108 },
1109 {
1110 "Offcore": "1",
1111 "EventCode": "0xB7, 0xBB",
1112 "UMask": "0x1",
1113 "BriefDescription": "Counts any other requests that miss the L3 and the modified data is transferred from remote cache.",
1114 "MSRValue": "0x103fc08000 ",
1115 "Counter": "0,1,2,3",
1116 "EventName": "OFFCORE_RESPONSE.OTHER.L3_MISS.REMOTE_HITM",
1117 "MSRIndex": "0x1a6,0x1a7",
1118 "PublicDescription": "Counts any other requests that miss the L3 and the modified data is transferred from remote cache. Offcore response can be programmed only with a specific pair of event select and counter MSR, and with specific event codes and predefine mask bit value in a dedicated MSR to specify attributes of the offcore transaction.",
1119 "SampleAfterValue": "100003",
1120 "CounterHTOff": "0,1,2,3"
1121 },
1122 {
1123 "Offcore": "1",
1124 "EventCode": "0xB7, 0xBB",
1125 "UMask": "0x1",
1126 "BriefDescription": "Counts any other requests that miss the L3 and the data is returned from local or remote dram.",
1127 "MSRValue": "0x063fc08000 ",
1128 "Counter": "0,1,2,3",
1129 "EventName": "OFFCORE_RESPONSE.OTHER.L3_MISS.SNOOP_MISS_OR_NO_FWD",
1130 "MSRIndex": "0x1a6,0x1a7",
1131 "PublicDescription": "Counts any other requests that miss the L3 and the data is returned from local or remote dram. Offcore response can be programmed only with a specific pair of event select and counter MSR, and with specific event codes and predefine mask bit value in a dedicated MSR to specify attributes of the offcore transaction.",
1132 "SampleAfterValue": "100003",
1133 "CounterHTOff": "0,1,2,3"
1134 },
1135 {
1136 "Offcore": "1",
1137 "EventCode": "0xB7, 0xBB",
1138 "UMask": "0x1",
1139 "BriefDescription": "Counts any other requests that miss the L3 and the data is returned from remote dram.",
1140 "MSRValue": "0x063b808000 ",
1141 "Counter": "0,1,2,3",
1142 "EventName": "OFFCORE_RESPONSE.OTHER.L3_MISS_REMOTE_DRAM.SNOOP_MISS_OR_NO_FWD",
1143 "MSRIndex": "0x1a6,0x1a7",
1144 "PublicDescription": "Counts any other requests that miss the L3 and the data is returned from remote dram. Offcore response can be programmed only with a specific pair of event select and counter MSR, and with specific event codes and predefine mask bit value in a dedicated MSR to specify attributes of the offcore transaction.",
1145 "SampleAfterValue": "100003",
1146 "CounterHTOff": "0,1,2,3"
1147 },
1148 {
1149 "Offcore": "1",
1150 "EventCode": "0xB7, 0xBB",
1151 "UMask": "0x1",
1152 "BriefDescription": "Counts any other requests that miss the L3 and the data is returned from local dram.",
1153 "MSRValue": "0x0604008000 ",
1154 "Counter": "0,1,2,3",
1155 "EventName": "OFFCORE_RESPONSE.OTHER.L3_MISS_LOCAL_DRAM.SNOOP_MISS_OR_NO_FWD",
1156 "MSRIndex": "0x1a6,0x1a7",
1157 "PublicDescription": "Counts any other requests that miss the L3 and the data is returned from local dram. Offcore response can be programmed only with a specific pair of event select and counter MSR, and with specific event codes and predefine mask bit value in a dedicated MSR to specify attributes of the offcore transaction.",
1081 "SampleAfterValue": "100003", 1158 "SampleAfterValue": "100003",
1082 "CounterHTOff": "0,1,2,3" 1159 "CounterHTOff": "0,1,2,3"
1083 }, 1160 },
@@ -1090,7 +1167,7 @@
1090 "Counter": "0,1,2,3", 1167 "Counter": "0,1,2,3",
1091 "EventName": "OFFCORE_RESPONSE.ALL_PF_DATA_RD.L3_MISS.ANY_SNOOP", 1168 "EventName": "OFFCORE_RESPONSE.ALL_PF_DATA_RD.L3_MISS.ANY_SNOOP",
1092 "MSRIndex": "0x1a6,0x1a7", 1169 "MSRIndex": "0x1a6,0x1a7",
1093 "PublicDescription": "Counts all prefetch data reads that miss in the L3. ", 1170 "PublicDescription": "Counts all prefetch data reads that miss in the L3. Offcore response can be programmed only with a specific pair of event select and counter MSR, and with specific event codes and predefine mask bit value in a dedicated MSR to specify attributes of the offcore transaction.",
1094 "SampleAfterValue": "100003", 1171 "SampleAfterValue": "100003",
1095 "CounterHTOff": "0,1,2,3" 1172 "CounterHTOff": "0,1,2,3"
1096 }, 1173 },
@@ -1103,7 +1180,7 @@
1103 "Counter": "0,1,2,3", 1180 "Counter": "0,1,2,3",
1104 "EventName": "OFFCORE_RESPONSE.ALL_PF_DATA_RD.L3_MISS.REMOTE_HIT_FORWARD", 1181 "EventName": "OFFCORE_RESPONSE.ALL_PF_DATA_RD.L3_MISS.REMOTE_HIT_FORWARD",
1105 "MSRIndex": "0x1a6,0x1a7", 1182 "MSRIndex": "0x1a6,0x1a7",
1106 "PublicDescription": "Counts all prefetch data reads that miss the L3 and clean or shared data is transferred from remote cache. ", 1183 "PublicDescription": "Counts all prefetch data reads that miss the L3 and clean or shared data is transferred from remote cache. Offcore response can be programmed only with a specific pair of event select and counter MSR, and with specific event codes and predefine mask bit value in a dedicated MSR to specify attributes of the offcore transaction.",
1107 "SampleAfterValue": "100003", 1184 "SampleAfterValue": "100003",
1108 "CounterHTOff": "0,1,2,3" 1185 "CounterHTOff": "0,1,2,3"
1109 }, 1186 },
@@ -1116,7 +1193,7 @@
1116 "Counter": "0,1,2,3", 1193 "Counter": "0,1,2,3",
1117 "EventName": "OFFCORE_RESPONSE.ALL_PF_DATA_RD.L3_MISS.REMOTE_HITM", 1194 "EventName": "OFFCORE_RESPONSE.ALL_PF_DATA_RD.L3_MISS.REMOTE_HITM",
1118 "MSRIndex": "0x1a6,0x1a7", 1195 "MSRIndex": "0x1a6,0x1a7",
1119 "PublicDescription": "Counts all prefetch data reads that miss the L3 and the modified data is transferred from remote cache. ", 1196 "PublicDescription": "Counts all prefetch data reads that miss the L3 and the modified data is transferred from remote cache. Offcore response can be programmed only with a specific pair of event select and counter MSR, and with specific event codes and predefine mask bit value in a dedicated MSR to specify attributes of the offcore transaction.",
1120 "SampleAfterValue": "100003", 1197 "SampleAfterValue": "100003",
1121 "CounterHTOff": "0,1,2,3" 1198 "CounterHTOff": "0,1,2,3"
1122 }, 1199 },
@@ -1129,7 +1206,7 @@
1129 "Counter": "0,1,2,3", 1206 "Counter": "0,1,2,3",
1130 "EventName": "OFFCORE_RESPONSE.ALL_PF_DATA_RD.L3_MISS.SNOOP_MISS_OR_NO_FWD", 1207 "EventName": "OFFCORE_RESPONSE.ALL_PF_DATA_RD.L3_MISS.SNOOP_MISS_OR_NO_FWD",
1131 "MSRIndex": "0x1a6,0x1a7", 1208 "MSRIndex": "0x1a6,0x1a7",
1132 "PublicDescription": "Counts all prefetch data reads that miss the L3 and the data is returned from local or remote dram. ", 1209 "PublicDescription": "Counts all prefetch data reads that miss the L3 and the data is returned from local or remote dram. Offcore response can be programmed only with a specific pair of event select and counter MSR, and with specific event codes and predefine mask bit value in a dedicated MSR to specify attributes of the offcore transaction.",
1133 "SampleAfterValue": "100003", 1210 "SampleAfterValue": "100003",
1134 "CounterHTOff": "0,1,2,3" 1211 "CounterHTOff": "0,1,2,3"
1135 }, 1212 },
@@ -1142,7 +1219,7 @@
1142 "Counter": "0,1,2,3", 1219 "Counter": "0,1,2,3",
1143 "EventName": "OFFCORE_RESPONSE.ALL_PF_DATA_RD.L3_MISS_REMOTE_DRAM.SNOOP_MISS_OR_NO_FWD", 1220 "EventName": "OFFCORE_RESPONSE.ALL_PF_DATA_RD.L3_MISS_REMOTE_DRAM.SNOOP_MISS_OR_NO_FWD",
1144 "MSRIndex": "0x1a6,0x1a7", 1221 "MSRIndex": "0x1a6,0x1a7",
1145 "PublicDescription": "Counts all prefetch data reads that miss the L3 and the data is returned from remote dram. ", 1222 "PublicDescription": "Counts all prefetch data reads that miss the L3 and the data is returned from remote dram. Offcore response can be programmed only with a specific pair of event select and counter MSR, and with specific event codes and predefine mask bit value in a dedicated MSR to specify attributes of the offcore transaction.",
1146 "SampleAfterValue": "100003", 1223 "SampleAfterValue": "100003",
1147 "CounterHTOff": "0,1,2,3" 1224 "CounterHTOff": "0,1,2,3"
1148 }, 1225 },
@@ -1155,7 +1232,7 @@
1155 "Counter": "0,1,2,3", 1232 "Counter": "0,1,2,3",
1156 "EventName": "OFFCORE_RESPONSE.ALL_PF_DATA_RD.L3_MISS_LOCAL_DRAM.SNOOP_MISS_OR_NO_FWD", 1233 "EventName": "OFFCORE_RESPONSE.ALL_PF_DATA_RD.L3_MISS_LOCAL_DRAM.SNOOP_MISS_OR_NO_FWD",
1157 "MSRIndex": "0x1a6,0x1a7", 1234 "MSRIndex": "0x1a6,0x1a7",
1158 "PublicDescription": "Counts all prefetch data reads that miss the L3 and the data is returned from local dram. ", 1235 "PublicDescription": "Counts all prefetch data reads that miss the L3 and the data is returned from local dram. Offcore response can be programmed only with a specific pair of event select and counter MSR, and with specific event codes and predefine mask bit value in a dedicated MSR to specify attributes of the offcore transaction.",
1159 "SampleAfterValue": "100003", 1236 "SampleAfterValue": "100003",
1160 "CounterHTOff": "0,1,2,3" 1237 "CounterHTOff": "0,1,2,3"
1161 }, 1238 },
@@ -1168,7 +1245,7 @@
1168 "Counter": "0,1,2,3", 1245 "Counter": "0,1,2,3",
1169 "EventName": "OFFCORE_RESPONSE.ALL_PF_RFO.L3_MISS.ANY_SNOOP", 1246 "EventName": "OFFCORE_RESPONSE.ALL_PF_RFO.L3_MISS.ANY_SNOOP",
1170 "MSRIndex": "0x1a6,0x1a7", 1247 "MSRIndex": "0x1a6,0x1a7",
1171 "PublicDescription": "Counts prefetch RFOs that miss in the L3. ", 1248 "PublicDescription": "Counts prefetch RFOs that miss in the L3. Offcore response can be programmed only with a specific pair of event select and counter MSR, and with specific event codes and predefine mask bit value in a dedicated MSR to specify attributes of the offcore transaction.",
1172 "SampleAfterValue": "100003", 1249 "SampleAfterValue": "100003",
1173 "CounterHTOff": "0,1,2,3" 1250 "CounterHTOff": "0,1,2,3"
1174 }, 1251 },
@@ -1181,7 +1258,7 @@
1181 "Counter": "0,1,2,3", 1258 "Counter": "0,1,2,3",
1182 "EventName": "OFFCORE_RESPONSE.ALL_PF_RFO.L3_MISS.REMOTE_HIT_FORWARD", 1259 "EventName": "OFFCORE_RESPONSE.ALL_PF_RFO.L3_MISS.REMOTE_HIT_FORWARD",
1183 "MSRIndex": "0x1a6,0x1a7", 1260 "MSRIndex": "0x1a6,0x1a7",
1184 "PublicDescription": "Counts prefetch RFOs that miss the L3 and clean or shared data is transferred from remote cache. ", 1261 "PublicDescription": "Counts prefetch RFOs that miss the L3 and clean or shared data is transferred from remote cache. Offcore response can be programmed only with a specific pair of event select and counter MSR, and with specific event codes and predefine mask bit value in a dedicated MSR to specify attributes of the offcore transaction.",
1185 "SampleAfterValue": "100003", 1262 "SampleAfterValue": "100003",
1186 "CounterHTOff": "0,1,2,3" 1263 "CounterHTOff": "0,1,2,3"
1187 }, 1264 },
@@ -1194,7 +1271,7 @@
1194 "Counter": "0,1,2,3", 1271 "Counter": "0,1,2,3",
1195 "EventName": "OFFCORE_RESPONSE.ALL_PF_RFO.L3_MISS.REMOTE_HITM", 1272 "EventName": "OFFCORE_RESPONSE.ALL_PF_RFO.L3_MISS.REMOTE_HITM",
1196 "MSRIndex": "0x1a6,0x1a7", 1273 "MSRIndex": "0x1a6,0x1a7",
1197 "PublicDescription": "Counts prefetch RFOs that miss the L3 and the modified data is transferred from remote cache. ", 1274 "PublicDescription": "Counts prefetch RFOs that miss the L3 and the modified data is transferred from remote cache. Offcore response can be programmed only with a specific pair of event select and counter MSR, and with specific event codes and predefine mask bit value in a dedicated MSR to specify attributes of the offcore transaction.",
1198 "SampleAfterValue": "100003", 1275 "SampleAfterValue": "100003",
1199 "CounterHTOff": "0,1,2,3" 1276 "CounterHTOff": "0,1,2,3"
1200 }, 1277 },
@@ -1207,7 +1284,7 @@
1207 "Counter": "0,1,2,3", 1284 "Counter": "0,1,2,3",
1208 "EventName": "OFFCORE_RESPONSE.ALL_PF_RFO.L3_MISS.SNOOP_MISS_OR_NO_FWD", 1285 "EventName": "OFFCORE_RESPONSE.ALL_PF_RFO.L3_MISS.SNOOP_MISS_OR_NO_FWD",
1209 "MSRIndex": "0x1a6,0x1a7", 1286 "MSRIndex": "0x1a6,0x1a7",
1210 "PublicDescription": "Counts prefetch RFOs that miss the L3 and the data is returned from local or remote dram. ", 1287 "PublicDescription": "Counts prefetch RFOs that miss the L3 and the data is returned from local or remote dram. Offcore response can be programmed only with a specific pair of event select and counter MSR, and with specific event codes and predefine mask bit value in a dedicated MSR to specify attributes of the offcore transaction.",
1211 "SampleAfterValue": "100003", 1288 "SampleAfterValue": "100003",
1212 "CounterHTOff": "0,1,2,3" 1289 "CounterHTOff": "0,1,2,3"
1213 }, 1290 },
@@ -1220,7 +1297,7 @@
1220 "Counter": "0,1,2,3", 1297 "Counter": "0,1,2,3",
1221 "EventName": "OFFCORE_RESPONSE.ALL_PF_RFO.L3_MISS_REMOTE_DRAM.SNOOP_MISS_OR_NO_FWD", 1298 "EventName": "OFFCORE_RESPONSE.ALL_PF_RFO.L3_MISS_REMOTE_DRAM.SNOOP_MISS_OR_NO_FWD",
1222 "MSRIndex": "0x1a6,0x1a7", 1299 "MSRIndex": "0x1a6,0x1a7",
1223 "PublicDescription": "Counts prefetch RFOs that miss the L3 and the data is returned from remote dram. ", 1300 "PublicDescription": "Counts prefetch RFOs that miss the L3 and the data is returned from remote dram. Offcore response can be programmed only with a specific pair of event select and counter MSR, and with specific event codes and predefine mask bit value in a dedicated MSR to specify attributes of the offcore transaction.",
1224 "SampleAfterValue": "100003", 1301 "SampleAfterValue": "100003",
1225 "CounterHTOff": "0,1,2,3" 1302 "CounterHTOff": "0,1,2,3"
1226 }, 1303 },
@@ -1233,7 +1310,7 @@
1233 "Counter": "0,1,2,3", 1310 "Counter": "0,1,2,3",
1234 "EventName": "OFFCORE_RESPONSE.ALL_PF_RFO.L3_MISS_LOCAL_DRAM.SNOOP_MISS_OR_NO_FWD", 1311 "EventName": "OFFCORE_RESPONSE.ALL_PF_RFO.L3_MISS_LOCAL_DRAM.SNOOP_MISS_OR_NO_FWD",
1235 "MSRIndex": "0x1a6,0x1a7", 1312 "MSRIndex": "0x1a6,0x1a7",
1236 "PublicDescription": "Counts prefetch RFOs that miss the L3 and the data is returned from local dram. ", 1313 "PublicDescription": "Counts prefetch RFOs that miss the L3 and the data is returned from local dram. Offcore response can be programmed only with a specific pair of event select and counter MSR, and with specific event codes and predefine mask bit value in a dedicated MSR to specify attributes of the offcore transaction.",
1237 "SampleAfterValue": "100003", 1314 "SampleAfterValue": "100003",
1238 "CounterHTOff": "0,1,2,3" 1315 "CounterHTOff": "0,1,2,3"
1239 }, 1316 },
@@ -1246,7 +1323,7 @@
1246 "Counter": "0,1,2,3", 1323 "Counter": "0,1,2,3",
1247 "EventName": "OFFCORE_RESPONSE.ALL_DATA_RD.L3_MISS.ANY_SNOOP", 1324 "EventName": "OFFCORE_RESPONSE.ALL_DATA_RD.L3_MISS.ANY_SNOOP",
1248 "MSRIndex": "0x1a6,0x1a7", 1325 "MSRIndex": "0x1a6,0x1a7",
1249 "PublicDescription": "Counts all demand & prefetch data reads that miss in the L3. ", 1326 "PublicDescription": "Counts all demand & prefetch data reads that miss in the L3. Offcore response can be programmed only with a specific pair of event select and counter MSR, and with specific event codes and predefine mask bit value in a dedicated MSR to specify attributes of the offcore transaction.",
1250 "SampleAfterValue": "100003", 1327 "SampleAfterValue": "100003",
1251 "CounterHTOff": "0,1,2,3" 1328 "CounterHTOff": "0,1,2,3"
1252 }, 1329 },
@@ -1259,7 +1336,7 @@
1259 "Counter": "0,1,2,3", 1336 "Counter": "0,1,2,3",
1260 "EventName": "OFFCORE_RESPONSE.ALL_DATA_RD.L3_MISS.REMOTE_HIT_FORWARD", 1337 "EventName": "OFFCORE_RESPONSE.ALL_DATA_RD.L3_MISS.REMOTE_HIT_FORWARD",
1261 "MSRIndex": "0x1a6,0x1a7", 1338 "MSRIndex": "0x1a6,0x1a7",
1262 "PublicDescription": "Counts all demand & prefetch data reads that miss the L3 and clean or shared data is transferred from remote cache. ", 1339 "PublicDescription": "Counts all demand & prefetch data reads that miss the L3 and clean or shared data is transferred from remote cache. Offcore response can be programmed only with a specific pair of event select and counter MSR, and with specific event codes and predefine mask bit value in a dedicated MSR to specify attributes of the offcore transaction.",
1263 "SampleAfterValue": "100003", 1340 "SampleAfterValue": "100003",
1264 "CounterHTOff": "0,1,2,3" 1341 "CounterHTOff": "0,1,2,3"
1265 }, 1342 },
@@ -1272,7 +1349,7 @@
1272 "Counter": "0,1,2,3", 1349 "Counter": "0,1,2,3",
1273 "EventName": "OFFCORE_RESPONSE.ALL_DATA_RD.L3_MISS.REMOTE_HITM", 1350 "EventName": "OFFCORE_RESPONSE.ALL_DATA_RD.L3_MISS.REMOTE_HITM",
1274 "MSRIndex": "0x1a6,0x1a7", 1351 "MSRIndex": "0x1a6,0x1a7",
1275 "PublicDescription": "Counts all demand & prefetch data reads that miss the L3 and the modified data is transferred from remote cache. ", 1352 "PublicDescription": "Counts all demand & prefetch data reads that miss the L3 and the modified data is transferred from remote cache. Offcore response can be programmed only with a specific pair of event select and counter MSR, and with specific event codes and predefine mask bit value in a dedicated MSR to specify attributes of the offcore transaction.",
1276 "SampleAfterValue": "100003", 1353 "SampleAfterValue": "100003",
1277 "CounterHTOff": "0,1,2,3" 1354 "CounterHTOff": "0,1,2,3"
1278 }, 1355 },
@@ -1285,7 +1362,7 @@
1285 "Counter": "0,1,2,3", 1362 "Counter": "0,1,2,3",
1286 "EventName": "OFFCORE_RESPONSE.ALL_DATA_RD.L3_MISS.SNOOP_MISS_OR_NO_FWD", 1363 "EventName": "OFFCORE_RESPONSE.ALL_DATA_RD.L3_MISS.SNOOP_MISS_OR_NO_FWD",
1287 "MSRIndex": "0x1a6,0x1a7", 1364 "MSRIndex": "0x1a6,0x1a7",
1288 "PublicDescription": "Counts all demand & prefetch data reads that miss the L3 and the data is returned from local or remote dram. ", 1365 "PublicDescription": "Counts all demand & prefetch data reads that miss the L3 and the data is returned from local or remote dram. Offcore response can be programmed only with a specific pair of event select and counter MSR, and with specific event codes and predefine mask bit value in a dedicated MSR to specify attributes of the offcore transaction.",
1289 "SampleAfterValue": "100003", 1366 "SampleAfterValue": "100003",
1290 "CounterHTOff": "0,1,2,3" 1367 "CounterHTOff": "0,1,2,3"
1291 }, 1368 },
@@ -1298,7 +1375,7 @@
1298 "Counter": "0,1,2,3", 1375 "Counter": "0,1,2,3",
1299 "EventName": "OFFCORE_RESPONSE.ALL_DATA_RD.L3_MISS_REMOTE_DRAM.SNOOP_MISS_OR_NO_FWD", 1376 "EventName": "OFFCORE_RESPONSE.ALL_DATA_RD.L3_MISS_REMOTE_DRAM.SNOOP_MISS_OR_NO_FWD",
1300 "MSRIndex": "0x1a6,0x1a7", 1377 "MSRIndex": "0x1a6,0x1a7",
1301 "PublicDescription": "Counts all demand & prefetch data reads that miss the L3 and the data is returned from remote dram. ", 1378 "PublicDescription": "Counts all demand & prefetch data reads that miss the L3 and the data is returned from remote dram. Offcore response can be programmed only with a specific pair of event select and counter MSR, and with specific event codes and predefine mask bit value in a dedicated MSR to specify attributes of the offcore transaction.",
1302 "SampleAfterValue": "100003", 1379 "SampleAfterValue": "100003",
1303 "CounterHTOff": "0,1,2,3" 1380 "CounterHTOff": "0,1,2,3"
1304 }, 1381 },
@@ -1311,7 +1388,7 @@
1311 "Counter": "0,1,2,3", 1388 "Counter": "0,1,2,3",
1312 "EventName": "OFFCORE_RESPONSE.ALL_DATA_RD.L3_MISS_LOCAL_DRAM.SNOOP_MISS_OR_NO_FWD", 1389 "EventName": "OFFCORE_RESPONSE.ALL_DATA_RD.L3_MISS_LOCAL_DRAM.SNOOP_MISS_OR_NO_FWD",
1313 "MSRIndex": "0x1a6,0x1a7", 1390 "MSRIndex": "0x1a6,0x1a7",
1314 "PublicDescription": "Counts all demand & prefetch data reads that miss the L3 and the data is returned from local dram. ", 1391 "PublicDescription": "Counts all demand & prefetch data reads that miss the L3 and the data is returned from local dram. Offcore response can be programmed only with a specific pair of event select and counter MSR, and with specific event codes and predefine mask bit value in a dedicated MSR to specify attributes of the offcore transaction.",
1315 "SampleAfterValue": "100003", 1392 "SampleAfterValue": "100003",
1316 "CounterHTOff": "0,1,2,3" 1393 "CounterHTOff": "0,1,2,3"
1317 }, 1394 },
@@ -1324,7 +1401,7 @@
1324 "Counter": "0,1,2,3", 1401 "Counter": "0,1,2,3",
1325 "EventName": "OFFCORE_RESPONSE.ALL_RFO.L3_MISS.ANY_SNOOP", 1402 "EventName": "OFFCORE_RESPONSE.ALL_RFO.L3_MISS.ANY_SNOOP",
1326 "MSRIndex": "0x1a6,0x1a7", 1403 "MSRIndex": "0x1a6,0x1a7",
1327 "PublicDescription": "Counts all demand & prefetch RFOs that miss in the L3. ", 1404 "PublicDescription": "Counts all demand & prefetch RFOs that miss in the L3. Offcore response can be programmed only with a specific pair of event select and counter MSR, and with specific event codes and predefine mask bit value in a dedicated MSR to specify attributes of the offcore transaction.",
1328 "SampleAfterValue": "100003", 1405 "SampleAfterValue": "100003",
1329 "CounterHTOff": "0,1,2,3" 1406 "CounterHTOff": "0,1,2,3"
1330 }, 1407 },
@@ -1337,7 +1414,7 @@
1337 "Counter": "0,1,2,3", 1414 "Counter": "0,1,2,3",
1338 "EventName": "OFFCORE_RESPONSE.ALL_RFO.L3_MISS.REMOTE_HIT_FORWARD", 1415 "EventName": "OFFCORE_RESPONSE.ALL_RFO.L3_MISS.REMOTE_HIT_FORWARD",
1339 "MSRIndex": "0x1a6,0x1a7", 1416 "MSRIndex": "0x1a6,0x1a7",
1340 "PublicDescription": "Counts all demand & prefetch RFOs that miss the L3 and clean or shared data is transferred from remote cache. ", 1417 "PublicDescription": "Counts all demand & prefetch RFOs that miss the L3 and clean or shared data is transferred from remote cache. Offcore response can be programmed only with a specific pair of event select and counter MSR, and with specific event codes and predefine mask bit value in a dedicated MSR to specify attributes of the offcore transaction.",
1341 "SampleAfterValue": "100003", 1418 "SampleAfterValue": "100003",
1342 "CounterHTOff": "0,1,2,3" 1419 "CounterHTOff": "0,1,2,3"
1343 }, 1420 },
@@ -1350,7 +1427,7 @@
1350 "Counter": "0,1,2,3", 1427 "Counter": "0,1,2,3",
1351 "EventName": "OFFCORE_RESPONSE.ALL_RFO.L3_MISS.REMOTE_HITM", 1428 "EventName": "OFFCORE_RESPONSE.ALL_RFO.L3_MISS.REMOTE_HITM",
1352 "MSRIndex": "0x1a6,0x1a7", 1429 "MSRIndex": "0x1a6,0x1a7",
1353 "PublicDescription": "Counts all demand & prefetch RFOs that miss the L3 and the modified data is transferred from remote cache. ", 1430 "PublicDescription": "Counts all demand & prefetch RFOs that miss the L3 and the modified data is transferred from remote cache. Offcore response can be programmed only with a specific pair of event select and counter MSR, and with specific event codes and predefine mask bit value in a dedicated MSR to specify attributes of the offcore transaction.",
1354 "SampleAfterValue": "100003", 1431 "SampleAfterValue": "100003",
1355 "CounterHTOff": "0,1,2,3" 1432 "CounterHTOff": "0,1,2,3"
1356 }, 1433 },
@@ -1363,7 +1440,7 @@
1363 "Counter": "0,1,2,3", 1440 "Counter": "0,1,2,3",
1364 "EventName": "OFFCORE_RESPONSE.ALL_RFO.L3_MISS.SNOOP_MISS_OR_NO_FWD", 1441 "EventName": "OFFCORE_RESPONSE.ALL_RFO.L3_MISS.SNOOP_MISS_OR_NO_FWD",
1365 "MSRIndex": "0x1a6,0x1a7", 1442 "MSRIndex": "0x1a6,0x1a7",
1366 "PublicDescription": "Counts all demand & prefetch RFOs that miss the L3 and the data is returned from local or remote dram. ", 1443 "PublicDescription": "Counts all demand & prefetch RFOs that miss the L3 and the data is returned from local or remote dram. Offcore response can be programmed only with a specific pair of event select and counter MSR, and with specific event codes and predefine mask bit value in a dedicated MSR to specify attributes of the offcore transaction.",
1367 "SampleAfterValue": "100003", 1444 "SampleAfterValue": "100003",
1368 "CounterHTOff": "0,1,2,3" 1445 "CounterHTOff": "0,1,2,3"
1369 }, 1446 },
@@ -1376,7 +1453,7 @@
1376 "Counter": "0,1,2,3", 1453 "Counter": "0,1,2,3",
1377 "EventName": "OFFCORE_RESPONSE.ALL_RFO.L3_MISS_REMOTE_DRAM.SNOOP_MISS_OR_NO_FWD", 1454 "EventName": "OFFCORE_RESPONSE.ALL_RFO.L3_MISS_REMOTE_DRAM.SNOOP_MISS_OR_NO_FWD",
1378 "MSRIndex": "0x1a6,0x1a7", 1455 "MSRIndex": "0x1a6,0x1a7",
1379 "PublicDescription": "Counts all demand & prefetch RFOs that miss the L3 and the data is returned from remote dram. ", 1456 "PublicDescription": "Counts all demand & prefetch RFOs that miss the L3 and the data is returned from remote dram. Offcore response can be programmed only with a specific pair of event select and counter MSR, and with specific event codes and predefine mask bit value in a dedicated MSR to specify attributes of the offcore transaction.",
1380 "SampleAfterValue": "100003", 1457 "SampleAfterValue": "100003",
1381 "CounterHTOff": "0,1,2,3" 1458 "CounterHTOff": "0,1,2,3"
1382 }, 1459 },
@@ -1389,8 +1466,8 @@
1389 "Counter": "0,1,2,3", 1466 "Counter": "0,1,2,3",
1390 "EventName": "OFFCORE_RESPONSE.ALL_RFO.L3_MISS_LOCAL_DRAM.SNOOP_MISS_OR_NO_FWD", 1467 "EventName": "OFFCORE_RESPONSE.ALL_RFO.L3_MISS_LOCAL_DRAM.SNOOP_MISS_OR_NO_FWD",
1391 "MSRIndex": "0x1a6,0x1a7", 1468 "MSRIndex": "0x1a6,0x1a7",
1392 "PublicDescription": "Counts all demand & prefetch RFOs that miss the L3 and the data is returned from local dram.", 1469 "PublicDescription": "Counts all demand & prefetch RFOs that miss the L3 and the data is returned from local dram. Offcore response can be programmed only with a specific pair of event select and counter MSR, and with specific event codes and predefine mask bit value in a dedicated MSR to specify attributes of the offcore transaction.",
1393 "SampleAfterValue": "100003", 1470 "SampleAfterValue": "100003",
1394 "CounterHTOff": "0,1,2,3" 1471 "CounterHTOff": "0,1,2,3"
1395 } 1472 }
1396] 1473] \ No newline at end of file
diff --git a/tools/perf/pmu-events/arch/x86/skylakex/other.json b/tools/perf/pmu-events/arch/x86/skylakex/other.json
index 70243b0b0586..778a541463eb 100644
--- a/tools/perf/pmu-events/arch/x86/skylakex/other.json
+++ b/tools/perf/pmu-events/arch/x86/skylakex/other.json
@@ -40,6 +40,42 @@
40 "CounterHTOff": "0,1,2,3,4,5,6,7" 40 "CounterHTOff": "0,1,2,3,4,5,6,7"
41 }, 41 },
42 { 42 {
43 "EventCode": "0x32",
44 "UMask": "0x1",
45 "BriefDescription": "Number of PREFETCHNTA instructions executed.",
46 "Counter": "0,1,2,3",
47 "EventName": "SW_PREFETCH_ACCESS.NTA",
48 "SampleAfterValue": "2000003",
49 "CounterHTOff": "0,1,2,3,4,5,6,7"
50 },
51 {
52 "EventCode": "0x32",
53 "UMask": "0x2",
54 "BriefDescription": "Number of PREFETCHT0 instructions executed.",
55 "Counter": "0,1,2,3",
56 "EventName": "SW_PREFETCH_ACCESS.T0",
57 "SampleAfterValue": "2000003",
58 "CounterHTOff": "0,1,2,3,4,5,6,7"
59 },
60 {
61 "EventCode": "0x32",
62 "UMask": "0x4",
63 "BriefDescription": "Number of PREFETCHT1 or PREFETCHT2 instructions executed.",
64 "Counter": "0,1,2,3",
65 "EventName": "SW_PREFETCH_ACCESS.T1_T2",
66 "SampleAfterValue": "2000003",
67 "CounterHTOff": "0,1,2,3,4,5,6,7"
68 },
69 {
70 "EventCode": "0x32",
71 "UMask": "0x8",
72 "BriefDescription": "Number of PREFETCHW instructions executed.",
73 "Counter": "0,1,2,3",
74 "EventName": "SW_PREFETCH_ACCESS.PREFETCHW",
75 "SampleAfterValue": "2000003",
76 "CounterHTOff": "0,1,2,3,4,5,6,7"
77 },
78 {
43 "EventCode": "0xCB", 79 "EventCode": "0xCB",
44 "UMask": "0x1", 80 "UMask": "0x1",
45 "BriefDescription": "Number of hardware interrupts received by the processor.", 81 "BriefDescription": "Number of hardware interrupts received by the processor.",
@@ -50,6 +86,62 @@
50 "CounterHTOff": "0,1,2,3,4,5,6,7" 86 "CounterHTOff": "0,1,2,3,4,5,6,7"
51 }, 87 },
52 { 88 {
89 "EventCode": "0xEF",
90 "UMask": "0x1",
91 "Counter": "0,1,2,3",
92 "EventName": "CORE_SNOOP_RESPONSE.RSP_IHITI",
93 "SampleAfterValue": "2000003",
94 "CounterHTOff": "0,1,2,3,4,5,6,7"
95 },
96 {
97 "EventCode": "0xEF",
98 "UMask": "0x2",
99 "Counter": "0,1,2,3",
100 "EventName": "CORE_SNOOP_RESPONSE.RSP_IHITFSE",
101 "SampleAfterValue": "2000003",
102 "CounterHTOff": "0,1,2,3,4,5,6,7"
103 },
104 {
105 "EventCode": "0xEF",
106 "UMask": "0x4",
107 "Counter": "0,1,2,3",
108 "EventName": "CORE_SNOOP_RESPONSE.RSP_SHITFSE",
109 "SampleAfterValue": "2000003",
110 "CounterHTOff": "0,1,2,3,4,5,6,7"
111 },
112 {
113 "EventCode": "0xEF",
114 "UMask": "0x8",
115 "Counter": "0,1,2,3",
116 "EventName": "CORE_SNOOP_RESPONSE.RSP_SFWDM",
117 "SampleAfterValue": "2000003",
118 "CounterHTOff": "0,1,2,3,4,5,6,7"
119 },
120 {
121 "EventCode": "0xEF",
122 "UMask": "0x10",
123 "Counter": "0,1,2,3",
124 "EventName": "CORE_SNOOP_RESPONSE.RSP_IFWDM",
125 "SampleAfterValue": "2000003",
126 "CounterHTOff": "0,1,2,3,4,5,6,7"
127 },
128 {
129 "EventCode": "0xEF",
130 "UMask": "0x20",
131 "Counter": "0,1,2,3",
132 "EventName": "CORE_SNOOP_RESPONSE.RSP_IFWDFE",
133 "SampleAfterValue": "2000003",
134 "CounterHTOff": "0,1,2,3,4,5,6,7"
135 },
136 {
137 "EventCode": "0xEF",
138 "UMask": "0x40",
139 "Counter": "0,1,2,3",
140 "EventName": "CORE_SNOOP_RESPONSE.RSP_SFWDFE",
141 "SampleAfterValue": "2000003",
142 "CounterHTOff": "0,1,2,3,4,5,6,7"
143 },
144 {
53 "EventCode": "0xFE", 145 "EventCode": "0xFE",
54 "UMask": "0x2", 146 "UMask": "0x2",
55 "BriefDescription": "Counts number of cache lines that are allocated and written back to L3 with the intention that they are more likely to be reused shortly", 147 "BriefDescription": "Counts number of cache lines that are allocated and written back to L3 with the intention that they are more likely to be reused shortly",
@@ -69,4 +161,4 @@
69 "SampleAfterValue": "100003", 161 "SampleAfterValue": "100003",
70 "CounterHTOff": "0,1,2,3,4,5,6,7" 162 "CounterHTOff": "0,1,2,3,4,5,6,7"
71 } 163 }
72] 164] \ No newline at end of file
diff --git a/tools/perf/pmu-events/arch/x86/skylakex/pipeline.json b/tools/perf/pmu-events/arch/x86/skylakex/pipeline.json
index 0895d1e52a4a..f99f7ae27820 100644
--- a/tools/perf/pmu-events/arch/x86/skylakex/pipeline.json
+++ b/tools/perf/pmu-events/arch/x86/skylakex/pipeline.json
@@ -3,41 +3,41 @@
3 "EventCode": "0x00", 3 "EventCode": "0x00",
4 "UMask": "0x1", 4 "UMask": "0x1",
5 "BriefDescription": "Instructions retired from execution.", 5 "BriefDescription": "Instructions retired from execution.",
6 "Counter": "Fixed counter 1", 6 "Counter": "Fixed counter 0",
7 "EventName": "INST_RETIRED.ANY", 7 "EventName": "INST_RETIRED.ANY",
8 "PublicDescription": "Counts the number of instructions retired from execution. For instructions that consist of multiple micro-ops, Counts the retirement of the last micro-op of the instruction. Counting continues during hardware interrupts, traps, and inside interrupt handlers. Notes: INST_RETIRED.ANY is counted by a designated fixed counter, leaving the four (eight when Hyperthreading is disabled) programmable counters available for other events. INST_RETIRED.ANY_P is counted by a programmable counter and it is an architectural performance event. Counting: Faulting executions of GETSEC/VM entry/VM Exit/MWait will not count as retired instructions.", 8 "PublicDescription": "Counts the number of instructions retired from execution. For instructions that consist of multiple micro-ops, Counts the retirement of the last micro-op of the instruction. Counting continues during hardware interrupts, traps, and inside interrupt handlers. Notes: INST_RETIRED.ANY is counted by a designated fixed counter, leaving the four (eight when Hyperthreading is disabled) programmable counters available for other events. INST_RETIRED.ANY_P is counted by a programmable counter and it is an architectural performance event. Counting: Faulting executions of GETSEC/VM entry/VM Exit/MWait will not count as retired instructions.",
9 "SampleAfterValue": "2000003", 9 "SampleAfterValue": "2000003",
10 "CounterHTOff": "Fixed counter 1" 10 "CounterHTOff": "Fixed counter 0"
11 }, 11 },
12 { 12 {
13 "EventCode": "0x00", 13 "EventCode": "0x00",
14 "UMask": "0x2", 14 "UMask": "0x2",
15 "BriefDescription": "Core cycles when the thread is not in halt state", 15 "BriefDescription": "Core cycles when the thread is not in halt state",
16 "Counter": "Fixed counter 2", 16 "Counter": "Fixed counter 1",
17 "EventName": "CPU_CLK_UNHALTED.THREAD", 17 "EventName": "CPU_CLK_UNHALTED.THREAD",
18 "PublicDescription": "Counts the number of core cycles while the thread is not in a halt state. The thread enters the halt state when it is running the HLT instruction. This event is a component in many key event ratios. The core frequency may change from time to time due to transitions associated with Enhanced Intel SpeedStep Technology or TM2. For this reason this event may have a changing ratio with regards to time. When the core frequency is constant, this event can approximate elapsed time while the core was not in the halt state. It is counted on a dedicated fixed counter, leaving the four (eight when Hyperthreading is disabled) programmable counters available for other events.", 18 "PublicDescription": "Counts the number of core cycles while the thread is not in a halt state. The thread enters the halt state when it is running the HLT instruction. This event is a component in many key event ratios. The core frequency may change from time to time due to transitions associated with Enhanced Intel SpeedStep Technology or TM2. For this reason this event may have a changing ratio with regards to time. When the core frequency is constant, this event can approximate elapsed time while the core was not in the halt state. It is counted on a dedicated fixed counter, leaving the four (eight when Hyperthreading is disabled) programmable counters available for other events.",
19 "SampleAfterValue": "2000003", 19 "SampleAfterValue": "2000003",
20 "CounterHTOff": "Fixed counter 2" 20 "CounterHTOff": "Fixed counter 1"
21 }, 21 },
22 { 22 {
23 "EventCode": "0x00", 23 "EventCode": "0x00",
24 "UMask": "0x2", 24 "UMask": "0x2",
25 "BriefDescription": "Core cycles when at least one thread on the physical core is not in halt state.", 25 "BriefDescription": "Core cycles when at least one thread on the physical core is not in halt state.",
26 "Counter": "Fixed counter 2", 26 "Counter": "Fixed counter 1",
27 "EventName": "CPU_CLK_UNHALTED.THREAD_ANY", 27 "EventName": "CPU_CLK_UNHALTED.THREAD_ANY",
28 "AnyThread": "1", 28 "AnyThread": "1",
29 "SampleAfterValue": "2000003", 29 "SampleAfterValue": "2000003",
30 "CounterHTOff": "Fixed counter 2" 30 "CounterHTOff": "Fixed counter 1"
31 }, 31 },
32 { 32 {
33 "EventCode": "0x00", 33 "EventCode": "0x00",
34 "UMask": "0x3", 34 "UMask": "0x3",
35 "BriefDescription": "Reference cycles when the core is not in halt state.", 35 "BriefDescription": "Reference cycles when the core is not in halt state.",
36 "Counter": "Fixed counter 3", 36 "Counter": "Fixed counter 2",
37 "EventName": "CPU_CLK_UNHALTED.REF_TSC", 37 "EventName": "CPU_CLK_UNHALTED.REF_TSC",
38 "PublicDescription": "Counts the number of reference cycles when the core is not in a halt state. The core enters the halt state when it is running the HLT instruction or the MWAIT instruction. This event is not affected by core frequency changes (for example, P states, TM2 transitions) but has the same incrementing frequency as the time stamp counter. This event can approximate elapsed time while the core was not in a halt state. This event has a constant ratio with the CPU_CLK_UNHALTED.REF_XCLK event. It is counted on a dedicated fixed counter, leaving the four (eight when Hyperthreading is disabled) programmable counters available for other events. Note: On all current platforms this event stops counting during 'throttling (TM)' states duty off periods the processor is 'halted'. The counter update is done at a lower clock rate then the core clock the overflow status bit for this counter may appear 'sticky'. After the counter has overflowed and software clears the overflow status bit and resets the counter to less than MAX. The reset value to the counter is not clocked immediately so the overflow status bit will flip 'high (1)' and generate another PMI (if enabled) after which the reset value gets clocked into the counter. Therefore, software will get the interrupt, read the overflow status bit '1 for bit 34 while the counter value is less than MAX. Software should ignore this case.", 38 "PublicDescription": "Counts the number of reference cycles when the core is not in a halt state. The core enters the halt state when it is running the HLT instruction or the MWAIT instruction. This event is not affected by core frequency changes (for example, P states, TM2 transitions) but has the same incrementing frequency as the time stamp counter. This event can approximate elapsed time while the core was not in a halt state. This event has a constant ratio with the CPU_CLK_UNHALTED.REF_XCLK event. It is counted on a dedicated fixed counter, leaving the four (eight when Hyperthreading is disabled) programmable counters available for other events. Note: On all current platforms this event stops counting during 'throttling (TM)' states duty off periods the processor is 'halted'. The counter update is done at a lower clock rate then the core clock the overflow status bit for this counter may appear 'sticky'. After the counter has overflowed and software clears the overflow status bit and resets the counter to less than MAX. The reset value to the counter is not clocked immediately so the overflow status bit will flip 'high (1)' and generate another PMI (if enabled) after which the reset value gets clocked into the counter. Therefore, software will get the interrupt, read the overflow status bit '1 for bit 34 while the counter value is less than MAX. Software should ignore this case.",
39 "SampleAfterValue": "2000003", 39 "SampleAfterValue": "2000003",
40 "CounterHTOff": "Fixed counter 3" 40 "CounterHTOff": "Fixed counter 2"
41 }, 41 },
42 { 42 {
43 "EventCode": "0x03", 43 "EventCode": "0x03",
@@ -126,7 +126,7 @@
126 "BriefDescription": "Uops inserted at issue-stage in order to preserve upper bits of vector registers.", 126 "BriefDescription": "Uops inserted at issue-stage in order to preserve upper bits of vector registers.",
127 "Counter": "0,1,2,3", 127 "Counter": "0,1,2,3",
128 "EventName": "UOPS_ISSUED.VECTOR_WIDTH_MISMATCH", 128 "EventName": "UOPS_ISSUED.VECTOR_WIDTH_MISMATCH",
129 "PublicDescription": "Counts the number of Blend Uops issued by the Resource Allocation Table (RAT) to the reservation station (RS) in order to preserve upper bits of vector registers. Starting with the Skylake microarchitecture, these Blend uops are needed since every Intel SSE instruction executed in Dirty Upper State needs to preserve bits 128-255 of the destination register. For more information, refer to \u201cMixing Intel AVX and Intel SSE Code\u201d section of the Optimization Guide.", 129 "PublicDescription": "Counts the number of Blend Uops issued by the Resource Allocation Table (RAT) to the reservation station (RS) in order to preserve upper bits of vector registers. Starting with the Skylake microarchitecture, these Blend uops are needed since every Intel SSE instruction executed in Dirty Upper State needs to preserve bits 128-255 of the destination register. For more information, refer to Mixing Intel AVX and Intel SSE Code section of the Optimization Guide.",
130 "SampleAfterValue": "2000003", 130 "SampleAfterValue": "2000003",
131 "CounterHTOff": "0,1,2,3,4,5,6,7" 131 "CounterHTOff": "0,1,2,3,4,5,6,7"
132 }, 132 },
@@ -762,11 +762,10 @@
762 "EdgeDetect": "1", 762 "EdgeDetect": "1",
763 "EventCode": "0xC3", 763 "EventCode": "0xC3",
764 "UMask": "0x1", 764 "UMask": "0x1",
765 "BriefDescription": "Number of machine clears (nukes) of any type. ", 765 "BriefDescription": "Number of machine clears (nukes) of any type.",
766 "Counter": "0,1,2,3", 766 "Counter": "0,1,2,3",
767 "EventName": "MACHINE_CLEARS.COUNT", 767 "EventName": "MACHINE_CLEARS.COUNT",
768 "CounterMask": "1", 768 "CounterMask": "1",
769 "PublicDescription": "Number of machine clears (nukes) of any type.",
770 "SampleAfterValue": "100003", 769 "SampleAfterValue": "100003",
771 "CounterHTOff": "0,1,2,3,4,5,6,7" 770 "CounterHTOff": "0,1,2,3,4,5,6,7"
772 }, 771 },
@@ -799,7 +798,7 @@
799 "Counter": "0,1,2,3", 798 "Counter": "0,1,2,3",
800 "EventName": "BR_INST_RETIRED.CONDITIONAL", 799 "EventName": "BR_INST_RETIRED.CONDITIONAL",
801 "Errata": "SKL091", 800 "Errata": "SKL091",
802 "PublicDescription": "This is a non-precise version (that is, does not use PEBS) of the event that counts conditional branch instructions retired.", 801 "PublicDescription": "This is a precise version (that is, uses PEBS) of the event that counts conditional branch instructions retired.",
803 "SampleAfterValue": "400009", 802 "SampleAfterValue": "400009",
804 "CounterHTOff": "0,1,2,3,4,5,6,7" 803 "CounterHTOff": "0,1,2,3,4,5,6,7"
805 }, 804 },
@@ -811,14 +810,14 @@
811 "Counter": "0,1,2,3", 810 "Counter": "0,1,2,3",
812 "EventName": "BR_INST_RETIRED.NEAR_CALL", 811 "EventName": "BR_INST_RETIRED.NEAR_CALL",
813 "Errata": "SKL091", 812 "Errata": "SKL091",
814 "PublicDescription": "This is a non-precise version (that is, does not use PEBS) of the event that counts both direct and indirect near call instructions retired.", 813 "PublicDescription": "This is a precise version (that is, uses PEBS) of the event that counts both direct and indirect near call instructions retired.",
815 "SampleAfterValue": "100007", 814 "SampleAfterValue": "100007",
816 "CounterHTOff": "0,1,2,3,4,5,6,7" 815 "CounterHTOff": "0,1,2,3,4,5,6,7"
817 }, 816 },
818 { 817 {
819 "EventCode": "0xC4", 818 "EventCode": "0xC4",
820 "UMask": "0x4", 819 "UMask": "0x4",
821 "BriefDescription": "All (macro) branch instructions retired. ", 820 "BriefDescription": "All (macro) branch instructions retired.",
822 "PEBS": "2", 821 "PEBS": "2",
823 "Counter": "0,1,2,3", 822 "Counter": "0,1,2,3",
824 "EventName": "BR_INST_RETIRED.ALL_BRANCHES_PEBS", 823 "EventName": "BR_INST_RETIRED.ALL_BRANCHES_PEBS",
@@ -835,7 +834,7 @@
835 "Counter": "0,1,2,3", 834 "Counter": "0,1,2,3",
836 "EventName": "BR_INST_RETIRED.NEAR_RETURN", 835 "EventName": "BR_INST_RETIRED.NEAR_RETURN",
837 "Errata": "SKL091", 836 "Errata": "SKL091",
838 "PublicDescription": "This is a non-precise version (that is, does not use PEBS) of the event that counts return instructions retired.", 837 "PublicDescription": "This is a precise version (that is, uses PEBS) of the event that counts return instructions retired.",
839 "SampleAfterValue": "100007", 838 "SampleAfterValue": "100007",
840 "CounterHTOff": "0,1,2,3,4,5,6,7" 839 "CounterHTOff": "0,1,2,3,4,5,6,7"
841 }, 840 },
@@ -858,19 +857,19 @@
858 "Counter": "0,1,2,3", 857 "Counter": "0,1,2,3",
859 "EventName": "BR_INST_RETIRED.NEAR_TAKEN", 858 "EventName": "BR_INST_RETIRED.NEAR_TAKEN",
860 "Errata": "SKL091", 859 "Errata": "SKL091",
861 "PublicDescription": "This is a non-precise version (that is, does not use PEBS) of the event that counts taken branch instructions retired.", 860 "PublicDescription": "This is a precise version (that is, uses PEBS) of the event that counts taken branch instructions retired.",
862 "SampleAfterValue": "400009", 861 "SampleAfterValue": "400009",
863 "CounterHTOff": "0,1,2,3,4,5,6,7" 862 "CounterHTOff": "0,1,2,3,4,5,6,7"
864 }, 863 },
865 { 864 {
866 "EventCode": "0xC4", 865 "EventCode": "0xC4",
867 "UMask": "0x40", 866 "UMask": "0x40",
868 "BriefDescription": "Far branch instructions retired.", 867 "BriefDescription": "Counts the number of far branch instructions retired.",
869 "PEBS": "1", 868 "PEBS": "1",
870 "Counter": "0,1,2,3", 869 "Counter": "0,1,2,3",
871 "EventName": "BR_INST_RETIRED.FAR_BRANCH", 870 "EventName": "BR_INST_RETIRED.FAR_BRANCH",
872 "Errata": "SKL091", 871 "Errata": "SKL091",
873 "PublicDescription": "This is a non-precise version (that is, does not use PEBS) of the event that counts far branch instructions retired.", 872 "PublicDescription": "This is a precise version (that is, uses PEBS) of the event that counts far branch instructions retired.",
874 "SampleAfterValue": "100007", 873 "SampleAfterValue": "100007",
875 "CounterHTOff": "0,1,2,3,4,5,6,7" 874 "CounterHTOff": "0,1,2,3,4,5,6,7"
876 }, 875 },
@@ -891,7 +890,7 @@
891 "PEBS": "1", 890 "PEBS": "1",
892 "Counter": "0,1,2,3", 891 "Counter": "0,1,2,3",
893 "EventName": "BR_MISP_RETIRED.CONDITIONAL", 892 "EventName": "BR_MISP_RETIRED.CONDITIONAL",
894 "PublicDescription": "This is a non-precise version (that is, does not use PEBS) of the event that counts mispredicted conditional branch instructions retired.", 893 "PublicDescription": "This is a precise version (that is, uses PEBS) of the event that counts mispredicted conditional branch instructions retired.",
895 "SampleAfterValue": "400009", 894 "SampleAfterValue": "400009",
896 "CounterHTOff": "0,1,2,3,4,5,6,7" 895 "CounterHTOff": "0,1,2,3,4,5,6,7"
897 }, 896 },
@@ -902,14 +901,14 @@
902 "PEBS": "1", 901 "PEBS": "1",
903 "Counter": "0,1,2,3", 902 "Counter": "0,1,2,3",
904 "EventName": "BR_MISP_RETIRED.NEAR_CALL", 903 "EventName": "BR_MISP_RETIRED.NEAR_CALL",
905 "PublicDescription": "Counts both taken and not taken retired mispredicted direct and indirect near calls, including both register and memory indirect.", 904 "PublicDescription": "This event counts both taken and not taken retired mispredicted direct and indirect near calls, including both register and memory indirect.",
906 "SampleAfterValue": "400009", 905 "SampleAfterValue": "400009",
907 "CounterHTOff": "0,1,2,3,4,5,6,7" 906 "CounterHTOff": "0,1,2,3,4,5,6,7"
908 }, 907 },
909 { 908 {
910 "EventCode": "0xC5", 909 "EventCode": "0xC5",
911 "UMask": "0x4", 910 "UMask": "0x4",
912 "BriefDescription": "Mispredicted macro branch instructions retired. ", 911 "BriefDescription": "Mispredicted macro branch instructions retired.",
913 "PEBS": "2", 912 "PEBS": "2",
914 "Counter": "0,1,2,3", 913 "Counter": "0,1,2,3",
915 "EventName": "BR_MISP_RETIRED.ALL_BRANCHES_PEBS", 914 "EventName": "BR_MISP_RETIRED.ALL_BRANCHES_PEBS",
@@ -920,10 +919,11 @@
920 { 919 {
921 "EventCode": "0xC5", 920 "EventCode": "0xC5",
922 "UMask": "0x20", 921 "UMask": "0x20",
923 "BriefDescription": "Number of near branch instructions retired that were mispredicted and taken.", 922 "BriefDescription": "Number of near branch instructions retired that were mispredicted and taken. ",
924 "PEBS": "1", 923 "PEBS": "1",
925 "Counter": "0,1,2,3", 924 "Counter": "0,1,2,3",
926 "EventName": "BR_MISP_RETIRED.NEAR_TAKEN", 925 "EventName": "BR_MISP_RETIRED.NEAR_TAKEN",
926 "PublicDescription": "Number of near branch instructions retired that were mispredicted and taken.",
927 "SampleAfterValue": "400009", 927 "SampleAfterValue": "400009",
928 "CounterHTOff": "0,1,2,3,4,5,6,7" 928 "CounterHTOff": "0,1,2,3,4,5,6,7"
929 }, 929 },
diff --git a/tools/perf/pmu-events/arch/x86/skylakex/skx-metrics.json b/tools/perf/pmu-events/arch/x86/skylakex/skx-metrics.json
new file mode 100644
index 000000000000..36c903faed0b
--- /dev/null
+++ b/tools/perf/pmu-events/arch/x86/skylakex/skx-metrics.json
@@ -0,0 +1,164 @@
1[
2 {
3 "BriefDescription": "Instructions Per Cycle (per logical thread)",
4 "MetricExpr": "INST_RETIRED.ANY / CPU_CLK_UNHALTED.THREAD",
5 "MetricGroup": "TopDownL1",
6 "MetricName": "IPC"
7 },
8 {
9 "BriefDescription": "Uops Per Instruction",
10 "MetricExpr": "UOPS_RETIRED.RETIRE_SLOTS / INST_RETIRED.ANY",
11 "MetricGroup": "Pipeline",
12 "MetricName": "UPI"
13 },
14 {
15 "BriefDescription": "Rough Estimation of fraction of fetched lines bytes that were likely consumed by program instructions",
16 "MetricExpr": "min( 1 , UOPS_ISSUED.ANY / ((UOPS_RETIRED.RETIRE_SLOTS / INST_RETIRED.ANY) * 64 * ( ICACHE_64B.IFTAG_HIT + ICACHE_64B.IFTAG_MISS ) / 4.1) )",
17 "MetricGroup": "Frontend",
18 "MetricName": "IFetch_Line_Utilization"
19 },
20 {
21 "BriefDescription": "Fraction of Uops delivered by the DSB (aka Decoded Icache; or Uop Cache)",
22 "MetricExpr": "IDQ.DSB_UOPS / ( IDQ.DSB_UOPS + LSD.UOPS + IDQ.MITE_UOPS + IDQ.MS_UOPS )",
23 "MetricGroup": "DSB; Frontend_Bandwidth",
24 "MetricName": "DSB_Coverage"
25 },
26 {
27 "BriefDescription": "Cycles Per Instruction (threaded)",
28 "MetricExpr": "1 / (INST_RETIRED.ANY / cycles)",
29 "MetricGroup": "Pipeline;Summary",
30 "MetricName": "CPI"
31 },
32 {
33 "BriefDescription": "Per-thread actual clocks when the logical processor is active. This is called 'Clockticks' in VTune.",
34 "MetricExpr": "CPU_CLK_UNHALTED.THREAD",
35 "MetricGroup": "Summary",
36 "MetricName": "CLKS"
37 },
38 {
39 "BriefDescription": "Total issue-pipeline slots",
40 "MetricExpr": "4*(( CPU_CLK_UNHALTED.THREAD_ANY / 2 ) if #SMT_on else cycles)",
41 "MetricGroup": "TopDownL1",
42 "MetricName": "SLOTS"
43 },
44 {
45 "BriefDescription": "Total number of retired Instructions",
46 "MetricExpr": "INST_RETIRED.ANY",
47 "MetricGroup": "Summary",
48 "MetricName": "Instructions"
49 },
50 {
51 "BriefDescription": "Instructions Per Cycle (per physical core)",
52 "MetricExpr": "INST_RETIRED.ANY / (( CPU_CLK_UNHALTED.THREAD_ANY / 2 ) if #SMT_on else cycles)",
53 "MetricGroup": "SMT",
54 "MetricName": "CoreIPC"
55 },
56 {
57 "BriefDescription": "Instruction-Level-Parallelism (average number of uops executed when there is at least 1 uop executed)",
58 "MetricExpr": "UOPS_EXECUTED.THREAD / (( UOPS_EXECUTED.CORE_CYCLES_GE_1 / 2) if #SMT_on else UOPS_EXECUTED.CORE_CYCLES_GE_1)",
59 "MetricGroup": "Pipeline;Ports_Utilization",
60 "MetricName": "ILP"
61 },
62 {
63 "BriefDescription": "Average Branch Address Clear Cost (fraction of cycles)",
64 "MetricExpr": "2* (( RS_EVENTS.EMPTY_CYCLES - ICACHE_16B.IFDATA_STALL - ICACHE_64B.IFTAG_STALL ) / RS_EVENTS.EMPTY_END)",
65 "MetricGroup": "Unknown_Branches",
66 "MetricName": "BAClear_Cost"
67 },
68 {
69 "BriefDescription": "Core actual clocks when any thread is active on the physical core",
70 "MetricExpr": "( CPU_CLK_UNHALTED.THREAD_ANY / 2 ) if #SMT_on else CPU_CLK_UNHALTED.THREAD",
71 "MetricGroup": "SMT",
72 "MetricName": "CORE_CLKS"
73 },
74 {
75 "BriefDescription": "Actual Average Latency for L1 data-cache miss demand loads",
76 "MetricExpr": "L1D_PEND_MISS.PENDING / ( MEM_LOAD_RETIRED.L1_MISS_PS + MEM_LOAD_RETIRED.FB_HIT_PS )",
77 "MetricGroup": "Memory_Bound;Memory_Lat",
78 "MetricName": "Load_Miss_Real_Latency"
79 },
80 {
81 "BriefDescription": "Memory-Level-Parallelism (average number of L1 miss demand load when there is at least 1 such miss)",
82 "MetricExpr": "L1D_PEND_MISS.PENDING / (( L1D_PEND_MISS.PENDING_CYCLES_ANY / 2) if #SMT_on else L1D_PEND_MISS.PENDING_CYCLES)",
83 "MetricGroup": "Memory_Bound;Memory_BW",
84 "MetricName": "MLP"
85 },
86 {
87 "BriefDescription": "Utilization of the core's Page Walker(s) serving STLB misses triggered by instruction/Load/Store accesses",
88 "MetricExpr": "( ITLB_MISSES.WALK_PENDING + DTLB_LOAD_MISSES.WALK_PENDING + DTLB_STORE_MISSES.WALK_PENDING + EPT.WALK_PENDING ) / ( 2 * (( CPU_CLK_UNHALTED.THREAD_ANY / 2 ) if #SMT_on else cycles) )",
89 "MetricGroup": "TLB",
90 "MetricName": "Page_Walks_Utilization"
91 },
92 {
93 "BriefDescription": "Average CPU Utilization",
94 "MetricExpr": "CPU_CLK_UNHALTED.REF_TSC / msr@tsc@",
95 "MetricGroup": "Summary",
96 "MetricName": "CPU_Utilization"
97 },
98 {
99 "BriefDescription": "Giga Floating Point Operations Per Second",
100 "MetricExpr": "(( 1*( FP_ARITH_INST_RETIRED.SCALAR_SINGLE + FP_ARITH_INST_RETIRED.SCALAR_DOUBLE ) + 2* FP_ARITH_INST_RETIRED.128B_PACKED_DOUBLE + 4*( FP_ARITH_INST_RETIRED.128B_PACKED_SINGLE + FP_ARITH_INST_RETIRED.256B_PACKED_DOUBLE ) + 8* FP_ARITH_INST_RETIRED.256B_PACKED_SINGLE )) / 1000000000 / duration_time",
101 "MetricGroup": "FLOPS;Summary",
102 "MetricName": "GFLOPs"
103 },
104 {
105 "BriefDescription": "Average Frequency Utilization relative nominal frequency",
106 "MetricExpr": "CPU_CLK_UNHALTED.THREAD / CPU_CLK_UNHALTED.REF_TSC",
107 "MetricGroup": "Power",
108 "MetricName": "Turbo_Utilization"
109 },
110 {
111 "BriefDescription": "Fraction of cycles where both hardware threads were active",
112 "MetricExpr": "1 - CPU_CLK_THREAD_UNHALTED.ONE_THREAD_ACTIVE / ( CPU_CLK_THREAD_UNHALTED.REF_XCLK_ANY / 2 ) if #SMT_on else 0",
113 "MetricGroup": "SMT;Summary",
114 "MetricName": "SMT_2T_Utilization"
115 },
116 {
117 "BriefDescription": "Fraction of cycles spent in Kernel mode",
118 "MetricExpr": "CPU_CLK_UNHALTED.REF_TSC:u / CPU_CLK_UNHALTED.REF_TSC",
119 "MetricGroup": "Summary",
120 "MetricName": "Kernel_Utilization"
121 },
122 {
123 "BriefDescription": "C3 residency percent per core",
124 "MetricExpr": "(cstate_core@c3\\-residency@ / msr@tsc@) * 100",
125 "MetricGroup": "Power",
126 "MetricName": "C3_Core_Residency"
127 },
128 {
129 "BriefDescription": "C6 residency percent per core",
130 "MetricExpr": "(cstate_core@c6\\-residency@ / msr@tsc@) * 100",
131 "MetricGroup": "Power",
132 "MetricName": "C6_Core_Residency"
133 },
134 {
135 "BriefDescription": "C7 residency percent per core",
136 "MetricExpr": "(cstate_core@c7\\-residency@ / msr@tsc@) * 100",
137 "MetricGroup": "Power",
138 "MetricName": "C7_Core_Residency"
139 },
140 {
141 "BriefDescription": "C2 residency percent per package",
142 "MetricExpr": "(cstate_pkg@c2\\-residency@ / msr@tsc@) * 100",
143 "MetricGroup": "Power",
144 "MetricName": "C2_Pkg_Residency"
145 },
146 {
147 "BriefDescription": "C3 residency percent per package",
148 "MetricExpr": "(cstate_pkg@c3\\-residency@ / msr@tsc@) * 100",
149 "MetricGroup": "Power",
150 "MetricName": "C3_Pkg_Residency"
151 },
152 {
153 "BriefDescription": "C6 residency percent per package",
154 "MetricExpr": "(cstate_pkg@c6\\-residency@ / msr@tsc@) * 100",
155 "MetricGroup": "Power",
156 "MetricName": "C6_Pkg_Residency"
157 },
158 {
159 "BriefDescription": "C7 residency percent per package",
160 "MetricExpr": "(cstate_pkg@c7\\-residency@ / msr@tsc@) * 100",
161 "MetricGroup": "Power",
162 "MetricName": "C7_Pkg_Residency"
163 }
164]
diff --git a/tools/perf/pmu-events/arch/x86/skylakex/virtual-memory.json b/tools/perf/pmu-events/arch/x86/skylakex/virtual-memory.json
index 70750dab7ead..7f466c97e485 100644
--- a/tools/perf/pmu-events/arch/x86/skylakex/virtual-memory.json
+++ b/tools/perf/pmu-events/arch/x86/skylakex/virtual-memory.json
@@ -12,30 +12,30 @@
12 { 12 {
13 "EventCode": "0x08", 13 "EventCode": "0x08",
14 "UMask": "0x2", 14 "UMask": "0x2",
15 "BriefDescription": "Demand load Miss in all translation lookaside buffer (TLB) levels causes a page walk that completes (4K).", 15 "BriefDescription": "Page walk completed due to a demand data load to a 4K page",
16 "Counter": "0,1,2,3", 16 "Counter": "0,1,2,3",
17 "EventName": "DTLB_LOAD_MISSES.WALK_COMPLETED_4K", 17 "EventName": "DTLB_LOAD_MISSES.WALK_COMPLETED_4K",
18 "PublicDescription": "Counts demand data loads that caused a completed page walk (4K page size). This implies it missed in all TLB levels. The page walk can end with or without a fault.", 18 "PublicDescription": "Counts page walks completed due to demand data loads whose address translations missed in the TLB and were mapped to 4K pages. The page walks can end with or without a page fault.",
19 "SampleAfterValue": "2000003", 19 "SampleAfterValue": "2000003",
20 "CounterHTOff": "0,1,2,3,4,5,6,7" 20 "CounterHTOff": "0,1,2,3,4,5,6,7"
21 }, 21 },
22 { 22 {
23 "EventCode": "0x08", 23 "EventCode": "0x08",
24 "UMask": "0x4", 24 "UMask": "0x4",
25 "BriefDescription": "Demand load Miss in all translation lookaside buffer (TLB) levels causes a page walk that completes (2M/4M).", 25 "BriefDescription": "Page walk completed due to a demand data load to a 2M/4M page",
26 "Counter": "0,1,2,3", 26 "Counter": "0,1,2,3",
27 "EventName": "DTLB_LOAD_MISSES.WALK_COMPLETED_2M_4M", 27 "EventName": "DTLB_LOAD_MISSES.WALK_COMPLETED_2M_4M",
28 "PublicDescription": "Counts demand data loads that caused a completed page walk (2M and 4M page sizes). This implies it missed in all TLB levels. The page walk can end with or without a fault.", 28 "PublicDescription": "Counts page walks completed due to demand data loads whose address translations missed in the TLB and were mapped to 2M/4M pages. The page walks can end with or without a page fault.",
29 "SampleAfterValue": "2000003", 29 "SampleAfterValue": "2000003",
30 "CounterHTOff": "0,1,2,3,4,5,6,7" 30 "CounterHTOff": "0,1,2,3,4,5,6,7"
31 }, 31 },
32 { 32 {
33 "EventCode": "0x08", 33 "EventCode": "0x08",
34 "UMask": "0x8", 34 "UMask": "0x8",
35 "BriefDescription": "Load miss in all TLB levels causes a page walk that completes. (1G)", 35 "BriefDescription": "Page walk completed due to a demand data load to a 1G page",
36 "Counter": "0,1,2,3", 36 "Counter": "0,1,2,3",
37 "EventName": "DTLB_LOAD_MISSES.WALK_COMPLETED_1G", 37 "EventName": "DTLB_LOAD_MISSES.WALK_COMPLETED_1G",
38 "PublicDescription": "Counts load misses in all DTLB levels that cause a completed page walk (1G page size). The page walk can end with or without a fault.", 38 "PublicDescription": "Counts page walks completed due to demand data loads whose address translations missed in the TLB and were mapped to 4K pages. The page walks can end with or without a page fault.",
39 "SampleAfterValue": "2000003", 39 "SampleAfterValue": "2000003",
40 "CounterHTOff": "0,1,2,3,4,5,6,7" 40 "CounterHTOff": "0,1,2,3,4,5,6,7"
41 }, 41 },
@@ -52,17 +52,17 @@
52 { 52 {
53 "EventCode": "0x08", 53 "EventCode": "0x08",
54 "UMask": "0x10", 54 "UMask": "0x10",
55 "BriefDescription": "Counts 1 per cycle for each PMH that is busy with a page walk for a load. EPT page walk duration are excluded in Skylake. ", 55 "BriefDescription": "Counts 1 per cycle for each PMH that is busy with a page walk for a load. EPT page walk duration are excluded in Skylake.",
56 "Counter": "0,1,2,3", 56 "Counter": "0,1,2,3",
57 "EventName": "DTLB_LOAD_MISSES.WALK_PENDING", 57 "EventName": "DTLB_LOAD_MISSES.WALK_PENDING",
58 "PublicDescription": "Counts 1 per cycle for each PMH that is busy with a page walk for a load. EPT page walk duration are excluded in Skylake microarchitecture. ", 58 "PublicDescription": "Counts 1 per cycle for each PMH that is busy with a page walk for a load. EPT page walk duration are excluded in Skylake microarchitecture.",
59 "SampleAfterValue": "2000003", 59 "SampleAfterValue": "2000003",
60 "CounterHTOff": "0,1,2,3,4,5,6,7" 60 "CounterHTOff": "0,1,2,3,4,5,6,7"
61 }, 61 },
62 { 62 {
63 "EventCode": "0x08", 63 "EventCode": "0x08",
64 "UMask": "0x10", 64 "UMask": "0x10",
65 "BriefDescription": "Cycles when at least one PMH is busy with a page walk for a load. EPT page walk duration are excluded in Skylake. ", 65 "BriefDescription": "Cycles when at least one PMH is busy with a page walk for a load. EPT page walk duration are excluded in Skylake.",
66 "Counter": "0,1,2,3", 66 "Counter": "0,1,2,3",
67 "EventName": "DTLB_LOAD_MISSES.WALK_ACTIVE", 67 "EventName": "DTLB_LOAD_MISSES.WALK_ACTIVE",
68 "CounterMask": "1", 68 "CounterMask": "1",
@@ -93,30 +93,30 @@
93 { 93 {
94 "EventCode": "0x49", 94 "EventCode": "0x49",
95 "UMask": "0x2", 95 "UMask": "0x2",
96 "BriefDescription": "Store miss in all TLB levels causes a page walk that completes. (4K)", 96 "BriefDescription": "Page walk completed due to a demand data store to a 4K page",
97 "Counter": "0,1,2,3", 97 "Counter": "0,1,2,3",
98 "EventName": "DTLB_STORE_MISSES.WALK_COMPLETED_4K", 98 "EventName": "DTLB_STORE_MISSES.WALK_COMPLETED_4K",
99 "PublicDescription": "Counts demand data stores that caused a completed page walk (4K page size). This implies it missed in all TLB levels. The page walk can end with or without a fault.", 99 "PublicDescription": "Counts page walks completed due to demand data stores whose address translations missed in the TLB and were mapped to 4K pages. The page walks can end with or without a page fault.",
100 "SampleAfterValue": "100003", 100 "SampleAfterValue": "100003",
101 "CounterHTOff": "0,1,2,3,4,5,6,7" 101 "CounterHTOff": "0,1,2,3,4,5,6,7"
102 }, 102 },
103 { 103 {
104 "EventCode": "0x49", 104 "EventCode": "0x49",
105 "UMask": "0x4", 105 "UMask": "0x4",
106 "BriefDescription": "Store misses in all DTLB levels that cause completed page walks (2M/4M)", 106 "BriefDescription": "Page walk completed due to a demand data store to a 2M/4M page",
107 "Counter": "0,1,2,3", 107 "Counter": "0,1,2,3",
108 "EventName": "DTLB_STORE_MISSES.WALK_COMPLETED_2M_4M", 108 "EventName": "DTLB_STORE_MISSES.WALK_COMPLETED_2M_4M",
109 "PublicDescription": "Counts demand data stores that caused a completed page walk (2M and 4M page sizes). This implies it missed in all TLB levels. The page walk can end with or without a fault.", 109 "PublicDescription": "Counts page walks completed due to demand data stores whose address translations missed in the TLB and were mapped to 2M/4M pages. The page walks can end with or without a page fault.",
110 "SampleAfterValue": "100003", 110 "SampleAfterValue": "100003",
111 "CounterHTOff": "0,1,2,3,4,5,6,7" 111 "CounterHTOff": "0,1,2,3,4,5,6,7"
112 }, 112 },
113 { 113 {
114 "EventCode": "0x49", 114 "EventCode": "0x49",
115 "UMask": "0x8", 115 "UMask": "0x8",
116 "BriefDescription": "Store misses in all DTLB levels that cause completed page walks (1G)", 116 "BriefDescription": "Page walk completed due to a demand data store to a 1G page",
117 "Counter": "0,1,2,3", 117 "Counter": "0,1,2,3",
118 "EventName": "DTLB_STORE_MISSES.WALK_COMPLETED_1G", 118 "EventName": "DTLB_STORE_MISSES.WALK_COMPLETED_1G",
119 "PublicDescription": "Counts store misses in all DTLB levels that cause a completed page walk (1G page size). The page walk can end with or without a fault.", 119 "PublicDescription": "Counts page walks completed due to demand data stores whose address translations missed in the TLB and were mapped to 1G pages. The page walks can end with or without a page fault.",
120 "SampleAfterValue": "100003", 120 "SampleAfterValue": "100003",
121 "CounterHTOff": "0,1,2,3,4,5,6,7" 121 "CounterHTOff": "0,1,2,3,4,5,6,7"
122 }, 122 },
@@ -133,17 +133,17 @@
133 { 133 {
134 "EventCode": "0x49", 134 "EventCode": "0x49",
135 "UMask": "0x10", 135 "UMask": "0x10",
136 "BriefDescription": "Counts 1 per cycle for each PMH that is busy with a page walk for a store. EPT page walk duration are excluded in Skylake. ", 136 "BriefDescription": "Counts 1 per cycle for each PMH that is busy with a page walk for a store. EPT page walk duration are excluded in Skylake.",
137 "Counter": "0,1,2,3", 137 "Counter": "0,1,2,3",
138 "EventName": "DTLB_STORE_MISSES.WALK_PENDING", 138 "EventName": "DTLB_STORE_MISSES.WALK_PENDING",
139 "PublicDescription": "Counts 1 per cycle for each PMH that is busy with a page walk for a store. EPT page walk duration are excluded in Skylake microarchitecture. ", 139 "PublicDescription": "Counts 1 per cycle for each PMH that is busy with a page walk for a store. EPT page walk duration are excluded in Skylake microarchitecture.",
140 "SampleAfterValue": "2000003", 140 "SampleAfterValue": "2000003",
141 "CounterHTOff": "0,1,2,3,4,5,6,7" 141 "CounterHTOff": "0,1,2,3,4,5,6,7"
142 }, 142 },
143 { 143 {
144 "EventCode": "0x49", 144 "EventCode": "0x49",
145 "UMask": "0x10", 145 "UMask": "0x10",
146 "BriefDescription": "Cycles when at least one PMH is busy with a page walk for a store. EPT page walk duration are excluded in Skylake. ", 146 "BriefDescription": "Cycles when at least one PMH is busy with a page walk for a store. EPT page walk duration are excluded in Skylake.",
147 "Counter": "0,1,2,3", 147 "Counter": "0,1,2,3",
148 "EventName": "DTLB_STORE_MISSES.WALK_ACTIVE", 148 "EventName": "DTLB_STORE_MISSES.WALK_ACTIVE",
149 "CounterMask": "1", 149 "CounterMask": "1",
@@ -197,7 +197,7 @@
197 "BriefDescription": "Code miss in all TLB levels causes a page walk that completes. (2M/4M)", 197 "BriefDescription": "Code miss in all TLB levels causes a page walk that completes. (2M/4M)",
198 "Counter": "0,1,2,3", 198 "Counter": "0,1,2,3",
199 "EventName": "ITLB_MISSES.WALK_COMPLETED_2M_4M", 199 "EventName": "ITLB_MISSES.WALK_COMPLETED_2M_4M",
200 "PublicDescription": "Counts completed page walks of any page size (4K/2M/4M/1G) caused by a code fetch. This implies it missed in the ITLB and further levels of TLB. The page walk can end with or without a fault.", 200 "PublicDescription": "Counts code misses in all ITLB levels that caused a completed page walk (2M and 4M page sizes). The page walk can end with or without a fault.",
201 "SampleAfterValue": "100003", 201 "SampleAfterValue": "100003",
202 "CounterHTOff": "0,1,2,3,4,5,6,7" 202 "CounterHTOff": "0,1,2,3,4,5,6,7"
203 }, 203 },
@@ -224,10 +224,10 @@
224 { 224 {
225 "EventCode": "0x85", 225 "EventCode": "0x85",
226 "UMask": "0x10", 226 "UMask": "0x10",
227 "BriefDescription": "Counts 1 per cycle for each PMH that is busy with a page walk for an instruction fetch request. EPT page walk duration are excluded in Skylake. ", 227 "BriefDescription": "Counts 1 per cycle for each PMH that is busy with a page walk for an instruction fetch request. EPT page walk duration are excluded in Skylake.",
228 "Counter": "0,1,2,3", 228 "Counter": "0,1,2,3",
229 "EventName": "ITLB_MISSES.WALK_PENDING", 229 "EventName": "ITLB_MISSES.WALK_PENDING",
230 "PublicDescription": "Counts 1 per cycle for each PMH (Page Miss Handler) that is busy with a page walk for an instruction fetch request. EPT page walk duration are excluded in Skylake michroarchitecture. ", 230 "PublicDescription": "Counts 1 per cycle for each PMH (Page Miss Handler) that is busy with a page walk for an instruction fetch request. EPT page walk duration are excluded in Skylake michroarchitecture.",
231 "SampleAfterValue": "100003", 231 "SampleAfterValue": "100003",
232 "CounterHTOff": "0,1,2,3,4,5,6,7" 232 "CounterHTOff": "0,1,2,3,4,5,6,7"
233 }, 233 },
diff --git a/tools/perf/pmu-events/jevents.c b/tools/perf/pmu-events/jevents.c
index d51dc9ca8861..b578aa26e375 100644
--- a/tools/perf/pmu-events/jevents.c
+++ b/tools/perf/pmu-events/jevents.c
@@ -116,6 +116,43 @@ static void fixdesc(char *s)
116 *e = 0; 116 *e = 0;
117} 117}
118 118
119/* Add escapes for '\' so they are proper C strings. */
120static char *fixregex(char *s)
121{
122 int len = 0;
123 int esc_count = 0;
124 char *fixed = NULL;
125 char *p, *q;
126
127 /* Count the number of '\' in string */
128 for (p = s; *p; p++) {
129 ++len;
130 if (*p == '\\')
131 ++esc_count;
132 }
133
134 if (esc_count == 0)
135 return s;
136
137 /* allocate space for a new string */
138 fixed = (char *) malloc(len + 1);
139 if (!fixed)
140 return NULL;
141
142 /* copy over the characters */
143 q = fixed;
144 for (p = s; *p; p++) {
145 if (*p == '\\') {
146 *q = '\\';
147 ++q;
148 }
149 *q = *p;
150 ++q;
151 }
152 *q = '\0';
153 return fixed;
154}
155
119static struct msrmap { 156static struct msrmap {
120 const char *num; 157 const char *num;
121 const char *pname; 158 const char *pname;
@@ -292,7 +329,7 @@ static int print_events_table_entry(void *data, char *name, char *event,
292 char *desc, char *long_desc, 329 char *desc, char *long_desc,
293 char *pmu, char *unit, char *perpkg, 330 char *pmu, char *unit, char *perpkg,
294 char *metric_expr, 331 char *metric_expr,
295 char *metric_name) 332 char *metric_name, char *metric_group)
296{ 333{
297 struct perf_entry_data *pd = data; 334 struct perf_entry_data *pd = data;
298 FILE *outfp = pd->outfp; 335 FILE *outfp = pd->outfp;
@@ -304,8 +341,10 @@ static int print_events_table_entry(void *data, char *name, char *event,
304 */ 341 */
305 fprintf(outfp, "{\n"); 342 fprintf(outfp, "{\n");
306 343
307 fprintf(outfp, "\t.name = \"%s\",\n", name); 344 if (name)
308 fprintf(outfp, "\t.event = \"%s\",\n", event); 345 fprintf(outfp, "\t.name = \"%s\",\n", name);
346 if (event)
347 fprintf(outfp, "\t.event = \"%s\",\n", event);
309 fprintf(outfp, "\t.desc = \"%s\",\n", desc); 348 fprintf(outfp, "\t.desc = \"%s\",\n", desc);
310 fprintf(outfp, "\t.topic = \"%s\",\n", topic); 349 fprintf(outfp, "\t.topic = \"%s\",\n", topic);
311 if (long_desc && long_desc[0]) 350 if (long_desc && long_desc[0])
@@ -320,6 +359,8 @@ static int print_events_table_entry(void *data, char *name, char *event,
320 fprintf(outfp, "\t.metric_expr = \"%s\",\n", metric_expr); 359 fprintf(outfp, "\t.metric_expr = \"%s\",\n", metric_expr);
321 if (metric_name) 360 if (metric_name)
322 fprintf(outfp, "\t.metric_name = \"%s\",\n", metric_name); 361 fprintf(outfp, "\t.metric_name = \"%s\",\n", metric_name);
362 if (metric_group)
363 fprintf(outfp, "\t.metric_group = \"%s\",\n", metric_group);
323 fprintf(outfp, "},\n"); 364 fprintf(outfp, "},\n");
324 365
325 return 0; 366 return 0;
@@ -357,6 +398,9 @@ static char *real_event(const char *name, char *event)
357{ 398{
358 int i; 399 int i;
359 400
401 if (!name)
402 return NULL;
403
360 for (i = 0; fixed[i].name; i++) 404 for (i = 0; fixed[i].name; i++)
361 if (!strcasecmp(name, fixed[i].name)) 405 if (!strcasecmp(name, fixed[i].name))
362 return (char *)fixed[i].event; 406 return (char *)fixed[i].event;
@@ -369,7 +413,7 @@ int json_events(const char *fn,
369 char *long_desc, 413 char *long_desc,
370 char *pmu, char *unit, char *perpkg, 414 char *pmu, char *unit, char *perpkg,
371 char *metric_expr, 415 char *metric_expr,
372 char *metric_name), 416 char *metric_name, char *metric_group),
373 void *data) 417 void *data)
374{ 418{
375 int err = -EIO; 419 int err = -EIO;
@@ -397,6 +441,7 @@ int json_events(const char *fn,
397 char *unit = NULL; 441 char *unit = NULL;
398 char *metric_expr = NULL; 442 char *metric_expr = NULL;
399 char *metric_name = NULL; 443 char *metric_name = NULL;
444 char *metric_group = NULL;
400 unsigned long long eventcode = 0; 445 unsigned long long eventcode = 0;
401 struct msrmap *msr = NULL; 446 struct msrmap *msr = NULL;
402 jsmntok_t *msrval = NULL; 447 jsmntok_t *msrval = NULL;
@@ -476,6 +521,8 @@ int json_events(const char *fn,
476 addfield(map, &perpkg, "", "", val); 521 addfield(map, &perpkg, "", "", val);
477 } else if (json_streq(map, field, "MetricName")) { 522 } else if (json_streq(map, field, "MetricName")) {
478 addfield(map, &metric_name, "", "", val); 523 addfield(map, &metric_name, "", "", val);
524 } else if (json_streq(map, field, "MetricGroup")) {
525 addfield(map, &metric_group, "", "", val);
479 } else if (json_streq(map, field, "MetricExpr")) { 526 } else if (json_streq(map, field, "MetricExpr")) {
480 addfield(map, &metric_expr, "", "", val); 527 addfield(map, &metric_expr, "", "", val);
481 for (s = metric_expr; *s; s++) 528 for (s = metric_expr; *s; s++)
@@ -501,10 +548,11 @@ int json_events(const char *fn,
501 addfield(map, &event, ",", filter, NULL); 548 addfield(map, &event, ",", filter, NULL);
502 if (msr != NULL) 549 if (msr != NULL)
503 addfield(map, &event, ",", msr->pname, msrval); 550 addfield(map, &event, ",", msr->pname, msrval);
504 fixname(name); 551 if (name)
552 fixname(name);
505 553
506 err = func(data, name, real_event(name, event), desc, long_desc, 554 err = func(data, name, real_event(name, event), desc, long_desc,
507 pmu, unit, perpkg, metric_expr, metric_name); 555 pmu, unit, perpkg, metric_expr, metric_name, metric_group);
508 free(event); 556 free(event);
509 free(desc); 557 free(desc);
510 free(name); 558 free(name);
@@ -516,6 +564,7 @@ int json_events(const char *fn,
516 free(unit); 564 free(unit);
517 free(metric_expr); 565 free(metric_expr);
518 free(metric_name); 566 free(metric_name);
567 free(metric_group);
519 if (err) 568 if (err)
520 break; 569 break;
521 tok += j; 570 tok += j;
@@ -636,7 +685,7 @@ static int process_mapfile(FILE *outfp, char *fpath)
636 } 685 }
637 line[strlen(line)-1] = '\0'; 686 line[strlen(line)-1] = '\0';
638 687
639 cpuid = strtok_r(p, ",", &save); 688 cpuid = fixregex(strtok_r(p, ",", &save));
640 version = strtok_r(NULL, ",", &save); 689 version = strtok_r(NULL, ",", &save);
641 fname = strtok_r(NULL, ",", &save); 690 fname = strtok_r(NULL, ",", &save);
642 type = strtok_r(NULL, ",", &save); 691 type = strtok_r(NULL, ",", &save);
diff --git a/tools/perf/pmu-events/jevents.h b/tools/perf/pmu-events/jevents.h
index d87efd2685b8..4684c673c445 100644
--- a/tools/perf/pmu-events/jevents.h
+++ b/tools/perf/pmu-events/jevents.h
@@ -7,7 +7,7 @@ int json_events(const char *fn,
7 char *long_desc, 7 char *long_desc,
8 char *pmu, 8 char *pmu,
9 char *unit, char *perpkg, char *metric_expr, 9 char *unit, char *perpkg, char *metric_expr,
10 char *metric_name), 10 char *metric_name, char *metric_group),
11 void *data); 11 void *data);
12char *get_cpu_str(void); 12char *get_cpu_str(void);
13 13
diff --git a/tools/perf/pmu-events/pmu-events.h b/tools/perf/pmu-events/pmu-events.h
index e08789ddfe6c..92a4d15ee0b9 100644
--- a/tools/perf/pmu-events/pmu-events.h
+++ b/tools/perf/pmu-events/pmu-events.h
@@ -16,6 +16,7 @@ struct pmu_event {
16 const char *perpkg; 16 const char *perpkg;
17 const char *metric_expr; 17 const char *metric_expr;
18 const char *metric_name; 18 const char *metric_name;
19 const char *metric_group;
19}; 20};
20 21
21/* 22/*
diff --git a/tools/perf/scripts/python/bin/mem-phys-addr-record b/tools/perf/scripts/python/bin/mem-phys-addr-record
new file mode 100644
index 000000000000..5a875122a904
--- /dev/null
+++ b/tools/perf/scripts/python/bin/mem-phys-addr-record
@@ -0,0 +1,19 @@
1#!/bin/bash
2
3#
4# Profiling physical memory by all retired load instructions/uops event
5# MEM_INST_RETIRED.ALL_LOADS or MEM_UOPS_RETIRED.ALL_LOADS
6#
7
8load=`perf list | grep mem_inst_retired.all_loads`
9if [ -z "$load" ]; then
10 load=`perf list | grep mem_uops_retired.all_loads`
11fi
12if [ -z "$load" ]; then
13 echo "There is no event to count all retired load instructions/uops."
14 exit 1
15fi
16
17arg=$(echo $load | tr -d ' ')
18arg="$arg:P"
19perf record --phys-data -e $arg $@
diff --git a/tools/perf/scripts/python/bin/mem-phys-addr-report b/tools/perf/scripts/python/bin/mem-phys-addr-report
new file mode 100644
index 000000000000..3f2b847e2eab
--- /dev/null
+++ b/tools/perf/scripts/python/bin/mem-phys-addr-report
@@ -0,0 +1,3 @@
1#!/bin/bash
2# description: resolve physical address samples
3perf script $@ -s "$PERF_EXEC_PATH"/scripts/python/mem-phys-addr.py
diff --git a/tools/perf/scripts/python/mem-phys-addr.py b/tools/perf/scripts/python/mem-phys-addr.py
new file mode 100644
index 000000000000..ebee2c5ae496
--- /dev/null
+++ b/tools/perf/scripts/python/mem-phys-addr.py
@@ -0,0 +1,95 @@
1# mem-phys-addr.py: Resolve physical address samples
2# SPDX-License-Identifier: GPL-2.0
3#
4# Copyright (c) 2018, Intel Corporation.
5
6from __future__ import division
7import os
8import sys
9import struct
10import re
11import bisect
12import collections
13
14sys.path.append(os.environ['PERF_EXEC_PATH'] + \
15 '/scripts/python/Perf-Trace-Util/lib/Perf/Trace')
16
17#physical address ranges for System RAM
18system_ram = []
19#physical address ranges for Persistent Memory
20pmem = []
21#file object for proc iomem
22f = None
23#Count for each type of memory
24load_mem_type_cnt = collections.Counter()
25#perf event name
26event_name = None
27
28def parse_iomem():
29 global f
30 f = open('/proc/iomem', 'r')
31 for i, j in enumerate(f):
32 m = re.split('-|:',j,2)
33 if m[2].strip() == 'System RAM':
34 system_ram.append(long(m[0], 16))
35 system_ram.append(long(m[1], 16))
36 if m[2].strip() == 'Persistent Memory':
37 pmem.append(long(m[0], 16))
38 pmem.append(long(m[1], 16))
39
40def print_memory_type():
41 print "Event: %s" % (event_name)
42 print "%-40s %10s %10s\n" % ("Memory type", "count", "percentage"),
43 print "%-40s %10s %10s\n" % ("----------------------------------------", \
44 "-----------", "-----------"),
45 total = sum(load_mem_type_cnt.values())
46 for mem_type, count in sorted(load_mem_type_cnt.most_common(), \
47 key = lambda(k, v): (v, k), reverse = True):
48 print "%-40s %10d %10.1f%%\n" % (mem_type, count, 100 * count / total),
49
50def trace_begin():
51 parse_iomem()
52
53def trace_end():
54 print_memory_type()
55 f.close()
56
57def is_system_ram(phys_addr):
58 #/proc/iomem is sorted
59 position = bisect.bisect(system_ram, phys_addr)
60 if position % 2 == 0:
61 return False
62 return True
63
64def is_persistent_mem(phys_addr):
65 position = bisect.bisect(pmem, phys_addr)
66 if position % 2 == 0:
67 return False
68 return True
69
70def find_memory_type(phys_addr):
71 if phys_addr == 0:
72 return "N/A"
73 if is_system_ram(phys_addr):
74 return "System RAM"
75
76 if is_persistent_mem(phys_addr):
77 return "Persistent Memory"
78
79 #slow path, search all
80 f.seek(0, 0)
81 for j in f:
82 m = re.split('-|:',j,2)
83 if long(m[0], 16) <= phys_addr <= long(m[1], 16):
84 return m[2]
85 return "N/A"
86
87def process_event(param_dict):
88 name = param_dict["ev_name"]
89 sample = param_dict["sample"]
90 phys_addr = sample["phys_addr"]
91
92 global event_name
93 if event_name == None:
94 event_name = name
95 load_mem_type_cnt[find_memory_type(phys_addr)] += 1
diff --git a/tools/perf/tests/attr.c b/tools/perf/tests/attr.c
index c180bbcdbef6..97f64ad7fa08 100644
--- a/tools/perf/tests/attr.c
+++ b/tools/perf/tests/attr.c
@@ -124,6 +124,12 @@ static int store_event(struct perf_event_attr *attr, pid_t pid, int cpu,
124 WRITE_ASS(exclude_guest, "d"); 124 WRITE_ASS(exclude_guest, "d");
125 WRITE_ASS(exclude_callchain_kernel, "d"); 125 WRITE_ASS(exclude_callchain_kernel, "d");
126 WRITE_ASS(exclude_callchain_user, "d"); 126 WRITE_ASS(exclude_callchain_user, "d");
127 WRITE_ASS(mmap2, "d");
128 WRITE_ASS(comm_exec, "d");
129 WRITE_ASS(context_switch, "d");
130 WRITE_ASS(write_backward, "d");
131 WRITE_ASS(namespaces, "d");
132 WRITE_ASS(use_clockid, "d");
127 WRITE_ASS(wakeup_events, PRIu32); 133 WRITE_ASS(wakeup_events, PRIu32);
128 WRITE_ASS(bp_type, PRIu32); 134 WRITE_ASS(bp_type, PRIu32);
129 WRITE_ASS(config1, "llu"); 135 WRITE_ASS(config1, "llu");
@@ -167,7 +173,7 @@ static int run_dir(const char *d, const char *perf)
167 snprintf(cmd, 3*PATH_MAX, PYTHON " %s/attr.py -d %s/attr/ -p %s %.*s", 173 snprintf(cmd, 3*PATH_MAX, PYTHON " %s/attr.py -d %s/attr/ -p %s %.*s",
168 d, d, perf, vcnt, v); 174 d, d, perf, vcnt, v);
169 175
170 return system(cmd); 176 return system(cmd) ? TEST_FAIL : TEST_OK;
171} 177}
172 178
173int test__attr(struct test *test __maybe_unused, int subtest __maybe_unused) 179int test__attr(struct test *test __maybe_unused, int subtest __maybe_unused)
diff --git a/tools/perf/tests/attr.py b/tools/perf/tests/attr.py
index 907b1b2f56ad..ff9b60b99f52 100644
--- a/tools/perf/tests/attr.py
+++ b/tools/perf/tests/attr.py
@@ -238,6 +238,7 @@ class Test(object):
238 # events in result. Fail if there's not any. 238 # events in result. Fail if there's not any.
239 for exp_name, exp_event in expect.items(): 239 for exp_name, exp_event in expect.items():
240 exp_list = [] 240 exp_list = []
241 res_event = {}
241 log.debug(" matching [%s]" % exp_name) 242 log.debug(" matching [%s]" % exp_name)
242 for res_name, res_event in result.items(): 243 for res_name, res_event in result.items():
243 log.debug(" to [%s]" % res_name) 244 log.debug(" to [%s]" % res_name)
@@ -254,7 +255,10 @@ class Test(object):
254 if exp_event.optional(): 255 if exp_event.optional():
255 log.debug(" %s does not match, but is optional" % exp_name) 256 log.debug(" %s does not match, but is optional" % exp_name)
256 else: 257 else:
257 exp_event.diff(res_event) 258 if not res_event:
259 log.debug(" res_event is empty");
260 else:
261 exp_event.diff(res_event)
258 raise Fail(self, 'match failure'); 262 raise Fail(self, 'match failure');
259 263
260 match[exp_name] = exp_list 264 match[exp_name] = exp_list
diff --git a/tools/perf/tests/attr/base-record b/tools/perf/tests/attr/base-record
index 31e0b1da830b..37940665f736 100644
--- a/tools/perf/tests/attr/base-record
+++ b/tools/perf/tests/attr/base-record
@@ -23,7 +23,7 @@ comm=1
23freq=1 23freq=1
24inherit_stat=0 24inherit_stat=0
25enable_on_exec=1 25enable_on_exec=1
26task=0 26task=1
27watermark=0 27watermark=0
28precise_ip=0|1|2|3 28precise_ip=0|1|2|3
29mmap_data=0 29mmap_data=0
diff --git a/tools/perf/tests/attr/test-record-group b/tools/perf/tests/attr/test-record-group
index 6e7961f6f7a5..618ba1c17474 100644
--- a/tools/perf/tests/attr/test-record-group
+++ b/tools/perf/tests/attr/test-record-group
@@ -17,5 +17,6 @@ sample_type=327
17read_format=4 17read_format=4
18mmap=0 18mmap=0
19comm=0 19comm=0
20task=0
20enable_on_exec=0 21enable_on_exec=0
21disabled=0 22disabled=0
diff --git a/tools/perf/tests/attr/test-record-group-sampling b/tools/perf/tests/attr/test-record-group-sampling
index ef59afd6d635..f906b793196f 100644
--- a/tools/perf/tests/attr/test-record-group-sampling
+++ b/tools/perf/tests/attr/test-record-group-sampling
@@ -23,7 +23,7 @@ sample_type=343
23 23
24# PERF_FORMAT_ID | PERF_FORMAT_GROUP 24# PERF_FORMAT_ID | PERF_FORMAT_GROUP
25read_format=12 25read_format=12
26 26task=0
27mmap=0 27mmap=0
28comm=0 28comm=0
29enable_on_exec=0 29enable_on_exec=0
diff --git a/tools/perf/tests/attr/test-record-group1 b/tools/perf/tests/attr/test-record-group1
index 87a222d014d8..48e8bd12fe46 100644
--- a/tools/perf/tests/attr/test-record-group1
+++ b/tools/perf/tests/attr/test-record-group1
@@ -18,5 +18,6 @@ sample_type=327
18read_format=4 18read_format=4
19mmap=0 19mmap=0
20comm=0 20comm=0
21task=0
21enable_on_exec=0 22enable_on_exec=0
22disabled=0 23disabled=0
diff --git a/tools/perf/tests/attr/test-stat-C0 b/tools/perf/tests/attr/test-stat-C0
index 67717fe6a65d..a2c76d10b2bb 100644
--- a/tools/perf/tests/attr/test-stat-C0
+++ b/tools/perf/tests/attr/test-stat-C0
@@ -7,3 +7,4 @@ ret = 1
7# events are disabled by default when attached to cpu 7# events are disabled by default when attached to cpu
8disabled=1 8disabled=1
9enable_on_exec=0 9enable_on_exec=0
10optional=1
diff --git a/tools/perf/tests/attr/test-stat-basic b/tools/perf/tests/attr/test-stat-basic
index 74e17881f2ba..69867d049fda 100644
--- a/tools/perf/tests/attr/test-stat-basic
+++ b/tools/perf/tests/attr/test-stat-basic
@@ -4,3 +4,4 @@ args = -e cycles kill >/dev/null 2>&1
4ret = 1 4ret = 1
5 5
6[event:base-stat] 6[event:base-stat]
7optional=1
diff --git a/tools/perf/tests/attr/test-stat-default b/tools/perf/tests/attr/test-stat-default
index e911dbd4eb47..d9e99b3f77e6 100644
--- a/tools/perf/tests/attr/test-stat-default
+++ b/tools/perf/tests/attr/test-stat-default
@@ -32,6 +32,7 @@ config=2
32fd=5 32fd=5
33type=0 33type=0
34config=0 34config=0
35optional=1
35 36
36# PERF_TYPE_HARDWARE / PERF_COUNT_HW_STALLED_CYCLES_FRONTEND 37# PERF_TYPE_HARDWARE / PERF_COUNT_HW_STALLED_CYCLES_FRONTEND
37[event6:base-stat] 38[event6:base-stat]
@@ -52,15 +53,18 @@ optional=1
52fd=8 53fd=8
53type=0 54type=0
54config=1 55config=1
56optional=1
55 57
56# PERF_TYPE_HARDWARE / PERF_COUNT_HW_BRANCH_INSTRUCTIONS 58# PERF_TYPE_HARDWARE / PERF_COUNT_HW_BRANCH_INSTRUCTIONS
57[event9:base-stat] 59[event9:base-stat]
58fd=9 60fd=9
59type=0 61type=0
60config=4 62config=4
63optional=1
61 64
62# PERF_TYPE_HARDWARE / PERF_COUNT_HW_BRANCH_MISSES 65# PERF_TYPE_HARDWARE / PERF_COUNT_HW_BRANCH_MISSES
63[event10:base-stat] 66[event10:base-stat]
64fd=10 67fd=10
65type=0 68type=0
66config=5 69config=5
70optional=1
diff --git a/tools/perf/tests/attr/test-stat-detailed-1 b/tools/perf/tests/attr/test-stat-detailed-1
index b39270a08e74..8b04a055d154 100644
--- a/tools/perf/tests/attr/test-stat-detailed-1
+++ b/tools/perf/tests/attr/test-stat-detailed-1
@@ -33,6 +33,7 @@ config=2
33fd=5 33fd=5
34type=0 34type=0
35config=0 35config=0
36optional=1
36 37
37# PERF_TYPE_HARDWARE / PERF_COUNT_HW_STALLED_CYCLES_FRONTEND 38# PERF_TYPE_HARDWARE / PERF_COUNT_HW_STALLED_CYCLES_FRONTEND
38[event6:base-stat] 39[event6:base-stat]
@@ -53,18 +54,21 @@ optional=1
53fd=8 54fd=8
54type=0 55type=0
55config=1 56config=1
57optional=1
56 58
57# PERF_TYPE_HARDWARE / PERF_COUNT_HW_BRANCH_INSTRUCTIONS 59# PERF_TYPE_HARDWARE / PERF_COUNT_HW_BRANCH_INSTRUCTIONS
58[event9:base-stat] 60[event9:base-stat]
59fd=9 61fd=9
60type=0 62type=0
61config=4 63config=4
64optional=1
62 65
63# PERF_TYPE_HARDWARE / PERF_COUNT_HW_BRANCH_MISSES 66# PERF_TYPE_HARDWARE / PERF_COUNT_HW_BRANCH_MISSES
64[event10:base-stat] 67[event10:base-stat]
65fd=10 68fd=10
66type=0 69type=0
67config=5 70config=5
71optional=1
68 72
69# PERF_TYPE_HW_CACHE / 73# PERF_TYPE_HW_CACHE /
70# PERF_COUNT_HW_CACHE_L1D << 0 | 74# PERF_COUNT_HW_CACHE_L1D << 0 |
@@ -74,6 +78,7 @@ config=5
74fd=11 78fd=11
75type=3 79type=3
76config=0 80config=0
81optional=1
77 82
78# PERF_TYPE_HW_CACHE / 83# PERF_TYPE_HW_CACHE /
79# PERF_COUNT_HW_CACHE_L1D << 0 | 84# PERF_COUNT_HW_CACHE_L1D << 0 |
@@ -83,6 +88,7 @@ config=0
83fd=12 88fd=12
84type=3 89type=3
85config=65536 90config=65536
91optional=1
86 92
87# PERF_TYPE_HW_CACHE / 93# PERF_TYPE_HW_CACHE /
88# PERF_COUNT_HW_CACHE_LL << 0 | 94# PERF_COUNT_HW_CACHE_LL << 0 |
@@ -92,6 +98,7 @@ config=65536
92fd=13 98fd=13
93type=3 99type=3
94config=2 100config=2
101optional=1
95 102
96# PERF_TYPE_HW_CACHE, 103# PERF_TYPE_HW_CACHE,
97# PERF_COUNT_HW_CACHE_LL << 0 | 104# PERF_COUNT_HW_CACHE_LL << 0 |
@@ -101,3 +108,4 @@ config=2
101fd=14 108fd=14
102type=3 109type=3
103config=65538 110config=65538
111optional=1
diff --git a/tools/perf/tests/attr/test-stat-detailed-2 b/tools/perf/tests/attr/test-stat-detailed-2
index 45f8e6ea34f8..4fca9f1bfbf8 100644
--- a/tools/perf/tests/attr/test-stat-detailed-2
+++ b/tools/perf/tests/attr/test-stat-detailed-2
@@ -33,6 +33,7 @@ config=2
33fd=5 33fd=5
34type=0 34type=0
35config=0 35config=0
36optional=1
36 37
37# PERF_TYPE_HARDWARE / PERF_COUNT_HW_STALLED_CYCLES_FRONTEND 38# PERF_TYPE_HARDWARE / PERF_COUNT_HW_STALLED_CYCLES_FRONTEND
38[event6:base-stat] 39[event6:base-stat]
@@ -53,18 +54,21 @@ optional=1
53fd=8 54fd=8
54type=0 55type=0
55config=1 56config=1
57optional=1
56 58
57# PERF_TYPE_HARDWARE / PERF_COUNT_HW_BRANCH_INSTRUCTIONS 59# PERF_TYPE_HARDWARE / PERF_COUNT_HW_BRANCH_INSTRUCTIONS
58[event9:base-stat] 60[event9:base-stat]
59fd=9 61fd=9
60type=0 62type=0
61config=4 63config=4
64optional=1
62 65
63# PERF_TYPE_HARDWARE / PERF_COUNT_HW_BRANCH_MISSES 66# PERF_TYPE_HARDWARE / PERF_COUNT_HW_BRANCH_MISSES
64[event10:base-stat] 67[event10:base-stat]
65fd=10 68fd=10
66type=0 69type=0
67config=5 70config=5
71optional=1
68 72
69# PERF_TYPE_HW_CACHE / 73# PERF_TYPE_HW_CACHE /
70# PERF_COUNT_HW_CACHE_L1D << 0 | 74# PERF_COUNT_HW_CACHE_L1D << 0 |
@@ -74,6 +78,7 @@ config=5
74fd=11 78fd=11
75type=3 79type=3
76config=0 80config=0
81optional=1
77 82
78# PERF_TYPE_HW_CACHE / 83# PERF_TYPE_HW_CACHE /
79# PERF_COUNT_HW_CACHE_L1D << 0 | 84# PERF_COUNT_HW_CACHE_L1D << 0 |
@@ -83,6 +88,7 @@ config=0
83fd=12 88fd=12
84type=3 89type=3
85config=65536 90config=65536
91optional=1
86 92
87# PERF_TYPE_HW_CACHE / 93# PERF_TYPE_HW_CACHE /
88# PERF_COUNT_HW_CACHE_LL << 0 | 94# PERF_COUNT_HW_CACHE_LL << 0 |
@@ -92,6 +98,7 @@ config=65536
92fd=13 98fd=13
93type=3 99type=3
94config=2 100config=2
101optional=1
95 102
96# PERF_TYPE_HW_CACHE, 103# PERF_TYPE_HW_CACHE,
97# PERF_COUNT_HW_CACHE_LL << 0 | 104# PERF_COUNT_HW_CACHE_LL << 0 |
@@ -101,6 +108,7 @@ config=2
101fd=14 108fd=14
102type=3 109type=3
103config=65538 110config=65538
111optional=1
104 112
105# PERF_TYPE_HW_CACHE, 113# PERF_TYPE_HW_CACHE,
106# PERF_COUNT_HW_CACHE_L1I << 0 | 114# PERF_COUNT_HW_CACHE_L1I << 0 |
@@ -120,6 +128,7 @@ optional=1
120fd=16 128fd=16
121type=3 129type=3
122config=65537 130config=65537
131optional=1
123 132
124# PERF_TYPE_HW_CACHE, 133# PERF_TYPE_HW_CACHE,
125# PERF_COUNT_HW_CACHE_DTLB << 0 | 134# PERF_COUNT_HW_CACHE_DTLB << 0 |
@@ -129,6 +138,7 @@ config=65537
129fd=17 138fd=17
130type=3 139type=3
131config=3 140config=3
141optional=1
132 142
133# PERF_TYPE_HW_CACHE, 143# PERF_TYPE_HW_CACHE,
134# PERF_COUNT_HW_CACHE_DTLB << 0 | 144# PERF_COUNT_HW_CACHE_DTLB << 0 |
@@ -138,6 +148,7 @@ config=3
138fd=18 148fd=18
139type=3 149type=3
140config=65539 150config=65539
151optional=1
141 152
142# PERF_TYPE_HW_CACHE, 153# PERF_TYPE_HW_CACHE,
143# PERF_COUNT_HW_CACHE_ITLB << 0 | 154# PERF_COUNT_HW_CACHE_ITLB << 0 |
@@ -147,6 +158,7 @@ config=65539
147fd=19 158fd=19
148type=3 159type=3
149config=4 160config=4
161optional=1
150 162
151# PERF_TYPE_HW_CACHE, 163# PERF_TYPE_HW_CACHE,
152# PERF_COUNT_HW_CACHE_ITLB << 0 | 164# PERF_COUNT_HW_CACHE_ITLB << 0 |
@@ -156,3 +168,4 @@ config=4
156fd=20 168fd=20
157type=3 169type=3
158config=65540 170config=65540
171optional=1
diff --git a/tools/perf/tests/attr/test-stat-detailed-3 b/tools/perf/tests/attr/test-stat-detailed-3
index 30ae0fb7a3fd..4bb58e1c82a6 100644
--- a/tools/perf/tests/attr/test-stat-detailed-3
+++ b/tools/perf/tests/attr/test-stat-detailed-3
@@ -33,6 +33,7 @@ config=2
33fd=5 33fd=5
34type=0 34type=0
35config=0 35config=0
36optional=1
36 37
37# PERF_TYPE_HARDWARE / PERF_COUNT_HW_STALLED_CYCLES_FRONTEND 38# PERF_TYPE_HARDWARE / PERF_COUNT_HW_STALLED_CYCLES_FRONTEND
38[event6:base-stat] 39[event6:base-stat]
@@ -53,18 +54,21 @@ optional=1
53fd=8 54fd=8
54type=0 55type=0
55config=1 56config=1
57optional=1
56 58
57# PERF_TYPE_HARDWARE / PERF_COUNT_HW_BRANCH_INSTRUCTIONS 59# PERF_TYPE_HARDWARE / PERF_COUNT_HW_BRANCH_INSTRUCTIONS
58[event9:base-stat] 60[event9:base-stat]
59fd=9 61fd=9
60type=0 62type=0
61config=4 63config=4
64optional=1
62 65
63# PERF_TYPE_HARDWARE / PERF_COUNT_HW_BRANCH_MISSES 66# PERF_TYPE_HARDWARE / PERF_COUNT_HW_BRANCH_MISSES
64[event10:base-stat] 67[event10:base-stat]
65fd=10 68fd=10
66type=0 69type=0
67config=5 70config=5
71optional=1
68 72
69# PERF_TYPE_HW_CACHE / 73# PERF_TYPE_HW_CACHE /
70# PERF_COUNT_HW_CACHE_L1D << 0 | 74# PERF_COUNT_HW_CACHE_L1D << 0 |
@@ -74,6 +78,7 @@ config=5
74fd=11 78fd=11
75type=3 79type=3
76config=0 80config=0
81optional=1
77 82
78# PERF_TYPE_HW_CACHE / 83# PERF_TYPE_HW_CACHE /
79# PERF_COUNT_HW_CACHE_L1D << 0 | 84# PERF_COUNT_HW_CACHE_L1D << 0 |
@@ -83,6 +88,7 @@ config=0
83fd=12 88fd=12
84type=3 89type=3
85config=65536 90config=65536
91optional=1
86 92
87# PERF_TYPE_HW_CACHE / 93# PERF_TYPE_HW_CACHE /
88# PERF_COUNT_HW_CACHE_LL << 0 | 94# PERF_COUNT_HW_CACHE_LL << 0 |
@@ -92,6 +98,7 @@ config=65536
92fd=13 98fd=13
93type=3 99type=3
94config=2 100config=2
101optional=1
95 102
96# PERF_TYPE_HW_CACHE, 103# PERF_TYPE_HW_CACHE,
97# PERF_COUNT_HW_CACHE_LL << 0 | 104# PERF_COUNT_HW_CACHE_LL << 0 |
@@ -101,6 +108,7 @@ config=2
101fd=14 108fd=14
102type=3 109type=3
103config=65538 110config=65538
111optional=1
104 112
105# PERF_TYPE_HW_CACHE, 113# PERF_TYPE_HW_CACHE,
106# PERF_COUNT_HW_CACHE_L1I << 0 | 114# PERF_COUNT_HW_CACHE_L1I << 0 |
@@ -120,6 +128,7 @@ optional=1
120fd=16 128fd=16
121type=3 129type=3
122config=65537 130config=65537
131optional=1
123 132
124# PERF_TYPE_HW_CACHE, 133# PERF_TYPE_HW_CACHE,
125# PERF_COUNT_HW_CACHE_DTLB << 0 | 134# PERF_COUNT_HW_CACHE_DTLB << 0 |
@@ -129,6 +138,7 @@ config=65537
129fd=17 138fd=17
130type=3 139type=3
131config=3 140config=3
141optional=1
132 142
133# PERF_TYPE_HW_CACHE, 143# PERF_TYPE_HW_CACHE,
134# PERF_COUNT_HW_CACHE_DTLB << 0 | 144# PERF_COUNT_HW_CACHE_DTLB << 0 |
@@ -138,6 +148,7 @@ config=3
138fd=18 148fd=18
139type=3 149type=3
140config=65539 150config=65539
151optional=1
141 152
142# PERF_TYPE_HW_CACHE, 153# PERF_TYPE_HW_CACHE,
143# PERF_COUNT_HW_CACHE_ITLB << 0 | 154# PERF_COUNT_HW_CACHE_ITLB << 0 |
@@ -147,6 +158,7 @@ config=65539
147fd=19 158fd=19
148type=3 159type=3
149config=4 160config=4
161optional=1
150 162
151# PERF_TYPE_HW_CACHE, 163# PERF_TYPE_HW_CACHE,
152# PERF_COUNT_HW_CACHE_ITLB << 0 | 164# PERF_COUNT_HW_CACHE_ITLB << 0 |
@@ -156,6 +168,7 @@ config=4
156fd=20 168fd=20
157type=3 169type=3
158config=65540 170config=65540
171optional=1
159 172
160# PERF_TYPE_HW_CACHE, 173# PERF_TYPE_HW_CACHE,
161# PERF_COUNT_HW_CACHE_L1D << 0 | 174# PERF_COUNT_HW_CACHE_L1D << 0 |
diff --git a/tools/perf/tests/attr/test-stat-group b/tools/perf/tests/attr/test-stat-group
index fdc1596a8862..e15d6946e9b3 100644
--- a/tools/perf/tests/attr/test-stat-group
+++ b/tools/perf/tests/attr/test-stat-group
@@ -6,6 +6,7 @@ ret = 1
6[event-1:base-stat] 6[event-1:base-stat]
7fd=1 7fd=1
8group_fd=-1 8group_fd=-1
9read_format=3|15
9 10
10[event-2:base-stat] 11[event-2:base-stat]
11fd=2 12fd=2
@@ -13,3 +14,4 @@ group_fd=1
13config=1 14config=1
14disabled=0 15disabled=0
15enable_on_exec=0 16enable_on_exec=0
17read_format=3|15
diff --git a/tools/perf/tests/attr/test-stat-group1 b/tools/perf/tests/attr/test-stat-group1
index 2a1f86e4a904..1746751123dc 100644
--- a/tools/perf/tests/attr/test-stat-group1
+++ b/tools/perf/tests/attr/test-stat-group1
@@ -6,6 +6,7 @@ ret = 1
6[event-1:base-stat] 6[event-1:base-stat]
7fd=1 7fd=1
8group_fd=-1 8group_fd=-1
9read_format=3|15
9 10
10[event-2:base-stat] 11[event-2:base-stat]
11fd=2 12fd=2
@@ -13,3 +14,4 @@ group_fd=1
13config=1 14config=1
14disabled=0 15disabled=0
15enable_on_exec=0 16enable_on_exec=0
17read_format=3|15
diff --git a/tools/perf/tests/attr/test-stat-no-inherit b/tools/perf/tests/attr/test-stat-no-inherit
index d54b2a1e3e28..924fbb9300d1 100644
--- a/tools/perf/tests/attr/test-stat-no-inherit
+++ b/tools/perf/tests/attr/test-stat-no-inherit
@@ -5,3 +5,4 @@ ret = 1
5 5
6[event:base-stat] 6[event:base-stat]
7inherit=0 7inherit=0
8optional=1
diff --git a/tools/perf/tests/backward-ring-buffer.c b/tools/perf/tests/backward-ring-buffer.c
index 71b9a0b613d2..e0b1b414d466 100644
--- a/tools/perf/tests/backward-ring-buffer.c
+++ b/tools/perf/tests/backward-ring-buffer.c
@@ -31,10 +31,12 @@ static int count_samples(struct perf_evlist *evlist, int *sample_count,
31 int i; 31 int i;
32 32
33 for (i = 0; i < evlist->nr_mmaps; i++) { 33 for (i = 0; i < evlist->nr_mmaps; i++) {
34 struct perf_mmap *map = &evlist->overwrite_mmap[i];
34 union perf_event *event; 35 union perf_event *event;
36 u64 start, end;
35 37
36 perf_mmap__read_catchup(&evlist->backward_mmap[i]); 38 perf_mmap__read_init(map, true, &start, &end);
37 while ((event = perf_mmap__read_backward(&evlist->backward_mmap[i])) != NULL) { 39 while ((event = perf_mmap__read_event(map, true, &start, end)) != NULL) {
38 const u32 type = event->header.type; 40 const u32 type = event->header.type;
39 41
40 switch (type) { 42 switch (type) {
@@ -49,6 +51,7 @@ static int count_samples(struct perf_evlist *evlist, int *sample_count,
49 return TEST_FAIL; 51 return TEST_FAIL;
50 } 52 }
51 } 53 }
54 perf_mmap__read_done(map);
52 } 55 }
53 return TEST_OK; 56 return TEST_OK;
54} 57}
@@ -59,7 +62,7 @@ static int do_test(struct perf_evlist *evlist, int mmap_pages,
59 int err; 62 int err;
60 char sbuf[STRERR_BUFSIZE]; 63 char sbuf[STRERR_BUFSIZE];
61 64
62 err = perf_evlist__mmap(evlist, mmap_pages, true); 65 err = perf_evlist__mmap(evlist, mmap_pages);
63 if (err < 0) { 66 if (err < 0) {
64 pr_debug("perf_evlist__mmap: %s\n", 67 pr_debug("perf_evlist__mmap: %s\n",
65 str_error_r(errno, sbuf, sizeof(sbuf))); 68 str_error_r(errno, sbuf, sizeof(sbuf)));
diff --git a/tools/perf/tests/bp_signal.c b/tools/perf/tests/bp_signal.c
index 335b695f4970..a467615c5a0e 100644
--- a/tools/perf/tests/bp_signal.c
+++ b/tools/perf/tests/bp_signal.c
@@ -296,7 +296,7 @@ bool test__bp_signal_is_supported(void)
296 * instruction breakpoint using the perf event interface. 296 * instruction breakpoint using the perf event interface.
297 * Once it's there we can release this. 297 * Once it's there we can release this.
298 */ 298 */
299#ifdef __powerpc__ 299#if defined(__powerpc__) || defined(__s390x__)
300 return false; 300 return false;
301#else 301#else
302 return true; 302 return true;
diff --git a/tools/perf/tests/bpf-script-example.c b/tools/perf/tests/bpf-script-example.c
index 268e5f8e4aa2..e4123c1b0e88 100644
--- a/tools/perf/tests/bpf-script-example.c
+++ b/tools/perf/tests/bpf-script-example.c
@@ -31,8 +31,8 @@ struct bpf_map_def SEC("maps") flip_table = {
31 .max_entries = 1, 31 .max_entries = 1,
32}; 32};
33 33
34SEC("func=SyS_epoll_wait") 34SEC("func=SyS_epoll_pwait")
35int bpf_func__SyS_epoll_wait(void *ctx) 35int bpf_func__SyS_epoll_pwait(void *ctx)
36{ 36{
37 int ind =0; 37 int ind =0;
38 int *flag = bpf_map_lookup_elem(&flip_table, &ind); 38 int *flag = bpf_map_lookup_elem(&flip_table, &ind);
diff --git a/tools/perf/tests/bpf.c b/tools/perf/tests/bpf.c
index 34c22cdf4d5d..e8399beca62b 100644
--- a/tools/perf/tests/bpf.c
+++ b/tools/perf/tests/bpf.c
@@ -3,6 +3,7 @@
3#include <sys/epoll.h> 3#include <sys/epoll.h>
4#include <sys/types.h> 4#include <sys/types.h>
5#include <sys/stat.h> 5#include <sys/stat.h>
6#include <fcntl.h>
6#include <util/util.h> 7#include <util/util.h>
7#include <util/bpf-loader.h> 8#include <util/bpf-loader.h>
8#include <util/evlist.h> 9#include <util/evlist.h>
@@ -19,13 +20,13 @@
19 20
20#ifdef HAVE_LIBBPF_SUPPORT 21#ifdef HAVE_LIBBPF_SUPPORT
21 22
22static int epoll_wait_loop(void) 23static int epoll_pwait_loop(void)
23{ 24{
24 int i; 25 int i;
25 26
26 /* Should fail NR_ITERS times */ 27 /* Should fail NR_ITERS times */
27 for (i = 0; i < NR_ITERS; i++) 28 for (i = 0; i < NR_ITERS; i++)
28 epoll_wait(-(i + 1), NULL, 0, 0); 29 epoll_pwait(-(i + 1), NULL, 0, 0, NULL);
29 return 0; 30 return 0;
30} 31}
31 32
@@ -63,46 +64,41 @@ static struct {
63 bool pin; 64 bool pin;
64} bpf_testcase_table[] = { 65} bpf_testcase_table[] = {
65 { 66 {
66 LLVM_TESTCASE_BASE, 67 .prog_id = LLVM_TESTCASE_BASE,
67 "Basic BPF filtering", 68 .desc = "Basic BPF filtering",
68 "[basic_bpf_test]", 69 .name = "[basic_bpf_test]",
69 "fix 'perf test LLVM' first", 70 .msg_compile_fail = "fix 'perf test LLVM' first",
70 "load bpf object failed", 71 .msg_load_fail = "load bpf object failed",
71 &epoll_wait_loop, 72 .target_func = &epoll_pwait_loop,
72 (NR_ITERS + 1) / 2, 73 .expect_result = (NR_ITERS + 1) / 2,
73 false,
74 }, 74 },
75 { 75 {
76 LLVM_TESTCASE_BASE, 76 .prog_id = LLVM_TESTCASE_BASE,
77 "BPF pinning", 77 .desc = "BPF pinning",
78 "[bpf_pinning]", 78 .name = "[bpf_pinning]",
79 "fix kbuild first", 79 .msg_compile_fail = "fix kbuild first",
80 "check your vmlinux setting?", 80 .msg_load_fail = "check your vmlinux setting?",
81 &epoll_wait_loop, 81 .target_func = &epoll_pwait_loop,
82 (NR_ITERS + 1) / 2, 82 .expect_result = (NR_ITERS + 1) / 2,
83 true, 83 .pin = true,
84 }, 84 },
85#ifdef HAVE_BPF_PROLOGUE 85#ifdef HAVE_BPF_PROLOGUE
86 { 86 {
87 LLVM_TESTCASE_BPF_PROLOGUE, 87 .prog_id = LLVM_TESTCASE_BPF_PROLOGUE,
88 "BPF prologue generation", 88 .desc = "BPF prologue generation",
89 "[bpf_prologue_test]", 89 .name = "[bpf_prologue_test]",
90 "fix kbuild first", 90 .msg_compile_fail = "fix kbuild first",
91 "check your vmlinux setting?", 91 .msg_load_fail = "check your vmlinux setting?",
92 &llseek_loop, 92 .target_func = &llseek_loop,
93 (NR_ITERS + 1) / 4, 93 .expect_result = (NR_ITERS + 1) / 4,
94 false,
95 }, 94 },
96#endif 95#endif
97 { 96 {
98 LLVM_TESTCASE_BPF_RELOCATION, 97 .prog_id = LLVM_TESTCASE_BPF_RELOCATION,
99 "BPF relocation checker", 98 .desc = "BPF relocation checker",
100 "[bpf_relocation_test]", 99 .name = "[bpf_relocation_test]",
101 "fix 'perf test LLVM' first", 100 .msg_compile_fail = "fix 'perf test LLVM' first",
102 "libbpf error when dealing with relocation", 101 .msg_load_fail = "libbpf error when dealing with relocation",
103 NULL,
104 0,
105 false,
106 }, 102 },
107}; 103};
108 104
@@ -167,7 +163,7 @@ static int do_test(struct bpf_object *obj, int (*func)(void),
167 goto out_delete_evlist; 163 goto out_delete_evlist;
168 } 164 }
169 165
170 err = perf_evlist__mmap(evlist, opts.mmap_pages, false); 166 err = perf_evlist__mmap(evlist, opts.mmap_pages);
171 if (err < 0) { 167 if (err < 0) {
172 pr_debug("perf_evlist__mmap: %s\n", 168 pr_debug("perf_evlist__mmap: %s\n",
173 str_error_r(errno, sbuf, sizeof(sbuf))); 169 str_error_r(errno, sbuf, sizeof(sbuf)));
@@ -190,7 +186,7 @@ static int do_test(struct bpf_object *obj, int (*func)(void),
190 } 186 }
191 187
192 if (count != expect) { 188 if (count != expect) {
193 pr_debug("BPF filter result incorrect\n"); 189 pr_debug("BPF filter result incorrect, expected %d, got %d samples\n", expect, count);
194 goto out_delete_evlist; 190 goto out_delete_evlist;
195 } 191 }
196 192
diff --git a/tools/perf/tests/builtin-test.c b/tools/perf/tests/builtin-test.c
index 53d06f37406a..fafa014240cd 100644
--- a/tools/perf/tests/builtin-test.c
+++ b/tools/perf/tests/builtin-test.c
@@ -4,6 +4,7 @@
4 * 4 *
5 * Builtin regression testing command: ever growing number of sanity tests 5 * Builtin regression testing command: ever growing number of sanity tests
6 */ 6 */
7#include <fcntl.h>
7#include <errno.h> 8#include <errno.h>
8#include <unistd.h> 9#include <unistd.h>
9#include <string.h> 10#include <string.h>
@@ -410,9 +411,9 @@ static const char *shell_test__description(char *description, size_t size,
410 return description ? trim(description + 1) : NULL; 411 return description ? trim(description + 1) : NULL;
411} 412}
412 413
413#define for_each_shell_test(dir, ent) \ 414#define for_each_shell_test(dir, base, ent) \
414 while ((ent = readdir(dir)) != NULL) \ 415 while ((ent = readdir(dir)) != NULL) \
415 if (ent->d_type == DT_REG && ent->d_name[0] != '.') 416 if (!is_directory(base, ent))
416 417
417static const char *shell_tests__dir(char *path, size_t size) 418static const char *shell_tests__dir(char *path, size_t size)
418{ 419{
@@ -451,7 +452,7 @@ static int shell_tests__max_desc_width(void)
451 if (!dir) 452 if (!dir)
452 return -1; 453 return -1;
453 454
454 for_each_shell_test(dir, ent) { 455 for_each_shell_test(dir, path, ent) {
455 char bf[256]; 456 char bf[256];
456 const char *desc = shell_test__description(bf, sizeof(bf), path, ent->d_name); 457 const char *desc = shell_test__description(bf, sizeof(bf), path, ent->d_name);
457 458
@@ -503,7 +504,7 @@ static int run_shell_tests(int argc, const char *argv[], int i, int width)
503 if (!dir) 504 if (!dir)
504 return -1; 505 return -1;
505 506
506 for_each_shell_test(dir, ent) { 507 for_each_shell_test(dir, st.dir, ent) {
507 int curr = i++; 508 int curr = i++;
508 char desc[256]; 509 char desc[256];
509 struct test test = { 510 struct test test = {
@@ -613,7 +614,7 @@ static int perf_test__list_shell(int argc, const char **argv, int i)
613 if (!dir) 614 if (!dir)
614 return -1; 615 return -1;
615 616
616 for_each_shell_test(dir, ent) { 617 for_each_shell_test(dir, path, ent) {
617 int curr = i++; 618 int curr = i++;
618 char bf[256]; 619 char bf[256];
619 struct test t = { 620 struct test t = {
diff --git a/tools/perf/tests/code-reading.c b/tools/perf/tests/code-reading.c
index fcc8984bc329..3bf7b145b826 100644
--- a/tools/perf/tests/code-reading.c
+++ b/tools/perf/tests/code-reading.c
@@ -639,7 +639,7 @@ static int do_test_code_reading(bool try_kcore)
639 break; 639 break;
640 } 640 }
641 641
642 ret = perf_evlist__mmap(evlist, UINT_MAX, false); 642 ret = perf_evlist__mmap(evlist, UINT_MAX);
643 if (ret < 0) { 643 if (ret < 0) {
644 pr_debug("perf_evlist__mmap failed\n"); 644 pr_debug("perf_evlist__mmap failed\n");
645 goto out_put; 645 goto out_put;
diff --git a/tools/perf/tests/dwarf-unwind.c b/tools/perf/tests/dwarf-unwind.c
index ac40e05bcab4..260418969120 100644
--- a/tools/perf/tests/dwarf-unwind.c
+++ b/tools/perf/tests/dwarf-unwind.c
@@ -173,6 +173,7 @@ int test__dwarf_unwind(struct test *test __maybe_unused, int subtest __maybe_unu
173 } 173 }
174 174
175 callchain_param.record_mode = CALLCHAIN_DWARF; 175 callchain_param.record_mode = CALLCHAIN_DWARF;
176 dwarf_callchain_users = true;
176 177
177 if (init_live_machine(machine)) { 178 if (init_live_machine(machine)) {
178 pr_err("Could not init machine\n"); 179 pr_err("Could not init machine\n");
diff --git a/tools/perf/tests/keep-tracking.c b/tools/perf/tests/keep-tracking.c
index 842d33637a18..c46530918938 100644
--- a/tools/perf/tests/keep-tracking.c
+++ b/tools/perf/tests/keep-tracking.c
@@ -95,7 +95,7 @@ int test__keep_tracking(struct test *test __maybe_unused, int subtest __maybe_un
95 goto out_err; 95 goto out_err;
96 } 96 }
97 97
98 CHECK__(perf_evlist__mmap(evlist, UINT_MAX, false)); 98 CHECK__(perf_evlist__mmap(evlist, UINT_MAX));
99 99
100 /* 100 /*
101 * First, test that a 'comm' event can be found when the event is 101 * First, test that a 'comm' event can be found when the event is
diff --git a/tools/perf/tests/mmap-basic.c b/tools/perf/tests/mmap-basic.c
index 5a8bf318f8a7..c0e971da965c 100644
--- a/tools/perf/tests/mmap-basic.c
+++ b/tools/perf/tests/mmap-basic.c
@@ -94,7 +94,7 @@ int test__basic_mmap(struct test *test __maybe_unused, int subtest __maybe_unuse
94 expected_nr_events[i] = 1 + rand() % 127; 94 expected_nr_events[i] = 1 + rand() % 127;
95 } 95 }
96 96
97 if (perf_evlist__mmap(evlist, 128, true) < 0) { 97 if (perf_evlist__mmap(evlist, 128) < 0) {
98 pr_debug("failed to mmap events: %d (%s)\n", errno, 98 pr_debug("failed to mmap events: %d (%s)\n", errno,
99 str_error_r(errno, sbuf, sizeof(sbuf))); 99 str_error_r(errno, sbuf, sizeof(sbuf)));
100 goto out_delete_evlist; 100 goto out_delete_evlist;
diff --git a/tools/perf/tests/mmap-thread-lookup.c b/tools/perf/tests/mmap-thread-lookup.c
index 3c3f3e029e33..868d82b501f4 100644
--- a/tools/perf/tests/mmap-thread-lookup.c
+++ b/tools/perf/tests/mmap-thread-lookup.c
@@ -132,7 +132,7 @@ static int synth_all(struct machine *machine)
132{ 132{
133 return perf_event__synthesize_threads(NULL, 133 return perf_event__synthesize_threads(NULL,
134 perf_event__process, 134 perf_event__process,
135 machine, 0, 500); 135 machine, 0, 500, 1);
136} 136}
137 137
138static int synth_process(struct machine *machine) 138static int synth_process(struct machine *machine)
diff --git a/tools/perf/tests/openat-syscall-tp-fields.c b/tools/perf/tests/openat-syscall-tp-fields.c
index d9619d265314..43519267b93b 100644
--- a/tools/perf/tests/openat-syscall-tp-fields.c
+++ b/tools/perf/tests/openat-syscall-tp-fields.c
@@ -1,5 +1,8 @@
1// SPDX-License-Identifier: GPL-2.0 1// SPDX-License-Identifier: GPL-2.0
2#include <linux/err.h> 2#include <linux/err.h>
3#include <sys/types.h>
4#include <sys/stat.h>
5#include <fcntl.h>
3#include "perf.h" 6#include "perf.h"
4#include "evlist.h" 7#include "evlist.h"
5#include "evsel.h" 8#include "evsel.h"
@@ -64,7 +67,7 @@ int test__syscall_openat_tp_fields(struct test *test __maybe_unused, int subtest
64 goto out_delete_evlist; 67 goto out_delete_evlist;
65 } 68 }
66 69
67 err = perf_evlist__mmap(evlist, UINT_MAX, false); 70 err = perf_evlist__mmap(evlist, UINT_MAX);
68 if (err < 0) { 71 if (err < 0) {
69 pr_debug("perf_evlist__mmap: %s\n", 72 pr_debug("perf_evlist__mmap: %s\n",
70 str_error_r(errno, sbuf, sizeof(sbuf))); 73 str_error_r(errno, sbuf, sizeof(sbuf)));
diff --git a/tools/perf/tests/parse-events.c b/tools/perf/tests/parse-events.c
index f0679613bd18..18b06444f230 100644
--- a/tools/perf/tests/parse-events.c
+++ b/tools/perf/tests/parse-events.c
@@ -13,7 +13,6 @@
13#include <unistd.h> 13#include <unistd.h>
14#include <linux/kernel.h> 14#include <linux/kernel.h>
15#include <linux/hw_breakpoint.h> 15#include <linux/hw_breakpoint.h>
16#include <api/fs/fs.h>
17#include <api/fs/tracing_path.h> 16#include <api/fs/tracing_path.h>
18 17
19#define PERF_TP_SAMPLE_TYPE (PERF_SAMPLE_RAW | PERF_SAMPLE_TIME | \ 18#define PERF_TP_SAMPLE_TYPE (PERF_SAMPLE_RAW | PERF_SAMPLE_TIME | \
diff --git a/tools/perf/tests/perf-record.c b/tools/perf/tests/perf-record.c
index c34904d37705..0afafab85238 100644
--- a/tools/perf/tests/perf-record.c
+++ b/tools/perf/tests/perf-record.c
@@ -141,7 +141,7 @@ int test__PERF_RECORD(struct test *test __maybe_unused, int subtest __maybe_unus
141 * fds in the same CPU to be injected in the same mmap ring buffer 141 * fds in the same CPU to be injected in the same mmap ring buffer
142 * (using ioctl(PERF_EVENT_IOC_SET_OUTPUT)). 142 * (using ioctl(PERF_EVENT_IOC_SET_OUTPUT)).
143 */ 143 */
144 err = perf_evlist__mmap(evlist, opts.mmap_pages, false); 144 err = perf_evlist__mmap(evlist, opts.mmap_pages);
145 if (err < 0) { 145 if (err < 0) {
146 pr_debug("perf_evlist__mmap: %s\n", 146 pr_debug("perf_evlist__mmap: %s\n",
147 str_error_r(errno, sbuf, sizeof(sbuf))); 147 str_error_r(errno, sbuf, sizeof(sbuf)));
diff --git a/tools/perf/tests/sample-parsing.c b/tools/perf/tests/sample-parsing.c
index 3ec6302b6498..0e2d00d69e6e 100644
--- a/tools/perf/tests/sample-parsing.c
+++ b/tools/perf/tests/sample-parsing.c
@@ -248,7 +248,7 @@ static int do_test(u64 sample_type, u64 sample_regs, u64 read_format)
248 event->header.size = sz; 248 event->header.size = sz;
249 249
250 err = perf_event__synthesize_sample(event, sample_type, read_format, 250 err = perf_event__synthesize_sample(event, sample_type, read_format,
251 &sample, false); 251 &sample);
252 if (err) { 252 if (err) {
253 pr_debug("%s failed for sample_type %#"PRIx64", error %d\n", 253 pr_debug("%s failed for sample_type %#"PRIx64", error %d\n",
254 "perf_event__synthesize_sample", sample_type, err); 254 "perf_event__synthesize_sample", sample_type, err);
diff --git a/tools/perf/tests/shell/trace+probe_libc_inet_pton.sh b/tools/perf/tests/shell/trace+probe_libc_inet_pton.sh
index 7a84d73324e3..c446c894b297 100755
--- a/tools/perf/tests/shell/trace+probe_libc_inet_pton.sh
+++ b/tools/perf/tests/shell/trace+probe_libc_inet_pton.sh
@@ -10,8 +10,8 @@
10 10
11. $(dirname $0)/lib/probe.sh 11. $(dirname $0)/lib/probe.sh
12 12
13ld=$(realpath /lib64/ld*.so.* | uniq) 13libc=$(grep -w libc /proc/self/maps | head -1 | sed -r 's/.*[[:space:]](\/.*)/\1/g')
14libc=$(echo $ld | sed 's/ld/libc/g') 14nm -g $libc 2>/dev/null | fgrep -q inet_pton || exit 254
15 15
16trace_libc_inet_pton_backtrace() { 16trace_libc_inet_pton_backtrace() {
17 idx=0 17 idx=0
@@ -22,10 +22,23 @@ trace_libc_inet_pton_backtrace() {
22 expected[4]="rtt min.*" 22 expected[4]="rtt min.*"
23 expected[5]="[0-9]+\.[0-9]+[[:space:]]+probe_libc:inet_pton:\([[:xdigit:]]+\)" 23 expected[5]="[0-9]+\.[0-9]+[[:space:]]+probe_libc:inet_pton:\([[:xdigit:]]+\)"
24 expected[6]=".*inet_pton[[:space:]]\($libc\)$" 24 expected[6]=".*inet_pton[[:space:]]\($libc\)$"
25 expected[7]="getaddrinfo[[:space:]]\($libc\)$" 25 case "$(uname -m)" in
26 expected[8]=".*\(.*/bin/ping.*\)$" 26 s390x)
27 eventattr='call-graph=dwarf'
28 expected[7]="gaih_inet[[:space:]]\(inlined\)$"
29 expected[8]="__GI_getaddrinfo[[:space:]]\(inlined\)$"
30 expected[9]="main[[:space:]]\(.*/bin/ping.*\)$"
31 expected[10]="__libc_start_main[[:space:]]\($libc\)$"
32 expected[11]="_start[[:space:]]\(.*/bin/ping.*\)$"
33 ;;
34 *)
35 eventattr='max-stack=3'
36 expected[7]="getaddrinfo[[:space:]]\($libc\)$"
37 expected[8]=".*\(.*/bin/ping.*\)$"
38 ;;
39 esac
27 40
28 perf trace --no-syscalls -e probe_libc:inet_pton/max-stack=3/ ping -6 -c 1 ::1 2>&1 | grep -v ^$ | while read line ; do 41 perf trace --no-syscalls -e probe_libc:inet_pton/$eventattr/ ping -6 -c 1 ::1 2>&1 | grep -v ^$ | while read line ; do
29 echo $line 42 echo $line
30 echo "$line" | egrep -q "${expected[$idx]}" 43 echo "$line" | egrep -q "${expected[$idx]}"
31 if [ $? -ne 0 ] ; then 44 if [ $? -ne 0 ] ; then
@@ -33,10 +46,13 @@ trace_libc_inet_pton_backtrace() {
33 exit 1 46 exit 1
34 fi 47 fi
35 let idx+=1 48 let idx+=1
36 [ $idx -eq 9 ] && break 49 [ -z "${expected[$idx]}" ] && break
37 done 50 done
38} 51}
39 52
53# Check for IPv6 interface existence
54ip a sh lo | fgrep -q inet6 || exit 2
55
40skip_if_no_perf_probe && \ 56skip_if_no_perf_probe && \
41perf probe -q $libc inet_pton && \ 57perf probe -q $libc inet_pton && \
42trace_libc_inet_pton_backtrace 58trace_libc_inet_pton_backtrace
diff --git a/tools/perf/tests/shell/trace+probe_vfs_getname.sh b/tools/perf/tests/shell/trace+probe_vfs_getname.sh
index 2e68c5f120da..55ad9793d544 100755
--- a/tools/perf/tests/shell/trace+probe_vfs_getname.sh
+++ b/tools/perf/tests/shell/trace+probe_vfs_getname.sh
@@ -17,8 +17,9 @@ skip_if_no_perf_probe || exit 2
17file=$(mktemp /tmp/temporary_file.XXXXX) 17file=$(mktemp /tmp/temporary_file.XXXXX)
18 18
19trace_open_vfs_getname() { 19trace_open_vfs_getname() {
20 perf trace -e open touch $file 2>&1 | \ 20 evts=$(echo $(perf list syscalls:sys_enter_open* |& egrep 'open(at)? ' | sed -r 's/.*sys_enter_([a-z]+) +\[.*$/\1/') | sed 's/ /,/')
21 egrep " +[0-9]+\.[0-9]+ +\( +[0-9]+\.[0-9]+ ms\): +touch\/[0-9]+ open\(filename: +${file}, +flags: CREAT\|NOCTTY\|NONBLOCK\|WRONLY, +mode: +IRUGO\|IWUGO\) += +[0-9]+$" 21 perf trace -e $evts touch $file 2>&1 | \
22 egrep " +[0-9]+\.[0-9]+ +\( +[0-9]+\.[0-9]+ ms\): +touch\/[0-9]+ open(at)?\((dfd: +CWD, +)?filename: +${file}, +flags: CREAT\|NOCTTY\|NONBLOCK\|WRONLY, +mode: +IRUGO\|IWUGO\) += +[0-9]+$"
22} 23}
23 24
24 25
diff --git a/tools/perf/tests/sw-clock.c b/tools/perf/tests/sw-clock.c
index 725a196991a8..f6c72f915d48 100644
--- a/tools/perf/tests/sw-clock.c
+++ b/tools/perf/tests/sw-clock.c
@@ -78,7 +78,7 @@ static int __test__sw_clock_freq(enum perf_sw_ids clock_id)
78 goto out_delete_evlist; 78 goto out_delete_evlist;
79 } 79 }
80 80
81 err = perf_evlist__mmap(evlist, 128, true); 81 err = perf_evlist__mmap(evlist, 128);
82 if (err < 0) { 82 if (err < 0) {
83 pr_debug("failed to mmap event: %d (%s)\n", errno, 83 pr_debug("failed to mmap event: %d (%s)\n", errno,
84 str_error_r(errno, sbuf, sizeof(sbuf))); 84 str_error_r(errno, sbuf, sizeof(sbuf)));
diff --git a/tools/perf/tests/switch-tracking.c b/tools/perf/tests/switch-tracking.c
index 7d3f4bf9534f..33e00295a972 100644
--- a/tools/perf/tests/switch-tracking.c
+++ b/tools/perf/tests/switch-tracking.c
@@ -449,7 +449,7 @@ int test__switch_tracking(struct test *test __maybe_unused, int subtest __maybe_
449 goto out; 449 goto out;
450 } 450 }
451 451
452 err = perf_evlist__mmap(evlist, UINT_MAX, false); 452 err = perf_evlist__mmap(evlist, UINT_MAX);
453 if (err) { 453 if (err) {
454 pr_debug("perf_evlist__mmap failed!\n"); 454 pr_debug("perf_evlist__mmap failed!\n");
455 goto out_err; 455 goto out_err;
diff --git a/tools/perf/tests/task-exit.c b/tools/perf/tests/task-exit.c
index bc4a7344e274..01b62b81751b 100644
--- a/tools/perf/tests/task-exit.c
+++ b/tools/perf/tests/task-exit.c
@@ -84,7 +84,11 @@ int test__task_exit(struct test *test __maybe_unused, int subtest __maybe_unused
84 84
85 evsel = perf_evlist__first(evlist); 85 evsel = perf_evlist__first(evlist);
86 evsel->attr.task = 1; 86 evsel->attr.task = 1;
87#ifdef __s390x__
88 evsel->attr.sample_freq = 1000000;
89#else
87 evsel->attr.sample_freq = 1; 90 evsel->attr.sample_freq = 1;
91#endif
88 evsel->attr.inherit = 0; 92 evsel->attr.inherit = 0;
89 evsel->attr.watermark = 0; 93 evsel->attr.watermark = 0;
90 evsel->attr.wakeup_events = 1; 94 evsel->attr.wakeup_events = 1;
@@ -97,7 +101,7 @@ int test__task_exit(struct test *test __maybe_unused, int subtest __maybe_unused
97 goto out_delete_evlist; 101 goto out_delete_evlist;
98 } 102 }
99 103
100 if (perf_evlist__mmap(evlist, 128, true) < 0) { 104 if (perf_evlist__mmap(evlist, 128) < 0) {
101 pr_debug("failed to mmap events: %d (%s)\n", errno, 105 pr_debug("failed to mmap events: %d (%s)\n", errno,
102 str_error_r(errno, sbuf, sizeof(sbuf))); 106 str_error_r(errno, sbuf, sizeof(sbuf)));
103 goto out_delete_evlist; 107 goto out_delete_evlist;
diff --git a/tools/perf/tests/thread-map.c b/tools/perf/tests/thread-map.c
index dbcb6a19b375..4de1939b58ba 100644
--- a/tools/perf/tests/thread-map.c
+++ b/tools/perf/tests/thread-map.c
@@ -105,7 +105,7 @@ int test__thread_map_remove(struct test *test __maybe_unused, int subtest __mayb
105 TEST_ASSERT_VAL("failed to allocate map string", 105 TEST_ASSERT_VAL("failed to allocate map string",
106 asprintf(&str, "%d,%d", getpid(), getppid()) >= 0); 106 asprintf(&str, "%d,%d", getpid(), getppid()) >= 0);
107 107
108 threads = thread_map__new_str(str, NULL, 0); 108 threads = thread_map__new_str(str, NULL, 0, false);
109 109
110 TEST_ASSERT_VAL("failed to allocate thread_map", 110 TEST_ASSERT_VAL("failed to allocate thread_map",
111 threads); 111 threads);
diff --git a/tools/perf/tests/topology.c b/tools/perf/tests/topology.c
index a59db7c45a65..17cb1bb3448c 100644
--- a/tools/perf/tests/topology.c
+++ b/tools/perf/tests/topology.c
@@ -30,12 +30,14 @@ static int get_temp(char *path)
30static int session_write_header(char *path) 30static int session_write_header(char *path)
31{ 31{
32 struct perf_session *session; 32 struct perf_session *session;
33 struct perf_data_file file = { 33 struct perf_data data = {
34 .path = path, 34 .file = {
35 .mode = PERF_DATA_MODE_WRITE, 35 .path = path,
36 },
37 .mode = PERF_DATA_MODE_WRITE,
36 }; 38 };
37 39
38 session = perf_session__new(&file, false, NULL); 40 session = perf_session__new(&data, false, NULL);
39 TEST_ASSERT_VAL("can't get session", session); 41 TEST_ASSERT_VAL("can't get session", session);
40 42
41 session->evlist = perf_evlist__new_default(); 43 session->evlist = perf_evlist__new_default();
@@ -47,7 +49,7 @@ static int session_write_header(char *path)
47 session->header.data_size += DATA_SIZE; 49 session->header.data_size += DATA_SIZE;
48 50
49 TEST_ASSERT_VAL("failed to write header", 51 TEST_ASSERT_VAL("failed to write header",
50 !perf_session__write_header(session, session->evlist, file.fd, true)); 52 !perf_session__write_header(session, session->evlist, data.file.fd, true));
51 53
52 perf_session__delete(session); 54 perf_session__delete(session);
53 55
@@ -57,13 +59,15 @@ static int session_write_header(char *path)
57static int check_cpu_topology(char *path, struct cpu_map *map) 59static int check_cpu_topology(char *path, struct cpu_map *map)
58{ 60{
59 struct perf_session *session; 61 struct perf_session *session;
60 struct perf_data_file file = { 62 struct perf_data data = {
61 .path = path, 63 .file = {
62 .mode = PERF_DATA_MODE_READ, 64 .path = path,
65 },
66 .mode = PERF_DATA_MODE_READ,
63 }; 67 };
64 int i; 68 int i;
65 69
66 session = perf_session__new(&file, false, NULL); 70 session = perf_session__new(&data, false, NULL);
67 TEST_ASSERT_VAL("can't get session", session); 71 TEST_ASSERT_VAL("can't get session", session);
68 72
69 for (i = 0; i < session->header.env.nr_cpus_avail; i++) { 73 for (i = 0; i < session->header.env.nr_cpus_avail; i++) {
diff --git a/tools/perf/trace/beauty/Build b/tools/perf/trace/beauty/Build
index 175d633c6b49..66330d4b739b 100644
--- a/tools/perf/trace/beauty/Build
+++ b/tools/perf/trace/beauty/Build
@@ -1,7 +1,10 @@
1libperf-y += clone.o 1libperf-y += clone.o
2libperf-y += fcntl.o 2libperf-y += fcntl.o
3libperf-y += flock.o
3ifeq ($(SRCARCH),$(filter $(SRCARCH),x86)) 4ifeq ($(SRCARCH),$(filter $(SRCARCH),x86))
4libperf-y += ioctl.o 5libperf-y += ioctl.o
5endif 6endif
7libperf-y += kcmp.o
6libperf-y += pkey_alloc.o 8libperf-y += pkey_alloc.o
9libperf-y += prctl.o
7libperf-y += statx.o 10libperf-y += statx.o
diff --git a/tools/perf/trace/beauty/arch_errno_names.c b/tools/perf/trace/beauty/arch_errno_names.c
new file mode 100644
index 000000000000..ede031c3a9e0
--- /dev/null
+++ b/tools/perf/trace/beauty/arch_errno_names.c
@@ -0,0 +1 @@
#include "trace/beauty/generated/arch_errno_name_array.c"
diff --git a/tools/perf/trace/beauty/arch_errno_names.sh b/tools/perf/trace/beauty/arch_errno_names.sh
new file mode 100755
index 000000000000..22c9fc900c84
--- /dev/null
+++ b/tools/perf/trace/beauty/arch_errno_names.sh
@@ -0,0 +1,100 @@
1#!/bin/sh
2# SPDX-License-Identifier: GPL-2.0
3#
4# Generate C file mapping errno codes to errno names.
5#
6# Copyright IBM Corp. 2018
7# Author(s): Hendrik Brueckner <brueckner@linux.vnet.ibm.com>
8
9gcc="$1"
10toolsdir="$2"
11include_path="-I$toolsdir/include/uapi"
12
13arch_string()
14{
15 echo "$1" |sed -e 'y/- /__/' |tr '[[:upper:]]' '[[:lower:]]'
16}
17
18asm_errno_file()
19{
20 local arch="$1"
21 local header
22
23 header="$toolsdir/arch/$arch/include/uapi/asm/errno.h"
24 if test -r "$header"; then
25 echo "$header"
26 else
27 echo "$toolsdir/include/uapi/asm-generic/errno.h"
28 fi
29}
30
31create_errno_lookup_func()
32{
33 local arch=$(arch_string "$1")
34 local nr name
35
36 cat <<EoFuncBegin
37static const char *errno_to_name__$arch(int err)
38{
39 switch (err) {
40EoFuncBegin
41
42 while read name nr; do
43 printf '\tcase %d: return "%s";\n' $nr $name
44 done
45
46 cat <<EoFuncEnd
47 default:
48 return "(unknown)";
49 }
50}
51
52EoFuncEnd
53}
54
55process_arch()
56{
57 local arch="$1"
58 local asm_errno=$(asm_errno_file "$arch")
59
60 $gcc $include_path -E -dM -x c $asm_errno \
61 |grep -hE '^#define[[:blank:]]+(E[^[:blank:]]+)[[:blank:]]+([[:digit:]]+).*' \
62 |awk '{ print $2","$3; }' \
63 |sort -t, -k2 -nu \
64 |IFS=, create_errno_lookup_func "$arch"
65}
66
67create_arch_errno_table_func()
68{
69 local archlist="$1"
70 local default="$2"
71 local arch
72
73 printf 'const char *arch_syscalls__strerrno(const char *arch, int err)\n'
74 printf '{\n'
75 for arch in $archlist; do
76 printf '\tif (!strcmp(arch, "%s"))\n' $(arch_string "$arch")
77 printf '\t\treturn errno_to_name__%s(err);\n' $(arch_string "$arch")
78 done
79 printf '\treturn errno_to_name__%s(err);\n' $(arch_string "$default")
80 printf '}\n'
81}
82
83cat <<EoHEADER
84/* SPDX-License-Identifier: GPL-2.0 */
85
86#include <string.h>
87
88EoHEADER
89
90# Create list of architectures and ignore those that do not appear
91# in tools/perf/arch
92archlist=""
93for arch in $(find $toolsdir/arch -maxdepth 1 -mindepth 1 -type d -printf "%f\n" | grep -v x86 | sort); do
94 test -d arch/$arch && archlist="$archlist $arch"
95done
96
97for arch in x86 $archlist generic; do
98 process_arch "$arch"
99done
100create_arch_errno_table_func "x86 $archlist" "generic"
diff --git a/tools/perf/trace/beauty/beauty.h b/tools/perf/trace/beauty/beauty.h
index d80655cd1881..984a504d335c 100644
--- a/tools/perf/trace/beauty/beauty.h
+++ b/tools/perf/trace/beauty/beauty.h
@@ -4,6 +4,7 @@
4 4
5#include <linux/kernel.h> 5#include <linux/kernel.h>
6#include <linux/types.h> 6#include <linux/types.h>
7#include <sys/types.h>
7 8
8struct strarray { 9struct strarray {
9 int offset; 10 int offset;
@@ -27,6 +28,8 @@ size_t strarray__scnprintf(struct strarray *sa, char *bf, size_t size, const cha
27struct trace; 28struct trace;
28struct thread; 29struct thread;
29 30
31size_t pid__scnprintf_fd(struct trace *trace, pid_t pid, int fd, char *bf, size_t size);
32
30/** 33/**
31 * @val: value of syscall argument being formatted 34 * @val: value of syscall argument being formatted
32 * @args: All the args, use syscall_args__val(arg, nth) to access one 35 * @args: All the args, use syscall_args__val(arg, nth) to access one
@@ -76,15 +79,33 @@ size_t syscall_arg__scnprintf_fcntl_cmd(char *bf, size_t size, struct syscall_ar
76size_t syscall_arg__scnprintf_fcntl_arg(char *bf, size_t size, struct syscall_arg *arg); 79size_t syscall_arg__scnprintf_fcntl_arg(char *bf, size_t size, struct syscall_arg *arg);
77#define SCA_FCNTL_ARG syscall_arg__scnprintf_fcntl_arg 80#define SCA_FCNTL_ARG syscall_arg__scnprintf_fcntl_arg
78 81
82size_t syscall_arg__scnprintf_flock(char *bf, size_t size, struct syscall_arg *arg);
83#define SCA_FLOCK syscall_arg__scnprintf_flock
84
79size_t syscall_arg__scnprintf_ioctl_cmd(char *bf, size_t size, struct syscall_arg *arg); 85size_t syscall_arg__scnprintf_ioctl_cmd(char *bf, size_t size, struct syscall_arg *arg);
80#define SCA_IOCTL_CMD syscall_arg__scnprintf_ioctl_cmd 86#define SCA_IOCTL_CMD syscall_arg__scnprintf_ioctl_cmd
81 87
88size_t syscall_arg__scnprintf_kcmp_type(char *bf, size_t size, struct syscall_arg *arg);
89#define SCA_KCMP_TYPE syscall_arg__scnprintf_kcmp_type
90
91size_t syscall_arg__scnprintf_kcmp_idx(char *bf, size_t size, struct syscall_arg *arg);
92#define SCA_KCMP_IDX syscall_arg__scnprintf_kcmp_idx
93
82size_t syscall_arg__scnprintf_pkey_alloc_access_rights(char *bf, size_t size, struct syscall_arg *arg); 94size_t syscall_arg__scnprintf_pkey_alloc_access_rights(char *bf, size_t size, struct syscall_arg *arg);
83#define SCA_PKEY_ALLOC_ACCESS_RIGHTS syscall_arg__scnprintf_pkey_alloc_access_rights 95#define SCA_PKEY_ALLOC_ACCESS_RIGHTS syscall_arg__scnprintf_pkey_alloc_access_rights
84 96
85size_t syscall_arg__scnprintf_open_flags(char *bf, size_t size, struct syscall_arg *arg); 97size_t syscall_arg__scnprintf_open_flags(char *bf, size_t size, struct syscall_arg *arg);
86#define SCA_OPEN_FLAGS syscall_arg__scnprintf_open_flags 98#define SCA_OPEN_FLAGS syscall_arg__scnprintf_open_flags
87 99
100size_t syscall_arg__scnprintf_prctl_option(char *bf, size_t size, struct syscall_arg *arg);
101#define SCA_PRCTL_OPTION syscall_arg__scnprintf_prctl_option
102
103size_t syscall_arg__scnprintf_prctl_arg2(char *bf, size_t size, struct syscall_arg *arg);
104#define SCA_PRCTL_ARG2 syscall_arg__scnprintf_prctl_arg2
105
106size_t syscall_arg__scnprintf_prctl_arg3(char *bf, size_t size, struct syscall_arg *arg);
107#define SCA_PRCTL_ARG3 syscall_arg__scnprintf_prctl_arg3
108
88size_t syscall_arg__scnprintf_statx_flags(char *bf, size_t size, struct syscall_arg *arg); 109size_t syscall_arg__scnprintf_statx_flags(char *bf, size_t size, struct syscall_arg *arg);
89#define SCA_STATX_FLAGS syscall_arg__scnprintf_statx_flags 110#define SCA_STATX_FLAGS syscall_arg__scnprintf_statx_flags
90 111
@@ -96,4 +117,6 @@ size_t open__scnprintf_flags(unsigned long flags, char *bf, size_t size);
96void syscall_arg__set_ret_scnprintf(struct syscall_arg *arg, 117void syscall_arg__set_ret_scnprintf(struct syscall_arg *arg,
97 size_t (*ret_scnprintf)(char *bf, size_t size, struct syscall_arg *arg)); 118 size_t (*ret_scnprintf)(char *bf, size_t size, struct syscall_arg *arg));
98 119
120const char *arch_syscalls__strerrno(const char *arch, int err);
121
99#endif /* _PERF_TRACE_BEAUTY_H */ 122#endif /* _PERF_TRACE_BEAUTY_H */
diff --git a/tools/perf/trace/beauty/flock.c b/tools/perf/trace/beauty/flock.c
index f9707f57566c..c4ff6ad30b06 100644
--- a/tools/perf/trace/beauty/flock.c
+++ b/tools/perf/trace/beauty/flock.c
@@ -1,5 +1,8 @@
1// SPDX-License-Identifier: GPL-2.0 1// SPDX-License-Identifier: GPL-2.0
2#include <fcntl.h> 2
3#include "trace/beauty/beauty.h"
4#include <linux/kernel.h>
5#include <uapi/linux/fcntl.h>
3 6
4#ifndef LOCK_MAND 7#ifndef LOCK_MAND
5#define LOCK_MAND 32 8#define LOCK_MAND 32
@@ -17,8 +20,7 @@
17#define LOCK_RW 192 20#define LOCK_RW 192
18#endif 21#endif
19 22
20static size_t syscall_arg__scnprintf_flock(char *bf, size_t size, 23size_t syscall_arg__scnprintf_flock(char *bf, size_t size, struct syscall_arg *arg)
21 struct syscall_arg *arg)
22{ 24{
23 int printed = 0, op = arg->val; 25 int printed = 0, op = arg->val;
24 26
@@ -45,5 +47,3 @@ static size_t syscall_arg__scnprintf_flock(char *bf, size_t size,
45 47
46 return printed; 48 return printed;
47} 49}
48
49#define SCA_FLOCK syscall_arg__scnprintf_flock
diff --git a/tools/perf/trace/beauty/futex_val3.c b/tools/perf/trace/beauty/futex_val3.c
new file mode 100644
index 000000000000..26f6b3253511
--- /dev/null
+++ b/tools/perf/trace/beauty/futex_val3.c
@@ -0,0 +1,18 @@
1// SPDX-License-Identifier: GPL-2.0
2#include <linux/futex.h>
3
4#ifndef FUTEX_BITSET_MATCH_ANY
5#define FUTEX_BITSET_MATCH_ANY 0xffffffff
6#endif
7
8static size_t syscall_arg__scnprintf_futex_val3(char *bf, size_t size, struct syscall_arg *arg)
9{
10 unsigned int bitset = arg->val;
11
12 if (bitset == FUTEX_BITSET_MATCH_ANY)
13 return scnprintf(bf, size, "MATCH_ANY");
14
15 return scnprintf(bf, size, "%#xd", bitset);
16}
17
18#define SCA_FUTEX_VAL3 syscall_arg__scnprintf_futex_val3
diff --git a/tools/perf/trace/beauty/kcmp.c b/tools/perf/trace/beauty/kcmp.c
new file mode 100644
index 000000000000..f62040eb9d5c
--- /dev/null
+++ b/tools/perf/trace/beauty/kcmp.c
@@ -0,0 +1,44 @@
1/*
2 * trace/beauty/kcmp.c
3 *
4 * Copyright (C) 2017, Red Hat Inc, Arnaldo Carvalho de Melo <acme@redhat.com>
5 *
6 * Released under the GPL v2. (and only v2, not any later version)
7 */
8
9#include "trace/beauty/beauty.h"
10#include <linux/kernel.h>
11#include <sys/types.h>
12#include <machine.h>
13#include <uapi/linux/kcmp.h>
14
15#include "trace/beauty/generated/kcmp_type_array.c"
16
17size_t syscall_arg__scnprintf_kcmp_idx(char *bf, size_t size, struct syscall_arg *arg)
18{
19 unsigned long fd = arg->val;
20 int type = syscall_arg__val(arg, 2);
21 pid_t pid;
22
23 if (type != KCMP_FILE)
24 return syscall_arg__scnprintf_long(bf, size, arg);
25
26 pid = syscall_arg__val(arg, arg->idx == 3 ? 0 : 1); /* idx1 -> pid1, idx2 -> pid2 */
27 return pid__scnprintf_fd(arg->trace, pid, fd, bf, size);
28}
29
30static size_t kcmp__scnprintf_type(int type, char *bf, size_t size)
31{
32 static DEFINE_STRARRAY(kcmp_types);
33 return strarray__scnprintf(&strarray__kcmp_types, bf, size, "%d", type);
34}
35
36size_t syscall_arg__scnprintf_kcmp_type(char *bf, size_t size, struct syscall_arg *arg)
37{
38 unsigned long type = arg->val;
39
40 if (type != KCMP_FILE)
41 arg->mask |= (1 << 3) | (1 << 4); /* Ignore idx1 and idx2 */
42
43 return kcmp__scnprintf_type(type, bf, size);
44}
diff --git a/tools/perf/trace/beauty/kcmp_type.sh b/tools/perf/trace/beauty/kcmp_type.sh
new file mode 100755
index 000000000000..40d063b8c082
--- /dev/null
+++ b/tools/perf/trace/beauty/kcmp_type.sh
@@ -0,0 +1,10 @@
1#!/bin/sh
2
3header_dir=$1
4
5printf "static const char *kcmp_types[] = {\n"
6regex='^[[:space:]]+(KCMP_(\w+)),'
7egrep $regex ${header_dir}/kcmp.h | grep -v KCMP_TYPES, | \
8 sed -r "s/$regex/\1 \2/g" | \
9 xargs printf "\t[%s]\t= \"%s\",\n"
10printf "};\n"
diff --git a/tools/perf/trace/beauty/madvise_behavior.sh b/tools/perf/trace/beauty/madvise_behavior.sh
new file mode 100755
index 000000000000..60ef8640ee70
--- /dev/null
+++ b/tools/perf/trace/beauty/madvise_behavior.sh
@@ -0,0 +1,10 @@
1#!/bin/sh
2
3header_dir=$1
4
5printf "static const char *madvise_advices[] = {\n"
6regex='^[[:space:]]*#[[:space:]]*define[[:space:]]+MADV_([[:alnum:]_]+)[[:space:]]+([[:digit:]]+)[[:space:]]*.*'
7egrep $regex ${header_dir}/mman-common.h | \
8 sed -r "s/$regex/\2 \1/g" | \
9 sort -n | xargs printf "\t[%s] = \"%s\",\n"
10printf "};\n"
diff --git a/tools/perf/trace/beauty/mmap.c b/tools/perf/trace/beauty/mmap.c
index 51f1cea406f5..417e3ecfe9d7 100644
--- a/tools/perf/trace/beauty/mmap.c
+++ b/tools/perf/trace/beauty/mmap.c
@@ -62,6 +62,9 @@ static size_t syscall_arg__scnprintf_mmap_flags(char *bf, size_t size,
62 P_MMAP_FLAG(POPULATE); 62 P_MMAP_FLAG(POPULATE);
63 P_MMAP_FLAG(STACK); 63 P_MMAP_FLAG(STACK);
64 P_MMAP_FLAG(UNINITIALIZED); 64 P_MMAP_FLAG(UNINITIALIZED);
65#ifdef MAP_SYNC
66 P_MMAP_FLAG(SYNC);
67#endif
65#undef P_MMAP_FLAG 68#undef P_MMAP_FLAG
66 69
67 if (flags) 70 if (flags)
@@ -95,35 +98,21 @@ static size_t syscall_arg__scnprintf_mremap_flags(char *bf, size_t size,
95 98
96#define SCA_MREMAP_FLAGS syscall_arg__scnprintf_mremap_flags 99#define SCA_MREMAP_FLAGS syscall_arg__scnprintf_mremap_flags
97 100
101static size_t madvise__scnprintf_behavior(int behavior, char *bf, size_t size)
102{
103#include "trace/beauty/generated/madvise_behavior_array.c"
104 static DEFINE_STRARRAY(madvise_advices);
105
106 if (behavior < strarray__madvise_advices.nr_entries && strarray__madvise_advices.entries[behavior] != NULL)
107 return scnprintf(bf, size, "MADV_%s", strarray__madvise_advices.entries[behavior]);
108
109 return scnprintf(bf, size, "%#", behavior);
110}
111
98static size_t syscall_arg__scnprintf_madvise_behavior(char *bf, size_t size, 112static size_t syscall_arg__scnprintf_madvise_behavior(char *bf, size_t size,
99 struct syscall_arg *arg) 113 struct syscall_arg *arg)
100{ 114{
101 int behavior = arg->val; 115 return madvise__scnprintf_behavior(arg->val, bf, size);
102
103 switch (behavior) {
104#define P_MADV_BHV(n) case MADV_##n: return scnprintf(bf, size, #n)
105 P_MADV_BHV(NORMAL);
106 P_MADV_BHV(RANDOM);
107 P_MADV_BHV(SEQUENTIAL);
108 P_MADV_BHV(WILLNEED);
109 P_MADV_BHV(DONTNEED);
110 P_MADV_BHV(FREE);
111 P_MADV_BHV(REMOVE);
112 P_MADV_BHV(DONTFORK);
113 P_MADV_BHV(DOFORK);
114 P_MADV_BHV(HWPOISON);
115 P_MADV_BHV(SOFT_OFFLINE);
116 P_MADV_BHV(MERGEABLE);
117 P_MADV_BHV(UNMERGEABLE);
118 P_MADV_BHV(HUGEPAGE);
119 P_MADV_BHV(NOHUGEPAGE);
120 P_MADV_BHV(DONTDUMP);
121 P_MADV_BHV(DODUMP);
122#undef P_MADV_BHV
123 default: break;
124 }
125
126 return scnprintf(bf, size, "%#x", behavior);
127} 116}
128 117
129#define SCA_MADV_BHV syscall_arg__scnprintf_madvise_behavior 118#define SCA_MADV_BHV syscall_arg__scnprintf_madvise_behavior
diff --git a/tools/perf/trace/beauty/prctl.c b/tools/perf/trace/beauty/prctl.c
new file mode 100644
index 000000000000..246130dad6c4
--- /dev/null
+++ b/tools/perf/trace/beauty/prctl.c
@@ -0,0 +1,82 @@
1/*
2 * trace/beauty/prctl.c
3 *
4 * Copyright (C) 2017, Red Hat Inc, Arnaldo Carvalho de Melo <acme@redhat.com>
5 *
6 * Released under the GPL v2. (and only v2, not any later version)
7 */
8
9#include "trace/beauty/beauty.h"
10#include <linux/kernel.h>
11#include <uapi/linux/prctl.h>
12
13#include "trace/beauty/generated/prctl_option_array.c"
14
15static size_t prctl__scnprintf_option(int option, char *bf, size_t size)
16{
17 static DEFINE_STRARRAY(prctl_options);
18 return strarray__scnprintf(&strarray__prctl_options, bf, size, "%d", option);
19}
20
21static size_t prctl__scnprintf_set_mm(int option, char *bf, size_t size)
22{
23 static DEFINE_STRARRAY(prctl_set_mm_options);
24 return strarray__scnprintf(&strarray__prctl_set_mm_options, bf, size, "%d", option);
25}
26
27size_t syscall_arg__scnprintf_prctl_arg2(char *bf, size_t size, struct syscall_arg *arg)
28{
29 int option = syscall_arg__val(arg, 0);
30
31 if (option == PR_SET_MM)
32 return prctl__scnprintf_set_mm(arg->val, bf, size);
33 /*
34 * We still don't grab the contents of pointers on entry or exit,
35 * so just print them as hex numbers
36 */
37 if (option == PR_SET_NAME)
38 return syscall_arg__scnprintf_hex(bf, size, arg);
39
40 return syscall_arg__scnprintf_long(bf, size, arg);
41}
42
43size_t syscall_arg__scnprintf_prctl_arg3(char *bf, size_t size, struct syscall_arg *arg)
44{
45 int option = syscall_arg__val(arg, 0);
46
47 if (option == PR_SET_MM)
48 return syscall_arg__scnprintf_hex(bf, size, arg);
49
50 return syscall_arg__scnprintf_long(bf, size, arg);
51}
52
53size_t syscall_arg__scnprintf_prctl_option(char *bf, size_t size, struct syscall_arg *arg)
54{
55 unsigned long option = arg->val;
56 enum {
57 SPO_ARG2 = (1 << 1),
58 SPO_ARG3 = (1 << 2),
59 SPO_ARG4 = (1 << 3),
60 SPO_ARG5 = (1 << 4),
61 SPO_ARG6 = (1 << 5),
62 };
63 const u8 all_but2 = SPO_ARG3 | SPO_ARG4 | SPO_ARG5 | SPO_ARG6;
64 const u8 all = SPO_ARG2 | all_but2;
65 const u8 masks[] = {
66 [PR_GET_DUMPABLE] = all,
67 [PR_SET_DUMPABLE] = all_but2,
68 [PR_SET_NAME] = all_but2,
69 [PR_GET_CHILD_SUBREAPER] = all_but2,
70 [PR_SET_CHILD_SUBREAPER] = all_but2,
71 [PR_GET_SECUREBITS] = all,
72 [PR_SET_SECUREBITS] = all_but2,
73 [PR_SET_MM] = SPO_ARG4 | SPO_ARG5 | SPO_ARG6,
74 [PR_GET_PDEATHSIG] = all,
75 [PR_SET_PDEATHSIG] = all_but2,
76 };
77
78 if (option < ARRAY_SIZE(masks))
79 arg->mask |= masks[option];
80
81 return prctl__scnprintf_option(option, bf, size);
82}
diff --git a/tools/perf/trace/beauty/prctl_option.sh b/tools/perf/trace/beauty/prctl_option.sh
new file mode 100755
index 000000000000..0be4138fbe71
--- /dev/null
+++ b/tools/perf/trace/beauty/prctl_option.sh
@@ -0,0 +1,17 @@
1#!/bin/sh
2
3header_dir=$1
4
5printf "static const char *prctl_options[] = {\n"
6regex='^#define[[:space:]]+PR_([GS]ET\w+)[[:space:]]*([[:xdigit:]]+).*'
7egrep $regex ${header_dir}/prctl.h | grep -v PR_SET_PTRACER | \
8 sed -r "s/$regex/\2 \1/g" | \
9 sort -n | xargs printf "\t[%s] = \"%s\",\n"
10printf "};\n"
11
12printf "static const char *prctl_set_mm_options[] = {\n"
13regex='^#[[:space:]]+define[[:space:]]+PR_SET_MM_(\w+)[[:space:]]*([[:digit:]]+).*'
14egrep $regex ${header_dir}/prctl.h | \
15 sed -r "s/$regex/\2 \1/g" | \
16 sort -n | xargs printf "\t[%s] = \"%s\",\n"
17printf "};\n"
diff --git a/tools/perf/ui/browsers/annotate.c b/tools/perf/ui/browsers/annotate.c
index 8f7f59d1a2b5..286427975112 100644
--- a/tools/perf/ui/browsers/annotate.c
+++ b/tools/perf/ui/browsers/annotate.c
@@ -25,16 +25,10 @@ struct disasm_line_samples {
25#define IPC_WIDTH 6 25#define IPC_WIDTH 6
26#define CYCLES_WIDTH 6 26#define CYCLES_WIDTH 6
27 27
28struct browser_disasm_line { 28struct browser_line {
29 struct rb_node rb_node; 29 u32 idx;
30 u32 idx; 30 int idx_asm;
31 int idx_asm; 31 int jump_sources;
32 int jump_sources;
33 /*
34 * actual length of this array is saved on the nr_events field
35 * of the struct annotate_browser
36 */
37 struct disasm_line_samples samples[1];
38}; 32};
39 33
40static struct annotate_browser_opt { 34static struct annotate_browser_opt {
@@ -53,39 +47,43 @@ static struct annotate_browser_opt {
53struct arch; 47struct arch;
54 48
55struct annotate_browser { 49struct annotate_browser {
56 struct ui_browser b; 50 struct ui_browser b;
57 struct rb_root entries; 51 struct rb_root entries;
58 struct rb_node *curr_hot; 52 struct rb_node *curr_hot;
59 struct disasm_line *selection; 53 struct annotation_line *selection;
60 struct disasm_line **offsets; 54 struct annotation_line **offsets;
61 struct arch *arch; 55 struct arch *arch;
62 int nr_events; 56 int nr_events;
63 u64 start; 57 u64 start;
64 int nr_asm_entries; 58 int nr_asm_entries;
65 int nr_entries; 59 int nr_entries;
66 int max_jump_sources; 60 int max_jump_sources;
67 int nr_jumps; 61 int nr_jumps;
68 bool searching_backwards; 62 bool searching_backwards;
69 bool have_cycles; 63 bool have_cycles;
70 u8 addr_width; 64 u8 addr_width;
71 u8 jumps_width; 65 u8 jumps_width;
72 u8 target_width; 66 u8 target_width;
73 u8 min_addr_width; 67 u8 min_addr_width;
74 u8 max_addr_width; 68 u8 max_addr_width;
75 char search_bf[128]; 69 char search_bf[128];
76}; 70};
77 71
78static inline struct browser_disasm_line *disasm_line__browser(struct disasm_line *dl) 72static inline struct browser_line *browser_line(struct annotation_line *al)
79{ 73{
80 return (struct browser_disasm_line *)(dl + 1); 74 void *ptr = al;
75
76 ptr = container_of(al, struct disasm_line, al);
77 return ptr - sizeof(struct browser_line);
81} 78}
82 79
83static bool disasm_line__filter(struct ui_browser *browser __maybe_unused, 80static bool disasm_line__filter(struct ui_browser *browser __maybe_unused,
84 void *entry) 81 void *entry)
85{ 82{
86 if (annotate_browser__opts.hide_src_code) { 83 if (annotate_browser__opts.hide_src_code) {
87 struct disasm_line *dl = list_entry(entry, struct disasm_line, node); 84 struct annotation_line *al = list_entry(entry, struct annotation_line, node);
88 return dl->offset == -1; 85
86 return al->offset == -1;
89 } 87 }
90 88
91 return false; 89 return false;
@@ -120,11 +118,37 @@ static int annotate_browser__cycles_width(struct annotate_browser *ab)
120 return ab->have_cycles ? IPC_WIDTH + CYCLES_WIDTH : 0; 118 return ab->have_cycles ? IPC_WIDTH + CYCLES_WIDTH : 0;
121} 119}
122 120
121static void disasm_line__write(struct disasm_line *dl, struct ui_browser *browser,
122 char *bf, size_t size)
123{
124 if (dl->ins.ops && dl->ins.ops->scnprintf) {
125 if (ins__is_jump(&dl->ins)) {
126 bool fwd = dl->ops.target.offset > dl->al.offset;
127
128 ui_browser__write_graph(browser, fwd ? SLSMG_DARROW_CHAR :
129 SLSMG_UARROW_CHAR);
130 SLsmg_write_char(' ');
131 } else if (ins__is_call(&dl->ins)) {
132 ui_browser__write_graph(browser, SLSMG_RARROW_CHAR);
133 SLsmg_write_char(' ');
134 } else if (ins__is_ret(&dl->ins)) {
135 ui_browser__write_graph(browser, SLSMG_LARROW_CHAR);
136 SLsmg_write_char(' ');
137 } else {
138 ui_browser__write_nstring(browser, " ", 2);
139 }
140 } else {
141 ui_browser__write_nstring(browser, " ", 2);
142 }
143
144 disasm_line__scnprintf(dl, bf, size, !annotate_browser__opts.use_offset);
145}
146
123static void annotate_browser__write(struct ui_browser *browser, void *entry, int row) 147static void annotate_browser__write(struct ui_browser *browser, void *entry, int row)
124{ 148{
125 struct annotate_browser *ab = container_of(browser, struct annotate_browser, b); 149 struct annotate_browser *ab = container_of(browser, struct annotate_browser, b);
126 struct disasm_line *dl = list_entry(entry, struct disasm_line, node); 150 struct annotation_line *al = list_entry(entry, struct annotation_line, node);
127 struct browser_disasm_line *bdl = disasm_line__browser(dl); 151 struct browser_line *bl = browser_line(al);
128 bool current_entry = ui_browser__is_current_entry(browser, row); 152 bool current_entry = ui_browser__is_current_entry(browser, row);
129 bool change_color = (!annotate_browser__opts.hide_src_code && 153 bool change_color = (!annotate_browser__opts.hide_src_code &&
130 (!current_entry || (browser->use_navkeypressed && 154 (!current_entry || (browser->use_navkeypressed &&
@@ -137,32 +161,32 @@ static void annotate_browser__write(struct ui_browser *browser, void *entry, int
137 bool show_title = false; 161 bool show_title = false;
138 162
139 for (i = 0; i < ab->nr_events; i++) { 163 for (i = 0; i < ab->nr_events; i++) {
140 if (bdl->samples[i].percent > percent_max) 164 if (al->samples[i].percent > percent_max)
141 percent_max = bdl->samples[i].percent; 165 percent_max = al->samples[i].percent;
142 } 166 }
143 167
144 if ((row == 0) && (dl->offset == -1 || percent_max == 0.0)) { 168 if ((row == 0) && (al->offset == -1 || percent_max == 0.0)) {
145 if (ab->have_cycles) { 169 if (ab->have_cycles) {
146 if (dl->ipc == 0.0 && dl->cycles == 0) 170 if (al->ipc == 0.0 && al->cycles == 0)
147 show_title = true; 171 show_title = true;
148 } else 172 } else
149 show_title = true; 173 show_title = true;
150 } 174 }
151 175
152 if (dl->offset != -1 && percent_max != 0.0) { 176 if (al->offset != -1 && percent_max != 0.0) {
153 for (i = 0; i < ab->nr_events; i++) { 177 for (i = 0; i < ab->nr_events; i++) {
154 ui_browser__set_percent_color(browser, 178 ui_browser__set_percent_color(browser,
155 bdl->samples[i].percent, 179 al->samples[i].percent,
156 current_entry); 180 current_entry);
157 if (annotate_browser__opts.show_total_period) { 181 if (annotate_browser__opts.show_total_period) {
158 ui_browser__printf(browser, "%11" PRIu64 " ", 182 ui_browser__printf(browser, "%11" PRIu64 " ",
159 bdl->samples[i].he.period); 183 al->samples[i].he.period);
160 } else if (annotate_browser__opts.show_nr_samples) { 184 } else if (annotate_browser__opts.show_nr_samples) {
161 ui_browser__printf(browser, "%6" PRIu64 " ", 185 ui_browser__printf(browser, "%6" PRIu64 " ",
162 bdl->samples[i].he.nr_samples); 186 al->samples[i].he.nr_samples);
163 } else { 187 } else {
164 ui_browser__printf(browser, "%6.2f ", 188 ui_browser__printf(browser, "%6.2f ",
165 bdl->samples[i].percent); 189 al->samples[i].percent);
166 } 190 }
167 } 191 }
168 } else { 192 } else {
@@ -177,16 +201,16 @@ static void annotate_browser__write(struct ui_browser *browser, void *entry, int
177 } 201 }
178 } 202 }
179 if (ab->have_cycles) { 203 if (ab->have_cycles) {
180 if (dl->ipc) 204 if (al->ipc)
181 ui_browser__printf(browser, "%*.2f ", IPC_WIDTH - 1, dl->ipc); 205 ui_browser__printf(browser, "%*.2f ", IPC_WIDTH - 1, al->ipc);
182 else if (!show_title) 206 else if (!show_title)
183 ui_browser__write_nstring(browser, " ", IPC_WIDTH); 207 ui_browser__write_nstring(browser, " ", IPC_WIDTH);
184 else 208 else
185 ui_browser__printf(browser, "%*s ", IPC_WIDTH - 1, "IPC"); 209 ui_browser__printf(browser, "%*s ", IPC_WIDTH - 1, "IPC");
186 210
187 if (dl->cycles) 211 if (al->cycles)
188 ui_browser__printf(browser, "%*" PRIu64 " ", 212 ui_browser__printf(browser, "%*" PRIu64 " ",
189 CYCLES_WIDTH - 1, dl->cycles); 213 CYCLES_WIDTH - 1, al->cycles);
190 else if (!show_title) 214 else if (!show_title)
191 ui_browser__write_nstring(browser, " ", CYCLES_WIDTH); 215 ui_browser__write_nstring(browser, " ", CYCLES_WIDTH);
192 else 216 else
@@ -199,19 +223,19 @@ static void annotate_browser__write(struct ui_browser *browser, void *entry, int
199 if (!browser->navkeypressed) 223 if (!browser->navkeypressed)
200 width += 1; 224 width += 1;
201 225
202 if (!*dl->line) 226 if (!*al->line)
203 ui_browser__write_nstring(browser, " ", width - pcnt_width - cycles_width); 227 ui_browser__write_nstring(browser, " ", width - pcnt_width - cycles_width);
204 else if (dl->offset == -1) { 228 else if (al->offset == -1) {
205 if (dl->line_nr && annotate_browser__opts.show_linenr) 229 if (al->line_nr && annotate_browser__opts.show_linenr)
206 printed = scnprintf(bf, sizeof(bf), "%-*d ", 230 printed = scnprintf(bf, sizeof(bf), "%-*d ",
207 ab->addr_width + 1, dl->line_nr); 231 ab->addr_width + 1, al->line_nr);
208 else 232 else
209 printed = scnprintf(bf, sizeof(bf), "%*s ", 233 printed = scnprintf(bf, sizeof(bf), "%*s ",
210 ab->addr_width, " "); 234 ab->addr_width, " ");
211 ui_browser__write_nstring(browser, bf, printed); 235 ui_browser__write_nstring(browser, bf, printed);
212 ui_browser__write_nstring(browser, dl->line, width - printed - pcnt_width - cycles_width + 1); 236 ui_browser__write_nstring(browser, al->line, width - printed - pcnt_width - cycles_width + 1);
213 } else { 237 } else {
214 u64 addr = dl->offset; 238 u64 addr = al->offset;
215 int color = -1; 239 int color = -1;
216 240
217 if (!annotate_browser__opts.use_offset) 241 if (!annotate_browser__opts.use_offset)
@@ -220,13 +244,13 @@ static void annotate_browser__write(struct ui_browser *browser, void *entry, int
220 if (!annotate_browser__opts.use_offset) { 244 if (!annotate_browser__opts.use_offset) {
221 printed = scnprintf(bf, sizeof(bf), "%" PRIx64 ": ", addr); 245 printed = scnprintf(bf, sizeof(bf), "%" PRIx64 ": ", addr);
222 } else { 246 } else {
223 if (bdl->jump_sources) { 247 if (bl->jump_sources) {
224 if (annotate_browser__opts.show_nr_jumps) { 248 if (annotate_browser__opts.show_nr_jumps) {
225 int prev; 249 int prev;
226 printed = scnprintf(bf, sizeof(bf), "%*d ", 250 printed = scnprintf(bf, sizeof(bf), "%*d ",
227 ab->jumps_width, 251 ab->jumps_width,
228 bdl->jump_sources); 252 bl->jump_sources);
229 prev = annotate_browser__set_jumps_percent_color(ab, bdl->jump_sources, 253 prev = annotate_browser__set_jumps_percent_color(ab, bl->jump_sources,
230 current_entry); 254 current_entry);
231 ui_browser__write_nstring(browser, bf, printed); 255 ui_browser__write_nstring(browser, bf, printed);
232 ui_browser__set_color(browser, prev); 256 ui_browser__set_color(browser, prev);
@@ -245,32 +269,14 @@ static void annotate_browser__write(struct ui_browser *browser, void *entry, int
245 ui_browser__write_nstring(browser, bf, printed); 269 ui_browser__write_nstring(browser, bf, printed);
246 if (change_color) 270 if (change_color)
247 ui_browser__set_color(browser, color); 271 ui_browser__set_color(browser, color);
248 if (dl->ins.ops && dl->ins.ops->scnprintf) {
249 if (ins__is_jump(&dl->ins)) {
250 bool fwd = dl->ops.target.offset > dl->offset;
251
252 ui_browser__write_graph(browser, fwd ? SLSMG_DARROW_CHAR :
253 SLSMG_UARROW_CHAR);
254 SLsmg_write_char(' ');
255 } else if (ins__is_call(&dl->ins)) {
256 ui_browser__write_graph(browser, SLSMG_RARROW_CHAR);
257 SLsmg_write_char(' ');
258 } else if (ins__is_ret(&dl->ins)) {
259 ui_browser__write_graph(browser, SLSMG_LARROW_CHAR);
260 SLsmg_write_char(' ');
261 } else {
262 ui_browser__write_nstring(browser, " ", 2);
263 }
264 } else {
265 ui_browser__write_nstring(browser, " ", 2);
266 }
267 272
268 disasm_line__scnprintf(dl, bf, sizeof(bf), !annotate_browser__opts.use_offset); 273 disasm_line__write(disasm_line(al), browser, bf, sizeof(bf));
274
269 ui_browser__write_nstring(browser, bf, width - pcnt_width - cycles_width - 3 - printed); 275 ui_browser__write_nstring(browser, bf, width - pcnt_width - cycles_width - 3 - printed);
270 } 276 }
271 277
272 if (current_entry) 278 if (current_entry)
273 ab->selection = dl; 279 ab->selection = al;
274} 280}
275 281
276static bool disasm_line__is_valid_jump(struct disasm_line *dl, struct symbol *sym) 282static bool disasm_line__is_valid_jump(struct disasm_line *dl, struct symbol *sym)
@@ -286,7 +292,7 @@ static bool disasm_line__is_valid_jump(struct disasm_line *dl, struct symbol *sy
286 292
287static bool is_fused(struct annotate_browser *ab, struct disasm_line *cursor) 293static bool is_fused(struct annotate_browser *ab, struct disasm_line *cursor)
288{ 294{
289 struct disasm_line *pos = list_prev_entry(cursor, node); 295 struct disasm_line *pos = list_prev_entry(cursor, al.node);
290 const char *name; 296 const char *name;
291 297
292 if (!pos) 298 if (!pos)
@@ -306,8 +312,9 @@ static bool is_fused(struct annotate_browser *ab, struct disasm_line *cursor)
306static void annotate_browser__draw_current_jump(struct ui_browser *browser) 312static void annotate_browser__draw_current_jump(struct ui_browser *browser)
307{ 313{
308 struct annotate_browser *ab = container_of(browser, struct annotate_browser, b); 314 struct annotate_browser *ab = container_of(browser, struct annotate_browser, b);
309 struct disasm_line *cursor = ab->selection, *target; 315 struct disasm_line *cursor = disasm_line(ab->selection);
310 struct browser_disasm_line *btarget, *bcursor; 316 struct annotation_line *target;
317 struct browser_line *btarget, *bcursor;
311 unsigned int from, to; 318 unsigned int from, to;
312 struct map_symbol *ms = ab->b.priv; 319 struct map_symbol *ms = ab->b.priv;
313 struct symbol *sym = ms->sym; 320 struct symbol *sym = ms->sym;
@@ -321,11 +328,9 @@ static void annotate_browser__draw_current_jump(struct ui_browser *browser)
321 return; 328 return;
322 329
323 target = ab->offsets[cursor->ops.target.offset]; 330 target = ab->offsets[cursor->ops.target.offset];
324 if (!target)
325 return;
326 331
327 bcursor = disasm_line__browser(cursor); 332 bcursor = browser_line(&cursor->al);
328 btarget = disasm_line__browser(target); 333 btarget = browser_line(target);
329 334
330 if (annotate_browser__opts.hide_src_code) { 335 if (annotate_browser__opts.hide_src_code) {
331 from = bcursor->idx_asm; 336 from = bcursor->idx_asm;
@@ -361,12 +366,11 @@ static unsigned int annotate_browser__refresh(struct ui_browser *browser)
361 return ret; 366 return ret;
362} 367}
363 368
364static int disasm__cmp(struct browser_disasm_line *a, 369static int disasm__cmp(struct annotation_line *a, struct annotation_line *b)
365 struct browser_disasm_line *b, int nr_pcnt)
366{ 370{
367 int i; 371 int i;
368 372
369 for (i = 0; i < nr_pcnt; i++) { 373 for (i = 0; i < a->samples_nr; i++) {
370 if (a->samples[i].percent == b->samples[i].percent) 374 if (a->samples[i].percent == b->samples[i].percent)
371 continue; 375 continue;
372 return a->samples[i].percent < b->samples[i].percent; 376 return a->samples[i].percent < b->samples[i].percent;
@@ -374,28 +378,27 @@ static int disasm__cmp(struct browser_disasm_line *a,
374 return 0; 378 return 0;
375} 379}
376 380
377static void disasm_rb_tree__insert(struct rb_root *root, struct browser_disasm_line *bdl, 381static void disasm_rb_tree__insert(struct rb_root *root, struct annotation_line *al)
378 int nr_events)
379{ 382{
380 struct rb_node **p = &root->rb_node; 383 struct rb_node **p = &root->rb_node;
381 struct rb_node *parent = NULL; 384 struct rb_node *parent = NULL;
382 struct browser_disasm_line *l; 385 struct annotation_line *l;
383 386
384 while (*p != NULL) { 387 while (*p != NULL) {
385 parent = *p; 388 parent = *p;
386 l = rb_entry(parent, struct browser_disasm_line, rb_node); 389 l = rb_entry(parent, struct annotation_line, rb_node);
387 390
388 if (disasm__cmp(bdl, l, nr_events)) 391 if (disasm__cmp(al, l))
389 p = &(*p)->rb_left; 392 p = &(*p)->rb_left;
390 else 393 else
391 p = &(*p)->rb_right; 394 p = &(*p)->rb_right;
392 } 395 }
393 rb_link_node(&bdl->rb_node, parent, p); 396 rb_link_node(&al->rb_node, parent, p);
394 rb_insert_color(&bdl->rb_node, root); 397 rb_insert_color(&al->rb_node, root);
395} 398}
396 399
397static void annotate_browser__set_top(struct annotate_browser *browser, 400static void annotate_browser__set_top(struct annotate_browser *browser,
398 struct disasm_line *pos, u32 idx) 401 struct annotation_line *pos, u32 idx)
399{ 402{
400 unsigned back; 403 unsigned back;
401 404
@@ -404,7 +407,7 @@ static void annotate_browser__set_top(struct annotate_browser *browser,
404 browser->b.top_idx = browser->b.index = idx; 407 browser->b.top_idx = browser->b.index = idx;
405 408
406 while (browser->b.top_idx != 0 && back != 0) { 409 while (browser->b.top_idx != 0 && back != 0) {
407 pos = list_entry(pos->node.prev, struct disasm_line, node); 410 pos = list_entry(pos->node.prev, struct annotation_line, node);
408 411
409 if (disasm_line__filter(&browser->b, &pos->node)) 412 if (disasm_line__filter(&browser->b, &pos->node))
410 continue; 413 continue;
@@ -420,12 +423,13 @@ static void annotate_browser__set_top(struct annotate_browser *browser,
420static void annotate_browser__set_rb_top(struct annotate_browser *browser, 423static void annotate_browser__set_rb_top(struct annotate_browser *browser,
421 struct rb_node *nd) 424 struct rb_node *nd)
422{ 425{
423 struct browser_disasm_line *bpos; 426 struct browser_line *bpos;
424 struct disasm_line *pos; 427 struct annotation_line *pos;
425 u32 idx; 428 u32 idx;
426 429
427 bpos = rb_entry(nd, struct browser_disasm_line, rb_node); 430 pos = rb_entry(nd, struct annotation_line, rb_node);
428 pos = ((struct disasm_line *)bpos) - 1; 431 bpos = browser_line(pos);
432
429 idx = bpos->idx; 433 idx = bpos->idx;
430 if (annotate_browser__opts.hide_src_code) 434 if (annotate_browser__opts.hide_src_code)
431 idx = bpos->idx_asm; 435 idx = bpos->idx_asm;
@@ -439,46 +443,35 @@ static void annotate_browser__calc_percent(struct annotate_browser *browser,
439 struct map_symbol *ms = browser->b.priv; 443 struct map_symbol *ms = browser->b.priv;
440 struct symbol *sym = ms->sym; 444 struct symbol *sym = ms->sym;
441 struct annotation *notes = symbol__annotation(sym); 445 struct annotation *notes = symbol__annotation(sym);
442 struct disasm_line *pos, *next; 446 struct disasm_line *pos;
443 s64 len = symbol__size(sym);
444 447
445 browser->entries = RB_ROOT; 448 browser->entries = RB_ROOT;
446 449
447 pthread_mutex_lock(&notes->lock); 450 pthread_mutex_lock(&notes->lock);
448 451
449 list_for_each_entry(pos, &notes->src->source, node) { 452 symbol__calc_percent(sym, evsel);
450 struct browser_disasm_line *bpos = disasm_line__browser(pos); 453
451 const char *path = NULL; 454 list_for_each_entry(pos, &notes->src->source, al.node) {
452 double max_percent = 0.0; 455 double max_percent = 0.0;
453 int i; 456 int i;
454 457
455 if (pos->offset == -1) { 458 if (pos->al.offset == -1) {
456 RB_CLEAR_NODE(&bpos->rb_node); 459 RB_CLEAR_NODE(&pos->al.rb_node);
457 continue; 460 continue;
458 } 461 }
459 462
460 next = disasm__get_next_ip_line(&notes->src->source, pos); 463 for (i = 0; i < pos->al.samples_nr; i++) {
461 464 struct annotation_data *sample = &pos->al.samples[i];
462 for (i = 0; i < browser->nr_events; i++) {
463 struct sym_hist_entry sample;
464
465 bpos->samples[i].percent = disasm__calc_percent(notes,
466 evsel->idx + i,
467 pos->offset,
468 next ? next->offset : len,
469 &path, &sample);
470 bpos->samples[i].he = sample;
471 465
472 if (max_percent < bpos->samples[i].percent) 466 if (max_percent < sample->percent)
473 max_percent = bpos->samples[i].percent; 467 max_percent = sample->percent;
474 } 468 }
475 469
476 if (max_percent < 0.01 && pos->ipc == 0) { 470 if (max_percent < 0.01 && pos->al.ipc == 0) {
477 RB_CLEAR_NODE(&bpos->rb_node); 471 RB_CLEAR_NODE(&pos->al.rb_node);
478 continue; 472 continue;
479 } 473 }
480 disasm_rb_tree__insert(&browser->entries, bpos, 474 disasm_rb_tree__insert(&browser->entries, &pos->al);
481 browser->nr_events);
482 } 475 }
483 pthread_mutex_unlock(&notes->lock); 476 pthread_mutex_unlock(&notes->lock);
484 477
@@ -487,38 +480,38 @@ static void annotate_browser__calc_percent(struct annotate_browser *browser,
487 480
488static bool annotate_browser__toggle_source(struct annotate_browser *browser) 481static bool annotate_browser__toggle_source(struct annotate_browser *browser)
489{ 482{
490 struct disasm_line *dl; 483 struct annotation_line *al;
491 struct browser_disasm_line *bdl; 484 struct browser_line *bl;
492 off_t offset = browser->b.index - browser->b.top_idx; 485 off_t offset = browser->b.index - browser->b.top_idx;
493 486
494 browser->b.seek(&browser->b, offset, SEEK_CUR); 487 browser->b.seek(&browser->b, offset, SEEK_CUR);
495 dl = list_entry(browser->b.top, struct disasm_line, node); 488 al = list_entry(browser->b.top, struct annotation_line, node);
496 bdl = disasm_line__browser(dl); 489 bl = browser_line(al);
497 490
498 if (annotate_browser__opts.hide_src_code) { 491 if (annotate_browser__opts.hide_src_code) {
499 if (bdl->idx_asm < offset) 492 if (bl->idx_asm < offset)
500 offset = bdl->idx; 493 offset = bl->idx;
501 494
502 browser->b.nr_entries = browser->nr_entries; 495 browser->b.nr_entries = browser->nr_entries;
503 annotate_browser__opts.hide_src_code = false; 496 annotate_browser__opts.hide_src_code = false;
504 browser->b.seek(&browser->b, -offset, SEEK_CUR); 497 browser->b.seek(&browser->b, -offset, SEEK_CUR);
505 browser->b.top_idx = bdl->idx - offset; 498 browser->b.top_idx = bl->idx - offset;
506 browser->b.index = bdl->idx; 499 browser->b.index = bl->idx;
507 } else { 500 } else {
508 if (bdl->idx_asm < 0) { 501 if (bl->idx_asm < 0) {
509 ui_helpline__puts("Only available for assembly lines."); 502 ui_helpline__puts("Only available for assembly lines.");
510 browser->b.seek(&browser->b, -offset, SEEK_CUR); 503 browser->b.seek(&browser->b, -offset, SEEK_CUR);
511 return false; 504 return false;
512 } 505 }
513 506
514 if (bdl->idx_asm < offset) 507 if (bl->idx_asm < offset)
515 offset = bdl->idx_asm; 508 offset = bl->idx_asm;
516 509
517 browser->b.nr_entries = browser->nr_asm_entries; 510 browser->b.nr_entries = browser->nr_asm_entries;
518 annotate_browser__opts.hide_src_code = true; 511 annotate_browser__opts.hide_src_code = true;
519 browser->b.seek(&browser->b, -offset, SEEK_CUR); 512 browser->b.seek(&browser->b, -offset, SEEK_CUR);
520 browser->b.top_idx = bdl->idx_asm - offset; 513 browser->b.top_idx = bl->idx_asm - offset;
521 browser->b.index = bdl->idx_asm; 514 browser->b.index = bl->idx_asm;
522 } 515 }
523 516
524 return true; 517 return true;
@@ -543,7 +536,7 @@ static bool annotate_browser__callq(struct annotate_browser *browser,
543 struct hist_browser_timer *hbt) 536 struct hist_browser_timer *hbt)
544{ 537{
545 struct map_symbol *ms = browser->b.priv; 538 struct map_symbol *ms = browser->b.priv;
546 struct disasm_line *dl = browser->selection; 539 struct disasm_line *dl = disasm_line(browser->selection);
547 struct annotation *notes; 540 struct annotation *notes;
548 struct addr_map_symbol target = { 541 struct addr_map_symbol target = {
549 .map = ms->map, 542 .map = ms->map,
@@ -589,10 +582,10 @@ struct disasm_line *annotate_browser__find_offset(struct annotate_browser *brows
589 struct disasm_line *pos; 582 struct disasm_line *pos;
590 583
591 *idx = 0; 584 *idx = 0;
592 list_for_each_entry(pos, &notes->src->source, node) { 585 list_for_each_entry(pos, &notes->src->source, al.node) {
593 if (pos->offset == offset) 586 if (pos->al.offset == offset)
594 return pos; 587 return pos;
595 if (!disasm_line__filter(&browser->b, &pos->node)) 588 if (!disasm_line__filter(&browser->b, &pos->al.node))
596 ++*idx; 589 ++*idx;
597 } 590 }
598 591
@@ -601,7 +594,7 @@ struct disasm_line *annotate_browser__find_offset(struct annotate_browser *brows
601 594
602static bool annotate_browser__jump(struct annotate_browser *browser) 595static bool annotate_browser__jump(struct annotate_browser *browser)
603{ 596{
604 struct disasm_line *dl = browser->selection; 597 struct disasm_line *dl = disasm_line(browser->selection);
605 u64 offset; 598 u64 offset;
606 s64 idx; 599 s64 idx;
607 600
@@ -615,29 +608,29 @@ static bool annotate_browser__jump(struct annotate_browser *browser)
615 return true; 608 return true;
616 } 609 }
617 610
618 annotate_browser__set_top(browser, dl, idx); 611 annotate_browser__set_top(browser, &dl->al, idx);
619 612
620 return true; 613 return true;
621} 614}
622 615
623static 616static
624struct disasm_line *annotate_browser__find_string(struct annotate_browser *browser, 617struct annotation_line *annotate_browser__find_string(struct annotate_browser *browser,
625 char *s, s64 *idx) 618 char *s, s64 *idx)
626{ 619{
627 struct map_symbol *ms = browser->b.priv; 620 struct map_symbol *ms = browser->b.priv;
628 struct symbol *sym = ms->sym; 621 struct symbol *sym = ms->sym;
629 struct annotation *notes = symbol__annotation(sym); 622 struct annotation *notes = symbol__annotation(sym);
630 struct disasm_line *pos = browser->selection; 623 struct annotation_line *al = browser->selection;
631 624
632 *idx = browser->b.index; 625 *idx = browser->b.index;
633 list_for_each_entry_continue(pos, &notes->src->source, node) { 626 list_for_each_entry_continue(al, &notes->src->source, node) {
634 if (disasm_line__filter(&browser->b, &pos->node)) 627 if (disasm_line__filter(&browser->b, &al->node))
635 continue; 628 continue;
636 629
637 ++*idx; 630 ++*idx;
638 631
639 if (pos->line && strstr(pos->line, s) != NULL) 632 if (al->line && strstr(al->line, s) != NULL)
640 return pos; 633 return al;
641 } 634 }
642 635
643 return NULL; 636 return NULL;
@@ -645,38 +638,38 @@ struct disasm_line *annotate_browser__find_string(struct annotate_browser *brows
645 638
646static bool __annotate_browser__search(struct annotate_browser *browser) 639static bool __annotate_browser__search(struct annotate_browser *browser)
647{ 640{
648 struct disasm_line *dl; 641 struct annotation_line *al;
649 s64 idx; 642 s64 idx;
650 643
651 dl = annotate_browser__find_string(browser, browser->search_bf, &idx); 644 al = annotate_browser__find_string(browser, browser->search_bf, &idx);
652 if (dl == NULL) { 645 if (al == NULL) {
653 ui_helpline__puts("String not found!"); 646 ui_helpline__puts("String not found!");
654 return false; 647 return false;
655 } 648 }
656 649
657 annotate_browser__set_top(browser, dl, idx); 650 annotate_browser__set_top(browser, al, idx);
658 browser->searching_backwards = false; 651 browser->searching_backwards = false;
659 return true; 652 return true;
660} 653}
661 654
662static 655static
663struct disasm_line *annotate_browser__find_string_reverse(struct annotate_browser *browser, 656struct annotation_line *annotate_browser__find_string_reverse(struct annotate_browser *browser,
664 char *s, s64 *idx) 657 char *s, s64 *idx)
665{ 658{
666 struct map_symbol *ms = browser->b.priv; 659 struct map_symbol *ms = browser->b.priv;
667 struct symbol *sym = ms->sym; 660 struct symbol *sym = ms->sym;
668 struct annotation *notes = symbol__annotation(sym); 661 struct annotation *notes = symbol__annotation(sym);
669 struct disasm_line *pos = browser->selection; 662 struct annotation_line *al = browser->selection;
670 663
671 *idx = browser->b.index; 664 *idx = browser->b.index;
672 list_for_each_entry_continue_reverse(pos, &notes->src->source, node) { 665 list_for_each_entry_continue_reverse(al, &notes->src->source, node) {
673 if (disasm_line__filter(&browser->b, &pos->node)) 666 if (disasm_line__filter(&browser->b, &al->node))
674 continue; 667 continue;
675 668
676 --*idx; 669 --*idx;
677 670
678 if (pos->line && strstr(pos->line, s) != NULL) 671 if (al->line && strstr(al->line, s) != NULL)
679 return pos; 672 return al;
680 } 673 }
681 674
682 return NULL; 675 return NULL;
@@ -684,16 +677,16 @@ struct disasm_line *annotate_browser__find_string_reverse(struct annotate_browse
684 677
685static bool __annotate_browser__search_reverse(struct annotate_browser *browser) 678static bool __annotate_browser__search_reverse(struct annotate_browser *browser)
686{ 679{
687 struct disasm_line *dl; 680 struct annotation_line *al;
688 s64 idx; 681 s64 idx;
689 682
690 dl = annotate_browser__find_string_reverse(browser, browser->search_bf, &idx); 683 al = annotate_browser__find_string_reverse(browser, browser->search_bf, &idx);
691 if (dl == NULL) { 684 if (al == NULL) {
692 ui_helpline__puts("String not found!"); 685 ui_helpline__puts("String not found!");
693 return false; 686 return false;
694 } 687 }
695 688
696 annotate_browser__set_top(browser, dl, idx); 689 annotate_browser__set_top(browser, al, idx);
697 browser->searching_backwards = true; 690 browser->searching_backwards = true;
698 return true; 691 return true;
699} 692}
@@ -899,13 +892,16 @@ show_help:
899 continue; 892 continue;
900 case K_ENTER: 893 case K_ENTER:
901 case K_RIGHT: 894 case K_RIGHT:
895 {
896 struct disasm_line *dl = disasm_line(browser->selection);
897
902 if (browser->selection == NULL) 898 if (browser->selection == NULL)
903 ui_helpline__puts("Huh? No selection. Report to linux-kernel@vger.kernel.org"); 899 ui_helpline__puts("Huh? No selection. Report to linux-kernel@vger.kernel.org");
904 else if (browser->selection->offset == -1) 900 else if (browser->selection->offset == -1)
905 ui_helpline__puts("Actions are only available for assembly lines."); 901 ui_helpline__puts("Actions are only available for assembly lines.");
906 else if (!browser->selection->ins.ops) 902 else if (!dl->ins.ops)
907 goto show_sup_ins; 903 goto show_sup_ins;
908 else if (ins__is_ret(&browser->selection->ins)) 904 else if (ins__is_ret(&dl->ins))
909 goto out; 905 goto out;
910 else if (!(annotate_browser__jump(browser) || 906 else if (!(annotate_browser__jump(browser) ||
911 annotate_browser__callq(browser, evsel, hbt))) { 907 annotate_browser__callq(browser, evsel, hbt))) {
@@ -913,6 +909,7 @@ show_sup_ins:
913 ui_helpline__puts("Actions are only available for function call/return & jump/branch instructions."); 909 ui_helpline__puts("Actions are only available for function call/return & jump/branch instructions.");
914 } 910 }
915 continue; 911 continue;
912 }
916 case 't': 913 case 't':
917 if (annotate_browser__opts.show_total_period) { 914 if (annotate_browser__opts.show_total_period) {
918 annotate_browser__opts.show_total_period = false; 915 annotate_browser__opts.show_total_period = false;
@@ -990,10 +987,10 @@ static void count_and_fill(struct annotate_browser *browser, u64 start, u64 end,
990 return; 987 return;
991 988
992 for (offset = start; offset <= end; offset++) { 989 for (offset = start; offset <= end; offset++) {
993 struct disasm_line *dl = browser->offsets[offset]; 990 struct annotation_line *al = browser->offsets[offset];
994 991
995 if (dl) 992 if (al)
996 dl->ipc = ipc; 993 al->ipc = ipc;
997 } 994 }
998 } 995 }
999} 996}
@@ -1018,13 +1015,13 @@ static void annotate__compute_ipc(struct annotate_browser *browser, size_t size,
1018 1015
1019 ch = &notes->src->cycles_hist[offset]; 1016 ch = &notes->src->cycles_hist[offset];
1020 if (ch && ch->cycles) { 1017 if (ch && ch->cycles) {
1021 struct disasm_line *dl; 1018 struct annotation_line *al;
1022 1019
1023 if (ch->have_start) 1020 if (ch->have_start)
1024 count_and_fill(browser, ch->start, offset, ch); 1021 count_and_fill(browser, ch->start, offset, ch);
1025 dl = browser->offsets[offset]; 1022 al = browser->offsets[offset];
1026 if (dl && ch->num_aggr) 1023 if (al && ch->num_aggr)
1027 dl->cycles = ch->cycles_aggr / ch->num_aggr; 1024 al->cycles = ch->cycles_aggr / ch->num_aggr;
1028 browser->have_cycles = true; 1025 browser->have_cycles = true;
1029 } 1026 }
1030 } 1027 }
@@ -1043,23 +1040,27 @@ static void annotate_browser__mark_jump_targets(struct annotate_browser *browser
1043 return; 1040 return;
1044 1041
1045 for (offset = 0; offset < size; ++offset) { 1042 for (offset = 0; offset < size; ++offset) {
1046 struct disasm_line *dl = browser->offsets[offset], *dlt; 1043 struct annotation_line *al = browser->offsets[offset];
1047 struct browser_disasm_line *bdlt; 1044 struct disasm_line *dl;
1045 struct browser_line *blt;
1046
1047 dl = disasm_line(al);
1048 1048
1049 if (!disasm_line__is_valid_jump(dl, sym)) 1049 if (!disasm_line__is_valid_jump(dl, sym))
1050 continue; 1050 continue;
1051 1051
1052 dlt = browser->offsets[dl->ops.target.offset]; 1052 al = browser->offsets[dl->ops.target.offset];
1053
1053 /* 1054 /*
1054 * FIXME: Oops, no jump target? Buggy disassembler? Or do we 1055 * FIXME: Oops, no jump target? Buggy disassembler? Or do we
1055 * have to adjust to the previous offset? 1056 * have to adjust to the previous offset?
1056 */ 1057 */
1057 if (dlt == NULL) 1058 if (al == NULL)
1058 continue; 1059 continue;
1059 1060
1060 bdlt = disasm_line__browser(dlt); 1061 blt = browser_line(al);
1061 if (++bdlt->jump_sources > browser->max_jump_sources) 1062 if (++blt->jump_sources > browser->max_jump_sources)
1062 browser->max_jump_sources = bdlt->jump_sources; 1063 browser->max_jump_sources = blt->jump_sources;
1063 1064
1064 ++browser->nr_jumps; 1065 ++browser->nr_jumps;
1065 } 1066 }
@@ -1078,7 +1079,7 @@ int symbol__tui_annotate(struct symbol *sym, struct map *map,
1078 struct perf_evsel *evsel, 1079 struct perf_evsel *evsel,
1079 struct hist_browser_timer *hbt) 1080 struct hist_browser_timer *hbt)
1080{ 1081{
1081 struct disasm_line *pos, *n; 1082 struct annotation_line *al;
1082 struct annotation *notes; 1083 struct annotation *notes;
1083 size_t size; 1084 size_t size;
1084 struct map_symbol ms = { 1085 struct map_symbol ms = {
@@ -1097,7 +1098,6 @@ int symbol__tui_annotate(struct symbol *sym, struct map *map,
1097 }; 1098 };
1098 int ret = -1, err; 1099 int ret = -1, err;
1099 int nr_pcnt = 1; 1100 int nr_pcnt = 1;
1100 size_t sizeof_bdl = sizeof(struct browser_disasm_line);
1101 1101
1102 if (sym == NULL) 1102 if (sym == NULL)
1103 return -1; 1103 return -1;
@@ -1107,21 +1107,16 @@ int symbol__tui_annotate(struct symbol *sym, struct map *map,
1107 if (map->dso->annotate_warned) 1107 if (map->dso->annotate_warned)
1108 return -1; 1108 return -1;
1109 1109
1110 browser.offsets = zalloc(size * sizeof(struct disasm_line *)); 1110 browser.offsets = zalloc(size * sizeof(struct annotation_line *));
1111 if (browser.offsets == NULL) { 1111 if (browser.offsets == NULL) {
1112 ui__error("Not enough memory!"); 1112 ui__error("Not enough memory!");
1113 return -1; 1113 return -1;
1114 } 1114 }
1115 1115
1116 if (perf_evsel__is_group_event(evsel)) { 1116 if (perf_evsel__is_group_event(evsel))
1117 nr_pcnt = evsel->nr_members; 1117 nr_pcnt = evsel->nr_members;
1118 sizeof_bdl += sizeof(struct disasm_line_samples) *
1119 (nr_pcnt - 1);
1120 }
1121 1118
1122 err = symbol__disassemble(sym, map, perf_evsel__env_arch(evsel), 1119 err = symbol__annotate(sym, map, evsel, sizeof(struct browser_line), &browser.arch);
1123 sizeof_bdl, &browser.arch,
1124 perf_evsel__env_cpuid(evsel));
1125 if (err) { 1120 if (err) {
1126 char msg[BUFSIZ]; 1121 char msg[BUFSIZ];
1127 symbol__strerror_disassemble(sym, map, err, msg, sizeof(msg)); 1122 symbol__strerror_disassemble(sym, map, err, msg, sizeof(msg));
@@ -1129,20 +1124,22 @@ int symbol__tui_annotate(struct symbol *sym, struct map *map,
1129 goto out_free_offsets; 1124 goto out_free_offsets;
1130 } 1125 }
1131 1126
1127 symbol__calc_percent(sym, evsel);
1128
1132 ui_helpline__push("Press ESC to exit"); 1129 ui_helpline__push("Press ESC to exit");
1133 1130
1134 notes = symbol__annotation(sym); 1131 notes = symbol__annotation(sym);
1135 browser.start = map__rip_2objdump(map, sym->start); 1132 browser.start = map__rip_2objdump(map, sym->start);
1136 1133
1137 list_for_each_entry(pos, &notes->src->source, node) { 1134 list_for_each_entry(al, &notes->src->source, node) {
1138 struct browser_disasm_line *bpos; 1135 struct browser_line *bpos;
1139 size_t line_len = strlen(pos->line); 1136 size_t line_len = strlen(al->line);
1140 1137
1141 if (browser.b.width < line_len) 1138 if (browser.b.width < line_len)
1142 browser.b.width = line_len; 1139 browser.b.width = line_len;
1143 bpos = disasm_line__browser(pos); 1140 bpos = browser_line(al);
1144 bpos->idx = browser.nr_entries++; 1141 bpos->idx = browser.nr_entries++;
1145 if (pos->offset != -1) { 1142 if (al->offset != -1) {
1146 bpos->idx_asm = browser.nr_asm_entries++; 1143 bpos->idx_asm = browser.nr_asm_entries++;
1147 /* 1144 /*
1148 * FIXME: short term bandaid to cope with assembly 1145 * FIXME: short term bandaid to cope with assembly
@@ -1151,8 +1148,8 @@ int symbol__tui_annotate(struct symbol *sym, struct map *map,
1151 * 1148 *
1152 * E.g. copy_user_generic_unrolled 1149 * E.g. copy_user_generic_unrolled
1153 */ 1150 */
1154 if (pos->offset < (s64)size) 1151 if (al->offset < (s64)size)
1155 browser.offsets[pos->offset] = pos; 1152 browser.offsets[al->offset] = al;
1156 } else 1153 } else
1157 bpos->idx_asm = -1; 1154 bpos->idx_asm = -1;
1158 } 1155 }
@@ -1174,10 +1171,8 @@ int symbol__tui_annotate(struct symbol *sym, struct map *map,
1174 annotate_browser__update_addr_width(&browser); 1171 annotate_browser__update_addr_width(&browser);
1175 1172
1176 ret = annotate_browser__run(&browser, evsel, hbt); 1173 ret = annotate_browser__run(&browser, evsel, hbt);
1177 list_for_each_entry_safe(pos, n, &notes->src->source, node) { 1174
1178 list_del(&pos->node); 1175 annotated_source__purge(notes->src);
1179 disasm_line__free(pos);
1180 }
1181 1176
1182out_free_offsets: 1177out_free_offsets:
1183 free(browser.offsets); 1178 free(browser.offsets);
diff --git a/tools/perf/ui/browsers/hists.c b/tools/perf/ui/browsers/hists.c
index 628ad5f7eddb..6495ee55d9c3 100644
--- a/tools/perf/ui/browsers/hists.c
+++ b/tools/perf/ui/browsers/hists.c
@@ -155,57 +155,9 @@ static void callchain_list__set_folding(struct callchain_list *cl, bool unfold)
155 cl->unfolded = unfold ? cl->has_children : false; 155 cl->unfolded = unfold ? cl->has_children : false;
156} 156}
157 157
158static struct inline_node *inline_node__create(struct map *map, u64 ip)
159{
160 struct dso *dso;
161 struct inline_node *node;
162
163 if (map == NULL)
164 return NULL;
165
166 dso = map->dso;
167 if (dso == NULL)
168 return NULL;
169
170 node = dso__parse_addr_inlines(dso,
171 map__rip_2objdump(map, ip));
172
173 return node;
174}
175
176static int inline__count_rows(struct inline_node *node)
177{
178 struct inline_list *ilist;
179 int i = 0;
180
181 if (node == NULL)
182 return 0;
183
184 list_for_each_entry(ilist, &node->val, list) {
185 if ((ilist->filename != NULL) || (ilist->funcname != NULL))
186 i++;
187 }
188
189 return i;
190}
191
192static int callchain_list__inline_rows(struct callchain_list *chain)
193{
194 struct inline_node *node;
195 int rows;
196
197 node = inline_node__create(chain->ms.map, chain->ip);
198 if (node == NULL)
199 return 0;
200
201 rows = inline__count_rows(node);
202 inline_node__delete(node);
203 return rows;
204}
205
206static int callchain_node__count_rows_rb_tree(struct callchain_node *node) 158static int callchain_node__count_rows_rb_tree(struct callchain_node *node)
207{ 159{
208 int n = 0, inline_rows; 160 int n = 0;
209 struct rb_node *nd; 161 struct rb_node *nd;
210 162
211 for (nd = rb_first(&node->rb_root); nd; nd = rb_next(nd)) { 163 for (nd = rb_first(&node->rb_root); nd; nd = rb_next(nd)) {
@@ -216,12 +168,6 @@ static int callchain_node__count_rows_rb_tree(struct callchain_node *node)
216 list_for_each_entry(chain, &child->val, list) { 168 list_for_each_entry(chain, &child->val, list) {
217 ++n; 169 ++n;
218 170
219 if (symbol_conf.inline_name) {
220 inline_rows =
221 callchain_list__inline_rows(chain);
222 n += inline_rows;
223 }
224
225 /* We need this because we may not have children */ 171 /* We need this because we may not have children */
226 folded_sign = callchain_list__folded(chain); 172 folded_sign = callchain_list__folded(chain);
227 if (folded_sign == '+') 173 if (folded_sign == '+')
@@ -273,7 +219,7 @@ static int callchain_node__count_rows(struct callchain_node *node)
273{ 219{
274 struct callchain_list *chain; 220 struct callchain_list *chain;
275 bool unfolded = false; 221 bool unfolded = false;
276 int n = 0, inline_rows; 222 int n = 0;
277 223
278 if (callchain_param.mode == CHAIN_FLAT) 224 if (callchain_param.mode == CHAIN_FLAT)
279 return callchain_node__count_flat_rows(node); 225 return callchain_node__count_flat_rows(node);
@@ -282,10 +228,6 @@ static int callchain_node__count_rows(struct callchain_node *node)
282 228
283 list_for_each_entry(chain, &node->val, list) { 229 list_for_each_entry(chain, &node->val, list) {
284 ++n; 230 ++n;
285 if (symbol_conf.inline_name) {
286 inline_rows = callchain_list__inline_rows(chain);
287 n += inline_rows;
288 }
289 231
290 unfolded = chain->unfolded; 232 unfolded = chain->unfolded;
291 } 233 }
@@ -433,19 +375,6 @@ static void hist_entry__init_have_children(struct hist_entry *he)
433 he->init_have_children = true; 375 he->init_have_children = true;
434} 376}
435 377
436static void hist_entry_init_inline_node(struct hist_entry *he)
437{
438 if (he->inline_node)
439 return;
440
441 he->inline_node = inline_node__create(he->ms.map, he->ip);
442
443 if (he->inline_node == NULL)
444 return;
445
446 he->has_children = true;
447}
448
449static bool hist_browser__toggle_fold(struct hist_browser *browser) 378static bool hist_browser__toggle_fold(struct hist_browser *browser)
450{ 379{
451 struct hist_entry *he = browser->he_selection; 380 struct hist_entry *he = browser->he_selection;
@@ -477,12 +406,8 @@ static bool hist_browser__toggle_fold(struct hist_browser *browser)
477 406
478 if (he->unfolded) { 407 if (he->unfolded) {
479 if (he->leaf) 408 if (he->leaf)
480 if (he->inline_node) 409 he->nr_rows = callchain__count_rows(
481 he->nr_rows = inline__count_rows( 410 &he->sorted_chain);
482 he->inline_node);
483 else
484 he->nr_rows = callchain__count_rows(
485 &he->sorted_chain);
486 else 411 else
487 he->nr_rows = hierarchy_count_rows(browser, he, false); 412 he->nr_rows = hierarchy_count_rows(browser, he, false);
488 413
@@ -683,7 +608,8 @@ static int hist_browser__title(struct hist_browser *browser, char *bf, size_t si
683 return browser->title ? browser->title(browser, bf, size) : 0; 608 return browser->title ? browser->title(browser, bf, size) : 0;
684} 609}
685 610
686int hist_browser__run(struct hist_browser *browser, const char *help) 611int hist_browser__run(struct hist_browser *browser, const char *help,
612 bool warn_lost_event)
687{ 613{
688 int key; 614 int key;
689 char title[160]; 615 char title[160];
@@ -713,8 +639,9 @@ int hist_browser__run(struct hist_browser *browser, const char *help)
713 nr_entries = hist_browser__nr_entries(browser); 639 nr_entries = hist_browser__nr_entries(browser);
714 ui_browser__update_nr_entries(&browser->b, nr_entries); 640 ui_browser__update_nr_entries(&browser->b, nr_entries);
715 641
716 if (browser->hists->stats.nr_lost_warned != 642 if (warn_lost_event &&
717 browser->hists->stats.nr_events[PERF_RECORD_LOST]) { 643 (browser->hists->stats.nr_lost_warned !=
644 browser->hists->stats.nr_events[PERF_RECORD_LOST])) {
718 browser->hists->stats.nr_lost_warned = 645 browser->hists->stats.nr_lost_warned =
719 browser->hists->stats.nr_events[PERF_RECORD_LOST]; 646 browser->hists->stats.nr_events[PERF_RECORD_LOST];
720 ui_browser__warn_lost_events(&browser->b); 647 ui_browser__warn_lost_events(&browser->b);
@@ -842,71 +769,6 @@ static bool hist_browser__check_dump_full(struct hist_browser *browser __maybe_u
842 769
843#define LEVEL_OFFSET_STEP 3 770#define LEVEL_OFFSET_STEP 3
844 771
845static int hist_browser__show_inline(struct hist_browser *browser,
846 struct inline_node *node,
847 unsigned short row,
848 int offset)
849{
850 struct inline_list *ilist;
851 char buf[1024];
852 int color, width, first_row;
853
854 first_row = row;
855 width = browser->b.width - (LEVEL_OFFSET_STEP + 2);
856 list_for_each_entry(ilist, &node->val, list) {
857 if ((ilist->filename != NULL) || (ilist->funcname != NULL)) {
858 color = HE_COLORSET_NORMAL;
859 if (ui_browser__is_current_entry(&browser->b, row))
860 color = HE_COLORSET_SELECTED;
861
862 if (callchain_param.key == CCKEY_ADDRESS ||
863 callchain_param.key == CCKEY_SRCLINE) {
864 if (ilist->filename != NULL)
865 scnprintf(buf, sizeof(buf),
866 "%s:%d (inline)",
867 ilist->filename,
868 ilist->line_nr);
869 else
870 scnprintf(buf, sizeof(buf), "??");
871 } else if (ilist->funcname != NULL)
872 scnprintf(buf, sizeof(buf), "%s (inline)",
873 ilist->funcname);
874 else if (ilist->filename != NULL)
875 scnprintf(buf, sizeof(buf),
876 "%s:%d (inline)",
877 ilist->filename,
878 ilist->line_nr);
879 else
880 scnprintf(buf, sizeof(buf), "??");
881
882 ui_browser__set_color(&browser->b, color);
883 hist_browser__gotorc(browser, row, 0);
884 ui_browser__write_nstring(&browser->b, " ",
885 LEVEL_OFFSET_STEP + offset);
886 ui_browser__write_nstring(&browser->b, buf, width);
887 row++;
888 }
889 }
890
891 return row - first_row;
892}
893
894static size_t show_inline_list(struct hist_browser *browser, struct map *map,
895 u64 ip, int row, int offset)
896{
897 struct inline_node *node;
898 int ret;
899
900 node = inline_node__create(map, ip);
901 if (node == NULL)
902 return 0;
903
904 ret = hist_browser__show_inline(browser, node, row, offset);
905
906 inline_node__delete(node);
907 return ret;
908}
909
910static int hist_browser__show_callchain_list(struct hist_browser *browser, 772static int hist_browser__show_callchain_list(struct hist_browser *browser,
911 struct callchain_node *node, 773 struct callchain_node *node,
912 struct callchain_list *chain, 774 struct callchain_list *chain,
@@ -918,7 +780,7 @@ static int hist_browser__show_callchain_list(struct hist_browser *browser,
918 char bf[1024], *alloc_str; 780 char bf[1024], *alloc_str;
919 char buf[64], *alloc_str2; 781 char buf[64], *alloc_str2;
920 const char *str; 782 const char *str;
921 int inline_rows = 0, ret = 1; 783 int ret = 1;
922 784
923 if (arg->row_offset != 0) { 785 if (arg->row_offset != 0) {
924 arg->row_offset--; 786 arg->row_offset--;
@@ -955,12 +817,7 @@ static int hist_browser__show_callchain_list(struct hist_browser *browser,
955 free(alloc_str); 817 free(alloc_str);
956 free(alloc_str2); 818 free(alloc_str2);
957 819
958 if (symbol_conf.inline_name) { 820 return ret;
959 inline_rows = show_inline_list(browser, chain->ms.map,
960 chain->ip, row + 1, offset);
961 }
962
963 return ret + inline_rows;
964} 821}
965 822
966static bool check_percent_display(struct rb_node *node, u64 parent_total) 823static bool check_percent_display(struct rb_node *node, u64 parent_total)
@@ -1384,12 +1241,6 @@ static int hist_browser__show_entry(struct hist_browser *browser,
1384 folded_sign = hist_entry__folded(entry); 1241 folded_sign = hist_entry__folded(entry);
1385 } 1242 }
1386 1243
1387 if (symbol_conf.inline_name &&
1388 (!entry->has_children)) {
1389 hist_entry_init_inline_node(entry);
1390 folded_sign = hist_entry__folded(entry);
1391 }
1392
1393 if (row_offset == 0) { 1244 if (row_offset == 0) {
1394 struct hpp_arg arg = { 1245 struct hpp_arg arg = {
1395 .b = &browser->b, 1246 .b = &browser->b,
@@ -1421,8 +1272,7 @@ static int hist_browser__show_entry(struct hist_browser *browser,
1421 } 1272 }
1422 1273
1423 if (first) { 1274 if (first) {
1424 if (symbol_conf.use_callchain || 1275 if (symbol_conf.use_callchain) {
1425 symbol_conf.inline_name) {
1426 ui_browser__printf(&browser->b, "%c ", folded_sign); 1276 ui_browser__printf(&browser->b, "%c ", folded_sign);
1427 width -= 2; 1277 width -= 2;
1428 } 1278 }
@@ -1464,15 +1314,11 @@ static int hist_browser__show_entry(struct hist_browser *browser,
1464 .is_current_entry = current_entry, 1314 .is_current_entry = current_entry,
1465 }; 1315 };
1466 1316
1467 if (entry->inline_node) 1317 printed += hist_browser__show_callchain(browser,
1468 printed += hist_browser__show_inline(browser, 1318 entry, 1, row,
1469 entry->inline_node, row, 0); 1319 hist_browser__show_callchain_entry,
1470 else 1320 &arg,
1471 printed += hist_browser__show_callchain(browser, 1321 hist_browser__check_output_full);
1472 entry, 1, row,
1473 hist_browser__show_callchain_entry,
1474 &arg,
1475 hist_browser__check_output_full);
1476 } 1322 }
1477 1323
1478 return printed; 1324 return printed;
@@ -2919,7 +2765,8 @@ static int perf_evsel__hists_browse(struct perf_evsel *evsel, int nr_events,
2919 bool left_exits, 2765 bool left_exits,
2920 struct hist_browser_timer *hbt, 2766 struct hist_browser_timer *hbt,
2921 float min_pcnt, 2767 float min_pcnt,
2922 struct perf_env *env) 2768 struct perf_env *env,
2769 bool warn_lost_event)
2923{ 2770{
2924 struct hists *hists = evsel__hists(evsel); 2771 struct hists *hists = evsel__hists(evsel);
2925 struct hist_browser *browser = perf_evsel_browser__new(evsel, hbt, env); 2772 struct hist_browser *browser = perf_evsel_browser__new(evsel, hbt, env);
@@ -3000,7 +2847,8 @@ static int perf_evsel__hists_browse(struct perf_evsel *evsel, int nr_events,
3000 2847
3001 nr_options = 0; 2848 nr_options = 0;
3002 2849
3003 key = hist_browser__run(browser, helpline); 2850 key = hist_browser__run(browser, helpline,
2851 warn_lost_event);
3004 2852
3005 if (browser->he_selection != NULL) { 2853 if (browser->he_selection != NULL) {
3006 thread = hist_browser__selected_thread(browser); 2854 thread = hist_browser__selected_thread(browser);
@@ -3340,7 +3188,8 @@ static void perf_evsel_menu__write(struct ui_browser *browser,
3340 3188
3341static int perf_evsel_menu__run(struct perf_evsel_menu *menu, 3189static int perf_evsel_menu__run(struct perf_evsel_menu *menu,
3342 int nr_events, const char *help, 3190 int nr_events, const char *help,
3343 struct hist_browser_timer *hbt) 3191 struct hist_browser_timer *hbt,
3192 bool warn_lost_event)
3344{ 3193{
3345 struct perf_evlist *evlist = menu->b.priv; 3194 struct perf_evlist *evlist = menu->b.priv;
3346 struct perf_evsel *pos; 3195 struct perf_evsel *pos;
@@ -3359,7 +3208,9 @@ static int perf_evsel_menu__run(struct perf_evsel_menu *menu,
3359 case K_TIMER: 3208 case K_TIMER:
3360 hbt->timer(hbt->arg); 3209 hbt->timer(hbt->arg);
3361 3210
3362 if (!menu->lost_events_warned && menu->lost_events) { 3211 if (!menu->lost_events_warned &&
3212 menu->lost_events &&
3213 warn_lost_event) {
3363 ui_browser__warn_lost_events(&menu->b); 3214 ui_browser__warn_lost_events(&menu->b);
3364 menu->lost_events_warned = true; 3215 menu->lost_events_warned = true;
3365 } 3216 }
@@ -3380,7 +3231,8 @@ browse_hists:
3380 key = perf_evsel__hists_browse(pos, nr_events, help, 3231 key = perf_evsel__hists_browse(pos, nr_events, help,
3381 true, hbt, 3232 true, hbt,
3382 menu->min_pcnt, 3233 menu->min_pcnt,
3383 menu->env); 3234 menu->env,
3235 warn_lost_event);
3384 ui_browser__show_title(&menu->b, title); 3236 ui_browser__show_title(&menu->b, title);
3385 switch (key) { 3237 switch (key) {
3386 case K_TAB: 3238 case K_TAB:
@@ -3438,7 +3290,8 @@ static int __perf_evlist__tui_browse_hists(struct perf_evlist *evlist,
3438 int nr_entries, const char *help, 3290 int nr_entries, const char *help,
3439 struct hist_browser_timer *hbt, 3291 struct hist_browser_timer *hbt,
3440 float min_pcnt, 3292 float min_pcnt,
3441 struct perf_env *env) 3293 struct perf_env *env,
3294 bool warn_lost_event)
3442{ 3295{
3443 struct perf_evsel *pos; 3296 struct perf_evsel *pos;
3444 struct perf_evsel_menu menu = { 3297 struct perf_evsel_menu menu = {
@@ -3465,13 +3318,15 @@ static int __perf_evlist__tui_browse_hists(struct perf_evlist *evlist,
3465 menu.b.width = line_len; 3318 menu.b.width = line_len;
3466 } 3319 }
3467 3320
3468 return perf_evsel_menu__run(&menu, nr_entries, help, hbt); 3321 return perf_evsel_menu__run(&menu, nr_entries, help,
3322 hbt, warn_lost_event);
3469} 3323}
3470 3324
3471int perf_evlist__tui_browse_hists(struct perf_evlist *evlist, const char *help, 3325int perf_evlist__tui_browse_hists(struct perf_evlist *evlist, const char *help,
3472 struct hist_browser_timer *hbt, 3326 struct hist_browser_timer *hbt,
3473 float min_pcnt, 3327 float min_pcnt,
3474 struct perf_env *env) 3328 struct perf_env *env,
3329 bool warn_lost_event)
3475{ 3330{
3476 int nr_entries = evlist->nr_entries; 3331 int nr_entries = evlist->nr_entries;
3477 3332
@@ -3481,7 +3336,7 @@ single_entry:
3481 3336
3482 return perf_evsel__hists_browse(first, nr_entries, help, 3337 return perf_evsel__hists_browse(first, nr_entries, help,
3483 false, hbt, min_pcnt, 3338 false, hbt, min_pcnt,
3484 env); 3339 env, warn_lost_event);
3485 } 3340 }
3486 3341
3487 if (symbol_conf.event_group) { 3342 if (symbol_conf.event_group) {
@@ -3498,5 +3353,6 @@ single_entry:
3498 } 3353 }
3499 3354
3500 return __perf_evlist__tui_browse_hists(evlist, nr_entries, help, 3355 return __perf_evlist__tui_browse_hists(evlist, nr_entries, help,
3501 hbt, min_pcnt, env); 3356 hbt, min_pcnt, env,
3357 warn_lost_event);
3502} 3358}
diff --git a/tools/perf/ui/browsers/hists.h b/tools/perf/ui/browsers/hists.h
index ba431777f559..9428bee076f2 100644
--- a/tools/perf/ui/browsers/hists.h
+++ b/tools/perf/ui/browsers/hists.h
@@ -28,7 +28,8 @@ struct hist_browser {
28 28
29struct hist_browser *hist_browser__new(struct hists *hists); 29struct hist_browser *hist_browser__new(struct hists *hists);
30void hist_browser__delete(struct hist_browser *browser); 30void hist_browser__delete(struct hist_browser *browser);
31int hist_browser__run(struct hist_browser *browser, const char *help); 31int hist_browser__run(struct hist_browser *browser, const char *help,
32 bool warn_lost_event);
32void hist_browser__init(struct hist_browser *browser, 33void hist_browser__init(struct hist_browser *browser,
33 struct hists *hists); 34 struct hists *hists);
34#endif /* _PERF_UI_BROWSER_HISTS_H_ */ 35#endif /* _PERF_UI_BROWSER_HISTS_H_ */
diff --git a/tools/perf/ui/gtk/annotate.c b/tools/perf/ui/gtk/annotate.c
index fc7a2e105bfd..aeeaf15029f0 100644
--- a/tools/perf/ui/gtk/annotate.c
+++ b/tools/perf/ui/gtk/annotate.c
@@ -31,14 +31,14 @@ static int perf_gtk__get_percent(char *buf, size_t size, struct symbol *sym,
31 31
32 strcpy(buf, ""); 32 strcpy(buf, "");
33 33
34 if (dl->offset == (s64) -1) 34 if (dl->al.offset == (s64) -1)
35 return 0; 35 return 0;
36 36
37 symhist = annotation__histogram(symbol__annotation(sym), evidx); 37 symhist = annotation__histogram(symbol__annotation(sym), evidx);
38 if (!symbol_conf.event_group && !symhist->addr[dl->offset].nr_samples) 38 if (!symbol_conf.event_group && !symhist->addr[dl->al.offset].nr_samples)
39 return 0; 39 return 0;
40 40
41 percent = 100.0 * symhist->addr[dl->offset].nr_samples / symhist->nr_samples; 41 percent = 100.0 * symhist->addr[dl->al.offset].nr_samples / symhist->nr_samples;
42 42
43 markup = perf_gtk__get_percent_color(percent); 43 markup = perf_gtk__get_percent_color(percent);
44 if (markup) 44 if (markup)
@@ -57,16 +57,16 @@ static int perf_gtk__get_offset(char *buf, size_t size, struct symbol *sym,
57 57
58 strcpy(buf, ""); 58 strcpy(buf, "");
59 59
60 if (dl->offset == (s64) -1) 60 if (dl->al.offset == (s64) -1)
61 return 0; 61 return 0;
62 62
63 return scnprintf(buf, size, "%"PRIx64, start + dl->offset); 63 return scnprintf(buf, size, "%"PRIx64, start + dl->al.offset);
64} 64}
65 65
66static int perf_gtk__get_line(char *buf, size_t size, struct disasm_line *dl) 66static int perf_gtk__get_line(char *buf, size_t size, struct disasm_line *dl)
67{ 67{
68 int ret = 0; 68 int ret = 0;
69 char *line = g_markup_escape_text(dl->line, -1); 69 char *line = g_markup_escape_text(dl->al.line, -1);
70 const char *markup = "<span fgcolor='gray'>"; 70 const char *markup = "<span fgcolor='gray'>";
71 71
72 strcpy(buf, ""); 72 strcpy(buf, "");
@@ -74,7 +74,7 @@ static int perf_gtk__get_line(char *buf, size_t size, struct disasm_line *dl)
74 if (!line) 74 if (!line)
75 return 0; 75 return 0;
76 76
77 if (dl->offset != (s64) -1) 77 if (dl->al.offset != (s64) -1)
78 markup = NULL; 78 markup = NULL;
79 79
80 if (markup) 80 if (markup)
@@ -119,7 +119,7 @@ static int perf_gtk__annotate_symbol(GtkWidget *window, struct symbol *sym,
119 gtk_tree_view_set_model(GTK_TREE_VIEW(view), GTK_TREE_MODEL(store)); 119 gtk_tree_view_set_model(GTK_TREE_VIEW(view), GTK_TREE_MODEL(store));
120 g_object_unref(GTK_TREE_MODEL(store)); 120 g_object_unref(GTK_TREE_MODEL(store));
121 121
122 list_for_each_entry(pos, &notes->src->source, node) { 122 list_for_each_entry(pos, &notes->src->source, al.node) {
123 GtkTreeIter iter; 123 GtkTreeIter iter;
124 int ret = 0; 124 int ret = 0;
125 125
@@ -148,8 +148,8 @@ static int perf_gtk__annotate_symbol(GtkWidget *window, struct symbol *sym,
148 148
149 gtk_container_add(GTK_CONTAINER(window), view); 149 gtk_container_add(GTK_CONTAINER(window), view);
150 150
151 list_for_each_entry_safe(pos, n, &notes->src->source, node) { 151 list_for_each_entry_safe(pos, n, &notes->src->source, al.node) {
152 list_del(&pos->node); 152 list_del(&pos->al.node);
153 disasm_line__free(pos); 153 disasm_line__free(pos);
154 } 154 }
155 155
@@ -169,8 +169,7 @@ static int symbol__gtk_annotate(struct symbol *sym, struct map *map,
169 if (map->dso->annotate_warned) 169 if (map->dso->annotate_warned)
170 return -1; 170 return -1;
171 171
172 err = symbol__disassemble(sym, map, perf_evsel__env_arch(evsel), 172 err = symbol__annotate(sym, map, evsel, 0, NULL);
173 0, NULL, NULL);
174 if (err) { 173 if (err) {
175 char msg[BUFSIZ]; 174 char msg[BUFSIZ];
176 symbol__strerror_disassemble(sym, map, err, msg, sizeof(msg)); 175 symbol__strerror_disassemble(sym, map, err, msg, sizeof(msg));
@@ -178,6 +177,8 @@ static int symbol__gtk_annotate(struct symbol *sym, struct map *map,
178 return -1; 177 return -1;
179 } 178 }
180 179
180 symbol__calc_percent(sym, evsel);
181
181 if (perf_gtk__is_active_context(pgctx)) { 182 if (perf_gtk__is_active_context(pgctx)) {
182 window = pgctx->main_window; 183 window = pgctx->main_window;
183 notebook = pgctx->notebook; 184 notebook = pgctx->notebook;
diff --git a/tools/perf/ui/progress.c b/tools/perf/ui/progress.c
index b5a5df14d702..bbfbc91a0fa4 100644
--- a/tools/perf/ui/progress.c
+++ b/tools/perf/ui/progress.c
@@ -28,13 +28,17 @@ void ui_progress__update(struct ui_progress *p, u64 adv)
28 } 28 }
29} 29}
30 30
31void ui_progress__init(struct ui_progress *p, u64 total, const char *title) 31void __ui_progress__init(struct ui_progress *p, u64 total,
32 const char *title, bool size)
32{ 33{
33 p->curr = 0; 34 p->curr = 0;
34 p->next = p->step = total / 16 ?: 1; 35 p->next = p->step = total / 16 ?: 1;
35 p->total = total; 36 p->total = total;
36 p->title = title; 37 p->title = title;
38 p->size = size;
37 39
40 if (ui_progress__ops->init)
41 ui_progress__ops->init(p);
38} 42}
39 43
40void ui_progress__finish(void) 44void ui_progress__finish(void)
diff --git a/tools/perf/ui/progress.h b/tools/perf/ui/progress.h
index 594bbe6935dd..4f52c37b2f09 100644
--- a/tools/perf/ui/progress.h
+++ b/tools/perf/ui/progress.h
@@ -9,12 +9,22 @@ void ui_progress__finish(void);
9struct ui_progress { 9struct ui_progress {
10 const char *title; 10 const char *title;
11 u64 curr, next, step, total; 11 u64 curr, next, step, total;
12 bool size;
12}; 13};
13 14
14void ui_progress__init(struct ui_progress *p, u64 total, const char *title); 15void __ui_progress__init(struct ui_progress *p, u64 total,
16 const char *title, bool size);
17
18#define ui_progress__init(p, total, title) \
19 __ui_progress__init(p, total, title, false)
20
21#define ui_progress__init_size(p, total, title) \
22 __ui_progress__init(p, total, title, true)
23
15void ui_progress__update(struct ui_progress *p, u64 adv); 24void ui_progress__update(struct ui_progress *p, u64 adv);
16 25
17struct ui_progress_ops { 26struct ui_progress_ops {
27 void (*init)(struct ui_progress *p);
18 void (*update)(struct ui_progress *p); 28 void (*update)(struct ui_progress *p);
19 void (*finish)(void); 29 void (*finish)(void);
20}; 30};
diff --git a/tools/perf/ui/stdio/hist.c b/tools/perf/ui/stdio/hist.c
index de2810ae16be..25dd1e0ecc58 100644
--- a/tools/perf/ui/stdio/hist.c
+++ b/tools/perf/ui/stdio/hist.c
@@ -22,64 +22,6 @@ static size_t callchain__fprintf_left_margin(FILE *fp, int left_margin)
22 return ret; 22 return ret;
23} 23}
24 24
25static size_t inline__fprintf(struct map *map, u64 ip, int left_margin,
26 int depth, int depth_mask, FILE *fp)
27{
28 struct dso *dso;
29 struct inline_node *node;
30 struct inline_list *ilist;
31 int ret = 0, i;
32
33 if (map == NULL)
34 return 0;
35
36 dso = map->dso;
37 if (dso == NULL)
38 return 0;
39
40 node = dso__parse_addr_inlines(dso,
41 map__rip_2objdump(map, ip));
42 if (node == NULL)
43 return 0;
44
45 list_for_each_entry(ilist, &node->val, list) {
46 if ((ilist->filename != NULL) || (ilist->funcname != NULL)) {
47 ret += callchain__fprintf_left_margin(fp, left_margin);
48
49 for (i = 0; i < depth; i++) {
50 if (depth_mask & (1 << i))
51 ret += fprintf(fp, "|");
52 else
53 ret += fprintf(fp, " ");
54 ret += fprintf(fp, " ");
55 }
56
57 if (callchain_param.key == CCKEY_ADDRESS ||
58 callchain_param.key == CCKEY_SRCLINE) {
59 if (ilist->filename != NULL)
60 ret += fprintf(fp, "%s:%d (inline)",
61 ilist->filename,
62 ilist->line_nr);
63 else
64 ret += fprintf(fp, "??");
65 } else if (ilist->funcname != NULL)
66 ret += fprintf(fp, "%s (inline)",
67 ilist->funcname);
68 else if (ilist->filename != NULL)
69 ret += fprintf(fp, "%s:%d (inline)",
70 ilist->filename,
71 ilist->line_nr);
72 else
73 ret += fprintf(fp, "??");
74
75 ret += fprintf(fp, "\n");
76 }
77 }
78
79 inline_node__delete(node);
80 return ret;
81}
82
83static size_t ipchain__fprintf_graph_line(FILE *fp, int depth, int depth_mask, 25static size_t ipchain__fprintf_graph_line(FILE *fp, int depth, int depth_mask,
84 int left_margin) 26 int left_margin)
85{ 27{
@@ -138,9 +80,6 @@ static size_t ipchain__fprintf_graph(FILE *fp, struct callchain_node *node,
138 fputc('\n', fp); 80 fputc('\n', fp);
139 free(alloc_str); 81 free(alloc_str);
140 82
141 if (symbol_conf.inline_name)
142 ret += inline__fprintf(chain->ms.map, chain->ip,
143 left_margin, depth, depth_mask, fp);
144 return ret; 83 return ret;
145} 84}
146 85
@@ -315,13 +254,6 @@ static size_t callchain__fprintf_graph(FILE *fp, struct rb_root *root,
315 254
316 if (++entries_printed == callchain_param.print_limit) 255 if (++entries_printed == callchain_param.print_limit)
317 break; 256 break;
318
319 if (symbol_conf.inline_name)
320 ret += inline__fprintf(chain->ms.map,
321 chain->ip,
322 left_margin,
323 0, 0,
324 fp);
325 } 257 }
326 root = &cnode->rb_root; 258 root = &cnode->rb_root;
327 } 259 }
@@ -601,7 +533,6 @@ static int hist_entry__fprintf(struct hist_entry *he, size_t size,
601{ 533{
602 int ret; 534 int ret;
603 int callchain_ret = 0; 535 int callchain_ret = 0;
604 int inline_ret = 0;
605 struct perf_hpp hpp = { 536 struct perf_hpp hpp = {
606 .buf = bf, 537 .buf = bf,
607 .size = size, 538 .size = size,
@@ -623,13 +554,7 @@ static int hist_entry__fprintf(struct hist_entry *he, size_t size,
623 callchain_ret = hist_entry_callchain__fprintf(he, total_period, 554 callchain_ret = hist_entry_callchain__fprintf(he, total_period,
624 0, fp); 555 0, fp);
625 556
626 if (callchain_ret == 0 && symbol_conf.inline_name) { 557 ret += callchain_ret;
627 inline_ret = inline__fprintf(he->ms.map, he->ip, 0, 0, 0, fp);
628 ret += inline_ret;
629 if (inline_ret > 0)
630 ret += fprintf(fp, "\n");
631 } else
632 ret += callchain_ret;
633 558
634 return ret; 559 return ret;
635} 560}
diff --git a/tools/perf/ui/tui/progress.c b/tools/perf/ui/tui/progress.c
index 236bcb620ae4..bc134b82829d 100644
--- a/tools/perf/ui/tui/progress.c
+++ b/tools/perf/ui/tui/progress.c
@@ -1,13 +1,34 @@
1// SPDX-License-Identifier: GPL-2.0 1// SPDX-License-Identifier: GPL-2.0
2#include <linux/kernel.h>
2#include "../cache.h" 3#include "../cache.h"
3#include "../progress.h" 4#include "../progress.h"
4#include "../libslang.h" 5#include "../libslang.h"
5#include "../ui.h" 6#include "../ui.h"
6#include "tui.h" 7#include "tui.h"
8#include "units.h"
7#include "../browser.h" 9#include "../browser.h"
8 10
11static void __tui_progress__init(struct ui_progress *p)
12{
13 p->next = p->step = p->total / (SLtt_Screen_Cols - 2) ?: 1;
14}
15
16static int get_title(struct ui_progress *p, char *buf, size_t size)
17{
18 char buf_cur[20];
19 char buf_tot[20];
20 int ret;
21
22 ret = unit_number__scnprintf(buf_cur, sizeof(buf_cur), p->curr);
23 ret += unit_number__scnprintf(buf_tot, sizeof(buf_tot), p->total);
24
25 return ret + scnprintf(buf, size, "%s [%s/%s]",
26 p->title, buf_cur, buf_tot);
27}
28
9static void tui_progress__update(struct ui_progress *p) 29static void tui_progress__update(struct ui_progress *p)
10{ 30{
31 char buf[100], *title = (char *) p->title;
11 int bar, y; 32 int bar, y;
12 /* 33 /*
13 * FIXME: We should have a per UI backend way of showing progress, 34 * FIXME: We should have a per UI backend way of showing progress,
@@ -19,13 +40,18 @@ static void tui_progress__update(struct ui_progress *p)
19 if (p->total == 0) 40 if (p->total == 0)
20 return; 41 return;
21 42
43 if (p->size) {
44 get_title(p, buf, sizeof(buf));
45 title = buf;
46 }
47
22 ui__refresh_dimensions(false); 48 ui__refresh_dimensions(false);
23 pthread_mutex_lock(&ui__lock); 49 pthread_mutex_lock(&ui__lock);
24 y = SLtt_Screen_Rows / 2 - 2; 50 y = SLtt_Screen_Rows / 2 - 2;
25 SLsmg_set_color(0); 51 SLsmg_set_color(0);
26 SLsmg_draw_box(y, 0, 3, SLtt_Screen_Cols); 52 SLsmg_draw_box(y, 0, 3, SLtt_Screen_Cols);
27 SLsmg_gotorc(y++, 1); 53 SLsmg_gotorc(y++, 1);
28 SLsmg_write_string((char *)p->title); 54 SLsmg_write_string(title);
29 SLsmg_fill_region(y, 1, 1, SLtt_Screen_Cols - 2, ' '); 55 SLsmg_fill_region(y, 1, 1, SLtt_Screen_Cols - 2, ' ');
30 SLsmg_set_color(HE_COLORSET_SELECTED); 56 SLsmg_set_color(HE_COLORSET_SELECTED);
31 bar = ((SLtt_Screen_Cols - 2) * p->curr) / p->total; 57 bar = ((SLtt_Screen_Cols - 2) * p->curr) / p->total;
@@ -50,8 +76,8 @@ static void tui_progress__finish(void)
50 pthread_mutex_unlock(&ui__lock); 76 pthread_mutex_unlock(&ui__lock);
51} 77}
52 78
53static struct ui_progress_ops tui_progress__ops = 79static struct ui_progress_ops tui_progress__ops = {
54{ 80 .init = __tui_progress__init,
55 .update = tui_progress__update, 81 .update = tui_progress__update,
56 .finish = tui_progress__finish, 82 .finish = tui_progress__finish,
57}; 83};
diff --git a/tools/perf/util/Build b/tools/perf/util/Build
index 94518c1bf8b6..ea0a452550b0 100644
--- a/tools/perf/util/Build
+++ b/tools/perf/util/Build
@@ -13,6 +13,7 @@ libperf-y += find_bit.o
13libperf-y += kallsyms.o 13libperf-y += kallsyms.o
14libperf-y += levenshtein.o 14libperf-y += levenshtein.o
15libperf-y += llvm-utils.o 15libperf-y += llvm-utils.o
16libperf-y += mmap.o
16libperf-y += memswap.o 17libperf-y += memswap.o
17libperf-y += parse-events.o 18libperf-y += parse-events.o
18libperf-y += perf_regs.o 19libperf-y += perf_regs.o
@@ -34,6 +35,7 @@ libperf-y += dso.o
34libperf-y += symbol.o 35libperf-y += symbol.o
35libperf-y += symbol_fprintf.o 36libperf-y += symbol_fprintf.o
36libperf-y += color.o 37libperf-y += color.o
38libperf-y += metricgroup.o
37libperf-y += header.o 39libperf-y += header.o
38libperf-y += callchain.o 40libperf-y += callchain.o
39libperf-y += values.o 41libperf-y += values.o
@@ -42,7 +44,7 @@ libperf-y += machine.o
42libperf-y += map.o 44libperf-y += map.o
43libperf-y += pstack.o 45libperf-y += pstack.o
44libperf-y += session.o 46libperf-y += session.o
45libperf-$(CONFIG_AUDIT) += syscalltbl.o 47libperf-$(CONFIG_TRACE) += syscalltbl.o
46libperf-y += ordered-events.o 48libperf-y += ordered-events.o
47libperf-y += namespaces.o 49libperf-y += namespaces.o
48libperf-y += comm.o 50libperf-y += comm.o
@@ -78,11 +80,20 @@ libperf-y += data.o
78libperf-y += tsc.o 80libperf-y += tsc.o
79libperf-y += cloexec.o 81libperf-y += cloexec.o
80libperf-y += call-path.o 82libperf-y += call-path.o
83libperf-y += rwsem.o
81libperf-y += thread-stack.o 84libperf-y += thread-stack.o
82libperf-$(CONFIG_AUXTRACE) += auxtrace.o 85libperf-$(CONFIG_AUXTRACE) += auxtrace.o
83libperf-$(CONFIG_AUXTRACE) += intel-pt-decoder/ 86libperf-$(CONFIG_AUXTRACE) += intel-pt-decoder/
84libperf-$(CONFIG_AUXTRACE) += intel-pt.o 87libperf-$(CONFIG_AUXTRACE) += intel-pt.o
85libperf-$(CONFIG_AUXTRACE) += intel-bts.o 88libperf-$(CONFIG_AUXTRACE) += intel-bts.o
89libperf-$(CONFIG_AUXTRACE) += arm-spe.o
90libperf-$(CONFIG_AUXTRACE) += arm-spe-pkt-decoder.o
91
92ifdef CONFIG_LIBOPENCSD
93libperf-$(CONFIG_AUXTRACE) += cs-etm.o
94libperf-$(CONFIG_AUXTRACE) += cs-etm-decoder/
95endif
96
86libperf-y += parse-branch-options.o 97libperf-y += parse-branch-options.o
87libperf-y += dump-insn.o 98libperf-y += dump-insn.o
88libperf-y += parse-regs-options.o 99libperf-y += parse-regs-options.o
diff --git a/tools/perf/util/annotate.c b/tools/perf/util/annotate.c
index aa66791b1bfc..28b233c3dcbe 100644
--- a/tools/perf/util/annotate.c
+++ b/tools/perf/util/annotate.c
@@ -26,7 +26,6 @@
26#include <pthread.h> 26#include <pthread.h>
27#include <linux/bitops.h> 27#include <linux/bitops.h>
28#include <linux/kernel.h> 28#include <linux/kernel.h>
29#include <sys/utsname.h>
30 29
31#include "sane_ctype.h" 30#include "sane_ctype.h"
32 31
@@ -49,10 +48,9 @@ struct arch {
49 void *priv; 48 void *priv;
50 unsigned int model; 49 unsigned int model;
51 unsigned int family; 50 unsigned int family;
52 int (*init)(struct arch *arch); 51 int (*init)(struct arch *arch, char *cpuid);
53 bool (*ins_is_fused)(struct arch *arch, const char *ins1, 52 bool (*ins_is_fused)(struct arch *arch, const char *ins1,
54 const char *ins2); 53 const char *ins2);
55 int (*cpuid_parse)(struct arch *arch, char *cpuid);
56 struct { 54 struct {
57 char comment_char; 55 char comment_char;
58 char skip_functions_char; 56 char skip_functions_char;
@@ -132,10 +130,10 @@ static struct arch architectures[] = {
132 }, 130 },
133 { 131 {
134 .name = "x86", 132 .name = "x86",
133 .init = x86__annotate_init,
135 .instructions = x86__instructions, 134 .instructions = x86__instructions,
136 .nr_instructions = ARRAY_SIZE(x86__instructions), 135 .nr_instructions = ARRAY_SIZE(x86__instructions),
137 .ins_is_fused = x86__ins_is_fused, 136 .ins_is_fused = x86__ins_is_fused,
138 .cpuid_parse = x86__cpuid_parse,
139 .objdump = { 137 .objdump = {
140 .comment_char = '#', 138 .comment_char = '#',
141 }, 139 },
@@ -166,7 +164,7 @@ static void ins__delete(struct ins_operands *ops)
166static int ins__raw_scnprintf(struct ins *ins, char *bf, size_t size, 164static int ins__raw_scnprintf(struct ins *ins, char *bf, size_t size,
167 struct ins_operands *ops) 165 struct ins_operands *ops)
168{ 166{
169 return scnprintf(bf, size, "%-6.6s %s", ins->name, ops->raw); 167 return scnprintf(bf, size, "%-6s %s", ins->name, ops->raw);
170} 168}
171 169
172int ins__scnprintf(struct ins *ins, char *bf, size_t size, 170int ins__scnprintf(struct ins *ins, char *bf, size_t size,
@@ -231,12 +229,12 @@ static int call__scnprintf(struct ins *ins, char *bf, size_t size,
231 struct ins_operands *ops) 229 struct ins_operands *ops)
232{ 230{
233 if (ops->target.name) 231 if (ops->target.name)
234 return scnprintf(bf, size, "%-6.6s %s", ins->name, ops->target.name); 232 return scnprintf(bf, size, "%-6s %s", ins->name, ops->target.name);
235 233
236 if (ops->target.addr == 0) 234 if (ops->target.addr == 0)
237 return ins__raw_scnprintf(ins, bf, size, ops); 235 return ins__raw_scnprintf(ins, bf, size, ops);
238 236
239 return scnprintf(bf, size, "%-6.6s *%" PRIx64, ins->name, ops->target.addr); 237 return scnprintf(bf, size, "%-6s *%" PRIx64, ins->name, ops->target.addr);
240} 238}
241 239
242static struct ins_ops call_ops = { 240static struct ins_ops call_ops = {
@@ -300,7 +298,7 @@ static int jump__scnprintf(struct ins *ins, char *bf, size_t size,
300 c++; 298 c++;
301 } 299 }
302 300
303 return scnprintf(bf, size, "%-6.6s %.*s%" PRIx64, 301 return scnprintf(bf, size, "%-6s %.*s%" PRIx64,
304 ins->name, c ? c - ops->raw : 0, ops->raw, 302 ins->name, c ? c - ops->raw : 0, ops->raw,
305 ops->target.offset); 303 ops->target.offset);
306} 304}
@@ -323,6 +321,8 @@ static int comment__symbol(char *raw, char *comment, u64 *addrp, char **namep)
323 return 0; 321 return 0;
324 322
325 *addrp = strtoull(comment, &endptr, 16); 323 *addrp = strtoull(comment, &endptr, 16);
324 if (endptr == comment)
325 return 0;
326 name = strchr(endptr, '<'); 326 name = strchr(endptr, '<');
327 if (name == NULL) 327 if (name == NULL)
328 return -1; 328 return -1;
@@ -373,7 +373,7 @@ static int lock__scnprintf(struct ins *ins, char *bf, size_t size,
373 if (ops->locked.ins.ops == NULL) 373 if (ops->locked.ins.ops == NULL)
374 return ins__raw_scnprintf(ins, bf, size, ops); 374 return ins__raw_scnprintf(ins, bf, size, ops);
375 375
376 printed = scnprintf(bf, size, "%-6.6s ", ins->name); 376 printed = scnprintf(bf, size, "%-6s ", ins->name);
377 return printed + ins__scnprintf(&ops->locked.ins, bf + printed, 377 return printed + ins__scnprintf(&ops->locked.ins, bf + printed,
378 size - printed, ops->locked.ops); 378 size - printed, ops->locked.ops);
379} 379}
@@ -436,8 +436,8 @@ static int mov__parse(struct arch *arch, struct ins_operands *ops, struct map *m
436 return 0; 436 return 0;
437 437
438 comment = ltrim(comment); 438 comment = ltrim(comment);
439 comment__symbol(ops->source.raw, comment, &ops->source.addr, &ops->source.name); 439 comment__symbol(ops->source.raw, comment + 1, &ops->source.addr, &ops->source.name);
440 comment__symbol(ops->target.raw, comment, &ops->target.addr, &ops->target.name); 440 comment__symbol(ops->target.raw, comment + 1, &ops->target.addr, &ops->target.name);
441 441
442 return 0; 442 return 0;
443 443
@@ -449,7 +449,7 @@ out_free_source:
449static int mov__scnprintf(struct ins *ins, char *bf, size_t size, 449static int mov__scnprintf(struct ins *ins, char *bf, size_t size,
450 struct ins_operands *ops) 450 struct ins_operands *ops)
451{ 451{
452 return scnprintf(bf, size, "%-6.6s %s,%s", ins->name, 452 return scnprintf(bf, size, "%-6s %s,%s", ins->name,
453 ops->source.name ?: ops->source.raw, 453 ops->source.name ?: ops->source.raw,
454 ops->target.name ?: ops->target.raw); 454 ops->target.name ?: ops->target.raw);
455} 455}
@@ -481,7 +481,7 @@ static int dec__parse(struct arch *arch __maybe_unused, struct ins_operands *ops
481 return 0; 481 return 0;
482 482
483 comment = ltrim(comment); 483 comment = ltrim(comment);
484 comment__symbol(ops->target.raw, comment, &ops->target.addr, &ops->target.name); 484 comment__symbol(ops->target.raw, comment + 1, &ops->target.addr, &ops->target.name);
485 485
486 return 0; 486 return 0;
487} 487}
@@ -489,7 +489,7 @@ static int dec__parse(struct arch *arch __maybe_unused, struct ins_operands *ops
489static int dec__scnprintf(struct ins *ins, char *bf, size_t size, 489static int dec__scnprintf(struct ins *ins, char *bf, size_t size,
490 struct ins_operands *ops) 490 struct ins_operands *ops)
491{ 491{
492 return scnprintf(bf, size, "%-6.6s %s", ins->name, 492 return scnprintf(bf, size, "%-6s %s", ins->name,
493 ops->target.name ?: ops->target.raw); 493 ops->target.name ?: ops->target.raw);
494} 494}
495 495
@@ -501,7 +501,7 @@ static struct ins_ops dec_ops = {
501static int nop__scnprintf(struct ins *ins __maybe_unused, char *bf, size_t size, 501static int nop__scnprintf(struct ins *ins __maybe_unused, char *bf, size_t size,
502 struct ins_operands *ops __maybe_unused) 502 struct ins_operands *ops __maybe_unused)
503{ 503{
504 return scnprintf(bf, size, "%-6.6s", "nop"); 504 return scnprintf(bf, size, "%-6s", "nop");
505} 505}
506 506
507static struct ins_ops nop_ops = { 507static struct ins_ops nop_ops = {
@@ -879,32 +879,99 @@ out_free_name:
879 return -1; 879 return -1;
880} 880}
881 881
882static struct disasm_line *disasm_line__new(s64 offset, char *line, 882struct annotate_args {
883 size_t privsize, int line_nr, 883 size_t privsize;
884 struct arch *arch, 884 struct arch *arch;
885 struct map *map) 885 struct map *map;
886 struct perf_evsel *evsel;
887 s64 offset;
888 char *line;
889 int line_nr;
890};
891
892static void annotation_line__delete(struct annotation_line *al)
886{ 893{
887 struct disasm_line *dl = zalloc(sizeof(*dl) + privsize); 894 void *ptr = (void *) al - al->privsize;
895
896 free_srcline(al->path);
897 zfree(&al->line);
898 free(ptr);
899}
900
901/*
902 * Allocating the annotation line data with following
903 * structure:
904 *
905 * --------------------------------------
906 * private space | struct annotation_line
907 * --------------------------------------
908 *
909 * Size of the private space is stored in 'struct annotation_line'.
910 *
911 */
912static struct annotation_line *
913annotation_line__new(struct annotate_args *args, size_t privsize)
914{
915 struct annotation_line *al;
916 struct perf_evsel *evsel = args->evsel;
917 size_t size = privsize + sizeof(*al);
918 int nr = 1;
919
920 if (perf_evsel__is_group_event(evsel))
921 nr = evsel->nr_members;
922
923 size += sizeof(al->samples[0]) * nr;
924
925 al = zalloc(size);
926 if (al) {
927 al = (void *) al + privsize;
928 al->privsize = privsize;
929 al->offset = args->offset;
930 al->line = strdup(args->line);
931 al->line_nr = args->line_nr;
932 al->samples_nr = nr;
933 }
934
935 return al;
936}
937
938/*
939 * Allocating the disasm annotation line data with
940 * following structure:
941 *
942 * ------------------------------------------------------------
943 * privsize space | struct disasm_line | struct annotation_line
944 * ------------------------------------------------------------
945 *
946 * We have 'struct annotation_line' member as last member
947 * of 'struct disasm_line' to have an easy access.
948 *
949 */
950static struct disasm_line *disasm_line__new(struct annotate_args *args)
951{
952 struct disasm_line *dl = NULL;
953 struct annotation_line *al;
954 size_t privsize = args->privsize + offsetof(struct disasm_line, al);
955
956 al = annotation_line__new(args, privsize);
957 if (al != NULL) {
958 dl = disasm_line(al);
888 959
889 if (dl != NULL) { 960 if (dl->al.line == NULL)
890 dl->offset = offset;
891 dl->line = strdup(line);
892 dl->line_nr = line_nr;
893 if (dl->line == NULL)
894 goto out_delete; 961 goto out_delete;
895 962
896 if (offset != -1) { 963 if (args->offset != -1) {
897 if (disasm_line__parse(dl->line, &dl->ins.name, &dl->ops.raw) < 0) 964 if (disasm_line__parse(dl->al.line, &dl->ins.name, &dl->ops.raw) < 0)
898 goto out_free_line; 965 goto out_free_line;
899 966
900 disasm_line__init_ins(dl, arch, map); 967 disasm_line__init_ins(dl, args->arch, args->map);
901 } 968 }
902 } 969 }
903 970
904 return dl; 971 return dl;
905 972
906out_free_line: 973out_free_line:
907 zfree(&dl->line); 974 zfree(&dl->al.line);
908out_delete: 975out_delete:
909 free(dl); 976 free(dl);
910 return NULL; 977 return NULL;
@@ -912,30 +979,30 @@ out_delete:
912 979
913void disasm_line__free(struct disasm_line *dl) 980void disasm_line__free(struct disasm_line *dl)
914{ 981{
915 zfree(&dl->line);
916 if (dl->ins.ops && dl->ins.ops->free) 982 if (dl->ins.ops && dl->ins.ops->free)
917 dl->ins.ops->free(&dl->ops); 983 dl->ins.ops->free(&dl->ops);
918 else 984 else
919 ins__delete(&dl->ops); 985 ins__delete(&dl->ops);
920 free((void *)dl->ins.name); 986 free((void *)dl->ins.name);
921 dl->ins.name = NULL; 987 dl->ins.name = NULL;
922 free(dl); 988 annotation_line__delete(&dl->al);
923} 989}
924 990
925int disasm_line__scnprintf(struct disasm_line *dl, char *bf, size_t size, bool raw) 991int disasm_line__scnprintf(struct disasm_line *dl, char *bf, size_t size, bool raw)
926{ 992{
927 if (raw || !dl->ins.ops) 993 if (raw || !dl->ins.ops)
928 return scnprintf(bf, size, "%-6.6s %s", dl->ins.name, dl->ops.raw); 994 return scnprintf(bf, size, "%-6s %s", dl->ins.name, dl->ops.raw);
929 995
930 return ins__scnprintf(&dl->ins, bf, size, &dl->ops); 996 return ins__scnprintf(&dl->ins, bf, size, &dl->ops);
931} 997}
932 998
933static void disasm__add(struct list_head *head, struct disasm_line *line) 999static void annotation_line__add(struct annotation_line *al, struct list_head *head)
934{ 1000{
935 list_add_tail(&line->node, head); 1001 list_add_tail(&al->node, head);
936} 1002}
937 1003
938struct disasm_line *disasm__get_next_ip_line(struct list_head *head, struct disasm_line *pos) 1004struct annotation_line *
1005annotation_line__next(struct annotation_line *pos, struct list_head *head)
939{ 1006{
940 list_for_each_entry_continue(pos, head, node) 1007 list_for_each_entry_continue(pos, head, node)
941 if (pos->offset >= 0) 1008 if (pos->offset >= 0)
@@ -944,50 +1011,6 @@ struct disasm_line *disasm__get_next_ip_line(struct list_head *head, struct disa
944 return NULL; 1011 return NULL;
945} 1012}
946 1013
947double disasm__calc_percent(struct annotation *notes, int evidx, s64 offset,
948 s64 end, const char **path, struct sym_hist_entry *sample)
949{
950 struct source_line *src_line = notes->src->lines;
951 double percent = 0.0;
952
953 sample->nr_samples = sample->period = 0;
954
955 if (src_line) {
956 size_t sizeof_src_line = sizeof(*src_line) +
957 sizeof(src_line->samples) * (src_line->nr_pcnt - 1);
958
959 while (offset < end) {
960 src_line = (void *)notes->src->lines +
961 (sizeof_src_line * offset);
962
963 if (*path == NULL)
964 *path = src_line->path;
965
966 percent += src_line->samples[evidx].percent;
967 sample->nr_samples += src_line->samples[evidx].nr;
968 offset++;
969 }
970 } else {
971 struct sym_hist *h = annotation__histogram(notes, evidx);
972 unsigned int hits = 0;
973 u64 period = 0;
974
975 while (offset < end) {
976 hits += h->addr[offset].nr_samples;
977 period += h->addr[offset].period;
978 ++offset;
979 }
980
981 if (h->nr_samples) {
982 sample->period = period;
983 sample->nr_samples = hits;
984 percent = 100.0 * hits / h->nr_samples;
985 }
986 }
987
988 return percent;
989}
990
991static const char *annotate__address_color(struct block_range *br) 1014static const char *annotate__address_color(struct block_range *br)
992{ 1015{
993 double cov = block_range__coverage(br); 1016 double cov = block_range__coverage(br);
@@ -1070,50 +1093,39 @@ static void annotate__branch_printf(struct block_range *br, u64 addr)
1070 } 1093 }
1071} 1094}
1072 1095
1096static int disasm_line__print(struct disasm_line *dl, u64 start, int addr_fmt_width)
1097{
1098 s64 offset = dl->al.offset;
1099 const u64 addr = start + offset;
1100 struct block_range *br;
1101
1102 br = block_range__find(addr);
1103 color_fprintf(stdout, annotate__address_color(br), " %*" PRIx64 ":", addr_fmt_width, addr);
1104 color_fprintf(stdout, annotate__asm_color(br), "%s", dl->al.line);
1105 annotate__branch_printf(br, addr);
1106 return 0;
1107}
1073 1108
1074static int disasm_line__print(struct disasm_line *dl, struct symbol *sym, u64 start, 1109static int
1075 struct perf_evsel *evsel, u64 len, int min_pcnt, int printed, 1110annotation_line__print(struct annotation_line *al, struct symbol *sym, u64 start,
1076 int max_lines, struct disasm_line *queue) 1111 struct perf_evsel *evsel, u64 len, int min_pcnt, int printed,
1112 int max_lines, struct annotation_line *queue, int addr_fmt_width)
1077{ 1113{
1114 struct disasm_line *dl = container_of(al, struct disasm_line, al);
1078 static const char *prev_line; 1115 static const char *prev_line;
1079 static const char *prev_color; 1116 static const char *prev_color;
1080 1117
1081 if (dl->offset != -1) { 1118 if (al->offset != -1) {
1082 const char *path = NULL; 1119 double max_percent = 0.0;
1083 double percent, max_percent = 0.0;
1084 double *ppercents = &percent;
1085 struct sym_hist_entry sample;
1086 struct sym_hist_entry *psamples = &sample;
1087 int i, nr_percent = 1; 1120 int i, nr_percent = 1;
1088 const char *color; 1121 const char *color;
1089 struct annotation *notes = symbol__annotation(sym); 1122 struct annotation *notes = symbol__annotation(sym);
1090 s64 offset = dl->offset;
1091 const u64 addr = start + offset;
1092 struct disasm_line *next;
1093 struct block_range *br;
1094
1095 next = disasm__get_next_ip_line(&notes->src->source, dl);
1096
1097 if (perf_evsel__is_group_event(evsel)) {
1098 nr_percent = evsel->nr_members;
1099 ppercents = calloc(nr_percent, sizeof(double));
1100 psamples = calloc(nr_percent, sizeof(struct sym_hist_entry));
1101 if (ppercents == NULL || psamples == NULL) {
1102 return -1;
1103 }
1104 }
1105 1123
1106 for (i = 0; i < nr_percent; i++) { 1124 for (i = 0; i < al->samples_nr; i++) {
1107 percent = disasm__calc_percent(notes, 1125 struct annotation_data *sample = &al->samples[i];
1108 notes->src->lines ? i : evsel->idx + i, 1126
1109 offset, 1127 if (sample->percent > max_percent)
1110 next ? next->offset : (s64) len, 1128 max_percent = sample->percent;
1111 &path, &sample);
1112
1113 ppercents[i] = percent;
1114 psamples[i] = sample;
1115 if (percent > max_percent)
1116 max_percent = percent;
1117 } 1129 }
1118 1130
1119 if (max_percent < min_pcnt) 1131 if (max_percent < min_pcnt)
@@ -1124,10 +1136,10 @@ static int disasm_line__print(struct disasm_line *dl, struct symbol *sym, u64 st
1124 1136
1125 if (queue != NULL) { 1137 if (queue != NULL) {
1126 list_for_each_entry_from(queue, &notes->src->source, node) { 1138 list_for_each_entry_from(queue, &notes->src->source, node) {
1127 if (queue == dl) 1139 if (queue == al)
1128 break; 1140 break;
1129 disasm_line__print(queue, sym, start, evsel, len, 1141 annotation_line__print(queue, sym, start, evsel, len,
1130 0, 0, 1, NULL); 1142 0, 0, 1, NULL, addr_fmt_width);
1131 } 1143 }
1132 } 1144 }
1133 1145
@@ -1138,44 +1150,34 @@ static int disasm_line__print(struct disasm_line *dl, struct symbol *sym, u64 st
1138 * the same color than the percentage. Don't print it 1150 * the same color than the percentage. Don't print it
1139 * twice for close colored addr with the same filename:line 1151 * twice for close colored addr with the same filename:line
1140 */ 1152 */
1141 if (path) { 1153 if (al->path) {
1142 if (!prev_line || strcmp(prev_line, path) 1154 if (!prev_line || strcmp(prev_line, al->path)
1143 || color != prev_color) { 1155 || color != prev_color) {
1144 color_fprintf(stdout, color, " %s", path); 1156 color_fprintf(stdout, color, " %s", al->path);
1145 prev_line = path; 1157 prev_line = al->path;
1146 prev_color = color; 1158 prev_color = color;
1147 } 1159 }
1148 } 1160 }
1149 1161
1150 for (i = 0; i < nr_percent; i++) { 1162 for (i = 0; i < nr_percent; i++) {
1151 percent = ppercents[i]; 1163 struct annotation_data *sample = &al->samples[i];
1152 sample = psamples[i]; 1164
1153 color = get_percent_color(percent); 1165 color = get_percent_color(sample->percent);
1154 1166
1155 if (symbol_conf.show_total_period) 1167 if (symbol_conf.show_total_period)
1156 color_fprintf(stdout, color, " %11" PRIu64, 1168 color_fprintf(stdout, color, " %11" PRIu64,
1157 sample.period); 1169 sample->he.period);
1158 else if (symbol_conf.show_nr_samples) 1170 else if (symbol_conf.show_nr_samples)
1159 color_fprintf(stdout, color, " %7" PRIu64, 1171 color_fprintf(stdout, color, " %7" PRIu64,
1160 sample.nr_samples); 1172 sample->he.nr_samples);
1161 else 1173 else
1162 color_fprintf(stdout, color, " %7.2f", percent); 1174 color_fprintf(stdout, color, " %7.2f", sample->percent);
1163 } 1175 }
1164 1176
1165 printf(" : "); 1177 printf(" : ");
1166 1178
1167 br = block_range__find(addr); 1179 disasm_line__print(dl, start, addr_fmt_width);
1168 color_fprintf(stdout, annotate__address_color(br), " %" PRIx64 ":", addr);
1169 color_fprintf(stdout, annotate__asm_color(br), "%s", dl->line);
1170 annotate__branch_printf(br, addr);
1171 printf("\n"); 1180 printf("\n");
1172
1173 if (ppercents != &percent)
1174 free(ppercents);
1175
1176 if (psamples != &sample)
1177 free(psamples);
1178
1179 } else if (max_lines && printed >= max_lines) 1181 } else if (max_lines && printed >= max_lines)
1180 return 1; 1182 return 1;
1181 else { 1183 else {
@@ -1187,10 +1189,10 @@ static int disasm_line__print(struct disasm_line *dl, struct symbol *sym, u64 st
1187 if (perf_evsel__is_group_event(evsel)) 1189 if (perf_evsel__is_group_event(evsel))
1188 width *= evsel->nr_members; 1190 width *= evsel->nr_members;
1189 1191
1190 if (!*dl->line) 1192 if (!*al->line)
1191 printf(" %*s:\n", width, " "); 1193 printf(" %*s:\n", width, " ");
1192 else 1194 else
1193 printf(" %*s: %s\n", width, " ", dl->line); 1195 printf(" %*s: %*s %s\n", width, " ", addr_fmt_width, " ", al->line);
1194 } 1196 }
1195 1197
1196 return 0; 1198 return 0;
@@ -1216,11 +1218,11 @@ static int disasm_line__print(struct disasm_line *dl, struct symbol *sym, u64 st
1216 * means that it's not a disassembly line so should be treated differently. 1218 * means that it's not a disassembly line so should be treated differently.
1217 * The ops.raw part will be parsed further according to type of the instruction. 1219 * The ops.raw part will be parsed further according to type of the instruction.
1218 */ 1220 */
1219static int symbol__parse_objdump_line(struct symbol *sym, struct map *map, 1221static int symbol__parse_objdump_line(struct symbol *sym, FILE *file,
1220 struct arch *arch, 1222 struct annotate_args *args,
1221 FILE *file, size_t privsize,
1222 int *line_nr) 1223 int *line_nr)
1223{ 1224{
1225 struct map *map = args->map;
1224 struct annotation *notes = symbol__annotation(sym); 1226 struct annotation *notes = symbol__annotation(sym);
1225 struct disasm_line *dl; 1227 struct disasm_line *dl;
1226 char *line = NULL, *parsed_line, *tmp, *tmp2; 1228 char *line = NULL, *parsed_line, *tmp, *tmp2;
@@ -1264,7 +1266,11 @@ static int symbol__parse_objdump_line(struct symbol *sym, struct map *map,
1264 parsed_line = tmp2 + 1; 1266 parsed_line = tmp2 + 1;
1265 } 1267 }
1266 1268
1267 dl = disasm_line__new(offset, parsed_line, privsize, *line_nr, arch, map); 1269 args->offset = offset;
1270 args->line = parsed_line;
1271 args->line_nr = *line_nr;
1272
1273 dl = disasm_line__new(args);
1268 free(line); 1274 free(line);
1269 (*line_nr)++; 1275 (*line_nr)++;
1270 1276
@@ -1289,7 +1295,7 @@ static int symbol__parse_objdump_line(struct symbol *sym, struct map *map,
1289 dl->ops.target.name = strdup(target.sym->name); 1295 dl->ops.target.name = strdup(target.sym->name);
1290 } 1296 }
1291 1297
1292 disasm__add(&notes->src->source, dl); 1298 annotation_line__add(&dl->al, &notes->src->source);
1293 1299
1294 return 0; 1300 return 0;
1295} 1301}
@@ -1306,19 +1312,19 @@ static void delete_last_nop(struct symbol *sym)
1306 struct disasm_line *dl; 1312 struct disasm_line *dl;
1307 1313
1308 while (!list_empty(list)) { 1314 while (!list_empty(list)) {
1309 dl = list_entry(list->prev, struct disasm_line, node); 1315 dl = list_entry(list->prev, struct disasm_line, al.node);
1310 1316
1311 if (dl->ins.ops) { 1317 if (dl->ins.ops) {
1312 if (dl->ins.ops != &nop_ops) 1318 if (dl->ins.ops != &nop_ops)
1313 return; 1319 return;
1314 } else { 1320 } else {
1315 if (!strstr(dl->line, " nop ") && 1321 if (!strstr(dl->al.line, " nop ") &&
1316 !strstr(dl->line, " nopl ") && 1322 !strstr(dl->al.line, " nopl ") &&
1317 !strstr(dl->line, " nopw ")) 1323 !strstr(dl->al.line, " nopw "))
1318 return; 1324 return;
1319 } 1325 }
1320 1326
1321 list_del(&dl->node); 1327 list_del(&dl->al.node);
1322 disasm_line__free(dl); 1328 disasm_line__free(dl);
1323 } 1329 }
1324} 1330}
@@ -1413,25 +1419,11 @@ fallback:
1413 return 0; 1419 return 0;
1414} 1420}
1415 1421
1416static const char *annotate__norm_arch(const char *arch_name) 1422static int symbol__disassemble(struct symbol *sym, struct annotate_args *args)
1417{
1418 struct utsname uts;
1419
1420 if (!arch_name) { /* Assume we are annotating locally. */
1421 if (uname(&uts) < 0)
1422 return NULL;
1423 arch_name = uts.machine;
1424 }
1425 return normalize_arch((char *)arch_name);
1426}
1427
1428int symbol__disassemble(struct symbol *sym, struct map *map,
1429 const char *arch_name, size_t privsize,
1430 struct arch **parch, char *cpuid)
1431{ 1423{
1424 struct map *map = args->map;
1432 struct dso *dso = map->dso; 1425 struct dso *dso = map->dso;
1433 char command[PATH_MAX * 2]; 1426 char command[PATH_MAX * 2];
1434 struct arch *arch = NULL;
1435 FILE *file; 1427 FILE *file;
1436 char symfs_filename[PATH_MAX]; 1428 char symfs_filename[PATH_MAX];
1437 struct kcore_extract kce; 1429 struct kcore_extract kce;
@@ -1445,28 +1437,6 @@ int symbol__disassemble(struct symbol *sym, struct map *map,
1445 if (err) 1437 if (err)
1446 return err; 1438 return err;
1447 1439
1448 arch_name = annotate__norm_arch(arch_name);
1449 if (!arch_name)
1450 return -1;
1451
1452 arch = arch__find(arch_name);
1453 if (arch == NULL)
1454 return -ENOTSUP;
1455
1456 if (parch)
1457 *parch = arch;
1458
1459 if (arch->init) {
1460 err = arch->init(arch);
1461 if (err) {
1462 pr_err("%s: failed to initialize %s arch priv area\n", __func__, arch->name);
1463 return err;
1464 }
1465 }
1466
1467 if (arch->cpuid_parse && cpuid)
1468 arch->cpuid_parse(arch, cpuid);
1469
1470 pr_debug("%s: filename=%s, sym=%s, start=%#" PRIx64 ", end=%#" PRIx64 "\n", __func__, 1440 pr_debug("%s: filename=%s, sym=%s, start=%#" PRIx64 ", end=%#" PRIx64 "\n", __func__,
1471 symfs_filename, sym->name, map->unmap_ip(map, sym->start), 1441 symfs_filename, sym->name, map->unmap_ip(map, sym->start),
1472 map->unmap_ip(map, sym->end)); 1442 map->unmap_ip(map, sym->end));
@@ -1550,8 +1520,7 @@ int symbol__disassemble(struct symbol *sym, struct map *map,
1550 * can associate it with the instructions till the next one. 1520 * can associate it with the instructions till the next one.
1551 * See disasm_line__new() and struct disasm_line::line_nr. 1521 * See disasm_line__new() and struct disasm_line::line_nr.
1552 */ 1522 */
1553 if (symbol__parse_objdump_line(sym, map, arch, file, privsize, 1523 if (symbol__parse_objdump_line(sym, file, args, &lineno) < 0)
1554 &lineno) < 0)
1555 break; 1524 break;
1556 nline++; 1525 nline++;
1557 } 1526 }
@@ -1584,21 +1553,110 @@ out_close_stdout:
1584 goto out_remove_tmp; 1553 goto out_remove_tmp;
1585} 1554}
1586 1555
1587static void insert_source_line(struct rb_root *root, struct source_line *src_line) 1556static void calc_percent(struct sym_hist *hist,
1557 struct annotation_data *sample,
1558 s64 offset, s64 end)
1588{ 1559{
1589 struct source_line *iter; 1560 unsigned int hits = 0;
1561 u64 period = 0;
1562
1563 while (offset < end) {
1564 hits += hist->addr[offset].nr_samples;
1565 period += hist->addr[offset].period;
1566 ++offset;
1567 }
1568
1569 if (hist->nr_samples) {
1570 sample->he.period = period;
1571 sample->he.nr_samples = hits;
1572 sample->percent = 100.0 * hits / hist->nr_samples;
1573 }
1574}
1575
1576static void annotation__calc_percent(struct annotation *notes,
1577 struct perf_evsel *evsel, s64 len)
1578{
1579 struct annotation_line *al, *next;
1580
1581 list_for_each_entry(al, &notes->src->source, node) {
1582 s64 end;
1583 int i;
1584
1585 if (al->offset == -1)
1586 continue;
1587
1588 next = annotation_line__next(al, &notes->src->source);
1589 end = next ? next->offset : len;
1590
1591 for (i = 0; i < al->samples_nr; i++) {
1592 struct annotation_data *sample;
1593 struct sym_hist *hist;
1594
1595 hist = annotation__histogram(notes, evsel->idx + i);
1596 sample = &al->samples[i];
1597
1598 calc_percent(hist, sample, al->offset, end);
1599 }
1600 }
1601}
1602
1603void symbol__calc_percent(struct symbol *sym, struct perf_evsel *evsel)
1604{
1605 struct annotation *notes = symbol__annotation(sym);
1606
1607 annotation__calc_percent(notes, evsel, symbol__size(sym));
1608}
1609
1610int symbol__annotate(struct symbol *sym, struct map *map,
1611 struct perf_evsel *evsel, size_t privsize,
1612 struct arch **parch)
1613{
1614 struct annotate_args args = {
1615 .privsize = privsize,
1616 .map = map,
1617 .evsel = evsel,
1618 };
1619 struct perf_env *env = perf_evsel__env(evsel);
1620 const char *arch_name = perf_env__arch(env);
1621 struct arch *arch;
1622 int err;
1623
1624 if (!arch_name)
1625 return -1;
1626
1627 args.arch = arch = arch__find(arch_name);
1628 if (arch == NULL)
1629 return -ENOTSUP;
1630
1631 if (parch)
1632 *parch = arch;
1633
1634 if (arch->init) {
1635 err = arch->init(arch, env ? env->cpuid : NULL);
1636 if (err) {
1637 pr_err("%s: failed to initialize %s arch priv area\n", __func__, arch->name);
1638 return err;
1639 }
1640 }
1641
1642 return symbol__disassemble(sym, &args);
1643}
1644
1645static void insert_source_line(struct rb_root *root, struct annotation_line *al)
1646{
1647 struct annotation_line *iter;
1590 struct rb_node **p = &root->rb_node; 1648 struct rb_node **p = &root->rb_node;
1591 struct rb_node *parent = NULL; 1649 struct rb_node *parent = NULL;
1592 int i, ret; 1650 int i, ret;
1593 1651
1594 while (*p != NULL) { 1652 while (*p != NULL) {
1595 parent = *p; 1653 parent = *p;
1596 iter = rb_entry(parent, struct source_line, node); 1654 iter = rb_entry(parent, struct annotation_line, rb_node);
1597 1655
1598 ret = strcmp(iter->path, src_line->path); 1656 ret = strcmp(iter->path, al->path);
1599 if (ret == 0) { 1657 if (ret == 0) {
1600 for (i = 0; i < src_line->nr_pcnt; i++) 1658 for (i = 0; i < al->samples_nr; i++)
1601 iter->samples[i].percent_sum += src_line->samples[i].percent; 1659 iter->samples[i].percent_sum += al->samples[i].percent;
1602 return; 1660 return;
1603 } 1661 }
1604 1662
@@ -1608,18 +1666,18 @@ static void insert_source_line(struct rb_root *root, struct source_line *src_lin
1608 p = &(*p)->rb_right; 1666 p = &(*p)->rb_right;
1609 } 1667 }
1610 1668
1611 for (i = 0; i < src_line->nr_pcnt; i++) 1669 for (i = 0; i < al->samples_nr; i++)
1612 src_line->samples[i].percent_sum = src_line->samples[i].percent; 1670 al->samples[i].percent_sum = al->samples[i].percent;
1613 1671
1614 rb_link_node(&src_line->node, parent, p); 1672 rb_link_node(&al->rb_node, parent, p);
1615 rb_insert_color(&src_line->node, root); 1673 rb_insert_color(&al->rb_node, root);
1616} 1674}
1617 1675
1618static int cmp_source_line(struct source_line *a, struct source_line *b) 1676static int cmp_source_line(struct annotation_line *a, struct annotation_line *b)
1619{ 1677{
1620 int i; 1678 int i;
1621 1679
1622 for (i = 0; i < a->nr_pcnt; i++) { 1680 for (i = 0; i < a->samples_nr; i++) {
1623 if (a->samples[i].percent_sum == b->samples[i].percent_sum) 1681 if (a->samples[i].percent_sum == b->samples[i].percent_sum)
1624 continue; 1682 continue;
1625 return a->samples[i].percent_sum > b->samples[i].percent_sum; 1683 return a->samples[i].percent_sum > b->samples[i].percent_sum;
@@ -1628,135 +1686,47 @@ static int cmp_source_line(struct source_line *a, struct source_line *b)
1628 return 0; 1686 return 0;
1629} 1687}
1630 1688
1631static void __resort_source_line(struct rb_root *root, struct source_line *src_line) 1689static void __resort_source_line(struct rb_root *root, struct annotation_line *al)
1632{ 1690{
1633 struct source_line *iter; 1691 struct annotation_line *iter;
1634 struct rb_node **p = &root->rb_node; 1692 struct rb_node **p = &root->rb_node;
1635 struct rb_node *parent = NULL; 1693 struct rb_node *parent = NULL;
1636 1694
1637 while (*p != NULL) { 1695 while (*p != NULL) {
1638 parent = *p; 1696 parent = *p;
1639 iter = rb_entry(parent, struct source_line, node); 1697 iter = rb_entry(parent, struct annotation_line, rb_node);
1640 1698
1641 if (cmp_source_line(src_line, iter)) 1699 if (cmp_source_line(al, iter))
1642 p = &(*p)->rb_left; 1700 p = &(*p)->rb_left;
1643 else 1701 else
1644 p = &(*p)->rb_right; 1702 p = &(*p)->rb_right;
1645 } 1703 }
1646 1704
1647 rb_link_node(&src_line->node, parent, p); 1705 rb_link_node(&al->rb_node, parent, p);
1648 rb_insert_color(&src_line->node, root); 1706 rb_insert_color(&al->rb_node, root);
1649} 1707}
1650 1708
1651static void resort_source_line(struct rb_root *dest_root, struct rb_root *src_root) 1709static void resort_source_line(struct rb_root *dest_root, struct rb_root *src_root)
1652{ 1710{
1653 struct source_line *src_line; 1711 struct annotation_line *al;
1654 struct rb_node *node; 1712 struct rb_node *node;
1655 1713
1656 node = rb_first(src_root); 1714 node = rb_first(src_root);
1657 while (node) { 1715 while (node) {
1658 struct rb_node *next; 1716 struct rb_node *next;
1659 1717
1660 src_line = rb_entry(node, struct source_line, node); 1718 al = rb_entry(node, struct annotation_line, rb_node);
1661 next = rb_next(node); 1719 next = rb_next(node);
1662 rb_erase(node, src_root); 1720 rb_erase(node, src_root);
1663 1721
1664 __resort_source_line(dest_root, src_line); 1722 __resort_source_line(dest_root, al);
1665 node = next; 1723 node = next;
1666 } 1724 }
1667} 1725}
1668 1726
1669static void symbol__free_source_line(struct symbol *sym, int len)
1670{
1671 struct annotation *notes = symbol__annotation(sym);
1672 struct source_line *src_line = notes->src->lines;
1673 size_t sizeof_src_line;
1674 int i;
1675
1676 sizeof_src_line = sizeof(*src_line) +
1677 (sizeof(src_line->samples) * (src_line->nr_pcnt - 1));
1678
1679 for (i = 0; i < len; i++) {
1680 free_srcline(src_line->path);
1681 src_line = (void *)src_line + sizeof_src_line;
1682 }
1683
1684 zfree(&notes->src->lines);
1685}
1686
1687/* Get the filename:line for the colored entries */
1688static int symbol__get_source_line(struct symbol *sym, struct map *map,
1689 struct perf_evsel *evsel,
1690 struct rb_root *root, int len)
1691{
1692 u64 start;
1693 int i, k;
1694 int evidx = evsel->idx;
1695 struct source_line *src_line;
1696 struct annotation *notes = symbol__annotation(sym);
1697 struct sym_hist *h = annotation__histogram(notes, evidx);
1698 struct rb_root tmp_root = RB_ROOT;
1699 int nr_pcnt = 1;
1700 u64 nr_samples = h->nr_samples;
1701 size_t sizeof_src_line = sizeof(struct source_line);
1702
1703 if (perf_evsel__is_group_event(evsel)) {
1704 for (i = 1; i < evsel->nr_members; i++) {
1705 h = annotation__histogram(notes, evidx + i);
1706 nr_samples += h->nr_samples;
1707 }
1708 nr_pcnt = evsel->nr_members;
1709 sizeof_src_line += (nr_pcnt - 1) * sizeof(src_line->samples);
1710 }
1711
1712 if (!nr_samples)
1713 return 0;
1714
1715 src_line = notes->src->lines = calloc(len, sizeof_src_line);
1716 if (!notes->src->lines)
1717 return -1;
1718
1719 start = map__rip_2objdump(map, sym->start);
1720
1721 for (i = 0; i < len; i++) {
1722 u64 offset;
1723 double percent_max = 0.0;
1724
1725 src_line->nr_pcnt = nr_pcnt;
1726
1727 for (k = 0; k < nr_pcnt; k++) {
1728 double percent = 0.0;
1729
1730 h = annotation__histogram(notes, evidx + k);
1731 nr_samples = h->addr[i].nr_samples;
1732 if (h->nr_samples)
1733 percent = 100.0 * nr_samples / h->nr_samples;
1734
1735 if (percent > percent_max)
1736 percent_max = percent;
1737 src_line->samples[k].percent = percent;
1738 src_line->samples[k].nr = nr_samples;
1739 }
1740
1741 if (percent_max <= 0.5)
1742 goto next;
1743
1744 offset = start + i;
1745 src_line->path = get_srcline(map->dso, offset, NULL,
1746 false, true);
1747 insert_source_line(&tmp_root, src_line);
1748
1749 next:
1750 src_line = (void *)src_line + sizeof_src_line;
1751 }
1752
1753 resort_source_line(root, &tmp_root);
1754 return 0;
1755}
1756
1757static void print_summary(struct rb_root *root, const char *filename) 1727static void print_summary(struct rb_root *root, const char *filename)
1758{ 1728{
1759 struct source_line *src_line; 1729 struct annotation_line *al;
1760 struct rb_node *node; 1730 struct rb_node *node;
1761 1731
1762 printf("\nSorted summary for file %s\n", filename); 1732 printf("\nSorted summary for file %s\n", filename);
@@ -1774,9 +1744,9 @@ static void print_summary(struct rb_root *root, const char *filename)
1774 char *path; 1744 char *path;
1775 int i; 1745 int i;
1776 1746
1777 src_line = rb_entry(node, struct source_line, node); 1747 al = rb_entry(node, struct annotation_line, rb_node);
1778 for (i = 0; i < src_line->nr_pcnt; i++) { 1748 for (i = 0; i < al->samples_nr; i++) {
1779 percent = src_line->samples[i].percent_sum; 1749 percent = al->samples[i].percent_sum;
1780 color = get_percent_color(percent); 1750 color = get_percent_color(percent);
1781 color_fprintf(stdout, color, " %7.2f", percent); 1751 color_fprintf(stdout, color, " %7.2f", percent);
1782 1752
@@ -1784,7 +1754,7 @@ static void print_summary(struct rb_root *root, const char *filename)
1784 percent_max = percent; 1754 percent_max = percent;
1785 } 1755 }
1786 1756
1787 path = src_line->path; 1757 path = al->path;
1788 color = get_percent_color(percent_max); 1758 color = get_percent_color(percent_max);
1789 color_fprintf(stdout, color, " %s\n", path); 1759 color_fprintf(stdout, color, " %s\n", path);
1790 1760
@@ -1805,6 +1775,19 @@ static void symbol__annotate_hits(struct symbol *sym, struct perf_evsel *evsel)
1805 printf("%*s: %" PRIu64 "\n", BITS_PER_LONG / 2, "h->nr_samples", h->nr_samples); 1775 printf("%*s: %" PRIu64 "\n", BITS_PER_LONG / 2, "h->nr_samples", h->nr_samples);
1806} 1776}
1807 1777
1778static int annotated_source__addr_fmt_width(struct list_head *lines, u64 start)
1779{
1780 char bf[32];
1781 struct annotation_line *line;
1782
1783 list_for_each_entry_reverse(line, lines, node) {
1784 if (line->offset != -1)
1785 return scnprintf(bf, sizeof(bf), "%" PRIx64, start + line->offset);
1786 }
1787
1788 return 0;
1789}
1790
1808int symbol__annotate_printf(struct symbol *sym, struct map *map, 1791int symbol__annotate_printf(struct symbol *sym, struct map *map,
1809 struct perf_evsel *evsel, bool full_paths, 1792 struct perf_evsel *evsel, bool full_paths,
1810 int min_pcnt, int max_lines, int context) 1793 int min_pcnt, int max_lines, int context)
@@ -1815,9 +1798,9 @@ int symbol__annotate_printf(struct symbol *sym, struct map *map,
1815 const char *evsel_name = perf_evsel__name(evsel); 1798 const char *evsel_name = perf_evsel__name(evsel);
1816 struct annotation *notes = symbol__annotation(sym); 1799 struct annotation *notes = symbol__annotation(sym);
1817 struct sym_hist *h = annotation__histogram(notes, evsel->idx); 1800 struct sym_hist *h = annotation__histogram(notes, evsel->idx);
1818 struct disasm_line *pos, *queue = NULL; 1801 struct annotation_line *pos, *queue = NULL;
1819 u64 start = map__rip_2objdump(map, sym->start); 1802 u64 start = map__rip_2objdump(map, sym->start);
1820 int printed = 2, queue_len = 0; 1803 int printed = 2, queue_len = 0, addr_fmt_width;
1821 int more = 0; 1804 int more = 0;
1822 u64 len; 1805 u64 len;
1823 int width = symbol_conf.show_total_period ? 12 : 8; 1806 int width = symbol_conf.show_total_period ? 12 : 8;
@@ -1848,15 +1831,21 @@ int symbol__annotate_printf(struct symbol *sym, struct map *map,
1848 if (verbose > 0) 1831 if (verbose > 0)
1849 symbol__annotate_hits(sym, evsel); 1832 symbol__annotate_hits(sym, evsel);
1850 1833
1834 addr_fmt_width = annotated_source__addr_fmt_width(&notes->src->source, start);
1835
1851 list_for_each_entry(pos, &notes->src->source, node) { 1836 list_for_each_entry(pos, &notes->src->source, node) {
1837 int err;
1838
1852 if (context && queue == NULL) { 1839 if (context && queue == NULL) {
1853 queue = pos; 1840 queue = pos;
1854 queue_len = 0; 1841 queue_len = 0;
1855 } 1842 }
1856 1843
1857 switch (disasm_line__print(pos, sym, start, evsel, len, 1844 err = annotation_line__print(pos, sym, start, evsel, len,
1858 min_pcnt, printed, max_lines, 1845 min_pcnt, printed, max_lines,
1859 queue)) { 1846 queue, addr_fmt_width);
1847
1848 switch (err) {
1860 case 0: 1849 case 0:
1861 ++printed; 1850 ++printed;
1862 if (context) { 1851 if (context) {
@@ -1911,13 +1900,13 @@ void symbol__annotate_decay_histogram(struct symbol *sym, int evidx)
1911 } 1900 }
1912} 1901}
1913 1902
1914void disasm__purge(struct list_head *head) 1903void annotated_source__purge(struct annotated_source *as)
1915{ 1904{
1916 struct disasm_line *pos, *n; 1905 struct annotation_line *al, *n;
1917 1906
1918 list_for_each_entry_safe(pos, n, head, node) { 1907 list_for_each_entry_safe(al, n, &as->source, node) {
1919 list_del(&pos->node); 1908 list_del(&al->node);
1920 disasm_line__free(pos); 1909 disasm_line__free(disasm_line(al));
1921 } 1910 }
1922} 1911}
1923 1912
@@ -1925,10 +1914,10 @@ static size_t disasm_line__fprintf(struct disasm_line *dl, FILE *fp)
1925{ 1914{
1926 size_t printed; 1915 size_t printed;
1927 1916
1928 if (dl->offset == -1) 1917 if (dl->al.offset == -1)
1929 return fprintf(fp, "%s\n", dl->line); 1918 return fprintf(fp, "%s\n", dl->al.line);
1930 1919
1931 printed = fprintf(fp, "%#" PRIx64 " %s", dl->offset, dl->ins.name); 1920 printed = fprintf(fp, "%#" PRIx64 " %s", dl->al.offset, dl->ins.name);
1932 1921
1933 if (dl->ops.raw[0] != '\0') { 1922 if (dl->ops.raw[0] != '\0') {
1934 printed += fprintf(fp, "%.*s %s\n", 6 - (int)printed, " ", 1923 printed += fprintf(fp, "%.*s %s\n", 6 - (int)printed, " ",
@@ -1943,38 +1932,73 @@ size_t disasm__fprintf(struct list_head *head, FILE *fp)
1943 struct disasm_line *pos; 1932 struct disasm_line *pos;
1944 size_t printed = 0; 1933 size_t printed = 0;
1945 1934
1946 list_for_each_entry(pos, head, node) 1935 list_for_each_entry(pos, head, al.node)
1947 printed += disasm_line__fprintf(pos, fp); 1936 printed += disasm_line__fprintf(pos, fp);
1948 1937
1949 return printed; 1938 return printed;
1950} 1939}
1951 1940
1941static void annotation__calc_lines(struct annotation *notes, struct map *map,
1942 struct rb_root *root, u64 start)
1943{
1944 struct annotation_line *al;
1945 struct rb_root tmp_root = RB_ROOT;
1946
1947 list_for_each_entry(al, &notes->src->source, node) {
1948 double percent_max = 0.0;
1949 int i;
1950
1951 for (i = 0; i < al->samples_nr; i++) {
1952 struct annotation_data *sample;
1953
1954 sample = &al->samples[i];
1955
1956 if (sample->percent > percent_max)
1957 percent_max = sample->percent;
1958 }
1959
1960 if (percent_max <= 0.5)
1961 continue;
1962
1963 al->path = get_srcline(map->dso, start + al->offset, NULL,
1964 false, true, start + al->offset);
1965 insert_source_line(&tmp_root, al);
1966 }
1967
1968 resort_source_line(root, &tmp_root);
1969}
1970
1971static void symbol__calc_lines(struct symbol *sym, struct map *map,
1972 struct rb_root *root)
1973{
1974 struct annotation *notes = symbol__annotation(sym);
1975 u64 start = map__rip_2objdump(map, sym->start);
1976
1977 annotation__calc_lines(notes, map, root, start);
1978}
1979
1952int symbol__tty_annotate(struct symbol *sym, struct map *map, 1980int symbol__tty_annotate(struct symbol *sym, struct map *map,
1953 struct perf_evsel *evsel, bool print_lines, 1981 struct perf_evsel *evsel, bool print_lines,
1954 bool full_paths, int min_pcnt, int max_lines) 1982 bool full_paths, int min_pcnt, int max_lines)
1955{ 1983{
1956 struct dso *dso = map->dso; 1984 struct dso *dso = map->dso;
1957 struct rb_root source_line = RB_ROOT; 1985 struct rb_root source_line = RB_ROOT;
1958 u64 len;
1959 1986
1960 if (symbol__disassemble(sym, map, perf_evsel__env_arch(evsel), 1987 if (symbol__annotate(sym, map, evsel, 0, NULL) < 0)
1961 0, NULL, NULL) < 0)
1962 return -1; 1988 return -1;
1963 1989
1964 len = symbol__size(sym); 1990 symbol__calc_percent(sym, evsel);
1965 1991
1966 if (print_lines) { 1992 if (print_lines) {
1967 srcline_full_filename = full_paths; 1993 srcline_full_filename = full_paths;
1968 symbol__get_source_line(sym, map, evsel, &source_line, len); 1994 symbol__calc_lines(sym, map, &source_line);
1969 print_summary(&source_line, dso->long_name); 1995 print_summary(&source_line, dso->long_name);
1970 } 1996 }
1971 1997
1972 symbol__annotate_printf(sym, map, evsel, full_paths, 1998 symbol__annotate_printf(sym, map, evsel, full_paths,
1973 min_pcnt, max_lines, 0); 1999 min_pcnt, max_lines, 0);
1974 if (print_lines)
1975 symbol__free_source_line(sym, len);
1976 2000
1977 disasm__purge(&symbol__annotation(sym)->src->source); 2001 annotated_source__purge(symbol__annotation(sym)->src);
1978 2002
1979 return 0; 2003 return 0;
1980} 2004}
diff --git a/tools/perf/util/annotate.h b/tools/perf/util/annotate.h
index f6ba3560de5e..ce427445671f 100644
--- a/tools/perf/util/annotate.h
+++ b/tools/perf/util/annotate.h
@@ -59,33 +59,55 @@ bool ins__is_fused(struct arch *arch, const char *ins1, const char *ins2);
59 59
60struct annotation; 60struct annotation;
61 61
62struct sym_hist_entry {
63 u64 nr_samples;
64 u64 period;
65};
66
67struct annotation_data {
68 double percent;
69 double percent_sum;
70 struct sym_hist_entry he;
71};
72
73struct annotation_line {
74 struct list_head node;
75 struct rb_node rb_node;
76 s64 offset;
77 char *line;
78 int line_nr;
79 float ipc;
80 u64 cycles;
81 size_t privsize;
82 char *path;
83 int samples_nr;
84 struct annotation_data samples[0];
85};
86
62struct disasm_line { 87struct disasm_line {
63 struct list_head node; 88 struct ins ins;
64 s64 offset; 89 struct ins_operands ops;
65 char *line; 90
66 struct ins ins; 91 /* This needs to be at the end. */
67 int line_nr; 92 struct annotation_line al;
68 float ipc;
69 u64 cycles;
70 struct ins_operands ops;
71}; 93};
72 94
95static inline struct disasm_line *disasm_line(struct annotation_line *al)
96{
97 return al ? container_of(al, struct disasm_line, al) : NULL;
98}
99
73static inline bool disasm_line__has_offset(const struct disasm_line *dl) 100static inline bool disasm_line__has_offset(const struct disasm_line *dl)
74{ 101{
75 return dl->ops.target.offset_avail; 102 return dl->ops.target.offset_avail;
76} 103}
77 104
78struct sym_hist_entry {
79 u64 nr_samples;
80 u64 period;
81};
82
83void disasm_line__free(struct disasm_line *dl); 105void disasm_line__free(struct disasm_line *dl);
84struct disasm_line *disasm__get_next_ip_line(struct list_head *head, struct disasm_line *pos); 106struct annotation_line *
107annotation_line__next(struct annotation_line *pos, struct list_head *head);
85int disasm_line__scnprintf(struct disasm_line *dl, char *bf, size_t size, bool raw); 108int disasm_line__scnprintf(struct disasm_line *dl, char *bf, size_t size, bool raw);
86size_t disasm__fprintf(struct list_head *head, FILE *fp); 109size_t disasm__fprintf(struct list_head *head, FILE *fp);
87double disasm__calc_percent(struct annotation *notes, int evidx, s64 offset, 110void symbol__calc_percent(struct symbol *sym, struct perf_evsel *evsel);
88 s64 end, const char **path, struct sym_hist_entry *sample);
89 111
90struct sym_hist { 112struct sym_hist {
91 u64 nr_samples; 113 u64 nr_samples;
@@ -104,19 +126,6 @@ struct cyc_hist {
104 u16 reset; 126 u16 reset;
105}; 127};
106 128
107struct source_line_samples {
108 double percent;
109 double percent_sum;
110 u64 nr;
111};
112
113struct source_line {
114 struct rb_node node;
115 char *path;
116 int nr_pcnt;
117 struct source_line_samples samples[1];
118};
119
120/** struct annotated_source - symbols with hits have this attached as in sannotation 129/** struct annotated_source - symbols with hits have this attached as in sannotation
121 * 130 *
122 * @histogram: Array of addr hit histograms per event being monitored 131 * @histogram: Array of addr hit histograms per event being monitored
@@ -132,7 +141,6 @@ struct source_line {
132 */ 141 */
133struct annotated_source { 142struct annotated_source {
134 struct list_head source; 143 struct list_head source;
135 struct source_line *lines;
136 int nr_histograms; 144 int nr_histograms;
137 size_t sizeof_sym_hist; 145 size_t sizeof_sym_hist;
138 struct cyc_hist *cycles_hist; 146 struct cyc_hist *cycles_hist;
@@ -169,9 +177,9 @@ int hist_entry__inc_addr_samples(struct hist_entry *he, struct perf_sample *samp
169int symbol__alloc_hist(struct symbol *sym); 177int symbol__alloc_hist(struct symbol *sym);
170void symbol__annotate_zero_histograms(struct symbol *sym); 178void symbol__annotate_zero_histograms(struct symbol *sym);
171 179
172int symbol__disassemble(struct symbol *sym, struct map *map, 180int symbol__annotate(struct symbol *sym, struct map *map,
173 const char *arch_name, size_t privsize, 181 struct perf_evsel *evsel, size_t privsize,
174 struct arch **parch, char *cpuid); 182 struct arch **parch);
175 183
176enum symbol_disassemble_errno { 184enum symbol_disassemble_errno {
177 SYMBOL_ANNOTATE_ERRNO__SUCCESS = 0, 185 SYMBOL_ANNOTATE_ERRNO__SUCCESS = 0,
@@ -198,7 +206,7 @@ int symbol__annotate_printf(struct symbol *sym, struct map *map,
198 int min_pcnt, int max_lines, int context); 206 int min_pcnt, int max_lines, int context);
199void symbol__annotate_zero_histogram(struct symbol *sym, int evidx); 207void symbol__annotate_zero_histogram(struct symbol *sym, int evidx);
200void symbol__annotate_decay_histogram(struct symbol *sym, int evidx); 208void symbol__annotate_decay_histogram(struct symbol *sym, int evidx);
201void disasm__purge(struct list_head *head); 209void annotated_source__purge(struct annotated_source *as);
202 210
203bool ui__has_annotation(void); 211bool ui__has_annotation(void);
204 212
diff --git a/tools/perf/util/arm-spe-pkt-decoder.c b/tools/perf/util/arm-spe-pkt-decoder.c
new file mode 100644
index 000000000000..b94001b756c7
--- /dev/null
+++ b/tools/perf/util/arm-spe-pkt-decoder.c
@@ -0,0 +1,462 @@
1// SPDX-License-Identifier: GPL-2.0
2/*
3 * Arm Statistical Profiling Extensions (SPE) support
4 * Copyright (c) 2017-2018, Arm Ltd.
5 */
6
7#include <stdio.h>
8#include <string.h>
9#include <endian.h>
10#include <byteswap.h>
11
12#include "arm-spe-pkt-decoder.h"
13
14#define BIT(n) (1ULL << (n))
15
16#define NS_FLAG BIT(63)
17#define EL_FLAG (BIT(62) | BIT(61))
18
19#define SPE_HEADER0_PAD 0x0
20#define SPE_HEADER0_END 0x1
21#define SPE_HEADER0_ADDRESS 0x30 /* address packet (short) */
22#define SPE_HEADER0_ADDRESS_MASK 0x38
23#define SPE_HEADER0_COUNTER 0x18 /* counter packet (short) */
24#define SPE_HEADER0_COUNTER_MASK 0x38
25#define SPE_HEADER0_TIMESTAMP 0x71
26#define SPE_HEADER0_TIMESTAMP 0x71
27#define SPE_HEADER0_EVENTS 0x2
28#define SPE_HEADER0_EVENTS_MASK 0xf
29#define SPE_HEADER0_SOURCE 0x3
30#define SPE_HEADER0_SOURCE_MASK 0xf
31#define SPE_HEADER0_CONTEXT 0x24
32#define SPE_HEADER0_CONTEXT_MASK 0x3c
33#define SPE_HEADER0_OP_TYPE 0x8
34#define SPE_HEADER0_OP_TYPE_MASK 0x3c
35#define SPE_HEADER1_ALIGNMENT 0x0
36#define SPE_HEADER1_ADDRESS 0xb0 /* address packet (extended) */
37#define SPE_HEADER1_ADDRESS_MASK 0xf8
38#define SPE_HEADER1_COUNTER 0x98 /* counter packet (extended) */
39#define SPE_HEADER1_COUNTER_MASK 0xf8
40
41#if __BYTE_ORDER == __BIG_ENDIAN
42#define le16_to_cpu bswap_16
43#define le32_to_cpu bswap_32
44#define le64_to_cpu bswap_64
45#define memcpy_le64(d, s, n) do { \
46 memcpy((d), (s), (n)); \
47 *(d) = le64_to_cpu(*(d)); \
48} while (0)
49#else
50#define le16_to_cpu
51#define le32_to_cpu
52#define le64_to_cpu
53#define memcpy_le64 memcpy
54#endif
55
56static const char * const arm_spe_packet_name[] = {
57 [ARM_SPE_PAD] = "PAD",
58 [ARM_SPE_END] = "END",
59 [ARM_SPE_TIMESTAMP] = "TS",
60 [ARM_SPE_ADDRESS] = "ADDR",
61 [ARM_SPE_COUNTER] = "LAT",
62 [ARM_SPE_CONTEXT] = "CONTEXT",
63 [ARM_SPE_OP_TYPE] = "OP-TYPE",
64 [ARM_SPE_EVENTS] = "EVENTS",
65 [ARM_SPE_DATA_SOURCE] = "DATA-SOURCE",
66};
67
68const char *arm_spe_pkt_name(enum arm_spe_pkt_type type)
69{
70 return arm_spe_packet_name[type];
71}
72
73/* return ARM SPE payload size from its encoding,
74 * which is in bits 5:4 of the byte.
75 * 00 : byte
76 * 01 : halfword (2)
77 * 10 : word (4)
78 * 11 : doubleword (8)
79 */
80static int payloadlen(unsigned char byte)
81{
82 return 1 << ((byte & 0x30) >> 4);
83}
84
85static int arm_spe_get_payload(const unsigned char *buf, size_t len,
86 struct arm_spe_pkt *packet)
87{
88 size_t payload_len = payloadlen(buf[0]);
89
90 if (len < 1 + payload_len)
91 return ARM_SPE_NEED_MORE_BYTES;
92
93 buf++;
94
95 switch (payload_len) {
96 case 1: packet->payload = *(uint8_t *)buf; break;
97 case 2: packet->payload = le16_to_cpu(*(uint16_t *)buf); break;
98 case 4: packet->payload = le32_to_cpu(*(uint32_t *)buf); break;
99 case 8: packet->payload = le64_to_cpu(*(uint64_t *)buf); break;
100 default: return ARM_SPE_BAD_PACKET;
101 }
102
103 return 1 + payload_len;
104}
105
106static int arm_spe_get_pad(struct arm_spe_pkt *packet)
107{
108 packet->type = ARM_SPE_PAD;
109 return 1;
110}
111
112static int arm_spe_get_alignment(const unsigned char *buf, size_t len,
113 struct arm_spe_pkt *packet)
114{
115 unsigned int alignment = 1 << ((buf[0] & 0xf) + 1);
116
117 if (len < alignment)
118 return ARM_SPE_NEED_MORE_BYTES;
119
120 packet->type = ARM_SPE_PAD;
121 return alignment - (((uintptr_t)buf) & (alignment - 1));
122}
123
124static int arm_spe_get_end(struct arm_spe_pkt *packet)
125{
126 packet->type = ARM_SPE_END;
127 return 1;
128}
129
130static int arm_spe_get_timestamp(const unsigned char *buf, size_t len,
131 struct arm_spe_pkt *packet)
132{
133 packet->type = ARM_SPE_TIMESTAMP;
134 return arm_spe_get_payload(buf, len, packet);
135}
136
137static int arm_spe_get_events(const unsigned char *buf, size_t len,
138 struct arm_spe_pkt *packet)
139{
140 int ret = arm_spe_get_payload(buf, len, packet);
141
142 packet->type = ARM_SPE_EVENTS;
143
144 /* we use index to identify Events with a less number of
145 * comparisons in arm_spe_pkt_desc(): E.g., the LLC-ACCESS,
146 * LLC-REFILL, and REMOTE-ACCESS events are identified iff
147 * index > 1.
148 */
149 packet->index = ret - 1;
150
151 return ret;
152}
153
154static int arm_spe_get_data_source(const unsigned char *buf, size_t len,
155 struct arm_spe_pkt *packet)
156{
157 packet->type = ARM_SPE_DATA_SOURCE;
158 return arm_spe_get_payload(buf, len, packet);
159}
160
161static int arm_spe_get_context(const unsigned char *buf, size_t len,
162 struct arm_spe_pkt *packet)
163{
164 packet->type = ARM_SPE_CONTEXT;
165 packet->index = buf[0] & 0x3;
166
167 return arm_spe_get_payload(buf, len, packet);
168}
169
170static int arm_spe_get_op_type(const unsigned char *buf, size_t len,
171 struct arm_spe_pkt *packet)
172{
173 packet->type = ARM_SPE_OP_TYPE;
174 packet->index = buf[0] & 0x3;
175 return arm_spe_get_payload(buf, len, packet);
176}
177
178static int arm_spe_get_counter(const unsigned char *buf, size_t len,
179 const unsigned char ext_hdr, struct arm_spe_pkt *packet)
180{
181 if (len < 2)
182 return ARM_SPE_NEED_MORE_BYTES;
183
184 packet->type = ARM_SPE_COUNTER;
185 if (ext_hdr)
186 packet->index = ((buf[0] & 0x3) << 3) | (buf[1] & 0x7);
187 else
188 packet->index = buf[0] & 0x7;
189
190 packet->payload = le16_to_cpu(*(uint16_t *)(buf + 1));
191
192 return 1 + ext_hdr + 2;
193}
194
195static int arm_spe_get_addr(const unsigned char *buf, size_t len,
196 const unsigned char ext_hdr, struct arm_spe_pkt *packet)
197{
198 if (len < 8)
199 return ARM_SPE_NEED_MORE_BYTES;
200
201 packet->type = ARM_SPE_ADDRESS;
202 if (ext_hdr)
203 packet->index = ((buf[0] & 0x3) << 3) | (buf[1] & 0x7);
204 else
205 packet->index = buf[0] & 0x7;
206
207 memcpy_le64(&packet->payload, buf + 1, 8);
208
209 return 1 + ext_hdr + 8;
210}
211
212static int arm_spe_do_get_packet(const unsigned char *buf, size_t len,
213 struct arm_spe_pkt *packet)
214{
215 unsigned int byte;
216
217 memset(packet, 0, sizeof(struct arm_spe_pkt));
218
219 if (!len)
220 return ARM_SPE_NEED_MORE_BYTES;
221
222 byte = buf[0];
223 if (byte == SPE_HEADER0_PAD)
224 return arm_spe_get_pad(packet);
225 else if (byte == SPE_HEADER0_END) /* no timestamp at end of record */
226 return arm_spe_get_end(packet);
227 else if (byte & 0xc0 /* 0y11xxxxxx */) {
228 if (byte & 0x80) {
229 if ((byte & SPE_HEADER0_ADDRESS_MASK) == SPE_HEADER0_ADDRESS)
230 return arm_spe_get_addr(buf, len, 0, packet);
231 if ((byte & SPE_HEADER0_COUNTER_MASK) == SPE_HEADER0_COUNTER)
232 return arm_spe_get_counter(buf, len, 0, packet);
233 } else
234 if (byte == SPE_HEADER0_TIMESTAMP)
235 return arm_spe_get_timestamp(buf, len, packet);
236 else if ((byte & SPE_HEADER0_EVENTS_MASK) == SPE_HEADER0_EVENTS)
237 return arm_spe_get_events(buf, len, packet);
238 else if ((byte & SPE_HEADER0_SOURCE_MASK) == SPE_HEADER0_SOURCE)
239 return arm_spe_get_data_source(buf, len, packet);
240 else if ((byte & SPE_HEADER0_CONTEXT_MASK) == SPE_HEADER0_CONTEXT)
241 return arm_spe_get_context(buf, len, packet);
242 else if ((byte & SPE_HEADER0_OP_TYPE_MASK) == SPE_HEADER0_OP_TYPE)
243 return arm_spe_get_op_type(buf, len, packet);
244 } else if ((byte & 0xe0) == 0x20 /* 0y001xxxxx */) {
245 /* 16-bit header */
246 byte = buf[1];
247 if (byte == SPE_HEADER1_ALIGNMENT)
248 return arm_spe_get_alignment(buf, len, packet);
249 else if ((byte & SPE_HEADER1_ADDRESS_MASK) == SPE_HEADER1_ADDRESS)
250 return arm_spe_get_addr(buf, len, 1, packet);
251 else if ((byte & SPE_HEADER1_COUNTER_MASK) == SPE_HEADER1_COUNTER)
252 return arm_spe_get_counter(buf, len, 1, packet);
253 }
254
255 return ARM_SPE_BAD_PACKET;
256}
257
258int arm_spe_get_packet(const unsigned char *buf, size_t len,
259 struct arm_spe_pkt *packet)
260{
261 int ret;
262
263 ret = arm_spe_do_get_packet(buf, len, packet);
264 /* put multiple consecutive PADs on the same line, up to
265 * the fixed-width output format of 16 bytes per line.
266 */
267 if (ret > 0 && packet->type == ARM_SPE_PAD) {
268 while (ret < 16 && len > (size_t)ret && !buf[ret])
269 ret += 1;
270 }
271 return ret;
272}
273
274int arm_spe_pkt_desc(const struct arm_spe_pkt *packet, char *buf,
275 size_t buf_len)
276{
277 int ret, ns, el, idx = packet->index;
278 unsigned long long payload = packet->payload;
279 const char *name = arm_spe_pkt_name(packet->type);
280
281 switch (packet->type) {
282 case ARM_SPE_BAD:
283 case ARM_SPE_PAD:
284 case ARM_SPE_END:
285 return snprintf(buf, buf_len, "%s", name);
286 case ARM_SPE_EVENTS: {
287 size_t blen = buf_len;
288
289 ret = 0;
290 ret = snprintf(buf, buf_len, "EV");
291 buf += ret;
292 blen -= ret;
293 if (payload & 0x1) {
294 ret = snprintf(buf, buf_len, " EXCEPTION-GEN");
295 buf += ret;
296 blen -= ret;
297 }
298 if (payload & 0x2) {
299 ret = snprintf(buf, buf_len, " RETIRED");
300 buf += ret;
301 blen -= ret;
302 }
303 if (payload & 0x4) {
304 ret = snprintf(buf, buf_len, " L1D-ACCESS");
305 buf += ret;
306 blen -= ret;
307 }
308 if (payload & 0x8) {
309 ret = snprintf(buf, buf_len, " L1D-REFILL");
310 buf += ret;
311 blen -= ret;
312 }
313 if (payload & 0x10) {
314 ret = snprintf(buf, buf_len, " TLB-ACCESS");
315 buf += ret;
316 blen -= ret;
317 }
318 if (payload & 0x20) {
319 ret = snprintf(buf, buf_len, " TLB-REFILL");
320 buf += ret;
321 blen -= ret;
322 }
323 if (payload & 0x40) {
324 ret = snprintf(buf, buf_len, " NOT-TAKEN");
325 buf += ret;
326 blen -= ret;
327 }
328 if (payload & 0x80) {
329 ret = snprintf(buf, buf_len, " MISPRED");
330 buf += ret;
331 blen -= ret;
332 }
333 if (idx > 1) {
334 if (payload & 0x100) {
335 ret = snprintf(buf, buf_len, " LLC-ACCESS");
336 buf += ret;
337 blen -= ret;
338 }
339 if (payload & 0x200) {
340 ret = snprintf(buf, buf_len, " LLC-REFILL");
341 buf += ret;
342 blen -= ret;
343 }
344 if (payload & 0x400) {
345 ret = snprintf(buf, buf_len, " REMOTE-ACCESS");
346 buf += ret;
347 blen -= ret;
348 }
349 }
350 if (ret < 0)
351 return ret;
352 blen -= ret;
353 return buf_len - blen;
354 }
355 case ARM_SPE_OP_TYPE:
356 switch (idx) {
357 case 0: return snprintf(buf, buf_len, "%s", payload & 0x1 ?
358 "COND-SELECT" : "INSN-OTHER");
359 case 1: {
360 size_t blen = buf_len;
361
362 if (payload & 0x1)
363 ret = snprintf(buf, buf_len, "ST");
364 else
365 ret = snprintf(buf, buf_len, "LD");
366 buf += ret;
367 blen -= ret;
368 if (payload & 0x2) {
369 if (payload & 0x4) {
370 ret = snprintf(buf, buf_len, " AT");
371 buf += ret;
372 blen -= ret;
373 }
374 if (payload & 0x8) {
375 ret = snprintf(buf, buf_len, " EXCL");
376 buf += ret;
377 blen -= ret;
378 }
379 if (payload & 0x10) {
380 ret = snprintf(buf, buf_len, " AR");
381 buf += ret;
382 blen -= ret;
383 }
384 } else if (payload & 0x4) {
385 ret = snprintf(buf, buf_len, " SIMD-FP");
386 buf += ret;
387 blen -= ret;
388 }
389 if (ret < 0)
390 return ret;
391 blen -= ret;
392 return buf_len - blen;
393 }
394 case 2: {
395 size_t blen = buf_len;
396
397 ret = snprintf(buf, buf_len, "B");
398 buf += ret;
399 blen -= ret;
400 if (payload & 0x1) {
401 ret = snprintf(buf, buf_len, " COND");
402 buf += ret;
403 blen -= ret;
404 }
405 if (payload & 0x2) {
406 ret = snprintf(buf, buf_len, " IND");
407 buf += ret;
408 blen -= ret;
409 }
410 if (ret < 0)
411 return ret;
412 blen -= ret;
413 return buf_len - blen;
414 }
415 default: return 0;
416 }
417 case ARM_SPE_DATA_SOURCE:
418 case ARM_SPE_TIMESTAMP:
419 return snprintf(buf, buf_len, "%s %lld", name, payload);
420 case ARM_SPE_ADDRESS:
421 switch (idx) {
422 case 0:
423 case 1: ns = !!(packet->payload & NS_FLAG);
424 el = (packet->payload & EL_FLAG) >> 61;
425 payload &= ~(0xffULL << 56);
426 return snprintf(buf, buf_len, "%s 0x%llx el%d ns=%d",
427 (idx == 1) ? "TGT" : "PC", payload, el, ns);
428 case 2: return snprintf(buf, buf_len, "VA 0x%llx", payload);
429 case 3: ns = !!(packet->payload & NS_FLAG);
430 payload &= ~(0xffULL << 56);
431 return snprintf(buf, buf_len, "PA 0x%llx ns=%d",
432 payload, ns);
433 default: return 0;
434 }
435 case ARM_SPE_CONTEXT:
436 return snprintf(buf, buf_len, "%s 0x%lx el%d", name,
437 (unsigned long)payload, idx + 1);
438 case ARM_SPE_COUNTER: {
439 size_t blen = buf_len;
440
441 ret = snprintf(buf, buf_len, "%s %d ", name,
442 (unsigned short)payload);
443 buf += ret;
444 blen -= ret;
445 switch (idx) {
446 case 0: ret = snprintf(buf, buf_len, "TOT"); break;
447 case 1: ret = snprintf(buf, buf_len, "ISSUE"); break;
448 case 2: ret = snprintf(buf, buf_len, "XLAT"); break;
449 default: ret = 0;
450 }
451 if (ret < 0)
452 return ret;
453 blen -= ret;
454 return buf_len - blen;
455 }
456 default:
457 break;
458 }
459
460 return snprintf(buf, buf_len, "%s 0x%llx (%d)",
461 name, payload, packet->index);
462}
diff --git a/tools/perf/util/arm-spe-pkt-decoder.h b/tools/perf/util/arm-spe-pkt-decoder.h
new file mode 100644
index 000000000000..d786ef65113f
--- /dev/null
+++ b/tools/perf/util/arm-spe-pkt-decoder.h
@@ -0,0 +1,43 @@
1/* SPDX-License-Identifier: GPL-2.0 */
2/*
3 * Arm Statistical Profiling Extensions (SPE) support
4 * Copyright (c) 2017-2018, Arm Ltd.
5 */
6
7#ifndef INCLUDE__ARM_SPE_PKT_DECODER_H__
8#define INCLUDE__ARM_SPE_PKT_DECODER_H__
9
10#include <stddef.h>
11#include <stdint.h>
12
13#define ARM_SPE_PKT_DESC_MAX 256
14
15#define ARM_SPE_NEED_MORE_BYTES -1
16#define ARM_SPE_BAD_PACKET -2
17
18enum arm_spe_pkt_type {
19 ARM_SPE_BAD,
20 ARM_SPE_PAD,
21 ARM_SPE_END,
22 ARM_SPE_TIMESTAMP,
23 ARM_SPE_ADDRESS,
24 ARM_SPE_COUNTER,
25 ARM_SPE_CONTEXT,
26 ARM_SPE_OP_TYPE,
27 ARM_SPE_EVENTS,
28 ARM_SPE_DATA_SOURCE,
29};
30
31struct arm_spe_pkt {
32 enum arm_spe_pkt_type type;
33 unsigned char index;
34 uint64_t payload;
35};
36
37const char *arm_spe_pkt_name(enum arm_spe_pkt_type);
38
39int arm_spe_get_packet(const unsigned char *buf, size_t len,
40 struct arm_spe_pkt *packet);
41
42int arm_spe_pkt_desc(const struct arm_spe_pkt *packet, char *buf, size_t len);
43#endif
diff --git a/tools/perf/util/arm-spe.c b/tools/perf/util/arm-spe.c
new file mode 100644
index 000000000000..6067267cc76c
--- /dev/null
+++ b/tools/perf/util/arm-spe.c
@@ -0,0 +1,231 @@
1// SPDX-License-Identifier: GPL-2.0
2/*
3 * Arm Statistical Profiling Extensions (SPE) support
4 * Copyright (c) 2017-2018, Arm Ltd.
5 */
6
7#include <endian.h>
8#include <errno.h>
9#include <byteswap.h>
10#include <inttypes.h>
11#include <linux/kernel.h>
12#include <linux/types.h>
13#include <linux/bitops.h>
14#include <linux/log2.h>
15
16#include "cpumap.h"
17#include "color.h"
18#include "evsel.h"
19#include "evlist.h"
20#include "machine.h"
21#include "session.h"
22#include "util.h"
23#include "thread.h"
24#include "debug.h"
25#include "auxtrace.h"
26#include "arm-spe.h"
27#include "arm-spe-pkt-decoder.h"
28
29struct arm_spe {
30 struct auxtrace auxtrace;
31 struct auxtrace_queues queues;
32 struct auxtrace_heap heap;
33 u32 auxtrace_type;
34 struct perf_session *session;
35 struct machine *machine;
36 u32 pmu_type;
37};
38
39struct arm_spe_queue {
40 struct arm_spe *spe;
41 unsigned int queue_nr;
42 struct auxtrace_buffer *buffer;
43 bool on_heap;
44 bool done;
45 pid_t pid;
46 pid_t tid;
47 int cpu;
48};
49
50static void arm_spe_dump(struct arm_spe *spe __maybe_unused,
51 unsigned char *buf, size_t len)
52{
53 struct arm_spe_pkt packet;
54 size_t pos = 0;
55 int ret, pkt_len, i;
56 char desc[ARM_SPE_PKT_DESC_MAX];
57 const char *color = PERF_COLOR_BLUE;
58
59 color_fprintf(stdout, color,
60 ". ... ARM SPE data: size %zu bytes\n",
61 len);
62
63 while (len) {
64 ret = arm_spe_get_packet(buf, len, &packet);
65 if (ret > 0)
66 pkt_len = ret;
67 else
68 pkt_len = 1;
69 printf(".");
70 color_fprintf(stdout, color, " %08x: ", pos);
71 for (i = 0; i < pkt_len; i++)
72 color_fprintf(stdout, color, " %02x", buf[i]);
73 for (; i < 16; i++)
74 color_fprintf(stdout, color, " ");
75 if (ret > 0) {
76 ret = arm_spe_pkt_desc(&packet, desc,
77 ARM_SPE_PKT_DESC_MAX);
78 if (ret > 0)
79 color_fprintf(stdout, color, " %s\n", desc);
80 } else {
81 color_fprintf(stdout, color, " Bad packet!\n");
82 }
83 pos += pkt_len;
84 buf += pkt_len;
85 len -= pkt_len;
86 }
87}
88
89static void arm_spe_dump_event(struct arm_spe *spe, unsigned char *buf,
90 size_t len)
91{
92 printf(".\n");
93 arm_spe_dump(spe, buf, len);
94}
95
96static int arm_spe_process_event(struct perf_session *session __maybe_unused,
97 union perf_event *event __maybe_unused,
98 struct perf_sample *sample __maybe_unused,
99 struct perf_tool *tool __maybe_unused)
100{
101 return 0;
102}
103
104static int arm_spe_process_auxtrace_event(struct perf_session *session,
105 union perf_event *event,
106 struct perf_tool *tool __maybe_unused)
107{
108 struct arm_spe *spe = container_of(session->auxtrace, struct arm_spe,
109 auxtrace);
110 struct auxtrace_buffer *buffer;
111 off_t data_offset;
112 int fd = perf_data__fd(session->data);
113 int err;
114
115 if (perf_data__is_pipe(session->data)) {
116 data_offset = 0;
117 } else {
118 data_offset = lseek(fd, 0, SEEK_CUR);
119 if (data_offset == -1)
120 return -errno;
121 }
122
123 err = auxtrace_queues__add_event(&spe->queues, session, event,
124 data_offset, &buffer);
125 if (err)
126 return err;
127
128 /* Dump here now we have copied a piped trace out of the pipe */
129 if (dump_trace) {
130 if (auxtrace_buffer__get_data(buffer, fd)) {
131 arm_spe_dump_event(spe, buffer->data,
132 buffer->size);
133 auxtrace_buffer__put_data(buffer);
134 }
135 }
136
137 return 0;
138}
139
140static int arm_spe_flush(struct perf_session *session __maybe_unused,
141 struct perf_tool *tool __maybe_unused)
142{
143 return 0;
144}
145
146static void arm_spe_free_queue(void *priv)
147{
148 struct arm_spe_queue *speq = priv;
149
150 if (!speq)
151 return;
152 free(speq);
153}
154
155static void arm_spe_free_events(struct perf_session *session)
156{
157 struct arm_spe *spe = container_of(session->auxtrace, struct arm_spe,
158 auxtrace);
159 struct auxtrace_queues *queues = &spe->queues;
160 unsigned int i;
161
162 for (i = 0; i < queues->nr_queues; i++) {
163 arm_spe_free_queue(queues->queue_array[i].priv);
164 queues->queue_array[i].priv = NULL;
165 }
166 auxtrace_queues__free(queues);
167}
168
169static void arm_spe_free(struct perf_session *session)
170{
171 struct arm_spe *spe = container_of(session->auxtrace, struct arm_spe,
172 auxtrace);
173
174 auxtrace_heap__free(&spe->heap);
175 arm_spe_free_events(session);
176 session->auxtrace = NULL;
177 free(spe);
178}
179
180static const char * const arm_spe_info_fmts[] = {
181 [ARM_SPE_PMU_TYPE] = " PMU Type %"PRId64"\n",
182};
183
184static void arm_spe_print_info(u64 *arr)
185{
186 if (!dump_trace)
187 return;
188
189 fprintf(stdout, arm_spe_info_fmts[ARM_SPE_PMU_TYPE], arr[ARM_SPE_PMU_TYPE]);
190}
191
192int arm_spe_process_auxtrace_info(union perf_event *event,
193 struct perf_session *session)
194{
195 struct auxtrace_info_event *auxtrace_info = &event->auxtrace_info;
196 size_t min_sz = sizeof(u64) * ARM_SPE_PMU_TYPE;
197 struct arm_spe *spe;
198 int err;
199
200 if (auxtrace_info->header.size < sizeof(struct auxtrace_info_event) +
201 min_sz)
202 return -EINVAL;
203
204 spe = zalloc(sizeof(struct arm_spe));
205 if (!spe)
206 return -ENOMEM;
207
208 err = auxtrace_queues__init(&spe->queues);
209 if (err)
210 goto err_free;
211
212 spe->session = session;
213 spe->machine = &session->machines.host; /* No kvm support */
214 spe->auxtrace_type = auxtrace_info->type;
215 spe->pmu_type = auxtrace_info->priv[ARM_SPE_PMU_TYPE];
216
217 spe->auxtrace.process_event = arm_spe_process_event;
218 spe->auxtrace.process_auxtrace_event = arm_spe_process_auxtrace_event;
219 spe->auxtrace.flush_events = arm_spe_flush;
220 spe->auxtrace.free_events = arm_spe_free_events;
221 spe->auxtrace.free = arm_spe_free;
222 session->auxtrace = &spe->auxtrace;
223
224 arm_spe_print_info(&auxtrace_info->priv[0]);
225
226 return 0;
227
228err_free:
229 free(spe);
230 return err;
231}
diff --git a/tools/perf/util/arm-spe.h b/tools/perf/util/arm-spe.h
new file mode 100644
index 000000000000..98d3235781c3
--- /dev/null
+++ b/tools/perf/util/arm-spe.h
@@ -0,0 +1,31 @@
1/* SPDX-License-Identifier: GPL-2.0 */
2/*
3 * Arm Statistical Profiling Extensions (SPE) support
4 * Copyright (c) 2017-2018, Arm Ltd.
5 */
6
7#ifndef INCLUDE__PERF_ARM_SPE_H__
8#define INCLUDE__PERF_ARM_SPE_H__
9
10#define ARM_SPE_PMU_NAME "arm_spe_"
11
12enum {
13 ARM_SPE_PMU_TYPE,
14 ARM_SPE_PER_CPU_MMAPS,
15 ARM_SPE_AUXTRACE_PRIV_MAX,
16};
17
18#define ARM_SPE_AUXTRACE_PRIV_SIZE (ARM_SPE_AUXTRACE_PRIV_MAX * sizeof(u64))
19
20union perf_event;
21struct perf_session;
22struct perf_pmu;
23
24struct auxtrace_record *arm_spe_recording_init(int *err,
25 struct perf_pmu *arm_spe_pmu);
26
27int arm_spe_process_auxtrace_info(union perf_event *event,
28 struct perf_session *session);
29
30struct perf_event_attr *arm_spe_pmu_default_config(struct perf_pmu *arm_spe_pmu);
31#endif
diff --git a/tools/perf/util/auxtrace.c b/tools/perf/util/auxtrace.c
index 5547457566a7..9faf3b5367db 100644
--- a/tools/perf/util/auxtrace.c
+++ b/tools/perf/util/auxtrace.c
@@ -31,9 +31,6 @@
31#include <sys/param.h> 31#include <sys/param.h>
32#include <stdlib.h> 32#include <stdlib.h>
33#include <stdio.h> 33#include <stdio.h>
34#include <string.h>
35#include <limits.h>
36#include <errno.h>
37#include <linux/list.h> 34#include <linux/list.h>
38 35
39#include "../perf.h" 36#include "../perf.h"
@@ -55,8 +52,10 @@
55#include "debug.h" 52#include "debug.h"
56#include <subcmd/parse-options.h> 53#include <subcmd/parse-options.h>
57 54
55#include "cs-etm.h"
58#include "intel-pt.h" 56#include "intel-pt.h"
59#include "intel-bts.h" 57#include "intel-bts.h"
58#include "arm-spe.h"
60 59
61#include "sane_ctype.h" 60#include "sane_ctype.h"
62#include "symbol/kallsyms.h" 61#include "symbol/kallsyms.h"
@@ -208,7 +207,7 @@ static int auxtrace_queues__grow(struct auxtrace_queues *queues,
208 207
209static void *auxtrace_copy_data(u64 size, struct perf_session *session) 208static void *auxtrace_copy_data(u64 size, struct perf_session *session)
210{ 209{
211 int fd = perf_data_file__fd(session->file); 210 int fd = perf_data__fd(session->data);
212 void *p; 211 void *p;
213 ssize_t ret; 212 ssize_t ret;
214 213
@@ -305,7 +304,7 @@ static int auxtrace_queues__add_event_buffer(struct auxtrace_queues *queues,
305 if (session->one_mmap) { 304 if (session->one_mmap) {
306 buffer->data = buffer->data_offset - session->one_mmap_offset + 305 buffer->data = buffer->data_offset - session->one_mmap_offset +
307 session->one_mmap_addr; 306 session->one_mmap_addr;
308 } else if (perf_data_file__is_pipe(session->file)) { 307 } else if (perf_data__is_pipe(session->data)) {
309 buffer->data = auxtrace_copy_data(buffer->size, session); 308 buffer->data = auxtrace_copy_data(buffer->size, session);
310 if (!buffer->data) 309 if (!buffer->data)
311 return -ENOMEM; 310 return -ENOMEM;
@@ -913,7 +912,10 @@ int perf_event__process_auxtrace_info(struct perf_tool *tool __maybe_unused,
913 return intel_pt_process_auxtrace_info(event, session); 912 return intel_pt_process_auxtrace_info(event, session);
914 case PERF_AUXTRACE_INTEL_BTS: 913 case PERF_AUXTRACE_INTEL_BTS:
915 return intel_bts_process_auxtrace_info(event, session); 914 return intel_bts_process_auxtrace_info(event, session);
915 case PERF_AUXTRACE_ARM_SPE:
916 return arm_spe_process_auxtrace_info(event, session);
916 case PERF_AUXTRACE_CS_ETM: 917 case PERF_AUXTRACE_CS_ETM:
918 return cs_etm__process_auxtrace_info(event, session);
917 case PERF_AUXTRACE_UNKNOWN: 919 case PERF_AUXTRACE_UNKNOWN:
918 default: 920 default:
919 return -EINVAL; 921 return -EINVAL;
diff --git a/tools/perf/util/auxtrace.h b/tools/perf/util/auxtrace.h
index 33b5e6cdf38c..453c148d2158 100644
--- a/tools/perf/util/auxtrace.h
+++ b/tools/perf/util/auxtrace.h
@@ -43,6 +43,7 @@ enum auxtrace_type {
43 PERF_AUXTRACE_INTEL_PT, 43 PERF_AUXTRACE_INTEL_PT,
44 PERF_AUXTRACE_INTEL_BTS, 44 PERF_AUXTRACE_INTEL_BTS,
45 PERF_AUXTRACE_CS_ETM, 45 PERF_AUXTRACE_CS_ETM,
46 PERF_AUXTRACE_ARM_SPE,
46}; 47};
47 48
48enum itrace_period_type { 49enum itrace_period_type {
@@ -378,7 +379,7 @@ struct addr_filters {
378static inline u64 auxtrace_mmap__read_snapshot_head(struct auxtrace_mmap *mm) 379static inline u64 auxtrace_mmap__read_snapshot_head(struct auxtrace_mmap *mm)
379{ 380{
380 struct perf_event_mmap_page *pc = mm->userpg; 381 struct perf_event_mmap_page *pc = mm->userpg;
381 u64 head = ACCESS_ONCE(pc->aux_head); 382 u64 head = READ_ONCE(pc->aux_head);
382 383
383 /* Ensure all reads are done after we read the head */ 384 /* Ensure all reads are done after we read the head */
384 rmb(); 385 rmb();
@@ -389,7 +390,7 @@ static inline u64 auxtrace_mmap__read_head(struct auxtrace_mmap *mm)
389{ 390{
390 struct perf_event_mmap_page *pc = mm->userpg; 391 struct perf_event_mmap_page *pc = mm->userpg;
391#if BITS_PER_LONG == 64 || !defined(HAVE_SYNC_COMPARE_AND_SWAP_SUPPORT) 392#if BITS_PER_LONG == 64 || !defined(HAVE_SYNC_COMPARE_AND_SWAP_SUPPORT)
392 u64 head = ACCESS_ONCE(pc->aux_head); 393 u64 head = READ_ONCE(pc->aux_head);
393#else 394#else
394 u64 head = __sync_val_compare_and_swap(&pc->aux_head, 0, 0); 395 u64 head = __sync_val_compare_and_swap(&pc->aux_head, 0, 0);
395#endif 396#endif
diff --git a/tools/perf/util/bpf-loader.c b/tools/perf/util/bpf-loader.c
index 72c107fcbc5a..af7ad814b2c3 100644
--- a/tools/perf/util/bpf-loader.c
+++ b/tools/perf/util/bpf-loader.c
@@ -94,7 +94,7 @@ struct bpf_object *bpf__prepare_load(const char *filename, bool source)
94 err = perf_clang__compile_bpf(filename, &obj_buf, &obj_buf_sz); 94 err = perf_clang__compile_bpf(filename, &obj_buf, &obj_buf_sz);
95 perf_clang__cleanup(); 95 perf_clang__cleanup();
96 if (err) { 96 if (err) {
97 pr_warning("bpf: builtin compilation failed: %d, try external compiler\n", err); 97 pr_debug("bpf: builtin compilation failed: %d, try external compiler\n", err);
98 err = llvm__compile_bpf(filename, &obj_buf, &obj_buf_sz); 98 err = llvm__compile_bpf(filename, &obj_buf, &obj_buf_sz);
99 if (err) 99 if (err)
100 return ERR_PTR(-BPF_LOADER_ERRNO__COMPILE); 100 return ERR_PTR(-BPF_LOADER_ERRNO__COMPILE);
@@ -1533,7 +1533,7 @@ int bpf__apply_obj_config(void)
1533 (strcmp("__bpf_stdout__", \ 1533 (strcmp("__bpf_stdout__", \
1534 bpf_map__name(pos)) == 0)) 1534 bpf_map__name(pos)) == 0))
1535 1535
1536int bpf__setup_stdout(struct perf_evlist *evlist __maybe_unused) 1536int bpf__setup_stdout(struct perf_evlist *evlist)
1537{ 1537{
1538 struct bpf_map_priv *tmpl_priv = NULL; 1538 struct bpf_map_priv *tmpl_priv = NULL;
1539 struct bpf_object *obj, *tmp; 1539 struct bpf_object *obj, *tmp;
diff --git a/tools/perf/util/callchain.c b/tools/perf/util/callchain.c
index 6031933d811c..32ef7bdca1cf 100644
--- a/tools/perf/util/callchain.c
+++ b/tools/perf/util/callchain.c
@@ -37,6 +37,15 @@ struct callchain_param callchain_param = {
37 CALLCHAIN_PARAM_DEFAULT 37 CALLCHAIN_PARAM_DEFAULT
38}; 38};
39 39
40/*
41 * Are there any events usind DWARF callchains?
42 *
43 * I.e.
44 *
45 * -e cycles/call-graph=dwarf/
46 */
47bool dwarf_callchain_users;
48
40struct callchain_param callchain_param_default = { 49struct callchain_param callchain_param_default = {
41 CALLCHAIN_PARAM_DEFAULT 50 CALLCHAIN_PARAM_DEFAULT
42}; 51};
@@ -265,6 +274,7 @@ int parse_callchain_record(const char *arg, struct callchain_param *param)
265 ret = 0; 274 ret = 0;
266 param->record_mode = CALLCHAIN_DWARF; 275 param->record_mode = CALLCHAIN_DWARF;
267 param->dump_size = default_stack_dump_size; 276 param->dump_size = default_stack_dump_size;
277 dwarf_callchain_users = true;
268 278
269 tok = strtok_r(NULL, ",", &saveptr); 279 tok = strtok_r(NULL, ",", &saveptr);
270 if (tok) { 280 if (tok) {
@@ -567,6 +577,7 @@ fill_node(struct callchain_node *node, struct callchain_cursor *cursor)
567 call->ip = cursor_node->ip; 577 call->ip = cursor_node->ip;
568 call->ms.sym = cursor_node->sym; 578 call->ms.sym = cursor_node->sym;
569 call->ms.map = map__get(cursor_node->map); 579 call->ms.map = map__get(cursor_node->map);
580 call->srcline = cursor_node->srcline;
570 581
571 if (cursor_node->branch) { 582 if (cursor_node->branch) {
572 call->branch_count = 1; 583 call->branch_count = 1;
@@ -645,103 +656,120 @@ enum match_result {
645 MATCH_GT, 656 MATCH_GT,
646}; 657};
647 658
648static enum match_result match_chain_srcline(struct callchain_cursor_node *node, 659static enum match_result match_chain_strings(const char *left,
649 struct callchain_list *cnode) 660 const char *right)
650{ 661{
651 char *left = NULL;
652 char *right = NULL;
653 enum match_result ret = MATCH_EQ; 662 enum match_result ret = MATCH_EQ;
654 int cmp; 663 int cmp;
655 664
656 if (cnode->ms.map)
657 left = get_srcline(cnode->ms.map->dso,
658 map__rip_2objdump(cnode->ms.map, cnode->ip),
659 cnode->ms.sym, true, false);
660 if (node->map)
661 right = get_srcline(node->map->dso,
662 map__rip_2objdump(node->map, node->ip),
663 node->sym, true, false);
664
665 if (left && right) 665 if (left && right)
666 cmp = strcmp(left, right); 666 cmp = strcmp(left, right);
667 else if (!left && right) 667 else if (!left && right)
668 cmp = 1; 668 cmp = 1;
669 else if (left && !right) 669 else if (left && !right)
670 cmp = -1; 670 cmp = -1;
671 else if (cnode->ip == node->ip)
672 cmp = 0;
673 else 671 else
674 cmp = (cnode->ip < node->ip) ? -1 : 1; 672 return MATCH_ERROR;
675 673
676 if (cmp != 0) 674 if (cmp != 0)
677 ret = cmp < 0 ? MATCH_LT : MATCH_GT; 675 ret = cmp < 0 ? MATCH_LT : MATCH_GT;
678 676
679 free_srcline(left);
680 free_srcline(right);
681 return ret; 677 return ret;
682} 678}
683 679
680/*
681 * We need to always use relative addresses because we're aggregating
682 * callchains from multiple threads, i.e. different address spaces, so
683 * comparing absolute addresses make no sense as a symbol in a DSO may end up
684 * in a different address when used in a different binary or even the same
685 * binary but with some sort of address randomization technique, thus we need
686 * to compare just relative addresses. -acme
687 */
688static enum match_result match_chain_dso_addresses(struct map *left_map, u64 left_ip,
689 struct map *right_map, u64 right_ip)
690{
691 struct dso *left_dso = left_map ? left_map->dso : NULL;
692 struct dso *right_dso = right_map ? right_map->dso : NULL;
693
694 if (left_dso != right_dso)
695 return left_dso < right_dso ? MATCH_LT : MATCH_GT;
696
697 if (left_ip != right_ip)
698 return left_ip < right_ip ? MATCH_LT : MATCH_GT;
699
700 return MATCH_EQ;
701}
702
684static enum match_result match_chain(struct callchain_cursor_node *node, 703static enum match_result match_chain(struct callchain_cursor_node *node,
685 struct callchain_list *cnode) 704 struct callchain_list *cnode)
686{ 705{
687 struct symbol *sym = node->sym; 706 enum match_result match = MATCH_ERROR;
688 u64 left, right;
689 struct dso *left_dso = NULL;
690 struct dso *right_dso = NULL;
691
692 if (callchain_param.key == CCKEY_SRCLINE) {
693 enum match_result match = match_chain_srcline(node, cnode);
694 707
708 switch (callchain_param.key) {
709 case CCKEY_SRCLINE:
710 match = match_chain_strings(cnode->srcline, node->srcline);
695 if (match != MATCH_ERROR) 711 if (match != MATCH_ERROR)
696 return match; 712 break;
697 } 713 /* otherwise fall-back to symbol-based comparison below */
698 714 __fallthrough;
699 if (cnode->ms.sym && sym && callchain_param.key == CCKEY_FUNCTION) { 715 case CCKEY_FUNCTION:
700 left = cnode->ms.sym->start; 716 if (node->sym && cnode->ms.sym) {
701 right = sym->start; 717 /*
702 left_dso = cnode->ms.map->dso; 718 * Compare inlined frames based on their symbol name
703 right_dso = node->map->dso; 719 * because different inlined frames will have the same
704 } else { 720 * symbol start. Otherwise do a faster comparison based
705 left = cnode->ip; 721 * on the symbol start address.
706 right = node->ip; 722 */
723 if (cnode->ms.sym->inlined || node->sym->inlined) {
724 match = match_chain_strings(cnode->ms.sym->name,
725 node->sym->name);
726 if (match != MATCH_ERROR)
727 break;
728 } else {
729 match = match_chain_dso_addresses(cnode->ms.map, cnode->ms.sym->start,
730 node->map, node->sym->start);
731 break;
732 }
733 }
734 /* otherwise fall-back to IP-based comparison below */
735 __fallthrough;
736 case CCKEY_ADDRESS:
737 default:
738 match = match_chain_dso_addresses(cnode->ms.map, cnode->ip, node->map, node->ip);
739 break;
707 } 740 }
708 741
709 if (left == right && left_dso == right_dso) { 742 if (match == MATCH_EQ && node->branch) {
710 if (node->branch) { 743 cnode->branch_count++;
711 cnode->branch_count++;
712 744
713 if (node->branch_from) { 745 if (node->branch_from) {
714 /* 746 /*
715 * It's "to" of a branch 747 * It's "to" of a branch
716 */ 748 */
717 cnode->brtype_stat.branch_to = true; 749 cnode->brtype_stat.branch_to = true;
718 750
719 if (node->branch_flags.predicted) 751 if (node->branch_flags.predicted)
720 cnode->predicted_count++; 752 cnode->predicted_count++;
721 753
722 if (node->branch_flags.abort) 754 if (node->branch_flags.abort)
723 cnode->abort_count++; 755 cnode->abort_count++;
724 756
725 branch_type_count(&cnode->brtype_stat, 757 branch_type_count(&cnode->brtype_stat,
726 &node->branch_flags, 758 &node->branch_flags,
727 node->branch_from, 759 node->branch_from,
728 node->ip); 760 node->ip);
729 } else { 761 } else {
730 /* 762 /*
731 * It's "from" of a branch 763 * It's "from" of a branch
732 */ 764 */
733 cnode->brtype_stat.branch_to = false; 765 cnode->brtype_stat.branch_to = false;
734 cnode->cycles_count += 766 cnode->cycles_count += node->branch_flags.cycles;
735 node->branch_flags.cycles; 767 cnode->iter_count += node->nr_loop_iter;
736 cnode->iter_count += node->nr_loop_iter; 768 cnode->iter_cycles += node->iter_cycles;
737 cnode->iter_cycles += node->iter_cycles;
738 }
739 } 769 }
740
741 return MATCH_EQ;
742 } 770 }
743 771
744 return left > right ? MATCH_GT : MATCH_LT; 772 return match;
745} 773}
746 774
747/* 775/*
@@ -970,7 +998,7 @@ merge_chain_branch(struct callchain_cursor *cursor,
970 list_for_each_entry_safe(list, next_list, &src->val, list) { 998 list_for_each_entry_safe(list, next_list, &src->val, list) {
971 callchain_cursor_append(cursor, list->ip, 999 callchain_cursor_append(cursor, list->ip,
972 list->ms.map, list->ms.sym, 1000 list->ms.map, list->ms.sym,
973 false, NULL, 0, 0, 0); 1001 false, NULL, 0, 0, 0, list->srcline);
974 list_del(&list->list); 1002 list_del(&list->list);
975 map__zput(list->ms.map); 1003 map__zput(list->ms.map);
976 free(list); 1004 free(list);
@@ -1010,7 +1038,8 @@ int callchain_merge(struct callchain_cursor *cursor,
1010int callchain_cursor_append(struct callchain_cursor *cursor, 1038int callchain_cursor_append(struct callchain_cursor *cursor,
1011 u64 ip, struct map *map, struct symbol *sym, 1039 u64 ip, struct map *map, struct symbol *sym,
1012 bool branch, struct branch_flags *flags, 1040 bool branch, struct branch_flags *flags,
1013 int nr_loop_iter, u64 iter_cycles, u64 branch_from) 1041 int nr_loop_iter, u64 iter_cycles, u64 branch_from,
1042 const char *srcline)
1014{ 1043{
1015 struct callchain_cursor_node *node = *cursor->last; 1044 struct callchain_cursor_node *node = *cursor->last;
1016 1045
@@ -1029,6 +1058,7 @@ int callchain_cursor_append(struct callchain_cursor *cursor,
1029 node->branch = branch; 1058 node->branch = branch;
1030 node->nr_loop_iter = nr_loop_iter; 1059 node->nr_loop_iter = nr_loop_iter;
1031 node->iter_cycles = iter_cycles; 1060 node->iter_cycles = iter_cycles;
1061 node->srcline = srcline;
1032 1062
1033 if (flags) 1063 if (flags)
1034 memcpy(&node->branch_flags, flags, 1064 memcpy(&node->branch_flags, flags,
@@ -1071,10 +1101,8 @@ int fill_callchain_info(struct addr_location *al, struct callchain_cursor_node *
1071{ 1101{
1072 al->map = node->map; 1102 al->map = node->map;
1073 al->sym = node->sym; 1103 al->sym = node->sym;
1074 if (node->map) 1104 al->srcline = node->srcline;
1075 al->addr = node->map->map_ip(node->map, node->ip); 1105 al->addr = node->ip;
1076 else
1077 al->addr = node->ip;
1078 1106
1079 if (al->sym == NULL) { 1107 if (al->sym == NULL) {
1080 if (hide_unresolved) 1108 if (hide_unresolved)
@@ -1116,16 +1144,15 @@ char *callchain_list__sym_name(struct callchain_list *cl,
1116 int printed; 1144 int printed;
1117 1145
1118 if (cl->ms.sym) { 1146 if (cl->ms.sym) {
1119 if (show_srcline && cl->ms.map && !cl->srcline) 1147 const char *inlined = cl->ms.sym->inlined ? " (inlined)" : "";
1120 cl->srcline = get_srcline(cl->ms.map->dso, 1148
1121 map__rip_2objdump(cl->ms.map, 1149 if (show_srcline && cl->srcline)
1122 cl->ip), 1150 printed = scnprintf(bf, bfsize, "%s %s%s",
1123 cl->ms.sym, false, show_addr); 1151 cl->ms.sym->name, cl->srcline,
1124 if (cl->srcline) 1152 inlined);
1125 printed = scnprintf(bf, bfsize, "%s %s",
1126 cl->ms.sym->name, cl->srcline);
1127 else 1153 else
1128 printed = scnprintf(bf, bfsize, "%s", cl->ms.sym->name); 1154 printed = scnprintf(bf, bfsize, "%s%s",
1155 cl->ms.sym->name, inlined);
1129 } else 1156 } else
1130 printed = scnprintf(bf, bfsize, "%#" PRIx64, cl->ip); 1157 printed = scnprintf(bf, bfsize, "%#" PRIx64, cl->ip);
1131 1158
@@ -1533,7 +1560,7 @@ int callchain_cursor__copy(struct callchain_cursor *dst,
1533 node->branch, &node->branch_flags, 1560 node->branch, &node->branch_flags,
1534 node->nr_loop_iter, 1561 node->nr_loop_iter,
1535 node->iter_cycles, 1562 node->iter_cycles,
1536 node->branch_from); 1563 node->branch_from, node->srcline);
1537 if (rc) 1564 if (rc)
1538 break; 1565 break;
1539 1566
diff --git a/tools/perf/util/callchain.h b/tools/perf/util/callchain.h
index f967aa47d0a1..154560b1eb65 100644
--- a/tools/perf/util/callchain.h
+++ b/tools/perf/util/callchain.h
@@ -89,6 +89,8 @@ enum chain_value {
89 CCVAL_COUNT, 89 CCVAL_COUNT,
90}; 90};
91 91
92extern bool dwarf_callchain_users;
93
92struct callchain_param { 94struct callchain_param {
93 bool enabled; 95 bool enabled;
94 enum perf_call_graph_mode record_mode; 96 enum perf_call_graph_mode record_mode;
@@ -122,7 +124,7 @@ struct callchain_list {
122 u64 iter_count; 124 u64 iter_count;
123 u64 iter_cycles; 125 u64 iter_cycles;
124 struct branch_type_stat brtype_stat; 126 struct branch_type_stat brtype_stat;
125 char *srcline; 127 const char *srcline;
126 struct list_head list; 128 struct list_head list;
127}; 129};
128 130
@@ -136,6 +138,7 @@ struct callchain_cursor_node {
136 u64 ip; 138 u64 ip;
137 struct map *map; 139 struct map *map;
138 struct symbol *sym; 140 struct symbol *sym;
141 const char *srcline;
139 bool branch; 142 bool branch;
140 struct branch_flags branch_flags; 143 struct branch_flags branch_flags;
141 u64 branch_from; 144 u64 branch_from;
@@ -202,7 +205,8 @@ static inline void callchain_cursor_reset(struct callchain_cursor *cursor)
202int callchain_cursor_append(struct callchain_cursor *cursor, u64 ip, 205int callchain_cursor_append(struct callchain_cursor *cursor, u64 ip,
203 struct map *map, struct symbol *sym, 206 struct map *map, struct symbol *sym,
204 bool branch, struct branch_flags *flags, 207 bool branch, struct branch_flags *flags,
205 int nr_loop_iter, u64 iter_cycles, u64 branch_from); 208 int nr_loop_iter, u64 iter_cycles, u64 branch_from,
209 const char *srcline);
206 210
207/* Close a cursor writing session. Initialize for the reader */ 211/* Close a cursor writing session. Initialize for the reader */
208static inline void callchain_cursor_commit(struct callchain_cursor *cursor) 212static inline void callchain_cursor_commit(struct callchain_cursor *cursor)
diff --git a/tools/perf/util/cgroup.c b/tools/perf/util/cgroup.c
index d9ffc1e6eb39..984f69144f87 100644
--- a/tools/perf/util/cgroup.c
+++ b/tools/perf/util/cgroup.c
@@ -6,6 +6,9 @@
6#include "cgroup.h" 6#include "cgroup.h"
7#include "evlist.h" 7#include "evlist.h"
8#include <linux/stringify.h> 8#include <linux/stringify.h>
9#include <sys/types.h>
10#include <sys/stat.h>
11#include <fcntl.h>
9 12
10int nr_cgroups; 13int nr_cgroups;
11 14
diff --git a/tools/perf/util/comm.c b/tools/perf/util/comm.c
index 8808570f8e9c..7798a2cc8a86 100644
--- a/tools/perf/util/comm.c
+++ b/tools/perf/util/comm.c
@@ -6,6 +6,7 @@
6#include <stdio.h> 6#include <stdio.h>
7#include <string.h> 7#include <string.h>
8#include <linux/refcount.h> 8#include <linux/refcount.h>
9#include "rwsem.h"
9 10
10struct comm_str { 11struct comm_str {
11 char *str; 12 char *str;
@@ -15,6 +16,7 @@ struct comm_str {
15 16
16/* Should perhaps be moved to struct machine */ 17/* Should perhaps be moved to struct machine */
17static struct rb_root comm_str_root; 18static struct rb_root comm_str_root;
19static struct rw_semaphore comm_str_lock = {.lock = PTHREAD_RWLOCK_INITIALIZER,};
18 20
19static struct comm_str *comm_str__get(struct comm_str *cs) 21static struct comm_str *comm_str__get(struct comm_str *cs)
20{ 22{
@@ -26,7 +28,9 @@ static struct comm_str *comm_str__get(struct comm_str *cs)
26static void comm_str__put(struct comm_str *cs) 28static void comm_str__put(struct comm_str *cs)
27{ 29{
28 if (cs && refcount_dec_and_test(&cs->refcnt)) { 30 if (cs && refcount_dec_and_test(&cs->refcnt)) {
31 down_write(&comm_str_lock);
29 rb_erase(&cs->rb_node, &comm_str_root); 32 rb_erase(&cs->rb_node, &comm_str_root);
33 up_write(&comm_str_lock);
30 zfree(&cs->str); 34 zfree(&cs->str);
31 free(cs); 35 free(cs);
32 } 36 }
@@ -51,7 +55,8 @@ static struct comm_str *comm_str__alloc(const char *str)
51 return cs; 55 return cs;
52} 56}
53 57
54static struct comm_str *comm_str__findnew(const char *str, struct rb_root *root) 58static
59struct comm_str *__comm_str__findnew(const char *str, struct rb_root *root)
55{ 60{
56 struct rb_node **p = &root->rb_node; 61 struct rb_node **p = &root->rb_node;
57 struct rb_node *parent = NULL; 62 struct rb_node *parent = NULL;
@@ -82,6 +87,17 @@ static struct comm_str *comm_str__findnew(const char *str, struct rb_root *root)
82 return new; 87 return new;
83} 88}
84 89
90static struct comm_str *comm_str__findnew(const char *str, struct rb_root *root)
91{
92 struct comm_str *cs;
93
94 down_write(&comm_str_lock);
95 cs = __comm_str__findnew(str, root);
96 up_write(&comm_str_lock);
97
98 return cs;
99}
100
85struct comm *comm__new(const char *str, u64 timestamp, bool exec) 101struct comm *comm__new(const char *str, u64 timestamp, bool exec)
86{ 102{
87 struct comm *comm = zalloc(sizeof(*comm)); 103 struct comm *comm = zalloc(sizeof(*comm));
diff --git a/tools/perf/util/config.c b/tools/perf/util/config.c
index 4b893c622236..84eb9393c7db 100644
--- a/tools/perf/util/config.c
+++ b/tools/perf/util/config.c
@@ -701,10 +701,7 @@ struct perf_config_set *perf_config_set__new(void)
701 701
702 if (set) { 702 if (set) {
703 INIT_LIST_HEAD(&set->sections); 703 INIT_LIST_HEAD(&set->sections);
704 if (perf_config_set__init(set) < 0) { 704 perf_config_set__init(set);
705 perf_config_set__delete(set);
706 set = NULL;
707 }
708 } 705 }
709 706
710 return set; 707 return set;
diff --git a/tools/perf/util/cs-etm-decoder/Build b/tools/perf/util/cs-etm-decoder/Build
new file mode 100644
index 000000000000..bc22c39c727f
--- /dev/null
+++ b/tools/perf/util/cs-etm-decoder/Build
@@ -0,0 +1 @@
libperf-$(CONFIG_AUXTRACE) += cs-etm-decoder.o
diff --git a/tools/perf/util/cs-etm-decoder/cs-etm-decoder.c b/tools/perf/util/cs-etm-decoder/cs-etm-decoder.c
new file mode 100644
index 000000000000..1fb01849f1c7
--- /dev/null
+++ b/tools/perf/util/cs-etm-decoder/cs-etm-decoder.c
@@ -0,0 +1,513 @@
1/*
2 * SPDX-License-Identifier: GPL-2.0
3 *
4 * Copyright(C) 2015-2018 Linaro Limited.
5 *
6 * Author: Tor Jeremiassen <tor@ti.com>
7 * Author: Mathieu Poirier <mathieu.poirier@linaro.org>
8 */
9
10#include <linux/err.h>
11#include <linux/list.h>
12#include <stdlib.h>
13#include <opencsd/c_api/opencsd_c_api.h>
14#include <opencsd/etmv4/trc_pkt_types_etmv4.h>
15#include <opencsd/ocsd_if_types.h>
16
17#include "cs-etm.h"
18#include "cs-etm-decoder.h"
19#include "intlist.h"
20#include "util.h"
21
22#define MAX_BUFFER 1024
23
24/* use raw logging */
25#ifdef CS_DEBUG_RAW
26#define CS_LOG_RAW_FRAMES
27#ifdef CS_RAW_PACKED
28#define CS_RAW_DEBUG_FLAGS (OCSD_DFRMTR_UNPACKED_RAW_OUT | \
29 OCSD_DFRMTR_PACKED_RAW_OUT)
30#else
31#define CS_RAW_DEBUG_FLAGS (OCSD_DFRMTR_UNPACKED_RAW_OUT)
32#endif
33#endif
34
35struct cs_etm_decoder {
36 void *data;
37 void (*packet_printer)(const char *msg);
38 bool trace_on;
39 dcd_tree_handle_t dcd_tree;
40 cs_etm_mem_cb_type mem_access;
41 ocsd_datapath_resp_t prev_return;
42 u32 packet_count;
43 u32 head;
44 u32 tail;
45 struct cs_etm_packet packet_buffer[MAX_BUFFER];
46};
47
48static u32
49cs_etm_decoder__mem_access(const void *context,
50 const ocsd_vaddr_t address,
51 const ocsd_mem_space_acc_t mem_space __maybe_unused,
52 const u32 req_size,
53 u8 *buffer)
54{
55 struct cs_etm_decoder *decoder = (struct cs_etm_decoder *) context;
56
57 return decoder->mem_access(decoder->data,
58 address,
59 req_size,
60 buffer);
61}
62
63int cs_etm_decoder__add_mem_access_cb(struct cs_etm_decoder *decoder,
64 u64 start, u64 end,
65 cs_etm_mem_cb_type cb_func)
66{
67 decoder->mem_access = cb_func;
68
69 if (ocsd_dt_add_callback_mem_acc(decoder->dcd_tree, start, end,
70 OCSD_MEM_SPACE_ANY,
71 cs_etm_decoder__mem_access, decoder))
72 return -1;
73
74 return 0;
75}
76
77int cs_etm_decoder__reset(struct cs_etm_decoder *decoder)
78{
79 ocsd_datapath_resp_t dp_ret;
80
81 dp_ret = ocsd_dt_process_data(decoder->dcd_tree, OCSD_OP_RESET,
82 0, 0, NULL, NULL);
83 if (OCSD_DATA_RESP_IS_FATAL(dp_ret))
84 return -1;
85
86 return 0;
87}
88
89int cs_etm_decoder__get_packet(struct cs_etm_decoder *decoder,
90 struct cs_etm_packet *packet)
91{
92 if (!decoder || !packet)
93 return -EINVAL;
94
95 /* Nothing to do, might as well just return */
96 if (decoder->packet_count == 0)
97 return 0;
98
99 *packet = decoder->packet_buffer[decoder->head];
100
101 decoder->head = (decoder->head + 1) & (MAX_BUFFER - 1);
102
103 decoder->packet_count--;
104
105 return 1;
106}
107
108static void cs_etm_decoder__gen_etmv4_config(struct cs_etm_trace_params *params,
109 ocsd_etmv4_cfg *config)
110{
111 config->reg_configr = params->etmv4.reg_configr;
112 config->reg_traceidr = params->etmv4.reg_traceidr;
113 config->reg_idr0 = params->etmv4.reg_idr0;
114 config->reg_idr1 = params->etmv4.reg_idr1;
115 config->reg_idr2 = params->etmv4.reg_idr2;
116 config->reg_idr8 = params->etmv4.reg_idr8;
117 config->reg_idr9 = 0;
118 config->reg_idr10 = 0;
119 config->reg_idr11 = 0;
120 config->reg_idr12 = 0;
121 config->reg_idr13 = 0;
122 config->arch_ver = ARCH_V8;
123 config->core_prof = profile_CortexA;
124}
125
126static void cs_etm_decoder__print_str_cb(const void *p_context,
127 const char *msg,
128 const int str_len)
129{
130 if (p_context && str_len)
131 ((struct cs_etm_decoder *)p_context)->packet_printer(msg);
132}
133
134static int
135cs_etm_decoder__init_def_logger_printing(struct cs_etm_decoder_params *d_params,
136 struct cs_etm_decoder *decoder)
137{
138 int ret = 0;
139
140 if (d_params->packet_printer == NULL)
141 return -1;
142
143 decoder->packet_printer = d_params->packet_printer;
144
145 /*
146 * Set up a library default logger to process any printers
147 * (packet/raw frame) we add later.
148 */
149 ret = ocsd_def_errlog_init(OCSD_ERR_SEV_ERROR, 1);
150 if (ret != 0)
151 return -1;
152
153 /* no stdout / err / file output */
154 ret = ocsd_def_errlog_config_output(C_API_MSGLOGOUT_FLG_NONE, NULL);
155 if (ret != 0)
156 return -1;
157
158 /*
159 * Set the string CB for the default logger, passes strings to
160 * perf print logger.
161 */
162 ret = ocsd_def_errlog_set_strprint_cb(decoder->dcd_tree,
163 (void *)decoder,
164 cs_etm_decoder__print_str_cb);
165 if (ret != 0)
166 ret = -1;
167
168 return 0;
169}
170
171#ifdef CS_LOG_RAW_FRAMES
172static void
173cs_etm_decoder__init_raw_frame_logging(struct cs_etm_decoder_params *d_params,
174 struct cs_etm_decoder *decoder)
175{
176 /* Only log these during a --dump operation */
177 if (d_params->operation == CS_ETM_OPERATION_PRINT) {
178 /* set up a library default logger to process the
179 * raw frame printer we add later
180 */
181 ocsd_def_errlog_init(OCSD_ERR_SEV_ERROR, 1);
182
183 /* no stdout / err / file output */
184 ocsd_def_errlog_config_output(C_API_MSGLOGOUT_FLG_NONE, NULL);
185
186 /* set the string CB for the default logger,
187 * passes strings to perf print logger.
188 */
189 ocsd_def_errlog_set_strprint_cb(decoder->dcd_tree,
190 (void *)decoder,
191 cs_etm_decoder__print_str_cb);
192
193 /* use the built in library printer for the raw frames */
194 ocsd_dt_set_raw_frame_printer(decoder->dcd_tree,
195 CS_RAW_DEBUG_FLAGS);
196 }
197}
198#else
199static void
200cs_etm_decoder__init_raw_frame_logging(
201 struct cs_etm_decoder_params *d_params __maybe_unused,
202 struct cs_etm_decoder *decoder __maybe_unused)
203{
204}
205#endif
206
207static int cs_etm_decoder__create_packet_printer(struct cs_etm_decoder *decoder,
208 const char *decoder_name,
209 void *trace_config)
210{
211 u8 csid;
212
213 if (ocsd_dt_create_decoder(decoder->dcd_tree, decoder_name,
214 OCSD_CREATE_FLG_PACKET_PROC,
215 trace_config, &csid))
216 return -1;
217
218 if (ocsd_dt_set_pkt_protocol_printer(decoder->dcd_tree, csid, 0))
219 return -1;
220
221 return 0;
222}
223
224static int
225cs_etm_decoder__create_etm_packet_printer(struct cs_etm_trace_params *t_params,
226 struct cs_etm_decoder *decoder)
227{
228 const char *decoder_name;
229 ocsd_etmv4_cfg trace_config_etmv4;
230 void *trace_config;
231
232 switch (t_params->protocol) {
233 case CS_ETM_PROTO_ETMV4i:
234 cs_etm_decoder__gen_etmv4_config(t_params, &trace_config_etmv4);
235 decoder_name = OCSD_BUILTIN_DCD_ETMV4I;
236 trace_config = &trace_config_etmv4;
237 break;
238 default:
239 return -1;
240 }
241
242 return cs_etm_decoder__create_packet_printer(decoder,
243 decoder_name,
244 trace_config);
245}
246
247static void cs_etm_decoder__clear_buffer(struct cs_etm_decoder *decoder)
248{
249 int i;
250
251 decoder->head = 0;
252 decoder->tail = 0;
253 decoder->packet_count = 0;
254 for (i = 0; i < MAX_BUFFER; i++) {
255 decoder->packet_buffer[i].start_addr = 0xdeadbeefdeadbeefUL;
256 decoder->packet_buffer[i].end_addr = 0xdeadbeefdeadbeefUL;
257 decoder->packet_buffer[i].exc = false;
258 decoder->packet_buffer[i].exc_ret = false;
259 decoder->packet_buffer[i].cpu = INT_MIN;
260 }
261}
262
263static ocsd_datapath_resp_t
264cs_etm_decoder__buffer_packet(struct cs_etm_decoder *decoder,
265 const ocsd_generic_trace_elem *elem,
266 const u8 trace_chan_id,
267 enum cs_etm_sample_type sample_type)
268{
269 u32 et = 0;
270 struct int_node *inode = NULL;
271
272 if (decoder->packet_count >= MAX_BUFFER - 1)
273 return OCSD_RESP_FATAL_SYS_ERR;
274
275 /* Search the RB tree for the cpu associated with this traceID */
276 inode = intlist__find(traceid_list, trace_chan_id);
277 if (!inode)
278 return OCSD_RESP_FATAL_SYS_ERR;
279
280 et = decoder->tail;
281 decoder->packet_buffer[et].sample_type = sample_type;
282 decoder->packet_buffer[et].start_addr = elem->st_addr;
283 decoder->packet_buffer[et].end_addr = elem->en_addr;
284 decoder->packet_buffer[et].exc = false;
285 decoder->packet_buffer[et].exc_ret = false;
286 decoder->packet_buffer[et].cpu = *((int *)inode->priv);
287
288 /* Wrap around if need be */
289 et = (et + 1) & (MAX_BUFFER - 1);
290
291 decoder->tail = et;
292 decoder->packet_count++;
293
294 if (decoder->packet_count == MAX_BUFFER - 1)
295 return OCSD_RESP_WAIT;
296
297 return OCSD_RESP_CONT;
298}
299
300static ocsd_datapath_resp_t cs_etm_decoder__gen_trace_elem_printer(
301 const void *context,
302 const ocsd_trc_index_t indx __maybe_unused,
303 const u8 trace_chan_id __maybe_unused,
304 const ocsd_generic_trace_elem *elem)
305{
306 ocsd_datapath_resp_t resp = OCSD_RESP_CONT;
307 struct cs_etm_decoder *decoder = (struct cs_etm_decoder *) context;
308
309 switch (elem->elem_type) {
310 case OCSD_GEN_TRC_ELEM_UNKNOWN:
311 break;
312 case OCSD_GEN_TRC_ELEM_NO_SYNC:
313 decoder->trace_on = false;
314 break;
315 case OCSD_GEN_TRC_ELEM_TRACE_ON:
316 decoder->trace_on = true;
317 break;
318 case OCSD_GEN_TRC_ELEM_INSTR_RANGE:
319 resp = cs_etm_decoder__buffer_packet(decoder, elem,
320 trace_chan_id,
321 CS_ETM_RANGE);
322 break;
323 case OCSD_GEN_TRC_ELEM_EXCEPTION:
324 decoder->packet_buffer[decoder->tail].exc = true;
325 break;
326 case OCSD_GEN_TRC_ELEM_EXCEPTION_RET:
327 decoder->packet_buffer[decoder->tail].exc_ret = true;
328 break;
329 case OCSD_GEN_TRC_ELEM_PE_CONTEXT:
330 case OCSD_GEN_TRC_ELEM_EO_TRACE:
331 case OCSD_GEN_TRC_ELEM_ADDR_NACC:
332 case OCSD_GEN_TRC_ELEM_TIMESTAMP:
333 case OCSD_GEN_TRC_ELEM_CYCLE_COUNT:
334 case OCSD_GEN_TRC_ELEM_ADDR_UNKNOWN:
335 case OCSD_GEN_TRC_ELEM_EVENT:
336 case OCSD_GEN_TRC_ELEM_SWTRACE:
337 case OCSD_GEN_TRC_ELEM_CUSTOM:
338 default:
339 break;
340 }
341
342 return resp;
343}
344
345static int cs_etm_decoder__create_etm_packet_decoder(
346 struct cs_etm_trace_params *t_params,
347 struct cs_etm_decoder *decoder)
348{
349 const char *decoder_name;
350 ocsd_etmv4_cfg trace_config_etmv4;
351 void *trace_config;
352 u8 csid;
353
354 switch (t_params->protocol) {
355 case CS_ETM_PROTO_ETMV4i:
356 cs_etm_decoder__gen_etmv4_config(t_params, &trace_config_etmv4);
357 decoder_name = OCSD_BUILTIN_DCD_ETMV4I;
358 trace_config = &trace_config_etmv4;
359 break;
360 default:
361 return -1;
362 }
363
364 if (ocsd_dt_create_decoder(decoder->dcd_tree,
365 decoder_name,
366 OCSD_CREATE_FLG_FULL_DECODER,
367 trace_config, &csid))
368 return -1;
369
370 if (ocsd_dt_set_gen_elem_outfn(decoder->dcd_tree,
371 cs_etm_decoder__gen_trace_elem_printer,
372 decoder))
373 return -1;
374
375 return 0;
376}
377
378static int
379cs_etm_decoder__create_etm_decoder(struct cs_etm_decoder_params *d_params,
380 struct cs_etm_trace_params *t_params,
381 struct cs_etm_decoder *decoder)
382{
383 if (d_params->operation == CS_ETM_OPERATION_PRINT)
384 return cs_etm_decoder__create_etm_packet_printer(t_params,
385 decoder);
386 else if (d_params->operation == CS_ETM_OPERATION_DECODE)
387 return cs_etm_decoder__create_etm_packet_decoder(t_params,
388 decoder);
389
390 return -1;
391}
392
393struct cs_etm_decoder *
394cs_etm_decoder__new(int num_cpu, struct cs_etm_decoder_params *d_params,
395 struct cs_etm_trace_params t_params[])
396{
397 struct cs_etm_decoder *decoder;
398 ocsd_dcd_tree_src_t format;
399 u32 flags;
400 int i, ret;
401
402 if ((!t_params) || (!d_params))
403 return NULL;
404
405 decoder = zalloc(sizeof(*decoder));
406
407 if (!decoder)
408 return NULL;
409
410 decoder->data = d_params->data;
411 decoder->prev_return = OCSD_RESP_CONT;
412 cs_etm_decoder__clear_buffer(decoder);
413 format = (d_params->formatted ? OCSD_TRC_SRC_FRAME_FORMATTED :
414 OCSD_TRC_SRC_SINGLE);
415 flags = 0;
416 flags |= (d_params->fsyncs ? OCSD_DFRMTR_HAS_FSYNCS : 0);
417 flags |= (d_params->hsyncs ? OCSD_DFRMTR_HAS_HSYNCS : 0);
418 flags |= (d_params->frame_aligned ? OCSD_DFRMTR_FRAME_MEM_ALIGN : 0);
419
420 /*
421 * Drivers may add barrier frames when used with perf, set up to
422 * handle this. Barriers const of FSYNC packet repeated 4 times.
423 */
424 flags |= OCSD_DFRMTR_RESET_ON_4X_FSYNC;
425
426 /* Create decode tree for the data source */
427 decoder->dcd_tree = ocsd_create_dcd_tree(format, flags);
428
429 if (decoder->dcd_tree == 0)
430 goto err_free_decoder;
431
432 /* init library print logging support */
433 ret = cs_etm_decoder__init_def_logger_printing(d_params, decoder);
434 if (ret != 0)
435 goto err_free_decoder_tree;
436
437 /* init raw frame logging if required */
438 cs_etm_decoder__init_raw_frame_logging(d_params, decoder);
439
440 for (i = 0; i < num_cpu; i++) {
441 ret = cs_etm_decoder__create_etm_decoder(d_params,
442 &t_params[i],
443 decoder);
444 if (ret != 0)
445 goto err_free_decoder_tree;
446 }
447
448 return decoder;
449
450err_free_decoder_tree:
451 ocsd_destroy_dcd_tree(decoder->dcd_tree);
452err_free_decoder:
453 free(decoder);
454 return NULL;
455}
456
457int cs_etm_decoder__process_data_block(struct cs_etm_decoder *decoder,
458 u64 indx, const u8 *buf,
459 size_t len, size_t *consumed)
460{
461 int ret = 0;
462 ocsd_datapath_resp_t cur = OCSD_RESP_CONT;
463 ocsd_datapath_resp_t prev_return = decoder->prev_return;
464 size_t processed = 0;
465 u32 count;
466
467 while (processed < len) {
468 if (OCSD_DATA_RESP_IS_WAIT(prev_return)) {
469 cur = ocsd_dt_process_data(decoder->dcd_tree,
470 OCSD_OP_FLUSH,
471 0,
472 0,
473 NULL,
474 NULL);
475 } else if (OCSD_DATA_RESP_IS_CONT(prev_return)) {
476 cur = ocsd_dt_process_data(decoder->dcd_tree,
477 OCSD_OP_DATA,
478 indx + processed,
479 len - processed,
480 &buf[processed],
481 &count);
482 processed += count;
483 } else {
484 ret = -EINVAL;
485 break;
486 }
487
488 /*
489 * Return to the input code if the packet buffer is full.
490 * Flushing will get done once the packet buffer has been
491 * processed.
492 */
493 if (OCSD_DATA_RESP_IS_WAIT(cur))
494 break;
495
496 prev_return = cur;
497 }
498
499 decoder->prev_return = cur;
500 *consumed = processed;
501
502 return ret;
503}
504
505void cs_etm_decoder__free(struct cs_etm_decoder *decoder)
506{
507 if (!decoder)
508 return;
509
510 ocsd_destroy_dcd_tree(decoder->dcd_tree);
511 decoder->dcd_tree = NULL;
512 free(decoder);
513}
diff --git a/tools/perf/util/cs-etm-decoder/cs-etm-decoder.h b/tools/perf/util/cs-etm-decoder/cs-etm-decoder.h
new file mode 100644
index 000000000000..3d2e6205d186
--- /dev/null
+++ b/tools/perf/util/cs-etm-decoder/cs-etm-decoder.h
@@ -0,0 +1,105 @@
1/*
2 * SPDX-License-Identifier: GPL-2.0
3 *
4 * Copyright(C) 2015-2018 Linaro Limited.
5 *
6 * Author: Tor Jeremiassen <tor@ti.com>
7 * Author: Mathieu Poirier <mathieu.poirier@linaro.org>
8 */
9
10#ifndef INCLUDE__CS_ETM_DECODER_H__
11#define INCLUDE__CS_ETM_DECODER_H__
12
13#include <linux/types.h>
14#include <stdio.h>
15
16struct cs_etm_decoder;
17
18struct cs_etm_buffer {
19 const unsigned char *buf;
20 size_t len;
21 u64 offset;
22 u64 ref_timestamp;
23};
24
25enum cs_etm_sample_type {
26 CS_ETM_RANGE = 1 << 0,
27};
28
29struct cs_etm_packet {
30 enum cs_etm_sample_type sample_type;
31 u64 start_addr;
32 u64 end_addr;
33 u8 exc;
34 u8 exc_ret;
35 int cpu;
36};
37
38struct cs_etm_queue;
39
40typedef u32 (*cs_etm_mem_cb_type)(struct cs_etm_queue *, u64,
41 size_t, u8 *);
42
43struct cs_etmv4_trace_params {
44 u32 reg_idr0;
45 u32 reg_idr1;
46 u32 reg_idr2;
47 u32 reg_idr8;
48 u32 reg_configr;
49 u32 reg_traceidr;
50};
51
52struct cs_etm_trace_params {
53 int protocol;
54 union {
55 struct cs_etmv4_trace_params etmv4;
56 };
57};
58
59struct cs_etm_decoder_params {
60 int operation;
61 void (*packet_printer)(const char *msg);
62 cs_etm_mem_cb_type mem_acc_cb;
63 u8 formatted;
64 u8 fsyncs;
65 u8 hsyncs;
66 u8 frame_aligned;
67 void *data;
68};
69
70/*
71 * The following enums are indexed starting with 1 to align with the
72 * open source coresight trace decoder library.
73 */
74enum {
75 CS_ETM_PROTO_ETMV3 = 1,
76 CS_ETM_PROTO_ETMV4i,
77 CS_ETM_PROTO_ETMV4d,
78};
79
80enum {
81 CS_ETM_OPERATION_PRINT = 1,
82 CS_ETM_OPERATION_DECODE,
83};
84
85int cs_etm_decoder__process_data_block(struct cs_etm_decoder *decoder,
86 u64 indx, const u8 *buf,
87 size_t len, size_t *consumed);
88
89struct cs_etm_decoder *
90cs_etm_decoder__new(int num_cpu,
91 struct cs_etm_decoder_params *d_params,
92 struct cs_etm_trace_params t_params[]);
93
94void cs_etm_decoder__free(struct cs_etm_decoder *decoder);
95
96int cs_etm_decoder__add_mem_access_cb(struct cs_etm_decoder *decoder,
97 u64 start, u64 end,
98 cs_etm_mem_cb_type cb_func);
99
100int cs_etm_decoder__get_packet(struct cs_etm_decoder *decoder,
101 struct cs_etm_packet *packet);
102
103int cs_etm_decoder__reset(struct cs_etm_decoder *decoder);
104
105#endif /* INCLUDE__CS_ETM_DECODER_H__ */
diff --git a/tools/perf/util/cs-etm.c b/tools/perf/util/cs-etm.c
new file mode 100644
index 000000000000..b9f0a53dfa65
--- /dev/null
+++ b/tools/perf/util/cs-etm.c
@@ -0,0 +1,1023 @@
1/*
2 * SPDX-License-Identifier: GPL-2.0
3 *
4 * Copyright(C) 2015-2018 Linaro Limited.
5 *
6 * Author: Tor Jeremiassen <tor@ti.com>
7 * Author: Mathieu Poirier <mathieu.poirier@linaro.org>
8 */
9
10#include <linux/bitops.h>
11#include <linux/err.h>
12#include <linux/kernel.h>
13#include <linux/log2.h>
14#include <linux/types.h>
15
16#include <stdlib.h>
17
18#include "auxtrace.h"
19#include "color.h"
20#include "cs-etm.h"
21#include "cs-etm-decoder/cs-etm-decoder.h"
22#include "debug.h"
23#include "evlist.h"
24#include "intlist.h"
25#include "machine.h"
26#include "map.h"
27#include "perf.h"
28#include "thread.h"
29#include "thread_map.h"
30#include "thread-stack.h"
31#include "util.h"
32
33#define MAX_TIMESTAMP (~0ULL)
34
35struct cs_etm_auxtrace {
36 struct auxtrace auxtrace;
37 struct auxtrace_queues queues;
38 struct auxtrace_heap heap;
39 struct itrace_synth_opts synth_opts;
40 struct perf_session *session;
41 struct machine *machine;
42 struct thread *unknown_thread;
43
44 u8 timeless_decoding;
45 u8 snapshot_mode;
46 u8 data_queued;
47 u8 sample_branches;
48
49 int num_cpu;
50 u32 auxtrace_type;
51 u64 branches_sample_type;
52 u64 branches_id;
53 u64 **metadata;
54 u64 kernel_start;
55 unsigned int pmu_type;
56};
57
58struct cs_etm_queue {
59 struct cs_etm_auxtrace *etm;
60 struct thread *thread;
61 struct cs_etm_decoder *decoder;
62 struct auxtrace_buffer *buffer;
63 const struct cs_etm_state *state;
64 union perf_event *event_buf;
65 unsigned int queue_nr;
66 pid_t pid, tid;
67 int cpu;
68 u64 time;
69 u64 timestamp;
70 u64 offset;
71};
72
73static int cs_etm__update_queues(struct cs_etm_auxtrace *etm);
74static int cs_etm__process_timeless_queues(struct cs_etm_auxtrace *etm,
75 pid_t tid, u64 time_);
76
77static void cs_etm__packet_dump(const char *pkt_string)
78{
79 const char *color = PERF_COLOR_BLUE;
80 int len = strlen(pkt_string);
81
82 if (len && (pkt_string[len-1] == '\n'))
83 color_fprintf(stdout, color, " %s", pkt_string);
84 else
85 color_fprintf(stdout, color, " %s\n", pkt_string);
86
87 fflush(stdout);
88}
89
90static void cs_etm__dump_event(struct cs_etm_auxtrace *etm,
91 struct auxtrace_buffer *buffer)
92{
93 int i, ret;
94 const char *color = PERF_COLOR_BLUE;
95 struct cs_etm_decoder_params d_params;
96 struct cs_etm_trace_params *t_params;
97 struct cs_etm_decoder *decoder;
98 size_t buffer_used = 0;
99
100 fprintf(stdout, "\n");
101 color_fprintf(stdout, color,
102 ". ... CoreSight ETM Trace data: size %zu bytes\n",
103 buffer->size);
104
105 /* Use metadata to fill in trace parameters for trace decoder */
106 t_params = zalloc(sizeof(*t_params) * etm->num_cpu);
107 for (i = 0; i < etm->num_cpu; i++) {
108 t_params[i].protocol = CS_ETM_PROTO_ETMV4i;
109 t_params[i].etmv4.reg_idr0 = etm->metadata[i][CS_ETMV4_TRCIDR0];
110 t_params[i].etmv4.reg_idr1 = etm->metadata[i][CS_ETMV4_TRCIDR1];
111 t_params[i].etmv4.reg_idr2 = etm->metadata[i][CS_ETMV4_TRCIDR2];
112 t_params[i].etmv4.reg_idr8 = etm->metadata[i][CS_ETMV4_TRCIDR8];
113 t_params[i].etmv4.reg_configr =
114 etm->metadata[i][CS_ETMV4_TRCCONFIGR];
115 t_params[i].etmv4.reg_traceidr =
116 etm->metadata[i][CS_ETMV4_TRCTRACEIDR];
117 }
118
119 /* Set decoder parameters to simply print the trace packets */
120 d_params.packet_printer = cs_etm__packet_dump;
121 d_params.operation = CS_ETM_OPERATION_PRINT;
122 d_params.formatted = true;
123 d_params.fsyncs = false;
124 d_params.hsyncs = false;
125 d_params.frame_aligned = true;
126
127 decoder = cs_etm_decoder__new(etm->num_cpu, &d_params, t_params);
128
129 zfree(&t_params);
130
131 if (!decoder)
132 return;
133 do {
134 size_t consumed;
135
136 ret = cs_etm_decoder__process_data_block(
137 decoder, buffer->offset,
138 &((u8 *)buffer->data)[buffer_used],
139 buffer->size - buffer_used, &consumed);
140 if (ret)
141 break;
142
143 buffer_used += consumed;
144 } while (buffer_used < buffer->size);
145
146 cs_etm_decoder__free(decoder);
147}
148
149static int cs_etm__flush_events(struct perf_session *session,
150 struct perf_tool *tool)
151{
152 int ret;
153 struct cs_etm_auxtrace *etm = container_of(session->auxtrace,
154 struct cs_etm_auxtrace,
155 auxtrace);
156 if (dump_trace)
157 return 0;
158
159 if (!tool->ordered_events)
160 return -EINVAL;
161
162 if (!etm->timeless_decoding)
163 return -EINVAL;
164
165 ret = cs_etm__update_queues(etm);
166
167 if (ret < 0)
168 return ret;
169
170 return cs_etm__process_timeless_queues(etm, -1, MAX_TIMESTAMP - 1);
171}
172
173static void cs_etm__free_queue(void *priv)
174{
175 struct cs_etm_queue *etmq = priv;
176
177 free(etmq);
178}
179
180static void cs_etm__free_events(struct perf_session *session)
181{
182 unsigned int i;
183 struct cs_etm_auxtrace *aux = container_of(session->auxtrace,
184 struct cs_etm_auxtrace,
185 auxtrace);
186 struct auxtrace_queues *queues = &aux->queues;
187
188 for (i = 0; i < queues->nr_queues; i++) {
189 cs_etm__free_queue(queues->queue_array[i].priv);
190 queues->queue_array[i].priv = NULL;
191 }
192
193 auxtrace_queues__free(queues);
194}
195
196static void cs_etm__free(struct perf_session *session)
197{
198 int i;
199 struct int_node *inode, *tmp;
200 struct cs_etm_auxtrace *aux = container_of(session->auxtrace,
201 struct cs_etm_auxtrace,
202 auxtrace);
203 cs_etm__free_events(session);
204 session->auxtrace = NULL;
205
206 /* First remove all traceID/CPU# nodes for the RB tree */
207 intlist__for_each_entry_safe(inode, tmp, traceid_list)
208 intlist__remove(traceid_list, inode);
209 /* Then the RB tree itself */
210 intlist__delete(traceid_list);
211
212 for (i = 0; i < aux->num_cpu; i++)
213 zfree(&aux->metadata[i]);
214
215 zfree(&aux->metadata);
216 zfree(&aux);
217}
218
219static u32 cs_etm__mem_access(struct cs_etm_queue *etmq, u64 address,
220 size_t size, u8 *buffer)
221{
222 u8 cpumode;
223 u64 offset;
224 int len;
225 struct thread *thread;
226 struct machine *machine;
227 struct addr_location al;
228
229 if (!etmq)
230 return -1;
231
232 machine = etmq->etm->machine;
233 if (address >= etmq->etm->kernel_start)
234 cpumode = PERF_RECORD_MISC_KERNEL;
235 else
236 cpumode = PERF_RECORD_MISC_USER;
237
238 thread = etmq->thread;
239 if (!thread) {
240 if (cpumode != PERF_RECORD_MISC_KERNEL)
241 return -EINVAL;
242 thread = etmq->etm->unknown_thread;
243 }
244
245 thread__find_addr_map(thread, cpumode, MAP__FUNCTION, address, &al);
246
247 if (!al.map || !al.map->dso)
248 return 0;
249
250 if (al.map->dso->data.status == DSO_DATA_STATUS_ERROR &&
251 dso__data_status_seen(al.map->dso, DSO_DATA_STATUS_SEEN_ITRACE))
252 return 0;
253
254 offset = al.map->map_ip(al.map, address);
255
256 map__load(al.map);
257
258 len = dso__data_read_offset(al.map->dso, machine, offset, buffer, size);
259
260 if (len <= 0)
261 return 0;
262
263 return len;
264}
265
266static struct cs_etm_queue *cs_etm__alloc_queue(struct cs_etm_auxtrace *etm,
267 unsigned int queue_nr)
268{
269 int i;
270 struct cs_etm_decoder_params d_params;
271 struct cs_etm_trace_params *t_params;
272 struct cs_etm_queue *etmq;
273
274 etmq = zalloc(sizeof(*etmq));
275 if (!etmq)
276 return NULL;
277
278 etmq->event_buf = malloc(PERF_SAMPLE_MAX_SIZE);
279 if (!etmq->event_buf)
280 goto out_free;
281
282 etmq->etm = etm;
283 etmq->queue_nr = queue_nr;
284 etmq->pid = -1;
285 etmq->tid = -1;
286 etmq->cpu = -1;
287
288 /* Use metadata to fill in trace parameters for trace decoder */
289 t_params = zalloc(sizeof(*t_params) * etm->num_cpu);
290
291 if (!t_params)
292 goto out_free;
293
294 for (i = 0; i < etm->num_cpu; i++) {
295 t_params[i].protocol = CS_ETM_PROTO_ETMV4i;
296 t_params[i].etmv4.reg_idr0 = etm->metadata[i][CS_ETMV4_TRCIDR0];
297 t_params[i].etmv4.reg_idr1 = etm->metadata[i][CS_ETMV4_TRCIDR1];
298 t_params[i].etmv4.reg_idr2 = etm->metadata[i][CS_ETMV4_TRCIDR2];
299 t_params[i].etmv4.reg_idr8 = etm->metadata[i][CS_ETMV4_TRCIDR8];
300 t_params[i].etmv4.reg_configr =
301 etm->metadata[i][CS_ETMV4_TRCCONFIGR];
302 t_params[i].etmv4.reg_traceidr =
303 etm->metadata[i][CS_ETMV4_TRCTRACEIDR];
304 }
305
306 /* Set decoder parameters to simply print the trace packets */
307 d_params.packet_printer = cs_etm__packet_dump;
308 d_params.operation = CS_ETM_OPERATION_DECODE;
309 d_params.formatted = true;
310 d_params.fsyncs = false;
311 d_params.hsyncs = false;
312 d_params.frame_aligned = true;
313 d_params.data = etmq;
314
315 etmq->decoder = cs_etm_decoder__new(etm->num_cpu, &d_params, t_params);
316
317 zfree(&t_params);
318
319 if (!etmq->decoder)
320 goto out_free;
321
322 /*
323 * Register a function to handle all memory accesses required by
324 * the trace decoder library.
325 */
326 if (cs_etm_decoder__add_mem_access_cb(etmq->decoder,
327 0x0L, ((u64) -1L),
328 cs_etm__mem_access))
329 goto out_free_decoder;
330
331 etmq->offset = 0;
332
333 return etmq;
334
335out_free_decoder:
336 cs_etm_decoder__free(etmq->decoder);
337out_free:
338 zfree(&etmq->event_buf);
339 free(etmq);
340
341 return NULL;
342}
343
344static int cs_etm__setup_queue(struct cs_etm_auxtrace *etm,
345 struct auxtrace_queue *queue,
346 unsigned int queue_nr)
347{
348 struct cs_etm_queue *etmq = queue->priv;
349
350 if (list_empty(&queue->head) || etmq)
351 return 0;
352
353 etmq = cs_etm__alloc_queue(etm, queue_nr);
354
355 if (!etmq)
356 return -ENOMEM;
357
358 queue->priv = etmq;
359
360 if (queue->cpu != -1)
361 etmq->cpu = queue->cpu;
362
363 etmq->tid = queue->tid;
364
365 return 0;
366}
367
368static int cs_etm__setup_queues(struct cs_etm_auxtrace *etm)
369{
370 unsigned int i;
371 int ret;
372
373 for (i = 0; i < etm->queues.nr_queues; i++) {
374 ret = cs_etm__setup_queue(etm, &etm->queues.queue_array[i], i);
375 if (ret)
376 return ret;
377 }
378
379 return 0;
380}
381
382static int cs_etm__update_queues(struct cs_etm_auxtrace *etm)
383{
384 if (etm->queues.new_data) {
385 etm->queues.new_data = false;
386 return cs_etm__setup_queues(etm);
387 }
388
389 return 0;
390}
391
392static int
393cs_etm__get_trace(struct cs_etm_buffer *buff, struct cs_etm_queue *etmq)
394{
395 struct auxtrace_buffer *aux_buffer = etmq->buffer;
396 struct auxtrace_buffer *old_buffer = aux_buffer;
397 struct auxtrace_queue *queue;
398
399 queue = &etmq->etm->queues.queue_array[etmq->queue_nr];
400
401 aux_buffer = auxtrace_buffer__next(queue, aux_buffer);
402
403 /* If no more data, drop the previous auxtrace_buffer and return */
404 if (!aux_buffer) {
405 if (old_buffer)
406 auxtrace_buffer__drop_data(old_buffer);
407 buff->len = 0;
408 return 0;
409 }
410
411 etmq->buffer = aux_buffer;
412
413 /* If the aux_buffer doesn't have data associated, try to load it */
414 if (!aux_buffer->data) {
415 /* get the file desc associated with the perf data file */
416 int fd = perf_data__fd(etmq->etm->session->data);
417
418 aux_buffer->data = auxtrace_buffer__get_data(aux_buffer, fd);
419 if (!aux_buffer->data)
420 return -ENOMEM;
421 }
422
423 /* If valid, drop the previous buffer */
424 if (old_buffer)
425 auxtrace_buffer__drop_data(old_buffer);
426
427 buff->offset = aux_buffer->offset;
428 buff->len = aux_buffer->size;
429 buff->buf = aux_buffer->data;
430
431 buff->ref_timestamp = aux_buffer->reference;
432
433 return buff->len;
434}
435
436static void cs_etm__set_pid_tid_cpu(struct cs_etm_auxtrace *etm,
437 struct auxtrace_queue *queue)
438{
439 struct cs_etm_queue *etmq = queue->priv;
440
441 /* CPU-wide tracing isn't supported yet */
442 if (queue->tid == -1)
443 return;
444
445 if ((!etmq->thread) && (etmq->tid != -1))
446 etmq->thread = machine__find_thread(etm->machine, -1,
447 etmq->tid);
448
449 if (etmq->thread) {
450 etmq->pid = etmq->thread->pid_;
451 if (queue->cpu == -1)
452 etmq->cpu = etmq->thread->cpu;
453 }
454}
455
456/*
457 * The cs etm packet encodes an instruction range between a branch target
458 * and the next taken branch. Generate sample accordingly.
459 */
460static int cs_etm__synth_branch_sample(struct cs_etm_queue *etmq,
461 struct cs_etm_packet *packet)
462{
463 int ret = 0;
464 struct cs_etm_auxtrace *etm = etmq->etm;
465 struct perf_sample sample = {.ip = 0,};
466 union perf_event *event = etmq->event_buf;
467 u64 start_addr = packet->start_addr;
468 u64 end_addr = packet->end_addr;
469
470 event->sample.header.type = PERF_RECORD_SAMPLE;
471 event->sample.header.misc = PERF_RECORD_MISC_USER;
472 event->sample.header.size = sizeof(struct perf_event_header);
473
474 sample.ip = start_addr;
475 sample.pid = etmq->pid;
476 sample.tid = etmq->tid;
477 sample.addr = end_addr;
478 sample.id = etmq->etm->branches_id;
479 sample.stream_id = etmq->etm->branches_id;
480 sample.period = 1;
481 sample.cpu = packet->cpu;
482 sample.flags = 0;
483 sample.cpumode = PERF_RECORD_MISC_USER;
484
485 ret = perf_session__deliver_synth_event(etm->session, event, &sample);
486
487 if (ret)
488 pr_err(
489 "CS ETM Trace: failed to deliver instruction event, error %d\n",
490 ret);
491
492 return ret;
493}
494
495struct cs_etm_synth {
496 struct perf_tool dummy_tool;
497 struct perf_session *session;
498};
499
500static int cs_etm__event_synth(struct perf_tool *tool,
501 union perf_event *event,
502 struct perf_sample *sample __maybe_unused,
503 struct machine *machine __maybe_unused)
504{
505 struct cs_etm_synth *cs_etm_synth =
506 container_of(tool, struct cs_etm_synth, dummy_tool);
507
508 return perf_session__deliver_synth_event(cs_etm_synth->session,
509 event, NULL);
510}
511
512static int cs_etm__synth_event(struct perf_session *session,
513 struct perf_event_attr *attr, u64 id)
514{
515 struct cs_etm_synth cs_etm_synth;
516
517 memset(&cs_etm_synth, 0, sizeof(struct cs_etm_synth));
518 cs_etm_synth.session = session;
519
520 return perf_event__synthesize_attr(&cs_etm_synth.dummy_tool, attr, 1,
521 &id, cs_etm__event_synth);
522}
523
524static int cs_etm__synth_events(struct cs_etm_auxtrace *etm,
525 struct perf_session *session)
526{
527 struct perf_evlist *evlist = session->evlist;
528 struct perf_evsel *evsel;
529 struct perf_event_attr attr;
530 bool found = false;
531 u64 id;
532 int err;
533
534 evlist__for_each_entry(evlist, evsel) {
535 if (evsel->attr.type == etm->pmu_type) {
536 found = true;
537 break;
538 }
539 }
540
541 if (!found) {
542 pr_debug("No selected events with CoreSight Trace data\n");
543 return 0;
544 }
545
546 memset(&attr, 0, sizeof(struct perf_event_attr));
547 attr.size = sizeof(struct perf_event_attr);
548 attr.type = PERF_TYPE_HARDWARE;
549 attr.sample_type = evsel->attr.sample_type & PERF_SAMPLE_MASK;
550 attr.sample_type |= PERF_SAMPLE_IP | PERF_SAMPLE_TID |
551 PERF_SAMPLE_PERIOD;
552 if (etm->timeless_decoding)
553 attr.sample_type &= ~(u64)PERF_SAMPLE_TIME;
554 else
555 attr.sample_type |= PERF_SAMPLE_TIME;
556
557 attr.exclude_user = evsel->attr.exclude_user;
558 attr.exclude_kernel = evsel->attr.exclude_kernel;
559 attr.exclude_hv = evsel->attr.exclude_hv;
560 attr.exclude_host = evsel->attr.exclude_host;
561 attr.exclude_guest = evsel->attr.exclude_guest;
562 attr.sample_id_all = evsel->attr.sample_id_all;
563 attr.read_format = evsel->attr.read_format;
564
565 /* create new id val to be a fixed offset from evsel id */
566 id = evsel->id[0] + 1000000000;
567
568 if (!id)
569 id = 1;
570
571 if (etm->synth_opts.branches) {
572 attr.config = PERF_COUNT_HW_BRANCH_INSTRUCTIONS;
573 attr.sample_period = 1;
574 attr.sample_type |= PERF_SAMPLE_ADDR;
575 err = cs_etm__synth_event(session, &attr, id);
576 if (err)
577 return err;
578 etm->sample_branches = true;
579 etm->branches_sample_type = attr.sample_type;
580 etm->branches_id = id;
581 }
582
583 return 0;
584}
585
586static int cs_etm__sample(struct cs_etm_queue *etmq)
587{
588 int ret;
589 struct cs_etm_packet packet;
590
591 while (1) {
592 ret = cs_etm_decoder__get_packet(etmq->decoder, &packet);
593 if (ret <= 0)
594 return ret;
595
596 /*
597 * If the packet contains an instruction range, generate an
598 * instruction sequence event.
599 */
600 if (packet.sample_type & CS_ETM_RANGE)
601 cs_etm__synth_branch_sample(etmq, &packet);
602 }
603
604 return 0;
605}
606
607static int cs_etm__run_decoder(struct cs_etm_queue *etmq)
608{
609 struct cs_etm_auxtrace *etm = etmq->etm;
610 struct cs_etm_buffer buffer;
611 size_t buffer_used, processed;
612 int err = 0;
613
614 if (!etm->kernel_start)
615 etm->kernel_start = machine__kernel_start(etm->machine);
616
617 /* Go through each buffer in the queue and decode them one by one */
618more:
619 buffer_used = 0;
620 memset(&buffer, 0, sizeof(buffer));
621 err = cs_etm__get_trace(&buffer, etmq);
622 if (err <= 0)
623 return err;
624 /*
625 * We cannot assume consecutive blocks in the data file are contiguous,
626 * reset the decoder to force re-sync.
627 */
628 err = cs_etm_decoder__reset(etmq->decoder);
629 if (err != 0)
630 return err;
631
632 /* Run trace decoder until buffer consumed or end of trace */
633 do {
634 processed = 0;
635
636 err = cs_etm_decoder__process_data_block(
637 etmq->decoder,
638 etmq->offset,
639 &buffer.buf[buffer_used],
640 buffer.len - buffer_used,
641 &processed);
642
643 if (err)
644 return err;
645
646 etmq->offset += processed;
647 buffer_used += processed;
648
649 /*
650 * Nothing to do with an error condition, let's hope the next
651 * chunk will be better.
652 */
653 err = cs_etm__sample(etmq);
654 } while (buffer.len > buffer_used);
655
656goto more;
657
658 return err;
659}
660
661static int cs_etm__process_timeless_queues(struct cs_etm_auxtrace *etm,
662 pid_t tid, u64 time_)
663{
664 unsigned int i;
665 struct auxtrace_queues *queues = &etm->queues;
666
667 for (i = 0; i < queues->nr_queues; i++) {
668 struct auxtrace_queue *queue = &etm->queues.queue_array[i];
669 struct cs_etm_queue *etmq = queue->priv;
670
671 if (etmq && ((tid == -1) || (etmq->tid == tid))) {
672 etmq->time = time_;
673 cs_etm__set_pid_tid_cpu(etm, queue);
674 cs_etm__run_decoder(etmq);
675 }
676 }
677
678 return 0;
679}
680
681static int cs_etm__process_event(struct perf_session *session,
682 union perf_event *event,
683 struct perf_sample *sample,
684 struct perf_tool *tool)
685{
686 int err = 0;
687 u64 timestamp;
688 struct cs_etm_auxtrace *etm = container_of(session->auxtrace,
689 struct cs_etm_auxtrace,
690 auxtrace);
691
692 if (dump_trace)
693 return 0;
694
695 if (!tool->ordered_events) {
696 pr_err("CoreSight ETM Trace requires ordered events\n");
697 return -EINVAL;
698 }
699
700 if (!etm->timeless_decoding)
701 return -EINVAL;
702
703 if (sample->time && (sample->time != (u64) -1))
704 timestamp = sample->time;
705 else
706 timestamp = 0;
707
708 if (timestamp || etm->timeless_decoding) {
709 err = cs_etm__update_queues(etm);
710 if (err)
711 return err;
712 }
713
714 if (event->header.type == PERF_RECORD_EXIT)
715 return cs_etm__process_timeless_queues(etm,
716 event->fork.tid,
717 sample->time);
718
719 return 0;
720}
721
722static int cs_etm__process_auxtrace_event(struct perf_session *session,
723 union perf_event *event,
724 struct perf_tool *tool __maybe_unused)
725{
726 struct cs_etm_auxtrace *etm = container_of(session->auxtrace,
727 struct cs_etm_auxtrace,
728 auxtrace);
729 if (!etm->data_queued) {
730 struct auxtrace_buffer *buffer;
731 off_t data_offset;
732 int fd = perf_data__fd(session->data);
733 bool is_pipe = perf_data__is_pipe(session->data);
734 int err;
735
736 if (is_pipe)
737 data_offset = 0;
738 else {
739 data_offset = lseek(fd, 0, SEEK_CUR);
740 if (data_offset == -1)
741 return -errno;
742 }
743
744 err = auxtrace_queues__add_event(&etm->queues, session,
745 event, data_offset, &buffer);
746 if (err)
747 return err;
748
749 if (dump_trace)
750 if (auxtrace_buffer__get_data(buffer, fd)) {
751 cs_etm__dump_event(etm, buffer);
752 auxtrace_buffer__put_data(buffer);
753 }
754 }
755
756 return 0;
757}
758
759static bool cs_etm__is_timeless_decoding(struct cs_etm_auxtrace *etm)
760{
761 struct perf_evsel *evsel;
762 struct perf_evlist *evlist = etm->session->evlist;
763 bool timeless_decoding = true;
764
765 /*
766 * Circle through the list of event and complain if we find one
767 * with the time bit set.
768 */
769 evlist__for_each_entry(evlist, evsel) {
770 if ((evsel->attr.sample_type & PERF_SAMPLE_TIME))
771 timeless_decoding = false;
772 }
773
774 return timeless_decoding;
775}
776
777static const char * const cs_etm_global_header_fmts[] = {
778 [CS_HEADER_VERSION_0] = " Header version %llx\n",
779 [CS_PMU_TYPE_CPUS] = " PMU type/num cpus %llx\n",
780 [CS_ETM_SNAPSHOT] = " Snapshot %llx\n",
781};
782
783static const char * const cs_etm_priv_fmts[] = {
784 [CS_ETM_MAGIC] = " Magic number %llx\n",
785 [CS_ETM_CPU] = " CPU %lld\n",
786 [CS_ETM_ETMCR] = " ETMCR %llx\n",
787 [CS_ETM_ETMTRACEIDR] = " ETMTRACEIDR %llx\n",
788 [CS_ETM_ETMCCER] = " ETMCCER %llx\n",
789 [CS_ETM_ETMIDR] = " ETMIDR %llx\n",
790};
791
792static const char * const cs_etmv4_priv_fmts[] = {
793 [CS_ETM_MAGIC] = " Magic number %llx\n",
794 [CS_ETM_CPU] = " CPU %lld\n",
795 [CS_ETMV4_TRCCONFIGR] = " TRCCONFIGR %llx\n",
796 [CS_ETMV4_TRCTRACEIDR] = " TRCTRACEIDR %llx\n",
797 [CS_ETMV4_TRCIDR0] = " TRCIDR0 %llx\n",
798 [CS_ETMV4_TRCIDR1] = " TRCIDR1 %llx\n",
799 [CS_ETMV4_TRCIDR2] = " TRCIDR2 %llx\n",
800 [CS_ETMV4_TRCIDR8] = " TRCIDR8 %llx\n",
801 [CS_ETMV4_TRCAUTHSTATUS] = " TRCAUTHSTATUS %llx\n",
802};
803
804static void cs_etm__print_auxtrace_info(u64 *val, int num)
805{
806 int i, j, cpu = 0;
807
808 for (i = 0; i < CS_HEADER_VERSION_0_MAX; i++)
809 fprintf(stdout, cs_etm_global_header_fmts[i], val[i]);
810
811 for (i = CS_HEADER_VERSION_0_MAX; cpu < num; cpu++) {
812 if (val[i] == __perf_cs_etmv3_magic)
813 for (j = 0; j < CS_ETM_PRIV_MAX; j++, i++)
814 fprintf(stdout, cs_etm_priv_fmts[j], val[i]);
815 else if (val[i] == __perf_cs_etmv4_magic)
816 for (j = 0; j < CS_ETMV4_PRIV_MAX; j++, i++)
817 fprintf(stdout, cs_etmv4_priv_fmts[j], val[i]);
818 else
819 /* failure.. return */
820 return;
821 }
822}
823
824int cs_etm__process_auxtrace_info(union perf_event *event,
825 struct perf_session *session)
826{
827 struct auxtrace_info_event *auxtrace_info = &event->auxtrace_info;
828 struct cs_etm_auxtrace *etm = NULL;
829 struct int_node *inode;
830 unsigned int pmu_type;
831 int event_header_size = sizeof(struct perf_event_header);
832 int info_header_size;
833 int total_size = auxtrace_info->header.size;
834 int priv_size = 0;
835 int num_cpu;
836 int err = 0, idx = -1;
837 int i, j, k;
838 u64 *ptr, *hdr = NULL;
839 u64 **metadata = NULL;
840
841 /*
842 * sizeof(auxtrace_info_event::type) +
843 * sizeof(auxtrace_info_event::reserved) == 8
844 */
845 info_header_size = 8;
846
847 if (total_size < (event_header_size + info_header_size))
848 return -EINVAL;
849
850 priv_size = total_size - event_header_size - info_header_size;
851
852 /* First the global part */
853 ptr = (u64 *) auxtrace_info->priv;
854
855 /* Look for version '0' of the header */
856 if (ptr[0] != 0)
857 return -EINVAL;
858
859 hdr = zalloc(sizeof(*hdr) * CS_HEADER_VERSION_0_MAX);
860 if (!hdr)
861 return -ENOMEM;
862
863 /* Extract header information - see cs-etm.h for format */
864 for (i = 0; i < CS_HEADER_VERSION_0_MAX; i++)
865 hdr[i] = ptr[i];
866 num_cpu = hdr[CS_PMU_TYPE_CPUS] & 0xffffffff;
867 pmu_type = (unsigned int) ((hdr[CS_PMU_TYPE_CPUS] >> 32) &
868 0xffffffff);
869
870 /*
871 * Create an RB tree for traceID-CPU# tuple. Since the conversion has
872 * to be made for each packet that gets decoded, optimizing access in
873 * anything other than a sequential array is worth doing.
874 */
875 traceid_list = intlist__new(NULL);
876 if (!traceid_list) {
877 err = -ENOMEM;
878 goto err_free_hdr;
879 }
880
881 metadata = zalloc(sizeof(*metadata) * num_cpu);
882 if (!metadata) {
883 err = -ENOMEM;
884 goto err_free_traceid_list;
885 }
886
887 /*
888 * The metadata is stored in the auxtrace_info section and encodes
889 * the configuration of the ARM embedded trace macrocell which is
890 * required by the trace decoder to properly decode the trace due
891 * to its highly compressed nature.
892 */
893 for (j = 0; j < num_cpu; j++) {
894 if (ptr[i] == __perf_cs_etmv3_magic) {
895 metadata[j] = zalloc(sizeof(*metadata[j]) *
896 CS_ETM_PRIV_MAX);
897 if (!metadata[j]) {
898 err = -ENOMEM;
899 goto err_free_metadata;
900 }
901 for (k = 0; k < CS_ETM_PRIV_MAX; k++)
902 metadata[j][k] = ptr[i + k];
903
904 /* The traceID is our handle */
905 idx = metadata[j][CS_ETM_ETMTRACEIDR];
906 i += CS_ETM_PRIV_MAX;
907 } else if (ptr[i] == __perf_cs_etmv4_magic) {
908 metadata[j] = zalloc(sizeof(*metadata[j]) *
909 CS_ETMV4_PRIV_MAX);
910 if (!metadata[j]) {
911 err = -ENOMEM;
912 goto err_free_metadata;
913 }
914 for (k = 0; k < CS_ETMV4_PRIV_MAX; k++)
915 metadata[j][k] = ptr[i + k];
916
917 /* The traceID is our handle */
918 idx = metadata[j][CS_ETMV4_TRCTRACEIDR];
919 i += CS_ETMV4_PRIV_MAX;
920 }
921
922 /* Get an RB node for this CPU */
923 inode = intlist__findnew(traceid_list, idx);
924
925 /* Something went wrong, no need to continue */
926 if (!inode) {
927 err = PTR_ERR(inode);
928 goto err_free_metadata;
929 }
930
931 /*
932 * The node for that CPU should not be taken.
933 * Back out if that's the case.
934 */
935 if (inode->priv) {
936 err = -EINVAL;
937 goto err_free_metadata;
938 }
939 /* All good, associate the traceID with the CPU# */
940 inode->priv = &metadata[j][CS_ETM_CPU];
941 }
942
943 /*
944 * Each of CS_HEADER_VERSION_0_MAX, CS_ETM_PRIV_MAX and
945 * CS_ETMV4_PRIV_MAX mark how many double words are in the
946 * global metadata, and each cpu's metadata respectively.
947 * The following tests if the correct number of double words was
948 * present in the auxtrace info section.
949 */
950 if (i * 8 != priv_size) {
951 err = -EINVAL;
952 goto err_free_metadata;
953 }
954
955 etm = zalloc(sizeof(*etm));
956
957 if (!etm) {
958 err = -ENOMEM;
959 goto err_free_metadata;
960 }
961
962 err = auxtrace_queues__init(&etm->queues);
963 if (err)
964 goto err_free_etm;
965
966 etm->session = session;
967 etm->machine = &session->machines.host;
968
969 etm->num_cpu = num_cpu;
970 etm->pmu_type = pmu_type;
971 etm->snapshot_mode = (hdr[CS_ETM_SNAPSHOT] != 0);
972 etm->metadata = metadata;
973 etm->auxtrace_type = auxtrace_info->type;
974 etm->timeless_decoding = cs_etm__is_timeless_decoding(etm);
975
976 etm->auxtrace.process_event = cs_etm__process_event;
977 etm->auxtrace.process_auxtrace_event = cs_etm__process_auxtrace_event;
978 etm->auxtrace.flush_events = cs_etm__flush_events;
979 etm->auxtrace.free_events = cs_etm__free_events;
980 etm->auxtrace.free = cs_etm__free;
981 session->auxtrace = &etm->auxtrace;
982
983 if (dump_trace) {
984 cs_etm__print_auxtrace_info(auxtrace_info->priv, num_cpu);
985 return 0;
986 }
987
988 if (session->itrace_synth_opts && session->itrace_synth_opts->set) {
989 etm->synth_opts = *session->itrace_synth_opts;
990 } else {
991 itrace_synth_opts__set_default(&etm->synth_opts);
992 etm->synth_opts.callchain = false;
993 }
994
995 err = cs_etm__synth_events(etm, session);
996 if (err)
997 goto err_free_queues;
998
999 err = auxtrace_queues__process_index(&etm->queues, session);
1000 if (err)
1001 goto err_free_queues;
1002
1003 etm->data_queued = etm->queues.populated;
1004
1005 return 0;
1006
1007err_free_queues:
1008 auxtrace_queues__free(&etm->queues);
1009 session->auxtrace = NULL;
1010err_free_etm:
1011 zfree(&etm);
1012err_free_metadata:
1013 /* No need to check @metadata[j], free(NULL) is supported */
1014 for (j = 0; j < num_cpu; j++)
1015 free(metadata[j]);
1016 zfree(&metadata);
1017err_free_traceid_list:
1018 intlist__delete(traceid_list);
1019err_free_hdr:
1020 zfree(&hdr);
1021
1022 return -EINVAL;
1023}
diff --git a/tools/perf/util/cs-etm.h b/tools/perf/util/cs-etm.h
index 3cc6bc3263fe..5864d5dca616 100644
--- a/tools/perf/util/cs-etm.h
+++ b/tools/perf/util/cs-etm.h
@@ -18,6 +18,9 @@
18#ifndef INCLUDE__UTIL_PERF_CS_ETM_H__ 18#ifndef INCLUDE__UTIL_PERF_CS_ETM_H__
19#define INCLUDE__UTIL_PERF_CS_ETM_H__ 19#define INCLUDE__UTIL_PERF_CS_ETM_H__
20 20
21#include "util/event.h"
22#include "util/session.h"
23
21/* Versionning header in case things need tro change in the future. That way 24/* Versionning header in case things need tro change in the future. That way
22 * decoding of old snapshot is still possible. 25 * decoding of old snapshot is still possible.
23 */ 26 */
@@ -61,6 +64,9 @@ enum {
61 CS_ETMV4_PRIV_MAX, 64 CS_ETMV4_PRIV_MAX,
62}; 65};
63 66
67/* RB tree for quick conversion between traceID and CPUs */
68struct intlist *traceid_list;
69
64#define KiB(x) ((x) * 1024) 70#define KiB(x) ((x) * 1024)
65#define MiB(x) ((x) * 1024 * 1024) 71#define MiB(x) ((x) * 1024 * 1024)
66 72
@@ -71,4 +77,16 @@ static const u64 __perf_cs_etmv4_magic = 0x4040404040404040ULL;
71#define CS_ETMV3_PRIV_SIZE (CS_ETM_PRIV_MAX * sizeof(u64)) 77#define CS_ETMV3_PRIV_SIZE (CS_ETM_PRIV_MAX * sizeof(u64))
72#define CS_ETMV4_PRIV_SIZE (CS_ETMV4_PRIV_MAX * sizeof(u64)) 78#define CS_ETMV4_PRIV_SIZE (CS_ETMV4_PRIV_MAX * sizeof(u64))
73 79
80#ifdef HAVE_CSTRACE_SUPPORT
81int cs_etm__process_auxtrace_info(union perf_event *event,
82 struct perf_session *session);
83#else
84static inline int
85cs_etm__process_auxtrace_info(union perf_event *event __maybe_unused,
86 struct perf_session *session __maybe_unused)
87{
88 return -1;
89}
90#endif
91
74#endif 92#endif
diff --git a/tools/perf/util/data-convert-bt.c b/tools/perf/util/data-convert-bt.c
index 2346cecb8ea2..5744c12641a5 100644
--- a/tools/perf/util/data-convert-bt.c
+++ b/tools/perf/util/data-convert-bt.c
@@ -1577,10 +1577,10 @@ int bt_convert__perf2ctf(const char *input, const char *path,
1577 struct perf_data_convert_opts *opts) 1577 struct perf_data_convert_opts *opts)
1578{ 1578{
1579 struct perf_session *session; 1579 struct perf_session *session;
1580 struct perf_data_file file = { 1580 struct perf_data data = {
1581 .path = input, 1581 .file.path = input,
1582 .mode = PERF_DATA_MODE_READ, 1582 .mode = PERF_DATA_MODE_READ,
1583 .force = opts->force, 1583 .force = opts->force,
1584 }; 1584 };
1585 struct convert c = { 1585 struct convert c = {
1586 .tool = { 1586 .tool = {
@@ -1619,7 +1619,7 @@ int bt_convert__perf2ctf(const char *input, const char *path,
1619 1619
1620 err = -1; 1620 err = -1;
1621 /* perf.data session */ 1621 /* perf.data session */
1622 session = perf_session__new(&file, 0, &c.tool); 1622 session = perf_session__new(&data, 0, &c.tool);
1623 if (!session) 1623 if (!session)
1624 goto free_writer; 1624 goto free_writer;
1625 1625
@@ -1650,7 +1650,7 @@ int bt_convert__perf2ctf(const char *input, const char *path,
1650 1650
1651 fprintf(stderr, 1651 fprintf(stderr,
1652 "[ perf data convert: Converted '%s' into CTF data '%s' ]\n", 1652 "[ perf data convert: Converted '%s' into CTF data '%s' ]\n",
1653 file.path, path); 1653 data.file.path, path);
1654 1654
1655 fprintf(stderr, 1655 fprintf(stderr,
1656 "[ perf data convert: Converted and wrote %.3f MB (%" PRIu64 " samples", 1656 "[ perf data convert: Converted and wrote %.3f MB (%" PRIu64 " samples",
diff --git a/tools/perf/util/data.c b/tools/perf/util/data.c
index 79192758bdb3..d8cfc19ddb10 100644
--- a/tools/perf/util/data.c
+++ b/tools/perf/util/data.c
@@ -4,6 +4,7 @@
4#include <sys/types.h> 4#include <sys/types.h>
5#include <sys/stat.h> 5#include <sys/stat.h>
6#include <errno.h> 6#include <errno.h>
7#include <fcntl.h>
7#include <unistd.h> 8#include <unistd.h>
8#include <string.h> 9#include <string.h>
9 10
@@ -11,66 +12,56 @@
11#include "util.h" 12#include "util.h"
12#include "debug.h" 13#include "debug.h"
13 14
14#ifndef O_CLOEXEC 15static bool check_pipe(struct perf_data *data)
15#ifdef __sparc__
16#define O_CLOEXEC 0x400000
17#elif defined(__alpha__) || defined(__hppa__)
18#define O_CLOEXEC 010000000
19#else
20#define O_CLOEXEC 02000000
21#endif
22#endif
23
24static bool check_pipe(struct perf_data_file *file)
25{ 16{
26 struct stat st; 17 struct stat st;
27 bool is_pipe = false; 18 bool is_pipe = false;
28 int fd = perf_data_file__is_read(file) ? 19 int fd = perf_data__is_read(data) ?
29 STDIN_FILENO : STDOUT_FILENO; 20 STDIN_FILENO : STDOUT_FILENO;
30 21
31 if (!file->path) { 22 if (!data->file.path) {
32 if (!fstat(fd, &st) && S_ISFIFO(st.st_mode)) 23 if (!fstat(fd, &st) && S_ISFIFO(st.st_mode))
33 is_pipe = true; 24 is_pipe = true;
34 } else { 25 } else {
35 if (!strcmp(file->path, "-")) 26 if (!strcmp(data->file.path, "-"))
36 is_pipe = true; 27 is_pipe = true;
37 } 28 }
38 29
39 if (is_pipe) 30 if (is_pipe)
40 file->fd = fd; 31 data->file.fd = fd;
41 32
42 return file->is_pipe = is_pipe; 33 return data->is_pipe = is_pipe;
43} 34}
44 35
45static int check_backup(struct perf_data_file *file) 36static int check_backup(struct perf_data *data)
46{ 37{
47 struct stat st; 38 struct stat st;
48 39
49 if (!stat(file->path, &st) && st.st_size) { 40 if (!stat(data->file.path, &st) && st.st_size) {
50 /* TODO check errors properly */ 41 /* TODO check errors properly */
51 char oldname[PATH_MAX]; 42 char oldname[PATH_MAX];
52 snprintf(oldname, sizeof(oldname), "%s.old", 43 snprintf(oldname, sizeof(oldname), "%s.old",
53 file->path); 44 data->file.path);
54 unlink(oldname); 45 unlink(oldname);
55 rename(file->path, oldname); 46 rename(data->file.path, oldname);
56 } 47 }
57 48
58 return 0; 49 return 0;
59} 50}
60 51
61static int open_file_read(struct perf_data_file *file) 52static int open_file_read(struct perf_data *data)
62{ 53{
63 struct stat st; 54 struct stat st;
64 int fd; 55 int fd;
65 char sbuf[STRERR_BUFSIZE]; 56 char sbuf[STRERR_BUFSIZE];
66 57
67 fd = open(file->path, O_RDONLY); 58 fd = open(data->file.path, O_RDONLY);
68 if (fd < 0) { 59 if (fd < 0) {
69 int err = errno; 60 int err = errno;
70 61
71 pr_err("failed to open %s: %s", file->path, 62 pr_err("failed to open %s: %s", data->file.path,
72 str_error_r(err, sbuf, sizeof(sbuf))); 63 str_error_r(err, sbuf, sizeof(sbuf)));
73 if (err == ENOENT && !strcmp(file->path, "perf.data")) 64 if (err == ENOENT && !strcmp(data->file.path, "perf.data"))
74 pr_err(" (try 'perf record' first)"); 65 pr_err(" (try 'perf record' first)");
75 pr_err("\n"); 66 pr_err("\n");
76 return -err; 67 return -err;
@@ -79,19 +70,19 @@ static int open_file_read(struct perf_data_file *file)
79 if (fstat(fd, &st) < 0) 70 if (fstat(fd, &st) < 0)
80 goto out_close; 71 goto out_close;
81 72
82 if (!file->force && st.st_uid && (st.st_uid != geteuid())) { 73 if (!data->force && st.st_uid && (st.st_uid != geteuid())) {
83 pr_err("File %s not owned by current user or root (use -f to override)\n", 74 pr_err("File %s not owned by current user or root (use -f to override)\n",
84 file->path); 75 data->file.path);
85 goto out_close; 76 goto out_close;
86 } 77 }
87 78
88 if (!st.st_size) { 79 if (!st.st_size) {
89 pr_info("zero-sized file (%s), nothing to do!\n", 80 pr_info("zero-sized data (%s), nothing to do!\n",
90 file->path); 81 data->file.path);
91 goto out_close; 82 goto out_close;
92 } 83 }
93 84
94 file->size = st.st_size; 85 data->size = st.st_size;
95 return fd; 86 return fd;
96 87
97 out_close: 88 out_close:
@@ -99,49 +90,49 @@ static int open_file_read(struct perf_data_file *file)
99 return -1; 90 return -1;
100} 91}
101 92
102static int open_file_write(struct perf_data_file *file) 93static int open_file_write(struct perf_data *data)
103{ 94{
104 int fd; 95 int fd;
105 char sbuf[STRERR_BUFSIZE]; 96 char sbuf[STRERR_BUFSIZE];
106 97
107 if (check_backup(file)) 98 if (check_backup(data))
108 return -1; 99 return -1;
109 100
110 fd = open(file->path, O_CREAT|O_RDWR|O_TRUNC|O_CLOEXEC, 101 fd = open(data->file.path, O_CREAT|O_RDWR|O_TRUNC|O_CLOEXEC,
111 S_IRUSR|S_IWUSR); 102 S_IRUSR|S_IWUSR);
112 103
113 if (fd < 0) 104 if (fd < 0)
114 pr_err("failed to open %s : %s\n", file->path, 105 pr_err("failed to open %s : %s\n", data->file.path,
115 str_error_r(errno, sbuf, sizeof(sbuf))); 106 str_error_r(errno, sbuf, sizeof(sbuf)));
116 107
117 return fd; 108 return fd;
118} 109}
119 110
120static int open_file(struct perf_data_file *file) 111static int open_file(struct perf_data *data)
121{ 112{
122 int fd; 113 int fd;
123 114
124 fd = perf_data_file__is_read(file) ? 115 fd = perf_data__is_read(data) ?
125 open_file_read(file) : open_file_write(file); 116 open_file_read(data) : open_file_write(data);
126 117
127 file->fd = fd; 118 data->file.fd = fd;
128 return fd < 0 ? -1 : 0; 119 return fd < 0 ? -1 : 0;
129} 120}
130 121
131int perf_data_file__open(struct perf_data_file *file) 122int perf_data__open(struct perf_data *data)
132{ 123{
133 if (check_pipe(file)) 124 if (check_pipe(data))
134 return 0; 125 return 0;
135 126
136 if (!file->path) 127 if (!data->file.path)
137 file->path = "perf.data"; 128 data->file.path = "perf.data";
138 129
139 return open_file(file); 130 return open_file(data);
140} 131}
141 132
142void perf_data_file__close(struct perf_data_file *file) 133void perf_data__close(struct perf_data *data)
143{ 134{
144 close(file->fd); 135 close(data->file.fd);
145} 136}
146 137
147ssize_t perf_data_file__write(struct perf_data_file *file, 138ssize_t perf_data_file__write(struct perf_data_file *file,
@@ -150,42 +141,48 @@ ssize_t perf_data_file__write(struct perf_data_file *file,
150 return writen(file->fd, buf, size); 141 return writen(file->fd, buf, size);
151} 142}
152 143
153int perf_data_file__switch(struct perf_data_file *file, 144ssize_t perf_data__write(struct perf_data *data,
145 void *buf, size_t size)
146{
147 return perf_data_file__write(&data->file, buf, size);
148}
149
150int perf_data__switch(struct perf_data *data,
154 const char *postfix, 151 const char *postfix,
155 size_t pos, bool at_exit) 152 size_t pos, bool at_exit)
156{ 153{
157 char *new_filepath; 154 char *new_filepath;
158 int ret; 155 int ret;
159 156
160 if (check_pipe(file)) 157 if (check_pipe(data))
161 return -EINVAL; 158 return -EINVAL;
162 if (perf_data_file__is_read(file)) 159 if (perf_data__is_read(data))
163 return -EINVAL; 160 return -EINVAL;
164 161
165 if (asprintf(&new_filepath, "%s.%s", file->path, postfix) < 0) 162 if (asprintf(&new_filepath, "%s.%s", data->file.path, postfix) < 0)
166 return -ENOMEM; 163 return -ENOMEM;
167 164
168 /* 165 /*
169 * Only fire a warning, don't return error, continue fill 166 * Only fire a warning, don't return error, continue fill
170 * original file. 167 * original file.
171 */ 168 */
172 if (rename(file->path, new_filepath)) 169 if (rename(data->file.path, new_filepath))
173 pr_warning("Failed to rename %s to %s\n", file->path, new_filepath); 170 pr_warning("Failed to rename %s to %s\n", data->file.path, new_filepath);
174 171
175 if (!at_exit) { 172 if (!at_exit) {
176 close(file->fd); 173 close(data->file.fd);
177 ret = perf_data_file__open(file); 174 ret = perf_data__open(data);
178 if (ret < 0) 175 if (ret < 0)
179 goto out; 176 goto out;
180 177
181 if (lseek(file->fd, pos, SEEK_SET) == (off_t)-1) { 178 if (lseek(data->file.fd, pos, SEEK_SET) == (off_t)-1) {
182 ret = -errno; 179 ret = -errno;
183 pr_debug("Failed to lseek to %zu: %s", 180 pr_debug("Failed to lseek to %zu: %s",
184 pos, strerror(errno)); 181 pos, strerror(errno));
185 goto out; 182 goto out;
186 } 183 }
187 } 184 }
188 ret = file->fd; 185 ret = data->file.fd;
189out: 186out:
190 free(new_filepath); 187 free(new_filepath);
191 return ret; 188 return ret;
diff --git a/tools/perf/util/data.h b/tools/perf/util/data.h
index 80241ba78101..4828f7feea89 100644
--- a/tools/perf/util/data.h
+++ b/tools/perf/util/data.h
@@ -10,51 +10,57 @@ enum perf_data_mode {
10}; 10};
11 11
12struct perf_data_file { 12struct perf_data_file {
13 const char *path; 13 const char *path;
14 int fd; 14 int fd;
15};
16
17struct perf_data {
18 struct perf_data_file file;
15 bool is_pipe; 19 bool is_pipe;
16 bool force; 20 bool force;
17 unsigned long size; 21 unsigned long size;
18 enum perf_data_mode mode; 22 enum perf_data_mode mode;
19}; 23};
20 24
21static inline bool perf_data_file__is_read(struct perf_data_file *file) 25static inline bool perf_data__is_read(struct perf_data *data)
22{ 26{
23 return file->mode == PERF_DATA_MODE_READ; 27 return data->mode == PERF_DATA_MODE_READ;
24} 28}
25 29
26static inline bool perf_data_file__is_write(struct perf_data_file *file) 30static inline bool perf_data__is_write(struct perf_data *data)
27{ 31{
28 return file->mode == PERF_DATA_MODE_WRITE; 32 return data->mode == PERF_DATA_MODE_WRITE;
29} 33}
30 34
31static inline int perf_data_file__is_pipe(struct perf_data_file *file) 35static inline int perf_data__is_pipe(struct perf_data *data)
32{ 36{
33 return file->is_pipe; 37 return data->is_pipe;
34} 38}
35 39
36static inline int perf_data_file__fd(struct perf_data_file *file) 40static inline int perf_data__fd(struct perf_data *data)
37{ 41{
38 return file->fd; 42 return data->file.fd;
39} 43}
40 44
41static inline unsigned long perf_data_file__size(struct perf_data_file *file) 45static inline unsigned long perf_data__size(struct perf_data *data)
42{ 46{
43 return file->size; 47 return data->size;
44} 48}
45 49
46int perf_data_file__open(struct perf_data_file *file); 50int perf_data__open(struct perf_data *data);
47void perf_data_file__close(struct perf_data_file *file); 51void perf_data__close(struct perf_data *data);
52ssize_t perf_data__write(struct perf_data *data,
53 void *buf, size_t size);
48ssize_t perf_data_file__write(struct perf_data_file *file, 54ssize_t perf_data_file__write(struct perf_data_file *file,
49 void *buf, size_t size); 55 void *buf, size_t size);
50/* 56/*
51 * If at_exit is set, only rename current perf.data to 57 * If at_exit is set, only rename current perf.data to
52 * perf.data.<postfix>, continue write on original file. 58 * perf.data.<postfix>, continue write on original data.
53 * Set at_exit when flushing the last output. 59 * Set at_exit when flushing the last output.
54 * 60 *
55 * Return value is fd of new output. 61 * Return value is fd of new output.
56 */ 62 */
57int perf_data_file__switch(struct perf_data_file *file, 63int perf_data__switch(struct perf_data *data,
58 const char *postfix, 64 const char *postfix,
59 size_t pos, bool at_exit); 65 size_t pos, bool at_exit);
60#endif /* __PERF_DATA_H */ 66#endif /* __PERF_DATA_H */
diff --git a/tools/perf/util/debug.c b/tools/perf/util/debug.c
index dc8b53b6950e..f3a71db83947 100644
--- a/tools/perf/util/debug.c
+++ b/tools/perf/util/debug.c
@@ -112,50 +112,53 @@ int dump_printf(const char *fmt, ...)
112 return ret; 112 return ret;
113} 113}
114 114
115static void trace_event_printer(enum binary_printer_ops op, 115static int trace_event_printer(enum binary_printer_ops op,
116 unsigned int val, void *extra) 116 unsigned int val, void *extra, FILE *fp)
117{ 117{
118 const char *color = PERF_COLOR_BLUE; 118 const char *color = PERF_COLOR_BLUE;
119 union perf_event *event = (union perf_event *)extra; 119 union perf_event *event = (union perf_event *)extra;
120 unsigned char ch = (unsigned char)val; 120 unsigned char ch = (unsigned char)val;
121 int printed = 0;
121 122
122 switch (op) { 123 switch (op) {
123 case BINARY_PRINT_DATA_BEGIN: 124 case BINARY_PRINT_DATA_BEGIN:
124 printf("."); 125 printed += fprintf(fp, ".");
125 color_fprintf(stdout, color, "\n. ... raw event: size %d bytes\n", 126 printed += color_fprintf(fp, color, "\n. ... raw event: size %d bytes\n",
126 event->header.size); 127 event->header.size);
127 break; 128 break;
128 case BINARY_PRINT_LINE_BEGIN: 129 case BINARY_PRINT_LINE_BEGIN:
129 printf("."); 130 printed += fprintf(fp, ".");
130 break; 131 break;
131 case BINARY_PRINT_ADDR: 132 case BINARY_PRINT_ADDR:
132 color_fprintf(stdout, color, " %04x: ", val); 133 printed += color_fprintf(fp, color, " %04x: ", val);
133 break; 134 break;
134 case BINARY_PRINT_NUM_DATA: 135 case BINARY_PRINT_NUM_DATA:
135 color_fprintf(stdout, color, " %02x", val); 136 printed += color_fprintf(fp, color, " %02x", val);
136 break; 137 break;
137 case BINARY_PRINT_NUM_PAD: 138 case BINARY_PRINT_NUM_PAD:
138 color_fprintf(stdout, color, " "); 139 printed += color_fprintf(fp, color, " ");
139 break; 140 break;
140 case BINARY_PRINT_SEP: 141 case BINARY_PRINT_SEP:
141 color_fprintf(stdout, color, " "); 142 printed += color_fprintf(fp, color, " ");
142 break; 143 break;
143 case BINARY_PRINT_CHAR_DATA: 144 case BINARY_PRINT_CHAR_DATA:
144 color_fprintf(stdout, color, "%c", 145 printed += color_fprintf(fp, color, "%c",
145 isprint(ch) ? ch : '.'); 146 isprint(ch) ? ch : '.');
146 break; 147 break;
147 case BINARY_PRINT_CHAR_PAD: 148 case BINARY_PRINT_CHAR_PAD:
148 color_fprintf(stdout, color, " "); 149 printed += color_fprintf(fp, color, " ");
149 break; 150 break;
150 case BINARY_PRINT_LINE_END: 151 case BINARY_PRINT_LINE_END:
151 color_fprintf(stdout, color, "\n"); 152 printed += color_fprintf(fp, color, "\n");
152 break; 153 break;
153 case BINARY_PRINT_DATA_END: 154 case BINARY_PRINT_DATA_END:
154 printf("\n"); 155 printed += fprintf(fp, "\n");
155 break; 156 break;
156 default: 157 default:
157 break; 158 break;
158 } 159 }
160
161 return printed;
159} 162}
160 163
161void trace_event(union perf_event *event) 164void trace_event(union perf_event *event)
diff --git a/tools/perf/util/dso.c b/tools/perf/util/dso.c
index 00c98c968cb1..36ef45b2e89d 100644
--- a/tools/perf/util/dso.c
+++ b/tools/perf/util/dso.c
@@ -7,9 +7,11 @@
7#include <sys/stat.h> 7#include <sys/stat.h>
8#include <unistd.h> 8#include <unistd.h>
9#include <errno.h> 9#include <errno.h>
10#include <fcntl.h>
10#include "compress.h" 11#include "compress.h"
11#include "path.h" 12#include "path.h"
12#include "symbol.h" 13#include "symbol.h"
14#include "srcline.h"
13#include "dso.h" 15#include "dso.h"
14#include "machine.h" 16#include "machine.h"
15#include "auxtrace.h" 17#include "auxtrace.h"
@@ -444,7 +446,7 @@ static int do_open(char *name)
444 char sbuf[STRERR_BUFSIZE]; 446 char sbuf[STRERR_BUFSIZE];
445 447
446 do { 448 do {
447 fd = open(name, O_RDONLY); 449 fd = open(name, O_RDONLY|O_CLOEXEC);
448 if (fd >= 0) 450 if (fd >= 0)
449 return fd; 451 return fd;
450 452
@@ -1201,6 +1203,8 @@ struct dso *dso__new(const char *name)
1201 for (i = 0; i < MAP__NR_TYPES; ++i) 1203 for (i = 0; i < MAP__NR_TYPES; ++i)
1202 dso->symbols[i] = dso->symbol_names[i] = RB_ROOT; 1204 dso->symbols[i] = dso->symbol_names[i] = RB_ROOT;
1203 dso->data.cache = RB_ROOT; 1205 dso->data.cache = RB_ROOT;
1206 dso->inlined_nodes = RB_ROOT;
1207 dso->srclines = RB_ROOT;
1204 dso->data.fd = -1; 1208 dso->data.fd = -1;
1205 dso->data.status = DSO_DATA_STATUS_UNKNOWN; 1209 dso->data.status = DSO_DATA_STATUS_UNKNOWN;
1206 dso->symtab_type = DSO_BINARY_TYPE__NOT_FOUND; 1210 dso->symtab_type = DSO_BINARY_TYPE__NOT_FOUND;
@@ -1232,6 +1236,10 @@ void dso__delete(struct dso *dso)
1232 if (!RB_EMPTY_NODE(&dso->rb_node)) 1236 if (!RB_EMPTY_NODE(&dso->rb_node))
1233 pr_err("DSO %s is still in rbtree when being deleted!\n", 1237 pr_err("DSO %s is still in rbtree when being deleted!\n",
1234 dso->long_name); 1238 dso->long_name);
1239
1240 /* free inlines first, as they reference symbols */
1241 inlines__tree_delete(&dso->inlined_nodes);
1242 srcline__tree_delete(&dso->srclines);
1235 for (i = 0; i < MAP__NR_TYPES; ++i) 1243 for (i = 0; i < MAP__NR_TYPES; ++i)
1236 symbols__delete(&dso->symbols[i]); 1244 symbols__delete(&dso->symbols[i]);
1237 1245
@@ -1366,9 +1374,9 @@ void __dsos__add(struct dsos *dsos, struct dso *dso)
1366 1374
1367void dsos__add(struct dsos *dsos, struct dso *dso) 1375void dsos__add(struct dsos *dsos, struct dso *dso)
1368{ 1376{
1369 pthread_rwlock_wrlock(&dsos->lock); 1377 down_write(&dsos->lock);
1370 __dsos__add(dsos, dso); 1378 __dsos__add(dsos, dso);
1371 pthread_rwlock_unlock(&dsos->lock); 1379 up_write(&dsos->lock);
1372} 1380}
1373 1381
1374struct dso *__dsos__find(struct dsos *dsos, const char *name, bool cmp_short) 1382struct dso *__dsos__find(struct dsos *dsos, const char *name, bool cmp_short)
@@ -1387,9 +1395,9 @@ struct dso *__dsos__find(struct dsos *dsos, const char *name, bool cmp_short)
1387struct dso *dsos__find(struct dsos *dsos, const char *name, bool cmp_short) 1395struct dso *dsos__find(struct dsos *dsos, const char *name, bool cmp_short)
1388{ 1396{
1389 struct dso *dso; 1397 struct dso *dso;
1390 pthread_rwlock_rdlock(&dsos->lock); 1398 down_read(&dsos->lock);
1391 dso = __dsos__find(dsos, name, cmp_short); 1399 dso = __dsos__find(dsos, name, cmp_short);
1392 pthread_rwlock_unlock(&dsos->lock); 1400 up_read(&dsos->lock);
1393 return dso; 1401 return dso;
1394} 1402}
1395 1403
@@ -1416,9 +1424,9 @@ struct dso *__dsos__findnew(struct dsos *dsos, const char *name)
1416struct dso *dsos__findnew(struct dsos *dsos, const char *name) 1424struct dso *dsos__findnew(struct dsos *dsos, const char *name)
1417{ 1425{
1418 struct dso *dso; 1426 struct dso *dso;
1419 pthread_rwlock_wrlock(&dsos->lock); 1427 down_write(&dsos->lock);
1420 dso = dso__get(__dsos__findnew(dsos, name)); 1428 dso = dso__get(__dsos__findnew(dsos, name));
1421 pthread_rwlock_unlock(&dsos->lock); 1429 up_write(&dsos->lock);
1422 return dso; 1430 return dso;
1423} 1431}
1424 1432
diff --git a/tools/perf/util/dso.h b/tools/perf/util/dso.h
index 926ff2e7f668..c229dbe0277a 100644
--- a/tools/perf/util/dso.h
+++ b/tools/perf/util/dso.h
@@ -7,7 +7,7 @@
7#include <linux/rbtree.h> 7#include <linux/rbtree.h>
8#include <sys/types.h> 8#include <sys/types.h>
9#include <stdbool.h> 9#include <stdbool.h>
10#include <pthread.h> 10#include "rwsem.h"
11#include <linux/types.h> 11#include <linux/types.h>
12#include <linux/bitops.h> 12#include <linux/bitops.h>
13#include "map.h" 13#include "map.h"
@@ -130,7 +130,7 @@ struct dso_cache {
130struct dsos { 130struct dsos {
131 struct list_head head; 131 struct list_head head;
132 struct rb_root root; /* rbtree root sorted by long name */ 132 struct rb_root root; /* rbtree root sorted by long name */
133 pthread_rwlock_t lock; 133 struct rw_semaphore lock;
134}; 134};
135 135
136struct auxtrace_cache; 136struct auxtrace_cache;
@@ -142,6 +142,8 @@ struct dso {
142 struct rb_root *root; /* root of rbtree that rb_node is in */ 142 struct rb_root *root; /* root of rbtree that rb_node is in */
143 struct rb_root symbols[MAP__NR_TYPES]; 143 struct rb_root symbols[MAP__NR_TYPES];
144 struct rb_root symbol_names[MAP__NR_TYPES]; 144 struct rb_root symbol_names[MAP__NR_TYPES];
145 struct rb_root inlined_nodes;
146 struct rb_root srclines;
145 struct { 147 struct {
146 u64 addr; 148 u64 addr;
147 struct symbol *symbol; 149 struct symbol *symbol;
diff --git a/tools/perf/util/env.c b/tools/perf/util/env.c
index 6276b340f893..6d311868d850 100644
--- a/tools/perf/util/env.c
+++ b/tools/perf/util/env.c
@@ -1,8 +1,10 @@
1// SPDX-License-Identifier: GPL-2.0 1// SPDX-License-Identifier: GPL-2.0
2#include "cpumap.h" 2#include "cpumap.h"
3#include "env.h" 3#include "env.h"
4#include "sane_ctype.h"
4#include "util.h" 5#include "util.h"
5#include <errno.h> 6#include <errno.h>
7#include <sys/utsname.h>
6 8
7struct perf_env perf_env; 9struct perf_env perf_env;
8 10
@@ -93,3 +95,48 @@ void cpu_cache_level__free(struct cpu_cache_level *cache)
93 free(cache->map); 95 free(cache->map);
94 free(cache->size); 96 free(cache->size);
95} 97}
98
99/*
100 * Return architecture name in a normalized form.
101 * The conversion logic comes from the Makefile.
102 */
103static const char *normalize_arch(char *arch)
104{
105 if (!strcmp(arch, "x86_64"))
106 return "x86";
107 if (arch[0] == 'i' && arch[2] == '8' && arch[3] == '6')
108 return "x86";
109 if (!strcmp(arch, "sun4u") || !strncmp(arch, "sparc", 5))
110 return "sparc";
111 if (!strcmp(arch, "aarch64") || !strcmp(arch, "arm64"))
112 return "arm64";
113 if (!strncmp(arch, "arm", 3) || !strcmp(arch, "sa110"))
114 return "arm";
115 if (!strncmp(arch, "s390", 4))
116 return "s390";
117 if (!strncmp(arch, "parisc", 6))
118 return "parisc";
119 if (!strncmp(arch, "powerpc", 7) || !strncmp(arch, "ppc", 3))
120 return "powerpc";
121 if (!strncmp(arch, "mips", 4))
122 return "mips";
123 if (!strncmp(arch, "sh", 2) && isdigit(arch[2]))
124 return "sh";
125
126 return arch;
127}
128
129const char *perf_env__arch(struct perf_env *env)
130{
131 struct utsname uts;
132 char *arch_name;
133
134 if (!env) { /* Assume local operation */
135 if (uname(&uts) < 0)
136 return NULL;
137 arch_name = uts.machine;
138 } else
139 arch_name = env->arch;
140
141 return normalize_arch(arch_name);
142}
diff --git a/tools/perf/util/env.h b/tools/perf/util/env.h
index 1eb35b190b34..bf970f57dce0 100644
--- a/tools/perf/util/env.h
+++ b/tools/perf/util/env.h
@@ -65,4 +65,6 @@ int perf_env__set_cmdline(struct perf_env *env, int argc, const char *argv[]);
65int perf_env__read_cpu_topology_map(struct perf_env *env); 65int perf_env__read_cpu_topology_map(struct perf_env *env);
66 66
67void cpu_cache_level__free(struct cpu_cache_level *cache); 67void cpu_cache_level__free(struct cpu_cache_level *cache);
68
69const char *perf_env__arch(struct perf_env *env);
68#endif /* __PERF_ENV_H */ 70#endif /* __PERF_ENV_H */
diff --git a/tools/perf/util/event.c b/tools/perf/util/event.c
index fc690fecbfd6..44e603c27944 100644
--- a/tools/perf/util/event.c
+++ b/tools/perf/util/event.c
@@ -1,6 +1,7 @@
1// SPDX-License-Identifier: GPL-2.0 1// SPDX-License-Identifier: GPL-2.0
2#include <dirent.h> 2#include <dirent.h>
3#include <errno.h> 3#include <errno.h>
4#include <fcntl.h>
4#include <inttypes.h> 5#include <inttypes.h>
5#include <linux/kernel.h> 6#include <linux/kernel.h>
6#include <linux/types.h> 7#include <linux/types.h>
@@ -678,21 +679,21 @@ out:
678 return err; 679 return err;
679} 680}
680 681
681int perf_event__synthesize_threads(struct perf_tool *tool, 682static int __perf_event__synthesize_threads(struct perf_tool *tool,
682 perf_event__handler_t process, 683 perf_event__handler_t process,
683 struct machine *machine, 684 struct machine *machine,
684 bool mmap_data, 685 bool mmap_data,
685 unsigned int proc_map_timeout) 686 unsigned int proc_map_timeout,
687 struct dirent **dirent,
688 int start,
689 int num)
686{ 690{
687 DIR *proc;
688 char proc_path[PATH_MAX];
689 struct dirent *dirent;
690 union perf_event *comm_event, *mmap_event, *fork_event; 691 union perf_event *comm_event, *mmap_event, *fork_event;
691 union perf_event *namespaces_event; 692 union perf_event *namespaces_event;
692 int err = -1; 693 int err = -1;
693 694 char *end;
694 if (machine__is_default_guest(machine)) 695 pid_t pid;
695 return 0; 696 int i;
696 697
697 comm_event = malloc(sizeof(comm_event->comm) + machine->id_hdr_size); 698 comm_event = malloc(sizeof(comm_event->comm) + machine->id_hdr_size);
698 if (comm_event == NULL) 699 if (comm_event == NULL)
@@ -712,31 +713,25 @@ int perf_event__synthesize_threads(struct perf_tool *tool,
712 if (namespaces_event == NULL) 713 if (namespaces_event == NULL)
713 goto out_free_fork; 714 goto out_free_fork;
714 715
715 snprintf(proc_path, sizeof(proc_path), "%s/proc", machine->root_dir); 716 for (i = start; i < start + num; i++) {
716 proc = opendir(proc_path); 717 if (!isdigit(dirent[i]->d_name[0]))
717 718 continue;
718 if (proc == NULL)
719 goto out_free_namespaces;
720
721 while ((dirent = readdir(proc)) != NULL) {
722 char *end;
723 pid_t pid = strtol(dirent->d_name, &end, 10);
724 719
725 if (*end) /* only interested in proper numerical dirents */ 720 pid = (pid_t)strtol(dirent[i]->d_name, &end, 10);
721 /* only interested in proper numerical dirents */
722 if (*end)
726 continue; 723 continue;
727 /* 724 /*
728 * We may race with exiting thread, so don't stop just because 725 * We may race with exiting thread, so don't stop just because
729 * one thread couldn't be synthesized. 726 * one thread couldn't be synthesized.
730 */ 727 */
731 __event__synthesize_thread(comm_event, mmap_event, fork_event, 728 __event__synthesize_thread(comm_event, mmap_event, fork_event,
732 namespaces_event, pid, 1, process, 729 namespaces_event, pid, 1, process,
733 tool, machine, mmap_data, 730 tool, machine, mmap_data,
734 proc_map_timeout); 731 proc_map_timeout);
735 } 732 }
736
737 err = 0; 733 err = 0;
738 closedir(proc); 734
739out_free_namespaces:
740 free(namespaces_event); 735 free(namespaces_event);
741out_free_fork: 736out_free_fork:
742 free(fork_event); 737 free(fork_event);
@@ -748,6 +743,118 @@ out:
748 return err; 743 return err;
749} 744}
750 745
746struct synthesize_threads_arg {
747 struct perf_tool *tool;
748 perf_event__handler_t process;
749 struct machine *machine;
750 bool mmap_data;
751 unsigned int proc_map_timeout;
752 struct dirent **dirent;
753 int num;
754 int start;
755};
756
757static void *synthesize_threads_worker(void *arg)
758{
759 struct synthesize_threads_arg *args = arg;
760
761 __perf_event__synthesize_threads(args->tool, args->process,
762 args->machine, args->mmap_data,
763 args->proc_map_timeout, args->dirent,
764 args->start, args->num);
765 return NULL;
766}
767
768int perf_event__synthesize_threads(struct perf_tool *tool,
769 perf_event__handler_t process,
770 struct machine *machine,
771 bool mmap_data,
772 unsigned int proc_map_timeout,
773 unsigned int nr_threads_synthesize)
774{
775 struct synthesize_threads_arg *args = NULL;
776 pthread_t *synthesize_threads = NULL;
777 char proc_path[PATH_MAX];
778 struct dirent **dirent;
779 int num_per_thread;
780 int m, n, i, j;
781 int thread_nr;
782 int base = 0;
783 int err = -1;
784
785
786 if (machine__is_default_guest(machine))
787 return 0;
788
789 snprintf(proc_path, sizeof(proc_path), "%s/proc", machine->root_dir);
790 n = scandir(proc_path, &dirent, 0, alphasort);
791 if (n < 0)
792 return err;
793
794 if (nr_threads_synthesize == UINT_MAX)
795 thread_nr = sysconf(_SC_NPROCESSORS_ONLN);
796 else
797 thread_nr = nr_threads_synthesize;
798
799 if (thread_nr <= 1) {
800 err = __perf_event__synthesize_threads(tool, process,
801 machine, mmap_data,
802 proc_map_timeout,
803 dirent, base, n);
804 goto free_dirent;
805 }
806 if (thread_nr > n)
807 thread_nr = n;
808
809 synthesize_threads = calloc(sizeof(pthread_t), thread_nr);
810 if (synthesize_threads == NULL)
811 goto free_dirent;
812
813 args = calloc(sizeof(*args), thread_nr);
814 if (args == NULL)
815 goto free_threads;
816
817 num_per_thread = n / thread_nr;
818 m = n % thread_nr;
819 for (i = 0; i < thread_nr; i++) {
820 args[i].tool = tool;
821 args[i].process = process;
822 args[i].machine = machine;
823 args[i].mmap_data = mmap_data;
824 args[i].proc_map_timeout = proc_map_timeout;
825 args[i].dirent = dirent;
826 }
827 for (i = 0; i < m; i++) {
828 args[i].num = num_per_thread + 1;
829 args[i].start = i * args[i].num;
830 }
831 if (i != 0)
832 base = args[i-1].start + args[i-1].num;
833 for (j = i; j < thread_nr; j++) {
834 args[j].num = num_per_thread;
835 args[j].start = base + (j - i) * args[i].num;
836 }
837
838 for (i = 0; i < thread_nr; i++) {
839 if (pthread_create(&synthesize_threads[i], NULL,
840 synthesize_threads_worker, &args[i]))
841 goto out_join;
842 }
843 err = 0;
844out_join:
845 for (i = 0; i < thread_nr; i++)
846 pthread_join(synthesize_threads[i], NULL);
847 free(args);
848free_threads:
849 free(synthesize_threads);
850free_dirent:
851 for (i = 0; i < n; i++)
852 free(dirent[i]);
853 free(dirent);
854
855 return err;
856}
857
751struct process_symbol_args { 858struct process_symbol_args {
752 const char *name; 859 const char *name;
753 u64 start; 860 u64 start;
@@ -1328,6 +1435,11 @@ size_t perf_event__fprintf_switch(union perf_event *event, FILE *fp)
1328 event->context_switch.next_prev_tid); 1435 event->context_switch.next_prev_tid);
1329} 1436}
1330 1437
1438static size_t perf_event__fprintf_lost(union perf_event *event, FILE *fp)
1439{
1440 return fprintf(fp, " lost %" PRIu64 "\n", event->lost.lost);
1441}
1442
1331size_t perf_event__fprintf(union perf_event *event, FILE *fp) 1443size_t perf_event__fprintf(union perf_event *event, FILE *fp)
1332{ 1444{
1333 size_t ret = fprintf(fp, "PERF_RECORD_%s", 1445 size_t ret = fprintf(fp, "PERF_RECORD_%s",
@@ -1360,6 +1472,9 @@ size_t perf_event__fprintf(union perf_event *event, FILE *fp)
1360 case PERF_RECORD_SWITCH_CPU_WIDE: 1472 case PERF_RECORD_SWITCH_CPU_WIDE:
1361 ret += perf_event__fprintf_switch(event, fp); 1473 ret += perf_event__fprintf_switch(event, fp);
1362 break; 1474 break;
1475 case PERF_RECORD_LOST:
1476 ret += perf_event__fprintf_lost(event, fp);
1477 break;
1363 default: 1478 default:
1364 ret += fprintf(fp, "\n"); 1479 ret += fprintf(fp, "\n");
1365 } 1480 }
@@ -1498,6 +1613,7 @@ int machine__resolve(struct machine *machine, struct addr_location *al,
1498 al->sym = NULL; 1613 al->sym = NULL;
1499 al->cpu = sample->cpu; 1614 al->cpu = sample->cpu;
1500 al->socket = -1; 1615 al->socket = -1;
1616 al->srcline = NULL;
1501 1617
1502 if (al->cpu >= 0) { 1618 if (al->cpu >= 0) {
1503 struct perf_env *env = machine->env; 1619 struct perf_env *env = machine->env;
diff --git a/tools/perf/util/event.h b/tools/perf/util/event.h
index 5524ee69279c..0f794744919c 100644
--- a/tools/perf/util/event.h
+++ b/tools/perf/util/event.h
@@ -205,6 +205,7 @@ struct perf_sample {
205 u32 flags; 205 u32 flags;
206 u16 insn_len; 206 u16 insn_len;
207 u8 cpumode; 207 u8 cpumode;
208 u16 misc;
208 char insn[MAX_INSN]; 209 char insn[MAX_INSN];
209 void *raw_data; 210 void *raw_data;
210 struct ip_callchain *callchain; 211 struct ip_callchain *callchain;
@@ -681,7 +682,8 @@ int perf_event__synthesize_cpu_map(struct perf_tool *tool,
681int perf_event__synthesize_threads(struct perf_tool *tool, 682int perf_event__synthesize_threads(struct perf_tool *tool,
682 perf_event__handler_t process, 683 perf_event__handler_t process,
683 struct machine *machine, bool mmap_data, 684 struct machine *machine, bool mmap_data,
684 unsigned int proc_map_timeout); 685 unsigned int proc_map_timeout,
686 unsigned int nr_threads_synthesize);
685int perf_event__synthesize_kernel_mmap(struct perf_tool *tool, 687int perf_event__synthesize_kernel_mmap(struct perf_tool *tool,
686 perf_event__handler_t process, 688 perf_event__handler_t process,
687 struct machine *machine); 689 struct machine *machine);
@@ -773,8 +775,7 @@ size_t perf_event__sample_event_size(const struct perf_sample *sample, u64 type,
773 u64 read_format); 775 u64 read_format);
774int perf_event__synthesize_sample(union perf_event *event, u64 type, 776int perf_event__synthesize_sample(union perf_event *event, u64 type,
775 u64 read_format, 777 u64 read_format,
776 const struct perf_sample *sample, 778 const struct perf_sample *sample);
777 bool swapped);
778 779
779pid_t perf_event__synthesize_comm(struct perf_tool *tool, 780pid_t perf_event__synthesize_comm(struct perf_tool *tool,
780 union perf_event *event, pid_t pid, 781 union perf_event *event, pid_t pid,
diff --git a/tools/perf/util/evlist.c b/tools/perf/util/evlist.c
index 6a0d7ffbeba0..e5fc14e53c05 100644
--- a/tools/perf/util/evlist.c
+++ b/tools/perf/util/evlist.c
@@ -25,6 +25,7 @@
25#include "parse-events.h" 25#include "parse-events.h"
26#include <subcmd/parse-options.h> 26#include <subcmd/parse-options.h>
27 27
28#include <fcntl.h>
28#include <sys/ioctl.h> 29#include <sys/ioctl.h>
29#include <sys/mman.h> 30#include <sys/mman.h>
30 31
@@ -33,9 +34,6 @@
33#include <linux/log2.h> 34#include <linux/log2.h>
34#include <linux/err.h> 35#include <linux/err.h>
35 36
36static void perf_mmap__munmap(struct perf_mmap *map);
37static void perf_mmap__put(struct perf_mmap *map);
38
39#define FD(e, x, y) (*(int *)xyarray__entry(e->fd, x, y)) 37#define FD(e, x, y) (*(int *)xyarray__entry(e->fd, x, y))
40#define SID(e, x, y) xyarray__entry(e->sample_id, x, y) 38#define SID(e, x, y) xyarray__entry(e->sample_id, x, y)
41 39
@@ -128,7 +126,7 @@ static void perf_evlist__purge(struct perf_evlist *evlist)
128void perf_evlist__exit(struct perf_evlist *evlist) 126void perf_evlist__exit(struct perf_evlist *evlist)
129{ 127{
130 zfree(&evlist->mmap); 128 zfree(&evlist->mmap);
131 zfree(&evlist->backward_mmap); 129 zfree(&evlist->overwrite_mmap);
132 fdarray__exit(&evlist->pollfd); 130 fdarray__exit(&evlist->pollfd);
133} 131}
134 132
@@ -260,7 +258,7 @@ int perf_evlist__add_dummy(struct perf_evlist *evlist)
260 .config = PERF_COUNT_SW_DUMMY, 258 .config = PERF_COUNT_SW_DUMMY,
261 .size = sizeof(attr), /* to capture ABI version */ 259 .size = sizeof(attr), /* to capture ABI version */
262 }; 260 };
263 struct perf_evsel *evsel = perf_evsel__new(&attr); 261 struct perf_evsel *evsel = perf_evsel__new_idx(&attr, evlist->nr_entries);
264 262
265 if (evsel == NULL) 263 if (evsel == NULL)
266 return -ENOMEM; 264 return -ENOMEM;
@@ -678,11 +676,11 @@ static int perf_evlist__set_paused(struct perf_evlist *evlist, bool value)
678{ 676{
679 int i; 677 int i;
680 678
681 if (!evlist->backward_mmap) 679 if (!evlist->overwrite_mmap)
682 return 0; 680 return 0;
683 681
684 for (i = 0; i < evlist->nr_mmaps; i++) { 682 for (i = 0; i < evlist->nr_mmaps; i++) {
685 int fd = evlist->backward_mmap[i].fd; 683 int fd = evlist->overwrite_mmap[i].fd;
686 int err; 684 int err;
687 685
688 if (fd < 0) 686 if (fd < 0)
@@ -704,129 +702,6 @@ static int perf_evlist__resume(struct perf_evlist *evlist)
704 return perf_evlist__set_paused(evlist, false); 702 return perf_evlist__set_paused(evlist, false);
705} 703}
706 704
707/* When check_messup is true, 'end' must points to a good entry */
708static union perf_event *
709perf_mmap__read(struct perf_mmap *md, bool check_messup, u64 start,
710 u64 end, u64 *prev)
711{
712 unsigned char *data = md->base + page_size;
713 union perf_event *event = NULL;
714 int diff = end - start;
715
716 if (check_messup) {
717 /*
718 * If we're further behind than half the buffer, there's a chance
719 * the writer will bite our tail and mess up the samples under us.
720 *
721 * If we somehow ended up ahead of the 'end', we got messed up.
722 *
723 * In either case, truncate and restart at 'end'.
724 */
725 if (diff > md->mask / 2 || diff < 0) {
726 fprintf(stderr, "WARNING: failed to keep up with mmap data.\n");
727
728 /*
729 * 'end' points to a known good entry, start there.
730 */
731 start = end;
732 diff = 0;
733 }
734 }
735
736 if (diff >= (int)sizeof(event->header)) {
737 size_t size;
738
739 event = (union perf_event *)&data[start & md->mask];
740 size = event->header.size;
741
742 if (size < sizeof(event->header) || diff < (int)size) {
743 event = NULL;
744 goto broken_event;
745 }
746
747 /*
748 * Event straddles the mmap boundary -- header should always
749 * be inside due to u64 alignment of output.
750 */
751 if ((start & md->mask) + size != ((start + size) & md->mask)) {
752 unsigned int offset = start;
753 unsigned int len = min(sizeof(*event), size), cpy;
754 void *dst = md->event_copy;
755
756 do {
757 cpy = min(md->mask + 1 - (offset & md->mask), len);
758 memcpy(dst, &data[offset & md->mask], cpy);
759 offset += cpy;
760 dst += cpy;
761 len -= cpy;
762 } while (len);
763
764 event = (union perf_event *) md->event_copy;
765 }
766
767 start += size;
768 }
769
770broken_event:
771 if (prev)
772 *prev = start;
773
774 return event;
775}
776
777union perf_event *perf_mmap__read_forward(struct perf_mmap *md, bool check_messup)
778{
779 u64 head;
780 u64 old = md->prev;
781
782 /*
783 * Check if event was unmapped due to a POLLHUP/POLLERR.
784 */
785 if (!refcount_read(&md->refcnt))
786 return NULL;
787
788 head = perf_mmap__read_head(md);
789
790 return perf_mmap__read(md, check_messup, old, head, &md->prev);
791}
792
793union perf_event *
794perf_mmap__read_backward(struct perf_mmap *md)
795{
796 u64 head, end;
797 u64 start = md->prev;
798
799 /*
800 * Check if event was unmapped due to a POLLHUP/POLLERR.
801 */
802 if (!refcount_read(&md->refcnt))
803 return NULL;
804
805 head = perf_mmap__read_head(md);
806 if (!head)
807 return NULL;
808
809 /*
810 * 'head' pointer starts from 0. Kernel minus sizeof(record) form
811 * it each time when kernel writes to it, so in fact 'head' is
812 * negative. 'end' pointer is made manually by adding the size of
813 * the ring buffer to 'head' pointer, means the validate data can
814 * read is the whole ring buffer. If 'end' is positive, the ring
815 * buffer has not fully filled, so we must adjust 'end' to 0.
816 *
817 * However, since both 'head' and 'end' is unsigned, we can't
818 * simply compare 'end' against 0. Here we compare '-head' and
819 * the size of the ring buffer, where -head is the number of bytes
820 * kernel write to the ring buffer.
821 */
822 if (-head < (u64)(md->mask + 1))
823 end = 0;
824 else
825 end = head + md->mask + 1;
826
827 return perf_mmap__read(md, false, start, end, &md->prev);
828}
829
830union perf_event *perf_evlist__mmap_read_forward(struct perf_evlist *evlist, int idx) 705union perf_event *perf_evlist__mmap_read_forward(struct perf_evlist *evlist, int idx)
831{ 706{
832 struct perf_mmap *md = &evlist->mmap[idx]; 707 struct perf_mmap *md = &evlist->mmap[idx];
@@ -837,19 +712,7 @@ union perf_event *perf_evlist__mmap_read_forward(struct perf_evlist *evlist, int
837 * No need for read-write ring buffer: kernel stop outputting when 712 * No need for read-write ring buffer: kernel stop outputting when
838 * it hit md->prev (perf_mmap__consume()). 713 * it hit md->prev (perf_mmap__consume()).
839 */ 714 */
840 return perf_mmap__read_forward(md, evlist->overwrite); 715 return perf_mmap__read_forward(md);
841}
842
843union perf_event *perf_evlist__mmap_read_backward(struct perf_evlist *evlist, int idx)
844{
845 struct perf_mmap *md = &evlist->mmap[idx];
846
847 /*
848 * No need to check messup for backward ring buffer:
849 * We can always read arbitrary long data from a backward
850 * ring buffer unless we forget to pause it before reading.
851 */
852 return perf_mmap__read_backward(md);
853} 716}
854 717
855union perf_event *perf_evlist__mmap_read(struct perf_evlist *evlist, int idx) 718union perf_event *perf_evlist__mmap_read(struct perf_evlist *evlist, int idx)
@@ -857,94 +720,9 @@ union perf_event *perf_evlist__mmap_read(struct perf_evlist *evlist, int idx)
857 return perf_evlist__mmap_read_forward(evlist, idx); 720 return perf_evlist__mmap_read_forward(evlist, idx);
858} 721}
859 722
860void perf_mmap__read_catchup(struct perf_mmap *md)
861{
862 u64 head;
863
864 if (!refcount_read(&md->refcnt))
865 return;
866
867 head = perf_mmap__read_head(md);
868 md->prev = head;
869}
870
871void perf_evlist__mmap_read_catchup(struct perf_evlist *evlist, int idx)
872{
873 perf_mmap__read_catchup(&evlist->mmap[idx]);
874}
875
876static bool perf_mmap__empty(struct perf_mmap *md)
877{
878 return perf_mmap__read_head(md) == md->prev && !md->auxtrace_mmap.base;
879}
880
881static void perf_mmap__get(struct perf_mmap *map)
882{
883 refcount_inc(&map->refcnt);
884}
885
886static void perf_mmap__put(struct perf_mmap *md)
887{
888 BUG_ON(md->base && refcount_read(&md->refcnt) == 0);
889
890 if (refcount_dec_and_test(&md->refcnt))
891 perf_mmap__munmap(md);
892}
893
894void perf_mmap__consume(struct perf_mmap *md, bool overwrite)
895{
896 if (!overwrite) {
897 u64 old = md->prev;
898
899 perf_mmap__write_tail(md, old);
900 }
901
902 if (refcount_read(&md->refcnt) == 1 && perf_mmap__empty(md))
903 perf_mmap__put(md);
904}
905
906void perf_evlist__mmap_consume(struct perf_evlist *evlist, int idx) 723void perf_evlist__mmap_consume(struct perf_evlist *evlist, int idx)
907{ 724{
908 perf_mmap__consume(&evlist->mmap[idx], evlist->overwrite); 725 perf_mmap__consume(&evlist->mmap[idx], false);
909}
910
911int __weak auxtrace_mmap__mmap(struct auxtrace_mmap *mm __maybe_unused,
912 struct auxtrace_mmap_params *mp __maybe_unused,
913 void *userpg __maybe_unused,
914 int fd __maybe_unused)
915{
916 return 0;
917}
918
919void __weak auxtrace_mmap__munmap(struct auxtrace_mmap *mm __maybe_unused)
920{
921}
922
923void __weak auxtrace_mmap_params__init(
924 struct auxtrace_mmap_params *mp __maybe_unused,
925 off_t auxtrace_offset __maybe_unused,
926 unsigned int auxtrace_pages __maybe_unused,
927 bool auxtrace_overwrite __maybe_unused)
928{
929}
930
931void __weak auxtrace_mmap_params__set_idx(
932 struct auxtrace_mmap_params *mp __maybe_unused,
933 struct perf_evlist *evlist __maybe_unused,
934 int idx __maybe_unused,
935 bool per_cpu __maybe_unused)
936{
937}
938
939static void perf_mmap__munmap(struct perf_mmap *map)
940{
941 if (map->base != NULL) {
942 munmap(map->base, perf_mmap__mmap_len(map));
943 map->base = NULL;
944 map->fd = -1;
945 refcount_set(&map->refcnt, 0);
946 }
947 auxtrace_mmap__munmap(&map->auxtrace_mmap);
948} 726}
949 727
950static void perf_evlist__munmap_nofree(struct perf_evlist *evlist) 728static void perf_evlist__munmap_nofree(struct perf_evlist *evlist)
@@ -955,16 +733,16 @@ static void perf_evlist__munmap_nofree(struct perf_evlist *evlist)
955 for (i = 0; i < evlist->nr_mmaps; i++) 733 for (i = 0; i < evlist->nr_mmaps; i++)
956 perf_mmap__munmap(&evlist->mmap[i]); 734 perf_mmap__munmap(&evlist->mmap[i]);
957 735
958 if (evlist->backward_mmap) 736 if (evlist->overwrite_mmap)
959 for (i = 0; i < evlist->nr_mmaps; i++) 737 for (i = 0; i < evlist->nr_mmaps; i++)
960 perf_mmap__munmap(&evlist->backward_mmap[i]); 738 perf_mmap__munmap(&evlist->overwrite_mmap[i]);
961} 739}
962 740
963void perf_evlist__munmap(struct perf_evlist *evlist) 741void perf_evlist__munmap(struct perf_evlist *evlist)
964{ 742{
965 perf_evlist__munmap_nofree(evlist); 743 perf_evlist__munmap_nofree(evlist);
966 zfree(&evlist->mmap); 744 zfree(&evlist->mmap);
967 zfree(&evlist->backward_mmap); 745 zfree(&evlist->overwrite_mmap);
968} 746}
969 747
970static struct perf_mmap *perf_evlist__alloc_mmap(struct perf_evlist *evlist) 748static struct perf_mmap *perf_evlist__alloc_mmap(struct perf_evlist *evlist)
@@ -995,48 +773,6 @@ static struct perf_mmap *perf_evlist__alloc_mmap(struct perf_evlist *evlist)
995 return map; 773 return map;
996} 774}
997 775
998struct mmap_params {
999 int prot;
1000 int mask;
1001 struct auxtrace_mmap_params auxtrace_mp;
1002};
1003
1004static int perf_mmap__mmap(struct perf_mmap *map,
1005 struct mmap_params *mp, int fd)
1006{
1007 /*
1008 * The last one will be done at perf_evlist__mmap_consume(), so that we
1009 * make sure we don't prevent tools from consuming every last event in
1010 * the ring buffer.
1011 *
1012 * I.e. we can get the POLLHUP meaning that the fd doesn't exist
1013 * anymore, but the last events for it are still in the ring buffer,
1014 * waiting to be consumed.
1015 *
1016 * Tools can chose to ignore this at their own discretion, but the
1017 * evlist layer can't just drop it when filtering events in
1018 * perf_evlist__filter_pollfd().
1019 */
1020 refcount_set(&map->refcnt, 2);
1021 map->prev = 0;
1022 map->mask = mp->mask;
1023 map->base = mmap(NULL, perf_mmap__mmap_len(map), mp->prot,
1024 MAP_SHARED, fd, 0);
1025 if (map->base == MAP_FAILED) {
1026 pr_debug2("failed to mmap perf event ring buffer, error %d\n",
1027 errno);
1028 map->base = NULL;
1029 return -1;
1030 }
1031 map->fd = fd;
1032
1033 if (auxtrace_mmap__mmap(&map->auxtrace_mmap,
1034 &mp->auxtrace_mp, map->base, fd))
1035 return -1;
1036
1037 return 0;
1038}
1039
1040static bool 776static bool
1041perf_evlist__should_poll(struct perf_evlist *evlist __maybe_unused, 777perf_evlist__should_poll(struct perf_evlist *evlist __maybe_unused,
1042 struct perf_evsel *evsel) 778 struct perf_evsel *evsel)
@@ -1048,7 +784,7 @@ perf_evlist__should_poll(struct perf_evlist *evlist __maybe_unused,
1048 784
1049static int perf_evlist__mmap_per_evsel(struct perf_evlist *evlist, int idx, 785static int perf_evlist__mmap_per_evsel(struct perf_evlist *evlist, int idx,
1050 struct mmap_params *mp, int cpu_idx, 786 struct mmap_params *mp, int cpu_idx,
1051 int thread, int *_output, int *_output_backward) 787 int thread, int *_output, int *_output_overwrite)
1052{ 788{
1053 struct perf_evsel *evsel; 789 struct perf_evsel *evsel;
1054 int revent; 790 int revent;
@@ -1060,18 +796,20 @@ static int perf_evlist__mmap_per_evsel(struct perf_evlist *evlist, int idx,
1060 int fd; 796 int fd;
1061 int cpu; 797 int cpu;
1062 798
799 mp->prot = PROT_READ | PROT_WRITE;
1063 if (evsel->attr.write_backward) { 800 if (evsel->attr.write_backward) {
1064 output = _output_backward; 801 output = _output_overwrite;
1065 maps = evlist->backward_mmap; 802 maps = evlist->overwrite_mmap;
1066 803
1067 if (!maps) { 804 if (!maps) {
1068 maps = perf_evlist__alloc_mmap(evlist); 805 maps = perf_evlist__alloc_mmap(evlist);
1069 if (!maps) 806 if (!maps)
1070 return -1; 807 return -1;
1071 evlist->backward_mmap = maps; 808 evlist->overwrite_mmap = maps;
1072 if (evlist->bkw_mmap_state == BKW_MMAP_NOTREADY) 809 if (evlist->bkw_mmap_state == BKW_MMAP_NOTREADY)
1073 perf_evlist__toggle_bkw_mmap(evlist, BKW_MMAP_RUNNING); 810 perf_evlist__toggle_bkw_mmap(evlist, BKW_MMAP_RUNNING);
1074 } 811 }
812 mp->prot &= ~PROT_WRITE;
1075 } 813 }
1076 814
1077 if (evsel->system_wide && thread) 815 if (evsel->system_wide && thread)
@@ -1132,14 +870,14 @@ static int perf_evlist__mmap_per_cpu(struct perf_evlist *evlist,
1132 pr_debug2("perf event ring buffer mmapped per cpu\n"); 870 pr_debug2("perf event ring buffer mmapped per cpu\n");
1133 for (cpu = 0; cpu < nr_cpus; cpu++) { 871 for (cpu = 0; cpu < nr_cpus; cpu++) {
1134 int output = -1; 872 int output = -1;
1135 int output_backward = -1; 873 int output_overwrite = -1;
1136 874
1137 auxtrace_mmap_params__set_idx(&mp->auxtrace_mp, evlist, cpu, 875 auxtrace_mmap_params__set_idx(&mp->auxtrace_mp, evlist, cpu,
1138 true); 876 true);
1139 877
1140 for (thread = 0; thread < nr_threads; thread++) { 878 for (thread = 0; thread < nr_threads; thread++) {
1141 if (perf_evlist__mmap_per_evsel(evlist, cpu, mp, cpu, 879 if (perf_evlist__mmap_per_evsel(evlist, cpu, mp, cpu,
1142 thread, &output, &output_backward)) 880 thread, &output, &output_overwrite))
1143 goto out_unmap; 881 goto out_unmap;
1144 } 882 }
1145 } 883 }
@@ -1160,13 +898,13 @@ static int perf_evlist__mmap_per_thread(struct perf_evlist *evlist,
1160 pr_debug2("perf event ring buffer mmapped per thread\n"); 898 pr_debug2("perf event ring buffer mmapped per thread\n");
1161 for (thread = 0; thread < nr_threads; thread++) { 899 for (thread = 0; thread < nr_threads; thread++) {
1162 int output = -1; 900 int output = -1;
1163 int output_backward = -1; 901 int output_overwrite = -1;
1164 902
1165 auxtrace_mmap_params__set_idx(&mp->auxtrace_mp, evlist, thread, 903 auxtrace_mmap_params__set_idx(&mp->auxtrace_mp, evlist, thread,
1166 false); 904 false);
1167 905
1168 if (perf_evlist__mmap_per_evsel(evlist, thread, mp, 0, thread, 906 if (perf_evlist__mmap_per_evsel(evlist, thread, mp, 0, thread,
1169 &output, &output_backward)) 907 &output, &output_overwrite))
1170 goto out_unmap; 908 goto out_unmap;
1171 } 909 }
1172 910
@@ -1300,15 +1038,18 @@ int perf_evlist__parse_mmap_pages(const struct option *opt, const char *str,
1300 * Return: %0 on success, negative error code otherwise. 1038 * Return: %0 on success, negative error code otherwise.
1301 */ 1039 */
1302int perf_evlist__mmap_ex(struct perf_evlist *evlist, unsigned int pages, 1040int perf_evlist__mmap_ex(struct perf_evlist *evlist, unsigned int pages,
1303 bool overwrite, unsigned int auxtrace_pages, 1041 unsigned int auxtrace_pages,
1304 bool auxtrace_overwrite) 1042 bool auxtrace_overwrite)
1305{ 1043{
1306 struct perf_evsel *evsel; 1044 struct perf_evsel *evsel;
1307 const struct cpu_map *cpus = evlist->cpus; 1045 const struct cpu_map *cpus = evlist->cpus;
1308 const struct thread_map *threads = evlist->threads; 1046 const struct thread_map *threads = evlist->threads;
1309 struct mmap_params mp = { 1047 /*
1310 .prot = PROT_READ | (overwrite ? 0 : PROT_WRITE), 1048 * Delay setting mp.prot: set it before calling perf_mmap__mmap.
1311 }; 1049 * Its value is decided by evsel's write_backward.
1050 * So &mp should not be passed through const pointer.
1051 */
1052 struct mmap_params mp;
1312 1053
1313 if (!evlist->mmap) 1054 if (!evlist->mmap)
1314 evlist->mmap = perf_evlist__alloc_mmap(evlist); 1055 evlist->mmap = perf_evlist__alloc_mmap(evlist);
@@ -1318,7 +1059,6 @@ int perf_evlist__mmap_ex(struct perf_evlist *evlist, unsigned int pages,
1318 if (evlist->pollfd.entries == NULL && perf_evlist__alloc_pollfd(evlist) < 0) 1059 if (evlist->pollfd.entries == NULL && perf_evlist__alloc_pollfd(evlist) < 0)
1319 return -ENOMEM; 1060 return -ENOMEM;
1320 1061
1321 evlist->overwrite = overwrite;
1322 evlist->mmap_len = perf_evlist__mmap_size(pages); 1062 evlist->mmap_len = perf_evlist__mmap_size(pages);
1323 pr_debug("mmap size %zuB\n", evlist->mmap_len); 1063 pr_debug("mmap size %zuB\n", evlist->mmap_len);
1324 mp.mask = evlist->mmap_len - page_size - 1; 1064 mp.mask = evlist->mmap_len - page_size - 1;
@@ -1339,10 +1079,9 @@ int perf_evlist__mmap_ex(struct perf_evlist *evlist, unsigned int pages,
1339 return perf_evlist__mmap_per_cpu(evlist, &mp); 1079 return perf_evlist__mmap_per_cpu(evlist, &mp);
1340} 1080}
1341 1081
1342int perf_evlist__mmap(struct perf_evlist *evlist, unsigned int pages, 1082int perf_evlist__mmap(struct perf_evlist *evlist, unsigned int pages)
1343 bool overwrite)
1344{ 1083{
1345 return perf_evlist__mmap_ex(evlist, pages, overwrite, 0, false); 1084 return perf_evlist__mmap_ex(evlist, pages, 0, false);
1346} 1085}
1347 1086
1348int perf_evlist__create_maps(struct perf_evlist *evlist, struct target *target) 1087int perf_evlist__create_maps(struct perf_evlist *evlist, struct target *target)
@@ -1350,7 +1089,8 @@ int perf_evlist__create_maps(struct perf_evlist *evlist, struct target *target)
1350 struct cpu_map *cpus; 1089 struct cpu_map *cpus;
1351 struct thread_map *threads; 1090 struct thread_map *threads;
1352 1091
1353 threads = thread_map__new_str(target->pid, target->tid, target->uid); 1092 threads = thread_map__new_str(target->pid, target->tid, target->uid,
1093 target->per_thread);
1354 1094
1355 if (!threads) 1095 if (!threads)
1356 return -1; 1096 return -1;
@@ -1830,6 +1570,17 @@ int perf_evlist__parse_sample(struct perf_evlist *evlist, union perf_event *even
1830 return perf_evsel__parse_sample(evsel, event, sample); 1570 return perf_evsel__parse_sample(evsel, event, sample);
1831} 1571}
1832 1572
1573int perf_evlist__parse_sample_timestamp(struct perf_evlist *evlist,
1574 union perf_event *event,
1575 u64 *timestamp)
1576{
1577 struct perf_evsel *evsel = perf_evlist__event2evsel(evlist, event);
1578
1579 if (!evsel)
1580 return -EFAULT;
1581 return perf_evsel__parse_sample_timestamp(evsel, event, timestamp);
1582}
1583
1833size_t perf_evlist__fprintf(struct perf_evlist *evlist, FILE *fp) 1584size_t perf_evlist__fprintf(struct perf_evlist *evlist, FILE *fp)
1834{ 1585{
1835 struct perf_evsel *evsel; 1586 struct perf_evsel *evsel;
@@ -1987,13 +1738,13 @@ void perf_evlist__toggle_bkw_mmap(struct perf_evlist *evlist,
1987 RESUME, 1738 RESUME,
1988 } action = NONE; 1739 } action = NONE;
1989 1740
1990 if (!evlist->backward_mmap) 1741 if (!evlist->overwrite_mmap)
1991 return; 1742 return;
1992 1743
1993 switch (old_state) { 1744 switch (old_state) {
1994 case BKW_MMAP_NOTREADY: { 1745 case BKW_MMAP_NOTREADY: {
1995 if (state != BKW_MMAP_RUNNING) 1746 if (state != BKW_MMAP_RUNNING)
1996 goto state_err;; 1747 goto state_err;
1997 break; 1748 break;
1998 } 1749 }
1999 case BKW_MMAP_RUNNING: { 1750 case BKW_MMAP_RUNNING: {
@@ -2034,3 +1785,15 @@ void perf_evlist__toggle_bkw_mmap(struct perf_evlist *evlist,
2034state_err: 1785state_err:
2035 return; 1786 return;
2036} 1787}
1788
1789bool perf_evlist__exclude_kernel(struct perf_evlist *evlist)
1790{
1791 struct perf_evsel *evsel;
1792
1793 evlist__for_each_entry(evlist, evsel) {
1794 if (!evsel->attr.exclude_kernel)
1795 return false;
1796 }
1797
1798 return true;
1799}
diff --git a/tools/perf/util/evlist.h b/tools/perf/util/evlist.h
index c1750a400bb7..336b838e6957 100644
--- a/tools/perf/util/evlist.h
+++ b/tools/perf/util/evlist.h
@@ -11,8 +11,8 @@
11#include "../perf.h" 11#include "../perf.h"
12#include "event.h" 12#include "event.h"
13#include "evsel.h" 13#include "evsel.h"
14#include "mmap.h"
14#include "util.h" 15#include "util.h"
15#include "auxtrace.h"
16#include <signal.h> 16#include <signal.h>
17#include <unistd.h> 17#include <unistd.h>
18 18
@@ -24,62 +24,12 @@ struct record_opts;
24#define PERF_EVLIST__HLIST_BITS 8 24#define PERF_EVLIST__HLIST_BITS 8
25#define PERF_EVLIST__HLIST_SIZE (1 << PERF_EVLIST__HLIST_BITS) 25#define PERF_EVLIST__HLIST_SIZE (1 << PERF_EVLIST__HLIST_BITS)
26 26
27/**
28 * struct perf_mmap - perf's ring buffer mmap details
29 *
30 * @refcnt - e.g. code using PERF_EVENT_IOC_SET_OUTPUT to share this
31 */
32struct perf_mmap {
33 void *base;
34 int mask;
35 int fd;
36 refcount_t refcnt;
37 u64 prev;
38 struct auxtrace_mmap auxtrace_mmap;
39 char event_copy[PERF_SAMPLE_MAX_SIZE] __aligned(8);
40};
41
42static inline size_t
43perf_mmap__mmap_len(struct perf_mmap *map)
44{
45 return map->mask + 1 + page_size;
46}
47
48/*
49 * State machine of bkw_mmap_state:
50 *
51 * .________________(forbid)_____________.
52 * | V
53 * NOTREADY --(0)--> RUNNING --(1)--> DATA_PENDING --(2)--> EMPTY
54 * ^ ^ | ^ |
55 * | |__(forbid)____/ |___(forbid)___/|
56 * | |
57 * \_________________(3)_______________/
58 *
59 * NOTREADY : Backward ring buffers are not ready
60 * RUNNING : Backward ring buffers are recording
61 * DATA_PENDING : We are required to collect data from backward ring buffers
62 * EMPTY : We have collected data from backward ring buffers.
63 *
64 * (0): Setup backward ring buffer
65 * (1): Pause ring buffers for reading
66 * (2): Read from ring buffers
67 * (3): Resume ring buffers for recording
68 */
69enum bkw_mmap_state {
70 BKW_MMAP_NOTREADY,
71 BKW_MMAP_RUNNING,
72 BKW_MMAP_DATA_PENDING,
73 BKW_MMAP_EMPTY,
74};
75
76struct perf_evlist { 27struct perf_evlist {
77 struct list_head entries; 28 struct list_head entries;
78 struct hlist_head heads[PERF_EVLIST__HLIST_SIZE]; 29 struct hlist_head heads[PERF_EVLIST__HLIST_SIZE];
79 int nr_entries; 30 int nr_entries;
80 int nr_groups; 31 int nr_groups;
81 int nr_mmaps; 32 int nr_mmaps;
82 bool overwrite;
83 bool enabled; 33 bool enabled;
84 bool has_user_cpus; 34 bool has_user_cpus;
85 size_t mmap_len; 35 size_t mmap_len;
@@ -93,12 +43,14 @@ struct perf_evlist {
93 } workload; 43 } workload;
94 struct fdarray pollfd; 44 struct fdarray pollfd;
95 struct perf_mmap *mmap; 45 struct perf_mmap *mmap;
96 struct perf_mmap *backward_mmap; 46 struct perf_mmap *overwrite_mmap;
97 struct thread_map *threads; 47 struct thread_map *threads;
98 struct cpu_map *cpus; 48 struct cpu_map *cpus;
99 struct perf_evsel *selected; 49 struct perf_evsel *selected;
100 struct events_stats stats; 50 struct events_stats stats;
101 struct perf_env *env; 51 struct perf_env *env;
52 u64 first_sample_time;
53 u64 last_sample_time;
102}; 54};
103 55
104struct perf_evsel_str_handler { 56struct perf_evsel_str_handler {
@@ -177,20 +129,10 @@ struct perf_sample_id *perf_evlist__id2sid(struct perf_evlist *evlist, u64 id);
177 129
178void perf_evlist__toggle_bkw_mmap(struct perf_evlist *evlist, enum bkw_mmap_state state); 130void perf_evlist__toggle_bkw_mmap(struct perf_evlist *evlist, enum bkw_mmap_state state);
179 131
180union perf_event *perf_mmap__read_forward(struct perf_mmap *map, bool check_messup);
181union perf_event *perf_mmap__read_backward(struct perf_mmap *map);
182
183void perf_mmap__read_catchup(struct perf_mmap *md);
184void perf_mmap__consume(struct perf_mmap *md, bool overwrite);
185
186union perf_event *perf_evlist__mmap_read(struct perf_evlist *evlist, int idx); 132union perf_event *perf_evlist__mmap_read(struct perf_evlist *evlist, int idx);
187 133
188union perf_event *perf_evlist__mmap_read_forward(struct perf_evlist *evlist, 134union perf_event *perf_evlist__mmap_read_forward(struct perf_evlist *evlist,
189 int idx); 135 int idx);
190union perf_event *perf_evlist__mmap_read_backward(struct perf_evlist *evlist,
191 int idx);
192void perf_evlist__mmap_read_catchup(struct perf_evlist *evlist, int idx);
193
194void perf_evlist__mmap_consume(struct perf_evlist *evlist, int idx); 136void perf_evlist__mmap_consume(struct perf_evlist *evlist, int idx);
195 137
196int perf_evlist__open(struct perf_evlist *evlist); 138int perf_evlist__open(struct perf_evlist *evlist);
@@ -223,10 +165,9 @@ int perf_evlist__parse_mmap_pages(const struct option *opt,
223unsigned long perf_event_mlock_kb_in_pages(void); 165unsigned long perf_event_mlock_kb_in_pages(void);
224 166
225int perf_evlist__mmap_ex(struct perf_evlist *evlist, unsigned int pages, 167int perf_evlist__mmap_ex(struct perf_evlist *evlist, unsigned int pages,
226 bool overwrite, unsigned int auxtrace_pages, 168 unsigned int auxtrace_pages,
227 bool auxtrace_overwrite); 169 bool auxtrace_overwrite);
228int perf_evlist__mmap(struct perf_evlist *evlist, unsigned int pages, 170int perf_evlist__mmap(struct perf_evlist *evlist, unsigned int pages);
229 bool overwrite);
230void perf_evlist__munmap(struct perf_evlist *evlist); 171void perf_evlist__munmap(struct perf_evlist *evlist);
231 172
232size_t perf_evlist__mmap_size(unsigned long pages); 173size_t perf_evlist__mmap_size(unsigned long pages);
@@ -259,6 +200,10 @@ u16 perf_evlist__id_hdr_size(struct perf_evlist *evlist);
259int perf_evlist__parse_sample(struct perf_evlist *evlist, union perf_event *event, 200int perf_evlist__parse_sample(struct perf_evlist *evlist, union perf_event *event,
260 struct perf_sample *sample); 201 struct perf_sample *sample);
261 202
203int perf_evlist__parse_sample_timestamp(struct perf_evlist *evlist,
204 union perf_event *event,
205 u64 *timestamp);
206
262bool perf_evlist__valid_sample_type(struct perf_evlist *evlist); 207bool perf_evlist__valid_sample_type(struct perf_evlist *evlist);
263bool perf_evlist__valid_sample_id_all(struct perf_evlist *evlist); 208bool perf_evlist__valid_sample_id_all(struct perf_evlist *evlist);
264bool perf_evlist__valid_read_format(struct perf_evlist *evlist); 209bool perf_evlist__valid_read_format(struct perf_evlist *evlist);
@@ -286,25 +231,6 @@ size_t perf_evlist__fprintf(struct perf_evlist *evlist, FILE *fp);
286int perf_evlist__strerror_open(struct perf_evlist *evlist, int err, char *buf, size_t size); 231int perf_evlist__strerror_open(struct perf_evlist *evlist, int err, char *buf, size_t size);
287int perf_evlist__strerror_mmap(struct perf_evlist *evlist, int err, char *buf, size_t size); 232int perf_evlist__strerror_mmap(struct perf_evlist *evlist, int err, char *buf, size_t size);
288 233
289static inline u64 perf_mmap__read_head(struct perf_mmap *mm)
290{
291 struct perf_event_mmap_page *pc = mm->base;
292 u64 head = ACCESS_ONCE(pc->data_head);
293 rmb();
294 return head;
295}
296
297static inline void perf_mmap__write_tail(struct perf_mmap *md, u64 tail)
298{
299 struct perf_event_mmap_page *pc = md->base;
300
301 /*
302 * ensure all reads are done before we write the tail out.
303 */
304 mb();
305 pc->data_tail = tail;
306}
307
308bool perf_evlist__can_select_event(struct perf_evlist *evlist, const char *str); 234bool perf_evlist__can_select_event(struct perf_evlist *evlist, const char *str);
309void perf_evlist__to_front(struct perf_evlist *evlist, 235void perf_evlist__to_front(struct perf_evlist *evlist,
310 struct perf_evsel *move_evsel); 236 struct perf_evsel *move_evsel);
@@ -385,4 +311,6 @@ perf_evlist__find_evsel_by_str(struct perf_evlist *evlist, const char *str);
385 311
386struct perf_evsel *perf_evlist__event2evsel(struct perf_evlist *evlist, 312struct perf_evsel *perf_evlist__event2evsel(struct perf_evlist *evlist,
387 union perf_event *event); 313 union perf_event *event);
314
315bool perf_evlist__exclude_kernel(struct perf_evlist *evlist);
388#endif /* __PERF_EVLIST_H */ 316#endif /* __PERF_EVLIST_H */
diff --git a/tools/perf/util/evsel.c b/tools/perf/util/evsel.c
index 0dccdb89572c..ef351688b797 100644
--- a/tools/perf/util/evsel.c
+++ b/tools/perf/util/evsel.c
@@ -36,21 +36,12 @@
36#include "debug.h" 36#include "debug.h"
37#include "trace-event.h" 37#include "trace-event.h"
38#include "stat.h" 38#include "stat.h"
39#include "memswap.h"
39#include "util/parse-branch-options.h" 40#include "util/parse-branch-options.h"
40 41
41#include "sane_ctype.h" 42#include "sane_ctype.h"
42 43
43static struct { 44struct perf_missing_features perf_missing_features;
44 bool sample_id_all;
45 bool exclude_guest;
46 bool mmap2;
47 bool cloexec;
48 bool clockid;
49 bool clockid_wrong;
50 bool lbr_flags;
51 bool write_backward;
52 bool group_read;
53} perf_missing_features;
54 45
55static clockid_t clockid; 46static clockid_t clockid;
56 47
@@ -650,9 +641,9 @@ int perf_evsel__group_desc(struct perf_evsel *evsel, char *buf, size_t size)
650 return ret; 641 return ret;
651} 642}
652 643
653void perf_evsel__config_callchain(struct perf_evsel *evsel, 644static void __perf_evsel__config_callchain(struct perf_evsel *evsel,
654 struct record_opts *opts, 645 struct record_opts *opts,
655 struct callchain_param *param) 646 struct callchain_param *param)
656{ 647{
657 bool function = perf_evsel__is_function_event(evsel); 648 bool function = perf_evsel__is_function_event(evsel);
658 struct perf_event_attr *attr = &evsel->attr; 649 struct perf_event_attr *attr = &evsel->attr;
@@ -683,7 +674,7 @@ void perf_evsel__config_callchain(struct perf_evsel *evsel,
683 if (!function) { 674 if (!function) {
684 perf_evsel__set_sample_bit(evsel, REGS_USER); 675 perf_evsel__set_sample_bit(evsel, REGS_USER);
685 perf_evsel__set_sample_bit(evsel, STACK_USER); 676 perf_evsel__set_sample_bit(evsel, STACK_USER);
686 attr->sample_regs_user = PERF_REGS_MASK; 677 attr->sample_regs_user |= PERF_REGS_MASK;
687 attr->sample_stack_user = param->dump_size; 678 attr->sample_stack_user = param->dump_size;
688 attr->exclude_callchain_user = 1; 679 attr->exclude_callchain_user = 1;
689 } else { 680 } else {
@@ -698,6 +689,14 @@ void perf_evsel__config_callchain(struct perf_evsel *evsel,
698 } 689 }
699} 690}
700 691
692void perf_evsel__config_callchain(struct perf_evsel *evsel,
693 struct record_opts *opts,
694 struct callchain_param *param)
695{
696 if (param->enabled)
697 return __perf_evsel__config_callchain(evsel, opts, param);
698}
699
701static void 700static void
702perf_evsel__reset_callgraph(struct perf_evsel *evsel, 701perf_evsel__reset_callgraph(struct perf_evsel *evsel,
703 struct callchain_param *param) 702 struct callchain_param *param)
@@ -717,28 +716,34 @@ perf_evsel__reset_callgraph(struct perf_evsel *evsel,
717} 716}
718 717
719static void apply_config_terms(struct perf_evsel *evsel, 718static void apply_config_terms(struct perf_evsel *evsel,
720 struct record_opts *opts) 719 struct record_opts *opts, bool track)
721{ 720{
722 struct perf_evsel_config_term *term; 721 struct perf_evsel_config_term *term;
723 struct list_head *config_terms = &evsel->config_terms; 722 struct list_head *config_terms = &evsel->config_terms;
724 struct perf_event_attr *attr = &evsel->attr; 723 struct perf_event_attr *attr = &evsel->attr;
725 struct callchain_param param; 724 /* callgraph default */
725 struct callchain_param param = {
726 .record_mode = callchain_param.record_mode,
727 };
726 u32 dump_size = 0; 728 u32 dump_size = 0;
727 int max_stack = 0; 729 int max_stack = 0;
728 const char *callgraph_buf = NULL; 730 const char *callgraph_buf = NULL;
729 731
730 /* callgraph default */
731 param.record_mode = callchain_param.record_mode;
732
733 list_for_each_entry(term, config_terms, list) { 732 list_for_each_entry(term, config_terms, list) {
734 switch (term->type) { 733 switch (term->type) {
735 case PERF_EVSEL__CONFIG_TERM_PERIOD: 734 case PERF_EVSEL__CONFIG_TERM_PERIOD:
736 attr->sample_period = term->val.period; 735 if (!(term->weak && opts->user_interval != ULLONG_MAX)) {
737 attr->freq = 0; 736 attr->sample_period = term->val.period;
737 attr->freq = 0;
738 perf_evsel__reset_sample_bit(evsel, PERIOD);
739 }
738 break; 740 break;
739 case PERF_EVSEL__CONFIG_TERM_FREQ: 741 case PERF_EVSEL__CONFIG_TERM_FREQ:
740 attr->sample_freq = term->val.freq; 742 if (!(term->weak && opts->user_freq != UINT_MAX)) {
741 attr->freq = 1; 743 attr->sample_freq = term->val.freq;
744 attr->freq = 1;
745 perf_evsel__set_sample_bit(evsel, PERIOD);
746 }
742 break; 747 break;
743 case PERF_EVSEL__CONFIG_TERM_TIME: 748 case PERF_EVSEL__CONFIG_TERM_TIME:
744 if (term->val.time) 749 if (term->val.time)
@@ -775,6 +780,8 @@ static void apply_config_terms(struct perf_evsel *evsel,
775 case PERF_EVSEL__CONFIG_TERM_OVERWRITE: 780 case PERF_EVSEL__CONFIG_TERM_OVERWRITE:
776 attr->write_backward = term->val.overwrite ? 1 : 0; 781 attr->write_backward = term->val.overwrite ? 1 : 0;
777 break; 782 break;
783 case PERF_EVSEL__CONFIG_TERM_DRV_CFG:
784 break;
778 default: 785 default:
779 break; 786 break;
780 } 787 }
@@ -782,6 +789,8 @@ static void apply_config_terms(struct perf_evsel *evsel,
782 789
783 /* User explicitly set per-event callgraph, clear the old setting and reset. */ 790 /* User explicitly set per-event callgraph, clear the old setting and reset. */
784 if ((callgraph_buf != NULL) || (dump_size > 0) || max_stack) { 791 if ((callgraph_buf != NULL) || (dump_size > 0) || max_stack) {
792 bool sample_address = false;
793
785 if (max_stack) { 794 if (max_stack) {
786 param.max_stack = max_stack; 795 param.max_stack = max_stack;
787 if (callgraph_buf == NULL) 796 if (callgraph_buf == NULL)
@@ -801,6 +810,8 @@ static void apply_config_terms(struct perf_evsel *evsel,
801 evsel->name); 810 evsel->name);
802 return; 811 return;
803 } 812 }
813 if (param.record_mode == CALLCHAIN_DWARF)
814 sample_address = true;
804 } 815 }
805 } 816 }
806 if (dump_size > 0) { 817 if (dump_size > 0) {
@@ -813,8 +824,14 @@ static void apply_config_terms(struct perf_evsel *evsel,
813 perf_evsel__reset_callgraph(evsel, &callchain_param); 824 perf_evsel__reset_callgraph(evsel, &callchain_param);
814 825
815 /* set perf-event callgraph */ 826 /* set perf-event callgraph */
816 if (param.enabled) 827 if (param.enabled) {
828 if (sample_address) {
829 perf_evsel__set_sample_bit(evsel, ADDR);
830 perf_evsel__set_sample_bit(evsel, DATA_SRC);
831 evsel->attr.mmap_data = track;
832 }
817 perf_evsel__config_callchain(evsel, opts, &param); 833 perf_evsel__config_callchain(evsel, opts, &param);
834 }
818 } 835 }
819} 836}
820 837
@@ -936,12 +953,14 @@ void perf_evsel__config(struct perf_evsel *evsel, struct record_opts *opts,
936 perf_evsel__set_sample_bit(evsel, REGS_INTR); 953 perf_evsel__set_sample_bit(evsel, REGS_INTR);
937 } 954 }
938 955
956 if (opts->sample_user_regs) {
957 attr->sample_regs_user |= opts->sample_user_regs;
958 perf_evsel__set_sample_bit(evsel, REGS_USER);
959 }
960
939 if (target__has_cpu(&opts->target) || opts->sample_cpu) 961 if (target__has_cpu(&opts->target) || opts->sample_cpu)
940 perf_evsel__set_sample_bit(evsel, CPU); 962 perf_evsel__set_sample_bit(evsel, CPU);
941 963
942 if (opts->period)
943 perf_evsel__set_sample_bit(evsel, PERIOD);
944
945 /* 964 /*
946 * When the user explicitly disabled time don't force it here. 965 * When the user explicitly disabled time don't force it here.
947 */ 966 */
@@ -1040,9 +1059,17 @@ void perf_evsel__config(struct perf_evsel *evsel, struct record_opts *opts,
1040 * Apply event specific term settings, 1059 * Apply event specific term settings,
1041 * it overloads any global configuration. 1060 * it overloads any global configuration.
1042 */ 1061 */
1043 apply_config_terms(evsel, opts); 1062 apply_config_terms(evsel, opts, track);
1044 1063
1045 evsel->ignore_missing_thread = opts->ignore_missing_thread; 1064 evsel->ignore_missing_thread = opts->ignore_missing_thread;
1065
1066 /* The --period option takes the precedence. */
1067 if (opts->period_set) {
1068 if (opts->period)
1069 perf_evsel__set_sample_bit(evsel, PERIOD);
1070 else
1071 perf_evsel__reset_sample_bit(evsel, PERIOD);
1072 }
1046} 1073}
1047 1074
1048static int perf_evsel__alloc_fd(struct perf_evsel *evsel, int ncpus, int nthreads) 1075static int perf_evsel__alloc_fd(struct perf_evsel *evsel, int ncpus, int nthreads)
@@ -1366,7 +1393,7 @@ perf_evsel__process_group_data(struct perf_evsel *leader,
1366static int 1393static int
1367perf_evsel__read_group(struct perf_evsel *leader, int cpu, int thread) 1394perf_evsel__read_group(struct perf_evsel *leader, int cpu, int thread)
1368{ 1395{
1369 struct perf_stat_evsel *ps = leader->priv; 1396 struct perf_stat_evsel *ps = leader->stats;
1370 u64 read_format = leader->attr.read_format; 1397 u64 read_format = leader->attr.read_format;
1371 int size = perf_evsel__read_size(leader); 1398 int size = perf_evsel__read_size(leader);
1372 u64 *data = ps->group_data; 1399 u64 *data = ps->group_data;
@@ -1565,6 +1592,7 @@ int perf_event_attr__fprintf(FILE *fp, struct perf_event_attr *attr,
1565 PRINT_ATTRf(use_clockid, p_unsigned); 1592 PRINT_ATTRf(use_clockid, p_unsigned);
1566 PRINT_ATTRf(context_switch, p_unsigned); 1593 PRINT_ATTRf(context_switch, p_unsigned);
1567 PRINT_ATTRf(write_backward, p_unsigned); 1594 PRINT_ATTRf(write_backward, p_unsigned);
1595 PRINT_ATTRf(namespaces, p_unsigned);
1568 1596
1569 PRINT_ATTRn("{ wakeup_events, wakeup_watermark }", wakeup_events, p_unsigned); 1597 PRINT_ATTRn("{ wakeup_events, wakeup_watermark }", wakeup_events, p_unsigned);
1570 PRINT_ATTRf(bp_type, p_unsigned); 1598 PRINT_ATTRf(bp_type, p_unsigned);
@@ -1587,10 +1615,46 @@ static int __open_attr__fprintf(FILE *fp, const char *name, const char *val,
1587 return fprintf(fp, " %-32s %s\n", name, val); 1615 return fprintf(fp, " %-32s %s\n", name, val);
1588} 1616}
1589 1617
1618static void perf_evsel__remove_fd(struct perf_evsel *pos,
1619 int nr_cpus, int nr_threads,
1620 int thread_idx)
1621{
1622 for (int cpu = 0; cpu < nr_cpus; cpu++)
1623 for (int thread = thread_idx; thread < nr_threads - 1; thread++)
1624 FD(pos, cpu, thread) = FD(pos, cpu, thread + 1);
1625}
1626
1627static int update_fds(struct perf_evsel *evsel,
1628 int nr_cpus, int cpu_idx,
1629 int nr_threads, int thread_idx)
1630{
1631 struct perf_evsel *pos;
1632
1633 if (cpu_idx >= nr_cpus || thread_idx >= nr_threads)
1634 return -EINVAL;
1635
1636 evlist__for_each_entry(evsel->evlist, pos) {
1637 nr_cpus = pos != evsel ? nr_cpus : cpu_idx;
1638
1639 perf_evsel__remove_fd(pos, nr_cpus, nr_threads, thread_idx);
1640
1641 /*
1642 * Since fds for next evsel has not been created,
1643 * there is no need to iterate whole event list.
1644 */
1645 if (pos == evsel)
1646 break;
1647 }
1648 return 0;
1649}
1650
1590static bool ignore_missing_thread(struct perf_evsel *evsel, 1651static bool ignore_missing_thread(struct perf_evsel *evsel,
1652 int nr_cpus, int cpu,
1591 struct thread_map *threads, 1653 struct thread_map *threads,
1592 int thread, int err) 1654 int thread, int err)
1593{ 1655{
1656 pid_t ignore_pid = thread_map__pid(threads, thread);
1657
1594 if (!evsel->ignore_missing_thread) 1658 if (!evsel->ignore_missing_thread)
1595 return false; 1659 return false;
1596 1660
@@ -1606,11 +1670,18 @@ static bool ignore_missing_thread(struct perf_evsel *evsel,
1606 if (threads->nr == 1) 1670 if (threads->nr == 1)
1607 return false; 1671 return false;
1608 1672
1673 /*
1674 * We should remove fd for missing_thread first
1675 * because thread_map__remove() will decrease threads->nr.
1676 */
1677 if (update_fds(evsel, nr_cpus, cpu, threads->nr, thread))
1678 return false;
1679
1609 if (thread_map__remove(threads, thread)) 1680 if (thread_map__remove(threads, thread))
1610 return false; 1681 return false;
1611 1682
1612 pr_warning("WARNING: Ignored open failure for pid %d\n", 1683 pr_warning("WARNING: Ignored open failure for pid %d\n",
1613 thread_map__pid(threads, thread)); 1684 ignore_pid);
1614 return true; 1685 return true;
1615} 1686}
1616 1687
@@ -1715,7 +1786,7 @@ retry_open:
1715 if (fd < 0) { 1786 if (fd < 0) {
1716 err = -errno; 1787 err = -errno;
1717 1788
1718 if (ignore_missing_thread(evsel, threads, thread, err)) { 1789 if (ignore_missing_thread(evsel, cpus->nr, cpu, threads, thread, err)) {
1719 /* 1790 /*
1720 * We just removed 1 thread, so take a step 1791 * We just removed 1 thread, so take a step
1721 * back on thread index and lower the upper 1792 * back on thread index and lower the upper
@@ -1951,6 +2022,20 @@ static inline bool overflow(const void *endp, u16 max_size, const void *offset,
1951#define OVERFLOW_CHECK_u64(offset) \ 2022#define OVERFLOW_CHECK_u64(offset) \
1952 OVERFLOW_CHECK(offset, sizeof(u64), sizeof(u64)) 2023 OVERFLOW_CHECK(offset, sizeof(u64), sizeof(u64))
1953 2024
2025static int
2026perf_event__check_size(union perf_event *event, unsigned int sample_size)
2027{
2028 /*
2029 * The evsel's sample_size is based on PERF_SAMPLE_MASK which includes
2030 * up to PERF_SAMPLE_PERIOD. After that overflow() must be used to
2031 * check the format does not go past the end of the event.
2032 */
2033 if (sample_size + sizeof(event->header) > event->header.size)
2034 return -EFAULT;
2035
2036 return 0;
2037}
2038
1954int perf_evsel__parse_sample(struct perf_evsel *evsel, union perf_event *event, 2039int perf_evsel__parse_sample(struct perf_evsel *evsel, union perf_event *event,
1955 struct perf_sample *data) 2040 struct perf_sample *data)
1956{ 2041{
@@ -1972,6 +2057,9 @@ int perf_evsel__parse_sample(struct perf_evsel *evsel, union perf_event *event,
1972 data->stream_id = data->id = data->time = -1ULL; 2057 data->stream_id = data->id = data->time = -1ULL;
1973 data->period = evsel->attr.sample_period; 2058 data->period = evsel->attr.sample_period;
1974 data->cpumode = event->header.misc & PERF_RECORD_MISC_CPUMODE_MASK; 2059 data->cpumode = event->header.misc & PERF_RECORD_MISC_CPUMODE_MASK;
2060 data->misc = event->header.misc;
2061 data->id = -1ULL;
2062 data->data_src = PERF_MEM_DATA_SRC_NONE;
1975 2063
1976 if (event->header.type != PERF_RECORD_SAMPLE) { 2064 if (event->header.type != PERF_RECORD_SAMPLE) {
1977 if (!evsel->attr.sample_id_all) 2065 if (!evsel->attr.sample_id_all)
@@ -1981,15 +2069,9 @@ int perf_evsel__parse_sample(struct perf_evsel *evsel, union perf_event *event,
1981 2069
1982 array = event->sample.array; 2070 array = event->sample.array;
1983 2071
1984 /* 2072 if (perf_event__check_size(event, evsel->sample_size))
1985 * The evsel's sample_size is based on PERF_SAMPLE_MASK which includes
1986 * up to PERF_SAMPLE_PERIOD. After that overflow() must be used to
1987 * check the format does not go past the end of the event.
1988 */
1989 if (evsel->sample_size + sizeof(event->header) > event->header.size)
1990 return -EFAULT; 2073 return -EFAULT;
1991 2074
1992 data->id = -1ULL;
1993 if (type & PERF_SAMPLE_IDENTIFIER) { 2075 if (type & PERF_SAMPLE_IDENTIFIER) {
1994 data->id = *array; 2076 data->id = *array;
1995 array++; 2077 array++;
@@ -2019,7 +2101,6 @@ int perf_evsel__parse_sample(struct perf_evsel *evsel, union perf_event *event,
2019 array++; 2101 array++;
2020 } 2102 }
2021 2103
2022 data->addr = 0;
2023 if (type & PERF_SAMPLE_ADDR) { 2104 if (type & PERF_SAMPLE_ADDR) {
2024 data->addr = *array; 2105 data->addr = *array;
2025 array++; 2106 array++;
@@ -2111,14 +2192,27 @@ int perf_evsel__parse_sample(struct perf_evsel *evsel, union perf_event *event,
2111 if (type & PERF_SAMPLE_RAW) { 2192 if (type & PERF_SAMPLE_RAW) {
2112 OVERFLOW_CHECK_u64(array); 2193 OVERFLOW_CHECK_u64(array);
2113 u.val64 = *array; 2194 u.val64 = *array;
2114 if (WARN_ONCE(swapped, 2195
2115 "Endianness of raw data not corrected!\n")) { 2196 /*
2116 /* undo swap of u64, then swap on individual u32s */ 2197 * Undo swap of u64, then swap on individual u32s,
2198 * get the size of the raw area and undo all of the
2199 * swap. The pevent interface handles endianity by
2200 * itself.
2201 */
2202 if (swapped) {
2117 u.val64 = bswap_64(u.val64); 2203 u.val64 = bswap_64(u.val64);
2118 u.val32[0] = bswap_32(u.val32[0]); 2204 u.val32[0] = bswap_32(u.val32[0]);
2119 u.val32[1] = bswap_32(u.val32[1]); 2205 u.val32[1] = bswap_32(u.val32[1]);
2120 } 2206 }
2121 data->raw_size = u.val32[0]; 2207 data->raw_size = u.val32[0];
2208
2209 /*
2210 * The raw data is aligned on 64bits including the
2211 * u32 size, so it's safe to use mem_bswap_64.
2212 */
2213 if (swapped)
2214 mem_bswap_64((void *) array, data->raw_size);
2215
2122 array = (void *)array + sizeof(u32); 2216 array = (void *)array + sizeof(u32);
2123 2217
2124 OVERFLOW_CHECK(array, data->raw_size, max_size); 2218 OVERFLOW_CHECK(array, data->raw_size, max_size);
@@ -2183,14 +2277,12 @@ int perf_evsel__parse_sample(struct perf_evsel *evsel, union perf_event *event,
2183 array++; 2277 array++;
2184 } 2278 }
2185 2279
2186 data->data_src = PERF_MEM_DATA_SRC_NONE;
2187 if (type & PERF_SAMPLE_DATA_SRC) { 2280 if (type & PERF_SAMPLE_DATA_SRC) {
2188 OVERFLOW_CHECK_u64(array); 2281 OVERFLOW_CHECK_u64(array);
2189 data->data_src = *array; 2282 data->data_src = *array;
2190 array++; 2283 array++;
2191 } 2284 }
2192 2285
2193 data->transaction = 0;
2194 if (type & PERF_SAMPLE_TRANSACTION) { 2286 if (type & PERF_SAMPLE_TRANSACTION) {
2195 OVERFLOW_CHECK_u64(array); 2287 OVERFLOW_CHECK_u64(array);
2196 data->transaction = *array; 2288 data->transaction = *array;
@@ -2223,6 +2315,50 @@ int perf_evsel__parse_sample(struct perf_evsel *evsel, union perf_event *event,
2223 return 0; 2315 return 0;
2224} 2316}
2225 2317
2318int perf_evsel__parse_sample_timestamp(struct perf_evsel *evsel,
2319 union perf_event *event,
2320 u64 *timestamp)
2321{
2322 u64 type = evsel->attr.sample_type;
2323 const u64 *array;
2324
2325 if (!(type & PERF_SAMPLE_TIME))
2326 return -1;
2327
2328 if (event->header.type != PERF_RECORD_SAMPLE) {
2329 struct perf_sample data = {
2330 .time = -1ULL,
2331 };
2332
2333 if (!evsel->attr.sample_id_all)
2334 return -1;
2335 if (perf_evsel__parse_id_sample(evsel, event, &data))
2336 return -1;
2337
2338 *timestamp = data.time;
2339 return 0;
2340 }
2341
2342 array = event->sample.array;
2343
2344 if (perf_event__check_size(event, evsel->sample_size))
2345 return -EFAULT;
2346
2347 if (type & PERF_SAMPLE_IDENTIFIER)
2348 array++;
2349
2350 if (type & PERF_SAMPLE_IP)
2351 array++;
2352
2353 if (type & PERF_SAMPLE_TID)
2354 array++;
2355
2356 if (type & PERF_SAMPLE_TIME)
2357 *timestamp = *array;
2358
2359 return 0;
2360}
2361
2226size_t perf_event__sample_event_size(const struct perf_sample *sample, u64 type, 2362size_t perf_event__sample_event_size(const struct perf_sample *sample, u64 type,
2227 u64 read_format) 2363 u64 read_format)
2228{ 2364{
@@ -2333,8 +2469,7 @@ size_t perf_event__sample_event_size(const struct perf_sample *sample, u64 type,
2333 2469
2334int perf_event__synthesize_sample(union perf_event *event, u64 type, 2470int perf_event__synthesize_sample(union perf_event *event, u64 type,
2335 u64 read_format, 2471 u64 read_format,
2336 const struct perf_sample *sample, 2472 const struct perf_sample *sample)
2337 bool swapped)
2338{ 2473{
2339 u64 *array; 2474 u64 *array;
2340 size_t sz; 2475 size_t sz;
@@ -2359,15 +2494,6 @@ int perf_event__synthesize_sample(union perf_event *event, u64 type,
2359 if (type & PERF_SAMPLE_TID) { 2494 if (type & PERF_SAMPLE_TID) {
2360 u.val32[0] = sample->pid; 2495 u.val32[0] = sample->pid;
2361 u.val32[1] = sample->tid; 2496 u.val32[1] = sample->tid;
2362 if (swapped) {
2363 /*
2364 * Inverse of what is done in perf_evsel__parse_sample
2365 */
2366 u.val32[0] = bswap_32(u.val32[0]);
2367 u.val32[1] = bswap_32(u.val32[1]);
2368 u.val64 = bswap_64(u.val64);
2369 }
2370
2371 *array = u.val64; 2497 *array = u.val64;
2372 array++; 2498 array++;
2373 } 2499 }
@@ -2394,13 +2520,7 @@ int perf_event__synthesize_sample(union perf_event *event, u64 type,
2394 2520
2395 if (type & PERF_SAMPLE_CPU) { 2521 if (type & PERF_SAMPLE_CPU) {
2396 u.val32[0] = sample->cpu; 2522 u.val32[0] = sample->cpu;
2397 if (swapped) { 2523 u.val32[1] = 0;
2398 /*
2399 * Inverse of what is done in perf_evsel__parse_sample
2400 */
2401 u.val32[0] = bswap_32(u.val32[0]);
2402 u.val64 = bswap_64(u.val64);
2403 }
2404 *array = u.val64; 2524 *array = u.val64;
2405 array++; 2525 array++;
2406 } 2526 }
@@ -2447,15 +2567,6 @@ int perf_event__synthesize_sample(union perf_event *event, u64 type,
2447 2567
2448 if (type & PERF_SAMPLE_RAW) { 2568 if (type & PERF_SAMPLE_RAW) {
2449 u.val32[0] = sample->raw_size; 2569 u.val32[0] = sample->raw_size;
2450 if (WARN_ONCE(swapped,
2451 "Endianness of raw data not corrected!\n")) {
2452 /*
2453 * Inverse of what is done in perf_evsel__parse_sample
2454 */
2455 u.val32[0] = bswap_32(u.val32[0]);
2456 u.val32[1] = bswap_32(u.val32[1]);
2457 u.val64 = bswap_64(u.val64);
2458 }
2459 *array = u.val64; 2570 *array = u.val64;
2460 array = (void *)array + sizeof(u32); 2571 array = (void *)array + sizeof(u32);
2461 2572
@@ -2734,8 +2845,9 @@ int perf_evsel__open_strerror(struct perf_evsel *evsel, struct target *target,
2734 break; 2845 break;
2735 case EOPNOTSUPP: 2846 case EOPNOTSUPP:
2736 if (evsel->attr.sample_period != 0) 2847 if (evsel->attr.sample_period != 0)
2737 return scnprintf(msg, size, "%s", 2848 return scnprintf(msg, size,
2738 "PMU Hardware doesn't support sampling/overflow-interrupts."); 2849 "%s: PMU Hardware doesn't support sampling/overflow-interrupts. Try 'perf stat'",
2850 perf_evsel__name(evsel));
2739 if (evsel->attr.precise_ip) 2851 if (evsel->attr.precise_ip)
2740 return scnprintf(msg, size, "%s", 2852 return scnprintf(msg, size, "%s",
2741 "\'precise\' request may not be supported. Try removing 'p' modifier."); 2853 "\'precise\' request may not be supported. Try removing 'p' modifier.");
@@ -2772,16 +2884,9 @@ int perf_evsel__open_strerror(struct perf_evsel *evsel, struct target *target,
2772 perf_evsel__name(evsel)); 2884 perf_evsel__name(evsel));
2773} 2885}
2774 2886
2775char *perf_evsel__env_arch(struct perf_evsel *evsel) 2887struct perf_env *perf_evsel__env(struct perf_evsel *evsel)
2776{
2777 if (evsel && evsel->evlist && evsel->evlist->env)
2778 return evsel->evlist->env->arch;
2779 return NULL;
2780}
2781
2782char *perf_evsel__env_cpuid(struct perf_evsel *evsel)
2783{ 2888{
2784 if (evsel && evsel->evlist && evsel->evlist->env) 2889 if (evsel && evsel->evlist)
2785 return evsel->evlist->env->cpuid; 2890 return evsel->evlist->env;
2786 return NULL; 2891 return NULL;
2787} 2892}
diff --git a/tools/perf/util/evsel.h b/tools/perf/util/evsel.h
index b4df79d72329..a7487c6d1866 100644
--- a/tools/perf/util/evsel.h
+++ b/tools/perf/util/evsel.h
@@ -38,7 +38,7 @@ struct cgroup_sel;
38 * It is allocated within event parsing and attached to 38 * It is allocated within event parsing and attached to
39 * perf_evsel::config_terms list head. 39 * perf_evsel::config_terms list head.
40*/ 40*/
41enum { 41enum term_type {
42 PERF_EVSEL__CONFIG_TERM_PERIOD, 42 PERF_EVSEL__CONFIG_TERM_PERIOD,
43 PERF_EVSEL__CONFIG_TERM_FREQ, 43 PERF_EVSEL__CONFIG_TERM_FREQ,
44 PERF_EVSEL__CONFIG_TERM_TIME, 44 PERF_EVSEL__CONFIG_TERM_TIME,
@@ -49,12 +49,11 @@ enum {
49 PERF_EVSEL__CONFIG_TERM_OVERWRITE, 49 PERF_EVSEL__CONFIG_TERM_OVERWRITE,
50 PERF_EVSEL__CONFIG_TERM_DRV_CFG, 50 PERF_EVSEL__CONFIG_TERM_DRV_CFG,
51 PERF_EVSEL__CONFIG_TERM_BRANCH, 51 PERF_EVSEL__CONFIG_TERM_BRANCH,
52 PERF_EVSEL__CONFIG_TERM_MAX,
53}; 52};
54 53
55struct perf_evsel_config_term { 54struct perf_evsel_config_term {
56 struct list_head list; 55 struct list_head list;
57 int type; 56 enum term_type type;
58 union { 57 union {
59 u64 period; 58 u64 period;
60 u64 freq; 59 u64 freq;
@@ -67,8 +66,11 @@ struct perf_evsel_config_term {
67 bool overwrite; 66 bool overwrite;
68 char *branch; 67 char *branch;
69 } val; 68 } val;
69 bool weak;
70}; 70};
71 71
72struct perf_stat_evsel;
73
72/** struct perf_evsel - event selector 74/** struct perf_evsel - event selector
73 * 75 *
74 * @evlist - evlist this evsel is in, if it is in one. 76 * @evlist - evlist this evsel is in, if it is in one.
@@ -102,6 +104,7 @@ struct perf_evsel {
102 const char *unit; 104 const char *unit;
103 struct event_format *tp_format; 105 struct event_format *tp_format;
104 off_t id_offset; 106 off_t id_offset;
107 struct perf_stat_evsel *stats;
105 void *priv; 108 void *priv;
106 u64 db_id; 109 u64 db_id;
107 struct cgroup_sel *cgrp; 110 struct cgroup_sel *cgrp;
@@ -138,6 +141,7 @@ struct perf_evsel {
138 const char * metric_name; 141 const char * metric_name;
139 struct perf_evsel **metric_events; 142 struct perf_evsel **metric_events;
140 bool collect_stat; 143 bool collect_stat;
144 bool weak_group;
141}; 145};
142 146
143union u64_swap { 147union u64_swap {
@@ -145,6 +149,20 @@ union u64_swap {
145 u32 val32[2]; 149 u32 val32[2];
146}; 150};
147 151
152struct perf_missing_features {
153 bool sample_id_all;
154 bool exclude_guest;
155 bool mmap2;
156 bool cloexec;
157 bool clockid;
158 bool clockid_wrong;
159 bool lbr_flags;
160 bool write_backward;
161 bool group_read;
162};
163
164extern struct perf_missing_features perf_missing_features;
165
148struct cpu_map; 166struct cpu_map;
149struct target; 167struct target;
150struct thread_map; 168struct thread_map;
@@ -334,6 +352,10 @@ static inline int perf_evsel__read_on_cpu_scaled(struct perf_evsel *evsel,
334int perf_evsel__parse_sample(struct perf_evsel *evsel, union perf_event *event, 352int perf_evsel__parse_sample(struct perf_evsel *evsel, union perf_event *event,
335 struct perf_sample *sample); 353 struct perf_sample *sample);
336 354
355int perf_evsel__parse_sample_timestamp(struct perf_evsel *evsel,
356 union perf_event *event,
357 u64 *timestamp);
358
337static inline struct perf_evsel *perf_evsel__next(struct perf_evsel *evsel) 359static inline struct perf_evsel *perf_evsel__next(struct perf_evsel *evsel)
338{ 360{
339 return list_entry(evsel->node.next, struct perf_evsel, node); 361 return list_entry(evsel->node.next, struct perf_evsel, node);
@@ -438,7 +460,6 @@ typedef int (*attr__fprintf_f)(FILE *, const char *, const char *, void *);
438int perf_event_attr__fprintf(FILE *fp, struct perf_event_attr *attr, 460int perf_event_attr__fprintf(FILE *fp, struct perf_event_attr *attr,
439 attr__fprintf_f attr__fprintf, void *priv); 461 attr__fprintf_f attr__fprintf, void *priv);
440 462
441char *perf_evsel__env_arch(struct perf_evsel *evsel); 463struct perf_env *perf_evsel__env(struct perf_evsel *evsel);
442char *perf_evsel__env_cpuid(struct perf_evsel *evsel);
443 464
444#endif /* __PERF_EVSEL_H */ 465#endif /* __PERF_EVSEL_H */
diff --git a/tools/perf/util/evsel_fprintf.c b/tools/perf/util/evsel_fprintf.c
index 1fd7c2e46db2..06dfb027879d 100644
--- a/tools/perf/util/evsel_fprintf.c
+++ b/tools/perf/util/evsel_fprintf.c
@@ -158,7 +158,7 @@ int sample__fprintf_callchain(struct perf_sample *sample, int left_alignment,
158 } 158 }
159 } 159 }
160 160
161 if (print_dso) { 161 if (print_dso && (!node->sym || !node->sym->inlined)) {
162 printed += fprintf(fp, " ("); 162 printed += fprintf(fp, " (");
163 printed += map__fprintf_dsoname(node->map, fp); 163 printed += map__fprintf_dsoname(node->map, fp);
164 printed += fprintf(fp, ")"); 164 printed += fprintf(fp, ")");
@@ -167,41 +167,12 @@ int sample__fprintf_callchain(struct perf_sample *sample, int left_alignment,
167 if (print_srcline) 167 if (print_srcline)
168 printed += map__fprintf_srcline(node->map, addr, "\n ", fp); 168 printed += map__fprintf_srcline(node->map, addr, "\n ", fp);
169 169
170 if (node->sym && node->sym->inlined)
171 printed += fprintf(fp, " (inlined)");
172
170 if (!print_oneline) 173 if (!print_oneline)
171 printed += fprintf(fp, "\n"); 174 printed += fprintf(fp, "\n");
172 175
173 if (symbol_conf.inline_name && node->map) {
174 struct inline_node *inode;
175
176 addr = map__rip_2objdump(node->map, node->ip),
177 inode = dso__parse_addr_inlines(node->map->dso, addr);
178
179 if (inode) {
180 struct inline_list *ilist;
181
182 list_for_each_entry(ilist, &inode->val, list) {
183 if (print_arrow)
184 printed += fprintf(fp, " <-");
185
186 /* IP is same, just skip it */
187 if (print_ip)
188 printed += fprintf(fp, "%c%16s",
189 s, "");
190 if (print_sym)
191 printed += fprintf(fp, " %s",
192 ilist->funcname);
193 if (print_srcline)
194 printed += fprintf(fp, "\n %s:%d",
195 ilist->filename,
196 ilist->line_nr);
197 if (!print_oneline)
198 printed += fprintf(fp, "\n");
199 }
200
201 inline_node__delete(inode);
202 }
203 }
204
205 if (symbol_conf.bt_stop_list && 176 if (symbol_conf.bt_stop_list &&
206 node->sym && 177 node->sym &&
207 strlist__has_entry(symbol_conf.bt_stop_list, 178 strlist__has_entry(symbol_conf.bt_stop_list,
diff --git a/tools/perf/util/generate-cmdlist.sh b/tools/perf/util/generate-cmdlist.sh
index 9bbcec4e3365..ff17920a5ebc 100755
--- a/tools/perf/util/generate-cmdlist.sh
+++ b/tools/perf/util/generate-cmdlist.sh
@@ -38,7 +38,7 @@ do
38done 38done
39echo "#endif /* HAVE_LIBELF_SUPPORT */" 39echo "#endif /* HAVE_LIBELF_SUPPORT */"
40 40
41echo "#ifdef HAVE_LIBAUDIT_SUPPORT" 41echo "#if defined(HAVE_LIBAUDIT_SUPPORT) || defined(HAVE_SYSCALL_TABLE)"
42sed -n -e 's/^perf-\([^ ]*\)[ ].* audit*/\1/p' command-list.txt | 42sed -n -e 's/^perf-\([^ ]*\)[ ].* audit*/\1/p' command-list.txt |
43sort | 43sort |
44while read cmd 44while read cmd
diff --git a/tools/perf/util/header.c b/tools/perf/util/header.c
index ba0cea8fef72..a326e0d8b5b6 100644
--- a/tools/perf/util/header.c
+++ b/tools/perf/util/header.c
@@ -15,9 +15,8 @@
15#include <linux/bitops.h> 15#include <linux/bitops.h>
16#include <linux/stringify.h> 16#include <linux/stringify.h>
17#include <sys/stat.h> 17#include <sys/stat.h>
18#include <sys/types.h>
19#include <sys/utsname.h> 18#include <sys/utsname.h>
20#include <unistd.h> 19#include <linux/time64.h>
21 20
22#include "evlist.h" 21#include "evlist.h"
23#include "evsel.h" 22#include "evsel.h"
@@ -37,6 +36,7 @@
37#include <api/fs/fs.h> 36#include <api/fs/fs.h>
38#include "asm/bug.h" 37#include "asm/bug.h"
39#include "tool.h" 38#include "tool.h"
39#include "time-utils.h"
40 40
41#include "sane_ctype.h" 41#include "sane_ctype.h"
42 42
@@ -1182,6 +1182,20 @@ static int write_stat(struct feat_fd *ff __maybe_unused,
1182 return 0; 1182 return 0;
1183} 1183}
1184 1184
1185static int write_sample_time(struct feat_fd *ff,
1186 struct perf_evlist *evlist)
1187{
1188 int ret;
1189
1190 ret = do_write(ff, &evlist->first_sample_time,
1191 sizeof(evlist->first_sample_time));
1192 if (ret < 0)
1193 return ret;
1194
1195 return do_write(ff, &evlist->last_sample_time,
1196 sizeof(evlist->last_sample_time));
1197}
1198
1185static void print_hostname(struct feat_fd *ff, FILE *fp) 1199static void print_hostname(struct feat_fd *ff, FILE *fp)
1186{ 1200{
1187 fprintf(fp, "# hostname : %s\n", ff->ph->env.hostname); 1201 fprintf(fp, "# hostname : %s\n", ff->ph->env.hostname);
@@ -1507,6 +1521,28 @@ static void print_group_desc(struct feat_fd *ff, FILE *fp)
1507 } 1521 }
1508} 1522}
1509 1523
1524static void print_sample_time(struct feat_fd *ff, FILE *fp)
1525{
1526 struct perf_session *session;
1527 char time_buf[32];
1528 double d;
1529
1530 session = container_of(ff->ph, struct perf_session, header);
1531
1532 timestamp__scnprintf_usec(session->evlist->first_sample_time,
1533 time_buf, sizeof(time_buf));
1534 fprintf(fp, "# time of first sample : %s\n", time_buf);
1535
1536 timestamp__scnprintf_usec(session->evlist->last_sample_time,
1537 time_buf, sizeof(time_buf));
1538 fprintf(fp, "# time of last sample : %s\n", time_buf);
1539
1540 d = (double)(session->evlist->last_sample_time -
1541 session->evlist->first_sample_time) / NSEC_PER_MSEC;
1542
1543 fprintf(fp, "# sample duration : %10.3f ms\n", d);
1544}
1545
1510static int __event_process_build_id(struct build_id_event *bev, 1546static int __event_process_build_id(struct build_id_event *bev,
1511 char *filename, 1547 char *filename,
1512 struct perf_session *session) 1548 struct perf_session *session)
@@ -1763,7 +1799,7 @@ process_event_desc(struct feat_fd *ff, void *data __maybe_unused)
1763 1799
1764 session = container_of(ff->ph, struct perf_session, header); 1800 session = container_of(ff->ph, struct perf_session, header);
1765 1801
1766 if (session->file->is_pipe) { 1802 if (session->data->is_pipe) {
1767 /* Save events for reading later by print_event_desc, 1803 /* Save events for reading later by print_event_desc,
1768 * since they can't be read again in pipe mode. */ 1804 * since they can't be read again in pipe mode. */
1769 ff->events = events; 1805 ff->events = events;
@@ -1772,7 +1808,7 @@ process_event_desc(struct feat_fd *ff, void *data __maybe_unused)
1772 for (evsel = events; evsel->attr.size; evsel++) 1808 for (evsel = events; evsel->attr.size; evsel++)
1773 perf_evlist__set_event_name(session->evlist, evsel); 1809 perf_evlist__set_event_name(session->evlist, evsel);
1774 1810
1775 if (!session->file->is_pipe) 1811 if (!session->data->is_pipe)
1776 free_event_desc(events); 1812 free_event_desc(events);
1777 1813
1778 return 0; 1814 return 0;
@@ -2148,6 +2184,27 @@ out_free_caches:
2148 return -1; 2184 return -1;
2149} 2185}
2150 2186
2187static int process_sample_time(struct feat_fd *ff, void *data __maybe_unused)
2188{
2189 struct perf_session *session;
2190 u64 first_sample_time, last_sample_time;
2191 int ret;
2192
2193 session = container_of(ff->ph, struct perf_session, header);
2194
2195 ret = do_read_u64(ff, &first_sample_time);
2196 if (ret)
2197 return -1;
2198
2199 ret = do_read_u64(ff, &last_sample_time);
2200 if (ret)
2201 return -1;
2202
2203 session->evlist->first_sample_time = first_sample_time;
2204 session->evlist->last_sample_time = last_sample_time;
2205 return 0;
2206}
2207
2151struct feature_ops { 2208struct feature_ops {
2152 int (*write)(struct feat_fd *ff, struct perf_evlist *evlist); 2209 int (*write)(struct feat_fd *ff, struct perf_evlist *evlist);
2153 void (*print)(struct feat_fd *ff, FILE *fp); 2210 void (*print)(struct feat_fd *ff, FILE *fp);
@@ -2205,6 +2262,7 @@ static const struct feature_ops feat_ops[HEADER_LAST_FEATURE] = {
2205 FEAT_OPN(AUXTRACE, auxtrace, false), 2262 FEAT_OPN(AUXTRACE, auxtrace, false),
2206 FEAT_OPN(STAT, stat, false), 2263 FEAT_OPN(STAT, stat, false),
2207 FEAT_OPN(CACHE, cache, true), 2264 FEAT_OPN(CACHE, cache, true),
2265 FEAT_OPR(SAMPLE_TIME, sample_time, false),
2208}; 2266};
2209 2267
2210struct header_print_data { 2268struct header_print_data {
@@ -2249,7 +2307,7 @@ int perf_header__fprintf_info(struct perf_session *session, FILE *fp, bool full)
2249{ 2307{
2250 struct header_print_data hd; 2308 struct header_print_data hd;
2251 struct perf_header *header = &session->header; 2309 struct perf_header *header = &session->header;
2252 int fd = perf_data_file__fd(session->file); 2310 int fd = perf_data__fd(session->data);
2253 struct stat st; 2311 struct stat st;
2254 int ret, bit; 2312 int ret, bit;
2255 2313
@@ -2265,7 +2323,7 @@ int perf_header__fprintf_info(struct perf_session *session, FILE *fp, bool full)
2265 perf_header__process_sections(header, fd, &hd, 2323 perf_header__process_sections(header, fd, &hd,
2266 perf_file_section__fprintf_info); 2324 perf_file_section__fprintf_info);
2267 2325
2268 if (session->file->is_pipe) 2326 if (session->data->is_pipe)
2269 return 0; 2327 return 0;
2270 2328
2271 fprintf(fp, "# missing features: "); 2329 fprintf(fp, "# missing features: ");
@@ -2758,7 +2816,7 @@ static int perf_header__read_pipe(struct perf_session *session)
2758 struct perf_pipe_file_header f_header; 2816 struct perf_pipe_file_header f_header;
2759 2817
2760 if (perf_file_header__read_pipe(&f_header, header, 2818 if (perf_file_header__read_pipe(&f_header, header,
2761 perf_data_file__fd(session->file), 2819 perf_data__fd(session->data),
2762 session->repipe) < 0) { 2820 session->repipe) < 0) {
2763 pr_debug("incompatible file format\n"); 2821 pr_debug("incompatible file format\n");
2764 return -EINVAL; 2822 return -EINVAL;
@@ -2861,13 +2919,13 @@ static int perf_evlist__prepare_tracepoint_events(struct perf_evlist *evlist,
2861 2919
2862int perf_session__read_header(struct perf_session *session) 2920int perf_session__read_header(struct perf_session *session)
2863{ 2921{
2864 struct perf_data_file *file = session->file; 2922 struct perf_data *data = session->data;
2865 struct perf_header *header = &session->header; 2923 struct perf_header *header = &session->header;
2866 struct perf_file_header f_header; 2924 struct perf_file_header f_header;
2867 struct perf_file_attr f_attr; 2925 struct perf_file_attr f_attr;
2868 u64 f_id; 2926 u64 f_id;
2869 int nr_attrs, nr_ids, i, j; 2927 int nr_attrs, nr_ids, i, j;
2870 int fd = perf_data_file__fd(file); 2928 int fd = perf_data__fd(data);
2871 2929
2872 session->evlist = perf_evlist__new(); 2930 session->evlist = perf_evlist__new();
2873 if (session->evlist == NULL) 2931 if (session->evlist == NULL)
@@ -2875,7 +2933,7 @@ int perf_session__read_header(struct perf_session *session)
2875 2933
2876 session->evlist->env = &header->env; 2934 session->evlist->env = &header->env;
2877 session->machines.host.env = &header->env; 2935 session->machines.host.env = &header->env;
2878 if (perf_data_file__is_pipe(file)) 2936 if (perf_data__is_pipe(data))
2879 return perf_header__read_pipe(session); 2937 return perf_header__read_pipe(session);
2880 2938
2881 if (perf_file_header__read(&f_header, header, fd) < 0) 2939 if (perf_file_header__read(&f_header, header, fd) < 0)
@@ -2890,7 +2948,7 @@ int perf_session__read_header(struct perf_session *session)
2890 if (f_header.data.size == 0) { 2948 if (f_header.data.size == 0) {
2891 pr_warning("WARNING: The %s file's data size field is 0 which is unexpected.\n" 2949 pr_warning("WARNING: The %s file's data size field is 0 which is unexpected.\n"
2892 "Was the 'perf record' command properly terminated?\n", 2950 "Was the 'perf record' command properly terminated?\n",
2893 file->path); 2951 data->file.path);
2894 } 2952 }
2895 2953
2896 nr_attrs = f_header.attrs.size / f_header.attr_size; 2954 nr_attrs = f_header.attrs.size / f_header.attr_size;
@@ -3258,6 +3316,74 @@ int perf_event__synthesize_attrs(struct perf_tool *tool,
3258 return err; 3316 return err;
3259} 3317}
3260 3318
3319static bool has_unit(struct perf_evsel *counter)
3320{
3321 return counter->unit && *counter->unit;
3322}
3323
3324static bool has_scale(struct perf_evsel *counter)
3325{
3326 return counter->scale != 1;
3327}
3328
3329int perf_event__synthesize_extra_attr(struct perf_tool *tool,
3330 struct perf_evlist *evsel_list,
3331 perf_event__handler_t process,
3332 bool is_pipe)
3333{
3334 struct perf_evsel *counter;
3335 int err;
3336
3337 /*
3338 * Synthesize other events stuff not carried within
3339 * attr event - unit, scale, name
3340 */
3341 evlist__for_each_entry(evsel_list, counter) {
3342 if (!counter->supported)
3343 continue;
3344
3345 /*
3346 * Synthesize unit and scale only if it's defined.
3347 */
3348 if (has_unit(counter)) {
3349 err = perf_event__synthesize_event_update_unit(tool, counter, process);
3350 if (err < 0) {
3351 pr_err("Couldn't synthesize evsel unit.\n");
3352 return err;
3353 }
3354 }
3355
3356 if (has_scale(counter)) {
3357 err = perf_event__synthesize_event_update_scale(tool, counter, process);
3358 if (err < 0) {
3359 pr_err("Couldn't synthesize evsel counter.\n");
3360 return err;
3361 }
3362 }
3363
3364 if (counter->own_cpus) {
3365 err = perf_event__synthesize_event_update_cpus(tool, counter, process);
3366 if (err < 0) {
3367 pr_err("Couldn't synthesize evsel cpus.\n");
3368 return err;
3369 }
3370 }
3371
3372 /*
3373 * Name is needed only for pipe output,
3374 * perf.data carries event names.
3375 */
3376 if (is_pipe) {
3377 err = perf_event__synthesize_event_update_name(tool, counter, process);
3378 if (err < 0) {
3379 pr_err("Couldn't synthesize evsel name.\n");
3380 return err;
3381 }
3382 }
3383 }
3384 return 0;
3385}
3386
3261int perf_event__process_attr(struct perf_tool *tool __maybe_unused, 3387int perf_event__process_attr(struct perf_tool *tool __maybe_unused,
3262 union perf_event *event, 3388 union perf_event *event,
3263 struct perf_evlist **pevlist) 3389 struct perf_evlist **pevlist)
@@ -3398,7 +3524,7 @@ int perf_event__process_tracing_data(struct perf_tool *tool __maybe_unused,
3398 struct perf_session *session) 3524 struct perf_session *session)
3399{ 3525{
3400 ssize_t size_read, padding, size = event->tracing_data.size; 3526 ssize_t size_read, padding, size = event->tracing_data.size;
3401 int fd = perf_data_file__fd(session->file); 3527 int fd = perf_data__fd(session->data);
3402 off_t offset = lseek(fd, 0, SEEK_CUR); 3528 off_t offset = lseek(fd, 0, SEEK_CUR);
3403 char buf[BUFSIZ]; 3529 char buf[BUFSIZ];
3404 3530
diff --git a/tools/perf/util/header.h b/tools/perf/util/header.h
index 29ccbfdf8724..f28aaaa3a440 100644
--- a/tools/perf/util/header.h
+++ b/tools/perf/util/header.h
@@ -9,6 +9,7 @@
9#include <linux/types.h> 9#include <linux/types.h>
10#include "event.h" 10#include "event.h"
11#include "env.h" 11#include "env.h"
12#include "pmu.h"
12 13
13enum { 14enum {
14 HEADER_RESERVED = 0, /* always cleared */ 15 HEADER_RESERVED = 0, /* always cleared */
@@ -34,6 +35,7 @@ enum {
34 HEADER_AUXTRACE, 35 HEADER_AUXTRACE,
35 HEADER_STAT, 36 HEADER_STAT,
36 HEADER_CACHE, 37 HEADER_CACHE,
38 HEADER_SAMPLE_TIME,
37 HEADER_LAST_FEATURE, 39 HEADER_LAST_FEATURE,
38 HEADER_FEAT_BITS = 256, 40 HEADER_FEAT_BITS = 256,
39}; 41};
@@ -107,6 +109,11 @@ int perf_event__synthesize_features(struct perf_tool *tool,
107 struct perf_evlist *evlist, 109 struct perf_evlist *evlist,
108 perf_event__handler_t process); 110 perf_event__handler_t process);
109 111
112int perf_event__synthesize_extra_attr(struct perf_tool *tool,
113 struct perf_evlist *evsel_list,
114 perf_event__handler_t process,
115 bool is_pipe);
116
110int perf_event__process_feature(struct perf_tool *tool, 117int perf_event__process_feature(struct perf_tool *tool,
111 union perf_event *event, 118 union perf_event *event,
112 struct perf_session *session); 119 struct perf_session *session);
@@ -166,5 +173,5 @@ int write_padded(struct feat_fd *fd, const void *bf,
166 */ 173 */
167int get_cpuid(char *buffer, size_t sz); 174int get_cpuid(char *buffer, size_t sz);
168 175
169char *get_cpuid_str(void); 176char *get_cpuid_str(struct perf_pmu *pmu __maybe_unused);
170#endif /* __PERF_HEADER_H */ 177#endif /* __PERF_HEADER_H */
diff --git a/tools/perf/util/hist.c b/tools/perf/util/hist.c
index 097473600d94..b6140950301e 100644
--- a/tools/perf/util/hist.c
+++ b/tools/perf/util/hist.c
@@ -597,6 +597,7 @@ __hists__add_entry(struct hists *hists,
597 .map = al->map, 597 .map = al->map,
598 .sym = al->sym, 598 .sym = al->sym,
599 }, 599 },
600 .srcline = al->srcline ? strdup(al->srcline) : NULL,
600 .socket = al->socket, 601 .socket = al->socket,
601 .cpu = al->cpu, 602 .cpu = al->cpu,
602 .cpumode = al->cpumode, 603 .cpumode = al->cpumode,
@@ -951,6 +952,7 @@ iter_add_next_cumulative_entry(struct hist_entry_iter *iter,
951 .map = al->map, 952 .map = al->map,
952 .sym = al->sym, 953 .sym = al->sym,
953 }, 954 },
955 .srcline = al->srcline ? strdup(al->srcline) : NULL,
954 .parent = iter->parent, 956 .parent = iter->parent,
955 .raw_data = sample->raw_data, 957 .raw_data = sample->raw_data,
956 .raw_size = sample->raw_size, 958 .raw_size = sample->raw_size,
@@ -1142,11 +1144,6 @@ void hist_entry__delete(struct hist_entry *he)
1142 zfree(&he->mem_info); 1144 zfree(&he->mem_info);
1143 } 1145 }
1144 1146
1145 if (he->inline_node) {
1146 inline_node__delete(he->inline_node);
1147 he->inline_node = NULL;
1148 }
1149
1150 zfree(&he->stat_acc); 1147 zfree(&he->stat_acc);
1151 free_srcline(he->srcline); 1148 free_srcline(he->srcline);
1152 if (he->srcfile && he->srcfile[0]) 1149 if (he->srcfile && he->srcfile[0])
diff --git a/tools/perf/util/hist.h b/tools/perf/util/hist.h
index f6630cb95eff..02721b579746 100644
--- a/tools/perf/util/hist.h
+++ b/tools/perf/util/hist.h
@@ -430,7 +430,8 @@ int hist_entry__tui_annotate(struct hist_entry *he, struct perf_evsel *evsel,
430int perf_evlist__tui_browse_hists(struct perf_evlist *evlist, const char *help, 430int perf_evlist__tui_browse_hists(struct perf_evlist *evlist, const char *help,
431 struct hist_browser_timer *hbt, 431 struct hist_browser_timer *hbt,
432 float min_pcnt, 432 float min_pcnt,
433 struct perf_env *env); 433 struct perf_env *env,
434 bool warn_lost_event);
434int script_browse(const char *script_opt); 435int script_browse(const char *script_opt);
435#else 436#else
436static inline 437static inline
@@ -438,7 +439,8 @@ int perf_evlist__tui_browse_hists(struct perf_evlist *evlist __maybe_unused,
438 const char *help __maybe_unused, 439 const char *help __maybe_unused,
439 struct hist_browser_timer *hbt __maybe_unused, 440 struct hist_browser_timer *hbt __maybe_unused,
440 float min_pcnt __maybe_unused, 441 float min_pcnt __maybe_unused,
441 struct perf_env *env __maybe_unused) 442 struct perf_env *env __maybe_unused,
443 bool warn_lost_event __maybe_unused)
442{ 444{
443 return 0; 445 return 0;
444} 446}
diff --git a/tools/perf/util/intel-bts.c b/tools/perf/util/intel-bts.c
index 218ee2bac9a5..72db2744876d 100644
--- a/tools/perf/util/intel-bts.c
+++ b/tools/perf/util/intel-bts.c
@@ -67,7 +67,6 @@ struct intel_bts {
67 u64 branches_sample_type; 67 u64 branches_sample_type;
68 u64 branches_id; 68 u64 branches_id;
69 size_t branches_event_size; 69 size_t branches_event_size;
70 bool synth_needs_swap;
71 unsigned long num_events; 70 unsigned long num_events;
72}; 71};
73 72
@@ -303,8 +302,7 @@ static int intel_bts_synth_branch_sample(struct intel_bts_queue *btsq,
303 event.sample.header.size = bts->branches_event_size; 302 event.sample.header.size = bts->branches_event_size;
304 ret = perf_event__synthesize_sample(&event, 303 ret = perf_event__synthesize_sample(&event,
305 bts->branches_sample_type, 304 bts->branches_sample_type,
306 0, &sample, 305 0, &sample);
307 bts->synth_needs_swap);
308 if (ret) 306 if (ret)
309 return ret; 307 return ret;
310 } 308 }
@@ -500,7 +498,7 @@ static int intel_bts_process_queue(struct intel_bts_queue *btsq, u64 *timestamp)
500 } 498 }
501 499
502 if (!buffer->data) { 500 if (!buffer->data) {
503 int fd = perf_data_file__fd(btsq->bts->session->file); 501 int fd = perf_data__fd(btsq->bts->session->data);
504 502
505 buffer->data = auxtrace_buffer__get_data(buffer, fd); 503 buffer->data = auxtrace_buffer__get_data(buffer, fd);
506 if (!buffer->data) { 504 if (!buffer->data) {
@@ -664,10 +662,10 @@ static int intel_bts_process_auxtrace_event(struct perf_session *session,
664 if (!bts->data_queued) { 662 if (!bts->data_queued) {
665 struct auxtrace_buffer *buffer; 663 struct auxtrace_buffer *buffer;
666 off_t data_offset; 664 off_t data_offset;
667 int fd = perf_data_file__fd(session->file); 665 int fd = perf_data__fd(session->data);
668 int err; 666 int err;
669 667
670 if (perf_data_file__is_pipe(session->file)) { 668 if (perf_data__is_pipe(session->data)) {
671 data_offset = 0; 669 data_offset = 0;
672 } else { 670 } else {
673 data_offset = lseek(fd, 0, SEEK_CUR); 671 data_offset = lseek(fd, 0, SEEK_CUR);
@@ -841,8 +839,6 @@ static int intel_bts_synth_events(struct intel_bts *bts,
841 __perf_evsel__sample_size(attr.sample_type); 839 __perf_evsel__sample_size(attr.sample_type);
842 } 840 }
843 841
844 bts->synth_needs_swap = evsel->needs_swap;
845
846 return 0; 842 return 0;
847} 843}
848 844
diff --git a/tools/perf/util/intel-pt-decoder/Build b/tools/perf/util/intel-pt-decoder/Build
index 10e0814bb8d2..1b704fbea9de 100644
--- a/tools/perf/util/intel-pt-decoder/Build
+++ b/tools/perf/util/intel-pt-decoder/Build
@@ -11,15 +11,21 @@ $(OUTPUT)util/intel-pt-decoder/inat-tables.c: $(inat_tables_script) $(inat_table
11 11
12$(OUTPUT)util/intel-pt-decoder/intel-pt-insn-decoder.o: util/intel-pt-decoder/intel-pt-insn-decoder.c util/intel-pt-decoder/inat.c $(OUTPUT)util/intel-pt-decoder/inat-tables.c 12$(OUTPUT)util/intel-pt-decoder/intel-pt-insn-decoder.o: util/intel-pt-decoder/intel-pt-insn-decoder.c util/intel-pt-decoder/inat.c $(OUTPUT)util/intel-pt-decoder/inat-tables.c
13 @(diff -I 2>&1 | grep -q 'option requires an argument' && \ 13 @(diff -I 2>&1 | grep -q 'option requires an argument' && \
14 test -d ../../kernel -a -d ../../tools -a -d ../perf && (( \ 14 test -d ../../kernel -a -d ../../tools -a -d ../perf && ( \
15 diff -B -I'^#include' util/intel-pt-decoder/insn.c ../../arch/x86/lib/insn.c >/dev/null && \ 15 ((diff -B -I'^#include' util/intel-pt-decoder/insn.c ../../arch/x86/lib/insn.c >/dev/null) || \
16 diff -B -I'^#include' util/intel-pt-decoder/inat.c ../../arch/x86/lib/inat.c >/dev/null && \ 16 (echo "Warning: Intel PT: x86 instruction decoder C file at 'tools/perf/util/intel-pt-decoder/insn.c' differs from latest version at 'arch/x86/lib/insn.c'" >&2)) && \
17 diff -B util/intel-pt-decoder/x86-opcode-map.txt ../../arch/x86/lib/x86-opcode-map.txt >/dev/null && \ 17 ((diff -B -I'^#include' util/intel-pt-decoder/inat.c ../../arch/x86/lib/inat.c >/dev/null) || \
18 diff -B util/intel-pt-decoder/gen-insn-attr-x86.awk ../../arch/x86/tools/gen-insn-attr-x86.awk >/dev/null && \ 18 (echo "Warning: Intel PT: x86 instruction decoder C file at 'tools/perf/util/intel-pt-decoder/inat.c' differs from latest version at 'arch/x86/lib/inat.c'" >&2)) && \
19 diff -B -I'^#include' util/intel-pt-decoder/insn.h ../../arch/x86/include/asm/insn.h >/dev/null && \ 19 ((diff -B util/intel-pt-decoder/x86-opcode-map.txt ../../arch/x86/lib/x86-opcode-map.txt >/dev/null) || \
20 diff -B -I'^#include' util/intel-pt-decoder/inat.h ../../arch/x86/include/asm/inat.h >/dev/null && \ 20 (echo "Warning: Intel PT: x86 instruction decoder map file at 'tools/perf/util/intel-pt-decoder/x86-opcode-map.txt' differs from latest version at 'arch/x86/lib/x86-opcode-map.txt'" >&2)) && \
21 diff -B -I'^#include' util/intel-pt-decoder/inat_types.h ../../arch/x86/include/asm/inat_types.h >/dev/null) \ 21 ((diff -B util/intel-pt-decoder/gen-insn-attr-x86.awk ../../arch/x86/tools/gen-insn-attr-x86.awk >/dev/null) || \
22 || echo "Warning: Intel PT: x86 instruction decoder differs from kernel" >&2 )) || true 22 (echo "Warning: Intel PT: x86 instruction decoder script at 'tools/perf/util/intel-pt-decoder/gen-insn-attr-x86.awk' differs from latest version at 'arch/x86/tools/gen-insn-attr-x86.awk'" >&2)) && \
23 ((diff -B -I'^#include' util/intel-pt-decoder/insn.h ../../arch/x86/include/asm/insn.h >/dev/null) || \
24 (echo "Warning: Intel PT: x86 instruction decoder header at 'tools/perf/util/intel-pt-decoder/insn.h' differs from latest version at 'arch/x86/include/asm/insn.h'" >&2)) && \
25 ((diff -B -I'^#include' util/intel-pt-decoder/inat.h ../../arch/x86/include/asm/inat.h >/dev/null) || \
26 (echo "Warning: Intel PT: x86 instruction decoder header at 'tools/perf/util/intel-pt-decoder/inat.h' differs from latest version at 'arch/x86/include/asm/inat.h'" >&2)) && \
27 ((diff -B -I'^#include' util/intel-pt-decoder/inat_types.h ../../arch/x86/include/asm/inat_types.h >/dev/null) || \
28 (echo "Warning: Intel PT: x86 instruction decoder header at 'tools/perf/util/intel-pt-decoder/inat_types.h' differs from latest version at 'arch/x86/include/asm/inat_types.h'" >&2)))) || true
23 $(call rule_mkdir) 29 $(call rule_mkdir)
24 $(call if_changed_dep,cc_o_c) 30 $(call if_changed_dep,cc_o_c)
25 31
diff --git a/tools/perf/util/intel-pt-decoder/inat.h b/tools/perf/util/intel-pt-decoder/inat.h
index 125ecd2a300d..52dc8d911173 100644
--- a/tools/perf/util/intel-pt-decoder/inat.h
+++ b/tools/perf/util/intel-pt-decoder/inat.h
@@ -97,6 +97,16 @@
97#define INAT_MAKE_GROUP(grp) ((grp << INAT_GRP_OFFS) | INAT_MODRM) 97#define INAT_MAKE_GROUP(grp) ((grp << INAT_GRP_OFFS) | INAT_MODRM)
98#define INAT_MAKE_IMM(imm) (imm << INAT_IMM_OFFS) 98#define INAT_MAKE_IMM(imm) (imm << INAT_IMM_OFFS)
99 99
100/* Identifiers for segment registers */
101#define INAT_SEG_REG_IGNORE 0
102#define INAT_SEG_REG_DEFAULT 1
103#define INAT_SEG_REG_CS 2
104#define INAT_SEG_REG_SS 3
105#define INAT_SEG_REG_DS 4
106#define INAT_SEG_REG_ES 5
107#define INAT_SEG_REG_FS 6
108#define INAT_SEG_REG_GS 7
109
100/* Attribute search APIs */ 110/* Attribute search APIs */
101extern insn_attr_t inat_get_opcode_attribute(insn_byte_t opcode); 111extern insn_attr_t inat_get_opcode_attribute(insn_byte_t opcode);
102extern int inat_get_last_prefix_id(insn_byte_t last_pfx); 112extern int inat_get_last_prefix_id(insn_byte_t last_pfx);
diff --git a/tools/perf/util/intel-pt-decoder/x86-opcode-map.txt b/tools/perf/util/intel-pt-decoder/x86-opcode-map.txt
index 12e377184ee4..e0b85930dd77 100644
--- a/tools/perf/util/intel-pt-decoder/x86-opcode-map.txt
+++ b/tools/perf/util/intel-pt-decoder/x86-opcode-map.txt
@@ -607,7 +607,7 @@ fb: psubq Pq,Qq | vpsubq Vx,Hx,Wx (66),(v1)
607fc: paddb Pq,Qq | vpaddb Vx,Hx,Wx (66),(v1) 607fc: paddb Pq,Qq | vpaddb Vx,Hx,Wx (66),(v1)
608fd: paddw Pq,Qq | vpaddw Vx,Hx,Wx (66),(v1) 608fd: paddw Pq,Qq | vpaddw Vx,Hx,Wx (66),(v1)
609fe: paddd Pq,Qq | vpaddd Vx,Hx,Wx (66),(v1) 609fe: paddd Pq,Qq | vpaddd Vx,Hx,Wx (66),(v1)
610ff: 610ff: UD0
611EndTable 611EndTable
612 612
613Table: 3-byte opcode 1 (0x0f 0x38) 613Table: 3-byte opcode 1 (0x0f 0x38)
@@ -717,7 +717,7 @@ AVXcode: 2
7177e: vpermt2d/q Vx,Hx,Wx (66),(ev) 7177e: vpermt2d/q Vx,Hx,Wx (66),(ev)
7187f: vpermt2ps/d Vx,Hx,Wx (66),(ev) 7187f: vpermt2ps/d Vx,Hx,Wx (66),(ev)
71980: INVEPT Gy,Mdq (66) 71980: INVEPT Gy,Mdq (66)
72081: INVPID Gy,Mdq (66) 72081: INVVPID Gy,Mdq (66)
72182: INVPCID Gy,Mdq (66) 72182: INVPCID Gy,Mdq (66)
72283: vpmultishiftqb Vx,Hx,Wx (66),(ev) 72283: vpmultishiftqb Vx,Hx,Wx (66),(ev)
72388: vexpandps/d Vpd,Wpd (66),(ev) 72388: vexpandps/d Vpd,Wpd (66),(ev)
@@ -896,7 +896,7 @@ EndTable
896 896
897GrpTable: Grp3_1 897GrpTable: Grp3_1
8980: TEST Eb,Ib 8980: TEST Eb,Ib
8991: 8991: TEST Eb,Ib
9002: NOT Eb 9002: NOT Eb
9013: NEG Eb 9013: NEG Eb
9024: MUL AL,Eb 9024: MUL AL,Eb
@@ -970,6 +970,15 @@ GrpTable: Grp9
970EndTable 970EndTable
971 971
972GrpTable: Grp10 972GrpTable: Grp10
973# all are UD1
9740: UD1
9751: UD1
9762: UD1
9773: UD1
9784: UD1
9795: UD1
9806: UD1
9817: UD1
973EndTable 982EndTable
974 983
975# Grp11A and Grp11B are expressed as Grp11 in Intel SDM 984# Grp11A and Grp11B are expressed as Grp11 in Intel SDM
diff --git a/tools/perf/util/intel-pt.c b/tools/perf/util/intel-pt.c
index b58f9fd1e2ee..3773d9c54f45 100644
--- a/tools/perf/util/intel-pt.c
+++ b/tools/perf/util/intel-pt.c
@@ -104,8 +104,6 @@ struct intel_pt {
104 u64 pwrx_id; 104 u64 pwrx_id;
105 u64 cbr_id; 105 u64 cbr_id;
106 106
107 bool synth_needs_swap;
108
109 u64 tsc_bit; 107 u64 tsc_bit;
110 u64 mtc_bit; 108 u64 mtc_bit;
111 u64 mtc_freq_bits; 109 u64 mtc_freq_bits;
@@ -271,7 +269,7 @@ next:
271 ptq->buffer = buffer; 269 ptq->buffer = buffer;
272 270
273 if (!buffer->data) { 271 if (!buffer->data) {
274 int fd = perf_data_file__fd(ptq->pt->session->file); 272 int fd = perf_data__fd(ptq->pt->session->data);
275 273
276 buffer->data = auxtrace_buffer__get_data(buffer, fd); 274 buffer->data = auxtrace_buffer__get_data(buffer, fd);
277 if (!buffer->data) 275 if (!buffer->data)
@@ -1101,11 +1099,10 @@ static void intel_pt_prep_b_sample(struct intel_pt *pt,
1101} 1099}
1102 1100
1103static int intel_pt_inject_event(union perf_event *event, 1101static int intel_pt_inject_event(union perf_event *event,
1104 struct perf_sample *sample, u64 type, 1102 struct perf_sample *sample, u64 type)
1105 bool swapped)
1106{ 1103{
1107 event->header.size = perf_event__sample_event_size(sample, type, 0); 1104 event->header.size = perf_event__sample_event_size(sample, type, 0);
1108 return perf_event__synthesize_sample(event, type, 0, sample, swapped); 1105 return perf_event__synthesize_sample(event, type, 0, sample);
1109} 1106}
1110 1107
1111static inline int intel_pt_opt_inject(struct intel_pt *pt, 1108static inline int intel_pt_opt_inject(struct intel_pt *pt,
@@ -1115,7 +1112,7 @@ static inline int intel_pt_opt_inject(struct intel_pt *pt,
1115 if (!pt->synth_opts.inject) 1112 if (!pt->synth_opts.inject)
1116 return 0; 1113 return 0;
1117 1114
1118 return intel_pt_inject_event(event, sample, type, pt->synth_needs_swap); 1115 return intel_pt_inject_event(event, sample, type);
1119} 1116}
1120 1117
1121static int intel_pt_deliver_synth_b_event(struct intel_pt *pt, 1118static int intel_pt_deliver_synth_b_event(struct intel_pt *pt,
@@ -2084,10 +2081,10 @@ static int intel_pt_process_auxtrace_event(struct perf_session *session,
2084 if (!pt->data_queued) { 2081 if (!pt->data_queued) {
2085 struct auxtrace_buffer *buffer; 2082 struct auxtrace_buffer *buffer;
2086 off_t data_offset; 2083 off_t data_offset;
2087 int fd = perf_data_file__fd(session->file); 2084 int fd = perf_data__fd(session->data);
2088 int err; 2085 int err;
2089 2086
2090 if (perf_data_file__is_pipe(session->file)) { 2087 if (perf_data__is_pipe(session->data)) {
2091 data_offset = 0; 2088 data_offset = 0;
2092 } else { 2089 } else {
2093 data_offset = lseek(fd, 0, SEEK_CUR); 2090 data_offset = lseek(fd, 0, SEEK_CUR);
@@ -2329,8 +2326,6 @@ static int intel_pt_synth_events(struct intel_pt *pt,
2329 id += 1; 2326 id += 1;
2330 } 2327 }
2331 2328
2332 pt->synth_needs_swap = evsel->needs_swap;
2333
2334 return 0; 2329 return 0;
2335} 2330}
2336 2331
diff --git a/tools/perf/util/jit.h b/tools/perf/util/jit.h
index c2582fa9fe21..6817ffc2a059 100644
--- a/tools/perf/util/jit.h
+++ b/tools/perf/util/jit.h
@@ -4,7 +4,7 @@
4 4
5#include <data.h> 5#include <data.h>
6 6
7int jit_process(struct perf_session *session, struct perf_data_file *output, 7int jit_process(struct perf_session *session, struct perf_data *output,
8 struct machine *machine, char *filename, pid_t pid, u64 *nbytes); 8 struct machine *machine, char *filename, pid_t pid, u64 *nbytes);
9 9
10int jit_inject_record(const char *filename); 10int jit_inject_record(const char *filename);
diff --git a/tools/perf/util/jitdump.c b/tools/perf/util/jitdump.c
index 36483db032e8..a1863000e972 100644
--- a/tools/perf/util/jitdump.c
+++ b/tools/perf/util/jitdump.c
@@ -30,7 +30,7 @@
30#include "sane_ctype.h" 30#include "sane_ctype.h"
31 31
32struct jit_buf_desc { 32struct jit_buf_desc {
33 struct perf_data_file *output; 33 struct perf_data *output;
34 struct perf_session *session; 34 struct perf_session *session;
35 struct machine *machine; 35 struct machine *machine;
36 union jr_entry *entry; 36 union jr_entry *entry;
@@ -61,8 +61,8 @@ struct debug_line_info {
61 61
62struct jit_tool { 62struct jit_tool {
63 struct perf_tool tool; 63 struct perf_tool tool;
64 struct perf_data_file output; 64 struct perf_data output;
65 struct perf_data_file input; 65 struct perf_data input;
66 u64 bytes_written; 66 u64 bytes_written;
67}; 67};
68 68
@@ -357,7 +357,7 @@ jit_inject_event(struct jit_buf_desc *jd, union perf_event *event)
357{ 357{
358 ssize_t size; 358 ssize_t size;
359 359
360 size = perf_data_file__write(jd->output, event, event->header.size); 360 size = perf_data__write(jd->output, event, event->header.size);
361 if (size < 0) 361 if (size < 0)
362 return -1; 362 return -1;
363 363
@@ -752,7 +752,7 @@ jit_detect(char *mmap_name, pid_t pid)
752 752
753int 753int
754jit_process(struct perf_session *session, 754jit_process(struct perf_session *session,
755 struct perf_data_file *output, 755 struct perf_data *output,
756 struct machine *machine, 756 struct machine *machine,
757 char *filename, 757 char *filename,
758 pid_t pid, 758 pid_t pid,
diff --git a/tools/perf/util/machine.c b/tools/perf/util/machine.c
index bd5d5b5e2218..b05a67464c03 100644
--- a/tools/perf/util/machine.c
+++ b/tools/perf/util/machine.c
@@ -31,7 +31,21 @@ static void dsos__init(struct dsos *dsos)
31{ 31{
32 INIT_LIST_HEAD(&dsos->head); 32 INIT_LIST_HEAD(&dsos->head);
33 dsos->root = RB_ROOT; 33 dsos->root = RB_ROOT;
34 pthread_rwlock_init(&dsos->lock, NULL); 34 init_rwsem(&dsos->lock);
35}
36
37static void machine__threads_init(struct machine *machine)
38{
39 int i;
40
41 for (i = 0; i < THREADS__TABLE_SIZE; i++) {
42 struct threads *threads = &machine->threads[i];
43 threads->entries = RB_ROOT;
44 init_rwsem(&threads->lock);
45 threads->nr = 0;
46 INIT_LIST_HEAD(&threads->dead);
47 threads->last_match = NULL;
48 }
35} 49}
36 50
37int machine__init(struct machine *machine, const char *root_dir, pid_t pid) 51int machine__init(struct machine *machine, const char *root_dir, pid_t pid)
@@ -41,11 +55,7 @@ int machine__init(struct machine *machine, const char *root_dir, pid_t pid)
41 RB_CLEAR_NODE(&machine->rb_node); 55 RB_CLEAR_NODE(&machine->rb_node);
42 dsos__init(&machine->dsos); 56 dsos__init(&machine->dsos);
43 57
44 machine->threads = RB_ROOT; 58 machine__threads_init(machine);
45 pthread_rwlock_init(&machine->threads_lock, NULL);
46 machine->nr_threads = 0;
47 INIT_LIST_HEAD(&machine->dead_threads);
48 machine->last_match = NULL;
49 59
50 machine->vdso_info = NULL; 60 machine->vdso_info = NULL;
51 machine->env = NULL; 61 machine->env = NULL;
@@ -121,7 +131,7 @@ static void dsos__purge(struct dsos *dsos)
121{ 131{
122 struct dso *pos, *n; 132 struct dso *pos, *n;
123 133
124 pthread_rwlock_wrlock(&dsos->lock); 134 down_write(&dsos->lock);
125 135
126 list_for_each_entry_safe(pos, n, &dsos->head, node) { 136 list_for_each_entry_safe(pos, n, &dsos->head, node) {
127 RB_CLEAR_NODE(&pos->rb_node); 137 RB_CLEAR_NODE(&pos->rb_node);
@@ -130,39 +140,52 @@ static void dsos__purge(struct dsos *dsos)
130 dso__put(pos); 140 dso__put(pos);
131 } 141 }
132 142
133 pthread_rwlock_unlock(&dsos->lock); 143 up_write(&dsos->lock);
134} 144}
135 145
136static void dsos__exit(struct dsos *dsos) 146static void dsos__exit(struct dsos *dsos)
137{ 147{
138 dsos__purge(dsos); 148 dsos__purge(dsos);
139 pthread_rwlock_destroy(&dsos->lock); 149 exit_rwsem(&dsos->lock);
140} 150}
141 151
142void machine__delete_threads(struct machine *machine) 152void machine__delete_threads(struct machine *machine)
143{ 153{
144 struct rb_node *nd; 154 struct rb_node *nd;
155 int i;
145 156
146 pthread_rwlock_wrlock(&machine->threads_lock); 157 for (i = 0; i < THREADS__TABLE_SIZE; i++) {
147 nd = rb_first(&machine->threads); 158 struct threads *threads = &machine->threads[i];
148 while (nd) { 159 down_write(&threads->lock);
149 struct thread *t = rb_entry(nd, struct thread, rb_node); 160 nd = rb_first(&threads->entries);
161 while (nd) {
162 struct thread *t = rb_entry(nd, struct thread, rb_node);
150 163
151 nd = rb_next(nd); 164 nd = rb_next(nd);
152 __machine__remove_thread(machine, t, false); 165 __machine__remove_thread(machine, t, false);
166 }
167 up_write(&threads->lock);
153 } 168 }
154 pthread_rwlock_unlock(&machine->threads_lock);
155} 169}
156 170
157void machine__exit(struct machine *machine) 171void machine__exit(struct machine *machine)
158{ 172{
173 int i;
174
175 if (machine == NULL)
176 return;
177
159 machine__destroy_kernel_maps(machine); 178 machine__destroy_kernel_maps(machine);
160 map_groups__exit(&machine->kmaps); 179 map_groups__exit(&machine->kmaps);
161 dsos__exit(&machine->dsos); 180 dsos__exit(&machine->dsos);
162 machine__exit_vdso(machine); 181 machine__exit_vdso(machine);
163 zfree(&machine->root_dir); 182 zfree(&machine->root_dir);
164 zfree(&machine->current_tid); 183 zfree(&machine->current_tid);
165 pthread_rwlock_destroy(&machine->threads_lock); 184
185 for (i = 0; i < THREADS__TABLE_SIZE; i++) {
186 struct threads *threads = &machine->threads[i];
187 exit_rwsem(&threads->lock);
188 }
166} 189}
167 190
168void machine__delete(struct machine *machine) 191void machine__delete(struct machine *machine)
@@ -380,10 +403,11 @@ out_err:
380 * lookup/new thread inserted. 403 * lookup/new thread inserted.
381 */ 404 */
382static struct thread *____machine__findnew_thread(struct machine *machine, 405static struct thread *____machine__findnew_thread(struct machine *machine,
406 struct threads *threads,
383 pid_t pid, pid_t tid, 407 pid_t pid, pid_t tid,
384 bool create) 408 bool create)
385{ 409{
386 struct rb_node **p = &machine->threads.rb_node; 410 struct rb_node **p = &threads->entries.rb_node;
387 struct rb_node *parent = NULL; 411 struct rb_node *parent = NULL;
388 struct thread *th; 412 struct thread *th;
389 413
@@ -392,14 +416,14 @@ static struct thread *____machine__findnew_thread(struct machine *machine,
392 * so most of the time we dont have to look up 416 * so most of the time we dont have to look up
393 * the full rbtree: 417 * the full rbtree:
394 */ 418 */
395 th = machine->last_match; 419 th = threads->last_match;
396 if (th != NULL) { 420 if (th != NULL) {
397 if (th->tid == tid) { 421 if (th->tid == tid) {
398 machine__update_thread_pid(machine, th, pid); 422 machine__update_thread_pid(machine, th, pid);
399 return thread__get(th); 423 return thread__get(th);
400 } 424 }
401 425
402 machine->last_match = NULL; 426 threads->last_match = NULL;
403 } 427 }
404 428
405 while (*p != NULL) { 429 while (*p != NULL) {
@@ -407,7 +431,7 @@ static struct thread *____machine__findnew_thread(struct machine *machine,
407 th = rb_entry(parent, struct thread, rb_node); 431 th = rb_entry(parent, struct thread, rb_node);
408 432
409 if (th->tid == tid) { 433 if (th->tid == tid) {
410 machine->last_match = th; 434 threads->last_match = th;
411 machine__update_thread_pid(machine, th, pid); 435 machine__update_thread_pid(machine, th, pid);
412 return thread__get(th); 436 return thread__get(th);
413 } 437 }
@@ -424,7 +448,7 @@ static struct thread *____machine__findnew_thread(struct machine *machine,
424 th = thread__new(pid, tid); 448 th = thread__new(pid, tid);
425 if (th != NULL) { 449 if (th != NULL) {
426 rb_link_node(&th->rb_node, parent, p); 450 rb_link_node(&th->rb_node, parent, p);
427 rb_insert_color(&th->rb_node, &machine->threads); 451 rb_insert_color(&th->rb_node, &threads->entries);
428 452
429 /* 453 /*
430 * We have to initialize map_groups separately 454 * We have to initialize map_groups separately
@@ -435,7 +459,7 @@ static struct thread *____machine__findnew_thread(struct machine *machine,
435 * leader and that would screwed the rb tree. 459 * leader and that would screwed the rb tree.
436 */ 460 */
437 if (thread__init_map_groups(th, machine)) { 461 if (thread__init_map_groups(th, machine)) {
438 rb_erase_init(&th->rb_node, &machine->threads); 462 rb_erase_init(&th->rb_node, &threads->entries);
439 RB_CLEAR_NODE(&th->rb_node); 463 RB_CLEAR_NODE(&th->rb_node);
440 thread__put(th); 464 thread__put(th);
441 return NULL; 465 return NULL;
@@ -444,8 +468,8 @@ static struct thread *____machine__findnew_thread(struct machine *machine,
444 * It is now in the rbtree, get a ref 468 * It is now in the rbtree, get a ref
445 */ 469 */
446 thread__get(th); 470 thread__get(th);
447 machine->last_match = th; 471 threads->last_match = th;
448 ++machine->nr_threads; 472 ++threads->nr;
449 } 473 }
450 474
451 return th; 475 return th;
@@ -453,27 +477,30 @@ static struct thread *____machine__findnew_thread(struct machine *machine,
453 477
454struct thread *__machine__findnew_thread(struct machine *machine, pid_t pid, pid_t tid) 478struct thread *__machine__findnew_thread(struct machine *machine, pid_t pid, pid_t tid)
455{ 479{
456 return ____machine__findnew_thread(machine, pid, tid, true); 480 return ____machine__findnew_thread(machine, machine__threads(machine, tid), pid, tid, true);
457} 481}
458 482
459struct thread *machine__findnew_thread(struct machine *machine, pid_t pid, 483struct thread *machine__findnew_thread(struct machine *machine, pid_t pid,
460 pid_t tid) 484 pid_t tid)
461{ 485{
486 struct threads *threads = machine__threads(machine, tid);
462 struct thread *th; 487 struct thread *th;
463 488
464 pthread_rwlock_wrlock(&machine->threads_lock); 489 down_write(&threads->lock);
465 th = __machine__findnew_thread(machine, pid, tid); 490 th = __machine__findnew_thread(machine, pid, tid);
466 pthread_rwlock_unlock(&machine->threads_lock); 491 up_write(&threads->lock);
467 return th; 492 return th;
468} 493}
469 494
470struct thread *machine__find_thread(struct machine *machine, pid_t pid, 495struct thread *machine__find_thread(struct machine *machine, pid_t pid,
471 pid_t tid) 496 pid_t tid)
472{ 497{
498 struct threads *threads = machine__threads(machine, tid);
473 struct thread *th; 499 struct thread *th;
474 pthread_rwlock_rdlock(&machine->threads_lock); 500
475 th = ____machine__findnew_thread(machine, pid, tid, false); 501 down_read(&threads->lock);
476 pthread_rwlock_unlock(&machine->threads_lock); 502 th = ____machine__findnew_thread(machine, threads, pid, tid, false);
503 up_read(&threads->lock);
477 return th; 504 return th;
478} 505}
479 506
@@ -565,7 +592,7 @@ static struct dso *machine__findnew_module_dso(struct machine *machine,
565{ 592{
566 struct dso *dso; 593 struct dso *dso;
567 594
568 pthread_rwlock_wrlock(&machine->dsos.lock); 595 down_write(&machine->dsos.lock);
569 596
570 dso = __dsos__find(&machine->dsos, m->name, true); 597 dso = __dsos__find(&machine->dsos, m->name, true);
571 if (!dso) { 598 if (!dso) {
@@ -579,7 +606,7 @@ static struct dso *machine__findnew_module_dso(struct machine *machine,
579 606
580 dso__get(dso); 607 dso__get(dso);
581out_unlock: 608out_unlock:
582 pthread_rwlock_unlock(&machine->dsos.lock); 609 up_write(&machine->dsos.lock);
583 return dso; 610 return dso;
584} 611}
585 612
@@ -720,21 +747,25 @@ size_t machine__fprintf_vmlinux_path(struct machine *machine, FILE *fp)
720 747
721size_t machine__fprintf(struct machine *machine, FILE *fp) 748size_t machine__fprintf(struct machine *machine, FILE *fp)
722{ 749{
723 size_t ret;
724 struct rb_node *nd; 750 struct rb_node *nd;
751 size_t ret;
752 int i;
725 753
726 pthread_rwlock_rdlock(&machine->threads_lock); 754 for (i = 0; i < THREADS__TABLE_SIZE; i++) {
755 struct threads *threads = &machine->threads[i];
727 756
728 ret = fprintf(fp, "Threads: %u\n", machine->nr_threads); 757 down_read(&threads->lock);
729 758
730 for (nd = rb_first(&machine->threads); nd; nd = rb_next(nd)) { 759 ret = fprintf(fp, "Threads: %u\n", threads->nr);
731 struct thread *pos = rb_entry(nd, struct thread, rb_node);
732 760
733 ret += thread__fprintf(pos, fp); 761 for (nd = rb_first(&threads->entries); nd; nd = rb_next(nd)) {
734 } 762 struct thread *pos = rb_entry(nd, struct thread, rb_node);
735 763
736 pthread_rwlock_unlock(&machine->threads_lock); 764 ret += thread__fprintf(pos, fp);
765 }
737 766
767 up_read(&threads->lock);
768 }
738 return ret; 769 return ret;
739} 770}
740 771
@@ -1293,7 +1324,7 @@ static int machine__process_kernel_mmap_event(struct machine *machine,
1293 struct dso *kernel = NULL; 1324 struct dso *kernel = NULL;
1294 struct dso *dso; 1325 struct dso *dso;
1295 1326
1296 pthread_rwlock_rdlock(&machine->dsos.lock); 1327 down_read(&machine->dsos.lock);
1297 1328
1298 list_for_each_entry(dso, &machine->dsos.head, node) { 1329 list_for_each_entry(dso, &machine->dsos.head, node) {
1299 1330
@@ -1323,7 +1354,7 @@ static int machine__process_kernel_mmap_event(struct machine *machine,
1323 break; 1354 break;
1324 } 1355 }
1325 1356
1326 pthread_rwlock_unlock(&machine->dsos.lock); 1357 up_read(&machine->dsos.lock);
1327 1358
1328 if (kernel == NULL) 1359 if (kernel == NULL)
1329 kernel = machine__findnew_dso(machine, kmmap_prefix); 1360 kernel = machine__findnew_dso(machine, kmmap_prefix);
@@ -1480,23 +1511,25 @@ out_problem:
1480 1511
1481static void __machine__remove_thread(struct machine *machine, struct thread *th, bool lock) 1512static void __machine__remove_thread(struct machine *machine, struct thread *th, bool lock)
1482{ 1513{
1483 if (machine->last_match == th) 1514 struct threads *threads = machine__threads(machine, th->tid);
1484 machine->last_match = NULL; 1515
1516 if (threads->last_match == th)
1517 threads->last_match = NULL;
1485 1518
1486 BUG_ON(refcount_read(&th->refcnt) == 0); 1519 BUG_ON(refcount_read(&th->refcnt) == 0);
1487 if (lock) 1520 if (lock)
1488 pthread_rwlock_wrlock(&machine->threads_lock); 1521 down_write(&threads->lock);
1489 rb_erase_init(&th->rb_node, &machine->threads); 1522 rb_erase_init(&th->rb_node, &threads->entries);
1490 RB_CLEAR_NODE(&th->rb_node); 1523 RB_CLEAR_NODE(&th->rb_node);
1491 --machine->nr_threads; 1524 --threads->nr;
1492 /* 1525 /*
1493 * Move it first to the dead_threads list, then drop the reference, 1526 * Move it first to the dead_threads list, then drop the reference,
1494 * if this is the last reference, then the thread__delete destructor 1527 * if this is the last reference, then the thread__delete destructor
1495 * will be called and we will remove it from the dead_threads list. 1528 * will be called and we will remove it from the dead_threads list.
1496 */ 1529 */
1497 list_add_tail(&th->node, &machine->dead_threads); 1530 list_add_tail(&th->node, &threads->dead);
1498 if (lock) 1531 if (lock)
1499 pthread_rwlock_unlock(&machine->threads_lock); 1532 up_write(&threads->lock);
1500 thread__put(th); 1533 thread__put(th);
1501} 1534}
1502 1535
@@ -1680,6 +1713,26 @@ struct mem_info *sample__resolve_mem(struct perf_sample *sample,
1680 return mi; 1713 return mi;
1681} 1714}
1682 1715
1716static char *callchain_srcline(struct map *map, struct symbol *sym, u64 ip)
1717{
1718 char *srcline = NULL;
1719
1720 if (!map || callchain_param.key == CCKEY_FUNCTION)
1721 return srcline;
1722
1723 srcline = srcline__tree_find(&map->dso->srclines, ip);
1724 if (!srcline) {
1725 bool show_sym = false;
1726 bool show_addr = callchain_param.key == CCKEY_ADDRESS;
1727
1728 srcline = get_srcline(map->dso, map__rip_2objdump(map, ip),
1729 sym, show_sym, show_addr, ip);
1730 srcline__tree_insert(&map->dso->srclines, ip, srcline);
1731 }
1732
1733 return srcline;
1734}
1735
1683struct iterations { 1736struct iterations {
1684 int nr_loop_iter; 1737 int nr_loop_iter;
1685 u64 cycles; 1738 u64 cycles;
@@ -1699,6 +1752,7 @@ static int add_callchain_ip(struct thread *thread,
1699 struct addr_location al; 1752 struct addr_location al;
1700 int nr_loop_iter = 0; 1753 int nr_loop_iter = 0;
1701 u64 iter_cycles = 0; 1754 u64 iter_cycles = 0;
1755 const char *srcline = NULL;
1702 1756
1703 al.filtered = 0; 1757 al.filtered = 0;
1704 al.sym = NULL; 1758 al.sym = NULL;
@@ -1754,9 +1808,10 @@ static int add_callchain_ip(struct thread *thread,
1754 iter_cycles = iter->cycles; 1808 iter_cycles = iter->cycles;
1755 } 1809 }
1756 1810
1811 srcline = callchain_srcline(al.map, al.sym, al.addr);
1757 return callchain_cursor_append(cursor, al.addr, al.map, al.sym, 1812 return callchain_cursor_append(cursor, al.addr, al.map, al.sym,
1758 branch, flags, nr_loop_iter, 1813 branch, flags, nr_loop_iter,
1759 iter_cycles, branch_from); 1814 iter_cycles, branch_from, srcline);
1760} 1815}
1761 1816
1762struct branch_info *sample__resolve_bstack(struct perf_sample *sample, 1817struct branch_info *sample__resolve_bstack(struct perf_sample *sample,
@@ -2069,15 +2124,54 @@ check_calls:
2069 return 0; 2124 return 0;
2070} 2125}
2071 2126
2127static int append_inlines(struct callchain_cursor *cursor,
2128 struct map *map, struct symbol *sym, u64 ip)
2129{
2130 struct inline_node *inline_node;
2131 struct inline_list *ilist;
2132 u64 addr;
2133 int ret = 1;
2134
2135 if (!symbol_conf.inline_name || !map || !sym)
2136 return ret;
2137
2138 addr = map__rip_2objdump(map, ip);
2139
2140 inline_node = inlines__tree_find(&map->dso->inlined_nodes, addr);
2141 if (!inline_node) {
2142 inline_node = dso__parse_addr_inlines(map->dso, addr, sym);
2143 if (!inline_node)
2144 return ret;
2145 inlines__tree_insert(&map->dso->inlined_nodes, inline_node);
2146 }
2147
2148 list_for_each_entry(ilist, &inline_node->val, list) {
2149 ret = callchain_cursor_append(cursor, ip, map,
2150 ilist->symbol, false,
2151 NULL, 0, 0, 0, ilist->srcline);
2152
2153 if (ret != 0)
2154 return ret;
2155 }
2156
2157 return ret;
2158}
2159
2072static int unwind_entry(struct unwind_entry *entry, void *arg) 2160static int unwind_entry(struct unwind_entry *entry, void *arg)
2073{ 2161{
2074 struct callchain_cursor *cursor = arg; 2162 struct callchain_cursor *cursor = arg;
2163 const char *srcline = NULL;
2075 2164
2076 if (symbol_conf.hide_unresolved && entry->sym == NULL) 2165 if (symbol_conf.hide_unresolved && entry->sym == NULL)
2077 return 0; 2166 return 0;
2167
2168 if (append_inlines(cursor, entry->map, entry->sym, entry->ip) == 0)
2169 return 0;
2170
2171 srcline = callchain_srcline(entry->map, entry->sym, entry->ip);
2078 return callchain_cursor_append(cursor, entry->ip, 2172 return callchain_cursor_append(cursor, entry->ip,
2079 entry->map, entry->sym, 2173 entry->map, entry->sym,
2080 false, NULL, 0, 0, 0); 2174 false, NULL, 0, 0, 0, srcline);
2081} 2175}
2082 2176
2083static int thread__resolve_callchain_unwind(struct thread *thread, 2177static int thread__resolve_callchain_unwind(struct thread *thread,
@@ -2110,7 +2204,7 @@ int thread__resolve_callchain(struct thread *thread,
2110{ 2204{
2111 int ret = 0; 2205 int ret = 0;
2112 2206
2113 callchain_cursor_reset(&callchain_cursor); 2207 callchain_cursor_reset(cursor);
2114 2208
2115 if (callchain_param.order == ORDER_CALLEE) { 2209 if (callchain_param.order == ORDER_CALLEE) {
2116 ret = thread__resolve_callchain_sample(thread, cursor, 2210 ret = thread__resolve_callchain_sample(thread, cursor,
@@ -2141,21 +2235,26 @@ int machine__for_each_thread(struct machine *machine,
2141 int (*fn)(struct thread *thread, void *p), 2235 int (*fn)(struct thread *thread, void *p),
2142 void *priv) 2236 void *priv)
2143{ 2237{
2238 struct threads *threads;
2144 struct rb_node *nd; 2239 struct rb_node *nd;
2145 struct thread *thread; 2240 struct thread *thread;
2146 int rc = 0; 2241 int rc = 0;
2242 int i;
2147 2243
2148 for (nd = rb_first(&machine->threads); nd; nd = rb_next(nd)) { 2244 for (i = 0; i < THREADS__TABLE_SIZE; i++) {
2149 thread = rb_entry(nd, struct thread, rb_node); 2245 threads = &machine->threads[i];
2150 rc = fn(thread, priv); 2246 for (nd = rb_first(&threads->entries); nd; nd = rb_next(nd)) {
2151 if (rc != 0) 2247 thread = rb_entry(nd, struct thread, rb_node);
2152 return rc; 2248 rc = fn(thread, priv);
2153 } 2249 if (rc != 0)
2250 return rc;
2251 }
2154 2252
2155 list_for_each_entry(thread, &machine->dead_threads, node) { 2253 list_for_each_entry(thread, &threads->dead, node) {
2156 rc = fn(thread, priv); 2254 rc = fn(thread, priv);
2157 if (rc != 0) 2255 if (rc != 0)
2158 return rc; 2256 return rc;
2257 }
2159 } 2258 }
2160 return rc; 2259 return rc;
2161} 2260}
@@ -2184,12 +2283,16 @@ int machines__for_each_thread(struct machines *machines,
2184int __machine__synthesize_threads(struct machine *machine, struct perf_tool *tool, 2283int __machine__synthesize_threads(struct machine *machine, struct perf_tool *tool,
2185 struct target *target, struct thread_map *threads, 2284 struct target *target, struct thread_map *threads,
2186 perf_event__handler_t process, bool data_mmap, 2285 perf_event__handler_t process, bool data_mmap,
2187 unsigned int proc_map_timeout) 2286 unsigned int proc_map_timeout,
2287 unsigned int nr_threads_synthesize)
2188{ 2288{
2189 if (target__has_task(target)) 2289 if (target__has_task(target))
2190 return perf_event__synthesize_thread_map(tool, threads, process, machine, data_mmap, proc_map_timeout); 2290 return perf_event__synthesize_thread_map(tool, threads, process, machine, data_mmap, proc_map_timeout);
2191 else if (target__has_cpu(target)) 2291 else if (target__has_cpu(target))
2192 return perf_event__synthesize_threads(tool, process, machine, data_mmap, proc_map_timeout); 2292 return perf_event__synthesize_threads(tool, process,
2293 machine, data_mmap,
2294 proc_map_timeout,
2295 nr_threads_synthesize);
2193 /* command specified */ 2296 /* command specified */
2194 return 0; 2297 return 0;
2195} 2298}
diff --git a/tools/perf/util/machine.h b/tools/perf/util/machine.h
index d551aa80a59b..5ce860b64c74 100644
--- a/tools/perf/util/machine.h
+++ b/tools/perf/util/machine.h
@@ -7,6 +7,7 @@
7#include "map.h" 7#include "map.h"
8#include "dso.h" 8#include "dso.h"
9#include "event.h" 9#include "event.h"
10#include "rwsem.h"
10 11
11struct addr_location; 12struct addr_location;
12struct branch_stack; 13struct branch_stack;
@@ -24,6 +25,17 @@ extern const char *ref_reloc_sym_names[];
24 25
25struct vdso_info; 26struct vdso_info;
26 27
28#define THREADS__TABLE_BITS 8
29#define THREADS__TABLE_SIZE (1 << THREADS__TABLE_BITS)
30
31struct threads {
32 struct rb_root entries;
33 struct rw_semaphore lock;
34 unsigned int nr;
35 struct list_head dead;
36 struct thread *last_match;
37};
38
27struct machine { 39struct machine {
28 struct rb_node rb_node; 40 struct rb_node rb_node;
29 pid_t pid; 41 pid_t pid;
@@ -31,11 +43,7 @@ struct machine {
31 bool comm_exec; 43 bool comm_exec;
32 bool kptr_restrict_warned; 44 bool kptr_restrict_warned;
33 char *root_dir; 45 char *root_dir;
34 struct rb_root threads; 46 struct threads threads[THREADS__TABLE_SIZE];
35 pthread_rwlock_t threads_lock;
36 unsigned int nr_threads;
37 struct list_head dead_threads;
38 struct thread *last_match;
39 struct vdso_info *vdso_info; 47 struct vdso_info *vdso_info;
40 struct perf_env *env; 48 struct perf_env *env;
41 struct dsos dsos; 49 struct dsos dsos;
@@ -49,6 +57,12 @@ struct machine {
49 }; 57 };
50}; 58};
51 59
60static inline struct threads *machine__threads(struct machine *machine, pid_t tid)
61{
62 /* Cast it to handle tid == -1 */
63 return &machine->threads[(unsigned int)tid % THREADS__TABLE_SIZE];
64}
65
52static inline 66static inline
53struct map *__machine__kernel_map(struct machine *machine, enum map_type type) 67struct map *__machine__kernel_map(struct machine *machine, enum map_type type)
54{ 68{
@@ -244,15 +258,18 @@ int machines__for_each_thread(struct machines *machines,
244int __machine__synthesize_threads(struct machine *machine, struct perf_tool *tool, 258int __machine__synthesize_threads(struct machine *machine, struct perf_tool *tool,
245 struct target *target, struct thread_map *threads, 259 struct target *target, struct thread_map *threads,
246 perf_event__handler_t process, bool data_mmap, 260 perf_event__handler_t process, bool data_mmap,
247 unsigned int proc_map_timeout); 261 unsigned int proc_map_timeout,
262 unsigned int nr_threads_synthesize);
248static inline 263static inline
249int machine__synthesize_threads(struct machine *machine, struct target *target, 264int machine__synthesize_threads(struct machine *machine, struct target *target,
250 struct thread_map *threads, bool data_mmap, 265 struct thread_map *threads, bool data_mmap,
251 unsigned int proc_map_timeout) 266 unsigned int proc_map_timeout,
267 unsigned int nr_threads_synthesize)
252{ 268{
253 return __machine__synthesize_threads(machine, NULL, target, threads, 269 return __machine__synthesize_threads(machine, NULL, target, threads,
254 perf_event__process, data_mmap, 270 perf_event__process, data_mmap,
255 proc_map_timeout); 271 proc_map_timeout,
272 nr_threads_synthesize);
256} 273}
257 274
258pid_t machine__get_current_tid(struct machine *machine, int cpu); 275pid_t machine__get_current_tid(struct machine *machine, int cpu);
diff --git a/tools/perf/util/map.c b/tools/perf/util/map.c
index 4e7bd2750122..8fe57031e1a8 100644
--- a/tools/perf/util/map.c
+++ b/tools/perf/util/map.c
@@ -419,7 +419,7 @@ int map__fprintf_srcline(struct map *map, u64 addr, const char *prefix,
419 if (map && map->dso) { 419 if (map && map->dso) {
420 srcline = get_srcline(map->dso, 420 srcline = get_srcline(map->dso,
421 map__rip_2objdump(map, addr), NULL, 421 map__rip_2objdump(map, addr), NULL,
422 true, true); 422 true, true, addr);
423 if (srcline != SRCLINE_UNKNOWN) 423 if (srcline != SRCLINE_UNKNOWN)
424 ret = fprintf(fp, "%s%s", prefix, srcline); 424 ret = fprintf(fp, "%s%s", prefix, srcline);
425 free_srcline(srcline); 425 free_srcline(srcline);
@@ -489,7 +489,7 @@ u64 map__objdump_2mem(struct map *map, u64 ip)
489static void maps__init(struct maps *maps) 489static void maps__init(struct maps *maps)
490{ 490{
491 maps->entries = RB_ROOT; 491 maps->entries = RB_ROOT;
492 pthread_rwlock_init(&maps->lock, NULL); 492 init_rwsem(&maps->lock);
493} 493}
494 494
495void map_groups__init(struct map_groups *mg, struct machine *machine) 495void map_groups__init(struct map_groups *mg, struct machine *machine)
@@ -518,9 +518,9 @@ static void __maps__purge(struct maps *maps)
518 518
519static void maps__exit(struct maps *maps) 519static void maps__exit(struct maps *maps)
520{ 520{
521 pthread_rwlock_wrlock(&maps->lock); 521 down_write(&maps->lock);
522 __maps__purge(maps); 522 __maps__purge(maps);
523 pthread_rwlock_unlock(&maps->lock); 523 up_write(&maps->lock);
524} 524}
525 525
526void map_groups__exit(struct map_groups *mg) 526void map_groups__exit(struct map_groups *mg)
@@ -587,7 +587,7 @@ struct symbol *maps__find_symbol_by_name(struct maps *maps, const char *name,
587 struct symbol *sym; 587 struct symbol *sym;
588 struct rb_node *nd; 588 struct rb_node *nd;
589 589
590 pthread_rwlock_rdlock(&maps->lock); 590 down_read(&maps->lock);
591 591
592 for (nd = rb_first(&maps->entries); nd; nd = rb_next(nd)) { 592 for (nd = rb_first(&maps->entries); nd; nd = rb_next(nd)) {
593 struct map *pos = rb_entry(nd, struct map, rb_node); 593 struct map *pos = rb_entry(nd, struct map, rb_node);
@@ -603,7 +603,7 @@ struct symbol *maps__find_symbol_by_name(struct maps *maps, const char *name,
603 603
604 sym = NULL; 604 sym = NULL;
605out: 605out:
606 pthread_rwlock_unlock(&maps->lock); 606 up_read(&maps->lock);
607 return sym; 607 return sym;
608} 608}
609 609
@@ -639,7 +639,7 @@ static size_t maps__fprintf(struct maps *maps, FILE *fp)
639 size_t printed = 0; 639 size_t printed = 0;
640 struct rb_node *nd; 640 struct rb_node *nd;
641 641
642 pthread_rwlock_rdlock(&maps->lock); 642 down_read(&maps->lock);
643 643
644 for (nd = rb_first(&maps->entries); nd; nd = rb_next(nd)) { 644 for (nd = rb_first(&maps->entries); nd; nd = rb_next(nd)) {
645 struct map *pos = rb_entry(nd, struct map, rb_node); 645 struct map *pos = rb_entry(nd, struct map, rb_node);
@@ -651,7 +651,7 @@ static size_t maps__fprintf(struct maps *maps, FILE *fp)
651 } 651 }
652 } 652 }
653 653
654 pthread_rwlock_unlock(&maps->lock); 654 up_read(&maps->lock);
655 655
656 return printed; 656 return printed;
657} 657}
@@ -683,7 +683,7 @@ static int maps__fixup_overlappings(struct maps *maps, struct map *map, FILE *fp
683 struct rb_node *next; 683 struct rb_node *next;
684 int err = 0; 684 int err = 0;
685 685
686 pthread_rwlock_wrlock(&maps->lock); 686 down_write(&maps->lock);
687 687
688 root = &maps->entries; 688 root = &maps->entries;
689 next = rb_first(root); 689 next = rb_first(root);
@@ -751,7 +751,7 @@ put_map:
751 751
752 err = 0; 752 err = 0;
753out: 753out:
754 pthread_rwlock_unlock(&maps->lock); 754 up_write(&maps->lock);
755 return err; 755 return err;
756} 756}
757 757
@@ -772,7 +772,7 @@ int map_groups__clone(struct thread *thread,
772 struct map *map; 772 struct map *map;
773 struct maps *maps = &parent->maps[type]; 773 struct maps *maps = &parent->maps[type];
774 774
775 pthread_rwlock_rdlock(&maps->lock); 775 down_read(&maps->lock);
776 776
777 for (map = maps__first(maps); map; map = map__next(map)) { 777 for (map = maps__first(maps); map; map = map__next(map)) {
778 struct map *new = map__clone(map); 778 struct map *new = map__clone(map);
@@ -789,7 +789,7 @@ int map_groups__clone(struct thread *thread,
789 789
790 err = 0; 790 err = 0;
791out_unlock: 791out_unlock:
792 pthread_rwlock_unlock(&maps->lock); 792 up_read(&maps->lock);
793 return err; 793 return err;
794} 794}
795 795
@@ -816,9 +816,9 @@ static void __maps__insert(struct maps *maps, struct map *map)
816 816
817void maps__insert(struct maps *maps, struct map *map) 817void maps__insert(struct maps *maps, struct map *map)
818{ 818{
819 pthread_rwlock_wrlock(&maps->lock); 819 down_write(&maps->lock);
820 __maps__insert(maps, map); 820 __maps__insert(maps, map);
821 pthread_rwlock_unlock(&maps->lock); 821 up_write(&maps->lock);
822} 822}
823 823
824static void __maps__remove(struct maps *maps, struct map *map) 824static void __maps__remove(struct maps *maps, struct map *map)
@@ -829,9 +829,9 @@ static void __maps__remove(struct maps *maps, struct map *map)
829 829
830void maps__remove(struct maps *maps, struct map *map) 830void maps__remove(struct maps *maps, struct map *map)
831{ 831{
832 pthread_rwlock_wrlock(&maps->lock); 832 down_write(&maps->lock);
833 __maps__remove(maps, map); 833 __maps__remove(maps, map);
834 pthread_rwlock_unlock(&maps->lock); 834 up_write(&maps->lock);
835} 835}
836 836
837struct map *maps__find(struct maps *maps, u64 ip) 837struct map *maps__find(struct maps *maps, u64 ip)
@@ -839,7 +839,7 @@ struct map *maps__find(struct maps *maps, u64 ip)
839 struct rb_node **p, *parent = NULL; 839 struct rb_node **p, *parent = NULL;
840 struct map *m; 840 struct map *m;
841 841
842 pthread_rwlock_rdlock(&maps->lock); 842 down_read(&maps->lock);
843 843
844 p = &maps->entries.rb_node; 844 p = &maps->entries.rb_node;
845 while (*p != NULL) { 845 while (*p != NULL) {
@@ -855,7 +855,7 @@ struct map *maps__find(struct maps *maps, u64 ip)
855 855
856 m = NULL; 856 m = NULL;
857out: 857out:
858 pthread_rwlock_unlock(&maps->lock); 858 up_read(&maps->lock);
859 return m; 859 return m;
860} 860}
861 861
diff --git a/tools/perf/util/map.h b/tools/perf/util/map.h
index 1fb9b8589adc..edeb7291c8e1 100644
--- a/tools/perf/util/map.h
+++ b/tools/perf/util/map.h
@@ -10,6 +10,7 @@
10#include <stdio.h> 10#include <stdio.h>
11#include <stdbool.h> 11#include <stdbool.h>
12#include <linux/types.h> 12#include <linux/types.h>
13#include "rwsem.h"
13 14
14enum map_type { 15enum map_type {
15 MAP__FUNCTION = 0, 16 MAP__FUNCTION = 0,
@@ -62,7 +63,7 @@ struct kmap {
62 63
63struct maps { 64struct maps {
64 struct rb_root entries; 65 struct rb_root entries;
65 pthread_rwlock_t lock; 66 struct rw_semaphore lock;
66}; 67};
67 68
68struct map_groups { 69struct map_groups {
diff --git a/tools/perf/util/metricgroup.c b/tools/perf/util/metricgroup.c
new file mode 100644
index 000000000000..1ddc3d1d0147
--- /dev/null
+++ b/tools/perf/util/metricgroup.c
@@ -0,0 +1,492 @@
1/*
2 * Copyright (c) 2017, Intel Corporation.
3 *
4 * This program is free software; you can redistribute it and/or modify it
5 * under the terms and conditions of the GNU General Public License,
6 * version 2, as published by the Free Software Foundation.
7 *
8 * This program is distributed in the hope it will be useful, but WITHOUT
9 * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
10 * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for
11 * more details.
12 *
13 */
14
15/* Manage metrics and groups of metrics from JSON files */
16
17#include "metricgroup.h"
18#include "evlist.h"
19#include "strbuf.h"
20#include "pmu.h"
21#include "expr.h"
22#include "rblist.h"
23#include <string.h>
24#include <stdbool.h>
25#include <errno.h>
26#include "pmu-events/pmu-events.h"
27#include "strlist.h"
28#include <assert.h>
29#include <ctype.h>
30
31struct metric_event *metricgroup__lookup(struct rblist *metric_events,
32 struct perf_evsel *evsel,
33 bool create)
34{
35 struct rb_node *nd;
36 struct metric_event me = {
37 .evsel = evsel
38 };
39
40 if (!metric_events)
41 return NULL;
42
43 nd = rblist__find(metric_events, &me);
44 if (nd)
45 return container_of(nd, struct metric_event, nd);
46 if (create) {
47 rblist__add_node(metric_events, &me);
48 nd = rblist__find(metric_events, &me);
49 if (nd)
50 return container_of(nd, struct metric_event, nd);
51 }
52 return NULL;
53}
54
55static int metric_event_cmp(struct rb_node *rb_node, const void *entry)
56{
57 struct metric_event *a = container_of(rb_node,
58 struct metric_event,
59 nd);
60 const struct metric_event *b = entry;
61
62 if (a->evsel == b->evsel)
63 return 0;
64 if ((char *)a->evsel < (char *)b->evsel)
65 return -1;
66 return +1;
67}
68
69static struct rb_node *metric_event_new(struct rblist *rblist __maybe_unused,
70 const void *entry)
71{
72 struct metric_event *me = malloc(sizeof(struct metric_event));
73
74 if (!me)
75 return NULL;
76 memcpy(me, entry, sizeof(struct metric_event));
77 me->evsel = ((struct metric_event *)entry)->evsel;
78 INIT_LIST_HEAD(&me->head);
79 return &me->nd;
80}
81
82static void metricgroup__rblist_init(struct rblist *metric_events)
83{
84 rblist__init(metric_events);
85 metric_events->node_cmp = metric_event_cmp;
86 metric_events->node_new = metric_event_new;
87}
88
89struct egroup {
90 struct list_head nd;
91 int idnum;
92 const char **ids;
93 const char *metric_name;
94 const char *metric_expr;
95};
96
97static struct perf_evsel *find_evsel(struct perf_evlist *perf_evlist,
98 const char **ids,
99 int idnum,
100 struct perf_evsel **metric_events)
101{
102 struct perf_evsel *ev, *start = NULL;
103 int ind = 0;
104
105 evlist__for_each_entry (perf_evlist, ev) {
106 if (!strcmp(ev->name, ids[ind])) {
107 metric_events[ind] = ev;
108 if (ind == 0)
109 start = ev;
110 if (++ind == idnum) {
111 metric_events[ind] = NULL;
112 return start;
113 }
114 } else {
115 ind = 0;
116 start = NULL;
117 }
118 }
119 /*
120 * This can happen when an alias expands to multiple
121 * events, like for uncore events.
122 * We don't support this case for now.
123 */
124 return NULL;
125}
126
127static int metricgroup__setup_events(struct list_head *groups,
128 struct perf_evlist *perf_evlist,
129 struct rblist *metric_events_list)
130{
131 struct metric_event *me;
132 struct metric_expr *expr;
133 int i = 0;
134 int ret = 0;
135 struct egroup *eg;
136 struct perf_evsel *evsel;
137
138 list_for_each_entry (eg, groups, nd) {
139 struct perf_evsel **metric_events;
140
141 metric_events = calloc(sizeof(void *), eg->idnum + 1);
142 if (!metric_events) {
143 ret = -ENOMEM;
144 break;
145 }
146 evsel = find_evsel(perf_evlist, eg->ids, eg->idnum,
147 metric_events);
148 if (!evsel) {
149 pr_debug("Cannot resolve %s: %s\n",
150 eg->metric_name, eg->metric_expr);
151 continue;
152 }
153 for (i = 0; i < eg->idnum; i++)
154 metric_events[i]->collect_stat = true;
155 me = metricgroup__lookup(metric_events_list, evsel, true);
156 if (!me) {
157 ret = -ENOMEM;
158 break;
159 }
160 expr = malloc(sizeof(struct metric_expr));
161 if (!expr) {
162 ret = -ENOMEM;
163 break;
164 }
165 expr->metric_expr = eg->metric_expr;
166 expr->metric_name = eg->metric_name;
167 expr->metric_events = metric_events;
168 list_add(&expr->nd, &me->head);
169 }
170 return ret;
171}
172
173static bool match_metric(const char *n, const char *list)
174{
175 int len;
176 char *m;
177
178 if (!list)
179 return false;
180 if (!strcmp(list, "all"))
181 return true;
182 if (!n)
183 return !strcasecmp(list, "No_group");
184 len = strlen(list);
185 m = strcasestr(n, list);
186 if (!m)
187 return false;
188 if ((m == n || m[-1] == ';' || m[-1] == ' ') &&
189 (m[len] == 0 || m[len] == ';'))
190 return true;
191 return false;
192}
193
194struct mep {
195 struct rb_node nd;
196 const char *name;
197 struct strlist *metrics;
198};
199
200static int mep_cmp(struct rb_node *rb_node, const void *entry)
201{
202 struct mep *a = container_of(rb_node, struct mep, nd);
203 struct mep *b = (struct mep *)entry;
204
205 return strcmp(a->name, b->name);
206}
207
208static struct rb_node *mep_new(struct rblist *rl __maybe_unused,
209 const void *entry)
210{
211 struct mep *me = malloc(sizeof(struct mep));
212
213 if (!me)
214 return NULL;
215 memcpy(me, entry, sizeof(struct mep));
216 me->name = strdup(me->name);
217 if (!me->name)
218 goto out_me;
219 me->metrics = strlist__new(NULL, NULL);
220 if (!me->metrics)
221 goto out_name;
222 return &me->nd;
223out_name:
224 free((char *)me->name);
225out_me:
226 free(me);
227 return NULL;
228}
229
230static struct mep *mep_lookup(struct rblist *groups, const char *name)
231{
232 struct rb_node *nd;
233 struct mep me = {
234 .name = name
235 };
236 nd = rblist__find(groups, &me);
237 if (nd)
238 return container_of(nd, struct mep, nd);
239 rblist__add_node(groups, &me);
240 nd = rblist__find(groups, &me);
241 if (nd)
242 return container_of(nd, struct mep, nd);
243 return NULL;
244}
245
246static void mep_delete(struct rblist *rl __maybe_unused,
247 struct rb_node *nd)
248{
249 struct mep *me = container_of(nd, struct mep, nd);
250
251 strlist__delete(me->metrics);
252 free((void *)me->name);
253 free(me);
254}
255
256static void metricgroup__print_strlist(struct strlist *metrics, bool raw)
257{
258 struct str_node *sn;
259 int n = 0;
260
261 strlist__for_each_entry (sn, metrics) {
262 if (raw)
263 printf("%s%s", n > 0 ? " " : "", sn->s);
264 else
265 printf(" %s\n", sn->s);
266 n++;
267 }
268 if (raw)
269 putchar('\n');
270}
271
272void metricgroup__print(bool metrics, bool metricgroups, char *filter,
273 bool raw)
274{
275 struct pmu_events_map *map = perf_pmu__find_map(NULL);
276 struct pmu_event *pe;
277 int i;
278 struct rblist groups;
279 struct rb_node *node, *next;
280 struct strlist *metriclist = NULL;
281
282 if (!map)
283 return;
284
285 if (!metricgroups) {
286 metriclist = strlist__new(NULL, NULL);
287 if (!metriclist)
288 return;
289 }
290
291 rblist__init(&groups);
292 groups.node_new = mep_new;
293 groups.node_cmp = mep_cmp;
294 groups.node_delete = mep_delete;
295 for (i = 0; ; i++) {
296 const char *g;
297 pe = &map->table[i];
298
299 if (!pe->name && !pe->metric_group && !pe->metric_name)
300 break;
301 if (!pe->metric_expr)
302 continue;
303 g = pe->metric_group;
304 if (!g && pe->metric_name) {
305 if (pe->name)
306 continue;
307 g = "No_group";
308 }
309 if (g) {
310 char *omg;
311 char *mg = strdup(g);
312
313 if (!mg)
314 return;
315 omg = mg;
316 while ((g = strsep(&mg, ";")) != NULL) {
317 struct mep *me;
318 char *s;
319
320 if (*g == 0)
321 g = "No_group";
322 while (isspace(*g))
323 g++;
324 if (filter && !strstr(g, filter))
325 continue;
326 if (raw)
327 s = (char *)pe->metric_name;
328 else {
329 if (asprintf(&s, "%s\n\t[%s]",
330 pe->metric_name, pe->desc) < 0)
331 return;
332 }
333
334 if (!s)
335 continue;
336
337 if (!metricgroups) {
338 strlist__add(metriclist, s);
339 } else {
340 me = mep_lookup(&groups, g);
341 if (!me)
342 continue;
343 strlist__add(me->metrics, s);
344 }
345 }
346 free(omg);
347 }
348 }
349
350 if (metricgroups && !raw)
351 printf("\nMetric Groups:\n\n");
352 else if (metrics && !raw)
353 printf("\nMetrics:\n\n");
354
355 for (node = rb_first(&groups.entries); node; node = next) {
356 struct mep *me = container_of(node, struct mep, nd);
357
358 if (metricgroups)
359 printf("%s%s%s", me->name, metrics ? ":" : "", raw ? " " : "\n");
360 if (metrics)
361 metricgroup__print_strlist(me->metrics, raw);
362 next = rb_next(node);
363 rblist__remove_node(&groups, node);
364 }
365 if (!metricgroups)
366 metricgroup__print_strlist(metriclist, raw);
367 strlist__delete(metriclist);
368}
369
370static int metricgroup__add_metric(const char *metric, struct strbuf *events,
371 struct list_head *group_list)
372{
373 struct pmu_events_map *map = perf_pmu__find_map(NULL);
374 struct pmu_event *pe;
375 int ret = -EINVAL;
376 int i, j;
377
378 if (!map)
379 return 0;
380
381 for (i = 0; ; i++) {
382 pe = &map->table[i];
383
384 if (!pe->name && !pe->metric_group && !pe->metric_name)
385 break;
386 if (!pe->metric_expr)
387 continue;
388 if (match_metric(pe->metric_group, metric) ||
389 match_metric(pe->metric_name, metric)) {
390 const char **ids;
391 int idnum;
392 struct egroup *eg;
393
394 pr_debug("metric expr %s for %s\n", pe->metric_expr, pe->metric_name);
395
396 if (expr__find_other(pe->metric_expr,
397 NULL, &ids, &idnum) < 0)
398 continue;
399 if (events->len > 0)
400 strbuf_addf(events, ",");
401 for (j = 0; j < idnum; j++) {
402 pr_debug("found event %s\n", ids[j]);
403 strbuf_addf(events, "%s%s",
404 j == 0 ? "{" : ",",
405 ids[j]);
406 }
407 strbuf_addf(events, "}:W");
408
409 eg = malloc(sizeof(struct egroup));
410 if (!eg) {
411 ret = -ENOMEM;
412 break;
413 }
414 eg->ids = ids;
415 eg->idnum = idnum;
416 eg->metric_name = pe->metric_name;
417 eg->metric_expr = pe->metric_expr;
418 list_add_tail(&eg->nd, group_list);
419 ret = 0;
420 }
421 }
422 return ret;
423}
424
425static int metricgroup__add_metric_list(const char *list, struct strbuf *events,
426 struct list_head *group_list)
427{
428 char *llist, *nlist, *p;
429 int ret = -EINVAL;
430
431 nlist = strdup(list);
432 if (!nlist)
433 return -ENOMEM;
434 llist = nlist;
435
436 strbuf_init(events, 100);
437 strbuf_addf(events, "%s", "");
438
439 while ((p = strsep(&llist, ",")) != NULL) {
440 ret = metricgroup__add_metric(p, events, group_list);
441 if (ret == -EINVAL) {
442 fprintf(stderr, "Cannot find metric or group `%s'\n",
443 p);
444 break;
445 }
446 }
447 free(nlist);
448 return ret;
449}
450
451static void metricgroup__free_egroups(struct list_head *group_list)
452{
453 struct egroup *eg, *egtmp;
454 int i;
455
456 list_for_each_entry_safe (eg, egtmp, group_list, nd) {
457 for (i = 0; i < eg->idnum; i++)
458 free((char *)eg->ids[i]);
459 free(eg->ids);
460 free(eg);
461 }
462}
463
464int metricgroup__parse_groups(const struct option *opt,
465 const char *str,
466 struct rblist *metric_events)
467{
468 struct parse_events_error parse_error;
469 struct perf_evlist *perf_evlist = *(struct perf_evlist **)opt->value;
470 struct strbuf extra_events;
471 LIST_HEAD(group_list);
472 int ret;
473
474 if (metric_events->nr_entries == 0)
475 metricgroup__rblist_init(metric_events);
476 ret = metricgroup__add_metric_list(str, &extra_events, &group_list);
477 if (ret)
478 return ret;
479 pr_debug("adding %s\n", extra_events.buf);
480 memset(&parse_error, 0, sizeof(struct parse_events_error));
481 ret = parse_events(perf_evlist, extra_events.buf, &parse_error);
482 if (ret) {
483 parse_events_print_error(&parse_error, extra_events.buf);
484 goto out;
485 }
486 strbuf_release(&extra_events);
487 ret = metricgroup__setup_events(&group_list, perf_evlist,
488 metric_events);
489out:
490 metricgroup__free_egroups(&group_list);
491 return ret;
492}
diff --git a/tools/perf/util/metricgroup.h b/tools/perf/util/metricgroup.h
new file mode 100644
index 000000000000..06854e125ee7
--- /dev/null
+++ b/tools/perf/util/metricgroup.h
@@ -0,0 +1,31 @@
1#ifndef METRICGROUP_H
2#define METRICGROUP_H 1
3
4#include "linux/list.h"
5#include "rblist.h"
6#include <subcmd/parse-options.h>
7#include "evlist.h"
8#include "strbuf.h"
9
10struct metric_event {
11 struct rb_node nd;
12 struct perf_evsel *evsel;
13 struct list_head head; /* list of metric_expr */
14};
15
16struct metric_expr {
17 struct list_head nd;
18 const char *metric_expr;
19 const char *metric_name;
20 struct perf_evsel **metric_events;
21};
22
23struct metric_event *metricgroup__lookup(struct rblist *metric_events,
24 struct perf_evsel *evsel,
25 bool create);
26int metricgroup__parse_groups(const struct option *opt,
27 const char *str,
28 struct rblist *metric_events);
29
30void metricgroup__print(bool metrics, bool groups, char *filter, bool raw);
31#endif
diff --git a/tools/perf/util/mmap.c b/tools/perf/util/mmap.c
new file mode 100644
index 000000000000..91531a7c8fbf
--- /dev/null
+++ b/tools/perf/util/mmap.c
@@ -0,0 +1,348 @@
1/*
2 * Copyright (C) 2011-2017, Red Hat Inc, Arnaldo Carvalho de Melo <acme@redhat.com>
3 *
4 * Parts came from evlist.c builtin-{top,stat,record}.c, see those files for further
5 * copyright notes.
6 *
7 * Released under the GPL v2. (and only v2, not any later version)
8 */
9
10#include <sys/mman.h>
11#include <inttypes.h>
12#include <asm/bug.h>
13#include "debug.h"
14#include "event.h"
15#include "mmap.h"
16#include "util.h" /* page_size */
17
18size_t perf_mmap__mmap_len(struct perf_mmap *map)
19{
20 return map->mask + 1 + page_size;
21}
22
23/* When check_messup is true, 'end' must points to a good entry */
24static union perf_event *perf_mmap__read(struct perf_mmap *map,
25 u64 *startp, u64 end)
26{
27 unsigned char *data = map->base + page_size;
28 union perf_event *event = NULL;
29 int diff = end - *startp;
30
31 if (diff >= (int)sizeof(event->header)) {
32 size_t size;
33
34 event = (union perf_event *)&data[*startp & map->mask];
35 size = event->header.size;
36
37 if (size < sizeof(event->header) || diff < (int)size)
38 return NULL;
39
40 /*
41 * Event straddles the mmap boundary -- header should always
42 * be inside due to u64 alignment of output.
43 */
44 if ((*startp & map->mask) + size != ((*startp + size) & map->mask)) {
45 unsigned int offset = *startp;
46 unsigned int len = min(sizeof(*event), size), cpy;
47 void *dst = map->event_copy;
48
49 do {
50 cpy = min(map->mask + 1 - (offset & map->mask), len);
51 memcpy(dst, &data[offset & map->mask], cpy);
52 offset += cpy;
53 dst += cpy;
54 len -= cpy;
55 } while (len);
56
57 event = (union perf_event *)map->event_copy;
58 }
59
60 *startp += size;
61 }
62
63 return event;
64}
65
66/*
67 * legacy interface for mmap read.
68 * Don't use it. Use perf_mmap__read_event().
69 */
70union perf_event *perf_mmap__read_forward(struct perf_mmap *map)
71{
72 u64 head;
73
74 /*
75 * Check if event was unmapped due to a POLLHUP/POLLERR.
76 */
77 if (!refcount_read(&map->refcnt))
78 return NULL;
79
80 head = perf_mmap__read_head(map);
81
82 return perf_mmap__read(map, &map->prev, head);
83}
84
85/*
86 * Read event from ring buffer one by one.
87 * Return one event for each call.
88 *
89 * Usage:
90 * perf_mmap__read_init()
91 * while(event = perf_mmap__read_event()) {
92 * //process the event
93 * perf_mmap__consume()
94 * }
95 * perf_mmap__read_done()
96 */
97union perf_event *perf_mmap__read_event(struct perf_mmap *map,
98 bool overwrite,
99 u64 *startp, u64 end)
100{
101 union perf_event *event;
102
103 /*
104 * Check if event was unmapped due to a POLLHUP/POLLERR.
105 */
106 if (!refcount_read(&map->refcnt))
107 return NULL;
108
109 if (startp == NULL)
110 return NULL;
111
112 /* non-overwirte doesn't pause the ringbuffer */
113 if (!overwrite)
114 end = perf_mmap__read_head(map);
115
116 event = perf_mmap__read(map, startp, end);
117
118 if (!overwrite)
119 map->prev = *startp;
120
121 return event;
122}
123
124static bool perf_mmap__empty(struct perf_mmap *map)
125{
126 return perf_mmap__read_head(map) == map->prev && !map->auxtrace_mmap.base;
127}
128
129void perf_mmap__get(struct perf_mmap *map)
130{
131 refcount_inc(&map->refcnt);
132}
133
134void perf_mmap__put(struct perf_mmap *map)
135{
136 BUG_ON(map->base && refcount_read(&map->refcnt) == 0);
137
138 if (refcount_dec_and_test(&map->refcnt))
139 perf_mmap__munmap(map);
140}
141
142void perf_mmap__consume(struct perf_mmap *map, bool overwrite)
143{
144 if (!overwrite) {
145 u64 old = map->prev;
146
147 perf_mmap__write_tail(map, old);
148 }
149
150 if (refcount_read(&map->refcnt) == 1 && perf_mmap__empty(map))
151 perf_mmap__put(map);
152}
153
154int __weak auxtrace_mmap__mmap(struct auxtrace_mmap *mm __maybe_unused,
155 struct auxtrace_mmap_params *mp __maybe_unused,
156 void *userpg __maybe_unused,
157 int fd __maybe_unused)
158{
159 return 0;
160}
161
162void __weak auxtrace_mmap__munmap(struct auxtrace_mmap *mm __maybe_unused)
163{
164}
165
166void __weak auxtrace_mmap_params__init(struct auxtrace_mmap_params *mp __maybe_unused,
167 off_t auxtrace_offset __maybe_unused,
168 unsigned int auxtrace_pages __maybe_unused,
169 bool auxtrace_overwrite __maybe_unused)
170{
171}
172
173void __weak auxtrace_mmap_params__set_idx(struct auxtrace_mmap_params *mp __maybe_unused,
174 struct perf_evlist *evlist __maybe_unused,
175 int idx __maybe_unused,
176 bool per_cpu __maybe_unused)
177{
178}
179
180void perf_mmap__munmap(struct perf_mmap *map)
181{
182 if (map->base != NULL) {
183 munmap(map->base, perf_mmap__mmap_len(map));
184 map->base = NULL;
185 map->fd = -1;
186 refcount_set(&map->refcnt, 0);
187 }
188 auxtrace_mmap__munmap(&map->auxtrace_mmap);
189}
190
191int perf_mmap__mmap(struct perf_mmap *map, struct mmap_params *mp, int fd)
192{
193 /*
194 * The last one will be done at perf_evlist__mmap_consume(), so that we
195 * make sure we don't prevent tools from consuming every last event in
196 * the ring buffer.
197 *
198 * I.e. we can get the POLLHUP meaning that the fd doesn't exist
199 * anymore, but the last events for it are still in the ring buffer,
200 * waiting to be consumed.
201 *
202 * Tools can chose to ignore this at their own discretion, but the
203 * evlist layer can't just drop it when filtering events in
204 * perf_evlist__filter_pollfd().
205 */
206 refcount_set(&map->refcnt, 2);
207 map->prev = 0;
208 map->mask = mp->mask;
209 map->base = mmap(NULL, perf_mmap__mmap_len(map), mp->prot,
210 MAP_SHARED, fd, 0);
211 if (map->base == MAP_FAILED) {
212 pr_debug2("failed to mmap perf event ring buffer, error %d\n",
213 errno);
214 map->base = NULL;
215 return -1;
216 }
217 map->fd = fd;
218
219 if (auxtrace_mmap__mmap(&map->auxtrace_mmap,
220 &mp->auxtrace_mp, map->base, fd))
221 return -1;
222
223 return 0;
224}
225
226static int overwrite_rb_find_range(void *buf, int mask, u64 head, u64 *start, u64 *end)
227{
228 struct perf_event_header *pheader;
229 u64 evt_head = head;
230 int size = mask + 1;
231
232 pr_debug2("overwrite_rb_find_range: buf=%p, head=%"PRIx64"\n", buf, head);
233 pheader = (struct perf_event_header *)(buf + (head & mask));
234 *start = head;
235 while (true) {
236 if (evt_head - head >= (unsigned int)size) {
237 pr_debug("Finished reading overwrite ring buffer: rewind\n");
238 if (evt_head - head > (unsigned int)size)
239 evt_head -= pheader->size;
240 *end = evt_head;
241 return 0;
242 }
243
244 pheader = (struct perf_event_header *)(buf + (evt_head & mask));
245
246 if (pheader->size == 0) {
247 pr_debug("Finished reading overwrite ring buffer: get start\n");
248 *end = evt_head;
249 return 0;
250 }
251
252 evt_head += pheader->size;
253 pr_debug3("move evt_head: %"PRIx64"\n", evt_head);
254 }
255 WARN_ONCE(1, "Shouldn't get here\n");
256 return -1;
257}
258
259/*
260 * Report the start and end of the available data in ringbuffer
261 */
262int perf_mmap__read_init(struct perf_mmap *md, bool overwrite,
263 u64 *startp, u64 *endp)
264{
265 u64 head = perf_mmap__read_head(md);
266 u64 old = md->prev;
267 unsigned char *data = md->base + page_size;
268 unsigned long size;
269
270 *startp = overwrite ? head : old;
271 *endp = overwrite ? old : head;
272
273 if (*startp == *endp)
274 return -EAGAIN;
275
276 size = *endp - *startp;
277 if (size > (unsigned long)(md->mask) + 1) {
278 if (!overwrite) {
279 WARN_ONCE(1, "failed to keep up with mmap data. (warn only once)\n");
280
281 md->prev = head;
282 perf_mmap__consume(md, overwrite);
283 return -EAGAIN;
284 }
285
286 /*
287 * Backward ring buffer is full. We still have a chance to read
288 * most of data from it.
289 */
290 if (overwrite_rb_find_range(data, md->mask, head, startp, endp))
291 return -EINVAL;
292 }
293
294 return 0;
295}
296
297int perf_mmap__push(struct perf_mmap *md, bool overwrite,
298 void *to, int push(void *to, void *buf, size_t size))
299{
300 u64 head = perf_mmap__read_head(md);
301 u64 end, start;
302 unsigned char *data = md->base + page_size;
303 unsigned long size;
304 void *buf;
305 int rc = 0;
306
307 rc = perf_mmap__read_init(md, overwrite, &start, &end);
308 if (rc < 0)
309 return (rc == -EAGAIN) ? 0 : -1;
310
311 size = end - start;
312
313 if ((start & md->mask) + size != (end & md->mask)) {
314 buf = &data[start & md->mask];
315 size = md->mask + 1 - (start & md->mask);
316 start += size;
317
318 if (push(to, buf, size) < 0) {
319 rc = -1;
320 goto out;
321 }
322 }
323
324 buf = &data[start & md->mask];
325 size = end - start;
326 start += size;
327
328 if (push(to, buf, size) < 0) {
329 rc = -1;
330 goto out;
331 }
332
333 md->prev = head;
334 perf_mmap__consume(md, overwrite);
335out:
336 return rc;
337}
338
339/*
340 * Mandatory for overwrite mode
341 * The direction of overwrite mode is backward.
342 * The last perf_mmap__read() will set tail to map->prev.
343 * Need to correct the map->prev to head which is the end of next read.
344 */
345void perf_mmap__read_done(struct perf_mmap *map)
346{
347 map->prev = perf_mmap__read_head(map);
348}
diff --git a/tools/perf/util/mmap.h b/tools/perf/util/mmap.h
new file mode 100644
index 000000000000..ec7d3a24e276
--- /dev/null
+++ b/tools/perf/util/mmap.h
@@ -0,0 +1,101 @@
1#ifndef __PERF_MMAP_H
2#define __PERF_MMAP_H 1
3
4#include <linux/compiler.h>
5#include <linux/refcount.h>
6#include <linux/types.h>
7#include <asm/barrier.h>
8#include <stdbool.h>
9#include "auxtrace.h"
10#include "event.h"
11
12/**
13 * struct perf_mmap - perf's ring buffer mmap details
14 *
15 * @refcnt - e.g. code using PERF_EVENT_IOC_SET_OUTPUT to share this
16 */
17struct perf_mmap {
18 void *base;
19 int mask;
20 int fd;
21 refcount_t refcnt;
22 u64 prev;
23 struct auxtrace_mmap auxtrace_mmap;
24 char event_copy[PERF_SAMPLE_MAX_SIZE] __aligned(8);
25};
26
27/*
28 * State machine of bkw_mmap_state:
29 *
30 * .________________(forbid)_____________.
31 * | V
32 * NOTREADY --(0)--> RUNNING --(1)--> DATA_PENDING --(2)--> EMPTY
33 * ^ ^ | ^ |
34 * | |__(forbid)____/ |___(forbid)___/|
35 * | |
36 * \_________________(3)_______________/
37 *
38 * NOTREADY : Backward ring buffers are not ready
39 * RUNNING : Backward ring buffers are recording
40 * DATA_PENDING : We are required to collect data from backward ring buffers
41 * EMPTY : We have collected data from backward ring buffers.
42 *
43 * (0): Setup backward ring buffer
44 * (1): Pause ring buffers for reading
45 * (2): Read from ring buffers
46 * (3): Resume ring buffers for recording
47 */
48enum bkw_mmap_state {
49 BKW_MMAP_NOTREADY,
50 BKW_MMAP_RUNNING,
51 BKW_MMAP_DATA_PENDING,
52 BKW_MMAP_EMPTY,
53};
54
55struct mmap_params {
56 int prot, mask;
57 struct auxtrace_mmap_params auxtrace_mp;
58};
59
60int perf_mmap__mmap(struct perf_mmap *map, struct mmap_params *mp, int fd);
61void perf_mmap__munmap(struct perf_mmap *map);
62
63void perf_mmap__get(struct perf_mmap *map);
64void perf_mmap__put(struct perf_mmap *map);
65
66void perf_mmap__consume(struct perf_mmap *map, bool overwrite);
67
68static inline u64 perf_mmap__read_head(struct perf_mmap *mm)
69{
70 struct perf_event_mmap_page *pc = mm->base;
71 u64 head = READ_ONCE(pc->data_head);
72 rmb();
73 return head;
74}
75
76static inline void perf_mmap__write_tail(struct perf_mmap *md, u64 tail)
77{
78 struct perf_event_mmap_page *pc = md->base;
79
80 /*
81 * ensure all reads are done before we write the tail out.
82 */
83 mb();
84 pc->data_tail = tail;
85}
86
87union perf_event *perf_mmap__read_forward(struct perf_mmap *map);
88
89union perf_event *perf_mmap__read_event(struct perf_mmap *map,
90 bool overwrite,
91 u64 *startp, u64 end);
92
93int perf_mmap__push(struct perf_mmap *md, bool backward,
94 void *to, int push(void *to, void *buf, size_t size));
95
96size_t perf_mmap__mmap_len(struct perf_mmap *map);
97
98int perf_mmap__read_init(struct perf_mmap *md, bool overwrite,
99 u64 *startp, u64 *endp);
100void perf_mmap__read_done(struct perf_mmap *map);
101#endif /*__PERF_MMAP_H */
diff --git a/tools/perf/util/namespaces.c b/tools/perf/util/namespaces.c
index a58e91197729..5be021701f34 100644
--- a/tools/perf/util/namespaces.c
+++ b/tools/perf/util/namespaces.c
@@ -11,6 +11,7 @@
11#include "event.h" 11#include "event.h"
12#include <sys/types.h> 12#include <sys/types.h>
13#include <sys/stat.h> 13#include <sys/stat.h>
14#include <fcntl.h>
14#include <limits.h> 15#include <limits.h>
15#include <sched.h> 16#include <sched.h>
16#include <stdlib.h> 17#include <stdlib.h>
diff --git a/tools/perf/util/namespaces.h b/tools/perf/util/namespaces.h
index 05d82601c9a6..760558dcfd18 100644
--- a/tools/perf/util/namespaces.h
+++ b/tools/perf/util/namespaces.h
@@ -9,9 +9,10 @@
9#ifndef __PERF_NAMESPACES_H 9#ifndef __PERF_NAMESPACES_H
10#define __PERF_NAMESPACES_H 10#define __PERF_NAMESPACES_H
11 11
12#include "../perf.h" 12#include <sys/types.h>
13#include <linux/list.h> 13#include <linux/perf_event.h>
14#include <linux/refcount.h> 14#include <linux/refcount.h>
15#include <linux/types.h>
15 16
16struct namespaces_event; 17struct namespaces_event;
17 18
diff --git a/tools/perf/util/ordered-events.c b/tools/perf/util/ordered-events.c
index 8e09fd2d842f..bad9e0296e9a 100644
--- a/tools/perf/util/ordered-events.c
+++ b/tools/perf/util/ordered-events.c
@@ -157,9 +157,8 @@ void ordered_events__delete(struct ordered_events *oe, struct ordered_event *eve
157} 157}
158 158
159int ordered_events__queue(struct ordered_events *oe, union perf_event *event, 159int ordered_events__queue(struct ordered_events *oe, union perf_event *event,
160 struct perf_sample *sample, u64 file_offset) 160 u64 timestamp, u64 file_offset)
161{ 161{
162 u64 timestamp = sample->time;
163 struct ordered_event *oevent; 162 struct ordered_event *oevent;
164 163
165 if (!timestamp || timestamp == ~0ULL) 164 if (!timestamp || timestamp == ~0ULL)
diff --git a/tools/perf/util/ordered-events.h b/tools/perf/util/ordered-events.h
index 96e5292d88e2..8c7a2948593e 100644
--- a/tools/perf/util/ordered-events.h
+++ b/tools/perf/util/ordered-events.h
@@ -45,7 +45,7 @@ struct ordered_events {
45}; 45};
46 46
47int ordered_events__queue(struct ordered_events *oe, union perf_event *event, 47int ordered_events__queue(struct ordered_events *oe, union perf_event *event,
48 struct perf_sample *sample, u64 file_offset); 48 u64 timestamp, u64 file_offset);
49void ordered_events__delete(struct ordered_events *oe, struct ordered_event *event); 49void ordered_events__delete(struct ordered_events *oe, struct ordered_event *event);
50int ordered_events__flush(struct ordered_events *oe, enum oe_flush how); 50int ordered_events__flush(struct ordered_events *oe, enum oe_flush how);
51void ordered_events__init(struct ordered_events *oe, ordered_events__deliver_t deliver); 51void ordered_events__init(struct ordered_events *oe, ordered_events__deliver_t deliver);
diff --git a/tools/perf/util/parse-events.c b/tools/perf/util/parse-events.c
index 56694e3409ea..34589c427e52 100644
--- a/tools/perf/util/parse-events.c
+++ b/tools/perf/util/parse-events.c
@@ -4,6 +4,9 @@
4#include <dirent.h> 4#include <dirent.h>
5#include <errno.h> 5#include <errno.h>
6#include <sys/ioctl.h> 6#include <sys/ioctl.h>
7#include <sys/types.h>
8#include <sys/stat.h>
9#include <fcntl.h>
7#include <sys/param.h> 10#include <sys/param.h>
8#include "term.h" 11#include "term.h"
9#include "../perf.h" 12#include "../perf.h"
@@ -29,6 +32,7 @@
29#include "probe-file.h" 32#include "probe-file.h"
30#include "asm/bug.h" 33#include "asm/bug.h"
31#include "util/parse-branch-options.h" 34#include "util/parse-branch-options.h"
35#include "metricgroup.h"
32 36
33#define MAX_NAME_LEN 100 37#define MAX_NAME_LEN 100
34 38
@@ -1115,6 +1119,7 @@ do { \
1115 INIT_LIST_HEAD(&__t->list); \ 1119 INIT_LIST_HEAD(&__t->list); \
1116 __t->type = PERF_EVSEL__CONFIG_TERM_ ## __type; \ 1120 __t->type = PERF_EVSEL__CONFIG_TERM_ ## __type; \
1117 __t->val.__name = __val; \ 1121 __t->val.__name = __val; \
1122 __t->weak = term->weak; \
1118 list_add_tail(&__t->list, head_terms); \ 1123 list_add_tail(&__t->list, head_terms); \
1119} while (0) 1124} while (0)
1120 1125
@@ -1220,11 +1225,17 @@ static int __parse_events_add_pmu(struct parse_events_state *parse_state,
1220 struct perf_pmu_info info; 1225 struct perf_pmu_info info;
1221 struct perf_pmu *pmu; 1226 struct perf_pmu *pmu;
1222 struct perf_evsel *evsel; 1227 struct perf_evsel *evsel;
1228 struct parse_events_error *err = parse_state->error;
1223 LIST_HEAD(config_terms); 1229 LIST_HEAD(config_terms);
1224 1230
1225 pmu = perf_pmu__find(name); 1231 pmu = perf_pmu__find(name);
1226 if (!pmu) 1232 if (!pmu) {
1233 if (asprintf(&err->str,
1234 "Cannot find PMU `%s'. Missing kernel support?",
1235 name) < 0)
1236 err->str = NULL;
1227 return -EINVAL; 1237 return -EINVAL;
1238 }
1228 1239
1229 if (pmu->default_config) { 1240 if (pmu->default_config) {
1230 memcpy(&attr, pmu->default_config, 1241 memcpy(&attr, pmu->default_config,
@@ -1368,6 +1379,7 @@ struct event_modifier {
1368 int exclude_GH; 1379 int exclude_GH;
1369 int sample_read; 1380 int sample_read;
1370 int pinned; 1381 int pinned;
1382 int weak;
1371}; 1383};
1372 1384
1373static int get_event_modifier(struct event_modifier *mod, char *str, 1385static int get_event_modifier(struct event_modifier *mod, char *str,
@@ -1386,6 +1398,7 @@ static int get_event_modifier(struct event_modifier *mod, char *str,
1386 1398
1387 int exclude = eu | ek | eh; 1399 int exclude = eu | ek | eh;
1388 int exclude_GH = evsel ? evsel->exclude_GH : 0; 1400 int exclude_GH = evsel ? evsel->exclude_GH : 0;
1401 int weak = 0;
1389 1402
1390 memset(mod, 0, sizeof(*mod)); 1403 memset(mod, 0, sizeof(*mod));
1391 1404
@@ -1423,6 +1436,8 @@ static int get_event_modifier(struct event_modifier *mod, char *str,
1423 sample_read = 1; 1436 sample_read = 1;
1424 } else if (*str == 'D') { 1437 } else if (*str == 'D') {
1425 pinned = 1; 1438 pinned = 1;
1439 } else if (*str == 'W') {
1440 weak = 1;
1426 } else 1441 } else
1427 break; 1442 break;
1428 1443
@@ -1453,6 +1468,7 @@ static int get_event_modifier(struct event_modifier *mod, char *str,
1453 mod->exclude_GH = exclude_GH; 1468 mod->exclude_GH = exclude_GH;
1454 mod->sample_read = sample_read; 1469 mod->sample_read = sample_read;
1455 mod->pinned = pinned; 1470 mod->pinned = pinned;
1471 mod->weak = weak;
1456 1472
1457 return 0; 1473 return 0;
1458} 1474}
@@ -1466,7 +1482,7 @@ static int check_modifier(char *str)
1466 char *p = str; 1482 char *p = str;
1467 1483
1468 /* The sizeof includes 0 byte as well. */ 1484 /* The sizeof includes 0 byte as well. */
1469 if (strlen(str) > (sizeof("ukhGHpppPSDI") - 1)) 1485 if (strlen(str) > (sizeof("ukhGHpppPSDIW") - 1))
1470 return -1; 1486 return -1;
1471 1487
1472 while (*p) { 1488 while (*p) {
@@ -1506,6 +1522,7 @@ int parse_events__modifier_event(struct list_head *list, char *str, bool add)
1506 evsel->exclude_GH = mod.exclude_GH; 1522 evsel->exclude_GH = mod.exclude_GH;
1507 evsel->sample_read = mod.sample_read; 1523 evsel->sample_read = mod.sample_read;
1508 evsel->precise_max = mod.precise_max; 1524 evsel->precise_max = mod.precise_max;
1525 evsel->weak_group = mod.weak;
1509 1526
1510 if (perf_evsel__is_group_leader(evsel)) 1527 if (perf_evsel__is_group_leader(evsel))
1511 evsel->attr.pinned = mod.pinned; 1528 evsel->attr.pinned = mod.pinned;
@@ -1728,8 +1745,8 @@ static int get_term_width(void)
1728 return ws.ws_col > MAX_WIDTH ? MAX_WIDTH : ws.ws_col; 1745 return ws.ws_col > MAX_WIDTH ? MAX_WIDTH : ws.ws_col;
1729} 1746}
1730 1747
1731static void parse_events_print_error(struct parse_events_error *err, 1748void parse_events_print_error(struct parse_events_error *err,
1732 const char *event) 1749 const char *event)
1733{ 1750{
1734 const char *str = "invalid or unsupported event: "; 1751 const char *str = "invalid or unsupported event: ";
1735 char _buf[MAX_WIDTH]; 1752 char _buf[MAX_WIDTH];
@@ -1784,8 +1801,6 @@ static void parse_events_print_error(struct parse_events_error *err,
1784 zfree(&err->str); 1801 zfree(&err->str);
1785 zfree(&err->help); 1802 zfree(&err->help);
1786 } 1803 }
1787
1788 fprintf(stderr, "Run 'perf list' for a list of valid events\n");
1789} 1804}
1790 1805
1791#undef MAX_WIDTH 1806#undef MAX_WIDTH
@@ -1797,8 +1812,10 @@ int parse_events_option(const struct option *opt, const char *str,
1797 struct parse_events_error err = { .idx = 0, }; 1812 struct parse_events_error err = { .idx = 0, };
1798 int ret = parse_events(evlist, str, &err); 1813 int ret = parse_events(evlist, str, &err);
1799 1814
1800 if (ret) 1815 if (ret) {
1801 parse_events_print_error(&err, str); 1816 parse_events_print_error(&err, str);
1817 fprintf(stderr, "Run 'perf list' for a list of valid events\n");
1818 }
1802 1819
1803 return ret; 1820 return ret;
1804} 1821}
@@ -2376,6 +2393,8 @@ void print_events(const char *event_glob, bool name_only, bool quiet_flag,
2376 print_tracepoint_events(NULL, NULL, name_only); 2393 print_tracepoint_events(NULL, NULL, name_only);
2377 2394
2378 print_sdt_events(NULL, NULL, name_only); 2395 print_sdt_events(NULL, NULL, name_only);
2396
2397 metricgroup__print(true, true, NULL, name_only);
2379} 2398}
2380 2399
2381int parse_events__is_hardcoded_term(struct parse_events_term *term) 2400int parse_events__is_hardcoded_term(struct parse_events_term *term)
@@ -2395,6 +2414,7 @@ static int new_term(struct parse_events_term **_term,
2395 2414
2396 *term = *temp; 2415 *term = *temp;
2397 INIT_LIST_HEAD(&term->list); 2416 INIT_LIST_HEAD(&term->list);
2417 term->weak = false;
2398 2418
2399 switch (term->type_val) { 2419 switch (term->type_val) {
2400 case PARSE_EVENTS__TERM_TYPE_NUM: 2420 case PARSE_EVENTS__TERM_TYPE_NUM:
diff --git a/tools/perf/util/parse-events.h b/tools/perf/util/parse-events.h
index eed50b54bab3..88108cd11b4c 100644
--- a/tools/perf/util/parse-events.h
+++ b/tools/perf/util/parse-events.h
@@ -101,6 +101,9 @@ struct parse_events_term {
101 /* error string indexes for within parsed string */ 101 /* error string indexes for within parsed string */
102 int err_term; 102 int err_term;
103 int err_val; 103 int err_val;
104
105 /* Coming from implicit alias */
106 bool weak;
104}; 107};
105 108
106struct parse_events_error { 109struct parse_events_error {
@@ -203,6 +206,9 @@ int is_valid_tracepoint(const char *event_string);
203int valid_event_mount(const char *eventfs); 206int valid_event_mount(const char *eventfs);
204char *parse_events_formats_error_string(char *additional_terms); 207char *parse_events_formats_error_string(char *additional_terms);
205 208
209void parse_events_print_error(struct parse_events_error *err,
210 const char *event);
211
206#ifdef HAVE_LIBELF_SUPPORT 212#ifdef HAVE_LIBELF_SUPPORT
207/* 213/*
208 * If the probe point starts with '%', 214 * If the probe point starts with '%',
diff --git a/tools/perf/util/parse-events.l b/tools/perf/util/parse-events.l
index 6680e4fb7967..655ecff636a8 100644
--- a/tools/perf/util/parse-events.l
+++ b/tools/perf/util/parse-events.l
@@ -5,6 +5,7 @@
5%option stack 5%option stack
6%option bison-locations 6%option bison-locations
7%option yylineno 7%option yylineno
8%option reject
8 9
9%{ 10%{
10#include <errno.h> 11#include <errno.h>
@@ -178,7 +179,7 @@ name [a-zA-Z_*?][a-zA-Z0-9_*?.]*
178name_minus [a-zA-Z_*?][a-zA-Z0-9\-_*?.:]* 179name_minus [a-zA-Z_*?][a-zA-Z0-9\-_*?.:]*
179drv_cfg_term [a-zA-Z0-9_\.]+(=[a-zA-Z0-9_*?\.:]+)? 180drv_cfg_term [a-zA-Z0-9_\.]+(=[a-zA-Z0-9_*?\.:]+)?
180/* If you add a modifier you need to update check_modifier() */ 181/* If you add a modifier you need to update check_modifier() */
181modifier_event [ukhpPGHSDI]+ 182modifier_event [ukhpPGHSDIW]+
182modifier_bp [rwx]{1,3} 183modifier_bp [rwx]{1,3}
183 184
184%% 185%%
@@ -305,6 +306,7 @@ cpu-migrations|migrations { return sym(yyscanner, PERF_TYPE_SOFTWARE, PERF_COU
305alignment-faults { return sym(yyscanner, PERF_TYPE_SOFTWARE, PERF_COUNT_SW_ALIGNMENT_FAULTS); } 306alignment-faults { return sym(yyscanner, PERF_TYPE_SOFTWARE, PERF_COUNT_SW_ALIGNMENT_FAULTS); }
306emulation-faults { return sym(yyscanner, PERF_TYPE_SOFTWARE, PERF_COUNT_SW_EMULATION_FAULTS); } 307emulation-faults { return sym(yyscanner, PERF_TYPE_SOFTWARE, PERF_COUNT_SW_EMULATION_FAULTS); }
307dummy { return sym(yyscanner, PERF_TYPE_SOFTWARE, PERF_COUNT_SW_DUMMY); } 308dummy { return sym(yyscanner, PERF_TYPE_SOFTWARE, PERF_COUNT_SW_DUMMY); }
309duration_time { return sym(yyscanner, PERF_TYPE_SOFTWARE, PERF_COUNT_SW_DUMMY); }
308bpf-output { return sym(yyscanner, PERF_TYPE_SOFTWARE, PERF_COUNT_SW_BPF_OUTPUT); } 310bpf-output { return sym(yyscanner, PERF_TYPE_SOFTWARE, PERF_COUNT_SW_BPF_OUTPUT); }
309 311
310 /* 312 /*
@@ -339,8 +341,8 @@ r{num_raw_hex} { return raw(yyscanner); }
339{num_hex} { return value(yyscanner, 16); } 341{num_hex} { return value(yyscanner, 16); }
340 342
341{modifier_event} { return str(yyscanner, PE_MODIFIER_EVENT); } 343{modifier_event} { return str(yyscanner, PE_MODIFIER_EVENT); }
342{bpf_object} { if (!isbpf(yyscanner)) USER_REJECT; return str(yyscanner, PE_BPF_OBJECT); } 344{bpf_object} { if (!isbpf(yyscanner)) { USER_REJECT }; return str(yyscanner, PE_BPF_OBJECT); }
343{bpf_source} { if (!isbpf(yyscanner)) USER_REJECT; return str(yyscanner, PE_BPF_SOURCE); } 345{bpf_source} { if (!isbpf(yyscanner)) { USER_REJECT }; return str(yyscanner, PE_BPF_SOURCE); }
344{name} { return pmu_str_check(yyscanner); } 346{name} { return pmu_str_check(yyscanner); }
345"/" { BEGIN(config); return '/'; } 347"/" { BEGIN(config); return '/'; }
346- { return '-'; } 348- { return '-'; }
diff --git a/tools/perf/util/path.c b/tools/perf/util/path.c
index 933f5c6bffb4..ca56ba2dd3da 100644
--- a/tools/perf/util/path.c
+++ b/tools/perf/util/path.c
@@ -18,6 +18,7 @@
18#include <stdio.h> 18#include <stdio.h>
19#include <sys/types.h> 19#include <sys/types.h>
20#include <sys/stat.h> 20#include <sys/stat.h>
21#include <dirent.h>
21#include <unistd.h> 22#include <unistd.h>
22 23
23static char bad_path[] = "/bad-path/"; 24static char bad_path[] = "/bad-path/";
@@ -77,3 +78,16 @@ bool is_regular_file(const char *file)
77 78
78 return S_ISREG(st.st_mode); 79 return S_ISREG(st.st_mode);
79} 80}
81
82/* Helper function for filesystems that return a dent->d_type DT_UNKNOWN */
83bool is_directory(const char *base_path, const struct dirent *dent)
84{
85 char path[PATH_MAX];
86 struct stat st;
87
88 sprintf(path, "%s/%s", base_path, dent->d_name);
89 if (stat(path, &st))
90 return false;
91
92 return S_ISDIR(st.st_mode);
93}
diff --git a/tools/perf/util/path.h b/tools/perf/util/path.h
index 14a254ada7eb..f014f905df50 100644
--- a/tools/perf/util/path.h
+++ b/tools/perf/util/path.h
@@ -2,9 +2,12 @@
2#ifndef _PERF_PATH_H 2#ifndef _PERF_PATH_H
3#define _PERF_PATH_H 3#define _PERF_PATH_H
4 4
5struct dirent;
6
5int path__join(char *bf, size_t size, const char *path1, const char *path2); 7int path__join(char *bf, size_t size, const char *path1, const char *path2);
6int path__join3(char *bf, size_t size, const char *path1, const char *path2, const char *path3); 8int path__join3(char *bf, size_t size, const char *path1, const char *path2, const char *path3);
7 9
8bool is_regular_file(const char *file); 10bool is_regular_file(const char *file);
11bool is_directory(const char *base_path, const struct dirent *dent);
9 12
10#endif /* _PERF_PATH_H */ 13#endif /* _PERF_PATH_H */
diff --git a/tools/perf/util/pmu.c b/tools/perf/util/pmu.c
index b10b35a63138..57e38fdf0b34 100644
--- a/tools/perf/util/pmu.c
+++ b/tools/perf/util/pmu.c
@@ -3,6 +3,7 @@
3#include <linux/compiler.h> 3#include <linux/compiler.h>
4#include <sys/types.h> 4#include <sys/types.h>
5#include <errno.h> 5#include <errno.h>
6#include <fcntl.h>
6#include <sys/stat.h> 7#include <sys/stat.h>
7#include <unistd.h> 8#include <unistd.h>
8#include <stdio.h> 9#include <stdio.h>
@@ -11,6 +12,7 @@
11#include <dirent.h> 12#include <dirent.h>
12#include <api/fs/fs.h> 13#include <api/fs/fs.h>
13#include <locale.h> 14#include <locale.h>
15#include <regex.h>
14#include "util.h" 16#include "util.h"
15#include "pmu.h" 17#include "pmu.h"
16#include "parse-events.h" 18#include "parse-events.h"
@@ -404,6 +406,11 @@ static int pmu_alias_terms(struct perf_pmu_alias *alias,
404 parse_events_terms__purge(&list); 406 parse_events_terms__purge(&list);
405 return ret; 407 return ret;
406 } 408 }
409 /*
410 * Weak terms don't override command line options,
411 * which we don't want for implicit terms in aliases.
412 */
413 cloned->weak = true;
407 list_add_tail(&cloned->list, &list); 414 list_add_tail(&cloned->list, &list);
408 } 415 }
409 list_splice(&list, terms); 416 list_splice(&list, terms);
@@ -531,26 +538,46 @@ static bool pmu_is_uncore(const char *name)
531} 538}
532 539
533/* 540/*
541 * PMU CORE devices have different name other than cpu in sysfs on some
542 * platforms. looking for possible sysfs files to identify as core device.
543 */
544static int is_pmu_core(const char *name)
545{
546 struct stat st;
547 char path[PATH_MAX];
548 const char *sysfs = sysfs__mountpoint();
549
550 if (!sysfs)
551 return 0;
552
553 /* Look for cpu sysfs (x86 and others) */
554 scnprintf(path, PATH_MAX, "%s/bus/event_source/devices/cpu", sysfs);
555 if ((stat(path, &st) == 0) &&
556 (strncmp(name, "cpu", strlen("cpu")) == 0))
557 return 1;
558
559 /* Look for cpu sysfs (specific to arm) */
560 scnprintf(path, PATH_MAX, "%s/bus/event_source/devices/%s/cpus",
561 sysfs, name);
562 if (stat(path, &st) == 0)
563 return 1;
564
565 return 0;
566}
567
568/*
534 * Return the CPU id as a raw string. 569 * Return the CPU id as a raw string.
535 * 570 *
536 * Each architecture should provide a more precise id string that 571 * Each architecture should provide a more precise id string that
537 * can be use to match the architecture's "mapfile". 572 * can be use to match the architecture's "mapfile".
538 */ 573 */
539char * __weak get_cpuid_str(void) 574char * __weak get_cpuid_str(struct perf_pmu *pmu __maybe_unused)
540{ 575{
541 return NULL; 576 return NULL;
542} 577}
543 578
544/* 579static char *perf_pmu__getcpuid(struct perf_pmu *pmu)
545 * From the pmu_events_map, find the table of PMU events that corresponds
546 * to the current running CPU. Then, add all PMU events from that table
547 * as aliases.
548 */
549static void pmu_add_cpu_aliases(struct list_head *head, const char *name)
550{ 580{
551 int i;
552 struct pmu_events_map *map;
553 struct pmu_event *pe;
554 char *cpuid; 581 char *cpuid;
555 static bool printed; 582 static bool printed;
556 583
@@ -558,39 +585,97 @@ static void pmu_add_cpu_aliases(struct list_head *head, const char *name)
558 if (cpuid) 585 if (cpuid)
559 cpuid = strdup(cpuid); 586 cpuid = strdup(cpuid);
560 if (!cpuid) 587 if (!cpuid)
561 cpuid = get_cpuid_str(); 588 cpuid = get_cpuid_str(pmu);
562 if (!cpuid) 589 if (!cpuid)
563 return; 590 return NULL;
564 591
565 if (!printed) { 592 if (!printed) {
566 pr_debug("Using CPUID %s\n", cpuid); 593 pr_debug("Using CPUID %s\n", cpuid);
567 printed = true; 594 printed = true;
568 } 595 }
596 return cpuid;
597}
598
599struct pmu_events_map *perf_pmu__find_map(struct perf_pmu *pmu)
600{
601 struct pmu_events_map *map;
602 char *cpuid = perf_pmu__getcpuid(pmu);
603 int i;
604
605 /* on some platforms which uses cpus map, cpuid can be NULL for
606 * PMUs other than CORE PMUs.
607 */
608 if (!cpuid)
609 return NULL;
569 610
570 i = 0; 611 i = 0;
571 while (1) { 612 for (;;) {
613 regex_t re;
614 regmatch_t pmatch[1];
615 int match;
616
572 map = &pmu_events_map[i++]; 617 map = &pmu_events_map[i++];
573 if (!map->table) 618 if (!map->table) {
574 goto out; 619 map = NULL;
620 break;
621 }
575 622
576 if (!strcmp(map->cpuid, cpuid)) 623 if (regcomp(&re, map->cpuid, REG_EXTENDED) != 0) {
624 /* Warn unable to generate match particular string. */
625 pr_info("Invalid regular expression %s\n", map->cpuid);
577 break; 626 break;
627 }
628
629 match = !regexec(&re, cpuid, 1, pmatch, 0);
630 regfree(&re);
631 if (match) {
632 size_t match_len = (pmatch[0].rm_eo - pmatch[0].rm_so);
633
634 /* Verify the entire string matched. */
635 if (match_len == strlen(cpuid))
636 break;
637 }
578 } 638 }
639 free(cpuid);
640 return map;
641}
642
643/*
644 * From the pmu_events_map, find the table of PMU events that corresponds
645 * to the current running CPU. Then, add all PMU events from that table
646 * as aliases.
647 */
648static void pmu_add_cpu_aliases(struct list_head *head, struct perf_pmu *pmu)
649{
650 int i;
651 struct pmu_events_map *map;
652 struct pmu_event *pe;
653 const char *name = pmu->name;
654
655 map = perf_pmu__find_map(pmu);
656 if (!map)
657 return;
579 658
580 /* 659 /*
581 * Found a matching PMU events table. Create aliases 660 * Found a matching PMU events table. Create aliases
582 */ 661 */
583 i = 0; 662 i = 0;
584 while (1) { 663 while (1) {
585 const char *pname;
586 664
587 pe = &map->table[i++]; 665 pe = &map->table[i++];
588 if (!pe->name) 666 if (!pe->name) {
667 if (pe->metric_group || pe->metric_name)
668 continue;
589 break; 669 break;
670 }
590 671
591 pname = pe->pmu ? pe->pmu : "cpu"; 672 if (!is_pmu_core(name)) {
592 if (strncmp(pname, name, strlen(pname))) 673 /* check for uncore devices */
593 continue; 674 if (pe->pmu == NULL)
675 continue;
676 if (strncmp(pe->pmu, name, strlen(pe->pmu)))
677 continue;
678 }
594 679
595 /* need type casts to override 'const' */ 680 /* need type casts to override 'const' */
596 __perf_pmu__new_alias(head, NULL, (char *)pe->name, 681 __perf_pmu__new_alias(head, NULL, (char *)pe->name,
@@ -600,9 +685,6 @@ static void pmu_add_cpu_aliases(struct list_head *head, const char *name)
600 (char *)pe->metric_expr, 685 (char *)pe->metric_expr,
601 (char *)pe->metric_name); 686 (char *)pe->metric_name);
602 } 687 }
603
604out:
605 free(cpuid);
606} 688}
607 689
608struct perf_event_attr * __weak 690struct perf_event_attr * __weak
@@ -635,21 +717,20 @@ static struct perf_pmu *pmu_lookup(const char *name)
635 if (pmu_aliases(name, &aliases)) 717 if (pmu_aliases(name, &aliases))
636 return NULL; 718 return NULL;
637 719
638 pmu_add_cpu_aliases(&aliases, name);
639 pmu = zalloc(sizeof(*pmu)); 720 pmu = zalloc(sizeof(*pmu));
640 if (!pmu) 721 if (!pmu)
641 return NULL; 722 return NULL;
642 723
643 pmu->cpus = pmu_cpumask(name); 724 pmu->cpus = pmu_cpumask(name);
644 725 pmu->name = strdup(name);
726 pmu->type = type;
645 pmu->is_uncore = pmu_is_uncore(name); 727 pmu->is_uncore = pmu_is_uncore(name);
728 pmu_add_cpu_aliases(&aliases, pmu);
646 729
647 INIT_LIST_HEAD(&pmu->format); 730 INIT_LIST_HEAD(&pmu->format);
648 INIT_LIST_HEAD(&pmu->aliases); 731 INIT_LIST_HEAD(&pmu->aliases);
649 list_splice(&format, &pmu->format); 732 list_splice(&format, &pmu->format);
650 list_splice(&aliases, &pmu->aliases); 733 list_splice(&aliases, &pmu->aliases);
651 pmu->name = strdup(name);
652 pmu->type = type;
653 list_add_tail(&pmu->list, &pmus); 734 list_add_tail(&pmu->list, &pmus);
654 735
655 pmu->default_config = perf_pmu__get_default_config(pmu); 736 pmu->default_config = perf_pmu__get_default_config(pmu);
diff --git a/tools/perf/util/pmu.h b/tools/perf/util/pmu.h
index eca99435f4a0..76fecec7b3f9 100644
--- a/tools/perf/util/pmu.h
+++ b/tools/perf/util/pmu.h
@@ -92,4 +92,6 @@ int perf_pmu__test(void);
92 92
93struct perf_event_attr *perf_pmu__get_default_config(struct perf_pmu *pmu); 93struct perf_event_attr *perf_pmu__get_default_config(struct perf_pmu *pmu);
94 94
95struct pmu_events_map *perf_pmu__find_map(struct perf_pmu *pmu);
96
95#endif /* __PMU_H */ 97#endif /* __PMU_H */
diff --git a/tools/perf/util/print_binary.c b/tools/perf/util/print_binary.c
index 779e35c9e566..23e367063446 100644
--- a/tools/perf/util/print_binary.c
+++ b/tools/perf/util/print_binary.c
@@ -3,40 +3,42 @@
3#include <linux/log2.h> 3#include <linux/log2.h>
4#include "sane_ctype.h" 4#include "sane_ctype.h"
5 5
6void print_binary(unsigned char *data, size_t len, 6int binary__fprintf(unsigned char *data, size_t len,
7 size_t bytes_per_line, print_binary_t printer, 7 size_t bytes_per_line, binary__fprintf_t printer,
8 void *extra) 8 void *extra, FILE *fp)
9{ 9{
10 size_t i, j, mask; 10 size_t i, j, mask;
11 int printed = 0;
11 12
12 if (!printer) 13 if (!printer)
13 return; 14 return 0;
14 15
15 bytes_per_line = roundup_pow_of_two(bytes_per_line); 16 bytes_per_line = roundup_pow_of_two(bytes_per_line);
16 mask = bytes_per_line - 1; 17 mask = bytes_per_line - 1;
17 18
18 printer(BINARY_PRINT_DATA_BEGIN, 0, extra); 19 printed += printer(BINARY_PRINT_DATA_BEGIN, 0, extra, fp);
19 for (i = 0; i < len; i++) { 20 for (i = 0; i < len; i++) {
20 if ((i & mask) == 0) { 21 if ((i & mask) == 0) {
21 printer(BINARY_PRINT_LINE_BEGIN, -1, extra); 22 printed += printer(BINARY_PRINT_LINE_BEGIN, -1, extra, fp);
22 printer(BINARY_PRINT_ADDR, i, extra); 23 printed += printer(BINARY_PRINT_ADDR, i, extra, fp);
23 } 24 }
24 25
25 printer(BINARY_PRINT_NUM_DATA, data[i], extra); 26 printed += printer(BINARY_PRINT_NUM_DATA, data[i], extra, fp);
26 27
27 if (((i & mask) == mask) || i == len - 1) { 28 if (((i & mask) == mask) || i == len - 1) {
28 for (j = 0; j < mask-(i & mask); j++) 29 for (j = 0; j < mask-(i & mask); j++)
29 printer(BINARY_PRINT_NUM_PAD, -1, extra); 30 printed += printer(BINARY_PRINT_NUM_PAD, -1, extra, fp);
30 31
31 printer(BINARY_PRINT_SEP, i, extra); 32 printer(BINARY_PRINT_SEP, i, extra, fp);
32 for (j = i & ~mask; j <= i; j++) 33 for (j = i & ~mask; j <= i; j++)
33 printer(BINARY_PRINT_CHAR_DATA, data[j], extra); 34 printed += printer(BINARY_PRINT_CHAR_DATA, data[j], extra, fp);
34 for (j = 0; j < mask-(i & mask); j++) 35 for (j = 0; j < mask-(i & mask); j++)
35 printer(BINARY_PRINT_CHAR_PAD, i, extra); 36 printed += printer(BINARY_PRINT_CHAR_PAD, i, extra, fp);
36 printer(BINARY_PRINT_LINE_END, -1, extra); 37 printed += printer(BINARY_PRINT_LINE_END, -1, extra, fp);
37 } 38 }
38 } 39 }
39 printer(BINARY_PRINT_DATA_END, -1, extra); 40 printed += printer(BINARY_PRINT_DATA_END, -1, extra, fp);
41 return printed;
40} 42}
41 43
42int is_printable_array(char *p, unsigned int len) 44int is_printable_array(char *p, unsigned int len)
diff --git a/tools/perf/util/print_binary.h b/tools/perf/util/print_binary.h
index 2be3075e2b05..2a1554afc957 100644
--- a/tools/perf/util/print_binary.h
+++ b/tools/perf/util/print_binary.h
@@ -3,6 +3,7 @@
3#define PERF_PRINT_BINARY_H 3#define PERF_PRINT_BINARY_H
4 4
5#include <stddef.h> 5#include <stddef.h>
6#include <stdio.h>
6 7
7enum binary_printer_ops { 8enum binary_printer_ops {
8 BINARY_PRINT_DATA_BEGIN, 9 BINARY_PRINT_DATA_BEGIN,
@@ -17,12 +18,19 @@ enum binary_printer_ops {
17 BINARY_PRINT_DATA_END, 18 BINARY_PRINT_DATA_END,
18}; 19};
19 20
20typedef void (*print_binary_t)(enum binary_printer_ops op, 21typedef int (*binary__fprintf_t)(enum binary_printer_ops op,
21 unsigned int val, void *extra); 22 unsigned int val, void *extra, FILE *fp);
22 23
23void print_binary(unsigned char *data, size_t len, 24int binary__fprintf(unsigned char *data, size_t len,
24 size_t bytes_per_line, print_binary_t printer, 25 size_t bytes_per_line, binary__fprintf_t printer,
25 void *extra); 26 void *extra, FILE *fp);
27
28static inline void print_binary(unsigned char *data, size_t len,
29 size_t bytes_per_line, binary__fprintf_t printer,
30 void *extra)
31{
32 binary__fprintf(data, len, bytes_per_line, printer, extra, stdout);
33}
26 34
27int is_printable_array(char *p, unsigned int len); 35int is_printable_array(char *p, unsigned int len);
28 36
diff --git a/tools/perf/util/probe-event.c b/tools/perf/util/probe-event.c
index b7aaf9b2294d..e1dbc9821617 100644
--- a/tools/perf/util/probe-event.c
+++ b/tools/perf/util/probe-event.c
@@ -1325,27 +1325,30 @@ static int parse_perf_probe_event_name(char **arg, struct perf_probe_event *pev)
1325{ 1325{
1326 char *ptr; 1326 char *ptr;
1327 1327
1328 ptr = strchr(*arg, ':'); 1328 ptr = strpbrk_esc(*arg, ":");
1329 if (ptr) { 1329 if (ptr) {
1330 *ptr = '\0'; 1330 *ptr = '\0';
1331 if (!pev->sdt && !is_c_func_name(*arg)) 1331 if (!pev->sdt && !is_c_func_name(*arg))
1332 goto ng_name; 1332 goto ng_name;
1333 pev->group = strdup(*arg); 1333 pev->group = strdup_esc(*arg);
1334 if (!pev->group) 1334 if (!pev->group)
1335 return -ENOMEM; 1335 return -ENOMEM;
1336 *arg = ptr + 1; 1336 *arg = ptr + 1;
1337 } else 1337 } else
1338 pev->group = NULL; 1338 pev->group = NULL;
1339 if (!pev->sdt && !is_c_func_name(*arg)) { 1339
1340 pev->event = strdup_esc(*arg);
1341 if (pev->event == NULL)
1342 return -ENOMEM;
1343
1344 if (!pev->sdt && !is_c_func_name(pev->event)) {
1345 zfree(&pev->event);
1340ng_name: 1346ng_name:
1347 zfree(&pev->group);
1341 semantic_error("%s is bad for event name -it must " 1348 semantic_error("%s is bad for event name -it must "
1342 "follow C symbol-naming rule.\n", *arg); 1349 "follow C symbol-naming rule.\n", *arg);
1343 return -EINVAL; 1350 return -EINVAL;
1344 } 1351 }
1345 pev->event = strdup(*arg);
1346 if (pev->event == NULL)
1347 return -ENOMEM;
1348
1349 return 0; 1352 return 0;
1350} 1353}
1351 1354
@@ -1373,7 +1376,7 @@ static int parse_perf_probe_point(char *arg, struct perf_probe_event *pev)
1373 arg++; 1376 arg++;
1374 } 1377 }
1375 1378
1376 ptr = strpbrk(arg, ";=@+%"); 1379 ptr = strpbrk_esc(arg, ";=@+%");
1377 if (pev->sdt) { 1380 if (pev->sdt) {
1378 if (ptr) { 1381 if (ptr) {
1379 if (*ptr != '@') { 1382 if (*ptr != '@') {
@@ -1387,7 +1390,7 @@ static int parse_perf_probe_point(char *arg, struct perf_probe_event *pev)
1387 pev->target = build_id_cache__origname(tmp); 1390 pev->target = build_id_cache__origname(tmp);
1388 free(tmp); 1391 free(tmp);
1389 } else 1392 } else
1390 pev->target = strdup(ptr + 1); 1393 pev->target = strdup_esc(ptr + 1);
1391 if (!pev->target) 1394 if (!pev->target)
1392 return -ENOMEM; 1395 return -ENOMEM;
1393 *ptr = '\0'; 1396 *ptr = '\0';
@@ -1421,13 +1424,14 @@ static int parse_perf_probe_point(char *arg, struct perf_probe_event *pev)
1421 * 1424 *
1422 * Otherwise, we consider arg to be a function specification. 1425 * Otherwise, we consider arg to be a function specification.
1423 */ 1426 */
1424 if (!strpbrk(arg, "+@%") && (ptr = strpbrk(arg, ";:")) != NULL) { 1427 if (!strpbrk_esc(arg, "+@%")) {
1428 ptr = strpbrk_esc(arg, ";:");
1425 /* This is a file spec if it includes a '.' before ; or : */ 1429 /* This is a file spec if it includes a '.' before ; or : */
1426 if (memchr(arg, '.', ptr - arg)) 1430 if (ptr && memchr(arg, '.', ptr - arg))
1427 file_spec = true; 1431 file_spec = true;
1428 } 1432 }
1429 1433
1430 ptr = strpbrk(arg, ";:+@%"); 1434 ptr = strpbrk_esc(arg, ";:+@%");
1431 if (ptr) { 1435 if (ptr) {
1432 nc = *ptr; 1436 nc = *ptr;
1433 *ptr++ = '\0'; 1437 *ptr++ = '\0';
@@ -1436,7 +1440,7 @@ static int parse_perf_probe_point(char *arg, struct perf_probe_event *pev)
1436 if (arg[0] == '\0') 1440 if (arg[0] == '\0')
1437 tmp = NULL; 1441 tmp = NULL;
1438 else { 1442 else {
1439 tmp = strdup(arg); 1443 tmp = strdup_esc(arg);
1440 if (tmp == NULL) 1444 if (tmp == NULL)
1441 return -ENOMEM; 1445 return -ENOMEM;
1442 } 1446 }
@@ -1469,12 +1473,12 @@ static int parse_perf_probe_point(char *arg, struct perf_probe_event *pev)
1469 arg = ptr; 1473 arg = ptr;
1470 c = nc; 1474 c = nc;
1471 if (c == ';') { /* Lazy pattern must be the last part */ 1475 if (c == ';') { /* Lazy pattern must be the last part */
1472 pp->lazy_line = strdup(arg); 1476 pp->lazy_line = strdup(arg); /* let leave escapes */
1473 if (pp->lazy_line == NULL) 1477 if (pp->lazy_line == NULL)
1474 return -ENOMEM; 1478 return -ENOMEM;
1475 break; 1479 break;
1476 } 1480 }
1477 ptr = strpbrk(arg, ";:+@%"); 1481 ptr = strpbrk_esc(arg, ";:+@%");
1478 if (ptr) { 1482 if (ptr) {
1479 nc = *ptr; 1483 nc = *ptr;
1480 *ptr++ = '\0'; 1484 *ptr++ = '\0';
@@ -1501,7 +1505,7 @@ static int parse_perf_probe_point(char *arg, struct perf_probe_event *pev)
1501 semantic_error("SRC@SRC is not allowed.\n"); 1505 semantic_error("SRC@SRC is not allowed.\n");
1502 return -EINVAL; 1506 return -EINVAL;
1503 } 1507 }
1504 pp->file = strdup(arg); 1508 pp->file = strdup_esc(arg);
1505 if (pp->file == NULL) 1509 if (pp->file == NULL)
1506 return -ENOMEM; 1510 return -ENOMEM;
1507 break; 1511 break;
@@ -2573,7 +2577,8 @@ int show_perf_probe_events(struct strfilter *filter)
2573} 2577}
2574 2578
2575static int get_new_event_name(char *buf, size_t len, const char *base, 2579static int get_new_event_name(char *buf, size_t len, const char *base,
2576 struct strlist *namelist, bool allow_suffix) 2580 struct strlist *namelist, bool ret_event,
2581 bool allow_suffix)
2577{ 2582{
2578 int i, ret; 2583 int i, ret;
2579 char *p, *nbase; 2584 char *p, *nbase;
@@ -2584,13 +2589,13 @@ static int get_new_event_name(char *buf, size_t len, const char *base,
2584 if (!nbase) 2589 if (!nbase)
2585 return -ENOMEM; 2590 return -ENOMEM;
2586 2591
2587 /* Cut off the dot suffixes (e.g. .const, .isra)*/ 2592 /* Cut off the dot suffixes (e.g. .const, .isra) and version suffixes */
2588 p = strchr(nbase, '.'); 2593 p = strpbrk(nbase, ".@");
2589 if (p && p != nbase) 2594 if (p && p != nbase)
2590 *p = '\0'; 2595 *p = '\0';
2591 2596
2592 /* Try no suffix number */ 2597 /* Try no suffix number */
2593 ret = e_snprintf(buf, len, "%s", nbase); 2598 ret = e_snprintf(buf, len, "%s%s", nbase, ret_event ? "__return" : "");
2594 if (ret < 0) { 2599 if (ret < 0) {
2595 pr_debug("snprintf() failed: %d\n", ret); 2600 pr_debug("snprintf() failed: %d\n", ret);
2596 goto out; 2601 goto out;
@@ -2625,6 +2630,14 @@ static int get_new_event_name(char *buf, size_t len, const char *base,
2625 2630
2626out: 2631out:
2627 free(nbase); 2632 free(nbase);
2633
2634 /* Final validation */
2635 if (ret >= 0 && !is_c_func_name(buf)) {
2636 pr_warning("Internal error: \"%s\" is an invalid event name.\n",
2637 buf);
2638 ret = -EINVAL;
2639 }
2640
2628 return ret; 2641 return ret;
2629} 2642}
2630 2643
@@ -2681,8 +2694,8 @@ static int probe_trace_event__set_name(struct probe_trace_event *tev,
2681 group = PERFPROBE_GROUP; 2694 group = PERFPROBE_GROUP;
2682 2695
2683 /* Get an unused new event name */ 2696 /* Get an unused new event name */
2684 ret = get_new_event_name(buf, 64, event, 2697 ret = get_new_event_name(buf, 64, event, namelist,
2685 namelist, allow_suffix); 2698 tev->point.retprobe, allow_suffix);
2686 if (ret < 0) 2699 if (ret < 0)
2687 return ret; 2700 return ret;
2688 2701
@@ -2792,16 +2805,40 @@ static int find_probe_functions(struct map *map, char *name,
2792 int found = 0; 2805 int found = 0;
2793 struct symbol *sym; 2806 struct symbol *sym;
2794 struct rb_node *tmp; 2807 struct rb_node *tmp;
2808 const char *norm, *ver;
2809 char *buf = NULL;
2810 bool cut_version = true;
2795 2811
2796 if (map__load(map) < 0) 2812 if (map__load(map) < 0)
2797 return 0; 2813 return 0;
2798 2814
2815 /* If user gives a version, don't cut off the version from symbols */
2816 if (strchr(name, '@'))
2817 cut_version = false;
2818
2799 map__for_each_symbol(map, sym, tmp) { 2819 map__for_each_symbol(map, sym, tmp) {
2800 if (strglobmatch(sym->name, name)) { 2820 norm = arch__normalize_symbol_name(sym->name);
2821 if (!norm)
2822 continue;
2823
2824 if (cut_version) {
2825 /* We don't care about default symbol or not */
2826 ver = strchr(norm, '@');
2827 if (ver) {
2828 buf = strndup(norm, ver - norm);
2829 if (!buf)
2830 return -ENOMEM;
2831 norm = buf;
2832 }
2833 }
2834
2835 if (strglobmatch(norm, name)) {
2801 found++; 2836 found++;
2802 if (syms && found < probe_conf.max_probes) 2837 if (syms && found < probe_conf.max_probes)
2803 syms[found - 1] = sym; 2838 syms[found - 1] = sym;
2804 } 2839 }
2840 if (buf)
2841 zfree(&buf);
2805 } 2842 }
2806 2843
2807 return found; 2844 return found;
@@ -2847,7 +2884,7 @@ static int find_probe_trace_events_from_map(struct perf_probe_event *pev,
2847 * same name but different addresses, this lists all the symbols. 2884 * same name but different addresses, this lists all the symbols.
2848 */ 2885 */
2849 num_matched_functions = find_probe_functions(map, pp->function, syms); 2886 num_matched_functions = find_probe_functions(map, pp->function, syms);
2850 if (num_matched_functions == 0) { 2887 if (num_matched_functions <= 0) {
2851 pr_err("Failed to find symbol %s in %s\n", pp->function, 2888 pr_err("Failed to find symbol %s in %s\n", pp->function,
2852 pev->target ? : "kernel"); 2889 pev->target ? : "kernel");
2853 ret = -ENOENT; 2890 ret = -ENOENT;
diff --git a/tools/perf/util/probe-file.c b/tools/perf/util/probe-file.c
index cdf8d83a484c..4ae1123c6794 100644
--- a/tools/perf/util/probe-file.c
+++ b/tools/perf/util/probe-file.c
@@ -15,6 +15,7 @@
15 * 15 *
16 */ 16 */
17#include <errno.h> 17#include <errno.h>
18#include <fcntl.h>
18#include <sys/stat.h> 19#include <sys/stat.h>
19#include <sys/types.h> 20#include <sys/types.h>
20#include <sys/uio.h> 21#include <sys/uio.h>
diff --git a/tools/perf/util/python-ext-sources b/tools/perf/util/python-ext-sources
index e66dc495809a..7aa0ea64544e 100644
--- a/tools/perf/util/python-ext-sources
+++ b/tools/perf/util/python-ext-sources
@@ -10,6 +10,8 @@ util/ctype.c
10util/evlist.c 10util/evlist.c
11util/evsel.c 11util/evsel.c
12util/cpumap.c 12util/cpumap.c
13util/memswap.c
14util/mmap.c
13util/namespaces.c 15util/namespaces.c
14../lib/bitmap.c 16../lib/bitmap.c
15../lib/find_bit.c 17../lib/find_bit.c
diff --git a/tools/perf/util/python.c b/tools/perf/util/python.c
index 8e49d9cafcfc..b1e999bd21ef 100644
--- a/tools/perf/util/python.c
+++ b/tools/perf/util/python.c
@@ -864,7 +864,7 @@ static PyObject *pyrf_evlist__mmap(struct pyrf_evlist *pevlist,
864 &pages, &overwrite)) 864 &pages, &overwrite))
865 return NULL; 865 return NULL;
866 866
867 if (perf_evlist__mmap(evlist, pages, overwrite) < 0) { 867 if (perf_evlist__mmap(evlist, pages) < 0) {
868 PyErr_SetFromErrno(PyExc_OSError); 868 PyErr_SetFromErrno(PyExc_OSError);
869 return NULL; 869 return NULL;
870 } 870 }
diff --git a/tools/perf/util/rb_resort.h b/tools/perf/util/rb_resort.h
index 7d8972b33f6b..a920f702a74d 100644
--- a/tools/perf/util/rb_resort.h
+++ b/tools/perf/util/rb_resort.h
@@ -144,7 +144,8 @@ struct __name##_sorted *__name = __name##_sorted__new
144 __ilist->rblist.nr_entries) 144 __ilist->rblist.nr_entries)
145 145
146/* For 'struct machine->threads' */ 146/* For 'struct machine->threads' */
147#define DECLARE_RESORT_RB_MACHINE_THREADS(__name, __machine) \ 147#define DECLARE_RESORT_RB_MACHINE_THREADS(__name, __machine, hash_bucket) \
148 DECLARE_RESORT_RB(__name)(&__machine->threads, __machine->nr_threads) 148 DECLARE_RESORT_RB(__name)(&__machine->threads[hash_bucket].entries, \
149 __machine->threads[hash_bucket].nr)
149 150
150#endif /* _PERF_RESORT_RB_H_ */ 151#endif /* _PERF_RESORT_RB_H_ */
diff --git a/tools/perf/util/rblist.c b/tools/perf/util/rblist.c
index 0dfe27d99458..0efc3258c648 100644
--- a/tools/perf/util/rblist.c
+++ b/tools/perf/util/rblist.c
@@ -101,16 +101,21 @@ void rblist__init(struct rblist *rblist)
101 return; 101 return;
102} 102}
103 103
104void rblist__exit(struct rblist *rblist)
105{
106 struct rb_node *pos, *next = rb_first(&rblist->entries);
107
108 while (next) {
109 pos = next;
110 next = rb_next(pos);
111 rblist__remove_node(rblist, pos);
112 }
113}
114
104void rblist__delete(struct rblist *rblist) 115void rblist__delete(struct rblist *rblist)
105{ 116{
106 if (rblist != NULL) { 117 if (rblist != NULL) {
107 struct rb_node *pos, *next = rb_first(&rblist->entries); 118 rblist__exit(rblist);
108
109 while (next) {
110 pos = next;
111 next = rb_next(pos);
112 rblist__remove_node(rblist, pos);
113 }
114 free(rblist); 119 free(rblist);
115 } 120 }
116} 121}
diff --git a/tools/perf/util/rblist.h b/tools/perf/util/rblist.h
index 4c8638a22571..76df15c27f5f 100644
--- a/tools/perf/util/rblist.h
+++ b/tools/perf/util/rblist.h
@@ -29,6 +29,7 @@ struct rblist {
29}; 29};
30 30
31void rblist__init(struct rblist *rblist); 31void rblist__init(struct rblist *rblist);
32void rblist__exit(struct rblist *rblist);
32void rblist__delete(struct rblist *rblist); 33void rblist__delete(struct rblist *rblist);
33int rblist__add_node(struct rblist *rblist, const void *new_entry); 34int rblist__add_node(struct rblist *rblist, const void *new_entry);
34void rblist__remove_node(struct rblist *rblist, struct rb_node *rb_node); 35void rblist__remove_node(struct rblist *rblist, struct rb_node *rb_node);
diff --git a/tools/perf/util/rwsem.c b/tools/perf/util/rwsem.c
new file mode 100644
index 000000000000..5e52e7baa7b6
--- /dev/null
+++ b/tools/perf/util/rwsem.c
@@ -0,0 +1,32 @@
1#include "util.h"
2#include "rwsem.h"
3
4int init_rwsem(struct rw_semaphore *sem)
5{
6 return pthread_rwlock_init(&sem->lock, NULL);
7}
8
9int exit_rwsem(struct rw_semaphore *sem)
10{
11 return pthread_rwlock_destroy(&sem->lock);
12}
13
14int down_read(struct rw_semaphore *sem)
15{
16 return perf_singlethreaded ? 0 : pthread_rwlock_rdlock(&sem->lock);
17}
18
19int up_read(struct rw_semaphore *sem)
20{
21 return perf_singlethreaded ? 0 : pthread_rwlock_unlock(&sem->lock);
22}
23
24int down_write(struct rw_semaphore *sem)
25{
26 return perf_singlethreaded ? 0 : pthread_rwlock_wrlock(&sem->lock);
27}
28
29int up_write(struct rw_semaphore *sem)
30{
31 return perf_singlethreaded ? 0 : pthread_rwlock_unlock(&sem->lock);
32}
diff --git a/tools/perf/util/rwsem.h b/tools/perf/util/rwsem.h
new file mode 100644
index 000000000000..94565ad4d494
--- /dev/null
+++ b/tools/perf/util/rwsem.h
@@ -0,0 +1,19 @@
1#ifndef _PERF_RWSEM_H
2#define _PERF_RWSEM_H
3
4#include <pthread.h>
5
6struct rw_semaphore {
7 pthread_rwlock_t lock;
8};
9
10int init_rwsem(struct rw_semaphore *sem);
11int exit_rwsem(struct rw_semaphore *sem);
12
13int down_read(struct rw_semaphore *sem);
14int up_read(struct rw_semaphore *sem);
15
16int down_write(struct rw_semaphore *sem);
17int up_write(struct rw_semaphore *sem);
18
19#endif /* _PERF_RWSEM_H */
diff --git a/tools/perf/util/scripting-engines/trace-event-python.c b/tools/perf/util/scripting-engines/trace-event-python.c
index c7187f067d31..ea070883c593 100644
--- a/tools/perf/util/scripting-engines/trace-event-python.c
+++ b/tools/perf/util/scripting-engines/trace-event-python.c
@@ -43,7 +43,6 @@
43#include "../db-export.h" 43#include "../db-export.h"
44#include "../thread-stack.h" 44#include "../thread-stack.h"
45#include "../trace-event.h" 45#include "../trace-event.h"
46#include "../machine.h"
47#include "../call-path.h" 46#include "../call-path.h"
48#include "thread_map.h" 47#include "thread_map.h"
49#include "cpumap.h" 48#include "cpumap.h"
@@ -500,6 +499,8 @@ static PyObject *get_perf_sample_dict(struct perf_sample *sample,
500 PyLong_FromUnsignedLongLong(sample->time)); 499 PyLong_FromUnsignedLongLong(sample->time));
501 pydict_set_item_string_decref(dict_sample, "period", 500 pydict_set_item_string_decref(dict_sample, "period",
502 PyLong_FromUnsignedLongLong(sample->period)); 501 PyLong_FromUnsignedLongLong(sample->period));
502 pydict_set_item_string_decref(dict_sample, "phys_addr",
503 PyLong_FromUnsignedLongLong(sample->phys_addr));
503 set_sample_read_in_dict(dict_sample, sample, evsel); 504 set_sample_read_in_dict(dict_sample, sample, evsel);
504 pydict_set_item_string_decref(dict, "sample", dict_sample); 505 pydict_set_item_string_decref(dict, "sample", dict_sample);
505 506
diff --git a/tools/perf/util/session.c b/tools/perf/util/session.c
index da55081aefc6..c71ced7db152 100644
--- a/tools/perf/util/session.c
+++ b/tools/perf/util/session.c
@@ -27,20 +27,19 @@
27 27
28static int perf_session__deliver_event(struct perf_session *session, 28static int perf_session__deliver_event(struct perf_session *session,
29 union perf_event *event, 29 union perf_event *event,
30 struct perf_sample *sample,
31 struct perf_tool *tool, 30 struct perf_tool *tool,
32 u64 file_offset); 31 u64 file_offset);
33 32
34static int perf_session__open(struct perf_session *session) 33static int perf_session__open(struct perf_session *session)
35{ 34{
36 struct perf_data_file *file = session->file; 35 struct perf_data *data = session->data;
37 36
38 if (perf_session__read_header(session) < 0) { 37 if (perf_session__read_header(session) < 0) {
39 pr_err("incompatible file format (rerun with -v to learn more)\n"); 38 pr_err("incompatible file format (rerun with -v to learn more)\n");
40 return -1; 39 return -1;
41 } 40 }
42 41
43 if (perf_data_file__is_pipe(file)) 42 if (perf_data__is_pipe(data))
44 return 0; 43 return 0;
45 44
46 if (perf_header__has_feat(&session->header, HEADER_STAT)) 45 if (perf_header__has_feat(&session->header, HEADER_STAT))
@@ -107,21 +106,14 @@ static void perf_session__set_comm_exec(struct perf_session *session)
107static int ordered_events__deliver_event(struct ordered_events *oe, 106static int ordered_events__deliver_event(struct ordered_events *oe,
108 struct ordered_event *event) 107 struct ordered_event *event)
109{ 108{
110 struct perf_sample sample;
111 struct perf_session *session = container_of(oe, struct perf_session, 109 struct perf_session *session = container_of(oe, struct perf_session,
112 ordered_events); 110 ordered_events);
113 int ret = perf_evlist__parse_sample(session->evlist, event->event, &sample);
114
115 if (ret) {
116 pr_err("Can't parse sample, err = %d\n", ret);
117 return ret;
118 }
119 111
120 return perf_session__deliver_event(session, event->event, &sample, 112 return perf_session__deliver_event(session, event->event,
121 session->tool, event->file_offset); 113 session->tool, event->file_offset);
122} 114}
123 115
124struct perf_session *perf_session__new(struct perf_data_file *file, 116struct perf_session *perf_session__new(struct perf_data *data,
125 bool repipe, struct perf_tool *tool) 117 bool repipe, struct perf_tool *tool)
126{ 118{
127 struct perf_session *session = zalloc(sizeof(*session)); 119 struct perf_session *session = zalloc(sizeof(*session));
@@ -135,13 +127,13 @@ struct perf_session *perf_session__new(struct perf_data_file *file,
135 machines__init(&session->machines); 127 machines__init(&session->machines);
136 ordered_events__init(&session->ordered_events, ordered_events__deliver_event); 128 ordered_events__init(&session->ordered_events, ordered_events__deliver_event);
137 129
138 if (file) { 130 if (data) {
139 if (perf_data_file__open(file)) 131 if (perf_data__open(data))
140 goto out_delete; 132 goto out_delete;
141 133
142 session->file = file; 134 session->data = data;
143 135
144 if (perf_data_file__is_read(file)) { 136 if (perf_data__is_read(data)) {
145 if (perf_session__open(session) < 0) 137 if (perf_session__open(session) < 0)
146 goto out_close; 138 goto out_close;
147 139
@@ -149,7 +141,7 @@ struct perf_session *perf_session__new(struct perf_data_file *file,
149 * set session attributes that are present in perf.data 141 * set session attributes that are present in perf.data
150 * but not in pipe-mode. 142 * but not in pipe-mode.
151 */ 143 */
152 if (!file->is_pipe) { 144 if (!data->is_pipe) {
153 perf_session__set_id_hdr_size(session); 145 perf_session__set_id_hdr_size(session);
154 perf_session__set_comm_exec(session); 146 perf_session__set_comm_exec(session);
155 } 147 }
@@ -158,7 +150,7 @@ struct perf_session *perf_session__new(struct perf_data_file *file,
158 session->machines.host.env = &perf_env; 150 session->machines.host.env = &perf_env;
159 } 151 }
160 152
161 if (!file || perf_data_file__is_write(file)) { 153 if (!data || perf_data__is_write(data)) {
162 /* 154 /*
163 * In O_RDONLY mode this will be performed when reading the 155 * In O_RDONLY mode this will be performed when reading the
164 * kernel MMAP event, in perf_event__process_mmap(). 156 * kernel MMAP event, in perf_event__process_mmap().
@@ -171,7 +163,7 @@ struct perf_session *perf_session__new(struct perf_data_file *file,
171 * In pipe-mode, evlist is empty until PERF_RECORD_HEADER_ATTR is 163 * In pipe-mode, evlist is empty until PERF_RECORD_HEADER_ATTR is
172 * processed, so perf_evlist__sample_id_all is not meaningful here. 164 * processed, so perf_evlist__sample_id_all is not meaningful here.
173 */ 165 */
174 if ((!file || !file->is_pipe) && tool && tool->ordering_requires_timestamps && 166 if ((!data || !data->is_pipe) && tool && tool->ordering_requires_timestamps &&
175 tool->ordered_events && !perf_evlist__sample_id_all(session->evlist)) { 167 tool->ordered_events && !perf_evlist__sample_id_all(session->evlist)) {
176 dump_printf("WARNING: No sample_id_all support, falling back to unordered processing\n"); 168 dump_printf("WARNING: No sample_id_all support, falling back to unordered processing\n");
177 tool->ordered_events = false; 169 tool->ordered_events = false;
@@ -180,7 +172,7 @@ struct perf_session *perf_session__new(struct perf_data_file *file,
180 return session; 172 return session;
181 173
182 out_close: 174 out_close:
183 perf_data_file__close(file); 175 perf_data__close(data);
184 out_delete: 176 out_delete:
185 perf_session__delete(session); 177 perf_session__delete(session);
186 out: 178 out:
@@ -202,8 +194,8 @@ void perf_session__delete(struct perf_session *session)
202 perf_session__delete_threads(session); 194 perf_session__delete_threads(session);
203 perf_env__exit(&session->header.env); 195 perf_env__exit(&session->header.env);
204 machines__exit(&session->machines); 196 machines__exit(&session->machines);
205 if (session->file) 197 if (session->data)
206 perf_data_file__close(session->file); 198 perf_data__close(session->data);
207 free(session); 199 free(session);
208} 200}
209 201
@@ -291,8 +283,8 @@ static s64 process_event_auxtrace_stub(struct perf_tool *tool __maybe_unused,
291 __maybe_unused) 283 __maybe_unused)
292{ 284{
293 dump_printf(": unhandled!\n"); 285 dump_printf(": unhandled!\n");
294 if (perf_data_file__is_pipe(session->file)) 286 if (perf_data__is_pipe(session->data))
295 skipn(perf_data_file__fd(session->file), event->auxtrace.size); 287 skipn(perf_data__fd(session->data), event->auxtrace.size);
296 return event->auxtrace.size; 288 return event->auxtrace.size;
297} 289}
298 290
@@ -873,9 +865,9 @@ static int process_finished_round(struct perf_tool *tool __maybe_unused,
873} 865}
874 866
875int perf_session__queue_event(struct perf_session *s, union perf_event *event, 867int perf_session__queue_event(struct perf_session *s, union perf_event *event,
876 struct perf_sample *sample, u64 file_offset) 868 u64 timestamp, u64 file_offset)
877{ 869{
878 return ordered_events__queue(&s->ordered_events, event, sample, file_offset); 870 return ordered_events__queue(&s->ordered_events, event, timestamp, file_offset);
879} 871}
880 872
881static void callchain__lbr_callstack_printf(struct perf_sample *sample) 873static void callchain__lbr_callstack_printf(struct perf_sample *sample)
@@ -1328,20 +1320,26 @@ static int machines__deliver_event(struct machines *machines,
1328 1320
1329static int perf_session__deliver_event(struct perf_session *session, 1321static int perf_session__deliver_event(struct perf_session *session,
1330 union perf_event *event, 1322 union perf_event *event,
1331 struct perf_sample *sample,
1332 struct perf_tool *tool, 1323 struct perf_tool *tool,
1333 u64 file_offset) 1324 u64 file_offset)
1334{ 1325{
1326 struct perf_sample sample;
1335 int ret; 1327 int ret;
1336 1328
1337 ret = auxtrace__process_event(session, event, sample, tool); 1329 ret = perf_evlist__parse_sample(session->evlist, event, &sample);
1330 if (ret) {
1331 pr_err("Can't parse sample, err = %d\n", ret);
1332 return ret;
1333 }
1334
1335 ret = auxtrace__process_event(session, event, &sample, tool);
1338 if (ret < 0) 1336 if (ret < 0)
1339 return ret; 1337 return ret;
1340 if (ret > 0) 1338 if (ret > 0)
1341 return 0; 1339 return 0;
1342 1340
1343 return machines__deliver_event(&session->machines, session->evlist, 1341 return machines__deliver_event(&session->machines, session->evlist,
1344 event, sample, tool, file_offset); 1342 event, &sample, tool, file_offset);
1345} 1343}
1346 1344
1347static s64 perf_session__process_user_event(struct perf_session *session, 1345static s64 perf_session__process_user_event(struct perf_session *session,
@@ -1350,10 +1348,11 @@ static s64 perf_session__process_user_event(struct perf_session *session,
1350{ 1348{
1351 struct ordered_events *oe = &session->ordered_events; 1349 struct ordered_events *oe = &session->ordered_events;
1352 struct perf_tool *tool = session->tool; 1350 struct perf_tool *tool = session->tool;
1353 int fd = perf_data_file__fd(session->file); 1351 struct perf_sample sample = { .time = 0, };
1352 int fd = perf_data__fd(session->data);
1354 int err; 1353 int err;
1355 1354
1356 dump_event(session->evlist, event, file_offset, NULL); 1355 dump_event(session->evlist, event, file_offset, &sample);
1357 1356
1358 /* These events are processed right away */ 1357 /* These events are processed right away */
1359 switch (event->header.type) { 1358 switch (event->header.type) {
@@ -1450,10 +1449,10 @@ int perf_session__peek_event(struct perf_session *session, off_t file_offset,
1450 goto out_parse_sample; 1449 goto out_parse_sample;
1451 } 1450 }
1452 1451
1453 if (perf_data_file__is_pipe(session->file)) 1452 if (perf_data__is_pipe(session->data))
1454 return -1; 1453 return -1;
1455 1454
1456 fd = perf_data_file__fd(session->file); 1455 fd = perf_data__fd(session->data);
1457 hdr_sz = sizeof(struct perf_event_header); 1456 hdr_sz = sizeof(struct perf_event_header);
1458 1457
1459 if (buf_sz < hdr_sz) 1458 if (buf_sz < hdr_sz)
@@ -1495,7 +1494,6 @@ static s64 perf_session__process_event(struct perf_session *session,
1495{ 1494{
1496 struct perf_evlist *evlist = session->evlist; 1495 struct perf_evlist *evlist = session->evlist;
1497 struct perf_tool *tool = session->tool; 1496 struct perf_tool *tool = session->tool;
1498 struct perf_sample sample;
1499 int ret; 1497 int ret;
1500 1498
1501 if (session->header.needs_swap) 1499 if (session->header.needs_swap)
@@ -1509,21 +1507,19 @@ static s64 perf_session__process_event(struct perf_session *session,
1509 if (event->header.type >= PERF_RECORD_USER_TYPE_START) 1507 if (event->header.type >= PERF_RECORD_USER_TYPE_START)
1510 return perf_session__process_user_event(session, event, file_offset); 1508 return perf_session__process_user_event(session, event, file_offset);
1511 1509
1512 /*
1513 * For all kernel events we get the sample data
1514 */
1515 ret = perf_evlist__parse_sample(evlist, event, &sample);
1516 if (ret)
1517 return ret;
1518
1519 if (tool->ordered_events) { 1510 if (tool->ordered_events) {
1520 ret = perf_session__queue_event(session, event, &sample, file_offset); 1511 u64 timestamp = -1ULL;
1512
1513 ret = perf_evlist__parse_sample_timestamp(evlist, event, &timestamp);
1514 if (ret && ret != -1)
1515 return ret;
1516
1517 ret = perf_session__queue_event(session, event, timestamp, file_offset);
1521 if (ret != -ETIME) 1518 if (ret != -ETIME)
1522 return ret; 1519 return ret;
1523 } 1520 }
1524 1521
1525 return perf_session__deliver_event(session, event, &sample, tool, 1522 return perf_session__deliver_event(session, event, tool, file_offset);
1526 file_offset);
1527} 1523}
1528 1524
1529void perf_event_header__bswap(struct perf_event_header *hdr) 1525void perf_event_header__bswap(struct perf_event_header *hdr)
@@ -1688,7 +1684,7 @@ static int __perf_session__process_pipe_events(struct perf_session *session)
1688{ 1684{
1689 struct ordered_events *oe = &session->ordered_events; 1685 struct ordered_events *oe = &session->ordered_events;
1690 struct perf_tool *tool = session->tool; 1686 struct perf_tool *tool = session->tool;
1691 int fd = perf_data_file__fd(session->file); 1687 int fd = perf_data__fd(session->data);
1692 union perf_event *event; 1688 union perf_event *event;
1693 uint32_t size, cur_size = 0; 1689 uint32_t size, cur_size = 0;
1694 void *buf = NULL; 1690 void *buf = NULL;
@@ -1777,7 +1773,8 @@ done:
1777 err = perf_session__flush_thread_stacks(session); 1773 err = perf_session__flush_thread_stacks(session);
1778out_err: 1774out_err:
1779 free(buf); 1775 free(buf);
1780 perf_session__warn_about_errors(session); 1776 if (!tool->no_warn)
1777 perf_session__warn_about_errors(session);
1781 ordered_events__free(&session->ordered_events); 1778 ordered_events__free(&session->ordered_events);
1782 auxtrace__free_events(session); 1779 auxtrace__free_events(session);
1783 return err; 1780 return err;
@@ -1829,7 +1826,7 @@ static int __perf_session__process_events(struct perf_session *session,
1829{ 1826{
1830 struct ordered_events *oe = &session->ordered_events; 1827 struct ordered_events *oe = &session->ordered_events;
1831 struct perf_tool *tool = session->tool; 1828 struct perf_tool *tool = session->tool;
1832 int fd = perf_data_file__fd(session->file); 1829 int fd = perf_data__fd(session->data);
1833 u64 head, page_offset, file_offset, file_pos, size; 1830 u64 head, page_offset, file_offset, file_pos, size;
1834 int err, mmap_prot, mmap_flags, map_idx = 0; 1831 int err, mmap_prot, mmap_flags, map_idx = 0;
1835 size_t mmap_size; 1832 size_t mmap_size;
@@ -1850,7 +1847,7 @@ static int __perf_session__process_events(struct perf_session *session,
1850 if (data_offset + data_size < file_size) 1847 if (data_offset + data_size < file_size)
1851 file_size = data_offset + data_size; 1848 file_size = data_offset + data_size;
1852 1849
1853 ui_progress__init(&prog, file_size, "Processing events..."); 1850 ui_progress__init_size(&prog, file_size, "Processing events...");
1854 1851
1855 mmap_size = MMAP_SIZE; 1852 mmap_size = MMAP_SIZE;
1856 if (mmap_size > file_size) { 1853 if (mmap_size > file_size) {
@@ -1933,7 +1930,8 @@ out:
1933 err = perf_session__flush_thread_stacks(session); 1930 err = perf_session__flush_thread_stacks(session);
1934out_err: 1931out_err:
1935 ui_progress__finish(); 1932 ui_progress__finish();
1936 perf_session__warn_about_errors(session); 1933 if (!tool->no_warn)
1934 perf_session__warn_about_errors(session);
1937 /* 1935 /*
1938 * We may switching perf.data output, make ordered_events 1936 * We may switching perf.data output, make ordered_events
1939 * reusable. 1937 * reusable.
@@ -1946,13 +1944,13 @@ out_err:
1946 1944
1947int perf_session__process_events(struct perf_session *session) 1945int perf_session__process_events(struct perf_session *session)
1948{ 1946{
1949 u64 size = perf_data_file__size(session->file); 1947 u64 size = perf_data__size(session->data);
1950 int err; 1948 int err;
1951 1949
1952 if (perf_session__register_idle_thread(session) < 0) 1950 if (perf_session__register_idle_thread(session) < 0)
1953 return -ENOMEM; 1951 return -ENOMEM;
1954 1952
1955 if (!perf_data_file__is_pipe(session->file)) 1953 if (!perf_data__is_pipe(session->data))
1956 err = __perf_session__process_events(session, 1954 err = __perf_session__process_events(session,
1957 session->header.data_offset, 1955 session->header.data_offset,
1958 session->header.data_size, size); 1956 session->header.data_size, size);
diff --git a/tools/perf/util/session.h b/tools/perf/util/session.h
index 41caa098ed15..da40b4b380ca 100644
--- a/tools/perf/util/session.h
+++ b/tools/perf/util/session.h
@@ -33,13 +33,13 @@ struct perf_session {
33 void *one_mmap_addr; 33 void *one_mmap_addr;
34 u64 one_mmap_offset; 34 u64 one_mmap_offset;
35 struct ordered_events ordered_events; 35 struct ordered_events ordered_events;
36 struct perf_data_file *file; 36 struct perf_data *data;
37 struct perf_tool *tool; 37 struct perf_tool *tool;
38}; 38};
39 39
40struct perf_tool; 40struct perf_tool;
41 41
42struct perf_session *perf_session__new(struct perf_data_file *file, 42struct perf_session *perf_session__new(struct perf_data *data,
43 bool repipe, struct perf_tool *tool); 43 bool repipe, struct perf_tool *tool);
44void perf_session__delete(struct perf_session *session); 44void perf_session__delete(struct perf_session *session);
45 45
@@ -53,7 +53,7 @@ int perf_session__peek_event(struct perf_session *session, off_t file_offset,
53int perf_session__process_events(struct perf_session *session); 53int perf_session__process_events(struct perf_session *session);
54 54
55int perf_session__queue_event(struct perf_session *s, union perf_event *event, 55int perf_session__queue_event(struct perf_session *s, union perf_event *event,
56 struct perf_sample *sample, u64 file_offset); 56 u64 timestamp, u64 file_offset);
57 57
58void perf_tool__fill_defaults(struct perf_tool *tool); 58void perf_tool__fill_defaults(struct perf_tool *tool);
59 59
@@ -114,7 +114,7 @@ int __perf_session__set_tracepoints_handlers(struct perf_session *session,
114 114
115extern volatile int session_done; 115extern volatile int session_done;
116 116
117#define session_done() ACCESS_ONCE(session_done) 117#define session_done() READ_ONCE(session_done)
118 118
119int perf_session__deliver_synth_event(struct perf_session *session, 119int perf_session__deliver_synth_event(struct perf_session *session,
120 union perf_event *event, 120 union perf_event *event,
diff --git a/tools/perf/util/sort.c b/tools/perf/util/sort.c
index 84a33f1e9ec9..2da4d0456a03 100644
--- a/tools/perf/util/sort.c
+++ b/tools/perf/util/sort.c
@@ -226,6 +226,9 @@ static int64_t _sort__sym_cmp(struct symbol *sym_l, struct symbol *sym_r)
226 if (sym_l == sym_r) 226 if (sym_l == sym_r)
227 return 0; 227 return 0;
228 228
229 if (sym_l->inlined || sym_r->inlined)
230 return strcmp(sym_l->name, sym_r->name);
231
229 if (sym_l->start != sym_r->start) 232 if (sym_l->start != sym_r->start)
230 return (int64_t)(sym_r->start - sym_l->start); 233 return (int64_t)(sym_r->start - sym_l->start);
231 234
@@ -284,6 +287,9 @@ static int _hist_entry__sym_snprintf(struct map *map, struct symbol *sym,
284 ret += repsep_snprintf(bf + ret, size - ret, "%.*s", 287 ret += repsep_snprintf(bf + ret, size - ret, "%.*s",
285 width - ret, 288 width - ret,
286 sym->name); 289 sym->name);
290 if (sym->inlined)
291 ret += repsep_snprintf(bf + ret, size - ret,
292 " (inlined)");
287 } 293 }
288 } else { 294 } else {
289 size_t len = BITS_PER_LONG / 4; 295 size_t len = BITS_PER_LONG / 4;
@@ -330,7 +336,7 @@ char *hist_entry__get_srcline(struct hist_entry *he)
330 return SRCLINE_UNKNOWN; 336 return SRCLINE_UNKNOWN;
331 337
332 return get_srcline(map->dso, map__rip_2objdump(map, he->ip), 338 return get_srcline(map->dso, map__rip_2objdump(map, he->ip),
333 he->ms.sym, true, true); 339 he->ms.sym, true, true, he->ip);
334} 340}
335 341
336static int64_t 342static int64_t
@@ -374,7 +380,8 @@ sort__srcline_from_cmp(struct hist_entry *left, struct hist_entry *right)
374 map__rip_2objdump(map, 380 map__rip_2objdump(map,
375 left->branch_info->from.al_addr), 381 left->branch_info->from.al_addr),
376 left->branch_info->from.sym, 382 left->branch_info->from.sym,
377 true, true); 383 true, true,
384 left->branch_info->from.al_addr);
378 } 385 }
379 if (!right->branch_info->srcline_from) { 386 if (!right->branch_info->srcline_from) {
380 struct map *map = right->branch_info->from.map; 387 struct map *map = right->branch_info->from.map;
@@ -385,7 +392,8 @@ sort__srcline_from_cmp(struct hist_entry *left, struct hist_entry *right)
385 map__rip_2objdump(map, 392 map__rip_2objdump(map,
386 right->branch_info->from.al_addr), 393 right->branch_info->from.al_addr),
387 right->branch_info->from.sym, 394 right->branch_info->from.sym,
388 true, true); 395 true, true,
396 right->branch_info->from.al_addr);
389 } 397 }
390 return strcmp(right->branch_info->srcline_from, left->branch_info->srcline_from); 398 return strcmp(right->branch_info->srcline_from, left->branch_info->srcline_from);
391} 399}
@@ -417,7 +425,8 @@ sort__srcline_to_cmp(struct hist_entry *left, struct hist_entry *right)
417 map__rip_2objdump(map, 425 map__rip_2objdump(map,
418 left->branch_info->to.al_addr), 426 left->branch_info->to.al_addr),
419 left->branch_info->from.sym, 427 left->branch_info->from.sym,
420 true, true); 428 true, true,
429 left->branch_info->to.al_addr);
421 } 430 }
422 if (!right->branch_info->srcline_to) { 431 if (!right->branch_info->srcline_to) {
423 struct map *map = right->branch_info->to.map; 432 struct map *map = right->branch_info->to.map;
@@ -428,7 +437,8 @@ sort__srcline_to_cmp(struct hist_entry *left, struct hist_entry *right)
428 map__rip_2objdump(map, 437 map__rip_2objdump(map,
429 right->branch_info->to.al_addr), 438 right->branch_info->to.al_addr),
430 right->branch_info->to.sym, 439 right->branch_info->to.sym,
431 true, true); 440 true, true,
441 right->branch_info->to.al_addr);
432 } 442 }
433 return strcmp(right->branch_info->srcline_to, left->branch_info->srcline_to); 443 return strcmp(right->branch_info->srcline_to, left->branch_info->srcline_to);
434} 444}
@@ -459,7 +469,7 @@ static char *hist_entry__get_srcfile(struct hist_entry *e)
459 return no_srcfile; 469 return no_srcfile;
460 470
461 sf = __get_srcline(map->dso, map__rip_2objdump(map, e->ip), 471 sf = __get_srcline(map->dso, map__rip_2objdump(map, e->ip),
462 e->ms.sym, false, true, true); 472 e->ms.sym, false, true, true, e->ip);
463 if (!strcmp(sf, SRCLINE_UNKNOWN)) 473 if (!strcmp(sf, SRCLINE_UNKNOWN))
464 return no_srcfile; 474 return no_srcfile;
465 p = strchr(sf, ':'); 475 p = strchr(sf, ':');
@@ -2877,10 +2887,10 @@ static int setup_output_list(struct perf_hpp_list *list, char *str)
2877 tok; tok = strtok_r(NULL, ", ", &tmp)) { 2887 tok; tok = strtok_r(NULL, ", ", &tmp)) {
2878 ret = output_field_add(list, tok); 2888 ret = output_field_add(list, tok);
2879 if (ret == -EINVAL) { 2889 if (ret == -EINVAL) {
2880 pr_err("Invalid --fields key: `%s'", tok); 2890 ui__error("Invalid --fields key: `%s'", tok);
2881 break; 2891 break;
2882 } else if (ret == -ESRCH) { 2892 } else if (ret == -ESRCH) {
2883 pr_err("Unknown --fields key: `%s'", tok); 2893 ui__error("Unknown --fields key: `%s'", tok);
2884 break; 2894 break;
2885 } 2895 }
2886 } 2896 }
diff --git a/tools/perf/util/sort.h b/tools/perf/util/sort.h
index b2b55e5149a7..f5901c10a563 100644
--- a/tools/perf/util/sort.h
+++ b/tools/perf/util/sort.h
@@ -130,7 +130,6 @@ struct hist_entry {
130 }; 130 };
131 char *srcline; 131 char *srcline;
132 char *srcfile; 132 char *srcfile;
133 struct inline_node *inline_node;
134 struct symbol *parent; 133 struct symbol *parent;
135 struct branch_info *branch_info; 134 struct branch_info *branch_info;
136 struct hists *hists; 135 struct hists *hists;
diff --git a/tools/perf/util/srcline.c b/tools/perf/util/srcline.c
index 4105682afc7a..3c21fd059b64 100644
--- a/tools/perf/util/srcline.c
+++ b/tools/perf/util/srcline.c
@@ -11,7 +11,7 @@
11#include "util/debug.h" 11#include "util/debug.h"
12#include "util/callchain.h" 12#include "util/callchain.h"
13#include "srcline.h" 13#include "srcline.h"
14 14#include "string2.h"
15#include "symbol.h" 15#include "symbol.h"
16 16
17bool srcline_full_filename; 17bool srcline_full_filename;
@@ -34,28 +34,17 @@ static const char *dso__name(struct dso *dso)
34 return dso_name; 34 return dso_name;
35} 35}
36 36
37static int inline_list__append(char *filename, char *funcname, int line_nr, 37static int inline_list__append(struct symbol *symbol, char *srcline,
38 struct inline_node *node, struct dso *dso) 38 struct inline_node *node)
39{ 39{
40 struct inline_list *ilist; 40 struct inline_list *ilist;
41 char *demangled;
42 41
43 ilist = zalloc(sizeof(*ilist)); 42 ilist = zalloc(sizeof(*ilist));
44 if (ilist == NULL) 43 if (ilist == NULL)
45 return -1; 44 return -1;
46 45
47 ilist->filename = filename; 46 ilist->symbol = symbol;
48 ilist->line_nr = line_nr; 47 ilist->srcline = srcline;
49
50 if (dso != NULL) {
51 demangled = dso__demangle_sym(dso, 0, funcname);
52 if (demangled == NULL) {
53 ilist->funcname = funcname;
54 } else {
55 ilist->funcname = demangled;
56 free(funcname);
57 }
58 }
59 48
60 if (callchain_param.order == ORDER_CALLEE) 49 if (callchain_param.order == ORDER_CALLEE)
61 list_add_tail(&ilist->list, &node->val); 50 list_add_tail(&ilist->list, &node->val);
@@ -65,6 +54,65 @@ static int inline_list__append(char *filename, char *funcname, int line_nr,
65 return 0; 54 return 0;
66} 55}
67 56
57/* basename version that takes a const input string */
58static const char *gnu_basename(const char *path)
59{
60 const char *base = strrchr(path, '/');
61
62 return base ? base + 1 : path;
63}
64
65static char *srcline_from_fileline(const char *file, unsigned int line)
66{
67 char *srcline;
68
69 if (!file)
70 return NULL;
71
72 if (!srcline_full_filename)
73 file = gnu_basename(file);
74
75 if (asprintf(&srcline, "%s:%u", file, line) < 0)
76 return NULL;
77
78 return srcline;
79}
80
81static struct symbol *new_inline_sym(struct dso *dso,
82 struct symbol *base_sym,
83 const char *funcname)
84{
85 struct symbol *inline_sym;
86 char *demangled = NULL;
87
88 if (dso) {
89 demangled = dso__demangle_sym(dso, 0, funcname);
90 if (demangled)
91 funcname = demangled;
92 }
93
94 if (base_sym && strcmp(funcname, base_sym->name) == 0) {
95 /* reuse the real, existing symbol */
96 inline_sym = base_sym;
97 /* ensure that we don't alias an inlined symbol, which could
98 * lead to double frees in inline_node__delete
99 */
100 assert(!base_sym->inlined);
101 } else {
102 /* create a fake symbol for the inline frame */
103 inline_sym = symbol__new(base_sym ? base_sym->start : 0,
104 base_sym ? base_sym->end : 0,
105 base_sym ? base_sym->binding : 0,
106 funcname);
107 if (inline_sym)
108 inline_sym->inlined = 1;
109 }
110
111 free(demangled);
112
113 return inline_sym;
114}
115
68#ifdef HAVE_LIBBFD_SUPPORT 116#ifdef HAVE_LIBBFD_SUPPORT
69 117
70/* 118/*
@@ -208,18 +256,23 @@ static void addr2line_cleanup(struct a2l_data *a2l)
208#define MAX_INLINE_NEST 1024 256#define MAX_INLINE_NEST 1024
209 257
210static int inline_list__append_dso_a2l(struct dso *dso, 258static int inline_list__append_dso_a2l(struct dso *dso,
211 struct inline_node *node) 259 struct inline_node *node,
260 struct symbol *sym)
212{ 261{
213 struct a2l_data *a2l = dso->a2l; 262 struct a2l_data *a2l = dso->a2l;
214 char *funcname = a2l->funcname ? strdup(a2l->funcname) : NULL; 263 struct symbol *inline_sym = new_inline_sym(dso, sym, a2l->funcname);
215 char *filename = a2l->filename ? strdup(a2l->filename) : NULL; 264 char *srcline = NULL;
216 265
217 return inline_list__append(filename, funcname, a2l->line, node, dso); 266 if (a2l->filename)
267 srcline = srcline_from_fileline(a2l->filename, a2l->line);
268
269 return inline_list__append(inline_sym, srcline, node);
218} 270}
219 271
220static int addr2line(const char *dso_name, u64 addr, 272static int addr2line(const char *dso_name, u64 addr,
221 char **file, unsigned int *line, struct dso *dso, 273 char **file, unsigned int *line, struct dso *dso,
222 bool unwind_inlines, struct inline_node *node) 274 bool unwind_inlines, struct inline_node *node,
275 struct symbol *sym)
223{ 276{
224 int ret = 0; 277 int ret = 0;
225 struct a2l_data *a2l = dso->a2l; 278 struct a2l_data *a2l = dso->a2l;
@@ -245,7 +298,7 @@ static int addr2line(const char *dso_name, u64 addr,
245 if (unwind_inlines) { 298 if (unwind_inlines) {
246 int cnt = 0; 299 int cnt = 0;
247 300
248 if (node && inline_list__append_dso_a2l(dso, node)) 301 if (node && inline_list__append_dso_a2l(dso, node, sym))
249 return 0; 302 return 0;
250 303
251 while (bfd_find_inliner_info(a2l->abfd, &a2l->filename, 304 while (bfd_find_inliner_info(a2l->abfd, &a2l->filename,
@@ -256,7 +309,7 @@ static int addr2line(const char *dso_name, u64 addr,
256 a2l->filename = NULL; 309 a2l->filename = NULL;
257 310
258 if (node != NULL) { 311 if (node != NULL) {
259 if (inline_list__append_dso_a2l(dso, node)) 312 if (inline_list__append_dso_a2l(dso, node, sym))
260 return 0; 313 return 0;
261 // found at least one inline frame 314 // found at least one inline frame
262 ret = 1; 315 ret = 1;
@@ -288,7 +341,7 @@ void dso__free_a2l(struct dso *dso)
288} 341}
289 342
290static struct inline_node *addr2inlines(const char *dso_name, u64 addr, 343static struct inline_node *addr2inlines(const char *dso_name, u64 addr,
291 struct dso *dso) 344 struct dso *dso, struct symbol *sym)
292{ 345{
293 struct inline_node *node; 346 struct inline_node *node;
294 347
@@ -301,17 +354,8 @@ static struct inline_node *addr2inlines(const char *dso_name, u64 addr,
301 INIT_LIST_HEAD(&node->val); 354 INIT_LIST_HEAD(&node->val);
302 node->addr = addr; 355 node->addr = addr;
303 356
304 if (!addr2line(dso_name, addr, NULL, NULL, dso, TRUE, node)) 357 addr2line(dso_name, addr, NULL, NULL, dso, true, node, sym);
305 goto out_free_inline_node;
306
307 if (list_empty(&node->val))
308 goto out_free_inline_node;
309
310 return node; 358 return node;
311
312out_free_inline_node:
313 inline_node__delete(node);
314 return NULL;
315} 359}
316 360
317#else /* HAVE_LIBBFD_SUPPORT */ 361#else /* HAVE_LIBBFD_SUPPORT */
@@ -341,7 +385,8 @@ static int addr2line(const char *dso_name, u64 addr,
341 char **file, unsigned int *line_nr, 385 char **file, unsigned int *line_nr,
342 struct dso *dso __maybe_unused, 386 struct dso *dso __maybe_unused,
343 bool unwind_inlines __maybe_unused, 387 bool unwind_inlines __maybe_unused,
344 struct inline_node *node __maybe_unused) 388 struct inline_node *node __maybe_unused,
389 struct symbol *sym __maybe_unused)
345{ 390{
346 FILE *fp; 391 FILE *fp;
347 char cmd[PATH_MAX]; 392 char cmd[PATH_MAX];
@@ -381,16 +426,18 @@ void dso__free_a2l(struct dso *dso __maybe_unused)
381} 426}
382 427
383static struct inline_node *addr2inlines(const char *dso_name, u64 addr, 428static struct inline_node *addr2inlines(const char *dso_name, u64 addr,
384 struct dso *dso __maybe_unused) 429 struct dso *dso __maybe_unused,
430 struct symbol *sym)
385{ 431{
386 FILE *fp; 432 FILE *fp;
387 char cmd[PATH_MAX]; 433 char cmd[PATH_MAX];
388 struct inline_node *node; 434 struct inline_node *node;
389 char *filename = NULL; 435 char *filename = NULL;
390 size_t len; 436 char *funcname = NULL;
437 size_t filelen, funclen;
391 unsigned int line_nr = 0; 438 unsigned int line_nr = 0;
392 439
393 scnprintf(cmd, sizeof(cmd), "addr2line -e %s -i %016"PRIx64, 440 scnprintf(cmd, sizeof(cmd), "addr2line -e %s -i -f %016"PRIx64,
394 dso_name, addr); 441 dso_name, addr);
395 442
396 fp = popen(cmd, "r"); 443 fp = popen(cmd, "r");
@@ -408,26 +455,34 @@ static struct inline_node *addr2inlines(const char *dso_name, u64 addr,
408 INIT_LIST_HEAD(&node->val); 455 INIT_LIST_HEAD(&node->val);
409 node->addr = addr; 456 node->addr = addr;
410 457
411 while (getline(&filename, &len, fp) != -1) { 458 /* addr2line -f generates two lines for each inlined functions */
412 if (filename_split(filename, &line_nr) != 1) { 459 while (getline(&funcname, &funclen, fp) != -1) {
413 free(filename); 460 char *srcline;
461 struct symbol *inline_sym;
462
463 rtrim(funcname);
464
465 if (getline(&filename, &filelen, fp) == -1)
414 goto out; 466 goto out;
415 }
416 467
417 if (inline_list__append(filename, NULL, line_nr, node, 468 if (filename_split(filename, &line_nr) != 1)
418 NULL) != 0)
419 goto out; 469 goto out;
420 470
421 filename = NULL; 471 srcline = srcline_from_fileline(filename, line_nr);
472 inline_sym = new_inline_sym(dso, sym, funcname);
473
474 if (inline_list__append(inline_sym, srcline, node) != 0) {
475 free(srcline);
476 if (inline_sym && inline_sym->inlined)
477 symbol__delete(inline_sym);
478 goto out;
479 }
422 } 480 }
423 481
424out: 482out:
425 pclose(fp); 483 pclose(fp);
426 484 free(filename);
427 if (list_empty(&node->val)) { 485 free(funcname);
428 inline_node__delete(node);
429 return NULL;
430 }
431 486
432 return node; 487 return node;
433} 488}
@@ -441,7 +496,8 @@ out:
441#define A2L_FAIL_LIMIT 123 496#define A2L_FAIL_LIMIT 123
442 497
443char *__get_srcline(struct dso *dso, u64 addr, struct symbol *sym, 498char *__get_srcline(struct dso *dso, u64 addr, struct symbol *sym,
444 bool show_sym, bool show_addr, bool unwind_inlines) 499 bool show_sym, bool show_addr, bool unwind_inlines,
500 u64 ip)
445{ 501{
446 char *file = NULL; 502 char *file = NULL;
447 unsigned line = 0; 503 unsigned line = 0;
@@ -455,19 +511,18 @@ char *__get_srcline(struct dso *dso, u64 addr, struct symbol *sym,
455 if (dso_name == NULL) 511 if (dso_name == NULL)
456 goto out; 512 goto out;
457 513
458 if (!addr2line(dso_name, addr, &file, &line, dso, unwind_inlines, NULL)) 514 if (!addr2line(dso_name, addr, &file, &line, dso,
515 unwind_inlines, NULL, sym))
459 goto out; 516 goto out;
460 517
461 if (asprintf(&srcline, "%s:%u", 518 srcline = srcline_from_fileline(file, line);
462 srcline_full_filename ? file : basename(file), 519 free(file);
463 line) < 0) { 520
464 free(file); 521 if (!srcline)
465 goto out; 522 goto out;
466 }
467 523
468 dso->a2l_fails = 0; 524 dso->a2l_fails = 0;
469 525
470 free(file);
471 return srcline; 526 return srcline;
472 527
473out: 528out:
@@ -482,7 +537,7 @@ out:
482 537
483 if (sym) { 538 if (sym) {
484 if (asprintf(&srcline, "%s+%" PRIu64, show_sym ? sym->name : "", 539 if (asprintf(&srcline, "%s+%" PRIu64, show_sym ? sym->name : "",
485 addr - sym->start) < 0) 540 ip - sym->start) < 0)
486 return SRCLINE_UNKNOWN; 541 return SRCLINE_UNKNOWN;
487 } else if (asprintf(&srcline, "%s[%" PRIx64 "]", dso->short_name, addr) < 0) 542 } else if (asprintf(&srcline, "%s[%" PRIx64 "]", dso->short_name, addr) < 0)
488 return SRCLINE_UNKNOWN; 543 return SRCLINE_UNKNOWN;
@@ -496,12 +551,79 @@ void free_srcline(char *srcline)
496} 551}
497 552
498char *get_srcline(struct dso *dso, u64 addr, struct symbol *sym, 553char *get_srcline(struct dso *dso, u64 addr, struct symbol *sym,
499 bool show_sym, bool show_addr) 554 bool show_sym, bool show_addr, u64 ip)
555{
556 return __get_srcline(dso, addr, sym, show_sym, show_addr, false, ip);
557}
558
559struct srcline_node {
560 u64 addr;
561 char *srcline;
562 struct rb_node rb_node;
563};
564
565void srcline__tree_insert(struct rb_root *tree, u64 addr, char *srcline)
566{
567 struct rb_node **p = &tree->rb_node;
568 struct rb_node *parent = NULL;
569 struct srcline_node *i, *node;
570
571 node = zalloc(sizeof(struct srcline_node));
572 if (!node) {
573 perror("not enough memory for the srcline node");
574 return;
575 }
576
577 node->addr = addr;
578 node->srcline = srcline;
579
580 while (*p != NULL) {
581 parent = *p;
582 i = rb_entry(parent, struct srcline_node, rb_node);
583 if (addr < i->addr)
584 p = &(*p)->rb_left;
585 else
586 p = &(*p)->rb_right;
587 }
588 rb_link_node(&node->rb_node, parent, p);
589 rb_insert_color(&node->rb_node, tree);
590}
591
592char *srcline__tree_find(struct rb_root *tree, u64 addr)
500{ 593{
501 return __get_srcline(dso, addr, sym, show_sym, show_addr, false); 594 struct rb_node *n = tree->rb_node;
595
596 while (n) {
597 struct srcline_node *i = rb_entry(n, struct srcline_node,
598 rb_node);
599
600 if (addr < i->addr)
601 n = n->rb_left;
602 else if (addr > i->addr)
603 n = n->rb_right;
604 else
605 return i->srcline;
606 }
607
608 return NULL;
502} 609}
503 610
504struct inline_node *dso__parse_addr_inlines(struct dso *dso, u64 addr) 611void srcline__tree_delete(struct rb_root *tree)
612{
613 struct srcline_node *pos;
614 struct rb_node *next = rb_first(tree);
615
616 while (next) {
617 pos = rb_entry(next, struct srcline_node, rb_node);
618 next = rb_next(&pos->rb_node);
619 rb_erase(&pos->rb_node, tree);
620 free_srcline(pos->srcline);
621 zfree(&pos);
622 }
623}
624
625struct inline_node *dso__parse_addr_inlines(struct dso *dso, u64 addr,
626 struct symbol *sym)
505{ 627{
506 const char *dso_name; 628 const char *dso_name;
507 629
@@ -509,7 +631,7 @@ struct inline_node *dso__parse_addr_inlines(struct dso *dso, u64 addr)
509 if (dso_name == NULL) 631 if (dso_name == NULL)
510 return NULL; 632 return NULL;
511 633
512 return addr2inlines(dso_name, addr, dso); 634 return addr2inlines(dso_name, addr, dso, sym);
513} 635}
514 636
515void inline_node__delete(struct inline_node *node) 637void inline_node__delete(struct inline_node *node)
@@ -518,10 +640,63 @@ void inline_node__delete(struct inline_node *node)
518 640
519 list_for_each_entry_safe(ilist, tmp, &node->val, list) { 641 list_for_each_entry_safe(ilist, tmp, &node->val, list) {
520 list_del_init(&ilist->list); 642 list_del_init(&ilist->list);
521 zfree(&ilist->filename); 643 free_srcline(ilist->srcline);
522 zfree(&ilist->funcname); 644 /* only the inlined symbols are owned by the list */
645 if (ilist->symbol && ilist->symbol->inlined)
646 symbol__delete(ilist->symbol);
523 free(ilist); 647 free(ilist);
524 } 648 }
525 649
526 free(node); 650 free(node);
527} 651}
652
653void inlines__tree_insert(struct rb_root *tree, struct inline_node *inlines)
654{
655 struct rb_node **p = &tree->rb_node;
656 struct rb_node *parent = NULL;
657 const u64 addr = inlines->addr;
658 struct inline_node *i;
659
660 while (*p != NULL) {
661 parent = *p;
662 i = rb_entry(parent, struct inline_node, rb_node);
663 if (addr < i->addr)
664 p = &(*p)->rb_left;
665 else
666 p = &(*p)->rb_right;
667 }
668 rb_link_node(&inlines->rb_node, parent, p);
669 rb_insert_color(&inlines->rb_node, tree);
670}
671
672struct inline_node *inlines__tree_find(struct rb_root *tree, u64 addr)
673{
674 struct rb_node *n = tree->rb_node;
675
676 while (n) {
677 struct inline_node *i = rb_entry(n, struct inline_node,
678 rb_node);
679
680 if (addr < i->addr)
681 n = n->rb_left;
682 else if (addr > i->addr)
683 n = n->rb_right;
684 else
685 return i;
686 }
687
688 return NULL;
689}
690
691void inlines__tree_delete(struct rb_root *tree)
692{
693 struct inline_node *pos;
694 struct rb_node *next = rb_first(tree);
695
696 while (next) {
697 pos = rb_entry(next, struct inline_node, rb_node);
698 next = rb_next(&pos->rb_node);
699 rb_erase(&pos->rb_node, tree);
700 inline_node__delete(pos);
701 }
702}
diff --git a/tools/perf/util/srcline.h b/tools/perf/util/srcline.h
index 8e73f607dfa3..b2bb5502fd62 100644
--- a/tools/perf/util/srcline.h
+++ b/tools/perf/util/srcline.h
@@ -3,6 +3,7 @@
3#define PERF_SRCLINE_H 3#define PERF_SRCLINE_H
4 4
5#include <linux/list.h> 5#include <linux/list.h>
6#include <linux/rbtree.h>
6#include <linux/types.h> 7#include <linux/types.h>
7 8
8struct dso; 9struct dso;
@@ -10,26 +11,44 @@ struct symbol;
10 11
11extern bool srcline_full_filename; 12extern bool srcline_full_filename;
12char *get_srcline(struct dso *dso, u64 addr, struct symbol *sym, 13char *get_srcline(struct dso *dso, u64 addr, struct symbol *sym,
13 bool show_sym, bool show_addr); 14 bool show_sym, bool show_addr, u64 ip);
14char *__get_srcline(struct dso *dso, u64 addr, struct symbol *sym, 15char *__get_srcline(struct dso *dso, u64 addr, struct symbol *sym,
15 bool show_sym, bool show_addr, bool unwind_inlines); 16 bool show_sym, bool show_addr, bool unwind_inlines,
17 u64 ip);
16void free_srcline(char *srcline); 18void free_srcline(char *srcline);
17 19
20/* insert the srcline into the DSO, which will take ownership */
21void srcline__tree_insert(struct rb_root *tree, u64 addr, char *srcline);
22/* find previously inserted srcline */
23char *srcline__tree_find(struct rb_root *tree, u64 addr);
24/* delete all srclines within the tree */
25void srcline__tree_delete(struct rb_root *tree);
26
18#define SRCLINE_UNKNOWN ((char *) "??:0") 27#define SRCLINE_UNKNOWN ((char *) "??:0")
19 28
20struct inline_list { 29struct inline_list {
21 char *filename; 30 struct symbol *symbol;
22 char *funcname; 31 char *srcline;
23 unsigned int line_nr;
24 struct list_head list; 32 struct list_head list;
25}; 33};
26 34
27struct inline_node { 35struct inline_node {
28 u64 addr; 36 u64 addr;
29 struct list_head val; 37 struct list_head val;
38 struct rb_node rb_node;
30}; 39};
31 40
32struct inline_node *dso__parse_addr_inlines(struct dso *dso, u64 addr); 41/* parse inlined frames for the given address */
42struct inline_node *dso__parse_addr_inlines(struct dso *dso, u64 addr,
43 struct symbol *sym);
44/* free resources associated to the inline node list */
33void inline_node__delete(struct inline_node *node); 45void inline_node__delete(struct inline_node *node);
34 46
47/* insert the inline node list into the DSO, which will take ownership */
48void inlines__tree_insert(struct rb_root *tree, struct inline_node *inlines);
49/* find previously inserted inline node list */
50struct inline_node *inlines__tree_find(struct rb_root *tree, u64 addr);
51/* delete all nodes within the tree of inline_node s */
52void inlines__tree_delete(struct rb_root *tree);
53
35#endif /* PERF_SRCLINE_H */ 54#endif /* PERF_SRCLINE_H */
diff --git a/tools/perf/util/stat-shadow.c b/tools/perf/util/stat-shadow.c
index 37363869c9a1..594d14a02b67 100644
--- a/tools/perf/util/stat-shadow.c
+++ b/tools/perf/util/stat-shadow.c
@@ -7,17 +7,7 @@
7#include "rblist.h" 7#include "rblist.h"
8#include "evlist.h" 8#include "evlist.h"
9#include "expr.h" 9#include "expr.h"
10 10#include "metricgroup.h"
11enum {
12 CTX_BIT_USER = 1 << 0,
13 CTX_BIT_KERNEL = 1 << 1,
14 CTX_BIT_HV = 1 << 2,
15 CTX_BIT_HOST = 1 << 3,
16 CTX_BIT_IDLE = 1 << 4,
17 CTX_BIT_MAX = 1 << 5,
18};
19
20#define NUM_CTX CTX_BIT_MAX
21 11
22/* 12/*
23 * AGGR_GLOBAL: Use CPU 0 13 * AGGR_GLOBAL: Use CPU 0
@@ -26,37 +16,18 @@ enum {
26 * AGGR_NONE: Use matching CPU 16 * AGGR_NONE: Use matching CPU
27 * AGGR_THREAD: Not supported? 17 * AGGR_THREAD: Not supported?
28 */ 18 */
29static struct stats runtime_nsecs_stats[MAX_NR_CPUS];
30static struct stats runtime_cycles_stats[NUM_CTX][MAX_NR_CPUS];
31static struct stats runtime_stalled_cycles_front_stats[NUM_CTX][MAX_NR_CPUS];
32static struct stats runtime_stalled_cycles_back_stats[NUM_CTX][MAX_NR_CPUS];
33static struct stats runtime_branches_stats[NUM_CTX][MAX_NR_CPUS];
34static struct stats runtime_cacherefs_stats[NUM_CTX][MAX_NR_CPUS];
35static struct stats runtime_l1_dcache_stats[NUM_CTX][MAX_NR_CPUS];
36static struct stats runtime_l1_icache_stats[NUM_CTX][MAX_NR_CPUS];
37static struct stats runtime_ll_cache_stats[NUM_CTX][MAX_NR_CPUS];
38static struct stats runtime_itlb_cache_stats[NUM_CTX][MAX_NR_CPUS];
39static struct stats runtime_dtlb_cache_stats[NUM_CTX][MAX_NR_CPUS];
40static struct stats runtime_cycles_in_tx_stats[NUM_CTX][MAX_NR_CPUS];
41static struct stats runtime_transaction_stats[NUM_CTX][MAX_NR_CPUS];
42static struct stats runtime_elision_stats[NUM_CTX][MAX_NR_CPUS];
43static struct stats runtime_topdown_total_slots[NUM_CTX][MAX_NR_CPUS];
44static struct stats runtime_topdown_slots_issued[NUM_CTX][MAX_NR_CPUS];
45static struct stats runtime_topdown_slots_retired[NUM_CTX][MAX_NR_CPUS];
46static struct stats runtime_topdown_fetch_bubbles[NUM_CTX][MAX_NR_CPUS];
47static struct stats runtime_topdown_recovery_bubbles[NUM_CTX][MAX_NR_CPUS];
48static struct stats runtime_smi_num_stats[NUM_CTX][MAX_NR_CPUS];
49static struct stats runtime_aperf_stats[NUM_CTX][MAX_NR_CPUS];
50static struct rblist runtime_saved_values;
51static bool have_frontend_stalled; 19static bool have_frontend_stalled;
52 20
21struct runtime_stat rt_stat;
53struct stats walltime_nsecs_stats; 22struct stats walltime_nsecs_stats;
54 23
55struct saved_value { 24struct saved_value {
56 struct rb_node rb_node; 25 struct rb_node rb_node;
57 struct perf_evsel *evsel; 26 struct perf_evsel *evsel;
58 int cpu; 27 enum stat_type type;
59 int ctx; 28 int ctx;
29 int cpu;
30 struct runtime_stat *stat;
60 struct stats stats; 31 struct stats stats;
61}; 32};
62 33
@@ -67,10 +38,32 @@ static int saved_value_cmp(struct rb_node *rb_node, const void *entry)
67 rb_node); 38 rb_node);
68 const struct saved_value *b = entry; 39 const struct saved_value *b = entry;
69 40
70 if (a->ctx != b->ctx)
71 return a->ctx - b->ctx;
72 if (a->cpu != b->cpu) 41 if (a->cpu != b->cpu)
73 return a->cpu - b->cpu; 42 return a->cpu - b->cpu;
43
44 /*
45 * Previously the rbtree was used to link generic metrics.
46 * The keys were evsel/cpu. Now the rbtree is extended to support
47 * per-thread shadow stats. For shadow stats case, the keys
48 * are cpu/type/ctx/stat (evsel is NULL). For generic metrics
49 * case, the keys are still evsel/cpu (type/ctx/stat are 0 or NULL).
50 */
51 if (a->type != b->type)
52 return a->type - b->type;
53
54 if (a->ctx != b->ctx)
55 return a->ctx - b->ctx;
56
57 if (a->evsel == NULL && b->evsel == NULL) {
58 if (a->stat == b->stat)
59 return 0;
60
61 if ((char *)a->stat < (char *)b->stat)
62 return -1;
63
64 return 1;
65 }
66
74 if (a->evsel == b->evsel) 67 if (a->evsel == b->evsel)
75 return 0; 68 return 0;
76 if ((char *)a->evsel < (char *)b->evsel) 69 if ((char *)a->evsel < (char *)b->evsel)
@@ -89,35 +82,66 @@ static struct rb_node *saved_value_new(struct rblist *rblist __maybe_unused,
89 return &nd->rb_node; 82 return &nd->rb_node;
90} 83}
91 84
85static void saved_value_delete(struct rblist *rblist __maybe_unused,
86 struct rb_node *rb_node)
87{
88 struct saved_value *v;
89
90 BUG_ON(!rb_node);
91 v = container_of(rb_node, struct saved_value, rb_node);
92 free(v);
93}
94
92static struct saved_value *saved_value_lookup(struct perf_evsel *evsel, 95static struct saved_value *saved_value_lookup(struct perf_evsel *evsel,
93 int cpu, int ctx, 96 int cpu,
94 bool create) 97 bool create,
98 enum stat_type type,
99 int ctx,
100 struct runtime_stat *st)
95{ 101{
102 struct rblist *rblist;
96 struct rb_node *nd; 103 struct rb_node *nd;
97 struct saved_value dm = { 104 struct saved_value dm = {
98 .cpu = cpu, 105 .cpu = cpu,
99 .ctx = ctx,
100 .evsel = evsel, 106 .evsel = evsel,
107 .type = type,
108 .ctx = ctx,
109 .stat = st,
101 }; 110 };
102 nd = rblist__find(&runtime_saved_values, &dm); 111
112 rblist = &st->value_list;
113
114 nd = rblist__find(rblist, &dm);
103 if (nd) 115 if (nd)
104 return container_of(nd, struct saved_value, rb_node); 116 return container_of(nd, struct saved_value, rb_node);
105 if (create) { 117 if (create) {
106 rblist__add_node(&runtime_saved_values, &dm); 118 rblist__add_node(rblist, &dm);
107 nd = rblist__find(&runtime_saved_values, &dm); 119 nd = rblist__find(rblist, &dm);
108 if (nd) 120 if (nd)
109 return container_of(nd, struct saved_value, rb_node); 121 return container_of(nd, struct saved_value, rb_node);
110 } 122 }
111 return NULL; 123 return NULL;
112} 124}
113 125
126void runtime_stat__init(struct runtime_stat *st)
127{
128 struct rblist *rblist = &st->value_list;
129
130 rblist__init(rblist);
131 rblist->node_cmp = saved_value_cmp;
132 rblist->node_new = saved_value_new;
133 rblist->node_delete = saved_value_delete;
134}
135
136void runtime_stat__exit(struct runtime_stat *st)
137{
138 rblist__exit(&st->value_list);
139}
140
114void perf_stat__init_shadow_stats(void) 141void perf_stat__init_shadow_stats(void)
115{ 142{
116 have_frontend_stalled = pmu_have_event("cpu", "stalled-cycles-frontend"); 143 have_frontend_stalled = pmu_have_event("cpu", "stalled-cycles-frontend");
117 rblist__init(&runtime_saved_values); 144 runtime_stat__init(&rt_stat);
118 runtime_saved_values.node_cmp = saved_value_cmp;
119 runtime_saved_values.node_new = saved_value_new;
120 /* No delete for now */
121} 145}
122 146
123static int evsel_context(struct perf_evsel *evsel) 147static int evsel_context(struct perf_evsel *evsel)
@@ -138,36 +162,13 @@ static int evsel_context(struct perf_evsel *evsel)
138 return ctx; 162 return ctx;
139} 163}
140 164
141void perf_stat__reset_shadow_stats(void) 165static void reset_stat(struct runtime_stat *st)
142{ 166{
167 struct rblist *rblist;
143 struct rb_node *pos, *next; 168 struct rb_node *pos, *next;
144 169
145 memset(runtime_nsecs_stats, 0, sizeof(runtime_nsecs_stats)); 170 rblist = &st->value_list;
146 memset(runtime_cycles_stats, 0, sizeof(runtime_cycles_stats)); 171 next = rb_first(&rblist->entries);
147 memset(runtime_stalled_cycles_front_stats, 0, sizeof(runtime_stalled_cycles_front_stats));
148 memset(runtime_stalled_cycles_back_stats, 0, sizeof(runtime_stalled_cycles_back_stats));
149 memset(runtime_branches_stats, 0, sizeof(runtime_branches_stats));
150 memset(runtime_cacherefs_stats, 0, sizeof(runtime_cacherefs_stats));
151 memset(runtime_l1_dcache_stats, 0, sizeof(runtime_l1_dcache_stats));
152 memset(runtime_l1_icache_stats, 0, sizeof(runtime_l1_icache_stats));
153 memset(runtime_ll_cache_stats, 0, sizeof(runtime_ll_cache_stats));
154 memset(runtime_itlb_cache_stats, 0, sizeof(runtime_itlb_cache_stats));
155 memset(runtime_dtlb_cache_stats, 0, sizeof(runtime_dtlb_cache_stats));
156 memset(runtime_cycles_in_tx_stats, 0,
157 sizeof(runtime_cycles_in_tx_stats));
158 memset(runtime_transaction_stats, 0,
159 sizeof(runtime_transaction_stats));
160 memset(runtime_elision_stats, 0, sizeof(runtime_elision_stats));
161 memset(&walltime_nsecs_stats, 0, sizeof(walltime_nsecs_stats));
162 memset(runtime_topdown_total_slots, 0, sizeof(runtime_topdown_total_slots));
163 memset(runtime_topdown_slots_retired, 0, sizeof(runtime_topdown_slots_retired));
164 memset(runtime_topdown_slots_issued, 0, sizeof(runtime_topdown_slots_issued));
165 memset(runtime_topdown_fetch_bubbles, 0, sizeof(runtime_topdown_fetch_bubbles));
166 memset(runtime_topdown_recovery_bubbles, 0, sizeof(runtime_topdown_recovery_bubbles));
167 memset(runtime_smi_num_stats, 0, sizeof(runtime_smi_num_stats));
168 memset(runtime_aperf_stats, 0, sizeof(runtime_aperf_stats));
169
170 next = rb_first(&runtime_saved_values.entries);
171 while (next) { 172 while (next) {
172 pos = next; 173 pos = next;
173 next = rb_next(pos); 174 next = rb_next(pos);
@@ -177,64 +178,95 @@ void perf_stat__reset_shadow_stats(void)
177 } 178 }
178} 179}
179 180
181void perf_stat__reset_shadow_stats(void)
182{
183 reset_stat(&rt_stat);
184 memset(&walltime_nsecs_stats, 0, sizeof(walltime_nsecs_stats));
185}
186
187void perf_stat__reset_shadow_per_stat(struct runtime_stat *st)
188{
189 reset_stat(st);
190}
191
192static void update_runtime_stat(struct runtime_stat *st,
193 enum stat_type type,
194 int ctx, int cpu, u64 count)
195{
196 struct saved_value *v = saved_value_lookup(NULL, cpu, true,
197 type, ctx, st);
198
199 if (v)
200 update_stats(&v->stats, count);
201}
202
180/* 203/*
181 * Update various tracking values we maintain to print 204 * Update various tracking values we maintain to print
182 * more semantic information such as miss/hit ratios, 205 * more semantic information such as miss/hit ratios,
183 * instruction rates, etc: 206 * instruction rates, etc:
184 */ 207 */
185void perf_stat__update_shadow_stats(struct perf_evsel *counter, u64 *count, 208void perf_stat__update_shadow_stats(struct perf_evsel *counter, u64 count,
186 int cpu) 209 int cpu, struct runtime_stat *st)
187{ 210{
188 int ctx = evsel_context(counter); 211 int ctx = evsel_context(counter);
189 212
213 count *= counter->scale;
214
190 if (perf_evsel__match(counter, SOFTWARE, SW_TASK_CLOCK) || 215 if (perf_evsel__match(counter, SOFTWARE, SW_TASK_CLOCK) ||
191 perf_evsel__match(counter, SOFTWARE, SW_CPU_CLOCK)) 216 perf_evsel__match(counter, SOFTWARE, SW_CPU_CLOCK))
192 update_stats(&runtime_nsecs_stats[cpu], count[0]); 217 update_runtime_stat(st, STAT_NSECS, 0, cpu, count);
193 else if (perf_evsel__match(counter, HARDWARE, HW_CPU_CYCLES)) 218 else if (perf_evsel__match(counter, HARDWARE, HW_CPU_CYCLES))
194 update_stats(&runtime_cycles_stats[ctx][cpu], count[0]); 219 update_runtime_stat(st, STAT_CYCLES, ctx, cpu, count);
195 else if (perf_stat_evsel__is(counter, CYCLES_IN_TX)) 220 else if (perf_stat_evsel__is(counter, CYCLES_IN_TX))
196 update_stats(&runtime_cycles_in_tx_stats[ctx][cpu], count[0]); 221 update_runtime_stat(st, STAT_CYCLES_IN_TX, ctx, cpu, count);
197 else if (perf_stat_evsel__is(counter, TRANSACTION_START)) 222 else if (perf_stat_evsel__is(counter, TRANSACTION_START))
198 update_stats(&runtime_transaction_stats[ctx][cpu], count[0]); 223 update_runtime_stat(st, STAT_TRANSACTION, ctx, cpu, count);
199 else if (perf_stat_evsel__is(counter, ELISION_START)) 224 else if (perf_stat_evsel__is(counter, ELISION_START))
200 update_stats(&runtime_elision_stats[ctx][cpu], count[0]); 225 update_runtime_stat(st, STAT_ELISION, ctx, cpu, count);
201 else if (perf_stat_evsel__is(counter, TOPDOWN_TOTAL_SLOTS)) 226 else if (perf_stat_evsel__is(counter, TOPDOWN_TOTAL_SLOTS))
202 update_stats(&runtime_topdown_total_slots[ctx][cpu], count[0]); 227 update_runtime_stat(st, STAT_TOPDOWN_TOTAL_SLOTS,
228 ctx, cpu, count);
203 else if (perf_stat_evsel__is(counter, TOPDOWN_SLOTS_ISSUED)) 229 else if (perf_stat_evsel__is(counter, TOPDOWN_SLOTS_ISSUED))
204 update_stats(&runtime_topdown_slots_issued[ctx][cpu], count[0]); 230 update_runtime_stat(st, STAT_TOPDOWN_SLOTS_ISSUED,
231 ctx, cpu, count);
205 else if (perf_stat_evsel__is(counter, TOPDOWN_SLOTS_RETIRED)) 232 else if (perf_stat_evsel__is(counter, TOPDOWN_SLOTS_RETIRED))
206 update_stats(&runtime_topdown_slots_retired[ctx][cpu], count[0]); 233 update_runtime_stat(st, STAT_TOPDOWN_SLOTS_RETIRED,
234 ctx, cpu, count);
207 else if (perf_stat_evsel__is(counter, TOPDOWN_FETCH_BUBBLES)) 235 else if (perf_stat_evsel__is(counter, TOPDOWN_FETCH_BUBBLES))
208 update_stats(&runtime_topdown_fetch_bubbles[ctx][cpu],count[0]); 236 update_runtime_stat(st, STAT_TOPDOWN_FETCH_BUBBLES,
237 ctx, cpu, count);
209 else if (perf_stat_evsel__is(counter, TOPDOWN_RECOVERY_BUBBLES)) 238 else if (perf_stat_evsel__is(counter, TOPDOWN_RECOVERY_BUBBLES))
210 update_stats(&runtime_topdown_recovery_bubbles[ctx][cpu], count[0]); 239 update_runtime_stat(st, STAT_TOPDOWN_RECOVERY_BUBBLES,
240 ctx, cpu, count);
211 else if (perf_evsel__match(counter, HARDWARE, HW_STALLED_CYCLES_FRONTEND)) 241 else if (perf_evsel__match(counter, HARDWARE, HW_STALLED_CYCLES_FRONTEND))
212 update_stats(&runtime_stalled_cycles_front_stats[ctx][cpu], count[0]); 242 update_runtime_stat(st, STAT_STALLED_CYCLES_FRONT,
243 ctx, cpu, count);
213 else if (perf_evsel__match(counter, HARDWARE, HW_STALLED_CYCLES_BACKEND)) 244 else if (perf_evsel__match(counter, HARDWARE, HW_STALLED_CYCLES_BACKEND))
214 update_stats(&runtime_stalled_cycles_back_stats[ctx][cpu], count[0]); 245 update_runtime_stat(st, STAT_STALLED_CYCLES_BACK,
246 ctx, cpu, count);
215 else if (perf_evsel__match(counter, HARDWARE, HW_BRANCH_INSTRUCTIONS)) 247 else if (perf_evsel__match(counter, HARDWARE, HW_BRANCH_INSTRUCTIONS))
216 update_stats(&runtime_branches_stats[ctx][cpu], count[0]); 248 update_runtime_stat(st, STAT_BRANCHES, ctx, cpu, count);
217 else if (perf_evsel__match(counter, HARDWARE, HW_CACHE_REFERENCES)) 249 else if (perf_evsel__match(counter, HARDWARE, HW_CACHE_REFERENCES))
218 update_stats(&runtime_cacherefs_stats[ctx][cpu], count[0]); 250 update_runtime_stat(st, STAT_CACHEREFS, ctx, cpu, count);
219 else if (perf_evsel__match(counter, HW_CACHE, HW_CACHE_L1D)) 251 else if (perf_evsel__match(counter, HW_CACHE, HW_CACHE_L1D))
220 update_stats(&runtime_l1_dcache_stats[ctx][cpu], count[0]); 252 update_runtime_stat(st, STAT_L1_DCACHE, ctx, cpu, count);
221 else if (perf_evsel__match(counter, HW_CACHE, HW_CACHE_L1I)) 253 else if (perf_evsel__match(counter, HW_CACHE, HW_CACHE_L1I))
222 update_stats(&runtime_ll_cache_stats[ctx][cpu], count[0]); 254 update_runtime_stat(st, STAT_L1_ICACHE, ctx, cpu, count);
223 else if (perf_evsel__match(counter, HW_CACHE, HW_CACHE_LL)) 255 else if (perf_evsel__match(counter, HW_CACHE, HW_CACHE_LL))
224 update_stats(&runtime_ll_cache_stats[ctx][cpu], count[0]); 256 update_runtime_stat(st, STAT_LL_CACHE, ctx, cpu, count);
225 else if (perf_evsel__match(counter, HW_CACHE, HW_CACHE_DTLB)) 257 else if (perf_evsel__match(counter, HW_CACHE, HW_CACHE_DTLB))
226 update_stats(&runtime_dtlb_cache_stats[ctx][cpu], count[0]); 258 update_runtime_stat(st, STAT_DTLB_CACHE, ctx, cpu, count);
227 else if (perf_evsel__match(counter, HW_CACHE, HW_CACHE_ITLB)) 259 else if (perf_evsel__match(counter, HW_CACHE, HW_CACHE_ITLB))
228 update_stats(&runtime_itlb_cache_stats[ctx][cpu], count[0]); 260 update_runtime_stat(st, STAT_ITLB_CACHE, ctx, cpu, count);
229 else if (perf_stat_evsel__is(counter, SMI_NUM)) 261 else if (perf_stat_evsel__is(counter, SMI_NUM))
230 update_stats(&runtime_smi_num_stats[ctx][cpu], count[0]); 262 update_runtime_stat(st, STAT_SMI_NUM, ctx, cpu, count);
231 else if (perf_stat_evsel__is(counter, APERF)) 263 else if (perf_stat_evsel__is(counter, APERF))
232 update_stats(&runtime_aperf_stats[ctx][cpu], count[0]); 264 update_runtime_stat(st, STAT_APERF, ctx, cpu, count);
233 265
234 if (counter->collect_stat) { 266 if (counter->collect_stat) {
235 struct saved_value *v = saved_value_lookup(counter, cpu, ctx, 267 struct saved_value *v = saved_value_lookup(counter, cpu, true,
236 true); 268 STAT_NONE, 0, st);
237 update_stats(&v->stats, count[0]); 269 update_stats(&v->stats, count);
238 } 270 }
239} 271}
240 272
@@ -354,15 +386,40 @@ void perf_stat__collect_metric_expr(struct perf_evlist *evsel_list)
354 } 386 }
355} 387}
356 388
389static double runtime_stat_avg(struct runtime_stat *st,
390 enum stat_type type, int ctx, int cpu)
391{
392 struct saved_value *v;
393
394 v = saved_value_lookup(NULL, cpu, false, type, ctx, st);
395 if (!v)
396 return 0.0;
397
398 return avg_stats(&v->stats);
399}
400
401static double runtime_stat_n(struct runtime_stat *st,
402 enum stat_type type, int ctx, int cpu)
403{
404 struct saved_value *v;
405
406 v = saved_value_lookup(NULL, cpu, false, type, ctx, st);
407 if (!v)
408 return 0.0;
409
410 return v->stats.n;
411}
412
357static void print_stalled_cycles_frontend(int cpu, 413static void print_stalled_cycles_frontend(int cpu,
358 struct perf_evsel *evsel, double avg, 414 struct perf_evsel *evsel, double avg,
359 struct perf_stat_output_ctx *out) 415 struct perf_stat_output_ctx *out,
416 struct runtime_stat *st)
360{ 417{
361 double total, ratio = 0.0; 418 double total, ratio = 0.0;
362 const char *color; 419 const char *color;
363 int ctx = evsel_context(evsel); 420 int ctx = evsel_context(evsel);
364 421
365 total = avg_stats(&runtime_cycles_stats[ctx][cpu]); 422 total = runtime_stat_avg(st, STAT_CYCLES, ctx, cpu);
366 423
367 if (total) 424 if (total)
368 ratio = avg / total * 100.0; 425 ratio = avg / total * 100.0;
@@ -378,13 +435,14 @@ static void print_stalled_cycles_frontend(int cpu,
378 435
379static void print_stalled_cycles_backend(int cpu, 436static void print_stalled_cycles_backend(int cpu,
380 struct perf_evsel *evsel, double avg, 437 struct perf_evsel *evsel, double avg,
381 struct perf_stat_output_ctx *out) 438 struct perf_stat_output_ctx *out,
439 struct runtime_stat *st)
382{ 440{
383 double total, ratio = 0.0; 441 double total, ratio = 0.0;
384 const char *color; 442 const char *color;
385 int ctx = evsel_context(evsel); 443 int ctx = evsel_context(evsel);
386 444
387 total = avg_stats(&runtime_cycles_stats[ctx][cpu]); 445 total = runtime_stat_avg(st, STAT_CYCLES, ctx, cpu);
388 446
389 if (total) 447 if (total)
390 ratio = avg / total * 100.0; 448 ratio = avg / total * 100.0;
@@ -397,13 +455,14 @@ static void print_stalled_cycles_backend(int cpu,
397static void print_branch_misses(int cpu, 455static void print_branch_misses(int cpu,
398 struct perf_evsel *evsel, 456 struct perf_evsel *evsel,
399 double avg, 457 double avg,
400 struct perf_stat_output_ctx *out) 458 struct perf_stat_output_ctx *out,
459 struct runtime_stat *st)
401{ 460{
402 double total, ratio = 0.0; 461 double total, ratio = 0.0;
403 const char *color; 462 const char *color;
404 int ctx = evsel_context(evsel); 463 int ctx = evsel_context(evsel);
405 464
406 total = avg_stats(&runtime_branches_stats[ctx][cpu]); 465 total = runtime_stat_avg(st, STAT_BRANCHES, ctx, cpu);
407 466
408 if (total) 467 if (total)
409 ratio = avg / total * 100.0; 468 ratio = avg / total * 100.0;
@@ -416,13 +475,15 @@ static void print_branch_misses(int cpu,
416static void print_l1_dcache_misses(int cpu, 475static void print_l1_dcache_misses(int cpu,
417 struct perf_evsel *evsel, 476 struct perf_evsel *evsel,
418 double avg, 477 double avg,
419 struct perf_stat_output_ctx *out) 478 struct perf_stat_output_ctx *out,
479 struct runtime_stat *st)
480
420{ 481{
421 double total, ratio = 0.0; 482 double total, ratio = 0.0;
422 const char *color; 483 const char *color;
423 int ctx = evsel_context(evsel); 484 int ctx = evsel_context(evsel);
424 485
425 total = avg_stats(&runtime_l1_dcache_stats[ctx][cpu]); 486 total = runtime_stat_avg(st, STAT_L1_DCACHE, ctx, cpu);
426 487
427 if (total) 488 if (total)
428 ratio = avg / total * 100.0; 489 ratio = avg / total * 100.0;
@@ -435,13 +496,15 @@ static void print_l1_dcache_misses(int cpu,
435static void print_l1_icache_misses(int cpu, 496static void print_l1_icache_misses(int cpu,
436 struct perf_evsel *evsel, 497 struct perf_evsel *evsel,
437 double avg, 498 double avg,
438 struct perf_stat_output_ctx *out) 499 struct perf_stat_output_ctx *out,
500 struct runtime_stat *st)
501
439{ 502{
440 double total, ratio = 0.0; 503 double total, ratio = 0.0;
441 const char *color; 504 const char *color;
442 int ctx = evsel_context(evsel); 505 int ctx = evsel_context(evsel);
443 506
444 total = avg_stats(&runtime_l1_icache_stats[ctx][cpu]); 507 total = runtime_stat_avg(st, STAT_L1_ICACHE, ctx, cpu);
445 508
446 if (total) 509 if (total)
447 ratio = avg / total * 100.0; 510 ratio = avg / total * 100.0;
@@ -453,13 +516,14 @@ static void print_l1_icache_misses(int cpu,
453static void print_dtlb_cache_misses(int cpu, 516static void print_dtlb_cache_misses(int cpu,
454 struct perf_evsel *evsel, 517 struct perf_evsel *evsel,
455 double avg, 518 double avg,
456 struct perf_stat_output_ctx *out) 519 struct perf_stat_output_ctx *out,
520 struct runtime_stat *st)
457{ 521{
458 double total, ratio = 0.0; 522 double total, ratio = 0.0;
459 const char *color; 523 const char *color;
460 int ctx = evsel_context(evsel); 524 int ctx = evsel_context(evsel);
461 525
462 total = avg_stats(&runtime_dtlb_cache_stats[ctx][cpu]); 526 total = runtime_stat_avg(st, STAT_DTLB_CACHE, ctx, cpu);
463 527
464 if (total) 528 if (total)
465 ratio = avg / total * 100.0; 529 ratio = avg / total * 100.0;
@@ -471,13 +535,14 @@ static void print_dtlb_cache_misses(int cpu,
471static void print_itlb_cache_misses(int cpu, 535static void print_itlb_cache_misses(int cpu,
472 struct perf_evsel *evsel, 536 struct perf_evsel *evsel,
473 double avg, 537 double avg,
474 struct perf_stat_output_ctx *out) 538 struct perf_stat_output_ctx *out,
539 struct runtime_stat *st)
475{ 540{
476 double total, ratio = 0.0; 541 double total, ratio = 0.0;
477 const char *color; 542 const char *color;
478 int ctx = evsel_context(evsel); 543 int ctx = evsel_context(evsel);
479 544
480 total = avg_stats(&runtime_itlb_cache_stats[ctx][cpu]); 545 total = runtime_stat_avg(st, STAT_ITLB_CACHE, ctx, cpu);
481 546
482 if (total) 547 if (total)
483 ratio = avg / total * 100.0; 548 ratio = avg / total * 100.0;
@@ -489,13 +554,14 @@ static void print_itlb_cache_misses(int cpu,
489static void print_ll_cache_misses(int cpu, 554static void print_ll_cache_misses(int cpu,
490 struct perf_evsel *evsel, 555 struct perf_evsel *evsel,
491 double avg, 556 double avg,
492 struct perf_stat_output_ctx *out) 557 struct perf_stat_output_ctx *out,
558 struct runtime_stat *st)
493{ 559{
494 double total, ratio = 0.0; 560 double total, ratio = 0.0;
495 const char *color; 561 const char *color;
496 int ctx = evsel_context(evsel); 562 int ctx = evsel_context(evsel);
497 563
498 total = avg_stats(&runtime_ll_cache_stats[ctx][cpu]); 564 total = runtime_stat_avg(st, STAT_LL_CACHE, ctx, cpu);
499 565
500 if (total) 566 if (total)
501 ratio = avg / total * 100.0; 567 ratio = avg / total * 100.0;
@@ -553,68 +619,72 @@ static double sanitize_val(double x)
553 return x; 619 return x;
554} 620}
555 621
556static double td_total_slots(int ctx, int cpu) 622static double td_total_slots(int ctx, int cpu, struct runtime_stat *st)
557{ 623{
558 return avg_stats(&runtime_topdown_total_slots[ctx][cpu]); 624 return runtime_stat_avg(st, STAT_TOPDOWN_TOTAL_SLOTS, ctx, cpu);
559} 625}
560 626
561static double td_bad_spec(int ctx, int cpu) 627static double td_bad_spec(int ctx, int cpu, struct runtime_stat *st)
562{ 628{
563 double bad_spec = 0; 629 double bad_spec = 0;
564 double total_slots; 630 double total_slots;
565 double total; 631 double total;
566 632
567 total = avg_stats(&runtime_topdown_slots_issued[ctx][cpu]) - 633 total = runtime_stat_avg(st, STAT_TOPDOWN_SLOTS_ISSUED, ctx, cpu) -
568 avg_stats(&runtime_topdown_slots_retired[ctx][cpu]) + 634 runtime_stat_avg(st, STAT_TOPDOWN_SLOTS_RETIRED, ctx, cpu) +
569 avg_stats(&runtime_topdown_recovery_bubbles[ctx][cpu]); 635 runtime_stat_avg(st, STAT_TOPDOWN_RECOVERY_BUBBLES, ctx, cpu);
570 total_slots = td_total_slots(ctx, cpu); 636
637 total_slots = td_total_slots(ctx, cpu, st);
571 if (total_slots) 638 if (total_slots)
572 bad_spec = total / total_slots; 639 bad_spec = total / total_slots;
573 return sanitize_val(bad_spec); 640 return sanitize_val(bad_spec);
574} 641}
575 642
576static double td_retiring(int ctx, int cpu) 643static double td_retiring(int ctx, int cpu, struct runtime_stat *st)
577{ 644{
578 double retiring = 0; 645 double retiring = 0;
579 double total_slots = td_total_slots(ctx, cpu); 646 double total_slots = td_total_slots(ctx, cpu, st);
580 double ret_slots = avg_stats(&runtime_topdown_slots_retired[ctx][cpu]); 647 double ret_slots = runtime_stat_avg(st, STAT_TOPDOWN_SLOTS_RETIRED,
648 ctx, cpu);
581 649
582 if (total_slots) 650 if (total_slots)
583 retiring = ret_slots / total_slots; 651 retiring = ret_slots / total_slots;
584 return retiring; 652 return retiring;
585} 653}
586 654
587static double td_fe_bound(int ctx, int cpu) 655static double td_fe_bound(int ctx, int cpu, struct runtime_stat *st)
588{ 656{
589 double fe_bound = 0; 657 double fe_bound = 0;
590 double total_slots = td_total_slots(ctx, cpu); 658 double total_slots = td_total_slots(ctx, cpu, st);
591 double fetch_bub = avg_stats(&runtime_topdown_fetch_bubbles[ctx][cpu]); 659 double fetch_bub = runtime_stat_avg(st, STAT_TOPDOWN_FETCH_BUBBLES,
660 ctx, cpu);
592 661
593 if (total_slots) 662 if (total_slots)
594 fe_bound = fetch_bub / total_slots; 663 fe_bound = fetch_bub / total_slots;
595 return fe_bound; 664 return fe_bound;
596} 665}
597 666
598static double td_be_bound(int ctx, int cpu) 667static double td_be_bound(int ctx, int cpu, struct runtime_stat *st)
599{ 668{
600 double sum = (td_fe_bound(ctx, cpu) + 669 double sum = (td_fe_bound(ctx, cpu, st) +
601 td_bad_spec(ctx, cpu) + 670 td_bad_spec(ctx, cpu, st) +
602 td_retiring(ctx, cpu)); 671 td_retiring(ctx, cpu, st));
603 if (sum == 0) 672 if (sum == 0)
604 return 0; 673 return 0;
605 return sanitize_val(1.0 - sum); 674 return sanitize_val(1.0 - sum);
606} 675}
607 676
608static void print_smi_cost(int cpu, struct perf_evsel *evsel, 677static void print_smi_cost(int cpu, struct perf_evsel *evsel,
609 struct perf_stat_output_ctx *out) 678 struct perf_stat_output_ctx *out,
679 struct runtime_stat *st)
610{ 680{
611 double smi_num, aperf, cycles, cost = 0.0; 681 double smi_num, aperf, cycles, cost = 0.0;
612 int ctx = evsel_context(evsel); 682 int ctx = evsel_context(evsel);
613 const char *color = NULL; 683 const char *color = NULL;
614 684
615 smi_num = avg_stats(&runtime_smi_num_stats[ctx][cpu]); 685 smi_num = runtime_stat_avg(st, STAT_SMI_NUM, ctx, cpu);
616 aperf = avg_stats(&runtime_aperf_stats[ctx][cpu]); 686 aperf = runtime_stat_avg(st, STAT_APERF, ctx, cpu);
617 cycles = avg_stats(&runtime_cycles_stats[ctx][cpu]); 687 cycles = runtime_stat_avg(st, STAT_CYCLES, ctx, cpu);
618 688
619 if ((cycles == 0) || (aperf == 0)) 689 if ((cycles == 0) || (aperf == 0))
620 return; 690 return;
@@ -628,18 +698,75 @@ static void print_smi_cost(int cpu, struct perf_evsel *evsel,
628 out->print_metric(out->ctx, NULL, "%4.0f", "SMI#", smi_num); 698 out->print_metric(out->ctx, NULL, "%4.0f", "SMI#", smi_num);
629} 699}
630 700
701static void generic_metric(const char *metric_expr,
702 struct perf_evsel **metric_events,
703 char *name,
704 const char *metric_name,
705 double avg,
706 int cpu,
707 struct perf_stat_output_ctx *out,
708 struct runtime_stat *st)
709{
710 print_metric_t print_metric = out->print_metric;
711 struct parse_ctx pctx;
712 double ratio;
713 int i;
714 void *ctxp = out->ctx;
715
716 expr__ctx_init(&pctx);
717 expr__add_id(&pctx, name, avg);
718 for (i = 0; metric_events[i]; i++) {
719 struct saved_value *v;
720 struct stats *stats;
721 double scale;
722
723 if (!strcmp(metric_events[i]->name, "duration_time")) {
724 stats = &walltime_nsecs_stats;
725 scale = 1e-9;
726 } else {
727 v = saved_value_lookup(metric_events[i], cpu, false,
728 STAT_NONE, 0, st);
729 if (!v)
730 break;
731 stats = &v->stats;
732 scale = 1.0;
733 }
734 expr__add_id(&pctx, metric_events[i]->name, avg_stats(stats)*scale);
735 }
736 if (!metric_events[i]) {
737 const char *p = metric_expr;
738
739 if (expr__parse(&ratio, &pctx, &p) == 0)
740 print_metric(ctxp, NULL, "%8.1f",
741 metric_name ?
742 metric_name :
743 out->force_header ? name : "",
744 ratio);
745 else
746 print_metric(ctxp, NULL, NULL,
747 out->force_header ?
748 (metric_name ? metric_name : name) : "", 0);
749 } else
750 print_metric(ctxp, NULL, NULL, "", 0);
751}
752
631void perf_stat__print_shadow_stats(struct perf_evsel *evsel, 753void perf_stat__print_shadow_stats(struct perf_evsel *evsel,
632 double avg, int cpu, 754 double avg, int cpu,
633 struct perf_stat_output_ctx *out) 755 struct perf_stat_output_ctx *out,
756 struct rblist *metric_events,
757 struct runtime_stat *st)
634{ 758{
635 void *ctxp = out->ctx; 759 void *ctxp = out->ctx;
636 print_metric_t print_metric = out->print_metric; 760 print_metric_t print_metric = out->print_metric;
637 double total, ratio = 0.0, total2; 761 double total, ratio = 0.0, total2;
638 const char *color = NULL; 762 const char *color = NULL;
639 int ctx = evsel_context(evsel); 763 int ctx = evsel_context(evsel);
764 struct metric_event *me;
765 int num = 1;
640 766
641 if (perf_evsel__match(evsel, HARDWARE, HW_INSTRUCTIONS)) { 767 if (perf_evsel__match(evsel, HARDWARE, HW_INSTRUCTIONS)) {
642 total = avg_stats(&runtime_cycles_stats[ctx][cpu]); 768 total = runtime_stat_avg(st, STAT_CYCLES, ctx, cpu);
769
643 if (total) { 770 if (total) {
644 ratio = avg / total; 771 ratio = avg / total;
645 print_metric(ctxp, NULL, "%7.2f ", 772 print_metric(ctxp, NULL, "%7.2f ",
@@ -647,8 +774,13 @@ void perf_stat__print_shadow_stats(struct perf_evsel *evsel,
647 } else { 774 } else {
648 print_metric(ctxp, NULL, NULL, "insn per cycle", 0); 775 print_metric(ctxp, NULL, NULL, "insn per cycle", 0);
649 } 776 }
650 total = avg_stats(&runtime_stalled_cycles_front_stats[ctx][cpu]); 777
651 total = max(total, avg_stats(&runtime_stalled_cycles_back_stats[ctx][cpu])); 778 total = runtime_stat_avg(st, STAT_STALLED_CYCLES_FRONT,
779 ctx, cpu);
780
781 total = max(total, runtime_stat_avg(st,
782 STAT_STALLED_CYCLES_BACK,
783 ctx, cpu));
652 784
653 if (total && avg) { 785 if (total && avg) {
654 out->new_line(ctxp); 786 out->new_line(ctxp);
@@ -661,8 +793,8 @@ void perf_stat__print_shadow_stats(struct perf_evsel *evsel,
661 "stalled cycles per insn", 0); 793 "stalled cycles per insn", 0);
662 } 794 }
663 } else if (perf_evsel__match(evsel, HARDWARE, HW_BRANCH_MISSES)) { 795 } else if (perf_evsel__match(evsel, HARDWARE, HW_BRANCH_MISSES)) {
664 if (runtime_branches_stats[ctx][cpu].n != 0) 796 if (runtime_stat_n(st, STAT_BRANCHES, ctx, cpu) != 0)
665 print_branch_misses(cpu, evsel, avg, out); 797 print_branch_misses(cpu, evsel, avg, out, st);
666 else 798 else
667 print_metric(ctxp, NULL, NULL, "of all branches", 0); 799 print_metric(ctxp, NULL, NULL, "of all branches", 0);
668 } else if ( 800 } else if (
@@ -670,8 +802,9 @@ void perf_stat__print_shadow_stats(struct perf_evsel *evsel,
670 evsel->attr.config == ( PERF_COUNT_HW_CACHE_L1D | 802 evsel->attr.config == ( PERF_COUNT_HW_CACHE_L1D |
671 ((PERF_COUNT_HW_CACHE_OP_READ) << 8) | 803 ((PERF_COUNT_HW_CACHE_OP_READ) << 8) |
672 ((PERF_COUNT_HW_CACHE_RESULT_MISS) << 16))) { 804 ((PERF_COUNT_HW_CACHE_RESULT_MISS) << 16))) {
673 if (runtime_l1_dcache_stats[ctx][cpu].n != 0) 805
674 print_l1_dcache_misses(cpu, evsel, avg, out); 806 if (runtime_stat_n(st, STAT_L1_DCACHE, ctx, cpu) != 0)
807 print_l1_dcache_misses(cpu, evsel, avg, out, st);
675 else 808 else
676 print_metric(ctxp, NULL, NULL, "of all L1-dcache hits", 0); 809 print_metric(ctxp, NULL, NULL, "of all L1-dcache hits", 0);
677 } else if ( 810 } else if (
@@ -679,8 +812,9 @@ void perf_stat__print_shadow_stats(struct perf_evsel *evsel,
679 evsel->attr.config == ( PERF_COUNT_HW_CACHE_L1I | 812 evsel->attr.config == ( PERF_COUNT_HW_CACHE_L1I |
680 ((PERF_COUNT_HW_CACHE_OP_READ) << 8) | 813 ((PERF_COUNT_HW_CACHE_OP_READ) << 8) |
681 ((PERF_COUNT_HW_CACHE_RESULT_MISS) << 16))) { 814 ((PERF_COUNT_HW_CACHE_RESULT_MISS) << 16))) {
682 if (runtime_l1_icache_stats[ctx][cpu].n != 0) 815
683 print_l1_icache_misses(cpu, evsel, avg, out); 816 if (runtime_stat_n(st, STAT_L1_ICACHE, ctx, cpu) != 0)
817 print_l1_icache_misses(cpu, evsel, avg, out, st);
684 else 818 else
685 print_metric(ctxp, NULL, NULL, "of all L1-icache hits", 0); 819 print_metric(ctxp, NULL, NULL, "of all L1-icache hits", 0);
686 } else if ( 820 } else if (
@@ -688,8 +822,9 @@ void perf_stat__print_shadow_stats(struct perf_evsel *evsel,
688 evsel->attr.config == ( PERF_COUNT_HW_CACHE_DTLB | 822 evsel->attr.config == ( PERF_COUNT_HW_CACHE_DTLB |
689 ((PERF_COUNT_HW_CACHE_OP_READ) << 8) | 823 ((PERF_COUNT_HW_CACHE_OP_READ) << 8) |
690 ((PERF_COUNT_HW_CACHE_RESULT_MISS) << 16))) { 824 ((PERF_COUNT_HW_CACHE_RESULT_MISS) << 16))) {
691 if (runtime_dtlb_cache_stats[ctx][cpu].n != 0) 825
692 print_dtlb_cache_misses(cpu, evsel, avg, out); 826 if (runtime_stat_n(st, STAT_DTLB_CACHE, ctx, cpu) != 0)
827 print_dtlb_cache_misses(cpu, evsel, avg, out, st);
693 else 828 else
694 print_metric(ctxp, NULL, NULL, "of all dTLB cache hits", 0); 829 print_metric(ctxp, NULL, NULL, "of all dTLB cache hits", 0);
695 } else if ( 830 } else if (
@@ -697,8 +832,9 @@ void perf_stat__print_shadow_stats(struct perf_evsel *evsel,
697 evsel->attr.config == ( PERF_COUNT_HW_CACHE_ITLB | 832 evsel->attr.config == ( PERF_COUNT_HW_CACHE_ITLB |
698 ((PERF_COUNT_HW_CACHE_OP_READ) << 8) | 833 ((PERF_COUNT_HW_CACHE_OP_READ) << 8) |
699 ((PERF_COUNT_HW_CACHE_RESULT_MISS) << 16))) { 834 ((PERF_COUNT_HW_CACHE_RESULT_MISS) << 16))) {
700 if (runtime_itlb_cache_stats[ctx][cpu].n != 0) 835
701 print_itlb_cache_misses(cpu, evsel, avg, out); 836 if (runtime_stat_n(st, STAT_ITLB_CACHE, ctx, cpu) != 0)
837 print_itlb_cache_misses(cpu, evsel, avg, out, st);
702 else 838 else
703 print_metric(ctxp, NULL, NULL, "of all iTLB cache hits", 0); 839 print_metric(ctxp, NULL, NULL, "of all iTLB cache hits", 0);
704 } else if ( 840 } else if (
@@ -706,27 +842,28 @@ void perf_stat__print_shadow_stats(struct perf_evsel *evsel,
706 evsel->attr.config == ( PERF_COUNT_HW_CACHE_LL | 842 evsel->attr.config == ( PERF_COUNT_HW_CACHE_LL |
707 ((PERF_COUNT_HW_CACHE_OP_READ) << 8) | 843 ((PERF_COUNT_HW_CACHE_OP_READ) << 8) |
708 ((PERF_COUNT_HW_CACHE_RESULT_MISS) << 16))) { 844 ((PERF_COUNT_HW_CACHE_RESULT_MISS) << 16))) {
709 if (runtime_ll_cache_stats[ctx][cpu].n != 0) 845
710 print_ll_cache_misses(cpu, evsel, avg, out); 846 if (runtime_stat_n(st, STAT_LL_CACHE, ctx, cpu) != 0)
847 print_ll_cache_misses(cpu, evsel, avg, out, st);
711 else 848 else
712 print_metric(ctxp, NULL, NULL, "of all LL-cache hits", 0); 849 print_metric(ctxp, NULL, NULL, "of all LL-cache hits", 0);
713 } else if (perf_evsel__match(evsel, HARDWARE, HW_CACHE_MISSES)) { 850 } else if (perf_evsel__match(evsel, HARDWARE, HW_CACHE_MISSES)) {
714 total = avg_stats(&runtime_cacherefs_stats[ctx][cpu]); 851 total = runtime_stat_avg(st, STAT_CACHEREFS, ctx, cpu);
715 852
716 if (total) 853 if (total)
717 ratio = avg * 100 / total; 854 ratio = avg * 100 / total;
718 855
719 if (runtime_cacherefs_stats[ctx][cpu].n != 0) 856 if (runtime_stat_n(st, STAT_CACHEREFS, ctx, cpu) != 0)
720 print_metric(ctxp, NULL, "%8.3f %%", 857 print_metric(ctxp, NULL, "%8.3f %%",
721 "of all cache refs", ratio); 858 "of all cache refs", ratio);
722 else 859 else
723 print_metric(ctxp, NULL, NULL, "of all cache refs", 0); 860 print_metric(ctxp, NULL, NULL, "of all cache refs", 0);
724 } else if (perf_evsel__match(evsel, HARDWARE, HW_STALLED_CYCLES_FRONTEND)) { 861 } else if (perf_evsel__match(evsel, HARDWARE, HW_STALLED_CYCLES_FRONTEND)) {
725 print_stalled_cycles_frontend(cpu, evsel, avg, out); 862 print_stalled_cycles_frontend(cpu, evsel, avg, out, st);
726 } else if (perf_evsel__match(evsel, HARDWARE, HW_STALLED_CYCLES_BACKEND)) { 863 } else if (perf_evsel__match(evsel, HARDWARE, HW_STALLED_CYCLES_BACKEND)) {
727 print_stalled_cycles_backend(cpu, evsel, avg, out); 864 print_stalled_cycles_backend(cpu, evsel, avg, out, st);
728 } else if (perf_evsel__match(evsel, HARDWARE, HW_CPU_CYCLES)) { 865 } else if (perf_evsel__match(evsel, HARDWARE, HW_CPU_CYCLES)) {
729 total = avg_stats(&runtime_nsecs_stats[cpu]); 866 total = runtime_stat_avg(st, STAT_NSECS, 0, cpu);
730 867
731 if (total) { 868 if (total) {
732 ratio = avg / total; 869 ratio = avg / total;
@@ -735,7 +872,8 @@ void perf_stat__print_shadow_stats(struct perf_evsel *evsel,
735 print_metric(ctxp, NULL, NULL, "Ghz", 0); 872 print_metric(ctxp, NULL, NULL, "Ghz", 0);
736 } 873 }
737 } else if (perf_stat_evsel__is(evsel, CYCLES_IN_TX)) { 874 } else if (perf_stat_evsel__is(evsel, CYCLES_IN_TX)) {
738 total = avg_stats(&runtime_cycles_stats[ctx][cpu]); 875 total = runtime_stat_avg(st, STAT_CYCLES, ctx, cpu);
876
739 if (total) 877 if (total)
740 print_metric(ctxp, NULL, 878 print_metric(ctxp, NULL,
741 "%7.2f%%", "transactional cycles", 879 "%7.2f%%", "transactional cycles",
@@ -744,8 +882,9 @@ void perf_stat__print_shadow_stats(struct perf_evsel *evsel,
744 print_metric(ctxp, NULL, NULL, "transactional cycles", 882 print_metric(ctxp, NULL, NULL, "transactional cycles",
745 0); 883 0);
746 } else if (perf_stat_evsel__is(evsel, CYCLES_IN_TX_CP)) { 884 } else if (perf_stat_evsel__is(evsel, CYCLES_IN_TX_CP)) {
747 total = avg_stats(&runtime_cycles_stats[ctx][cpu]); 885 total = runtime_stat_avg(st, STAT_CYCLES, ctx, cpu);
748 total2 = avg_stats(&runtime_cycles_in_tx_stats[ctx][cpu]); 886 total2 = runtime_stat_avg(st, STAT_CYCLES_IN_TX, ctx, cpu);
887
749 if (total2 < avg) 888 if (total2 < avg)
750 total2 = avg; 889 total2 = avg;
751 if (total) 890 if (total)
@@ -754,19 +893,21 @@ void perf_stat__print_shadow_stats(struct perf_evsel *evsel,
754 else 893 else
755 print_metric(ctxp, NULL, NULL, "aborted cycles", 0); 894 print_metric(ctxp, NULL, NULL, "aborted cycles", 0);
756 } else if (perf_stat_evsel__is(evsel, TRANSACTION_START)) { 895 } else if (perf_stat_evsel__is(evsel, TRANSACTION_START)) {
757 total = avg_stats(&runtime_cycles_in_tx_stats[ctx][cpu]); 896 total = runtime_stat_avg(st, STAT_CYCLES_IN_TX,
897 ctx, cpu);
758 898
759 if (avg) 899 if (avg)
760 ratio = total / avg; 900 ratio = total / avg;
761 901
762 if (runtime_cycles_in_tx_stats[ctx][cpu].n != 0) 902 if (runtime_stat_n(st, STAT_CYCLES_IN_TX, ctx, cpu) != 0)
763 print_metric(ctxp, NULL, "%8.0f", 903 print_metric(ctxp, NULL, "%8.0f",
764 "cycles / transaction", ratio); 904 "cycles / transaction", ratio);
765 else 905 else
766 print_metric(ctxp, NULL, NULL, "cycles / transaction", 906 print_metric(ctxp, NULL, NULL, "cycles / transaction",
767 0); 907 0);
768 } else if (perf_stat_evsel__is(evsel, ELISION_START)) { 908 } else if (perf_stat_evsel__is(evsel, ELISION_START)) {
769 total = avg_stats(&runtime_cycles_in_tx_stats[ctx][cpu]); 909 total = runtime_stat_avg(st, STAT_CYCLES_IN_TX,
910 ctx, cpu);
770 911
771 if (avg) 912 if (avg)
772 ratio = total / avg; 913 ratio = total / avg;
@@ -780,28 +921,28 @@ void perf_stat__print_shadow_stats(struct perf_evsel *evsel,
780 else 921 else
781 print_metric(ctxp, NULL, NULL, "CPUs utilized", 0); 922 print_metric(ctxp, NULL, NULL, "CPUs utilized", 0);
782 } else if (perf_stat_evsel__is(evsel, TOPDOWN_FETCH_BUBBLES)) { 923 } else if (perf_stat_evsel__is(evsel, TOPDOWN_FETCH_BUBBLES)) {
783 double fe_bound = td_fe_bound(ctx, cpu); 924 double fe_bound = td_fe_bound(ctx, cpu, st);
784 925
785 if (fe_bound > 0.2) 926 if (fe_bound > 0.2)
786 color = PERF_COLOR_RED; 927 color = PERF_COLOR_RED;
787 print_metric(ctxp, color, "%8.1f%%", "frontend bound", 928 print_metric(ctxp, color, "%8.1f%%", "frontend bound",
788 fe_bound * 100.); 929 fe_bound * 100.);
789 } else if (perf_stat_evsel__is(evsel, TOPDOWN_SLOTS_RETIRED)) { 930 } else if (perf_stat_evsel__is(evsel, TOPDOWN_SLOTS_RETIRED)) {
790 double retiring = td_retiring(ctx, cpu); 931 double retiring = td_retiring(ctx, cpu, st);
791 932
792 if (retiring > 0.7) 933 if (retiring > 0.7)
793 color = PERF_COLOR_GREEN; 934 color = PERF_COLOR_GREEN;
794 print_metric(ctxp, color, "%8.1f%%", "retiring", 935 print_metric(ctxp, color, "%8.1f%%", "retiring",
795 retiring * 100.); 936 retiring * 100.);
796 } else if (perf_stat_evsel__is(evsel, TOPDOWN_RECOVERY_BUBBLES)) { 937 } else if (perf_stat_evsel__is(evsel, TOPDOWN_RECOVERY_BUBBLES)) {
797 double bad_spec = td_bad_spec(ctx, cpu); 938 double bad_spec = td_bad_spec(ctx, cpu, st);
798 939
799 if (bad_spec > 0.1) 940 if (bad_spec > 0.1)
800 color = PERF_COLOR_RED; 941 color = PERF_COLOR_RED;
801 print_metric(ctxp, color, "%8.1f%%", "bad speculation", 942 print_metric(ctxp, color, "%8.1f%%", "bad speculation",
802 bad_spec * 100.); 943 bad_spec * 100.);
803 } else if (perf_stat_evsel__is(evsel, TOPDOWN_SLOTS_ISSUED)) { 944 } else if (perf_stat_evsel__is(evsel, TOPDOWN_SLOTS_ISSUED)) {
804 double be_bound = td_be_bound(ctx, cpu); 945 double be_bound = td_be_bound(ctx, cpu, st);
805 const char *name = "backend bound"; 946 const char *name = "backend bound";
806 static int have_recovery_bubbles = -1; 947 static int have_recovery_bubbles = -1;
807 948
@@ -814,44 +955,19 @@ void perf_stat__print_shadow_stats(struct perf_evsel *evsel,
814 955
815 if (be_bound > 0.2) 956 if (be_bound > 0.2)
816 color = PERF_COLOR_RED; 957 color = PERF_COLOR_RED;
817 if (td_total_slots(ctx, cpu) > 0) 958 if (td_total_slots(ctx, cpu, st) > 0)
818 print_metric(ctxp, color, "%8.1f%%", name, 959 print_metric(ctxp, color, "%8.1f%%", name,
819 be_bound * 100.); 960 be_bound * 100.);
820 else 961 else
821 print_metric(ctxp, NULL, NULL, name, 0); 962 print_metric(ctxp, NULL, NULL, name, 0);
822 } else if (evsel->metric_expr) { 963 } else if (evsel->metric_expr) {
823 struct parse_ctx pctx; 964 generic_metric(evsel->metric_expr, evsel->metric_events, evsel->name,
824 int i; 965 evsel->metric_name, avg, cpu, out, st);
825 966 } else if (runtime_stat_n(st, STAT_NSECS, 0, cpu) != 0) {
826 expr__ctx_init(&pctx);
827 expr__add_id(&pctx, evsel->name, avg);
828 for (i = 0; evsel->metric_events[i]; i++) {
829 struct saved_value *v;
830
831 v = saved_value_lookup(evsel->metric_events[i], cpu, ctx, false);
832 if (!v)
833 break;
834 expr__add_id(&pctx, evsel->metric_events[i]->name,
835 avg_stats(&v->stats));
836 }
837 if (!evsel->metric_events[i]) {
838 const char *p = evsel->metric_expr;
839
840 if (expr__parse(&ratio, &pctx, &p) == 0)
841 print_metric(ctxp, NULL, "%8.1f",
842 evsel->metric_name ?
843 evsel->metric_name :
844 out->force_header ? evsel->name : "",
845 ratio);
846 else
847 print_metric(ctxp, NULL, NULL, "", 0);
848 } else
849 print_metric(ctxp, NULL, NULL, "", 0);
850 } else if (runtime_nsecs_stats[cpu].n != 0) {
851 char unit = 'M'; 967 char unit = 'M';
852 char unit_buf[10]; 968 char unit_buf[10];
853 969
854 total = avg_stats(&runtime_nsecs_stats[cpu]); 970 total = runtime_stat_avg(st, STAT_NSECS, 0, cpu);
855 971
856 if (total) 972 if (total)
857 ratio = 1000.0 * avg / total; 973 ratio = 1000.0 * avg / total;
@@ -862,8 +978,22 @@ void perf_stat__print_shadow_stats(struct perf_evsel *evsel,
862 snprintf(unit_buf, sizeof(unit_buf), "%c/sec", unit); 978 snprintf(unit_buf, sizeof(unit_buf), "%c/sec", unit);
863 print_metric(ctxp, NULL, "%8.3f", unit_buf, ratio); 979 print_metric(ctxp, NULL, "%8.3f", unit_buf, ratio);
864 } else if (perf_stat_evsel__is(evsel, SMI_NUM)) { 980 } else if (perf_stat_evsel__is(evsel, SMI_NUM)) {
865 print_smi_cost(cpu, evsel, out); 981 print_smi_cost(cpu, evsel, out, st);
866 } else { 982 } else {
867 print_metric(ctxp, NULL, NULL, NULL, 0); 983 num = 0;
984 }
985
986 if ((me = metricgroup__lookup(metric_events, evsel, false)) != NULL) {
987 struct metric_expr *mexp;
988
989 list_for_each_entry (mexp, &me->head, nd) {
990 if (num++ > 0)
991 out->new_line(ctxp);
992 generic_metric(mexp->metric_expr, mexp->metric_events,
993 evsel->name, mexp->metric_name,
994 avg, cpu, out, st);
995 }
868 } 996 }
997 if (num == 0)
998 print_metric(ctxp, NULL, NULL, NULL, 0);
869} 999}
diff --git a/tools/perf/util/stat.c b/tools/perf/util/stat.c
index c9bae5fb8b47..32235657c1ac 100644
--- a/tools/perf/util/stat.c
+++ b/tools/perf/util/stat.c
@@ -70,7 +70,7 @@ double rel_stddev_stats(double stddev, double avg)
70bool __perf_evsel_stat__is(struct perf_evsel *evsel, 70bool __perf_evsel_stat__is(struct perf_evsel *evsel,
71 enum perf_stat_evsel_id id) 71 enum perf_stat_evsel_id id)
72{ 72{
73 struct perf_stat_evsel *ps = evsel->priv; 73 struct perf_stat_evsel *ps = evsel->stats;
74 74
75 return ps->id == id; 75 return ps->id == id;
76} 76}
@@ -94,7 +94,7 @@ static const char *id_str[PERF_STAT_EVSEL_ID__MAX] = {
94 94
95void perf_stat_evsel_id_init(struct perf_evsel *evsel) 95void perf_stat_evsel_id_init(struct perf_evsel *evsel)
96{ 96{
97 struct perf_stat_evsel *ps = evsel->priv; 97 struct perf_stat_evsel *ps = evsel->stats;
98 int i; 98 int i;
99 99
100 /* ps->id is 0 hence PERF_STAT_EVSEL_ID__NONE by default */ 100 /* ps->id is 0 hence PERF_STAT_EVSEL_ID__NONE by default */
@@ -110,7 +110,7 @@ void perf_stat_evsel_id_init(struct perf_evsel *evsel)
110static void perf_evsel__reset_stat_priv(struct perf_evsel *evsel) 110static void perf_evsel__reset_stat_priv(struct perf_evsel *evsel)
111{ 111{
112 int i; 112 int i;
113 struct perf_stat_evsel *ps = evsel->priv; 113 struct perf_stat_evsel *ps = evsel->stats;
114 114
115 for (i = 0; i < 3; i++) 115 for (i = 0; i < 3; i++)
116 init_stats(&ps->res_stats[i]); 116 init_stats(&ps->res_stats[i]);
@@ -120,8 +120,8 @@ static void perf_evsel__reset_stat_priv(struct perf_evsel *evsel)
120 120
121static int perf_evsel__alloc_stat_priv(struct perf_evsel *evsel) 121static int perf_evsel__alloc_stat_priv(struct perf_evsel *evsel)
122{ 122{
123 evsel->priv = zalloc(sizeof(struct perf_stat_evsel)); 123 evsel->stats = zalloc(sizeof(struct perf_stat_evsel));
124 if (evsel->priv == NULL) 124 if (evsel->stats == NULL)
125 return -ENOMEM; 125 return -ENOMEM;
126 perf_evsel__reset_stat_priv(evsel); 126 perf_evsel__reset_stat_priv(evsel);
127 return 0; 127 return 0;
@@ -129,11 +129,11 @@ static int perf_evsel__alloc_stat_priv(struct perf_evsel *evsel)
129 129
130static void perf_evsel__free_stat_priv(struct perf_evsel *evsel) 130static void perf_evsel__free_stat_priv(struct perf_evsel *evsel)
131{ 131{
132 struct perf_stat_evsel *ps = evsel->priv; 132 struct perf_stat_evsel *ps = evsel->stats;
133 133
134 if (ps) 134 if (ps)
135 free(ps->group_data); 135 free(ps->group_data);
136 zfree(&evsel->priv); 136 zfree(&evsel->stats);
137} 137}
138 138
139static int perf_evsel__alloc_prev_raw_counts(struct perf_evsel *evsel, 139static int perf_evsel__alloc_prev_raw_counts(struct perf_evsel *evsel,
@@ -278,7 +278,16 @@ process_counter_values(struct perf_stat_config *config, struct perf_evsel *evsel
278 perf_evsel__compute_deltas(evsel, cpu, thread, count); 278 perf_evsel__compute_deltas(evsel, cpu, thread, count);
279 perf_counts_values__scale(count, config->scale, NULL); 279 perf_counts_values__scale(count, config->scale, NULL);
280 if (config->aggr_mode == AGGR_NONE) 280 if (config->aggr_mode == AGGR_NONE)
281 perf_stat__update_shadow_stats(evsel, count->values, cpu); 281 perf_stat__update_shadow_stats(evsel, count->val, cpu,
282 &rt_stat);
283 if (config->aggr_mode == AGGR_THREAD) {
284 if (config->stats)
285 perf_stat__update_shadow_stats(evsel,
286 count->val, 0, &config->stats[thread]);
287 else
288 perf_stat__update_shadow_stats(evsel,
289 count->val, 0, &rt_stat);
290 }
282 break; 291 break;
283 case AGGR_GLOBAL: 292 case AGGR_GLOBAL:
284 aggr->val += count->val; 293 aggr->val += count->val;
@@ -319,9 +328,8 @@ int perf_stat_process_counter(struct perf_stat_config *config,
319 struct perf_evsel *counter) 328 struct perf_evsel *counter)
320{ 329{
321 struct perf_counts_values *aggr = &counter->counts->aggr; 330 struct perf_counts_values *aggr = &counter->counts->aggr;
322 struct perf_stat_evsel *ps = counter->priv; 331 struct perf_stat_evsel *ps = counter->stats;
323 u64 *count = counter->counts->aggr.values; 332 u64 *count = counter->counts->aggr.values;
324 u64 val;
325 int i, ret; 333 int i, ret;
326 334
327 aggr->val = aggr->ena = aggr->run = 0; 335 aggr->val = aggr->ena = aggr->run = 0;
@@ -361,8 +369,7 @@ int perf_stat_process_counter(struct perf_stat_config *config,
361 /* 369 /*
362 * Save the full runtime - to allow normalization during printout: 370 * Save the full runtime - to allow normalization during printout:
363 */ 371 */
364 val = counter->scale * *count; 372 perf_stat__update_shadow_stats(counter, *count, 0, &rt_stat);
365 perf_stat__update_shadow_stats(counter, &val, 0);
366 373
367 return 0; 374 return 0;
368} 375}
diff --git a/tools/perf/util/stat.h b/tools/perf/util/stat.h
index 96326b1f9443..dbc6f7134f61 100644
--- a/tools/perf/util/stat.h
+++ b/tools/perf/util/stat.h
@@ -5,6 +5,7 @@
5#include <linux/types.h> 5#include <linux/types.h>
6#include <stdio.h> 6#include <stdio.h>
7#include "xyarray.h" 7#include "xyarray.h"
8#include "rblist.h"
8 9
9struct stats 10struct stats
10{ 11{
@@ -43,11 +44,54 @@ enum aggr_mode {
43 AGGR_UNSET, 44 AGGR_UNSET,
44}; 45};
45 46
47enum {
48 CTX_BIT_USER = 1 << 0,
49 CTX_BIT_KERNEL = 1 << 1,
50 CTX_BIT_HV = 1 << 2,
51 CTX_BIT_HOST = 1 << 3,
52 CTX_BIT_IDLE = 1 << 4,
53 CTX_BIT_MAX = 1 << 5,
54};
55
56#define NUM_CTX CTX_BIT_MAX
57
58enum stat_type {
59 STAT_NONE = 0,
60 STAT_NSECS,
61 STAT_CYCLES,
62 STAT_STALLED_CYCLES_FRONT,
63 STAT_STALLED_CYCLES_BACK,
64 STAT_BRANCHES,
65 STAT_CACHEREFS,
66 STAT_L1_DCACHE,
67 STAT_L1_ICACHE,
68 STAT_LL_CACHE,
69 STAT_ITLB_CACHE,
70 STAT_DTLB_CACHE,
71 STAT_CYCLES_IN_TX,
72 STAT_TRANSACTION,
73 STAT_ELISION,
74 STAT_TOPDOWN_TOTAL_SLOTS,
75 STAT_TOPDOWN_SLOTS_ISSUED,
76 STAT_TOPDOWN_SLOTS_RETIRED,
77 STAT_TOPDOWN_FETCH_BUBBLES,
78 STAT_TOPDOWN_RECOVERY_BUBBLES,
79 STAT_SMI_NUM,
80 STAT_APERF,
81 STAT_MAX
82};
83
84struct runtime_stat {
85 struct rblist value_list;
86};
87
46struct perf_stat_config { 88struct perf_stat_config {
47 enum aggr_mode aggr_mode; 89 enum aggr_mode aggr_mode;
48 bool scale; 90 bool scale;
49 FILE *output; 91 FILE *output;
50 unsigned int interval; 92 unsigned int interval;
93 struct runtime_stat *stats;
94 int stats_num;
51}; 95};
52 96
53void update_stats(struct stats *stats, u64 val); 97void update_stats(struct stats *stats, u64 val);
@@ -67,6 +111,15 @@ static inline void init_stats(struct stats *stats)
67struct perf_evsel; 111struct perf_evsel;
68struct perf_evlist; 112struct perf_evlist;
69 113
114struct perf_aggr_thread_value {
115 struct perf_evsel *counter;
116 int id;
117 double uval;
118 u64 val;
119 u64 run;
120 u64 ena;
121};
122
70bool __perf_evsel_stat__is(struct perf_evsel *evsel, 123bool __perf_evsel_stat__is(struct perf_evsel *evsel,
71 enum perf_stat_evsel_id id); 124 enum perf_stat_evsel_id id);
72 125
@@ -75,16 +128,20 @@ bool __perf_evsel_stat__is(struct perf_evsel *evsel,
75 128
76void perf_stat_evsel_id_init(struct perf_evsel *evsel); 129void perf_stat_evsel_id_init(struct perf_evsel *evsel);
77 130
131extern struct runtime_stat rt_stat;
78extern struct stats walltime_nsecs_stats; 132extern struct stats walltime_nsecs_stats;
79 133
80typedef void (*print_metric_t)(void *ctx, const char *color, const char *unit, 134typedef void (*print_metric_t)(void *ctx, const char *color, const char *unit,
81 const char *fmt, double val); 135 const char *fmt, double val);
82typedef void (*new_line_t )(void *ctx); 136typedef void (*new_line_t )(void *ctx);
83 137
138void runtime_stat__init(struct runtime_stat *st);
139void runtime_stat__exit(struct runtime_stat *st);
84void perf_stat__init_shadow_stats(void); 140void perf_stat__init_shadow_stats(void);
85void perf_stat__reset_shadow_stats(void); 141void perf_stat__reset_shadow_stats(void);
86void perf_stat__update_shadow_stats(struct perf_evsel *counter, u64 *count, 142void perf_stat__reset_shadow_per_stat(struct runtime_stat *st);
87 int cpu); 143void perf_stat__update_shadow_stats(struct perf_evsel *counter, u64 count,
144 int cpu, struct runtime_stat *st);
88struct perf_stat_output_ctx { 145struct perf_stat_output_ctx {
89 void *ctx; 146 void *ctx;
90 print_metric_t print_metric; 147 print_metric_t print_metric;
@@ -94,7 +151,9 @@ struct perf_stat_output_ctx {
94 151
95void perf_stat__print_shadow_stats(struct perf_evsel *evsel, 152void perf_stat__print_shadow_stats(struct perf_evsel *evsel,
96 double avg, int cpu, 153 double avg, int cpu,
97 struct perf_stat_output_ctx *out); 154 struct perf_stat_output_ctx *out,
155 struct rblist *metric_events,
156 struct runtime_stat *st);
98void perf_stat__collect_metric_expr(struct perf_evlist *); 157void perf_stat__collect_metric_expr(struct perf_evlist *);
99 158
100int perf_evlist__alloc_stats(struct perf_evlist *evlist, bool alloc_raw); 159int perf_evlist__alloc_stats(struct perf_evlist *evlist, bool alloc_raw);
diff --git a/tools/perf/util/string.c b/tools/perf/util/string.c
index aaa08ee8c717..d8bfd0c4d2cb 100644
--- a/tools/perf/util/string.c
+++ b/tools/perf/util/string.c
@@ -396,3 +396,49 @@ out_err_overflow:
396 free(expr); 396 free(expr);
397 return NULL; 397 return NULL;
398} 398}
399
400/* Like strpbrk(), but not break if it is right after a backslash (escaped) */
401char *strpbrk_esc(char *str, const char *stopset)
402{
403 char *ptr;
404
405 do {
406 ptr = strpbrk(str, stopset);
407 if (ptr == str ||
408 (ptr == str + 1 && *(ptr - 1) != '\\'))
409 break;
410 str = ptr + 1;
411 } while (ptr && *(ptr - 1) == '\\' && *(ptr - 2) != '\\');
412
413 return ptr;
414}
415
416/* Like strdup, but do not copy a single backslash */
417char *strdup_esc(const char *str)
418{
419 char *s, *d, *p, *ret = strdup(str);
420
421 if (!ret)
422 return NULL;
423
424 d = strchr(ret, '\\');
425 if (!d)
426 return ret;
427
428 s = d + 1;
429 do {
430 if (*s == '\0') {
431 *d = '\0';
432 break;
433 }
434 p = strchr(s + 1, '\\');
435 if (p) {
436 memmove(d, s, p - s);
437 d += p - s;
438 s = p + 1;
439 } else
440 memmove(d, s, strlen(s) + 1);
441 } while (p);
442
443 return ret;
444}
diff --git a/tools/perf/util/string2.h b/tools/perf/util/string2.h
index ee14ca5451ab..4c68a09b97e8 100644
--- a/tools/perf/util/string2.h
+++ b/tools/perf/util/string2.h
@@ -39,5 +39,7 @@ static inline char *asprintf_expr_not_in_ints(const char *var, size_t nints, int
39 return asprintf_expr_inout_ints(var, false, nints, ints); 39 return asprintf_expr_inout_ints(var, false, nints, ints);
40} 40}
41 41
42char *strpbrk_esc(char *str, const char *stopset);
43char *strdup_esc(const char *str);
42 44
43#endif /* PERF_STRING_H */ 45#endif /* PERF_STRING_H */
diff --git a/tools/perf/util/symbol.c b/tools/perf/util/symbol.c
index 6492ef38b090..cc065d4bfafc 100644
--- a/tools/perf/util/symbol.c
+++ b/tools/perf/util/symbol.c
@@ -46,6 +46,7 @@ struct symbol_conf symbol_conf = {
46 .show_hist_headers = true, 46 .show_hist_headers = true,
47 .symfs = "", 47 .symfs = "",
48 .event_group = true, 48 .event_group = true,
49 .inline_name = true,
49}; 50};
50 51
51static enum dso_binary_type binary_type_symtab[] = { 52static enum dso_binary_type binary_type_symtab[] = {
@@ -93,6 +94,11 @@ static int prefix_underscores_count(const char *str)
93 return tail - str; 94 return tail - str;
94} 95}
95 96
97const char * __weak arch__normalize_symbol_name(const char *name)
98{
99 return name;
100}
101
96int __weak arch__compare_symbol_names(const char *namea, const char *nameb) 102int __weak arch__compare_symbol_names(const char *namea, const char *nameb)
97{ 103{
98 return strcmp(namea, nameb); 104 return strcmp(namea, nameb);
@@ -227,7 +233,7 @@ void __map_groups__fixup_end(struct map_groups *mg, enum map_type type)
227 struct maps *maps = &mg->maps[type]; 233 struct maps *maps = &mg->maps[type];
228 struct map *next, *curr; 234 struct map *next, *curr;
229 235
230 pthread_rwlock_wrlock(&maps->lock); 236 down_write(&maps->lock);
231 237
232 curr = maps__first(maps); 238 curr = maps__first(maps);
233 if (curr == NULL) 239 if (curr == NULL)
@@ -247,7 +253,7 @@ void __map_groups__fixup_end(struct map_groups *mg, enum map_type type)
247 curr->end = ~0ULL; 253 curr->end = ~0ULL;
248 254
249out_unlock: 255out_unlock:
250 pthread_rwlock_unlock(&maps->lock); 256 up_write(&maps->lock);
251} 257}
252 258
253struct symbol *symbol__new(u64 start, u64 len, u8 binding, const char *name) 259struct symbol *symbol__new(u64 start, u64 len, u8 binding, const char *name)
@@ -1672,7 +1678,7 @@ struct map *map_groups__find_by_name(struct map_groups *mg,
1672 struct maps *maps = &mg->maps[type]; 1678 struct maps *maps = &mg->maps[type];
1673 struct map *map; 1679 struct map *map;
1674 1680
1675 pthread_rwlock_rdlock(&maps->lock); 1681 down_read(&maps->lock);
1676 1682
1677 for (map = maps__first(maps); map; map = map__next(map)) { 1683 for (map = maps__first(maps); map; map = map__next(map)) {
1678 if (map->dso && strcmp(map->dso->short_name, name) == 0) 1684 if (map->dso && strcmp(map->dso->short_name, name) == 0)
@@ -1682,7 +1688,7 @@ struct map *map_groups__find_by_name(struct map_groups *mg,
1682 map = NULL; 1688 map = NULL;
1683 1689
1684out_unlock: 1690out_unlock:
1685 pthread_rwlock_unlock(&maps->lock); 1691 up_read(&maps->lock);
1686 return map; 1692 return map;
1687} 1693}
1688 1694
diff --git a/tools/perf/util/symbol.h b/tools/perf/util/symbol.h
index 6352022593c6..0563f33c1eb3 100644
--- a/tools/perf/util/symbol.h
+++ b/tools/perf/util/symbol.h
@@ -60,6 +60,7 @@ struct symbol {
60 u8 binding; 60 u8 binding;
61 u8 idle:1; 61 u8 idle:1;
62 u8 ignore:1; 62 u8 ignore:1;
63 u8 inlined:1;
63 u8 arch_sym; 64 u8 arch_sym;
64 char name[0]; 65 char name[0];
65}; 66};
@@ -209,6 +210,7 @@ struct addr_location {
209 struct thread *thread; 210 struct thread *thread;
210 struct map *map; 211 struct map *map;
211 struct symbol *sym; 212 struct symbol *sym;
213 const char *srcline;
212 u64 addr; 214 u64 addr;
213 char level; 215 char level;
214 u8 filtered; 216 u8 filtered;
@@ -347,6 +349,7 @@ bool elf__needs_adjust_symbols(GElf_Ehdr ehdr);
347void arch__sym_update(struct symbol *s, GElf_Sym *sym); 349void arch__sym_update(struct symbol *s, GElf_Sym *sym);
348#endif 350#endif
349 351
352const char *arch__normalize_symbol_name(const char *name);
350#define SYMBOL_A 0 353#define SYMBOL_A 0
351#define SYMBOL_B 1 354#define SYMBOL_B 1
352 355
diff --git a/tools/perf/util/syscalltbl.c b/tools/perf/util/syscalltbl.c
index 6eea7cff3d4e..303bdb84ab5a 100644
--- a/tools/perf/util/syscalltbl.c
+++ b/tools/perf/util/syscalltbl.c
@@ -26,6 +26,10 @@
26#include <asm/syscalls_64.c> 26#include <asm/syscalls_64.c>
27const int syscalltbl_native_max_id = SYSCALLTBL_x86_64_MAX_ID; 27const int syscalltbl_native_max_id = SYSCALLTBL_x86_64_MAX_ID;
28static const char **syscalltbl_native = syscalltbl_x86_64; 28static const char **syscalltbl_native = syscalltbl_x86_64;
29#elif defined(__s390x__)
30#include <asm/syscalls_64.c>
31const int syscalltbl_native_max_id = SYSCALLTBL_S390_64_MAX_ID;
32static const char **syscalltbl_native = syscalltbl_s390_64;
29#endif 33#endif
30 34
31struct syscall { 35struct syscall {
diff --git a/tools/perf/util/target.h b/tools/perf/util/target.h
index 446aa7a56f25..6ef01a83b24e 100644
--- a/tools/perf/util/target.h
+++ b/tools/perf/util/target.h
@@ -64,6 +64,11 @@ static inline bool target__none(struct target *target)
64 return !target__has_task(target) && !target__has_cpu(target); 64 return !target__has_task(target) && !target__has_cpu(target);
65} 65}
66 66
67static inline bool target__has_per_thread(struct target *target)
68{
69 return target->system_wide && target->per_thread;
70}
71
67static inline bool target__uses_dummy_map(struct target *target) 72static inline bool target__uses_dummy_map(struct target *target)
68{ 73{
69 bool use_dummy = false; 74 bool use_dummy = false;
@@ -73,6 +78,8 @@ static inline bool target__uses_dummy_map(struct target *target)
73 else if (target__has_task(target) || 78 else if (target__has_task(target) ||
74 (!target__has_cpu(target) && !target->uses_mmap)) 79 (!target__has_cpu(target) && !target->uses_mmap))
75 use_dummy = true; 80 use_dummy = true;
81 else if (target__has_per_thread(target))
82 use_dummy = true;
76 83
77 return use_dummy; 84 return use_dummy;
78} 85}
diff --git a/tools/perf/util/thread.c b/tools/perf/util/thread.c
index 1dbcd3c8dee0..68b65b10579b 100644
--- a/tools/perf/util/thread.c
+++ b/tools/perf/util/thread.c
@@ -46,6 +46,8 @@ struct thread *thread__new(pid_t pid, pid_t tid)
46 thread->cpu = -1; 46 thread->cpu = -1;
47 INIT_LIST_HEAD(&thread->namespaces_list); 47 INIT_LIST_HEAD(&thread->namespaces_list);
48 INIT_LIST_HEAD(&thread->comm_list); 48 INIT_LIST_HEAD(&thread->comm_list);
49 init_rwsem(&thread->namespaces_lock);
50 init_rwsem(&thread->comm_lock);
49 51
50 comm_str = malloc(32); 52 comm_str = malloc(32);
51 if (!comm_str) 53 if (!comm_str)
@@ -84,18 +86,26 @@ void thread__delete(struct thread *thread)
84 map_groups__put(thread->mg); 86 map_groups__put(thread->mg);
85 thread->mg = NULL; 87 thread->mg = NULL;
86 } 88 }
89 down_write(&thread->namespaces_lock);
87 list_for_each_entry_safe(namespaces, tmp_namespaces, 90 list_for_each_entry_safe(namespaces, tmp_namespaces,
88 &thread->namespaces_list, list) { 91 &thread->namespaces_list, list) {
89 list_del(&namespaces->list); 92 list_del(&namespaces->list);
90 namespaces__free(namespaces); 93 namespaces__free(namespaces);
91 } 94 }
95 up_write(&thread->namespaces_lock);
96
97 down_write(&thread->comm_lock);
92 list_for_each_entry_safe(comm, tmp_comm, &thread->comm_list, list) { 98 list_for_each_entry_safe(comm, tmp_comm, &thread->comm_list, list) {
93 list_del(&comm->list); 99 list_del(&comm->list);
94 comm__free(comm); 100 comm__free(comm);
95 } 101 }
102 up_write(&thread->comm_lock);
103
96 unwind__finish_access(thread); 104 unwind__finish_access(thread);
97 nsinfo__zput(thread->nsinfo); 105 nsinfo__zput(thread->nsinfo);
98 106
107 exit_rwsem(&thread->namespaces_lock);
108 exit_rwsem(&thread->comm_lock);
99 free(thread); 109 free(thread);
100} 110}
101 111
@@ -126,8 +136,8 @@ struct namespaces *thread__namespaces(const struct thread *thread)
126 return list_first_entry(&thread->namespaces_list, struct namespaces, list); 136 return list_first_entry(&thread->namespaces_list, struct namespaces, list);
127} 137}
128 138
129int thread__set_namespaces(struct thread *thread, u64 timestamp, 139static int __thread__set_namespaces(struct thread *thread, u64 timestamp,
130 struct namespaces_event *event) 140 struct namespaces_event *event)
131{ 141{
132 struct namespaces *new, *curr = thread__namespaces(thread); 142 struct namespaces *new, *curr = thread__namespaces(thread);
133 143
@@ -150,6 +160,17 @@ int thread__set_namespaces(struct thread *thread, u64 timestamp,
150 return 0; 160 return 0;
151} 161}
152 162
163int thread__set_namespaces(struct thread *thread, u64 timestamp,
164 struct namespaces_event *event)
165{
166 int ret;
167
168 down_write(&thread->namespaces_lock);
169 ret = __thread__set_namespaces(thread, timestamp, event);
170 up_write(&thread->namespaces_lock);
171 return ret;
172}
173
153struct comm *thread__comm(const struct thread *thread) 174struct comm *thread__comm(const struct thread *thread)
154{ 175{
155 if (list_empty(&thread->comm_list)) 176 if (list_empty(&thread->comm_list))
@@ -171,8 +192,8 @@ struct comm *thread__exec_comm(const struct thread *thread)
171 return last; 192 return last;
172} 193}
173 194
174int __thread__set_comm(struct thread *thread, const char *str, u64 timestamp, 195static int ____thread__set_comm(struct thread *thread, const char *str,
175 bool exec) 196 u64 timestamp, bool exec)
176{ 197{
177 struct comm *new, *curr = thread__comm(thread); 198 struct comm *new, *curr = thread__comm(thread);
178 199
@@ -196,6 +217,17 @@ int __thread__set_comm(struct thread *thread, const char *str, u64 timestamp,
196 return 0; 217 return 0;
197} 218}
198 219
220int __thread__set_comm(struct thread *thread, const char *str, u64 timestamp,
221 bool exec)
222{
223 int ret;
224
225 down_write(&thread->comm_lock);
226 ret = ____thread__set_comm(thread, str, timestamp, exec);
227 up_write(&thread->comm_lock);
228 return ret;
229}
230
199int thread__set_comm_from_proc(struct thread *thread) 231int thread__set_comm_from_proc(struct thread *thread)
200{ 232{
201 char path[64]; 233 char path[64];
@@ -213,7 +245,7 @@ int thread__set_comm_from_proc(struct thread *thread)
213 return err; 245 return err;
214} 246}
215 247
216const char *thread__comm_str(const struct thread *thread) 248static const char *__thread__comm_str(const struct thread *thread)
217{ 249{
218 const struct comm *comm = thread__comm(thread); 250 const struct comm *comm = thread__comm(thread);
219 251
@@ -223,6 +255,17 @@ const char *thread__comm_str(const struct thread *thread)
223 return comm__str(comm); 255 return comm__str(comm);
224} 256}
225 257
258const char *thread__comm_str(const struct thread *thread)
259{
260 const char *str;
261
262 down_read((struct rw_semaphore *)&thread->comm_lock);
263 str = __thread__comm_str(thread);
264 up_read((struct rw_semaphore *)&thread->comm_lock);
265
266 return str;
267}
268
226/* CHECKME: it should probably better return the max comm len from its comm list */ 269/* CHECKME: it should probably better return the max comm len from its comm list */
227int thread__comm_len(struct thread *thread) 270int thread__comm_len(struct thread *thread)
228{ 271{
@@ -265,7 +308,7 @@ static int __thread__prepare_access(struct thread *thread)
265 struct maps *maps = &thread->mg->maps[i]; 308 struct maps *maps = &thread->mg->maps[i];
266 struct map *map; 309 struct map *map;
267 310
268 pthread_rwlock_rdlock(&maps->lock); 311 down_read(&maps->lock);
269 312
270 for (map = maps__first(maps); map; map = map__next(map)) { 313 for (map = maps__first(maps); map; map = map__next(map)) {
271 err = unwind__prepare_access(thread, map, &initialized); 314 err = unwind__prepare_access(thread, map, &initialized);
@@ -273,7 +316,7 @@ static int __thread__prepare_access(struct thread *thread)
273 break; 316 break;
274 } 317 }
275 318
276 pthread_rwlock_unlock(&maps->lock); 319 up_read(&maps->lock);
277 } 320 }
278 321
279 return err; 322 return err;
diff --git a/tools/perf/util/thread.h b/tools/perf/util/thread.h
index fdcea7c0cac1..40cfa36c022a 100644
--- a/tools/perf/util/thread.h
+++ b/tools/perf/util/thread.h
@@ -10,6 +10,7 @@
10#include "symbol.h" 10#include "symbol.h"
11#include <strlist.h> 11#include <strlist.h>
12#include <intlist.h> 12#include <intlist.h>
13#include "rwsem.h"
13 14
14struct thread_stack; 15struct thread_stack;
15struct unwind_libunwind_ops; 16struct unwind_libunwind_ops;
@@ -30,7 +31,9 @@ struct thread {
30 int comm_len; 31 int comm_len;
31 bool dead; /* if set thread has exited */ 32 bool dead; /* if set thread has exited */
32 struct list_head namespaces_list; 33 struct list_head namespaces_list;
34 struct rw_semaphore namespaces_lock;
33 struct list_head comm_list; 35 struct list_head comm_list;
36 struct rw_semaphore comm_lock;
34 u64 db_id; 37 u64 db_id;
35 38
36 void *priv; 39 void *priv;
diff --git a/tools/perf/util/thread_map.c b/tools/perf/util/thread_map.c
index be0d5a736dea..3e1038f6491c 100644
--- a/tools/perf/util/thread_map.c
+++ b/tools/perf/util/thread_map.c
@@ -92,7 +92,7 @@ struct thread_map *thread_map__new_by_tid(pid_t tid)
92 return threads; 92 return threads;
93} 93}
94 94
95struct thread_map *thread_map__new_by_uid(uid_t uid) 95static struct thread_map *__thread_map__new_all_cpus(uid_t uid)
96{ 96{
97 DIR *proc; 97 DIR *proc;
98 int max_threads = 32, items, i; 98 int max_threads = 32, items, i;
@@ -113,7 +113,6 @@ struct thread_map *thread_map__new_by_uid(uid_t uid)
113 while ((dirent = readdir(proc)) != NULL) { 113 while ((dirent = readdir(proc)) != NULL) {
114 char *end; 114 char *end;
115 bool grow = false; 115 bool grow = false;
116 struct stat st;
117 pid_t pid = strtol(dirent->d_name, &end, 10); 116 pid_t pid = strtol(dirent->d_name, &end, 10);
118 117
119 if (*end) /* only interested in proper numerical dirents */ 118 if (*end) /* only interested in proper numerical dirents */
@@ -121,11 +120,12 @@ struct thread_map *thread_map__new_by_uid(uid_t uid)
121 120
122 snprintf(path, sizeof(path), "/proc/%s", dirent->d_name); 121 snprintf(path, sizeof(path), "/proc/%s", dirent->d_name);
123 122
124 if (stat(path, &st) != 0) 123 if (uid != UINT_MAX) {
125 continue; 124 struct stat st;
126 125
127 if (st.st_uid != uid) 126 if (stat(path, &st) != 0 || st.st_uid != uid)
128 continue; 127 continue;
128 }
129 129
130 snprintf(path, sizeof(path), "/proc/%d/task", pid); 130 snprintf(path, sizeof(path), "/proc/%d/task", pid);
131 items = scandir(path, &namelist, filter, NULL); 131 items = scandir(path, &namelist, filter, NULL);
@@ -178,6 +178,16 @@ out_free_closedir:
178 goto out_closedir; 178 goto out_closedir;
179} 179}
180 180
181struct thread_map *thread_map__new_all_cpus(void)
182{
183 return __thread_map__new_all_cpus(UINT_MAX);
184}
185
186struct thread_map *thread_map__new_by_uid(uid_t uid)
187{
188 return __thread_map__new_all_cpus(uid);
189}
190
181struct thread_map *thread_map__new(pid_t pid, pid_t tid, uid_t uid) 191struct thread_map *thread_map__new(pid_t pid, pid_t tid, uid_t uid)
182{ 192{
183 if (pid != -1) 193 if (pid != -1)
@@ -313,7 +323,7 @@ out_free_threads:
313} 323}
314 324
315struct thread_map *thread_map__new_str(const char *pid, const char *tid, 325struct thread_map *thread_map__new_str(const char *pid, const char *tid,
316 uid_t uid) 326 uid_t uid, bool per_thread)
317{ 327{
318 if (pid) 328 if (pid)
319 return thread_map__new_by_pid_str(pid); 329 return thread_map__new_by_pid_str(pid);
@@ -321,6 +331,9 @@ struct thread_map *thread_map__new_str(const char *pid, const char *tid,
321 if (!tid && uid != UINT_MAX) 331 if (!tid && uid != UINT_MAX)
322 return thread_map__new_by_uid(uid); 332 return thread_map__new_by_uid(uid);
323 333
334 if (per_thread)
335 return thread_map__new_all_cpus();
336
324 return thread_map__new_by_tid_str(tid); 337 return thread_map__new_by_tid_str(tid);
325} 338}
326 339
diff --git a/tools/perf/util/thread_map.h b/tools/perf/util/thread_map.h
index f15803985435..0a806b99e73c 100644
--- a/tools/perf/util/thread_map.h
+++ b/tools/perf/util/thread_map.h
@@ -23,6 +23,7 @@ struct thread_map *thread_map__new_dummy(void);
23struct thread_map *thread_map__new_by_pid(pid_t pid); 23struct thread_map *thread_map__new_by_pid(pid_t pid);
24struct thread_map *thread_map__new_by_tid(pid_t tid); 24struct thread_map *thread_map__new_by_tid(pid_t tid);
25struct thread_map *thread_map__new_by_uid(uid_t uid); 25struct thread_map *thread_map__new_by_uid(uid_t uid);
26struct thread_map *thread_map__new_all_cpus(void);
26struct thread_map *thread_map__new(pid_t pid, pid_t tid, uid_t uid); 27struct thread_map *thread_map__new(pid_t pid, pid_t tid, uid_t uid);
27struct thread_map *thread_map__new_event(struct thread_map_event *event); 28struct thread_map *thread_map__new_event(struct thread_map_event *event);
28 29
@@ -30,7 +31,7 @@ struct thread_map *thread_map__get(struct thread_map *map);
30void thread_map__put(struct thread_map *map); 31void thread_map__put(struct thread_map *map);
31 32
32struct thread_map *thread_map__new_str(const char *pid, 33struct thread_map *thread_map__new_str(const char *pid,
33 const char *tid, uid_t uid); 34 const char *tid, uid_t uid, bool per_thread);
34 35
35struct thread_map *thread_map__new_by_tid_str(const char *tid_str); 36struct thread_map *thread_map__new_by_tid_str(const char *tid_str);
36 37
diff --git a/tools/perf/util/time-utils.c b/tools/perf/util/time-utils.c
index 81927d027417..6193b46050a5 100644
--- a/tools/perf/util/time-utils.c
+++ b/tools/perf/util/time-utils.c
@@ -6,6 +6,7 @@
6#include <time.h> 6#include <time.h>
7#include <errno.h> 7#include <errno.h>
8#include <inttypes.h> 8#include <inttypes.h>
9#include <math.h>
9 10
10#include "perf.h" 11#include "perf.h"
11#include "debug.h" 12#include "debug.h"
@@ -60,11 +61,10 @@ static int parse_timestr_sec_nsec(struct perf_time_interval *ptime,
60 return 0; 61 return 0;
61} 62}
62 63
63int perf_time__parse_str(struct perf_time_interval *ptime, const char *ostr) 64static int split_start_end(char **start, char **end, const char *ostr, char ch)
64{ 65{
65 char *start_str, *end_str; 66 char *start_str, *end_str;
66 char *d, *str; 67 char *d, *str;
67 int rc = 0;
68 68
69 if (ostr == NULL || *ostr == '\0') 69 if (ostr == NULL || *ostr == '\0')
70 return 0; 70 return 0;
@@ -74,25 +74,35 @@ int perf_time__parse_str(struct perf_time_interval *ptime, const char *ostr)
74 if (str == NULL) 74 if (str == NULL)
75 return -ENOMEM; 75 return -ENOMEM;
76 76
77 ptime->start = 0;
78 ptime->end = 0;
79
80 /* str has the format: <start>,<stop>
81 * variations: <start>,
82 * ,<stop>
83 * ,
84 */
85 start_str = str; 77 start_str = str;
86 d = strchr(start_str, ','); 78 d = strchr(start_str, ch);
87 if (d) { 79 if (d) {
88 *d = '\0'; 80 *d = '\0';
89 ++d; 81 ++d;
90 } 82 }
91 end_str = d; 83 end_str = d;
92 84
85 *start = start_str;
86 *end = end_str;
87
88 return 0;
89}
90
91int perf_time__parse_str(struct perf_time_interval *ptime, const char *ostr)
92{
93 char *start_str = NULL, *end_str;
94 int rc;
95
96 rc = split_start_end(&start_str, &end_str, ostr, ',');
97 if (rc || !start_str)
98 return rc;
99
100 ptime->start = 0;
101 ptime->end = 0;
102
93 rc = parse_timestr_sec_nsec(ptime, start_str, end_str); 103 rc = parse_timestr_sec_nsec(ptime, start_str, end_str);
94 104
95 free(str); 105 free(start_str);
96 106
97 /* make sure end time is after start time if it was given */ 107 /* make sure end time is after start time if it was given */
98 if (rc == 0 && ptime->end && ptime->end < ptime->start) 108 if (rc == 0 && ptime->end && ptime->end < ptime->start)
@@ -104,6 +114,245 @@ int perf_time__parse_str(struct perf_time_interval *ptime, const char *ostr)
104 return rc; 114 return rc;
105} 115}
106 116
117static int parse_percent(double *pcnt, char *str)
118{
119 char *c, *endptr;
120 double d;
121
122 c = strchr(str, '%');
123 if (c)
124 *c = '\0';
125 else
126 return -1;
127
128 d = strtod(str, &endptr);
129 if (endptr != str + strlen(str))
130 return -1;
131
132 *pcnt = d / 100.0;
133 return 0;
134}
135
136static int percent_slash_split(char *str, struct perf_time_interval *ptime,
137 u64 start, u64 end)
138{
139 char *p, *end_str;
140 double pcnt, start_pcnt, end_pcnt;
141 u64 total = end - start;
142 int i;
143
144 /*
145 * Example:
146 * 10%/2: select the second 10% slice and the third 10% slice
147 */
148
149 /* We can modify this string since the original one is copied */
150 p = strchr(str, '/');
151 if (!p)
152 return -1;
153
154 *p = '\0';
155 if (parse_percent(&pcnt, str) < 0)
156 return -1;
157
158 p++;
159 i = (int)strtol(p, &end_str, 10);
160 if (*end_str)
161 return -1;
162
163 if (pcnt <= 0.0)
164 return -1;
165
166 start_pcnt = pcnt * (i - 1);
167 end_pcnt = pcnt * i;
168
169 if (start_pcnt < 0.0 || start_pcnt > 1.0 ||
170 end_pcnt < 0.0 || end_pcnt > 1.0) {
171 return -1;
172 }
173
174 ptime->start = start + round(start_pcnt * total);
175 ptime->end = start + round(end_pcnt * total);
176
177 return 0;
178}
179
180static int percent_dash_split(char *str, struct perf_time_interval *ptime,
181 u64 start, u64 end)
182{
183 char *start_str = NULL, *end_str;
184 double start_pcnt, end_pcnt;
185 u64 total = end - start;
186 int ret;
187
188 /*
189 * Example: 0%-10%
190 */
191
192 ret = split_start_end(&start_str, &end_str, str, '-');
193 if (ret || !start_str)
194 return ret;
195
196 if ((parse_percent(&start_pcnt, start_str) != 0) ||
197 (parse_percent(&end_pcnt, end_str) != 0)) {
198 free(start_str);
199 return -1;
200 }
201
202 free(start_str);
203
204 if (start_pcnt < 0.0 || start_pcnt > 1.0 ||
205 end_pcnt < 0.0 || end_pcnt > 1.0 ||
206 start_pcnt > end_pcnt) {
207 return -1;
208 }
209
210 ptime->start = start + round(start_pcnt * total);
211 ptime->end = start + round(end_pcnt * total);
212
213 return 0;
214}
215
216typedef int (*time_pecent_split)(char *, struct perf_time_interval *,
217 u64 start, u64 end);
218
219static int percent_comma_split(struct perf_time_interval *ptime_buf, int num,
220 const char *ostr, u64 start, u64 end,
221 time_pecent_split func)
222{
223 char *str, *p1, *p2;
224 int len, ret, i = 0;
225
226 str = strdup(ostr);
227 if (str == NULL)
228 return -ENOMEM;
229
230 len = strlen(str);
231 p1 = str;
232
233 while (p1 < str + len) {
234 if (i >= num) {
235 free(str);
236 return -1;
237 }
238
239 p2 = strchr(p1, ',');
240 if (p2)
241 *p2 = '\0';
242
243 ret = (func)(p1, &ptime_buf[i], start, end);
244 if (ret < 0) {
245 free(str);
246 return -1;
247 }
248
249 pr_debug("start time %d: %" PRIu64 ", ", i, ptime_buf[i].start);
250 pr_debug("end time %d: %" PRIu64 "\n", i, ptime_buf[i].end);
251
252 i++;
253
254 if (p2)
255 p1 = p2 + 1;
256 else
257 break;
258 }
259
260 free(str);
261 return i;
262}
263
264static int one_percent_convert(struct perf_time_interval *ptime_buf,
265 const char *ostr, u64 start, u64 end, char *c)
266{
267 char *str;
268 int len = strlen(ostr), ret;
269
270 /*
271 * c points to '%'.
272 * '%' should be the last character
273 */
274 if (ostr + len - 1 != c)
275 return -1;
276
277 /*
278 * Construct a string like "xx%/1"
279 */
280 str = malloc(len + 3);
281 if (str == NULL)
282 return -ENOMEM;
283
284 memcpy(str, ostr, len);
285 strcpy(str + len, "/1");
286
287 ret = percent_slash_split(str, ptime_buf, start, end);
288 if (ret == 0)
289 ret = 1;
290
291 free(str);
292 return ret;
293}
294
295int perf_time__percent_parse_str(struct perf_time_interval *ptime_buf, int num,
296 const char *ostr, u64 start, u64 end)
297{
298 char *c;
299
300 /*
301 * ostr example:
302 * 10%/2,10%/3: select the second 10% slice and the third 10% slice
303 * 0%-10%,30%-40%: multiple time range
304 * 50%: just one percent
305 */
306
307 memset(ptime_buf, 0, sizeof(*ptime_buf) * num);
308
309 c = strchr(ostr, '/');
310 if (c) {
311 return percent_comma_split(ptime_buf, num, ostr, start,
312 end, percent_slash_split);
313 }
314
315 c = strchr(ostr, '-');
316 if (c) {
317 return percent_comma_split(ptime_buf, num, ostr, start,
318 end, percent_dash_split);
319 }
320
321 c = strchr(ostr, '%');
322 if (c)
323 return one_percent_convert(ptime_buf, ostr, start, end, c);
324
325 return -1;
326}
327
328struct perf_time_interval *perf_time__range_alloc(const char *ostr, int *size)
329{
330 const char *p1, *p2;
331 int i = 1;
332 struct perf_time_interval *ptime;
333
334 /*
335 * At least allocate one time range.
336 */
337 if (!ostr)
338 goto alloc;
339
340 p1 = ostr;
341 while (p1 < ostr + strlen(ostr)) {
342 p2 = strchr(p1, ',');
343 if (!p2)
344 break;
345
346 p1 = p2 + 1;
347 i++;
348 }
349
350alloc:
351 *size = i;
352 ptime = calloc(i, sizeof(*ptime));
353 return ptime;
354}
355
107bool perf_time__skip_sample(struct perf_time_interval *ptime, u64 timestamp) 356bool perf_time__skip_sample(struct perf_time_interval *ptime, u64 timestamp)
108{ 357{
109 /* if time is not set don't drop sample */ 358 /* if time is not set don't drop sample */
@@ -119,6 +368,34 @@ bool perf_time__skip_sample(struct perf_time_interval *ptime, u64 timestamp)
119 return false; 368 return false;
120} 369}
121 370
371bool perf_time__ranges_skip_sample(struct perf_time_interval *ptime_buf,
372 int num, u64 timestamp)
373{
374 struct perf_time_interval *ptime;
375 int i;
376
377 if ((timestamp == 0) || (num == 0))
378 return false;
379
380 if (num == 1)
381 return perf_time__skip_sample(&ptime_buf[0], timestamp);
382
383 /*
384 * start/end of multiple time ranges must be valid.
385 */
386 for (i = 0; i < num; i++) {
387 ptime = &ptime_buf[i];
388
389 if (timestamp >= ptime->start &&
390 ((timestamp < ptime->end && i < num - 1) ||
391 (timestamp <= ptime->end && i == num - 1))) {
392 break;
393 }
394 }
395
396 return (i == num) ? true : false;
397}
398
122int timestamp__scnprintf_usec(u64 timestamp, char *buf, size_t sz) 399int timestamp__scnprintf_usec(u64 timestamp, char *buf, size_t sz)
123{ 400{
124 u64 sec = timestamp / NSEC_PER_SEC; 401 u64 sec = timestamp / NSEC_PER_SEC;
diff --git a/tools/perf/util/time-utils.h b/tools/perf/util/time-utils.h
index 15b475c50ccf..70b177d2b98c 100644
--- a/tools/perf/util/time-utils.h
+++ b/tools/perf/util/time-utils.h
@@ -13,8 +13,16 @@ int parse_nsec_time(const char *str, u64 *ptime);
13 13
14int perf_time__parse_str(struct perf_time_interval *ptime, const char *ostr); 14int perf_time__parse_str(struct perf_time_interval *ptime, const char *ostr);
15 15
16int perf_time__percent_parse_str(struct perf_time_interval *ptime_buf, int num,
17 const char *ostr, u64 start, u64 end);
18
19struct perf_time_interval *perf_time__range_alloc(const char *ostr, int *size);
20
16bool perf_time__skip_sample(struct perf_time_interval *ptime, u64 timestamp); 21bool perf_time__skip_sample(struct perf_time_interval *ptime, u64 timestamp);
17 22
23bool perf_time__ranges_skip_sample(struct perf_time_interval *ptime_buf,
24 int num, u64 timestamp);
25
18int timestamp__scnprintf_usec(u64 timestamp, char *buf, size_t sz); 26int timestamp__scnprintf_usec(u64 timestamp, char *buf, size_t sz);
19 27
20int fetch_current_timestamp(char *buf, size_t sz); 28int fetch_current_timestamp(char *buf, size_t sz);
diff --git a/tools/perf/util/tool.h b/tools/perf/util/tool.h
index 2532b558099b..183c91453522 100644
--- a/tools/perf/util/tool.h
+++ b/tools/perf/util/tool.h
@@ -76,6 +76,7 @@ struct perf_tool {
76 bool ordered_events; 76 bool ordered_events;
77 bool ordering_requires_timestamps; 77 bool ordering_requires_timestamps;
78 bool namespace_events; 78 bool namespace_events;
79 bool no_warn;
79 enum show_feature_header show_feat_hdr; 80 enum show_feature_header show_feat_hdr;
80}; 81};
81 82
diff --git a/tools/perf/util/top.h b/tools/perf/util/top.h
index 506150a75bd0..9892323cdd7c 100644
--- a/tools/perf/util/top.h
+++ b/tools/perf/util/top.h
@@ -38,6 +38,7 @@ struct perf_top {
38 int sym_pcnt_filter; 38 int sym_pcnt_filter;
39 const char *sym_filter; 39 const char *sym_filter;
40 float min_percent; 40 float min_percent;
41 unsigned int nr_threads_synthesize;
41}; 42};
42 43
43#define CONSOLE_CLEAR "" 44#define CONSOLE_CLEAR ""
diff --git a/tools/perf/util/trace-event-info.c b/tools/perf/util/trace-event-info.c
index e7d60d05596d..d7f2113462fb 100644
--- a/tools/perf/util/trace-event-info.c
+++ b/tools/perf/util/trace-event-info.c
@@ -28,7 +28,6 @@
28#include <sys/types.h> 28#include <sys/types.h>
29#include <sys/stat.h> 29#include <sys/stat.h>
30#include <sys/wait.h> 30#include <sys/wait.h>
31#include <pthread.h>
32#include <fcntl.h> 31#include <fcntl.h>
33#include <unistd.h> 32#include <unistd.h>
34#include <errno.h> 33#include <errno.h>
diff --git a/tools/perf/util/trace-event-read.c b/tools/perf/util/trace-event-read.c
index 8a9a677f7576..40b425949aa3 100644
--- a/tools/perf/util/trace-event-read.c
+++ b/tools/perf/util/trace-event-read.c
@@ -27,7 +27,6 @@
27#include <sys/stat.h> 27#include <sys/stat.h>
28#include <sys/wait.h> 28#include <sys/wait.h>
29#include <sys/mman.h> 29#include <sys/mman.h>
30#include <pthread.h>
31#include <fcntl.h> 30#include <fcntl.h>
32#include <unistd.h> 31#include <unistd.h>
33#include <errno.h> 32#include <errno.h>
diff --git a/tools/perf/util/unwind-libunwind-local.c b/tools/perf/util/unwind-libunwind-local.c
index 7a42f703e858..af873044d33a 100644
--- a/tools/perf/util/unwind-libunwind-local.c
+++ b/tools/perf/util/unwind-libunwind-local.c
@@ -631,9 +631,8 @@ static unw_accessors_t accessors = {
631 631
632static int _unwind__prepare_access(struct thread *thread) 632static int _unwind__prepare_access(struct thread *thread)
633{ 633{
634 if (callchain_param.record_mode != CALLCHAIN_DWARF) 634 if (!dwarf_callchain_users)
635 return 0; 635 return 0;
636
637 thread->addr_space = unw_create_addr_space(&accessors, 0); 636 thread->addr_space = unw_create_addr_space(&accessors, 0);
638 if (!thread->addr_space) { 637 if (!thread->addr_space) {
639 pr_err("unwind: Can't create unwind address space.\n"); 638 pr_err("unwind: Can't create unwind address space.\n");
@@ -646,17 +645,15 @@ static int _unwind__prepare_access(struct thread *thread)
646 645
647static void _unwind__flush_access(struct thread *thread) 646static void _unwind__flush_access(struct thread *thread)
648{ 647{
649 if (callchain_param.record_mode != CALLCHAIN_DWARF) 648 if (!dwarf_callchain_users)
650 return; 649 return;
651
652 unw_flush_cache(thread->addr_space, 0, 0); 650 unw_flush_cache(thread->addr_space, 0, 0);
653} 651}
654 652
655static void _unwind__finish_access(struct thread *thread) 653static void _unwind__finish_access(struct thread *thread)
656{ 654{
657 if (callchain_param.record_mode != CALLCHAIN_DWARF) 655 if (!dwarf_callchain_users)
658 return; 656 return;
659
660 unw_destroy_addr_space(thread->addr_space); 657 unw_destroy_addr_space(thread->addr_space);
661} 658}
662 659
diff --git a/tools/perf/util/unwind-libunwind.c b/tools/perf/util/unwind-libunwind.c
index 647a1e6b4c7b..b029a5e9ae49 100644
--- a/tools/perf/util/unwind-libunwind.c
+++ b/tools/perf/util/unwind-libunwind.c
@@ -3,7 +3,7 @@
3#include "thread.h" 3#include "thread.h"
4#include "session.h" 4#include "session.h"
5#include "debug.h" 5#include "debug.h"
6#include "arch/common.h" 6#include "env.h"
7 7
8struct unwind_libunwind_ops __weak *local_unwind_libunwind_ops; 8struct unwind_libunwind_ops __weak *local_unwind_libunwind_ops;
9struct unwind_libunwind_ops __weak *x86_32_unwind_libunwind_ops; 9struct unwind_libunwind_ops __weak *x86_32_unwind_libunwind_ops;
@@ -39,7 +39,7 @@ int unwind__prepare_access(struct thread *thread, struct map *map,
39 if (dso_type == DSO__TYPE_UNKNOWN) 39 if (dso_type == DSO__TYPE_UNKNOWN)
40 return 0; 40 return 0;
41 41
42 arch = normalize_arch(thread->mg->machine->env->arch); 42 arch = perf_env__arch(thread->mg->machine->env);
43 43
44 if (!strcmp(arch, "x86")) { 44 if (!strcmp(arch, "x86")) {
45 if (dso_type != DSO__TYPE_64BIT) 45 if (dso_type != DSO__TYPE_64BIT)
diff --git a/tools/perf/util/util.c b/tools/perf/util/util.c
index 3687b720327a..1019bbc5dbd8 100644
--- a/tools/perf/util/util.c
+++ b/tools/perf/util/util.c
@@ -7,6 +7,7 @@
7#include <sys/stat.h> 7#include <sys/stat.h>
8#include <sys/utsname.h> 8#include <sys/utsname.h>
9#include <dirent.h> 9#include <dirent.h>
10#include <fcntl.h>
10#include <inttypes.h> 11#include <inttypes.h>
11#include <signal.h> 12#include <signal.h>
12#include <stdio.h> 13#include <stdio.h>
@@ -23,6 +24,19 @@
23/* 24/*
24 * XXX We need to find a better place for these things... 25 * XXX We need to find a better place for these things...
25 */ 26 */
27
28bool perf_singlethreaded = true;
29
30void perf_set_singlethreaded(void)
31{
32 perf_singlethreaded = true;
33}
34
35void perf_set_multithreaded(void)
36{
37 perf_singlethreaded = false;
38}
39
26unsigned int page_size; 40unsigned int page_size;
27int cacheline_size; 41int cacheline_size;
28 42
@@ -175,7 +189,7 @@ out:
175 return err; 189 return err;
176} 190}
177 191
178int copyfile_offset(int ifd, loff_t off_in, int ofd, loff_t off_out, u64 size) 192static int copyfile_offset(int ifd, loff_t off_in, int ofd, loff_t off_out, u64 size)
179{ 193{
180 void *ptr; 194 void *ptr;
181 loff_t pgoff; 195 loff_t pgoff;
@@ -196,7 +210,7 @@ int copyfile_offset(int ifd, loff_t off_in, int ofd, loff_t off_out, u64 size)
196 210
197 size -= ret; 211 size -= ret;
198 off_in += ret; 212 off_in += ret;
199 off_out -= ret; 213 off_out += ret;
200 } 214 }
201 munmap(ptr, off_in + size); 215 munmap(ptr, off_in + size);
202 216
@@ -326,35 +340,15 @@ size_t hex_width(u64 v)
326 return n; 340 return n;
327} 341}
328 342
329static int hex(char ch)
330{
331 if ((ch >= '0') && (ch <= '9'))
332 return ch - '0';
333 if ((ch >= 'a') && (ch <= 'f'))
334 return ch - 'a' + 10;
335 if ((ch >= 'A') && (ch <= 'F'))
336 return ch - 'A' + 10;
337 return -1;
338}
339
340/* 343/*
341 * While we find nice hex chars, build a long_val. 344 * While we find nice hex chars, build a long_val.
342 * Return number of chars processed. 345 * Return number of chars processed.
343 */ 346 */
344int hex2u64(const char *ptr, u64 *long_val) 347int hex2u64(const char *ptr, u64 *long_val)
345{ 348{
346 const char *p = ptr; 349 char *p;
347 *long_val = 0;
348
349 while (*p) {
350 const int hex_val = hex(*p);
351 350
352 if (hex_val < 0) 351 *long_val = strtoull(ptr, &p, 16);
353 break;
354
355 *long_val = (*long_val << 4) | hex_val;
356 p++;
357 }
358 352
359 return p - ptr; 353 return p - ptr;
360} 354}
diff --git a/tools/perf/util/util.h b/tools/perf/util/util.h
index b52765e6d7b4..9496365da3d7 100644
--- a/tools/perf/util/util.h
+++ b/tools/perf/util/util.h
@@ -6,7 +6,6 @@
6/* glibc 2.20 deprecates _BSD_SOURCE in favour of _DEFAULT_SOURCE */ 6/* glibc 2.20 deprecates _BSD_SOURCE in favour of _DEFAULT_SOURCE */
7#define _DEFAULT_SOURCE 1 7#define _DEFAULT_SOURCE 1
8 8
9#include <fcntl.h>
10#include <stdbool.h> 9#include <stdbool.h>
11#include <stddef.h> 10#include <stddef.h>
12#include <stdlib.h> 11#include <stdlib.h>
@@ -36,7 +35,6 @@ bool lsdir_no_dot_filter(const char *name, struct dirent *d);
36int copyfile(const char *from, const char *to); 35int copyfile(const char *from, const char *to);
37int copyfile_mode(const char *from, const char *to, mode_t mode); 36int copyfile_mode(const char *from, const char *to, mode_t mode);
38int copyfile_ns(const char *from, const char *to, struct nsinfo *nsi); 37int copyfile_ns(const char *from, const char *to, struct nsinfo *nsi);
39int copyfile_offset(int fromfd, loff_t from_ofs, int tofd, loff_t to_ofs, u64 size);
40 38
41ssize_t readn(int fd, void *buf, size_t n); 39ssize_t readn(int fd, void *buf, size_t n);
42ssize_t writen(int fd, const void *buf, size_t n); 40ssize_t writen(int fd, const void *buf, size_t n);
@@ -65,4 +63,19 @@ int sched_getcpu(void);
65int setns(int fd, int nstype); 63int setns(int fd, int nstype);
66#endif 64#endif
67 65
66extern bool perf_singlethreaded;
67
68void perf_set_singlethreaded(void);
69void perf_set_multithreaded(void);
70
71#ifndef O_CLOEXEC
72#ifdef __sparc__
73#define O_CLOEXEC 0x400000
74#elif defined(__alpha__) || defined(__hppa__)
75#define O_CLOEXEC 010000000
76#else
77#define O_CLOEXEC 02000000
78#endif
79#endif
80
68#endif /* GIT_COMPAT_UTIL_H */ 81#endif /* GIT_COMPAT_UTIL_H */
diff --git a/tools/perf/util/vdso.c b/tools/perf/util/vdso.c
index cffcda448c28..0acb1ec0e2f0 100644
--- a/tools/perf/util/vdso.c
+++ b/tools/perf/util/vdso.c
@@ -320,7 +320,7 @@ struct dso *machine__findnew_vdso(struct machine *machine,
320 struct vdso_info *vdso_info; 320 struct vdso_info *vdso_info;
321 struct dso *dso = NULL; 321 struct dso *dso = NULL;
322 322
323 pthread_rwlock_wrlock(&machine->dsos.lock); 323 down_write(&machine->dsos.lock);
324 if (!machine->vdso_info) 324 if (!machine->vdso_info)
325 machine->vdso_info = vdso_info__new(); 325 machine->vdso_info = vdso_info__new();
326 326
@@ -348,7 +348,7 @@ struct dso *machine__findnew_vdso(struct machine *machine,
348 348
349out_unlock: 349out_unlock:
350 dso__get(dso); 350 dso__get(dso);
351 pthread_rwlock_unlock(&machine->dsos.lock); 351 up_write(&machine->dsos.lock);
352 return dso; 352 return dso;
353} 353}
354 354
diff --git a/tools/perf/util/zlib.c b/tools/perf/util/zlib.c
index 008fe68d7b76..a725b958cf31 100644
--- a/tools/perf/util/zlib.c
+++ b/tools/perf/util/zlib.c
@@ -1,4 +1,5 @@
1// SPDX-License-Identifier: GPL-2.0 1// SPDX-License-Identifier: GPL-2.0
2#include <fcntl.h>
2#include <stdio.h> 3#include <stdio.h>
3#include <unistd.h> 4#include <unistd.h>
4#include <sys/stat.h> 5#include <sys/stat.h>