From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1754700AbbCBMu5 (ORCPT ); Mon, 2 Mar 2015 07:50:57 -0500 Received: from mail9.hitachi.co.jp ([133.145.228.44]:44458 "EHLO mail9.hitachi.co.jp" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1753749AbbCBMuv (ORCPT ); Mon, 2 Mar 2015 07:50:51 -0500 Subject: [PATCH perf/core 0/4] perf-probe: improve glibc support From: Masami Hiramatsu To: Arnaldo Carvalho de Melo Cc: Naohiro Aota , Peter Zijlstra , Linux Kernel Mailing List , David Ahern , namhyung@kernel.org, Jiri Olsa , Ingo Molnar Date: Mon, 02 Mar 2015 21:49:39 +0900 Message-ID: <20150302124939.9191.33564.stgit@localhost.localdomain> User-Agent: StGit/0.17.1-dirty MIME-Version: 1.0 Content-Type: text/plain; charset="utf-8" Content-Transfer-Encoding: 7bit Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Hi, Here is a series of patches which improves perf-probe to handle glibc's aliased symbols more correctly. Longly, a major known issue of probing on glibc is that the some aliased symbols(e.g. malloc) can not find by perf-probe. Actually, glibc's malloc symbol is just an alias of __libc_malloc. Its debuginfo knows only __libc_malloc, and perf's symbol map knows only malloc. This difference always confuses users that they can see malloc by perf report or annotate, but they can not probe on it, nor find definitions by --line option. Previously, I've made a commit 906451b98b67 which solved this problem partly, but not completely fixed. So I decided to solve this issue completely by finding the symbols like malloc from perf's symbol map, and converting the symbol's address into debuginfo's location infomation. With this series, you can use --vars, --line and --add with the aliased symbols on glibc. Note that the 1/4 patch is just a resend patch which I sent last weekend (since this series depends on that) http://www.gossamer-threads.com/lists/linux/kernel/2115623 2/4 and 3/4 introduces above logic to solve this issue. And 4/4 reverts previous incomplete fix. Thank you, --- Masami Hiramatsu (4): [RESEND][BUGFIX] perf-probe: Remove bias offset to find probe point by address perf-probe: Fix to handle aliased symbols in glibc perf-probe: Fix --line to handle aliased symbols in glibc Revert "perf probe: Fix to fall back to find probe point in symbols" tools/perf/util/probe-event.c | 181 +++++++++++++++++++++++++++++++++++----- tools/perf/util/probe-finder.c | 5 - 2 files changed, 160 insertions(+), 26 deletions(-) -- Masami HIRAMATSU Software Platform Research Dpt. Linux Technology Center Hitachi, Ltd., Yokohama Research Laboratory E-mail: masami.hiramatsu.pt@hitachi.com