Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
287 commits
Select commit Hold shift + click to select a range
37cd183
python binding: allow fully-specified probe names for enable_probe()
gfx Mar 7, 2020
2162516
trace.py: support an optional provider name for the probe spec
gfx Mar 8, 2020
9465f8c
softirqs: Combined CPU as part of the key is necessary to avoid amiss…
netedwardwu Mar 9, 2020
15e998d
tools: add option --cgroupmap to capable.py
alban Mar 6, 2020
9d7feee
tools: add option --unique to capable.py
alban Mar 8, 2020
c9cfb52
Reduce container image size with multi-stage builds
alban Mar 8, 2020
5e123df
libbpf-tools: add CO-RE opensnoop (#2778)
brendangregg Mar 9, 2020
7d62656
tools: add option --cgroupmap to tcptop
alban Mar 8, 2020
8b6a7db
libbpf-tools: update vmlinux.h with BPF helper flags generated from UAPI
anakryiko Mar 9, 2020
57e7af7
Merge pull request #2804 from netedwardwu/master
yonghong-song Mar 9, 2020
77d60b1
libbpf: sync to latest version
anakryiko Mar 12, 2020
454b138
libbpf-tools: small clean ups across all tools
anakryiko Mar 11, 2020
2b5fcc6
libbpf-tools: determine target host architecture
anakryiko Mar 12, 2020
d0ec8a2
Backport tcpstates to kernels < 4.15
poelzi Mar 12, 2020
cd43be4
libbpf-tools: adjust Kconfig and re-build vmlinux.h
anakryiko Mar 13, 2020
7fd2fa6
Factor out ebpf::parse_tracepoint function
olsajiri Mar 10, 2020
b9099c5
Add test for ebpf::parse_tracepoint function
olsajiri Mar 10, 2020
b8423e6
Strengthen tracepoint format parsing
olsajiri Mar 10, 2020
0a9d6db
Add support for new common fields
olsajiri Mar 11, 2020
5302614
libbpf: update to latest libbpf version
anakryiko Mar 17, 2020
ca1b0af
adding example/networking/net_monitor.py
gist-banana Mar 18, 2020
4c1136e
Make -DCMAKE_INSTALL_PREFIX=/usr as the default (#2800)
gfx Mar 18, 2020
f82ea45
tools: add option --cgroupmap to profile.py
alban Mar 18, 2020
e1d53a3
Do not prepend /proc multiple times in bcc_resolve_symname
dalehamel Mar 12, 2020
1cd3952
Add regression test for bcc resolve symbol names
dalehamel Mar 13, 2020
c2772a3
libbpf-tools: add CO-RE xfsslower
ethercflow Mar 18, 2020
510fc74
opensnoop: fix --cgroupmap with kfunc
alban Mar 19, 2020
35c9940
chore: include Amazon Linux 2 binary option in INSTALL
jfreeland Mar 22, 2020
6b8a896
tools: fix alignment of ipv6_key_t in tcptop
jeromemarchand Mar 19, 2020
1b0fe40
Change the default sort order to Descending
mkogan1 Mar 24, 2020
9adda70
tools/capable: fix compilation error
mauriciovasquezbernal Mar 26, 2020
85f5e7d
libbpf-tools: add CO-RE filelife
ethercflow Mar 25, 2020
e323254
make -lrt linking optional
Mar 25, 2020
915d6d7
correcting input to hex using ord funtion
Mar 27, 2020
472f9b3
mallocstacks: validating before stacktrace walk
devidasjadhav Mar 28, 2020
4f6ecea
http-parse-simple.py: fix wrong start position
jpmenil Mar 26, 2020
ab54de2
libbpf-tools: CO-RE opensnoop minor improvements
bacher09 Mar 12, 2020
689f900
[C++] add BPF::enable_usdt_all() and disble_usdt_all() to handle all …
gfx Apr 4, 2020
495a4a3
examples/tracing: add nflatency - netfilter hook metrics
squeed Apr 3, 2020
533391e
add test_lpm_trie.py test
yonghong-song Apr 6, 2020
f35dae0
adjust layout string in JIT with llvm11 128bit spec support
yonghong-song Apr 6, 2020
007ee49
Translate virtual addresses to binary addresses for shared libs as well.
Mar 25, 2020
5057bbe
examples/tracing: add io_latencies - IO latency distribution monitor
htejun Apr 5, 2020
15d7955
Update pid filter
DavadDi Apr 6, 2020
7a38543
doc: fix wrong references to get_syscall_name
lebauce Apr 6, 2020
1515f28
tools: Move io_iolatencies.py example to tools/biolatpcts.py
htejun Apr 17, 2020
66ab787
tools/biolatpcts: Use #!/usr/bin/python instead of python3
htejun Apr 17, 2020
7214903
tools/biolatpcts: --pcts handling improvements
htejun Apr 17, 2020
fbf0392
tools/biolatpcts: Accept device name/node for target device selection
htejun Apr 17, 2020
1e9c56f
tools/biolatpcts: Add the example file and man page
htejun Apr 17, 2020
10519c7
examples: Add biolatpcts.py example
htejun Apr 17, 2020
f8f230c
add attribute readers to class USDT (C++ API)
gfx Apr 13, 2020
1599c2e
build: fix clang 10 build
martinetd Apr 17, 2020
ae12114
Merge pull request #2878 from htejun/biolatpcts
yonghong-song Apr 19, 2020
c1d3a65
Added kernel recompile guidance for libbpf CO-RE (#2876)
teroz Apr 19, 2020
6d61622
Add `bcc_version.h` to access LIBBCC_VERSION from C/C++ (#2856)
gfx Apr 19, 2020
d3359b2
Improve ubuntu installation description
itaysk Apr 20, 2020
45e63f2
fix llvm 11 compilation issues
yonghong-song Apr 20, 2020
df3e7d6
sync to latest libbpf
yonghong-song Apr 20, 2020
ceb458d
prepare for release v0.14.0
yonghong-song Apr 21, 2020
d2e8ea4
Fix ELF ABI and endianness checks for powerpc64
sandip4n Apr 21, 2020
264b2cc
bcc: Use bpf_probe_read_user in tools and provide backward compatibility
sumanthkorikkar Apr 7, 2020
ac157b4
bcc: Use direct parameter assignment for syscall probe s390.
sumanthkorikkar Apr 20, 2020
023154c
bcc/tools: Introduce bpf_probe_read_user to the tools.
sumanthkorikkar Apr 20, 2020
aa3a4a6
bcc/docs: Add bpf_probe_read_user to docs and tutorials
sumanthkorikkar Apr 23, 2020
f4302f3
Merge pull request #2866 from sumanthkorikkar/draft_bpf_probe_read_us…
yonghong-song Apr 28, 2020
99739b2
bcc/utils: Avoid code duplication of __generate_streq_function
sumanthkorikkar Apr 28, 2020
306080b
bcc: Add __user attribute to support bpf_probe_read_user in argdist
sumanthkorikkar Apr 27, 2020
7cbd074
bcc: Support bpf_probe_read_user in trace.py
sumanthkorikkar Apr 27, 2020
09be5b5
bcc/libbpf: Fix bpf_has_kernel_btf return status
sumanthkorikkar Apr 28, 2020
59a753d
Add perf event data collection example for an userspace application (…
sahmad98 May 3, 2020
f1c3fc5
Update INSTALL.md
DavadDi May 5, 2020
0d93f24
USDT: make path failure message more explicit
chaiken May 3, 2020
1b03643
Merge pull request #2894 from sumanthkorikkar/bcc-tools-fixes
yonghong-song May 5, 2020
a433ef9
add nfs v3 support to nfsdist.py (#2902)
sabbene May 6, 2020
b8269aa
Bug #2907 - Fix argdist filtering option for USDT probes
akilesh88 May 11, 2020
0d87484
add -fPIC to compile examples/cpp and tests/cc
xuchunmei000 May 6, 2020
46947c5
libbpf-tools: convert BCC vfsstat to BPF CO-RE version
aspsk May 12, 2020
c6342d2
Fix github actions tests
mauriciovasquezbernal May 19, 2020
8c12794
tools/dirtop: Adding dirtop utility (#2819)
ErwanAliasr1 May 20, 2020
fa8142e
libbpf-tools: add CO-RE execsnoop
bacher09 Mar 12, 2020
74e66b4
sync with latest libbpf
yonghong-song May 21, 2020
44e0f43
Fix KFUNC_PROBE return value
mauriciovasquezbernal May 21, 2020
7722fc5
libbcc-py: Fix libbpf types
mauriciovasquezbernal May 21, 2020
104a5b8
bcc/tools: fix typo in help message
kavinda-forcepoint May 21, 2020
32ab858
tools: add filtering by mount namespace
alban Mar 22, 2020
683ed9e
Spelling
kunalb May 22, 2020
a28337a
tool: trace process termination by default
syohex May 22, 2020
112f529
bcc: Error out when bpf_probe_read_user is not present
sumanthkorikkar May 20, 2020
7f6066d
bcc/tools: Replace bpf_probe_read with bpf_probe_read_kernel
sumanthkorikkar May 20, 2020
747e0dd
bcc: Fix user space probe reads with bpf_probe_read_user
sumanthkorikkar May 20, 2020
d958381
bcc/libbpf-tools: Replace bpf_probe_read with bpf_probe_read_kernel.
sumanthkorikkar May 20, 2020
4a1313d
bcc/libbpf-tools: Fix user probe read references
sumanthkorikkar May 20, 2020
471d366
bcc/docs: Replace bpf_probe_read with bpf_probe_read_kernel
sumanthkorikkar May 20, 2020
275abc9
bcc: Check probe read availabilty and use macros
sumanthkorikkar May 20, 2020
0b2f4d0
bcc: Remove bpf_probe_read_user availability checks on compile time
sumanthkorikkar May 21, 2020
ec64e6a
fix: avoid -Wsign-compare warnings
gfx May 25, 2020
076a354
Add arg for filtering on signal
synical May 23, 2020
33c8b1a
Update man page and example file
synical May 26, 2020
d12dd2e
Fix example indent
synical May 26, 2020
7cecd79
Make examples consistent
synical May 26, 2020
30d8975
return failure if rewriter cannot rewrite properly
yonghong-song May 26, 2020
82abd2f
Allow to specify kernel include dirs
olsajiri May 21, 2020
d007478
Adding support to load lsm programs
olsajiri May 22, 2020
5558e36
Make reading blacklist from debugfs optional
bobrik May 29, 2020
b20f5e7
offwaketime: Add support for --state (#2940)
lorddoskias May 30, 2020
f3fbeb4
libbpf-tools: convert BCC syscount to BPF CO-RE version
aspsk Jun 2, 2020
2188d23
tools: Add funcinterval bcc tool.
netedwardwu May 28, 2020
be5d68c
libbpf-tools: add CO-RE cpudist
ethercflow Jun 2, 2020
da0d82c
silence a python travis-ci warning
yonghong-song Jun 3, 2020
5fed2a9
Docker: add kmod dependency to docker container
mauriciovasquezbernal Jun 2, 2020
8319d52
turn off x86 jump table optimization during jit compilation
yonghong-song Jun 3, 2020
78b0f07
Fix runqslower to indicate that the latency param is in microseconds.
adityamandaleeka Jun 4, 2020
126054e
usdt: Add helpers to set semaphore values
danobi Jun 5, 2020
0bcf238
usdt: Have Context::addsem_probe() nop if pid not specified
danobi Jun 5, 2020
263411b
Add support for multiple PID/TID for offwaketime (#2951)
lorddoskias Jun 8, 2020
005664b
fix: encode path to bytes in python3
stwind Jun 7, 2020
8cd2717
tools/opensnoop: Fix compilation problem
mauriciovasquezbernal Jun 8, 2020
e4de95e
libbpf-tools: refactor, move public methods to trace_helpers.c
ethercflow Jun 9, 2020
4440a4d
deadlock: print a more explicit message when pthread_mutex_unlock can…
jeromemarchand Jun 10, 2020
eddf9dd
man: remove non-existent -x argument from tcpconnect man page
jeromemarchand Jun 10, 2020
7830947
loader: suggest to install the right kernel devel package
jeromemarchand Jun 10, 2020
c9805f4
tools: fix a python 3 map issue in dbstat and dbslower
jeromemarchand Jun 10, 2020
26b8763
Merge pull request #2960 from jeromemarchand/misc-doc-fixes
yonghong-song Jun 10, 2020
6a96194
Fix typos in kretfunc documentation
willfindlay Jun 12, 2020
5966549
Explicitly use NULL macro in pointer value check (#2965)
djosephsen Jun 13, 2020
10603c7
dbstat: fix overflowing timestamp
jeromemarchand Jun 11, 2020
2c93955
Add install steps for Alpine Linux
acj Jun 14, 2020
99fa312
sync with latest libbpf repo
yonghong-song Jun 16, 2020
68abb51
Add KBUILD_MODNAME flag to default cflags
willfindlay Jun 17, 2020
1c843e2
Delete existing kbuild_modname definitions
willfindlay Jun 17, 2020
c3ed131
sync with libbpf v0.0.9
yonghong-song Jun 19, 2020
e3daec8
[BPFTable] clear_table_non_atomic: Remove duplicate macro
gaurav1086 Jun 18, 2020
f438bff
fix LSM_PROBE return value
yonghong-song Jun 19, 2020
9b82af3
API improvements for BPF LSM programs (#2979)
willfindlay Jun 19, 2020
5a8bf15
Add LSM probe documentation (#2980)
willfindlay Jun 19, 2020
e41f7a3
prepare for release v0.15.0
yonghong-song Jun 19, 2020
05f3f86
libbpf-tools: remove unnecessary header include from syscount.bpf.c
anakryiko Jun 21, 2020
4bf92d1
Add missing LSM cleanup hook
willfindlay Jun 20, 2020
f579bf8
bpf: use bpf_probe_read in implicitly generated kernel mem read
yonghong-song Jun 22, 2020
0d9e091
Fix kernel version for ringbuf and add ringbuf to maps table
willfindlay Jun 23, 2020
34f8985
libbpf-tools: add CO-RE bitesize
ethercflow Jun 22, 2020
1bddba6
tools/profile: fix suggestion about when to increase stack-storage-size
boat0 Jun 23, 2020
156a7d1
Fix KFUNC_PROBE calls in vfs_stat.py by adding a return value (#2990)
willfindlay Jun 24, 2020
fe730f2
Ringbuf Support for Python API (#2989)
willfindlay Jun 25, 2020
fbde62b
Introducing Queue/Stack helpers and clang frontend
smagnani96 Jun 26, 2020
30a420d
add BPFQueueStackTable and tests
smagnani96 Jun 28, 2020
f0bbf32
sync with latest libbpf repo
yonghong-song Jul 1, 2020
581b198
valloc and pvalloc is deprecated in bionic on Android
b-ripper Jul 2, 2020
fc20957
Fix symfs symbol resolution
michalgr Jul 3, 2020
1a348d4
docs: Add BPF LSM hook to kernel features
lcp Jul 3, 2020
f0dd349
docs: Update XDP driver support list
lcp Jul 3, 2020
be27742
docs: add RISC-V to the JIT support list
lcp Jul 3, 2020
1b7aab1
add the option --hexdump to sslsniff to allow sniffing of binary prot…
Jul 3, 2020
d40c3a7
fix examples in sslsniff.py
Jul 3, 2020
d91b31a
reformat code, add new option to manpage and usage in sslsniff_exampl…
Jul 6, 2020
1ef6758
example block of --hexdump in sslsniff_example.txt
Jul 6, 2020
d4f6a16
docs: fix Ubuntu Eoan spelling
fntlnz Jul 6, 2020
95c9229
Replace kprobe function "blk_account_io_completion" to "blk_account_i…
owen-chenhn Jul 1, 2020
cd81f13
memleak: Add workaround to alleviate misjudgments when free is missing
netedwardwu Jul 6, 2020
fab26b4
sync with latest libbpf
yonghong-song Jul 8, 2020
57d10f5
libbpf-tools: add header to store BPF-side map helpers
aspsk Jun 20, 2020
b8cdd21
libbpf-tools: fix an error message
aspsk Jun 20, 2020
3ef7531
libbpf-tools: convert BCC tcpconnect to BPF CO-RE version
aspsk Jun 21, 2020
104d2b3
Add .lazy_symbolize field to bcc_symbol_option and add ignored fields…
rhdxmr Jul 9, 2020
e70bbdc
Add Python API and documentation for Queue/Stack Tables (#3013)
willfindlay Jul 11, 2020
1abab9b
use bpf_probe_read_kernel for implicit kernel mem read on s390
yonghong-song Jul 12, 2020
d3a102d
fix cc queue/stack test kernel version
smagnani96 Jul 12, 2020
4efe7fe
fix debug file lookup in bcc_elf_symbol_str
michalgr Jul 9, 2020
2b99f69
Merge pull request #2994 from aspsk/tcpconnect-libbpf
yonghong-song Jul 15, 2020
316b404
update reference_guide for implicit kmem access rewriting
yonghong-song Jul 15, 2020
222821c
libbpf-tools: add CO-RE biolatency
ethercflow Jul 9, 2020
c31e9d6
Adjust the order of linux kernel header include paths
lcp Jul 2, 2020
a02663b
libbpf-tools: update bpftool and fix .rodata hack
anakryiko Jul 22, 2020
ba0bacf
Add return value check and handling for xattr loading
Jul 9, 2020
6889afe
tools/opensnoop: Snoop all open related syscall stubs
Jul 20, 2020
7ce6f64
man: fix tcpconnect man page
jeromemarchand Jul 27, 2020
7928ea0
Add example for new helper to documentation.
cneira Jul 24, 2020
ca5bcd2
libbpf-tools: add CO-RE biopattern
ethercflow Jul 27, 2020
b6ffa24
libbpf-tools: add CO-RE tcpconnlat
ethercflow Jul 22, 2020
8a164f9
sync with latest libbpf repo
yonghong-song Jul 30, 2020
e0e2215
libbpf-tools: add CO-RE biosnoop
ethercflow Jul 29, 2020
f8ac3c6
libbpf-tools: fix tcpconnect compile errors
ethercflow Jul 20, 2020
d7b427e
Offset support for uprobe and kprobe
SPYFF Aug 1, 2020
8105317
Update the documentation of the k/uprobe offset support
SPYFF Aug 2, 2020
6432324
typos
SPYFF Aug 2, 2020
9ef20e7
sync with latest libbpf repo
yonghong-song Aug 10, 2020
3fbb664
Fixes a problem when LLVM_DEFINITIONS contains a definition with an `…
Aug 11, 2020
b61e65f
bcc/tools/fileslower: Attach to vfs_read after failing to attach __vf…
Aug 12, 2020
5c27222
libbpibbpf-tools: fix tcpconnect types usage
aspsk Aug 12, 2020
fb54a82
libbpf-tools: add CO-RE readahead
ethercflow Aug 7, 2020
7d081eb
libbpf-tools: fix tcpconnlat types usage
ethercflow Aug 13, 2020
639e83f
docs: fix broken links
fbs Aug 16, 2020
49beed8
Forbid trampolines for archs other than x86_64
olsajiri Aug 19, 2020
e73e1f6
kernel-versions.md: document map UAPI features (#3058)
mildsunrise Aug 20, 2020
f4e65ac
tools/funccount: support funccount on specified CPU (#3059)
pizhenwei Aug 21, 2020
785924b
Extend PerfType members
netedwardwu Aug 20, 2020
71c22fc
libbpf-tools: add CO-RE biostacks
ethercflow Aug 20, 2020
a79ec23
sync libbpf repo release 0.1.0
yonghong-song Aug 22, 2020
fecd934
prepare for release v0.16.0
yonghong-song Aug 22, 2020
43910c4
sync with libbpf repo
yonghong-song Aug 22, 2020
60de171
fix the exits abnormal due to trace buffer
Aug 26, 2020
fc92caa
doc: fix mismatched link
zhuangqh Aug 27, 2020
0e7304e
tools/capable: support new capabilities
Sep 1, 2020
892475f
fix retruning typo
Aug 31, 2020
4344034
tests: only run arg parser test on supported arches
r4f4 Sep 2, 2020
7ac370b
Add instructions on how to install amazon linux 2 from source
Sep 4, 2020
b8e661f
memleak: fix false positive on failed allocations
amir73il Sep 3, 2020
e42ac41
tools/tcprtt: add tcprtt to trace the RTT of TCP
pizhenwei Aug 23, 2020
ba73657
Netqtop 3037 (#3048)
wuhao1640 Sep 11, 2020
3f95637
add threadsnoop
brendangregg Sep 16, 2020
12c234f
add tcpsynbl
brendangregg Sep 16, 2020
da8c6a9
add swapin
brendangregg Sep 16, 2020
3953c60
libbpf-tools: add hardirqs
ethercflow Sep 9, 2020
bf4668d
libbpf-tools: add softirqs
ethercflow Sep 9, 2020
48b7d61
libbpf-tools: add runqlat
ethercflow Sep 3, 2020
911ce07
libbpf-tools: add runqlen
ethercflow Sep 16, 2020
caaeb0a
libbpf-tools: add numamove
ethercflow Sep 3, 2020
39a2a8f
Add uretprobe example for indirect function
rhdxmr Sep 19, 2020
e548dd5
tools/tcpstates: remove unnecessary checking of TCP
boat0 Sep 24, 2020
561a71e
tool: port readahead tool to bcc
tuxology Sep 24, 2020
4cbcd9a
tcprtt: add --byladdr/--byraddr (#3106)
pizhenwei Sep 28, 2020
af90bd4
add average function latency (#3061)
wuhao1640 Sep 28, 2020
788303e
slabratetop: Add memcg_cache_params struct def
dwrank Sep 27, 2020
7e3f0c0
Fix v6 source (remote) and dest (local) address
nspring Sep 28, 2020
21b810a
tools: tcptracer: fix alignement in tcp_ipv6_event_t
jeromemarchand Sep 17, 2020
87792ce
tools/biolatency: Handle signals from user
kcalvinalvin Sep 29, 2020
73cf23b
libbpf-tools: make some minor refactoring
ethercflow Sep 24, 2020
17e14ef
Revert "tools/biolatency: Handle signals from user"
yonghong-song Oct 1, 2020
d0e1c93
sync with latest libbpf repo
yonghong-song Oct 2, 2020
5fe3576
add C++ bpf_iter support
yonghong-song Oct 4, 2020
5e55c22
docs: Add missing code block closure
mauriciovasquezbernal Oct 7, 2020
884799f
tools: Use correct key key when deleting item from map
mauriciovasquezbernal Oct 8, 2020
49fdec6
sslsniff: fix comparing bytes to string
keyolk Oct 8, 2020
6ce68b9
Update installation instructions for Arch Linux
sam-lunt Oct 14, 2020
4354c9c
set larger range to get probes evnet for test_usdt2.py
xuchunmei000 Oct 13, 2020
5f53dbe
Add install instructions for Debian
stribb Oct 16, 2020
8c2d67e
libbpf-tools: initialize global structs in runqlen and softirqs
jvijtiuk Oct 6, 2020
6929626
libbpf-tools: add llcstat
ethercflow Sep 29, 2020
1efba05
Fix python2.7 support for dirtop tool
willfindlay Oct 16, 2020
6ba4dc1
fix python3 compatible issue for netqtop and tcprtt tools
yonghong-song Oct 16, 2020
ec3747e
fix netqtop python3 compatible (#3140)
wuhao1640 Oct 19, 2020
d4aecc6
Refactor docker image publishing
dalehamel Oct 19, 2020
20b098a
Add ubuntu 20.04 build support
dalehamel Oct 19, 2020
d35a2dc
Guard artifact upload with environment variable
dalehamel Oct 21, 2020
9269e48
Prefer newer llvm/clang versions in debian packaging
dalehamel Oct 21, 2020
4967a61
Do not permit errors in docker build
dalehamel Oct 21, 2020
48946d2
python: import ABCs from collections.abc
lorenzosaino Oct 21, 2020
1bbff3b
Merge remote-tracking branch 'upstream/master' into merge
pzakha Oct 23, 2020
d37492a
disable unwanted publish.yml workflow
pzakha Oct 28, 2020
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
  •  
  •  
  •  
105 changes: 105 additions & 0 deletions .github/disabled-workflows/publish.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,105 @@
name: Publish Build Artifacts

on: push

jobs:
publish_images:
# Optionally publish container images, guarded by the GitHub secret
# QUAY_PUBLISH.
# To set this up, sign up for quay.io (you can connect it to your github)
# then create a robot user with write access user called "bcc_buildbot",
# and add the secret token for it to GitHub secrets as:
# - QUAY_TOKEN = <token from quay.io>
name: Publish to quay.io
runs-on: ubuntu-latest
strategy:
matrix:
env:
- NAME: xenial-release
OS_RELEASE: 16.04
- NAME: bionic-release
OS_RELEASE: 18.04
- NAME: focal-release
OS_RELEASE: 20.04
steps:

- uses: actions/checkout@v1

- name: Initialize workflow variables
id: vars
shell: bash
run: |
if [ -n "${QUAY_TOKEN}" ];then
echo "Quay token is set, will push an image"
echo ::set-output name=QUAY_PUBLISH::true
else
echo "Quay token not set, skipping"
fi

env:
QUAY_TOKEN: ${{ secrets.QUAY_TOKEN }}

- name: Authenticate with quay.io docker registry
if: >
steps.vars.outputs.QUAY_PUBLISH
env:
QUAY_TOKEN: ${{ secrets.QUAY_TOKEN }}
run: ./scripts/docker/auth.sh ${{ github.repository }}

- name: Package docker image and push to quay.io
if: >
steps.vars.outputs.QUAY_PUBLISH
run: >
./scripts/docker/push.sh
${{ github.repository }}
${{ github.ref }}
${{ github.sha }}
${{ matrix.env['NAME'] }}
${{ matrix.env['OS_RELEASE'] }}

# Uploads the packages built in docker to the github build as an artifact for convenience
- uses: actions/upload-artifact@v1
if: >
steps.vars.outputs.QUAY_PUBLISH
with:
name: ${{ matrix.env['NAME'] }}
path: output

# Optionally publish container images to custom docker repository,
# guarded by presence of all required github secrets.
# GitHub secrets can be configured as follows:
# - DOCKER_IMAGE = docker.io/myorg/bcc
# - DOCKER_USERNAME = username
# - DOCKER_PASSWORD = password
publish_dockerhub:
name: Publish To Dockerhub
runs-on: ubuntu-latest
steps:

- uses: actions/checkout@v1

- name: Initialize workflow variables
id: vars
shell: bash
run: |
if [ -n "${DOCKER_IMAGE}" ] && \
[ -n "${DOCKER_USERNAME}" ] && \
[ -n "${DOCKER_PASSWORD}" ];then
echo "Custom docker credentials set, will push an image"
echo ::set-output name=DOCKER_PUBLISH::true
else
echo "Custom docker credentials not, skipping"
fi

- name: Build container image and publish to registry
id: publish-registry
uses: elgohr/Publish-Docker-Github-Action@2.8
if: ${{ steps.vars.outputs.DOCKER_PUBLISH }}
with:
name: ${{ secrets.DOCKER_IMAGE }}
username: ${{ secrets.DOCKER_USERNAME }}
password: ${{ secrets.DOCKER_PASSWORD }}
workdir: .
dockerfile: Dockerfile.ubuntu
snapshot: true
cache: ${{ github.event_name != 'schedule' }}
4 changes: 4 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -12,3 +12,7 @@ debian/**/*.log
*critical.log
obj-x86_64-linux-gnu
examples/cgroupid/cgroupid

# Output from docker builds
scripts/docker/output/
/output/
38 changes: 25 additions & 13 deletions CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,10 @@ if(NOT CMAKE_BUILD_TYPE)
set(CMAKE_BUILD_TYPE Release)
endif()

if(CMAKE_INSTALL_PREFIX_INITIALIZED_TO_DEFAULT)
set(CMAKE_INSTALL_PREFIX "/usr" CACHE PATH "path to install" FORCE)
endif()

enable_testing()

# populate submodules (libbpf)
Expand All @@ -15,6 +19,14 @@ if(NOT EXISTS ${CMAKE_CURRENT_SOURCE_DIR}/src/cc/libbpf/src)
WORKING_DIRECTORY ${CMAKE_CURRENT_SOURCE_DIR})
endif()

# It's possible to use other kernel headers with
# KERNEL_INCLUDE_DIRS build variable, like:
# $ cd <kernel-dir>
# $ make INSTALL_HDR_PATH=/tmp/headers headers_install
# $ cd <bcc-dir>
# $ cmake -DKERNEL_INCLUDE_DIRS=/tmp/headers/include/ ...
include_directories(${KERNEL_INCLUDE_DIRS})

include(cmake/GetGitRevisionDescription.cmake)
include(cmake/version.cmake)
include(CMakeDependentOption)
Expand Down Expand Up @@ -51,19 +63,19 @@ 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}")
find_library(libclangAnalysis NAMES clangAnalysis HINTS ${CLANG_SEARCH})
find_library(libclangAST NAMES clangAST HINTS ${CLANG_SEARCH})
find_library(libclangBasic NAMES clangBasic HINTS ${CLANG_SEARCH})
find_library(libclangCodeGen NAMES clangCodeGen HINTS ${CLANG_SEARCH})
find_library(libclangDriver NAMES clangDriver HINTS ${CLANG_SEARCH})
find_library(libclangEdit NAMES clangEdit HINTS ${CLANG_SEARCH})
find_library(libclangFrontend NAMES clangFrontend HINTS ${CLANG_SEARCH})
find_library(libclangLex NAMES clangLex HINTS ${CLANG_SEARCH})
find_library(libclangParse NAMES clangParse HINTS ${CLANG_SEARCH})
find_library(libclangRewrite NAMES clangRewrite HINTS ${CLANG_SEARCH})
find_library(libclangSema NAMES clangSema HINTS ${CLANG_SEARCH})
find_library(libclangSerialization NAMES clangSerialization HINTS ${CLANG_SEARCH})
find_library(libclangASTMatchers NAMES clangASTMatchers HINTS ${CLANG_SEARCH})
find_library(libclangAnalysis NAMES clangAnalysis clang-cpp HINTS ${CLANG_SEARCH})
find_library(libclangAST NAMES clangAST clang-cpp HINTS ${CLANG_SEARCH})
find_library(libclangBasic NAMES clangBasic clang-cpp HINTS ${CLANG_SEARCH})
find_library(libclangCodeGen NAMES clangCodeGen clang-cpp HINTS ${CLANG_SEARCH})
find_library(libclangDriver NAMES clangDriver clang-cpp HINTS ${CLANG_SEARCH})
find_library(libclangEdit NAMES clangEdit clang-cpp HINTS ${CLANG_SEARCH})
find_library(libclangFrontend NAMES clangFrontend clang-cpp HINTS ${CLANG_SEARCH})
find_library(libclangLex NAMES clangLex clang-cpp HINTS ${CLANG_SEARCH})
find_library(libclangParse NAMES clangParse clang-cpp HINTS ${CLANG_SEARCH})
find_library(libclangRewrite NAMES clangRewrite clang-cpp HINTS ${CLANG_SEARCH})
find_library(libclangSema NAMES clangSema clang-cpp HINTS ${CLANG_SEARCH})
find_library(libclangSerialization NAMES clangSerialization clang-cpp HINTS ${CLANG_SEARCH})
find_library(libclangASTMatchers NAMES clangASTMatchers clang-cpp HINTS ${CLANG_SEARCH})
if(libclangBasic STREQUAL "libclangBasic-NOTFOUND")
message(FATAL_ERROR "Unable to find clang libraries")
endif()
Expand Down
12 changes: 6 additions & 6 deletions Dockerfile.tests
Original file line number Diff line number Diff line change
@@ -1,19 +1,19 @@
# Using ubuntu 19.04 for newer `unshare` command used in tests
FROM ubuntu:19.04
FROM ubuntu:18.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" &&\
deb http://apt.llvm.org/bionic/ llvm-toolchain-bionic main\n\
deb-src http://apt.llvm.org/bionic/ llvm-toolchain-bionic main\n\
deb http://apt.llvm.org/bionic/ llvm-toolchain-bionic-${LLVM_VERSION} main\n\
deb-src http://apt.llvm.org/bionic/ llvm-toolchain-bionic-${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 \
util-linux \
bison \
binutils-dev \
cmake \
Expand Down
18 changes: 16 additions & 2 deletions Dockerfile.ubuntu
Original file line number Diff line number Diff line change
@@ -1,4 +1,9 @@
FROM ubuntu:bionic
ARG OS_TAG=18.04
FROM ubuntu:${OS_TAG} as builder

ARG OS_TAG
ARG BUILD_TYPE=release
ARG DEBIAN_FRONTEND=noninteractive

MAINTAINER Brenden Blanco <bblanco@gmail.com>

Expand All @@ -10,4 +15,13 @@ COPY ./ /root/bcc
WORKDIR /root/bcc

RUN /usr/lib/pbuilder/pbuilder-satisfydepends && \
./scripts/build-deb.sh
./scripts/build-deb.sh ${BUILD_TYPE}

FROM ubuntu:${OS_TAG}

COPY --from=builder /root/bcc/*.deb /root/bcc/

RUN \
apt-get update -y && \
DEBIAN_FRONTEND=noninteractive apt-get install -y python python3 binutils libelf1 kmod && \
dpkg -i /root/bcc/*.deb
Loading