In an older linux distro I could call get_cycle() after including asm/timex.h. Now I changed to Kubuntu 9.04 and there is no asm/timex.h, plus in sys/timex.h there is no get_cycle(). Does anyone know why this changed, how to access this fuction/macro or a replacement for it? Or, even better, where to read information about it? Thanks in advance.
+1
A:
/usr/src/linux-headers-2.6.24-23-generic/include/asm$ grep get_cycle *.h system_32.h: * (or get_cycles or vread that possibly accesses the TSC) in a defined system_64.h: * (or get_cycles or vread that possibly accesses the TSC) in a defined tsc.h:static inline cycles_t get_cycles(void) tsc.h:static inline cycles_t vget_cycles(void) vmi_time.h: u64 (*get_cycle_frequency)(void); vmi_time.h: u64 (*get_cycle_counter)(int);
So, try including <tsc.h>.
unwind
2009-03-24 11:14:53
Thanks, that worked. I only grepped inside /usr/include...
Chris
2009-03-24 14:55:36