Closed kevinconaway closed 5 years ago
Are there any valid cases for .copy()
? Perhaps we can just remove the function completely?
Are there any valid cases for .copy()? Perhaps we can just remove it?
It appears unused. @sfluor can we get rid of this ?
I think it's used to build the list of connections to expire (because we use a pointer to iterate through the eBPF map) here: https://github.com/DataDog/datadog-process-agent/blob/master/ebpf/tracer.go#L204
If we change this behavior it may be safe to remove 👍
It seems like we need to keep it then. We can't modify the map while we're iterating it, right ?
Instead temporarily reset the pid to 0 for the map lookup.
From looking at a busy host, this was the top source of allocations in the network tracer
@DataDog/burrito