Skip to content
Commit ba74553e authored by Beata Michalska's avatar Beata Michalska Committed by Pierre Gondois
Browse files

lisa._assets.kmodules.lisa: Enroll PMU counters into new config support



Make use of the newly added VFS/config handling to configure
PMU counters. The counters can be configured as:

The counters to be traced can be specified through the lisa VFS:
  $ mkdir /sys/fs/lisa/configs/test_cfg
  $ echo event__lisa__perf_counter >> /sys/fs/lisa/configs/test_cfg/set_features
  $ echo 3 >> /sys/fs/lisa/configs/test_cfg/event__lisa__perf_counter/pmu_raw_counters
  $ echo 5 >> /sys/fs/lisa/configs/test_cfg/event__lisa__perf_counter/pmu_raw_counters
  $ echo 1 > /sys/fs/lisa/configs/test_cfg/activate

PMU event counters might be requested via either:
- generic perf event name (note that this applies to common perf hardware events)
- PMU specific event counter id (aka raw id)

Note that there might be cases when requested event will not be activated on
all online CPUS: subject to actual support and available event counter slots on
given CPU.
Additionally, enabling the same counter via both generic perf id and PMU
raw id may lead to duplicate event counters so it is advised to avoid
mixing the ids between different configs.

Signed-off-by: Pierre Gondois's avatarPierre Gondois <pierre.gondois@arm.com>
Co-developed-by: Beata Michalska's avatarBeata Michalska <beata.michalska@arm.com>
[BM: reworked bits related to referencing existing event counters as well as
 cutting down on changes handling generic perf events mapped by different PMUs
 to different event numbers, as that has been handled upfront.
 As a consequence, reworded the commit message a bit]
Signed-off-by: Beata Michalska's avatarBeata Michalska <beata.michalska@arm.com>
parent 42f323d6
Loading
Loading
Loading
Pipeline #12254 failed with stage
Loading
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment