> On Nov 23, 2017, at 2:22 AM, Peter Zijlstra <pet...@infradead.org> wrote: > > On Wed, Nov 15, 2017 at 09:23:33AM -0800, Song Liu wrote: >> A new perf type PERF_TYPE_PROBE is added to allow creating [k,u]probe >> with perf_event_open. These [k,u]probe are associated with the file >> decriptor created by perf_event_open, thus are easy to clean when >> the file descriptor is destroyed. >> >> Struct probe_desc and two flags, is_uprobe and is_return, are added >> to describe the probe being created with perf_event_open. > >> --- >> include/uapi/linux/perf_event.h | 35 +++++++++++++++++++++++++++++++++-- >> 1 file changed, 33 insertions(+), 2 deletions(-) >> >> diff --git a/include/uapi/linux/perf_event.h >> b/include/uapi/linux/perf_event.h >> index 362493a..cc42d59 100644 >> --- a/include/uapi/linux/perf_event.h >> +++ b/include/uapi/linux/perf_event.h >> @@ -33,6 +33,7 @@ enum perf_type_id { >> PERF_TYPE_HW_CACHE = 3, >> PERF_TYPE_RAW = 4, >> PERF_TYPE_BREAKPOINT = 5, >> + PERF_TYPE_PROBE = 6, > > Not required.. these fixed types are mostly legacy at this point.
Dear Peter, Thanks a lot for your feedback. I have incorporated them in the next version (sending soon). I added two fixed types (PERF_TYPE_KPROBE and PERF_TYPE_UPROBE) in the new version. I know that perf doesn't need them any more. But currently bcc still relies on these fixed types to use the probes/tracepoints. Thanks, Song