486,14 → 486,18 |
{ |
unsigned long long dtsc; |
unsigned long temp; |
struct timespec temp_time; |
SYS_FLAGS f; |
|
if (use_tsc) { |
f = ll_fsave(); |
|
__asm__("cpuid"::"a" (0), "b" (0), "c" (0), "d" (0)); |
ll_read_timespec(&temp_time); // Set new start TimeSpec |
TIMESPEC_ASSIGN(&init_time,&temp_time); |
rdtscll(init_tsc); // Set new start TSC |
ll_read_timespec(&init_time); // Set new start TimeSpec |
|
__asm__("cpuid"::"a" (0), "b" (0), "c" (0), "d" (0)); |
|
mul32div32to32(clk_per_msec,new_f,old_f,temp); |
clk_per_msec = temp; |
dtsc = (unsigned long long)(clk_per_msec) * 500; |
503,7 → 507,7 |
clk_opt_3 = (unsigned int)((unsigned long long)(dtsc << 32) / 1000000000L); |
clk_opt_4 = (unsigned int)((unsigned long long)(dtsc << 31) / 1000000000L); |
clk_opt_5 = (unsigned int)((unsigned long long)(dtsc << 30) / 1000000000L); |
|
|
ll_frestore(f); |
} |
} |