From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1753760AbdBPGYs (ORCPT ); Thu, 16 Feb 2017 01:24:48 -0500 Received: from out03.mta.xmission.com ([166.70.13.233]:58754 "EHLO out03.mta.xmission.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1753639AbdBPGYq (ORCPT ); Thu, 16 Feb 2017 01:24:46 -0500 From: ebiederm@xmission.com (Eric W. Biederman) To: Hari Bathini Cc: ast@fb.com, peterz@infradead.org, lkml , acme@kernel.org, alexander.shishkin@linux.intel.com, mingo@redhat.com, daniel@iogearbox.net, rostedt@goodmis.org, Ananth N Mavinakayanahalli , sargun@sargun.me, Aravinda Prasad , brendan.d.gregg@gmail.com, jolsa@redhat.com References: <148654265580.27983.8822211570127163843.stgit@hbathini.in.ibm.com> Date: Thu, 16 Feb 2017 19:20:11 +1300 In-Reply-To: <148654265580.27983.8822211570127163843.stgit@hbathini.in.ibm.com> (Hari Bathini's message of "Wed, 08 Feb 2017 14:01:19 +0530") Message-ID: <87zihm1wtg.fsf@xmission.com> User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/25.1 (gnu/linux) MIME-Version: 1.0 Content-Type: text/plain X-XM-SPF: eid=1ceFUh-0002YJ-Dm;;;mid=<87zihm1wtg.fsf@xmission.com>;;;hst=in02.mta.xmission.com;;;ip=101.100.131.232;;;frm=ebiederm@xmission.com;;;spf=neutral X-XM-AID: U2FsdGVkX1+BMjzMJhU9ohq3O1Xv3FgVQhOEz7v1m6E= X-SA-Exim-Connect-IP: 101.100.131.232 X-SA-Exim-Mail-From: ebiederm@xmission.com X-Spam-Report: * -1.0 ALL_TRUSTED Passed through trusted hosts only via SMTP * 0.7 XMSubLong Long Subject * 0.0 T_TM2_M_HEADER_IN_MSG BODY: No description available. * 0.8 BAYES_50 BODY: Bayes spam probability is 40 to 60% * [score: 0.5000] * -0.0 DCC_CHECK_NEGATIVE Not listed in DCC * [sa07 1397; Body=1 Fuz1=1 Fuz2=1] X-Spam-DCC: XMission; sa07 1397; Body=1 Fuz1=1 Fuz2=1 X-Spam-Combo: ;Hari Bathini X-Spam-Relay-Country: X-Spam-Timing: total 436 ms - load_scoreonly_sql: 0.04 (0.0%), signal_user_changed: 3.2 (0.7%), b_tie_ro: 2.2 (0.5%), parse: 1.05 (0.2%), extract_message_metadata: 4.6 (1.1%), get_uri_detail_list: 2.5 (0.6%), tests_pri_-1000: 3.8 (0.9%), tests_pri_-950: 1.19 (0.3%), tests_pri_-900: 0.96 (0.2%), tests_pri_-400: 27 (6.2%), check_bayes: 26 (6.0%), b_tokenize: 9 (2.0%), b_tok_get_all: 9 (2.0%), b_comp_prob: 2.1 (0.5%), b_tok_touch_all: 4.5 (1.0%), b_finish: 0.73 (0.2%), tests_pri_0: 382 (87.4%), check_dkim_signature: 0.47 (0.1%), check_dkim_adsp: 2.6 (0.6%), tests_pri_500: 4.4 (1.0%), rewrite_mail: 0.00 (0.0%) Subject: Re: [PATCH v6 0/3] perf: add support for analyzing events for containers X-Spam-Flag: No X-SA-Exim-Version: 4.2.1 (built Thu, 05 May 2016 13:38:54 -0600) X-SA-Exim-Scanned: Yes (on in02.mta.xmission.com) Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Hari Bathini writes: > 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. Ack for the namespace interface bits. Everything I asked for is in there. Eric > > Changes from v5: > * Updated changelogs of patches 1 & 3 > * Rebased the patches on perf/core in tip > > --- > > 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 | 38 +++++++++ > kernel/events/core.c | 142 +++++++++++++++++++++++++++++++++ > kernel/fork.c | 3 + > kernel/nsproxy.c | 5 + > tools/include/uapi/linux/perf_event.h | 38 +++++++++ > 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 | 143 ++++++++++++++++++++++++++++++++- > 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 | 35 ++++++++ > 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 > 36 files changed, 695 insertions(+), 15 deletions(-) > create mode 100644 tools/perf/util/namespaces.c > create mode 100644 tools/perf/util/namespaces.h > > --