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]
Message-ID: <20140723093638.GA1207@krava.brq.redhat.com>
Date:	Wed, 23 Jul 2014 11:36:38 +0200
From:	Jiri Olsa <jolsa@...hat.com>
To:	Adrian Hunter <adrian.hunter@...el.com>
Cc:	Arnaldo Carvalho de Melo <acme@...nel.org>,
	Peter Zijlstra <peterz@...radead.org>,
	linux-kernel@...r.kernel.org, David Ahern <dsahern@...il.com>,
	Frederic Weisbecker <fweisbec@...il.com>,
	Namhyung Kim <namhyung@...il.com>,
	Paul Mackerras <paulus@...ba.org>,
	Stephane Eranian <eranian@...gle.com>
Subject: Re: [PATCH 13/52] perf tools: Add perf_pmu__scan_file()

On Wed, Jul 23, 2014 at 09:24:49AM +0300, Adrian Hunter wrote:
> On 07/22/2014 10:09 PM, Jiri Olsa wrote:
> > On Tue, Jul 22, 2014 at 04:17:22PM +0300, Adrian Hunter wrote:
> > 
> > SNIP
> > 
> >> +
> >> +static FILE *perf_pmu__open_file(struct perf_pmu *pmu, const char *name)
> >> +{
> >> +	struct stat st;
> >> +	char path[PATH_MAX];
> >> +	const char *sysfs;
> >> +
> >> +	sysfs = sysfs__mountpoint();
> >> +	if (!sysfs)
> >> +		return NULL;
> >> +
> >> +	snprintf(path, PATH_MAX,
> >> +		 "%s" EVENT_SOURCE_DEVICE_PATH "%s/%s", sysfs, pmu->name, name);
> >> +
> >> +	if (stat(path, &st) < 0)
> >> +		return NULL;
> >> +
> >> +	return fopen(path, "r");
> >> +}
> > 
> > looks like this function could be used in pmu_cpumask and pmu_type
> > and maybe others
> 
> There is existing code duplication between them.  Given the large number of
> patches I would say it is easier to deal with that separately.

ook, jirka
--
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