diff --git a/.github/workflows/generator-image.yml b/.github/workflows/generator-image.yml index 84fbb408a..4d4f70be2 100644 --- a/.github/workflows/generator-image.yml +++ b/.github/workflows/generator-image.yml @@ -31,8 +31,7 @@ jobs: with: images: "${{ env.REGISTRY }}/${{ env.IMAGE_NAME }}" tags: | - type=schedule,pattern={{date 'YYYYMMDD-hhmm'}} - type=ref,event=branch + type=schedule,pattern={{date 'YYYYMMDDhhmm'}} - name: Build and push Docker image id: push diff --git a/.gitignore b/.gitignore index c75e7457e..eaf0aeeb2 100644 --- a/.gitignore +++ b/.gitignore @@ -7,6 +7,13 @@ .DS_Store +# Ignore generated files +**/bpf_*_arm64.go +**/bpf_*_x86.go +**/net*_arm64.go +**/net*_x86.go +**/*.o + # Test binary, built with `go test -c` *.test diff --git a/Makefile b/Makefile index a1b88feee..64e6c8145 100644 --- a/Makefile +++ b/Makefile @@ -18,10 +18,9 @@ IMG_NAME ?= beyla VERSION ?= dev IMG = $(IMG_REGISTRY)/$(IMG_ORG)/$(IMG_NAME):$(VERSION) -# The generator is a local container image that provides a reproducible environment for +# The generator is a container image that provides a reproducible environment for # building eBPF binaries -GEN_IMG_NAME ?= ebpf-generator -GEN_IMG ?= $(GEN_IMG_NAME):$(VERSION) +GEN_IMG ?= ghcr.io/grafana/beyla-generator:main COMPOSE_ARGS ?= -f test/integration/docker-compose.yml @@ -153,7 +152,7 @@ docker-generate: $(OCI_BIN) run --rm -v $(shell pwd):/src $(GEN_IMG) .PHONY: verify -verify: prereqs lint-dashboard lint test +verify: prereqs lint-dashboard docker-generate lint test .PHONY: build build: verify compile @@ -211,7 +210,7 @@ generator-image-build: $(OCI_BIN) build . -f generator.Dockerfile -t $(GEN_IMG) .PHONY: prepare-integration-test -prepare-integration-test: +prepare-integration-test: docker-generate @echo "### Removing resources from previous integration tests, if any" rm -rf $(TEST_OUTPUT)/* || true $(MAKE) cleanup-integration-test @@ -257,7 +256,7 @@ oats-prereq: bin/ginkgo cd test/oats && go mod vendor .PHONY: oats-test -oats-test: oats-prereq +oats-test: oats-prereq docker-generate cd test/oats && TESTCASE_BASE_PATH=./yaml $(GINKGO) -v -r .PHONY: oats-test-debug diff --git a/pkg/internal/ebpf/common/bpf_bpfel_arm64.go b/pkg/internal/ebpf/common/bpf_bpfel_arm64.go deleted file mode 100644 index 9caa272bb..000000000 --- a/pkg/internal/ebpf/common/bpf_bpfel_arm64.go +++ /dev/null @@ -1,221 +0,0 @@ -// Code generated by bpf2go; DO NOT EDIT. -//go:build arm64 - -package ebpfcommon - -import ( - "bytes" - _ "embed" - "fmt" - "io" - - "github.com/cilium/ebpf" -) - -type bpfConnectionInfoT struct { - S_addr [16]uint8 - D_addr [16]uint8 - S_port uint16 - D_port uint16 -} - -type bpfHttp2GrpcRequestT struct { - Flags uint8 - _ [1]byte - ConnInfo bpfConnectionInfoT - Data [256]uint8 - RetData [64]uint8 - Type uint8 - _ [1]byte - Len int32 - _ [4]byte - StartMonotimeNs uint64 - EndMonotimeNs uint64 - Pid struct { - HostPid uint32 - UserPid uint32 - Ns uint32 - } - _ [4]byte - Tp struct { - TraceId [16]uint8 - SpanId [8]uint8 - ParentId [8]uint8 - Ts uint64 - Flags uint8 - _ [7]byte - } -} - -type bpfHttpInfoT struct { - Flags uint8 - _ [1]byte - ConnInfo bpfConnectionInfoT - _ [2]byte - StartMonotimeNs uint64 - EndMonotimeNs uint64 - Buf [160]uint8 - Len uint32 - RespLen uint32 - Status uint16 - Type uint8 - Ssl uint8 - Pid struct { - HostPid uint32 - UserPid uint32 - Ns uint32 - } - Tp struct { - TraceId [16]uint8 - SpanId [8]uint8 - ParentId [8]uint8 - Ts uint64 - Flags uint8 - _ [7]byte - } -} - -type bpfHttpRequestTrace struct { - Type uint8 - GoStartMonotimeNs uint64 - StartMonotimeNs uint64 - EndMonotimeNs uint64 - Method [7]uint8 - Path [100]uint8 - Status uint16 - _ [2]byte - Conn bpfConnectionInfoT - ContentLength int64 - Tp struct { - TraceId [16]uint8 - SpanId [8]uint8 - ParentId [8]uint8 - Ts uint64 - Flags uint8 - _ [7]byte - } - Pid struct { - HostPid uint32 - UserPid uint32 - Ns uint32 - } -} - -type bpfSqlRequestTrace struct { - Type uint8 - StartMonotimeNs uint64 - EndMonotimeNs uint64 - Sql [500]uint8 - Status uint16 - Tp struct { - TraceId [16]uint8 - SpanId [8]uint8 - ParentId [8]uint8 - Ts uint64 - Flags uint8 - _ [7]byte - } - Pid struct { - HostPid uint32 - UserPid uint32 - Ns uint32 - } -} - -// loadBpf returns the embedded CollectionSpec for bpf. -func loadBpf() (*ebpf.CollectionSpec, error) { - reader := bytes.NewReader(_BpfBytes) - spec, err := ebpf.LoadCollectionSpecFromReader(reader) - if err != nil { - return nil, fmt.Errorf("can't load bpf: %w", err) - } - - return spec, err -} - -// loadBpfObjects loads bpf and converts it into a struct. -// -// The following types are suitable as obj argument: -// -// *bpfObjects -// *bpfPrograms -// *bpfMaps -// -// See ebpf.CollectionSpec.LoadAndAssign documentation for details. -func loadBpfObjects(obj interface{}, opts *ebpf.CollectionOptions) error { - spec, err := loadBpf() - if err != nil { - return err - } - - return spec.LoadAndAssign(obj, opts) -} - -// bpfSpecs contains maps and programs before they are loaded into the kernel. -// -// It can be passed ebpf.CollectionSpec.Assign. -type bpfSpecs struct { - bpfProgramSpecs - bpfMapSpecs -} - -// bpfSpecs contains programs before they are loaded into the kernel. -// -// It can be passed ebpf.CollectionSpec.Assign. -type bpfProgramSpecs struct { -} - -// bpfMapSpecs contains maps before they are loaded into the kernel. -// -// It can be passed ebpf.CollectionSpec.Assign. -type bpfMapSpecs struct { -} - -// bpfObjects contains all objects after they have been loaded into the kernel. -// -// It can be passed to loadBpfObjects or ebpf.CollectionSpec.LoadAndAssign. -type bpfObjects struct { - bpfPrograms - bpfMaps -} - -func (o *bpfObjects) Close() error { - return _BpfClose( - &o.bpfPrograms, - &o.bpfMaps, - ) -} - -// bpfMaps contains all maps after they have been loaded into the kernel. -// -// It can be passed to loadBpfObjects or ebpf.CollectionSpec.LoadAndAssign. -type bpfMaps struct { -} - -func (m *bpfMaps) Close() error { - return _BpfClose() -} - -// bpfPrograms contains all programs after they have been loaded into the kernel. -// -// It can be passed to loadBpfObjects or ebpf.CollectionSpec.LoadAndAssign. -type bpfPrograms struct { -} - -func (p *bpfPrograms) Close() error { - return _BpfClose() -} - -func _BpfClose(closers ...io.Closer) error { - for _, closer := range closers { - if err := closer.Close(); err != nil { - return err - } - } - return nil -} - -// Do not access this directly. -// -//go:embed bpf_bpfel_arm64.o -var _BpfBytes []byte diff --git a/pkg/internal/ebpf/common/bpf_bpfel_arm64.o b/pkg/internal/ebpf/common/bpf_bpfel_arm64.o deleted file mode 100644 index f71424cd6..000000000 Binary files a/pkg/internal/ebpf/common/bpf_bpfel_arm64.o and /dev/null differ diff --git a/pkg/internal/ebpf/common/bpf_bpfel_x86.go b/pkg/internal/ebpf/common/bpf_bpfel_x86.go deleted file mode 100644 index 8cb778c72..000000000 --- a/pkg/internal/ebpf/common/bpf_bpfel_x86.go +++ /dev/null @@ -1,221 +0,0 @@ -// Code generated by bpf2go; DO NOT EDIT. -//go:build 386 || amd64 - -package ebpfcommon - -import ( - "bytes" - _ "embed" - "fmt" - "io" - - "github.com/cilium/ebpf" -) - -type bpfConnectionInfoT struct { - S_addr [16]uint8 - D_addr [16]uint8 - S_port uint16 - D_port uint16 -} - -type bpfHttp2GrpcRequestT struct { - Flags uint8 - _ [1]byte - ConnInfo bpfConnectionInfoT - Data [256]uint8 - RetData [64]uint8 - Type uint8 - _ [1]byte - Len int32 - _ [4]byte - StartMonotimeNs uint64 - EndMonotimeNs uint64 - Pid struct { - HostPid uint32 - UserPid uint32 - Ns uint32 - } - _ [4]byte - Tp struct { - TraceId [16]uint8 - SpanId [8]uint8 - ParentId [8]uint8 - Ts uint64 - Flags uint8 - _ [7]byte - } -} - -type bpfHttpInfoT struct { - Flags uint8 - _ [1]byte - ConnInfo bpfConnectionInfoT - _ [2]byte - StartMonotimeNs uint64 - EndMonotimeNs uint64 - Buf [160]uint8 - Len uint32 - RespLen uint32 - Status uint16 - Type uint8 - Ssl uint8 - Pid struct { - HostPid uint32 - UserPid uint32 - Ns uint32 - } - Tp struct { - TraceId [16]uint8 - SpanId [8]uint8 - ParentId [8]uint8 - Ts uint64 - Flags uint8 - _ [7]byte - } -} - -type bpfHttpRequestTrace struct { - Type uint8 - GoStartMonotimeNs uint64 - StartMonotimeNs uint64 - EndMonotimeNs uint64 - Method [7]uint8 - Path [100]uint8 - Status uint16 - _ [2]byte - Conn bpfConnectionInfoT - ContentLength int64 - Tp struct { - TraceId [16]uint8 - SpanId [8]uint8 - ParentId [8]uint8 - Ts uint64 - Flags uint8 - _ [7]byte - } - Pid struct { - HostPid uint32 - UserPid uint32 - Ns uint32 - } -} - -type bpfSqlRequestTrace struct { - Type uint8 - StartMonotimeNs uint64 - EndMonotimeNs uint64 - Sql [500]uint8 - Status uint16 - Tp struct { - TraceId [16]uint8 - SpanId [8]uint8 - ParentId [8]uint8 - Ts uint64 - Flags uint8 - _ [7]byte - } - Pid struct { - HostPid uint32 - UserPid uint32 - Ns uint32 - } -} - -// loadBpf returns the embedded CollectionSpec for bpf. -func loadBpf() (*ebpf.CollectionSpec, error) { - reader := bytes.NewReader(_BpfBytes) - spec, err := ebpf.LoadCollectionSpecFromReader(reader) - if err != nil { - return nil, fmt.Errorf("can't load bpf: %w", err) - } - - return spec, err -} - -// loadBpfObjects loads bpf and converts it into a struct. -// -// The following types are suitable as obj argument: -// -// *bpfObjects -// *bpfPrograms -// *bpfMaps -// -// See ebpf.CollectionSpec.LoadAndAssign documentation for details. -func loadBpfObjects(obj interface{}, opts *ebpf.CollectionOptions) error { - spec, err := loadBpf() - if err != nil { - return err - } - - return spec.LoadAndAssign(obj, opts) -} - -// bpfSpecs contains maps and programs before they are loaded into the kernel. -// -// It can be passed ebpf.CollectionSpec.Assign. -type bpfSpecs struct { - bpfProgramSpecs - bpfMapSpecs -} - -// bpfSpecs contains programs before they are loaded into the kernel. -// -// It can be passed ebpf.CollectionSpec.Assign. -type bpfProgramSpecs struct { -} - -// bpfMapSpecs contains maps before they are loaded into the kernel. -// -// It can be passed ebpf.CollectionSpec.Assign. -type bpfMapSpecs struct { -} - -// bpfObjects contains all objects after they have been loaded into the kernel. -// -// It can be passed to loadBpfObjects or ebpf.CollectionSpec.LoadAndAssign. -type bpfObjects struct { - bpfPrograms - bpfMaps -} - -func (o *bpfObjects) Close() error { - return _BpfClose( - &o.bpfPrograms, - &o.bpfMaps, - ) -} - -// bpfMaps contains all maps after they have been loaded into the kernel. -// -// It can be passed to loadBpfObjects or ebpf.CollectionSpec.LoadAndAssign. -type bpfMaps struct { -} - -func (m *bpfMaps) Close() error { - return _BpfClose() -} - -// bpfPrograms contains all programs after they have been loaded into the kernel. -// -// It can be passed to loadBpfObjects or ebpf.CollectionSpec.LoadAndAssign. -type bpfPrograms struct { -} - -func (p *bpfPrograms) Close() error { - return _BpfClose() -} - -func _BpfClose(closers ...io.Closer) error { - for _, closer := range closers { - if err := closer.Close(); err != nil { - return err - } - } - return nil -} - -// Do not access this directly. -// -//go:embed bpf_bpfel_x86.o -var _BpfBytes []byte diff --git a/pkg/internal/ebpf/common/bpf_bpfel_x86.o b/pkg/internal/ebpf/common/bpf_bpfel_x86.o deleted file mode 100644 index f71424cd6..000000000 Binary files a/pkg/internal/ebpf/common/bpf_bpfel_x86.o and /dev/null differ diff --git a/pkg/internal/ebpf/goruntime/bpf_bpfel_arm64.go b/pkg/internal/ebpf/goruntime/bpf_bpfel_arm64.go deleted file mode 100644 index c08013711..000000000 --- a/pkg/internal/ebpf/goruntime/bpf_bpfel_arm64.go +++ /dev/null @@ -1,173 +0,0 @@ -// Code generated by bpf2go; DO NOT EDIT. -//go:build arm64 - -package goruntime - -import ( - "bytes" - _ "embed" - "fmt" - "io" - - "github.com/cilium/ebpf" -) - -type bpfConnectionInfoT struct { - S_addr [16]uint8 - D_addr [16]uint8 - S_port uint16 - D_port uint16 -} - -type bpfGoroutineMetadata struct { - Parent uint64 - Timestamp uint64 -} - -type bpfNewFuncInvocationT struct{ Parent uint64 } - -type bpfTpInfoPidT struct { - Tp bpfTpInfoT - Pid uint32 - Valid uint8 - _ [3]byte -} - -type bpfTpInfoT struct { - TraceId [16]uint8 - SpanId [8]uint8 - ParentId [8]uint8 - Ts uint64 - Flags uint8 - _ [7]byte -} - -// loadBpf returns the embedded CollectionSpec for bpf. -func loadBpf() (*ebpf.CollectionSpec, error) { - reader := bytes.NewReader(_BpfBytes) - spec, err := ebpf.LoadCollectionSpecFromReader(reader) - if err != nil { - return nil, fmt.Errorf("can't load bpf: %w", err) - } - - return spec, err -} - -// loadBpfObjects loads bpf and converts it into a struct. -// -// The following types are suitable as obj argument: -// -// *bpfObjects -// *bpfPrograms -// *bpfMaps -// -// See ebpf.CollectionSpec.LoadAndAssign documentation for details. -func loadBpfObjects(obj interface{}, opts *ebpf.CollectionOptions) error { - spec, err := loadBpf() - if err != nil { - return err - } - - return spec.LoadAndAssign(obj, opts) -} - -// bpfSpecs contains maps and programs before they are loaded into the kernel. -// -// It can be passed ebpf.CollectionSpec.Assign. -type bpfSpecs struct { - bpfProgramSpecs - bpfMapSpecs -} - -// bpfSpecs contains programs before they are loaded into the kernel. -// -// It can be passed ebpf.CollectionSpec.Assign. -type bpfProgramSpecs struct { - UprobeProcGoexit1 *ebpf.ProgramSpec `ebpf:"uprobe_proc_goexit1"` - UprobeProcNewproc1 *ebpf.ProgramSpec `ebpf:"uprobe_proc_newproc1"` - UprobeProcNewproc1Ret *ebpf.ProgramSpec `ebpf:"uprobe_proc_newproc1_ret"` -} - -// bpfMapSpecs contains maps before they are loaded into the kernel. -// -// It can be passed ebpf.CollectionSpec.Assign. -type bpfMapSpecs struct { - GoTraceMap *ebpf.MapSpec `ebpf:"go_trace_map"` - GolangMapbucketStorageMap *ebpf.MapSpec `ebpf:"golang_mapbucket_storage_map"` - Newproc1 *ebpf.MapSpec `ebpf:"newproc1"` - OngoingClientConnections *ebpf.MapSpec `ebpf:"ongoing_client_connections"` - OngoingGoroutines *ebpf.MapSpec `ebpf:"ongoing_goroutines"` - OngoingServerConnections *ebpf.MapSpec `ebpf:"ongoing_server_connections"` - TraceMap *ebpf.MapSpec `ebpf:"trace_map"` -} - -// bpfObjects contains all objects after they have been loaded into the kernel. -// -// It can be passed to loadBpfObjects or ebpf.CollectionSpec.LoadAndAssign. -type bpfObjects struct { - bpfPrograms - bpfMaps -} - -func (o *bpfObjects) Close() error { - return _BpfClose( - &o.bpfPrograms, - &o.bpfMaps, - ) -} - -// bpfMaps contains all maps after they have been loaded into the kernel. -// -// It can be passed to loadBpfObjects or ebpf.CollectionSpec.LoadAndAssign. -type bpfMaps struct { - GoTraceMap *ebpf.Map `ebpf:"go_trace_map"` - GolangMapbucketStorageMap *ebpf.Map `ebpf:"golang_mapbucket_storage_map"` - Newproc1 *ebpf.Map `ebpf:"newproc1"` - OngoingClientConnections *ebpf.Map `ebpf:"ongoing_client_connections"` - OngoingGoroutines *ebpf.Map `ebpf:"ongoing_goroutines"` - OngoingServerConnections *ebpf.Map `ebpf:"ongoing_server_connections"` - TraceMap *ebpf.Map `ebpf:"trace_map"` -} - -func (m *bpfMaps) Close() error { - return _BpfClose( - m.GoTraceMap, - m.GolangMapbucketStorageMap, - m.Newproc1, - m.OngoingClientConnections, - m.OngoingGoroutines, - m.OngoingServerConnections, - m.TraceMap, - ) -} - -// bpfPrograms contains all programs after they have been loaded into the kernel. -// -// It can be passed to loadBpfObjects or ebpf.CollectionSpec.LoadAndAssign. -type bpfPrograms struct { - UprobeProcGoexit1 *ebpf.Program `ebpf:"uprobe_proc_goexit1"` - UprobeProcNewproc1 *ebpf.Program `ebpf:"uprobe_proc_newproc1"` - UprobeProcNewproc1Ret *ebpf.Program `ebpf:"uprobe_proc_newproc1_ret"` -} - -func (p *bpfPrograms) Close() error { - return _BpfClose( - p.UprobeProcGoexit1, - p.UprobeProcNewproc1, - p.UprobeProcNewproc1Ret, - ) -} - -func _BpfClose(closers ...io.Closer) error { - for _, closer := range closers { - if err := closer.Close(); err != nil { - return err - } - } - return nil -} - -// Do not access this directly. -// -//go:embed bpf_bpfel_arm64.o -var _BpfBytes []byte diff --git a/pkg/internal/ebpf/goruntime/bpf_bpfel_arm64.o b/pkg/internal/ebpf/goruntime/bpf_bpfel_arm64.o deleted file mode 100644 index c4bd4a419..000000000 Binary files a/pkg/internal/ebpf/goruntime/bpf_bpfel_arm64.o and /dev/null differ diff --git a/pkg/internal/ebpf/goruntime/bpf_bpfel_x86.go b/pkg/internal/ebpf/goruntime/bpf_bpfel_x86.go deleted file mode 100644 index d94d84d67..000000000 --- a/pkg/internal/ebpf/goruntime/bpf_bpfel_x86.go +++ /dev/null @@ -1,173 +0,0 @@ -// Code generated by bpf2go; DO NOT EDIT. -//go:build 386 || amd64 - -package goruntime - -import ( - "bytes" - _ "embed" - "fmt" - "io" - - "github.com/cilium/ebpf" -) - -type bpfConnectionInfoT struct { - S_addr [16]uint8 - D_addr [16]uint8 - S_port uint16 - D_port uint16 -} - -type bpfGoroutineMetadata struct { - Parent uint64 - Timestamp uint64 -} - -type bpfNewFuncInvocationT struct{ Parent uint64 } - -type bpfTpInfoPidT struct { - Tp bpfTpInfoT - Pid uint32 - Valid uint8 - _ [3]byte -} - -type bpfTpInfoT struct { - TraceId [16]uint8 - SpanId [8]uint8 - ParentId [8]uint8 - Ts uint64 - Flags uint8 - _ [7]byte -} - -// loadBpf returns the embedded CollectionSpec for bpf. -func loadBpf() (*ebpf.CollectionSpec, error) { - reader := bytes.NewReader(_BpfBytes) - spec, err := ebpf.LoadCollectionSpecFromReader(reader) - if err != nil { - return nil, fmt.Errorf("can't load bpf: %w", err) - } - - return spec, err -} - -// loadBpfObjects loads bpf and converts it into a struct. -// -// The following types are suitable as obj argument: -// -// *bpfObjects -// *bpfPrograms -// *bpfMaps -// -// See ebpf.CollectionSpec.LoadAndAssign documentation for details. -func loadBpfObjects(obj interface{}, opts *ebpf.CollectionOptions) error { - spec, err := loadBpf() - if err != nil { - return err - } - - return spec.LoadAndAssign(obj, opts) -} - -// bpfSpecs contains maps and programs before they are loaded into the kernel. -// -// It can be passed ebpf.CollectionSpec.Assign. -type bpfSpecs struct { - bpfProgramSpecs - bpfMapSpecs -} - -// bpfSpecs contains programs before they are loaded into the kernel. -// -// It can be passed ebpf.CollectionSpec.Assign. -type bpfProgramSpecs struct { - UprobeProcGoexit1 *ebpf.ProgramSpec `ebpf:"uprobe_proc_goexit1"` - UprobeProcNewproc1 *ebpf.ProgramSpec `ebpf:"uprobe_proc_newproc1"` - UprobeProcNewproc1Ret *ebpf.ProgramSpec `ebpf:"uprobe_proc_newproc1_ret"` -} - -// bpfMapSpecs contains maps before they are loaded into the kernel. -// -// It can be passed ebpf.CollectionSpec.Assign. -type bpfMapSpecs struct { - GoTraceMap *ebpf.MapSpec `ebpf:"go_trace_map"` - GolangMapbucketStorageMap *ebpf.MapSpec `ebpf:"golang_mapbucket_storage_map"` - Newproc1 *ebpf.MapSpec `ebpf:"newproc1"` - OngoingClientConnections *ebpf.MapSpec `ebpf:"ongoing_client_connections"` - OngoingGoroutines *ebpf.MapSpec `ebpf:"ongoing_goroutines"` - OngoingServerConnections *ebpf.MapSpec `ebpf:"ongoing_server_connections"` - TraceMap *ebpf.MapSpec `ebpf:"trace_map"` -} - -// bpfObjects contains all objects after they have been loaded into the kernel. -// -// It can be passed to loadBpfObjects or ebpf.CollectionSpec.LoadAndAssign. -type bpfObjects struct { - bpfPrograms - bpfMaps -} - -func (o *bpfObjects) Close() error { - return _BpfClose( - &o.bpfPrograms, - &o.bpfMaps, - ) -} - -// bpfMaps contains all maps after they have been loaded into the kernel. -// -// It can be passed to loadBpfObjects or ebpf.CollectionSpec.LoadAndAssign. -type bpfMaps struct { - GoTraceMap *ebpf.Map `ebpf:"go_trace_map"` - GolangMapbucketStorageMap *ebpf.Map `ebpf:"golang_mapbucket_storage_map"` - Newproc1 *ebpf.Map `ebpf:"newproc1"` - OngoingClientConnections *ebpf.Map `ebpf:"ongoing_client_connections"` - OngoingGoroutines *ebpf.Map `ebpf:"ongoing_goroutines"` - OngoingServerConnections *ebpf.Map `ebpf:"ongoing_server_connections"` - TraceMap *ebpf.Map `ebpf:"trace_map"` -} - -func (m *bpfMaps) Close() error { - return _BpfClose( - m.GoTraceMap, - m.GolangMapbucketStorageMap, - m.Newproc1, - m.OngoingClientConnections, - m.OngoingGoroutines, - m.OngoingServerConnections, - m.TraceMap, - ) -} - -// bpfPrograms contains all programs after they have been loaded into the kernel. -// -// It can be passed to loadBpfObjects or ebpf.CollectionSpec.LoadAndAssign. -type bpfPrograms struct { - UprobeProcGoexit1 *ebpf.Program `ebpf:"uprobe_proc_goexit1"` - UprobeProcNewproc1 *ebpf.Program `ebpf:"uprobe_proc_newproc1"` - UprobeProcNewproc1Ret *ebpf.Program `ebpf:"uprobe_proc_newproc1_ret"` -} - -func (p *bpfPrograms) Close() error { - return _BpfClose( - p.UprobeProcGoexit1, - p.UprobeProcNewproc1, - p.UprobeProcNewproc1Ret, - ) -} - -func _BpfClose(closers ...io.Closer) error { - for _, closer := range closers { - if err := closer.Close(); err != nil { - return err - } - } - return nil -} - -// Do not access this directly. -// -//go:embed bpf_bpfel_x86.o -var _BpfBytes []byte diff --git a/pkg/internal/ebpf/goruntime/bpf_bpfel_x86.o b/pkg/internal/ebpf/goruntime/bpf_bpfel_x86.o deleted file mode 100644 index b3ba060d8..000000000 Binary files a/pkg/internal/ebpf/goruntime/bpf_bpfel_x86.o and /dev/null differ diff --git a/pkg/internal/ebpf/goruntime/bpf_debug_bpfel_arm64.go b/pkg/internal/ebpf/goruntime/bpf_debug_bpfel_arm64.go deleted file mode 100644 index 3f9078923..000000000 --- a/pkg/internal/ebpf/goruntime/bpf_debug_bpfel_arm64.go +++ /dev/null @@ -1,173 +0,0 @@ -// Code generated by bpf2go; DO NOT EDIT. -//go:build arm64 - -package goruntime - -import ( - "bytes" - _ "embed" - "fmt" - "io" - - "github.com/cilium/ebpf" -) - -type bpf_debugConnectionInfoT struct { - S_addr [16]uint8 - D_addr [16]uint8 - S_port uint16 - D_port uint16 -} - -type bpf_debugGoroutineMetadata struct { - Parent uint64 - Timestamp uint64 -} - -type bpf_debugNewFuncInvocationT struct{ Parent uint64 } - -type bpf_debugTpInfoPidT struct { - Tp bpf_debugTpInfoT - Pid uint32 - Valid uint8 - _ [3]byte -} - -type bpf_debugTpInfoT struct { - TraceId [16]uint8 - SpanId [8]uint8 - ParentId [8]uint8 - Ts uint64 - Flags uint8 - _ [7]byte -} - -// loadBpf_debug returns the embedded CollectionSpec for bpf_debug. -func loadBpf_debug() (*ebpf.CollectionSpec, error) { - reader := bytes.NewReader(_Bpf_debugBytes) - spec, err := ebpf.LoadCollectionSpecFromReader(reader) - if err != nil { - return nil, fmt.Errorf("can't load bpf_debug: %w", err) - } - - return spec, err -} - -// loadBpf_debugObjects loads bpf_debug and converts it into a struct. -// -// The following types are suitable as obj argument: -// -// *bpf_debugObjects -// *bpf_debugPrograms -// *bpf_debugMaps -// -// See ebpf.CollectionSpec.LoadAndAssign documentation for details. -func loadBpf_debugObjects(obj interface{}, opts *ebpf.CollectionOptions) error { - spec, err := loadBpf_debug() - if err != nil { - return err - } - - return spec.LoadAndAssign(obj, opts) -} - -// bpf_debugSpecs contains maps and programs before they are loaded into the kernel. -// -// It can be passed ebpf.CollectionSpec.Assign. -type bpf_debugSpecs struct { - bpf_debugProgramSpecs - bpf_debugMapSpecs -} - -// bpf_debugSpecs contains programs before they are loaded into the kernel. -// -// It can be passed ebpf.CollectionSpec.Assign. -type bpf_debugProgramSpecs struct { - UprobeProcGoexit1 *ebpf.ProgramSpec `ebpf:"uprobe_proc_goexit1"` - UprobeProcNewproc1 *ebpf.ProgramSpec `ebpf:"uprobe_proc_newproc1"` - UprobeProcNewproc1Ret *ebpf.ProgramSpec `ebpf:"uprobe_proc_newproc1_ret"` -} - -// bpf_debugMapSpecs contains maps before they are loaded into the kernel. -// -// It can be passed ebpf.CollectionSpec.Assign. -type bpf_debugMapSpecs struct { - GoTraceMap *ebpf.MapSpec `ebpf:"go_trace_map"` - GolangMapbucketStorageMap *ebpf.MapSpec `ebpf:"golang_mapbucket_storage_map"` - Newproc1 *ebpf.MapSpec `ebpf:"newproc1"` - OngoingClientConnections *ebpf.MapSpec `ebpf:"ongoing_client_connections"` - OngoingGoroutines *ebpf.MapSpec `ebpf:"ongoing_goroutines"` - OngoingServerConnections *ebpf.MapSpec `ebpf:"ongoing_server_connections"` - TraceMap *ebpf.MapSpec `ebpf:"trace_map"` -} - -// bpf_debugObjects contains all objects after they have been loaded into the kernel. -// -// It can be passed to loadBpf_debugObjects or ebpf.CollectionSpec.LoadAndAssign. -type bpf_debugObjects struct { - bpf_debugPrograms - bpf_debugMaps -} - -func (o *bpf_debugObjects) Close() error { - return _Bpf_debugClose( - &o.bpf_debugPrograms, - &o.bpf_debugMaps, - ) -} - -// bpf_debugMaps contains all maps after they have been loaded into the kernel. -// -// It can be passed to loadBpf_debugObjects or ebpf.CollectionSpec.LoadAndAssign. -type bpf_debugMaps struct { - GoTraceMap *ebpf.Map `ebpf:"go_trace_map"` - GolangMapbucketStorageMap *ebpf.Map `ebpf:"golang_mapbucket_storage_map"` - Newproc1 *ebpf.Map `ebpf:"newproc1"` - OngoingClientConnections *ebpf.Map `ebpf:"ongoing_client_connections"` - OngoingGoroutines *ebpf.Map `ebpf:"ongoing_goroutines"` - OngoingServerConnections *ebpf.Map `ebpf:"ongoing_server_connections"` - TraceMap *ebpf.Map `ebpf:"trace_map"` -} - -func (m *bpf_debugMaps) Close() error { - return _Bpf_debugClose( - m.GoTraceMap, - m.GolangMapbucketStorageMap, - m.Newproc1, - m.OngoingClientConnections, - m.OngoingGoroutines, - m.OngoingServerConnections, - m.TraceMap, - ) -} - -// bpf_debugPrograms contains all programs after they have been loaded into the kernel. -// -// It can be passed to loadBpf_debugObjects or ebpf.CollectionSpec.LoadAndAssign. -type bpf_debugPrograms struct { - UprobeProcGoexit1 *ebpf.Program `ebpf:"uprobe_proc_goexit1"` - UprobeProcNewproc1 *ebpf.Program `ebpf:"uprobe_proc_newproc1"` - UprobeProcNewproc1Ret *ebpf.Program `ebpf:"uprobe_proc_newproc1_ret"` -} - -func (p *bpf_debugPrograms) Close() error { - return _Bpf_debugClose( - p.UprobeProcGoexit1, - p.UprobeProcNewproc1, - p.UprobeProcNewproc1Ret, - ) -} - -func _Bpf_debugClose(closers ...io.Closer) error { - for _, closer := range closers { - if err := closer.Close(); err != nil { - return err - } - } - return nil -} - -// Do not access this directly. -// -//go:embed bpf_debug_bpfel_arm64.o -var _Bpf_debugBytes []byte diff --git a/pkg/internal/ebpf/goruntime/bpf_debug_bpfel_arm64.o b/pkg/internal/ebpf/goruntime/bpf_debug_bpfel_arm64.o deleted file mode 100644 index 53dfdde86..000000000 Binary files a/pkg/internal/ebpf/goruntime/bpf_debug_bpfel_arm64.o and /dev/null differ diff --git a/pkg/internal/ebpf/goruntime/bpf_debug_bpfel_x86.go b/pkg/internal/ebpf/goruntime/bpf_debug_bpfel_x86.go deleted file mode 100644 index e38ea88cc..000000000 --- a/pkg/internal/ebpf/goruntime/bpf_debug_bpfel_x86.go +++ /dev/null @@ -1,173 +0,0 @@ -// Code generated by bpf2go; DO NOT EDIT. -//go:build 386 || amd64 - -package goruntime - -import ( - "bytes" - _ "embed" - "fmt" - "io" - - "github.com/cilium/ebpf" -) - -type bpf_debugConnectionInfoT struct { - S_addr [16]uint8 - D_addr [16]uint8 - S_port uint16 - D_port uint16 -} - -type bpf_debugGoroutineMetadata struct { - Parent uint64 - Timestamp uint64 -} - -type bpf_debugNewFuncInvocationT struct{ Parent uint64 } - -type bpf_debugTpInfoPidT struct { - Tp bpf_debugTpInfoT - Pid uint32 - Valid uint8 - _ [3]byte -} - -type bpf_debugTpInfoT struct { - TraceId [16]uint8 - SpanId [8]uint8 - ParentId [8]uint8 - Ts uint64 - Flags uint8 - _ [7]byte -} - -// loadBpf_debug returns the embedded CollectionSpec for bpf_debug. -func loadBpf_debug() (*ebpf.CollectionSpec, error) { - reader := bytes.NewReader(_Bpf_debugBytes) - spec, err := ebpf.LoadCollectionSpecFromReader(reader) - if err != nil { - return nil, fmt.Errorf("can't load bpf_debug: %w", err) - } - - return spec, err -} - -// loadBpf_debugObjects loads bpf_debug and converts it into a struct. -// -// The following types are suitable as obj argument: -// -// *bpf_debugObjects -// *bpf_debugPrograms -// *bpf_debugMaps -// -// See ebpf.CollectionSpec.LoadAndAssign documentation for details. -func loadBpf_debugObjects(obj interface{}, opts *ebpf.CollectionOptions) error { - spec, err := loadBpf_debug() - if err != nil { - return err - } - - return spec.LoadAndAssign(obj, opts) -} - -// bpf_debugSpecs contains maps and programs before they are loaded into the kernel. -// -// It can be passed ebpf.CollectionSpec.Assign. -type bpf_debugSpecs struct { - bpf_debugProgramSpecs - bpf_debugMapSpecs -} - -// bpf_debugSpecs contains programs before they are loaded into the kernel. -// -// It can be passed ebpf.CollectionSpec.Assign. -type bpf_debugProgramSpecs struct { - UprobeProcGoexit1 *ebpf.ProgramSpec `ebpf:"uprobe_proc_goexit1"` - UprobeProcNewproc1 *ebpf.ProgramSpec `ebpf:"uprobe_proc_newproc1"` - UprobeProcNewproc1Ret *ebpf.ProgramSpec `ebpf:"uprobe_proc_newproc1_ret"` -} - -// bpf_debugMapSpecs contains maps before they are loaded into the kernel. -// -// It can be passed ebpf.CollectionSpec.Assign. -type bpf_debugMapSpecs struct { - GoTraceMap *ebpf.MapSpec `ebpf:"go_trace_map"` - GolangMapbucketStorageMap *ebpf.MapSpec `ebpf:"golang_mapbucket_storage_map"` - Newproc1 *ebpf.MapSpec `ebpf:"newproc1"` - OngoingClientConnections *ebpf.MapSpec `ebpf:"ongoing_client_connections"` - OngoingGoroutines *ebpf.MapSpec `ebpf:"ongoing_goroutines"` - OngoingServerConnections *ebpf.MapSpec `ebpf:"ongoing_server_connections"` - TraceMap *ebpf.MapSpec `ebpf:"trace_map"` -} - -// bpf_debugObjects contains all objects after they have been loaded into the kernel. -// -// It can be passed to loadBpf_debugObjects or ebpf.CollectionSpec.LoadAndAssign. -type bpf_debugObjects struct { - bpf_debugPrograms - bpf_debugMaps -} - -func (o *bpf_debugObjects) Close() error { - return _Bpf_debugClose( - &o.bpf_debugPrograms, - &o.bpf_debugMaps, - ) -} - -// bpf_debugMaps contains all maps after they have been loaded into the kernel. -// -// It can be passed to loadBpf_debugObjects or ebpf.CollectionSpec.LoadAndAssign. -type bpf_debugMaps struct { - GoTraceMap *ebpf.Map `ebpf:"go_trace_map"` - GolangMapbucketStorageMap *ebpf.Map `ebpf:"golang_mapbucket_storage_map"` - Newproc1 *ebpf.Map `ebpf:"newproc1"` - OngoingClientConnections *ebpf.Map `ebpf:"ongoing_client_connections"` - OngoingGoroutines *ebpf.Map `ebpf:"ongoing_goroutines"` - OngoingServerConnections *ebpf.Map `ebpf:"ongoing_server_connections"` - TraceMap *ebpf.Map `ebpf:"trace_map"` -} - -func (m *bpf_debugMaps) Close() error { - return _Bpf_debugClose( - m.GoTraceMap, - m.GolangMapbucketStorageMap, - m.Newproc1, - m.OngoingClientConnections, - m.OngoingGoroutines, - m.OngoingServerConnections, - m.TraceMap, - ) -} - -// bpf_debugPrograms contains all programs after they have been loaded into the kernel. -// -// It can be passed to loadBpf_debugObjects or ebpf.CollectionSpec.LoadAndAssign. -type bpf_debugPrograms struct { - UprobeProcGoexit1 *ebpf.Program `ebpf:"uprobe_proc_goexit1"` - UprobeProcNewproc1 *ebpf.Program `ebpf:"uprobe_proc_newproc1"` - UprobeProcNewproc1Ret *ebpf.Program `ebpf:"uprobe_proc_newproc1_ret"` -} - -func (p *bpf_debugPrograms) Close() error { - return _Bpf_debugClose( - p.UprobeProcGoexit1, - p.UprobeProcNewproc1, - p.UprobeProcNewproc1Ret, - ) -} - -func _Bpf_debugClose(closers ...io.Closer) error { - for _, closer := range closers { - if err := closer.Close(); err != nil { - return err - } - } - return nil -} - -// Do not access this directly. -// -//go:embed bpf_debug_bpfel_x86.o -var _Bpf_debugBytes []byte diff --git a/pkg/internal/ebpf/goruntime/bpf_debug_bpfel_x86.o b/pkg/internal/ebpf/goruntime/bpf_debug_bpfel_x86.o deleted file mode 100644 index 8fd77f3c2..000000000 Binary files a/pkg/internal/ebpf/goruntime/bpf_debug_bpfel_x86.o and /dev/null differ diff --git a/pkg/internal/ebpf/grpc/bpf_bpfel_arm64.go b/pkg/internal/ebpf/grpc/bpf_bpfel_arm64.go deleted file mode 100644 index d54e7d3d8..000000000 --- a/pkg/internal/ebpf/grpc/bpf_bpfel_arm64.go +++ /dev/null @@ -1,222 +0,0 @@ -// Code generated by bpf2go; DO NOT EDIT. -//go:build arm64 - -package grpc - -import ( - "bytes" - _ "embed" - "fmt" - "io" - - "github.com/cilium/ebpf" -) - -type bpfConnectionInfoT struct { - S_addr [16]uint8 - D_addr [16]uint8 - S_port uint16 - D_port uint16 -} - -type bpfGoroutineMetadata struct { - Parent uint64 - Timestamp uint64 -} - -type bpfGrpcClientFuncInvocationT struct { - StartMonotimeNs uint64 - Cc uint64 - Method uint64 - MethodLen uint64 - Tp bpfTpInfoT - Flags uint64 -} - -type bpfGrpcSrvFuncInvocationT struct { - StartMonotimeNs uint64 - Stream uint64 - Tp bpfTpInfoT -} - -type bpfTpInfoPidT struct { - Tp bpfTpInfoT - Pid uint32 - Valid uint8 - _ [3]byte -} - -type bpfTpInfoT struct { - TraceId [16]uint8 - SpanId [8]uint8 - ParentId [8]uint8 - Ts uint64 - Flags uint8 - _ [7]byte -} - -// loadBpf returns the embedded CollectionSpec for bpf. -func loadBpf() (*ebpf.CollectionSpec, error) { - reader := bytes.NewReader(_BpfBytes) - spec, err := ebpf.LoadCollectionSpecFromReader(reader) - if err != nil { - return nil, fmt.Errorf("can't load bpf: %w", err) - } - - return spec, err -} - -// loadBpfObjects loads bpf and converts it into a struct. -// -// The following types are suitable as obj argument: -// -// *bpfObjects -// *bpfPrograms -// *bpfMaps -// -// See ebpf.CollectionSpec.LoadAndAssign documentation for details. -func loadBpfObjects(obj interface{}, opts *ebpf.CollectionOptions) error { - spec, err := loadBpf() - if err != nil { - return err - } - - return spec.LoadAndAssign(obj, opts) -} - -// bpfSpecs contains maps and programs before they are loaded into the kernel. -// -// It can be passed ebpf.CollectionSpec.Assign. -type bpfSpecs struct { - bpfProgramSpecs - bpfMapSpecs -} - -// bpfSpecs contains programs before they are loaded into the kernel. -// -// It can be passed ebpf.CollectionSpec.Assign. -type bpfProgramSpecs struct { - UprobeClientConnClose *ebpf.ProgramSpec `ebpf:"uprobe_ClientConn_Close"` - UprobeClientConnInvoke *ebpf.ProgramSpec `ebpf:"uprobe_ClientConn_Invoke"` - UprobeClientConnInvokeReturn *ebpf.ProgramSpec `ebpf:"uprobe_ClientConn_Invoke_return"` - UprobeClientConnNewStream *ebpf.ProgramSpec `ebpf:"uprobe_ClientConn_NewStream"` - UprobeGrpcFramerWriteHeaders *ebpf.ProgramSpec `ebpf:"uprobe_grpcFramerWriteHeaders"` - UprobeGrpcFramerWriteHeadersReturns *ebpf.ProgramSpec `ebpf:"uprobe_grpcFramerWriteHeaders_returns"` - UprobeServerHandleStream *ebpf.ProgramSpec `ebpf:"uprobe_server_handleStream"` - UprobeServerHandleStreamReturn *ebpf.ProgramSpec `ebpf:"uprobe_server_handleStream_return"` - UprobeTransportHttp2ClientNewStream *ebpf.ProgramSpec `ebpf:"uprobe_transport_http2Client_NewStream"` - UprobeTransportWriteStatus *ebpf.ProgramSpec `ebpf:"uprobe_transport_writeStatus"` -} - -// bpfMapSpecs contains maps before they are loaded into the kernel. -// -// It can be passed ebpf.CollectionSpec.Assign. -type bpfMapSpecs struct { - Events *ebpf.MapSpec `ebpf:"events"` - GoTraceMap *ebpf.MapSpec `ebpf:"go_trace_map"` - GolangMapbucketStorageMap *ebpf.MapSpec `ebpf:"golang_mapbucket_storage_map"` - OngoingClientConnections *ebpf.MapSpec `ebpf:"ongoing_client_connections"` - OngoingGoroutines *ebpf.MapSpec `ebpf:"ongoing_goroutines"` - OngoingGrpcClientRequests *ebpf.MapSpec `ebpf:"ongoing_grpc_client_requests"` - OngoingGrpcHeaderWrites *ebpf.MapSpec `ebpf:"ongoing_grpc_header_writes"` - OngoingGrpcRequestStatus *ebpf.MapSpec `ebpf:"ongoing_grpc_request_status"` - OngoingGrpcServerRequests *ebpf.MapSpec `ebpf:"ongoing_grpc_server_requests"` - OngoingServerConnections *ebpf.MapSpec `ebpf:"ongoing_server_connections"` - OngoingStreams *ebpf.MapSpec `ebpf:"ongoing_streams"` - TraceMap *ebpf.MapSpec `ebpf:"trace_map"` -} - -// bpfObjects contains all objects after they have been loaded into the kernel. -// -// It can be passed to loadBpfObjects or ebpf.CollectionSpec.LoadAndAssign. -type bpfObjects struct { - bpfPrograms - bpfMaps -} - -func (o *bpfObjects) Close() error { - return _BpfClose( - &o.bpfPrograms, - &o.bpfMaps, - ) -} - -// bpfMaps contains all maps after they have been loaded into the kernel. -// -// It can be passed to loadBpfObjects or ebpf.CollectionSpec.LoadAndAssign. -type bpfMaps struct { - Events *ebpf.Map `ebpf:"events"` - GoTraceMap *ebpf.Map `ebpf:"go_trace_map"` - GolangMapbucketStorageMap *ebpf.Map `ebpf:"golang_mapbucket_storage_map"` - OngoingClientConnections *ebpf.Map `ebpf:"ongoing_client_connections"` - OngoingGoroutines *ebpf.Map `ebpf:"ongoing_goroutines"` - OngoingGrpcClientRequests *ebpf.Map `ebpf:"ongoing_grpc_client_requests"` - OngoingGrpcHeaderWrites *ebpf.Map `ebpf:"ongoing_grpc_header_writes"` - OngoingGrpcRequestStatus *ebpf.Map `ebpf:"ongoing_grpc_request_status"` - OngoingGrpcServerRequests *ebpf.Map `ebpf:"ongoing_grpc_server_requests"` - OngoingServerConnections *ebpf.Map `ebpf:"ongoing_server_connections"` - OngoingStreams *ebpf.Map `ebpf:"ongoing_streams"` - TraceMap *ebpf.Map `ebpf:"trace_map"` -} - -func (m *bpfMaps) Close() error { - return _BpfClose( - m.Events, - m.GoTraceMap, - m.GolangMapbucketStorageMap, - m.OngoingClientConnections, - m.OngoingGoroutines, - m.OngoingGrpcClientRequests, - m.OngoingGrpcHeaderWrites, - m.OngoingGrpcRequestStatus, - m.OngoingGrpcServerRequests, - m.OngoingServerConnections, - m.OngoingStreams, - m.TraceMap, - ) -} - -// bpfPrograms contains all programs after they have been loaded into the kernel. -// -// It can be passed to loadBpfObjects or ebpf.CollectionSpec.LoadAndAssign. -type bpfPrograms struct { - UprobeClientConnClose *ebpf.Program `ebpf:"uprobe_ClientConn_Close"` - UprobeClientConnInvoke *ebpf.Program `ebpf:"uprobe_ClientConn_Invoke"` - UprobeClientConnInvokeReturn *ebpf.Program `ebpf:"uprobe_ClientConn_Invoke_return"` - UprobeClientConnNewStream *ebpf.Program `ebpf:"uprobe_ClientConn_NewStream"` - UprobeGrpcFramerWriteHeaders *ebpf.Program `ebpf:"uprobe_grpcFramerWriteHeaders"` - UprobeGrpcFramerWriteHeadersReturns *ebpf.Program `ebpf:"uprobe_grpcFramerWriteHeaders_returns"` - UprobeServerHandleStream *ebpf.Program `ebpf:"uprobe_server_handleStream"` - UprobeServerHandleStreamReturn *ebpf.Program `ebpf:"uprobe_server_handleStream_return"` - UprobeTransportHttp2ClientNewStream *ebpf.Program `ebpf:"uprobe_transport_http2Client_NewStream"` - UprobeTransportWriteStatus *ebpf.Program `ebpf:"uprobe_transport_writeStatus"` -} - -func (p *bpfPrograms) Close() error { - return _BpfClose( - p.UprobeClientConnClose, - p.UprobeClientConnInvoke, - p.UprobeClientConnInvokeReturn, - p.UprobeClientConnNewStream, - p.UprobeGrpcFramerWriteHeaders, - p.UprobeGrpcFramerWriteHeadersReturns, - p.UprobeServerHandleStream, - p.UprobeServerHandleStreamReturn, - p.UprobeTransportHttp2ClientNewStream, - p.UprobeTransportWriteStatus, - ) -} - -func _BpfClose(closers ...io.Closer) error { - for _, closer := range closers { - if err := closer.Close(); err != nil { - return err - } - } - return nil -} - -// Do not access this directly. -// -//go:embed bpf_bpfel_arm64.o -var _BpfBytes []byte diff --git a/pkg/internal/ebpf/grpc/bpf_bpfel_arm64.o b/pkg/internal/ebpf/grpc/bpf_bpfel_arm64.o deleted file mode 100644 index a490a337e..000000000 Binary files a/pkg/internal/ebpf/grpc/bpf_bpfel_arm64.o and /dev/null differ diff --git a/pkg/internal/ebpf/grpc/bpf_bpfel_x86.go b/pkg/internal/ebpf/grpc/bpf_bpfel_x86.go deleted file mode 100644 index 161a37c71..000000000 --- a/pkg/internal/ebpf/grpc/bpf_bpfel_x86.go +++ /dev/null @@ -1,222 +0,0 @@ -// Code generated by bpf2go; DO NOT EDIT. -//go:build 386 || amd64 - -package grpc - -import ( - "bytes" - _ "embed" - "fmt" - "io" - - "github.com/cilium/ebpf" -) - -type bpfConnectionInfoT struct { - S_addr [16]uint8 - D_addr [16]uint8 - S_port uint16 - D_port uint16 -} - -type bpfGoroutineMetadata struct { - Parent uint64 - Timestamp uint64 -} - -type bpfGrpcClientFuncInvocationT struct { - StartMonotimeNs uint64 - Cc uint64 - Method uint64 - MethodLen uint64 - Tp bpfTpInfoT - Flags uint64 -} - -type bpfGrpcSrvFuncInvocationT struct { - StartMonotimeNs uint64 - Stream uint64 - Tp bpfTpInfoT -} - -type bpfTpInfoPidT struct { - Tp bpfTpInfoT - Pid uint32 - Valid uint8 - _ [3]byte -} - -type bpfTpInfoT struct { - TraceId [16]uint8 - SpanId [8]uint8 - ParentId [8]uint8 - Ts uint64 - Flags uint8 - _ [7]byte -} - -// loadBpf returns the embedded CollectionSpec for bpf. -func loadBpf() (*ebpf.CollectionSpec, error) { - reader := bytes.NewReader(_BpfBytes) - spec, err := ebpf.LoadCollectionSpecFromReader(reader) - if err != nil { - return nil, fmt.Errorf("can't load bpf: %w", err) - } - - return spec, err -} - -// loadBpfObjects loads bpf and converts it into a struct. -// -// The following types are suitable as obj argument: -// -// *bpfObjects -// *bpfPrograms -// *bpfMaps -// -// See ebpf.CollectionSpec.LoadAndAssign documentation for details. -func loadBpfObjects(obj interface{}, opts *ebpf.CollectionOptions) error { - spec, err := loadBpf() - if err != nil { - return err - } - - return spec.LoadAndAssign(obj, opts) -} - -// bpfSpecs contains maps and programs before they are loaded into the kernel. -// -// It can be passed ebpf.CollectionSpec.Assign. -type bpfSpecs struct { - bpfProgramSpecs - bpfMapSpecs -} - -// bpfSpecs contains programs before they are loaded into the kernel. -// -// It can be passed ebpf.CollectionSpec.Assign. -type bpfProgramSpecs struct { - UprobeClientConnClose *ebpf.ProgramSpec `ebpf:"uprobe_ClientConn_Close"` - UprobeClientConnInvoke *ebpf.ProgramSpec `ebpf:"uprobe_ClientConn_Invoke"` - UprobeClientConnInvokeReturn *ebpf.ProgramSpec `ebpf:"uprobe_ClientConn_Invoke_return"` - UprobeClientConnNewStream *ebpf.ProgramSpec `ebpf:"uprobe_ClientConn_NewStream"` - UprobeGrpcFramerWriteHeaders *ebpf.ProgramSpec `ebpf:"uprobe_grpcFramerWriteHeaders"` - UprobeGrpcFramerWriteHeadersReturns *ebpf.ProgramSpec `ebpf:"uprobe_grpcFramerWriteHeaders_returns"` - UprobeServerHandleStream *ebpf.ProgramSpec `ebpf:"uprobe_server_handleStream"` - UprobeServerHandleStreamReturn *ebpf.ProgramSpec `ebpf:"uprobe_server_handleStream_return"` - UprobeTransportHttp2ClientNewStream *ebpf.ProgramSpec `ebpf:"uprobe_transport_http2Client_NewStream"` - UprobeTransportWriteStatus *ebpf.ProgramSpec `ebpf:"uprobe_transport_writeStatus"` -} - -// bpfMapSpecs contains maps before they are loaded into the kernel. -// -// It can be passed ebpf.CollectionSpec.Assign. -type bpfMapSpecs struct { - Events *ebpf.MapSpec `ebpf:"events"` - GoTraceMap *ebpf.MapSpec `ebpf:"go_trace_map"` - GolangMapbucketStorageMap *ebpf.MapSpec `ebpf:"golang_mapbucket_storage_map"` - OngoingClientConnections *ebpf.MapSpec `ebpf:"ongoing_client_connections"` - OngoingGoroutines *ebpf.MapSpec `ebpf:"ongoing_goroutines"` - OngoingGrpcClientRequests *ebpf.MapSpec `ebpf:"ongoing_grpc_client_requests"` - OngoingGrpcHeaderWrites *ebpf.MapSpec `ebpf:"ongoing_grpc_header_writes"` - OngoingGrpcRequestStatus *ebpf.MapSpec `ebpf:"ongoing_grpc_request_status"` - OngoingGrpcServerRequests *ebpf.MapSpec `ebpf:"ongoing_grpc_server_requests"` - OngoingServerConnections *ebpf.MapSpec `ebpf:"ongoing_server_connections"` - OngoingStreams *ebpf.MapSpec `ebpf:"ongoing_streams"` - TraceMap *ebpf.MapSpec `ebpf:"trace_map"` -} - -// bpfObjects contains all objects after they have been loaded into the kernel. -// -// It can be passed to loadBpfObjects or ebpf.CollectionSpec.LoadAndAssign. -type bpfObjects struct { - bpfPrograms - bpfMaps -} - -func (o *bpfObjects) Close() error { - return _BpfClose( - &o.bpfPrograms, - &o.bpfMaps, - ) -} - -// bpfMaps contains all maps after they have been loaded into the kernel. -// -// It can be passed to loadBpfObjects or ebpf.CollectionSpec.LoadAndAssign. -type bpfMaps struct { - Events *ebpf.Map `ebpf:"events"` - GoTraceMap *ebpf.Map `ebpf:"go_trace_map"` - GolangMapbucketStorageMap *ebpf.Map `ebpf:"golang_mapbucket_storage_map"` - OngoingClientConnections *ebpf.Map `ebpf:"ongoing_client_connections"` - OngoingGoroutines *ebpf.Map `ebpf:"ongoing_goroutines"` - OngoingGrpcClientRequests *ebpf.Map `ebpf:"ongoing_grpc_client_requests"` - OngoingGrpcHeaderWrites *ebpf.Map `ebpf:"ongoing_grpc_header_writes"` - OngoingGrpcRequestStatus *ebpf.Map `ebpf:"ongoing_grpc_request_status"` - OngoingGrpcServerRequests *ebpf.Map `ebpf:"ongoing_grpc_server_requests"` - OngoingServerConnections *ebpf.Map `ebpf:"ongoing_server_connections"` - OngoingStreams *ebpf.Map `ebpf:"ongoing_streams"` - TraceMap *ebpf.Map `ebpf:"trace_map"` -} - -func (m *bpfMaps) Close() error { - return _BpfClose( - m.Events, - m.GoTraceMap, - m.GolangMapbucketStorageMap, - m.OngoingClientConnections, - m.OngoingGoroutines, - m.OngoingGrpcClientRequests, - m.OngoingGrpcHeaderWrites, - m.OngoingGrpcRequestStatus, - m.OngoingGrpcServerRequests, - m.OngoingServerConnections, - m.OngoingStreams, - m.TraceMap, - ) -} - -// bpfPrograms contains all programs after they have been loaded into the kernel. -// -// It can be passed to loadBpfObjects or ebpf.CollectionSpec.LoadAndAssign. -type bpfPrograms struct { - UprobeClientConnClose *ebpf.Program `ebpf:"uprobe_ClientConn_Close"` - UprobeClientConnInvoke *ebpf.Program `ebpf:"uprobe_ClientConn_Invoke"` - UprobeClientConnInvokeReturn *ebpf.Program `ebpf:"uprobe_ClientConn_Invoke_return"` - UprobeClientConnNewStream *ebpf.Program `ebpf:"uprobe_ClientConn_NewStream"` - UprobeGrpcFramerWriteHeaders *ebpf.Program `ebpf:"uprobe_grpcFramerWriteHeaders"` - UprobeGrpcFramerWriteHeadersReturns *ebpf.Program `ebpf:"uprobe_grpcFramerWriteHeaders_returns"` - UprobeServerHandleStream *ebpf.Program `ebpf:"uprobe_server_handleStream"` - UprobeServerHandleStreamReturn *ebpf.Program `ebpf:"uprobe_server_handleStream_return"` - UprobeTransportHttp2ClientNewStream *ebpf.Program `ebpf:"uprobe_transport_http2Client_NewStream"` - UprobeTransportWriteStatus *ebpf.Program `ebpf:"uprobe_transport_writeStatus"` -} - -func (p *bpfPrograms) Close() error { - return _BpfClose( - p.UprobeClientConnClose, - p.UprobeClientConnInvoke, - p.UprobeClientConnInvokeReturn, - p.UprobeClientConnNewStream, - p.UprobeGrpcFramerWriteHeaders, - p.UprobeGrpcFramerWriteHeadersReturns, - p.UprobeServerHandleStream, - p.UprobeServerHandleStreamReturn, - p.UprobeTransportHttp2ClientNewStream, - p.UprobeTransportWriteStatus, - ) -} - -func _BpfClose(closers ...io.Closer) error { - for _, closer := range closers { - if err := closer.Close(); err != nil { - return err - } - } - return nil -} - -// Do not access this directly. -// -//go:embed bpf_bpfel_x86.o -var _BpfBytes []byte diff --git a/pkg/internal/ebpf/grpc/bpf_bpfel_x86.o b/pkg/internal/ebpf/grpc/bpf_bpfel_x86.o deleted file mode 100644 index ff3123c37..000000000 Binary files a/pkg/internal/ebpf/grpc/bpf_bpfel_x86.o and /dev/null differ diff --git a/pkg/internal/ebpf/grpc/bpf_debug_bpfel_arm64.go b/pkg/internal/ebpf/grpc/bpf_debug_bpfel_arm64.go deleted file mode 100644 index efa51d341..000000000 --- a/pkg/internal/ebpf/grpc/bpf_debug_bpfel_arm64.go +++ /dev/null @@ -1,222 +0,0 @@ -// Code generated by bpf2go; DO NOT EDIT. -//go:build arm64 - -package grpc - -import ( - "bytes" - _ "embed" - "fmt" - "io" - - "github.com/cilium/ebpf" -) - -type bpf_debugConnectionInfoT struct { - S_addr [16]uint8 - D_addr [16]uint8 - S_port uint16 - D_port uint16 -} - -type bpf_debugGoroutineMetadata struct { - Parent uint64 - Timestamp uint64 -} - -type bpf_debugGrpcClientFuncInvocationT struct { - StartMonotimeNs uint64 - Cc uint64 - Method uint64 - MethodLen uint64 - Tp bpf_debugTpInfoT - Flags uint64 -} - -type bpf_debugGrpcSrvFuncInvocationT struct { - StartMonotimeNs uint64 - Stream uint64 - Tp bpf_debugTpInfoT -} - -type bpf_debugTpInfoPidT struct { - Tp bpf_debugTpInfoT - Pid uint32 - Valid uint8 - _ [3]byte -} - -type bpf_debugTpInfoT struct { - TraceId [16]uint8 - SpanId [8]uint8 - ParentId [8]uint8 - Ts uint64 - Flags uint8 - _ [7]byte -} - -// loadBpf_debug returns the embedded CollectionSpec for bpf_debug. -func loadBpf_debug() (*ebpf.CollectionSpec, error) { - reader := bytes.NewReader(_Bpf_debugBytes) - spec, err := ebpf.LoadCollectionSpecFromReader(reader) - if err != nil { - return nil, fmt.Errorf("can't load bpf_debug: %w", err) - } - - return spec, err -} - -// loadBpf_debugObjects loads bpf_debug and converts it into a struct. -// -// The following types are suitable as obj argument: -// -// *bpf_debugObjects -// *bpf_debugPrograms -// *bpf_debugMaps -// -// See ebpf.CollectionSpec.LoadAndAssign documentation for details. -func loadBpf_debugObjects(obj interface{}, opts *ebpf.CollectionOptions) error { - spec, err := loadBpf_debug() - if err != nil { - return err - } - - return spec.LoadAndAssign(obj, opts) -} - -// bpf_debugSpecs contains maps and programs before they are loaded into the kernel. -// -// It can be passed ebpf.CollectionSpec.Assign. -type bpf_debugSpecs struct { - bpf_debugProgramSpecs - bpf_debugMapSpecs -} - -// bpf_debugSpecs contains programs before they are loaded into the kernel. -// -// It can be passed ebpf.CollectionSpec.Assign. -type bpf_debugProgramSpecs struct { - UprobeClientConnClose *ebpf.ProgramSpec `ebpf:"uprobe_ClientConn_Close"` - UprobeClientConnInvoke *ebpf.ProgramSpec `ebpf:"uprobe_ClientConn_Invoke"` - UprobeClientConnInvokeReturn *ebpf.ProgramSpec `ebpf:"uprobe_ClientConn_Invoke_return"` - UprobeClientConnNewStream *ebpf.ProgramSpec `ebpf:"uprobe_ClientConn_NewStream"` - UprobeGrpcFramerWriteHeaders *ebpf.ProgramSpec `ebpf:"uprobe_grpcFramerWriteHeaders"` - UprobeGrpcFramerWriteHeadersReturns *ebpf.ProgramSpec `ebpf:"uprobe_grpcFramerWriteHeaders_returns"` - UprobeServerHandleStream *ebpf.ProgramSpec `ebpf:"uprobe_server_handleStream"` - UprobeServerHandleStreamReturn *ebpf.ProgramSpec `ebpf:"uprobe_server_handleStream_return"` - UprobeTransportHttp2ClientNewStream *ebpf.ProgramSpec `ebpf:"uprobe_transport_http2Client_NewStream"` - UprobeTransportWriteStatus *ebpf.ProgramSpec `ebpf:"uprobe_transport_writeStatus"` -} - -// bpf_debugMapSpecs contains maps before they are loaded into the kernel. -// -// It can be passed ebpf.CollectionSpec.Assign. -type bpf_debugMapSpecs struct { - Events *ebpf.MapSpec `ebpf:"events"` - GoTraceMap *ebpf.MapSpec `ebpf:"go_trace_map"` - GolangMapbucketStorageMap *ebpf.MapSpec `ebpf:"golang_mapbucket_storage_map"` - OngoingClientConnections *ebpf.MapSpec `ebpf:"ongoing_client_connections"` - OngoingGoroutines *ebpf.MapSpec `ebpf:"ongoing_goroutines"` - OngoingGrpcClientRequests *ebpf.MapSpec `ebpf:"ongoing_grpc_client_requests"` - OngoingGrpcHeaderWrites *ebpf.MapSpec `ebpf:"ongoing_grpc_header_writes"` - OngoingGrpcRequestStatus *ebpf.MapSpec `ebpf:"ongoing_grpc_request_status"` - OngoingGrpcServerRequests *ebpf.MapSpec `ebpf:"ongoing_grpc_server_requests"` - OngoingServerConnections *ebpf.MapSpec `ebpf:"ongoing_server_connections"` - OngoingStreams *ebpf.MapSpec `ebpf:"ongoing_streams"` - TraceMap *ebpf.MapSpec `ebpf:"trace_map"` -} - -// bpf_debugObjects contains all objects after they have been loaded into the kernel. -// -// It can be passed to loadBpf_debugObjects or ebpf.CollectionSpec.LoadAndAssign. -type bpf_debugObjects struct { - bpf_debugPrograms - bpf_debugMaps -} - -func (o *bpf_debugObjects) Close() error { - return _Bpf_debugClose( - &o.bpf_debugPrograms, - &o.bpf_debugMaps, - ) -} - -// bpf_debugMaps contains all maps after they have been loaded into the kernel. -// -// It can be passed to loadBpf_debugObjects or ebpf.CollectionSpec.LoadAndAssign. -type bpf_debugMaps struct { - Events *ebpf.Map `ebpf:"events"` - GoTraceMap *ebpf.Map `ebpf:"go_trace_map"` - GolangMapbucketStorageMap *ebpf.Map `ebpf:"golang_mapbucket_storage_map"` - OngoingClientConnections *ebpf.Map `ebpf:"ongoing_client_connections"` - OngoingGoroutines *ebpf.Map `ebpf:"ongoing_goroutines"` - OngoingGrpcClientRequests *ebpf.Map `ebpf:"ongoing_grpc_client_requests"` - OngoingGrpcHeaderWrites *ebpf.Map `ebpf:"ongoing_grpc_header_writes"` - OngoingGrpcRequestStatus *ebpf.Map `ebpf:"ongoing_grpc_request_status"` - OngoingGrpcServerRequests *ebpf.Map `ebpf:"ongoing_grpc_server_requests"` - OngoingServerConnections *ebpf.Map `ebpf:"ongoing_server_connections"` - OngoingStreams *ebpf.Map `ebpf:"ongoing_streams"` - TraceMap *ebpf.Map `ebpf:"trace_map"` -} - -func (m *bpf_debugMaps) Close() error { - return _Bpf_debugClose( - m.Events, - m.GoTraceMap, - m.GolangMapbucketStorageMap, - m.OngoingClientConnections, - m.OngoingGoroutines, - m.OngoingGrpcClientRequests, - m.OngoingGrpcHeaderWrites, - m.OngoingGrpcRequestStatus, - m.OngoingGrpcServerRequests, - m.OngoingServerConnections, - m.OngoingStreams, - m.TraceMap, - ) -} - -// bpf_debugPrograms contains all programs after they have been loaded into the kernel. -// -// It can be passed to loadBpf_debugObjects or ebpf.CollectionSpec.LoadAndAssign. -type bpf_debugPrograms struct { - UprobeClientConnClose *ebpf.Program `ebpf:"uprobe_ClientConn_Close"` - UprobeClientConnInvoke *ebpf.Program `ebpf:"uprobe_ClientConn_Invoke"` - UprobeClientConnInvokeReturn *ebpf.Program `ebpf:"uprobe_ClientConn_Invoke_return"` - UprobeClientConnNewStream *ebpf.Program `ebpf:"uprobe_ClientConn_NewStream"` - UprobeGrpcFramerWriteHeaders *ebpf.Program `ebpf:"uprobe_grpcFramerWriteHeaders"` - UprobeGrpcFramerWriteHeadersReturns *ebpf.Program `ebpf:"uprobe_grpcFramerWriteHeaders_returns"` - UprobeServerHandleStream *ebpf.Program `ebpf:"uprobe_server_handleStream"` - UprobeServerHandleStreamReturn *ebpf.Program `ebpf:"uprobe_server_handleStream_return"` - UprobeTransportHttp2ClientNewStream *ebpf.Program `ebpf:"uprobe_transport_http2Client_NewStream"` - UprobeTransportWriteStatus *ebpf.Program `ebpf:"uprobe_transport_writeStatus"` -} - -func (p *bpf_debugPrograms) Close() error { - return _Bpf_debugClose( - p.UprobeClientConnClose, - p.UprobeClientConnInvoke, - p.UprobeClientConnInvokeReturn, - p.UprobeClientConnNewStream, - p.UprobeGrpcFramerWriteHeaders, - p.UprobeGrpcFramerWriteHeadersReturns, - p.UprobeServerHandleStream, - p.UprobeServerHandleStreamReturn, - p.UprobeTransportHttp2ClientNewStream, - p.UprobeTransportWriteStatus, - ) -} - -func _Bpf_debugClose(closers ...io.Closer) error { - for _, closer := range closers { - if err := closer.Close(); err != nil { - return err - } - } - return nil -} - -// Do not access this directly. -// -//go:embed bpf_debug_bpfel_arm64.o -var _Bpf_debugBytes []byte diff --git a/pkg/internal/ebpf/grpc/bpf_debug_bpfel_arm64.o b/pkg/internal/ebpf/grpc/bpf_debug_bpfel_arm64.o deleted file mode 100644 index 7cf8f3f99..000000000 Binary files a/pkg/internal/ebpf/grpc/bpf_debug_bpfel_arm64.o and /dev/null differ diff --git a/pkg/internal/ebpf/grpc/bpf_debug_bpfel_x86.go b/pkg/internal/ebpf/grpc/bpf_debug_bpfel_x86.go deleted file mode 100644 index 4ef0bc7a0..000000000 --- a/pkg/internal/ebpf/grpc/bpf_debug_bpfel_x86.go +++ /dev/null @@ -1,222 +0,0 @@ -// Code generated by bpf2go; DO NOT EDIT. -//go:build 386 || amd64 - -package grpc - -import ( - "bytes" - _ "embed" - "fmt" - "io" - - "github.com/cilium/ebpf" -) - -type bpf_debugConnectionInfoT struct { - S_addr [16]uint8 - D_addr [16]uint8 - S_port uint16 - D_port uint16 -} - -type bpf_debugGoroutineMetadata struct { - Parent uint64 - Timestamp uint64 -} - -type bpf_debugGrpcClientFuncInvocationT struct { - StartMonotimeNs uint64 - Cc uint64 - Method uint64 - MethodLen uint64 - Tp bpf_debugTpInfoT - Flags uint64 -} - -type bpf_debugGrpcSrvFuncInvocationT struct { - StartMonotimeNs uint64 - Stream uint64 - Tp bpf_debugTpInfoT -} - -type bpf_debugTpInfoPidT struct { - Tp bpf_debugTpInfoT - Pid uint32 - Valid uint8 - _ [3]byte -} - -type bpf_debugTpInfoT struct { - TraceId [16]uint8 - SpanId [8]uint8 - ParentId [8]uint8 - Ts uint64 - Flags uint8 - _ [7]byte -} - -// loadBpf_debug returns the embedded CollectionSpec for bpf_debug. -func loadBpf_debug() (*ebpf.CollectionSpec, error) { - reader := bytes.NewReader(_Bpf_debugBytes) - spec, err := ebpf.LoadCollectionSpecFromReader(reader) - if err != nil { - return nil, fmt.Errorf("can't load bpf_debug: %w", err) - } - - return spec, err -} - -// loadBpf_debugObjects loads bpf_debug and converts it into a struct. -// -// The following types are suitable as obj argument: -// -// *bpf_debugObjects -// *bpf_debugPrograms -// *bpf_debugMaps -// -// See ebpf.CollectionSpec.LoadAndAssign documentation for details. -func loadBpf_debugObjects(obj interface{}, opts *ebpf.CollectionOptions) error { - spec, err := loadBpf_debug() - if err != nil { - return err - } - - return spec.LoadAndAssign(obj, opts) -} - -// bpf_debugSpecs contains maps and programs before they are loaded into the kernel. -// -// It can be passed ebpf.CollectionSpec.Assign. -type bpf_debugSpecs struct { - bpf_debugProgramSpecs - bpf_debugMapSpecs -} - -// bpf_debugSpecs contains programs before they are loaded into the kernel. -// -// It can be passed ebpf.CollectionSpec.Assign. -type bpf_debugProgramSpecs struct { - UprobeClientConnClose *ebpf.ProgramSpec `ebpf:"uprobe_ClientConn_Close"` - UprobeClientConnInvoke *ebpf.ProgramSpec `ebpf:"uprobe_ClientConn_Invoke"` - UprobeClientConnInvokeReturn *ebpf.ProgramSpec `ebpf:"uprobe_ClientConn_Invoke_return"` - UprobeClientConnNewStream *ebpf.ProgramSpec `ebpf:"uprobe_ClientConn_NewStream"` - UprobeGrpcFramerWriteHeaders *ebpf.ProgramSpec `ebpf:"uprobe_grpcFramerWriteHeaders"` - UprobeGrpcFramerWriteHeadersReturns *ebpf.ProgramSpec `ebpf:"uprobe_grpcFramerWriteHeaders_returns"` - UprobeServerHandleStream *ebpf.ProgramSpec `ebpf:"uprobe_server_handleStream"` - UprobeServerHandleStreamReturn *ebpf.ProgramSpec `ebpf:"uprobe_server_handleStream_return"` - UprobeTransportHttp2ClientNewStream *ebpf.ProgramSpec `ebpf:"uprobe_transport_http2Client_NewStream"` - UprobeTransportWriteStatus *ebpf.ProgramSpec `ebpf:"uprobe_transport_writeStatus"` -} - -// bpf_debugMapSpecs contains maps before they are loaded into the kernel. -// -// It can be passed ebpf.CollectionSpec.Assign. -type bpf_debugMapSpecs struct { - Events *ebpf.MapSpec `ebpf:"events"` - GoTraceMap *ebpf.MapSpec `ebpf:"go_trace_map"` - GolangMapbucketStorageMap *ebpf.MapSpec `ebpf:"golang_mapbucket_storage_map"` - OngoingClientConnections *ebpf.MapSpec `ebpf:"ongoing_client_connections"` - OngoingGoroutines *ebpf.MapSpec `ebpf:"ongoing_goroutines"` - OngoingGrpcClientRequests *ebpf.MapSpec `ebpf:"ongoing_grpc_client_requests"` - OngoingGrpcHeaderWrites *ebpf.MapSpec `ebpf:"ongoing_grpc_header_writes"` - OngoingGrpcRequestStatus *ebpf.MapSpec `ebpf:"ongoing_grpc_request_status"` - OngoingGrpcServerRequests *ebpf.MapSpec `ebpf:"ongoing_grpc_server_requests"` - OngoingServerConnections *ebpf.MapSpec `ebpf:"ongoing_server_connections"` - OngoingStreams *ebpf.MapSpec `ebpf:"ongoing_streams"` - TraceMap *ebpf.MapSpec `ebpf:"trace_map"` -} - -// bpf_debugObjects contains all objects after they have been loaded into the kernel. -// -// It can be passed to loadBpf_debugObjects or ebpf.CollectionSpec.LoadAndAssign. -type bpf_debugObjects struct { - bpf_debugPrograms - bpf_debugMaps -} - -func (o *bpf_debugObjects) Close() error { - return _Bpf_debugClose( - &o.bpf_debugPrograms, - &o.bpf_debugMaps, - ) -} - -// bpf_debugMaps contains all maps after they have been loaded into the kernel. -// -// It can be passed to loadBpf_debugObjects or ebpf.CollectionSpec.LoadAndAssign. -type bpf_debugMaps struct { - Events *ebpf.Map `ebpf:"events"` - GoTraceMap *ebpf.Map `ebpf:"go_trace_map"` - GolangMapbucketStorageMap *ebpf.Map `ebpf:"golang_mapbucket_storage_map"` - OngoingClientConnections *ebpf.Map `ebpf:"ongoing_client_connections"` - OngoingGoroutines *ebpf.Map `ebpf:"ongoing_goroutines"` - OngoingGrpcClientRequests *ebpf.Map `ebpf:"ongoing_grpc_client_requests"` - OngoingGrpcHeaderWrites *ebpf.Map `ebpf:"ongoing_grpc_header_writes"` - OngoingGrpcRequestStatus *ebpf.Map `ebpf:"ongoing_grpc_request_status"` - OngoingGrpcServerRequests *ebpf.Map `ebpf:"ongoing_grpc_server_requests"` - OngoingServerConnections *ebpf.Map `ebpf:"ongoing_server_connections"` - OngoingStreams *ebpf.Map `ebpf:"ongoing_streams"` - TraceMap *ebpf.Map `ebpf:"trace_map"` -} - -func (m *bpf_debugMaps) Close() error { - return _Bpf_debugClose( - m.Events, - m.GoTraceMap, - m.GolangMapbucketStorageMap, - m.OngoingClientConnections, - m.OngoingGoroutines, - m.OngoingGrpcClientRequests, - m.OngoingGrpcHeaderWrites, - m.OngoingGrpcRequestStatus, - m.OngoingGrpcServerRequests, - m.OngoingServerConnections, - m.OngoingStreams, - m.TraceMap, - ) -} - -// bpf_debugPrograms contains all programs after they have been loaded into the kernel. -// -// It can be passed to loadBpf_debugObjects or ebpf.CollectionSpec.LoadAndAssign. -type bpf_debugPrograms struct { - UprobeClientConnClose *ebpf.Program `ebpf:"uprobe_ClientConn_Close"` - UprobeClientConnInvoke *ebpf.Program `ebpf:"uprobe_ClientConn_Invoke"` - UprobeClientConnInvokeReturn *ebpf.Program `ebpf:"uprobe_ClientConn_Invoke_return"` - UprobeClientConnNewStream *ebpf.Program `ebpf:"uprobe_ClientConn_NewStream"` - UprobeGrpcFramerWriteHeaders *ebpf.Program `ebpf:"uprobe_grpcFramerWriteHeaders"` - UprobeGrpcFramerWriteHeadersReturns *ebpf.Program `ebpf:"uprobe_grpcFramerWriteHeaders_returns"` - UprobeServerHandleStream *ebpf.Program `ebpf:"uprobe_server_handleStream"` - UprobeServerHandleStreamReturn *ebpf.Program `ebpf:"uprobe_server_handleStream_return"` - UprobeTransportHttp2ClientNewStream *ebpf.Program `ebpf:"uprobe_transport_http2Client_NewStream"` - UprobeTransportWriteStatus *ebpf.Program `ebpf:"uprobe_transport_writeStatus"` -} - -func (p *bpf_debugPrograms) Close() error { - return _Bpf_debugClose( - p.UprobeClientConnClose, - p.UprobeClientConnInvoke, - p.UprobeClientConnInvokeReturn, - p.UprobeClientConnNewStream, - p.UprobeGrpcFramerWriteHeaders, - p.UprobeGrpcFramerWriteHeadersReturns, - p.UprobeServerHandleStream, - p.UprobeServerHandleStreamReturn, - p.UprobeTransportHttp2ClientNewStream, - p.UprobeTransportWriteStatus, - ) -} - -func _Bpf_debugClose(closers ...io.Closer) error { - for _, closer := range closers { - if err := closer.Close(); err != nil { - return err - } - } - return nil -} - -// Do not access this directly. -// -//go:embed bpf_debug_bpfel_x86.o -var _Bpf_debugBytes []byte diff --git a/pkg/internal/ebpf/grpc/bpf_debug_bpfel_x86.o b/pkg/internal/ebpf/grpc/bpf_debug_bpfel_x86.o deleted file mode 100644 index 9480919fe..000000000 Binary files a/pkg/internal/ebpf/grpc/bpf_debug_bpfel_x86.o and /dev/null differ diff --git a/pkg/internal/ebpf/grpc/bpf_tp_bpfel_arm64.go b/pkg/internal/ebpf/grpc/bpf_tp_bpfel_arm64.go deleted file mode 100644 index 5e586dc9c..000000000 --- a/pkg/internal/ebpf/grpc/bpf_tp_bpfel_arm64.go +++ /dev/null @@ -1,231 +0,0 @@ -// Code generated by bpf2go; DO NOT EDIT. -//go:build arm64 - -package grpc - -import ( - "bytes" - _ "embed" - "fmt" - "io" - - "github.com/cilium/ebpf" -) - -type bpf_tpConnectionInfoT struct { - S_addr [16]uint8 - D_addr [16]uint8 - S_port uint16 - D_port uint16 -} - -type bpf_tpGoroutineMetadata struct { - Parent uint64 - Timestamp uint64 -} - -type bpf_tpGrpcClientFuncInvocationT struct { - StartMonotimeNs uint64 - Cc uint64 - Method uint64 - MethodLen uint64 - Tp bpf_tpTpInfoT - Flags uint64 -} - -type bpf_tpGrpcFramerFuncInvocationT struct { - FramerPtr uint64 - Tp bpf_tpTpInfoT - Offset int64 -} - -type bpf_tpGrpcSrvFuncInvocationT struct { - StartMonotimeNs uint64 - Stream uint64 - Tp bpf_tpTpInfoT -} - -type bpf_tpTpInfoPidT struct { - Tp bpf_tpTpInfoT - Pid uint32 - Valid uint8 - _ [3]byte -} - -type bpf_tpTpInfoT struct { - TraceId [16]uint8 - SpanId [8]uint8 - ParentId [8]uint8 - Ts uint64 - Flags uint8 - _ [7]byte -} - -// loadBpf_tp returns the embedded CollectionSpec for bpf_tp. -func loadBpf_tp() (*ebpf.CollectionSpec, error) { - reader := bytes.NewReader(_Bpf_tpBytes) - spec, err := ebpf.LoadCollectionSpecFromReader(reader) - if err != nil { - return nil, fmt.Errorf("can't load bpf_tp: %w", err) - } - - return spec, err -} - -// loadBpf_tpObjects loads bpf_tp and converts it into a struct. -// -// The following types are suitable as obj argument: -// -// *bpf_tpObjects -// *bpf_tpPrograms -// *bpf_tpMaps -// -// See ebpf.CollectionSpec.LoadAndAssign documentation for details. -func loadBpf_tpObjects(obj interface{}, opts *ebpf.CollectionOptions) error { - spec, err := loadBpf_tp() - if err != nil { - return err - } - - return spec.LoadAndAssign(obj, opts) -} - -// bpf_tpSpecs contains maps and programs before they are loaded into the kernel. -// -// It can be passed ebpf.CollectionSpec.Assign. -type bpf_tpSpecs struct { - bpf_tpProgramSpecs - bpf_tpMapSpecs -} - -// bpf_tpSpecs contains programs before they are loaded into the kernel. -// -// It can be passed ebpf.CollectionSpec.Assign. -type bpf_tpProgramSpecs struct { - UprobeClientConnClose *ebpf.ProgramSpec `ebpf:"uprobe_ClientConn_Close"` - UprobeClientConnInvoke *ebpf.ProgramSpec `ebpf:"uprobe_ClientConn_Invoke"` - UprobeClientConnInvokeReturn *ebpf.ProgramSpec `ebpf:"uprobe_ClientConn_Invoke_return"` - UprobeClientConnNewStream *ebpf.ProgramSpec `ebpf:"uprobe_ClientConn_NewStream"` - UprobeGrpcFramerWriteHeaders *ebpf.ProgramSpec `ebpf:"uprobe_grpcFramerWriteHeaders"` - UprobeGrpcFramerWriteHeadersReturns *ebpf.ProgramSpec `ebpf:"uprobe_grpcFramerWriteHeaders_returns"` - UprobeServerHandleStream *ebpf.ProgramSpec `ebpf:"uprobe_server_handleStream"` - UprobeServerHandleStreamReturn *ebpf.ProgramSpec `ebpf:"uprobe_server_handleStream_return"` - UprobeTransportHttp2ClientNewStream *ebpf.ProgramSpec `ebpf:"uprobe_transport_http2Client_NewStream"` - UprobeTransportWriteStatus *ebpf.ProgramSpec `ebpf:"uprobe_transport_writeStatus"` -} - -// bpf_tpMapSpecs contains maps before they are loaded into the kernel. -// -// It can be passed ebpf.CollectionSpec.Assign. -type bpf_tpMapSpecs struct { - Events *ebpf.MapSpec `ebpf:"events"` - GoTraceMap *ebpf.MapSpec `ebpf:"go_trace_map"` - GolangMapbucketStorageMap *ebpf.MapSpec `ebpf:"golang_mapbucket_storage_map"` - GrpcFramerInvocationMap *ebpf.MapSpec `ebpf:"grpc_framer_invocation_map"` - OngoingClientConnections *ebpf.MapSpec `ebpf:"ongoing_client_connections"` - OngoingGoroutines *ebpf.MapSpec `ebpf:"ongoing_goroutines"` - OngoingGrpcClientRequests *ebpf.MapSpec `ebpf:"ongoing_grpc_client_requests"` - OngoingGrpcHeaderWrites *ebpf.MapSpec `ebpf:"ongoing_grpc_header_writes"` - OngoingGrpcRequestStatus *ebpf.MapSpec `ebpf:"ongoing_grpc_request_status"` - OngoingGrpcServerRequests *ebpf.MapSpec `ebpf:"ongoing_grpc_server_requests"` - OngoingServerConnections *ebpf.MapSpec `ebpf:"ongoing_server_connections"` - OngoingStreams *ebpf.MapSpec `ebpf:"ongoing_streams"` - TraceMap *ebpf.MapSpec `ebpf:"trace_map"` -} - -// bpf_tpObjects contains all objects after they have been loaded into the kernel. -// -// It can be passed to loadBpf_tpObjects or ebpf.CollectionSpec.LoadAndAssign. -type bpf_tpObjects struct { - bpf_tpPrograms - bpf_tpMaps -} - -func (o *bpf_tpObjects) Close() error { - return _Bpf_tpClose( - &o.bpf_tpPrograms, - &o.bpf_tpMaps, - ) -} - -// bpf_tpMaps contains all maps after they have been loaded into the kernel. -// -// It can be passed to loadBpf_tpObjects or ebpf.CollectionSpec.LoadAndAssign. -type bpf_tpMaps struct { - Events *ebpf.Map `ebpf:"events"` - GoTraceMap *ebpf.Map `ebpf:"go_trace_map"` - GolangMapbucketStorageMap *ebpf.Map `ebpf:"golang_mapbucket_storage_map"` - GrpcFramerInvocationMap *ebpf.Map `ebpf:"grpc_framer_invocation_map"` - OngoingClientConnections *ebpf.Map `ebpf:"ongoing_client_connections"` - OngoingGoroutines *ebpf.Map `ebpf:"ongoing_goroutines"` - OngoingGrpcClientRequests *ebpf.Map `ebpf:"ongoing_grpc_client_requests"` - OngoingGrpcHeaderWrites *ebpf.Map `ebpf:"ongoing_grpc_header_writes"` - OngoingGrpcRequestStatus *ebpf.Map `ebpf:"ongoing_grpc_request_status"` - OngoingGrpcServerRequests *ebpf.Map `ebpf:"ongoing_grpc_server_requests"` - OngoingServerConnections *ebpf.Map `ebpf:"ongoing_server_connections"` - OngoingStreams *ebpf.Map `ebpf:"ongoing_streams"` - TraceMap *ebpf.Map `ebpf:"trace_map"` -} - -func (m *bpf_tpMaps) Close() error { - return _Bpf_tpClose( - m.Events, - m.GoTraceMap, - m.GolangMapbucketStorageMap, - m.GrpcFramerInvocationMap, - m.OngoingClientConnections, - m.OngoingGoroutines, - m.OngoingGrpcClientRequests, - m.OngoingGrpcHeaderWrites, - m.OngoingGrpcRequestStatus, - m.OngoingGrpcServerRequests, - m.OngoingServerConnections, - m.OngoingStreams, - m.TraceMap, - ) -} - -// bpf_tpPrograms contains all programs after they have been loaded into the kernel. -// -// It can be passed to loadBpf_tpObjects or ebpf.CollectionSpec.LoadAndAssign. -type bpf_tpPrograms struct { - UprobeClientConnClose *ebpf.Program `ebpf:"uprobe_ClientConn_Close"` - UprobeClientConnInvoke *ebpf.Program `ebpf:"uprobe_ClientConn_Invoke"` - UprobeClientConnInvokeReturn *ebpf.Program `ebpf:"uprobe_ClientConn_Invoke_return"` - UprobeClientConnNewStream *ebpf.Program `ebpf:"uprobe_ClientConn_NewStream"` - UprobeGrpcFramerWriteHeaders *ebpf.Program `ebpf:"uprobe_grpcFramerWriteHeaders"` - UprobeGrpcFramerWriteHeadersReturns *ebpf.Program `ebpf:"uprobe_grpcFramerWriteHeaders_returns"` - UprobeServerHandleStream *ebpf.Program `ebpf:"uprobe_server_handleStream"` - UprobeServerHandleStreamReturn *ebpf.Program `ebpf:"uprobe_server_handleStream_return"` - UprobeTransportHttp2ClientNewStream *ebpf.Program `ebpf:"uprobe_transport_http2Client_NewStream"` - UprobeTransportWriteStatus *ebpf.Program `ebpf:"uprobe_transport_writeStatus"` -} - -func (p *bpf_tpPrograms) Close() error { - return _Bpf_tpClose( - p.UprobeClientConnClose, - p.UprobeClientConnInvoke, - p.UprobeClientConnInvokeReturn, - p.UprobeClientConnNewStream, - p.UprobeGrpcFramerWriteHeaders, - p.UprobeGrpcFramerWriteHeadersReturns, - p.UprobeServerHandleStream, - p.UprobeServerHandleStreamReturn, - p.UprobeTransportHttp2ClientNewStream, - p.UprobeTransportWriteStatus, - ) -} - -func _Bpf_tpClose(closers ...io.Closer) error { - for _, closer := range closers { - if err := closer.Close(); err != nil { - return err - } - } - return nil -} - -// Do not access this directly. -// -//go:embed bpf_tp_bpfel_arm64.o -var _Bpf_tpBytes []byte diff --git a/pkg/internal/ebpf/grpc/bpf_tp_bpfel_arm64.o b/pkg/internal/ebpf/grpc/bpf_tp_bpfel_arm64.o deleted file mode 100644 index dc5f66346..000000000 Binary files a/pkg/internal/ebpf/grpc/bpf_tp_bpfel_arm64.o and /dev/null differ diff --git a/pkg/internal/ebpf/grpc/bpf_tp_bpfel_x86.go b/pkg/internal/ebpf/grpc/bpf_tp_bpfel_x86.go deleted file mode 100644 index 703b87997..000000000 --- a/pkg/internal/ebpf/grpc/bpf_tp_bpfel_x86.go +++ /dev/null @@ -1,231 +0,0 @@ -// Code generated by bpf2go; DO NOT EDIT. -//go:build 386 || amd64 - -package grpc - -import ( - "bytes" - _ "embed" - "fmt" - "io" - - "github.com/cilium/ebpf" -) - -type bpf_tpConnectionInfoT struct { - S_addr [16]uint8 - D_addr [16]uint8 - S_port uint16 - D_port uint16 -} - -type bpf_tpGoroutineMetadata struct { - Parent uint64 - Timestamp uint64 -} - -type bpf_tpGrpcClientFuncInvocationT struct { - StartMonotimeNs uint64 - Cc uint64 - Method uint64 - MethodLen uint64 - Tp bpf_tpTpInfoT - Flags uint64 -} - -type bpf_tpGrpcFramerFuncInvocationT struct { - FramerPtr uint64 - Tp bpf_tpTpInfoT - Offset int64 -} - -type bpf_tpGrpcSrvFuncInvocationT struct { - StartMonotimeNs uint64 - Stream uint64 - Tp bpf_tpTpInfoT -} - -type bpf_tpTpInfoPidT struct { - Tp bpf_tpTpInfoT - Pid uint32 - Valid uint8 - _ [3]byte -} - -type bpf_tpTpInfoT struct { - TraceId [16]uint8 - SpanId [8]uint8 - ParentId [8]uint8 - Ts uint64 - Flags uint8 - _ [7]byte -} - -// loadBpf_tp returns the embedded CollectionSpec for bpf_tp. -func loadBpf_tp() (*ebpf.CollectionSpec, error) { - reader := bytes.NewReader(_Bpf_tpBytes) - spec, err := ebpf.LoadCollectionSpecFromReader(reader) - if err != nil { - return nil, fmt.Errorf("can't load bpf_tp: %w", err) - } - - return spec, err -} - -// loadBpf_tpObjects loads bpf_tp and converts it into a struct. -// -// The following types are suitable as obj argument: -// -// *bpf_tpObjects -// *bpf_tpPrograms -// *bpf_tpMaps -// -// See ebpf.CollectionSpec.LoadAndAssign documentation for details. -func loadBpf_tpObjects(obj interface{}, opts *ebpf.CollectionOptions) error { - spec, err := loadBpf_tp() - if err != nil { - return err - } - - return spec.LoadAndAssign(obj, opts) -} - -// bpf_tpSpecs contains maps and programs before they are loaded into the kernel. -// -// It can be passed ebpf.CollectionSpec.Assign. -type bpf_tpSpecs struct { - bpf_tpProgramSpecs - bpf_tpMapSpecs -} - -// bpf_tpSpecs contains programs before they are loaded into the kernel. -// -// It can be passed ebpf.CollectionSpec.Assign. -type bpf_tpProgramSpecs struct { - UprobeClientConnClose *ebpf.ProgramSpec `ebpf:"uprobe_ClientConn_Close"` - UprobeClientConnInvoke *ebpf.ProgramSpec `ebpf:"uprobe_ClientConn_Invoke"` - UprobeClientConnInvokeReturn *ebpf.ProgramSpec `ebpf:"uprobe_ClientConn_Invoke_return"` - UprobeClientConnNewStream *ebpf.ProgramSpec `ebpf:"uprobe_ClientConn_NewStream"` - UprobeGrpcFramerWriteHeaders *ebpf.ProgramSpec `ebpf:"uprobe_grpcFramerWriteHeaders"` - UprobeGrpcFramerWriteHeadersReturns *ebpf.ProgramSpec `ebpf:"uprobe_grpcFramerWriteHeaders_returns"` - UprobeServerHandleStream *ebpf.ProgramSpec `ebpf:"uprobe_server_handleStream"` - UprobeServerHandleStreamReturn *ebpf.ProgramSpec `ebpf:"uprobe_server_handleStream_return"` - UprobeTransportHttp2ClientNewStream *ebpf.ProgramSpec `ebpf:"uprobe_transport_http2Client_NewStream"` - UprobeTransportWriteStatus *ebpf.ProgramSpec `ebpf:"uprobe_transport_writeStatus"` -} - -// bpf_tpMapSpecs contains maps before they are loaded into the kernel. -// -// It can be passed ebpf.CollectionSpec.Assign. -type bpf_tpMapSpecs struct { - Events *ebpf.MapSpec `ebpf:"events"` - GoTraceMap *ebpf.MapSpec `ebpf:"go_trace_map"` - GolangMapbucketStorageMap *ebpf.MapSpec `ebpf:"golang_mapbucket_storage_map"` - GrpcFramerInvocationMap *ebpf.MapSpec `ebpf:"grpc_framer_invocation_map"` - OngoingClientConnections *ebpf.MapSpec `ebpf:"ongoing_client_connections"` - OngoingGoroutines *ebpf.MapSpec `ebpf:"ongoing_goroutines"` - OngoingGrpcClientRequests *ebpf.MapSpec `ebpf:"ongoing_grpc_client_requests"` - OngoingGrpcHeaderWrites *ebpf.MapSpec `ebpf:"ongoing_grpc_header_writes"` - OngoingGrpcRequestStatus *ebpf.MapSpec `ebpf:"ongoing_grpc_request_status"` - OngoingGrpcServerRequests *ebpf.MapSpec `ebpf:"ongoing_grpc_server_requests"` - OngoingServerConnections *ebpf.MapSpec `ebpf:"ongoing_server_connections"` - OngoingStreams *ebpf.MapSpec `ebpf:"ongoing_streams"` - TraceMap *ebpf.MapSpec `ebpf:"trace_map"` -} - -// bpf_tpObjects contains all objects after they have been loaded into the kernel. -// -// It can be passed to loadBpf_tpObjects or ebpf.CollectionSpec.LoadAndAssign. -type bpf_tpObjects struct { - bpf_tpPrograms - bpf_tpMaps -} - -func (o *bpf_tpObjects) Close() error { - return _Bpf_tpClose( - &o.bpf_tpPrograms, - &o.bpf_tpMaps, - ) -} - -// bpf_tpMaps contains all maps after they have been loaded into the kernel. -// -// It can be passed to loadBpf_tpObjects or ebpf.CollectionSpec.LoadAndAssign. -type bpf_tpMaps struct { - Events *ebpf.Map `ebpf:"events"` - GoTraceMap *ebpf.Map `ebpf:"go_trace_map"` - GolangMapbucketStorageMap *ebpf.Map `ebpf:"golang_mapbucket_storage_map"` - GrpcFramerInvocationMap *ebpf.Map `ebpf:"grpc_framer_invocation_map"` - OngoingClientConnections *ebpf.Map `ebpf:"ongoing_client_connections"` - OngoingGoroutines *ebpf.Map `ebpf:"ongoing_goroutines"` - OngoingGrpcClientRequests *ebpf.Map `ebpf:"ongoing_grpc_client_requests"` - OngoingGrpcHeaderWrites *ebpf.Map `ebpf:"ongoing_grpc_header_writes"` - OngoingGrpcRequestStatus *ebpf.Map `ebpf:"ongoing_grpc_request_status"` - OngoingGrpcServerRequests *ebpf.Map `ebpf:"ongoing_grpc_server_requests"` - OngoingServerConnections *ebpf.Map `ebpf:"ongoing_server_connections"` - OngoingStreams *ebpf.Map `ebpf:"ongoing_streams"` - TraceMap *ebpf.Map `ebpf:"trace_map"` -} - -func (m *bpf_tpMaps) Close() error { - return _Bpf_tpClose( - m.Events, - m.GoTraceMap, - m.GolangMapbucketStorageMap, - m.GrpcFramerInvocationMap, - m.OngoingClientConnections, - m.OngoingGoroutines, - m.OngoingGrpcClientRequests, - m.OngoingGrpcHeaderWrites, - m.OngoingGrpcRequestStatus, - m.OngoingGrpcServerRequests, - m.OngoingServerConnections, - m.OngoingStreams, - m.TraceMap, - ) -} - -// bpf_tpPrograms contains all programs after they have been loaded into the kernel. -// -// It can be passed to loadBpf_tpObjects or ebpf.CollectionSpec.LoadAndAssign. -type bpf_tpPrograms struct { - UprobeClientConnClose *ebpf.Program `ebpf:"uprobe_ClientConn_Close"` - UprobeClientConnInvoke *ebpf.Program `ebpf:"uprobe_ClientConn_Invoke"` - UprobeClientConnInvokeReturn *ebpf.Program `ebpf:"uprobe_ClientConn_Invoke_return"` - UprobeClientConnNewStream *ebpf.Program `ebpf:"uprobe_ClientConn_NewStream"` - UprobeGrpcFramerWriteHeaders *ebpf.Program `ebpf:"uprobe_grpcFramerWriteHeaders"` - UprobeGrpcFramerWriteHeadersReturns *ebpf.Program `ebpf:"uprobe_grpcFramerWriteHeaders_returns"` - UprobeServerHandleStream *ebpf.Program `ebpf:"uprobe_server_handleStream"` - UprobeServerHandleStreamReturn *ebpf.Program `ebpf:"uprobe_server_handleStream_return"` - UprobeTransportHttp2ClientNewStream *ebpf.Program `ebpf:"uprobe_transport_http2Client_NewStream"` - UprobeTransportWriteStatus *ebpf.Program `ebpf:"uprobe_transport_writeStatus"` -} - -func (p *bpf_tpPrograms) Close() error { - return _Bpf_tpClose( - p.UprobeClientConnClose, - p.UprobeClientConnInvoke, - p.UprobeClientConnInvokeReturn, - p.UprobeClientConnNewStream, - p.UprobeGrpcFramerWriteHeaders, - p.UprobeGrpcFramerWriteHeadersReturns, - p.UprobeServerHandleStream, - p.UprobeServerHandleStreamReturn, - p.UprobeTransportHttp2ClientNewStream, - p.UprobeTransportWriteStatus, - ) -} - -func _Bpf_tpClose(closers ...io.Closer) error { - for _, closer := range closers { - if err := closer.Close(); err != nil { - return err - } - } - return nil -} - -// Do not access this directly. -// -//go:embed bpf_tp_bpfel_x86.o -var _Bpf_tpBytes []byte diff --git a/pkg/internal/ebpf/grpc/bpf_tp_bpfel_x86.o b/pkg/internal/ebpf/grpc/bpf_tp_bpfel_x86.o deleted file mode 100644 index e7526c29c..000000000 Binary files a/pkg/internal/ebpf/grpc/bpf_tp_bpfel_x86.o and /dev/null differ diff --git a/pkg/internal/ebpf/grpc/bpf_tp_debug_bpfel_arm64.go b/pkg/internal/ebpf/grpc/bpf_tp_debug_bpfel_arm64.go deleted file mode 100644 index 5cc905ab9..000000000 --- a/pkg/internal/ebpf/grpc/bpf_tp_debug_bpfel_arm64.go +++ /dev/null @@ -1,231 +0,0 @@ -// Code generated by bpf2go; DO NOT EDIT. -//go:build arm64 - -package grpc - -import ( - "bytes" - _ "embed" - "fmt" - "io" - - "github.com/cilium/ebpf" -) - -type bpf_tp_debugConnectionInfoT struct { - S_addr [16]uint8 - D_addr [16]uint8 - S_port uint16 - D_port uint16 -} - -type bpf_tp_debugGoroutineMetadata struct { - Parent uint64 - Timestamp uint64 -} - -type bpf_tp_debugGrpcClientFuncInvocationT struct { - StartMonotimeNs uint64 - Cc uint64 - Method uint64 - MethodLen uint64 - Tp bpf_tp_debugTpInfoT - Flags uint64 -} - -type bpf_tp_debugGrpcFramerFuncInvocationT struct { - FramerPtr uint64 - Tp bpf_tp_debugTpInfoT - Offset int64 -} - -type bpf_tp_debugGrpcSrvFuncInvocationT struct { - StartMonotimeNs uint64 - Stream uint64 - Tp bpf_tp_debugTpInfoT -} - -type bpf_tp_debugTpInfoPidT struct { - Tp bpf_tp_debugTpInfoT - Pid uint32 - Valid uint8 - _ [3]byte -} - -type bpf_tp_debugTpInfoT struct { - TraceId [16]uint8 - SpanId [8]uint8 - ParentId [8]uint8 - Ts uint64 - Flags uint8 - _ [7]byte -} - -// loadBpf_tp_debug returns the embedded CollectionSpec for bpf_tp_debug. -func loadBpf_tp_debug() (*ebpf.CollectionSpec, error) { - reader := bytes.NewReader(_Bpf_tp_debugBytes) - spec, err := ebpf.LoadCollectionSpecFromReader(reader) - if err != nil { - return nil, fmt.Errorf("can't load bpf_tp_debug: %w", err) - } - - return spec, err -} - -// loadBpf_tp_debugObjects loads bpf_tp_debug and converts it into a struct. -// -// The following types are suitable as obj argument: -// -// *bpf_tp_debugObjects -// *bpf_tp_debugPrograms -// *bpf_tp_debugMaps -// -// See ebpf.CollectionSpec.LoadAndAssign documentation for details. -func loadBpf_tp_debugObjects(obj interface{}, opts *ebpf.CollectionOptions) error { - spec, err := loadBpf_tp_debug() - if err != nil { - return err - } - - return spec.LoadAndAssign(obj, opts) -} - -// bpf_tp_debugSpecs contains maps and programs before they are loaded into the kernel. -// -// It can be passed ebpf.CollectionSpec.Assign. -type bpf_tp_debugSpecs struct { - bpf_tp_debugProgramSpecs - bpf_tp_debugMapSpecs -} - -// bpf_tp_debugSpecs contains programs before they are loaded into the kernel. -// -// It can be passed ebpf.CollectionSpec.Assign. -type bpf_tp_debugProgramSpecs struct { - UprobeClientConnClose *ebpf.ProgramSpec `ebpf:"uprobe_ClientConn_Close"` - UprobeClientConnInvoke *ebpf.ProgramSpec `ebpf:"uprobe_ClientConn_Invoke"` - UprobeClientConnInvokeReturn *ebpf.ProgramSpec `ebpf:"uprobe_ClientConn_Invoke_return"` - UprobeClientConnNewStream *ebpf.ProgramSpec `ebpf:"uprobe_ClientConn_NewStream"` - UprobeGrpcFramerWriteHeaders *ebpf.ProgramSpec `ebpf:"uprobe_grpcFramerWriteHeaders"` - UprobeGrpcFramerWriteHeadersReturns *ebpf.ProgramSpec `ebpf:"uprobe_grpcFramerWriteHeaders_returns"` - UprobeServerHandleStream *ebpf.ProgramSpec `ebpf:"uprobe_server_handleStream"` - UprobeServerHandleStreamReturn *ebpf.ProgramSpec `ebpf:"uprobe_server_handleStream_return"` - UprobeTransportHttp2ClientNewStream *ebpf.ProgramSpec `ebpf:"uprobe_transport_http2Client_NewStream"` - UprobeTransportWriteStatus *ebpf.ProgramSpec `ebpf:"uprobe_transport_writeStatus"` -} - -// bpf_tp_debugMapSpecs contains maps before they are loaded into the kernel. -// -// It can be passed ebpf.CollectionSpec.Assign. -type bpf_tp_debugMapSpecs struct { - Events *ebpf.MapSpec `ebpf:"events"` - GoTraceMap *ebpf.MapSpec `ebpf:"go_trace_map"` - GolangMapbucketStorageMap *ebpf.MapSpec `ebpf:"golang_mapbucket_storage_map"` - GrpcFramerInvocationMap *ebpf.MapSpec `ebpf:"grpc_framer_invocation_map"` - OngoingClientConnections *ebpf.MapSpec `ebpf:"ongoing_client_connections"` - OngoingGoroutines *ebpf.MapSpec `ebpf:"ongoing_goroutines"` - OngoingGrpcClientRequests *ebpf.MapSpec `ebpf:"ongoing_grpc_client_requests"` - OngoingGrpcHeaderWrites *ebpf.MapSpec `ebpf:"ongoing_grpc_header_writes"` - OngoingGrpcRequestStatus *ebpf.MapSpec `ebpf:"ongoing_grpc_request_status"` - OngoingGrpcServerRequests *ebpf.MapSpec `ebpf:"ongoing_grpc_server_requests"` - OngoingServerConnections *ebpf.MapSpec `ebpf:"ongoing_server_connections"` - OngoingStreams *ebpf.MapSpec `ebpf:"ongoing_streams"` - TraceMap *ebpf.MapSpec `ebpf:"trace_map"` -} - -// bpf_tp_debugObjects contains all objects after they have been loaded into the kernel. -// -// It can be passed to loadBpf_tp_debugObjects or ebpf.CollectionSpec.LoadAndAssign. -type bpf_tp_debugObjects struct { - bpf_tp_debugPrograms - bpf_tp_debugMaps -} - -func (o *bpf_tp_debugObjects) Close() error { - return _Bpf_tp_debugClose( - &o.bpf_tp_debugPrograms, - &o.bpf_tp_debugMaps, - ) -} - -// bpf_tp_debugMaps contains all maps after they have been loaded into the kernel. -// -// It can be passed to loadBpf_tp_debugObjects or ebpf.CollectionSpec.LoadAndAssign. -type bpf_tp_debugMaps struct { - Events *ebpf.Map `ebpf:"events"` - GoTraceMap *ebpf.Map `ebpf:"go_trace_map"` - GolangMapbucketStorageMap *ebpf.Map `ebpf:"golang_mapbucket_storage_map"` - GrpcFramerInvocationMap *ebpf.Map `ebpf:"grpc_framer_invocation_map"` - OngoingClientConnections *ebpf.Map `ebpf:"ongoing_client_connections"` - OngoingGoroutines *ebpf.Map `ebpf:"ongoing_goroutines"` - OngoingGrpcClientRequests *ebpf.Map `ebpf:"ongoing_grpc_client_requests"` - OngoingGrpcHeaderWrites *ebpf.Map `ebpf:"ongoing_grpc_header_writes"` - OngoingGrpcRequestStatus *ebpf.Map `ebpf:"ongoing_grpc_request_status"` - OngoingGrpcServerRequests *ebpf.Map `ebpf:"ongoing_grpc_server_requests"` - OngoingServerConnections *ebpf.Map `ebpf:"ongoing_server_connections"` - OngoingStreams *ebpf.Map `ebpf:"ongoing_streams"` - TraceMap *ebpf.Map `ebpf:"trace_map"` -} - -func (m *bpf_tp_debugMaps) Close() error { - return _Bpf_tp_debugClose( - m.Events, - m.GoTraceMap, - m.GolangMapbucketStorageMap, - m.GrpcFramerInvocationMap, - m.OngoingClientConnections, - m.OngoingGoroutines, - m.OngoingGrpcClientRequests, - m.OngoingGrpcHeaderWrites, - m.OngoingGrpcRequestStatus, - m.OngoingGrpcServerRequests, - m.OngoingServerConnections, - m.OngoingStreams, - m.TraceMap, - ) -} - -// bpf_tp_debugPrograms contains all programs after they have been loaded into the kernel. -// -// It can be passed to loadBpf_tp_debugObjects or ebpf.CollectionSpec.LoadAndAssign. -type bpf_tp_debugPrograms struct { - UprobeClientConnClose *ebpf.Program `ebpf:"uprobe_ClientConn_Close"` - UprobeClientConnInvoke *ebpf.Program `ebpf:"uprobe_ClientConn_Invoke"` - UprobeClientConnInvokeReturn *ebpf.Program `ebpf:"uprobe_ClientConn_Invoke_return"` - UprobeClientConnNewStream *ebpf.Program `ebpf:"uprobe_ClientConn_NewStream"` - UprobeGrpcFramerWriteHeaders *ebpf.Program `ebpf:"uprobe_grpcFramerWriteHeaders"` - UprobeGrpcFramerWriteHeadersReturns *ebpf.Program `ebpf:"uprobe_grpcFramerWriteHeaders_returns"` - UprobeServerHandleStream *ebpf.Program `ebpf:"uprobe_server_handleStream"` - UprobeServerHandleStreamReturn *ebpf.Program `ebpf:"uprobe_server_handleStream_return"` - UprobeTransportHttp2ClientNewStream *ebpf.Program `ebpf:"uprobe_transport_http2Client_NewStream"` - UprobeTransportWriteStatus *ebpf.Program `ebpf:"uprobe_transport_writeStatus"` -} - -func (p *bpf_tp_debugPrograms) Close() error { - return _Bpf_tp_debugClose( - p.UprobeClientConnClose, - p.UprobeClientConnInvoke, - p.UprobeClientConnInvokeReturn, - p.UprobeClientConnNewStream, - p.UprobeGrpcFramerWriteHeaders, - p.UprobeGrpcFramerWriteHeadersReturns, - p.UprobeServerHandleStream, - p.UprobeServerHandleStreamReturn, - p.UprobeTransportHttp2ClientNewStream, - p.UprobeTransportWriteStatus, - ) -} - -func _Bpf_tp_debugClose(closers ...io.Closer) error { - for _, closer := range closers { - if err := closer.Close(); err != nil { - return err - } - } - return nil -} - -// Do not access this directly. -// -//go:embed bpf_tp_debug_bpfel_arm64.o -var _Bpf_tp_debugBytes []byte diff --git a/pkg/internal/ebpf/grpc/bpf_tp_debug_bpfel_arm64.o b/pkg/internal/ebpf/grpc/bpf_tp_debug_bpfel_arm64.o deleted file mode 100644 index d5925a988..000000000 Binary files a/pkg/internal/ebpf/grpc/bpf_tp_debug_bpfel_arm64.o and /dev/null differ diff --git a/pkg/internal/ebpf/grpc/bpf_tp_debug_bpfel_x86.go b/pkg/internal/ebpf/grpc/bpf_tp_debug_bpfel_x86.go deleted file mode 100644 index 0ce0a89cd..000000000 --- a/pkg/internal/ebpf/grpc/bpf_tp_debug_bpfel_x86.go +++ /dev/null @@ -1,231 +0,0 @@ -// Code generated by bpf2go; DO NOT EDIT. -//go:build 386 || amd64 - -package grpc - -import ( - "bytes" - _ "embed" - "fmt" - "io" - - "github.com/cilium/ebpf" -) - -type bpf_tp_debugConnectionInfoT struct { - S_addr [16]uint8 - D_addr [16]uint8 - S_port uint16 - D_port uint16 -} - -type bpf_tp_debugGoroutineMetadata struct { - Parent uint64 - Timestamp uint64 -} - -type bpf_tp_debugGrpcClientFuncInvocationT struct { - StartMonotimeNs uint64 - Cc uint64 - Method uint64 - MethodLen uint64 - Tp bpf_tp_debugTpInfoT - Flags uint64 -} - -type bpf_tp_debugGrpcFramerFuncInvocationT struct { - FramerPtr uint64 - Tp bpf_tp_debugTpInfoT - Offset int64 -} - -type bpf_tp_debugGrpcSrvFuncInvocationT struct { - StartMonotimeNs uint64 - Stream uint64 - Tp bpf_tp_debugTpInfoT -} - -type bpf_tp_debugTpInfoPidT struct { - Tp bpf_tp_debugTpInfoT - Pid uint32 - Valid uint8 - _ [3]byte -} - -type bpf_tp_debugTpInfoT struct { - TraceId [16]uint8 - SpanId [8]uint8 - ParentId [8]uint8 - Ts uint64 - Flags uint8 - _ [7]byte -} - -// loadBpf_tp_debug returns the embedded CollectionSpec for bpf_tp_debug. -func loadBpf_tp_debug() (*ebpf.CollectionSpec, error) { - reader := bytes.NewReader(_Bpf_tp_debugBytes) - spec, err := ebpf.LoadCollectionSpecFromReader(reader) - if err != nil { - return nil, fmt.Errorf("can't load bpf_tp_debug: %w", err) - } - - return spec, err -} - -// loadBpf_tp_debugObjects loads bpf_tp_debug and converts it into a struct. -// -// The following types are suitable as obj argument: -// -// *bpf_tp_debugObjects -// *bpf_tp_debugPrograms -// *bpf_tp_debugMaps -// -// See ebpf.CollectionSpec.LoadAndAssign documentation for details. -func loadBpf_tp_debugObjects(obj interface{}, opts *ebpf.CollectionOptions) error { - spec, err := loadBpf_tp_debug() - if err != nil { - return err - } - - return spec.LoadAndAssign(obj, opts) -} - -// bpf_tp_debugSpecs contains maps and programs before they are loaded into the kernel. -// -// It can be passed ebpf.CollectionSpec.Assign. -type bpf_tp_debugSpecs struct { - bpf_tp_debugProgramSpecs - bpf_tp_debugMapSpecs -} - -// bpf_tp_debugSpecs contains programs before they are loaded into the kernel. -// -// It can be passed ebpf.CollectionSpec.Assign. -type bpf_tp_debugProgramSpecs struct { - UprobeClientConnClose *ebpf.ProgramSpec `ebpf:"uprobe_ClientConn_Close"` - UprobeClientConnInvoke *ebpf.ProgramSpec `ebpf:"uprobe_ClientConn_Invoke"` - UprobeClientConnInvokeReturn *ebpf.ProgramSpec `ebpf:"uprobe_ClientConn_Invoke_return"` - UprobeClientConnNewStream *ebpf.ProgramSpec `ebpf:"uprobe_ClientConn_NewStream"` - UprobeGrpcFramerWriteHeaders *ebpf.ProgramSpec `ebpf:"uprobe_grpcFramerWriteHeaders"` - UprobeGrpcFramerWriteHeadersReturns *ebpf.ProgramSpec `ebpf:"uprobe_grpcFramerWriteHeaders_returns"` - UprobeServerHandleStream *ebpf.ProgramSpec `ebpf:"uprobe_server_handleStream"` - UprobeServerHandleStreamReturn *ebpf.ProgramSpec `ebpf:"uprobe_server_handleStream_return"` - UprobeTransportHttp2ClientNewStream *ebpf.ProgramSpec `ebpf:"uprobe_transport_http2Client_NewStream"` - UprobeTransportWriteStatus *ebpf.ProgramSpec `ebpf:"uprobe_transport_writeStatus"` -} - -// bpf_tp_debugMapSpecs contains maps before they are loaded into the kernel. -// -// It can be passed ebpf.CollectionSpec.Assign. -type bpf_tp_debugMapSpecs struct { - Events *ebpf.MapSpec `ebpf:"events"` - GoTraceMap *ebpf.MapSpec `ebpf:"go_trace_map"` - GolangMapbucketStorageMap *ebpf.MapSpec `ebpf:"golang_mapbucket_storage_map"` - GrpcFramerInvocationMap *ebpf.MapSpec `ebpf:"grpc_framer_invocation_map"` - OngoingClientConnections *ebpf.MapSpec `ebpf:"ongoing_client_connections"` - OngoingGoroutines *ebpf.MapSpec `ebpf:"ongoing_goroutines"` - OngoingGrpcClientRequests *ebpf.MapSpec `ebpf:"ongoing_grpc_client_requests"` - OngoingGrpcHeaderWrites *ebpf.MapSpec `ebpf:"ongoing_grpc_header_writes"` - OngoingGrpcRequestStatus *ebpf.MapSpec `ebpf:"ongoing_grpc_request_status"` - OngoingGrpcServerRequests *ebpf.MapSpec `ebpf:"ongoing_grpc_server_requests"` - OngoingServerConnections *ebpf.MapSpec `ebpf:"ongoing_server_connections"` - OngoingStreams *ebpf.MapSpec `ebpf:"ongoing_streams"` - TraceMap *ebpf.MapSpec `ebpf:"trace_map"` -} - -// bpf_tp_debugObjects contains all objects after they have been loaded into the kernel. -// -// It can be passed to loadBpf_tp_debugObjects or ebpf.CollectionSpec.LoadAndAssign. -type bpf_tp_debugObjects struct { - bpf_tp_debugPrograms - bpf_tp_debugMaps -} - -func (o *bpf_tp_debugObjects) Close() error { - return _Bpf_tp_debugClose( - &o.bpf_tp_debugPrograms, - &o.bpf_tp_debugMaps, - ) -} - -// bpf_tp_debugMaps contains all maps after they have been loaded into the kernel. -// -// It can be passed to loadBpf_tp_debugObjects or ebpf.CollectionSpec.LoadAndAssign. -type bpf_tp_debugMaps struct { - Events *ebpf.Map `ebpf:"events"` - GoTraceMap *ebpf.Map `ebpf:"go_trace_map"` - GolangMapbucketStorageMap *ebpf.Map `ebpf:"golang_mapbucket_storage_map"` - GrpcFramerInvocationMap *ebpf.Map `ebpf:"grpc_framer_invocation_map"` - OngoingClientConnections *ebpf.Map `ebpf:"ongoing_client_connections"` - OngoingGoroutines *ebpf.Map `ebpf:"ongoing_goroutines"` - OngoingGrpcClientRequests *ebpf.Map `ebpf:"ongoing_grpc_client_requests"` - OngoingGrpcHeaderWrites *ebpf.Map `ebpf:"ongoing_grpc_header_writes"` - OngoingGrpcRequestStatus *ebpf.Map `ebpf:"ongoing_grpc_request_status"` - OngoingGrpcServerRequests *ebpf.Map `ebpf:"ongoing_grpc_server_requests"` - OngoingServerConnections *ebpf.Map `ebpf:"ongoing_server_connections"` - OngoingStreams *ebpf.Map `ebpf:"ongoing_streams"` - TraceMap *ebpf.Map `ebpf:"trace_map"` -} - -func (m *bpf_tp_debugMaps) Close() error { - return _Bpf_tp_debugClose( - m.Events, - m.GoTraceMap, - m.GolangMapbucketStorageMap, - m.GrpcFramerInvocationMap, - m.OngoingClientConnections, - m.OngoingGoroutines, - m.OngoingGrpcClientRequests, - m.OngoingGrpcHeaderWrites, - m.OngoingGrpcRequestStatus, - m.OngoingGrpcServerRequests, - m.OngoingServerConnections, - m.OngoingStreams, - m.TraceMap, - ) -} - -// bpf_tp_debugPrograms contains all programs after they have been loaded into the kernel. -// -// It can be passed to loadBpf_tp_debugObjects or ebpf.CollectionSpec.LoadAndAssign. -type bpf_tp_debugPrograms struct { - UprobeClientConnClose *ebpf.Program `ebpf:"uprobe_ClientConn_Close"` - UprobeClientConnInvoke *ebpf.Program `ebpf:"uprobe_ClientConn_Invoke"` - UprobeClientConnInvokeReturn *ebpf.Program `ebpf:"uprobe_ClientConn_Invoke_return"` - UprobeClientConnNewStream *ebpf.Program `ebpf:"uprobe_ClientConn_NewStream"` - UprobeGrpcFramerWriteHeaders *ebpf.Program `ebpf:"uprobe_grpcFramerWriteHeaders"` - UprobeGrpcFramerWriteHeadersReturns *ebpf.Program `ebpf:"uprobe_grpcFramerWriteHeaders_returns"` - UprobeServerHandleStream *ebpf.Program `ebpf:"uprobe_server_handleStream"` - UprobeServerHandleStreamReturn *ebpf.Program `ebpf:"uprobe_server_handleStream_return"` - UprobeTransportHttp2ClientNewStream *ebpf.Program `ebpf:"uprobe_transport_http2Client_NewStream"` - UprobeTransportWriteStatus *ebpf.Program `ebpf:"uprobe_transport_writeStatus"` -} - -func (p *bpf_tp_debugPrograms) Close() error { - return _Bpf_tp_debugClose( - p.UprobeClientConnClose, - p.UprobeClientConnInvoke, - p.UprobeClientConnInvokeReturn, - p.UprobeClientConnNewStream, - p.UprobeGrpcFramerWriteHeaders, - p.UprobeGrpcFramerWriteHeadersReturns, - p.UprobeServerHandleStream, - p.UprobeServerHandleStreamReturn, - p.UprobeTransportHttp2ClientNewStream, - p.UprobeTransportWriteStatus, - ) -} - -func _Bpf_tp_debugClose(closers ...io.Closer) error { - for _, closer := range closers { - if err := closer.Close(); err != nil { - return err - } - } - return nil -} - -// Do not access this directly. -// -//go:embed bpf_tp_debug_bpfel_x86.o -var _Bpf_tp_debugBytes []byte diff --git a/pkg/internal/ebpf/grpc/bpf_tp_debug_bpfel_x86.o b/pkg/internal/ebpf/grpc/bpf_tp_debug_bpfel_x86.o deleted file mode 100644 index 286343025..000000000 Binary files a/pkg/internal/ebpf/grpc/bpf_tp_debug_bpfel_x86.o and /dev/null differ diff --git a/pkg/internal/ebpf/httpfltr/bpf_bpfel_arm64.go b/pkg/internal/ebpf/httpfltr/bpf_bpfel_arm64.go deleted file mode 100644 index 8955a6d43..000000000 --- a/pkg/internal/ebpf/httpfltr/bpf_bpfel_arm64.go +++ /dev/null @@ -1,365 +0,0 @@ -// Code generated by bpf2go; DO NOT EDIT. -//go:build arm64 - -package httpfltr - -import ( - "bytes" - _ "embed" - "fmt" - "io" - - "github.com/cilium/ebpf" -) - -type bpfConnectionInfoT struct { - S_addr [16]uint8 - D_addr [16]uint8 - S_port uint16 - D_port uint16 -} - -type bpfHttp2ConnStreamT struct { - PidConn bpfPidConnectionInfoT - StreamId uint32 -} - -type bpfHttp2GrpcRequestT struct { - Flags uint8 - _ [1]byte - ConnInfo bpfConnectionInfoT - Data [256]uint8 - RetData [64]uint8 - Type uint8 - _ [1]byte - Len int32 - _ [4]byte - StartMonotimeNs uint64 - EndMonotimeNs uint64 - Pid struct { - HostPid uint32 - UserPid uint32 - Ns uint32 - } - _ [4]byte - Tp struct { - TraceId [16]uint8 - SpanId [8]uint8 - ParentId [8]uint8 - Ts uint64 - Flags uint8 - _ [7]byte - } -} - -type bpfHttpConnectionMetadataT struct { - Pid struct { - HostPid uint32 - UserPid uint32 - Ns uint32 - } - Type uint8 -} - -type bpfHttpInfoT struct { - Flags uint8 - _ [1]byte - ConnInfo bpfConnectionInfoT - _ [2]byte - StartMonotimeNs uint64 - EndMonotimeNs uint64 - Buf [160]uint8 - Len uint32 - RespLen uint32 - Status uint16 - Type uint8 - Ssl uint8 - Pid struct { - HostPid uint32 - UserPid uint32 - Ns uint32 - } - Tp struct { - TraceId [16]uint8 - SpanId [8]uint8 - ParentId [8]uint8 - Ts uint64 - Flags uint8 - _ [7]byte - } -} - -type bpfPartialConnectionInfoT struct { - S_addr [16]uint8 - S_port uint16 - D_port uint16 - TcpSeq uint32 -} - -type bpfPidConnectionInfoT struct { - Conn bpfConnectionInfoT - Pid uint32 -} - -type bpfPidKeyT struct { - Pid uint32 - Ns uint32 -} - -type bpfRecvArgsT struct { - SockPtr uint64 - IovecPtr uint64 -} - -type bpfSendArgsT struct { - P_conn bpfPidConnectionInfoT - Size uint64 -} - -type bpfSockArgsT struct { - Addr uint64 - AcceptTime uint64 -} - -type bpfSslArgsT struct { - Ssl uint64 - Buf uint64 - LenPtr uint64 -} - -type bpfTpInfoPidT struct { - Tp struct { - TraceId [16]uint8 - SpanId [8]uint8 - ParentId [8]uint8 - Ts uint64 - Flags uint8 - _ [7]byte - } - Pid uint32 - Valid uint8 - _ [3]byte -} - -// loadBpf returns the embedded CollectionSpec for bpf. -func loadBpf() (*ebpf.CollectionSpec, error) { - reader := bytes.NewReader(_BpfBytes) - spec, err := ebpf.LoadCollectionSpecFromReader(reader) - if err != nil { - return nil, fmt.Errorf("can't load bpf: %w", err) - } - - return spec, err -} - -// loadBpfObjects loads bpf and converts it into a struct. -// -// The following types are suitable as obj argument: -// -// *bpfObjects -// *bpfPrograms -// *bpfMaps -// -// See ebpf.CollectionSpec.LoadAndAssign documentation for details. -func loadBpfObjects(obj interface{}, opts *ebpf.CollectionOptions) error { - spec, err := loadBpf() - if err != nil { - return err - } - - return spec.LoadAndAssign(obj, opts) -} - -// bpfSpecs contains maps and programs before they are loaded into the kernel. -// -// It can be passed ebpf.CollectionSpec.Assign. -type bpfSpecs struct { - bpfProgramSpecs - bpfMapSpecs -} - -// bpfSpecs contains programs before they are loaded into the kernel. -// -// It can be passed ebpf.CollectionSpec.Assign. -type bpfProgramSpecs struct { - KprobeSysExit *ebpf.ProgramSpec `ebpf:"kprobe_sys_exit"` - KprobeTcpClose *ebpf.ProgramSpec `ebpf:"kprobe_tcp_close"` - KprobeTcpConnect *ebpf.ProgramSpec `ebpf:"kprobe_tcp_connect"` - KprobeTcpRcvEstablished *ebpf.ProgramSpec `ebpf:"kprobe_tcp_rcv_established"` - KprobeTcpRecvmsg *ebpf.ProgramSpec `ebpf:"kprobe_tcp_recvmsg"` - KprobeTcpSendmsg *ebpf.ProgramSpec `ebpf:"kprobe_tcp_sendmsg"` - KretprobeSockAlloc *ebpf.ProgramSpec `ebpf:"kretprobe_sock_alloc"` - KretprobeSysAccept4 *ebpf.ProgramSpec `ebpf:"kretprobe_sys_accept4"` - KretprobeSysClone *ebpf.ProgramSpec `ebpf:"kretprobe_sys_clone"` - KretprobeSysConnect *ebpf.ProgramSpec `ebpf:"kretprobe_sys_connect"` - KretprobeTcpRecvmsg *ebpf.ProgramSpec `ebpf:"kretprobe_tcp_recvmsg"` - KretprobeTcpSendmsg *ebpf.ProgramSpec `ebpf:"kretprobe_tcp_sendmsg"` - SocketHttpFilter *ebpf.ProgramSpec `ebpf:"socket__http_filter"` -} - -// bpfMapSpecs contains maps before they are loaded into the kernel. -// -// It can be passed ebpf.CollectionSpec.Assign. -type bpfMapSpecs struct { - ActiveAcceptArgs *ebpf.MapSpec `ebpf:"active_accept_args"` - ActiveConnectArgs *ebpf.MapSpec `ebpf:"active_connect_args"` - ActiveRecvArgs *ebpf.MapSpec `ebpf:"active_recv_args"` - ActiveSendArgs *ebpf.MapSpec `ebpf:"active_send_args"` - ActiveSendSockArgs *ebpf.MapSpec `ebpf:"active_send_sock_args"` - ActiveSslHandshakes *ebpf.MapSpec `ebpf:"active_ssl_handshakes"` - ActiveSslReadArgs *ebpf.MapSpec `ebpf:"active_ssl_read_args"` - ActiveSslWriteArgs *ebpf.MapSpec `ebpf:"active_ssl_write_args"` - CloneMap *ebpf.MapSpec `ebpf:"clone_map"` - ConnectionMetaMem *ebpf.MapSpec `ebpf:"connection_meta_mem"` - Events *ebpf.MapSpec `ebpf:"events"` - FilteredConnections *ebpf.MapSpec `ebpf:"filtered_connections"` - Http2InfoMem *ebpf.MapSpec `ebpf:"http2_info_mem"` - HttpInfoMem *ebpf.MapSpec `ebpf:"http_info_mem"` - OngoingHttp *ebpf.MapSpec `ebpf:"ongoing_http"` - OngoingHttp2Connections *ebpf.MapSpec `ebpf:"ongoing_http2_connections"` - OngoingHttp2Grpc *ebpf.MapSpec `ebpf:"ongoing_http2_grpc"` - OngoingHttpFallback *ebpf.MapSpec `ebpf:"ongoing_http_fallback"` - PidCache *ebpf.MapSpec `ebpf:"pid_cache"` - PidTidToConn *ebpf.MapSpec `ebpf:"pid_tid_to_conn"` - ServerTraces *ebpf.MapSpec `ebpf:"server_traces"` - SslToConn *ebpf.MapSpec `ebpf:"ssl_to_conn"` - SslToPidTid *ebpf.MapSpec `ebpf:"ssl_to_pid_tid"` - TcpConnectionMap *ebpf.MapSpec `ebpf:"tcp_connection_map"` - TpCharBufMem *ebpf.MapSpec `ebpf:"tp_char_buf_mem"` - TpInfoMem *ebpf.MapSpec `ebpf:"tp_info_mem"` - TraceMap *ebpf.MapSpec `ebpf:"trace_map"` - ValidPids *ebpf.MapSpec `ebpf:"valid_pids"` -} - -// bpfObjects contains all objects after they have been loaded into the kernel. -// -// It can be passed to loadBpfObjects or ebpf.CollectionSpec.LoadAndAssign. -type bpfObjects struct { - bpfPrograms - bpfMaps -} - -func (o *bpfObjects) Close() error { - return _BpfClose( - &o.bpfPrograms, - &o.bpfMaps, - ) -} - -// bpfMaps contains all maps after they have been loaded into the kernel. -// -// It can be passed to loadBpfObjects or ebpf.CollectionSpec.LoadAndAssign. -type bpfMaps struct { - ActiveAcceptArgs *ebpf.Map `ebpf:"active_accept_args"` - ActiveConnectArgs *ebpf.Map `ebpf:"active_connect_args"` - ActiveRecvArgs *ebpf.Map `ebpf:"active_recv_args"` - ActiveSendArgs *ebpf.Map `ebpf:"active_send_args"` - ActiveSendSockArgs *ebpf.Map `ebpf:"active_send_sock_args"` - ActiveSslHandshakes *ebpf.Map `ebpf:"active_ssl_handshakes"` - ActiveSslReadArgs *ebpf.Map `ebpf:"active_ssl_read_args"` - ActiveSslWriteArgs *ebpf.Map `ebpf:"active_ssl_write_args"` - CloneMap *ebpf.Map `ebpf:"clone_map"` - ConnectionMetaMem *ebpf.Map `ebpf:"connection_meta_mem"` - Events *ebpf.Map `ebpf:"events"` - FilteredConnections *ebpf.Map `ebpf:"filtered_connections"` - Http2InfoMem *ebpf.Map `ebpf:"http2_info_mem"` - HttpInfoMem *ebpf.Map `ebpf:"http_info_mem"` - OngoingHttp *ebpf.Map `ebpf:"ongoing_http"` - OngoingHttp2Connections *ebpf.Map `ebpf:"ongoing_http2_connections"` - OngoingHttp2Grpc *ebpf.Map `ebpf:"ongoing_http2_grpc"` - OngoingHttpFallback *ebpf.Map `ebpf:"ongoing_http_fallback"` - PidCache *ebpf.Map `ebpf:"pid_cache"` - PidTidToConn *ebpf.Map `ebpf:"pid_tid_to_conn"` - ServerTraces *ebpf.Map `ebpf:"server_traces"` - SslToConn *ebpf.Map `ebpf:"ssl_to_conn"` - SslToPidTid *ebpf.Map `ebpf:"ssl_to_pid_tid"` - TcpConnectionMap *ebpf.Map `ebpf:"tcp_connection_map"` - TpCharBufMem *ebpf.Map `ebpf:"tp_char_buf_mem"` - TpInfoMem *ebpf.Map `ebpf:"tp_info_mem"` - TraceMap *ebpf.Map `ebpf:"trace_map"` - ValidPids *ebpf.Map `ebpf:"valid_pids"` -} - -func (m *bpfMaps) Close() error { - return _BpfClose( - m.ActiveAcceptArgs, - m.ActiveConnectArgs, - m.ActiveRecvArgs, - m.ActiveSendArgs, - m.ActiveSendSockArgs, - m.ActiveSslHandshakes, - m.ActiveSslReadArgs, - m.ActiveSslWriteArgs, - m.CloneMap, - m.ConnectionMetaMem, - m.Events, - m.FilteredConnections, - m.Http2InfoMem, - m.HttpInfoMem, - m.OngoingHttp, - m.OngoingHttp2Connections, - m.OngoingHttp2Grpc, - m.OngoingHttpFallback, - m.PidCache, - m.PidTidToConn, - m.ServerTraces, - m.SslToConn, - m.SslToPidTid, - m.TcpConnectionMap, - m.TpCharBufMem, - m.TpInfoMem, - m.TraceMap, - m.ValidPids, - ) -} - -// bpfPrograms contains all programs after they have been loaded into the kernel. -// -// It can be passed to loadBpfObjects or ebpf.CollectionSpec.LoadAndAssign. -type bpfPrograms struct { - KprobeSysExit *ebpf.Program `ebpf:"kprobe_sys_exit"` - KprobeTcpClose *ebpf.Program `ebpf:"kprobe_tcp_close"` - KprobeTcpConnect *ebpf.Program `ebpf:"kprobe_tcp_connect"` - KprobeTcpRcvEstablished *ebpf.Program `ebpf:"kprobe_tcp_rcv_established"` - KprobeTcpRecvmsg *ebpf.Program `ebpf:"kprobe_tcp_recvmsg"` - KprobeTcpSendmsg *ebpf.Program `ebpf:"kprobe_tcp_sendmsg"` - KretprobeSockAlloc *ebpf.Program `ebpf:"kretprobe_sock_alloc"` - KretprobeSysAccept4 *ebpf.Program `ebpf:"kretprobe_sys_accept4"` - KretprobeSysClone *ebpf.Program `ebpf:"kretprobe_sys_clone"` - KretprobeSysConnect *ebpf.Program `ebpf:"kretprobe_sys_connect"` - KretprobeTcpRecvmsg *ebpf.Program `ebpf:"kretprobe_tcp_recvmsg"` - KretprobeTcpSendmsg *ebpf.Program `ebpf:"kretprobe_tcp_sendmsg"` - SocketHttpFilter *ebpf.Program `ebpf:"socket__http_filter"` -} - -func (p *bpfPrograms) Close() error { - return _BpfClose( - p.KprobeSysExit, - p.KprobeTcpClose, - p.KprobeTcpConnect, - p.KprobeTcpRcvEstablished, - p.KprobeTcpRecvmsg, - p.KprobeTcpSendmsg, - p.KretprobeSockAlloc, - p.KretprobeSysAccept4, - p.KretprobeSysClone, - p.KretprobeSysConnect, - p.KretprobeTcpRecvmsg, - p.KretprobeTcpSendmsg, - p.SocketHttpFilter, - ) -} - -func _BpfClose(closers ...io.Closer) error { - for _, closer := range closers { - if err := closer.Close(); err != nil { - return err - } - } - return nil -} - -// Do not access this directly. -// -//go:embed bpf_bpfel_arm64.o -var _BpfBytes []byte diff --git a/pkg/internal/ebpf/httpfltr/bpf_bpfel_arm64.o b/pkg/internal/ebpf/httpfltr/bpf_bpfel_arm64.o deleted file mode 100644 index f18e6fdee..000000000 Binary files a/pkg/internal/ebpf/httpfltr/bpf_bpfel_arm64.o and /dev/null differ diff --git a/pkg/internal/ebpf/httpfltr/bpf_bpfel_x86.go b/pkg/internal/ebpf/httpfltr/bpf_bpfel_x86.go deleted file mode 100644 index 61550dd0c..000000000 --- a/pkg/internal/ebpf/httpfltr/bpf_bpfel_x86.go +++ /dev/null @@ -1,365 +0,0 @@ -// Code generated by bpf2go; DO NOT EDIT. -//go:build 386 || amd64 - -package httpfltr - -import ( - "bytes" - _ "embed" - "fmt" - "io" - - "github.com/cilium/ebpf" -) - -type bpfConnectionInfoT struct { - S_addr [16]uint8 - D_addr [16]uint8 - S_port uint16 - D_port uint16 -} - -type bpfHttp2ConnStreamT struct { - PidConn bpfPidConnectionInfoT - StreamId uint32 -} - -type bpfHttp2GrpcRequestT struct { - Flags uint8 - _ [1]byte - ConnInfo bpfConnectionInfoT - Data [256]uint8 - RetData [64]uint8 - Type uint8 - _ [1]byte - Len int32 - _ [4]byte - StartMonotimeNs uint64 - EndMonotimeNs uint64 - Pid struct { - HostPid uint32 - UserPid uint32 - Ns uint32 - } - _ [4]byte - Tp struct { - TraceId [16]uint8 - SpanId [8]uint8 - ParentId [8]uint8 - Ts uint64 - Flags uint8 - _ [7]byte - } -} - -type bpfHttpConnectionMetadataT struct { - Pid struct { - HostPid uint32 - UserPid uint32 - Ns uint32 - } - Type uint8 -} - -type bpfHttpInfoT struct { - Flags uint8 - _ [1]byte - ConnInfo bpfConnectionInfoT - _ [2]byte - StartMonotimeNs uint64 - EndMonotimeNs uint64 - Buf [160]uint8 - Len uint32 - RespLen uint32 - Status uint16 - Type uint8 - Ssl uint8 - Pid struct { - HostPid uint32 - UserPid uint32 - Ns uint32 - } - Tp struct { - TraceId [16]uint8 - SpanId [8]uint8 - ParentId [8]uint8 - Ts uint64 - Flags uint8 - _ [7]byte - } -} - -type bpfPartialConnectionInfoT struct { - S_addr [16]uint8 - S_port uint16 - D_port uint16 - TcpSeq uint32 -} - -type bpfPidConnectionInfoT struct { - Conn bpfConnectionInfoT - Pid uint32 -} - -type bpfPidKeyT struct { - Pid uint32 - Ns uint32 -} - -type bpfRecvArgsT struct { - SockPtr uint64 - IovecPtr uint64 -} - -type bpfSendArgsT struct { - P_conn bpfPidConnectionInfoT - Size uint64 -} - -type bpfSockArgsT struct { - Addr uint64 - AcceptTime uint64 -} - -type bpfSslArgsT struct { - Ssl uint64 - Buf uint64 - LenPtr uint64 -} - -type bpfTpInfoPidT struct { - Tp struct { - TraceId [16]uint8 - SpanId [8]uint8 - ParentId [8]uint8 - Ts uint64 - Flags uint8 - _ [7]byte - } - Pid uint32 - Valid uint8 - _ [3]byte -} - -// loadBpf returns the embedded CollectionSpec for bpf. -func loadBpf() (*ebpf.CollectionSpec, error) { - reader := bytes.NewReader(_BpfBytes) - spec, err := ebpf.LoadCollectionSpecFromReader(reader) - if err != nil { - return nil, fmt.Errorf("can't load bpf: %w", err) - } - - return spec, err -} - -// loadBpfObjects loads bpf and converts it into a struct. -// -// The following types are suitable as obj argument: -// -// *bpfObjects -// *bpfPrograms -// *bpfMaps -// -// See ebpf.CollectionSpec.LoadAndAssign documentation for details. -func loadBpfObjects(obj interface{}, opts *ebpf.CollectionOptions) error { - spec, err := loadBpf() - if err != nil { - return err - } - - return spec.LoadAndAssign(obj, opts) -} - -// bpfSpecs contains maps and programs before they are loaded into the kernel. -// -// It can be passed ebpf.CollectionSpec.Assign. -type bpfSpecs struct { - bpfProgramSpecs - bpfMapSpecs -} - -// bpfSpecs contains programs before they are loaded into the kernel. -// -// It can be passed ebpf.CollectionSpec.Assign. -type bpfProgramSpecs struct { - KprobeSysExit *ebpf.ProgramSpec `ebpf:"kprobe_sys_exit"` - KprobeTcpClose *ebpf.ProgramSpec `ebpf:"kprobe_tcp_close"` - KprobeTcpConnect *ebpf.ProgramSpec `ebpf:"kprobe_tcp_connect"` - KprobeTcpRcvEstablished *ebpf.ProgramSpec `ebpf:"kprobe_tcp_rcv_established"` - KprobeTcpRecvmsg *ebpf.ProgramSpec `ebpf:"kprobe_tcp_recvmsg"` - KprobeTcpSendmsg *ebpf.ProgramSpec `ebpf:"kprobe_tcp_sendmsg"` - KretprobeSockAlloc *ebpf.ProgramSpec `ebpf:"kretprobe_sock_alloc"` - KretprobeSysAccept4 *ebpf.ProgramSpec `ebpf:"kretprobe_sys_accept4"` - KretprobeSysClone *ebpf.ProgramSpec `ebpf:"kretprobe_sys_clone"` - KretprobeSysConnect *ebpf.ProgramSpec `ebpf:"kretprobe_sys_connect"` - KretprobeTcpRecvmsg *ebpf.ProgramSpec `ebpf:"kretprobe_tcp_recvmsg"` - KretprobeTcpSendmsg *ebpf.ProgramSpec `ebpf:"kretprobe_tcp_sendmsg"` - SocketHttpFilter *ebpf.ProgramSpec `ebpf:"socket__http_filter"` -} - -// bpfMapSpecs contains maps before they are loaded into the kernel. -// -// It can be passed ebpf.CollectionSpec.Assign. -type bpfMapSpecs struct { - ActiveAcceptArgs *ebpf.MapSpec `ebpf:"active_accept_args"` - ActiveConnectArgs *ebpf.MapSpec `ebpf:"active_connect_args"` - ActiveRecvArgs *ebpf.MapSpec `ebpf:"active_recv_args"` - ActiveSendArgs *ebpf.MapSpec `ebpf:"active_send_args"` - ActiveSendSockArgs *ebpf.MapSpec `ebpf:"active_send_sock_args"` - ActiveSslHandshakes *ebpf.MapSpec `ebpf:"active_ssl_handshakes"` - ActiveSslReadArgs *ebpf.MapSpec `ebpf:"active_ssl_read_args"` - ActiveSslWriteArgs *ebpf.MapSpec `ebpf:"active_ssl_write_args"` - CloneMap *ebpf.MapSpec `ebpf:"clone_map"` - ConnectionMetaMem *ebpf.MapSpec `ebpf:"connection_meta_mem"` - Events *ebpf.MapSpec `ebpf:"events"` - FilteredConnections *ebpf.MapSpec `ebpf:"filtered_connections"` - Http2InfoMem *ebpf.MapSpec `ebpf:"http2_info_mem"` - HttpInfoMem *ebpf.MapSpec `ebpf:"http_info_mem"` - OngoingHttp *ebpf.MapSpec `ebpf:"ongoing_http"` - OngoingHttp2Connections *ebpf.MapSpec `ebpf:"ongoing_http2_connections"` - OngoingHttp2Grpc *ebpf.MapSpec `ebpf:"ongoing_http2_grpc"` - OngoingHttpFallback *ebpf.MapSpec `ebpf:"ongoing_http_fallback"` - PidCache *ebpf.MapSpec `ebpf:"pid_cache"` - PidTidToConn *ebpf.MapSpec `ebpf:"pid_tid_to_conn"` - ServerTraces *ebpf.MapSpec `ebpf:"server_traces"` - SslToConn *ebpf.MapSpec `ebpf:"ssl_to_conn"` - SslToPidTid *ebpf.MapSpec `ebpf:"ssl_to_pid_tid"` - TcpConnectionMap *ebpf.MapSpec `ebpf:"tcp_connection_map"` - TpCharBufMem *ebpf.MapSpec `ebpf:"tp_char_buf_mem"` - TpInfoMem *ebpf.MapSpec `ebpf:"tp_info_mem"` - TraceMap *ebpf.MapSpec `ebpf:"trace_map"` - ValidPids *ebpf.MapSpec `ebpf:"valid_pids"` -} - -// bpfObjects contains all objects after they have been loaded into the kernel. -// -// It can be passed to loadBpfObjects or ebpf.CollectionSpec.LoadAndAssign. -type bpfObjects struct { - bpfPrograms - bpfMaps -} - -func (o *bpfObjects) Close() error { - return _BpfClose( - &o.bpfPrograms, - &o.bpfMaps, - ) -} - -// bpfMaps contains all maps after they have been loaded into the kernel. -// -// It can be passed to loadBpfObjects or ebpf.CollectionSpec.LoadAndAssign. -type bpfMaps struct { - ActiveAcceptArgs *ebpf.Map `ebpf:"active_accept_args"` - ActiveConnectArgs *ebpf.Map `ebpf:"active_connect_args"` - ActiveRecvArgs *ebpf.Map `ebpf:"active_recv_args"` - ActiveSendArgs *ebpf.Map `ebpf:"active_send_args"` - ActiveSendSockArgs *ebpf.Map `ebpf:"active_send_sock_args"` - ActiveSslHandshakes *ebpf.Map `ebpf:"active_ssl_handshakes"` - ActiveSslReadArgs *ebpf.Map `ebpf:"active_ssl_read_args"` - ActiveSslWriteArgs *ebpf.Map `ebpf:"active_ssl_write_args"` - CloneMap *ebpf.Map `ebpf:"clone_map"` - ConnectionMetaMem *ebpf.Map `ebpf:"connection_meta_mem"` - Events *ebpf.Map `ebpf:"events"` - FilteredConnections *ebpf.Map `ebpf:"filtered_connections"` - Http2InfoMem *ebpf.Map `ebpf:"http2_info_mem"` - HttpInfoMem *ebpf.Map `ebpf:"http_info_mem"` - OngoingHttp *ebpf.Map `ebpf:"ongoing_http"` - OngoingHttp2Connections *ebpf.Map `ebpf:"ongoing_http2_connections"` - OngoingHttp2Grpc *ebpf.Map `ebpf:"ongoing_http2_grpc"` - OngoingHttpFallback *ebpf.Map `ebpf:"ongoing_http_fallback"` - PidCache *ebpf.Map `ebpf:"pid_cache"` - PidTidToConn *ebpf.Map `ebpf:"pid_tid_to_conn"` - ServerTraces *ebpf.Map `ebpf:"server_traces"` - SslToConn *ebpf.Map `ebpf:"ssl_to_conn"` - SslToPidTid *ebpf.Map `ebpf:"ssl_to_pid_tid"` - TcpConnectionMap *ebpf.Map `ebpf:"tcp_connection_map"` - TpCharBufMem *ebpf.Map `ebpf:"tp_char_buf_mem"` - TpInfoMem *ebpf.Map `ebpf:"tp_info_mem"` - TraceMap *ebpf.Map `ebpf:"trace_map"` - ValidPids *ebpf.Map `ebpf:"valid_pids"` -} - -func (m *bpfMaps) Close() error { - return _BpfClose( - m.ActiveAcceptArgs, - m.ActiveConnectArgs, - m.ActiveRecvArgs, - m.ActiveSendArgs, - m.ActiveSendSockArgs, - m.ActiveSslHandshakes, - m.ActiveSslReadArgs, - m.ActiveSslWriteArgs, - m.CloneMap, - m.ConnectionMetaMem, - m.Events, - m.FilteredConnections, - m.Http2InfoMem, - m.HttpInfoMem, - m.OngoingHttp, - m.OngoingHttp2Connections, - m.OngoingHttp2Grpc, - m.OngoingHttpFallback, - m.PidCache, - m.PidTidToConn, - m.ServerTraces, - m.SslToConn, - m.SslToPidTid, - m.TcpConnectionMap, - m.TpCharBufMem, - m.TpInfoMem, - m.TraceMap, - m.ValidPids, - ) -} - -// bpfPrograms contains all programs after they have been loaded into the kernel. -// -// It can be passed to loadBpfObjects or ebpf.CollectionSpec.LoadAndAssign. -type bpfPrograms struct { - KprobeSysExit *ebpf.Program `ebpf:"kprobe_sys_exit"` - KprobeTcpClose *ebpf.Program `ebpf:"kprobe_tcp_close"` - KprobeTcpConnect *ebpf.Program `ebpf:"kprobe_tcp_connect"` - KprobeTcpRcvEstablished *ebpf.Program `ebpf:"kprobe_tcp_rcv_established"` - KprobeTcpRecvmsg *ebpf.Program `ebpf:"kprobe_tcp_recvmsg"` - KprobeTcpSendmsg *ebpf.Program `ebpf:"kprobe_tcp_sendmsg"` - KretprobeSockAlloc *ebpf.Program `ebpf:"kretprobe_sock_alloc"` - KretprobeSysAccept4 *ebpf.Program `ebpf:"kretprobe_sys_accept4"` - KretprobeSysClone *ebpf.Program `ebpf:"kretprobe_sys_clone"` - KretprobeSysConnect *ebpf.Program `ebpf:"kretprobe_sys_connect"` - KretprobeTcpRecvmsg *ebpf.Program `ebpf:"kretprobe_tcp_recvmsg"` - KretprobeTcpSendmsg *ebpf.Program `ebpf:"kretprobe_tcp_sendmsg"` - SocketHttpFilter *ebpf.Program `ebpf:"socket__http_filter"` -} - -func (p *bpfPrograms) Close() error { - return _BpfClose( - p.KprobeSysExit, - p.KprobeTcpClose, - p.KprobeTcpConnect, - p.KprobeTcpRcvEstablished, - p.KprobeTcpRecvmsg, - p.KprobeTcpSendmsg, - p.KretprobeSockAlloc, - p.KretprobeSysAccept4, - p.KretprobeSysClone, - p.KretprobeSysConnect, - p.KretprobeTcpRecvmsg, - p.KretprobeTcpSendmsg, - p.SocketHttpFilter, - ) -} - -func _BpfClose(closers ...io.Closer) error { - for _, closer := range closers { - if err := closer.Close(); err != nil { - return err - } - } - return nil -} - -// Do not access this directly. -// -//go:embed bpf_bpfel_x86.o -var _BpfBytes []byte diff --git a/pkg/internal/ebpf/httpfltr/bpf_bpfel_x86.o b/pkg/internal/ebpf/httpfltr/bpf_bpfel_x86.o deleted file mode 100644 index 47d4c4e7c..000000000 Binary files a/pkg/internal/ebpf/httpfltr/bpf_bpfel_x86.o and /dev/null differ diff --git a/pkg/internal/ebpf/httpfltr/bpf_debug_bpfel_arm64.go b/pkg/internal/ebpf/httpfltr/bpf_debug_bpfel_arm64.go deleted file mode 100644 index fc406b7bd..000000000 --- a/pkg/internal/ebpf/httpfltr/bpf_debug_bpfel_arm64.go +++ /dev/null @@ -1,365 +0,0 @@ -// Code generated by bpf2go; DO NOT EDIT. -//go:build arm64 - -package httpfltr - -import ( - "bytes" - _ "embed" - "fmt" - "io" - - "github.com/cilium/ebpf" -) - -type bpf_debugConnectionInfoT struct { - S_addr [16]uint8 - D_addr [16]uint8 - S_port uint16 - D_port uint16 -} - -type bpf_debugHttp2ConnStreamT struct { - PidConn bpf_debugPidConnectionInfoT - StreamId uint32 -} - -type bpf_debugHttp2GrpcRequestT struct { - Flags uint8 - _ [1]byte - ConnInfo bpf_debugConnectionInfoT - Data [256]uint8 - RetData [64]uint8 - Type uint8 - _ [1]byte - Len int32 - _ [4]byte - StartMonotimeNs uint64 - EndMonotimeNs uint64 - Pid struct { - HostPid uint32 - UserPid uint32 - Ns uint32 - } - _ [4]byte - Tp struct { - TraceId [16]uint8 - SpanId [8]uint8 - ParentId [8]uint8 - Ts uint64 - Flags uint8 - _ [7]byte - } -} - -type bpf_debugHttpConnectionMetadataT struct { - Pid struct { - HostPid uint32 - UserPid uint32 - Ns uint32 - } - Type uint8 -} - -type bpf_debugHttpInfoT struct { - Flags uint8 - _ [1]byte - ConnInfo bpf_debugConnectionInfoT - _ [2]byte - StartMonotimeNs uint64 - EndMonotimeNs uint64 - Buf [160]uint8 - Len uint32 - RespLen uint32 - Status uint16 - Type uint8 - Ssl uint8 - Pid struct { - HostPid uint32 - UserPid uint32 - Ns uint32 - } - Tp struct { - TraceId [16]uint8 - SpanId [8]uint8 - ParentId [8]uint8 - Ts uint64 - Flags uint8 - _ [7]byte - } -} - -type bpf_debugPartialConnectionInfoT struct { - S_addr [16]uint8 - S_port uint16 - D_port uint16 - TcpSeq uint32 -} - -type bpf_debugPidConnectionInfoT struct { - Conn bpf_debugConnectionInfoT - Pid uint32 -} - -type bpf_debugPidKeyT struct { - Pid uint32 - Ns uint32 -} - -type bpf_debugRecvArgsT struct { - SockPtr uint64 - IovecPtr uint64 -} - -type bpf_debugSendArgsT struct { - P_conn bpf_debugPidConnectionInfoT - Size uint64 -} - -type bpf_debugSockArgsT struct { - Addr uint64 - AcceptTime uint64 -} - -type bpf_debugSslArgsT struct { - Ssl uint64 - Buf uint64 - LenPtr uint64 -} - -type bpf_debugTpInfoPidT struct { - Tp struct { - TraceId [16]uint8 - SpanId [8]uint8 - ParentId [8]uint8 - Ts uint64 - Flags uint8 - _ [7]byte - } - Pid uint32 - Valid uint8 - _ [3]byte -} - -// loadBpf_debug returns the embedded CollectionSpec for bpf_debug. -func loadBpf_debug() (*ebpf.CollectionSpec, error) { - reader := bytes.NewReader(_Bpf_debugBytes) - spec, err := ebpf.LoadCollectionSpecFromReader(reader) - if err != nil { - return nil, fmt.Errorf("can't load bpf_debug: %w", err) - } - - return spec, err -} - -// loadBpf_debugObjects loads bpf_debug and converts it into a struct. -// -// The following types are suitable as obj argument: -// -// *bpf_debugObjects -// *bpf_debugPrograms -// *bpf_debugMaps -// -// See ebpf.CollectionSpec.LoadAndAssign documentation for details. -func loadBpf_debugObjects(obj interface{}, opts *ebpf.CollectionOptions) error { - spec, err := loadBpf_debug() - if err != nil { - return err - } - - return spec.LoadAndAssign(obj, opts) -} - -// bpf_debugSpecs contains maps and programs before they are loaded into the kernel. -// -// It can be passed ebpf.CollectionSpec.Assign. -type bpf_debugSpecs struct { - bpf_debugProgramSpecs - bpf_debugMapSpecs -} - -// bpf_debugSpecs contains programs before they are loaded into the kernel. -// -// It can be passed ebpf.CollectionSpec.Assign. -type bpf_debugProgramSpecs struct { - KprobeSysExit *ebpf.ProgramSpec `ebpf:"kprobe_sys_exit"` - KprobeTcpClose *ebpf.ProgramSpec `ebpf:"kprobe_tcp_close"` - KprobeTcpConnect *ebpf.ProgramSpec `ebpf:"kprobe_tcp_connect"` - KprobeTcpRcvEstablished *ebpf.ProgramSpec `ebpf:"kprobe_tcp_rcv_established"` - KprobeTcpRecvmsg *ebpf.ProgramSpec `ebpf:"kprobe_tcp_recvmsg"` - KprobeTcpSendmsg *ebpf.ProgramSpec `ebpf:"kprobe_tcp_sendmsg"` - KretprobeSockAlloc *ebpf.ProgramSpec `ebpf:"kretprobe_sock_alloc"` - KretprobeSysAccept4 *ebpf.ProgramSpec `ebpf:"kretprobe_sys_accept4"` - KretprobeSysClone *ebpf.ProgramSpec `ebpf:"kretprobe_sys_clone"` - KretprobeSysConnect *ebpf.ProgramSpec `ebpf:"kretprobe_sys_connect"` - KretprobeTcpRecvmsg *ebpf.ProgramSpec `ebpf:"kretprobe_tcp_recvmsg"` - KretprobeTcpSendmsg *ebpf.ProgramSpec `ebpf:"kretprobe_tcp_sendmsg"` - SocketHttpFilter *ebpf.ProgramSpec `ebpf:"socket__http_filter"` -} - -// bpf_debugMapSpecs contains maps before they are loaded into the kernel. -// -// It can be passed ebpf.CollectionSpec.Assign. -type bpf_debugMapSpecs struct { - ActiveAcceptArgs *ebpf.MapSpec `ebpf:"active_accept_args"` - ActiveConnectArgs *ebpf.MapSpec `ebpf:"active_connect_args"` - ActiveRecvArgs *ebpf.MapSpec `ebpf:"active_recv_args"` - ActiveSendArgs *ebpf.MapSpec `ebpf:"active_send_args"` - ActiveSendSockArgs *ebpf.MapSpec `ebpf:"active_send_sock_args"` - ActiveSslHandshakes *ebpf.MapSpec `ebpf:"active_ssl_handshakes"` - ActiveSslReadArgs *ebpf.MapSpec `ebpf:"active_ssl_read_args"` - ActiveSslWriteArgs *ebpf.MapSpec `ebpf:"active_ssl_write_args"` - CloneMap *ebpf.MapSpec `ebpf:"clone_map"` - ConnectionMetaMem *ebpf.MapSpec `ebpf:"connection_meta_mem"` - Events *ebpf.MapSpec `ebpf:"events"` - FilteredConnections *ebpf.MapSpec `ebpf:"filtered_connections"` - Http2InfoMem *ebpf.MapSpec `ebpf:"http2_info_mem"` - HttpInfoMem *ebpf.MapSpec `ebpf:"http_info_mem"` - OngoingHttp *ebpf.MapSpec `ebpf:"ongoing_http"` - OngoingHttp2Connections *ebpf.MapSpec `ebpf:"ongoing_http2_connections"` - OngoingHttp2Grpc *ebpf.MapSpec `ebpf:"ongoing_http2_grpc"` - OngoingHttpFallback *ebpf.MapSpec `ebpf:"ongoing_http_fallback"` - PidCache *ebpf.MapSpec `ebpf:"pid_cache"` - PidTidToConn *ebpf.MapSpec `ebpf:"pid_tid_to_conn"` - ServerTraces *ebpf.MapSpec `ebpf:"server_traces"` - SslToConn *ebpf.MapSpec `ebpf:"ssl_to_conn"` - SslToPidTid *ebpf.MapSpec `ebpf:"ssl_to_pid_tid"` - TcpConnectionMap *ebpf.MapSpec `ebpf:"tcp_connection_map"` - TpCharBufMem *ebpf.MapSpec `ebpf:"tp_char_buf_mem"` - TpInfoMem *ebpf.MapSpec `ebpf:"tp_info_mem"` - TraceMap *ebpf.MapSpec `ebpf:"trace_map"` - ValidPids *ebpf.MapSpec `ebpf:"valid_pids"` -} - -// bpf_debugObjects contains all objects after they have been loaded into the kernel. -// -// It can be passed to loadBpf_debugObjects or ebpf.CollectionSpec.LoadAndAssign. -type bpf_debugObjects struct { - bpf_debugPrograms - bpf_debugMaps -} - -func (o *bpf_debugObjects) Close() error { - return _Bpf_debugClose( - &o.bpf_debugPrograms, - &o.bpf_debugMaps, - ) -} - -// bpf_debugMaps contains all maps after they have been loaded into the kernel. -// -// It can be passed to loadBpf_debugObjects or ebpf.CollectionSpec.LoadAndAssign. -type bpf_debugMaps struct { - ActiveAcceptArgs *ebpf.Map `ebpf:"active_accept_args"` - ActiveConnectArgs *ebpf.Map `ebpf:"active_connect_args"` - ActiveRecvArgs *ebpf.Map `ebpf:"active_recv_args"` - ActiveSendArgs *ebpf.Map `ebpf:"active_send_args"` - ActiveSendSockArgs *ebpf.Map `ebpf:"active_send_sock_args"` - ActiveSslHandshakes *ebpf.Map `ebpf:"active_ssl_handshakes"` - ActiveSslReadArgs *ebpf.Map `ebpf:"active_ssl_read_args"` - ActiveSslWriteArgs *ebpf.Map `ebpf:"active_ssl_write_args"` - CloneMap *ebpf.Map `ebpf:"clone_map"` - ConnectionMetaMem *ebpf.Map `ebpf:"connection_meta_mem"` - Events *ebpf.Map `ebpf:"events"` - FilteredConnections *ebpf.Map `ebpf:"filtered_connections"` - Http2InfoMem *ebpf.Map `ebpf:"http2_info_mem"` - HttpInfoMem *ebpf.Map `ebpf:"http_info_mem"` - OngoingHttp *ebpf.Map `ebpf:"ongoing_http"` - OngoingHttp2Connections *ebpf.Map `ebpf:"ongoing_http2_connections"` - OngoingHttp2Grpc *ebpf.Map `ebpf:"ongoing_http2_grpc"` - OngoingHttpFallback *ebpf.Map `ebpf:"ongoing_http_fallback"` - PidCache *ebpf.Map `ebpf:"pid_cache"` - PidTidToConn *ebpf.Map `ebpf:"pid_tid_to_conn"` - ServerTraces *ebpf.Map `ebpf:"server_traces"` - SslToConn *ebpf.Map `ebpf:"ssl_to_conn"` - SslToPidTid *ebpf.Map `ebpf:"ssl_to_pid_tid"` - TcpConnectionMap *ebpf.Map `ebpf:"tcp_connection_map"` - TpCharBufMem *ebpf.Map `ebpf:"tp_char_buf_mem"` - TpInfoMem *ebpf.Map `ebpf:"tp_info_mem"` - TraceMap *ebpf.Map `ebpf:"trace_map"` - ValidPids *ebpf.Map `ebpf:"valid_pids"` -} - -func (m *bpf_debugMaps) Close() error { - return _Bpf_debugClose( - m.ActiveAcceptArgs, - m.ActiveConnectArgs, - m.ActiveRecvArgs, - m.ActiveSendArgs, - m.ActiveSendSockArgs, - m.ActiveSslHandshakes, - m.ActiveSslReadArgs, - m.ActiveSslWriteArgs, - m.CloneMap, - m.ConnectionMetaMem, - m.Events, - m.FilteredConnections, - m.Http2InfoMem, - m.HttpInfoMem, - m.OngoingHttp, - m.OngoingHttp2Connections, - m.OngoingHttp2Grpc, - m.OngoingHttpFallback, - m.PidCache, - m.PidTidToConn, - m.ServerTraces, - m.SslToConn, - m.SslToPidTid, - m.TcpConnectionMap, - m.TpCharBufMem, - m.TpInfoMem, - m.TraceMap, - m.ValidPids, - ) -} - -// bpf_debugPrograms contains all programs after they have been loaded into the kernel. -// -// It can be passed to loadBpf_debugObjects or ebpf.CollectionSpec.LoadAndAssign. -type bpf_debugPrograms struct { - KprobeSysExit *ebpf.Program `ebpf:"kprobe_sys_exit"` - KprobeTcpClose *ebpf.Program `ebpf:"kprobe_tcp_close"` - KprobeTcpConnect *ebpf.Program `ebpf:"kprobe_tcp_connect"` - KprobeTcpRcvEstablished *ebpf.Program `ebpf:"kprobe_tcp_rcv_established"` - KprobeTcpRecvmsg *ebpf.Program `ebpf:"kprobe_tcp_recvmsg"` - KprobeTcpSendmsg *ebpf.Program `ebpf:"kprobe_tcp_sendmsg"` - KretprobeSockAlloc *ebpf.Program `ebpf:"kretprobe_sock_alloc"` - KretprobeSysAccept4 *ebpf.Program `ebpf:"kretprobe_sys_accept4"` - KretprobeSysClone *ebpf.Program `ebpf:"kretprobe_sys_clone"` - KretprobeSysConnect *ebpf.Program `ebpf:"kretprobe_sys_connect"` - KretprobeTcpRecvmsg *ebpf.Program `ebpf:"kretprobe_tcp_recvmsg"` - KretprobeTcpSendmsg *ebpf.Program `ebpf:"kretprobe_tcp_sendmsg"` - SocketHttpFilter *ebpf.Program `ebpf:"socket__http_filter"` -} - -func (p *bpf_debugPrograms) Close() error { - return _Bpf_debugClose( - p.KprobeSysExit, - p.KprobeTcpClose, - p.KprobeTcpConnect, - p.KprobeTcpRcvEstablished, - p.KprobeTcpRecvmsg, - p.KprobeTcpSendmsg, - p.KretprobeSockAlloc, - p.KretprobeSysAccept4, - p.KretprobeSysClone, - p.KretprobeSysConnect, - p.KretprobeTcpRecvmsg, - p.KretprobeTcpSendmsg, - p.SocketHttpFilter, - ) -} - -func _Bpf_debugClose(closers ...io.Closer) error { - for _, closer := range closers { - if err := closer.Close(); err != nil { - return err - } - } - return nil -} - -// Do not access this directly. -// -//go:embed bpf_debug_bpfel_arm64.o -var _Bpf_debugBytes []byte diff --git a/pkg/internal/ebpf/httpfltr/bpf_debug_bpfel_arm64.o b/pkg/internal/ebpf/httpfltr/bpf_debug_bpfel_arm64.o deleted file mode 100644 index f7cd1c35d..000000000 Binary files a/pkg/internal/ebpf/httpfltr/bpf_debug_bpfel_arm64.o and /dev/null differ diff --git a/pkg/internal/ebpf/httpfltr/bpf_debug_bpfel_x86.go b/pkg/internal/ebpf/httpfltr/bpf_debug_bpfel_x86.go deleted file mode 100644 index a536d3940..000000000 --- a/pkg/internal/ebpf/httpfltr/bpf_debug_bpfel_x86.go +++ /dev/null @@ -1,365 +0,0 @@ -// Code generated by bpf2go; DO NOT EDIT. -//go:build 386 || amd64 - -package httpfltr - -import ( - "bytes" - _ "embed" - "fmt" - "io" - - "github.com/cilium/ebpf" -) - -type bpf_debugConnectionInfoT struct { - S_addr [16]uint8 - D_addr [16]uint8 - S_port uint16 - D_port uint16 -} - -type bpf_debugHttp2ConnStreamT struct { - PidConn bpf_debugPidConnectionInfoT - StreamId uint32 -} - -type bpf_debugHttp2GrpcRequestT struct { - Flags uint8 - _ [1]byte - ConnInfo bpf_debugConnectionInfoT - Data [256]uint8 - RetData [64]uint8 - Type uint8 - _ [1]byte - Len int32 - _ [4]byte - StartMonotimeNs uint64 - EndMonotimeNs uint64 - Pid struct { - HostPid uint32 - UserPid uint32 - Ns uint32 - } - _ [4]byte - Tp struct { - TraceId [16]uint8 - SpanId [8]uint8 - ParentId [8]uint8 - Ts uint64 - Flags uint8 - _ [7]byte - } -} - -type bpf_debugHttpConnectionMetadataT struct { - Pid struct { - HostPid uint32 - UserPid uint32 - Ns uint32 - } - Type uint8 -} - -type bpf_debugHttpInfoT struct { - Flags uint8 - _ [1]byte - ConnInfo bpf_debugConnectionInfoT - _ [2]byte - StartMonotimeNs uint64 - EndMonotimeNs uint64 - Buf [160]uint8 - Len uint32 - RespLen uint32 - Status uint16 - Type uint8 - Ssl uint8 - Pid struct { - HostPid uint32 - UserPid uint32 - Ns uint32 - } - Tp struct { - TraceId [16]uint8 - SpanId [8]uint8 - ParentId [8]uint8 - Ts uint64 - Flags uint8 - _ [7]byte - } -} - -type bpf_debugPartialConnectionInfoT struct { - S_addr [16]uint8 - S_port uint16 - D_port uint16 - TcpSeq uint32 -} - -type bpf_debugPidConnectionInfoT struct { - Conn bpf_debugConnectionInfoT - Pid uint32 -} - -type bpf_debugPidKeyT struct { - Pid uint32 - Ns uint32 -} - -type bpf_debugRecvArgsT struct { - SockPtr uint64 - IovecPtr uint64 -} - -type bpf_debugSendArgsT struct { - P_conn bpf_debugPidConnectionInfoT - Size uint64 -} - -type bpf_debugSockArgsT struct { - Addr uint64 - AcceptTime uint64 -} - -type bpf_debugSslArgsT struct { - Ssl uint64 - Buf uint64 - LenPtr uint64 -} - -type bpf_debugTpInfoPidT struct { - Tp struct { - TraceId [16]uint8 - SpanId [8]uint8 - ParentId [8]uint8 - Ts uint64 - Flags uint8 - _ [7]byte - } - Pid uint32 - Valid uint8 - _ [3]byte -} - -// loadBpf_debug returns the embedded CollectionSpec for bpf_debug. -func loadBpf_debug() (*ebpf.CollectionSpec, error) { - reader := bytes.NewReader(_Bpf_debugBytes) - spec, err := ebpf.LoadCollectionSpecFromReader(reader) - if err != nil { - return nil, fmt.Errorf("can't load bpf_debug: %w", err) - } - - return spec, err -} - -// loadBpf_debugObjects loads bpf_debug and converts it into a struct. -// -// The following types are suitable as obj argument: -// -// *bpf_debugObjects -// *bpf_debugPrograms -// *bpf_debugMaps -// -// See ebpf.CollectionSpec.LoadAndAssign documentation for details. -func loadBpf_debugObjects(obj interface{}, opts *ebpf.CollectionOptions) error { - spec, err := loadBpf_debug() - if err != nil { - return err - } - - return spec.LoadAndAssign(obj, opts) -} - -// bpf_debugSpecs contains maps and programs before they are loaded into the kernel. -// -// It can be passed ebpf.CollectionSpec.Assign. -type bpf_debugSpecs struct { - bpf_debugProgramSpecs - bpf_debugMapSpecs -} - -// bpf_debugSpecs contains programs before they are loaded into the kernel. -// -// It can be passed ebpf.CollectionSpec.Assign. -type bpf_debugProgramSpecs struct { - KprobeSysExit *ebpf.ProgramSpec `ebpf:"kprobe_sys_exit"` - KprobeTcpClose *ebpf.ProgramSpec `ebpf:"kprobe_tcp_close"` - KprobeTcpConnect *ebpf.ProgramSpec `ebpf:"kprobe_tcp_connect"` - KprobeTcpRcvEstablished *ebpf.ProgramSpec `ebpf:"kprobe_tcp_rcv_established"` - KprobeTcpRecvmsg *ebpf.ProgramSpec `ebpf:"kprobe_tcp_recvmsg"` - KprobeTcpSendmsg *ebpf.ProgramSpec `ebpf:"kprobe_tcp_sendmsg"` - KretprobeSockAlloc *ebpf.ProgramSpec `ebpf:"kretprobe_sock_alloc"` - KretprobeSysAccept4 *ebpf.ProgramSpec `ebpf:"kretprobe_sys_accept4"` - KretprobeSysClone *ebpf.ProgramSpec `ebpf:"kretprobe_sys_clone"` - KretprobeSysConnect *ebpf.ProgramSpec `ebpf:"kretprobe_sys_connect"` - KretprobeTcpRecvmsg *ebpf.ProgramSpec `ebpf:"kretprobe_tcp_recvmsg"` - KretprobeTcpSendmsg *ebpf.ProgramSpec `ebpf:"kretprobe_tcp_sendmsg"` - SocketHttpFilter *ebpf.ProgramSpec `ebpf:"socket__http_filter"` -} - -// bpf_debugMapSpecs contains maps before they are loaded into the kernel. -// -// It can be passed ebpf.CollectionSpec.Assign. -type bpf_debugMapSpecs struct { - ActiveAcceptArgs *ebpf.MapSpec `ebpf:"active_accept_args"` - ActiveConnectArgs *ebpf.MapSpec `ebpf:"active_connect_args"` - ActiveRecvArgs *ebpf.MapSpec `ebpf:"active_recv_args"` - ActiveSendArgs *ebpf.MapSpec `ebpf:"active_send_args"` - ActiveSendSockArgs *ebpf.MapSpec `ebpf:"active_send_sock_args"` - ActiveSslHandshakes *ebpf.MapSpec `ebpf:"active_ssl_handshakes"` - ActiveSslReadArgs *ebpf.MapSpec `ebpf:"active_ssl_read_args"` - ActiveSslWriteArgs *ebpf.MapSpec `ebpf:"active_ssl_write_args"` - CloneMap *ebpf.MapSpec `ebpf:"clone_map"` - ConnectionMetaMem *ebpf.MapSpec `ebpf:"connection_meta_mem"` - Events *ebpf.MapSpec `ebpf:"events"` - FilteredConnections *ebpf.MapSpec `ebpf:"filtered_connections"` - Http2InfoMem *ebpf.MapSpec `ebpf:"http2_info_mem"` - HttpInfoMem *ebpf.MapSpec `ebpf:"http_info_mem"` - OngoingHttp *ebpf.MapSpec `ebpf:"ongoing_http"` - OngoingHttp2Connections *ebpf.MapSpec `ebpf:"ongoing_http2_connections"` - OngoingHttp2Grpc *ebpf.MapSpec `ebpf:"ongoing_http2_grpc"` - OngoingHttpFallback *ebpf.MapSpec `ebpf:"ongoing_http_fallback"` - PidCache *ebpf.MapSpec `ebpf:"pid_cache"` - PidTidToConn *ebpf.MapSpec `ebpf:"pid_tid_to_conn"` - ServerTraces *ebpf.MapSpec `ebpf:"server_traces"` - SslToConn *ebpf.MapSpec `ebpf:"ssl_to_conn"` - SslToPidTid *ebpf.MapSpec `ebpf:"ssl_to_pid_tid"` - TcpConnectionMap *ebpf.MapSpec `ebpf:"tcp_connection_map"` - TpCharBufMem *ebpf.MapSpec `ebpf:"tp_char_buf_mem"` - TpInfoMem *ebpf.MapSpec `ebpf:"tp_info_mem"` - TraceMap *ebpf.MapSpec `ebpf:"trace_map"` - ValidPids *ebpf.MapSpec `ebpf:"valid_pids"` -} - -// bpf_debugObjects contains all objects after they have been loaded into the kernel. -// -// It can be passed to loadBpf_debugObjects or ebpf.CollectionSpec.LoadAndAssign. -type bpf_debugObjects struct { - bpf_debugPrograms - bpf_debugMaps -} - -func (o *bpf_debugObjects) Close() error { - return _Bpf_debugClose( - &o.bpf_debugPrograms, - &o.bpf_debugMaps, - ) -} - -// bpf_debugMaps contains all maps after they have been loaded into the kernel. -// -// It can be passed to loadBpf_debugObjects or ebpf.CollectionSpec.LoadAndAssign. -type bpf_debugMaps struct { - ActiveAcceptArgs *ebpf.Map `ebpf:"active_accept_args"` - ActiveConnectArgs *ebpf.Map `ebpf:"active_connect_args"` - ActiveRecvArgs *ebpf.Map `ebpf:"active_recv_args"` - ActiveSendArgs *ebpf.Map `ebpf:"active_send_args"` - ActiveSendSockArgs *ebpf.Map `ebpf:"active_send_sock_args"` - ActiveSslHandshakes *ebpf.Map `ebpf:"active_ssl_handshakes"` - ActiveSslReadArgs *ebpf.Map `ebpf:"active_ssl_read_args"` - ActiveSslWriteArgs *ebpf.Map `ebpf:"active_ssl_write_args"` - CloneMap *ebpf.Map `ebpf:"clone_map"` - ConnectionMetaMem *ebpf.Map `ebpf:"connection_meta_mem"` - Events *ebpf.Map `ebpf:"events"` - FilteredConnections *ebpf.Map `ebpf:"filtered_connections"` - Http2InfoMem *ebpf.Map `ebpf:"http2_info_mem"` - HttpInfoMem *ebpf.Map `ebpf:"http_info_mem"` - OngoingHttp *ebpf.Map `ebpf:"ongoing_http"` - OngoingHttp2Connections *ebpf.Map `ebpf:"ongoing_http2_connections"` - OngoingHttp2Grpc *ebpf.Map `ebpf:"ongoing_http2_grpc"` - OngoingHttpFallback *ebpf.Map `ebpf:"ongoing_http_fallback"` - PidCache *ebpf.Map `ebpf:"pid_cache"` - PidTidToConn *ebpf.Map `ebpf:"pid_tid_to_conn"` - ServerTraces *ebpf.Map `ebpf:"server_traces"` - SslToConn *ebpf.Map `ebpf:"ssl_to_conn"` - SslToPidTid *ebpf.Map `ebpf:"ssl_to_pid_tid"` - TcpConnectionMap *ebpf.Map `ebpf:"tcp_connection_map"` - TpCharBufMem *ebpf.Map `ebpf:"tp_char_buf_mem"` - TpInfoMem *ebpf.Map `ebpf:"tp_info_mem"` - TraceMap *ebpf.Map `ebpf:"trace_map"` - ValidPids *ebpf.Map `ebpf:"valid_pids"` -} - -func (m *bpf_debugMaps) Close() error { - return _Bpf_debugClose( - m.ActiveAcceptArgs, - m.ActiveConnectArgs, - m.ActiveRecvArgs, - m.ActiveSendArgs, - m.ActiveSendSockArgs, - m.ActiveSslHandshakes, - m.ActiveSslReadArgs, - m.ActiveSslWriteArgs, - m.CloneMap, - m.ConnectionMetaMem, - m.Events, - m.FilteredConnections, - m.Http2InfoMem, - m.HttpInfoMem, - m.OngoingHttp, - m.OngoingHttp2Connections, - m.OngoingHttp2Grpc, - m.OngoingHttpFallback, - m.PidCache, - m.PidTidToConn, - m.ServerTraces, - m.SslToConn, - m.SslToPidTid, - m.TcpConnectionMap, - m.TpCharBufMem, - m.TpInfoMem, - m.TraceMap, - m.ValidPids, - ) -} - -// bpf_debugPrograms contains all programs after they have been loaded into the kernel. -// -// It can be passed to loadBpf_debugObjects or ebpf.CollectionSpec.LoadAndAssign. -type bpf_debugPrograms struct { - KprobeSysExit *ebpf.Program `ebpf:"kprobe_sys_exit"` - KprobeTcpClose *ebpf.Program `ebpf:"kprobe_tcp_close"` - KprobeTcpConnect *ebpf.Program `ebpf:"kprobe_tcp_connect"` - KprobeTcpRcvEstablished *ebpf.Program `ebpf:"kprobe_tcp_rcv_established"` - KprobeTcpRecvmsg *ebpf.Program `ebpf:"kprobe_tcp_recvmsg"` - KprobeTcpSendmsg *ebpf.Program `ebpf:"kprobe_tcp_sendmsg"` - KretprobeSockAlloc *ebpf.Program `ebpf:"kretprobe_sock_alloc"` - KretprobeSysAccept4 *ebpf.Program `ebpf:"kretprobe_sys_accept4"` - KretprobeSysClone *ebpf.Program `ebpf:"kretprobe_sys_clone"` - KretprobeSysConnect *ebpf.Program `ebpf:"kretprobe_sys_connect"` - KretprobeTcpRecvmsg *ebpf.Program `ebpf:"kretprobe_tcp_recvmsg"` - KretprobeTcpSendmsg *ebpf.Program `ebpf:"kretprobe_tcp_sendmsg"` - SocketHttpFilter *ebpf.Program `ebpf:"socket__http_filter"` -} - -func (p *bpf_debugPrograms) Close() error { - return _Bpf_debugClose( - p.KprobeSysExit, - p.KprobeTcpClose, - p.KprobeTcpConnect, - p.KprobeTcpRcvEstablished, - p.KprobeTcpRecvmsg, - p.KprobeTcpSendmsg, - p.KretprobeSockAlloc, - p.KretprobeSysAccept4, - p.KretprobeSysClone, - p.KretprobeSysConnect, - p.KretprobeTcpRecvmsg, - p.KretprobeTcpSendmsg, - p.SocketHttpFilter, - ) -} - -func _Bpf_debugClose(closers ...io.Closer) error { - for _, closer := range closers { - if err := closer.Close(); err != nil { - return err - } - } - return nil -} - -// Do not access this directly. -// -//go:embed bpf_debug_bpfel_x86.o -var _Bpf_debugBytes []byte diff --git a/pkg/internal/ebpf/httpfltr/bpf_debug_bpfel_x86.o b/pkg/internal/ebpf/httpfltr/bpf_debug_bpfel_x86.o deleted file mode 100644 index 48d9622e4..000000000 Binary files a/pkg/internal/ebpf/httpfltr/bpf_debug_bpfel_x86.o and /dev/null differ diff --git a/pkg/internal/ebpf/httpfltr/bpf_tp_bpfel_arm64.go b/pkg/internal/ebpf/httpfltr/bpf_tp_bpfel_arm64.go deleted file mode 100644 index 5a2b61b2e..000000000 --- a/pkg/internal/ebpf/httpfltr/bpf_tp_bpfel_arm64.go +++ /dev/null @@ -1,365 +0,0 @@ -// Code generated by bpf2go; DO NOT EDIT. -//go:build arm64 - -package httpfltr - -import ( - "bytes" - _ "embed" - "fmt" - "io" - - "github.com/cilium/ebpf" -) - -type bpf_tpConnectionInfoT struct { - S_addr [16]uint8 - D_addr [16]uint8 - S_port uint16 - D_port uint16 -} - -type bpf_tpHttp2ConnStreamT struct { - PidConn bpf_tpPidConnectionInfoT - StreamId uint32 -} - -type bpf_tpHttp2GrpcRequestT struct { - Flags uint8 - _ [1]byte - ConnInfo bpf_tpConnectionInfoT - Data [256]uint8 - RetData [64]uint8 - Type uint8 - _ [1]byte - Len int32 - _ [4]byte - StartMonotimeNs uint64 - EndMonotimeNs uint64 - Pid struct { - HostPid uint32 - UserPid uint32 - Ns uint32 - } - _ [4]byte - Tp struct { - TraceId [16]uint8 - SpanId [8]uint8 - ParentId [8]uint8 - Ts uint64 - Flags uint8 - _ [7]byte - } -} - -type bpf_tpHttpConnectionMetadataT struct { - Pid struct { - HostPid uint32 - UserPid uint32 - Ns uint32 - } - Type uint8 -} - -type bpf_tpHttpInfoT struct { - Flags uint8 - _ [1]byte - ConnInfo bpf_tpConnectionInfoT - _ [2]byte - StartMonotimeNs uint64 - EndMonotimeNs uint64 - Buf [160]uint8 - Len uint32 - RespLen uint32 - Status uint16 - Type uint8 - Ssl uint8 - Pid struct { - HostPid uint32 - UserPid uint32 - Ns uint32 - } - Tp struct { - TraceId [16]uint8 - SpanId [8]uint8 - ParentId [8]uint8 - Ts uint64 - Flags uint8 - _ [7]byte - } -} - -type bpf_tpPartialConnectionInfoT struct { - S_addr [16]uint8 - S_port uint16 - D_port uint16 - TcpSeq uint32 -} - -type bpf_tpPidConnectionInfoT struct { - Conn bpf_tpConnectionInfoT - Pid uint32 -} - -type bpf_tpPidKeyT struct { - Pid uint32 - Ns uint32 -} - -type bpf_tpRecvArgsT struct { - SockPtr uint64 - IovecPtr uint64 -} - -type bpf_tpSendArgsT struct { - P_conn bpf_tpPidConnectionInfoT - Size uint64 -} - -type bpf_tpSockArgsT struct { - Addr uint64 - AcceptTime uint64 -} - -type bpf_tpSslArgsT struct { - Ssl uint64 - Buf uint64 - LenPtr uint64 -} - -type bpf_tpTpInfoPidT struct { - Tp struct { - TraceId [16]uint8 - SpanId [8]uint8 - ParentId [8]uint8 - Ts uint64 - Flags uint8 - _ [7]byte - } - Pid uint32 - Valid uint8 - _ [3]byte -} - -// loadBpf_tp returns the embedded CollectionSpec for bpf_tp. -func loadBpf_tp() (*ebpf.CollectionSpec, error) { - reader := bytes.NewReader(_Bpf_tpBytes) - spec, err := ebpf.LoadCollectionSpecFromReader(reader) - if err != nil { - return nil, fmt.Errorf("can't load bpf_tp: %w", err) - } - - return spec, err -} - -// loadBpf_tpObjects loads bpf_tp and converts it into a struct. -// -// The following types are suitable as obj argument: -// -// *bpf_tpObjects -// *bpf_tpPrograms -// *bpf_tpMaps -// -// See ebpf.CollectionSpec.LoadAndAssign documentation for details. -func loadBpf_tpObjects(obj interface{}, opts *ebpf.CollectionOptions) error { - spec, err := loadBpf_tp() - if err != nil { - return err - } - - return spec.LoadAndAssign(obj, opts) -} - -// bpf_tpSpecs contains maps and programs before they are loaded into the kernel. -// -// It can be passed ebpf.CollectionSpec.Assign. -type bpf_tpSpecs struct { - bpf_tpProgramSpecs - bpf_tpMapSpecs -} - -// bpf_tpSpecs contains programs before they are loaded into the kernel. -// -// It can be passed ebpf.CollectionSpec.Assign. -type bpf_tpProgramSpecs struct { - KprobeSysExit *ebpf.ProgramSpec `ebpf:"kprobe_sys_exit"` - KprobeTcpClose *ebpf.ProgramSpec `ebpf:"kprobe_tcp_close"` - KprobeTcpConnect *ebpf.ProgramSpec `ebpf:"kprobe_tcp_connect"` - KprobeTcpRcvEstablished *ebpf.ProgramSpec `ebpf:"kprobe_tcp_rcv_established"` - KprobeTcpRecvmsg *ebpf.ProgramSpec `ebpf:"kprobe_tcp_recvmsg"` - KprobeTcpSendmsg *ebpf.ProgramSpec `ebpf:"kprobe_tcp_sendmsg"` - KretprobeSockAlloc *ebpf.ProgramSpec `ebpf:"kretprobe_sock_alloc"` - KretprobeSysAccept4 *ebpf.ProgramSpec `ebpf:"kretprobe_sys_accept4"` - KretprobeSysClone *ebpf.ProgramSpec `ebpf:"kretprobe_sys_clone"` - KretprobeSysConnect *ebpf.ProgramSpec `ebpf:"kretprobe_sys_connect"` - KretprobeTcpRecvmsg *ebpf.ProgramSpec `ebpf:"kretprobe_tcp_recvmsg"` - KretprobeTcpSendmsg *ebpf.ProgramSpec `ebpf:"kretprobe_tcp_sendmsg"` - SocketHttpFilter *ebpf.ProgramSpec `ebpf:"socket__http_filter"` -} - -// bpf_tpMapSpecs contains maps before they are loaded into the kernel. -// -// It can be passed ebpf.CollectionSpec.Assign. -type bpf_tpMapSpecs struct { - ActiveAcceptArgs *ebpf.MapSpec `ebpf:"active_accept_args"` - ActiveConnectArgs *ebpf.MapSpec `ebpf:"active_connect_args"` - ActiveRecvArgs *ebpf.MapSpec `ebpf:"active_recv_args"` - ActiveSendArgs *ebpf.MapSpec `ebpf:"active_send_args"` - ActiveSendSockArgs *ebpf.MapSpec `ebpf:"active_send_sock_args"` - ActiveSslHandshakes *ebpf.MapSpec `ebpf:"active_ssl_handshakes"` - ActiveSslReadArgs *ebpf.MapSpec `ebpf:"active_ssl_read_args"` - ActiveSslWriteArgs *ebpf.MapSpec `ebpf:"active_ssl_write_args"` - CloneMap *ebpf.MapSpec `ebpf:"clone_map"` - ConnectionMetaMem *ebpf.MapSpec `ebpf:"connection_meta_mem"` - Events *ebpf.MapSpec `ebpf:"events"` - FilteredConnections *ebpf.MapSpec `ebpf:"filtered_connections"` - Http2InfoMem *ebpf.MapSpec `ebpf:"http2_info_mem"` - HttpInfoMem *ebpf.MapSpec `ebpf:"http_info_mem"` - OngoingHttp *ebpf.MapSpec `ebpf:"ongoing_http"` - OngoingHttp2Connections *ebpf.MapSpec `ebpf:"ongoing_http2_connections"` - OngoingHttp2Grpc *ebpf.MapSpec `ebpf:"ongoing_http2_grpc"` - OngoingHttpFallback *ebpf.MapSpec `ebpf:"ongoing_http_fallback"` - PidCache *ebpf.MapSpec `ebpf:"pid_cache"` - PidTidToConn *ebpf.MapSpec `ebpf:"pid_tid_to_conn"` - ServerTraces *ebpf.MapSpec `ebpf:"server_traces"` - SslToConn *ebpf.MapSpec `ebpf:"ssl_to_conn"` - SslToPidTid *ebpf.MapSpec `ebpf:"ssl_to_pid_tid"` - TcpConnectionMap *ebpf.MapSpec `ebpf:"tcp_connection_map"` - TpCharBufMem *ebpf.MapSpec `ebpf:"tp_char_buf_mem"` - TpInfoMem *ebpf.MapSpec `ebpf:"tp_info_mem"` - TraceMap *ebpf.MapSpec `ebpf:"trace_map"` - ValidPids *ebpf.MapSpec `ebpf:"valid_pids"` -} - -// bpf_tpObjects contains all objects after they have been loaded into the kernel. -// -// It can be passed to loadBpf_tpObjects or ebpf.CollectionSpec.LoadAndAssign. -type bpf_tpObjects struct { - bpf_tpPrograms - bpf_tpMaps -} - -func (o *bpf_tpObjects) Close() error { - return _Bpf_tpClose( - &o.bpf_tpPrograms, - &o.bpf_tpMaps, - ) -} - -// bpf_tpMaps contains all maps after they have been loaded into the kernel. -// -// It can be passed to loadBpf_tpObjects or ebpf.CollectionSpec.LoadAndAssign. -type bpf_tpMaps struct { - ActiveAcceptArgs *ebpf.Map `ebpf:"active_accept_args"` - ActiveConnectArgs *ebpf.Map `ebpf:"active_connect_args"` - ActiveRecvArgs *ebpf.Map `ebpf:"active_recv_args"` - ActiveSendArgs *ebpf.Map `ebpf:"active_send_args"` - ActiveSendSockArgs *ebpf.Map `ebpf:"active_send_sock_args"` - ActiveSslHandshakes *ebpf.Map `ebpf:"active_ssl_handshakes"` - ActiveSslReadArgs *ebpf.Map `ebpf:"active_ssl_read_args"` - ActiveSslWriteArgs *ebpf.Map `ebpf:"active_ssl_write_args"` - CloneMap *ebpf.Map `ebpf:"clone_map"` - ConnectionMetaMem *ebpf.Map `ebpf:"connection_meta_mem"` - Events *ebpf.Map `ebpf:"events"` - FilteredConnections *ebpf.Map `ebpf:"filtered_connections"` - Http2InfoMem *ebpf.Map `ebpf:"http2_info_mem"` - HttpInfoMem *ebpf.Map `ebpf:"http_info_mem"` - OngoingHttp *ebpf.Map `ebpf:"ongoing_http"` - OngoingHttp2Connections *ebpf.Map `ebpf:"ongoing_http2_connections"` - OngoingHttp2Grpc *ebpf.Map `ebpf:"ongoing_http2_grpc"` - OngoingHttpFallback *ebpf.Map `ebpf:"ongoing_http_fallback"` - PidCache *ebpf.Map `ebpf:"pid_cache"` - PidTidToConn *ebpf.Map `ebpf:"pid_tid_to_conn"` - ServerTraces *ebpf.Map `ebpf:"server_traces"` - SslToConn *ebpf.Map `ebpf:"ssl_to_conn"` - SslToPidTid *ebpf.Map `ebpf:"ssl_to_pid_tid"` - TcpConnectionMap *ebpf.Map `ebpf:"tcp_connection_map"` - TpCharBufMem *ebpf.Map `ebpf:"tp_char_buf_mem"` - TpInfoMem *ebpf.Map `ebpf:"tp_info_mem"` - TraceMap *ebpf.Map `ebpf:"trace_map"` - ValidPids *ebpf.Map `ebpf:"valid_pids"` -} - -func (m *bpf_tpMaps) Close() error { - return _Bpf_tpClose( - m.ActiveAcceptArgs, - m.ActiveConnectArgs, - m.ActiveRecvArgs, - m.ActiveSendArgs, - m.ActiveSendSockArgs, - m.ActiveSslHandshakes, - m.ActiveSslReadArgs, - m.ActiveSslWriteArgs, - m.CloneMap, - m.ConnectionMetaMem, - m.Events, - m.FilteredConnections, - m.Http2InfoMem, - m.HttpInfoMem, - m.OngoingHttp, - m.OngoingHttp2Connections, - m.OngoingHttp2Grpc, - m.OngoingHttpFallback, - m.PidCache, - m.PidTidToConn, - m.ServerTraces, - m.SslToConn, - m.SslToPidTid, - m.TcpConnectionMap, - m.TpCharBufMem, - m.TpInfoMem, - m.TraceMap, - m.ValidPids, - ) -} - -// bpf_tpPrograms contains all programs after they have been loaded into the kernel. -// -// It can be passed to loadBpf_tpObjects or ebpf.CollectionSpec.LoadAndAssign. -type bpf_tpPrograms struct { - KprobeSysExit *ebpf.Program `ebpf:"kprobe_sys_exit"` - KprobeTcpClose *ebpf.Program `ebpf:"kprobe_tcp_close"` - KprobeTcpConnect *ebpf.Program `ebpf:"kprobe_tcp_connect"` - KprobeTcpRcvEstablished *ebpf.Program `ebpf:"kprobe_tcp_rcv_established"` - KprobeTcpRecvmsg *ebpf.Program `ebpf:"kprobe_tcp_recvmsg"` - KprobeTcpSendmsg *ebpf.Program `ebpf:"kprobe_tcp_sendmsg"` - KretprobeSockAlloc *ebpf.Program `ebpf:"kretprobe_sock_alloc"` - KretprobeSysAccept4 *ebpf.Program `ebpf:"kretprobe_sys_accept4"` - KretprobeSysClone *ebpf.Program `ebpf:"kretprobe_sys_clone"` - KretprobeSysConnect *ebpf.Program `ebpf:"kretprobe_sys_connect"` - KretprobeTcpRecvmsg *ebpf.Program `ebpf:"kretprobe_tcp_recvmsg"` - KretprobeTcpSendmsg *ebpf.Program `ebpf:"kretprobe_tcp_sendmsg"` - SocketHttpFilter *ebpf.Program `ebpf:"socket__http_filter"` -} - -func (p *bpf_tpPrograms) Close() error { - return _Bpf_tpClose( - p.KprobeSysExit, - p.KprobeTcpClose, - p.KprobeTcpConnect, - p.KprobeTcpRcvEstablished, - p.KprobeTcpRecvmsg, - p.KprobeTcpSendmsg, - p.KretprobeSockAlloc, - p.KretprobeSysAccept4, - p.KretprobeSysClone, - p.KretprobeSysConnect, - p.KretprobeTcpRecvmsg, - p.KretprobeTcpSendmsg, - p.SocketHttpFilter, - ) -} - -func _Bpf_tpClose(closers ...io.Closer) error { - for _, closer := range closers { - if err := closer.Close(); err != nil { - return err - } - } - return nil -} - -// Do not access this directly. -// -//go:embed bpf_tp_bpfel_arm64.o -var _Bpf_tpBytes []byte diff --git a/pkg/internal/ebpf/httpfltr/bpf_tp_bpfel_arm64.o b/pkg/internal/ebpf/httpfltr/bpf_tp_bpfel_arm64.o deleted file mode 100644 index 069bb4d57..000000000 Binary files a/pkg/internal/ebpf/httpfltr/bpf_tp_bpfel_arm64.o and /dev/null differ diff --git a/pkg/internal/ebpf/httpfltr/bpf_tp_bpfel_x86.go b/pkg/internal/ebpf/httpfltr/bpf_tp_bpfel_x86.go deleted file mode 100644 index 595e154f0..000000000 --- a/pkg/internal/ebpf/httpfltr/bpf_tp_bpfel_x86.go +++ /dev/null @@ -1,365 +0,0 @@ -// Code generated by bpf2go; DO NOT EDIT. -//go:build 386 || amd64 - -package httpfltr - -import ( - "bytes" - _ "embed" - "fmt" - "io" - - "github.com/cilium/ebpf" -) - -type bpf_tpConnectionInfoT struct { - S_addr [16]uint8 - D_addr [16]uint8 - S_port uint16 - D_port uint16 -} - -type bpf_tpHttp2ConnStreamT struct { - PidConn bpf_tpPidConnectionInfoT - StreamId uint32 -} - -type bpf_tpHttp2GrpcRequestT struct { - Flags uint8 - _ [1]byte - ConnInfo bpf_tpConnectionInfoT - Data [256]uint8 - RetData [64]uint8 - Type uint8 - _ [1]byte - Len int32 - _ [4]byte - StartMonotimeNs uint64 - EndMonotimeNs uint64 - Pid struct { - HostPid uint32 - UserPid uint32 - Ns uint32 - } - _ [4]byte - Tp struct { - TraceId [16]uint8 - SpanId [8]uint8 - ParentId [8]uint8 - Ts uint64 - Flags uint8 - _ [7]byte - } -} - -type bpf_tpHttpConnectionMetadataT struct { - Pid struct { - HostPid uint32 - UserPid uint32 - Ns uint32 - } - Type uint8 -} - -type bpf_tpHttpInfoT struct { - Flags uint8 - _ [1]byte - ConnInfo bpf_tpConnectionInfoT - _ [2]byte - StartMonotimeNs uint64 - EndMonotimeNs uint64 - Buf [160]uint8 - Len uint32 - RespLen uint32 - Status uint16 - Type uint8 - Ssl uint8 - Pid struct { - HostPid uint32 - UserPid uint32 - Ns uint32 - } - Tp struct { - TraceId [16]uint8 - SpanId [8]uint8 - ParentId [8]uint8 - Ts uint64 - Flags uint8 - _ [7]byte - } -} - -type bpf_tpPartialConnectionInfoT struct { - S_addr [16]uint8 - S_port uint16 - D_port uint16 - TcpSeq uint32 -} - -type bpf_tpPidConnectionInfoT struct { - Conn bpf_tpConnectionInfoT - Pid uint32 -} - -type bpf_tpPidKeyT struct { - Pid uint32 - Ns uint32 -} - -type bpf_tpRecvArgsT struct { - SockPtr uint64 - IovecPtr uint64 -} - -type bpf_tpSendArgsT struct { - P_conn bpf_tpPidConnectionInfoT - Size uint64 -} - -type bpf_tpSockArgsT struct { - Addr uint64 - AcceptTime uint64 -} - -type bpf_tpSslArgsT struct { - Ssl uint64 - Buf uint64 - LenPtr uint64 -} - -type bpf_tpTpInfoPidT struct { - Tp struct { - TraceId [16]uint8 - SpanId [8]uint8 - ParentId [8]uint8 - Ts uint64 - Flags uint8 - _ [7]byte - } - Pid uint32 - Valid uint8 - _ [3]byte -} - -// loadBpf_tp returns the embedded CollectionSpec for bpf_tp. -func loadBpf_tp() (*ebpf.CollectionSpec, error) { - reader := bytes.NewReader(_Bpf_tpBytes) - spec, err := ebpf.LoadCollectionSpecFromReader(reader) - if err != nil { - return nil, fmt.Errorf("can't load bpf_tp: %w", err) - } - - return spec, err -} - -// loadBpf_tpObjects loads bpf_tp and converts it into a struct. -// -// The following types are suitable as obj argument: -// -// *bpf_tpObjects -// *bpf_tpPrograms -// *bpf_tpMaps -// -// See ebpf.CollectionSpec.LoadAndAssign documentation for details. -func loadBpf_tpObjects(obj interface{}, opts *ebpf.CollectionOptions) error { - spec, err := loadBpf_tp() - if err != nil { - return err - } - - return spec.LoadAndAssign(obj, opts) -} - -// bpf_tpSpecs contains maps and programs before they are loaded into the kernel. -// -// It can be passed ebpf.CollectionSpec.Assign. -type bpf_tpSpecs struct { - bpf_tpProgramSpecs - bpf_tpMapSpecs -} - -// bpf_tpSpecs contains programs before they are loaded into the kernel. -// -// It can be passed ebpf.CollectionSpec.Assign. -type bpf_tpProgramSpecs struct { - KprobeSysExit *ebpf.ProgramSpec `ebpf:"kprobe_sys_exit"` - KprobeTcpClose *ebpf.ProgramSpec `ebpf:"kprobe_tcp_close"` - KprobeTcpConnect *ebpf.ProgramSpec `ebpf:"kprobe_tcp_connect"` - KprobeTcpRcvEstablished *ebpf.ProgramSpec `ebpf:"kprobe_tcp_rcv_established"` - KprobeTcpRecvmsg *ebpf.ProgramSpec `ebpf:"kprobe_tcp_recvmsg"` - KprobeTcpSendmsg *ebpf.ProgramSpec `ebpf:"kprobe_tcp_sendmsg"` - KretprobeSockAlloc *ebpf.ProgramSpec `ebpf:"kretprobe_sock_alloc"` - KretprobeSysAccept4 *ebpf.ProgramSpec `ebpf:"kretprobe_sys_accept4"` - KretprobeSysClone *ebpf.ProgramSpec `ebpf:"kretprobe_sys_clone"` - KretprobeSysConnect *ebpf.ProgramSpec `ebpf:"kretprobe_sys_connect"` - KretprobeTcpRecvmsg *ebpf.ProgramSpec `ebpf:"kretprobe_tcp_recvmsg"` - KretprobeTcpSendmsg *ebpf.ProgramSpec `ebpf:"kretprobe_tcp_sendmsg"` - SocketHttpFilter *ebpf.ProgramSpec `ebpf:"socket__http_filter"` -} - -// bpf_tpMapSpecs contains maps before they are loaded into the kernel. -// -// It can be passed ebpf.CollectionSpec.Assign. -type bpf_tpMapSpecs struct { - ActiveAcceptArgs *ebpf.MapSpec `ebpf:"active_accept_args"` - ActiveConnectArgs *ebpf.MapSpec `ebpf:"active_connect_args"` - ActiveRecvArgs *ebpf.MapSpec `ebpf:"active_recv_args"` - ActiveSendArgs *ebpf.MapSpec `ebpf:"active_send_args"` - ActiveSendSockArgs *ebpf.MapSpec `ebpf:"active_send_sock_args"` - ActiveSslHandshakes *ebpf.MapSpec `ebpf:"active_ssl_handshakes"` - ActiveSslReadArgs *ebpf.MapSpec `ebpf:"active_ssl_read_args"` - ActiveSslWriteArgs *ebpf.MapSpec `ebpf:"active_ssl_write_args"` - CloneMap *ebpf.MapSpec `ebpf:"clone_map"` - ConnectionMetaMem *ebpf.MapSpec `ebpf:"connection_meta_mem"` - Events *ebpf.MapSpec `ebpf:"events"` - FilteredConnections *ebpf.MapSpec `ebpf:"filtered_connections"` - Http2InfoMem *ebpf.MapSpec `ebpf:"http2_info_mem"` - HttpInfoMem *ebpf.MapSpec `ebpf:"http_info_mem"` - OngoingHttp *ebpf.MapSpec `ebpf:"ongoing_http"` - OngoingHttp2Connections *ebpf.MapSpec `ebpf:"ongoing_http2_connections"` - OngoingHttp2Grpc *ebpf.MapSpec `ebpf:"ongoing_http2_grpc"` - OngoingHttpFallback *ebpf.MapSpec `ebpf:"ongoing_http_fallback"` - PidCache *ebpf.MapSpec `ebpf:"pid_cache"` - PidTidToConn *ebpf.MapSpec `ebpf:"pid_tid_to_conn"` - ServerTraces *ebpf.MapSpec `ebpf:"server_traces"` - SslToConn *ebpf.MapSpec `ebpf:"ssl_to_conn"` - SslToPidTid *ebpf.MapSpec `ebpf:"ssl_to_pid_tid"` - TcpConnectionMap *ebpf.MapSpec `ebpf:"tcp_connection_map"` - TpCharBufMem *ebpf.MapSpec `ebpf:"tp_char_buf_mem"` - TpInfoMem *ebpf.MapSpec `ebpf:"tp_info_mem"` - TraceMap *ebpf.MapSpec `ebpf:"trace_map"` - ValidPids *ebpf.MapSpec `ebpf:"valid_pids"` -} - -// bpf_tpObjects contains all objects after they have been loaded into the kernel. -// -// It can be passed to loadBpf_tpObjects or ebpf.CollectionSpec.LoadAndAssign. -type bpf_tpObjects struct { - bpf_tpPrograms - bpf_tpMaps -} - -func (o *bpf_tpObjects) Close() error { - return _Bpf_tpClose( - &o.bpf_tpPrograms, - &o.bpf_tpMaps, - ) -} - -// bpf_tpMaps contains all maps after they have been loaded into the kernel. -// -// It can be passed to loadBpf_tpObjects or ebpf.CollectionSpec.LoadAndAssign. -type bpf_tpMaps struct { - ActiveAcceptArgs *ebpf.Map `ebpf:"active_accept_args"` - ActiveConnectArgs *ebpf.Map `ebpf:"active_connect_args"` - ActiveRecvArgs *ebpf.Map `ebpf:"active_recv_args"` - ActiveSendArgs *ebpf.Map `ebpf:"active_send_args"` - ActiveSendSockArgs *ebpf.Map `ebpf:"active_send_sock_args"` - ActiveSslHandshakes *ebpf.Map `ebpf:"active_ssl_handshakes"` - ActiveSslReadArgs *ebpf.Map `ebpf:"active_ssl_read_args"` - ActiveSslWriteArgs *ebpf.Map `ebpf:"active_ssl_write_args"` - CloneMap *ebpf.Map `ebpf:"clone_map"` - ConnectionMetaMem *ebpf.Map `ebpf:"connection_meta_mem"` - Events *ebpf.Map `ebpf:"events"` - FilteredConnections *ebpf.Map `ebpf:"filtered_connections"` - Http2InfoMem *ebpf.Map `ebpf:"http2_info_mem"` - HttpInfoMem *ebpf.Map `ebpf:"http_info_mem"` - OngoingHttp *ebpf.Map `ebpf:"ongoing_http"` - OngoingHttp2Connections *ebpf.Map `ebpf:"ongoing_http2_connections"` - OngoingHttp2Grpc *ebpf.Map `ebpf:"ongoing_http2_grpc"` - OngoingHttpFallback *ebpf.Map `ebpf:"ongoing_http_fallback"` - PidCache *ebpf.Map `ebpf:"pid_cache"` - PidTidToConn *ebpf.Map `ebpf:"pid_tid_to_conn"` - ServerTraces *ebpf.Map `ebpf:"server_traces"` - SslToConn *ebpf.Map `ebpf:"ssl_to_conn"` - SslToPidTid *ebpf.Map `ebpf:"ssl_to_pid_tid"` - TcpConnectionMap *ebpf.Map `ebpf:"tcp_connection_map"` - TpCharBufMem *ebpf.Map `ebpf:"tp_char_buf_mem"` - TpInfoMem *ebpf.Map `ebpf:"tp_info_mem"` - TraceMap *ebpf.Map `ebpf:"trace_map"` - ValidPids *ebpf.Map `ebpf:"valid_pids"` -} - -func (m *bpf_tpMaps) Close() error { - return _Bpf_tpClose( - m.ActiveAcceptArgs, - m.ActiveConnectArgs, - m.ActiveRecvArgs, - m.ActiveSendArgs, - m.ActiveSendSockArgs, - m.ActiveSslHandshakes, - m.ActiveSslReadArgs, - m.ActiveSslWriteArgs, - m.CloneMap, - m.ConnectionMetaMem, - m.Events, - m.FilteredConnections, - m.Http2InfoMem, - m.HttpInfoMem, - m.OngoingHttp, - m.OngoingHttp2Connections, - m.OngoingHttp2Grpc, - m.OngoingHttpFallback, - m.PidCache, - m.PidTidToConn, - m.ServerTraces, - m.SslToConn, - m.SslToPidTid, - m.TcpConnectionMap, - m.TpCharBufMem, - m.TpInfoMem, - m.TraceMap, - m.ValidPids, - ) -} - -// bpf_tpPrograms contains all programs after they have been loaded into the kernel. -// -// It can be passed to loadBpf_tpObjects or ebpf.CollectionSpec.LoadAndAssign. -type bpf_tpPrograms struct { - KprobeSysExit *ebpf.Program `ebpf:"kprobe_sys_exit"` - KprobeTcpClose *ebpf.Program `ebpf:"kprobe_tcp_close"` - KprobeTcpConnect *ebpf.Program `ebpf:"kprobe_tcp_connect"` - KprobeTcpRcvEstablished *ebpf.Program `ebpf:"kprobe_tcp_rcv_established"` - KprobeTcpRecvmsg *ebpf.Program `ebpf:"kprobe_tcp_recvmsg"` - KprobeTcpSendmsg *ebpf.Program `ebpf:"kprobe_tcp_sendmsg"` - KretprobeSockAlloc *ebpf.Program `ebpf:"kretprobe_sock_alloc"` - KretprobeSysAccept4 *ebpf.Program `ebpf:"kretprobe_sys_accept4"` - KretprobeSysClone *ebpf.Program `ebpf:"kretprobe_sys_clone"` - KretprobeSysConnect *ebpf.Program `ebpf:"kretprobe_sys_connect"` - KretprobeTcpRecvmsg *ebpf.Program `ebpf:"kretprobe_tcp_recvmsg"` - KretprobeTcpSendmsg *ebpf.Program `ebpf:"kretprobe_tcp_sendmsg"` - SocketHttpFilter *ebpf.Program `ebpf:"socket__http_filter"` -} - -func (p *bpf_tpPrograms) Close() error { - return _Bpf_tpClose( - p.KprobeSysExit, - p.KprobeTcpClose, - p.KprobeTcpConnect, - p.KprobeTcpRcvEstablished, - p.KprobeTcpRecvmsg, - p.KprobeTcpSendmsg, - p.KretprobeSockAlloc, - p.KretprobeSysAccept4, - p.KretprobeSysClone, - p.KretprobeSysConnect, - p.KretprobeTcpRecvmsg, - p.KretprobeTcpSendmsg, - p.SocketHttpFilter, - ) -} - -func _Bpf_tpClose(closers ...io.Closer) error { - for _, closer := range closers { - if err := closer.Close(); err != nil { - return err - } - } - return nil -} - -// Do not access this directly. -// -//go:embed bpf_tp_bpfel_x86.o -var _Bpf_tpBytes []byte diff --git a/pkg/internal/ebpf/httpfltr/bpf_tp_bpfel_x86.o b/pkg/internal/ebpf/httpfltr/bpf_tp_bpfel_x86.o deleted file mode 100644 index 8ef2c4ae9..000000000 Binary files a/pkg/internal/ebpf/httpfltr/bpf_tp_bpfel_x86.o and /dev/null differ diff --git a/pkg/internal/ebpf/httpfltr/bpf_tp_debug_bpfel_arm64.go b/pkg/internal/ebpf/httpfltr/bpf_tp_debug_bpfel_arm64.go deleted file mode 100644 index 67cbd9ed6..000000000 --- a/pkg/internal/ebpf/httpfltr/bpf_tp_debug_bpfel_arm64.go +++ /dev/null @@ -1,365 +0,0 @@ -// Code generated by bpf2go; DO NOT EDIT. -//go:build arm64 - -package httpfltr - -import ( - "bytes" - _ "embed" - "fmt" - "io" - - "github.com/cilium/ebpf" -) - -type bpf_tp_debugConnectionInfoT struct { - S_addr [16]uint8 - D_addr [16]uint8 - S_port uint16 - D_port uint16 -} - -type bpf_tp_debugHttp2ConnStreamT struct { - PidConn bpf_tp_debugPidConnectionInfoT - StreamId uint32 -} - -type bpf_tp_debugHttp2GrpcRequestT struct { - Flags uint8 - _ [1]byte - ConnInfo bpf_tp_debugConnectionInfoT - Data [256]uint8 - RetData [64]uint8 - Type uint8 - _ [1]byte - Len int32 - _ [4]byte - StartMonotimeNs uint64 - EndMonotimeNs uint64 - Pid struct { - HostPid uint32 - UserPid uint32 - Ns uint32 - } - _ [4]byte - Tp struct { - TraceId [16]uint8 - SpanId [8]uint8 - ParentId [8]uint8 - Ts uint64 - Flags uint8 - _ [7]byte - } -} - -type bpf_tp_debugHttpConnectionMetadataT struct { - Pid struct { - HostPid uint32 - UserPid uint32 - Ns uint32 - } - Type uint8 -} - -type bpf_tp_debugHttpInfoT struct { - Flags uint8 - _ [1]byte - ConnInfo bpf_tp_debugConnectionInfoT - _ [2]byte - StartMonotimeNs uint64 - EndMonotimeNs uint64 - Buf [160]uint8 - Len uint32 - RespLen uint32 - Status uint16 - Type uint8 - Ssl uint8 - Pid struct { - HostPid uint32 - UserPid uint32 - Ns uint32 - } - Tp struct { - TraceId [16]uint8 - SpanId [8]uint8 - ParentId [8]uint8 - Ts uint64 - Flags uint8 - _ [7]byte - } -} - -type bpf_tp_debugPartialConnectionInfoT struct { - S_addr [16]uint8 - S_port uint16 - D_port uint16 - TcpSeq uint32 -} - -type bpf_tp_debugPidConnectionInfoT struct { - Conn bpf_tp_debugConnectionInfoT - Pid uint32 -} - -type bpf_tp_debugPidKeyT struct { - Pid uint32 - Ns uint32 -} - -type bpf_tp_debugRecvArgsT struct { - SockPtr uint64 - IovecPtr uint64 -} - -type bpf_tp_debugSendArgsT struct { - P_conn bpf_tp_debugPidConnectionInfoT - Size uint64 -} - -type bpf_tp_debugSockArgsT struct { - Addr uint64 - AcceptTime uint64 -} - -type bpf_tp_debugSslArgsT struct { - Ssl uint64 - Buf uint64 - LenPtr uint64 -} - -type bpf_tp_debugTpInfoPidT struct { - Tp struct { - TraceId [16]uint8 - SpanId [8]uint8 - ParentId [8]uint8 - Ts uint64 - Flags uint8 - _ [7]byte - } - Pid uint32 - Valid uint8 - _ [3]byte -} - -// loadBpf_tp_debug returns the embedded CollectionSpec for bpf_tp_debug. -func loadBpf_tp_debug() (*ebpf.CollectionSpec, error) { - reader := bytes.NewReader(_Bpf_tp_debugBytes) - spec, err := ebpf.LoadCollectionSpecFromReader(reader) - if err != nil { - return nil, fmt.Errorf("can't load bpf_tp_debug: %w", err) - } - - return spec, err -} - -// loadBpf_tp_debugObjects loads bpf_tp_debug and converts it into a struct. -// -// The following types are suitable as obj argument: -// -// *bpf_tp_debugObjects -// *bpf_tp_debugPrograms -// *bpf_tp_debugMaps -// -// See ebpf.CollectionSpec.LoadAndAssign documentation for details. -func loadBpf_tp_debugObjects(obj interface{}, opts *ebpf.CollectionOptions) error { - spec, err := loadBpf_tp_debug() - if err != nil { - return err - } - - return spec.LoadAndAssign(obj, opts) -} - -// bpf_tp_debugSpecs contains maps and programs before they are loaded into the kernel. -// -// It can be passed ebpf.CollectionSpec.Assign. -type bpf_tp_debugSpecs struct { - bpf_tp_debugProgramSpecs - bpf_tp_debugMapSpecs -} - -// bpf_tp_debugSpecs contains programs before they are loaded into the kernel. -// -// It can be passed ebpf.CollectionSpec.Assign. -type bpf_tp_debugProgramSpecs struct { - KprobeSysExit *ebpf.ProgramSpec `ebpf:"kprobe_sys_exit"` - KprobeTcpClose *ebpf.ProgramSpec `ebpf:"kprobe_tcp_close"` - KprobeTcpConnect *ebpf.ProgramSpec `ebpf:"kprobe_tcp_connect"` - KprobeTcpRcvEstablished *ebpf.ProgramSpec `ebpf:"kprobe_tcp_rcv_established"` - KprobeTcpRecvmsg *ebpf.ProgramSpec `ebpf:"kprobe_tcp_recvmsg"` - KprobeTcpSendmsg *ebpf.ProgramSpec `ebpf:"kprobe_tcp_sendmsg"` - KretprobeSockAlloc *ebpf.ProgramSpec `ebpf:"kretprobe_sock_alloc"` - KretprobeSysAccept4 *ebpf.ProgramSpec `ebpf:"kretprobe_sys_accept4"` - KretprobeSysClone *ebpf.ProgramSpec `ebpf:"kretprobe_sys_clone"` - KretprobeSysConnect *ebpf.ProgramSpec `ebpf:"kretprobe_sys_connect"` - KretprobeTcpRecvmsg *ebpf.ProgramSpec `ebpf:"kretprobe_tcp_recvmsg"` - KretprobeTcpSendmsg *ebpf.ProgramSpec `ebpf:"kretprobe_tcp_sendmsg"` - SocketHttpFilter *ebpf.ProgramSpec `ebpf:"socket__http_filter"` -} - -// bpf_tp_debugMapSpecs contains maps before they are loaded into the kernel. -// -// It can be passed ebpf.CollectionSpec.Assign. -type bpf_tp_debugMapSpecs struct { - ActiveAcceptArgs *ebpf.MapSpec `ebpf:"active_accept_args"` - ActiveConnectArgs *ebpf.MapSpec `ebpf:"active_connect_args"` - ActiveRecvArgs *ebpf.MapSpec `ebpf:"active_recv_args"` - ActiveSendArgs *ebpf.MapSpec `ebpf:"active_send_args"` - ActiveSendSockArgs *ebpf.MapSpec `ebpf:"active_send_sock_args"` - ActiveSslHandshakes *ebpf.MapSpec `ebpf:"active_ssl_handshakes"` - ActiveSslReadArgs *ebpf.MapSpec `ebpf:"active_ssl_read_args"` - ActiveSslWriteArgs *ebpf.MapSpec `ebpf:"active_ssl_write_args"` - CloneMap *ebpf.MapSpec `ebpf:"clone_map"` - ConnectionMetaMem *ebpf.MapSpec `ebpf:"connection_meta_mem"` - Events *ebpf.MapSpec `ebpf:"events"` - FilteredConnections *ebpf.MapSpec `ebpf:"filtered_connections"` - Http2InfoMem *ebpf.MapSpec `ebpf:"http2_info_mem"` - HttpInfoMem *ebpf.MapSpec `ebpf:"http_info_mem"` - OngoingHttp *ebpf.MapSpec `ebpf:"ongoing_http"` - OngoingHttp2Connections *ebpf.MapSpec `ebpf:"ongoing_http2_connections"` - OngoingHttp2Grpc *ebpf.MapSpec `ebpf:"ongoing_http2_grpc"` - OngoingHttpFallback *ebpf.MapSpec `ebpf:"ongoing_http_fallback"` - PidCache *ebpf.MapSpec `ebpf:"pid_cache"` - PidTidToConn *ebpf.MapSpec `ebpf:"pid_tid_to_conn"` - ServerTraces *ebpf.MapSpec `ebpf:"server_traces"` - SslToConn *ebpf.MapSpec `ebpf:"ssl_to_conn"` - SslToPidTid *ebpf.MapSpec `ebpf:"ssl_to_pid_tid"` - TcpConnectionMap *ebpf.MapSpec `ebpf:"tcp_connection_map"` - TpCharBufMem *ebpf.MapSpec `ebpf:"tp_char_buf_mem"` - TpInfoMem *ebpf.MapSpec `ebpf:"tp_info_mem"` - TraceMap *ebpf.MapSpec `ebpf:"trace_map"` - ValidPids *ebpf.MapSpec `ebpf:"valid_pids"` -} - -// bpf_tp_debugObjects contains all objects after they have been loaded into the kernel. -// -// It can be passed to loadBpf_tp_debugObjects or ebpf.CollectionSpec.LoadAndAssign. -type bpf_tp_debugObjects struct { - bpf_tp_debugPrograms - bpf_tp_debugMaps -} - -func (o *bpf_tp_debugObjects) Close() error { - return _Bpf_tp_debugClose( - &o.bpf_tp_debugPrograms, - &o.bpf_tp_debugMaps, - ) -} - -// bpf_tp_debugMaps contains all maps after they have been loaded into the kernel. -// -// It can be passed to loadBpf_tp_debugObjects or ebpf.CollectionSpec.LoadAndAssign. -type bpf_tp_debugMaps struct { - ActiveAcceptArgs *ebpf.Map `ebpf:"active_accept_args"` - ActiveConnectArgs *ebpf.Map `ebpf:"active_connect_args"` - ActiveRecvArgs *ebpf.Map `ebpf:"active_recv_args"` - ActiveSendArgs *ebpf.Map `ebpf:"active_send_args"` - ActiveSendSockArgs *ebpf.Map `ebpf:"active_send_sock_args"` - ActiveSslHandshakes *ebpf.Map `ebpf:"active_ssl_handshakes"` - ActiveSslReadArgs *ebpf.Map `ebpf:"active_ssl_read_args"` - ActiveSslWriteArgs *ebpf.Map `ebpf:"active_ssl_write_args"` - CloneMap *ebpf.Map `ebpf:"clone_map"` - ConnectionMetaMem *ebpf.Map `ebpf:"connection_meta_mem"` - Events *ebpf.Map `ebpf:"events"` - FilteredConnections *ebpf.Map `ebpf:"filtered_connections"` - Http2InfoMem *ebpf.Map `ebpf:"http2_info_mem"` - HttpInfoMem *ebpf.Map `ebpf:"http_info_mem"` - OngoingHttp *ebpf.Map `ebpf:"ongoing_http"` - OngoingHttp2Connections *ebpf.Map `ebpf:"ongoing_http2_connections"` - OngoingHttp2Grpc *ebpf.Map `ebpf:"ongoing_http2_grpc"` - OngoingHttpFallback *ebpf.Map `ebpf:"ongoing_http_fallback"` - PidCache *ebpf.Map `ebpf:"pid_cache"` - PidTidToConn *ebpf.Map `ebpf:"pid_tid_to_conn"` - ServerTraces *ebpf.Map `ebpf:"server_traces"` - SslToConn *ebpf.Map `ebpf:"ssl_to_conn"` - SslToPidTid *ebpf.Map `ebpf:"ssl_to_pid_tid"` - TcpConnectionMap *ebpf.Map `ebpf:"tcp_connection_map"` - TpCharBufMem *ebpf.Map `ebpf:"tp_char_buf_mem"` - TpInfoMem *ebpf.Map `ebpf:"tp_info_mem"` - TraceMap *ebpf.Map `ebpf:"trace_map"` - ValidPids *ebpf.Map `ebpf:"valid_pids"` -} - -func (m *bpf_tp_debugMaps) Close() error { - return _Bpf_tp_debugClose( - m.ActiveAcceptArgs, - m.ActiveConnectArgs, - m.ActiveRecvArgs, - m.ActiveSendArgs, - m.ActiveSendSockArgs, - m.ActiveSslHandshakes, - m.ActiveSslReadArgs, - m.ActiveSslWriteArgs, - m.CloneMap, - m.ConnectionMetaMem, - m.Events, - m.FilteredConnections, - m.Http2InfoMem, - m.HttpInfoMem, - m.OngoingHttp, - m.OngoingHttp2Connections, - m.OngoingHttp2Grpc, - m.OngoingHttpFallback, - m.PidCache, - m.PidTidToConn, - m.ServerTraces, - m.SslToConn, - m.SslToPidTid, - m.TcpConnectionMap, - m.TpCharBufMem, - m.TpInfoMem, - m.TraceMap, - m.ValidPids, - ) -} - -// bpf_tp_debugPrograms contains all programs after they have been loaded into the kernel. -// -// It can be passed to loadBpf_tp_debugObjects or ebpf.CollectionSpec.LoadAndAssign. -type bpf_tp_debugPrograms struct { - KprobeSysExit *ebpf.Program `ebpf:"kprobe_sys_exit"` - KprobeTcpClose *ebpf.Program `ebpf:"kprobe_tcp_close"` - KprobeTcpConnect *ebpf.Program `ebpf:"kprobe_tcp_connect"` - KprobeTcpRcvEstablished *ebpf.Program `ebpf:"kprobe_tcp_rcv_established"` - KprobeTcpRecvmsg *ebpf.Program `ebpf:"kprobe_tcp_recvmsg"` - KprobeTcpSendmsg *ebpf.Program `ebpf:"kprobe_tcp_sendmsg"` - KretprobeSockAlloc *ebpf.Program `ebpf:"kretprobe_sock_alloc"` - KretprobeSysAccept4 *ebpf.Program `ebpf:"kretprobe_sys_accept4"` - KretprobeSysClone *ebpf.Program `ebpf:"kretprobe_sys_clone"` - KretprobeSysConnect *ebpf.Program `ebpf:"kretprobe_sys_connect"` - KretprobeTcpRecvmsg *ebpf.Program `ebpf:"kretprobe_tcp_recvmsg"` - KretprobeTcpSendmsg *ebpf.Program `ebpf:"kretprobe_tcp_sendmsg"` - SocketHttpFilter *ebpf.Program `ebpf:"socket__http_filter"` -} - -func (p *bpf_tp_debugPrograms) Close() error { - return _Bpf_tp_debugClose( - p.KprobeSysExit, - p.KprobeTcpClose, - p.KprobeTcpConnect, - p.KprobeTcpRcvEstablished, - p.KprobeTcpRecvmsg, - p.KprobeTcpSendmsg, - p.KretprobeSockAlloc, - p.KretprobeSysAccept4, - p.KretprobeSysClone, - p.KretprobeSysConnect, - p.KretprobeTcpRecvmsg, - p.KretprobeTcpSendmsg, - p.SocketHttpFilter, - ) -} - -func _Bpf_tp_debugClose(closers ...io.Closer) error { - for _, closer := range closers { - if err := closer.Close(); err != nil { - return err - } - } - return nil -} - -// Do not access this directly. -// -//go:embed bpf_tp_debug_bpfel_arm64.o -var _Bpf_tp_debugBytes []byte diff --git a/pkg/internal/ebpf/httpfltr/bpf_tp_debug_bpfel_arm64.o b/pkg/internal/ebpf/httpfltr/bpf_tp_debug_bpfel_arm64.o deleted file mode 100644 index 7478355f9..000000000 Binary files a/pkg/internal/ebpf/httpfltr/bpf_tp_debug_bpfel_arm64.o and /dev/null differ diff --git a/pkg/internal/ebpf/httpfltr/bpf_tp_debug_bpfel_x86.go b/pkg/internal/ebpf/httpfltr/bpf_tp_debug_bpfel_x86.go deleted file mode 100644 index 80af85ac7..000000000 --- a/pkg/internal/ebpf/httpfltr/bpf_tp_debug_bpfel_x86.go +++ /dev/null @@ -1,365 +0,0 @@ -// Code generated by bpf2go; DO NOT EDIT. -//go:build 386 || amd64 - -package httpfltr - -import ( - "bytes" - _ "embed" - "fmt" - "io" - - "github.com/cilium/ebpf" -) - -type bpf_tp_debugConnectionInfoT struct { - S_addr [16]uint8 - D_addr [16]uint8 - S_port uint16 - D_port uint16 -} - -type bpf_tp_debugHttp2ConnStreamT struct { - PidConn bpf_tp_debugPidConnectionInfoT - StreamId uint32 -} - -type bpf_tp_debugHttp2GrpcRequestT struct { - Flags uint8 - _ [1]byte - ConnInfo bpf_tp_debugConnectionInfoT - Data [256]uint8 - RetData [64]uint8 - Type uint8 - _ [1]byte - Len int32 - _ [4]byte - StartMonotimeNs uint64 - EndMonotimeNs uint64 - Pid struct { - HostPid uint32 - UserPid uint32 - Ns uint32 - } - _ [4]byte - Tp struct { - TraceId [16]uint8 - SpanId [8]uint8 - ParentId [8]uint8 - Ts uint64 - Flags uint8 - _ [7]byte - } -} - -type bpf_tp_debugHttpConnectionMetadataT struct { - Pid struct { - HostPid uint32 - UserPid uint32 - Ns uint32 - } - Type uint8 -} - -type bpf_tp_debugHttpInfoT struct { - Flags uint8 - _ [1]byte - ConnInfo bpf_tp_debugConnectionInfoT - _ [2]byte - StartMonotimeNs uint64 - EndMonotimeNs uint64 - Buf [160]uint8 - Len uint32 - RespLen uint32 - Status uint16 - Type uint8 - Ssl uint8 - Pid struct { - HostPid uint32 - UserPid uint32 - Ns uint32 - } - Tp struct { - TraceId [16]uint8 - SpanId [8]uint8 - ParentId [8]uint8 - Ts uint64 - Flags uint8 - _ [7]byte - } -} - -type bpf_tp_debugPartialConnectionInfoT struct { - S_addr [16]uint8 - S_port uint16 - D_port uint16 - TcpSeq uint32 -} - -type bpf_tp_debugPidConnectionInfoT struct { - Conn bpf_tp_debugConnectionInfoT - Pid uint32 -} - -type bpf_tp_debugPidKeyT struct { - Pid uint32 - Ns uint32 -} - -type bpf_tp_debugRecvArgsT struct { - SockPtr uint64 - IovecPtr uint64 -} - -type bpf_tp_debugSendArgsT struct { - P_conn bpf_tp_debugPidConnectionInfoT - Size uint64 -} - -type bpf_tp_debugSockArgsT struct { - Addr uint64 - AcceptTime uint64 -} - -type bpf_tp_debugSslArgsT struct { - Ssl uint64 - Buf uint64 - LenPtr uint64 -} - -type bpf_tp_debugTpInfoPidT struct { - Tp struct { - TraceId [16]uint8 - SpanId [8]uint8 - ParentId [8]uint8 - Ts uint64 - Flags uint8 - _ [7]byte - } - Pid uint32 - Valid uint8 - _ [3]byte -} - -// loadBpf_tp_debug returns the embedded CollectionSpec for bpf_tp_debug. -func loadBpf_tp_debug() (*ebpf.CollectionSpec, error) { - reader := bytes.NewReader(_Bpf_tp_debugBytes) - spec, err := ebpf.LoadCollectionSpecFromReader(reader) - if err != nil { - return nil, fmt.Errorf("can't load bpf_tp_debug: %w", err) - } - - return spec, err -} - -// loadBpf_tp_debugObjects loads bpf_tp_debug and converts it into a struct. -// -// The following types are suitable as obj argument: -// -// *bpf_tp_debugObjects -// *bpf_tp_debugPrograms -// *bpf_tp_debugMaps -// -// See ebpf.CollectionSpec.LoadAndAssign documentation for details. -func loadBpf_tp_debugObjects(obj interface{}, opts *ebpf.CollectionOptions) error { - spec, err := loadBpf_tp_debug() - if err != nil { - return err - } - - return spec.LoadAndAssign(obj, opts) -} - -// bpf_tp_debugSpecs contains maps and programs before they are loaded into the kernel. -// -// It can be passed ebpf.CollectionSpec.Assign. -type bpf_tp_debugSpecs struct { - bpf_tp_debugProgramSpecs - bpf_tp_debugMapSpecs -} - -// bpf_tp_debugSpecs contains programs before they are loaded into the kernel. -// -// It can be passed ebpf.CollectionSpec.Assign. -type bpf_tp_debugProgramSpecs struct { - KprobeSysExit *ebpf.ProgramSpec `ebpf:"kprobe_sys_exit"` - KprobeTcpClose *ebpf.ProgramSpec `ebpf:"kprobe_tcp_close"` - KprobeTcpConnect *ebpf.ProgramSpec `ebpf:"kprobe_tcp_connect"` - KprobeTcpRcvEstablished *ebpf.ProgramSpec `ebpf:"kprobe_tcp_rcv_established"` - KprobeTcpRecvmsg *ebpf.ProgramSpec `ebpf:"kprobe_tcp_recvmsg"` - KprobeTcpSendmsg *ebpf.ProgramSpec `ebpf:"kprobe_tcp_sendmsg"` - KretprobeSockAlloc *ebpf.ProgramSpec `ebpf:"kretprobe_sock_alloc"` - KretprobeSysAccept4 *ebpf.ProgramSpec `ebpf:"kretprobe_sys_accept4"` - KretprobeSysClone *ebpf.ProgramSpec `ebpf:"kretprobe_sys_clone"` - KretprobeSysConnect *ebpf.ProgramSpec `ebpf:"kretprobe_sys_connect"` - KretprobeTcpRecvmsg *ebpf.ProgramSpec `ebpf:"kretprobe_tcp_recvmsg"` - KretprobeTcpSendmsg *ebpf.ProgramSpec `ebpf:"kretprobe_tcp_sendmsg"` - SocketHttpFilter *ebpf.ProgramSpec `ebpf:"socket__http_filter"` -} - -// bpf_tp_debugMapSpecs contains maps before they are loaded into the kernel. -// -// It can be passed ebpf.CollectionSpec.Assign. -type bpf_tp_debugMapSpecs struct { - ActiveAcceptArgs *ebpf.MapSpec `ebpf:"active_accept_args"` - ActiveConnectArgs *ebpf.MapSpec `ebpf:"active_connect_args"` - ActiveRecvArgs *ebpf.MapSpec `ebpf:"active_recv_args"` - ActiveSendArgs *ebpf.MapSpec `ebpf:"active_send_args"` - ActiveSendSockArgs *ebpf.MapSpec `ebpf:"active_send_sock_args"` - ActiveSslHandshakes *ebpf.MapSpec `ebpf:"active_ssl_handshakes"` - ActiveSslReadArgs *ebpf.MapSpec `ebpf:"active_ssl_read_args"` - ActiveSslWriteArgs *ebpf.MapSpec `ebpf:"active_ssl_write_args"` - CloneMap *ebpf.MapSpec `ebpf:"clone_map"` - ConnectionMetaMem *ebpf.MapSpec `ebpf:"connection_meta_mem"` - Events *ebpf.MapSpec `ebpf:"events"` - FilteredConnections *ebpf.MapSpec `ebpf:"filtered_connections"` - Http2InfoMem *ebpf.MapSpec `ebpf:"http2_info_mem"` - HttpInfoMem *ebpf.MapSpec `ebpf:"http_info_mem"` - OngoingHttp *ebpf.MapSpec `ebpf:"ongoing_http"` - OngoingHttp2Connections *ebpf.MapSpec `ebpf:"ongoing_http2_connections"` - OngoingHttp2Grpc *ebpf.MapSpec `ebpf:"ongoing_http2_grpc"` - OngoingHttpFallback *ebpf.MapSpec `ebpf:"ongoing_http_fallback"` - PidCache *ebpf.MapSpec `ebpf:"pid_cache"` - PidTidToConn *ebpf.MapSpec `ebpf:"pid_tid_to_conn"` - ServerTraces *ebpf.MapSpec `ebpf:"server_traces"` - SslToConn *ebpf.MapSpec `ebpf:"ssl_to_conn"` - SslToPidTid *ebpf.MapSpec `ebpf:"ssl_to_pid_tid"` - TcpConnectionMap *ebpf.MapSpec `ebpf:"tcp_connection_map"` - TpCharBufMem *ebpf.MapSpec `ebpf:"tp_char_buf_mem"` - TpInfoMem *ebpf.MapSpec `ebpf:"tp_info_mem"` - TraceMap *ebpf.MapSpec `ebpf:"trace_map"` - ValidPids *ebpf.MapSpec `ebpf:"valid_pids"` -} - -// bpf_tp_debugObjects contains all objects after they have been loaded into the kernel. -// -// It can be passed to loadBpf_tp_debugObjects or ebpf.CollectionSpec.LoadAndAssign. -type bpf_tp_debugObjects struct { - bpf_tp_debugPrograms - bpf_tp_debugMaps -} - -func (o *bpf_tp_debugObjects) Close() error { - return _Bpf_tp_debugClose( - &o.bpf_tp_debugPrograms, - &o.bpf_tp_debugMaps, - ) -} - -// bpf_tp_debugMaps contains all maps after they have been loaded into the kernel. -// -// It can be passed to loadBpf_tp_debugObjects or ebpf.CollectionSpec.LoadAndAssign. -type bpf_tp_debugMaps struct { - ActiveAcceptArgs *ebpf.Map `ebpf:"active_accept_args"` - ActiveConnectArgs *ebpf.Map `ebpf:"active_connect_args"` - ActiveRecvArgs *ebpf.Map `ebpf:"active_recv_args"` - ActiveSendArgs *ebpf.Map `ebpf:"active_send_args"` - ActiveSendSockArgs *ebpf.Map `ebpf:"active_send_sock_args"` - ActiveSslHandshakes *ebpf.Map `ebpf:"active_ssl_handshakes"` - ActiveSslReadArgs *ebpf.Map `ebpf:"active_ssl_read_args"` - ActiveSslWriteArgs *ebpf.Map `ebpf:"active_ssl_write_args"` - CloneMap *ebpf.Map `ebpf:"clone_map"` - ConnectionMetaMem *ebpf.Map `ebpf:"connection_meta_mem"` - Events *ebpf.Map `ebpf:"events"` - FilteredConnections *ebpf.Map `ebpf:"filtered_connections"` - Http2InfoMem *ebpf.Map `ebpf:"http2_info_mem"` - HttpInfoMem *ebpf.Map `ebpf:"http_info_mem"` - OngoingHttp *ebpf.Map `ebpf:"ongoing_http"` - OngoingHttp2Connections *ebpf.Map `ebpf:"ongoing_http2_connections"` - OngoingHttp2Grpc *ebpf.Map `ebpf:"ongoing_http2_grpc"` - OngoingHttpFallback *ebpf.Map `ebpf:"ongoing_http_fallback"` - PidCache *ebpf.Map `ebpf:"pid_cache"` - PidTidToConn *ebpf.Map `ebpf:"pid_tid_to_conn"` - ServerTraces *ebpf.Map `ebpf:"server_traces"` - SslToConn *ebpf.Map `ebpf:"ssl_to_conn"` - SslToPidTid *ebpf.Map `ebpf:"ssl_to_pid_tid"` - TcpConnectionMap *ebpf.Map `ebpf:"tcp_connection_map"` - TpCharBufMem *ebpf.Map `ebpf:"tp_char_buf_mem"` - TpInfoMem *ebpf.Map `ebpf:"tp_info_mem"` - TraceMap *ebpf.Map `ebpf:"trace_map"` - ValidPids *ebpf.Map `ebpf:"valid_pids"` -} - -func (m *bpf_tp_debugMaps) Close() error { - return _Bpf_tp_debugClose( - m.ActiveAcceptArgs, - m.ActiveConnectArgs, - m.ActiveRecvArgs, - m.ActiveSendArgs, - m.ActiveSendSockArgs, - m.ActiveSslHandshakes, - m.ActiveSslReadArgs, - m.ActiveSslWriteArgs, - m.CloneMap, - m.ConnectionMetaMem, - m.Events, - m.FilteredConnections, - m.Http2InfoMem, - m.HttpInfoMem, - m.OngoingHttp, - m.OngoingHttp2Connections, - m.OngoingHttp2Grpc, - m.OngoingHttpFallback, - m.PidCache, - m.PidTidToConn, - m.ServerTraces, - m.SslToConn, - m.SslToPidTid, - m.TcpConnectionMap, - m.TpCharBufMem, - m.TpInfoMem, - m.TraceMap, - m.ValidPids, - ) -} - -// bpf_tp_debugPrograms contains all programs after they have been loaded into the kernel. -// -// It can be passed to loadBpf_tp_debugObjects or ebpf.CollectionSpec.LoadAndAssign. -type bpf_tp_debugPrograms struct { - KprobeSysExit *ebpf.Program `ebpf:"kprobe_sys_exit"` - KprobeTcpClose *ebpf.Program `ebpf:"kprobe_tcp_close"` - KprobeTcpConnect *ebpf.Program `ebpf:"kprobe_tcp_connect"` - KprobeTcpRcvEstablished *ebpf.Program `ebpf:"kprobe_tcp_rcv_established"` - KprobeTcpRecvmsg *ebpf.Program `ebpf:"kprobe_tcp_recvmsg"` - KprobeTcpSendmsg *ebpf.Program `ebpf:"kprobe_tcp_sendmsg"` - KretprobeSockAlloc *ebpf.Program `ebpf:"kretprobe_sock_alloc"` - KretprobeSysAccept4 *ebpf.Program `ebpf:"kretprobe_sys_accept4"` - KretprobeSysClone *ebpf.Program `ebpf:"kretprobe_sys_clone"` - KretprobeSysConnect *ebpf.Program `ebpf:"kretprobe_sys_connect"` - KretprobeTcpRecvmsg *ebpf.Program `ebpf:"kretprobe_tcp_recvmsg"` - KretprobeTcpSendmsg *ebpf.Program `ebpf:"kretprobe_tcp_sendmsg"` - SocketHttpFilter *ebpf.Program `ebpf:"socket__http_filter"` -} - -func (p *bpf_tp_debugPrograms) Close() error { - return _Bpf_tp_debugClose( - p.KprobeSysExit, - p.KprobeTcpClose, - p.KprobeTcpConnect, - p.KprobeTcpRcvEstablished, - p.KprobeTcpRecvmsg, - p.KprobeTcpSendmsg, - p.KretprobeSockAlloc, - p.KretprobeSysAccept4, - p.KretprobeSysClone, - p.KretprobeSysConnect, - p.KretprobeTcpRecvmsg, - p.KretprobeTcpSendmsg, - p.SocketHttpFilter, - ) -} - -func _Bpf_tp_debugClose(closers ...io.Closer) error { - for _, closer := range closers { - if err := closer.Close(); err != nil { - return err - } - } - return nil -} - -// Do not access this directly. -// -//go:embed bpf_tp_debug_bpfel_x86.o -var _Bpf_tp_debugBytes []byte diff --git a/pkg/internal/ebpf/httpfltr/bpf_tp_debug_bpfel_x86.o b/pkg/internal/ebpf/httpfltr/bpf_tp_debug_bpfel_x86.o deleted file mode 100644 index 4820487cb..000000000 Binary files a/pkg/internal/ebpf/httpfltr/bpf_tp_debug_bpfel_x86.o and /dev/null differ diff --git a/pkg/internal/ebpf/httpssl/bpf_bpfel_arm64.go b/pkg/internal/ebpf/httpssl/bpf_bpfel_arm64.go deleted file mode 100644 index 2be265ec1..000000000 --- a/pkg/internal/ebpf/httpssl/bpf_bpfel_arm64.go +++ /dev/null @@ -1,319 +0,0 @@ -// Code generated by bpf2go; DO NOT EDIT. -//go:build arm64 - -package httpssl - -import ( - "bytes" - _ "embed" - "fmt" - "io" - - "github.com/cilium/ebpf" -) - -type bpfConnectionInfoT struct { - S_addr [16]uint8 - D_addr [16]uint8 - S_port uint16 - D_port uint16 -} - -type bpfHttp2ConnStreamT struct { - PidConn bpfPidConnectionInfoT - StreamId uint32 -} - -type bpfHttp2GrpcRequestT struct { - Flags uint8 - _ [1]byte - ConnInfo bpfConnectionInfoT - Data [256]uint8 - RetData [64]uint8 - Type uint8 - _ [1]byte - Len int32 - _ [4]byte - StartMonotimeNs uint64 - EndMonotimeNs uint64 - Pid struct { - HostPid uint32 - UserPid uint32 - Ns uint32 - } - _ [4]byte - Tp struct { - TraceId [16]uint8 - SpanId [8]uint8 - ParentId [8]uint8 - Ts uint64 - Flags uint8 - _ [7]byte - } -} - -type bpfHttpConnectionMetadataT struct { - Pid struct { - HostPid uint32 - UserPid uint32 - Ns uint32 - } - Type uint8 -} - -type bpfHttpInfoT struct { - Flags uint8 - _ [1]byte - ConnInfo bpfConnectionInfoT - _ [2]byte - StartMonotimeNs uint64 - EndMonotimeNs uint64 - Buf [160]uint8 - Len uint32 - RespLen uint32 - Status uint16 - Type uint8 - Ssl uint8 - Pid struct { - HostPid uint32 - UserPid uint32 - Ns uint32 - } - Tp struct { - TraceId [16]uint8 - SpanId [8]uint8 - ParentId [8]uint8 - Ts uint64 - Flags uint8 - _ [7]byte - } -} - -type bpfPidConnectionInfoT struct { - Conn bpfConnectionInfoT - Pid uint32 -} - -type bpfPidKeyT struct { - Pid uint32 - Ns uint32 -} - -type bpfSslArgsT struct { - Ssl uint64 - Buf uint64 - LenPtr uint64 -} - -type bpfTpInfoPidT struct { - Tp struct { - TraceId [16]uint8 - SpanId [8]uint8 - ParentId [8]uint8 - Ts uint64 - Flags uint8 - _ [7]byte - } - Pid uint32 - Valid uint8 - _ [3]byte -} - -// loadBpf returns the embedded CollectionSpec for bpf. -func loadBpf() (*ebpf.CollectionSpec, error) { - reader := bytes.NewReader(_BpfBytes) - spec, err := ebpf.LoadCollectionSpecFromReader(reader) - if err != nil { - return nil, fmt.Errorf("can't load bpf: %w", err) - } - - return spec, err -} - -// loadBpfObjects loads bpf and converts it into a struct. -// -// The following types are suitable as obj argument: -// -// *bpfObjects -// *bpfPrograms -// *bpfMaps -// -// See ebpf.CollectionSpec.LoadAndAssign documentation for details. -func loadBpfObjects(obj interface{}, opts *ebpf.CollectionOptions) error { - spec, err := loadBpf() - if err != nil { - return err - } - - return spec.LoadAndAssign(obj, opts) -} - -// bpfSpecs contains maps and programs before they are loaded into the kernel. -// -// It can be passed ebpf.CollectionSpec.Assign. -type bpfSpecs struct { - bpfProgramSpecs - bpfMapSpecs -} - -// bpfSpecs contains programs before they are loaded into the kernel. -// -// It can be passed ebpf.CollectionSpec.Assign. -type bpfProgramSpecs struct { - UprobeSslDoHandshake *ebpf.ProgramSpec `ebpf:"uprobe_ssl_do_handshake"` - UprobeSslRead *ebpf.ProgramSpec `ebpf:"uprobe_ssl_read"` - UprobeSslReadEx *ebpf.ProgramSpec `ebpf:"uprobe_ssl_read_ex"` - UprobeSslShutdown *ebpf.ProgramSpec `ebpf:"uprobe_ssl_shutdown"` - UprobeSslWrite *ebpf.ProgramSpec `ebpf:"uprobe_ssl_write"` - UprobeSslWriteEx *ebpf.ProgramSpec `ebpf:"uprobe_ssl_write_ex"` - UretprobeSslDoHandshake *ebpf.ProgramSpec `ebpf:"uretprobe_ssl_do_handshake"` - UretprobeSslRead *ebpf.ProgramSpec `ebpf:"uretprobe_ssl_read"` - UretprobeSslReadEx *ebpf.ProgramSpec `ebpf:"uretprobe_ssl_read_ex"` - UretprobeSslWrite *ebpf.ProgramSpec `ebpf:"uretprobe_ssl_write"` - UretprobeSslWriteEx *ebpf.ProgramSpec `ebpf:"uretprobe_ssl_write_ex"` -} - -// bpfMapSpecs contains maps before they are loaded into the kernel. -// -// It can be passed ebpf.CollectionSpec.Assign. -type bpfMapSpecs struct { - ActiveSslHandshakes *ebpf.MapSpec `ebpf:"active_ssl_handshakes"` - ActiveSslReadArgs *ebpf.MapSpec `ebpf:"active_ssl_read_args"` - ActiveSslWriteArgs *ebpf.MapSpec `ebpf:"active_ssl_write_args"` - CloneMap *ebpf.MapSpec `ebpf:"clone_map"` - ConnectionMetaMem *ebpf.MapSpec `ebpf:"connection_meta_mem"` - Events *ebpf.MapSpec `ebpf:"events"` - FilteredConnections *ebpf.MapSpec `ebpf:"filtered_connections"` - Http2InfoMem *ebpf.MapSpec `ebpf:"http2_info_mem"` - HttpInfoMem *ebpf.MapSpec `ebpf:"http_info_mem"` - OngoingHttp *ebpf.MapSpec `ebpf:"ongoing_http"` - OngoingHttp2Connections *ebpf.MapSpec `ebpf:"ongoing_http2_connections"` - OngoingHttp2Grpc *ebpf.MapSpec `ebpf:"ongoing_http2_grpc"` - OngoingHttpFallback *ebpf.MapSpec `ebpf:"ongoing_http_fallback"` - PidCache *ebpf.MapSpec `ebpf:"pid_cache"` - PidTidToConn *ebpf.MapSpec `ebpf:"pid_tid_to_conn"` - ServerTraces *ebpf.MapSpec `ebpf:"server_traces"` - SslToConn *ebpf.MapSpec `ebpf:"ssl_to_conn"` - SslToPidTid *ebpf.MapSpec `ebpf:"ssl_to_pid_tid"` - TpCharBufMem *ebpf.MapSpec `ebpf:"tp_char_buf_mem"` - TpInfoMem *ebpf.MapSpec `ebpf:"tp_info_mem"` - TraceMap *ebpf.MapSpec `ebpf:"trace_map"` - ValidPids *ebpf.MapSpec `ebpf:"valid_pids"` -} - -// bpfObjects contains all objects after they have been loaded into the kernel. -// -// It can be passed to loadBpfObjects or ebpf.CollectionSpec.LoadAndAssign. -type bpfObjects struct { - bpfPrograms - bpfMaps -} - -func (o *bpfObjects) Close() error { - return _BpfClose( - &o.bpfPrograms, - &o.bpfMaps, - ) -} - -// bpfMaps contains all maps after they have been loaded into the kernel. -// -// It can be passed to loadBpfObjects or ebpf.CollectionSpec.LoadAndAssign. -type bpfMaps struct { - ActiveSslHandshakes *ebpf.Map `ebpf:"active_ssl_handshakes"` - ActiveSslReadArgs *ebpf.Map `ebpf:"active_ssl_read_args"` - ActiveSslWriteArgs *ebpf.Map `ebpf:"active_ssl_write_args"` - CloneMap *ebpf.Map `ebpf:"clone_map"` - ConnectionMetaMem *ebpf.Map `ebpf:"connection_meta_mem"` - Events *ebpf.Map `ebpf:"events"` - FilteredConnections *ebpf.Map `ebpf:"filtered_connections"` - Http2InfoMem *ebpf.Map `ebpf:"http2_info_mem"` - HttpInfoMem *ebpf.Map `ebpf:"http_info_mem"` - OngoingHttp *ebpf.Map `ebpf:"ongoing_http"` - OngoingHttp2Connections *ebpf.Map `ebpf:"ongoing_http2_connections"` - OngoingHttp2Grpc *ebpf.Map `ebpf:"ongoing_http2_grpc"` - OngoingHttpFallback *ebpf.Map `ebpf:"ongoing_http_fallback"` - PidCache *ebpf.Map `ebpf:"pid_cache"` - PidTidToConn *ebpf.Map `ebpf:"pid_tid_to_conn"` - ServerTraces *ebpf.Map `ebpf:"server_traces"` - SslToConn *ebpf.Map `ebpf:"ssl_to_conn"` - SslToPidTid *ebpf.Map `ebpf:"ssl_to_pid_tid"` - TpCharBufMem *ebpf.Map `ebpf:"tp_char_buf_mem"` - TpInfoMem *ebpf.Map `ebpf:"tp_info_mem"` - TraceMap *ebpf.Map `ebpf:"trace_map"` - ValidPids *ebpf.Map `ebpf:"valid_pids"` -} - -func (m *bpfMaps) Close() error { - return _BpfClose( - m.ActiveSslHandshakes, - m.ActiveSslReadArgs, - m.ActiveSslWriteArgs, - m.CloneMap, - m.ConnectionMetaMem, - m.Events, - m.FilteredConnections, - m.Http2InfoMem, - m.HttpInfoMem, - m.OngoingHttp, - m.OngoingHttp2Connections, - m.OngoingHttp2Grpc, - m.OngoingHttpFallback, - m.PidCache, - m.PidTidToConn, - m.ServerTraces, - m.SslToConn, - m.SslToPidTid, - m.TpCharBufMem, - m.TpInfoMem, - m.TraceMap, - m.ValidPids, - ) -} - -// bpfPrograms contains all programs after they have been loaded into the kernel. -// -// It can be passed to loadBpfObjects or ebpf.CollectionSpec.LoadAndAssign. -type bpfPrograms struct { - UprobeSslDoHandshake *ebpf.Program `ebpf:"uprobe_ssl_do_handshake"` - UprobeSslRead *ebpf.Program `ebpf:"uprobe_ssl_read"` - UprobeSslReadEx *ebpf.Program `ebpf:"uprobe_ssl_read_ex"` - UprobeSslShutdown *ebpf.Program `ebpf:"uprobe_ssl_shutdown"` - UprobeSslWrite *ebpf.Program `ebpf:"uprobe_ssl_write"` - UprobeSslWriteEx *ebpf.Program `ebpf:"uprobe_ssl_write_ex"` - UretprobeSslDoHandshake *ebpf.Program `ebpf:"uretprobe_ssl_do_handshake"` - UretprobeSslRead *ebpf.Program `ebpf:"uretprobe_ssl_read"` - UretprobeSslReadEx *ebpf.Program `ebpf:"uretprobe_ssl_read_ex"` - UretprobeSslWrite *ebpf.Program `ebpf:"uretprobe_ssl_write"` - UretprobeSslWriteEx *ebpf.Program `ebpf:"uretprobe_ssl_write_ex"` -} - -func (p *bpfPrograms) Close() error { - return _BpfClose( - p.UprobeSslDoHandshake, - p.UprobeSslRead, - p.UprobeSslReadEx, - p.UprobeSslShutdown, - p.UprobeSslWrite, - p.UprobeSslWriteEx, - p.UretprobeSslDoHandshake, - p.UretprobeSslRead, - p.UretprobeSslReadEx, - p.UretprobeSslWrite, - p.UretprobeSslWriteEx, - ) -} - -func _BpfClose(closers ...io.Closer) error { - for _, closer := range closers { - if err := closer.Close(); err != nil { - return err - } - } - return nil -} - -// Do not access this directly. -// -//go:embed bpf_bpfel_arm64.o -var _BpfBytes []byte diff --git a/pkg/internal/ebpf/httpssl/bpf_bpfel_arm64.o b/pkg/internal/ebpf/httpssl/bpf_bpfel_arm64.o deleted file mode 100644 index c336749ed..000000000 Binary files a/pkg/internal/ebpf/httpssl/bpf_bpfel_arm64.o and /dev/null differ diff --git a/pkg/internal/ebpf/httpssl/bpf_bpfel_x86.go b/pkg/internal/ebpf/httpssl/bpf_bpfel_x86.go deleted file mode 100644 index 3f4a4dc26..000000000 --- a/pkg/internal/ebpf/httpssl/bpf_bpfel_x86.go +++ /dev/null @@ -1,319 +0,0 @@ -// Code generated by bpf2go; DO NOT EDIT. -//go:build 386 || amd64 - -package httpssl - -import ( - "bytes" - _ "embed" - "fmt" - "io" - - "github.com/cilium/ebpf" -) - -type bpfConnectionInfoT struct { - S_addr [16]uint8 - D_addr [16]uint8 - S_port uint16 - D_port uint16 -} - -type bpfHttp2ConnStreamT struct { - PidConn bpfPidConnectionInfoT - StreamId uint32 -} - -type bpfHttp2GrpcRequestT struct { - Flags uint8 - _ [1]byte - ConnInfo bpfConnectionInfoT - Data [256]uint8 - RetData [64]uint8 - Type uint8 - _ [1]byte - Len int32 - _ [4]byte - StartMonotimeNs uint64 - EndMonotimeNs uint64 - Pid struct { - HostPid uint32 - UserPid uint32 - Ns uint32 - } - _ [4]byte - Tp struct { - TraceId [16]uint8 - SpanId [8]uint8 - ParentId [8]uint8 - Ts uint64 - Flags uint8 - _ [7]byte - } -} - -type bpfHttpConnectionMetadataT struct { - Pid struct { - HostPid uint32 - UserPid uint32 - Ns uint32 - } - Type uint8 -} - -type bpfHttpInfoT struct { - Flags uint8 - _ [1]byte - ConnInfo bpfConnectionInfoT - _ [2]byte - StartMonotimeNs uint64 - EndMonotimeNs uint64 - Buf [160]uint8 - Len uint32 - RespLen uint32 - Status uint16 - Type uint8 - Ssl uint8 - Pid struct { - HostPid uint32 - UserPid uint32 - Ns uint32 - } - Tp struct { - TraceId [16]uint8 - SpanId [8]uint8 - ParentId [8]uint8 - Ts uint64 - Flags uint8 - _ [7]byte - } -} - -type bpfPidConnectionInfoT struct { - Conn bpfConnectionInfoT - Pid uint32 -} - -type bpfPidKeyT struct { - Pid uint32 - Ns uint32 -} - -type bpfSslArgsT struct { - Ssl uint64 - Buf uint64 - LenPtr uint64 -} - -type bpfTpInfoPidT struct { - Tp struct { - TraceId [16]uint8 - SpanId [8]uint8 - ParentId [8]uint8 - Ts uint64 - Flags uint8 - _ [7]byte - } - Pid uint32 - Valid uint8 - _ [3]byte -} - -// loadBpf returns the embedded CollectionSpec for bpf. -func loadBpf() (*ebpf.CollectionSpec, error) { - reader := bytes.NewReader(_BpfBytes) - spec, err := ebpf.LoadCollectionSpecFromReader(reader) - if err != nil { - return nil, fmt.Errorf("can't load bpf: %w", err) - } - - return spec, err -} - -// loadBpfObjects loads bpf and converts it into a struct. -// -// The following types are suitable as obj argument: -// -// *bpfObjects -// *bpfPrograms -// *bpfMaps -// -// See ebpf.CollectionSpec.LoadAndAssign documentation for details. -func loadBpfObjects(obj interface{}, opts *ebpf.CollectionOptions) error { - spec, err := loadBpf() - if err != nil { - return err - } - - return spec.LoadAndAssign(obj, opts) -} - -// bpfSpecs contains maps and programs before they are loaded into the kernel. -// -// It can be passed ebpf.CollectionSpec.Assign. -type bpfSpecs struct { - bpfProgramSpecs - bpfMapSpecs -} - -// bpfSpecs contains programs before they are loaded into the kernel. -// -// It can be passed ebpf.CollectionSpec.Assign. -type bpfProgramSpecs struct { - UprobeSslDoHandshake *ebpf.ProgramSpec `ebpf:"uprobe_ssl_do_handshake"` - UprobeSslRead *ebpf.ProgramSpec `ebpf:"uprobe_ssl_read"` - UprobeSslReadEx *ebpf.ProgramSpec `ebpf:"uprobe_ssl_read_ex"` - UprobeSslShutdown *ebpf.ProgramSpec `ebpf:"uprobe_ssl_shutdown"` - UprobeSslWrite *ebpf.ProgramSpec `ebpf:"uprobe_ssl_write"` - UprobeSslWriteEx *ebpf.ProgramSpec `ebpf:"uprobe_ssl_write_ex"` - UretprobeSslDoHandshake *ebpf.ProgramSpec `ebpf:"uretprobe_ssl_do_handshake"` - UretprobeSslRead *ebpf.ProgramSpec `ebpf:"uretprobe_ssl_read"` - UretprobeSslReadEx *ebpf.ProgramSpec `ebpf:"uretprobe_ssl_read_ex"` - UretprobeSslWrite *ebpf.ProgramSpec `ebpf:"uretprobe_ssl_write"` - UretprobeSslWriteEx *ebpf.ProgramSpec `ebpf:"uretprobe_ssl_write_ex"` -} - -// bpfMapSpecs contains maps before they are loaded into the kernel. -// -// It can be passed ebpf.CollectionSpec.Assign. -type bpfMapSpecs struct { - ActiveSslHandshakes *ebpf.MapSpec `ebpf:"active_ssl_handshakes"` - ActiveSslReadArgs *ebpf.MapSpec `ebpf:"active_ssl_read_args"` - ActiveSslWriteArgs *ebpf.MapSpec `ebpf:"active_ssl_write_args"` - CloneMap *ebpf.MapSpec `ebpf:"clone_map"` - ConnectionMetaMem *ebpf.MapSpec `ebpf:"connection_meta_mem"` - Events *ebpf.MapSpec `ebpf:"events"` - FilteredConnections *ebpf.MapSpec `ebpf:"filtered_connections"` - Http2InfoMem *ebpf.MapSpec `ebpf:"http2_info_mem"` - HttpInfoMem *ebpf.MapSpec `ebpf:"http_info_mem"` - OngoingHttp *ebpf.MapSpec `ebpf:"ongoing_http"` - OngoingHttp2Connections *ebpf.MapSpec `ebpf:"ongoing_http2_connections"` - OngoingHttp2Grpc *ebpf.MapSpec `ebpf:"ongoing_http2_grpc"` - OngoingHttpFallback *ebpf.MapSpec `ebpf:"ongoing_http_fallback"` - PidCache *ebpf.MapSpec `ebpf:"pid_cache"` - PidTidToConn *ebpf.MapSpec `ebpf:"pid_tid_to_conn"` - ServerTraces *ebpf.MapSpec `ebpf:"server_traces"` - SslToConn *ebpf.MapSpec `ebpf:"ssl_to_conn"` - SslToPidTid *ebpf.MapSpec `ebpf:"ssl_to_pid_tid"` - TpCharBufMem *ebpf.MapSpec `ebpf:"tp_char_buf_mem"` - TpInfoMem *ebpf.MapSpec `ebpf:"tp_info_mem"` - TraceMap *ebpf.MapSpec `ebpf:"trace_map"` - ValidPids *ebpf.MapSpec `ebpf:"valid_pids"` -} - -// bpfObjects contains all objects after they have been loaded into the kernel. -// -// It can be passed to loadBpfObjects or ebpf.CollectionSpec.LoadAndAssign. -type bpfObjects struct { - bpfPrograms - bpfMaps -} - -func (o *bpfObjects) Close() error { - return _BpfClose( - &o.bpfPrograms, - &o.bpfMaps, - ) -} - -// bpfMaps contains all maps after they have been loaded into the kernel. -// -// It can be passed to loadBpfObjects or ebpf.CollectionSpec.LoadAndAssign. -type bpfMaps struct { - ActiveSslHandshakes *ebpf.Map `ebpf:"active_ssl_handshakes"` - ActiveSslReadArgs *ebpf.Map `ebpf:"active_ssl_read_args"` - ActiveSslWriteArgs *ebpf.Map `ebpf:"active_ssl_write_args"` - CloneMap *ebpf.Map `ebpf:"clone_map"` - ConnectionMetaMem *ebpf.Map `ebpf:"connection_meta_mem"` - Events *ebpf.Map `ebpf:"events"` - FilteredConnections *ebpf.Map `ebpf:"filtered_connections"` - Http2InfoMem *ebpf.Map `ebpf:"http2_info_mem"` - HttpInfoMem *ebpf.Map `ebpf:"http_info_mem"` - OngoingHttp *ebpf.Map `ebpf:"ongoing_http"` - OngoingHttp2Connections *ebpf.Map `ebpf:"ongoing_http2_connections"` - OngoingHttp2Grpc *ebpf.Map `ebpf:"ongoing_http2_grpc"` - OngoingHttpFallback *ebpf.Map `ebpf:"ongoing_http_fallback"` - PidCache *ebpf.Map `ebpf:"pid_cache"` - PidTidToConn *ebpf.Map `ebpf:"pid_tid_to_conn"` - ServerTraces *ebpf.Map `ebpf:"server_traces"` - SslToConn *ebpf.Map `ebpf:"ssl_to_conn"` - SslToPidTid *ebpf.Map `ebpf:"ssl_to_pid_tid"` - TpCharBufMem *ebpf.Map `ebpf:"tp_char_buf_mem"` - TpInfoMem *ebpf.Map `ebpf:"tp_info_mem"` - TraceMap *ebpf.Map `ebpf:"trace_map"` - ValidPids *ebpf.Map `ebpf:"valid_pids"` -} - -func (m *bpfMaps) Close() error { - return _BpfClose( - m.ActiveSslHandshakes, - m.ActiveSslReadArgs, - m.ActiveSslWriteArgs, - m.CloneMap, - m.ConnectionMetaMem, - m.Events, - m.FilteredConnections, - m.Http2InfoMem, - m.HttpInfoMem, - m.OngoingHttp, - m.OngoingHttp2Connections, - m.OngoingHttp2Grpc, - m.OngoingHttpFallback, - m.PidCache, - m.PidTidToConn, - m.ServerTraces, - m.SslToConn, - m.SslToPidTid, - m.TpCharBufMem, - m.TpInfoMem, - m.TraceMap, - m.ValidPids, - ) -} - -// bpfPrograms contains all programs after they have been loaded into the kernel. -// -// It can be passed to loadBpfObjects or ebpf.CollectionSpec.LoadAndAssign. -type bpfPrograms struct { - UprobeSslDoHandshake *ebpf.Program `ebpf:"uprobe_ssl_do_handshake"` - UprobeSslRead *ebpf.Program `ebpf:"uprobe_ssl_read"` - UprobeSslReadEx *ebpf.Program `ebpf:"uprobe_ssl_read_ex"` - UprobeSslShutdown *ebpf.Program `ebpf:"uprobe_ssl_shutdown"` - UprobeSslWrite *ebpf.Program `ebpf:"uprobe_ssl_write"` - UprobeSslWriteEx *ebpf.Program `ebpf:"uprobe_ssl_write_ex"` - UretprobeSslDoHandshake *ebpf.Program `ebpf:"uretprobe_ssl_do_handshake"` - UretprobeSslRead *ebpf.Program `ebpf:"uretprobe_ssl_read"` - UretprobeSslReadEx *ebpf.Program `ebpf:"uretprobe_ssl_read_ex"` - UretprobeSslWrite *ebpf.Program `ebpf:"uretprobe_ssl_write"` - UretprobeSslWriteEx *ebpf.Program `ebpf:"uretprobe_ssl_write_ex"` -} - -func (p *bpfPrograms) Close() error { - return _BpfClose( - p.UprobeSslDoHandshake, - p.UprobeSslRead, - p.UprobeSslReadEx, - p.UprobeSslShutdown, - p.UprobeSslWrite, - p.UprobeSslWriteEx, - p.UretprobeSslDoHandshake, - p.UretprobeSslRead, - p.UretprobeSslReadEx, - p.UretprobeSslWrite, - p.UretprobeSslWriteEx, - ) -} - -func _BpfClose(closers ...io.Closer) error { - for _, closer := range closers { - if err := closer.Close(); err != nil { - return err - } - } - return nil -} - -// Do not access this directly. -// -//go:embed bpf_bpfel_x86.o -var _BpfBytes []byte diff --git a/pkg/internal/ebpf/httpssl/bpf_bpfel_x86.o b/pkg/internal/ebpf/httpssl/bpf_bpfel_x86.o deleted file mode 100644 index b23e50b27..000000000 Binary files a/pkg/internal/ebpf/httpssl/bpf_bpfel_x86.o and /dev/null differ diff --git a/pkg/internal/ebpf/httpssl/bpf_debug_bpfel_arm64.go b/pkg/internal/ebpf/httpssl/bpf_debug_bpfel_arm64.go deleted file mode 100644 index c80c89254..000000000 --- a/pkg/internal/ebpf/httpssl/bpf_debug_bpfel_arm64.go +++ /dev/null @@ -1,319 +0,0 @@ -// Code generated by bpf2go; DO NOT EDIT. -//go:build arm64 - -package httpssl - -import ( - "bytes" - _ "embed" - "fmt" - "io" - - "github.com/cilium/ebpf" -) - -type bpf_debugConnectionInfoT struct { - S_addr [16]uint8 - D_addr [16]uint8 - S_port uint16 - D_port uint16 -} - -type bpf_debugHttp2ConnStreamT struct { - PidConn bpf_debugPidConnectionInfoT - StreamId uint32 -} - -type bpf_debugHttp2GrpcRequestT struct { - Flags uint8 - _ [1]byte - ConnInfo bpf_debugConnectionInfoT - Data [256]uint8 - RetData [64]uint8 - Type uint8 - _ [1]byte - Len int32 - _ [4]byte - StartMonotimeNs uint64 - EndMonotimeNs uint64 - Pid struct { - HostPid uint32 - UserPid uint32 - Ns uint32 - } - _ [4]byte - Tp struct { - TraceId [16]uint8 - SpanId [8]uint8 - ParentId [8]uint8 - Ts uint64 - Flags uint8 - _ [7]byte - } -} - -type bpf_debugHttpConnectionMetadataT struct { - Pid struct { - HostPid uint32 - UserPid uint32 - Ns uint32 - } - Type uint8 -} - -type bpf_debugHttpInfoT struct { - Flags uint8 - _ [1]byte - ConnInfo bpf_debugConnectionInfoT - _ [2]byte - StartMonotimeNs uint64 - EndMonotimeNs uint64 - Buf [160]uint8 - Len uint32 - RespLen uint32 - Status uint16 - Type uint8 - Ssl uint8 - Pid struct { - HostPid uint32 - UserPid uint32 - Ns uint32 - } - Tp struct { - TraceId [16]uint8 - SpanId [8]uint8 - ParentId [8]uint8 - Ts uint64 - Flags uint8 - _ [7]byte - } -} - -type bpf_debugPidConnectionInfoT struct { - Conn bpf_debugConnectionInfoT - Pid uint32 -} - -type bpf_debugPidKeyT struct { - Pid uint32 - Ns uint32 -} - -type bpf_debugSslArgsT struct { - Ssl uint64 - Buf uint64 - LenPtr uint64 -} - -type bpf_debugTpInfoPidT struct { - Tp struct { - TraceId [16]uint8 - SpanId [8]uint8 - ParentId [8]uint8 - Ts uint64 - Flags uint8 - _ [7]byte - } - Pid uint32 - Valid uint8 - _ [3]byte -} - -// loadBpf_debug returns the embedded CollectionSpec for bpf_debug. -func loadBpf_debug() (*ebpf.CollectionSpec, error) { - reader := bytes.NewReader(_Bpf_debugBytes) - spec, err := ebpf.LoadCollectionSpecFromReader(reader) - if err != nil { - return nil, fmt.Errorf("can't load bpf_debug: %w", err) - } - - return spec, err -} - -// loadBpf_debugObjects loads bpf_debug and converts it into a struct. -// -// The following types are suitable as obj argument: -// -// *bpf_debugObjects -// *bpf_debugPrograms -// *bpf_debugMaps -// -// See ebpf.CollectionSpec.LoadAndAssign documentation for details. -func loadBpf_debugObjects(obj interface{}, opts *ebpf.CollectionOptions) error { - spec, err := loadBpf_debug() - if err != nil { - return err - } - - return spec.LoadAndAssign(obj, opts) -} - -// bpf_debugSpecs contains maps and programs before they are loaded into the kernel. -// -// It can be passed ebpf.CollectionSpec.Assign. -type bpf_debugSpecs struct { - bpf_debugProgramSpecs - bpf_debugMapSpecs -} - -// bpf_debugSpecs contains programs before they are loaded into the kernel. -// -// It can be passed ebpf.CollectionSpec.Assign. -type bpf_debugProgramSpecs struct { - UprobeSslDoHandshake *ebpf.ProgramSpec `ebpf:"uprobe_ssl_do_handshake"` - UprobeSslRead *ebpf.ProgramSpec `ebpf:"uprobe_ssl_read"` - UprobeSslReadEx *ebpf.ProgramSpec `ebpf:"uprobe_ssl_read_ex"` - UprobeSslShutdown *ebpf.ProgramSpec `ebpf:"uprobe_ssl_shutdown"` - UprobeSslWrite *ebpf.ProgramSpec `ebpf:"uprobe_ssl_write"` - UprobeSslWriteEx *ebpf.ProgramSpec `ebpf:"uprobe_ssl_write_ex"` - UretprobeSslDoHandshake *ebpf.ProgramSpec `ebpf:"uretprobe_ssl_do_handshake"` - UretprobeSslRead *ebpf.ProgramSpec `ebpf:"uretprobe_ssl_read"` - UretprobeSslReadEx *ebpf.ProgramSpec `ebpf:"uretprobe_ssl_read_ex"` - UretprobeSslWrite *ebpf.ProgramSpec `ebpf:"uretprobe_ssl_write"` - UretprobeSslWriteEx *ebpf.ProgramSpec `ebpf:"uretprobe_ssl_write_ex"` -} - -// bpf_debugMapSpecs contains maps before they are loaded into the kernel. -// -// It can be passed ebpf.CollectionSpec.Assign. -type bpf_debugMapSpecs struct { - ActiveSslHandshakes *ebpf.MapSpec `ebpf:"active_ssl_handshakes"` - ActiveSslReadArgs *ebpf.MapSpec `ebpf:"active_ssl_read_args"` - ActiveSslWriteArgs *ebpf.MapSpec `ebpf:"active_ssl_write_args"` - CloneMap *ebpf.MapSpec `ebpf:"clone_map"` - ConnectionMetaMem *ebpf.MapSpec `ebpf:"connection_meta_mem"` - Events *ebpf.MapSpec `ebpf:"events"` - FilteredConnections *ebpf.MapSpec `ebpf:"filtered_connections"` - Http2InfoMem *ebpf.MapSpec `ebpf:"http2_info_mem"` - HttpInfoMem *ebpf.MapSpec `ebpf:"http_info_mem"` - OngoingHttp *ebpf.MapSpec `ebpf:"ongoing_http"` - OngoingHttp2Connections *ebpf.MapSpec `ebpf:"ongoing_http2_connections"` - OngoingHttp2Grpc *ebpf.MapSpec `ebpf:"ongoing_http2_grpc"` - OngoingHttpFallback *ebpf.MapSpec `ebpf:"ongoing_http_fallback"` - PidCache *ebpf.MapSpec `ebpf:"pid_cache"` - PidTidToConn *ebpf.MapSpec `ebpf:"pid_tid_to_conn"` - ServerTraces *ebpf.MapSpec `ebpf:"server_traces"` - SslToConn *ebpf.MapSpec `ebpf:"ssl_to_conn"` - SslToPidTid *ebpf.MapSpec `ebpf:"ssl_to_pid_tid"` - TpCharBufMem *ebpf.MapSpec `ebpf:"tp_char_buf_mem"` - TpInfoMem *ebpf.MapSpec `ebpf:"tp_info_mem"` - TraceMap *ebpf.MapSpec `ebpf:"trace_map"` - ValidPids *ebpf.MapSpec `ebpf:"valid_pids"` -} - -// bpf_debugObjects contains all objects after they have been loaded into the kernel. -// -// It can be passed to loadBpf_debugObjects or ebpf.CollectionSpec.LoadAndAssign. -type bpf_debugObjects struct { - bpf_debugPrograms - bpf_debugMaps -} - -func (o *bpf_debugObjects) Close() error { - return _Bpf_debugClose( - &o.bpf_debugPrograms, - &o.bpf_debugMaps, - ) -} - -// bpf_debugMaps contains all maps after they have been loaded into the kernel. -// -// It can be passed to loadBpf_debugObjects or ebpf.CollectionSpec.LoadAndAssign. -type bpf_debugMaps struct { - ActiveSslHandshakes *ebpf.Map `ebpf:"active_ssl_handshakes"` - ActiveSslReadArgs *ebpf.Map `ebpf:"active_ssl_read_args"` - ActiveSslWriteArgs *ebpf.Map `ebpf:"active_ssl_write_args"` - CloneMap *ebpf.Map `ebpf:"clone_map"` - ConnectionMetaMem *ebpf.Map `ebpf:"connection_meta_mem"` - Events *ebpf.Map `ebpf:"events"` - FilteredConnections *ebpf.Map `ebpf:"filtered_connections"` - Http2InfoMem *ebpf.Map `ebpf:"http2_info_mem"` - HttpInfoMem *ebpf.Map `ebpf:"http_info_mem"` - OngoingHttp *ebpf.Map `ebpf:"ongoing_http"` - OngoingHttp2Connections *ebpf.Map `ebpf:"ongoing_http2_connections"` - OngoingHttp2Grpc *ebpf.Map `ebpf:"ongoing_http2_grpc"` - OngoingHttpFallback *ebpf.Map `ebpf:"ongoing_http_fallback"` - PidCache *ebpf.Map `ebpf:"pid_cache"` - PidTidToConn *ebpf.Map `ebpf:"pid_tid_to_conn"` - ServerTraces *ebpf.Map `ebpf:"server_traces"` - SslToConn *ebpf.Map `ebpf:"ssl_to_conn"` - SslToPidTid *ebpf.Map `ebpf:"ssl_to_pid_tid"` - TpCharBufMem *ebpf.Map `ebpf:"tp_char_buf_mem"` - TpInfoMem *ebpf.Map `ebpf:"tp_info_mem"` - TraceMap *ebpf.Map `ebpf:"trace_map"` - ValidPids *ebpf.Map `ebpf:"valid_pids"` -} - -func (m *bpf_debugMaps) Close() error { - return _Bpf_debugClose( - m.ActiveSslHandshakes, - m.ActiveSslReadArgs, - m.ActiveSslWriteArgs, - m.CloneMap, - m.ConnectionMetaMem, - m.Events, - m.FilteredConnections, - m.Http2InfoMem, - m.HttpInfoMem, - m.OngoingHttp, - m.OngoingHttp2Connections, - m.OngoingHttp2Grpc, - m.OngoingHttpFallback, - m.PidCache, - m.PidTidToConn, - m.ServerTraces, - m.SslToConn, - m.SslToPidTid, - m.TpCharBufMem, - m.TpInfoMem, - m.TraceMap, - m.ValidPids, - ) -} - -// bpf_debugPrograms contains all programs after they have been loaded into the kernel. -// -// It can be passed to loadBpf_debugObjects or ebpf.CollectionSpec.LoadAndAssign. -type bpf_debugPrograms struct { - UprobeSslDoHandshake *ebpf.Program `ebpf:"uprobe_ssl_do_handshake"` - UprobeSslRead *ebpf.Program `ebpf:"uprobe_ssl_read"` - UprobeSslReadEx *ebpf.Program `ebpf:"uprobe_ssl_read_ex"` - UprobeSslShutdown *ebpf.Program `ebpf:"uprobe_ssl_shutdown"` - UprobeSslWrite *ebpf.Program `ebpf:"uprobe_ssl_write"` - UprobeSslWriteEx *ebpf.Program `ebpf:"uprobe_ssl_write_ex"` - UretprobeSslDoHandshake *ebpf.Program `ebpf:"uretprobe_ssl_do_handshake"` - UretprobeSslRead *ebpf.Program `ebpf:"uretprobe_ssl_read"` - UretprobeSslReadEx *ebpf.Program `ebpf:"uretprobe_ssl_read_ex"` - UretprobeSslWrite *ebpf.Program `ebpf:"uretprobe_ssl_write"` - UretprobeSslWriteEx *ebpf.Program `ebpf:"uretprobe_ssl_write_ex"` -} - -func (p *bpf_debugPrograms) Close() error { - return _Bpf_debugClose( - p.UprobeSslDoHandshake, - p.UprobeSslRead, - p.UprobeSslReadEx, - p.UprobeSslShutdown, - p.UprobeSslWrite, - p.UprobeSslWriteEx, - p.UretprobeSslDoHandshake, - p.UretprobeSslRead, - p.UretprobeSslReadEx, - p.UretprobeSslWrite, - p.UretprobeSslWriteEx, - ) -} - -func _Bpf_debugClose(closers ...io.Closer) error { - for _, closer := range closers { - if err := closer.Close(); err != nil { - return err - } - } - return nil -} - -// Do not access this directly. -// -//go:embed bpf_debug_bpfel_arm64.o -var _Bpf_debugBytes []byte diff --git a/pkg/internal/ebpf/httpssl/bpf_debug_bpfel_arm64.o b/pkg/internal/ebpf/httpssl/bpf_debug_bpfel_arm64.o deleted file mode 100644 index aec1f92bd..000000000 Binary files a/pkg/internal/ebpf/httpssl/bpf_debug_bpfel_arm64.o and /dev/null differ diff --git a/pkg/internal/ebpf/httpssl/bpf_debug_bpfel_x86.go b/pkg/internal/ebpf/httpssl/bpf_debug_bpfel_x86.go deleted file mode 100644 index c538c319c..000000000 --- a/pkg/internal/ebpf/httpssl/bpf_debug_bpfel_x86.go +++ /dev/null @@ -1,319 +0,0 @@ -// Code generated by bpf2go; DO NOT EDIT. -//go:build 386 || amd64 - -package httpssl - -import ( - "bytes" - _ "embed" - "fmt" - "io" - - "github.com/cilium/ebpf" -) - -type bpf_debugConnectionInfoT struct { - S_addr [16]uint8 - D_addr [16]uint8 - S_port uint16 - D_port uint16 -} - -type bpf_debugHttp2ConnStreamT struct { - PidConn bpf_debugPidConnectionInfoT - StreamId uint32 -} - -type bpf_debugHttp2GrpcRequestT struct { - Flags uint8 - _ [1]byte - ConnInfo bpf_debugConnectionInfoT - Data [256]uint8 - RetData [64]uint8 - Type uint8 - _ [1]byte - Len int32 - _ [4]byte - StartMonotimeNs uint64 - EndMonotimeNs uint64 - Pid struct { - HostPid uint32 - UserPid uint32 - Ns uint32 - } - _ [4]byte - Tp struct { - TraceId [16]uint8 - SpanId [8]uint8 - ParentId [8]uint8 - Ts uint64 - Flags uint8 - _ [7]byte - } -} - -type bpf_debugHttpConnectionMetadataT struct { - Pid struct { - HostPid uint32 - UserPid uint32 - Ns uint32 - } - Type uint8 -} - -type bpf_debugHttpInfoT struct { - Flags uint8 - _ [1]byte - ConnInfo bpf_debugConnectionInfoT - _ [2]byte - StartMonotimeNs uint64 - EndMonotimeNs uint64 - Buf [160]uint8 - Len uint32 - RespLen uint32 - Status uint16 - Type uint8 - Ssl uint8 - Pid struct { - HostPid uint32 - UserPid uint32 - Ns uint32 - } - Tp struct { - TraceId [16]uint8 - SpanId [8]uint8 - ParentId [8]uint8 - Ts uint64 - Flags uint8 - _ [7]byte - } -} - -type bpf_debugPidConnectionInfoT struct { - Conn bpf_debugConnectionInfoT - Pid uint32 -} - -type bpf_debugPidKeyT struct { - Pid uint32 - Ns uint32 -} - -type bpf_debugSslArgsT struct { - Ssl uint64 - Buf uint64 - LenPtr uint64 -} - -type bpf_debugTpInfoPidT struct { - Tp struct { - TraceId [16]uint8 - SpanId [8]uint8 - ParentId [8]uint8 - Ts uint64 - Flags uint8 - _ [7]byte - } - Pid uint32 - Valid uint8 - _ [3]byte -} - -// loadBpf_debug returns the embedded CollectionSpec for bpf_debug. -func loadBpf_debug() (*ebpf.CollectionSpec, error) { - reader := bytes.NewReader(_Bpf_debugBytes) - spec, err := ebpf.LoadCollectionSpecFromReader(reader) - if err != nil { - return nil, fmt.Errorf("can't load bpf_debug: %w", err) - } - - return spec, err -} - -// loadBpf_debugObjects loads bpf_debug and converts it into a struct. -// -// The following types are suitable as obj argument: -// -// *bpf_debugObjects -// *bpf_debugPrograms -// *bpf_debugMaps -// -// See ebpf.CollectionSpec.LoadAndAssign documentation for details. -func loadBpf_debugObjects(obj interface{}, opts *ebpf.CollectionOptions) error { - spec, err := loadBpf_debug() - if err != nil { - return err - } - - return spec.LoadAndAssign(obj, opts) -} - -// bpf_debugSpecs contains maps and programs before they are loaded into the kernel. -// -// It can be passed ebpf.CollectionSpec.Assign. -type bpf_debugSpecs struct { - bpf_debugProgramSpecs - bpf_debugMapSpecs -} - -// bpf_debugSpecs contains programs before they are loaded into the kernel. -// -// It can be passed ebpf.CollectionSpec.Assign. -type bpf_debugProgramSpecs struct { - UprobeSslDoHandshake *ebpf.ProgramSpec `ebpf:"uprobe_ssl_do_handshake"` - UprobeSslRead *ebpf.ProgramSpec `ebpf:"uprobe_ssl_read"` - UprobeSslReadEx *ebpf.ProgramSpec `ebpf:"uprobe_ssl_read_ex"` - UprobeSslShutdown *ebpf.ProgramSpec `ebpf:"uprobe_ssl_shutdown"` - UprobeSslWrite *ebpf.ProgramSpec `ebpf:"uprobe_ssl_write"` - UprobeSslWriteEx *ebpf.ProgramSpec `ebpf:"uprobe_ssl_write_ex"` - UretprobeSslDoHandshake *ebpf.ProgramSpec `ebpf:"uretprobe_ssl_do_handshake"` - UretprobeSslRead *ebpf.ProgramSpec `ebpf:"uretprobe_ssl_read"` - UretprobeSslReadEx *ebpf.ProgramSpec `ebpf:"uretprobe_ssl_read_ex"` - UretprobeSslWrite *ebpf.ProgramSpec `ebpf:"uretprobe_ssl_write"` - UretprobeSslWriteEx *ebpf.ProgramSpec `ebpf:"uretprobe_ssl_write_ex"` -} - -// bpf_debugMapSpecs contains maps before they are loaded into the kernel. -// -// It can be passed ebpf.CollectionSpec.Assign. -type bpf_debugMapSpecs struct { - ActiveSslHandshakes *ebpf.MapSpec `ebpf:"active_ssl_handshakes"` - ActiveSslReadArgs *ebpf.MapSpec `ebpf:"active_ssl_read_args"` - ActiveSslWriteArgs *ebpf.MapSpec `ebpf:"active_ssl_write_args"` - CloneMap *ebpf.MapSpec `ebpf:"clone_map"` - ConnectionMetaMem *ebpf.MapSpec `ebpf:"connection_meta_mem"` - Events *ebpf.MapSpec `ebpf:"events"` - FilteredConnections *ebpf.MapSpec `ebpf:"filtered_connections"` - Http2InfoMem *ebpf.MapSpec `ebpf:"http2_info_mem"` - HttpInfoMem *ebpf.MapSpec `ebpf:"http_info_mem"` - OngoingHttp *ebpf.MapSpec `ebpf:"ongoing_http"` - OngoingHttp2Connections *ebpf.MapSpec `ebpf:"ongoing_http2_connections"` - OngoingHttp2Grpc *ebpf.MapSpec `ebpf:"ongoing_http2_grpc"` - OngoingHttpFallback *ebpf.MapSpec `ebpf:"ongoing_http_fallback"` - PidCache *ebpf.MapSpec `ebpf:"pid_cache"` - PidTidToConn *ebpf.MapSpec `ebpf:"pid_tid_to_conn"` - ServerTraces *ebpf.MapSpec `ebpf:"server_traces"` - SslToConn *ebpf.MapSpec `ebpf:"ssl_to_conn"` - SslToPidTid *ebpf.MapSpec `ebpf:"ssl_to_pid_tid"` - TpCharBufMem *ebpf.MapSpec `ebpf:"tp_char_buf_mem"` - TpInfoMem *ebpf.MapSpec `ebpf:"tp_info_mem"` - TraceMap *ebpf.MapSpec `ebpf:"trace_map"` - ValidPids *ebpf.MapSpec `ebpf:"valid_pids"` -} - -// bpf_debugObjects contains all objects after they have been loaded into the kernel. -// -// It can be passed to loadBpf_debugObjects or ebpf.CollectionSpec.LoadAndAssign. -type bpf_debugObjects struct { - bpf_debugPrograms - bpf_debugMaps -} - -func (o *bpf_debugObjects) Close() error { - return _Bpf_debugClose( - &o.bpf_debugPrograms, - &o.bpf_debugMaps, - ) -} - -// bpf_debugMaps contains all maps after they have been loaded into the kernel. -// -// It can be passed to loadBpf_debugObjects or ebpf.CollectionSpec.LoadAndAssign. -type bpf_debugMaps struct { - ActiveSslHandshakes *ebpf.Map `ebpf:"active_ssl_handshakes"` - ActiveSslReadArgs *ebpf.Map `ebpf:"active_ssl_read_args"` - ActiveSslWriteArgs *ebpf.Map `ebpf:"active_ssl_write_args"` - CloneMap *ebpf.Map `ebpf:"clone_map"` - ConnectionMetaMem *ebpf.Map `ebpf:"connection_meta_mem"` - Events *ebpf.Map `ebpf:"events"` - FilteredConnections *ebpf.Map `ebpf:"filtered_connections"` - Http2InfoMem *ebpf.Map `ebpf:"http2_info_mem"` - HttpInfoMem *ebpf.Map `ebpf:"http_info_mem"` - OngoingHttp *ebpf.Map `ebpf:"ongoing_http"` - OngoingHttp2Connections *ebpf.Map `ebpf:"ongoing_http2_connections"` - OngoingHttp2Grpc *ebpf.Map `ebpf:"ongoing_http2_grpc"` - OngoingHttpFallback *ebpf.Map `ebpf:"ongoing_http_fallback"` - PidCache *ebpf.Map `ebpf:"pid_cache"` - PidTidToConn *ebpf.Map `ebpf:"pid_tid_to_conn"` - ServerTraces *ebpf.Map `ebpf:"server_traces"` - SslToConn *ebpf.Map `ebpf:"ssl_to_conn"` - SslToPidTid *ebpf.Map `ebpf:"ssl_to_pid_tid"` - TpCharBufMem *ebpf.Map `ebpf:"tp_char_buf_mem"` - TpInfoMem *ebpf.Map `ebpf:"tp_info_mem"` - TraceMap *ebpf.Map `ebpf:"trace_map"` - ValidPids *ebpf.Map `ebpf:"valid_pids"` -} - -func (m *bpf_debugMaps) Close() error { - return _Bpf_debugClose( - m.ActiveSslHandshakes, - m.ActiveSslReadArgs, - m.ActiveSslWriteArgs, - m.CloneMap, - m.ConnectionMetaMem, - m.Events, - m.FilteredConnections, - m.Http2InfoMem, - m.HttpInfoMem, - m.OngoingHttp, - m.OngoingHttp2Connections, - m.OngoingHttp2Grpc, - m.OngoingHttpFallback, - m.PidCache, - m.PidTidToConn, - m.ServerTraces, - m.SslToConn, - m.SslToPidTid, - m.TpCharBufMem, - m.TpInfoMem, - m.TraceMap, - m.ValidPids, - ) -} - -// bpf_debugPrograms contains all programs after they have been loaded into the kernel. -// -// It can be passed to loadBpf_debugObjects or ebpf.CollectionSpec.LoadAndAssign. -type bpf_debugPrograms struct { - UprobeSslDoHandshake *ebpf.Program `ebpf:"uprobe_ssl_do_handshake"` - UprobeSslRead *ebpf.Program `ebpf:"uprobe_ssl_read"` - UprobeSslReadEx *ebpf.Program `ebpf:"uprobe_ssl_read_ex"` - UprobeSslShutdown *ebpf.Program `ebpf:"uprobe_ssl_shutdown"` - UprobeSslWrite *ebpf.Program `ebpf:"uprobe_ssl_write"` - UprobeSslWriteEx *ebpf.Program `ebpf:"uprobe_ssl_write_ex"` - UretprobeSslDoHandshake *ebpf.Program `ebpf:"uretprobe_ssl_do_handshake"` - UretprobeSslRead *ebpf.Program `ebpf:"uretprobe_ssl_read"` - UretprobeSslReadEx *ebpf.Program `ebpf:"uretprobe_ssl_read_ex"` - UretprobeSslWrite *ebpf.Program `ebpf:"uretprobe_ssl_write"` - UretprobeSslWriteEx *ebpf.Program `ebpf:"uretprobe_ssl_write_ex"` -} - -func (p *bpf_debugPrograms) Close() error { - return _Bpf_debugClose( - p.UprobeSslDoHandshake, - p.UprobeSslRead, - p.UprobeSslReadEx, - p.UprobeSslShutdown, - p.UprobeSslWrite, - p.UprobeSslWriteEx, - p.UretprobeSslDoHandshake, - p.UretprobeSslRead, - p.UretprobeSslReadEx, - p.UretprobeSslWrite, - p.UretprobeSslWriteEx, - ) -} - -func _Bpf_debugClose(closers ...io.Closer) error { - for _, closer := range closers { - if err := closer.Close(); err != nil { - return err - } - } - return nil -} - -// Do not access this directly. -// -//go:embed bpf_debug_bpfel_x86.o -var _Bpf_debugBytes []byte diff --git a/pkg/internal/ebpf/httpssl/bpf_debug_bpfel_x86.o b/pkg/internal/ebpf/httpssl/bpf_debug_bpfel_x86.o deleted file mode 100644 index ce6b5c199..000000000 Binary files a/pkg/internal/ebpf/httpssl/bpf_debug_bpfel_x86.o and /dev/null differ diff --git a/pkg/internal/ebpf/httpssl/bpf_tp_bpfel_arm64.go b/pkg/internal/ebpf/httpssl/bpf_tp_bpfel_arm64.go deleted file mode 100644 index a45aac967..000000000 --- a/pkg/internal/ebpf/httpssl/bpf_tp_bpfel_arm64.go +++ /dev/null @@ -1,319 +0,0 @@ -// Code generated by bpf2go; DO NOT EDIT. -//go:build arm64 - -package httpssl - -import ( - "bytes" - _ "embed" - "fmt" - "io" - - "github.com/cilium/ebpf" -) - -type bpf_tpConnectionInfoT struct { - S_addr [16]uint8 - D_addr [16]uint8 - S_port uint16 - D_port uint16 -} - -type bpf_tpHttp2ConnStreamT struct { - PidConn bpf_tpPidConnectionInfoT - StreamId uint32 -} - -type bpf_tpHttp2GrpcRequestT struct { - Flags uint8 - _ [1]byte - ConnInfo bpf_tpConnectionInfoT - Data [256]uint8 - RetData [64]uint8 - Type uint8 - _ [1]byte - Len int32 - _ [4]byte - StartMonotimeNs uint64 - EndMonotimeNs uint64 - Pid struct { - HostPid uint32 - UserPid uint32 - Ns uint32 - } - _ [4]byte - Tp struct { - TraceId [16]uint8 - SpanId [8]uint8 - ParentId [8]uint8 - Ts uint64 - Flags uint8 - _ [7]byte - } -} - -type bpf_tpHttpConnectionMetadataT struct { - Pid struct { - HostPid uint32 - UserPid uint32 - Ns uint32 - } - Type uint8 -} - -type bpf_tpHttpInfoT struct { - Flags uint8 - _ [1]byte - ConnInfo bpf_tpConnectionInfoT - _ [2]byte - StartMonotimeNs uint64 - EndMonotimeNs uint64 - Buf [160]uint8 - Len uint32 - RespLen uint32 - Status uint16 - Type uint8 - Ssl uint8 - Pid struct { - HostPid uint32 - UserPid uint32 - Ns uint32 - } - Tp struct { - TraceId [16]uint8 - SpanId [8]uint8 - ParentId [8]uint8 - Ts uint64 - Flags uint8 - _ [7]byte - } -} - -type bpf_tpPidConnectionInfoT struct { - Conn bpf_tpConnectionInfoT - Pid uint32 -} - -type bpf_tpPidKeyT struct { - Pid uint32 - Ns uint32 -} - -type bpf_tpSslArgsT struct { - Ssl uint64 - Buf uint64 - LenPtr uint64 -} - -type bpf_tpTpInfoPidT struct { - Tp struct { - TraceId [16]uint8 - SpanId [8]uint8 - ParentId [8]uint8 - Ts uint64 - Flags uint8 - _ [7]byte - } - Pid uint32 - Valid uint8 - _ [3]byte -} - -// loadBpf_tp returns the embedded CollectionSpec for bpf_tp. -func loadBpf_tp() (*ebpf.CollectionSpec, error) { - reader := bytes.NewReader(_Bpf_tpBytes) - spec, err := ebpf.LoadCollectionSpecFromReader(reader) - if err != nil { - return nil, fmt.Errorf("can't load bpf_tp: %w", err) - } - - return spec, err -} - -// loadBpf_tpObjects loads bpf_tp and converts it into a struct. -// -// The following types are suitable as obj argument: -// -// *bpf_tpObjects -// *bpf_tpPrograms -// *bpf_tpMaps -// -// See ebpf.CollectionSpec.LoadAndAssign documentation for details. -func loadBpf_tpObjects(obj interface{}, opts *ebpf.CollectionOptions) error { - spec, err := loadBpf_tp() - if err != nil { - return err - } - - return spec.LoadAndAssign(obj, opts) -} - -// bpf_tpSpecs contains maps and programs before they are loaded into the kernel. -// -// It can be passed ebpf.CollectionSpec.Assign. -type bpf_tpSpecs struct { - bpf_tpProgramSpecs - bpf_tpMapSpecs -} - -// bpf_tpSpecs contains programs before they are loaded into the kernel. -// -// It can be passed ebpf.CollectionSpec.Assign. -type bpf_tpProgramSpecs struct { - UprobeSslDoHandshake *ebpf.ProgramSpec `ebpf:"uprobe_ssl_do_handshake"` - UprobeSslRead *ebpf.ProgramSpec `ebpf:"uprobe_ssl_read"` - UprobeSslReadEx *ebpf.ProgramSpec `ebpf:"uprobe_ssl_read_ex"` - UprobeSslShutdown *ebpf.ProgramSpec `ebpf:"uprobe_ssl_shutdown"` - UprobeSslWrite *ebpf.ProgramSpec `ebpf:"uprobe_ssl_write"` - UprobeSslWriteEx *ebpf.ProgramSpec `ebpf:"uprobe_ssl_write_ex"` - UretprobeSslDoHandshake *ebpf.ProgramSpec `ebpf:"uretprobe_ssl_do_handshake"` - UretprobeSslRead *ebpf.ProgramSpec `ebpf:"uretprobe_ssl_read"` - UretprobeSslReadEx *ebpf.ProgramSpec `ebpf:"uretprobe_ssl_read_ex"` - UretprobeSslWrite *ebpf.ProgramSpec `ebpf:"uretprobe_ssl_write"` - UretprobeSslWriteEx *ebpf.ProgramSpec `ebpf:"uretprobe_ssl_write_ex"` -} - -// bpf_tpMapSpecs contains maps before they are loaded into the kernel. -// -// It can be passed ebpf.CollectionSpec.Assign. -type bpf_tpMapSpecs struct { - ActiveSslHandshakes *ebpf.MapSpec `ebpf:"active_ssl_handshakes"` - ActiveSslReadArgs *ebpf.MapSpec `ebpf:"active_ssl_read_args"` - ActiveSslWriteArgs *ebpf.MapSpec `ebpf:"active_ssl_write_args"` - CloneMap *ebpf.MapSpec `ebpf:"clone_map"` - ConnectionMetaMem *ebpf.MapSpec `ebpf:"connection_meta_mem"` - Events *ebpf.MapSpec `ebpf:"events"` - FilteredConnections *ebpf.MapSpec `ebpf:"filtered_connections"` - Http2InfoMem *ebpf.MapSpec `ebpf:"http2_info_mem"` - HttpInfoMem *ebpf.MapSpec `ebpf:"http_info_mem"` - OngoingHttp *ebpf.MapSpec `ebpf:"ongoing_http"` - OngoingHttp2Connections *ebpf.MapSpec `ebpf:"ongoing_http2_connections"` - OngoingHttp2Grpc *ebpf.MapSpec `ebpf:"ongoing_http2_grpc"` - OngoingHttpFallback *ebpf.MapSpec `ebpf:"ongoing_http_fallback"` - PidCache *ebpf.MapSpec `ebpf:"pid_cache"` - PidTidToConn *ebpf.MapSpec `ebpf:"pid_tid_to_conn"` - ServerTraces *ebpf.MapSpec `ebpf:"server_traces"` - SslToConn *ebpf.MapSpec `ebpf:"ssl_to_conn"` - SslToPidTid *ebpf.MapSpec `ebpf:"ssl_to_pid_tid"` - TpCharBufMem *ebpf.MapSpec `ebpf:"tp_char_buf_mem"` - TpInfoMem *ebpf.MapSpec `ebpf:"tp_info_mem"` - TraceMap *ebpf.MapSpec `ebpf:"trace_map"` - ValidPids *ebpf.MapSpec `ebpf:"valid_pids"` -} - -// bpf_tpObjects contains all objects after they have been loaded into the kernel. -// -// It can be passed to loadBpf_tpObjects or ebpf.CollectionSpec.LoadAndAssign. -type bpf_tpObjects struct { - bpf_tpPrograms - bpf_tpMaps -} - -func (o *bpf_tpObjects) Close() error { - return _Bpf_tpClose( - &o.bpf_tpPrograms, - &o.bpf_tpMaps, - ) -} - -// bpf_tpMaps contains all maps after they have been loaded into the kernel. -// -// It can be passed to loadBpf_tpObjects or ebpf.CollectionSpec.LoadAndAssign. -type bpf_tpMaps struct { - ActiveSslHandshakes *ebpf.Map `ebpf:"active_ssl_handshakes"` - ActiveSslReadArgs *ebpf.Map `ebpf:"active_ssl_read_args"` - ActiveSslWriteArgs *ebpf.Map `ebpf:"active_ssl_write_args"` - CloneMap *ebpf.Map `ebpf:"clone_map"` - ConnectionMetaMem *ebpf.Map `ebpf:"connection_meta_mem"` - Events *ebpf.Map `ebpf:"events"` - FilteredConnections *ebpf.Map `ebpf:"filtered_connections"` - Http2InfoMem *ebpf.Map `ebpf:"http2_info_mem"` - HttpInfoMem *ebpf.Map `ebpf:"http_info_mem"` - OngoingHttp *ebpf.Map `ebpf:"ongoing_http"` - OngoingHttp2Connections *ebpf.Map `ebpf:"ongoing_http2_connections"` - OngoingHttp2Grpc *ebpf.Map `ebpf:"ongoing_http2_grpc"` - OngoingHttpFallback *ebpf.Map `ebpf:"ongoing_http_fallback"` - PidCache *ebpf.Map `ebpf:"pid_cache"` - PidTidToConn *ebpf.Map `ebpf:"pid_tid_to_conn"` - ServerTraces *ebpf.Map `ebpf:"server_traces"` - SslToConn *ebpf.Map `ebpf:"ssl_to_conn"` - SslToPidTid *ebpf.Map `ebpf:"ssl_to_pid_tid"` - TpCharBufMem *ebpf.Map `ebpf:"tp_char_buf_mem"` - TpInfoMem *ebpf.Map `ebpf:"tp_info_mem"` - TraceMap *ebpf.Map `ebpf:"trace_map"` - ValidPids *ebpf.Map `ebpf:"valid_pids"` -} - -func (m *bpf_tpMaps) Close() error { - return _Bpf_tpClose( - m.ActiveSslHandshakes, - m.ActiveSslReadArgs, - m.ActiveSslWriteArgs, - m.CloneMap, - m.ConnectionMetaMem, - m.Events, - m.FilteredConnections, - m.Http2InfoMem, - m.HttpInfoMem, - m.OngoingHttp, - m.OngoingHttp2Connections, - m.OngoingHttp2Grpc, - m.OngoingHttpFallback, - m.PidCache, - m.PidTidToConn, - m.ServerTraces, - m.SslToConn, - m.SslToPidTid, - m.TpCharBufMem, - m.TpInfoMem, - m.TraceMap, - m.ValidPids, - ) -} - -// bpf_tpPrograms contains all programs after they have been loaded into the kernel. -// -// It can be passed to loadBpf_tpObjects or ebpf.CollectionSpec.LoadAndAssign. -type bpf_tpPrograms struct { - UprobeSslDoHandshake *ebpf.Program `ebpf:"uprobe_ssl_do_handshake"` - UprobeSslRead *ebpf.Program `ebpf:"uprobe_ssl_read"` - UprobeSslReadEx *ebpf.Program `ebpf:"uprobe_ssl_read_ex"` - UprobeSslShutdown *ebpf.Program `ebpf:"uprobe_ssl_shutdown"` - UprobeSslWrite *ebpf.Program `ebpf:"uprobe_ssl_write"` - UprobeSslWriteEx *ebpf.Program `ebpf:"uprobe_ssl_write_ex"` - UretprobeSslDoHandshake *ebpf.Program `ebpf:"uretprobe_ssl_do_handshake"` - UretprobeSslRead *ebpf.Program `ebpf:"uretprobe_ssl_read"` - UretprobeSslReadEx *ebpf.Program `ebpf:"uretprobe_ssl_read_ex"` - UretprobeSslWrite *ebpf.Program `ebpf:"uretprobe_ssl_write"` - UretprobeSslWriteEx *ebpf.Program `ebpf:"uretprobe_ssl_write_ex"` -} - -func (p *bpf_tpPrograms) Close() error { - return _Bpf_tpClose( - p.UprobeSslDoHandshake, - p.UprobeSslRead, - p.UprobeSslReadEx, - p.UprobeSslShutdown, - p.UprobeSslWrite, - p.UprobeSslWriteEx, - p.UretprobeSslDoHandshake, - p.UretprobeSslRead, - p.UretprobeSslReadEx, - p.UretprobeSslWrite, - p.UretprobeSslWriteEx, - ) -} - -func _Bpf_tpClose(closers ...io.Closer) error { - for _, closer := range closers { - if err := closer.Close(); err != nil { - return err - } - } - return nil -} - -// Do not access this directly. -// -//go:embed bpf_tp_bpfel_arm64.o -var _Bpf_tpBytes []byte diff --git a/pkg/internal/ebpf/httpssl/bpf_tp_bpfel_arm64.o b/pkg/internal/ebpf/httpssl/bpf_tp_bpfel_arm64.o deleted file mode 100644 index 4b8b8b930..000000000 Binary files a/pkg/internal/ebpf/httpssl/bpf_tp_bpfel_arm64.o and /dev/null differ diff --git a/pkg/internal/ebpf/httpssl/bpf_tp_bpfel_x86.go b/pkg/internal/ebpf/httpssl/bpf_tp_bpfel_x86.go deleted file mode 100644 index 871868033..000000000 --- a/pkg/internal/ebpf/httpssl/bpf_tp_bpfel_x86.go +++ /dev/null @@ -1,319 +0,0 @@ -// Code generated by bpf2go; DO NOT EDIT. -//go:build 386 || amd64 - -package httpssl - -import ( - "bytes" - _ "embed" - "fmt" - "io" - - "github.com/cilium/ebpf" -) - -type bpf_tpConnectionInfoT struct { - S_addr [16]uint8 - D_addr [16]uint8 - S_port uint16 - D_port uint16 -} - -type bpf_tpHttp2ConnStreamT struct { - PidConn bpf_tpPidConnectionInfoT - StreamId uint32 -} - -type bpf_tpHttp2GrpcRequestT struct { - Flags uint8 - _ [1]byte - ConnInfo bpf_tpConnectionInfoT - Data [256]uint8 - RetData [64]uint8 - Type uint8 - _ [1]byte - Len int32 - _ [4]byte - StartMonotimeNs uint64 - EndMonotimeNs uint64 - Pid struct { - HostPid uint32 - UserPid uint32 - Ns uint32 - } - _ [4]byte - Tp struct { - TraceId [16]uint8 - SpanId [8]uint8 - ParentId [8]uint8 - Ts uint64 - Flags uint8 - _ [7]byte - } -} - -type bpf_tpHttpConnectionMetadataT struct { - Pid struct { - HostPid uint32 - UserPid uint32 - Ns uint32 - } - Type uint8 -} - -type bpf_tpHttpInfoT struct { - Flags uint8 - _ [1]byte - ConnInfo bpf_tpConnectionInfoT - _ [2]byte - StartMonotimeNs uint64 - EndMonotimeNs uint64 - Buf [160]uint8 - Len uint32 - RespLen uint32 - Status uint16 - Type uint8 - Ssl uint8 - Pid struct { - HostPid uint32 - UserPid uint32 - Ns uint32 - } - Tp struct { - TraceId [16]uint8 - SpanId [8]uint8 - ParentId [8]uint8 - Ts uint64 - Flags uint8 - _ [7]byte - } -} - -type bpf_tpPidConnectionInfoT struct { - Conn bpf_tpConnectionInfoT - Pid uint32 -} - -type bpf_tpPidKeyT struct { - Pid uint32 - Ns uint32 -} - -type bpf_tpSslArgsT struct { - Ssl uint64 - Buf uint64 - LenPtr uint64 -} - -type bpf_tpTpInfoPidT struct { - Tp struct { - TraceId [16]uint8 - SpanId [8]uint8 - ParentId [8]uint8 - Ts uint64 - Flags uint8 - _ [7]byte - } - Pid uint32 - Valid uint8 - _ [3]byte -} - -// loadBpf_tp returns the embedded CollectionSpec for bpf_tp. -func loadBpf_tp() (*ebpf.CollectionSpec, error) { - reader := bytes.NewReader(_Bpf_tpBytes) - spec, err := ebpf.LoadCollectionSpecFromReader(reader) - if err != nil { - return nil, fmt.Errorf("can't load bpf_tp: %w", err) - } - - return spec, err -} - -// loadBpf_tpObjects loads bpf_tp and converts it into a struct. -// -// The following types are suitable as obj argument: -// -// *bpf_tpObjects -// *bpf_tpPrograms -// *bpf_tpMaps -// -// See ebpf.CollectionSpec.LoadAndAssign documentation for details. -func loadBpf_tpObjects(obj interface{}, opts *ebpf.CollectionOptions) error { - spec, err := loadBpf_tp() - if err != nil { - return err - } - - return spec.LoadAndAssign(obj, opts) -} - -// bpf_tpSpecs contains maps and programs before they are loaded into the kernel. -// -// It can be passed ebpf.CollectionSpec.Assign. -type bpf_tpSpecs struct { - bpf_tpProgramSpecs - bpf_tpMapSpecs -} - -// bpf_tpSpecs contains programs before they are loaded into the kernel. -// -// It can be passed ebpf.CollectionSpec.Assign. -type bpf_tpProgramSpecs struct { - UprobeSslDoHandshake *ebpf.ProgramSpec `ebpf:"uprobe_ssl_do_handshake"` - UprobeSslRead *ebpf.ProgramSpec `ebpf:"uprobe_ssl_read"` - UprobeSslReadEx *ebpf.ProgramSpec `ebpf:"uprobe_ssl_read_ex"` - UprobeSslShutdown *ebpf.ProgramSpec `ebpf:"uprobe_ssl_shutdown"` - UprobeSslWrite *ebpf.ProgramSpec `ebpf:"uprobe_ssl_write"` - UprobeSslWriteEx *ebpf.ProgramSpec `ebpf:"uprobe_ssl_write_ex"` - UretprobeSslDoHandshake *ebpf.ProgramSpec `ebpf:"uretprobe_ssl_do_handshake"` - UretprobeSslRead *ebpf.ProgramSpec `ebpf:"uretprobe_ssl_read"` - UretprobeSslReadEx *ebpf.ProgramSpec `ebpf:"uretprobe_ssl_read_ex"` - UretprobeSslWrite *ebpf.ProgramSpec `ebpf:"uretprobe_ssl_write"` - UretprobeSslWriteEx *ebpf.ProgramSpec `ebpf:"uretprobe_ssl_write_ex"` -} - -// bpf_tpMapSpecs contains maps before they are loaded into the kernel. -// -// It can be passed ebpf.CollectionSpec.Assign. -type bpf_tpMapSpecs struct { - ActiveSslHandshakes *ebpf.MapSpec `ebpf:"active_ssl_handshakes"` - ActiveSslReadArgs *ebpf.MapSpec `ebpf:"active_ssl_read_args"` - ActiveSslWriteArgs *ebpf.MapSpec `ebpf:"active_ssl_write_args"` - CloneMap *ebpf.MapSpec `ebpf:"clone_map"` - ConnectionMetaMem *ebpf.MapSpec `ebpf:"connection_meta_mem"` - Events *ebpf.MapSpec `ebpf:"events"` - FilteredConnections *ebpf.MapSpec `ebpf:"filtered_connections"` - Http2InfoMem *ebpf.MapSpec `ebpf:"http2_info_mem"` - HttpInfoMem *ebpf.MapSpec `ebpf:"http_info_mem"` - OngoingHttp *ebpf.MapSpec `ebpf:"ongoing_http"` - OngoingHttp2Connections *ebpf.MapSpec `ebpf:"ongoing_http2_connections"` - OngoingHttp2Grpc *ebpf.MapSpec `ebpf:"ongoing_http2_grpc"` - OngoingHttpFallback *ebpf.MapSpec `ebpf:"ongoing_http_fallback"` - PidCache *ebpf.MapSpec `ebpf:"pid_cache"` - PidTidToConn *ebpf.MapSpec `ebpf:"pid_tid_to_conn"` - ServerTraces *ebpf.MapSpec `ebpf:"server_traces"` - SslToConn *ebpf.MapSpec `ebpf:"ssl_to_conn"` - SslToPidTid *ebpf.MapSpec `ebpf:"ssl_to_pid_tid"` - TpCharBufMem *ebpf.MapSpec `ebpf:"tp_char_buf_mem"` - TpInfoMem *ebpf.MapSpec `ebpf:"tp_info_mem"` - TraceMap *ebpf.MapSpec `ebpf:"trace_map"` - ValidPids *ebpf.MapSpec `ebpf:"valid_pids"` -} - -// bpf_tpObjects contains all objects after they have been loaded into the kernel. -// -// It can be passed to loadBpf_tpObjects or ebpf.CollectionSpec.LoadAndAssign. -type bpf_tpObjects struct { - bpf_tpPrograms - bpf_tpMaps -} - -func (o *bpf_tpObjects) Close() error { - return _Bpf_tpClose( - &o.bpf_tpPrograms, - &o.bpf_tpMaps, - ) -} - -// bpf_tpMaps contains all maps after they have been loaded into the kernel. -// -// It can be passed to loadBpf_tpObjects or ebpf.CollectionSpec.LoadAndAssign. -type bpf_tpMaps struct { - ActiveSslHandshakes *ebpf.Map `ebpf:"active_ssl_handshakes"` - ActiveSslReadArgs *ebpf.Map `ebpf:"active_ssl_read_args"` - ActiveSslWriteArgs *ebpf.Map `ebpf:"active_ssl_write_args"` - CloneMap *ebpf.Map `ebpf:"clone_map"` - ConnectionMetaMem *ebpf.Map `ebpf:"connection_meta_mem"` - Events *ebpf.Map `ebpf:"events"` - FilteredConnections *ebpf.Map `ebpf:"filtered_connections"` - Http2InfoMem *ebpf.Map `ebpf:"http2_info_mem"` - HttpInfoMem *ebpf.Map `ebpf:"http_info_mem"` - OngoingHttp *ebpf.Map `ebpf:"ongoing_http"` - OngoingHttp2Connections *ebpf.Map `ebpf:"ongoing_http2_connections"` - OngoingHttp2Grpc *ebpf.Map `ebpf:"ongoing_http2_grpc"` - OngoingHttpFallback *ebpf.Map `ebpf:"ongoing_http_fallback"` - PidCache *ebpf.Map `ebpf:"pid_cache"` - PidTidToConn *ebpf.Map `ebpf:"pid_tid_to_conn"` - ServerTraces *ebpf.Map `ebpf:"server_traces"` - SslToConn *ebpf.Map `ebpf:"ssl_to_conn"` - SslToPidTid *ebpf.Map `ebpf:"ssl_to_pid_tid"` - TpCharBufMem *ebpf.Map `ebpf:"tp_char_buf_mem"` - TpInfoMem *ebpf.Map `ebpf:"tp_info_mem"` - TraceMap *ebpf.Map `ebpf:"trace_map"` - ValidPids *ebpf.Map `ebpf:"valid_pids"` -} - -func (m *bpf_tpMaps) Close() error { - return _Bpf_tpClose( - m.ActiveSslHandshakes, - m.ActiveSslReadArgs, - m.ActiveSslWriteArgs, - m.CloneMap, - m.ConnectionMetaMem, - m.Events, - m.FilteredConnections, - m.Http2InfoMem, - m.HttpInfoMem, - m.OngoingHttp, - m.OngoingHttp2Connections, - m.OngoingHttp2Grpc, - m.OngoingHttpFallback, - m.PidCache, - m.PidTidToConn, - m.ServerTraces, - m.SslToConn, - m.SslToPidTid, - m.TpCharBufMem, - m.TpInfoMem, - m.TraceMap, - m.ValidPids, - ) -} - -// bpf_tpPrograms contains all programs after they have been loaded into the kernel. -// -// It can be passed to loadBpf_tpObjects or ebpf.CollectionSpec.LoadAndAssign. -type bpf_tpPrograms struct { - UprobeSslDoHandshake *ebpf.Program `ebpf:"uprobe_ssl_do_handshake"` - UprobeSslRead *ebpf.Program `ebpf:"uprobe_ssl_read"` - UprobeSslReadEx *ebpf.Program `ebpf:"uprobe_ssl_read_ex"` - UprobeSslShutdown *ebpf.Program `ebpf:"uprobe_ssl_shutdown"` - UprobeSslWrite *ebpf.Program `ebpf:"uprobe_ssl_write"` - UprobeSslWriteEx *ebpf.Program `ebpf:"uprobe_ssl_write_ex"` - UretprobeSslDoHandshake *ebpf.Program `ebpf:"uretprobe_ssl_do_handshake"` - UretprobeSslRead *ebpf.Program `ebpf:"uretprobe_ssl_read"` - UretprobeSslReadEx *ebpf.Program `ebpf:"uretprobe_ssl_read_ex"` - UretprobeSslWrite *ebpf.Program `ebpf:"uretprobe_ssl_write"` - UretprobeSslWriteEx *ebpf.Program `ebpf:"uretprobe_ssl_write_ex"` -} - -func (p *bpf_tpPrograms) Close() error { - return _Bpf_tpClose( - p.UprobeSslDoHandshake, - p.UprobeSslRead, - p.UprobeSslReadEx, - p.UprobeSslShutdown, - p.UprobeSslWrite, - p.UprobeSslWriteEx, - p.UretprobeSslDoHandshake, - p.UretprobeSslRead, - p.UretprobeSslReadEx, - p.UretprobeSslWrite, - p.UretprobeSslWriteEx, - ) -} - -func _Bpf_tpClose(closers ...io.Closer) error { - for _, closer := range closers { - if err := closer.Close(); err != nil { - return err - } - } - return nil -} - -// Do not access this directly. -// -//go:embed bpf_tp_bpfel_x86.o -var _Bpf_tpBytes []byte diff --git a/pkg/internal/ebpf/httpssl/bpf_tp_bpfel_x86.o b/pkg/internal/ebpf/httpssl/bpf_tp_bpfel_x86.o deleted file mode 100644 index 4206ee4f7..000000000 Binary files a/pkg/internal/ebpf/httpssl/bpf_tp_bpfel_x86.o and /dev/null differ diff --git a/pkg/internal/ebpf/httpssl/bpf_tp_debug_bpfel_arm64.go b/pkg/internal/ebpf/httpssl/bpf_tp_debug_bpfel_arm64.go deleted file mode 100644 index ce6660980..000000000 --- a/pkg/internal/ebpf/httpssl/bpf_tp_debug_bpfel_arm64.go +++ /dev/null @@ -1,319 +0,0 @@ -// Code generated by bpf2go; DO NOT EDIT. -//go:build arm64 - -package httpssl - -import ( - "bytes" - _ "embed" - "fmt" - "io" - - "github.com/cilium/ebpf" -) - -type bpf_tp_debugConnectionInfoT struct { - S_addr [16]uint8 - D_addr [16]uint8 - S_port uint16 - D_port uint16 -} - -type bpf_tp_debugHttp2ConnStreamT struct { - PidConn bpf_tp_debugPidConnectionInfoT - StreamId uint32 -} - -type bpf_tp_debugHttp2GrpcRequestT struct { - Flags uint8 - _ [1]byte - ConnInfo bpf_tp_debugConnectionInfoT - Data [256]uint8 - RetData [64]uint8 - Type uint8 - _ [1]byte - Len int32 - _ [4]byte - StartMonotimeNs uint64 - EndMonotimeNs uint64 - Pid struct { - HostPid uint32 - UserPid uint32 - Ns uint32 - } - _ [4]byte - Tp struct { - TraceId [16]uint8 - SpanId [8]uint8 - ParentId [8]uint8 - Ts uint64 - Flags uint8 - _ [7]byte - } -} - -type bpf_tp_debugHttpConnectionMetadataT struct { - Pid struct { - HostPid uint32 - UserPid uint32 - Ns uint32 - } - Type uint8 -} - -type bpf_tp_debugHttpInfoT struct { - Flags uint8 - _ [1]byte - ConnInfo bpf_tp_debugConnectionInfoT - _ [2]byte - StartMonotimeNs uint64 - EndMonotimeNs uint64 - Buf [160]uint8 - Len uint32 - RespLen uint32 - Status uint16 - Type uint8 - Ssl uint8 - Pid struct { - HostPid uint32 - UserPid uint32 - Ns uint32 - } - Tp struct { - TraceId [16]uint8 - SpanId [8]uint8 - ParentId [8]uint8 - Ts uint64 - Flags uint8 - _ [7]byte - } -} - -type bpf_tp_debugPidConnectionInfoT struct { - Conn bpf_tp_debugConnectionInfoT - Pid uint32 -} - -type bpf_tp_debugPidKeyT struct { - Pid uint32 - Ns uint32 -} - -type bpf_tp_debugSslArgsT struct { - Ssl uint64 - Buf uint64 - LenPtr uint64 -} - -type bpf_tp_debugTpInfoPidT struct { - Tp struct { - TraceId [16]uint8 - SpanId [8]uint8 - ParentId [8]uint8 - Ts uint64 - Flags uint8 - _ [7]byte - } - Pid uint32 - Valid uint8 - _ [3]byte -} - -// loadBpf_tp_debug returns the embedded CollectionSpec for bpf_tp_debug. -func loadBpf_tp_debug() (*ebpf.CollectionSpec, error) { - reader := bytes.NewReader(_Bpf_tp_debugBytes) - spec, err := ebpf.LoadCollectionSpecFromReader(reader) - if err != nil { - return nil, fmt.Errorf("can't load bpf_tp_debug: %w", err) - } - - return spec, err -} - -// loadBpf_tp_debugObjects loads bpf_tp_debug and converts it into a struct. -// -// The following types are suitable as obj argument: -// -// *bpf_tp_debugObjects -// *bpf_tp_debugPrograms -// *bpf_tp_debugMaps -// -// See ebpf.CollectionSpec.LoadAndAssign documentation for details. -func loadBpf_tp_debugObjects(obj interface{}, opts *ebpf.CollectionOptions) error { - spec, err := loadBpf_tp_debug() - if err != nil { - return err - } - - return spec.LoadAndAssign(obj, opts) -} - -// bpf_tp_debugSpecs contains maps and programs before they are loaded into the kernel. -// -// It can be passed ebpf.CollectionSpec.Assign. -type bpf_tp_debugSpecs struct { - bpf_tp_debugProgramSpecs - bpf_tp_debugMapSpecs -} - -// bpf_tp_debugSpecs contains programs before they are loaded into the kernel. -// -// It can be passed ebpf.CollectionSpec.Assign. -type bpf_tp_debugProgramSpecs struct { - UprobeSslDoHandshake *ebpf.ProgramSpec `ebpf:"uprobe_ssl_do_handshake"` - UprobeSslRead *ebpf.ProgramSpec `ebpf:"uprobe_ssl_read"` - UprobeSslReadEx *ebpf.ProgramSpec `ebpf:"uprobe_ssl_read_ex"` - UprobeSslShutdown *ebpf.ProgramSpec `ebpf:"uprobe_ssl_shutdown"` - UprobeSslWrite *ebpf.ProgramSpec `ebpf:"uprobe_ssl_write"` - UprobeSslWriteEx *ebpf.ProgramSpec `ebpf:"uprobe_ssl_write_ex"` - UretprobeSslDoHandshake *ebpf.ProgramSpec `ebpf:"uretprobe_ssl_do_handshake"` - UretprobeSslRead *ebpf.ProgramSpec `ebpf:"uretprobe_ssl_read"` - UretprobeSslReadEx *ebpf.ProgramSpec `ebpf:"uretprobe_ssl_read_ex"` - UretprobeSslWrite *ebpf.ProgramSpec `ebpf:"uretprobe_ssl_write"` - UretprobeSslWriteEx *ebpf.ProgramSpec `ebpf:"uretprobe_ssl_write_ex"` -} - -// bpf_tp_debugMapSpecs contains maps before they are loaded into the kernel. -// -// It can be passed ebpf.CollectionSpec.Assign. -type bpf_tp_debugMapSpecs struct { - ActiveSslHandshakes *ebpf.MapSpec `ebpf:"active_ssl_handshakes"` - ActiveSslReadArgs *ebpf.MapSpec `ebpf:"active_ssl_read_args"` - ActiveSslWriteArgs *ebpf.MapSpec `ebpf:"active_ssl_write_args"` - CloneMap *ebpf.MapSpec `ebpf:"clone_map"` - ConnectionMetaMem *ebpf.MapSpec `ebpf:"connection_meta_mem"` - Events *ebpf.MapSpec `ebpf:"events"` - FilteredConnections *ebpf.MapSpec `ebpf:"filtered_connections"` - Http2InfoMem *ebpf.MapSpec `ebpf:"http2_info_mem"` - HttpInfoMem *ebpf.MapSpec `ebpf:"http_info_mem"` - OngoingHttp *ebpf.MapSpec `ebpf:"ongoing_http"` - OngoingHttp2Connections *ebpf.MapSpec `ebpf:"ongoing_http2_connections"` - OngoingHttp2Grpc *ebpf.MapSpec `ebpf:"ongoing_http2_grpc"` - OngoingHttpFallback *ebpf.MapSpec `ebpf:"ongoing_http_fallback"` - PidCache *ebpf.MapSpec `ebpf:"pid_cache"` - PidTidToConn *ebpf.MapSpec `ebpf:"pid_tid_to_conn"` - ServerTraces *ebpf.MapSpec `ebpf:"server_traces"` - SslToConn *ebpf.MapSpec `ebpf:"ssl_to_conn"` - SslToPidTid *ebpf.MapSpec `ebpf:"ssl_to_pid_tid"` - TpCharBufMem *ebpf.MapSpec `ebpf:"tp_char_buf_mem"` - TpInfoMem *ebpf.MapSpec `ebpf:"tp_info_mem"` - TraceMap *ebpf.MapSpec `ebpf:"trace_map"` - ValidPids *ebpf.MapSpec `ebpf:"valid_pids"` -} - -// bpf_tp_debugObjects contains all objects after they have been loaded into the kernel. -// -// It can be passed to loadBpf_tp_debugObjects or ebpf.CollectionSpec.LoadAndAssign. -type bpf_tp_debugObjects struct { - bpf_tp_debugPrograms - bpf_tp_debugMaps -} - -func (o *bpf_tp_debugObjects) Close() error { - return _Bpf_tp_debugClose( - &o.bpf_tp_debugPrograms, - &o.bpf_tp_debugMaps, - ) -} - -// bpf_tp_debugMaps contains all maps after they have been loaded into the kernel. -// -// It can be passed to loadBpf_tp_debugObjects or ebpf.CollectionSpec.LoadAndAssign. -type bpf_tp_debugMaps struct { - ActiveSslHandshakes *ebpf.Map `ebpf:"active_ssl_handshakes"` - ActiveSslReadArgs *ebpf.Map `ebpf:"active_ssl_read_args"` - ActiveSslWriteArgs *ebpf.Map `ebpf:"active_ssl_write_args"` - CloneMap *ebpf.Map `ebpf:"clone_map"` - ConnectionMetaMem *ebpf.Map `ebpf:"connection_meta_mem"` - Events *ebpf.Map `ebpf:"events"` - FilteredConnections *ebpf.Map `ebpf:"filtered_connections"` - Http2InfoMem *ebpf.Map `ebpf:"http2_info_mem"` - HttpInfoMem *ebpf.Map `ebpf:"http_info_mem"` - OngoingHttp *ebpf.Map `ebpf:"ongoing_http"` - OngoingHttp2Connections *ebpf.Map `ebpf:"ongoing_http2_connections"` - OngoingHttp2Grpc *ebpf.Map `ebpf:"ongoing_http2_grpc"` - OngoingHttpFallback *ebpf.Map `ebpf:"ongoing_http_fallback"` - PidCache *ebpf.Map `ebpf:"pid_cache"` - PidTidToConn *ebpf.Map `ebpf:"pid_tid_to_conn"` - ServerTraces *ebpf.Map `ebpf:"server_traces"` - SslToConn *ebpf.Map `ebpf:"ssl_to_conn"` - SslToPidTid *ebpf.Map `ebpf:"ssl_to_pid_tid"` - TpCharBufMem *ebpf.Map `ebpf:"tp_char_buf_mem"` - TpInfoMem *ebpf.Map `ebpf:"tp_info_mem"` - TraceMap *ebpf.Map `ebpf:"trace_map"` - ValidPids *ebpf.Map `ebpf:"valid_pids"` -} - -func (m *bpf_tp_debugMaps) Close() error { - return _Bpf_tp_debugClose( - m.ActiveSslHandshakes, - m.ActiveSslReadArgs, - m.ActiveSslWriteArgs, - m.CloneMap, - m.ConnectionMetaMem, - m.Events, - m.FilteredConnections, - m.Http2InfoMem, - m.HttpInfoMem, - m.OngoingHttp, - m.OngoingHttp2Connections, - m.OngoingHttp2Grpc, - m.OngoingHttpFallback, - m.PidCache, - m.PidTidToConn, - m.ServerTraces, - m.SslToConn, - m.SslToPidTid, - m.TpCharBufMem, - m.TpInfoMem, - m.TraceMap, - m.ValidPids, - ) -} - -// bpf_tp_debugPrograms contains all programs after they have been loaded into the kernel. -// -// It can be passed to loadBpf_tp_debugObjects or ebpf.CollectionSpec.LoadAndAssign. -type bpf_tp_debugPrograms struct { - UprobeSslDoHandshake *ebpf.Program `ebpf:"uprobe_ssl_do_handshake"` - UprobeSslRead *ebpf.Program `ebpf:"uprobe_ssl_read"` - UprobeSslReadEx *ebpf.Program `ebpf:"uprobe_ssl_read_ex"` - UprobeSslShutdown *ebpf.Program `ebpf:"uprobe_ssl_shutdown"` - UprobeSslWrite *ebpf.Program `ebpf:"uprobe_ssl_write"` - UprobeSslWriteEx *ebpf.Program `ebpf:"uprobe_ssl_write_ex"` - UretprobeSslDoHandshake *ebpf.Program `ebpf:"uretprobe_ssl_do_handshake"` - UretprobeSslRead *ebpf.Program `ebpf:"uretprobe_ssl_read"` - UretprobeSslReadEx *ebpf.Program `ebpf:"uretprobe_ssl_read_ex"` - UretprobeSslWrite *ebpf.Program `ebpf:"uretprobe_ssl_write"` - UretprobeSslWriteEx *ebpf.Program `ebpf:"uretprobe_ssl_write_ex"` -} - -func (p *bpf_tp_debugPrograms) Close() error { - return _Bpf_tp_debugClose( - p.UprobeSslDoHandshake, - p.UprobeSslRead, - p.UprobeSslReadEx, - p.UprobeSslShutdown, - p.UprobeSslWrite, - p.UprobeSslWriteEx, - p.UretprobeSslDoHandshake, - p.UretprobeSslRead, - p.UretprobeSslReadEx, - p.UretprobeSslWrite, - p.UretprobeSslWriteEx, - ) -} - -func _Bpf_tp_debugClose(closers ...io.Closer) error { - for _, closer := range closers { - if err := closer.Close(); err != nil { - return err - } - } - return nil -} - -// Do not access this directly. -// -//go:embed bpf_tp_debug_bpfel_arm64.o -var _Bpf_tp_debugBytes []byte diff --git a/pkg/internal/ebpf/httpssl/bpf_tp_debug_bpfel_arm64.o b/pkg/internal/ebpf/httpssl/bpf_tp_debug_bpfel_arm64.o deleted file mode 100644 index a3944b4f2..000000000 Binary files a/pkg/internal/ebpf/httpssl/bpf_tp_debug_bpfel_arm64.o and /dev/null differ diff --git a/pkg/internal/ebpf/httpssl/bpf_tp_debug_bpfel_x86.go b/pkg/internal/ebpf/httpssl/bpf_tp_debug_bpfel_x86.go deleted file mode 100644 index 9fa0a2507..000000000 --- a/pkg/internal/ebpf/httpssl/bpf_tp_debug_bpfel_x86.go +++ /dev/null @@ -1,319 +0,0 @@ -// Code generated by bpf2go; DO NOT EDIT. -//go:build 386 || amd64 - -package httpssl - -import ( - "bytes" - _ "embed" - "fmt" - "io" - - "github.com/cilium/ebpf" -) - -type bpf_tp_debugConnectionInfoT struct { - S_addr [16]uint8 - D_addr [16]uint8 - S_port uint16 - D_port uint16 -} - -type bpf_tp_debugHttp2ConnStreamT struct { - PidConn bpf_tp_debugPidConnectionInfoT - StreamId uint32 -} - -type bpf_tp_debugHttp2GrpcRequestT struct { - Flags uint8 - _ [1]byte - ConnInfo bpf_tp_debugConnectionInfoT - Data [256]uint8 - RetData [64]uint8 - Type uint8 - _ [1]byte - Len int32 - _ [4]byte - StartMonotimeNs uint64 - EndMonotimeNs uint64 - Pid struct { - HostPid uint32 - UserPid uint32 - Ns uint32 - } - _ [4]byte - Tp struct { - TraceId [16]uint8 - SpanId [8]uint8 - ParentId [8]uint8 - Ts uint64 - Flags uint8 - _ [7]byte - } -} - -type bpf_tp_debugHttpConnectionMetadataT struct { - Pid struct { - HostPid uint32 - UserPid uint32 - Ns uint32 - } - Type uint8 -} - -type bpf_tp_debugHttpInfoT struct { - Flags uint8 - _ [1]byte - ConnInfo bpf_tp_debugConnectionInfoT - _ [2]byte - StartMonotimeNs uint64 - EndMonotimeNs uint64 - Buf [160]uint8 - Len uint32 - RespLen uint32 - Status uint16 - Type uint8 - Ssl uint8 - Pid struct { - HostPid uint32 - UserPid uint32 - Ns uint32 - } - Tp struct { - TraceId [16]uint8 - SpanId [8]uint8 - ParentId [8]uint8 - Ts uint64 - Flags uint8 - _ [7]byte - } -} - -type bpf_tp_debugPidConnectionInfoT struct { - Conn bpf_tp_debugConnectionInfoT - Pid uint32 -} - -type bpf_tp_debugPidKeyT struct { - Pid uint32 - Ns uint32 -} - -type bpf_tp_debugSslArgsT struct { - Ssl uint64 - Buf uint64 - LenPtr uint64 -} - -type bpf_tp_debugTpInfoPidT struct { - Tp struct { - TraceId [16]uint8 - SpanId [8]uint8 - ParentId [8]uint8 - Ts uint64 - Flags uint8 - _ [7]byte - } - Pid uint32 - Valid uint8 - _ [3]byte -} - -// loadBpf_tp_debug returns the embedded CollectionSpec for bpf_tp_debug. -func loadBpf_tp_debug() (*ebpf.CollectionSpec, error) { - reader := bytes.NewReader(_Bpf_tp_debugBytes) - spec, err := ebpf.LoadCollectionSpecFromReader(reader) - if err != nil { - return nil, fmt.Errorf("can't load bpf_tp_debug: %w", err) - } - - return spec, err -} - -// loadBpf_tp_debugObjects loads bpf_tp_debug and converts it into a struct. -// -// The following types are suitable as obj argument: -// -// *bpf_tp_debugObjects -// *bpf_tp_debugPrograms -// *bpf_tp_debugMaps -// -// See ebpf.CollectionSpec.LoadAndAssign documentation for details. -func loadBpf_tp_debugObjects(obj interface{}, opts *ebpf.CollectionOptions) error { - spec, err := loadBpf_tp_debug() - if err != nil { - return err - } - - return spec.LoadAndAssign(obj, opts) -} - -// bpf_tp_debugSpecs contains maps and programs before they are loaded into the kernel. -// -// It can be passed ebpf.CollectionSpec.Assign. -type bpf_tp_debugSpecs struct { - bpf_tp_debugProgramSpecs - bpf_tp_debugMapSpecs -} - -// bpf_tp_debugSpecs contains programs before they are loaded into the kernel. -// -// It can be passed ebpf.CollectionSpec.Assign. -type bpf_tp_debugProgramSpecs struct { - UprobeSslDoHandshake *ebpf.ProgramSpec `ebpf:"uprobe_ssl_do_handshake"` - UprobeSslRead *ebpf.ProgramSpec `ebpf:"uprobe_ssl_read"` - UprobeSslReadEx *ebpf.ProgramSpec `ebpf:"uprobe_ssl_read_ex"` - UprobeSslShutdown *ebpf.ProgramSpec `ebpf:"uprobe_ssl_shutdown"` - UprobeSslWrite *ebpf.ProgramSpec `ebpf:"uprobe_ssl_write"` - UprobeSslWriteEx *ebpf.ProgramSpec `ebpf:"uprobe_ssl_write_ex"` - UretprobeSslDoHandshake *ebpf.ProgramSpec `ebpf:"uretprobe_ssl_do_handshake"` - UretprobeSslRead *ebpf.ProgramSpec `ebpf:"uretprobe_ssl_read"` - UretprobeSslReadEx *ebpf.ProgramSpec `ebpf:"uretprobe_ssl_read_ex"` - UretprobeSslWrite *ebpf.ProgramSpec `ebpf:"uretprobe_ssl_write"` - UretprobeSslWriteEx *ebpf.ProgramSpec `ebpf:"uretprobe_ssl_write_ex"` -} - -// bpf_tp_debugMapSpecs contains maps before they are loaded into the kernel. -// -// It can be passed ebpf.CollectionSpec.Assign. -type bpf_tp_debugMapSpecs struct { - ActiveSslHandshakes *ebpf.MapSpec `ebpf:"active_ssl_handshakes"` - ActiveSslReadArgs *ebpf.MapSpec `ebpf:"active_ssl_read_args"` - ActiveSslWriteArgs *ebpf.MapSpec `ebpf:"active_ssl_write_args"` - CloneMap *ebpf.MapSpec `ebpf:"clone_map"` - ConnectionMetaMem *ebpf.MapSpec `ebpf:"connection_meta_mem"` - Events *ebpf.MapSpec `ebpf:"events"` - FilteredConnections *ebpf.MapSpec `ebpf:"filtered_connections"` - Http2InfoMem *ebpf.MapSpec `ebpf:"http2_info_mem"` - HttpInfoMem *ebpf.MapSpec `ebpf:"http_info_mem"` - OngoingHttp *ebpf.MapSpec `ebpf:"ongoing_http"` - OngoingHttp2Connections *ebpf.MapSpec `ebpf:"ongoing_http2_connections"` - OngoingHttp2Grpc *ebpf.MapSpec `ebpf:"ongoing_http2_grpc"` - OngoingHttpFallback *ebpf.MapSpec `ebpf:"ongoing_http_fallback"` - PidCache *ebpf.MapSpec `ebpf:"pid_cache"` - PidTidToConn *ebpf.MapSpec `ebpf:"pid_tid_to_conn"` - ServerTraces *ebpf.MapSpec `ebpf:"server_traces"` - SslToConn *ebpf.MapSpec `ebpf:"ssl_to_conn"` - SslToPidTid *ebpf.MapSpec `ebpf:"ssl_to_pid_tid"` - TpCharBufMem *ebpf.MapSpec `ebpf:"tp_char_buf_mem"` - TpInfoMem *ebpf.MapSpec `ebpf:"tp_info_mem"` - TraceMap *ebpf.MapSpec `ebpf:"trace_map"` - ValidPids *ebpf.MapSpec `ebpf:"valid_pids"` -} - -// bpf_tp_debugObjects contains all objects after they have been loaded into the kernel. -// -// It can be passed to loadBpf_tp_debugObjects or ebpf.CollectionSpec.LoadAndAssign. -type bpf_tp_debugObjects struct { - bpf_tp_debugPrograms - bpf_tp_debugMaps -} - -func (o *bpf_tp_debugObjects) Close() error { - return _Bpf_tp_debugClose( - &o.bpf_tp_debugPrograms, - &o.bpf_tp_debugMaps, - ) -} - -// bpf_tp_debugMaps contains all maps after they have been loaded into the kernel. -// -// It can be passed to loadBpf_tp_debugObjects or ebpf.CollectionSpec.LoadAndAssign. -type bpf_tp_debugMaps struct { - ActiveSslHandshakes *ebpf.Map `ebpf:"active_ssl_handshakes"` - ActiveSslReadArgs *ebpf.Map `ebpf:"active_ssl_read_args"` - ActiveSslWriteArgs *ebpf.Map `ebpf:"active_ssl_write_args"` - CloneMap *ebpf.Map `ebpf:"clone_map"` - ConnectionMetaMem *ebpf.Map `ebpf:"connection_meta_mem"` - Events *ebpf.Map `ebpf:"events"` - FilteredConnections *ebpf.Map `ebpf:"filtered_connections"` - Http2InfoMem *ebpf.Map `ebpf:"http2_info_mem"` - HttpInfoMem *ebpf.Map `ebpf:"http_info_mem"` - OngoingHttp *ebpf.Map `ebpf:"ongoing_http"` - OngoingHttp2Connections *ebpf.Map `ebpf:"ongoing_http2_connections"` - OngoingHttp2Grpc *ebpf.Map `ebpf:"ongoing_http2_grpc"` - OngoingHttpFallback *ebpf.Map `ebpf:"ongoing_http_fallback"` - PidCache *ebpf.Map `ebpf:"pid_cache"` - PidTidToConn *ebpf.Map `ebpf:"pid_tid_to_conn"` - ServerTraces *ebpf.Map `ebpf:"server_traces"` - SslToConn *ebpf.Map `ebpf:"ssl_to_conn"` - SslToPidTid *ebpf.Map `ebpf:"ssl_to_pid_tid"` - TpCharBufMem *ebpf.Map `ebpf:"tp_char_buf_mem"` - TpInfoMem *ebpf.Map `ebpf:"tp_info_mem"` - TraceMap *ebpf.Map `ebpf:"trace_map"` - ValidPids *ebpf.Map `ebpf:"valid_pids"` -} - -func (m *bpf_tp_debugMaps) Close() error { - return _Bpf_tp_debugClose( - m.ActiveSslHandshakes, - m.ActiveSslReadArgs, - m.ActiveSslWriteArgs, - m.CloneMap, - m.ConnectionMetaMem, - m.Events, - m.FilteredConnections, - m.Http2InfoMem, - m.HttpInfoMem, - m.OngoingHttp, - m.OngoingHttp2Connections, - m.OngoingHttp2Grpc, - m.OngoingHttpFallback, - m.PidCache, - m.PidTidToConn, - m.ServerTraces, - m.SslToConn, - m.SslToPidTid, - m.TpCharBufMem, - m.TpInfoMem, - m.TraceMap, - m.ValidPids, - ) -} - -// bpf_tp_debugPrograms contains all programs after they have been loaded into the kernel. -// -// It can be passed to loadBpf_tp_debugObjects or ebpf.CollectionSpec.LoadAndAssign. -type bpf_tp_debugPrograms struct { - UprobeSslDoHandshake *ebpf.Program `ebpf:"uprobe_ssl_do_handshake"` - UprobeSslRead *ebpf.Program `ebpf:"uprobe_ssl_read"` - UprobeSslReadEx *ebpf.Program `ebpf:"uprobe_ssl_read_ex"` - UprobeSslShutdown *ebpf.Program `ebpf:"uprobe_ssl_shutdown"` - UprobeSslWrite *ebpf.Program `ebpf:"uprobe_ssl_write"` - UprobeSslWriteEx *ebpf.Program `ebpf:"uprobe_ssl_write_ex"` - UretprobeSslDoHandshake *ebpf.Program `ebpf:"uretprobe_ssl_do_handshake"` - UretprobeSslRead *ebpf.Program `ebpf:"uretprobe_ssl_read"` - UretprobeSslReadEx *ebpf.Program `ebpf:"uretprobe_ssl_read_ex"` - UretprobeSslWrite *ebpf.Program `ebpf:"uretprobe_ssl_write"` - UretprobeSslWriteEx *ebpf.Program `ebpf:"uretprobe_ssl_write_ex"` -} - -func (p *bpf_tp_debugPrograms) Close() error { - return _Bpf_tp_debugClose( - p.UprobeSslDoHandshake, - p.UprobeSslRead, - p.UprobeSslReadEx, - p.UprobeSslShutdown, - p.UprobeSslWrite, - p.UprobeSslWriteEx, - p.UretprobeSslDoHandshake, - p.UretprobeSslRead, - p.UretprobeSslReadEx, - p.UretprobeSslWrite, - p.UretprobeSslWriteEx, - ) -} - -func _Bpf_tp_debugClose(closers ...io.Closer) error { - for _, closer := range closers { - if err := closer.Close(); err != nil { - return err - } - } - return nil -} - -// Do not access this directly. -// -//go:embed bpf_tp_debug_bpfel_x86.o -var _Bpf_tp_debugBytes []byte diff --git a/pkg/internal/ebpf/httpssl/bpf_tp_debug_bpfel_x86.o b/pkg/internal/ebpf/httpssl/bpf_tp_debug_bpfel_x86.o deleted file mode 100644 index 95b7d39b5..000000000 Binary files a/pkg/internal/ebpf/httpssl/bpf_tp_debug_bpfel_x86.o and /dev/null differ diff --git a/pkg/internal/ebpf/nethttp/bpf_bpfel_arm64.go b/pkg/internal/ebpf/nethttp/bpf_bpfel_arm64.go deleted file mode 100644 index 93f9d6317..000000000 --- a/pkg/internal/ebpf/nethttp/bpf_bpfel_arm64.go +++ /dev/null @@ -1,262 +0,0 @@ -// Code generated by bpf2go; DO NOT EDIT. -//go:build arm64 - -package nethttp - -import ( - "bytes" - _ "embed" - "fmt" - "io" - - "github.com/cilium/ebpf" -) - -type bpfConnectionInfoT struct { - S_addr [16]uint8 - D_addr [16]uint8 - S_port uint16 - D_port uint16 -} - -type bpfGoroutineMetadata struct { - Parent uint64 - Timestamp uint64 -} - -type bpfHttpClientDataT struct { - Method [7]uint8 - Path [100]uint8 - _ [5]byte - ContentLength int64 - Pid struct { - HostPid uint32 - UserPid uint32 - Ns uint32 - } - _ [4]byte -} - -type bpfHttpFuncInvocationT struct { - StartMonotimeNs uint64 - Tp bpfTpInfoT -} - -type bpfServerHttpFuncInvocationT struct { - StartMonotimeNs uint64 - Tp bpfTpInfoT - Response uint64 - Method [7]uint8 - Path [100]uint8 - _ [5]byte - ContentLength uint64 - Http2 uint8 - _ [7]byte -} - -type bpfSqlFuncInvocationT struct { - StartMonotimeNs uint64 - SqlParam uint64 - QueryLen uint64 - Tp bpfTpInfoT -} - -type bpfTpInfoPidT struct { - Tp bpfTpInfoT - Pid uint32 - Valid uint8 - _ [3]byte -} - -type bpfTpInfoT struct { - TraceId [16]uint8 - SpanId [8]uint8 - ParentId [8]uint8 - Ts uint64 - Flags uint8 - _ [7]byte -} - -// loadBpf returns the embedded CollectionSpec for bpf. -func loadBpf() (*ebpf.CollectionSpec, error) { - reader := bytes.NewReader(_BpfBytes) - spec, err := ebpf.LoadCollectionSpecFromReader(reader) - if err != nil { - return nil, fmt.Errorf("can't load bpf: %w", err) - } - - return spec, err -} - -// loadBpfObjects loads bpf and converts it into a struct. -// -// The following types are suitable as obj argument: -// -// *bpfObjects -// *bpfPrograms -// *bpfMaps -// -// See ebpf.CollectionSpec.LoadAndAssign documentation for details. -func loadBpfObjects(obj interface{}, opts *ebpf.CollectionOptions) error { - spec, err := loadBpf() - if err != nil { - return err - } - - return spec.LoadAndAssign(obj, opts) -} - -// bpfSpecs contains maps and programs before they are loaded into the kernel. -// -// It can be passed ebpf.CollectionSpec.Assign. -type bpfSpecs struct { - bpfProgramSpecs - bpfMapSpecs -} - -// bpfSpecs contains programs before they are loaded into the kernel. -// -// It can be passed ebpf.CollectionSpec.Assign. -type bpfProgramSpecs struct { - UprobeServeHTTP *ebpf.ProgramSpec `ebpf:"uprobe_ServeHTTP"` - UprobeServeHTTPReturns *ebpf.ProgramSpec `ebpf:"uprobe_ServeHTTPReturns"` - UprobeConnServe *ebpf.ProgramSpec `ebpf:"uprobe_connServe"` - UprobeConnServeRet *ebpf.ProgramSpec `ebpf:"uprobe_connServeRet"` - UprobeExecDC *ebpf.ProgramSpec `ebpf:"uprobe_execDC"` - UprobeHttp2FramerWriteHeaders *ebpf.ProgramSpec `ebpf:"uprobe_http2FramerWriteHeaders"` - UprobeHttp2FramerWriteHeadersReturns *ebpf.ProgramSpec `ebpf:"uprobe_http2FramerWriteHeaders_returns"` - UprobeHttp2ResponseWriterStateWriteHeader *ebpf.ProgramSpec `ebpf:"uprobe_http2ResponseWriterStateWriteHeader"` - UprobeHttp2RoundTrip *ebpf.ProgramSpec `ebpf:"uprobe_http2RoundTrip"` - UprobeNetFdRead *ebpf.ProgramSpec `ebpf:"uprobe_netFdRead"` - UprobePersistConnRoundTrip *ebpf.ProgramSpec `ebpf:"uprobe_persistConnRoundTrip"` - UprobeQueryDC *ebpf.ProgramSpec `ebpf:"uprobe_queryDC"` - UprobeQueryReturn *ebpf.ProgramSpec `ebpf:"uprobe_queryReturn"` - UprobeReadRequestReturns *ebpf.ProgramSpec `ebpf:"uprobe_readRequestReturns"` - UprobeRoundTrip *ebpf.ProgramSpec `ebpf:"uprobe_roundTrip"` - UprobeRoundTripReturn *ebpf.ProgramSpec `ebpf:"uprobe_roundTripReturn"` - UprobeWriteSubset *ebpf.ProgramSpec `ebpf:"uprobe_writeSubset"` -} - -// bpfMapSpecs contains maps before they are loaded into the kernel. -// -// It can be passed ebpf.CollectionSpec.Assign. -type bpfMapSpecs struct { - Events *ebpf.MapSpec `ebpf:"events"` - GoTraceMap *ebpf.MapSpec `ebpf:"go_trace_map"` - GolangMapbucketStorageMap *ebpf.MapSpec `ebpf:"golang_mapbucket_storage_map"` - OngoingClientConnections *ebpf.MapSpec `ebpf:"ongoing_client_connections"` - OngoingGoroutines *ebpf.MapSpec `ebpf:"ongoing_goroutines"` - OngoingHttpClientRequests *ebpf.MapSpec `ebpf:"ongoing_http_client_requests"` - OngoingHttpClientRequestsData *ebpf.MapSpec `ebpf:"ongoing_http_client_requests_data"` - OngoingHttpServerRequests *ebpf.MapSpec `ebpf:"ongoing_http_server_requests"` - OngoingServerConnections *ebpf.MapSpec `ebpf:"ongoing_server_connections"` - OngoingSqlQueries *ebpf.MapSpec `ebpf:"ongoing_sql_queries"` - TraceMap *ebpf.MapSpec `ebpf:"trace_map"` -} - -// bpfObjects contains all objects after they have been loaded into the kernel. -// -// It can be passed to loadBpfObjects or ebpf.CollectionSpec.LoadAndAssign. -type bpfObjects struct { - bpfPrograms - bpfMaps -} - -func (o *bpfObjects) Close() error { - return _BpfClose( - &o.bpfPrograms, - &o.bpfMaps, - ) -} - -// bpfMaps contains all maps after they have been loaded into the kernel. -// -// It can be passed to loadBpfObjects or ebpf.CollectionSpec.LoadAndAssign. -type bpfMaps struct { - Events *ebpf.Map `ebpf:"events"` - GoTraceMap *ebpf.Map `ebpf:"go_trace_map"` - GolangMapbucketStorageMap *ebpf.Map `ebpf:"golang_mapbucket_storage_map"` - OngoingClientConnections *ebpf.Map `ebpf:"ongoing_client_connections"` - OngoingGoroutines *ebpf.Map `ebpf:"ongoing_goroutines"` - OngoingHttpClientRequests *ebpf.Map `ebpf:"ongoing_http_client_requests"` - OngoingHttpClientRequestsData *ebpf.Map `ebpf:"ongoing_http_client_requests_data"` - OngoingHttpServerRequests *ebpf.Map `ebpf:"ongoing_http_server_requests"` - OngoingServerConnections *ebpf.Map `ebpf:"ongoing_server_connections"` - OngoingSqlQueries *ebpf.Map `ebpf:"ongoing_sql_queries"` - TraceMap *ebpf.Map `ebpf:"trace_map"` -} - -func (m *bpfMaps) Close() error { - return _BpfClose( - m.Events, - m.GoTraceMap, - m.GolangMapbucketStorageMap, - m.OngoingClientConnections, - m.OngoingGoroutines, - m.OngoingHttpClientRequests, - m.OngoingHttpClientRequestsData, - m.OngoingHttpServerRequests, - m.OngoingServerConnections, - m.OngoingSqlQueries, - m.TraceMap, - ) -} - -// bpfPrograms contains all programs after they have been loaded into the kernel. -// -// It can be passed to loadBpfObjects or ebpf.CollectionSpec.LoadAndAssign. -type bpfPrograms struct { - UprobeServeHTTP *ebpf.Program `ebpf:"uprobe_ServeHTTP"` - UprobeServeHTTPReturns *ebpf.Program `ebpf:"uprobe_ServeHTTPReturns"` - UprobeConnServe *ebpf.Program `ebpf:"uprobe_connServe"` - UprobeConnServeRet *ebpf.Program `ebpf:"uprobe_connServeRet"` - UprobeExecDC *ebpf.Program `ebpf:"uprobe_execDC"` - UprobeHttp2FramerWriteHeaders *ebpf.Program `ebpf:"uprobe_http2FramerWriteHeaders"` - UprobeHttp2FramerWriteHeadersReturns *ebpf.Program `ebpf:"uprobe_http2FramerWriteHeaders_returns"` - UprobeHttp2ResponseWriterStateWriteHeader *ebpf.Program `ebpf:"uprobe_http2ResponseWriterStateWriteHeader"` - UprobeHttp2RoundTrip *ebpf.Program `ebpf:"uprobe_http2RoundTrip"` - UprobeNetFdRead *ebpf.Program `ebpf:"uprobe_netFdRead"` - UprobePersistConnRoundTrip *ebpf.Program `ebpf:"uprobe_persistConnRoundTrip"` - UprobeQueryDC *ebpf.Program `ebpf:"uprobe_queryDC"` - UprobeQueryReturn *ebpf.Program `ebpf:"uprobe_queryReturn"` - UprobeReadRequestReturns *ebpf.Program `ebpf:"uprobe_readRequestReturns"` - UprobeRoundTrip *ebpf.Program `ebpf:"uprobe_roundTrip"` - UprobeRoundTripReturn *ebpf.Program `ebpf:"uprobe_roundTripReturn"` - UprobeWriteSubset *ebpf.Program `ebpf:"uprobe_writeSubset"` -} - -func (p *bpfPrograms) Close() error { - return _BpfClose( - p.UprobeServeHTTP, - p.UprobeServeHTTPReturns, - p.UprobeConnServe, - p.UprobeConnServeRet, - p.UprobeExecDC, - p.UprobeHttp2FramerWriteHeaders, - p.UprobeHttp2FramerWriteHeadersReturns, - p.UprobeHttp2ResponseWriterStateWriteHeader, - p.UprobeHttp2RoundTrip, - p.UprobeNetFdRead, - p.UprobePersistConnRoundTrip, - p.UprobeQueryDC, - p.UprobeQueryReturn, - p.UprobeReadRequestReturns, - p.UprobeRoundTrip, - p.UprobeRoundTripReturn, - p.UprobeWriteSubset, - ) -} - -func _BpfClose(closers ...io.Closer) error { - for _, closer := range closers { - if err := closer.Close(); err != nil { - return err - } - } - return nil -} - -// Do not access this directly. -// -//go:embed bpf_bpfel_arm64.o -var _BpfBytes []byte diff --git a/pkg/internal/ebpf/nethttp/bpf_bpfel_arm64.o b/pkg/internal/ebpf/nethttp/bpf_bpfel_arm64.o deleted file mode 100644 index 22423e7be..000000000 Binary files a/pkg/internal/ebpf/nethttp/bpf_bpfel_arm64.o and /dev/null differ diff --git a/pkg/internal/ebpf/nethttp/bpf_bpfel_x86.go b/pkg/internal/ebpf/nethttp/bpf_bpfel_x86.go deleted file mode 100644 index f0bb71eaf..000000000 --- a/pkg/internal/ebpf/nethttp/bpf_bpfel_x86.go +++ /dev/null @@ -1,262 +0,0 @@ -// Code generated by bpf2go; DO NOT EDIT. -//go:build 386 || amd64 - -package nethttp - -import ( - "bytes" - _ "embed" - "fmt" - "io" - - "github.com/cilium/ebpf" -) - -type bpfConnectionInfoT struct { - S_addr [16]uint8 - D_addr [16]uint8 - S_port uint16 - D_port uint16 -} - -type bpfGoroutineMetadata struct { - Parent uint64 - Timestamp uint64 -} - -type bpfHttpClientDataT struct { - Method [7]uint8 - Path [100]uint8 - _ [5]byte - ContentLength int64 - Pid struct { - HostPid uint32 - UserPid uint32 - Ns uint32 - } - _ [4]byte -} - -type bpfHttpFuncInvocationT struct { - StartMonotimeNs uint64 - Tp bpfTpInfoT -} - -type bpfServerHttpFuncInvocationT struct { - StartMonotimeNs uint64 - Tp bpfTpInfoT - Response uint64 - Method [7]uint8 - Path [100]uint8 - _ [5]byte - ContentLength uint64 - Http2 uint8 - _ [7]byte -} - -type bpfSqlFuncInvocationT struct { - StartMonotimeNs uint64 - SqlParam uint64 - QueryLen uint64 - Tp bpfTpInfoT -} - -type bpfTpInfoPidT struct { - Tp bpfTpInfoT - Pid uint32 - Valid uint8 - _ [3]byte -} - -type bpfTpInfoT struct { - TraceId [16]uint8 - SpanId [8]uint8 - ParentId [8]uint8 - Ts uint64 - Flags uint8 - _ [7]byte -} - -// loadBpf returns the embedded CollectionSpec for bpf. -func loadBpf() (*ebpf.CollectionSpec, error) { - reader := bytes.NewReader(_BpfBytes) - spec, err := ebpf.LoadCollectionSpecFromReader(reader) - if err != nil { - return nil, fmt.Errorf("can't load bpf: %w", err) - } - - return spec, err -} - -// loadBpfObjects loads bpf and converts it into a struct. -// -// The following types are suitable as obj argument: -// -// *bpfObjects -// *bpfPrograms -// *bpfMaps -// -// See ebpf.CollectionSpec.LoadAndAssign documentation for details. -func loadBpfObjects(obj interface{}, opts *ebpf.CollectionOptions) error { - spec, err := loadBpf() - if err != nil { - return err - } - - return spec.LoadAndAssign(obj, opts) -} - -// bpfSpecs contains maps and programs before they are loaded into the kernel. -// -// It can be passed ebpf.CollectionSpec.Assign. -type bpfSpecs struct { - bpfProgramSpecs - bpfMapSpecs -} - -// bpfSpecs contains programs before they are loaded into the kernel. -// -// It can be passed ebpf.CollectionSpec.Assign. -type bpfProgramSpecs struct { - UprobeServeHTTP *ebpf.ProgramSpec `ebpf:"uprobe_ServeHTTP"` - UprobeServeHTTPReturns *ebpf.ProgramSpec `ebpf:"uprobe_ServeHTTPReturns"` - UprobeConnServe *ebpf.ProgramSpec `ebpf:"uprobe_connServe"` - UprobeConnServeRet *ebpf.ProgramSpec `ebpf:"uprobe_connServeRet"` - UprobeExecDC *ebpf.ProgramSpec `ebpf:"uprobe_execDC"` - UprobeHttp2FramerWriteHeaders *ebpf.ProgramSpec `ebpf:"uprobe_http2FramerWriteHeaders"` - UprobeHttp2FramerWriteHeadersReturns *ebpf.ProgramSpec `ebpf:"uprobe_http2FramerWriteHeaders_returns"` - UprobeHttp2ResponseWriterStateWriteHeader *ebpf.ProgramSpec `ebpf:"uprobe_http2ResponseWriterStateWriteHeader"` - UprobeHttp2RoundTrip *ebpf.ProgramSpec `ebpf:"uprobe_http2RoundTrip"` - UprobeNetFdRead *ebpf.ProgramSpec `ebpf:"uprobe_netFdRead"` - UprobePersistConnRoundTrip *ebpf.ProgramSpec `ebpf:"uprobe_persistConnRoundTrip"` - UprobeQueryDC *ebpf.ProgramSpec `ebpf:"uprobe_queryDC"` - UprobeQueryReturn *ebpf.ProgramSpec `ebpf:"uprobe_queryReturn"` - UprobeReadRequestReturns *ebpf.ProgramSpec `ebpf:"uprobe_readRequestReturns"` - UprobeRoundTrip *ebpf.ProgramSpec `ebpf:"uprobe_roundTrip"` - UprobeRoundTripReturn *ebpf.ProgramSpec `ebpf:"uprobe_roundTripReturn"` - UprobeWriteSubset *ebpf.ProgramSpec `ebpf:"uprobe_writeSubset"` -} - -// bpfMapSpecs contains maps before they are loaded into the kernel. -// -// It can be passed ebpf.CollectionSpec.Assign. -type bpfMapSpecs struct { - Events *ebpf.MapSpec `ebpf:"events"` - GoTraceMap *ebpf.MapSpec `ebpf:"go_trace_map"` - GolangMapbucketStorageMap *ebpf.MapSpec `ebpf:"golang_mapbucket_storage_map"` - OngoingClientConnections *ebpf.MapSpec `ebpf:"ongoing_client_connections"` - OngoingGoroutines *ebpf.MapSpec `ebpf:"ongoing_goroutines"` - OngoingHttpClientRequests *ebpf.MapSpec `ebpf:"ongoing_http_client_requests"` - OngoingHttpClientRequestsData *ebpf.MapSpec `ebpf:"ongoing_http_client_requests_data"` - OngoingHttpServerRequests *ebpf.MapSpec `ebpf:"ongoing_http_server_requests"` - OngoingServerConnections *ebpf.MapSpec `ebpf:"ongoing_server_connections"` - OngoingSqlQueries *ebpf.MapSpec `ebpf:"ongoing_sql_queries"` - TraceMap *ebpf.MapSpec `ebpf:"trace_map"` -} - -// bpfObjects contains all objects after they have been loaded into the kernel. -// -// It can be passed to loadBpfObjects or ebpf.CollectionSpec.LoadAndAssign. -type bpfObjects struct { - bpfPrograms - bpfMaps -} - -func (o *bpfObjects) Close() error { - return _BpfClose( - &o.bpfPrograms, - &o.bpfMaps, - ) -} - -// bpfMaps contains all maps after they have been loaded into the kernel. -// -// It can be passed to loadBpfObjects or ebpf.CollectionSpec.LoadAndAssign. -type bpfMaps struct { - Events *ebpf.Map `ebpf:"events"` - GoTraceMap *ebpf.Map `ebpf:"go_trace_map"` - GolangMapbucketStorageMap *ebpf.Map `ebpf:"golang_mapbucket_storage_map"` - OngoingClientConnections *ebpf.Map `ebpf:"ongoing_client_connections"` - OngoingGoroutines *ebpf.Map `ebpf:"ongoing_goroutines"` - OngoingHttpClientRequests *ebpf.Map `ebpf:"ongoing_http_client_requests"` - OngoingHttpClientRequestsData *ebpf.Map `ebpf:"ongoing_http_client_requests_data"` - OngoingHttpServerRequests *ebpf.Map `ebpf:"ongoing_http_server_requests"` - OngoingServerConnections *ebpf.Map `ebpf:"ongoing_server_connections"` - OngoingSqlQueries *ebpf.Map `ebpf:"ongoing_sql_queries"` - TraceMap *ebpf.Map `ebpf:"trace_map"` -} - -func (m *bpfMaps) Close() error { - return _BpfClose( - m.Events, - m.GoTraceMap, - m.GolangMapbucketStorageMap, - m.OngoingClientConnections, - m.OngoingGoroutines, - m.OngoingHttpClientRequests, - m.OngoingHttpClientRequestsData, - m.OngoingHttpServerRequests, - m.OngoingServerConnections, - m.OngoingSqlQueries, - m.TraceMap, - ) -} - -// bpfPrograms contains all programs after they have been loaded into the kernel. -// -// It can be passed to loadBpfObjects or ebpf.CollectionSpec.LoadAndAssign. -type bpfPrograms struct { - UprobeServeHTTP *ebpf.Program `ebpf:"uprobe_ServeHTTP"` - UprobeServeHTTPReturns *ebpf.Program `ebpf:"uprobe_ServeHTTPReturns"` - UprobeConnServe *ebpf.Program `ebpf:"uprobe_connServe"` - UprobeConnServeRet *ebpf.Program `ebpf:"uprobe_connServeRet"` - UprobeExecDC *ebpf.Program `ebpf:"uprobe_execDC"` - UprobeHttp2FramerWriteHeaders *ebpf.Program `ebpf:"uprobe_http2FramerWriteHeaders"` - UprobeHttp2FramerWriteHeadersReturns *ebpf.Program `ebpf:"uprobe_http2FramerWriteHeaders_returns"` - UprobeHttp2ResponseWriterStateWriteHeader *ebpf.Program `ebpf:"uprobe_http2ResponseWriterStateWriteHeader"` - UprobeHttp2RoundTrip *ebpf.Program `ebpf:"uprobe_http2RoundTrip"` - UprobeNetFdRead *ebpf.Program `ebpf:"uprobe_netFdRead"` - UprobePersistConnRoundTrip *ebpf.Program `ebpf:"uprobe_persistConnRoundTrip"` - UprobeQueryDC *ebpf.Program `ebpf:"uprobe_queryDC"` - UprobeQueryReturn *ebpf.Program `ebpf:"uprobe_queryReturn"` - UprobeReadRequestReturns *ebpf.Program `ebpf:"uprobe_readRequestReturns"` - UprobeRoundTrip *ebpf.Program `ebpf:"uprobe_roundTrip"` - UprobeRoundTripReturn *ebpf.Program `ebpf:"uprobe_roundTripReturn"` - UprobeWriteSubset *ebpf.Program `ebpf:"uprobe_writeSubset"` -} - -func (p *bpfPrograms) Close() error { - return _BpfClose( - p.UprobeServeHTTP, - p.UprobeServeHTTPReturns, - p.UprobeConnServe, - p.UprobeConnServeRet, - p.UprobeExecDC, - p.UprobeHttp2FramerWriteHeaders, - p.UprobeHttp2FramerWriteHeadersReturns, - p.UprobeHttp2ResponseWriterStateWriteHeader, - p.UprobeHttp2RoundTrip, - p.UprobeNetFdRead, - p.UprobePersistConnRoundTrip, - p.UprobeQueryDC, - p.UprobeQueryReturn, - p.UprobeReadRequestReturns, - p.UprobeRoundTrip, - p.UprobeRoundTripReturn, - p.UprobeWriteSubset, - ) -} - -func _BpfClose(closers ...io.Closer) error { - for _, closer := range closers { - if err := closer.Close(); err != nil { - return err - } - } - return nil -} - -// Do not access this directly. -// -//go:embed bpf_bpfel_x86.o -var _BpfBytes []byte diff --git a/pkg/internal/ebpf/nethttp/bpf_bpfel_x86.o b/pkg/internal/ebpf/nethttp/bpf_bpfel_x86.o deleted file mode 100644 index 0a6cad0b8..000000000 Binary files a/pkg/internal/ebpf/nethttp/bpf_bpfel_x86.o and /dev/null differ diff --git a/pkg/internal/ebpf/nethttp/bpf_debug_bpfel_arm64.go b/pkg/internal/ebpf/nethttp/bpf_debug_bpfel_arm64.go deleted file mode 100644 index 9b8aef589..000000000 --- a/pkg/internal/ebpf/nethttp/bpf_debug_bpfel_arm64.go +++ /dev/null @@ -1,262 +0,0 @@ -// Code generated by bpf2go; DO NOT EDIT. -//go:build arm64 - -package nethttp - -import ( - "bytes" - _ "embed" - "fmt" - "io" - - "github.com/cilium/ebpf" -) - -type bpf_debugConnectionInfoT struct { - S_addr [16]uint8 - D_addr [16]uint8 - S_port uint16 - D_port uint16 -} - -type bpf_debugGoroutineMetadata struct { - Parent uint64 - Timestamp uint64 -} - -type bpf_debugHttpClientDataT struct { - Method [7]uint8 - Path [100]uint8 - _ [5]byte - ContentLength int64 - Pid struct { - HostPid uint32 - UserPid uint32 - Ns uint32 - } - _ [4]byte -} - -type bpf_debugHttpFuncInvocationT struct { - StartMonotimeNs uint64 - Tp bpf_debugTpInfoT -} - -type bpf_debugServerHttpFuncInvocationT struct { - StartMonotimeNs uint64 - Tp bpf_debugTpInfoT - Response uint64 - Method [7]uint8 - Path [100]uint8 - _ [5]byte - ContentLength uint64 - Http2 uint8 - _ [7]byte -} - -type bpf_debugSqlFuncInvocationT struct { - StartMonotimeNs uint64 - SqlParam uint64 - QueryLen uint64 - Tp bpf_debugTpInfoT -} - -type bpf_debugTpInfoPidT struct { - Tp bpf_debugTpInfoT - Pid uint32 - Valid uint8 - _ [3]byte -} - -type bpf_debugTpInfoT struct { - TraceId [16]uint8 - SpanId [8]uint8 - ParentId [8]uint8 - Ts uint64 - Flags uint8 - _ [7]byte -} - -// loadBpf_debug returns the embedded CollectionSpec for bpf_debug. -func loadBpf_debug() (*ebpf.CollectionSpec, error) { - reader := bytes.NewReader(_Bpf_debugBytes) - spec, err := ebpf.LoadCollectionSpecFromReader(reader) - if err != nil { - return nil, fmt.Errorf("can't load bpf_debug: %w", err) - } - - return spec, err -} - -// loadBpf_debugObjects loads bpf_debug and converts it into a struct. -// -// The following types are suitable as obj argument: -// -// *bpf_debugObjects -// *bpf_debugPrograms -// *bpf_debugMaps -// -// See ebpf.CollectionSpec.LoadAndAssign documentation for details. -func loadBpf_debugObjects(obj interface{}, opts *ebpf.CollectionOptions) error { - spec, err := loadBpf_debug() - if err != nil { - return err - } - - return spec.LoadAndAssign(obj, opts) -} - -// bpf_debugSpecs contains maps and programs before they are loaded into the kernel. -// -// It can be passed ebpf.CollectionSpec.Assign. -type bpf_debugSpecs struct { - bpf_debugProgramSpecs - bpf_debugMapSpecs -} - -// bpf_debugSpecs contains programs before they are loaded into the kernel. -// -// It can be passed ebpf.CollectionSpec.Assign. -type bpf_debugProgramSpecs struct { - UprobeServeHTTP *ebpf.ProgramSpec `ebpf:"uprobe_ServeHTTP"` - UprobeServeHTTPReturns *ebpf.ProgramSpec `ebpf:"uprobe_ServeHTTPReturns"` - UprobeConnServe *ebpf.ProgramSpec `ebpf:"uprobe_connServe"` - UprobeConnServeRet *ebpf.ProgramSpec `ebpf:"uprobe_connServeRet"` - UprobeExecDC *ebpf.ProgramSpec `ebpf:"uprobe_execDC"` - UprobeHttp2FramerWriteHeaders *ebpf.ProgramSpec `ebpf:"uprobe_http2FramerWriteHeaders"` - UprobeHttp2FramerWriteHeadersReturns *ebpf.ProgramSpec `ebpf:"uprobe_http2FramerWriteHeaders_returns"` - UprobeHttp2ResponseWriterStateWriteHeader *ebpf.ProgramSpec `ebpf:"uprobe_http2ResponseWriterStateWriteHeader"` - UprobeHttp2RoundTrip *ebpf.ProgramSpec `ebpf:"uprobe_http2RoundTrip"` - UprobeNetFdRead *ebpf.ProgramSpec `ebpf:"uprobe_netFdRead"` - UprobePersistConnRoundTrip *ebpf.ProgramSpec `ebpf:"uprobe_persistConnRoundTrip"` - UprobeQueryDC *ebpf.ProgramSpec `ebpf:"uprobe_queryDC"` - UprobeQueryReturn *ebpf.ProgramSpec `ebpf:"uprobe_queryReturn"` - UprobeReadRequestReturns *ebpf.ProgramSpec `ebpf:"uprobe_readRequestReturns"` - UprobeRoundTrip *ebpf.ProgramSpec `ebpf:"uprobe_roundTrip"` - UprobeRoundTripReturn *ebpf.ProgramSpec `ebpf:"uprobe_roundTripReturn"` - UprobeWriteSubset *ebpf.ProgramSpec `ebpf:"uprobe_writeSubset"` -} - -// bpf_debugMapSpecs contains maps before they are loaded into the kernel. -// -// It can be passed ebpf.CollectionSpec.Assign. -type bpf_debugMapSpecs struct { - Events *ebpf.MapSpec `ebpf:"events"` - GoTraceMap *ebpf.MapSpec `ebpf:"go_trace_map"` - GolangMapbucketStorageMap *ebpf.MapSpec `ebpf:"golang_mapbucket_storage_map"` - OngoingClientConnections *ebpf.MapSpec `ebpf:"ongoing_client_connections"` - OngoingGoroutines *ebpf.MapSpec `ebpf:"ongoing_goroutines"` - OngoingHttpClientRequests *ebpf.MapSpec `ebpf:"ongoing_http_client_requests"` - OngoingHttpClientRequestsData *ebpf.MapSpec `ebpf:"ongoing_http_client_requests_data"` - OngoingHttpServerRequests *ebpf.MapSpec `ebpf:"ongoing_http_server_requests"` - OngoingServerConnections *ebpf.MapSpec `ebpf:"ongoing_server_connections"` - OngoingSqlQueries *ebpf.MapSpec `ebpf:"ongoing_sql_queries"` - TraceMap *ebpf.MapSpec `ebpf:"trace_map"` -} - -// bpf_debugObjects contains all objects after they have been loaded into the kernel. -// -// It can be passed to loadBpf_debugObjects or ebpf.CollectionSpec.LoadAndAssign. -type bpf_debugObjects struct { - bpf_debugPrograms - bpf_debugMaps -} - -func (o *bpf_debugObjects) Close() error { - return _Bpf_debugClose( - &o.bpf_debugPrograms, - &o.bpf_debugMaps, - ) -} - -// bpf_debugMaps contains all maps after they have been loaded into the kernel. -// -// It can be passed to loadBpf_debugObjects or ebpf.CollectionSpec.LoadAndAssign. -type bpf_debugMaps struct { - Events *ebpf.Map `ebpf:"events"` - GoTraceMap *ebpf.Map `ebpf:"go_trace_map"` - GolangMapbucketStorageMap *ebpf.Map `ebpf:"golang_mapbucket_storage_map"` - OngoingClientConnections *ebpf.Map `ebpf:"ongoing_client_connections"` - OngoingGoroutines *ebpf.Map `ebpf:"ongoing_goroutines"` - OngoingHttpClientRequests *ebpf.Map `ebpf:"ongoing_http_client_requests"` - OngoingHttpClientRequestsData *ebpf.Map `ebpf:"ongoing_http_client_requests_data"` - OngoingHttpServerRequests *ebpf.Map `ebpf:"ongoing_http_server_requests"` - OngoingServerConnections *ebpf.Map `ebpf:"ongoing_server_connections"` - OngoingSqlQueries *ebpf.Map `ebpf:"ongoing_sql_queries"` - TraceMap *ebpf.Map `ebpf:"trace_map"` -} - -func (m *bpf_debugMaps) Close() error { - return _Bpf_debugClose( - m.Events, - m.GoTraceMap, - m.GolangMapbucketStorageMap, - m.OngoingClientConnections, - m.OngoingGoroutines, - m.OngoingHttpClientRequests, - m.OngoingHttpClientRequestsData, - m.OngoingHttpServerRequests, - m.OngoingServerConnections, - m.OngoingSqlQueries, - m.TraceMap, - ) -} - -// bpf_debugPrograms contains all programs after they have been loaded into the kernel. -// -// It can be passed to loadBpf_debugObjects or ebpf.CollectionSpec.LoadAndAssign. -type bpf_debugPrograms struct { - UprobeServeHTTP *ebpf.Program `ebpf:"uprobe_ServeHTTP"` - UprobeServeHTTPReturns *ebpf.Program `ebpf:"uprobe_ServeHTTPReturns"` - UprobeConnServe *ebpf.Program `ebpf:"uprobe_connServe"` - UprobeConnServeRet *ebpf.Program `ebpf:"uprobe_connServeRet"` - UprobeExecDC *ebpf.Program `ebpf:"uprobe_execDC"` - UprobeHttp2FramerWriteHeaders *ebpf.Program `ebpf:"uprobe_http2FramerWriteHeaders"` - UprobeHttp2FramerWriteHeadersReturns *ebpf.Program `ebpf:"uprobe_http2FramerWriteHeaders_returns"` - UprobeHttp2ResponseWriterStateWriteHeader *ebpf.Program `ebpf:"uprobe_http2ResponseWriterStateWriteHeader"` - UprobeHttp2RoundTrip *ebpf.Program `ebpf:"uprobe_http2RoundTrip"` - UprobeNetFdRead *ebpf.Program `ebpf:"uprobe_netFdRead"` - UprobePersistConnRoundTrip *ebpf.Program `ebpf:"uprobe_persistConnRoundTrip"` - UprobeQueryDC *ebpf.Program `ebpf:"uprobe_queryDC"` - UprobeQueryReturn *ebpf.Program `ebpf:"uprobe_queryReturn"` - UprobeReadRequestReturns *ebpf.Program `ebpf:"uprobe_readRequestReturns"` - UprobeRoundTrip *ebpf.Program `ebpf:"uprobe_roundTrip"` - UprobeRoundTripReturn *ebpf.Program `ebpf:"uprobe_roundTripReturn"` - UprobeWriteSubset *ebpf.Program `ebpf:"uprobe_writeSubset"` -} - -func (p *bpf_debugPrograms) Close() error { - return _Bpf_debugClose( - p.UprobeServeHTTP, - p.UprobeServeHTTPReturns, - p.UprobeConnServe, - p.UprobeConnServeRet, - p.UprobeExecDC, - p.UprobeHttp2FramerWriteHeaders, - p.UprobeHttp2FramerWriteHeadersReturns, - p.UprobeHttp2ResponseWriterStateWriteHeader, - p.UprobeHttp2RoundTrip, - p.UprobeNetFdRead, - p.UprobePersistConnRoundTrip, - p.UprobeQueryDC, - p.UprobeQueryReturn, - p.UprobeReadRequestReturns, - p.UprobeRoundTrip, - p.UprobeRoundTripReturn, - p.UprobeWriteSubset, - ) -} - -func _Bpf_debugClose(closers ...io.Closer) error { - for _, closer := range closers { - if err := closer.Close(); err != nil { - return err - } - } - return nil -} - -// Do not access this directly. -// -//go:embed bpf_debug_bpfel_arm64.o -var _Bpf_debugBytes []byte diff --git a/pkg/internal/ebpf/nethttp/bpf_debug_bpfel_arm64.o b/pkg/internal/ebpf/nethttp/bpf_debug_bpfel_arm64.o deleted file mode 100644 index fd0d70e3b..000000000 Binary files a/pkg/internal/ebpf/nethttp/bpf_debug_bpfel_arm64.o and /dev/null differ diff --git a/pkg/internal/ebpf/nethttp/bpf_debug_bpfel_x86.go b/pkg/internal/ebpf/nethttp/bpf_debug_bpfel_x86.go deleted file mode 100644 index 1bfbf5359..000000000 --- a/pkg/internal/ebpf/nethttp/bpf_debug_bpfel_x86.go +++ /dev/null @@ -1,262 +0,0 @@ -// Code generated by bpf2go; DO NOT EDIT. -//go:build 386 || amd64 - -package nethttp - -import ( - "bytes" - _ "embed" - "fmt" - "io" - - "github.com/cilium/ebpf" -) - -type bpf_debugConnectionInfoT struct { - S_addr [16]uint8 - D_addr [16]uint8 - S_port uint16 - D_port uint16 -} - -type bpf_debugGoroutineMetadata struct { - Parent uint64 - Timestamp uint64 -} - -type bpf_debugHttpClientDataT struct { - Method [7]uint8 - Path [100]uint8 - _ [5]byte - ContentLength int64 - Pid struct { - HostPid uint32 - UserPid uint32 - Ns uint32 - } - _ [4]byte -} - -type bpf_debugHttpFuncInvocationT struct { - StartMonotimeNs uint64 - Tp bpf_debugTpInfoT -} - -type bpf_debugServerHttpFuncInvocationT struct { - StartMonotimeNs uint64 - Tp bpf_debugTpInfoT - Response uint64 - Method [7]uint8 - Path [100]uint8 - _ [5]byte - ContentLength uint64 - Http2 uint8 - _ [7]byte -} - -type bpf_debugSqlFuncInvocationT struct { - StartMonotimeNs uint64 - SqlParam uint64 - QueryLen uint64 - Tp bpf_debugTpInfoT -} - -type bpf_debugTpInfoPidT struct { - Tp bpf_debugTpInfoT - Pid uint32 - Valid uint8 - _ [3]byte -} - -type bpf_debugTpInfoT struct { - TraceId [16]uint8 - SpanId [8]uint8 - ParentId [8]uint8 - Ts uint64 - Flags uint8 - _ [7]byte -} - -// loadBpf_debug returns the embedded CollectionSpec for bpf_debug. -func loadBpf_debug() (*ebpf.CollectionSpec, error) { - reader := bytes.NewReader(_Bpf_debugBytes) - spec, err := ebpf.LoadCollectionSpecFromReader(reader) - if err != nil { - return nil, fmt.Errorf("can't load bpf_debug: %w", err) - } - - return spec, err -} - -// loadBpf_debugObjects loads bpf_debug and converts it into a struct. -// -// The following types are suitable as obj argument: -// -// *bpf_debugObjects -// *bpf_debugPrograms -// *bpf_debugMaps -// -// See ebpf.CollectionSpec.LoadAndAssign documentation for details. -func loadBpf_debugObjects(obj interface{}, opts *ebpf.CollectionOptions) error { - spec, err := loadBpf_debug() - if err != nil { - return err - } - - return spec.LoadAndAssign(obj, opts) -} - -// bpf_debugSpecs contains maps and programs before they are loaded into the kernel. -// -// It can be passed ebpf.CollectionSpec.Assign. -type bpf_debugSpecs struct { - bpf_debugProgramSpecs - bpf_debugMapSpecs -} - -// bpf_debugSpecs contains programs before they are loaded into the kernel. -// -// It can be passed ebpf.CollectionSpec.Assign. -type bpf_debugProgramSpecs struct { - UprobeServeHTTP *ebpf.ProgramSpec `ebpf:"uprobe_ServeHTTP"` - UprobeServeHTTPReturns *ebpf.ProgramSpec `ebpf:"uprobe_ServeHTTPReturns"` - UprobeConnServe *ebpf.ProgramSpec `ebpf:"uprobe_connServe"` - UprobeConnServeRet *ebpf.ProgramSpec `ebpf:"uprobe_connServeRet"` - UprobeExecDC *ebpf.ProgramSpec `ebpf:"uprobe_execDC"` - UprobeHttp2FramerWriteHeaders *ebpf.ProgramSpec `ebpf:"uprobe_http2FramerWriteHeaders"` - UprobeHttp2FramerWriteHeadersReturns *ebpf.ProgramSpec `ebpf:"uprobe_http2FramerWriteHeaders_returns"` - UprobeHttp2ResponseWriterStateWriteHeader *ebpf.ProgramSpec `ebpf:"uprobe_http2ResponseWriterStateWriteHeader"` - UprobeHttp2RoundTrip *ebpf.ProgramSpec `ebpf:"uprobe_http2RoundTrip"` - UprobeNetFdRead *ebpf.ProgramSpec `ebpf:"uprobe_netFdRead"` - UprobePersistConnRoundTrip *ebpf.ProgramSpec `ebpf:"uprobe_persistConnRoundTrip"` - UprobeQueryDC *ebpf.ProgramSpec `ebpf:"uprobe_queryDC"` - UprobeQueryReturn *ebpf.ProgramSpec `ebpf:"uprobe_queryReturn"` - UprobeReadRequestReturns *ebpf.ProgramSpec `ebpf:"uprobe_readRequestReturns"` - UprobeRoundTrip *ebpf.ProgramSpec `ebpf:"uprobe_roundTrip"` - UprobeRoundTripReturn *ebpf.ProgramSpec `ebpf:"uprobe_roundTripReturn"` - UprobeWriteSubset *ebpf.ProgramSpec `ebpf:"uprobe_writeSubset"` -} - -// bpf_debugMapSpecs contains maps before they are loaded into the kernel. -// -// It can be passed ebpf.CollectionSpec.Assign. -type bpf_debugMapSpecs struct { - Events *ebpf.MapSpec `ebpf:"events"` - GoTraceMap *ebpf.MapSpec `ebpf:"go_trace_map"` - GolangMapbucketStorageMap *ebpf.MapSpec `ebpf:"golang_mapbucket_storage_map"` - OngoingClientConnections *ebpf.MapSpec `ebpf:"ongoing_client_connections"` - OngoingGoroutines *ebpf.MapSpec `ebpf:"ongoing_goroutines"` - OngoingHttpClientRequests *ebpf.MapSpec `ebpf:"ongoing_http_client_requests"` - OngoingHttpClientRequestsData *ebpf.MapSpec `ebpf:"ongoing_http_client_requests_data"` - OngoingHttpServerRequests *ebpf.MapSpec `ebpf:"ongoing_http_server_requests"` - OngoingServerConnections *ebpf.MapSpec `ebpf:"ongoing_server_connections"` - OngoingSqlQueries *ebpf.MapSpec `ebpf:"ongoing_sql_queries"` - TraceMap *ebpf.MapSpec `ebpf:"trace_map"` -} - -// bpf_debugObjects contains all objects after they have been loaded into the kernel. -// -// It can be passed to loadBpf_debugObjects or ebpf.CollectionSpec.LoadAndAssign. -type bpf_debugObjects struct { - bpf_debugPrograms - bpf_debugMaps -} - -func (o *bpf_debugObjects) Close() error { - return _Bpf_debugClose( - &o.bpf_debugPrograms, - &o.bpf_debugMaps, - ) -} - -// bpf_debugMaps contains all maps after they have been loaded into the kernel. -// -// It can be passed to loadBpf_debugObjects or ebpf.CollectionSpec.LoadAndAssign. -type bpf_debugMaps struct { - Events *ebpf.Map `ebpf:"events"` - GoTraceMap *ebpf.Map `ebpf:"go_trace_map"` - GolangMapbucketStorageMap *ebpf.Map `ebpf:"golang_mapbucket_storage_map"` - OngoingClientConnections *ebpf.Map `ebpf:"ongoing_client_connections"` - OngoingGoroutines *ebpf.Map `ebpf:"ongoing_goroutines"` - OngoingHttpClientRequests *ebpf.Map `ebpf:"ongoing_http_client_requests"` - OngoingHttpClientRequestsData *ebpf.Map `ebpf:"ongoing_http_client_requests_data"` - OngoingHttpServerRequests *ebpf.Map `ebpf:"ongoing_http_server_requests"` - OngoingServerConnections *ebpf.Map `ebpf:"ongoing_server_connections"` - OngoingSqlQueries *ebpf.Map `ebpf:"ongoing_sql_queries"` - TraceMap *ebpf.Map `ebpf:"trace_map"` -} - -func (m *bpf_debugMaps) Close() error { - return _Bpf_debugClose( - m.Events, - m.GoTraceMap, - m.GolangMapbucketStorageMap, - m.OngoingClientConnections, - m.OngoingGoroutines, - m.OngoingHttpClientRequests, - m.OngoingHttpClientRequestsData, - m.OngoingHttpServerRequests, - m.OngoingServerConnections, - m.OngoingSqlQueries, - m.TraceMap, - ) -} - -// bpf_debugPrograms contains all programs after they have been loaded into the kernel. -// -// It can be passed to loadBpf_debugObjects or ebpf.CollectionSpec.LoadAndAssign. -type bpf_debugPrograms struct { - UprobeServeHTTP *ebpf.Program `ebpf:"uprobe_ServeHTTP"` - UprobeServeHTTPReturns *ebpf.Program `ebpf:"uprobe_ServeHTTPReturns"` - UprobeConnServe *ebpf.Program `ebpf:"uprobe_connServe"` - UprobeConnServeRet *ebpf.Program `ebpf:"uprobe_connServeRet"` - UprobeExecDC *ebpf.Program `ebpf:"uprobe_execDC"` - UprobeHttp2FramerWriteHeaders *ebpf.Program `ebpf:"uprobe_http2FramerWriteHeaders"` - UprobeHttp2FramerWriteHeadersReturns *ebpf.Program `ebpf:"uprobe_http2FramerWriteHeaders_returns"` - UprobeHttp2ResponseWriterStateWriteHeader *ebpf.Program `ebpf:"uprobe_http2ResponseWriterStateWriteHeader"` - UprobeHttp2RoundTrip *ebpf.Program `ebpf:"uprobe_http2RoundTrip"` - UprobeNetFdRead *ebpf.Program `ebpf:"uprobe_netFdRead"` - UprobePersistConnRoundTrip *ebpf.Program `ebpf:"uprobe_persistConnRoundTrip"` - UprobeQueryDC *ebpf.Program `ebpf:"uprobe_queryDC"` - UprobeQueryReturn *ebpf.Program `ebpf:"uprobe_queryReturn"` - UprobeReadRequestReturns *ebpf.Program `ebpf:"uprobe_readRequestReturns"` - UprobeRoundTrip *ebpf.Program `ebpf:"uprobe_roundTrip"` - UprobeRoundTripReturn *ebpf.Program `ebpf:"uprobe_roundTripReturn"` - UprobeWriteSubset *ebpf.Program `ebpf:"uprobe_writeSubset"` -} - -func (p *bpf_debugPrograms) Close() error { - return _Bpf_debugClose( - p.UprobeServeHTTP, - p.UprobeServeHTTPReturns, - p.UprobeConnServe, - p.UprobeConnServeRet, - p.UprobeExecDC, - p.UprobeHttp2FramerWriteHeaders, - p.UprobeHttp2FramerWriteHeadersReturns, - p.UprobeHttp2ResponseWriterStateWriteHeader, - p.UprobeHttp2RoundTrip, - p.UprobeNetFdRead, - p.UprobePersistConnRoundTrip, - p.UprobeQueryDC, - p.UprobeQueryReturn, - p.UprobeReadRequestReturns, - p.UprobeRoundTrip, - p.UprobeRoundTripReturn, - p.UprobeWriteSubset, - ) -} - -func _Bpf_debugClose(closers ...io.Closer) error { - for _, closer := range closers { - if err := closer.Close(); err != nil { - return err - } - } - return nil -} - -// Do not access this directly. -// -//go:embed bpf_debug_bpfel_x86.o -var _Bpf_debugBytes []byte diff --git a/pkg/internal/ebpf/nethttp/bpf_debug_bpfel_x86.o b/pkg/internal/ebpf/nethttp/bpf_debug_bpfel_x86.o deleted file mode 100644 index b0206b4dc..000000000 Binary files a/pkg/internal/ebpf/nethttp/bpf_debug_bpfel_x86.o and /dev/null differ diff --git a/pkg/internal/ebpf/nethttp/bpf_tp_bpfel_arm64.go b/pkg/internal/ebpf/nethttp/bpf_tp_bpfel_arm64.go deleted file mode 100644 index a92c639b8..000000000 --- a/pkg/internal/ebpf/nethttp/bpf_tp_bpfel_arm64.go +++ /dev/null @@ -1,277 +0,0 @@ -// Code generated by bpf2go; DO NOT EDIT. -//go:build arm64 - -package nethttp - -import ( - "bytes" - _ "embed" - "fmt" - "io" - - "github.com/cilium/ebpf" -) - -type bpf_tpConnectionInfoT struct { - S_addr [16]uint8 - D_addr [16]uint8 - S_port uint16 - D_port uint16 -} - -type bpf_tpFramerFuncInvocationT struct { - FramerPtr uint64 - Tp bpf_tpTpInfoT - InitialN int64 -} - -type bpf_tpGoroutineMetadata struct { - Parent uint64 - Timestamp uint64 -} - -type bpf_tpHttpClientDataT struct { - Method [7]uint8 - Path [100]uint8 - _ [5]byte - ContentLength int64 - Pid struct { - HostPid uint32 - UserPid uint32 - Ns uint32 - } - _ [4]byte -} - -type bpf_tpHttpFuncInvocationT struct { - StartMonotimeNs uint64 - Tp bpf_tpTpInfoT -} - -type bpf_tpServerHttpFuncInvocationT struct { - StartMonotimeNs uint64 - Tp bpf_tpTpInfoT - Response uint64 - Method [7]uint8 - Path [100]uint8 - _ [5]byte - ContentLength uint64 - Http2 uint8 - _ [7]byte -} - -type bpf_tpSqlFuncInvocationT struct { - StartMonotimeNs uint64 - SqlParam uint64 - QueryLen uint64 - Tp bpf_tpTpInfoT -} - -type bpf_tpTpInfoPidT struct { - Tp bpf_tpTpInfoT - Pid uint32 - Valid uint8 - _ [3]byte -} - -type bpf_tpTpInfoT struct { - TraceId [16]uint8 - SpanId [8]uint8 - ParentId [8]uint8 - Ts uint64 - Flags uint8 - _ [7]byte -} - -// loadBpf_tp returns the embedded CollectionSpec for bpf_tp. -func loadBpf_tp() (*ebpf.CollectionSpec, error) { - reader := bytes.NewReader(_Bpf_tpBytes) - spec, err := ebpf.LoadCollectionSpecFromReader(reader) - if err != nil { - return nil, fmt.Errorf("can't load bpf_tp: %w", err) - } - - return spec, err -} - -// loadBpf_tpObjects loads bpf_tp and converts it into a struct. -// -// The following types are suitable as obj argument: -// -// *bpf_tpObjects -// *bpf_tpPrograms -// *bpf_tpMaps -// -// See ebpf.CollectionSpec.LoadAndAssign documentation for details. -func loadBpf_tpObjects(obj interface{}, opts *ebpf.CollectionOptions) error { - spec, err := loadBpf_tp() - if err != nil { - return err - } - - return spec.LoadAndAssign(obj, opts) -} - -// bpf_tpSpecs contains maps and programs before they are loaded into the kernel. -// -// It can be passed ebpf.CollectionSpec.Assign. -type bpf_tpSpecs struct { - bpf_tpProgramSpecs - bpf_tpMapSpecs -} - -// bpf_tpSpecs contains programs before they are loaded into the kernel. -// -// It can be passed ebpf.CollectionSpec.Assign. -type bpf_tpProgramSpecs struct { - UprobeServeHTTP *ebpf.ProgramSpec `ebpf:"uprobe_ServeHTTP"` - UprobeServeHTTPReturns *ebpf.ProgramSpec `ebpf:"uprobe_ServeHTTPReturns"` - UprobeConnServe *ebpf.ProgramSpec `ebpf:"uprobe_connServe"` - UprobeConnServeRet *ebpf.ProgramSpec `ebpf:"uprobe_connServeRet"` - UprobeExecDC *ebpf.ProgramSpec `ebpf:"uprobe_execDC"` - UprobeHttp2FramerWriteHeaders *ebpf.ProgramSpec `ebpf:"uprobe_http2FramerWriteHeaders"` - UprobeHttp2FramerWriteHeadersReturns *ebpf.ProgramSpec `ebpf:"uprobe_http2FramerWriteHeaders_returns"` - UprobeHttp2ResponseWriterStateWriteHeader *ebpf.ProgramSpec `ebpf:"uprobe_http2ResponseWriterStateWriteHeader"` - UprobeHttp2RoundTrip *ebpf.ProgramSpec `ebpf:"uprobe_http2RoundTrip"` - UprobeNetFdRead *ebpf.ProgramSpec `ebpf:"uprobe_netFdRead"` - UprobePersistConnRoundTrip *ebpf.ProgramSpec `ebpf:"uprobe_persistConnRoundTrip"` - UprobeQueryDC *ebpf.ProgramSpec `ebpf:"uprobe_queryDC"` - UprobeQueryReturn *ebpf.ProgramSpec `ebpf:"uprobe_queryReturn"` - UprobeReadRequestReturns *ebpf.ProgramSpec `ebpf:"uprobe_readRequestReturns"` - UprobeRoundTrip *ebpf.ProgramSpec `ebpf:"uprobe_roundTrip"` - UprobeRoundTripReturn *ebpf.ProgramSpec `ebpf:"uprobe_roundTripReturn"` - UprobeWriteSubset *ebpf.ProgramSpec `ebpf:"uprobe_writeSubset"` -} - -// bpf_tpMapSpecs contains maps before they are loaded into the kernel. -// -// It can be passed ebpf.CollectionSpec.Assign. -type bpf_tpMapSpecs struct { - Events *ebpf.MapSpec `ebpf:"events"` - FramerInvocationMap *ebpf.MapSpec `ebpf:"framer_invocation_map"` - GoTraceMap *ebpf.MapSpec `ebpf:"go_trace_map"` - GolangMapbucketStorageMap *ebpf.MapSpec `ebpf:"golang_mapbucket_storage_map"` - HeaderReqMap *ebpf.MapSpec `ebpf:"header_req_map"` - Http2ReqMap *ebpf.MapSpec `ebpf:"http2_req_map"` - OngoingClientConnections *ebpf.MapSpec `ebpf:"ongoing_client_connections"` - OngoingGoroutines *ebpf.MapSpec `ebpf:"ongoing_goroutines"` - OngoingHttpClientRequests *ebpf.MapSpec `ebpf:"ongoing_http_client_requests"` - OngoingHttpClientRequestsData *ebpf.MapSpec `ebpf:"ongoing_http_client_requests_data"` - OngoingHttpServerRequests *ebpf.MapSpec `ebpf:"ongoing_http_server_requests"` - OngoingServerConnections *ebpf.MapSpec `ebpf:"ongoing_server_connections"` - OngoingSqlQueries *ebpf.MapSpec `ebpf:"ongoing_sql_queries"` - TraceMap *ebpf.MapSpec `ebpf:"trace_map"` -} - -// bpf_tpObjects contains all objects after they have been loaded into the kernel. -// -// It can be passed to loadBpf_tpObjects or ebpf.CollectionSpec.LoadAndAssign. -type bpf_tpObjects struct { - bpf_tpPrograms - bpf_tpMaps -} - -func (o *bpf_tpObjects) Close() error { - return _Bpf_tpClose( - &o.bpf_tpPrograms, - &o.bpf_tpMaps, - ) -} - -// bpf_tpMaps contains all maps after they have been loaded into the kernel. -// -// It can be passed to loadBpf_tpObjects or ebpf.CollectionSpec.LoadAndAssign. -type bpf_tpMaps struct { - Events *ebpf.Map `ebpf:"events"` - FramerInvocationMap *ebpf.Map `ebpf:"framer_invocation_map"` - GoTraceMap *ebpf.Map `ebpf:"go_trace_map"` - GolangMapbucketStorageMap *ebpf.Map `ebpf:"golang_mapbucket_storage_map"` - HeaderReqMap *ebpf.Map `ebpf:"header_req_map"` - Http2ReqMap *ebpf.Map `ebpf:"http2_req_map"` - OngoingClientConnections *ebpf.Map `ebpf:"ongoing_client_connections"` - OngoingGoroutines *ebpf.Map `ebpf:"ongoing_goroutines"` - OngoingHttpClientRequests *ebpf.Map `ebpf:"ongoing_http_client_requests"` - OngoingHttpClientRequestsData *ebpf.Map `ebpf:"ongoing_http_client_requests_data"` - OngoingHttpServerRequests *ebpf.Map `ebpf:"ongoing_http_server_requests"` - OngoingServerConnections *ebpf.Map `ebpf:"ongoing_server_connections"` - OngoingSqlQueries *ebpf.Map `ebpf:"ongoing_sql_queries"` - TraceMap *ebpf.Map `ebpf:"trace_map"` -} - -func (m *bpf_tpMaps) Close() error { - return _Bpf_tpClose( - m.Events, - m.FramerInvocationMap, - m.GoTraceMap, - m.GolangMapbucketStorageMap, - m.HeaderReqMap, - m.Http2ReqMap, - m.OngoingClientConnections, - m.OngoingGoroutines, - m.OngoingHttpClientRequests, - m.OngoingHttpClientRequestsData, - m.OngoingHttpServerRequests, - m.OngoingServerConnections, - m.OngoingSqlQueries, - m.TraceMap, - ) -} - -// bpf_tpPrograms contains all programs after they have been loaded into the kernel. -// -// It can be passed to loadBpf_tpObjects or ebpf.CollectionSpec.LoadAndAssign. -type bpf_tpPrograms struct { - UprobeServeHTTP *ebpf.Program `ebpf:"uprobe_ServeHTTP"` - UprobeServeHTTPReturns *ebpf.Program `ebpf:"uprobe_ServeHTTPReturns"` - UprobeConnServe *ebpf.Program `ebpf:"uprobe_connServe"` - UprobeConnServeRet *ebpf.Program `ebpf:"uprobe_connServeRet"` - UprobeExecDC *ebpf.Program `ebpf:"uprobe_execDC"` - UprobeHttp2FramerWriteHeaders *ebpf.Program `ebpf:"uprobe_http2FramerWriteHeaders"` - UprobeHttp2FramerWriteHeadersReturns *ebpf.Program `ebpf:"uprobe_http2FramerWriteHeaders_returns"` - UprobeHttp2ResponseWriterStateWriteHeader *ebpf.Program `ebpf:"uprobe_http2ResponseWriterStateWriteHeader"` - UprobeHttp2RoundTrip *ebpf.Program `ebpf:"uprobe_http2RoundTrip"` - UprobeNetFdRead *ebpf.Program `ebpf:"uprobe_netFdRead"` - UprobePersistConnRoundTrip *ebpf.Program `ebpf:"uprobe_persistConnRoundTrip"` - UprobeQueryDC *ebpf.Program `ebpf:"uprobe_queryDC"` - UprobeQueryReturn *ebpf.Program `ebpf:"uprobe_queryReturn"` - UprobeReadRequestReturns *ebpf.Program `ebpf:"uprobe_readRequestReturns"` - UprobeRoundTrip *ebpf.Program `ebpf:"uprobe_roundTrip"` - UprobeRoundTripReturn *ebpf.Program `ebpf:"uprobe_roundTripReturn"` - UprobeWriteSubset *ebpf.Program `ebpf:"uprobe_writeSubset"` -} - -func (p *bpf_tpPrograms) Close() error { - return _Bpf_tpClose( - p.UprobeServeHTTP, - p.UprobeServeHTTPReturns, - p.UprobeConnServe, - p.UprobeConnServeRet, - p.UprobeExecDC, - p.UprobeHttp2FramerWriteHeaders, - p.UprobeHttp2FramerWriteHeadersReturns, - p.UprobeHttp2ResponseWriterStateWriteHeader, - p.UprobeHttp2RoundTrip, - p.UprobeNetFdRead, - p.UprobePersistConnRoundTrip, - p.UprobeQueryDC, - p.UprobeQueryReturn, - p.UprobeReadRequestReturns, - p.UprobeRoundTrip, - p.UprobeRoundTripReturn, - p.UprobeWriteSubset, - ) -} - -func _Bpf_tpClose(closers ...io.Closer) error { - for _, closer := range closers { - if err := closer.Close(); err != nil { - return err - } - } - return nil -} - -// Do not access this directly. -// -//go:embed bpf_tp_bpfel_arm64.o -var _Bpf_tpBytes []byte diff --git a/pkg/internal/ebpf/nethttp/bpf_tp_bpfel_arm64.o b/pkg/internal/ebpf/nethttp/bpf_tp_bpfel_arm64.o deleted file mode 100644 index 4a5e29c30..000000000 Binary files a/pkg/internal/ebpf/nethttp/bpf_tp_bpfel_arm64.o and /dev/null differ diff --git a/pkg/internal/ebpf/nethttp/bpf_tp_bpfel_x86.go b/pkg/internal/ebpf/nethttp/bpf_tp_bpfel_x86.go deleted file mode 100644 index a8d396949..000000000 --- a/pkg/internal/ebpf/nethttp/bpf_tp_bpfel_x86.go +++ /dev/null @@ -1,277 +0,0 @@ -// Code generated by bpf2go; DO NOT EDIT. -//go:build 386 || amd64 - -package nethttp - -import ( - "bytes" - _ "embed" - "fmt" - "io" - - "github.com/cilium/ebpf" -) - -type bpf_tpConnectionInfoT struct { - S_addr [16]uint8 - D_addr [16]uint8 - S_port uint16 - D_port uint16 -} - -type bpf_tpFramerFuncInvocationT struct { - FramerPtr uint64 - Tp bpf_tpTpInfoT - InitialN int64 -} - -type bpf_tpGoroutineMetadata struct { - Parent uint64 - Timestamp uint64 -} - -type bpf_tpHttpClientDataT struct { - Method [7]uint8 - Path [100]uint8 - _ [5]byte - ContentLength int64 - Pid struct { - HostPid uint32 - UserPid uint32 - Ns uint32 - } - _ [4]byte -} - -type bpf_tpHttpFuncInvocationT struct { - StartMonotimeNs uint64 - Tp bpf_tpTpInfoT -} - -type bpf_tpServerHttpFuncInvocationT struct { - StartMonotimeNs uint64 - Tp bpf_tpTpInfoT - Response uint64 - Method [7]uint8 - Path [100]uint8 - _ [5]byte - ContentLength uint64 - Http2 uint8 - _ [7]byte -} - -type bpf_tpSqlFuncInvocationT struct { - StartMonotimeNs uint64 - SqlParam uint64 - QueryLen uint64 - Tp bpf_tpTpInfoT -} - -type bpf_tpTpInfoPidT struct { - Tp bpf_tpTpInfoT - Pid uint32 - Valid uint8 - _ [3]byte -} - -type bpf_tpTpInfoT struct { - TraceId [16]uint8 - SpanId [8]uint8 - ParentId [8]uint8 - Ts uint64 - Flags uint8 - _ [7]byte -} - -// loadBpf_tp returns the embedded CollectionSpec for bpf_tp. -func loadBpf_tp() (*ebpf.CollectionSpec, error) { - reader := bytes.NewReader(_Bpf_tpBytes) - spec, err := ebpf.LoadCollectionSpecFromReader(reader) - if err != nil { - return nil, fmt.Errorf("can't load bpf_tp: %w", err) - } - - return spec, err -} - -// loadBpf_tpObjects loads bpf_tp and converts it into a struct. -// -// The following types are suitable as obj argument: -// -// *bpf_tpObjects -// *bpf_tpPrograms -// *bpf_tpMaps -// -// See ebpf.CollectionSpec.LoadAndAssign documentation for details. -func loadBpf_tpObjects(obj interface{}, opts *ebpf.CollectionOptions) error { - spec, err := loadBpf_tp() - if err != nil { - return err - } - - return spec.LoadAndAssign(obj, opts) -} - -// bpf_tpSpecs contains maps and programs before they are loaded into the kernel. -// -// It can be passed ebpf.CollectionSpec.Assign. -type bpf_tpSpecs struct { - bpf_tpProgramSpecs - bpf_tpMapSpecs -} - -// bpf_tpSpecs contains programs before they are loaded into the kernel. -// -// It can be passed ebpf.CollectionSpec.Assign. -type bpf_tpProgramSpecs struct { - UprobeServeHTTP *ebpf.ProgramSpec `ebpf:"uprobe_ServeHTTP"` - UprobeServeHTTPReturns *ebpf.ProgramSpec `ebpf:"uprobe_ServeHTTPReturns"` - UprobeConnServe *ebpf.ProgramSpec `ebpf:"uprobe_connServe"` - UprobeConnServeRet *ebpf.ProgramSpec `ebpf:"uprobe_connServeRet"` - UprobeExecDC *ebpf.ProgramSpec `ebpf:"uprobe_execDC"` - UprobeHttp2FramerWriteHeaders *ebpf.ProgramSpec `ebpf:"uprobe_http2FramerWriteHeaders"` - UprobeHttp2FramerWriteHeadersReturns *ebpf.ProgramSpec `ebpf:"uprobe_http2FramerWriteHeaders_returns"` - UprobeHttp2ResponseWriterStateWriteHeader *ebpf.ProgramSpec `ebpf:"uprobe_http2ResponseWriterStateWriteHeader"` - UprobeHttp2RoundTrip *ebpf.ProgramSpec `ebpf:"uprobe_http2RoundTrip"` - UprobeNetFdRead *ebpf.ProgramSpec `ebpf:"uprobe_netFdRead"` - UprobePersistConnRoundTrip *ebpf.ProgramSpec `ebpf:"uprobe_persistConnRoundTrip"` - UprobeQueryDC *ebpf.ProgramSpec `ebpf:"uprobe_queryDC"` - UprobeQueryReturn *ebpf.ProgramSpec `ebpf:"uprobe_queryReturn"` - UprobeReadRequestReturns *ebpf.ProgramSpec `ebpf:"uprobe_readRequestReturns"` - UprobeRoundTrip *ebpf.ProgramSpec `ebpf:"uprobe_roundTrip"` - UprobeRoundTripReturn *ebpf.ProgramSpec `ebpf:"uprobe_roundTripReturn"` - UprobeWriteSubset *ebpf.ProgramSpec `ebpf:"uprobe_writeSubset"` -} - -// bpf_tpMapSpecs contains maps before they are loaded into the kernel. -// -// It can be passed ebpf.CollectionSpec.Assign. -type bpf_tpMapSpecs struct { - Events *ebpf.MapSpec `ebpf:"events"` - FramerInvocationMap *ebpf.MapSpec `ebpf:"framer_invocation_map"` - GoTraceMap *ebpf.MapSpec `ebpf:"go_trace_map"` - GolangMapbucketStorageMap *ebpf.MapSpec `ebpf:"golang_mapbucket_storage_map"` - HeaderReqMap *ebpf.MapSpec `ebpf:"header_req_map"` - Http2ReqMap *ebpf.MapSpec `ebpf:"http2_req_map"` - OngoingClientConnections *ebpf.MapSpec `ebpf:"ongoing_client_connections"` - OngoingGoroutines *ebpf.MapSpec `ebpf:"ongoing_goroutines"` - OngoingHttpClientRequests *ebpf.MapSpec `ebpf:"ongoing_http_client_requests"` - OngoingHttpClientRequestsData *ebpf.MapSpec `ebpf:"ongoing_http_client_requests_data"` - OngoingHttpServerRequests *ebpf.MapSpec `ebpf:"ongoing_http_server_requests"` - OngoingServerConnections *ebpf.MapSpec `ebpf:"ongoing_server_connections"` - OngoingSqlQueries *ebpf.MapSpec `ebpf:"ongoing_sql_queries"` - TraceMap *ebpf.MapSpec `ebpf:"trace_map"` -} - -// bpf_tpObjects contains all objects after they have been loaded into the kernel. -// -// It can be passed to loadBpf_tpObjects or ebpf.CollectionSpec.LoadAndAssign. -type bpf_tpObjects struct { - bpf_tpPrograms - bpf_tpMaps -} - -func (o *bpf_tpObjects) Close() error { - return _Bpf_tpClose( - &o.bpf_tpPrograms, - &o.bpf_tpMaps, - ) -} - -// bpf_tpMaps contains all maps after they have been loaded into the kernel. -// -// It can be passed to loadBpf_tpObjects or ebpf.CollectionSpec.LoadAndAssign. -type bpf_tpMaps struct { - Events *ebpf.Map `ebpf:"events"` - FramerInvocationMap *ebpf.Map `ebpf:"framer_invocation_map"` - GoTraceMap *ebpf.Map `ebpf:"go_trace_map"` - GolangMapbucketStorageMap *ebpf.Map `ebpf:"golang_mapbucket_storage_map"` - HeaderReqMap *ebpf.Map `ebpf:"header_req_map"` - Http2ReqMap *ebpf.Map `ebpf:"http2_req_map"` - OngoingClientConnections *ebpf.Map `ebpf:"ongoing_client_connections"` - OngoingGoroutines *ebpf.Map `ebpf:"ongoing_goroutines"` - OngoingHttpClientRequests *ebpf.Map `ebpf:"ongoing_http_client_requests"` - OngoingHttpClientRequestsData *ebpf.Map `ebpf:"ongoing_http_client_requests_data"` - OngoingHttpServerRequests *ebpf.Map `ebpf:"ongoing_http_server_requests"` - OngoingServerConnections *ebpf.Map `ebpf:"ongoing_server_connections"` - OngoingSqlQueries *ebpf.Map `ebpf:"ongoing_sql_queries"` - TraceMap *ebpf.Map `ebpf:"trace_map"` -} - -func (m *bpf_tpMaps) Close() error { - return _Bpf_tpClose( - m.Events, - m.FramerInvocationMap, - m.GoTraceMap, - m.GolangMapbucketStorageMap, - m.HeaderReqMap, - m.Http2ReqMap, - m.OngoingClientConnections, - m.OngoingGoroutines, - m.OngoingHttpClientRequests, - m.OngoingHttpClientRequestsData, - m.OngoingHttpServerRequests, - m.OngoingServerConnections, - m.OngoingSqlQueries, - m.TraceMap, - ) -} - -// bpf_tpPrograms contains all programs after they have been loaded into the kernel. -// -// It can be passed to loadBpf_tpObjects or ebpf.CollectionSpec.LoadAndAssign. -type bpf_tpPrograms struct { - UprobeServeHTTP *ebpf.Program `ebpf:"uprobe_ServeHTTP"` - UprobeServeHTTPReturns *ebpf.Program `ebpf:"uprobe_ServeHTTPReturns"` - UprobeConnServe *ebpf.Program `ebpf:"uprobe_connServe"` - UprobeConnServeRet *ebpf.Program `ebpf:"uprobe_connServeRet"` - UprobeExecDC *ebpf.Program `ebpf:"uprobe_execDC"` - UprobeHttp2FramerWriteHeaders *ebpf.Program `ebpf:"uprobe_http2FramerWriteHeaders"` - UprobeHttp2FramerWriteHeadersReturns *ebpf.Program `ebpf:"uprobe_http2FramerWriteHeaders_returns"` - UprobeHttp2ResponseWriterStateWriteHeader *ebpf.Program `ebpf:"uprobe_http2ResponseWriterStateWriteHeader"` - UprobeHttp2RoundTrip *ebpf.Program `ebpf:"uprobe_http2RoundTrip"` - UprobeNetFdRead *ebpf.Program `ebpf:"uprobe_netFdRead"` - UprobePersistConnRoundTrip *ebpf.Program `ebpf:"uprobe_persistConnRoundTrip"` - UprobeQueryDC *ebpf.Program `ebpf:"uprobe_queryDC"` - UprobeQueryReturn *ebpf.Program `ebpf:"uprobe_queryReturn"` - UprobeReadRequestReturns *ebpf.Program `ebpf:"uprobe_readRequestReturns"` - UprobeRoundTrip *ebpf.Program `ebpf:"uprobe_roundTrip"` - UprobeRoundTripReturn *ebpf.Program `ebpf:"uprobe_roundTripReturn"` - UprobeWriteSubset *ebpf.Program `ebpf:"uprobe_writeSubset"` -} - -func (p *bpf_tpPrograms) Close() error { - return _Bpf_tpClose( - p.UprobeServeHTTP, - p.UprobeServeHTTPReturns, - p.UprobeConnServe, - p.UprobeConnServeRet, - p.UprobeExecDC, - p.UprobeHttp2FramerWriteHeaders, - p.UprobeHttp2FramerWriteHeadersReturns, - p.UprobeHttp2ResponseWriterStateWriteHeader, - p.UprobeHttp2RoundTrip, - p.UprobeNetFdRead, - p.UprobePersistConnRoundTrip, - p.UprobeQueryDC, - p.UprobeQueryReturn, - p.UprobeReadRequestReturns, - p.UprobeRoundTrip, - p.UprobeRoundTripReturn, - p.UprobeWriteSubset, - ) -} - -func _Bpf_tpClose(closers ...io.Closer) error { - for _, closer := range closers { - if err := closer.Close(); err != nil { - return err - } - } - return nil -} - -// Do not access this directly. -// -//go:embed bpf_tp_bpfel_x86.o -var _Bpf_tpBytes []byte diff --git a/pkg/internal/ebpf/nethttp/bpf_tp_bpfel_x86.o b/pkg/internal/ebpf/nethttp/bpf_tp_bpfel_x86.o deleted file mode 100644 index 682ea3c85..000000000 Binary files a/pkg/internal/ebpf/nethttp/bpf_tp_bpfel_x86.o and /dev/null differ diff --git a/pkg/internal/ebpf/nethttp/bpf_tp_debug_bpfel_arm64.go b/pkg/internal/ebpf/nethttp/bpf_tp_debug_bpfel_arm64.go deleted file mode 100644 index 221e1d2bc..000000000 --- a/pkg/internal/ebpf/nethttp/bpf_tp_debug_bpfel_arm64.go +++ /dev/null @@ -1,277 +0,0 @@ -// Code generated by bpf2go; DO NOT EDIT. -//go:build arm64 - -package nethttp - -import ( - "bytes" - _ "embed" - "fmt" - "io" - - "github.com/cilium/ebpf" -) - -type bpf_tp_debugConnectionInfoT struct { - S_addr [16]uint8 - D_addr [16]uint8 - S_port uint16 - D_port uint16 -} - -type bpf_tp_debugFramerFuncInvocationT struct { - FramerPtr uint64 - Tp bpf_tp_debugTpInfoT - InitialN int64 -} - -type bpf_tp_debugGoroutineMetadata struct { - Parent uint64 - Timestamp uint64 -} - -type bpf_tp_debugHttpClientDataT struct { - Method [7]uint8 - Path [100]uint8 - _ [5]byte - ContentLength int64 - Pid struct { - HostPid uint32 - UserPid uint32 - Ns uint32 - } - _ [4]byte -} - -type bpf_tp_debugHttpFuncInvocationT struct { - StartMonotimeNs uint64 - Tp bpf_tp_debugTpInfoT -} - -type bpf_tp_debugServerHttpFuncInvocationT struct { - StartMonotimeNs uint64 - Tp bpf_tp_debugTpInfoT - Response uint64 - Method [7]uint8 - Path [100]uint8 - _ [5]byte - ContentLength uint64 - Http2 uint8 - _ [7]byte -} - -type bpf_tp_debugSqlFuncInvocationT struct { - StartMonotimeNs uint64 - SqlParam uint64 - QueryLen uint64 - Tp bpf_tp_debugTpInfoT -} - -type bpf_tp_debugTpInfoPidT struct { - Tp bpf_tp_debugTpInfoT - Pid uint32 - Valid uint8 - _ [3]byte -} - -type bpf_tp_debugTpInfoT struct { - TraceId [16]uint8 - SpanId [8]uint8 - ParentId [8]uint8 - Ts uint64 - Flags uint8 - _ [7]byte -} - -// loadBpf_tp_debug returns the embedded CollectionSpec for bpf_tp_debug. -func loadBpf_tp_debug() (*ebpf.CollectionSpec, error) { - reader := bytes.NewReader(_Bpf_tp_debugBytes) - spec, err := ebpf.LoadCollectionSpecFromReader(reader) - if err != nil { - return nil, fmt.Errorf("can't load bpf_tp_debug: %w", err) - } - - return spec, err -} - -// loadBpf_tp_debugObjects loads bpf_tp_debug and converts it into a struct. -// -// The following types are suitable as obj argument: -// -// *bpf_tp_debugObjects -// *bpf_tp_debugPrograms -// *bpf_tp_debugMaps -// -// See ebpf.CollectionSpec.LoadAndAssign documentation for details. -func loadBpf_tp_debugObjects(obj interface{}, opts *ebpf.CollectionOptions) error { - spec, err := loadBpf_tp_debug() - if err != nil { - return err - } - - return spec.LoadAndAssign(obj, opts) -} - -// bpf_tp_debugSpecs contains maps and programs before they are loaded into the kernel. -// -// It can be passed ebpf.CollectionSpec.Assign. -type bpf_tp_debugSpecs struct { - bpf_tp_debugProgramSpecs - bpf_tp_debugMapSpecs -} - -// bpf_tp_debugSpecs contains programs before they are loaded into the kernel. -// -// It can be passed ebpf.CollectionSpec.Assign. -type bpf_tp_debugProgramSpecs struct { - UprobeServeHTTP *ebpf.ProgramSpec `ebpf:"uprobe_ServeHTTP"` - UprobeServeHTTPReturns *ebpf.ProgramSpec `ebpf:"uprobe_ServeHTTPReturns"` - UprobeConnServe *ebpf.ProgramSpec `ebpf:"uprobe_connServe"` - UprobeConnServeRet *ebpf.ProgramSpec `ebpf:"uprobe_connServeRet"` - UprobeExecDC *ebpf.ProgramSpec `ebpf:"uprobe_execDC"` - UprobeHttp2FramerWriteHeaders *ebpf.ProgramSpec `ebpf:"uprobe_http2FramerWriteHeaders"` - UprobeHttp2FramerWriteHeadersReturns *ebpf.ProgramSpec `ebpf:"uprobe_http2FramerWriteHeaders_returns"` - UprobeHttp2ResponseWriterStateWriteHeader *ebpf.ProgramSpec `ebpf:"uprobe_http2ResponseWriterStateWriteHeader"` - UprobeHttp2RoundTrip *ebpf.ProgramSpec `ebpf:"uprobe_http2RoundTrip"` - UprobeNetFdRead *ebpf.ProgramSpec `ebpf:"uprobe_netFdRead"` - UprobePersistConnRoundTrip *ebpf.ProgramSpec `ebpf:"uprobe_persistConnRoundTrip"` - UprobeQueryDC *ebpf.ProgramSpec `ebpf:"uprobe_queryDC"` - UprobeQueryReturn *ebpf.ProgramSpec `ebpf:"uprobe_queryReturn"` - UprobeReadRequestReturns *ebpf.ProgramSpec `ebpf:"uprobe_readRequestReturns"` - UprobeRoundTrip *ebpf.ProgramSpec `ebpf:"uprobe_roundTrip"` - UprobeRoundTripReturn *ebpf.ProgramSpec `ebpf:"uprobe_roundTripReturn"` - UprobeWriteSubset *ebpf.ProgramSpec `ebpf:"uprobe_writeSubset"` -} - -// bpf_tp_debugMapSpecs contains maps before they are loaded into the kernel. -// -// It can be passed ebpf.CollectionSpec.Assign. -type bpf_tp_debugMapSpecs struct { - Events *ebpf.MapSpec `ebpf:"events"` - FramerInvocationMap *ebpf.MapSpec `ebpf:"framer_invocation_map"` - GoTraceMap *ebpf.MapSpec `ebpf:"go_trace_map"` - GolangMapbucketStorageMap *ebpf.MapSpec `ebpf:"golang_mapbucket_storage_map"` - HeaderReqMap *ebpf.MapSpec `ebpf:"header_req_map"` - Http2ReqMap *ebpf.MapSpec `ebpf:"http2_req_map"` - OngoingClientConnections *ebpf.MapSpec `ebpf:"ongoing_client_connections"` - OngoingGoroutines *ebpf.MapSpec `ebpf:"ongoing_goroutines"` - OngoingHttpClientRequests *ebpf.MapSpec `ebpf:"ongoing_http_client_requests"` - OngoingHttpClientRequestsData *ebpf.MapSpec `ebpf:"ongoing_http_client_requests_data"` - OngoingHttpServerRequests *ebpf.MapSpec `ebpf:"ongoing_http_server_requests"` - OngoingServerConnections *ebpf.MapSpec `ebpf:"ongoing_server_connections"` - OngoingSqlQueries *ebpf.MapSpec `ebpf:"ongoing_sql_queries"` - TraceMap *ebpf.MapSpec `ebpf:"trace_map"` -} - -// bpf_tp_debugObjects contains all objects after they have been loaded into the kernel. -// -// It can be passed to loadBpf_tp_debugObjects or ebpf.CollectionSpec.LoadAndAssign. -type bpf_tp_debugObjects struct { - bpf_tp_debugPrograms - bpf_tp_debugMaps -} - -func (o *bpf_tp_debugObjects) Close() error { - return _Bpf_tp_debugClose( - &o.bpf_tp_debugPrograms, - &o.bpf_tp_debugMaps, - ) -} - -// bpf_tp_debugMaps contains all maps after they have been loaded into the kernel. -// -// It can be passed to loadBpf_tp_debugObjects or ebpf.CollectionSpec.LoadAndAssign. -type bpf_tp_debugMaps struct { - Events *ebpf.Map `ebpf:"events"` - FramerInvocationMap *ebpf.Map `ebpf:"framer_invocation_map"` - GoTraceMap *ebpf.Map `ebpf:"go_trace_map"` - GolangMapbucketStorageMap *ebpf.Map `ebpf:"golang_mapbucket_storage_map"` - HeaderReqMap *ebpf.Map `ebpf:"header_req_map"` - Http2ReqMap *ebpf.Map `ebpf:"http2_req_map"` - OngoingClientConnections *ebpf.Map `ebpf:"ongoing_client_connections"` - OngoingGoroutines *ebpf.Map `ebpf:"ongoing_goroutines"` - OngoingHttpClientRequests *ebpf.Map `ebpf:"ongoing_http_client_requests"` - OngoingHttpClientRequestsData *ebpf.Map `ebpf:"ongoing_http_client_requests_data"` - OngoingHttpServerRequests *ebpf.Map `ebpf:"ongoing_http_server_requests"` - OngoingServerConnections *ebpf.Map `ebpf:"ongoing_server_connections"` - OngoingSqlQueries *ebpf.Map `ebpf:"ongoing_sql_queries"` - TraceMap *ebpf.Map `ebpf:"trace_map"` -} - -func (m *bpf_tp_debugMaps) Close() error { - return _Bpf_tp_debugClose( - m.Events, - m.FramerInvocationMap, - m.GoTraceMap, - m.GolangMapbucketStorageMap, - m.HeaderReqMap, - m.Http2ReqMap, - m.OngoingClientConnections, - m.OngoingGoroutines, - m.OngoingHttpClientRequests, - m.OngoingHttpClientRequestsData, - m.OngoingHttpServerRequests, - m.OngoingServerConnections, - m.OngoingSqlQueries, - m.TraceMap, - ) -} - -// bpf_tp_debugPrograms contains all programs after they have been loaded into the kernel. -// -// It can be passed to loadBpf_tp_debugObjects or ebpf.CollectionSpec.LoadAndAssign. -type bpf_tp_debugPrograms struct { - UprobeServeHTTP *ebpf.Program `ebpf:"uprobe_ServeHTTP"` - UprobeServeHTTPReturns *ebpf.Program `ebpf:"uprobe_ServeHTTPReturns"` - UprobeConnServe *ebpf.Program `ebpf:"uprobe_connServe"` - UprobeConnServeRet *ebpf.Program `ebpf:"uprobe_connServeRet"` - UprobeExecDC *ebpf.Program `ebpf:"uprobe_execDC"` - UprobeHttp2FramerWriteHeaders *ebpf.Program `ebpf:"uprobe_http2FramerWriteHeaders"` - UprobeHttp2FramerWriteHeadersReturns *ebpf.Program `ebpf:"uprobe_http2FramerWriteHeaders_returns"` - UprobeHttp2ResponseWriterStateWriteHeader *ebpf.Program `ebpf:"uprobe_http2ResponseWriterStateWriteHeader"` - UprobeHttp2RoundTrip *ebpf.Program `ebpf:"uprobe_http2RoundTrip"` - UprobeNetFdRead *ebpf.Program `ebpf:"uprobe_netFdRead"` - UprobePersistConnRoundTrip *ebpf.Program `ebpf:"uprobe_persistConnRoundTrip"` - UprobeQueryDC *ebpf.Program `ebpf:"uprobe_queryDC"` - UprobeQueryReturn *ebpf.Program `ebpf:"uprobe_queryReturn"` - UprobeReadRequestReturns *ebpf.Program `ebpf:"uprobe_readRequestReturns"` - UprobeRoundTrip *ebpf.Program `ebpf:"uprobe_roundTrip"` - UprobeRoundTripReturn *ebpf.Program `ebpf:"uprobe_roundTripReturn"` - UprobeWriteSubset *ebpf.Program `ebpf:"uprobe_writeSubset"` -} - -func (p *bpf_tp_debugPrograms) Close() error { - return _Bpf_tp_debugClose( - p.UprobeServeHTTP, - p.UprobeServeHTTPReturns, - p.UprobeConnServe, - p.UprobeConnServeRet, - p.UprobeExecDC, - p.UprobeHttp2FramerWriteHeaders, - p.UprobeHttp2FramerWriteHeadersReturns, - p.UprobeHttp2ResponseWriterStateWriteHeader, - p.UprobeHttp2RoundTrip, - p.UprobeNetFdRead, - p.UprobePersistConnRoundTrip, - p.UprobeQueryDC, - p.UprobeQueryReturn, - p.UprobeReadRequestReturns, - p.UprobeRoundTrip, - p.UprobeRoundTripReturn, - p.UprobeWriteSubset, - ) -} - -func _Bpf_tp_debugClose(closers ...io.Closer) error { - for _, closer := range closers { - if err := closer.Close(); err != nil { - return err - } - } - return nil -} - -// Do not access this directly. -// -//go:embed bpf_tp_debug_bpfel_arm64.o -var _Bpf_tp_debugBytes []byte diff --git a/pkg/internal/ebpf/nethttp/bpf_tp_debug_bpfel_arm64.o b/pkg/internal/ebpf/nethttp/bpf_tp_debug_bpfel_arm64.o deleted file mode 100644 index 13f3d752b..000000000 Binary files a/pkg/internal/ebpf/nethttp/bpf_tp_debug_bpfel_arm64.o and /dev/null differ diff --git a/pkg/internal/ebpf/nethttp/bpf_tp_debug_bpfel_x86.go b/pkg/internal/ebpf/nethttp/bpf_tp_debug_bpfel_x86.go deleted file mode 100644 index e99ee5c72..000000000 --- a/pkg/internal/ebpf/nethttp/bpf_tp_debug_bpfel_x86.go +++ /dev/null @@ -1,277 +0,0 @@ -// Code generated by bpf2go; DO NOT EDIT. -//go:build 386 || amd64 - -package nethttp - -import ( - "bytes" - _ "embed" - "fmt" - "io" - - "github.com/cilium/ebpf" -) - -type bpf_tp_debugConnectionInfoT struct { - S_addr [16]uint8 - D_addr [16]uint8 - S_port uint16 - D_port uint16 -} - -type bpf_tp_debugFramerFuncInvocationT struct { - FramerPtr uint64 - Tp bpf_tp_debugTpInfoT - InitialN int64 -} - -type bpf_tp_debugGoroutineMetadata struct { - Parent uint64 - Timestamp uint64 -} - -type bpf_tp_debugHttpClientDataT struct { - Method [7]uint8 - Path [100]uint8 - _ [5]byte - ContentLength int64 - Pid struct { - HostPid uint32 - UserPid uint32 - Ns uint32 - } - _ [4]byte -} - -type bpf_tp_debugHttpFuncInvocationT struct { - StartMonotimeNs uint64 - Tp bpf_tp_debugTpInfoT -} - -type bpf_tp_debugServerHttpFuncInvocationT struct { - StartMonotimeNs uint64 - Tp bpf_tp_debugTpInfoT - Response uint64 - Method [7]uint8 - Path [100]uint8 - _ [5]byte - ContentLength uint64 - Http2 uint8 - _ [7]byte -} - -type bpf_tp_debugSqlFuncInvocationT struct { - StartMonotimeNs uint64 - SqlParam uint64 - QueryLen uint64 - Tp bpf_tp_debugTpInfoT -} - -type bpf_tp_debugTpInfoPidT struct { - Tp bpf_tp_debugTpInfoT - Pid uint32 - Valid uint8 - _ [3]byte -} - -type bpf_tp_debugTpInfoT struct { - TraceId [16]uint8 - SpanId [8]uint8 - ParentId [8]uint8 - Ts uint64 - Flags uint8 - _ [7]byte -} - -// loadBpf_tp_debug returns the embedded CollectionSpec for bpf_tp_debug. -func loadBpf_tp_debug() (*ebpf.CollectionSpec, error) { - reader := bytes.NewReader(_Bpf_tp_debugBytes) - spec, err := ebpf.LoadCollectionSpecFromReader(reader) - if err != nil { - return nil, fmt.Errorf("can't load bpf_tp_debug: %w", err) - } - - return spec, err -} - -// loadBpf_tp_debugObjects loads bpf_tp_debug and converts it into a struct. -// -// The following types are suitable as obj argument: -// -// *bpf_tp_debugObjects -// *bpf_tp_debugPrograms -// *bpf_tp_debugMaps -// -// See ebpf.CollectionSpec.LoadAndAssign documentation for details. -func loadBpf_tp_debugObjects(obj interface{}, opts *ebpf.CollectionOptions) error { - spec, err := loadBpf_tp_debug() - if err != nil { - return err - } - - return spec.LoadAndAssign(obj, opts) -} - -// bpf_tp_debugSpecs contains maps and programs before they are loaded into the kernel. -// -// It can be passed ebpf.CollectionSpec.Assign. -type bpf_tp_debugSpecs struct { - bpf_tp_debugProgramSpecs - bpf_tp_debugMapSpecs -} - -// bpf_tp_debugSpecs contains programs before they are loaded into the kernel. -// -// It can be passed ebpf.CollectionSpec.Assign. -type bpf_tp_debugProgramSpecs struct { - UprobeServeHTTP *ebpf.ProgramSpec `ebpf:"uprobe_ServeHTTP"` - UprobeServeHTTPReturns *ebpf.ProgramSpec `ebpf:"uprobe_ServeHTTPReturns"` - UprobeConnServe *ebpf.ProgramSpec `ebpf:"uprobe_connServe"` - UprobeConnServeRet *ebpf.ProgramSpec `ebpf:"uprobe_connServeRet"` - UprobeExecDC *ebpf.ProgramSpec `ebpf:"uprobe_execDC"` - UprobeHttp2FramerWriteHeaders *ebpf.ProgramSpec `ebpf:"uprobe_http2FramerWriteHeaders"` - UprobeHttp2FramerWriteHeadersReturns *ebpf.ProgramSpec `ebpf:"uprobe_http2FramerWriteHeaders_returns"` - UprobeHttp2ResponseWriterStateWriteHeader *ebpf.ProgramSpec `ebpf:"uprobe_http2ResponseWriterStateWriteHeader"` - UprobeHttp2RoundTrip *ebpf.ProgramSpec `ebpf:"uprobe_http2RoundTrip"` - UprobeNetFdRead *ebpf.ProgramSpec `ebpf:"uprobe_netFdRead"` - UprobePersistConnRoundTrip *ebpf.ProgramSpec `ebpf:"uprobe_persistConnRoundTrip"` - UprobeQueryDC *ebpf.ProgramSpec `ebpf:"uprobe_queryDC"` - UprobeQueryReturn *ebpf.ProgramSpec `ebpf:"uprobe_queryReturn"` - UprobeReadRequestReturns *ebpf.ProgramSpec `ebpf:"uprobe_readRequestReturns"` - UprobeRoundTrip *ebpf.ProgramSpec `ebpf:"uprobe_roundTrip"` - UprobeRoundTripReturn *ebpf.ProgramSpec `ebpf:"uprobe_roundTripReturn"` - UprobeWriteSubset *ebpf.ProgramSpec `ebpf:"uprobe_writeSubset"` -} - -// bpf_tp_debugMapSpecs contains maps before they are loaded into the kernel. -// -// It can be passed ebpf.CollectionSpec.Assign. -type bpf_tp_debugMapSpecs struct { - Events *ebpf.MapSpec `ebpf:"events"` - FramerInvocationMap *ebpf.MapSpec `ebpf:"framer_invocation_map"` - GoTraceMap *ebpf.MapSpec `ebpf:"go_trace_map"` - GolangMapbucketStorageMap *ebpf.MapSpec `ebpf:"golang_mapbucket_storage_map"` - HeaderReqMap *ebpf.MapSpec `ebpf:"header_req_map"` - Http2ReqMap *ebpf.MapSpec `ebpf:"http2_req_map"` - OngoingClientConnections *ebpf.MapSpec `ebpf:"ongoing_client_connections"` - OngoingGoroutines *ebpf.MapSpec `ebpf:"ongoing_goroutines"` - OngoingHttpClientRequests *ebpf.MapSpec `ebpf:"ongoing_http_client_requests"` - OngoingHttpClientRequestsData *ebpf.MapSpec `ebpf:"ongoing_http_client_requests_data"` - OngoingHttpServerRequests *ebpf.MapSpec `ebpf:"ongoing_http_server_requests"` - OngoingServerConnections *ebpf.MapSpec `ebpf:"ongoing_server_connections"` - OngoingSqlQueries *ebpf.MapSpec `ebpf:"ongoing_sql_queries"` - TraceMap *ebpf.MapSpec `ebpf:"trace_map"` -} - -// bpf_tp_debugObjects contains all objects after they have been loaded into the kernel. -// -// It can be passed to loadBpf_tp_debugObjects or ebpf.CollectionSpec.LoadAndAssign. -type bpf_tp_debugObjects struct { - bpf_tp_debugPrograms - bpf_tp_debugMaps -} - -func (o *bpf_tp_debugObjects) Close() error { - return _Bpf_tp_debugClose( - &o.bpf_tp_debugPrograms, - &o.bpf_tp_debugMaps, - ) -} - -// bpf_tp_debugMaps contains all maps after they have been loaded into the kernel. -// -// It can be passed to loadBpf_tp_debugObjects or ebpf.CollectionSpec.LoadAndAssign. -type bpf_tp_debugMaps struct { - Events *ebpf.Map `ebpf:"events"` - FramerInvocationMap *ebpf.Map `ebpf:"framer_invocation_map"` - GoTraceMap *ebpf.Map `ebpf:"go_trace_map"` - GolangMapbucketStorageMap *ebpf.Map `ebpf:"golang_mapbucket_storage_map"` - HeaderReqMap *ebpf.Map `ebpf:"header_req_map"` - Http2ReqMap *ebpf.Map `ebpf:"http2_req_map"` - OngoingClientConnections *ebpf.Map `ebpf:"ongoing_client_connections"` - OngoingGoroutines *ebpf.Map `ebpf:"ongoing_goroutines"` - OngoingHttpClientRequests *ebpf.Map `ebpf:"ongoing_http_client_requests"` - OngoingHttpClientRequestsData *ebpf.Map `ebpf:"ongoing_http_client_requests_data"` - OngoingHttpServerRequests *ebpf.Map `ebpf:"ongoing_http_server_requests"` - OngoingServerConnections *ebpf.Map `ebpf:"ongoing_server_connections"` - OngoingSqlQueries *ebpf.Map `ebpf:"ongoing_sql_queries"` - TraceMap *ebpf.Map `ebpf:"trace_map"` -} - -func (m *bpf_tp_debugMaps) Close() error { - return _Bpf_tp_debugClose( - m.Events, - m.FramerInvocationMap, - m.GoTraceMap, - m.GolangMapbucketStorageMap, - m.HeaderReqMap, - m.Http2ReqMap, - m.OngoingClientConnections, - m.OngoingGoroutines, - m.OngoingHttpClientRequests, - m.OngoingHttpClientRequestsData, - m.OngoingHttpServerRequests, - m.OngoingServerConnections, - m.OngoingSqlQueries, - m.TraceMap, - ) -} - -// bpf_tp_debugPrograms contains all programs after they have been loaded into the kernel. -// -// It can be passed to loadBpf_tp_debugObjects or ebpf.CollectionSpec.LoadAndAssign. -type bpf_tp_debugPrograms struct { - UprobeServeHTTP *ebpf.Program `ebpf:"uprobe_ServeHTTP"` - UprobeServeHTTPReturns *ebpf.Program `ebpf:"uprobe_ServeHTTPReturns"` - UprobeConnServe *ebpf.Program `ebpf:"uprobe_connServe"` - UprobeConnServeRet *ebpf.Program `ebpf:"uprobe_connServeRet"` - UprobeExecDC *ebpf.Program `ebpf:"uprobe_execDC"` - UprobeHttp2FramerWriteHeaders *ebpf.Program `ebpf:"uprobe_http2FramerWriteHeaders"` - UprobeHttp2FramerWriteHeadersReturns *ebpf.Program `ebpf:"uprobe_http2FramerWriteHeaders_returns"` - UprobeHttp2ResponseWriterStateWriteHeader *ebpf.Program `ebpf:"uprobe_http2ResponseWriterStateWriteHeader"` - UprobeHttp2RoundTrip *ebpf.Program `ebpf:"uprobe_http2RoundTrip"` - UprobeNetFdRead *ebpf.Program `ebpf:"uprobe_netFdRead"` - UprobePersistConnRoundTrip *ebpf.Program `ebpf:"uprobe_persistConnRoundTrip"` - UprobeQueryDC *ebpf.Program `ebpf:"uprobe_queryDC"` - UprobeQueryReturn *ebpf.Program `ebpf:"uprobe_queryReturn"` - UprobeReadRequestReturns *ebpf.Program `ebpf:"uprobe_readRequestReturns"` - UprobeRoundTrip *ebpf.Program `ebpf:"uprobe_roundTrip"` - UprobeRoundTripReturn *ebpf.Program `ebpf:"uprobe_roundTripReturn"` - UprobeWriteSubset *ebpf.Program `ebpf:"uprobe_writeSubset"` -} - -func (p *bpf_tp_debugPrograms) Close() error { - return _Bpf_tp_debugClose( - p.UprobeServeHTTP, - p.UprobeServeHTTPReturns, - p.UprobeConnServe, - p.UprobeConnServeRet, - p.UprobeExecDC, - p.UprobeHttp2FramerWriteHeaders, - p.UprobeHttp2FramerWriteHeadersReturns, - p.UprobeHttp2ResponseWriterStateWriteHeader, - p.UprobeHttp2RoundTrip, - p.UprobeNetFdRead, - p.UprobePersistConnRoundTrip, - p.UprobeQueryDC, - p.UprobeQueryReturn, - p.UprobeReadRequestReturns, - p.UprobeRoundTrip, - p.UprobeRoundTripReturn, - p.UprobeWriteSubset, - ) -} - -func _Bpf_tp_debugClose(closers ...io.Closer) error { - for _, closer := range closers { - if err := closer.Close(); err != nil { - return err - } - } - return nil -} - -// Do not access this directly. -// -//go:embed bpf_tp_debug_bpfel_x86.o -var _Bpf_tp_debugBytes []byte diff --git a/pkg/internal/ebpf/nethttp/bpf_tp_debug_bpfel_x86.o b/pkg/internal/ebpf/nethttp/bpf_tp_debug_bpfel_x86.o deleted file mode 100644 index 696027a15..000000000 Binary files a/pkg/internal/ebpf/nethttp/bpf_tp_debug_bpfel_x86.o and /dev/null differ diff --git a/pkg/internal/ebpf/watcher/bpf_bpfel_arm64.go b/pkg/internal/ebpf/watcher/bpf_bpfel_arm64.go deleted file mode 100644 index e77fb52ff..000000000 --- a/pkg/internal/ebpf/watcher/bpf_bpfel_arm64.go +++ /dev/null @@ -1,124 +0,0 @@ -// Code generated by bpf2go; DO NOT EDIT. -//go:build arm64 - -package watcher - -import ( - "bytes" - _ "embed" - "fmt" - "io" - - "github.com/cilium/ebpf" -) - -type bpfWatchInfoT struct { - Flags uint64 - Payload uint64 -} - -// loadBpf returns the embedded CollectionSpec for bpf. -func loadBpf() (*ebpf.CollectionSpec, error) { - reader := bytes.NewReader(_BpfBytes) - spec, err := ebpf.LoadCollectionSpecFromReader(reader) - if err != nil { - return nil, fmt.Errorf("can't load bpf: %w", err) - } - - return spec, err -} - -// loadBpfObjects loads bpf and converts it into a struct. -// -// The following types are suitable as obj argument: -// -// *bpfObjects -// *bpfPrograms -// *bpfMaps -// -// See ebpf.CollectionSpec.LoadAndAssign documentation for details. -func loadBpfObjects(obj interface{}, opts *ebpf.CollectionOptions) error { - spec, err := loadBpf() - if err != nil { - return err - } - - return spec.LoadAndAssign(obj, opts) -} - -// bpfSpecs contains maps and programs before they are loaded into the kernel. -// -// It can be passed ebpf.CollectionSpec.Assign. -type bpfSpecs struct { - bpfProgramSpecs - bpfMapSpecs -} - -// bpfSpecs contains programs before they are loaded into the kernel. -// -// It can be passed ebpf.CollectionSpec.Assign. -type bpfProgramSpecs struct { - KprobeSysBind *ebpf.ProgramSpec `ebpf:"kprobe_sys_bind"` -} - -// bpfMapSpecs contains maps before they are loaded into the kernel. -// -// It can be passed ebpf.CollectionSpec.Assign. -type bpfMapSpecs struct { - WatchEvents *ebpf.MapSpec `ebpf:"watch_events"` -} - -// bpfObjects contains all objects after they have been loaded into the kernel. -// -// It can be passed to loadBpfObjects or ebpf.CollectionSpec.LoadAndAssign. -type bpfObjects struct { - bpfPrograms - bpfMaps -} - -func (o *bpfObjects) Close() error { - return _BpfClose( - &o.bpfPrograms, - &o.bpfMaps, - ) -} - -// bpfMaps contains all maps after they have been loaded into the kernel. -// -// It can be passed to loadBpfObjects or ebpf.CollectionSpec.LoadAndAssign. -type bpfMaps struct { - WatchEvents *ebpf.Map `ebpf:"watch_events"` -} - -func (m *bpfMaps) Close() error { - return _BpfClose( - m.WatchEvents, - ) -} - -// bpfPrograms contains all programs after they have been loaded into the kernel. -// -// It can be passed to loadBpfObjects or ebpf.CollectionSpec.LoadAndAssign. -type bpfPrograms struct { - KprobeSysBind *ebpf.Program `ebpf:"kprobe_sys_bind"` -} - -func (p *bpfPrograms) Close() error { - return _BpfClose( - p.KprobeSysBind, - ) -} - -func _BpfClose(closers ...io.Closer) error { - for _, closer := range closers { - if err := closer.Close(); err != nil { - return err - } - } - return nil -} - -// Do not access this directly. -// -//go:embed bpf_bpfel_arm64.o -var _BpfBytes []byte diff --git a/pkg/internal/ebpf/watcher/bpf_bpfel_arm64.o b/pkg/internal/ebpf/watcher/bpf_bpfel_arm64.o deleted file mode 100644 index c373be5aa..000000000 Binary files a/pkg/internal/ebpf/watcher/bpf_bpfel_arm64.o and /dev/null differ diff --git a/pkg/internal/ebpf/watcher/bpf_bpfel_x86.go b/pkg/internal/ebpf/watcher/bpf_bpfel_x86.go deleted file mode 100644 index d5032d00e..000000000 --- a/pkg/internal/ebpf/watcher/bpf_bpfel_x86.go +++ /dev/null @@ -1,124 +0,0 @@ -// Code generated by bpf2go; DO NOT EDIT. -//go:build 386 || amd64 - -package watcher - -import ( - "bytes" - _ "embed" - "fmt" - "io" - - "github.com/cilium/ebpf" -) - -type bpfWatchInfoT struct { - Flags uint64 - Payload uint64 -} - -// loadBpf returns the embedded CollectionSpec for bpf. -func loadBpf() (*ebpf.CollectionSpec, error) { - reader := bytes.NewReader(_BpfBytes) - spec, err := ebpf.LoadCollectionSpecFromReader(reader) - if err != nil { - return nil, fmt.Errorf("can't load bpf: %w", err) - } - - return spec, err -} - -// loadBpfObjects loads bpf and converts it into a struct. -// -// The following types are suitable as obj argument: -// -// *bpfObjects -// *bpfPrograms -// *bpfMaps -// -// See ebpf.CollectionSpec.LoadAndAssign documentation for details. -func loadBpfObjects(obj interface{}, opts *ebpf.CollectionOptions) error { - spec, err := loadBpf() - if err != nil { - return err - } - - return spec.LoadAndAssign(obj, opts) -} - -// bpfSpecs contains maps and programs before they are loaded into the kernel. -// -// It can be passed ebpf.CollectionSpec.Assign. -type bpfSpecs struct { - bpfProgramSpecs - bpfMapSpecs -} - -// bpfSpecs contains programs before they are loaded into the kernel. -// -// It can be passed ebpf.CollectionSpec.Assign. -type bpfProgramSpecs struct { - KprobeSysBind *ebpf.ProgramSpec `ebpf:"kprobe_sys_bind"` -} - -// bpfMapSpecs contains maps before they are loaded into the kernel. -// -// It can be passed ebpf.CollectionSpec.Assign. -type bpfMapSpecs struct { - WatchEvents *ebpf.MapSpec `ebpf:"watch_events"` -} - -// bpfObjects contains all objects after they have been loaded into the kernel. -// -// It can be passed to loadBpfObjects or ebpf.CollectionSpec.LoadAndAssign. -type bpfObjects struct { - bpfPrograms - bpfMaps -} - -func (o *bpfObjects) Close() error { - return _BpfClose( - &o.bpfPrograms, - &o.bpfMaps, - ) -} - -// bpfMaps contains all maps after they have been loaded into the kernel. -// -// It can be passed to loadBpfObjects or ebpf.CollectionSpec.LoadAndAssign. -type bpfMaps struct { - WatchEvents *ebpf.Map `ebpf:"watch_events"` -} - -func (m *bpfMaps) Close() error { - return _BpfClose( - m.WatchEvents, - ) -} - -// bpfPrograms contains all programs after they have been loaded into the kernel. -// -// It can be passed to loadBpfObjects or ebpf.CollectionSpec.LoadAndAssign. -type bpfPrograms struct { - KprobeSysBind *ebpf.Program `ebpf:"kprobe_sys_bind"` -} - -func (p *bpfPrograms) Close() error { - return _BpfClose( - p.KprobeSysBind, - ) -} - -func _BpfClose(closers ...io.Closer) error { - for _, closer := range closers { - if err := closer.Close(); err != nil { - return err - } - } - return nil -} - -// Do not access this directly. -// -//go:embed bpf_bpfel_x86.o -var _BpfBytes []byte diff --git a/pkg/internal/ebpf/watcher/bpf_bpfel_x86.o b/pkg/internal/ebpf/watcher/bpf_bpfel_x86.o deleted file mode 100644 index 95a3a99a6..000000000 Binary files a/pkg/internal/ebpf/watcher/bpf_bpfel_x86.o and /dev/null differ diff --git a/pkg/internal/ebpf/watcher/bpf_debug_bpfel_arm64.go b/pkg/internal/ebpf/watcher/bpf_debug_bpfel_arm64.go deleted file mode 100644 index b4f1ff74f..000000000 --- a/pkg/internal/ebpf/watcher/bpf_debug_bpfel_arm64.go +++ /dev/null @@ -1,124 +0,0 @@ -// Code generated by bpf2go; DO NOT EDIT. -//go:build arm64 - -package watcher - -import ( - "bytes" - _ "embed" - "fmt" - "io" - - "github.com/cilium/ebpf" -) - -type bpf_debugWatchInfoT struct { - Flags uint64 - Payload uint64 -} - -// loadBpf_debug returns the embedded CollectionSpec for bpf_debug. -func loadBpf_debug() (*ebpf.CollectionSpec, error) { - reader := bytes.NewReader(_Bpf_debugBytes) - spec, err := ebpf.LoadCollectionSpecFromReader(reader) - if err != nil { - return nil, fmt.Errorf("can't load bpf_debug: %w", err) - } - - return spec, err -} - -// loadBpf_debugObjects loads bpf_debug and converts it into a struct. -// -// The following types are suitable as obj argument: -// -// *bpf_debugObjects -// *bpf_debugPrograms -// *bpf_debugMaps -// -// See ebpf.CollectionSpec.LoadAndAssign documentation for details. -func loadBpf_debugObjects(obj interface{}, opts *ebpf.CollectionOptions) error { - spec, err := loadBpf_debug() - if err != nil { - return err - } - - return spec.LoadAndAssign(obj, opts) -} - -// bpf_debugSpecs contains maps and programs before they are loaded into the kernel. -// -// It can be passed ebpf.CollectionSpec.Assign. -type bpf_debugSpecs struct { - bpf_debugProgramSpecs - bpf_debugMapSpecs -} - -// bpf_debugSpecs contains programs before they are loaded into the kernel. -// -// It can be passed ebpf.CollectionSpec.Assign. -type bpf_debugProgramSpecs struct { - KprobeSysBind *ebpf.ProgramSpec `ebpf:"kprobe_sys_bind"` -} - -// bpf_debugMapSpecs contains maps before they are loaded into the kernel. -// -// It can be passed ebpf.CollectionSpec.Assign. -type bpf_debugMapSpecs struct { - WatchEvents *ebpf.MapSpec `ebpf:"watch_events"` -} - -// bpf_debugObjects contains all objects after they have been loaded into the kernel. -// -// It can be passed to loadBpf_debugObjects or ebpf.CollectionSpec.LoadAndAssign. -type bpf_debugObjects struct { - bpf_debugPrograms - bpf_debugMaps -} - -func (o *bpf_debugObjects) Close() error { - return _Bpf_debugClose( - &o.bpf_debugPrograms, - &o.bpf_debugMaps, - ) -} - -// bpf_debugMaps contains all maps after they have been loaded into the kernel. -// -// It can be passed to loadBpf_debugObjects or ebpf.CollectionSpec.LoadAndAssign. -type bpf_debugMaps struct { - WatchEvents *ebpf.Map `ebpf:"watch_events"` -} - -func (m *bpf_debugMaps) Close() error { - return _Bpf_debugClose( - m.WatchEvents, - ) -} - -// bpf_debugPrograms contains all programs after they have been loaded into the kernel. -// -// It can be passed to loadBpf_debugObjects or ebpf.CollectionSpec.LoadAndAssign. -type bpf_debugPrograms struct { - KprobeSysBind *ebpf.Program `ebpf:"kprobe_sys_bind"` -} - -func (p *bpf_debugPrograms) Close() error { - return _Bpf_debugClose( - p.KprobeSysBind, - ) -} - -func _Bpf_debugClose(closers ...io.Closer) error { - for _, closer := range closers { - if err := closer.Close(); err != nil { - return err - } - } - return nil -} - -// Do not access this directly. -// -//go:embed bpf_debug_bpfel_arm64.o -var _Bpf_debugBytes []byte diff --git a/pkg/internal/ebpf/watcher/bpf_debug_bpfel_arm64.o b/pkg/internal/ebpf/watcher/bpf_debug_bpfel_arm64.o deleted file mode 100644 index b59e391e2..000000000 Binary files a/pkg/internal/ebpf/watcher/bpf_debug_bpfel_arm64.o and /dev/null differ diff --git a/pkg/internal/ebpf/watcher/bpf_debug_bpfel_x86.go b/pkg/internal/ebpf/watcher/bpf_debug_bpfel_x86.go deleted file mode 100644 index 12163f18e..000000000 --- a/pkg/internal/ebpf/watcher/bpf_debug_bpfel_x86.go +++ /dev/null @@ -1,124 +0,0 @@ -// Code generated by bpf2go; DO NOT EDIT. -//go:build 386 || amd64 - -package watcher - -import ( - "bytes" - _ "embed" - "fmt" - "io" - - "github.com/cilium/ebpf" -) - -type bpf_debugWatchInfoT struct { - Flags uint64 - Payload uint64 -} - -// loadBpf_debug returns the embedded CollectionSpec for bpf_debug. -func loadBpf_debug() (*ebpf.CollectionSpec, error) { - reader := bytes.NewReader(_Bpf_debugBytes) - spec, err := ebpf.LoadCollectionSpecFromReader(reader) - if err != nil { - return nil, fmt.Errorf("can't load bpf_debug: %w", err) - } - - return spec, err -} - -// loadBpf_debugObjects loads bpf_debug and converts it into a struct. -// -// The following types are suitable as obj argument: -// -// *bpf_debugObjects -// *bpf_debugPrograms -// *bpf_debugMaps -// -// See ebpf.CollectionSpec.LoadAndAssign documentation for details. -func loadBpf_debugObjects(obj interface{}, opts *ebpf.CollectionOptions) error { - spec, err := loadBpf_debug() - if err != nil { - return err - } - - return spec.LoadAndAssign(obj, opts) -} - -// bpf_debugSpecs contains maps and programs before they are loaded into the kernel. -// -// It can be passed ebpf.CollectionSpec.Assign. -type bpf_debugSpecs struct { - bpf_debugProgramSpecs - bpf_debugMapSpecs -} - -// bpf_debugSpecs contains programs before they are loaded into the kernel. -// -// It can be passed ebpf.CollectionSpec.Assign. -type bpf_debugProgramSpecs struct { - KprobeSysBind *ebpf.ProgramSpec `ebpf:"kprobe_sys_bind"` -} - -// bpf_debugMapSpecs contains maps before they are loaded into the kernel. -// -// It can be passed ebpf.CollectionSpec.Assign. -type bpf_debugMapSpecs struct { - WatchEvents *ebpf.MapSpec `ebpf:"watch_events"` -} - -// bpf_debugObjects contains all objects after they have been loaded into the kernel. -// -// It can be passed to loadBpf_debugObjects or ebpf.CollectionSpec.LoadAndAssign. -type bpf_debugObjects struct { - bpf_debugPrograms - bpf_debugMaps -} - -func (o *bpf_debugObjects) Close() error { - return _Bpf_debugClose( - &o.bpf_debugPrograms, - &o.bpf_debugMaps, - ) -} - -// bpf_debugMaps contains all maps after they have been loaded into the kernel. -// -// It can be passed to loadBpf_debugObjects or ebpf.CollectionSpec.LoadAndAssign. -type bpf_debugMaps struct { - WatchEvents *ebpf.Map `ebpf:"watch_events"` -} - -func (m *bpf_debugMaps) Close() error { - return _Bpf_debugClose( - m.WatchEvents, - ) -} - -// bpf_debugPrograms contains all programs after they have been loaded into the kernel. -// -// It can be passed to loadBpf_debugObjects or ebpf.CollectionSpec.LoadAndAssign. -type bpf_debugPrograms struct { - KprobeSysBind *ebpf.Program `ebpf:"kprobe_sys_bind"` -} - -func (p *bpf_debugPrograms) Close() error { - return _Bpf_debugClose( - p.KprobeSysBind, - ) -} - -func _Bpf_debugClose(closers ...io.Closer) error { - for _, closer := range closers { - if err := closer.Close(); err != nil { - return err - } - } - return nil -} - -// Do not access this directly. -// -//go:embed bpf_debug_bpfel_x86.o -var _Bpf_debugBytes []byte diff --git a/pkg/internal/ebpf/watcher/bpf_debug_bpfel_x86.o b/pkg/internal/ebpf/watcher/bpf_debug_bpfel_x86.o deleted file mode 100644 index 01babe5d9..000000000 Binary files a/pkg/internal/ebpf/watcher/bpf_debug_bpfel_x86.o and /dev/null differ diff --git a/pkg/internal/netolly/ebpf/net_bpfel_arm64.go b/pkg/internal/netolly/ebpf/net_bpfel_arm64.go deleted file mode 100644 index ae36c90cf..000000000 --- a/pkg/internal/netolly/ebpf/net_bpfel_arm64.go +++ /dev/null @@ -1,154 +0,0 @@ -// Code generated by bpf2go; DO NOT EDIT. -//go:build arm64 - -package ebpf - -import ( - "bytes" - _ "embed" - "fmt" - "io" - - "github.com/cilium/ebpf" -) - -type NetFlowId NetFlowIdT - -type NetFlowIdT struct { - SrcIp struct{ In6U struct{ U6Addr8 [16]uint8 } } - DstIp struct{ In6U struct{ U6Addr8 [16]uint8 } } - EthProtocol uint16 - Direction uint8 - SrcPort uint16 - DstPort uint16 - TransportProtocol uint8 - IfIndex uint32 -} - -type NetFlowMetrics NetFlowMetricsT - -type NetFlowMetricsT struct { - Packets uint32 - Bytes uint64 - StartMonoTimeNs uint64 - EndMonoTimeNs uint64 - Flags uint16 - Errno uint8 -} - -type NetFlowRecordT struct { - Id NetFlowId - Metrics NetFlowMetrics -} - -// LoadNet returns the embedded CollectionSpec for Net. -func LoadNet() (*ebpf.CollectionSpec, error) { - reader := bytes.NewReader(_NetBytes) - spec, err := ebpf.LoadCollectionSpecFromReader(reader) - if err != nil { - return nil, fmt.Errorf("can't load Net: %w", err) - } - - return spec, err -} - -// LoadNetObjects loads Net and converts it into a struct. -// -// The following types are suitable as obj argument: -// -// *NetObjects -// *NetPrograms -// *NetMaps -// -// See ebpf.CollectionSpec.LoadAndAssign documentation for details. -func LoadNetObjects(obj interface{}, opts *ebpf.CollectionOptions) error { - spec, err := LoadNet() - if err != nil { - return err - } - - return spec.LoadAndAssign(obj, opts) -} - -// NetSpecs contains maps and programs before they are loaded into the kernel. -// -// It can be passed ebpf.CollectionSpec.Assign. -type NetSpecs struct { - NetProgramSpecs - NetMapSpecs -} - -// NetSpecs contains programs before they are loaded into the kernel. -// -// It can be passed ebpf.CollectionSpec.Assign. -type NetProgramSpecs struct { - EgressFlowParse *ebpf.ProgramSpec `ebpf:"egress_flow_parse"` - IngressFlowParse *ebpf.ProgramSpec `ebpf:"ingress_flow_parse"` -} - -// NetMapSpecs contains maps before they are loaded into the kernel. -// -// It can be passed ebpf.CollectionSpec.Assign. -type NetMapSpecs struct { - AggregatedFlows *ebpf.MapSpec `ebpf:"aggregated_flows"` - DirectFlows *ebpf.MapSpec `ebpf:"direct_flows"` -} - -// NetObjects contains all objects after they have been loaded into the kernel. -// -// It can be passed to LoadNetObjects or ebpf.CollectionSpec.LoadAndAssign. -type NetObjects struct { - NetPrograms - NetMaps -} - -func (o *NetObjects) Close() error { - return _NetClose( - &o.NetPrograms, - &o.NetMaps, - ) -} - -// NetMaps contains all maps after they have been loaded into the kernel. -// -// It can be passed to LoadNetObjects or ebpf.CollectionSpec.LoadAndAssign. -type NetMaps struct { - AggregatedFlows *ebpf.Map `ebpf:"aggregated_flows"` - DirectFlows *ebpf.Map `ebpf:"direct_flows"` -} - -func (m *NetMaps) Close() error { - return _NetClose( - m.AggregatedFlows, - m.DirectFlows, - ) -} - -// NetPrograms contains all programs after they have been loaded into the kernel. -// -// It can be passed to LoadNetObjects or ebpf.CollectionSpec.LoadAndAssign. -type NetPrograms struct { - EgressFlowParse *ebpf.Program `ebpf:"egress_flow_parse"` - IngressFlowParse *ebpf.Program `ebpf:"ingress_flow_parse"` -} - -func (p *NetPrograms) Close() error { - return _NetClose( - p.EgressFlowParse, - p.IngressFlowParse, - ) -} - -func _NetClose(closers ...io.Closer) error { - for _, closer := range closers { - if err := closer.Close(); err != nil { - return err - } - } - return nil -} - -// Do not access this directly. -// -//go:embed net_bpfel_arm64.o -var _NetBytes []byte diff --git a/pkg/internal/netolly/ebpf/net_bpfel_arm64.o b/pkg/internal/netolly/ebpf/net_bpfel_arm64.o deleted file mode 100644 index 214238a9b..000000000 Binary files a/pkg/internal/netolly/ebpf/net_bpfel_arm64.o and /dev/null differ diff --git a/pkg/internal/netolly/ebpf/net_bpfel_x86.go b/pkg/internal/netolly/ebpf/net_bpfel_x86.go deleted file mode 100644 index 6a0fadc2d..000000000 --- a/pkg/internal/netolly/ebpf/net_bpfel_x86.go +++ /dev/null @@ -1,154 +0,0 @@ -// Code generated by bpf2go; DO NOT EDIT. -//go:build 386 || amd64 - -package ebpf - -import ( - "bytes" - _ "embed" - "fmt" - "io" - - "github.com/cilium/ebpf" -) - -type NetFlowId NetFlowIdT - -type NetFlowIdT struct { - SrcIp struct{ In6U struct{ U6Addr8 [16]uint8 } } - DstIp struct{ In6U struct{ U6Addr8 [16]uint8 } } - EthProtocol uint16 - Direction uint8 - SrcPort uint16 - DstPort uint16 - TransportProtocol uint8 - IfIndex uint32 -} - -type NetFlowMetrics NetFlowMetricsT - -type NetFlowMetricsT struct { - Packets uint32 - Bytes uint64 - StartMonoTimeNs uint64 - EndMonoTimeNs uint64 - Flags uint16 - Errno uint8 -} - -type NetFlowRecordT struct { - Id NetFlowId - Metrics NetFlowMetrics -} - -// LoadNet returns the embedded CollectionSpec for Net. -func LoadNet() (*ebpf.CollectionSpec, error) { - reader := bytes.NewReader(_NetBytes) - spec, err := ebpf.LoadCollectionSpecFromReader(reader) - if err != nil { - return nil, fmt.Errorf("can't load Net: %w", err) - } - - return spec, err -} - -// LoadNetObjects loads Net and converts it into a struct. -// -// The following types are suitable as obj argument: -// -// *NetObjects -// *NetPrograms -// *NetMaps -// -// See ebpf.CollectionSpec.LoadAndAssign documentation for details. -func LoadNetObjects(obj interface{}, opts *ebpf.CollectionOptions) error { - spec, err := LoadNet() - if err != nil { - return err - } - - return spec.LoadAndAssign(obj, opts) -} - -// NetSpecs contains maps and programs before they are loaded into the kernel. -// -// It can be passed ebpf.CollectionSpec.Assign. -type NetSpecs struct { - NetProgramSpecs - NetMapSpecs -} - -// NetSpecs contains programs before they are loaded into the kernel. -// -// It can be passed ebpf.CollectionSpec.Assign. -type NetProgramSpecs struct { - EgressFlowParse *ebpf.ProgramSpec `ebpf:"egress_flow_parse"` - IngressFlowParse *ebpf.ProgramSpec `ebpf:"ingress_flow_parse"` -} - -// NetMapSpecs contains maps before they are loaded into the kernel. -// -// It can be passed ebpf.CollectionSpec.Assign. -type NetMapSpecs struct { - AggregatedFlows *ebpf.MapSpec `ebpf:"aggregated_flows"` - DirectFlows *ebpf.MapSpec `ebpf:"direct_flows"` -} - -// NetObjects contains all objects after they have been loaded into the kernel. -// -// It can be passed to LoadNetObjects or ebpf.CollectionSpec.LoadAndAssign. -type NetObjects struct { - NetPrograms - NetMaps -} - -func (o *NetObjects) Close() error { - return _NetClose( - &o.NetPrograms, - &o.NetMaps, - ) -} - -// NetMaps contains all maps after they have been loaded into the kernel. -// -// It can be passed to LoadNetObjects or ebpf.CollectionSpec.LoadAndAssign. -type NetMaps struct { - AggregatedFlows *ebpf.Map `ebpf:"aggregated_flows"` - DirectFlows *ebpf.Map `ebpf:"direct_flows"` -} - -func (m *NetMaps) Close() error { - return _NetClose( - m.AggregatedFlows, - m.DirectFlows, - ) -} - -// NetPrograms contains all programs after they have been loaded into the kernel. -// -// It can be passed to LoadNetObjects or ebpf.CollectionSpec.LoadAndAssign. -type NetPrograms struct { - EgressFlowParse *ebpf.Program `ebpf:"egress_flow_parse"` - IngressFlowParse *ebpf.Program `ebpf:"ingress_flow_parse"` -} - -func (p *NetPrograms) Close() error { - return _NetClose( - p.EgressFlowParse, - p.IngressFlowParse, - ) -} - -func _NetClose(closers ...io.Closer) error { - for _, closer := range closers { - if err := closer.Close(); err != nil { - return err - } - } - return nil -} - -// Do not access this directly. -// -//go:embed net_bpfel_x86.o -var _NetBytes []byte diff --git a/pkg/internal/netolly/ebpf/net_bpfel_x86.o b/pkg/internal/netolly/ebpf/net_bpfel_x86.o deleted file mode 100644 index 5315cac3c..000000000 Binary files a/pkg/internal/netolly/ebpf/net_bpfel_x86.o and /dev/null differ diff --git a/pkg/internal/netolly/ebpf/netsk_bpfel_arm64.go b/pkg/internal/netolly/ebpf/netsk_bpfel_arm64.go deleted file mode 100644 index 949451903..000000000 --- a/pkg/internal/netolly/ebpf/netsk_bpfel_arm64.go +++ /dev/null @@ -1,151 +0,0 @@ -// Code generated by bpf2go; DO NOT EDIT. -//go:build arm64 - -package ebpf - -import ( - "bytes" - _ "embed" - "fmt" - "io" - - "github.com/cilium/ebpf" -) - -type NetSkFlowId NetSkFlowIdT - -type NetSkFlowIdT struct { - SrcIp struct{ In6U struct{ U6Addr8 [16]uint8 } } - DstIp struct{ In6U struct{ U6Addr8 [16]uint8 } } - EthProtocol uint16 - Direction uint8 - SrcPort uint16 - DstPort uint16 - TransportProtocol uint8 - IfIndex uint32 -} - -type NetSkFlowMetrics NetSkFlowMetricsT - -type NetSkFlowMetricsT struct { - Packets uint32 - Bytes uint64 - StartMonoTimeNs uint64 - EndMonoTimeNs uint64 - Flags uint16 - Errno uint8 -} - -type NetSkFlowRecordT struct { - Id NetSkFlowId - Metrics NetSkFlowMetrics -} - -// LoadNetSk returns the embedded CollectionSpec for NetSk. -func LoadNetSk() (*ebpf.CollectionSpec, error) { - reader := bytes.NewReader(_NetSkBytes) - spec, err := ebpf.LoadCollectionSpecFromReader(reader) - if err != nil { - return nil, fmt.Errorf("can't load NetSk: %w", err) - } - - return spec, err -} - -// LoadNetSkObjects loads NetSk and converts it into a struct. -// -// The following types are suitable as obj argument: -// -// *NetSkObjects -// *NetSkPrograms -// *NetSkMaps -// -// See ebpf.CollectionSpec.LoadAndAssign documentation for details. -func LoadNetSkObjects(obj interface{}, opts *ebpf.CollectionOptions) error { - spec, err := LoadNetSk() - if err != nil { - return err - } - - return spec.LoadAndAssign(obj, opts) -} - -// NetSkSpecs contains maps and programs before they are loaded into the kernel. -// -// It can be passed ebpf.CollectionSpec.Assign. -type NetSkSpecs struct { - NetSkProgramSpecs - NetSkMapSpecs -} - -// NetSkSpecs contains programs before they are loaded into the kernel. -// -// It can be passed ebpf.CollectionSpec.Assign. -type NetSkProgramSpecs struct { - SocketHttpFilter *ebpf.ProgramSpec `ebpf:"socket__http_filter"` -} - -// NetSkMapSpecs contains maps before they are loaded into the kernel. -// -// It can be passed ebpf.CollectionSpec.Assign. -type NetSkMapSpecs struct { - AggregatedFlows *ebpf.MapSpec `ebpf:"aggregated_flows"` - DirectFlows *ebpf.MapSpec `ebpf:"direct_flows"` -} - -// NetSkObjects contains all objects after they have been loaded into the kernel. -// -// It can be passed to LoadNetSkObjects or ebpf.CollectionSpec.LoadAndAssign. -type NetSkObjects struct { - NetSkPrograms - NetSkMaps -} - -func (o *NetSkObjects) Close() error { - return _NetSkClose( - &o.NetSkPrograms, - &o.NetSkMaps, - ) -} - -// NetSkMaps contains all maps after they have been loaded into the kernel. -// -// It can be passed to LoadNetSkObjects or ebpf.CollectionSpec.LoadAndAssign. -type NetSkMaps struct { - AggregatedFlows *ebpf.Map `ebpf:"aggregated_flows"` - DirectFlows *ebpf.Map `ebpf:"direct_flows"` -} - -func (m *NetSkMaps) Close() error { - return _NetSkClose( - m.AggregatedFlows, - m.DirectFlows, - ) -} - -// NetSkPrograms contains all programs after they have been loaded into the kernel. -// -// It can be passed to LoadNetSkObjects or ebpf.CollectionSpec.LoadAndAssign. -type NetSkPrograms struct { - SocketHttpFilter *ebpf.Program `ebpf:"socket__http_filter"` -} - -func (p *NetSkPrograms) Close() error { - return _NetSkClose( - p.SocketHttpFilter, - ) -} - -func _NetSkClose(closers ...io.Closer) error { - for _, closer := range closers { - if err := closer.Close(); err != nil { - return err - } - } - return nil -} - -// Do not access this directly. -// -//go:embed netsk_bpfel_arm64.o -var _NetSkBytes []byte diff --git a/pkg/internal/netolly/ebpf/netsk_bpfel_arm64.o b/pkg/internal/netolly/ebpf/netsk_bpfel_arm64.o deleted file mode 100644 index 88b8ebea8..000000000 Binary files a/pkg/internal/netolly/ebpf/netsk_bpfel_arm64.o and /dev/null differ diff --git a/pkg/internal/netolly/ebpf/netsk_bpfel_x86.go b/pkg/internal/netolly/ebpf/netsk_bpfel_x86.go deleted file mode 100644 index 2de26a370..000000000 --- a/pkg/internal/netolly/ebpf/netsk_bpfel_x86.go +++ /dev/null @@ -1,151 +0,0 @@ -// Code generated by bpf2go; DO NOT EDIT. -//go:build 386 || amd64 - -package ebpf - -import ( - "bytes" - _ "embed" - "fmt" - "io" - - "github.com/cilium/ebpf" -) - -type NetSkFlowId NetSkFlowIdT - -type NetSkFlowIdT struct { - SrcIp struct{ In6U struct{ U6Addr8 [16]uint8 } } - DstIp struct{ In6U struct{ U6Addr8 [16]uint8 } } - EthProtocol uint16 - Direction uint8 - SrcPort uint16 - DstPort uint16 - TransportProtocol uint8 - IfIndex uint32 -} - -type NetSkFlowMetrics NetSkFlowMetricsT - -type NetSkFlowMetricsT struct { - Packets uint32 - Bytes uint64 - StartMonoTimeNs uint64 - EndMonoTimeNs uint64 - Flags uint16 - Errno uint8 -} - -type NetSkFlowRecordT struct { - Id NetSkFlowId - Metrics NetSkFlowMetrics -} - -// LoadNetSk returns the embedded CollectionSpec for NetSk. -func LoadNetSk() (*ebpf.CollectionSpec, error) { - reader := bytes.NewReader(_NetSkBytes) - spec, err := ebpf.LoadCollectionSpecFromReader(reader) - if err != nil { - return nil, fmt.Errorf("can't load NetSk: %w", err) - } - - return spec, err -} - -// LoadNetSkObjects loads NetSk and converts it into a struct. -// -// The following types are suitable as obj argument: -// -// *NetSkObjects -// *NetSkPrograms -// *NetSkMaps -// -// See ebpf.CollectionSpec.LoadAndAssign documentation for details. -func LoadNetSkObjects(obj interface{}, opts *ebpf.CollectionOptions) error { - spec, err := LoadNetSk() - if err != nil { - return err - } - - return spec.LoadAndAssign(obj, opts) -} - -// NetSkSpecs contains maps and programs before they are loaded into the kernel. -// -// It can be passed ebpf.CollectionSpec.Assign. -type NetSkSpecs struct { - NetSkProgramSpecs - NetSkMapSpecs -} - -// NetSkSpecs contains programs before they are loaded into the kernel. -// -// It can be passed ebpf.CollectionSpec.Assign. -type NetSkProgramSpecs struct { - SocketHttpFilter *ebpf.ProgramSpec `ebpf:"socket__http_filter"` -} - -// NetSkMapSpecs contains maps before they are loaded into the kernel. -// -// It can be passed ebpf.CollectionSpec.Assign. -type NetSkMapSpecs struct { - AggregatedFlows *ebpf.MapSpec `ebpf:"aggregated_flows"` - DirectFlows *ebpf.MapSpec `ebpf:"direct_flows"` -} - -// NetSkObjects contains all objects after they have been loaded into the kernel. -// -// It can be passed to LoadNetSkObjects or ebpf.CollectionSpec.LoadAndAssign. -type NetSkObjects struct { - NetSkPrograms - NetSkMaps -} - -func (o *NetSkObjects) Close() error { - return _NetSkClose( - &o.NetSkPrograms, - &o.NetSkMaps, - ) -} - -// NetSkMaps contains all maps after they have been loaded into the kernel. -// -// It can be passed to LoadNetSkObjects or ebpf.CollectionSpec.LoadAndAssign. -type NetSkMaps struct { - AggregatedFlows *ebpf.Map `ebpf:"aggregated_flows"` - DirectFlows *ebpf.Map `ebpf:"direct_flows"` -} - -func (m *NetSkMaps) Close() error { - return _NetSkClose( - m.AggregatedFlows, - m.DirectFlows, - ) -} - -// NetSkPrograms contains all programs after they have been loaded into the kernel. -// -// It can be passed to LoadNetSkObjects or ebpf.CollectionSpec.LoadAndAssign. -type NetSkPrograms struct { - SocketHttpFilter *ebpf.Program `ebpf:"socket__http_filter"` -} - -func (p *NetSkPrograms) Close() error { - return _NetSkClose( - p.SocketHttpFilter, - ) -} - -func _NetSkClose(closers ...io.Closer) error { - for _, closer := range closers { - if err := closer.Close(); err != nil { - return err - } - } - return nil -} - -// Do not access this directly. -// -//go:embed netsk_bpfel_x86.o -var _NetSkBytes []byte diff --git a/pkg/internal/netolly/ebpf/netsk_bpfel_x86.o b/pkg/internal/netolly/ebpf/netsk_bpfel_x86.o deleted file mode 100644 index 3ce3fb7f7..000000000 Binary files a/pkg/internal/netolly/ebpf/netsk_bpfel_x86.o and /dev/null differ