MCPcopy Create free account
hub / github.com/CodSpeedHQ/codspeed / new

Method new

crates/memtrack/src/ebpf/tracker.rs:18–26  ·  view source on GitHub ↗

Create a new tracker instance This will: - Initialize the BPF subsystem - Bump memlock limits - Attach uprobes to all libc instances - Attach tracepoints for fork tracking

()

Source from the content-addressed store, hash-verified

16 /// - Attach uprobes to all libc instances
17 /// - Attach tracepoints for fork tracking
18 pub fn new() -> Result<Self> {
19 let mut instance = Self::new_without_allocators()?;
20
21 let allocators = AllocatorLib::find_all()?;
22 debug!("Found {} allocator instance(s)", allocators.len());
23 instance.attach_allocators(&allocators)?;
24
25 Ok(instance)
26 }
27
28 pub fn new_without_allocators() -> Result<Self> {
29 // Bump memlock limits

Callers

nothing calls this directly

Calls 2

attach_allocatorsMethod · 0.80
find_allFunction · 0.50

Tested by

no test coverage detected