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] [day] [month] [year] [list]
Date:	Thu, 20 Sep 2012 23:32:09 +0800
From:	Feng Tang <feng.tang@...el.com>
To:	Arnaldo Carvalho de Melo <acme@...hat.com>
Cc:	<mingo@...e.hu>, <a.p.zijlstra@...llo.nl>, <andi@...stfloor.org>,
	<namhyung@...nel.org>, <dsahern@...il.com>,
	<linux-kernel@...r.kernel.org>
Subject: Re: [RFC PATCH] perf tool: Add a global variable "const char
 *input_name"

On Thu, 20 Sep 2012 12:05:51 -0300
Arnaldo Carvalho de Melo <acme@...hat.com> wrote:

> Em Thu, Sep 20, 2012 at 10:19:39PM +0800, Feng Tang escreveu:
> > Currently many perf ommands annotate/evlist/report/script/lock etc
> > all support "-i" option to chose a specific perf data, and all
> > of them create a local "input_name" to save the file name for
> > that perf data.
> > 
> > So adding a global variable could unify all those local ones, and
> > it will also be useful for other codes which need to know the file name.
> 
> But I think the input_name should be passed as a parameter to whoever
> needs it. Think about 'perf diff', for instance, it deals with two
> perf.data files.

Yes, when I wrote the patch, I checked all "perf_session__new()" calls, and
found "perf diff" uses the "input_new" and "input_old", so I thought it
should be immune to this change :)

The reason I came up with this patch is, when I rewrote the script browser
patch, I need to know this "input_name" to run script's report func on,
but IIUC currently this info is only saved in struct perf_session, and in
the browser stage (report/annotate), the perf_session is already phased
out and I don't know how to get a reference for the perf_session to get
the "input_name" 

> 
> In general I think we should _remove_ more globals :-)

Understood.

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