From mboxrd@z Thu Jan 1 00:00:00 1970 From: Alexei Starovoitov Subject: Re: [PATCH v5 0/6] enable creating [k,u]probe with perf_event_open Date: Mon, 9 Apr 2018 21:54:43 -0700 Message-ID: <33ee2501-14b8-5e89-d84f-e903b4cdd9e7@fb.com> References: <20171206224518.3598254-1-songliubraving@fb.com> <97e2c641-9dfe-bf7c-9043-c79fa0c568f9@linux.vnet.ibm.com> Mime-Version: 1.0 Content-Type: text/plain; charset="utf-8"; format=flowed Content-Transfer-Encoding: 7bit Cc: , , , , , , , , Oleg Nesterov , "Naveen N. Rao" To: Ravi Bangoria , Song Liu Return-path: Received: from mx0a-00082601.pphosted.com ([67.231.145.42]:57318 "EHLO mx0a-00082601.pphosted.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1751589AbeDJE4F (ORCPT ); Tue, 10 Apr 2018 00:56:05 -0400 In-Reply-To: <97e2c641-9dfe-bf7c-9043-c79fa0c568f9@linux.vnet.ibm.com> Sender: netdev-owner@vger.kernel.org List-ID: On 4/9/18 9:45 PM, Ravi Bangoria wrote: > Hi Song, > > On 12/07/2017 04:15 AM, Song Liu wrote: >> With current kernel, user space tools can only create/destroy [k,u]probes >> with a text-based API (kprobe_events and uprobe_events in tracefs). This >> approach relies on user space to clean up the [k,u]probe after using them. >> However, this is not easy for user space to clean up properly. >> >> To solve this problem, we introduce a file descriptor based API. >> Specifically, we extended perf_event_open to create [k,u]probe, and attach >> this [k,u]probe to the file descriptor created by perf_event_open. These >> [k,u]probe are associated with this file descriptor, so they are not >> available in tracefs. > > Sorry for being late. One simple question.. > > Will it be good to support k/uprobe arguments with perf_event_open()? > Do you have any plans about that? no plans for that. People that use text based interfaces should probably be using text interfaces consistently. imo mixing FD-based kprobe api with text is not worth the complexity.