Are these counters always available, or only enabled under a special mode? I believe always turning on these recording can hurt perf.
Okay, you can only enable four counters once.
bpr
The counters are always available, except enabling them is (usually) a privileged operation and requires the kernel to program / read. Their cost primarily depends on the threshold value, after which point an interrupt is triggered. In general, the cost is <5% overhead.
Are these counters always available, or only enabled under a special mode? I believe always turning on these recording can hurt perf.
Okay, you can only enable four counters once.
The counters are always available, except enabling them is (usually) a privileged operation and requires the kernel to program / read. Their cost primarily depends on the threshold value, after which point an interrupt is triggered. In general, the cost is <5% overhead.