Index: Python/ceval.c =================================================================== --- Python/ceval.c (revision 75383) +++ Python/ceval.c (working copy) @@ -53,9 +53,16 @@ #else /* this is for linux/x86 (and probably any other GCC/x86 combo) */ -#define READ_TIMESTAMP(val) \ - __asm__ __volatile__("rdtsc" : "=A" (val)) +#define READ_TIMESTAMP(var) x86_gcc_getcounter(&var) +static void +x86_gcc_getcounter(uint64 *v) +{ + unsigned int low, high; + __asm__ __volatile__("rdtsc" : "=a" (low), "=d" (high)); + *v = (uint64)high << 32 | low; +} + #endif void dump_tsc(int opcode, int ticked, uint64 inst0, uint64 inst1, @@ -719,8 +726,8 @@ loop0 -- the top of the mainloop loop1 -- place where control returns again to top of mainloop (may be skipped) - intr1 -- beginning of long interruption - intr2 -- end of long interruption + intr0 -- beginning of long interruption + intr1 -- end of long interruption Many opcodes call out to helper C functions. In some cases, the time in those functions should be counted towards the time for the