Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S966802AbcKXXS4 (ORCPT ); Thu, 24 Nov 2016 18:18:56 -0500 Received: from mail-wj0-f193.google.com ([209.85.210.193]:33662 "EHLO mail-wj0-f193.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S966736AbcKXXSg (ORCPT ); Thu, 24 Nov 2016 18:18:36 -0500 From: Alexis Berlemont To: linux-kernel@vger.kernel.org Cc: Alexis Berlemont , peterz@infradead.org, mingo@redhat.com, acme@kernel.org, alexander.shishkin@linux.intel.com, hemant@linux.vnet.ibm.com Subject: [PATCH v3 0/2] perf probe: add sdt probes arguments into the uprobe cmd string Date: Fri, 25 Nov 2016 00:13:38 +0100 Message-Id: <20161124231340.22893-1-alexis.berlemont@gmail.com> X-Mailer: git-send-email 2.10.2 In-Reply-To: <81ed2f2c-9569-c5bb-246d-1a4da7ec4607@linux.vnet.ibm.com> References: <81ed2f2c-9569-c5bb-246d-1a4da7ec4607@linux.vnet.ibm.com> Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Content-Length: 2423 Lines: 53 Hi Hemant, Once more thank you for your answer. Sorry for this bug: I tested the patches only on small sample binaries. Now it is tested against the systemtap-enabled libraries libc and libpthread. There were 2 problems: * The one you disclosed: in indirect addressing mode, positive offsets not prefixed with a '+' character; * Another one still in indirect addressing mode: offsets which were not constants but symbols; The following patches solves them both. # cat /sys/kernel/tracing/uprobe_events p:sdt_libpthread/pthread_start /lib/libpthread-2.23.so:0x0000000000007448 arg0=%ax:u64 arg1=+1600(%ax):u64 arg2=+1608(%ax):u64 p:sdt_libpthread/pthread_create /lib/libpthread-2.23.so:0x0000000000007be9 arg0=%ax:u64 arg1=-184(%bp):u64 arg2=-160(%bp):u64 arg3=-168(%bp):u64 p:sdt_libpthread/pthread_join /lib/libpthread-2.23.so:0x000000000000864d arg0=%di:u64 p:sdt_libpthread/pthread_join_ret /lib/libpthread-2.23.so:0x00000000000086fe arg0=%bx:u64 arg1=%ax:s32 arg2=+1584(%bx):u64 p:sdt_libpthread/mutex_init /lib/libpthread-2.23.so:0x000000000000938b arg0=%di:u64 p:sdt_libpthread/mutex_destroy /lib/libpthread-2.23.so:0x0000000000009410 arg0=%di:u64 p:sdt_libpthread/mutex_acquired /lib/libpthread-2.23.so:0x0000000000009685 arg0=%bx:u64 p:sdt_libpthread/mutex_acquired_1 /lib/libpthread-2.23.so:0x0000000000009b31 arg0=%r8:u64 ... # cat /sys/kernel/tracing/uprobe_events p:sdt_libc/setjmp /lib/libc-2.23.so:0x0000000000033181 arg0=%di:u64 arg1=%si:s32 arg2=%ax:u64 p:sdt_libc/longjmp /lib/libc-2.23.so:0x0000000000033263 arg0=%di:u64 arg1=%si:s32 arg2=%dx:u64 p:sdt_libc/longjmp_1 /lib/libc-2.23.so:0x00000000000f7fc3 arg0=%di:u64 arg1=%si:s32 arg2=%dx:u64 p:sdt_libc/longjmp_target /lib/libc-2.23.so:0x000000000003327f arg0=%di:u64 arg1=%ax:s32 arg2=%dx:u64 p:sdt_libc/longjmp_target_1 /lib/libc-2.23.so:0x00000000000f7fdf arg0=%di:u64 arg1=%ax:s32 arg2=%dx:u64 ... Thanks, Alexis. Alexis Berlemont (2): perf sdt: add scanning of sdt probles arguments perf probe: add sdt probes arguments into the uprobe cmd string tools/perf/arch/x86/util/perf_regs.c | 18 ++++ tools/perf/util/perf_regs.c | 4 + tools/perf/util/perf_regs.h | 13 +++ tools/perf/util/probe-file.c | 169 ++++++++++++++++++++++++++++++++++- tools/perf/util/symbol-elf.c | 16 +++- tools/perf/util/symbol.h | 1 + 6 files changed, 216 insertions(+), 5 deletions(-) -- 2.10.2