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:	Wed, 23 Dec 2015 17:04:11 +0100
From:	Jiri Olsa <jolsa@...hat.com>
To:	Namhyung Kim <namhyung@...nel.org>
Cc:	Jiri Olsa <jolsa@...nel.org>,
	Arnaldo Carvalho de Melo <acme@...nel.org>,
	lkml <linux-kernel@...r.kernel.org>,
	David Ahern <dsahern@...il.com>,
	Ingo Molnar <mingo@...nel.org>,
	Peter Zijlstra <a.p.zijlstra@...llo.nl>,
	"Liang, Kan" <kan.liang@...el.com>
Subject: Re: [PATCH 7/8] perf script: Add python support for stat events

On Wed, Dec 23, 2015 at 10:42:47PM +0900, Namhyung Kim wrote:

SNIP

> > +static void
> > +process_stat(struct perf_evsel *counter, int cpu, int thread, u64 time,
> > +	     struct perf_counts_values *count)
> > +{
> > +	PyObject *handler, *t;
> > +	static char handler_name[256];
> > +	int n = 0;
> > +
> > +	t = PyTuple_New(MAX_FIELDS);
> > +	if (!t)
> > +		Py_FatalError("couldn't create Python tuple");
> > +
> > +	get_handler_name(handler_name, sizeof(handler_name),
> > +			 counter);
> > +
> > +	handler = get_handler(handler_name);
> > +	if (!handler) {
> > +		pr_debug("can't find python handler %s\n", handler_name);
> > +		return;
> > +	}
> > +
> > +	PyTuple_SetItem(t, n++, PyInt_FromLong(cpu));
> > +	PyTuple_SetItem(t, n++, PyInt_FromLong(thread));
> > +	PyTuple_SetItem(t, n++, PyLong_FromLong(time));
> > +	PyTuple_SetItem(t, n++, PyLong_FromLong(count->val));
> > +	PyTuple_SetItem(t, n++, PyLong_FromLong(count->ena));
> > +	PyTuple_SetItem(t, n++, PyLong_FromLong(count->run));
> 
> What about 32-bit systems?  It seems the PyLong_FromLong() takes long
> but the counts are u64.

hum, if it does I think we'll have problems in other
parts of python code.. I'll check, thanks

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