- 26 May, 2016 2 commits
-
-
Evgeny Vereshchagin authored
-
Evgeny Vereshchagin authored
-
- 24 May, 2016 4 commits
-
-
4ast authored
lua: Allow LuaJIT parameterized types in `open_perf_buffer`
-
Vicent Marti authored
-
4ast authored
Use BPF_PERF_OUTPUT for fileslower and stacksnoop
-
Mark Drayton authored
-
- 23 May, 2016 1 commit
-
-
Brenden Blanco authored
Updated monitor.c to take care of host byte order
-
- 20 May, 2016 2 commits
-
-
Brenden Blanco authored
Fix a few fd leaks
-
Martin KaFai Lau authored
/sys/kernel/debug/tracing.
-
- 19 May, 2016 1 commit
-
-
Qasim Sarfraz authored
-
- 17 May, 2016 3 commits
-
-
Brendan Gregg authored
add --kernel-threads-only to tools/offcputime
-
Andrew Birchall authored
Summary: Adds `--kernel-threads-only` arg The kernel-threads-only arg is exclusive with pid/user-threads-only via `parser.add_mutually_exclusive_group`. The output message now indicates what we are tracing (pid/user threads/kernel threads/all threads). Removed the --verbose arg (unused). Test Plan: Run with combinations of the args; validate output looks sane: // test mutually exclusive group ``` devbig680[bcc](abirchall_dev): ~/bcc_run_tool.sh offcputime -k -u 1 [Running] /data/users/abirchall/bcc/tools/offcputime.py -k -u 1 usage: offcputime.py [-h] [-p PID | -k | -u] [-v] [-f] [duration] offcputime.py: error: argument -u/--user-threads-only: not allowed with argument -k/--kernel-threads-only ``` // kernel threads only ``` devbig680[bcc](abirchall_dev): ~/bcc_run_tool.sh offcputime -f -k 1 [Running] /data/users/abirchall/bcc/tools/offcputime.py -f -k 1 swapper/21;start_secondary;cpu_startup_entry;schedule_preempt_disabled;schedule 11 swapper/16;start_secondary;cpu_startup_entry;schedule_preempt_disabled;schedule 19 swapper/22;start_secondary;cpu_startup_entry;schedule_preempt_disabled;schedule 20 swapper/31;start_secondary;cpu_startup_entry;schedule_preempt_disabled;schedule 20 swapper/23;start_secondary;cpu_startup_entry;schedule_preempt_disabled;schedule 67 swapper/25;start_secondary;cpu_startup_entry;schedule_preempt_disabled;schedule 74 ... ``` `~/bcc_run_tool.sh offcputime -f --kernel-threads-only 1` // user threads only `~/bcc_run_tool.sh offcputime -f --user-threads-only 1` `~/bcc_run_tool.sh offcputime -f -u 1` // specific pid `~/bcc_run_tool.sh offcputime -f -p $(pidof hphpi) 1` ``` devbig680[bcc](abirchall_dev): ~/bcc_run_tool.sh offcputime --pid $(pidof mcrouter) 10 | head [Running] /data/users/abirchall/bcc/tools/offcputime.py --pid 95929 10 Tracing off-CPU time (us) of PID 95929 by kernel stack for 10 secs. ``` Note that this last case (specific PID) doesn't appear to be working; I can debug that in a follow up commit.
-
4ast authored
handle ENOMEM in tools/offcputime
-
- 16 May, 2016 4 commits
-
-
Andrew Birchall authored
Summary: * move ENOMEM comment from tools/offcputime.py to src/cc/export/helpers.h * create --stack-storage-size arg to allow the user to set the stack storage size * requires a positive_nonzero_int type checking function for argparse * clean up the rest of the args a bit * use parser.add_mutually_exclusive_group instead of manually handling the mutual exclusion * use positive_nonzero_int for duration arg * use positive_int for pid arg * only print a warning about increasing the storage size if at least one of the get_stackid errors was a -ENOMEM * remove the debug param (we can add this manually when testing) * fix a bug where all processes are traced when specifying pid of 0 Test Plan: ``` devbig680[bcc](no branch, rebasing abirchall_dev): ~/bcc_run_tool.sh offcputime --help [Running] /data/users/abirchall/bcc/tools/offcputime.py --help usage: offcputime.py [-h] [-u | -p PID] [-v] [-f] [--stack-storage-size STACK_STORAGE_SIZE] [duration] Summarize off-CPU time by kernel stack trace positional arguments: duration duration of trace, in seconds optional arguments: -h, --help show this help message and exit -u, --useronly user threads only (no kernel threads) -p PID, --pid PID trace this PID only -v, --verbose show raw addresses -f, --folded output folded format --stack-storage-size STACK_STORAGE_SIZE the number of unique stack traces that can be stored and displayed examples: ./offcputime # trace off-CPU stack time until Ctrl-C ./offcputime 5 # trace for 5 seconds only ./offcputime -f 5 # 5 seconds, and output in folded format ./offcputime -u # don't include kernel threads (user only) ./offcputime -p 185 # trace fo PID 185 only devbig680[bcc](no branch, rebasing abirchall_dev): ~/bcc_run_tool.sh offcputime -f 0 [Running] /data/users/abirchall/bcc/tools/offcputime.py -f 0 usage: offcputime.py [-h] [-u | -p PID] [-v] [-f] [--stack-storage-size STACK_STORAGE_SIZE] [duration] offcputime.py: error: argument duration: must be positive and nonzero devbig680[bcc](no branch, rebasing abirchall_dev): ~/bcc_run_tool.sh offcputime -f -1 [Running] /data/users/abirchall/bcc/tools/offcputime.py -f -1 usage: offcputime.py [-h] [-u | -p PID] [-v] [-f] [--stack-storage-size STACK_STORAGE_SIZE] [duration] offcputime.py: error: argument duration: must be positive and nonzero devbig680[bcc](no branch, rebasing abirchall_dev): ~/bcc_run_tool.sh offcputime --stack-storage-size 0 -f 1 [Running] /data/users/abirchall/bcc/tools/offcputime.py --stack-storage-size 0 -f 1 usage: offcputime.py [-h] [-u | -p PID] [-v] [-f] [--stack-storage-size STACK_STORAGE_SIZE] [duration] offcputime.py: error: argument --stack-storage-size: must be positive and nonzero devbig680[bcc](no branch, rebasing abirchall_dev): ~/bcc_run_tool.sh offcputime --stack-storage-size 1 -f 1 [Running] /data/users/abirchall/bcc/tools/offcputime.py --stack-storage-size 1 -f 1 swapper/27;start_secondary;cpu_startup_entry;schedule_preempt_disabled;schedule 7 swapper/29;start_secondary;cpu_startup_entry;schedule_preempt_disabled;schedule 102 swapper/25;start_secondary;cpu_startup_entry;schedule_preempt_disabled;schedule 113 swapper/26;start_secondary;cpu_startup_entry;schedule_preempt_disabled;schedule 138 swapper/28;start_secondary;cpu_startup_entry;schedule_preempt_disabled;schedule 164 swapper/30;start_secondary;cpu_startup_entry;schedule_preempt_disabled;schedule 177 swapper/24;start_secondary;cpu_startup_entry;schedule_preempt_disabled;schedule 980 swapper/31;start_secondary;cpu_startup_entry;schedule_preempt_disabled;schedule 1556 swapper/1;start_secondary;cpu_startup_entry;schedule_preempt_disabled;schedule 2038 swapper/3;start_secondary;cpu_startup_entry;schedule_preempt_disabled;schedule 2190 swapper/2;start_secondary;cpu_startup_entry;schedule_preempt_disabled;schedule 2235 swapper/15;start_secondary;cpu_startup_entry;schedule_preempt_disabled;schedule 2260 swapper/13;start_secondary;cpu_startup_entry;schedule_preempt_disabled;schedule 2450 swapper/6;start_secondary;cpu_startup_entry;schedule_preempt_disabled;schedule 2646 swapper/12;start_secondary;cpu_startup_entry;schedule_preempt_disabled;schedule 2675 swapper/11;start_secondary;cpu_startup_entry;schedule_preempt_disabled;schedule 2769 swapper/8;start_secondary;cpu_startup_entry;schedule_preempt_disabled;schedule 2885 swapper/4;start_secondary;cpu_startup_entry;schedule_preempt_disabled;schedule 3134 swapper/10;start_secondary;cpu_startup_entry;schedule_preempt_disabled;schedule 3416 swapper/14;start_secondary;cpu_startup_entry;schedule_preempt_disabled;schedule 3702 swapper/7;start_secondary;cpu_startup_entry;schedule_preempt_disabled;schedule 4343 swapper/9;start_secondary;cpu_startup_entry;schedule_preempt_disabled;schedule 5397 swapper/5;start_secondary;cpu_startup_entry;schedule_preempt_disabled;schedule 6836 swapper/17;start_secondary;cpu_startup_entry;schedule_preempt_disabled;schedule 13792 swapper/19;start_secondary;cpu_startup_entry;schedule_preempt_disabled;schedule 14488 swapper/22;start_secondary;cpu_startup_entry;schedule_preempt_disabled;schedule 15298 swapper/18;start_secondary;cpu_startup_entry;schedule_preempt_disabled;schedule 15735 swapper/20;start_secondary;cpu_startup_entry;schedule_preempt_disabled;schedule 17333 swapper/16;start_secondary;cpu_startup_entry;schedule_preempt_disabled;schedule 17645 swapper/23;start_secondary;cpu_startup_entry;schedule_preempt_disabled;schedule 17681 swapper/21;start_secondary;cpu_startup_entry;schedule_preempt_disabled;schedule 18607 WARNING: 92 stack traces could not be displayed. Consider increasing --stack-storage-size.
-
Andrew Birchall authored
Summary: BPF_STACK_TRACE(_name, _size) will allocate space for _size stack traces (see https://github.com/torvalds/linux/blob/master/kernel/bpf/stackmap.c#L30-L50). If we've already used all of this space, subsequent calls to bpf_get_stackid() will return -ENOMEM (see https://github.com/torvalds/linux/blob/master/kernel/bpf/stackmap.c#L173-L176). This causes our BPF bytecode to store this value in key_t.stack_id and subsequently causes our python application to crash due to a KeyError when invoking stack_traces.walk(k.stack_id). Let's avoid calling stack_traces.walk(k.stack_id) with back stackid's Test Plan: Run offcputime.py in an extreme case; with space for only a single stack trace ``` devbig680[bcc](tools): sed_in_file 's/BPF_STACK_TRACE(stack_traces, 1024)/BPF_STACK_TRACE(stack_traces, 1)/' tools/offcputime.py && \ > ~/bcc_run_tool.sh offcputime -f 5; \ > git reset --hard HEAD swapper/30;start_secondary;cpu_startup_entry;schedule_preempt_disabled;schedule 496 swapper/26;start_secondary;cpu_startup_entry;schedule_preempt_disabled;schedule 553 swapper/28;start_secondary;cpu_startup_entry;schedule_preempt_disabled;schedule 604 swapper/31;start_secondary;cpu_startup_entry;schedule_preempt_disabled;schedule 692 swapper/23;start_secondary;cpu_startup_entry;schedule_preempt_disabled;schedule 713 swapper/18;start_secondary;cpu_startup_entry;schedule_preempt_disabled;schedule 919 swapper/16;start_secondary;cpu_startup_entry;schedule_preempt_disabled;schedule 1051 swapper/20;start_secondary;cpu_startup_entry;schedule_preempt_disabled;schedule 1056 swapper/21;start_secondary;cpu_startup_entry;schedule_preempt_disabled;schedule 1585 swapper/24;start_secondary;cpu_startup_entry;schedule_preempt_disabled;schedule 1597 swapper/27;start_secondary;cpu_startup_entry;schedule_preempt_disabled;schedule 1610 swapper/17;start_secondary;cpu_startup_entry;schedule_preempt_disabled;schedule 1674 swapper/22;start_secondary;cpu_startup_entry;schedule_preempt_disabled;schedule 2390 swapper/25;start_secondary;cpu_startup_entry;schedule_preempt_disabled;schedule 2574 swapper/19;start_secondary;cpu_startup_entry;schedule_preempt_disabled;schedule 2589 swapper/29;start_secondary;cpu_startup_entry;schedule_preempt_disabled;schedule 8428 swapper/8;start_secondary;cpu_startup_entry;schedule_preempt_disabled;schedule 15272 swapper/15;start_secondary;cpu_startup_entry;schedule_preempt_disabled;schedule 15591 swapper/11;start_secondary;cpu_startup_entry;schedule_preempt_disabled;schedule 17934 swapper/9;start_secondary;cpu_startup_entry;schedule_preempt_disabled;schedule 18100 swapper/14;start_secondary;cpu_startup_entry;schedule_preempt_disabled;schedule 18266 swapper/10;start_secondary;cpu_startup_entry;schedule_preempt_disabled;schedule 20124 swapper/12;start_secondary;cpu_startup_entry;schedule_preempt_disabled;schedule 20887 swapper/13;start_secondary;cpu_startup_entry;schedule_preempt_disabled;schedule 23453 swapper/3;start_secondary;cpu_startup_entry;schedule_preempt_disabled;schedule 27296 swapper/5;start_secondary;cpu_startup_entry;schedule_preempt_disabled;schedule 29094 swapper/6;start_secondary;cpu_startup_entry;schedule_preempt_disabled;schedule 29799 swapper/7;start_secondary;cpu_startup_entry;schedule_preempt_disabled;schedule 31522 swapper/1;start_secondary;cpu_startup_entry;schedule_preempt_disabled;schedule 32269 swapper/4;start_secondary;cpu_startup_entry;schedule_preempt_disabled;schedule 35585 swapper/2;start_secondary;cpu_startup_entry;schedule_preempt_disabled;schedule 37627 WARNING: 249 stack traces could not be displayed. Consider increasing stack trace storage size. HEAD is now at d3365e9 [RFC] handle ENOMEM in tools/offcputime` ```
-
4ast authored
http_filter fixes
-
Bertrone Matteo authored
-
- 13 May, 2016 3 commits
-
-
Qasim Sarfraz authored
-
Qasim Sarfraz authored
Signed-off-by: MQasimSarfraz <qasims@example.com>
-
4ast authored
Lua ports of biosnoop and stacksnoop
-
- 12 May, 2016 3 commits
-
-
Mark Drayton authored
-
Brenden Blanco authored
updated cmake system to include lua and new networking example
-
Zaafar Ahmed authored
-
- 11 May, 2016 5 commits
-
-
4ast authored
Add new example with test case for for unroll, as requested.
-
Brenden Blanco authored
Revert "Force lua main.c to include luajit headers"
-
Brenden Blanco authored
This reverts commit c21b9c03. Instead, use `LUAJIT_DIR=/usr/include/luajit-2.0 cmake ..` or similar as required. Signed-off-by: Brenden Blanco <bblanco@plumgrid.com>
-
Valkum authored
-
Valkum authored
Add dns_matching example with test case for for unroll, as requested at iovisor-dev@lists.iovisor.org
-
- 06 May, 2016 12 commits
-
-
Brenden Blanco authored
Lua installation instructions.
-
Nicole Izumi authored
-
Brenden Blanco authored
[RFC] New USDT API
-
Vicent Marti authored
-
Vicent Marti authored
-
Vicent Marti authored
-
Vicent Marti authored
-
Vicent Marti authored
-
Vicent Marti authored
-
Vicent Marti authored
-
Vicent Marti authored
-
Vicent Marti authored
-