commit | 8c0f9bd108f09dfb93d283267630465fe24e90ab | [log] [tgz] |
---|---|---|
author | Carlos Galo <carlosgalo@google.com> | Mon Mar 18 17:49:53 2024 -0700 |
committer | Carlos Galo <carlosgalo@google.com> | Tue Mar 19 10:16:18 2024 -0700 |
tree | 490988dec40a565e2f5d6f7f5b602fb0308bcfe2 | |
parent | cdbabc32effa5cc7736c83b2907912c600db0282 [diff] |
memevents: Stop failure when attaching to an attached tracepoint The current implementation of libbpf bpf_detach_tracepoint API doesn't detach the program from the trace event[1]. This creates an issue when a MemEventListener deregisters and registers the same event type. Due to this we don't want to fail if the bpf program is already attached. [1] https://github.com/iovisor/bcc/blob/7d350d90b638ddaf2c137a609b542e997597910a/src/cc/libbpf.c#L1495-L1501 Test: atest memevents_test Bug: 244232958 Change-Id: I012f8a2c62d2c15762ccd77a65d6c4ee41b84573 Signed-off-by: Carlos Galo <carlosgalo@google.com>