Brendan Gregg [Wed, 11 Jan 2017 01:36:07 +0000 (17:36 -0800)]
add a few funccount examples
4ast [Mon, 9 Jan 2017 20:40:46 +0000 (12:40 -0800)]
Merge pull request #883 from ColinIanKing/master
snapcraft: add cpuunclaimed to snapcraft wrapper rules
4ast [Mon, 9 Jan 2017 20:23:40 +0000 (12:23 -0800)]
Merge pull request #890 from mvbpolito/add_helpers
Add missing helper prototypes
4ast [Mon, 9 Jan 2017 20:23:22 +0000 (12:23 -0800)]
Merge pull request #889 from totally/preprocess_4.10
Fixes bio{snoop,top} on 4.10
Mauricio Vasquez B [Mon, 9 Jan 2017 02:26:32 +0000 (21:26 -0500)]
Add missing helpers prototypes in helpers.h
Signed-off-by: Mauricio Vasquez B <mauricio.vasquez@polito.it>
Ryan Leary [Sat, 7 Jan 2017 20:34:31 +0000 (15:34 -0500)]
Fixes bio{snoop,top} on 4.10.
This commit fixes #888. The 2 scripts run the same check, and now run
basically the same code to do it.
Tested on 4.10-rc2.
Brenden Blanco [Sat, 7 Jan 2017 19:16:59 +0000 (11:16 -0800)]
Merge pull request #887 from rneugeba/cflags
Add -fno-stack-protector to CFLAGS
Rolf Neugebauer [Sat, 7 Jan 2017 14:05:15 +0000 (14:05 +0000)]
Add -fno-stack-protector to CFLAGS
When compiling ebpf programs on Alpine Linux the compiler throws the following
error:
LLVM ERROR: Cannot select: 0x56049b79dcb0: ch,glue = BPFISD::CALL 0x56049a93ad60, TargetExternalSymbol:i64'__stack_chk_fail'
0x56049b391500: i64 = TargetExternalSymbol'__stack_chk_fail'
In function: waker
Disabling the stack protector explicitly with '-fno-stack-protector'
fixes this error.
clang version 3.8.1 (tags/RELEASE_381/final)
Target: x86_64-alpine-linux-musl
Thread model: posix
InstalledDir: /usr/bin
Signed-off-by: Rolf Neugebauer <rolf.neugebauer@docker.com>
Brenden Blanco [Thu, 5 Jan 2017 22:50:07 +0000 (14:50 -0800)]
Merge pull request #882 from mvbpolito/master
add missing inclusion guards in bcc/proto.h
Brenden Blanco [Thu, 5 Jan 2017 19:35:37 +0000 (11:35 -0800)]
Merge branch 'master' into master
4ast [Thu, 5 Jan 2017 19:35:13 +0000 (11:35 -0800)]
Merge pull request #886 from iovisor/llvm_40_fixes
Fixes for LLVM 4.0 and python3
Brenden Blanco [Thu, 5 Jan 2017 19:13:12 +0000 (11:13 -0800)]
Fixes for LLVM 4.0 and python3
Avoid conflicting [no]inline attributes in function annotation. This was
probably always there but now 4.0 is treating this as an error.
Also, explicitly inline several functions in helpers.h.
Turn off unwind tables in the flags passed to clang. This was generating
calls to the elf relocator, which doesn't work for the BPF target. It is
unclear which change in LLVM 4.0 altered this behavior.
On python3, handle byte strings in the usual way for supporting
backwards compatibility.
Signed-off-by: Brenden Blanco <bblanco@gmail.com>
Colin Ian King [Thu, 5 Jan 2017 15:54:29 +0000 (15:54 +0000)]
snapcraft.yaml: fix typo in ttysnoop wrapper
fix stupid typo in wrapper: ttysnop -> ttysnoop
Signed-off-by: Colin Ian King <colin.king@canonical.com>
Colin Ian King [Thu, 5 Jan 2017 16:06:52 +0000 (16:06 +0000)]
snapcraft: add cpuunclaimed to snapcraft wrapper rules
Signed-off-by: Colin Ian King <colin.king@canonical.com>
Brenden Blanco [Tue, 3 Jan 2017 15:34:45 +0000 (07:34 -0800)]
Merge pull request #878 from iovisor/compat-4.10-update
Update [virtual_]bpf.h to 4.10
Mauricio Vasquez B [Mon, 2 Jan 2017 20:49:27 +0000 (15:49 -0500)]
add missing inclusion guards in bcc/proto.h
Signed-off-by: Mauricio Vasquez B <mauricio.vasquez@polito.it>
Brenden Blanco [Thu, 29 Dec 2016 23:55:07 +0000 (15:55 -0800)]
Use compat bpf_common.h for local clang build
Only the virtual_bpf.h should point to the installed kernel headers.
Signed-off-by: Brenden Blanco <bblanco@gmail.com>
Brenden Blanco [Thu, 29 Dec 2016 23:40:59 +0000 (15:40 -0800)]
Update [virtual_]bpf.h to 4.10
As is occassionally necessary, we need to update the compat header
files for new kernels. This picks up the bpf.h from 4.10rc1.
Fixes: #877
Signed-off-by: Brenden Blanco <bblanco@gmail.com>
4ast [Wed, 28 Dec 2016 04:34:24 +0000 (20:34 -0800)]
Merge pull request #874 from pchaigno/fix-var
Fix variable names in exceptions
Paul Chaignon [Mon, 26 Dec 2016 15:01:19 +0000 (16:01 +0100)]
Fix variable name
4ast [Thu, 22 Dec 2016 01:01:29 +0000 (17:01 -0800)]
Merge pull request #870 from brendangregg/master
add cpuunclaimed
Brendan Gregg [Wed, 21 Dec 2016 23:35:36 +0000 (15:35 -0800)]
fix comment in runqlen
Brendan Gregg [Wed, 21 Dec 2016 23:34:09 +0000 (15:34 -0800)]
add cpuunclaimed
4ast [Wed, 21 Dec 2016 18:32:40 +0000 (10:32 -0800)]
Merge pull request #835 from ColinIanKing/master
Add snapcraft script to package up bcc as a snap
4ast [Wed, 21 Dec 2016 16:30:36 +0000 (08:30 -0800)]
Merge pull request #867 from shodoco/extern
Don't close extern table when a module destructs
Huapeng Zhou [Wed, 21 Dec 2016 06:47:51 +0000 (22:47 -0800)]
fix company copyright
4ast [Wed, 21 Dec 2016 06:41:13 +0000 (22:41 -0800)]
Merge pull request #868 from shodoco/pin
add bpf_obj_pin/bpf_obj_get to pin/get bpf objects
Huapeng Zhou [Tue, 20 Dec 2016 21:42:01 +0000 (13:42 -0800)]
add bpf_obj_pin/bpf_obj_get to pin/get bpf objects
Huapeng Zhou [Tue, 20 Dec 2016 21:10:12 +0000 (13:10 -0800)]
do not close extern table when a module destructs
Huapeng Zhou [Tue, 20 Dec 2016 21:06:29 +0000 (13:06 -0800)]
add table type to shared tables
Brenden Blanco [Tue, 20 Dec 2016 08:12:46 +0000 (00:12 -0800)]
Merge pull request #863 from shodoco/master
support macro in call arguments
shodoco [Mon, 19 Dec 2016 19:04:56 +0000 (11:04 -0800)]
Merge branch 'master' into master
4ast [Mon, 19 Dec 2016 18:58:59 +0000 (10:58 -0800)]
Merge pull request #865 from goldshtn/trace-timestamp
trace: -L, -t, -T switches
4ast [Mon, 19 Dec 2016 16:13:46 +0000 (08:13 -0800)]
Merge pull request #774 from goldshtn/usdt-tools
USDT tools for higher level languages
Sasha Goldshtein [Mon, 19 Dec 2016 10:17:38 +0000 (10:17 +0000)]
trace: -L, -t, -T switches
The `-t` switch for specifying a thread id has been renamed
to `-L`. The `-T` switch specifies that a time column should
be provided, whereas the `-t` switch requests a relative
timestamp (from the beginning of the trace). This is more
consistent with other tools, and lets the user choose the
desired format for the time column, if any.
Sasha Goldshtein [Mon, 19 Dec 2016 09:54:31 +0000 (09:54 +0000)]
uobjnew: Remove -l switch from examples
Sasha Goldshtein [Mon, 19 Dec 2016 09:52:34 +0000 (09:52 +0000)]
uobjnew: Attach uprobe only to the requested process
When C allocations are traced, attach the `malloc`
uprobe only to the requested process -- otherwise, we
get allocation information from the entire system.
Sasha Goldshtein [Sat, 29 Oct 2016 21:03:44 +0000 (14:03 -0700)]
README: Add u* tools based on USDT probes
Sasha Goldshtein [Sat, 29 Oct 2016 21:00:25 +0000 (14:00 -0700)]
uflow: Add man page and companion examples file
Sasha Goldshtein [Sat, 29 Oct 2016 20:44:55 +0000 (13:44 -0700)]
uthreads: Add man page and companion examples file
Sasha Goldshtein [Sat, 29 Oct 2016 20:33:24 +0000 (13:33 -0700)]
uobjnew: Add man page and companion examples file
Sasha Goldshtein [Sat, 29 Oct 2016 20:20:52 +0000 (13:20 -0700)]
ugc: Add man page and companion examples file
Sasha Goldshtein [Sat, 29 Oct 2016 20:08:39 +0000 (13:08 -0700)]
ucalls: Add man page and companion examples file
Sasha Goldshtein [Sat, 29 Oct 2016 19:35:29 +0000 (12:35 -0700)]
ustat: Add man page and companion example file
Sasha Goldshtein [Thu, 27 Oct 2016 22:58:14 +0000 (15:58 -0700)]
ustat: Graceful error handling
If the process in question doesn't have the USDT probes we
expect, handle the failure gracefully. After all, it could
be a binary compiled without USDT support, the pid could be
recycled to some other application, or -- the process name
could match, but by accident, and really belong to some
other runtime.
Sasha Goldshtein [Thu, 27 Oct 2016 22:17:58 +0000 (15:17 -0700)]
ustat: Replace \0 with spaces in cmdline
The /proc/PID/cmdline file has \0 for spaces in the command
line, and there may be trailing \0 characters as well.
Replace them all with spaces.
Sasha Goldshtein [Wed, 26 Oct 2016 19:52:06 +0000 (12:52 -0700)]
uflow: Trace method execution flow
This tool traces method executions and prints out messages
with a nesting depth indicator that allows relatively easy
visualization of program flow. To reduce overhead, `-C` and
`-M` switches take class and method prefixes to filter the
output by. The filtering takes place in the BPF program, so
the unnecessary data never ends up in user space.
Usage examples:
```
uflow java 185
uflow -M index python 180
uflow -C 'IRB::Irb' ruby 10041
```
Sasha Goldshtein [Wed, 26 Oct 2016 13:50:31 +0000 (06:50 -0700)]
ustat: Change 'count' argument type to int
Sasha Goldshtein [Wed, 26 Oct 2016 13:40:35 +0000 (06:40 -0700)]
ustat: Sort by pid if no other sort column provided
Sasha Goldshtein [Wed, 26 Oct 2016 13:34:06 +0000 (06:34 -0700)]
tools: Add block comments to u* scripts
Sasha Goldshtein [Tue, 25 Oct 2016 18:52:39 +0000 (11:52 -0700)]
ustat: Activity stats from high-level languages
This tool gathers statistics (by pid) on method calls,
class loads, garbage collections, thread creations, object
allocations, and exceptions raised and prints them in a
top-like style. Supported languages currently include
Java, Python, Ruby, and Node. Not all languages provide
the necessary probes for all event types.
Usage examples:
```
ustat -C
ustat -l java 1
ustat -l ruby -S objnew
```
Sasha Goldshtein [Tue, 25 Oct 2016 18:51:46 +0000 (11:51 -0700)]
python: Expose active probes from USDT object
Allow callers to obtain the list of active (enabled) USDT
probes from the USDT object, if they need to enable the
uprobes by hand without using the bcc attach support. This
is required when the same uprobe needs to be enabled in
more than one process.
Sasha Goldshtein [Tue, 25 Oct 2016 18:51:32 +0000 (11:51 -0700)]
python: Do not call USDT.get_text() twice
Sasha Goldshtein [Tue, 25 Oct 2016 12:28:29 +0000 (05:28 -0700)]
uobjnew: Summarize object allocations
Use various USDT probes in Java and Ruby, and `malloc()`
uprobe in C, to summarize object allocations by type or
by size. Print statistics at the end or at intervals, with
optional trimming of top types by number of instances
allocated or number of bytes.
Sasha Goldshtein [Tue, 25 Oct 2016 11:30:54 +0000 (04:30 -0700)]
ucalls: TODO reminder to probe C methods
Sasha Goldshtein [Tue, 25 Oct 2016 11:28:53 +0000 (04:28 -0700)]
ugc: Fix order of arguments in usage comment
Sasha Goldshtein [Tue, 25 Oct 2016 11:28:06 +0000 (04:28 -0700)]
uthreads: Add pthread support
Trace `pthread_start` calls and get the symbol for the
newly-started thread for printing. Also allow no-Java runs
with no language specified for pthread-only tracing.
Sasha Goldshtein [Tue, 25 Oct 2016 11:08:10 +0000 (04:08 -0700)]
uthreads: Trace thread creation/destruction events
`uthreads` attaches to thread start and stop USDT probes
and traces out thread creation and destruction events.
Currently, only Java is supported.
Sasha Goldshtein [Tue, 25 Oct 2016 09:18:35 +0000 (02:18 -0700)]
ucalls: Trace syscalls
Add `-S` switch for tracing syscalls with or without high-
level language method calls. When `-S` is provided, attach
to all `sys_` and `SyS_` entry points in the kernel and
trace the number of calls and execution latency (if `-L`
was also specified).
This is now also a useful general-purpose tool for syscall
count/latency summarizing when a language is not specified.
Sasha Goldshtein [Tue, 25 Oct 2016 07:08:33 +0000 (00:08 -0700)]
ugc: Node support
Add Node support for gc__start and gc__done probes, which
includes GC type flag parsing.
Sasha Goldshtein [Thu, 20 Oct 2016 23:08:37 +0000 (16:08 -0700)]
tools: Script skeletons
Skeletons for method flow, object allocations, general
event statistics, and thread statistics.
Sasha Goldshtein [Thu, 20 Oct 2016 23:07:23 +0000 (16:07 -0700)]
ugc: Add description messages for GC events
For runtimes that make it available, we now extract GC
event information such as heap sizes and print this
information in addition to the GC duration and timestamp.
Sasha Goldshtein [Mon, 17 Oct 2016 16:04:37 +0000 (09:04 -0700)]
ugc: Monitor GC events in high-level languages
`ugc` monitors GC start and end events in Java, Python,
and Ruby, printing out a message when a GC cycle completes
along with the duration of the GC and an optional
additional description that depends on the target language.
NOTE: This WIP does not have any interesting additional
descriptions yet.
Usage example:
```
ugc java 1448 # monitor Java GCs in process 1448
```
Sasha Goldshtein [Mon, 17 Oct 2016 11:13:48 +0000 (04:13 -0700)]
ucalls: Summarize method calls with USDT
`ucalls` is a new tool that uses the USDT probes in high-
level languages (Java, Python, Ruby) to summarize the
number of method calls and optionally their latency. This
is similar to `funccount` and `funclatency` but for methods
in Java, Python, Ruby, and other languages that might have
USDT probes for method entry and exit.
`ucalls` uses the `method__entry` and `method__return`
probes in Java and Ruby, and the `function__entry` and
`function__return` probes in Python. The Python probes are
not as accurate because they do not report the class name,
but are still useful.
The optional `-L` switch indicates whether latency numbers
are required. By default, only the number of calls to each
method is printed. The `-T` switch filters out the top
methods (by number of calls or total latency).
Huapeng Zhou [Sun, 18 Dec 2016 04:50:55 +0000 (20:50 -0800)]
support macro in call arguments
4ast [Fri, 16 Dec 2016 22:31:58 +0000 (14:31 -0800)]
Merge pull request #862 from palmtenor/cppusdt
Add USDT support to C++ API
Teng Qin [Fri, 16 Dec 2016 04:57:33 +0000 (20:57 -0800)]
Example of using USDT
Teng Qin [Thu, 15 Dec 2016 21:20:09 +0000 (13:20 -0800)]
Add USDT support to C++ API
Teng Qin [Thu, 15 Dec 2016 21:55:22 +0000 (13:55 -0800)]
Define a constant for USDT program include header
Colin Ian King [Thu, 15 Dec 2016 18:39:09 +0000 (18:39 +0000)]
Add snapcraft script to package up bcc as a snap
This supports packaging using snapcraft; to create a snap
install snapcraft and in the snapcraft directory run
make to generate a snap. This script was originally
written by Evan Dandrea and updated by Colin King.
Signed-off-by: Colin Ian King <colin.king@canonical.com>
4ast [Wed, 14 Dec 2016 23:37:09 +0000 (15:37 -0800)]
Merge pull request #861 from brendangregg/master
Improve linear histogram limit, and improve error message.
Brendan Gregg [Wed, 14 Dec 2016 22:54:43 +0000 (14:54 -0800)]
Improve linear histogram limit, and improve error message.
4ast [Wed, 14 Dec 2016 21:47:03 +0000 (13:47 -0800)]
Merge pull request #860 from brendangregg/master
runqlen: use bpf_get_smp_processor_id()
Brendan Gregg [Wed, 14 Dec 2016 21:28:13 +0000 (13:28 -0800)]
runqlen: use bpf_get_smp_processor_id()
4ast [Wed, 14 Dec 2016 21:12:54 +0000 (13:12 -0800)]
Merge pull request #859 from brendangregg/master
add runqlen tool
Brendan Gregg [Wed, 14 Dec 2016 20:10:59 +0000 (12:10 -0800)]
add runqlen tool
Brendan Gregg [Wed, 14 Dec 2016 19:31:00 +0000 (11:31 -0800)]
add print_linear_hist() for linear histograms
4ast [Wed, 14 Dec 2016 02:13:26 +0000 (18:13 -0800)]
Merge pull request #856 from brendangregg/master
check effective userid on run #850
4ast [Wed, 14 Dec 2016 00:26:05 +0000 (16:26 -0800)]
Merge pull request #837 from zlim/docker
add Quick Start Guide for bcc docker
Brendan Gregg [Tue, 13 Dec 2016 23:18:29 +0000 (15:18 -0800)]
check effective userid on run #850
4ast [Mon, 12 Dec 2016 16:27:30 +0000 (08:27 -0800)]
Merge pull request #852 from qmonnet/kernelfeatures
docs: Update eBPF features list
Quentin Monnet [Mon, 12 Dec 2016 12:42:51 +0000 (13:42 +0100)]
docs: Update eBPF features list
Update of BPF features list, following the release of kernel 4.9.
4ast [Sun, 11 Dec 2016 02:05:31 +0000 (18:05 -0800)]
Merge pull request #818 from ceeaspb/master
offwaketime: update with get_stackid fixes #437
ceeaspb [Sat, 26 Nov 2016 22:36:10 +0000 (22:36 +0000)]
update offwaketime with get_stackid
4ast [Fri, 9 Dec 2016 23:06:45 +0000 (15:06 -0800)]
Merge pull request #849 from palmtenor/cppperfevent
Expose perf event support in C++ API
Teng Qin [Fri, 9 Dec 2016 20:57:02 +0000 (12:57 -0800)]
Perf event example using C++ API
Teng Qin [Fri, 9 Dec 2016 01:46:13 +0000 (17:46 -0800)]
Expose PMU event support in C++ API
4ast [Fri, 9 Dec 2016 16:40:29 +0000 (08:40 -0800)]
Merge pull request #846 from palmtenor/improve_buffer
Improve C++ API perf buffer polling
Teng Qin [Fri, 9 Dec 2016 08:07:55 +0000 (00:07 -0800)]
Improve C++ API perf buffer polling
4ast [Fri, 9 Dec 2016 06:34:31 +0000 (22:34 -0800)]
Merge pull request #843 from shodoco/flag
add support for bpf map flags
4ast [Fri, 9 Dec 2016 06:32:46 +0000 (22:32 -0800)]
Merge pull request #844 from palmtenor/cleanprog
Make sure program FDs get cleaned up correctly
Teng Qin [Fri, 9 Dec 2016 02:03:33 +0000 (18:03 -0800)]
Make sure programs get cleaned up correctly
4ast [Fri, 9 Dec 2016 04:37:38 +0000 (20:37 -0800)]
Merge pull request #845 from affansyed/master
Fix for issue 829 I reported
affansyed [Fri, 9 Dec 2016 04:04:52 +0000 (09:04 +0500)]
fix issue 829
Needed to make array initialized to null before bpf_probe_read as the
verifier was rejecting the original code. will probably need to fix the
tutorial as well
affansyed [Fri, 9 Dec 2016 04:00:08 +0000 (09:00 +0500)]
Merge pull request #1 from iovisor/master
updating my local repo
Huapeng Zhou [Wed, 7 Dec 2016 02:10:38 +0000 (18:10 -0800)]
add support for bpf map flags
4ast [Thu, 8 Dec 2016 01:26:37 +0000 (17:26 -0800)]
Merge pull request #842 from zhiyisun/dev
Fix bug of missing to install simple_tc.py
Zhiyi Sun [Thu, 8 Dec 2016 01:24:39 +0000 (09:24 +0800)]
Set EXAMPLE_PROGRAMS in one line.
Signed-off-by: Zhiyi Sun <zhiyisun@gmail.com>
Zhiyi Sun [Thu, 8 Dec 2016 00:57:14 +0000 (08:57 +0800)]
Merge branch 'master' into dev
Zhiyi Sun [Thu, 8 Dec 2016 00:51:59 +0000 (08:51 +0800)]
Fix bug of missing to install simple_tc.py
examples/networking/CMakeLists.txt set $EXAMPLE_PROGRAMS twice. The
second one(tc_perf_event.py) overwirte the first one(simple_tc.py).
Signed-off-by: Zhiyi Sun <zhiyisun@gmail.com>