1 #ifndef FWCore_Utilities_HRRealTime_H 2 #define FWCore_Utilities_HRRealTime_H 23 static __inline__
unsigned long long rdtsc(
void) {
24 unsigned long long int x;
25 __asm__
volatile(
".byte 0x0f, 0x31" :
"=A"(x));
28 #elif defined(__x86_64__) 30 static __inline__
unsigned long long rdtsc(
void) {
32 __asm__ __volatile__(
"rdtsc" :
"=a"(lo),
"=d"(hi));
33 return ((
unsigned long long)lo) | (((
unsigned long long)hi) << 32);
36 #elif defined(__powerpc__) 38 static __inline__
unsigned long long rdtsc(
void) {
39 unsigned long long int result = 0;
48 :
"=r"(
upper),
"=r"(lower),
"=r"(
tmp));
50 result = result << 32;
51 result = result | lower;
55 #elif defined(__arm__) 56 #warning unsigned long long rdtsc(void) is not implemented on ARMv7 architecture. Returning 0 by default. 57 static __inline__
unsigned long long rdtsc(
void) {
return 0; }
58 #elif defined(__aarch64__) 59 static __inline__
unsigned long long rdtsc(
void) {
75 unsigned long long ret;
76 __asm__ __volatile__(
"isb; mrs %0, cntvct_el0" :
"=r"(ret));
80 #error The file FWCore/Utilities/interface/HRRealTime.h needs to be set up for your CPU type. 91 inline HRTimeType
hrRealTime() {
return details::rdtsc(); }
95 #endif // FWCore_Utilities__HRRealTime_H
std::vector< std::vector< double > > tmp
long long int HRTimeDiffType
unsigned long long int HRTimeType