Lorenz Bauer
Lorenz Bauer
Use generics to make the Pointer constructors more useful. Also remove the "New" prefix from constructors that do not allocate. Introduce SliceLen and SliceElems which return 0 if the length...
Add a generic wrapper around sync.Once which memoizes the result of a function call. Signed-off-by: Lorenz Bauer
@arthurfabre reports that he'd like to be able to silence certain feature test errors, since his host kernel doesn't support CONFIG_FPROBE for example. I'd like to keep the default behaviour...
BTF has been extended over time to support new metadata, but older kernels refuse to load such extended BTF. This is a problem when loading a program that has been...
Add Spec.Add, which allows creating BTF on the fly from outside of the btf package.
``` cache restore Detected go.sum. Fetching '/home/semaphore/go/pkg/mod' directory with cache keys 'go-btf-spec-add-380b5b96210e10c5537d62eabaf1188b,go-btf-spec-add,go-master,go-main'... HIT: 'go-btf-spec-add-380b5b96210e10c5537d62eabaf1188b', using key 'go-btf-spec-add-380b5b96210e10c5537d62eabaf1188b'. Downloading key 'go-btf-spec-add-380b5b96210e10c5537d62eabaf1188b'... Download complete. Duration: 238.819897ms. Size: 13.8M bytes. Unpacking '/tmp/go-btf-spec-add-380b5b96210e10c5537d62eabaf1188b-1876137770'... error:...
This PR improves marshaling vmlinux BTF. I tried to benchmark `NewCollection` as well, but that causes oomkills due to some weird kernel interaction. I've not replaced all occurrences of `map[Type]`...
Add an exported type for BTF type IDs to `sys`. Use the opportunity to make `gentypes` a little bit nicer.
Some light refactoring to clean up bpf2go a little.