# 需要导入模块: from bcc import BPF [as 别名]# 或者: from bcc.BPF importattach_uprobe[as 别名]classTestProbeQuota(TestCase):defsetUp(self):self.b = BPF(text="""int count(void *ctx) { return 0; }""")deftest_probe_quota(self):withself.assertRaises(Exception): self.b.attach_kprobe...
1.Uprobe-tracer: Uprobe-based Event Tracing uprobe支持通过二进制文件的偏移值添加attach,比如 Add a probe as a new uprobe event, write a new definition to uprobe_events as below (sets a uprobe at an offset of 0x4245c0 in the executable /bin/bash): echo 'p /bin/bash:0x4245c0' > ...