- Timestamp:
- Sep 29, 2022, 3:56:44 PM (23 months ago)
- Branches:
- ADT, ast-experimental, master
- Children:
- f92e7b9
- Parents:
- da77728
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
libcfa/src/concurrency/kernel/cluster.hfa
rda77728 r33e4968e 27 27 static inline unsigned long long moving_average(unsigned long long currtsc, unsigned long long instsc, unsigned long long old_avg, bool strict) { 28 28 (void)strict; // disable the warning around the fact this is unused in release. 29 /* paranoid */ warnf( !strict || old_avg < 11_000_000_000, "Suspiciously large previous average: %'llu (%llx), %'ldms \n", old_avg, old_avg, program()`ms );29 /* paranoid */ warnf( !strict || old_avg < 33_000_000_000, "Suspiciously large previous average: %'llu (%llx), %'ldms \n", old_avg, old_avg, program()`ms ); 30 30 31 31 const unsigned long long new_val = currtsc > instsc ? currtsc - instsc : 0; … … 35 35 const unsigned long long ret = ((new_weight * new_val) + (old_weight * old_avg)) / total_weight; 36 36 37 /* paranoid */ warnf( !strict || ret < 11_000_000_000, "Suspiciously large new average after %'ldms cputime: %'llu (%llx) from %'llu-%'llu (%'llu, %'llu) and %'llu\n", program()`ms, ret, ret, currtsc, instsc, new_val, new_val / 1000000, old_avg );37 /* paranoid */ warnf( !strict || ret < 33_000_000_000, "Suspiciously large new average after %'ldms cputime: %'llu (%llx) from %'llu-%'llu (%'llu, %'llu) and %'llu\n", program()`ms, ret, ret, currtsc, instsc, new_val, new_val / 1000000, old_avg ); 38 38 return ret; 39 39 }
Note: See TracChangeset
for help on using the changeset viewer.