Commit 1765bb6
perf/core: Allow reading package events from perf_event_read_local
Per-package perf events are typically registered with a single CPU only,
however they can be read across all the CPUs within the package.
Currently perf_event_read maps the event CPU according to the topology
information to avoid an unnecessary SMP call, however
perf_event_read_local deals with hard values and rejects a read with a
failure if the CPU is not the one exactly registered. Allow similar
mapping within the perf_event_read_local if the perf event in question
can support this.
This allows users like BPF code to read the package perf events properly
across different CPUs within a package.
Signed-off-by: Tero Kristo <[email protected]>
Signed-off-by: Peter Zijlstra (Intel) <[email protected]>
Link: https://lkml.kernel.org/r/[email protected]1 parent 05276d4 commit 1765bb6
1 file changed
+15
-3
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
4425 | 4425 | | |
4426 | 4426 | | |
4427 | 4427 | | |
| 4428 | + | |
| 4429 | + | |
| 4430 | + | |
4428 | 4431 | | |
4429 | 4432 | | |
4430 | 4433 | | |
| |||
4527 | 4530 | | |
4528 | 4531 | | |
4529 | 4532 | | |
| 4533 | + | |
| 4534 | + | |
4530 | 4535 | | |
4531 | 4536 | | |
4532 | 4537 | | |
| |||
4551 | 4556 | | |
4552 | 4557 | | |
4553 | 4558 | | |
| 4559 | + | |
| 4560 | + | |
| 4561 | + | |
| 4562 | + | |
| 4563 | + | |
| 4564 | + | |
| 4565 | + | |
4554 | 4566 | | |
4555 | 4567 | | |
4556 | | - | |
| 4568 | + | |
4557 | 4569 | | |
4558 | 4570 | | |
4559 | 4571 | | |
4560 | 4572 | | |
4561 | 4573 | | |
4562 | | - | |
| 4574 | + | |
4563 | 4575 | | |
4564 | 4576 | | |
4565 | 4577 | | |
| |||
4569 | 4581 | | |
4570 | 4582 | | |
4571 | 4583 | | |
4572 | | - | |
| 4584 | + | |
4573 | 4585 | | |
4574 | 4586 | | |
4575 | 4587 | | |
| |||
0 commit comments