From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1753986AbbC3Rrg (ORCPT ); Mon, 30 Mar 2015 13:47:36 -0400 Received: from mx1.redhat.com ([209.132.183.28]:59614 "EHLO mx1.redhat.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1753223AbbC3Rrd (ORCPT ); Mon, 30 Mar 2015 13:47:33 -0400 Date: Mon, 30 Mar 2015 19:46:55 +0200 From: Jiri Olsa To: Masami Hiramatsu Cc: Ingo Molnar , Namhyung Kim , Arnaldo Carvalho de Melo , Peter Zijlstra , David Ahern , linux-kernel@vger.kernel.org, Martin Cermak Subject: [RFC] perf probe: -x option position issue Message-ID: <20150330174655.GA27546@krava.redhat.com> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline 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 hi, Martin found out following issue.. having following ex binary: --- int main(void) { return 0; } --- following will create uprobe on main: [root@dell-per510-01 perf]# gcc -g -o ex ex.c [root@dell-per510-01 perf]# ./perf probe -x ./ex -a main Added new event: probe_ex:main (on main in /root/linux/tools/perf/ex) You can now use it in all perf tools, such as: perf record -e probe_ex:main -aR sleep 1 [root@dell-per510-01 perf]# cat /sys/kernel/debug/tracing/uprobe_events p:probe_ex/main /root/linux/tools/perf/ex:0x00000000000004f6 while following will create (?) kprobe with complain in dmesg: [root@dell-per510-01 perf]# gcc -g -o ex ex.c [root@dell-per510-01 perf]# ./perf probe -a main -x ./ex Added new event: probe:main (on main in ex) You can now use it in all perf tools, such as: perf record -e probe:main -aR sleep 1 [root@dell-per510-01 perf]# dmesg | tail -2 [16986.182159] Could not insert probe at ex:main+0: -2 [16986.187030] This probe might be able to register aftertarget module is loaded. Continue. that does not seem as an expected behaviour, or am I missing something? thanks, jirka