Skip to content
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
248 commits
Select commit Hold shift + click to select a range
4006bf5
cc: libbpf: Merge implementation of bpf_attach_[k,u]probe into bpf_at…
lecopzer May 19, 2019
d314015
cc: libbpf: Fix ambiguous comment
lecopzer May 20, 2019
d158826
sync with latest libbpf
yonghong-song May 24, 2019
9b2a742
opensnoop: update synopsis in man page
brendangregg May 23, 2019
31309fe
cap_capable: Support Linux >= 5.1, display INSETID
pothos May 17, 2019
da4d4d7
fix proto compare bug in example
ChenLingPeng May 27, 2019
f6c8cfe
bpf: fixup btf DataSec size
yonghong-song May 27, 2019
180a588
bpf: workaround DataSec name constraint in the kernel
yonghong-song May 27, 2019
fdde3cf
remove unused field in tp_frontend_action.h
yonghong-song May 28, 2019
21b3deb
Merge pull request #2377 from iovisor/yhs_dev
palmtenor May 28, 2019
d51f4af
tools: Added exitsnoop: Trace all process termination
amdn May 28, 2019
e5d3293
Added short form -u for option --utf
amdn May 28, 2019
471f6ab
Remove -u short form, use only --utc (code review)
amdn May 28, 2019
7554866
docs: fix long form of USDT to match acronym in python tutorial.
freshdresch May 28, 2019
a57dad4
examples: disksnoop checks if blk_start_request exists before attachi…
freshdresch May 28, 2019
84ce85b
Revise python tutorial lesson 16 to make sure tutorial text and code …
freshdresch May 28, 2019
ebf0e4b
debian changelog for v0.10.0 tag
drzaeus77 May 29, 2019
222292f
Added exitsnoop to README (code review)
amdn May 29, 2019
8835de6
sync with latest libbpf
yonghong-song May 29, 2019
d61f9ba
Merge pull request #2382 from instana/exitsnoop
brendangregg May 29, 2019
721d34e
capable: Hide TID and INSETID columns by default
pothos Jun 3, 2019
e8dd701
Merge pull request #2394 from kinvolk/kai/capable_hide_extra_fields
brendangregg Jun 5, 2019
fc72531
tools/execsnoop: add -T option
boat0 Jun 7, 2019
0797d4a
build: Rename kheaders location from proc to sys
joelagnel Jun 12, 2019
c5f55f0
Merge pull request #2410 from joelagnel/bcc-headers
4ast Jun 13, 2019
3274f61
Merge pull request #2403 from boat0/execsnoop
brendangregg Jun 14, 2019
14103e6
update tools diagram for 2019
brendangregg Jun 17, 2019
35cb9fd
Merge pull request #2412 from brendangregg/docs
4ast Jun 18, 2019
474bbce
Tag overridden functions with override
danobi Jun 24, 2019
f466fb9
Check for string truncation when creating the <probe>/id path
tobiasblass Jun 3, 2019
40b2db9
Check for string truncation when constructing the kheaders tar_cmd
tobiasblass Jun 3, 2019
fbcfe4d
Merge pull request #2420 from danobi/syms_override
palmtenor Jun 25, 2019
93e2e2c
snapcraft: fix bcc-wrapper, handle ' ' quoting correctly
Jun 24, 2019
b1cc550
snapcraft: fix the fetching of the most recent tag version
Jun 24, 2019
2627bae
Support pinned maps through BPF_TABLE_PINNED macro
pothos May 28, 2019
660525d
sync with latest libbpf repo
yonghong-song Jun 26, 2019
00213fc
tools/tcpstates: fix local/remote port output
boat0 Jun 17, 2019
dd99497
Handle the text and src_file the same way in the BPF constructor
tobiasblass Jun 22, 2019
4a5ceb8
fix a compiler warning
yonghong-song Jun 26, 2019
3a0d3c4
add option to print unix timestamp in trace tool
letmaik May 23, 2019
b3fc590
add -u description to trace man page
letmaik Jun 5, 2019
fabb9a5
declare bpf_obj_get_info_by_fd() in src/cc/libbpf.h
yonghong-song Jun 26, 2019
8bd65dd
Add cli argument to limit run time (#2428)
williamlw999 Jun 30, 2019
fed5b68
Use the STL's make_unique if available
kylezh Jun 28, 2019
bb47703
update INSTALL.md for Centos
kylezh Jun 28, 2019
bac633a
tools: fix runqslower warning
jeromemarchand Jul 3, 2019
6836168
Merge pull request #2439 from jeromemarchand/fix-discard-qualifiers-w…
palmtenor Jul 3, 2019
f84acf9
Error in time comparison
williamlw999 Jul 9, 2019
06e30cc
sync to latest libbpf repo
yonghong-song Jul 10, 2019
01ee0b6
Use device+inode to identify matching files; prepend /proc/pid/root to
davemarchevsky Apr 19, 2019
d42fcc8
Lazily symbolize regular ELF binaries
danobi Jun 28, 2019
24496c7
Lazify ProcSyms::find_name
danobi Jul 2, 2019
0ca7917
Make bcc_elf_symbol_str support debuginfo
danobi Jul 9, 2019
1772fd1
Thread through debugfile flag
danobi Jul 9, 2019
6f693f5
Enter mount namespace before trying to open binary
danobi Jul 9, 2019
f20dca1
Address code review
danobi Jul 9, 2019
50d0602
Add tests
danobi Jul 10, 2019
d413c95
Fix designated initializers
danobi Jul 10, 2019
86633c4
Rebase and remove mount guards
danobi Jul 11, 2019
5933839
tools/inject: Update documentation
gobenji Jul 12, 2019
10dae9e
fix various compilation warnings
yonghong-song Jul 15, 2019
a74c042
fix asm_volatile_goto issue again
yonghong-song Jul 15, 2019
60944a4
Travis CI: Lint for Python syntax errors and undefined names
cclauss Jun 28, 2019
f84e55c
Identity is not the same thing as equality in Python
cclauss Jun 28, 2019
851f588
Add missing colon (:)
cclauss Jun 30, 2019
807772f
Force a retest
cclauss Jul 4, 2019
1bbdc09
This retest should work
cclauss Jul 4, 2019
fae282c
Undefined name: signal_ignore --> signal.SIG_IGN
cclauss Jul 4, 2019
37ac181
Undefined name: Don't forget "self" in "self.b"
cclauss Jul 4, 2019
64ea990
Undefined name: "headerInstance" --> "p4header"
cclauss Jul 4, 2019
887ff82
Undefined name: "SocketConfig" -> "TargetConfig"
cclauss Jul 4, 2019
317fe14
Undefined name: from compilationException import CompilationException
cclauss Jul 4, 2019
e52c41f
from __future__ import print_function
cclauss Jul 4, 2019
3e69639
Old style exceptions --> new style for Python 3
cclauss Jul 4, 2019
bfdb817
Old style exceptions --> new style for Python 3
cclauss Jul 4, 2019
2a2661c
Use feature detection instead of version detection
cclauss Jul 4, 2019
d2cd9d0
long was removed in Python 3
cclauss Jul 4, 2019
5c2b514
Remove allow_failures on python: 3.7 tests
cclauss Jul 4, 2019
f37279f
Swap test order
cclauss Jul 4, 2019
e25e75b
Move language: generic
cclauss Jul 4, 2019
6034b81
Try under language: python
cclauss Jul 4, 2019
de34dab
Echo
cclauss Jul 4, 2019
f1c7b8e
Comment out the set -euo pipefail
cclauss Jul 4, 2019
96f251e
Update .travis.yml
cclauss Jul 4, 2019
45fd2f7
Upgrade from pep8 --> pycodestyle
cclauss Jul 4, 2019
e7c422a
Four parallel test runs
cclauss Jul 4, 2019
fb99f2f
Update lua Quickstart for Ubuntu 18.04 LTS
ribwortplantain Jul 18, 2019
4995db0
Filter out non-bash COMMs
juergenhoetzel Jun 7, 2019
3621975
Use bpf_prog_load function from ljsyscall module in LuaJIT compiler
ribwortplantain Jul 19, 2019
50aeaed
Report proper module on kernel backtrace
olsajiri Jul 19, 2019
1a47a9a
sync with latest libbpf
yonghong-song Jul 23, 2019
6af649a
tools: fix printb usage in solisten
jeromemarchand Jul 29, 2019
237a4b4
Turn on lazy symbolize by default
danobi Jul 30, 2019
9518a5b
tools/tcpconnect: add option -c to count connects
boat0 Aug 1, 2019
56ba6fd
sync to latest libbpf
yonghong-song Aug 1, 2019
910ddaf
CMake: Allow to disable building man pages
RomainNaour Dec 7, 2018
0206fc4
tools: fix vfscount output when no duration is specified
jeromemarchand Aug 5, 2019
68b8d30
Support perf's symfs mechanism for debuginfo lookup.
Aug 5, 2019
33c9c57
man: fixes some man pages
jeromemarchand Jul 29, 2019
1d858c0
Merge pull request #2484 from jeromemarchand/man-fixes
palmtenor Aug 6, 2019
89bb40a
offwaketime: Fix incorrect target and waker PIDs
yoheiueda Aug 9, 2019
5ce16e4
Don't prepend /proc/PID/root to user-supplied USDT binary paths start…
davemarchevsky Aug 15, 2019
e102514
Update reference_guide.md
SuperSix0 Aug 16, 2019
2479fbf
Update mysqld_query.py
SuperSix0 Aug 15, 2019
6021958
Merge pull request #2496 from SuperSix0/patch-4
palmtenor Aug 16, 2019
270d54a
Make number of stack traces configurable from command line in example…
johnaohara Aug 23, 2019
496a2b1
tcptop: Fix incorrect pid filter
ethercflow Aug 30, 2019
d147588
Support for hardware offload (#2502)
pchaigno Sep 3, 2019
44454d9
support gcc 8's cold subfunctions
Sep 11, 2019
e47537d
Merge pull request #2511 from mwesolowski/master
palmtenor Sep 14, 2019
c99c7c4
stackcount: fix TypeError (#2514)
Sep 15, 2019
ba64f03
Fixes #2518 -- weird behaviour of lookup_or_init (#2520)
pjsg Sep 20, 2019
84d9798
FAQ: fix error message
jgehrcke Sep 23, 2019
466a54c
Merge pull request #2523 from jgehrcke/patch-1
palmtenor Sep 23, 2019
f8c5654
INSTALL.md: add install instructions for Fedora 30+ (#2524)
jgehrcke Sep 24, 2019
867c3e3
Fix BPF_PERCPU_ARRAY description (#2527)
willfindlay Sep 24, 2019
c02e5eb
fix compilation errors with clang CreateFromArgs() change (#2528)
yonghong-song Sep 25, 2019
903513e
cmakefile change to require c++14 (#2529)
yonghong-song Sep 25, 2019
115b959
Fix a file descriptor leak when module is deleted (#2530)
yonghong-song Sep 25, 2019
ac29d09
FAQ: Add Q&A about kernel lockdown (#2532)
jgehrcke Sep 26, 2019
c00d10d
Add sampe code for cgoup test (#2522)
jxiong Sep 26, 2019
4c2cb86
INSTALL.md: Fedora 30: note about kernel lockdown (#2536)
jgehrcke Sep 30, 2019
eb018cf
sync to latest libbpf (#2540)
yonghong-song Oct 2, 2019
0fa419a
debian changelog for v0.11.0 tag (#2541)
yonghong-song Oct 3, 2019
76f31ed
sync with latest libbpf repo (#2545)
yonghong-song Oct 10, 2019
2d1497c
Redefine asm_inline for Linux 5.4+, Fixes #2546 (#2547)
bobrik Oct 11, 2019
6b989db
Fix Erroneous "gethostlatency" Comments (#2549)
synical Oct 13, 2019
183be9a
Changed Link to HTTPS (#2551)
Jakobu5 Oct 15, 2019
56aa780
Mod: the 'min_us' is in us, mot ms
senofgithub Oct 16, 2019
e3668b9
Mod: fix two errors in examples
senofgithub Oct 16, 2019
930846d
man: add missing -c option to tcpretrans synopsis
jeromemarchand Aug 9, 2019
64845d3
Merge pull request #2557 from jeromemarchand/tcpretrans-man-fix
palmtenor Oct 18, 2019
11bf5d0
Merge pull request #2554 from senofgithub/master
palmtenor Oct 18, 2019
54aa257
Fix a typo, tracepint -> tracepoint (#2559)
eklitzke Oct 19, 2019
708f786
document the release info related to libbpf submodule (#2561)
yonghong-song Oct 19, 2019
f04c6de
assign offset properly for btf DataSec (#2560)
yonghong-song Oct 19, 2019
c2a530b
support cgroup level tracing in trace.py (#2562)
yonghong-song Oct 20, 2019
9347969
man: COMM describes the process name, not the parent process name (#2…
juergenhoetzel Oct 20, 2019
9b433f2
cpudist: create sufficiently large hash table to avoid missing tasks
TristanCacqueray Oct 23, 2019
2dad475
fix compilation errors with latest llvm trunk (#2575)
yonghong-song Oct 28, 2019
eb1a2f6
sync with latest libbpf (#2576)
yonghong-song Oct 28, 2019
82f4302
introduce map.lookup_or_try_init() (#2577)
yonghong-song Oct 31, 2019
58ff1b3
remove the warning for map.lookup_or_init() (#2581)
yonghong-song Nov 1, 2019
d8381fb
Merge pull request #2568 from TristanCacqueray/master
brendangregg Nov 1, 2019
77fe428
fix typos in tutorial.md (#2584)
seeekr Nov 3, 2019
0429040
Support attaching uprobe to offset (#2585)
mmisono Nov 8, 2019
9cede20
tools/tcpretrans: add tracepoint support (#2574)
boat0 Nov 9, 2019
d4b3bf0
Add libbcc-no-libbpf.so library
olsajiri Oct 22, 2019
19c625e
Link test_libbcc directly with libbcc.so
olsajiri Nov 12, 2019
7ec8bde
Add test_libbcc_no_libbpf test
olsajiri Nov 8, 2019
2a2dbd2
Merge pull request #2535 from olsajiri/libbpf
yonghong-song Nov 13, 2019
a6f658d
Add a supplementary explanation to function `get_syscall_fnname` (#2593)
wwyf Nov 13, 2019
992e482
sync with latest libbpf (#2594)
yonghong-song Nov 13, 2019
ccf8261
add BPF::init_usdt function to init a single USDT so folks can handle…
davemarchevsky Jul 30, 2019
15fbd7c
add tool: compactsnoop
ethercflow Nov 15, 2019
10c1a83
docs/reference_guide.md: update doc
Nov 15, 2019
98b8d0c
docs: update XDP driver list
lcp Nov 15, 2019
6ee245b
fix a bug in mountsnoop.py with 4.17+ kernels
yonghong-song Nov 17, 2019
b8ab98b
Include stddef.h for size_t in bcc_elf.h
mmisono Nov 17, 2019
ac00ac5
Add lockstat tool
olsajiri Nov 15, 2019
f0f19db
make TRY2 macro work outside of ebpf namespace (#2604)
eklitzke Nov 18, 2019
3032347
Make StatusTuple code and msg methods const (#2603)
eklitzke Nov 18, 2019
f68d818
update INSTALL.md for new llvm source compilation
yonghong-song Nov 18, 2019
65885f3
tools/runqslower.py: Fix raw tracepoint code
Nov 18, 2019
0272a3d
docs: update helper functions of BPF_PROG_TYPE_SOCKET_FILTER
mmisono Nov 25, 2019
149c1c8
Add map-in-map support
yonghong-song Nov 23, 2019
a1a04f4
Do not traverse attributes during JSON generation (Fixes #2605)
alexer Nov 26, 2019
90f2086
do not use BPF_F_REUSE_STACKID incorrectly
yonghong-song Nov 27, 2019
ea8bbbf
fix bug for lockstat.py #347 (#2618)
uppinggoer Nov 29, 2019
feadea6
Support a BPF program larger than BPF_MAXINSNS
mmisono Nov 30, 2019
556d9ec
Use integer types for enums in JSON (Fixes #2615)
alexer Dec 1, 2019
e09116d
Use libbpf-static instead of libbpf-debugsource for CMAKE_USE_LIBBPF_…
olsajiri Nov 29, 2019
744b644
man: fix the field of filetop
Dec 3, 2019
0bca645
man: fix the explanation of filename
Dec 3, 2019
1f7b6cd
Correction to Usage text.
joelcollin Dec 3, 2019
b040635
man: fix a reference to runqlat in runqslower man page
jeromemarchand Dec 4, 2019
71f9c2a
rename tool lockstat.py to klockstat.py
yonghong-song Dec 5, 2019
e7ddcbc
remove inproper usage of BPF_F_REUSE_STACKID in examples
yonghong-song Dec 6, 2019
9ce7b7e
tools/trace.py: add process name filtering
tty5 Dec 4, 2019
5cf529e
tools/trace.py: add msg filter of event
tty5 Dec 6, 2019
f9f1050
fix a compilation error with latest llvm 10
yonghong-song Dec 10, 2019
e6bd4ed
sync with latest libbpf
yonghong-song Dec 10, 2019
368a5b0
debian changelog for v0.12.0 tag
yonghong-song Dec 11, 2019
2283996
Fix s390 kprobes support
Stefan-Raspl Dec 11, 2019
3106a82
fix -h output for --sort option
felixge Dec 12, 2019
05a09ea
Improve wording on how latency is measured
sevan Dec 12, 2019
6e9b450
Merge pull request #2582 from ethercflow/mmtools-dev
brendangregg Dec 12, 2019
c71394a
klockstat: fix caller filter
myllynen Dec 16, 2019
0aca2c7
Remove kretprobe__ prefix from program names
pchaigno Dec 18, 2019
b2aa29f
tools: cgroup filtering in execsnoop/opensnoop
alban Dec 16, 2019
8174c0a
sync with latest libbpf
yonghong-song Dec 21, 2019
8bb4e47
tools/trace.py: flush stdout for each event
alban Dec 21, 2019
977a7e3
change version.cmake to check all tags
yonghong-song Dec 23, 2019
4f0a887
man: fix required kernel version in man pages
pchaigno Dec 27, 2019
df591fb
fix libbpf_uapi path typo
casparant Dec 29, 2019
15d6b01
Merge pull request #2675 from casparant/master
palmtenor Jan 2, 2020
dc336aa
Package static archives, closes #1938
bobrik Dec 30, 2019
5098c9d
fix test_map_in_map.cc compilation error
yonghong-song Jan 2, 2020
e47f9d0
sanitize btf VAR and DATASEC types
yonghong-song Jan 2, 2020
db82644
tools/runqslower.py: Option for --pid or --tid (#2635)
bodgergely Jan 3, 2020
c6b287c
support BPF_MAP_TYPE_SK_STORAGE map
yonghong-song Dec 26, 2019
909ada9
tools/offcputime.py: Redundatn arg check
bodgergely Jan 3, 2020
d796285
Links to 3 articles on Linux tracing using bcc
pchaigno Jan 3, 2020
1a780e9
rewriter: Fix tracking of pointers with several indirections
pchaigno Jan 4, 2020
1b2be41
Add Ubuntu Eon incompatibility note
mwuertinger Jan 6, 2020
590ac9d
Ubuntu Eon build dependencies and version numbers
mwuertinger Jan 6, 2020
c707a55
avoid complex expression in struct member initializer
yonghong-song Jan 7, 2020
c14d02a
Fix a bunch of typos (#2693)
mika Jan 9, 2020
9c32c35
update usage of MCInstPrinter printInst() for llvm10 (#2696)
yonghong-song Jan 9, 2020
03e0d26
docs: add BPF trampoline to the kernel features
lcp Jan 9, 2020
18e0991
Secure Boot: physical keypress to disable lockdown
edwintorok Jan 9, 2020
670aad2
sanitize BTF_KIND_FUNC
yonghong-song Jan 3, 2020
071eef6
sync with latest libbpf repo
yonghong-song Jan 10, 2020
bbafe99
Fix CentOS 6 support.
russjones Jan 13, 2020
304d95c
bpflist: list only real bpf objects
aspsk Jan 15, 2020
90937ce
bpflist: use smarter print format
aspsk Jan 15, 2020
4f0c29e
fix llvm compilation error
yonghong-song Jan 16, 2020
efbed3b
docs: Remove a redundant space
mmisono Jan 16, 2020
dce8e9d
sync with latest libbpf repo
yonghong-song Jan 18, 2020
da59f37
Remove from list of AUR packages
mtmn Jan 19, 2020
c6a3f02
Remove namespace code from libbpf to fix USDT
dalehamel Jan 21, 2020
dbfb188
fix a bug in networking/simulation.py
yonghong-song Jan 22, 2020
0cafe55
fix line TypeError
DavadDi Jan 21, 2020
83b67c2
sync to latest libbpf repo
yonghong-song Jan 27, 2020
a47c44f
Run BCC test suite with github actions
dalehamel Jan 20, 2020
b090f5f
Make inode-only matching default, reverse USDT kludge
dalehamel Jan 29, 2020
215b724
remove dead link
gtataranni Jan 30, 2020
90b2382
tools/klockstat.py: Do not display symbol twice for stack
olsajiri Dec 24, 2019
0e63c5c
fix compilation error due to latest llvm change
yonghong-song Jan 30, 2020
46965c6
Add XSKMAP support (#2730)
tu-nv Jan 31, 2020
f727a00
bcc.BPF.cleanup(): Ensure self.funcs items get deleted during cleanup
Feb 2, 2020
6878949
define CC_USING_FENTRY if CONFIG_FUNCTION_TRACER is defined
yonghong-song Feb 4, 2020
685ec23
snap: update and cleanup snapcraft.yaml
Feb 6, 2020
a4834a6
prevent rewriting for array element type
yonghong-song Feb 6, 2020
f149ca5
Do not rewrite array subscripts if invalid sourceloc range
yonghong-song Feb 6, 2020
0a7da74
Fix offwaketime regression introduced by #ac00ac5
bubble75 Feb 7, 2020
6cacc41
support sockmap/sockhash/cgroup_local_storage maps
yonghong-song Feb 7, 2020
397ff37
libbcc debian package is architecture-dependent
gllghr Feb 8, 2020
0f92c84
correctly describe installation situation for Ubuntu
itaysk Feb 9, 2020
1433792
libbcc debian package is architecture-dependent
gllghr Feb 8, 2020
c82aa51
snapcraft: add missing libfl-dev dependency
Feb 12, 2020
4281c62
libbpf tools: check in bpftool for use by libbpf-based tool build
anakryiko Feb 12, 2020
7fcb335
tools: add vmlinux.h header with all kernel types
anakryiko Feb 12, 2020
2d099cd
Allow specifying clang base directory
dalehamel Feb 12, 2020
e1496e1
tools: add libbpf-based tools to BCC w/ runqslower as first converted…
anakryiko Feb 12, 2020
0d0d353
Merge pull request #2755 from anakryiko/libbpf-based-tools
yonghong-song Feb 13, 2020
a28ad05
fix pid filter bug
DavadDi Feb 16, 2020
8f4cda9
Merge remote-tracking branch 'upstream/master' into master
gllghr Feb 18, 2020
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
94 changes: 94 additions & 0 deletions .github/workflows/bcc-test.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,94 @@
name: BCC Build and tests

on: push

jobs:
test_bcc:
runs-on: ${{ matrix.os }}
strategy:
matrix:
os: [ubuntu-16.04, ubuntu-18.04] # 16.04.4 release has 4.15 kernel
# 18.04.3 release has 5.0.0 kernel
env:
- TYPE: Debug
PYTHON_TEST_LOGFILE: critical.log
- TYPE: Release
PYTHON_TEST_LOGFILE: critical.log
steps:
- uses: actions/checkout@v2
- name: System info
run: |
uname -a
ip addr
- name: Build docker container with all deps
run: |
docker build -t bcc-docker -f Dockerfile.tests .
- name: Run bcc build
env: ${{ matrix.env }}
run: |
/bin/bash -c \
"docker run --privileged \
--pid=host \
-v $(pwd):/bcc \
-v /sys/kernel/debug:/sys/kernel/debug:rw \
-v /lib/modules:/lib/modules:ro \
-v /usr/src:/usr/src:ro \
-v /usr/include/linux:/usr/include/linux:ro \
bcc-docker \
/bin/bash -c \
'mkdir -p /bcc/build && cd /bcc/build && \
cmake -DCMAKE_BUILD_TYPE=${TYPE} .. && make -j9'"
- name: Run bcc's cc tests
env: ${{ matrix.env }}
# tests are wrapped with `script` as a hack to get a TTY as github actions doesn't provide this
# see https://github.com/actions/runner/issues/241
run: |
script -e -c /bin/bash -c \
"docker run -ti \
--privileged \
--network=host \
--pid=host \
-v $(pwd):/bcc \
-v /sys/kernel/debug:/sys/kernel/debug:rw \
-v /lib/modules:/lib/modules:ro \
-v /usr/src:/usr/src:ro \
-e CTEST_OUTPUT_ON_FAILURE=1 \
bcc-docker \
/bin/bash -c \
'/bcc/build/tests/wrapper.sh \
c_test_all sudo /bcc/build/tests/cc/test_libbcc'"

- name: Run all tests
env: ${{ matrix.env }}
run: |
script -e -c /bin/bash -c \
"docker run -ti \
--privileged \
--network=host \
--pid=host \
-v $(pwd):/bcc \
-v /sys/kernel/debug:/sys/kernel/debug:rw \
-v /lib/modules:/lib/modules:ro \
-v /usr/src:/usr/src:ro \
-e CTEST_OUTPUT_ON_FAILURE=1 \
bcc-docker \
/bin/bash -c \
'cd /bcc/build && \
make test PYTHON_TEST_LOGFILE=$PYTHON_TEST_LOGFILE ARGS=-V'"

- name: Check critical tests
env: ${{ matrix.env }}
run: |
critical_count=$(grep @mayFail tests/python/critical.log | wc -l)
echo "There were $critical_count critical tests skipped with @mayFail:"
grep -A2 @mayFail tests/python/critical.log

- uses: actions/upload-artifact@v1
with:
name: critical-tests-${{ matrix.env['TYPE'] }}-${{ matrix.os }}
path: tests/python/critical.log

# To debug weird issues, you can add this step to be able to SSH to the test environment
# https://github.com/marketplace/actions/debugging-with-tmate
# - name: Setup tmate session
# uses: mxschmitt/action-tmate@v1
2 changes: 2 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -9,4 +9,6 @@
/build/
cmake-build-debug
debian/**/*.log
*critical.log
obj-x86_64-linux-gnu
examples/cgroupid/cgroupid
28 changes: 20 additions & 8 deletions .travis.yml
Original file line number Diff line number Diff line change
@@ -1,8 +1,20 @@
language: generic
install:
- sudo apt-get install -y python-pip
- sudo pip install pep8
script:
- set -euo pipefail
- ./scripts/check-helpers.sh
- ./scripts/py-style-check.sh
language: python
matrix:
include:
- name: "Check helpers on Python 2.7"
python: 2.7
script: ./scripts/check-helpers.sh
- name: "Python style check on Python 2.7"
python: 2.7
script: ./scripts/py-style-check.sh
- name: "flake8 lint on Python 2.7"
python: 2.7
script: flake8 . --count --select=E9,F63,F7,F82 --show-source --statistics
- name: "flake8 lint on Python 3.7"
dist: xenial # required for Python >= 3.7
python: 3.7
script: flake8 . --count --select=E9,F63,F7,F82 --show-source --statistics
allow_failures:
- name: "Check helpers on Python 2.7"
before_install: pip install --upgrade pip
install: pip install flake8
14 changes: 13 additions & 1 deletion CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -27,17 +27,27 @@ option(ENABLE_RTTI "Enable compiling with real time type information" OFF)
option(ENABLE_LLVM_SHARED "Enable linking LLVM as a shared library" OFF)
option(ENABLE_CLANG_JIT "Enable Loading BPF through Clang Frontend" ON)
option(ENABLE_USDT "Enable User-level Statically Defined Tracing" ON)
option(ENABLE_MAN "Build man pages" ON)
CMAKE_DEPENDENT_OPTION(ENABLE_CPP_API "Enable C++ API" ON "ENABLE_USDT" OFF)

set(CMAKE_MODULE_PATH ${CMAKE_MODULE_PATH} ${CMAKE_CURRENT_SOURCE_DIR}/cmake)

if (CMAKE_USE_LIBBPF_PACKAGE)
find_package(LibBpf)
endif()

if(NOT PYTHON_ONLY AND ENABLE_CLANG_JIT)
find_package(BISON)
find_package(FLEX)
find_package(LLVM REQUIRED CONFIG)
message(STATUS "Found LLVM: ${LLVM_INCLUDE_DIRS} ${LLVM_PACKAGE_VERSION}")
find_package(LibElf REQUIRED)

if(CLANG_DIR)
set(CMAKE_FIND_ROOT_PATH "${CLANG_DIR}")
include_directories("${CLANG_DIR}/include")
endif()

# clang is linked as a library, but the library path searching is
# primitively supported, unlike libLLVM
set(CLANG_SEARCH "/opt/local/llvm/lib;/usr/lib/llvm-3.7/lib;${LLVM_LIBRARY_DIRS}")
Expand Down Expand Up @@ -85,7 +95,7 @@ if (USINGISYSTEM AND GCC_VERSION VERSION_LESS 6.0)
endif()

set(CMAKE_CXX_STANDARD_REQUIRED ON)
set(CMAKE_CXX_STANDARD 11)
set(CMAKE_CXX_STANDARD 14)

endif(NOT PYTHON_ONLY AND ENABLE_CLANG_JIT)

Expand All @@ -96,7 +106,9 @@ add_subdirectory(src)
add_subdirectory(introspection)
if(ENABLE_CLANG_JIT)
add_subdirectory(examples)
if(ENABLE_MAN)
add_subdirectory(man)
endif(ENABLE_MAN)
add_subdirectory(tests)
add_subdirectory(tools)
endif(ENABLE_CLANG_JIT)
69 changes: 69 additions & 0 deletions Dockerfile.tests
Original file line number Diff line number Diff line change
@@ -0,0 +1,69 @@
# Using ubuntu 19.04 for newer `unshare` command used in tests
FROM ubuntu:19.04

ARG LLVM_VERSION="8"
ENV LLVM_VERSION=$LLVM_VERSION

RUN apt-get update && apt-get install -y curl gnupg &&\
llvmRepository="\n\
deb http://apt.llvm.org/disco/ llvm-toolchain-disco main\n\
deb-src http://apt.llvm.org/disco/ llvm-toolchain-disco main\n\
deb http://apt.llvm.org/disco/ llvm-toolchain-disco-${LLVM_VERSION} main\n\
deb-src http://apt.llvm.org/disco/ llvm-toolchain-disco-${LLVM_VERSION} main\n" &&\
echo $llvmRepository >> /etc/apt/sources.list && \
curl -L https://apt.llvm.org/llvm-snapshot.gpg.key | apt-key add -

RUN apt-get update && apt-get install -y \
bison \
binutils-dev \
cmake \
flex \
g++ \
git \
kmod \
wget \
libelf-dev \
zlib1g-dev \
libiberty-dev \
libbfd-dev \
libedit-dev \
clang-${LLVM_VERSION} \
libclang-${LLVM_VERSION}-dev \
libclang-common-${LLVM_VERSION}-dev \
libclang1-${LLVM_VERSION} \
llvm-${LLVM_VERSION} \
llvm-${LLVM_VERSION}-dev \
llvm-${LLVM_VERSION}-runtime \
libllvm${LLVM_VERSION} \
systemtap-sdt-dev \
sudo \
iproute2 \
python3 \
python3-pip \
python-pip \
ethtool \
arping \
netperf \
iperf \
iputils-ping \
bridge-utils \
libtinfo5 \
libtinfo-dev

RUN pip3 install pyroute2 netaddr
RUN pip install pyroute2 netaddr

# FIXME this is faster than building from source, but it seems there is a bug
# in probing libruby.so rather than ruby binary
#RUN apt-get update -qq && \
# apt-get install -y software-properties-common && \
# apt-add-repository ppa:brightbox/ruby-ng && \
# apt-get update -qq && apt-get install -y ruby2.6 ruby2.6-dev

RUN wget -O ruby-install-0.7.0.tar.gz \
https://github.com/postmodern/ruby-install/archive/v0.7.0.tar.gz && \
tar -xzvf ruby-install-0.7.0.tar.gz && \
cd ruby-install-0.7.0/ && \
make install

RUN ruby-install --system ruby 2.6.0 -- --enable-dtrace
18 changes: 17 additions & 1 deletion FAQ.txt
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@ A: make sure to 'make install' and add the directory
export LD_LIBRARY_PATH=/usr/local/lib:$LD_LIBRARY_PATH

Q: hello_world.py fails with:
ImportError: No module named bpf
ImportError: No module named bcc
A: checkout "sudo make install" output to find out bpf package installation site,
add it to the PYTHONPATH env variable before running the program.
sudo bash -c 'PYTHONPATH=/usr/lib/python2.7/site-packages python examples/hello_world.py'
Expand All @@ -21,6 +21,22 @@ Q: hello_world.py still fails with:
Exception: Failed to load BPF program hello
A: sudo

Q: hello_world.py fails with
bpf: Failed to load program: Operation not permitted
despite running as root, and strace shows each `bpf()` system call failing with an EPERM.
A: The so-called Kernel lockdown might be the root cause. Try disabling it with the so-called
sysrq mechanism:
echo 1 > /proc/sys/kernel/sysrq
echo x > /proc/sysrq-trigger
Also see https://github.com/iovisor/bcc/issues/2525

If you have Secure Boot enabled you need to press Alt-PrintScr-x on the keyboard instead:
```
This sysrq operation is disabled from userspace.
sysrq: Disabling Secure Boot restrictions
Lifting lockdown
```

Q: How do I fulfill the Linux kernel version requirement?
A: You need to obtain a recent version of the Linux source code
(please look at the README for the exact version), enable the
Expand Down
Loading