linux-kernel.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [PATCH 0/3] perf: add support for analyzing events for containers
@ 2016-11-10 11:37 Hari Bathini
  2016-11-10 11:38 ` [PATCH 1/3] perf: add PERF_RECORD_NAMESPACES to include namespaces related info Hari Bathini
                   ` (3 more replies)
  0 siblings, 4 replies; 13+ messages in thread
From: Hari Bathini @ 2016-11-10 11:37 UTC (permalink / raw)
  To: ast, peterz, lkml, acme, alexander.shishkin, mingo
  Cc: daniel, rostedt, Ananth N Mavinakayanahalli, ebiederm, sargun,
	Aravinda Prasad, brendan.d.gregg

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 inode number is 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 is nothing but the cgroup namespace's                      
inode number. This approach is based on the suggestion from Peter                       
Zijlstra here: https://patchwork.kernel.org/patch/9305655/

---

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


 fs/mount.h                            |   17 ----
 include/linux/mnt_namespace.h         |   18 ++++
 include/linux/perf_event.h            |    1 
 include/uapi/linux/perf_event.h       |   21 +++++
 kernel/events/core.c                  |  136 +++++++++++++++++++++++++++++++++
 kernel/fork.c                         |    4 +
 kernel/nsproxy.c                      |    5 +
 tools/include/uapi/linux/perf_event.h |   21 +++++
 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           |   28 ++++++-
 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/util/Build                 |    1 
 tools/perf/util/data-convert-bt.c     |    2 
 tools/perf/util/event.c               |  123 ++++++++++++++++++++++++++++--
 tools/perf/util/event.h               |   25 ++++++
 tools/perf/util/evsel.c               |    1 
 tools/perf/util/hist.c                |    4 +
 tools/perf/util/hist.h                |    1 
 tools/perf/util/machine.c             |   24 ++++++
 tools/perf/util/machine.h             |    3 +
 tools/perf/util/namespaces.c          |   33 ++++++++
 tools/perf/util/namespaces.h          |   24 ++++++
 tools/perf/util/session.c             |    7 ++
 tools/perf/util/sort.c                |   22 +++++
 tools/perf/util/sort.h                |    2 
 tools/perf/util/thread.c              |   44 ++++++++++-
 tools/perf/util/thread.h              |    7 ++
 tools/perf/util/tool.h                |    1 
 37 files changed, 610 insertions(+), 32 deletions(-)
 create mode 100644 tools/perf/util/namespaces.c
 create mode 100644 tools/perf/util/namespaces.h

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

end of thread, other threads:[~2016-11-16 17:30 UTC | newest]

Thread overview: 13+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2016-11-10 11:37 [PATCH 0/3] perf: add support for analyzing events for containers Hari Bathini
2016-11-10 11:38 ` [PATCH 1/3] perf: add PERF_RECORD_NAMESPACES to include namespaces related info Hari Bathini
2016-11-10 13:09   ` kbuild test robot
2016-11-10 13:19   ` Peter Zijlstra
2016-11-14 10:32     ` Hari Bathini
2016-11-14 10:46       ` Peter Zijlstra
2016-11-14 20:57         ` Eric W. Biederman
2016-11-15 12:05           ` Hari Bathini
2016-11-10 11:38 ` [PATCH 2/3] perf tool: " Hari Bathini
2016-11-10 11:39 ` [PATCH 3/3] perf tool: add cgroup identifier entry in perf report Hari Bathini
2016-11-10 19:48 ` [PATCH 0/3] perf: add support for analyzing events for containers Eric W. Biederman
2016-11-15 12:21   ` Hari Bathini
2016-11-16 17:27     ` Eric W. Biederman

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).