Closed pwaller closed 5 years ago
A couple of weird things about the above:
I'm unsure at this point if this is a bug in the perf package or in my understanding, or both. But probably the user interface can be improved at least.
https://github.com/acln0/perf/blob/master/group.go#L70 should happen before the len(g.attrs)
check, so a misconfigured group due to e.g. lack of permissions doesn't look like an empty group. Investigating the matter of the empty counters now.
@acln0 nailed it and let me know - the trace points are not being counted because I have g.Options.ExcludeKernel = true
set :man_facepalming:. Unsetting this I get the counts.
I had a group filled with hardware counters, then I added a Tracepoint for
sys_enter_write
to the group. I always got zero for my tracepoint counter, even though I was not expecting this.Subsequently, I made a group only containing tracepoint counters, but then I get:
Here's a reproducer:
main.go
: