All of lore.kernel.org
 help / color / mirror / Atom feed
From: ebiederm@xmission.com (Eric W. Biederman)
To: Hari Bathini <hbathini@linux.vnet.ibm.com>
Cc: ast@fb.com, peterz@infradead.org,
	lkml <linux-kernel@vger.kernel.org>,
	acme@kernel.org, alexander.shishkin@linux.intel.com,
	mingo@redhat.com, daniel@iogearbox.net, rostedt@goodmis.org,
	Ananth N Mavinakayanahalli <ananth@linux.vnet.ibm.com>,
	sargun@sargun.me, Aravinda Prasad <aravinda@linux.vnet.ibm.com>,
	brendan.d.gregg@gmail.com
Subject: Re: [PATCH v3 2/3] perf tool: add PERF_RECORD_NAMESPACES to include namespaces related info
Date: Tue, 13 Dec 2016 10:51:56 +1300	[thread overview]
Message-ID: <87zik095oj.fsf@xmission.com> (raw)
In-Reply-To: <148156678709.4651.2627099783639142957.stgit@hbathini.in.ibm.com> (Hari Bathini's message of "Mon, 12 Dec 2016 23:49:55 +0530")

Hari Bathini <hbathini@linux.vnet.ibm.com> writes:

> This patch updates perf tool to examine PERF_RECORD_NAMESPACES events
> emitted by the kernel when fork, clone, setns or unshare are invoked.
> Also, it synthesizes PERF_RECORD_NAMESPACES events for processes that
> were running prior to invocation of perf record, the data for which
> is taken from /proc/$PID/ns. These changes make way for analyzing
> events with regard to namespaces.

> diff --git a/tools/perf/util/event.h b/tools/perf/util/event.h
> index 8d363d5..a73bc8e 100644
> --- a/tools/perf/util/event.h
> +++ b/tools/perf/util/event.h
> @@ -39,6 +39,13 @@ struct comm_event {
>  	char comm[16];
>  };
>  
> +struct namespaces_event {
> +	struct perf_event_header header;
> +	u32 pid, tid;
> +	u64 dev_num;
> +	u64 inode_num[NAMESPACES_MAX];
> +};

This suffers from the same issue I pointed out with the
kernel interface.  We need one device number per inode.
Today we only have one device number but that may change in
the future.  These are st_dev and st_inode from stat, and
you need both of them per namespace to be unique.

I do not want to get into a situation where I have to implement a
namespace of namespaces in the future.

Eric

  reply	other threads:[~2016-12-12 21:55 UTC|newest]

Thread overview: 14+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2016-12-12 18:19 [PATCH v3 0/3] perf: add support for analyzing events for containers Hari Bathini
2016-12-12 18:19 ` [PATCH v3 1/3] perf: add PERF_RECORD_NAMESPACES to include namespaces related info Hari Bathini
2016-12-12 18:27   ` Eric W. Biederman
2016-12-13 18:47     ` Hari Bathini
2016-12-13 19:58       ` Eric W. Biederman
2016-12-12 18:19 ` [PATCH v3 2/3] perf tool: " Hari Bathini
2016-12-12 21:51   ` Eric W. Biederman [this message]
2016-12-12 18:20 ` [PATCH v3 3/3] perf tool: add cgroup identifier entry in perf report Hari Bathini
2016-12-12 22:06   ` Eric W. Biederman
2016-12-13 19:07     ` Hari Bathini
2016-12-13 19:56       ` Eric W. Biederman
2016-12-14  8:24         ` Peter Zijlstra
2016-12-14 15:52           ` Eric W. Biederman
2016-12-14 17:03             ` Hari Bathini

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=87zik095oj.fsf@xmission.com \
    --to=ebiederm@xmission.com \
    --cc=acme@kernel.org \
    --cc=alexander.shishkin@linux.intel.com \
    --cc=ananth@linux.vnet.ibm.com \
    --cc=aravinda@linux.vnet.ibm.com \
    --cc=ast@fb.com \
    --cc=brendan.d.gregg@gmail.com \
    --cc=daniel@iogearbox.net \
    --cc=hbathini@linux.vnet.ibm.com \
    --cc=linux-kernel@vger.kernel.org \
    --cc=mingo@redhat.com \
    --cc=peterz@infradead.org \
    --cc=rostedt@goodmis.org \
    --cc=sargun@sargun.me \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
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.