Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]
Groups > linux.kernel > #1582450
| From | Peter Zijlstra <peterz@infradead.org> |
|---|---|
| Newsgroups | linux.kernel |
| Subject | Re: [PATCH v6 1/3] perf: add PERF_RECORD_NAMESPACES to include namespaces related info |
| Date | 2017-02-16 11:40 +0100 |
| Message-ID | <tbrDI-4Tz-27@gated-at.bofh.it> (permalink) |
| References | <t8vXc-6oU-27@gated-at.bofh.it> <t8vXd-6oU-49@gated-at.bofh.it> <tbru2-4Oj-9@gated-at.bofh.it> |
| Organization | linux.* mail to news gateway |
On Thu, Feb 16, 2017 at 11:28:24AM +0100, Peter Zijlstra wrote:
> On Wed, Feb 08, 2017 at 02:01:24PM +0530, Hari Bathini wrote:
> > @@ -862,6 +886,18 @@ enum perf_event_type {
> > */
> > PERF_RECORD_SWITCH_CPU_WIDE = 15,
> >
> > + /*
> > + * struct {
> > + * struct perf_event_header header;
> > + * u32 pid;
> > + * u32 tid;
> > + * u32 nr_namespaces;
> > + * struct namespace_link_info link_info[NAMESPACES_MAX];
> > + * struct sample_id sample_id;
> > + * };
> > + */
> > + PERF_RECORD_NAMESPACES = 16,
>
> This thing works by accident, there's a u32 hole in that structure.
> Also, the array isn't NAMESPACES_MAX long, its nr_namespaces, that's
> what its there for. The entries should be internally consistent.
Also, namespace_link_info isn't specified.
Easies would be to write something like:
{ char name[8];
u64 inode;
u64 dev; }[nr_namespace];
Back to linux.kernel | Previous | Next — Previous in thread | Next in thread | Find similar | Unroll thread
Re: [PATCH v6 1/3] perf: add PERF_RECORD_NAMESPACES to include namespaces related info Peter Zijlstra <peterz@infradead.org> - 2017-02-16 11:30 +0100 Re: [PATCH v6 1/3] perf: add PERF_RECORD_NAMESPACES to include namespaces related info Peter Zijlstra <peterz@infradead.org> - 2017-02-16 11:40 +0100 Re: [PATCH v6 1/3] perf: add PERF_RECORD_NAMESPACES to include namespaces related info Hari Bathini <hbathini@linux.vnet.ibm.com> - 2017-02-20 05:20 +0100
csiph-web