Ragnar Dahlén [Tue, 5 Apr 2016 22:32:02 +0000 (23:32 +0100)]
Introduce BCC_KERNEL_MODULES_DIR
Add support for systems using a non-default ("/lib/modules") kernel lib
directory.
Ragnar Dahlén [Tue, 5 Apr 2016 22:21:45 +0000 (23:21 +0100)]
add missing include directory to calculated cflags
4ast [Tue, 5 Apr 2016 17:06:04 +0000 (10:06 -0700)]
Merge pull request #474 from mcaleavya/master
migrated gethostlatency to use bpf_perf_event
Brenden Blanco [Tue, 5 Apr 2016 05:50:39 +0000 (22:50 -0700)]
Merge pull request #470 from vmg/vmg/lua-standalone
Standalone Lua tracing tool
Vicent Marti [Mon, 4 Apr 2016 18:50:59 +0000 (20:50 +0200)]
debian: Add bcc-lua package to control
Vicent Marti [Mon, 4 Apr 2016 17:21:29 +0000 (19:21 +0200)]
debian: Add install rule for bcc-lua
Vicent Marti [Mon, 4 Apr 2016 17:19:49 +0000 (19:19 +0200)]
SPECS: Add a spec for `bcc-lua`
Vicent Marti [Mon, 4 Apr 2016 16:57:10 +0000 (18:57 +0200)]
bcc-lua: Add Install target
mcaleavya [Sat, 2 Apr 2016 17:22:37 +0000 (18:22 +0100)]
migrated gethostlatency to use bpf_perf_event
Vicent Marti [Fri, 1 Apr 2016 15:40:58 +0000 (17:40 +0200)]
bpf.lua: Enable the `--llvm-debug` CLI flag
Vicent Marti [Fri, 1 Apr 2016 15:38:43 +0000 (17:38 +0200)]
bcc.lua: Print traceback on errors
Vicent Marti [Fri, 1 Apr 2016 15:31:47 +0000 (17:31 +0200)]
bcc: Move all `argv` parsing to Lua code
Vicent Marti [Fri, 1 Apr 2016 15:14:49 +0000 (17:14 +0200)]
bcc: Allow the runner to parse some arguments
Vicent Marti [Thu, 31 Mar 2016 06:22:45 +0000 (08:22 +0200)]
bcc-lua: Add test for standalone `bcc-lua`
Vicent Marti [Thu, 31 Mar 2016 03:39:07 +0000 (05:39 +0200)]
lua: Add license to the C wrapper
Vicent Marti [Thu, 31 Mar 2016 00:58:49 +0000 (02:58 +0200)]
cmake: Build bcc-lua conditionally
Vicent Marti [Thu, 31 Mar 2016 00:43:56 +0000 (02:43 +0200)]
lua: Setup compilation for the standalone tool
Vicent Marti [Wed, 30 Mar 2016 20:34:43 +0000 (22:34 +0200)]
lua: Fix tests to work in strict mode
Vicent Marti [Wed, 30 Mar 2016 19:29:46 +0000 (21:29 +0200)]
lua: Prepare for standalone build
Brenden Blanco [Thu, 31 Mar 2016 20:49:15 +0000 (13:49 -0700)]
Merge pull request #472 from iovisor/ast_dev
get rid of version checks
Alexei Starovoitov [Thu, 31 Mar 2016 20:37:04 +0000 (13:37 -0700)]
get rid of version checks
version checks don't work at all on kernels with backported bpf bits
they also fail when /usr/include/linux/bpf.h doesn't match loaded
kernel.
Fix these issues by embedding bpf.h into libbcc.so and force load it
in clang, so we can remove all version checks and rely on verifier
complaining on unknown function call.
Later patch can make verifier errors less cryptic by converting
'unknown call 12' to strings.
while at it update bpf.h to the latest.
Signed-off-by: Alexei Starovoitov <ast@fb.com>
4ast [Thu, 31 Mar 2016 16:38:56 +0000 (09:38 -0700)]
Merge pull request #469 from goldshtn/usdt-v3
Bug fix around USDT argument handling for constants
Sasha Goldshtein [Thu, 31 Mar 2016 13:32:14 +0000 (06:32 -0700)]
Bug fix around USDT argument handling for constants
For USDT arguments of the form "-4@$-1", the parsing logic would fail
because it didn't expect the second number (the actual value of the
USDT argument as a constant) to be negative. This is now fixed.
Brenden Blanco [Wed, 30 Mar 2016 23:02:10 +0000 (16:02 -0700)]
Merge pull request #454 from brendangregg/master
IPv6 strings with an inet6_ntoa
Brendan Gregg [Wed, 30 Mar 2016 22:30:41 +0000 (15:30 -0700)]
use pack/unpack
Brendan Gregg [Wed, 30 Mar 2016 20:35:40 +0000 (13:35 -0700)]
Merge pull request #468 from goldshtn/trace-which
Replaced `which --skip-alias` with `ProcUtils.which`
Sasha Goldshtein [Wed, 30 Mar 2016 20:25:09 +0000 (13:25 -0700)]
Replaced `which --skip-alias` with `ProcUtils.which`
4ast [Wed, 30 Mar 2016 18:59:38 +0000 (11:59 -0700)]
Merge pull request #467 from goldshtn/usdt-v2
Support for global variable arguments in USDT probes
4ast [Wed, 30 Mar 2016 18:58:27 +0000 (11:58 -0700)]
Merge pull request #457 from vmg/vmg/lua
Lua Tools for BCC
Vicent Marti [Wed, 30 Mar 2016 18:37:26 +0000 (20:37 +0200)]
cmake: Use the wrapper script for Lua tests too
Vicent Marti [Wed, 30 Mar 2016 18:17:06 +0000 (20:17 +0200)]
cmake: Find `sudo` explicitly
Brenden Blanco [Wed, 30 Mar 2016 17:48:57 +0000 (10:48 -0700)]
Merge pull request #458 from zaafar/percpu_support
Percpu support
Vicent Marti [Wed, 30 Mar 2016 15:41:56 +0000 (17:41 +0200)]
bpf.lua: Implement `dump_func`
Vicent Marti [Wed, 30 Mar 2016 15:31:20 +0000 (17:31 +0200)]
test.lua: Port the `test_uprobes` suite
Vicent Marti [Wed, 30 Mar 2016 15:31:20 +0000 (17:31 +0200)]
ld.lua: fix parsing of base16 addresses
Vicent Marti [Wed, 30 Mar 2016 15:31:20 +0000 (17:31 +0200)]
bpf.lua: fix detaching uprobes and kprobes
Vicent Marti [Wed, 30 Mar 2016 15:31:20 +0000 (17:31 +0200)]
cmake: Run the Lua tests too
Vicent Marti [Wed, 30 Mar 2016 15:31:20 +0000 (17:31 +0200)]
bpf.lua: Sanity check
Vicent Marti [Wed, 30 Mar 2016 15:31:20 +0000 (17:31 +0200)]
memleak.lua: Fix indentation
Vicent Marti [Wed, 30 Mar 2016 15:31:20 +0000 (17:31 +0200)]
test.lua: Port `test_clang` to Lua
Vicent Marti [Wed, 30 Mar 2016 15:31:20 +0000 (17:31 +0200)]
test.lua: Add basic test library and helpers
Vicent Marti [Wed, 30 Mar 2016 15:31:20 +0000 (17:31 +0200)]
table.py: Implement`scanf` and `printf` helpers
Vicent Marti [Wed, 30 Mar 2016 15:31:19 +0000 (17:31 +0200)]
table.lua: Add support for decoding bitfield types
Vicent Marti [Wed, 30 Mar 2016 15:31:19 +0000 (17:31 +0200)]
bpf.lua: Implement `load_funcs`
Vicent Marti [Wed, 30 Mar 2016 15:31:19 +0000 (17:31 +0200)]
bpf.lua: Add support for CFLAGS and LLVM debug flags
Vicent Marti [Wed, 30 Mar 2016 15:31:19 +0000 (17:31 +0200)]
bcc-probe: Allow running the helper from any path
Vicent Marti [Wed, 30 Mar 2016 15:31:19 +0000 (17:31 +0200)]
bcc-probe: Allow loading absolute paths
Vicent Marti [Wed, 30 Mar 2016 15:31:19 +0000 (17:31 +0200)]
Add a few examples written in Lua
Vicent Marti [Wed, 30 Mar 2016 15:31:19 +0000 (17:31 +0200)]
Lua Tools for BCC
Sasha Goldshtein [Wed, 30 Mar 2016 15:14:44 +0000 (08:14 -0700)]
Support for global variable arguments in USDT probes
I previously thought it wouldn't be possible to probe arbitrary user-mode addresses,
but it turns out that it is. This was required to support global variable arguments
in USDT probes. For example, there are a few probes in libpthread whose arguments
refer to the mp_ global variable. These are now supported.
Additionally, refactored process-related utils into a ProcUtils class in procstat.py,
and implemented a version of `which` (`ProcUtils.which`) that is as portable as
possible -- it only relies on traversing the PATH environment variable.
Zaafar Ahmed [Wed, 30 Mar 2016 13:13:48 +0000 (18:13 +0500)]
Merge remote-tracking branch 'origin/master' into percpu
Zaafar Ahmed [Wed, 30 Mar 2016 12:59:54 +0000 (17:59 +0500)]
b_frontend_action.cc
changed pc_hash/array to percpu_hash/array
table.py
optimised/fixup table.py code based on Brenden feedback
test_percpu.py
Now tests are processor aware and doesn't use sleep
added new line at the EOF
Brenden Blanco [Wed, 30 Mar 2016 03:35:29 +0000 (20:35 -0700)]
Merge pull request #452 from yadutaf/jt-solisten
solisten: clean endian conversion hack
Zaafar Ahmed [Tue, 29 Mar 2016 20:46:26 +0000 (01:46 +0500)]
added u64 testcase
Zaafar Ahmed [Tue, 29 Mar 2016 19:58:07 +0000 (00:58 +0500)]
added a very simple testcase for PerCpu support patch.
Zaafar Ahmed [Tue, 29 Mar 2016 17:26:57 +0000 (22:26 +0500)]
updating branch
Merge remote-tracking branch 'origin/master' into percpu
Zaafar Ahmed [Tue, 29 Mar 2016 17:13:50 +0000 (22:13 +0500)]
optimised the percpu support patch.
removed kernel checks.
Brenden Blanco [Tue, 29 Mar 2016 16:47:59 +0000 (09:47 -0700)]
Merge pull request #456 from yadutaf/jt-endian
Minor endian and debug enhancement
Jean-Tiare Le Bigot [Tue, 29 Mar 2016 12:48:02 +0000 (12:48 +0000)]
add debug constants
Jean-Tiare Le Bigot [Tue, 29 Mar 2016 11:04:01 +0000 (11:04 +0000)]
move endian flags to kbuild_helper
4ast [Tue, 29 Mar 2016 04:36:40 +0000 (21:36 -0700)]
Merge pull request #451 from goldshtn/usdt
argdist, trace, and tplist support for USDT probes
Jean-Tiare Le Bigot [Mon, 28 Mar 2016 15:14:12 +0000 (15:14 +0000)]
solisten: clean endian conversion hack
Brenden Blanco [Mon, 28 Mar 2016 20:10:59 +0000 (13:10 -0700)]
Merge pull request #453 from yadutaf/jt-endian
expose buitin byte swap methods
Brendan Gregg [Mon, 28 Mar 2016 19:11:45 +0000 (12:11 -0700)]
IPv6 strings with an inet6_ntoa
Jean-Tiare Le Bigot [Mon, 28 Mar 2016 15:32:35 +0000 (15:32 +0000)]
expose buitin byte swap methods
Sasha Goldshtein [Thu, 24 Mar 2016 15:39:47 +0000 (08:39 -0700)]
argdist, trace, and tplist support for USDT probes
These tools now support USDT probes with the 'u:provider:probe' syntax.
Probes in a library or process can be listed with 'tplist -l LIB' or 'tplist -p PID'.
Probe arguments are also parsed and available in both argdist and trace as arg1,
arg2, etc., regardless of the probe attach location.
The same USDT probe can be used at multiple locations, which means the attach infra-
structure must probe all these locations. argdist and trace register thunk probes
at each location, which call a central probe function (which is static inline) with
the location id (__loc_id). The central probe function checks the location id to
determine how the arguments should be retrieved -- this is location-dependent.
Finally, some USDT probes must be enabled first by writing a value to a memory
location (this is called a "semaphore"). This value is per-process, so we require a
process id for this kind of probes.
Along with trace and argdist tool support, this commit also introduces new classes
in the bcc module: ProcStat handles pid-wrap detection, whereas USDTReader,
USDTProbe, USDTProbeLocation, and USDTArgument are the shared USDT-related
infrastructure that enables enumeration, attachment, and argument retrieval for
USDT probes.
Brenden Blanco [Mon, 28 Mar 2016 11:28:17 +0000 (04:28 -0700)]
Merge pull request #449 from goldshtn/tp-str-fix
Fixed bug around local assignment from char array
Sasha Goldshtein [Sun, 27 Mar 2016 08:44:26 +0000 (01:44 -0700)]
Fixed bug around local assignment from char array
Brendan Gregg [Sun, 27 Mar 2016 17:29:33 +0000 (10:29 -0700)]
Merge pull request #450 from vmg/vmg/stacks-next
Stack Traces: TNG
Vicent Marti [Sun, 27 Mar 2016 16:39:18 +0000 (18:39 +0200)]
stackcount: Resolve stacks using a StackTrace table
The changes for this script are minimal: the inline C probe has been
_significantly_ simplified, and should now perform better since the
stack walk happens in native code inside the kernel thanks to the
BPF_STACK_TRACE table.
The output of the tool should be virtually identical, so the man page
and included examples have essentially no changes.
Vicent Marti [Sun, 27 Mar 2016 16:22:03 +0000 (18:22 +0200)]
stacksnoop: Resolve stacks using a StackTrace table
Instead of manually walking the stack and printing each frame to the
trace log, we can use a BPF_STACK_TRACE table to store the stack traces,
and print to the trace log their IDs every time they are traced.
The output of the tool has been slightly modified: we no longer prefix
each line of the stack trace with the timestamp and the other headers,
since the whole stack trace is fetched in one go from the table and the
information would be highly redundant.
The man page and the examples have been updated to reflect the new
output.
Vicent Marti [Sun, 27 Mar 2016 16:18:03 +0000 (18:18 +0200)]
BPF: better format for `ksymaddr`
The offset is now returned after a `+` symbol, instead of directly
attached to the symbol name (which made reading the output very
confusing)
Before:
tick_do_update_jiffies64a0
After:
tick_do_update_jiffies64+0xa0
Brenden Blanco [Sun, 27 Mar 2016 14:47:30 +0000 (07:47 -0700)]
Merge pull request #448 from vmg/vmg/stacks
Better stack walking APIs
Vicent Marti [Fri, 25 Mar 2016 16:21:44 +0000 (17:21 +0100)]
offcputime: Resolve stacks using a StackTrace table
The manual walking for kernel stacks in the eBPF code has been replaced
with a `BPF_STACK_TRACE` table; the stack ID is now stored as an integer
in the main key.
Thanks to the `StackTrace.walk` iterator, the printing code can also be
significantly simplified for both folded and full stack modes.
Vicent Marti [Fri, 25 Mar 2016 16:14:34 +0000 (17:14 +0100)]
memleak: Resolve stacks with a StackTrace table
Instead of manually walking the (kernel) stack inside the eBPF code,
create a `BPF_STACK_TRACE` table and store the stack IDs in the alloc
info struct.
This greatly simplifies the leak detection code: instead of storing the
full stack trace as a string to de-duplicate the allocation point for
the different allocations, we can store the `stack_id`. Since we're
creating stack IDs with `BPF_F_REUSE_STACKID`, the kernel will take care
of deduplication for us.
Additionally, the `StackDecoder` class has been specialized into a
`UStackDecoder` and `KStackDecoder` (for userland and kernel stacks,
respectively). This lets us pass the decode class directly to
`stack_traces.walk()` to automate symbol resolution.
A new class, `Allocation` has been created to encapsulate what
previously was a 2-element tuple of `(count, size)`. This
Vicent Marti [Fri, 25 Mar 2016 22:22:57 +0000 (23:22 +0100)]
examples: Add `mallocstacks`
This simple example script traces all calls to `malloc` in a process and
prints the callsite using the new `BPF_STACK_TRACE` table API.
Vicent Marti [Fri, 25 Mar 2016 16:12:11 +0000 (17:12 +0100)]
table: Implement a StackWalker for StackTrace tables
The StackWalker iterator lets us call `stack_trace.walk(id)` to iterate
through the addresses in any given stack. The constructor of this
iterator takes an optional `resolver` to convert the addresses in the
iterator into symbols (or to format them according to the users' needs).
Zaafar Ahmed [Fri, 25 Mar 2016 10:03:24 +0000 (15:03 +0500)]
added percpu support in bcc.
Due to alignment issue ( alignment of array
must be same as cache alignment of cache ),
complex data structures involved in percpu array/hash tables
must be padded to match cache alignment or else, bcc will generate a error.
non complex data structures which are not aligned to cache size such as int,
uint32 is allowed but a bit slow due to casting/reverting process.
4ast [Thu, 24 Mar 2016 17:59:45 +0000 (10:59 -0700)]
Merge pull request #445 from goldshtn/tp-vars
Allowing more natural syntax for tracepoints with no "tp" struct prefix
Sasha Goldshtein [Thu, 24 Mar 2016 16:56:12 +0000 (09:56 -0700)]
Allowing more natural syntax for tracepoints with no "tp" struct prefix
Brenden Blanco [Wed, 23 Mar 2016 23:09:07 +0000 (16:09 -0700)]
Merge pull request #429 from yadutaf/jt-tcpv4listen
add tcpv4listen.py tracing example, with comments
Jean-Tiare Le Bigot [Fri, 4 Mar 2016 20:45:32 +0000 (21:45 +0100)]
add solisten tool. Currently TCP only.
Brenden Blanco [Tue, 22 Mar 2016 15:47:12 +0000 (08:47 -0700)]
Merge pull request #444 from goldshtn/probefail
Fix error handling when attaching {u,k}{,ret}probes
Sasha Goldshtein [Tue, 22 Mar 2016 15:30:29 +0000 (08:30 -0700)]
Fix error handling when attaching {u,k}{,ret}probes
Brenden Blanco [Mon, 21 Mar 2016 19:48:53 +0000 (12:48 -0700)]
Merge pull request #442 from goldshtn/usyms
Moved user symbol decoding from memleak into bcc module
Sasha Goldshtein [Mon, 21 Mar 2016 17:05:29 +0000 (10:05 -0700)]
Added pid wrap check, moved user symbols to usyms.py
Sasha Goldshtein [Mon, 21 Mar 2016 14:26:52 +0000 (07:26 -0700)]
Moved user symbol decoding from memleak into bcc module
4ast [Mon, 21 Mar 2016 15:50:24 +0000 (08:50 -0700)]
Merge pull request #439 from goldshtn/tpoint2
tracepoint support for argdist and trace, and new tplist tool
Brenden Blanco [Mon, 21 Mar 2016 14:45:59 +0000 (07:45 -0700)]
Merge pull request #441 from ismail/llvm-3.8
Fix llvm shared build
Sasha Goldshtein [Mon, 21 Mar 2016 11:06:15 +0000 (04:06 -0700)]
Moved auto-includes helper to __init__.py
Sasha Goldshtein [Mon, 21 Mar 2016 10:52:09 +0000 (03:52 -0700)]
Moved common tracepoint support into tracepoint.py
İsmail Dönmez [Mon, 21 Mar 2016 06:44:48 +0000 (08:44 +0200)]
Fix llvm shared build
Trim the llvm libs to the direct requirements only and use
llvm_expand_dependencies to discover all dependencies.
Sasha Goldshtein [Tue, 1 Mar 2016 20:15:34 +0000 (12:15 -0800)]
tracepoint support for argdist and trace, and new tplist tool for printing tracepoints
Brenden Blanco [Wed, 16 Mar 2016 00:33:10 +0000 (17:33 -0700)]
Merge pull request #438 from brendangregg/master
fix -p
Brendan Gregg [Wed, 16 Mar 2016 00:26:18 +0000 (17:26 -0700)]
fix -p
4ast [Fri, 11 Mar 2016 23:40:17 +0000 (15:40 -0800)]
Merge pull request #435 from iovisor/bblanco_dev
Fix python3 incompatibilities
Brenden Blanco [Fri, 11 Mar 2016 23:34:29 +0000 (15:34 -0800)]
Fix python3 incompatibilities
Syntax and dict usages fixups in dcstat.py and memleak.py
Fixes: #433, #434
Signed-off-by: Brenden Blanco <bblanco@plumgrid.com>
Brendan Gregg [Thu, 10 Mar 2016 00:49:37 +0000 (16:49 -0800)]
Merge pull request #432 from iovisor/bblanco_dev
Enable python3 compatible strings in biosnoop
Brenden Blanco [Tue, 8 Mar 2016 18:07:51 +0000 (10:07 -0800)]
Enable python3 compatible strings in biosnoop
Signed-off-by: Brenden Blanco <bblanco@plumgrid.com>
4ast [Tue, 8 Mar 2016 17:19:33 +0000 (09:19 -0800)]
Merge pull request #430 from iovisor/bblanco_dev
Add option to change kernel build search paths