All of lore.kernel.org
 help / color / mirror / Atom feed
* [PATCH v8 0/6] perf: Add support for analyzing events for containers
@ 2017-03-07 20:41 Hari Bathini
  2017-03-07 20:41 ` [PATCH v8 1/6] perf: Add PERF_RECORD_NAMESPACES to include namespaces related info Hari Bathini
                   ` (5 more replies)
  0 siblings, 6 replies; 15+ messages in thread
From: Hari Bathini @ 2017-03-07 20:41 UTC (permalink / raw)
  To: ast, peterz, lkml, acme, alexander.shishkin, mingo
  Cc: daniel, rostedt, Ananth N Mavinakayanahalli, ebiederm, sargun,
	Aravinda Prasad, brendan.d.gregg, jolsa

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 is aimed at addressing this limitation by introducing a
new PERF_RECORD_NAMESPACES event that records namespaces related info.
As containers are created with namespaces, the new data can be used to
in assessment/analysis of multiple containers.

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 demonstrates analysis
of containers with this data by adding a cgroup identifier column in
perf report, which contains the cgroup namespace's device and inode
numbers. This is based on the assumption that each container is created
with it's own cgroup namespace. The third patch has scope for improvement
based on the conventions a container is attributed with, going forward.

Changes from v7:
* Folded doc related patches into corresponding code changes
* Got rid of NAMESPACES_MAX macro and using a zero array instead
* Updated changelog of few patches

Changes from v6:
* Updated changelog of patch 1
* Split patch 2 into smaller patches
* Updated record and script documenatation
* Dropped name field from ns_link_info struct

Changes from v5:
* Updated changelogs of patches 1 & 3
* Rebased the patches on perf/core in tip

---

Hari Bathini (6):
      perf: Add PERF_RECORD_NAMESPACES to include namespaces related info
      perf tools: Add PERF_RECORD_NAMESPACES to include namespaces related info
      perf record: Synthesize namespace events for current processes
      perf tools: Add print support for namespace events
      perf script: Add script print support for namespace events
      perf tools: Add cgroup identifier sort order keyword


 include/linux/perf_event.h               |    2 
 include/uapi/linux/perf_event.h          |   32 ++++++
 kernel/events/core.c                     |  139 ++++++++++++++++++++++++++++
 kernel/fork.c                            |    2 
 kernel/nsproxy.c                         |    3 +
 tools/include/uapi/linux/perf_event.h    |   32 ++++++
 tools/perf/Documentation/perf-record.txt |    3 +
 tools/perf/Documentation/perf-report.txt |    4 +
 tools/perf/Documentation/perf-script.txt |    3 +
 tools/perf/builtin-annotate.c            |    1 
 tools/perf/builtin-diff.c                |    1 
 tools/perf/builtin-inject.c              |   13 +++
 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              |   35 ++++++-
 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        |    1 
 tools/perf/util/event.c                  |  150 +++++++++++++++++++++++++++++-
 tools/perf/util/event.h                  |   19 ++++
 tools/perf/util/evsel.c                  |    3 +
 tools/perf/util/hist.c                   |    7 +
 tools/perf/util/hist.h                   |    1 
 tools/perf/util/machine.c                |   34 +++++++
 tools/perf/util/machine.h                |    3 +
 tools/perf/util/namespaces.c             |   36 +++++++
 tools/perf/util/namespaces.h             |   26 +++++
 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 
 39 files changed, 694 insertions(+), 16 deletions(-)
 create mode 100644 tools/perf/util/namespaces.c
 create mode 100644 tools/perf/util/namespaces.h

^ permalink raw reply	[flat|nested] 15+ messages in thread

end of thread, other threads:[~2017-03-15 18:43 UTC | newest]

Thread overview: 15+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2017-03-07 20:41 [PATCH v8 0/6] perf: Add support for analyzing events for containers Hari Bathini
2017-03-07 20:41 ` [PATCH v8 1/6] perf: Add PERF_RECORD_NAMESPACES to include namespaces related info Hari Bathini
2017-03-13 19:52   ` Arnaldo Carvalho de Melo
2017-03-15 18:39   ` [tip:perf/core] " tip-bot for Hari Bathini
2017-03-07 20:41 ` [PATCH v8 2/6] perf tools: " Hari Bathini
2017-03-15 18:39   ` [tip:perf/core] " tip-bot for Hari Bathini
2017-03-07 20:41 ` [PATCH v8 3/6] perf record: Synthesize namespace events for current processes Hari Bathini
2017-03-14 13:34   ` Arnaldo Carvalho de Melo
2017-03-15 18:40   ` [tip:perf/core] " tip-bot for Hari Bathini
2017-03-07 20:41 ` [PATCH v8 4/6] perf tools: Add print support for namespace events Hari Bathini
2017-03-14 14:29   ` Arnaldo Carvalho de Melo
2017-03-07 20:42 ` [PATCH v8 5/6] perf script: Add script " Hari Bathini
2017-03-15 18:40   ` [tip:perf/core] " tip-bot for Hari Bathini
2017-03-07 20:42 ` [PATCH v8 6/6] perf tools: Add cgroup identifier sort order keyword Hari Bathini
2017-03-15 18:41   ` [tip:perf/core] perf tools: Add 'cgroup_id' " tip-bot for Hari Bathini

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.