4ast [Tue, 19 Apr 2016 21:58:58 +0000 (14:58 -0700)]
Merge pull request #496 from iovisor/bblanco_dev
Add infra and ctest for code style formatting
Brenden Blanco [Tue, 19 Apr 2016 21:14:42 +0000 (14:14 -0700)]
Add clang-format file, tweak style-check.sh
Add an initial .clang-format file, based on LLVM's style base. Inform
the style-check wrapper to only consider h, c, and cc files when it
runs, and print out the --verbose output upon failure.
Brenden Blanco [Tue, 19 Apr 2016 18:42:49 +0000 (11:42 -0700)]
Add ctest for style, using clang-format
When user touches a file, that file will be fed to `git clang-format`,
and if the tool reports a new diff it will consider the test failed. The
files to check will be anything in the current workspace compared to
origin/master.
Brenden Blanco [Tue, 19 Apr 2016 18:15:05 +0000 (11:15 -0700)]
Remove git-clang-format output when no files are modified
Brenden Blanco [Tue, 19 Apr 2016 18:13:40 +0000 (11:13 -0700)]
Add git-clang-format to be used for testing source style
4ast [Tue, 19 Apr 2016 01:16:10 +0000 (18:16 -0700)]
Merge pull request #494 from iovisor/install-md
Update INSTALL.md with Xenial instructions
Brenden Blanco [Tue, 19 Apr 2016 01:12:03 +0000 (03:12 +0200)]
Update INSTALL.md with Xenial instructions
The buildbot is now building nightly ubuntu 16.04 packages. Include the steps to install.
4ast [Mon, 18 Apr 2016 19:04:12 +0000 (12:04 -0700)]
Merge pull request #493 from iovisor/bblanco_dev
Let bcc debian build depend on 3.7|3.8
Brenden Blanco [Mon, 18 Apr 2016 18:37:10 +0000 (11:37 -0700)]
Let bcc debian build depend on 3.7|3.8
In Xenial, llvm 3.8 will be available upstream without manual apt steps.
Add those packages as a possible dependency in our build.
Brenden Blanco [Sun, 17 Apr 2016 20:43:27 +0000 (13:43 -0700)]
Merge pull request #489 from aaronpuchert/permissive_regex
Don't require "OS ABI" specification in libraries
4ast [Sun, 17 Apr 2016 15:55:49 +0000 (08:55 -0700)]
Merge pull request #490 from vmg/vmg/lua64
lua: Properly support high-range 64 addresses
Brenden Blanco [Sun, 17 Apr 2016 15:52:52 +0000 (08:52 -0700)]
Merge pull request #487 from bobrik/ubuntu-install
Install all required packages on ubuntu
Aaron Puchert [Sat, 16 Apr 2016 22:06:13 +0000 (00:06 +0200)]
Don't require "OS ABI" specification in libraries
The most important system libraries are listed like this by ldconfig:
libc.so.6 (libc6,x86-64, OS ABI: Linux 3.0.0) => /lib64/libc.so.6
But most user-level libraries don't have the "OS ABI" and will not be
found by the regular expression.
libz.so (libc6,x86-64) => /usr/lib64/libz.so
This makes the regular expression more permissive, so that it finds
those libraries as well.
Vicent Marti [Fri, 15 Apr 2016 23:03:28 +0000 (01:03 +0200)]
lua: Properly support high-range 64 addresses
Lua's native Number type is a 64-bit double with 52-bit precision, which
was causing rounding errors when storing and working with high-range
memory addresses (namely, addresses from the kernel, which are all in
the `0xffffffff........` range).
To work around this, we've made sure to never call `tonumber` on any
variables that represent memory addresses, and instead continue
operating on them with their native types: LuaJIT can work with the
underlying `uint64_t` type for these values and transparently perform
all kinds of numeric operations.
The only limitation of working with native 64-bit types in LuaJIT is
that they cannot be printed with the language's default `string.format`
API. To give better UX to probe writers, these APIs have been
monkeypatched so the `%p` format specifier will now properly handle
64-bit addresses and print them in an appropriate format.
Ivan Babrou [Thu, 14 Apr 2016 13:20:50 +0000 (14:20 +0100)]
Install all required packages on ubuntu
4ast [Mon, 11 Apr 2016 22:31:15 +0000 (15:31 -0700)]
Merge pull request #482 from markdrayton/lua-outside-source-build
bcc-lua: build bcc.lua and bcc.o in the build tree
4ast [Mon, 11 Apr 2016 02:11:08 +0000 (19:11 -0700)]
Merge pull request #483 from iovisor/bblanco_dev
miscellaneous cleanups to C++ and tools/trace
Mark Drayton [Sun, 10 Apr 2016 15:47:28 +0000 (08:47 -0700)]
bcc-lua: build bcc.lua and bcc.o in the build tree
Brenden Blanco [Sun, 10 Apr 2016 01:41:42 +0000 (18:41 -0700)]
Simplify error prints in frontend_action
Brenden Blanco [Fri, 8 Apr 2016 23:01:51 +0000 (16:01 -0700)]
Fix compile error when perf headers are included early
I didn't actually track this one down, but was getting some errors
coming out of kernel header files when perf_events.h was included first.
Move it after some std headers that mask the issue.
Brenden Blanco [Fri, 8 Apr 2016 23:00:03 +0000 (16:00 -0700)]
Use lookup instead of delete in test_stackid
BPF programs aren't allowed to attach to these functions since deadlocks
may occur, thus the test would fail since no stack is collected. Use
update_elem to test instead.
Brenden Blanco [Fri, 8 Apr 2016 22:52:55 +0000 (15:52 -0700)]
Fix python3 exception when ctrl-c tools/trace.py
The way to do exception printing in python2/3 compatible way is using
sys.exc_info()[0/1].
4ast [Sat, 9 Apr 2016 00:44:04 +0000 (17:44 -0700)]
Merge pull request #481 from iovisor/ast_dev
bcc-lua: switch to quiet by default
Alexei Starovoitov [Sat, 9 Apr 2016 00:37:41 +0000 (17:37 -0700)]
bcc-lua: switch to quiet by default
use --verbose to turn verbose output
Signed-off-by: Alexei Starovoitov <ast@fb.com>
Brenden Blanco [Wed, 6 Apr 2016 21:49:22 +0000 (14:49 -0700)]
Merge pull request #480 from larsx2/master
Fixed tcpv4connect.py broken link on README
Eduardo Urias [Wed, 6 Apr 2016 21:18:20 +0000 (17:18 -0400)]
Fixed tcpv4connect.py broken link on README
Brenden Blanco [Wed, 6 Apr 2016 18:58:31 +0000 (11:58 -0700)]
Merge pull request #479 from LucaCanali/master
Fix for find_symbol method, issue #478
Luca Canali [Wed, 6 Apr 2016 17:39:07 +0000 (19:39 +0200)]
Fix for find_symbol method, issue #478
Luca Canali [Wed, 6 Apr 2016 15:35:07 +0000 (17:35 +0200)]
Fix for find_symbol method, issue #478
Brenden Blanco [Wed, 6 Apr 2016 14:06:24 +0000 (07:06 -0700)]
Merge pull request #477 from ragnard/nixos
Add support for nixos
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.