[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <87ppd35vbk.fsf@sejong.aot.lge.com>
Date: Tue, 04 Nov 2014 15:33:19 +0900
From: Namhyung Kim <namhyung@...nel.org>
To: Pawel Moll <pawel.moll@....com>
Cc: Richard Cochran <richardcochran@...il.com>,
Steven Rostedt <rostedt@...dmis.org>,
Ingo Molnar <mingo@...hat.com>,
Peter Zijlstra <peterz@...radead.org>,
Paul Mackerras <paulus@...ba.org>,
Arnaldo Carvalho de Melo <acme@...nel.org>,
John Stultz <john.stultz@...aro.org>,
Masami Hiramatsu <masami.hiramatsu.pt@...achi.com>,
Christopher Covington <cov@...eaurora.org>,
David Ahern <dsahern@...il.com>,
Thomas Gleixner <tglx@...utronix.de>,
Tomeu Vizoso <tomeu@...euvizoso.net>,
linux-kernel@...r.kernel.org, linux-api@...r.kernel.org,
Pawel Moll <mail@...elmoll.com>
Subject: Re: [PATCH v3 2/3] perf: Userspace event
Hi Pawel,
On Tue, 4 Nov 2014 00:28:37 +0000, Pawel Moll wrote:
> + /*
> + * Data in userspace event record is transparent for the kernel
> + *
> + * Userspace perf tool code maintains a list of known types with
> + * reference implementations of parsers for the data field.
> + *
> + * Overall size of the record (including type and size fields)
> + * is always aligned to 8 bytes by adding padding after the data.
> + *
> + * struct {
> + * struct perf_event_header header;
> + * u32 type;
> + * u32 size;
The struct perf_event_header also has 'size' field and it has the entire
length of the record so it's redundant. Also there's 'misc' field in the
perf_event_header and I guess it can be used as 'type' info as it's
mostly for cpumode and we are in user mode by definition.
Thanks,
Namhyung
> + * char data[size];
> + * char __padding[-size & 7];
> + * struct sample_id sample_id;
> + * };
> + */
> + PERF_RECORD_UEVENT = 11,
> +
> PERF_RECORD_MAX, /* non-ABI */
> };
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@...r.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/
Powered by blists - more mailing lists