Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1752674AbdGFBsT (ORCPT ); Wed, 5 Jul 2017 21:48:19 -0400 Received: from sub5.mail.dreamhost.com ([208.113.200.129]:58625 "EHLO homiemail-a83.g.dreamhost.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1752086AbdGFBsR (ORCPT ); Wed, 5 Jul 2017 21:48:17 -0400 From: Krister Johansen To: Arnaldo Carvalho de Melo , Brendan Gregg Cc: Peter Zijlstra , Ingo Molnar , Alexander Shishkin , linux-kernel@vger.kernel.org, Thomas-Mich Richter , Krister Johansen Subject: [PATCH v2 tip/perf/core 0/6] namespace tracing improvements Date: Wed, 5 Jul 2017 18:48:07 -0700 Message-Id: <1499305693-1599-1-git-send-email-kjlx@templeofstupid.com> X-Mailer: git-send-email 2.7.4 In-Reply-To: <20170705204511.GD29683@templeofstupid.com> References: <20170705204511.GD29683@templeofstupid.com> Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Content-Length: 3343 Lines: 71 This patch set is similar to a set of features I implemented for bcc back in April. At a high-level it does the following: - Allow the tracing tools to resolve symbols if the traced process has a binary that is in a different mount namespace from perf. - Allow the perf-.map files to live either in /tmp in the target process' mount namespace, or the tracing process's /tmp in its own mount namespace. - Adds the ability to set and record against uprobes and USDT probes when the target process resides in a different mount namespace. With these changes I can get pretty good insight into what containerized processes on my systems are doing. In addition to the above, I also modified the builid cache code to cache relevant bits from the target namespaces so that it's possible to preserve more information should a container exit and take the mounted volumes along with it. -K Changes v1 -> v2: - stylistic cleanups in namespace.c (Arnaldo) - zfree instead of free in nsinfo__delete (Arnaldo) - un-reflow map__new and dso__load (Arnaldo) - introduce nsinfo__realpath (Arnaldo) - move documentation into the patch that introduced the change. (Arnaldo) - update help descriptions (Brendan) - add perf-probe examples for uprobes and USDT (Brendan) Krister Johansen (6): perf symbols: find symbols in different mount namespace perf maps: lookup maps in both intitial mountns and inner mountns. perf probe: allow placing uprobes in alternate namespaces. perf buildid-cache: support binary objects from other namespaces perf top: support lookup of symbols in other mount namespaces. perf buildid-cache: cache debuginfo tools/perf/Documentation/perf-buildid-cache.txt | 5 + tools/perf/Documentation/perf-probe.txt | 14 ++ tools/perf/Documentation/perf-top.txt | 4 + tools/perf/builtin-buildid-cache.c | 54 ++++-- tools/perf/builtin-probe.c | 45 ++++- tools/perf/builtin-top.c | 15 ++ tools/perf/tests/sdt.c | 4 +- tools/perf/util/annotate.c | 2 +- tools/perf/util/build-id.c | 119 ++++++++++--- tools/perf/util/build-id.h | 12 +- tools/perf/util/dso.c | 21 ++- tools/perf/util/dso.h | 3 + tools/perf/util/machine.c | 7 +- tools/perf/util/map.c | 23 ++- tools/perf/util/map.h | 2 +- tools/perf/util/namespaces.c | 211 ++++++++++++++++++++++++ tools/perf/util/namespaces.h | 38 +++++ tools/perf/util/parse-events.c | 2 +- tools/perf/util/probe-event.c | 85 ++++++---- tools/perf/util/probe-event.h | 10 +- tools/perf/util/probe-file.c | 19 ++- tools/perf/util/probe-file.h | 4 +- tools/perf/util/symbol.c | 92 +++++++++-- tools/perf/util/thread.c | 3 + tools/perf/util/thread.h | 1 + tools/perf/util/util.c | 34 +++- tools/perf/util/util.h | 2 + 27 files changed, 713 insertions(+), 118 deletions(-) -- 2.7.4