diff --git a/src/cc/CMakeLists.txt b/src/cc/CMakeLists.txt index 92700ac3e5f5..0ae5286a2a89 100644 --- a/src/cc/CMakeLists.txt +++ b/src/cc/CMakeLists.txt @@ -63,7 +63,7 @@ target_link_libraries(bcc-static b_frontend clang_frontend bcc-loader-static ${c install(TARGETS bcc-shared LIBRARY COMPONENT libbcc DESTINATION ${CMAKE_INSTALL_LIBDIR}) -install(FILES bpf_common.h bpf_module.h bcc_syms.h libbpf.h COMPONENT libbcc +install(FILES bpf_common.h bpf_module.h bcc_syms.h libbpf.h perf_reader.h COMPONENT libbcc DESTINATION include/bcc) install(DIRECTORY compat/linux/ COMPONENT libbcc DESTINATION include/bcc/compat/linux diff --git a/src/cc/perf_reader.h b/src/cc/perf_reader.h index fdf1c7594050..6376c47887e4 100644 --- a/src/cc/perf_reader.h +++ b/src/cc/perf_reader.h @@ -14,6 +14,15 @@ * limitations under the License. */ +#ifndef PERF_READER_H +#define PERF_READER_H + +#include "libbpf.h" + +#ifdef __cplusplus +extern "C" { +#endif + struct perf_reader; struct perf_reader * perf_reader_new(perf_reader_cb cb, perf_reader_raw_cb raw_cb, void *cb_cookie); @@ -22,3 +31,9 @@ int perf_reader_mmap(struct perf_reader *reader, unsigned type, unsigned long sa int perf_reader_poll(int num_readers, struct perf_reader **readers, int timeout); int perf_reader_fd(struct perf_reader *reader); void perf_reader_set_fd(struct perf_reader *reader, int fd); + +#ifdef __cplusplus +} +#endif + +#endif