- 02 Feb, 2018 1 commit
-
-
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>
-
- 01 Feb, 2018 1 commit
-
-
yonghong-song authored
Add option to print virtual address to trace.py
-
- 31 Jan, 2018 2 commits
-
-
Mirek Klimos authored
-
yonghong-song authored
Miscellaneous BCC patches
-
- 30 Jan, 2018 1 commit
-
-
yonghong-song authored
doc: bpf_get_current_task helper
-
- 29 Jan, 2018 6 commits
-
-
Joel Fernandes authored
__delitem__ has some code duplication for the common case. The common case is to call the low-level bpf_delete_elem function. Refactor the code a bit for this case. It avoids duplication of code and will also make the communication with BPFd simpler as well. Test: Ran test_tools_smoke tests with all tests passing except for test_shared_table.py which fails for me with or without this patch. (Filing separate issue for that). Signed-off-by: Joel Fernandes <joelaf@google.com>
-
4ast authored
fix map a type parsing issue for export/extern types
-
yonghong-song authored
Update man page for funccount
-
yonghong-song authored
cc: missing bpf helpers in export/helpers.h
-
Yonghong Song authored
Fix issue #1562. Currently, bcc allows a map defined in one module and used in the same or a different module. At tests/python directory, test_clang.py and test_shared_table.py have such an example. ... b1 = BPF(text="""BPF_TABLE_PUBLIC("hash", int, int, table1, 10);""") b2 = BPF(text="""BPF_TABLE("extern", int, int, table1, 10);""") t = b2["table"] ... With current implementation, the map key/value types are parsed twice, resulting a type "int int" instead of "int". When type is retrieved through `t = b2["table"]`, python decoding error will appear. The issue is fixed by preventing the second map key/value type parsing if the map is `extern`. Also add `t = b2["table"]` so the issue will be triggered if bcc clang frontend fix is not there. Signed-off-by: Yonghong Song <yhs@fb.com>
-
yonghong-song authored
cc: error hint for 'invalid func'
-
- 28 Jan, 2018 6 commits
-
-
Joel Fernandes authored
Systems such as Android mostly use openat which makes us miss all attempts to open. Instead use do_sys_open for the kprobe hook where all the open calls finally end up, so that we don't miss anything. Signed-off-by: Joel Fernandes <joelaf@google.com>
-
Joel Fernandes authored
libclang does use functions from libbcc so it does depend on it. When defining new symbols in bpf_common.cc, linker errors appear when the same symbols are used in libclang. This is because of incorrect linker dependency, this patch fixes the issue by making sure the dependency is correctly tracked. Signed-off-by: Joel Fernandes <joelaf@google.com>
-
Paul Chaignon authored
Finish man page update for b03d9eb2.
-
Paul Chaignon authored
-
Paul Chaignon authored
-
yonghong-song authored
bpf_getsockopt in docs/kernel-versions.md
-
- 27 Jan, 2018 2 commits
-
-
Paul Chaignon authored
-
Paul Chaignon authored
-
- 25 Jan, 2018 5 commits
-
-
4ast authored
add a probe alias $task in trace.py
-
Yonghong Song authored
The $task refers to the current task. In my particular case, I need to trace the number of users for file system associated with the current task. With the probe alias $task, trace.py can easily trace this event ...... trace.py -I 'linux/fs_struct.h' 'mntns_install "users = %d", $task->fs->users' PID TID COMM FUNC - 176566 176566 python2.7 mntns_install users = 2 176566 176566 python2.7 mntns_install users = 2 ...... With $task probe alias, kernel tast_struct fields can be used in trace.py filter or output easily even if they cannot be accessed through input parameters. Signed-off-by: Yonghong Song <yhs@fb.com>
-
4ast authored
use __builtin_memset instead of memset with frontend rewriter
-
4ast authored
fix flaky test py_test_usdt3
-
Yonghong Song authored
When kernel CONFIG_KASAN is enabled, the function memset becomes a global function __memset. The bcc application with probe rewrite will incur an error like: error: <unknown>:0:0: in function tracepoint__task__task_newtask i32 (%struct.tracepoint__task__task_newtask*): A call to global function '__memset' is not supported. Only calls to predefined BPF helpers are allowed. Replace memset function with clang __builtin_memset so that the compiler is able to eventually optimize it away. Signed-off-by: Yonghong Song <yhs@localhost.localdomain>
-
- 24 Jan, 2018 5 commits
-
-
Yonghong Song authored
py_test_usdt3 has shown flakiness recently, and I actually reproduced it on FC27. This patch increases the iteration number for kprobe_poll and I ran the test for more than 20 times without any failure. Also fix a python3 compability issue. Open the file to write with attribute "wb" instead of "w" since the text string is a byte array. Signed-off-by: Yonghong Song <yhs@fb.com>
-
4ast authored
fix a race condition between perf_reader munmap and read
-
yonghong-song authored
adding filtering example to trace.py help
-
Yonghong Song authored
Fix issue #1533. Currently, there exist a race condition between perf_reader buffer munmap and read if they are happening in two different threads, crash is possible as in issue #1533. thread 1 thread 2 perf_reader_event_read ... detach_probe munmap access ring buffer detach_probe may happen as part of bpf object exit cleanup process at which point thread 1 is still alive. In this case, accessing ring buffer may cause segfault since the original mmap'ed memory is not available any more. It is hard to fix such races outside bcc since user calls kprobe_poll which has valid BPF object when it is called, but race happens inside the kprobe_poll. This patch adds a state of the ring buffer and the read will not happen once the state comes to the munmap. Signed-off-by: Yonghong Song <yhs@fb.com>
-
tehnerd authored
-
- 23 Jan, 2018 1 commit
-
-
Yonghong Song authored
Signed-off-by: Yonghong Song <yhs@fb.com>
-
- 22 Jan, 2018 2 commits
-
-
4ast authored
Add a few trace.py examples in tutorial.md
-
yonghong-song authored
Allow for sharing of python tools/ scripts
-
- 20 Jan, 2018 4 commits
-
-
Nathan Scott authored
Use of this argparse constructor keyword is causing regression test failures, and its use was nice-to-have - this means the -e shorthand for --ebpf will be available iff its not been used in another add_argument call. Neither -e/--ebpf are advertised in the usage message anyway.
-
Yonghong Song authored
Signed-off-by: Yonghong Song <yhs@fb.com>
-
yonghong-song authored
Small fixes to some man pages for bcc tools
-
dpayne authored
-
- 19 Jan, 2018 4 commits
-
-
yonghong-song authored
Fix folding option
-
yonghong-song authored
Add bpf_override_return() helper definition
-
Howard McLauchlan authored
-
Howard McLauchlan authored
-