Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1753179AbbDALLm (ORCPT ); Wed, 1 Apr 2015 07:11:42 -0400 Received: from mx1.redhat.com ([209.132.183.28]:40974 "EHLO mx1.redhat.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1752973AbbDALLh (ORCPT ); Wed, 1 Apr 2015 07:11:37 -0400 Date: Wed, 1 Apr 2015 13:11:04 +0200 From: Jiri Olsa To: Masami Hiramatsu Cc: Arnaldo Carvalho de Melo , Peter Zijlstra , Linux Kernel Mailing List , David Ahern , namhyung@kernel.org, Ingo Molnar Subject: Re: [PATCH perf/core 2/2] perf-probe: Check the orphaned -x option Message-ID: <20150401111104.GA1326@krava> References: <20150331133348.GF9438@kernel.org> <20150401102541.17137.75477.stgit@localhost.localdomain> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20150401102541.17137.75477.stgit@localhost.localdomain> User-Agent: Mutt/1.5.23 (2014-03-12) Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Content-Length: 1103 Lines: 37 On Wed, Apr 01, 2015 at 07:25:42PM +0900, Masami Hiramatsu wrote: > To avoid probing in unintended binary, the orphaned -x option > must be checked and warned. > > Without this patch, following command sets up the probe in > the kernel. > ----- > # perf probe -a strcpy -x ./perf > Added new event: > probe:strcpy (on strcpy) > > You can now use it in all perf tools, such as: > > perf record -e probe:strcpy -aR sleep 1 > ----- > > But in this case, it seems that the user may want to probe > in the perf binary. With this patch, perf-probe correctly > handles the orphaned -x. > ----- > # perf probe -a strcpy -x ./perf > Error: -x/-m must follow the probe definitions. > ... > ----- > > Reported-by: Jiri Olsa works nicely, thanks a lot! Tested-by: Jiri Olsa jirka -- To unsubscribe from this list: send the line "unsubscribe linux-kernel" in the body of a message to majordomo@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html Please read the FAQ at http://www.tux.org/lkml/