Skip to content

Commit

Permalink
sync with latest libbpf
Browse files Browse the repository at this point in the history
sync with latest upstream libbpf version 0.0.6.
  • Loading branch information
yonghong-song committed Dec 10, 2019
1 parent f9f1050 commit e6bd4ed
Show file tree
Hide file tree
Showing 3 changed files with 8 additions and 2 deletions.
2 changes: 1 addition & 1 deletion introspection/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,6 @@ include_directories(${CMAKE_SOURCE_DIR}/src/cc/libbpf/include/uapi)
option(INSTALL_INTROSPECTION "Install BPF introspection tools" ON)

add_executable(bps bps.c)
target_link_libraries(bps bpf-static)
target_link_libraries(bps bpf-static elf)

install (TARGETS bps DESTINATION share/bcc/introspection)
6 changes: 6 additions & 0 deletions src/cc/compat/linux/virtual_bpf.h
Original file line number Diff line number Diff line change
Expand Up @@ -202,6 +202,8 @@ enum bpf_attach_type {
BPF_CGROUP_GETSOCKOPT,
BPF_CGROUP_SETSOCKOPT,
BPF_TRACE_RAW_TP,
BPF_TRACE_FENTRY,
BPF_TRACE_FEXIT,
__MAX_BPF_ATTACH_TYPE
};

Expand Down Expand Up @@ -347,6 +349,9 @@ enum bpf_attach_type {
/* Clone map from listener for newly accepted socket */
#define BPF_F_CLONE (1U << 9)

/* Enable memory-mapping BPF map */
#define BPF_F_MMAPABLE (1U << 10)

/* flags for BPF_PROG_QUERY */
#define BPF_F_QUERY_EFFECTIVE (1U << 0)

Expand Down Expand Up @@ -424,6 +429,7 @@ union bpf_attr {
__aligned_u64 line_info; /* line info */
__u32 line_info_cnt; /* number of bpf_line_info records */
__u32 attach_btf_id; /* in-kernel BTF type id to attach to */
__u32 attach_prog_fd; /* 0 to attach to vmlinux */
};

struct { /* anonymous struct used by BPF_OBJ_* commands */
Expand Down

0 comments on commit e6bd4ed

Please sign in to comment.