Lines Matching full:bcc
1 # bcc Reference Guide
5 This guide is incomplete. If something feels missing, check the bcc and kernel source. And if you c…
86 - [bcc Python](#bcc-python)
144 This section describes the C part of a bcc program.
172 …com/iovisor/bcc/blob/4afa96a71c5dbfc4c507c3355e20baa6c184a3a8/examples/tracing/tcpv4connect.py#L28…
173 …/iovisor/bcc/commit/310ab53710cfd46095c1f6b3e44f1dbc8d1a41d8#diff-8cd1822359ffee26e7469f991ce0ef00…
197 …com/iovisor/bcc/blob/4afa96a71c5dbfc4c507c3355e20baa6c184a3a8/examples/tracing/tcpv4connect.py#L38…
229 ….com/iovisor/bcc/blob/a4159da8c4ea8a05a3c6e402451f530d6e5a8b41/examples/tracing/urandomread.py#L19…
230 [search /examples](https://github.com/iovisor/bcc/search?q=TRACEPOINT_PROBE+path%3Aexamples&type=Co…
231 [search /tools](https://github.com/iovisor/bcc/search?q=TRACEPOINT_PROBE+path%3Atools&type=Code)
253 [code](https://github.com/iovisor/bcc/blob/4afa96a71c5dbfc4c507c3355e20baa6c184a3a8/examples/tracin…
274 ….com/iovisor/bcc/blob/4afa96a71c5dbfc4c507c3355e20baa6c184a3a8/examples/tracing/strlen_hist.py#L39…
275 …/github.com/iovisor/bcc/blob/4afa96a71c5dbfc4c507c3355e20baa6c184a3a8/tools/bashreadline.py) ([out…
301 [code](https://github.com/iovisor/bcc/commit/4f88a9401357d7b75e917abd994aa6ea97dda4d3#diff-04a7cad5…
302 [search /examples](https://github.com/iovisor/bcc/search?q=bpf_usdt_readarg+path%3Aexamples&type=Co…
303 [search /tools](https://github.com/iovisor/bcc/search?q=bpf_usdt_readarg+path%3Atools&type=Code)
311 …tracepoint_args```, which is defined in [bpf.h](https://github.com/iovisor/bcc/blob/master/src/cc/…
332 [search /tools](https://github.com/iovisor/bcc/search?q=RAW_TRACEPOINT_PROBE+path%3Atools&type=Code)
365 …github.com/iovisor/bcc/blob/552658edda09298afdccc8a4b5e17311a2d8a771/tools/execsnoop.py#L101) ([ou…
387 [search /tools](https://github.com/iovisor/bcc/search?q=KFUNC_PROBE+path%3Atools&type=Code)
411 [search /tools](https://github.com/iovisor/bcc/search?q=KRETFUNC_PROBE+path%3Atools&type=Code)
450 [search /tests](https://github.com/iovisor/bcc/search?q=LSM_PROBE+path%3Atests&type=Code)
485 …ns automatically in some cases, such as dereferencing kernel variables, as bcc will rewrite the BP…
488 [search /examples](https://github.com/iovisor/bcc/search?q=bpf_probe_read_kernel+path%3Aexamples&ty…
489 [search /tools](https://github.com/iovisor/bcc/search?q=bpf_probe_read_kernel+path%3Atools&type=Cod…
502 [search /examples](https://github.com/iovisor/bcc/search?q=bpf_probe_read_kernel_str+path%3Aexample…
503 [search /tools](https://github.com/iovisor/bcc/search?q=bpf_probe_read_kernel_str+path%3Atools&type…
512 [search /examples](https://github.com/iovisor/bcc/search?q=bpf_ktime_get_ns+path%3Aexamples&type=Co…
513 [search /tools](https://github.com/iovisor/bcc/search?q=bpf_ktime_get_ns+path%3Atools&type=Code)
524 [search /examples](https://github.com/iovisor/bcc/search?q=bpf_get_current_pid_tgid+path%3Aexamples…
525 [search /tools](https://github.com/iovisor/bcc/search?q=bpf_get_current_pid_tgid+path%3Atools&type=…
536 [search /examples](https://github.com/iovisor/bcc/search?q=bpf_get_current_uid_gid+path%3Aexamples&…
537 [search /tools](https://github.com/iovisor/bcc/search?q=bpf_get_current_uid_gid+path%3Atools&type=C…
557 [search /examples](https://github.com/iovisor/bcc/search?q=bpf_get_current_comm+path%3Aexamples&typ…
558 [search /tools](https://github.com/iovisor/bcc/search?q=bpf_get_current_comm+path%3Atools&type=Code)
580 [search /examples](https://github.com/iovisor/bcc/search?q=bpf_get_current_task+path%3Aexamples&typ…
581 [search /tools](https://github.com/iovisor/bcc/search?q=bpf_get_current_task+path%3Atools&type=Code)
590 [search /examples](https://github.com/iovisor/bcc/search?q=bpf_log2l+path%3Aexamples&type=Code),
591 [search /tools](https://github.com/iovisor/bcc/search?q=bpf_log2l+path%3Atools&type=Code)
600 [search /examples](https://github.com/iovisor/bcc/search?q=bpf_get_prandom_u32+path%3Aexamples&type…
601 [search /tools](https://github.com/iovisor/bcc/search?q=bpf_get_prandom_u32+path%3Atools&type=Code)
612 [search /examples](https://github.com/iovisor/bcc/search?q=bpf_probe_read_user+path%3Aexamples&type…
613 [search /tools](https://github.com/iovisor/bcc/search?q=bpf_probe_read_user+path%3Atools&type=Code)
626 [search /examples](https://github.com/iovisor/bcc/search?q=bpf_probe_read_user_str+path%3Aexamples&…
627 [search /tools](https://github.com/iovisor/bcc/search?q=bpf_probe_read_user_str+path%3Atools&type=C…
643 [search /examples](https://github.com/iovisor/bcc/search?q=bpf_get_ns_current_pid_tgid+path%3Aexamp…
644 [search /tools](https://github.com/iovisor/bcc/search?q=bpf_get_ns_current_pid_tgid+path%3Atools&ty…
684 [search /examples](https://github.com/iovisor/bcc/search?q=bpf_trace_printk+path%3Aexamples&type=Co…
685 [search /tools](https://github.com/iovisor/bcc/search?q=bpf_trace_printk+path%3Atools&type=Code)
719 [search /examples](https://github.com/iovisor/bcc/search?q=BPF_PERF_OUTPUT+path%3Aexamples&type=Cod…
720 [search /tools](https://github.com/iovisor/bcc/search?q=BPF_PERF_OUTPUT+path%3Atools&type=Code)
733 [search /examples](https://github.com/iovisor/bcc/search?q=perf_submit+path%3Aexamples&type=Code),
734 [search /tools](https://github.com/iovisor/bcc/search?q=perf_submit+path%3Atools&type=Code)
745 [search /examples](https://github.com/iovisor/bcc/search?q=perf_submit_skb+path%3Aexamples&type=Cod…
746 [search /tools](https://github.com/iovisor/bcc/search?q=perf_submit_skb+path%3Atools&type=Code)
810 [search /examples](https://github.com/iovisor/bcc/search?q=BPF_RINGBUF_OUTPUT+path%3Aexamples&type=…
826 [search /examples](https://github.com/iovisor/bcc/search?q=ringbuf_output+path%3Aexamples&type=Code…
838 [search /examples](https://github.com/iovisor/bcc/search?q=ringbuf_reserve+path%3Aexamples&type=Cod…
854 [search /examples](https://github.com/iovisor/bcc/search?q=ringbuf_submit+path%3Aexamples&type=Code…
871 [search /examples](https://github.com/iovisor/bcc/search?q=ringbuf_submit+path%3Aexamples&type=Code…
888 [search /examples](https://github.com/iovisor/bcc/search?q=ringbuf_query+path%3Aexamples&type=Code),
905 [search /examples](https://github.com/iovisor/bcc/search?q=BPF_TABLE+path%3Aexamples&type=Code),
906 [search /tools](https://github.com/iovisor/bcc/search?q=BPF_TABLE+path%3Atools&type=Code)
941 [search /examples](https://github.com/iovisor/bcc/search?q=BPF_HASH+path%3Aexamples&type=Code),
942 [search /tools](https://github.com/iovisor/bcc/search?q=BPF_HASH+path%3Atools&type=Code)
965 [search /examples](https://github.com/iovisor/bcc/search?q=BPF_ARRAY+path%3Aexamples&type=Code),
966 [search /tools](https://github.com/iovisor/bcc/search?q=BPF_ARRAY+path%3Atools&type=Code)
989 [search /examples](https://github.com/iovisor/bcc/search?q=BPF_HISTOGRAM+path%3Aexamples&type=Code),
990 [search /tools](https://github.com/iovisor/bcc/search?q=BPF_HISTOGRAM+path%3Atools&type=Code)
1011 [search /examples](https://github.com/iovisor/bcc/search?q=BPF_STACK_TRACE+path%3Aexamples&type=Cod…
1012 [search /tools](https://github.com/iovisor/bcc/search?q=BPF_STACK_TRACE+path%3Atools&type=Code)
1026 b = bcc.BPF(text=text, cflags=["-DNUM_CPUS=%d" % multiprocessing.cpu_count()])
1035 [search /tests](https://github.com/iovisor/bcc/search?q=BPF_PERF_ARRAY+path%3Atests&type=Code)
1062 [search /examples](https://github.com/iovisor/bcc/search?q=BPF_PERCPU_HASH+path%3Aexamples&type=Cod…
1063 [search /tools](https://github.com/iovisor/bcc/search?q=BPF_PERCPU_HASH+path%3Atools&type=Code)
1091 [search /examples](https://github.com/iovisor/bcc/search?q=BPF_PERCPU_ARRAY+path%3Aexamples&type=Co…
1092 [search /tools](https://github.com/iovisor/bcc/search?q=BPF_PERCPU_ARRAY+path%3Atools&type=Code)
1115 [search /examples](https://github.com/iovisor/bcc/search?q=BPF_LPM_TRIE+path%3Aexamples&type=Code),
1116 [search /tools](https://github.com/iovisor/bcc/search?q=BPF_LPM_TRIE+path%3Atools&type=Code)
1129 [search /examples](https://github.com/iovisor/bcc/search?q=BPF_PROG_ARRAY+path%3Aexamples&type=Code…
1130 [search /tests](https://github.com/iovisor/bcc/search?q=BPF_PROG_ARRAY+path%3Atests&type=Code),
1131 [assign fd](https://github.com/iovisor/bcc/blob/master/examples/networking/tunnel_monitor/monitor.p…
1147 [search /examples](https://github.com/iovisor/bcc/search?q=BPF_DEVMAP+path%3Aexamples&type=Code),
1163 [search /examples](https://github.com/iovisor/bcc/search?q=BPF_CPUMAP+path%3Aexamples&type=Code),
1179 [search /examples](https://github.com/iovisor/bcc/search?q=BPF_XSKMAP+path%3Aexamples&type=Code),
1225 [search /tests](https://github.com/iovisor/bcc/search?q=BPF_STACK+path%3Atests&type=Code),
1245 [search /tests](https://github.com/iovisor/bcc/search?q=BPF_QUEUE+path%3Atests&type=Code),
1275 [search /tests](https://github.com/iovisor/bcc/search?q=BPF_SOCKHASH+path%3Atests&type=Code)
1284 [search /examples](https://github.com/iovisor/bcc/search?q=lookup+path%3Aexamples&type=Code),
1285 [search /tools](https://github.com/iovisor/bcc/search?q=lookup+path%3Atools&type=Code)
1294 [search /examples](https://github.com/iovisor/bcc/search?q=lookup_or_try_init+path%3Aexamples&type=…
1295 [search /tools](https://github.com/iovisor/bcc/search?q=lookup_or_try_init+path%3Atools&type=Code)
1307 [search /examples](https://github.com/iovisor/bcc/search?q=delete+path%3Aexamples&type=Code),
1308 [search /tools](https://github.com/iovisor/bcc/search?q=delete+path%3Atools&type=Code)
1317 [search /examples](https://github.com/iovisor/bcc/search?q=update+path%3Aexamples&type=Code),
1318 [search /tools](https://github.com/iovisor/bcc/search?q=update+path%3Atools&type=Code)
1327 [search /examples](https://github.com/iovisor/bcc/search?q=insert+path%3Aexamples&type=Code),
1328 [search /tools](https://github.com/iovisor/bcc/search?q=insert+path%3Atools&type=Code)
1341 [search /examples](https://github.com/iovisor/bcc/search?q=increment+path%3Aexamples&type=Code),
1342 [search /tools](https://github.com/iovisor/bcc/search?q=increment+path%3Atools&type=Code)
1351 [search /examples](https://github.com/iovisor/bcc/search?q=get_stackid+path%3Aexamples&type=Code),
1352 [search /tools](https://github.com/iovisor/bcc/search?q=get_stackid+path%3Atools&type=Code)
1361 [search /tests](https://github.com/iovisor/bcc/search?q=perf_read+path%3Atests&type=Code)
1399 [search /examples](https://github.com/iovisor/bcc/search?l=C&q=call+path%3Aexamples&type=Code),
1400 [search /tests](https://github.com/iovisor/bcc/search?l=C&q=call+path%3Atests&type=Code)
1426 b = bcc.BPF(src_file="example.c")
1438 [search /examples](https://github.com/iovisor/bcc/search?l=C&q=redirect_map+path%3Aexamples&type=Co…
1449 [search /tests](https://github.com/iovisor/bcc/search?q=push+path%3Atests&type=Code),
1460 [search /tests](https://github.com/iovisor/bcc/search?q=pop+path%3Atests&type=Code),
1471 [search /tests](https://github.com/iovisor/bcc/search?q=peek+path%3Atests&type=Code),
1490 [search /tests](https://github.com/iovisor/bcc/search?q=sock_hash_update+path%3Atests&type=Code),
1501 [search /tests](https://github.com/iovisor/bcc/search?q=msg_redirect_hash+path%3Atests&type=Code),
1512 [search /tests](https://github.com/iovisor/bcc/search?q=sk_redirect_hash+path%3Atests&type=Code),
1518 The special BCC macro `BPF_LICENSE` specifies the license of the BPF program. You can set the licen…
1534 **If the macro is not specified, BCC will automatically define the license of the program as GPL.**
1540 # bcc Python
1592 [search /examples](https://github.com/iovisor/bcc/search?q=BPF+path%3Aexamples+language%3Apython&ty…
1593 [search /tools](https://github.com/iovisor/bcc/search?q=BPF+path%3Atools+language%3Apython&type=Cod…
1616 [search /examples](https://github.com/iovisor/bcc/search?q=USDT+path%3Aexamples+language%3Apython&t…
1617 [search /tools](https://github.com/iovisor/bcc/search?q=USDT+path%3Atools+language%3Apython&type=Co…
1641 [search /examples](https://github.com/iovisor/bcc/search?q=attach_kprobe+path%3Aexamples+language%3…
1642 [search /tools](https://github.com/iovisor/bcc/search?q=attach_kprobe+path%3Atools+language%3Apytho…
1666 [search /examples](https://github.com/iovisor/bcc/search?q=attach_kretprobe+path%3Aexamples+languag…
1667 [search /tools](https://github.com/iovisor/bcc/search?q=attach_kretprobe+path%3Atools+language%3Apy…
1706 [code](https://github.com/iovisor/bcc/blob/a4159da8c4ea8a05a3c6e402451f530d6e5a8b41/examples/tracin…
1707 [search /examples](https://github.com/iovisor/bcc/search?q=attach_tracepoint+path%3Aexamples+langua…
1708 [search /tools](https://github.com/iovisor/bcc/search?q=attach_tracepoint+path%3Atools+language%3Ap…
1743 [search /examples](https://github.com/iovisor/bcc/search?q=attach_uprobe+path%3Aexamples+language%3…
1744 [search /tools](https://github.com/iovisor/bcc/search?q=attach_uprobe+path%3Atools+language%3Apytho…
1772 [search /examples](https://github.com/iovisor/bcc/search?q=attach_uretprobe+path%3Aexamples+languag…
1773 [search /tools](https://github.com/iovisor/bcc/search?q=attach_uretprobe+path%3Atools+language%3Apy…
1792 [search /examples](https://github.com/iovisor/bcc/search?q=enable_probe+path%3Aexamples+language%3A…
1793 [search /tools](https://github.com/iovisor/bcc/search?q=enable_probe+path%3Atools+language%3Apython…
1810 [search /tools](https://github.com/iovisor/bcc/search?q=attach_raw_tracepoint+path%3Atools+language…
1835 [search /examples](https://github.com/iovisor/bcc/search?q=attach_raw_socket+path%3Aexamples+langua…
1856 Currently, bcc does not support XDP_FLAGS_REPLACE flag. The following are the descriptions of other…
1883 [search /examples](https://github.com/iovisor/bcc/search?q=attach_xdp+path%3Aexamples+language%3Apy…
1884 [search /tools](https://github.com/iovisor/bcc/search?q=attach_xdp+path%3Atools+language%3Apython&t…
1903 [search /examples](https://github.com/iovisor/bcc/search?q=attach_func+path%3Aexamples+language%3Ap…
1920 [search /examples](https://github.com/iovisor/bcc/search?q=detach_func+path%3Aexamples+language%3Ap…
1969 [search /examples](https://github.com/iovisor/bcc/search?q=trace_print+path%3Aexamples+language%3Ap…
1970 [search /tools](https://github.com/iovisor/bcc/search?q=trace_print+path%3Atools+language%3Apython&…
1994 [search /examples](https://github.com/iovisor/bcc/search?q=trace_fields+path%3Aexamples+language%3A…
1995 [search /tools](https://github.com/iovisor/bcc/search?q=trace_fields+path%3Atools+language%3Apython…
2025 [code](https://github.com/iovisor/bcc/blob/v0.9.0/examples/tracing/hello_perf_output.py#L55),
2026 [search /examples](https://github.com/iovisor/bcc/search?q=perf_buffer_poll+path%3Aexamples+languag…
2027 [search /tools](https://github.com/iovisor/bcc/search?q=perf_buffer_poll+path%3Atools+language%3Apy…
2051 [search /examples](https://github.com/iovisor/bcc/search?q=ring_buffer_poll+path%3Aexamples+languag…
2076 [search /examples](https://github.com/iovisor/bcc/search?q=ring_buffer_consume+path%3Aexamples+lang…
2080 Maps are BPF data stores, and are used in bcc to implement a table, and then higher level objects o…
2134 In Python, you can either let bcc generate the data structure from C declaration automatically (rec…
2158 [code](https://github.com/iovisor/bcc/blob/v0.9.0/examples/tracing/hello_perf_output.py#L52),
2159 [search /examples](https://github.com/iovisor/bcc/search?q=open_perf_buffer+path%3Aexamples+languag…
2160 [search /tools](https://github.com/iovisor/bcc/search?q=open_perf_buffer+path%3Atools+language%3Apy…
2181 [search /examples](https://github.com/iovisor/bcc/search?q=items+path%3Aexamples+language%3Apython&…
2182 [search /tools](https://github.com/iovisor/bcc/search?q=items+path%3Atools+language%3Apython&type=C…
2208 [search /examples](https://github.com/iovisor/bcc/search?q=clear+path%3Aexamples+language%3Apython&…
2209 [search /tools](https://github.com/iovisor/bcc/search?q=clear+path%3Atools+language%3Apython&type=C…
2318 [search /examples](https://github.com/iovisor/bcc/search?q=print_log2_hist+path%3Aexamples+language…
2319 [search /tools](https://github.com/iovisor/bcc/search?q=print_log2_hist+path%3Atools+language%3Apyt…
2377 [search /examples](https://github.com/iovisor/bcc/search?q=print_linear_hist+path%3Aexamples+langua…
2378 [search /tools](https://github.com/iovisor/bcc/search?q=print_linear_hist+path%3Atools+language%3Ap…
2416 In Python, you can either let bcc generate the data structure from C declaration automatically (rec…
2440 [search /examples](https://github.com/iovisor/bcc/search?q=open_ring_buffer+path%3Aexamples+languag…
2450 [search /tests](https://github.com/iovisor/bcc/search?q=push+path%3Atests+language%3Apython&type=Co…
2461 [search /tests](https://github.com/iovisor/bcc/search?q=pop+path%3Atests+language%3Apython&type=Cod…
2471 [search /tests](https://github.com/iovisor/bcc/search?q=peek+path%3Atests+language%3Apython&type=Co…
2475 Some helper methods provided by bcc. Note that since we're in Python, we can import any Python libr…
2490 [search /examples](https://github.com/iovisor/bcc/search?q=ksym+path%3Aexamples+language%3Apython&t…
2491 [search /tools](https://github.com/iovisor/bcc/search?q=ksym+path%3Atools+language%3Apython&type=Co…
2506 [search /examples](https://github.com/iovisor/bcc/search?q=ksymname+path%3Aexamples+language%3Apyth…
2507 [search /tools](https://github.com/iovisor/bcc/search?q=ksymname+path%3Atools+language%3Apython&typ…
2522 [search /examples](https://github.com/iovisor/bcc/search?q=sym+path%3Aexamples+language%3Apython&ty…
2523 [search /tools](https://github.com/iovisor/bcc/search?q=sym+path%3Atools+language%3Apython&type=Cod…
2542 [search /examples](https://github.com/iovisor/bcc/search?q=num_open_kprobes+path%3Aexamples+languag…
2543 [search /tools](https://github.com/iovisor/bcc/search?q=num_open_kprobes+path%3Atools+language%3Apy…
2549 …el and sometimes it will causing trouble. (see [#2590](https://github.com/iovisor/bcc/issues/2590))
2559 [search /examples](https://github.com/iovisor/bcc/search?q=get_syscall_fnname+path%3Aexamples+langu…
2560 [search /tools](https://github.com/iovisor/bcc/search?q=get_syscall_fnname+path%3Atools+language%3A…
2568 …() to copy kernel memory into the BPF stack, which can be automatic by the bcc rewriter in some ca…
2585 File "/usr/lib/python2.7/dist-packages/bcc/__init__.py", line 172, in __init__
2587 File "/usr/lib/python2.7/dist-packages/bcc/__init__.py", line 612, in _trace_autoload
2589 File "/usr/lib/python2.7/dist-packages/bcc/__init__.py", line 212, in load_func
2596 …L-compatible license. Check which [BPF helpers](https://github.com/iovisor/bcc/blob/master/docs/ke…
2612 compiled. In case your kernel sources are at a non-standard location where BCC
2613 cannot find then, its possible to provide BCC the absolute path of the location
2618 By default, BCC stores the `LINUX_VERSION_CODE` in the generated eBPF object