/external/bcc/examples/tracing/ |
mysqld_query.py | 3 # mysqld_query Trace MySQL server queries. Example of USDT tracing. 8 # This uses USDT probes, and needs a MySQL server with -DENABLE_DTRACE=1. 14 from bcc import BPF, USDT 41 # enable USDT probe from given PID 42 u = USDT(pid=int(pid))
|
nodejs_http_server.py | 3 # nodejs_http_server Basic example of node.js USDT tracing. 12 from bcc import BPF, USDT 34 # enable USDT probe from given PID 35 u = USDT(pid=int(pid))
|
/external/bcc/tests/cc/ |
test_usdt_args.cc | 20 #include "usdt.h" 25 static void verify_register(USDT::ArgumentParser &parser, int arg_size, 27 USDT::Argument arg; 35 static void verify_register(USDT::ArgumentParser &parser, int arg_size, 41 USDT::Argument arg; 55 TEST_CASE("test usdt argument parsing", "[usdt]") { 58 USDT::ArgumentParser_aarch64 parser("4@[x32,200]"); 60 USDT::ArgumentParser_powerpc64 parser("4@-12(42)"); 62 USDT::ArgumentParser_x64 parser("4@i%ra+1r") [all...] |
test_usdt_probes.cc | 22 #include "usdt.h" 26 /* required to insert USDT probes on this very executable -- 38 TEST_CASE("test finding a probe in our own process", "[usdt]") { 39 USDT::Context ctx(getpid()); 59 TEST_CASE("test fine a probe in our own binary with C++ API", "[usdt]") { 61 ebpf::USDT u("/proc/self/exe", "libbcc_test", "sample_probe_1", "on_event"); 73 TEST_CASE("test fine a probe in our Process with C++ API", "[usdt]") { 75 ebpf::USDT u(::getpid(), "libbcc_test", "sample_probe_1", "on_event"); 147 TEST_CASE("test listing all USDT probes in Ruby/MRI", "[usdt]") { [all...] |
/external/bcc/src/cc/api/ |
BPF.h | 43 class USDT; 55 const std::vector<USDT>& usdt = {}); 78 StatusTuple attach_usdt(const USDT& usdt, pid_t pid = -1); 79 StatusTuple detach_usdt(const USDT& usdt, pid_t pid = -1); 232 std::vector<USDT> usdt_; 242 class USDT { 244 USDT(const std::string& binary_path, const std::string& provider [all...] |
BPF.cc | 37 #include "usdt.h" 59 const std::vector<USDT>& usdt) { 62 usdt_.reserve(usdt.size()); 63 for (const auto& u : usdt) { 227 StatusTuple BPF::attach_usdt(const USDT& usdt, pid_t pid) { 229 if (u == usdt) { 230 auto& probe = *static_cast<::USDT::Probe*>(u.probe_.get()); 232 return StatusTuple(-1, "Unable to enable USDT " + u.print_name()) [all...] |
/external/bcc/src/cc/usdt/ |
usdt.cc | 29 #include "usdt.h" 33 namespace USDT { 397 USDT::Context *ctx; 400 ctx = new USDT::Context(pid); 410 ctx = new USDT::Context(pid, path); 420 USDT::Context *ctx = new USDT::Context(path); 428 void bcc_usdt_close(void *usdt) { 429 if (usdt) { 430 USDT::Context *ctx = static_cast<USDT::Context *>(usdt) [all...] |
/external/bcc/examples/usdt_sample/scripts/ |
lat_dist.py | 5 from bcc import BPF, USDT 10 parser = argparse.ArgumentParser(description="Trace the latency distribution of an operation using usdt probes.", 80 # Create USDT context 82 usdt_ctx = USDT(pid=this_pid)
|
lat_avg.py | 5 from bcc import BPF, USDT 10 parser = argparse.ArgumentParser(description="Trace the moving average of the latency of an operation using usdt probes.", 105 # Create USDT context 107 usdt_ctx = USDT(pid=this_pid)
|
latency.py | 5 from bcc import BPF, USDT 10 parser = argparse.ArgumentParser(description="Trace the latency of an operation using usdt probes.", 82 # Create USDT context 84 usdt_ctx = USDT(pid=this_pid)
|
/external/bcc/tools/ |
mysqld_qslower.py | 11 # This uses USDT probes, and needs a MySQL server with -DENABLE_DTRACE=1. 19 from bcc import BPF, USDT 96 # enable USDT probe from given PID 97 u = USDT(pid=pid)
|
dbstat.py | 8 # This tool uses USDT probes, which means it needs MySQL and PostgreSQL built 9 # with USDT (DTrace) support. 16 from bcc import BPF, USDT 86 usdts = map(lambda pid: USDT(pid=pid), args.pids) 87 for usdt in usdts: 88 usdt.enable_probe("query__start", "probe_start") 89 usdt.enable_probe("query__done", "probe_end")
|
dbslower.py | 12 # 1) USDT probes, which means it needs MySQL and PostgreSQL built with 13 # USDT (DTrace) support. 18 # all MySQL or PostgreSQL database processes and uses USDT probes. 27 from bcc import BPF, USDT 60 mode = "USDT" 80 print("Sorry at the moment PostgreSQL supports only USDT") 93 #ifdef USDT 100 #endif //USDT 137 #else //USDT 169 """.replace("DEFINE_USDT", "#define USDT" if mode == "USDT" else "") [all...] |
tplist.py | 3 # tplist Display kernel tracepoints or USDT probes and their formats. 16 from bcc import USDT 22 description="Display kernel tracepoints or USDT probes " + 26 help="List USDT probes in the specified process") 28 help="List USDT probes in the specified library or executable") 87 reader = USDT(path=lib, pid=pid)
|
/external/bcc/src/lua/bcc/ |
run.lua | 60 local USDT = require("bcc.usdt") 64 USDT = USDT, 75 USDT.cleanup()
|
usdt.lua | 18 local Usdt = class("USDT") 20 Usdt.static.open_contexts = {} 22 function Usdt.static.cleanup() 23 for _, context in ipairs(Usdt.static.open_contexts) do 28 function Usdt:initialize(args) 39 assert(self.context ~= nil, "failed to create USDT context") 40 table.insert(Usdt.open_contexts, self) 43 function Usdt:enable_probe(args) 49 function Usdt:_cleanup( [all...] |
/external/bcc/tools/lib/ |
uthreads.py | 16 from bcc import BPF, USDT, utils 41 usdt = USDT(pid=args.pid) variable 65 usdt.enable_probe_or_bail("pthread_start", "trace_pthread") 93 usdt.enable_probe_or_bail("thread__start", "trace_start") 94 usdt.enable_probe_or_bail("thread__stop", "trace_stop") 98 print(usdt.get_text()) 103 bpf = BPF(text=program, usdt_contexts=[usdt])
|
uflow.py | 16 from bcc import BPF, USDT, utils 46 usdt = USDT(pid=args.pid) variable 101 global program, trace_template, usdt 115 usdt.enable_probe_or_bail(probe_name, func_name) 117 usdt = USDT(pid=args.pid) variable 177 print(usdt.get_text()) 182 bpf = BPF(text=program, usdt_contexts=[usdt])
|
uobjnew.py | 16 from bcc import BPF, USDT, utils 71 usdt = USDT(pid=args.pid) variable 106 usdt.enable_probe_or_bail("object__alloc", "alloc_entry") 135 usdt.enable_probe_or_bail("object__create", "object_alloc_entry") 138 usdt.enable_probe_or_bail("%s__create" % thing, 153 usdt.enable_probe_or_bail("obj__create", "alloc_entry") 161 print(usdt.get_text()) 166 bpf = BPF(text=program, usdt_contexts=[usdt])
|
ugc.py | 16 from bcc import BPF, USDT, utils 47 usdt = USDT(pid=args.pid) variable 111 usdt.enable_probe_or_bail(self.begin, "trace_%s" % self.begin) 112 usdt.enable_probe_or_bail(self.end, "trace_%s" % self.end) 211 print(usdt.get_text()) 216 bpf = BPF(text=program, usdt_contexts=[usdt])
|
/external/bcc/tests/python/ |
test_usdt2.py | 9 from bcc import BPF, USDT 90 # create 3 applications, 2 applications will have usdt attached and 98 # Enable USDT probe from given PID and verifier generated BPF programs. 99 u = USDT(pid=int(self.app.pid)) 102 u2 = USDT(pid=int(self.app2.pid))
|
test_usdt3.py | 9 from bcc import BPF, USDT 89 # the usdt test:probe exists in liba.so, libb.so and a.out 111 # enable USDT probe from given PID and verifier generated BPF programs 112 u = USDT(pid=int(self.app.pid))
|
/external/bcc/examples/lua/ |
usdt_ruby.lua | 38 local u = util.USDT:new{pid=tonumber(arg[1])} 41 local b = BPF:new{text=program, usdt=u}
|
/external/bcc/examples/cpp/ |
FollyRequestContextSwitch.cc | 6 * Basic example of using USDT with BCC. 90 ebpf::USDT u(binary, pid, "folly", "request_context_switch_before", 106 std::cout << "Attached to USDT " << u;
|
/external/bcc/src/cc/ |
usdt.h | 31 class USDT; 34 namespace USDT { 238 friend class ::ebpf::USDT; 284 friend class ::ebpf::USDT;
|