Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]


Groups > linux.kernel > #1682000

[PATCH v2 tip/perf/core 0/6] namespace tracing improvements

From Krister Johansen <kjlx@templeofstupid.com>
Newsgroups linux.kernel
Subject [PATCH v2 tip/perf/core 0/6] namespace tracing improvements
Date 2017-07-06 03:50 +0200
Message-ID <u045z-5Wp-5@gated-at.bofh.it> (permalink)
References <tZZpf-2RM-9@gated-at.bofh.it>
Organization linux.* mail to news gateway

Show all headers | View raw


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-<pid>.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

Back to linux.kernel | Previous | NextPrevious in thread | Next in thread | Find similar | Unroll thread


Thread

Re: [PATCH tip/perf/core 6/7] perf documentation: updates for  target-ns. Arnaldo Carvalho de Melo <acme@kernel.org> - 2017-07-03 20:50 +0200
  Re: [PATCH tip/perf/core 6/7] perf documentation: updates for  target-ns. Krister Johansen <kjlx@templeofstupid.com> - 2017-07-05 22:50 +0200
    [PATCH v2 tip/perf/core 3/6] perf probe: allow placing uprobes in alternate namespaces. Krister Johansen <kjlx@templeofstupid.com> - 2017-07-06 03:50 +0200
      [PATCH] perf probe: Fix build failure for get_target_map() Ravi Bangoria <ravi.bangoria@linux.vnet.ibm.com> - 2017-07-17 12:40 +0200
        Re: [PATCH] perf probe: Fix build failure for get_target_map() Arnaldo Carvalho de Melo <acme@kernel.org> - 2017-07-17 15:20 +0200
          Re: [PATCH] perf probe: Fix build failure for get_target_map() Michael Ellerman <mpe@ellerman.id.au> - 2017-07-18 11:20 +0200
    [PATCH v2 tip/perf/core 6/6] perf buildid-cache: cache debuginfo Krister Johansen <kjlx@templeofstupid.com> - 2017-07-06 03:50 +0200
    [PATCH v2 tip/perf/core 5/6] perf top: support lookup of symbols in other mount namespaces. Krister Johansen <kjlx@templeofstupid.com> - 2017-07-06 03:50 +0200
    [PATCH v2 tip/perf/core 4/6] perf buildid-cache: support binary objects from other namespaces Krister Johansen <kjlx@templeofstupid.com> - 2017-07-06 03:50 +0200
    [PATCH v2 tip/perf/core 0/6] namespace tracing improvements Krister Johansen <kjlx@templeofstupid.com> - 2017-07-06 03:50 +0200
      [PATCH v2 tip/perf/core 2/6] perf maps: lookup maps in both intitial mountns and inner mountns. Krister Johansen <kjlx@templeofstupid.com> - 2017-07-06 03:50 +0200
      [PATCH v2 tip/perf/core 1/6] perf symbols: find symbols in different mount namespace Krister Johansen <kjlx@templeofstupid.com> - 2017-07-06 03:50 +0200
        Re: [PATCH v2 tip/perf/core 1/6] perf symbols: find symbols in  different mount namespace Arnaldo Carvalho de Melo <acme@kernel.org> - 2017-07-06 21:50 +0200
          Re: [PATCH v2 tip/perf/core 1/6] perf symbols: find symbols in  different mount namespace Krister Johansen <kjlx@templeofstupid.com> - 2017-07-07 21:40 +0200
            Re: [PATCH v2 tip/perf/core 1/6] perf symbols: find symbols in  different mount namespace Thomas-Mich Richter <tmricht@linux.vnet.ibm.com> - 2017-07-10 08:20 +0200
              Re: [PATCH v2 tip/perf/core 1/6] perf symbols: find symbols in  different mount namespace Krister Johansen <kjlx@templeofstupid.com> - 2017-07-11 00:50 +0200
                Re: [PATCH v2 tip/perf/core 1/6] perf symbols: find symbols in  different mount namespace Arnaldo Carvalho de Melo <acme@kernel.org> - 2017-07-11 01:00 +0200
                Re: [PATCH v2 tip/perf/core 1/6] perf symbols: find symbols in  different mount namespace Krister Johansen <kjlx@templeofstupid.com> - 2017-07-11 01:40 +0200
                Re: [PATCH v2 tip/perf/core 1/6] perf symbols: find symbols in  different mount namespace Arnaldo Carvalho de Melo <acme@kernel.org> - 2017-07-11 15:00 +0200
                Re: [PATCH v2 tip/perf/core 1/6] perf symbols: find symbols in  different mount namespace Krister Johansen <kjlx@templeofstupid.com> - 2017-07-11 19:20 +0200

csiph-web