From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1753125AbdK3BoB (ORCPT ); Wed, 29 Nov 2017 20:44:01 -0500 Received: from mx0b-00082601.pphosted.com ([67.231.153.30]:47874 "EHLO mx0b-00082601.pphosted.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1752607AbdK3Bn7 (ORCPT ); Wed, 29 Nov 2017 20:43:59 -0500 From: Song Liu To: Peter Zijlstra CC: Steven Rostedt , "mingo@redhat.com" , David Miller , "netdev@vger.kernel.org" , "linux-kernel@vger.kernel.org" , "daniel@iogearbox.net" , Kernel Team Subject: Re: [PATCH 1/6] perf: Add new type PERF_TYPE_PROBE Thread-Topic: [PATCH 1/6] perf: Add new type PERF_TYPE_PROBE Thread-Index: AQHTXjaRi2N4X0dMeE+tO7U3Qyser6MhzWmAgApvTAA= 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> In-Reply-To: <20171123102209.mqhrpaxym35eg7hq@hirez.programming.kicks-ass.net> Accept-Language: en-US Content-Language: en-US X-MS-Has-Attach: X-MS-TNEF-Correlator: x-mailer: Apple Mail (2.3273) x-originating-ip: [2620:10d:c090:200::6:5a2e] x-ms-publictraffictype: Email x-microsoft-exchange-diagnostics: 1;CY4PR15MB1511;20:3Ocr8m8DS42Zpwr34KnbZa8ix9lxVdl6dhVJ0OxT0jxUtyvxDr/x3zorG8or5Kns8KtQZJwbuS9rM9/I4A6oND1NtLqAwSd612/lKzm8RfQ9XglHQsxLIFqiPPC+5bVooEis+2+0Tq8ZxVrvCNILJ6n7OOJ+6r4K0aCefo7HSWo= x-ms-exchange-antispam-srfa-diagnostics: SSOS; x-ms-office365-filtering-correlation-id: 92b8333f-c724-4f35-3432-08d53793b487 x-microsoft-antispam: UriScan:;BCL:0;PCL:0;RULEID:(4534020)(4602075)(4627115)(201703031133081)(201702281549075)(5600026)(4604075)(2017052603199);SRVR:CY4PR15MB1511; x-ms-traffictypediagnostic: CY4PR15MB1511: x-microsoft-antispam-prvs: x-exchange-antispam-report-test: UriScan:; x-exchange-antispam-report-cfa-test: BCL:0;PCL:0;RULEID:(11241501159)(6040450)(2401047)(8121501046)(5005006)(3231022)(10201501046)(93006095)(93001095)(3002001)(6041248)(20161123558100)(20161123560025)(20161123564025)(20161123562025)(20161123555025)(201703131423075)(201702281528075)(201703061421075)(201703061406153)(6072148)(201708071742011);SRVR:CY4PR15MB1511;BCL:0;PCL:0;RULEID:(100000803101)(100110400095);SRVR:CY4PR15MB1511; x-forefront-prvs: 05079D8470 x-forefront-antispam-report: SFV:NSPM;SFS:(10019020)(6009001)(366004)(346002)(376002)(199003)(24454002)(189002)(4326008)(6246003)(86362001)(5660300001)(97736004)(6486002)(2906002)(77096006)(53546010)(6506006)(76176010)(50986010)(33656002)(102836003)(6116002)(36756003)(81156014)(8676002)(105586002)(81166006)(57306001)(99286004)(25786009)(3280700002)(106356001)(8936002)(2950100002)(305945005)(101416001)(50226002)(14454004)(7736002)(6916009)(68736007)(2900100001)(53936002)(3660700001)(229853002)(6436002)(82746002)(478600001)(316002)(189998001)(54906003)(83716003)(6512007);DIR:OUT;SFP:1102;SCL:1;SRVR:CY4PR15MB1511;H:CY4PR15MB1512.namprd15.prod.outlook.com;FPR:;SPF:None;PTR:InfoNoRecords;A:1;MX:1;LANG:en; spamdiagnosticoutput: 1:99 spamdiagnosticmetadata: NSPM Content-Type: text/plain; charset="us-ascii" Content-ID: MIME-Version: 1.0 X-MS-Exchange-CrossTenant-Network-Message-Id: 92b8333f-c724-4f35-3432-08d53793b487 X-MS-Exchange-CrossTenant-originalarrivaltime: 30 Nov 2017 01:43:06.9710 (UTC) X-MS-Exchange-CrossTenant-fromentityheader: Hosted X-MS-Exchange-CrossTenant-id: 8ae927fe-1255-47a7-a2af-5f3a069daaa2 X-MS-Exchange-Transport-CrossTenantHeadersStamped: CY4PR15MB1511 X-OriginatorOrg: fb.com X-Proofpoint-Virus-Version: vendor=fsecure engine=2.50.10432:,, definitions=2017-11-29_09:,, signatures=0 X-Proofpoint-Spam-Reason: safe X-FB-Internal: Safe Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Content-Transfer-Encoding: 8bit X-MIME-Autoconverted: from quoted-printable to 8bit by nfs id vAU1iF7K015366 > On Nov 23, 2017, at 2:22 AM, Peter Zijlstra 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