GeezerVisonThe World Wide Web, restored to 800 pixels of glory. |
| Home|About|Gaming cabinet|Archives|How it works|Starter sites |
GeezerVison is showing github.com — ebpfmanager/manager_ringbuffer.go at master · gojue/ebpfmanager Expand file tree/ Copy pathmanager_ringbuffer.goMore file actions 43 lines (36 loc) · 1.16 KB / Copy pathmanager_ringbuffer.goFile metadata and controls43 lines (36 loc) · 1.16 KB 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 package manager import "github.com/cilium/ebpf" // NewRingBuffer - Creates a new ring buffer and start listening for events. // Use a MapRoute to make this map available to the programs of the manager. func (m *Manager) NewRingBuffer(spec *ebpf.MapSpec, options MapOptions, ringBufferOptions RingbufMapOptions) (*ebpf.Map, error) { m.stateLock.Lock() defer m.stateLock.Unlock() switch m.state { case reset, elfLoaded, stopping: return nil, ErrManagerNotInitialized case initialized, paused, running: } // check if the name of the new map is available _, exists, _ := m.getMap(spec.Name) if exists { return nil, ErrMapNameInUse } // Create new map and ring buffer reader ringBuffer, err := loadNewRingBuffer(spec, options, ringBufferOptions) if err != nil { return nil, err } // Setup ring buffer reader if err := ringBuffer.init(m); err != nil { return nil, err } // Start perf buffer reader if err := ringBuffer.Start(); err != nil { // clean up _ = ringBuffer.Stop(CleanInternal) return nil, err } // Add map to the list of perf ring managed by the manager m.RingBuffers = append(m.RingBuffers, ringBuffer) return ringBuffer.array, nil } |
| You are visitor 01402792 — GeezerVison does not store the pages you look up. Best viewed with Netscape Navigator 4.7 or Internet Explorer 6 at 800×600. No cookies required. |