Skip to content

Commit

Permalink
fix bugs
Browse files Browse the repository at this point in the history
  • Loading branch information
sunya-ch committed Jul 11, 2023
1 parent 0f8d04d commit bdb4d15
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions pkg/bpfassets/attacher/bcc_attacher.go
Original file line number Diff line number Diff line change
Expand Up @@ -226,7 +226,7 @@ func bccCollectProcess() (processesData []ProcessBPFMetrics, err error) {
}
// if ebpf map batch get operation is not supported we iterate over the map
if !ebpfBatchGet {
for it := c.bpfHCMeter.Table.Iter(); it.Next(); {
for it := bccModule.Table.Iter(); it.Next(); {
key := it.Key()
value := it.Leaf()
keys = append(keys, key)
Expand All @@ -252,7 +252,7 @@ func bccCollectProcess() (processesData []ProcessBPFMetrics, err error) {
keysToDelete = append(keysToDelete, key)
} else {
err = bccModule.Table.Delete(key) // deleting the element to reset the counter values
if err != nil && !os.IsNotExist(err) {
if err != nil {
klog.Infof("could not delete bpf table elements, err: %v", err)
}
}
Expand Down

0 comments on commit bdb4d15

Please sign in to comment.