Skip to content

Commit

Permalink
fix
Browse files Browse the repository at this point in the history
Signed-off-by: Jiri Olsa <jolsa@kernel.org>
  • Loading branch information
olsajiri committed Sep 20, 2024
1 parent 3cefc44 commit 78ee846
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion pkg/sensors/load.go
Original file line number Diff line number Diff line change
Expand Up @@ -236,6 +236,7 @@ func (s *Sensor) setMapPinPath(m *program.Map) {
func (s *Sensor) loadMaps(bpfDir string) error {
l := logger.GetLogger()
for _, m := range s.Maps {
s.setMapPinPath(m)
if m.PinState.IsLoaded() {
l.WithFields(logrus.Fields{
"sensor": s.Name,
Expand All @@ -245,7 +246,6 @@ func (s *Sensor) loadMaps(bpfDir string) error {
continue
}

s.setMapPinPath(m)
pinPath := filepath.Join(bpfDir, m.PinPath)

spec, err := ebpf.LoadCollectionSpec(m.Prog.Name)
Expand Down

0 comments on commit 78ee846

Please # to comment.