Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1751970AbdGACTZ (ORCPT ); Fri, 30 Jun 2017 22:19:25 -0400 Received: from sub5.mail.dreamhost.com ([208.113.200.129]:42755 "EHLO homiemail-a116.g.dreamhost.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1751657AbdGACTX (ORCPT ); Fri, 30 Jun 2017 22:19:23 -0400 From: Krister Johansen To: Peter Zijlstra , Ingo Molnar , Arnaldo Carvalho de Melo Cc: Alexander Shishkin , linux-kernel@vger.kernel.org, Krister Johansen Subject: [PATCH tip/perf/core 0/7] namespace tracing improvements Date: Fri, 30 Jun 2017 19:18:52 -0700 Message-Id: <1498875539-4200-1-git-send-email-kjlx@templeofstupid.com> X-Mailer: git-send-email 2.7.4 Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Content-Length: 3021 Lines: 61 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 Krister Johansen (7): 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 documentation: updates for target-ns. perf buildid-cache: cache debuginfo tools/perf/Documentation/perf-buildid-cache.txt | 5 + tools/perf/Documentation/perf-probe.txt | 5 + tools/perf/Documentation/perf-top.txt | 4 + tools/perf/builtin-buildid-cache.c | 54 +++++-- tools/perf/builtin-probe.c | 46 +++++- tools/perf/builtin-top.c | 15 ++ tools/perf/tests/sdt.c | 4 +- tools/perf/util/annotate.c | 2 +- tools/perf/util/build-id.c | 120 +++++++++++--- tools/perf/util/build-id.h | 12 +- tools/perf/util/dso.c | 21 ++- tools/perf/util/dso.h | 3 + tools/perf/util/machine.c | 22 ++- tools/perf/util/map.c | 29 +++- tools/perf/util/map.h | 8 +- tools/perf/util/namespaces.c | 198 ++++++++++++++++++++++++ tools/perf/util/namespaces.h | 36 +++++ 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 | 93 +++++++++-- 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, 706 insertions(+), 131 deletions(-) -- 2.7.4