From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 1255 invoked by alias); 20 Dec 2013 10:08:41 -0000 Mailing-List: contact systemtap-help@sourceware.org; run by ezmlm Precedence: bulk List-Id: List-Subscribe: List-Post: List-Help: , Sender: systemtap-owner@sourceware.org Received: (qmail 1243 invoked by uid 89); 20 Dec 2013 10:08:40 -0000 Authentication-Results: sourceware.org; auth=none X-Virus-Found: No X-Spam-SWARE-Status: No, score=-1.8 required=5.0 tests=AWL,BAYES_00,RCVD_IN_DNSWL_LOW,SPF_PASS autolearn=ham version=3.3.2 X-HELO: mail9.hitachi.co.jp Received: from mail9.hitachi.co.jp (HELO mail9.hitachi.co.jp) (133.145.228.44) by sourceware.org (qpsmtpd/0.93/v0.84-503-g423c35a) with ESMTP; Fri, 20 Dec 2013 10:08:38 +0000 Received: from mlsv6.hitachi.co.jp (unknown [133.144.234.166]) by mail9.hitachi.co.jp (Postfix) with ESMTP id DDFB037C8D; Fri, 20 Dec 2013 19:08:36 +0900 (JST) Received: from mfilter05.hitachi.co.jp by mlsv6.hitachi.co.jp (8.13.1/8.13.1) id rBKA8aLl000390; Fri, 20 Dec 2013 19:08:36 +0900 Received: from vshuts02.hitachi.co.jp (vshuts02.hitachi.co.jp [10.201.6.84]) by mfilter05.hitachi.co.jp (Switch-3.3.4/Switch-3.3.4) with ESMTP id rBKA8ZLt016076; Fri, 20 Dec 2013 19:08:36 +0900 Received: from gmml27.itg.hitachi.co.jp (unknown [158.213.165.130]) by vshuts02.hitachi.co.jp (Postfix) with ESMTP id 7A745490041; Fri, 20 Dec 2013 19:08:35 +0900 (JST) Received: from kbuild-fedora.novalocal by gmml27.itg.hitachi.co.jp (AIX5.2/8.11.6p2/8.11.0) id rBKA8ZK2686988; Fri, 20 Dec 2013 19:08:35 +0900 Subject: [PATCH -tip 0/3] perf-probe: Dwarf support for uprobes To: Ingo Molnar , Arnaldo Carvalho de Melo From: Masami Hiramatsu Cc: Srikar Dronamraju , David Ahern , lkml , "Steven Rostedt (Red Hat)" , Oleg Nesterov , "David A. Long" , systemtap@sourceware.org, yrl.pp-manager.tt@hitachi.com, Namhyung Kim Date: Fri, 20 Dec 2013 10:08:00 -0000 Message-ID: <20131220100255.7169.19384.stgit@kbuild-fedora.novalocal> User-Agent: StGit/0.16 MIME-Version: 1.0 Content-Type: text/plain; charset="utf-8" Content-Transfer-Encoding: 7bit X-IsSubscribed: yes X-SW-Source: 2013-q4/txt/msg00462.txt.bz2 Hi, Here is the series of perf-probe patches which adds dwarf(debuginfo) support for uprobes. Currently perf-probe doesn't support debuginfo for uprobes. The lack of the debuginfo support for uprobes sometimes confuses users (or makes them cry) because they can't use perf-probe as for kprobes case, and that is not what I hope. So I tried to add debuginfo support for uprobes on perf-probe. Actually, this is not completely done yet. We still need to add some features for make it perfect. However, this series can provide minimum debuginfo support for uprobes. For example) - Shows the probe-able lines of the given function ---- # ./perf probe -x perf --line map__load 0 int map__load(struct map *map, symbol_filter_t filter) 1 { 2 const char *name = map->dso->long_name; int nr; 5 if (dso__loaded(map->dso, map->type)) 6 return 0; 8 nr = dso__load(map->dso, map, filter); 9 if (nr < 0) { 10 if (map->dso->has_build_id) { ---- - Shows the available variables of the given line ---- # ./perf probe -x perf --vars map__load:8 Available variables at map__load:8 @ char* name struct map* map symbol_filter_t filter @ char* name symbol_filter_t filter @ char* name symbol_filter_t filter @ char* name struct map* map symbol_filter_t filter ---- - Set a probe with available vars on the given line ---- # ./perf probe -x perf --add 'map__load:8 $vars' Added new events: probe_perf:map__load (on map__load:8 with $vars) probe_perf:map__load_1 (on map__load:8 with $vars) probe_perf:map__load_2 (on map__load:8 with $vars) probe_perf:map__load_3 (on map__load:8 with $vars) You can now use it in all perf tools, such as: perf record -e probe_perf:map__load_3 -aR sleep 1 ---- To complete this requires Namhyung's uprobe fetch-method updates which is almost done on LKML. TODO: - Convert data symbol name in arguments to address offset value. - Support distro style debuginfo path (/usr/lib/debug/...) --- Masami Hiramatsu (3): [CLEANUP] perf-probe: Expand given path to absolute path perf-probe: Support dwarf on uprobe events perf-probe: Use the actual address as a hint for uprobes tools/perf/builtin-probe.c | 11 ++ tools/perf/util/probe-event.c | 247 +++++++++++++++++++++++++++------------- tools/perf/util/probe-event.h | 1 tools/perf/util/probe-finder.c | 1 4 files changed, 176 insertions(+), 84 deletions(-) -- Masami HIRAMATSU IT Management Research Dept. Linux Technology Center Hitachi, Ltd., Yokohama Research Laboratory E-mail: masami.hiramatsu.pt@hitachi.com