Questions on BPF_PROG_TYPE_TRACING & fentry/fexit

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



Hi there,

I'm looking to implement programs of type BPF_PROG_TYPE_TRACING to
replace kprobe/tracepoints because from what I can tell there's less
performance overhead. However, I'm trying to understand restrictions
and use cases.

I see that there's a generic `bpf_program__attach()` which can be used
to attach programs and it will attempt to auto-detect type and attach
them accordingly.

In practice, I'm curious what I can attach programs of this type to,
and how are they specified? `bpf_program__attach()` doesn't take any
parameters outside of the program itself. Does it attach based on the
name of the program's name/section? If so, is there an idiomatic way
of making sure this is correctly done?

My follow up question is to ask how fentry/fexit relate. I've seen
these referred to as program types but in code they appear as attach
types, not program types. Can someone clarify?

As always I'm partly asking so that I can document this and avoid
other people having the same confusion :-)

Thank you very much!
Grant



[Index of Archives]     [Linux Samsung SoC]     [Linux Rockchip SoC]     [Linux Actions SoC]     [Linux for Synopsys ARC Processors]     [Linux NFS]     [Linux NILFS]     [Linux USB Devel]     [Video for Linux]     [Linux Audio Users]     [Yosemite News]     [Linux Kernel]     [Linux SCSI]


  Powered by Linux