Skip to content

Commit bbe798b

Browse files
committed
collection: drop unnecessary kallsyms module lookup
The library doesn't rely on knowing symbol module names anymore. Drop some dead code which was missed during that refactoring. Signed-off-by: Lorenz Bauer <[email protected]>
1 parent 87b4d5d commit bbe798b

File tree

1 file changed

+0
-14
lines changed

1 file changed

+0
-14
lines changed

collection.go

Lines changed: 0 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -445,20 +445,6 @@ func newCollectionLoader(coll *CollectionSpec, opts *CollectionOptions) (*collec
445445
// during individual program loading. Since we have less context available
446446
// at those stages, we batch the lookups here instead to avoid redundant work.
447447
func populateKallsyms(progs map[string]*ProgramSpec) error {
448-
// Look up associated kernel modules for all symbols referenced by
449-
// ProgramSpec.AttachTo for program types that support attaching to kmods.
450-
mods := make(map[string]string)
451-
for _, p := range progs {
452-
if p.AttachTo != "" && p.targetsKernelModule() {
453-
mods[p.AttachTo] = ""
454-
}
455-
}
456-
if len(mods) != 0 {
457-
if err := kallsyms.AssignModules(mods); err != nil {
458-
return fmt.Errorf("getting modules from kallsyms: %w", err)
459-
}
460-
}
461-
462448
// Look up addresses of all kernel symbols referenced by all programs.
463449
addrs := make(map[string]uint64)
464450
for _, p := range progs {

0 commit comments

Comments
 (0)