Skip to content

Commit

Permalink
PERF_EVENT_IOC_DISABLE
Browse files Browse the repository at this point in the history
  • Loading branch information
Officeyutong committed Nov 5, 2023
1 parent f7c005c commit cf76228
Showing 1 changed file with 2 additions and 0 deletions.
2 changes: 2 additions & 0 deletions runtime/src/bpf_map/shared/perf_event_array_kernel_user.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -14,6 +14,7 @@
#include <cstring>
#include <iterator>
#include <linux/bpf.h>
#include <linux/perf_event.h>
#include <map>
#include <memory>
#include <pthread.h>
Expand Down Expand Up @@ -141,6 +142,7 @@ perf_event_array_kernel_user_impl::perf_event_array_kernel_user_impl(
}
perf_event_array_kernel_user_impl::~perf_event_array_kernel_user_impl()
{
ioctl(pfd, PERF_EVENT_IOC_DISABLE, 0);
close(pfd);
close(transporter_prog_fd);
}
Expand Down

0 comments on commit cf76228

Please sign in to comment.