Hi,
The stable kernel 4.9.112 has supported Intel uncore feature in perf
core. While it also needs the perf tool supporting to let perf uncore
feature work.
Following backport patches enables basic perf uncore feature in 4.9.112.
For example, on skylake desktop,
root@skl:~# uname -a
Linux skl 4.9.112+ #2 SMP Mon Jul 16 17:35:25 CST 2018 x86_64 x86_64
x86_64 GNU/Linux
root@skl:~# perf list | grep unc_
unc_arb_coh_trk_requests.all
unc_arb_trk_occupancy.all
unc_arb_trk_occupancy.cycles_with_any_request
unc_arb_trk_requests.all
unc_arb_trk_requests.drd_direct
unc_arb_trk_requests.writes
unc_cbo_cache_lookup.any_es
unc_cbo_cache_lookup.any_i
unc_cbo_cache_lookup.any_m
unc_cbo_cache_lookup.any_mesi
unc_cbo_cache_lookup.read_es
unc_cbo_cache_lookup.read_i
unc_cbo_cache_lookup.read_mesi
unc_cbo_cache_lookup.write_es
unc_cbo_cache_lookup.write_m
unc_cbo_cache_lookup.write_mesi
unc_cbo_xsnp_response.hit_xcore
unc_cbo_xsnp_response.hitm_xcore
unc_cbo_xsnp_response.miss_eviction
unc_cbo_xsnp_response.miss_xcore
root@skl:~# perf stat -a -e unc_cbo_cache_lookup.any_es sleep 1
Performance counter stats for 'system wide':
147,229 unc_cbo_cache_lookup.any_es
1.001204726 seconds time elapsed
These patches are divided into 2 parts, perf core part and perf tool
part. (Please apply the patches from top to bottom in following lists,
otherwise conflicts will happen)
1. Patches for perf core to fix some uncore issues.
perf/x86/intel/uncore: Fix Skylake server CHA LLC_LOOKUP event umask
c3f02682a101b83424128915b14e60c156c03f02
perf/x86/intel/uncore: Fix Skylake server PCU PMU event format
bab4e569e80c07ba6fe5e4f2d815adeef26cee94
perf/x86/intel/uncore: Fix Skylake UPI PMU event masks
b3625980a65db6b6b6bbd5790a77ab95ce6397c5
perf/x86/intel/uncore: Remove invalid Skylake server CHA filter field
9ad0fbd8fcd9e6815908c772f8d792a9d764449e
perf/x86/intel/uncore: Fix SKX CHA event extra regs
8aa7b7b4b4a601978672dce6604b9f5630b2eeb8
perf/x86/intel/uncore: Fix missing marker for skx_uncore_cha_extra_regs
ba883b4abc9cd837441b01eb9cf8d9196181294d
perf/x86/intel/uncore: Add event constraint for BDX PCU
bb9fbe1b57503f790dbbf9f06e72cb0fb9e60740
2. Patches for perf tool to enable the uncore feature.
Note that since some dependencies in perf vendor events patches, so this
patch-set includes both core and uncore event patches.
perf vendor events: Add BroadwellDE V5 event file
27b565b1eb04a277027953cab13b5aad5d469390
perf vendor events: Add Broadwell V17 event file
b74d1315cab113ce1e0ee5e10eb6638219c1b0d1
perf vendor events: Add BroadwellX V10 event file
19c0389b60d486010d508d5a1551ee9b6a8b2f45
perf vendor events: Add Bonnell V4 event file
052aa3cce3f2b91e339318e5fe9806d0cfd822f0
perf vendor events: Add Goldmont V8 event file
4a00680b059a6c2c378945e2dffa2fa2876a4fc1
perf vendor events: Add Haswell V24 event file
dcfbad10c7ba0bd2f4993c8d8a258471eb6083ff
perf vendor events: Add HaswellX V17 event file
ede007404388cd1ba306760a2881dc9722f5bb47
perf vendor events: Add IvyBridge V18 event file
4b90798ebb0bab8fe1ed9065e80879503f5601d2
perf vendor events: Add IvyTown V19 event file
d910f0ba6d72a0917ae30b6aed5131988e3096e4
perf vendor events: Add Jaketown V20 event file
902ea4ee33e6dccece0f78a68e882eee9be9577f
perf vendor events: Add KnightsLanding V9 event file
55d42d272ee30cd781e74a9c4ab152664c6417fc
perf vendor events: Add NehalemEP V2 event file
edaa78b4c050ec0a0fc7f436cdf6a73c91af64e0
perf vendor events: Add NehalemEX V2 event file
d8c303858582d4dcd90f13ebbe9db812a70d0948
perf vendor events: Add Skylake V24 event file
47cbd67e243a6bbb4133d719edd24ee6a315462d
perf vendor events: Add Silvermont V13 event file
1b0978458300164046d12e1b7930c9de38057e1d
perf vendor events: Add SandyBridge V15 event file
6e82bdae472355fe0953e12eb29a36079e155ddb
perf vendor events: Add WestmereEP-DP V2 event file
1f888acd92c8f88b0ab9640cef0794bc5424c668
perf vendor events: Add WestmereEP-SP V2 event file
01dd25455b3588431d3f59c70e7b934a91d66121
perf vendor events: Add WestmereEX V2 event file
1fbd54b2e2356659f9f87920dc514792db6ff602
perf vendor events intel: Add uncore events for Haswell Server processor
7003f00fdb7b44662e8b47ebaf8ff6ce554df4bb
perf vendor events intel: Add uncore events for Broadwell Server
949c84efcac9662b1df520675cdfce07273f4d59
perf vendor events intel: Add uncore events for IvyBridge Server
6b138c7b14d6134bed2419ccf7573b87e7a064b0
perf vendor events intel: Add uncore events for Sandy Bridge Server
dd32cb5d8fd42316bf8c2b9f7e5c51a38625f755
perf vendor events intel: Add uncore events for Xeon Phi (Knights Landing)
22c8e5526b7bf33840c20b4e717e6560e5dfb294
perf vendor events intel: Add uncore events for Broadwell DE
76667024171a2d6811c5ddbe42a8f675987ad8a1
perf vendor events: Add mapping for KnightsMill PMU events
771ceddaadd0a2b31603034b36dca50943ff6836
perf vendor events intel: Update Intel uncore JSON event files
b90b3e9c11050e09279d2b9a318189e155910b20
perf vendor events intel: Add missing UNC_M_DCLOCKTICKS for Broadwell DE
uncore
9c4e2e2589c99ed01db6245847b4bd44bc053330
perf vendor events intel: Add uncore events for Sandy Bridge client
80432c7311dbcf0c814d4923480b055a725b0be2
perf vendor events intel: Add uncore events for Ivy Bridge client
bccdcb2a77ba0bef17baf152179e30ca35459a0c
perf vendor events intel: Add uncore events for Haswell client
0585c6265e66f952bcb6280cf078e5e120bd367a
perf vendor events intel: Add uncore events for Broadwell client
092a95d41655bdd31d7d28f1788818724505feb2
perf vendor events intel: Add uncore events for Skylake client
92c6de0f10a80e4936fac04148bd3783a7c2b9f8
perf vendor events: Add core event list for Skylake Server
630171d4156a257869b3cca5b2e63aacf7bc7948
perf vendor events: Add Skylake server uncore event list
41d3d6db1767326dd7daf7c6df48e42020647c15
perf vendor events: Add Goldmont Plus V1 event file
65db92e0965ab56e8031d5c804f26d5be0e47047
perf jevents: Parse eventcode as number
d581141970ef3965c1624960fa928d765afd8a3e
perf jevents: Add support for parsing uncore json files
fedb2b518239cbc00abcf0d200e0be8436251c11
perf pmu: Support per pmu json aliases
15b22ed369aa23ef4d083ffb9621650c353d3ddd
perf pmu: Support event aliases for non cpu// pmus
231bb2aa32498cbebef1306889a02114e9dfc934
perf pmu: Factor out scale conversion code
d02fc6bcd53721cf8588633409157c232f2418e0
perf tools: Move new_term arguments into struct parse_events_term template
67b49b38f7bd6f34319b540ce824d5697241b3a8
perf tools: Fail on using multiple bits long terms without value
99e7138eb7897aa0ccc6661173ae2d7e79721e05
perf list: Add debug support for outputing alias string
f23610245c1aa0e912476e642bd5107d04122230
perf tools: Factor out PMU matching in parser
2073ad3326b7e4577af3d6789edd03df79519d21
perf pmu: Expand PMU events by prefix match
8255718f4bedbfb3558fba10ff40a70934f2117d
perf pmu: Special case uncore_ prefix
a820e33547aee9fd0460106c1fc577a125c23975
perf stat: Factor out callback for collecting event values
fbe51fba82901fd15d3e0a068388fcd7d02dc047
perf stat: Collapse identically named events
430daf2dc7aff16096a137347e6fd03d4af609e9
perf stat: Handle partially bad results with merging
b4229e9d4cac2295f8f04ec26acd571a391c6c37
perf vendor events intel: Add uncore_arb JSON support
af34cb4fad1ba08db199ef1b0a529549e041dd25
perf vendor events intel: Add missing space in json descriptions
3401e8d1e1300742ed41910b9338b9da52689a16
Thanks
Jin Yao