You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
When we want to use more hardware counters than available PMUs (typically 3), linux applies counter multiplexing.
Counter multiplexing impacts the accuracy of the counters and normalization must be applied, as described in the bpf.h.
When there are more PMU based perf events opened than available counters,
kernel will multiplex these events so each event gets certain
percentage (but not all) of the PMU time. In case that
multiplexing happens, the number of samples or counter value
will not reflect the case compared to when no multiplexing
occurs. This makes comparison between different runs difficult.
Typically, the counter value should be normalized before
comparing to other experiments. The usual normalization is done
as follows.
normalized_counter = counter * t_enabled / t_running
To get the enable and running time of the counter, we need to use the function bpf_perf_event_read_value, which reads the struct bpf_perf_event_value which contains the counter value and times.
However, I tried to use bpf_perf_event_read_value in many different ways without any success so far.
May be it's too late but want to give an answer because just got this error at 5.4 kernel unknown func bpf_perf_event_read_value#55 means that verifier knows about this function but this function is forbidden for this type of bpf.
here you may see that in my (5.4) kernel this function is allowed only for krobe type of bpf
I use raw_tp bpf and only this and this functions are allowed
Later kernels allow this function in any type of bpf here
When we want to use more hardware counters than available PMUs (typically 3), linux applies counter multiplexing.
Counter multiplexing impacts the accuracy of the counters and normalization must be applied, as described in the bpf.h.
To get the enable and running time of the counter, we need to use the function
bpf_perf_event_read_value
, which reads the struct bpf_perf_event_value which contains the counter value and times.However, I tried to use
bpf_perf_event_read_value
in many different ways without any success so far.The error is:
Could you please provide an example of how we can use it?
The text was updated successfully, but these errors were encountered: