Re: [PATCH v7 8/8] perf tool: add cgroup identifier entry in perf report

From: Hari Bathini
Date: Fri Mar 03 2017 - 06:25:24 EST




On Thursday 02 March 2017 02:46 AM, Arnaldo Carvalho de Melo wrote:
Em Tue, Feb 21, 2017 at 07:33:13PM +0530, Hari Bathini escreveu:
This patch introduces a cgroup identifier entry field in perf report to
identify or distinguish data of different cgroups. It uses the device
number and inode number of cgroup namespace, included in perf data with
the new PERF_RECORD_NAMESPACES event, as cgroup identifier. With the
assumption that each container is created with it's own cgroup namespace,
this allows assessment/analysis of multiple containers at once.
Could you try to do this with some real world example? I.e. telling that
systemd creates some cgroups and then how to map the perf report output
you show below with what systemd puts in place.

Doing it with docker would be handy as well, no?

Cgroup namespace is a relatively new thing in the kernel (v4.9).
So, I am not sure if there is a real world example for this yet.
A simple test in the meanwhile would be to clone() multiple
processes by passing CLONE_NEWCROUP & SIGCHLD flags to each
process, executing a shell and running different workloads
on each of them while tracing.

You also forgot to update the documentation with this new sort key,
please add it in the --sort part of
tools/perf/Documentation/perf-report.txt.

Sure. Will update.

Ah, and just another minor request: please format the changeset
summaries as:

perf tools: Add cgroup identifier sort order keyword


First the component, that in this case is the generic one, as it affects
multiple tools (top, report), and then start with a capital letter after
the colon.


Sorry. I will take of this in next spin.

Thanks
Hari