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


Groups > linux.kernel > #1542970

[PATCH v4 0/3] perf: add support for analyzing events for containers

From Hari Bathini <hbathini@linux.vnet.ibm.com>
Newsgroups linux.kernel
Subject [PATCH v4 0/3] perf: add support for analyzing events for containers
Date 2016-12-15 19:40 +0100
Message-ID <sOJ6F-Ms-5@gated-at.bofh.it> (permalink)
Organization linux.* mail to news gateway

Show all headers | View raw


Currently, there is no trivial mechanism to analyze events based on
containers. perf -G can be used, but it will not filter events for the
containers created after perf is invoked, making it difficult to assess/
analyze performance issues of multiple containers at once.

This patch-set overcomes this limitation by using cgroup identifier as
container unique identifier. A new PERF_RECORD_NAMESPACES event that
records namespaces related info is introduced, from which the cgroup
namespace's device & inode numbers are used as cgroup identifier. This
is based on the assumption that each container is created with it's own
cgroup namespace allowing assessment/analysis of multiple containers
using cgroup identifier.

The first patch introduces PERF_RECORD_NAMESPACES in kernel while the
second patch makes the corresponding changes in perf tool to read this
PERF_RECORD_NAMESPACES events. The third patch adds a cgroup identifier
column in perf report, which contains the cgroup namespace's device and
inode numbers.

Changes from v3:
* Saving device number for each inode.
* cgroup identifier includes device number along with inode number.

---

Hari Bathini (3):
      perf: add PERF_RECORD_NAMESPACES to include namespaces related info
      perf tool: add PERF_RECORD_NAMESPACES to include namespaces related info
      perf tool: add cgroup identifier entry in perf report


 include/linux/perf_event.h            |    2 
 include/uapi/linux/perf_event.h       |   31 +++++++
 kernel/events/core.c                  |  135 ++++++++++++++++++++++++++++++++
 kernel/fork.c                         |    3 +
 kernel/nsproxy.c                      |    5 +
 tools/include/uapi/linux/perf_event.h |   31 +++++++
 tools/perf/builtin-annotate.c         |    1 
 tools/perf/builtin-diff.c             |    1 
 tools/perf/builtin-inject.c           |   14 +++
 tools/perf/builtin-kmem.c             |    1 
 tools/perf/builtin-kvm.c              |    2 
 tools/perf/builtin-lock.c             |    1 
 tools/perf/builtin-mem.c              |    1 
 tools/perf/builtin-record.c           |   33 +++++++-
 tools/perf/builtin-report.c           |    1 
 tools/perf/builtin-sched.c            |    1 
 tools/perf/builtin-script.c           |   41 ++++++++++
 tools/perf/builtin-trace.c            |    3 -
 tools/perf/perf.h                     |    1 
 tools/perf/util/Build                 |    1 
 tools/perf/util/data-convert-bt.c     |    2 
 tools/perf/util/event.c               |  138 ++++++++++++++++++++++++++++++++-
 tools/perf/util/event.h               |   18 ++++
 tools/perf/util/evsel.c               |    3 +
 tools/perf/util/hist.c                |    7 ++
 tools/perf/util/hist.h                |    1 
 tools/perf/util/machine.c             |   25 ++++++
 tools/perf/util/machine.h             |    3 +
 tools/perf/util/namespaces.c          |   27 ++++++
 tools/perf/util/namespaces.h          |   18 ++++
 tools/perf/util/session.c             |    7 ++
 tools/perf/util/sort.c                |   41 ++++++++++
 tools/perf/util/sort.h                |    7 ++
 tools/perf/util/thread.c              |   44 ++++++++++-
 tools/perf/util/thread.h              |    6 +
 tools/perf/util/tool.h                |    2 
 36 files changed, 643 insertions(+), 15 deletions(-)
 create mode 100644 tools/perf/util/namespaces.c
 create mode 100644 tools/perf/util/namespaces.h

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


Thread

[PATCH v4 0/3] perf: add support for analyzing events for containers Hari Bathini <hbathini@linux.vnet.ibm.com> - 2016-12-15 19:40 +0100
  [PATCH v4 1/3] perf: add PERF_RECORD_NAMESPACES to include  namespaces related info Hari Bathini <hbathini@linux.vnet.ibm.com> - 2016-12-15 19:40 +0100
    Re: [PATCH v4 1/3] perf: add PERF_RECORD_NAMESPACES to include  namespaces related info Peter Zijlstra <peterz@infradead.org> - 2016-12-15 19:50 +0100
      Re: [PATCH v4 1/3] perf: add PERF_RECORD_NAMESPACES to include  namespaces related info Hari Bathini <hbathini@linux.vnet.ibm.com> - 2016-12-16 08:10 +0100
        Re: [PATCH v4 1/3] perf: add PERF_RECORD_NAMESPACES to include  namespaces related info Peter Zijlstra <peterz@infradead.org> - 2016-12-16 09:30 +0100
          Re: [PATCH v4 1/3] perf: add PERF_RECORD_NAMESPACES to include  namespaces related info Hari Bathini <hbathini@linux.vnet.ibm.com> - 2016-12-16 19:30 +0100
            Re: [PATCH v4 1/3] perf: add PERF_RECORD_NAMESPACES to include  namespaces related info Peter Zijlstra <peterz@infradead.org> - 2016-12-16 21:10 +0100
              Re: [PATCH v4 1/3] perf: add PERF_RECORD_NAMESPACES to include  namespaces related info Hari Bathini <hbathini@linux.vnet.ibm.com> - 2016-12-21 14:10 +0100
                Re: [PATCH v4 1/3] perf: add PERF_RECORD_NAMESPACES to include  namespaces related info Peter Zijlstra <peterz@infradead.org> - 2016-12-21 14:30 +0100
                Re: [PATCH v4 1/3] perf: add PERF_RECORD_NAMESPACES to include  namespaces related info Hari Bathini <hbathini@linux.vnet.ibm.com> - 2016-12-21 17:00 +0100
                Re: [PATCH v4 1/3] perf: add PERF_RECORD_NAMESPACES to include namespaces related info ebiederm@xmission.com (Eric W. Biederman) - 2016-12-22 08:30 +0100
                Re: [PATCH v4 1/3] perf: add PERF_RECORD_NAMESPACES to include  namespaces related info Peter Zijlstra <peterz@infradead.org> - 2016-12-22 09:00 +0100
                Re: [PATCH v4 1/3] perf: add PERF_RECORD_NAMESPACES to include namespaces related info ebiederm@xmission.com (Eric W. Biederman) - 2016-12-22 11:30 +0100
                Re: [PATCH v4 1/3] perf: add PERF_RECORD_NAMESPACES to include  namespaces related info Peter Zijlstra <peterz@infradead.org> - 2016-12-22 14:30 +0100
                Re: [PATCH v4 1/3] perf: add PERF_RECORD_NAMESPACES to include namespaces related info ebiederm@xmission.com (Eric W. Biederman) - 2016-12-22 19:30 +0100
  [PATCH v4 2/3] perf tool: add PERF_RECORD_NAMESPACES to include  namespaces related info Hari Bathini <hbathini@linux.vnet.ibm.com> - 2016-12-15 19:40 +0100
    Re: [PATCH v4 2/3] perf tool: add PERF_RECORD_NAMESPACES to include  namespaces related info Jiri Olsa <jolsa@redhat.com> - 2016-12-17 18:50 +0100
      Re: [PATCH v4 2/3] perf tool: add PERF_RECORD_NAMESPACES to include  namespaces related info Hari Bathini <hbathini@linux.vnet.ibm.com> - 2016-12-21 14:20 +0100
  Re: [PATCH v4 0/3] perf: add support for analyzing events for  containers Krister Johansen <kjlx@templeofstupid.com> - 2016-12-29 02:50 +0100
    Re: [PATCH v4 0/3] perf: add support for analyzing events for  containers Hari Bathini <hbathini@linux.vnet.ibm.com> - 2017-01-03 12:30 +0100

csiph-web