Skip to content
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
The table of contents is too big for display.
Diff view
Diff view
  •  
  •  
  •  
3 changes: 3 additions & 0 deletions .gitmodules
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
[submodule "libbpf"]
path = vendor/github.com/libbpf/bpftool/libbpf
url = https://github.com/libbpf/libbpf.git
1 change: 1 addition & 0 deletions src/include/pcp/.gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -5,4 +5,5 @@ config.h
dict.h
sds.h
sdsalloc.h
usdt.h
ini.h
8 changes: 6 additions & 2 deletions src/include/pcp/GNUmakefile
Original file line number Diff line number Diff line change
Expand Up @@ -19,6 +19,8 @@ include $(TOPDIR)/src/include/builddefs

INIH_HFILES = ini.h
SDSH_HFILES = sds.h sdsalloc.h
USDT_HFILES = usdt.h
VENDORED_HFILES = $(INIH_HFILES) $(SDSH_HFILES) $(USDT_HFILES)
EXTERNAL_HFILES = dict.h
HFILES = pmapi.h impl.h pmda.h pmtime.h pmdaroot.h pmafm.h \
trace.h trace_dev.h mmv_stats.h mmv_dev.h import.h \
Expand All @@ -35,11 +37,11 @@ endif
GENERATED_HFILES = $(CONFFILES)
NOSHIP_HFILES = libpcp.h sdsalloc.h

LDIRT = $(GENERATED_HFILES) $(INIH_HFILES) $(SDSH_HFILES) $(EXTERNAL_HFILES)
LDIRT = $(GENERATED_HFILES) $(VENDORED_HFILES) $(EXTERNAL_HFILES)

default :: default_pcp

default_pcp : $(HEADERS) $(GENERATED_HFILES) $(INIH_HFILES) $(SDSH_HFILES) $(EXTERNAL_HFILES)
default_pcp : $(HEADERS) $(GENERATED_HFILES) $(VENDORED_HFILES) $(EXTERNAL_HFILES)

include $(BUILDRULES)

Expand All @@ -49,6 +51,8 @@ $(INIH_HFILES):
$(LN_S) -f $(TOPDIR)/vendor/github.com/benhoyt/inih/$@ .
$(SDSH_HFILES):
$(LN_S) -f $(TOPDIR)/vendor/github.com/redis/hiredis/$@ .
$(USDT_HFILES):
$(LN_S) -f $(TOPDIR)/vendor/github.com/libbpf/usdt/$@ .

install :: default_pcp install_pcp

Expand Down
6 changes: 5 additions & 1 deletion src/pmdas/bpf/modules/GNUmakefile
Original file line number Diff line number Diff line change
Expand Up @@ -12,6 +12,7 @@ COMMON_OBJ = \
trace_helpers.o \
btf_helpers.o \
uprobe_helpers.o \
path_helpers.o \
map_helpers.o \

# ported helper files.
Expand All @@ -21,16 +22,19 @@ HELPERS_H = \
bits.bpf.h \
blk_types.h \
maps.bpf.h \
path_helpers.bpf.h \
core_fixes.bpf.h \
btf_helpers.h \
map_helpers.h \
path_helpers.h \
trace_helpers.h \
uprobe_helpers.h \

HELPERS_C = \
compat.c \
btf_helpers.c \
map_helpers.c \
path_helpers.c \
trace_helpers.c \
uprobe_helpers.c \

Expand Down Expand Up @@ -111,7 +115,7 @@ vmlinux.h: $(PMDABPF_VMLINUXH)
$(LN_S) -f $< $@

%.bpf.o: %.bpf.c vmlinux.h $(APPS_H) $(APPS_H_2) $(APPS_BPF) $(APPS_BPF_2)
$(CLANG) -Wall -g -O2 -target bpf -D__TARGET_ARCH_$(PMDABPF_ARCH) \
$(CLANG) -Wall -Wno-switch -g -O2 -target bpf -D__TARGET_ARCH_$(PMDABPF_ARCH) \
-I. -c $< -o $@
$(LLVM_STRIP) -g $@

Expand Down
Loading
Loading