Commit 1d75282c authored by Brenden Blanco's avatar Brenden Blanco

Disable custom perf output support in older kernels

Signed-off-by: default avatarBrenden Blanco <bblanco@plumgrid.com>
parent aeca6bfc
......@@ -293,6 +293,7 @@ error:
}
void * bpf_open_perf_buffer(perf_reader_raw_cb raw_cb, void *cb_cookie, int pid, int cpu) {
#if LINUX_VERSION_CODE >= KERNEL_VERSION(4,4,0)
int pfd;
struct perf_event_attr attr = {};
struct perf_reader *reader = NULL;
......@@ -328,4 +329,8 @@ error:
perf_reader_free(reader);
return NULL;
#else
fprintf(stderr, "PERF_COUNT_SW_BPF_OUTPUT feature unsupported\n");
return NULL;
#endif
}
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment