@@ -418,8 +418,6 @@ type collectionLoader struct {
418
418
programs map [string ]* Program
419
419
vars map [string ]* Variable
420
420
types * btf.Cache
421
- // structOps program name -> structOpsMap name
422
- stOpsProgsToMap map [string ]string
423
421
}
424
422
425
423
func newCollectionLoader (coll * CollectionSpec , opts * CollectionOptions ) (* collectionLoader , error ) {
@@ -445,7 +443,6 @@ func newCollectionLoader(coll *CollectionSpec, opts *CollectionOptions) (*collec
445
443
make (map [string ]* Program ),
446
444
make (map [string ]* Variable ),
447
445
newBTFCache (& opts .Programs ),
448
- make (map [string ]string ),
449
446
}, nil
450
447
}
451
448
@@ -866,13 +863,13 @@ func (cl *collectionLoader) initKernStructOps() error {
866
863
return fmt .Errorf ("struct type: %s %w" , kTypeName , err )
867
864
}
868
865
869
- cl .setStructOpsProgAttachTo (kType , ms . Name )
866
+ cl .setStructOpsProgAttachTo (kType )
870
867
}
871
868
872
869
return nil
873
870
}
874
871
875
- func (cl * collectionLoader ) setStructOpsProgAttachTo (kernType * btf.Struct , mapName string ) {
872
+ func (cl * collectionLoader ) setStructOpsProgAttachTo (kernType * btf.Struct ) {
876
873
for _ , m := range kernType .Members {
877
874
if _ , ok := btf.As [* btf.Pointer ](btf .UnderlyingType (m .Type )); ! ok {
878
875
continue
@@ -884,7 +881,6 @@ func (cl *collectionLoader) setStructOpsProgAttachTo(kernType *btf.Struct, mapNa
884
881
continue
885
882
}
886
883
887
- cl .stOpsProgsToMap [ps .Name ] = mapName
888
884
if ps .AttachTo == "" {
889
885
ps .AttachTo = fmt .Sprintf ("%s:%s" , kernType .Name , member )
890
886
}
0 commit comments