- 14 Feb, 2018 3 commits
-
-
yonghong-song authored
Script to check that the lists of helpers are in sync
-
Paul Chaignon authored
Checks src/cc/libbpf.c, docs/kernel-versions.md, src/cc/compat/linux/bpf.h, and src/cc/export/helpers.h.
-
yonghong-song authored
Cosmetic: Make kernel-versions commit hashes monospace
-
- 12 Feb, 2018 2 commits
-
-
Teng Qin authored
-
yonghong-song authored
Discourage use of str() type strings in python API
-
- 11 Feb, 2018 2 commits
-
-
yonghong-song authored
Fix two issues in examples
-
yonghong-song authored
Implement get_text for Python USDT class
-
- 10 Feb, 2018 3 commits
- 09 Feb, 2018 2 commits
-
-
Liu Bo authored
<linux/blkdev.h> is not needed. Signed-off-by: Liu Bo <liub.liubo@gmail.com>
-
Liu Bo authored
A function definition doesn't need a tail semicolon. Signed-off-by: Liu Bo <liub.liubo@gmail.com>
-
- 08 Feb, 2018 5 commits
-
-
Brenden Blanco authored
Conform to bytes encoding for some portion of the tools/tests, such that smoke tests pass on python3. More conversions are surely required. Signed-off-by: Brenden Blanco <bblanco@gmail.com>
-
Brenden Blanco authored
Move bcc internals to sanitize all arguments as bytes instead of str type. For now, disable warnings or actual assertion, to be turned on incrementally.
-
Brenden Blanco authored
Introduce some helpers for managing bytes/unicode objects in a way that bridges the gap from python2 to 3. 1. Add printb() helper for writing bytes output directly to stdout. This avoids complaints from print() in python3, which expects a unicode str(). Since python 3.5, `b"" % bytes()` style format strings should work and we can write tools with common code, once we convert format strings to bytes. http://legacy.python.org/dev/peps/pep-0461/ 2. Add a class for wrapping command line arguments that are intended for comparing to debugged memory, for instance running process COMM or kernel pathname data. The approach takes some of the discussion from http://legacy.python.org/dev/peps/pep-0383/ into account, though unfortunately the python2-future implementation of "surrogateescape" is buggy, therefore this iteration is partial. The object instance should only ever be coerced into a bytes object. This silently invokes encode(sys.getfilesystemencoding()), which if it fails implies that the tool was passed junk characters on the command line. Thereafter the tool should implement only bytes-bytes comparisons (for instance re.search(b"", b"")) and bytes stdout printing (see printb). 3. Add an _assert_is_bytes helper to check for improper usage of str objects in python arguments. The behavior of the assertion can be tweaked by changing the bcc.utils._strict_bytes bool. Going forward, one should never invoke decode() on a bpf data stream, e.g. the result of a table lookup or perf ring output. Leave that data in the native bytes() representation. Signed-off-by: Brenden Blanco <bblanco@gmail.com>
-
Brenden Blanco authored
Signed-off-by: Brenden Blanco <bblanco@gmail.com>
-
yonghong-song authored
BCC cross compilation support
-
- 06 Feb, 2018 7 commits
-
-
Joel Fernandes authored
BCC at the moment builds eBPF only considering the local architecture instead of the one that the user's target kernel is running on. For cross-compiler environments, the ARCH environment variable is used to specify which ARCH to build the kernel for. In this patch we add support to read ARCH and if that's not set, then fallback to detecting based on local architecture. This patch borrows some code from a patch doing a similar thing for eBPF samples in the kenrel that I submitted recently [1] [1] https://patchwork.kernel.org/patch/9961801/Signed-off-by: Joel Fernandes <joelaf@google.com>
-
Joel Fernandes authored
Many developers have kernel sources at an specific location. Allow clang to build from there by allowing to specify a single absolute path to the kernel sources through a new env var BCC_KERNEL_SOURCE. Signed-off-by: Joel Fernandes <joelaf@google.com>
-
yonghong-song authored
Updated the FAQ with the error produced if python[2-3]-bcc isn't inst…
-
yonghong-song authored
Document bpf_tail_call()
-
Gary Lin authored
Signed-off-by: Gary Lin <glin@suse.com>
-
Gary Lin authored
Define a new macro to make it easier to declare a program array. Also replace BPF_TABLE("prog") in examples and tests with BPF_PROG_ARRAY. Signed-off-by: Gary Lin <glin@suse.com>
-
yonghong-song authored
Fix missing include
-
- 05 Feb, 2018 6 commits
-
-
Brendan Gregg authored
tcptracer: Fix argparse is not defined error
-
Dane Springmeyer authored
Fixes compile with libc++ on linux: ``` In file included from ../tests/cc/test_array_table.cc:17: In file included from ../src/cc/api/BPF.h:24: ../src/cc/api/BPFTable.h:118:71: error: use of undeclared identifier 'errno' return StatusTuple(-1, "Error getting value: %s", std::strerror(errno)); ```
-
yonghong-song authored
Add missing includes to fix build against libc++
-
Matty authored
-
Gal Pressman authored
argparse is imported as ap, using argparse explicitly results in a name not defined error. Signed-off-by: Gal Pressman <galp@mellanox.com>
-
yonghong-song authored
continue adding --ebpf option to the python tools/ scripts
-
- 04 Feb, 2018 4 commits
-
-
Dane Springmeyer authored
Fixes this compile error: ``` ../src/cc/frontends/clang/kbuild_helper.h:40:64: error: use of undeclared identifier 'errno' fprintf(stderr, "chdir(%s): %s\n", dst.c_str(), strerror(errno)); ```
-
Dane Springmeyer authored
This fixes the compile with `-stdlib=libc++`. Without this header the build fails with: ``` ../src/cc/ns_guard.cc:75:30: error: use of undeclared identifier 'CLONE_NEWNS' ```
-
Nathan Scott authored
Found by yonghong-song while reviewing PR #1570. Signed-off-by: Nathan Scott <nathans@redhat.com>
-
Brendan Gregg authored
opensnoop: -d option for duration
-
- 03 Feb, 2018 1 commit
-
-
yonghong-song authored
Small fixes
-
- 02 Feb, 2018 3 commits
-
-
Song Liu authored
Signed-off-by: Song Liu <songliubraving@fb.com>
-
Song Liu authored
The semicolon is usually added when the macro is used. Update both the macro definition and all uses. Signed-off-by: Song Liu <songliubraving@fb.com>
-
Nathan Scott authored
Several python tools allow their eBPF code to be printed to stdout for debugging. There are other projects that would like to share these program definitions however, instead of duplicating code. We previously agreed on an --ebpf option and we now continue adding it to more tools. Signed-off-by: Nathan Scott <nathans@redhat.com>
-
- 01 Feb, 2018 1 commit
-
-
yonghong-song authored
Add option to print virtual address to trace.py
-
- 31 Jan, 2018 1 commit
-
-
Mirek Klimos authored
-