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
That the variable on_cpu_avg_freq is not used, therefore the function get_on_cpu_avg_freq and the map cpu_freq_array are also unused.
Following that through, the same is then true of on_cpu_ref_cycles_delta, which gets populated by get_on_cpu_ref_cycles and uses the maps cpu_ref_cycles and cpu_ref_cycles_hc_reader.
In addition, the global variables HZ and CPU_REF_FREQ are also unused.
N.B - SAMPLE_RATE wasn't being correctly populated before #1398 but it is now.
Before I remove all of this unused code it would be excellent to get some clarification on whether it is intended to be used or not.
In particular, the perf event array cpu_ref_cycles_hc_reader is populated by a hardware perf event and it's my understanding that these are a scarce resource. If we aren't intending to use it, then we should not open a perf event of this type/event.
The text was updated successfully, but these errors were encountered:
Confirmed with @marceloamaral on the community meeting that this is unused and therefore can be removed from both the kernel and userspace side of kepler.
Removes a number of unused maps from the eBPF code.
Removes unused functions and config options from the
userland code.
Fixes: sustainable-computing-io#1405
Signed-off-by: Dave Tucker <dave@dtucker.co.uk>
What would you like to be added?
In working on #1398 I found that there are a number of unused eBPF maps.
See here: https://github.com/sustainable-computing-io/kepler/blob/main/bpfassets/bcc/bcc.c#L217
That the variable
on_cpu_avg_freq
is not used, therefore the functionget_on_cpu_avg_freq
and the mapcpu_freq_array
are also unused.Following that through, the same is then true of
on_cpu_ref_cycles_delta
, which gets populated byget_on_cpu_ref_cycles
and uses the mapscpu_ref_cycles
andcpu_ref_cycles_hc_reader
.In addition, the global variables
HZ
andCPU_REF_FREQ
are also unused.N.B -
SAMPLE_RATE
wasn't being correctly populated before #1398 but it is now.Before I remove all of this unused code it would be excellent to get some clarification on whether it is intended to be used or not.
cc @marceloamaral
Why is this needed?
In particular, the perf event array
cpu_ref_cycles_hc_reader
is populated by a hardware perf event and it's my understanding that these are a scarce resource. If we aren't intending to use it, then we should not open a perf event of this type/event.The text was updated successfully, but these errors were encountered: