lists.openwall.net   lists  /  announce  owl-users  owl-dev  john-users  john-dev  passwdqc-users  yescrypt  popa3d-users  /  oss-security  kernel-hardening  musl  sabotage  tlsify  passwords  /  crypt-dev  xvendor  /  Bugtraq  Full-Disclosure  linux-kernel  linux-netdev  linux-ext4  linux-hardening  linux-cve-announce  PHC 
Open Source and information security mailing list archives
 
Hash Suite for Android: free password hash cracker in your pocket
[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <20150421061756.GC1905@sejong>
Date:	Tue, 21 Apr 2015 15:17:56 +0900
From:	Namhyung Kim <namhyung@...nel.org>
To:	David Ahern <dsahern@...il.com>
Cc:	Arnaldo Carvalho de Melo <arnaldo.melo@...il.com>,
	Steven Rostedt <rostedt@...dmis.org>,
	LKML <linux-kernel@...r.kernel.org>
Subject: Re: perf/tracepoints access to interpreted strings

Hi David,

On Mon, Apr 20, 2015 at 03:26:56PM -0600, David Ahern wrote:
> On 4/20/15 3:25 PM, Arnaldo Carvalho de Melo wrote:
> >Em Mon, Apr 20, 2015 at 04:46:16PM -0400, Steven Rostedt escreveu:
> >>On Wed, 15 Apr 2015 15:09:27 -0300
> >>Arnaldo Carvalho de Melo <acme@...nel.org> wrote:
> >>>If it is strictly an enum, i.e. no holes and just by looking at the
> >>>"format" file above I don't see how it could have holes, albeit enums
> >>>may have, we can as well have this:
> >
> >>>	const char *perf_evsel__enum(struct perf_evsel *evsel,
> >>>				     struct perf_sample *sample,
> >>>				     const char *enum_name);
> >
> >>>That would return an array of strings that you could directly access,
> >>>indexing using some of the fields.
> >
> >>>I.e. internally we would see the tracepoint format file as:
> >
> >>>  	field:enum action vec;	offset:12;	size:4;	signed:0;
> >
> >>>	enum: action: TIMER, NET_TX, NET_RX, BLOCK, BLOCK_IOPOLL, TASKLET, SCHED, HRTIMER, RCU
> >
> >>Note, with the new TRACE_DEFINE_ENUM() that was already added to
> >>Linus's tree, that print_fmt now looks like:
> >
> >>print fmt: "vec=%u [action=%s]", REC->vec, __print_symbolic(REC->vec,
> >>  { 0, "HI" }, { 1, "TIMER" }, { 2, "NET_TX" }, { 3, "NET_RX" }, { 4, "BLOCK" },
> >>  { 5, "BLOCK_IOPOLL" }, { 6, "TASKLET" }, { 7, "SCHED" }, { 8, "HRTIMER" },
> >>  { 9, "RCU" })
> >
> >That is better, indeed, covers holes :-)
> 
> Seems to me that means 2 different implementations are needed ... old and
> new.

I just called pevent_event_info() and parsed the output seq.buffer for
my perf kmem work to parse GFP flags.

Thanks,
Namhyung
--
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

Powered by Openwall GNU/*/Linux Powered by OpenVZ