Hi Juliana,
let me re-use answer which I wrote somewhere short time ago:
There’s no such feature in S32DS and there’s no hardware support in ARM core on S32K devices.
Performance Monitor unit is available in some MPC5xxx devices with e200z7 core, for example. It allows us to monitor number of selected events like number of branches, cache hits and many others. But there’s no such unit on S32K.
It could be implemented on software level. If an OS is used, you can monitor time spent in idle task or something like that.
Regards,
Lukas