bcc icon indicating copy to clipboard operation
bcc copied to clipboard

Is there a way to know the exact instruction count of a probe?

Open yzhao1012 opened this issue 3 years ago • 1 comments
trafficstars

Our BCC C code runs on 4.14 kernels or newer, whose probes still have the limit of 4096 instructions.

Is there a way to check the instruction count of the probe before attaching them? So that we could report failure to userspace before trying to attaching the probes?

yzhao1012 avatar Sep 07 '22 21:09 yzhao1012

Maybe you can use bpf_function_size:

https://github.com/iovisor/bcc/blob/5f44839aecabe57f5146a457e5dec763ccb068e3/src/python/bcc/init.py#L515

chenhengqi avatar Sep 08 '22 05:09 chenhengqi