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: Windows password security audit tool. GUI, reports in PDF.
[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Date:	Fri, 24 Oct 2014 11:40:02 -0300
From:	Arnaldo Carvalho de Melo <acme@...nel.org>
To:	Adrian Hunter <adrian.hunter@...el.com>
Cc:	Namhyung Kim <namhyung@...nel.org>,
	Peter Zijlstra <peterz@...radead.org>,
	"linux-kernel@...r.kernel.org" <linux-kernel@...r.kernel.org>,
	David Ahern <dsahern@...il.com>,
	Frederic Weisbecker <fweisbec@...il.com>,
	Jiri Olsa <jolsa@...hat.com>,
	Paul Mackerras <paulus@...ba.org>,
	Stephane Eranian <eranian@...gle.com>
Subject: Re: [PATCH 05/16] perf tools: Add facility to export data in
 database-friendly way

Em Fri, Oct 24, 2014 at 04:13:00PM +0300, Adrian Hunter escreveu:
> On 24/10/14 15:26, Namhyung Kim wrote:
> > Hi Adrian,
> > 
> > On Fri, Oct 24, 2014 at 7:47 PM, Adrian Hunter <adrian.hunter@...el.com> wrote:
> >> On 24/10/14 11:11, Adrian Hunter wrote:
> >>> On 24/10/14 09:02, Namhyung Kim wrote:
> >>>> Can we do it somewhere in a script not in the core code?  I don't feel
> >>>> comfortable to add those bits into the core code.  What if we export
> >>>
> >>> Please explain what you mean by "comfortable".
> >>
> >> Or rather: What about it is wrong for core code?
> > 
> > Well, there's nothing "wrong" about it. :)
> > 
> > But I think if some code is used only by a specific bits, it'd be
> > better hiding it from the rest as much as possible.
> 
> It is pretty self-contained in db-export.[ch] and the scripting
> engines.

So, what I meant was the patch below, on top of yours.

In some data structures where there were no provision for tool specific
storage, I added an unnamed union with db_id and a void *priv pointer,
where there were, be it a priv pointer, like in perf_evsel, I moved
db_id to it, no extra costs for the other tools.

And in struct symbol, I made it use symbol__priv(), that will access the
area reserved by setting symbol.priv_size at tool start time, like done
for the annotation case in top, report, annotate. I.e. on the tool that
will use symbol->db_id you will need to add this just before calling
symbol__init():

	symbol_conf.priv_size = sizeof(u64);

Since this is all specific to your tool, there should be no problems and
I'm now applying this change merged with your original patch + note
about that and then moving on to the other patches that make use of it.

- Arnaldo
--
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