Commit 3c27b0c
Peter Zijlstra
perf/x86/amd: Fix AMD BRS period adjustment
There's two problems with the current amd_brs_adjust_period() code:
- it isn't in fact AMD specific and wil always adjust the period;
- it adjusts the period, while it should only adjust the event count,
resulting in repoting a short period.
Fix this by using x86_pmu.limit_period, this makes it specific to the
AMD BRS case and ensures only the event count is adjusted while the
reported period is unmodified.
Fixes: ba2fe75 ("perf/x86/amd: Add AMD branch sampling period adjustment")
Signed-off-by: Peter Zijlstra (Intel) <peterz@infradead.org>1 parent bc469dd commit 3c27b0c
3 files changed
Lines changed: 13 additions & 25 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
1255 | 1255 | | |
1256 | 1256 | | |
1257 | 1257 | | |
| 1258 | + | |
| 1259 | + | |
| 1260 | + | |
| 1261 | + | |
| 1262 | + | |
| 1263 | + | |
| 1264 | + | |
| 1265 | + | |
| 1266 | + | |
| 1267 | + | |
| 1268 | + | |
| 1269 | + | |
1258 | 1270 | | |
1259 | 1271 | | |
1260 | 1272 | | |
| |||
1415 | 1427 | | |
1416 | 1428 | | |
1417 | 1429 | | |
| 1430 | + | |
1418 | 1431 | | |
1419 | 1432 | | |
1420 | 1433 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
1374 | 1374 | | |
1375 | 1375 | | |
1376 | 1376 | | |
1377 | | - | |
1378 | | - | |
1379 | | - | |
1380 | | - | |
1381 | | - | |
1382 | | - | |
1383 | | - | |
1384 | 1377 | | |
1385 | 1378 | | |
1386 | 1379 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
1254 | 1254 | | |
1255 | 1255 | | |
1256 | 1256 | | |
1257 | | - | |
1258 | | - | |
1259 | | - | |
1260 | | - | |
1261 | | - | |
1262 | | - | |
1263 | | - | |
1264 | | - | |
1265 | 1257 | | |
1266 | 1258 | | |
1267 | 1259 | | |
| |||
1290 | 1282 | | |
1291 | 1283 | | |
1292 | 1284 | | |
1293 | | - | |
1294 | | - | |
1295 | | - | |
1296 | | - | |
1297 | | - | |
1298 | 1285 | | |
1299 | 1286 | | |
1300 | 1287 | | |
| |||
1324 | 1311 | | |
1325 | 1312 | | |
1326 | 1313 | | |
1327 | | - | |
1328 | | - | |
1329 | | - | |
1330 | | - | |
1331 | | - | |
1332 | 1314 | | |
1333 | 1315 | | |
1334 | 1316 | | |
| |||
0 commit comments