LoadKernelModuleSpec returns the BTF information for the named kernel module. Using [Cache.Module] is faster when loading BTF for more than one module. Defaults to /sys/kernel/btf/ . Returns an error wrapping ErrNotSupported if BTF is not enabled. Returns an error wrapping fs.ErrNotExist if
(module string)
| 77 | // Returns an error wrapping ErrNotSupported if BTF is not enabled. |
| 78 | // Returns an error wrapping fs.ErrNotExist if BTF for the specific module doesn't exist. |
| 79 | func LoadKernelModuleSpec(module string) (*Spec, error) { |
| 80 | base, err := LoadKernelSpec() |
| 81 | if err != nil { |
| 82 | return nil, err |
| 83 | } |
| 84 | return loadKernelModuleSpec(module, base) |
| 85 | } |
| 86 | |
| 87 | func loadKernelModuleSpec(module string, base *Spec) (*Spec, error) { |
| 88 | if platform.IsWindows { |
searching dependent graphs…