1
#ifndef _BITS_PROFILE_H
2
#define _BITS_PROFILE_H
10
FILE_LICENCE ( GPL2_OR_LATER_OR_UBDL );
15
* Get profiling timestamp
17
* @ret timestamp Timestamp
19
static inline __attribute__ (( always_inline )) uint64_t
20
profile_timestamp ( void ) {
24
/* Read timestamp counter */
25
__asm__ __volatile__ ( "rdtsc" : "=a" ( eax ), "=d" ( edx ) );
26
return ( ( ( ( uint64_t ) edx ) << 32 ) | eax );
29
#endif /* _BITS_PROFILE_H */