From mboxrd@z Thu Jan 1 00:00:00 1970 From: Song Liu Subject: Re: [PATCH 1/6] perf: Add new type PERF_TYPE_PROBE Date: Thu, 30 Nov 2017 01:43:06 +0000 Message-ID: References: <20171115172339.1791161-1-songliubraving@fb.com> <20171115172339.1791161-3-songliubraving@fb.com> <20171123102209.mqhrpaxym35eg7hq@hirez.programming.kicks-ass.net> Mime-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: quoted-printable Cc: Steven Rostedt , "mingo@redhat.com" , David Miller , "netdev@vger.kernel.org" , "linux-kernel@vger.kernel.org" , "daniel@iogearbox.net" , Kernel Team To: Peter Zijlstra Return-path: In-Reply-To: <20171123102209.mqhrpaxym35eg7hq@hirez.programming.kicks-ass.net> Content-Language: en-US Content-ID: Sender: linux-kernel-owner@vger.kernel.org List-Id: netdev.vger.kernel.org > On Nov 23, 2017, at 2:22 AM, Peter Zijlstra wrote: >=20 > 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. >>=20 >> Struct probe_desc and two flags, is_uprobe and is_return, are added >> to describe the probe being created with perf_event_open. >=20 >> --- >> include/uapi/linux/perf_event.h | 35 +++++++++++++++++++++++++++++++++-- >> 1 file changed, 33 insertions(+), 2 deletions(-) >>=20 >> diff --git a/include/uapi/linux/perf_event.h b/include/uapi/linux/perf_e= vent.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 =3D 3, >> PERF_TYPE_RAW =3D 4, >> PERF_TYPE_BREAKPOINT =3D 5, >> + PERF_TYPE_PROBE =3D 6, >=20 > 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 versio= n (sending soon).=20 I added two fixed types (PERF_TYPE_KPROBE and PERF_TYPE_UPROBE) in the new= =20 version. I know that perf doesn't need them any more. But currently bcc sti= ll=20 relies on these fixed types to use the probes/tracepoints.=20 Thanks, Song