Tom Zanussi b1dcc03cb8 perf/scripts: Tuple was set from long in both branches in python_process_event()
This is a fix to the signed/unsigned field handling in the
Python scripting engine, based on a patch from Roel Kluin.

Basically, Python wants to use a PyInt (which is internally a
long) if it can i.e. if the value will fit into that type.  If
not, it stores it into a PyLong, which isn't actually a long,
but an arbitrary-precision integer variable.

The code below is similar to to what Python does internally, and
it seems to work as expected on the x86 and x86_64 sytems I
tested it on.

Signed-off-by: Tom Zanussi <tzanussi@gmail.com>
Cc: Arnaldo Carvalho de Melo <acme@redhat.com>
Cc: Roel Kluin <roel.kluin@gmail.com>
Cc: Frederic Weisbecker <fweisbec@gmail.com>
Cc: rostedt@goodmis.org
LKML-Reference: <1270184305.6422.10.camel@tropicana>
Signed-off-by: Ingo Molnar <mingo@elte.hu>
2010-04-02 21:32:16 +02:00
..
2009-08-16 10:47:47 +02:00
2009-08-16 10:47:47 +02:00
2009-12-28 10:36:36 +01:00
2009-08-16 10:47:47 +02:00
2009-06-27 06:06:39 +02:00
2009-10-15 11:35:23 +02:00
2009-08-16 10:47:47 +02:00
2009-08-04 11:09:56 +02:00
2009-12-28 09:03:36 +01:00
2010-01-13 10:09:15 +01:00