Changeset c34ebf2 for libcfa/src/concurrency/kernel.cfa
- Timestamp:
- Jun 25, 2020, 1:34:34 PM (5 years ago)
- Branches:
- ADT, arm-eh, ast-experimental, enum, forall-pointer-decay, jacob/cs343-translation, master, new-ast, new-ast-unique-expr, pthread-emulation, qualifiedEnum
- Children:
- 8e27ac45
- Parents:
- c953163
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
libcfa/src/concurrency/kernel.cfa
rc953163 rc34ebf2 240 240 runner.proc = &this; 241 241 242 #if !defined(__CFA_NO_STATISTICS__) 243 print_stats = false; 244 print_halts = false; 245 #endif 246 242 247 idle{}; 243 248 … … 293 298 #if !defined(__CFA_NO_STATISTICS__) 294 299 if(this.print_stats) { 295 __print_stats( this.stats );300 __print_stats( this.stats, true, this.name, (void*)&this ); 296 301 } 297 302 free( this.stats ); … … 563 568 #if !defined(__CFA_NO_STATISTICS__) 564 569 __tally_stats(proc->cltr->stats, &local_stats); 570 if(proc->print_stats) { 571 __print_stats( &local_stats, true, proc->name, (void*)proc ); 572 } 565 573 #endif 566 574 … … 853 861 id = -1u; 854 862 863 #if !defined(__CFA_NO_STATISTICS__) 864 print_stats = false; 865 print_halts = false; 866 #endif 867 855 868 runner{ &this }; 856 869 __cfadbg_print_safe(runtime_core, "Kernel : constructed main processor context %p\n", &runner); … … 1004 1017 } 1005 1018 1019 #if !defined(__CFA_NO_STATISTICS__) 1020 if(this->print_halts) { 1021 printf("%d - %lld 0\n", this->id, rdtscl()); 1022 } 1023 #endif 1024 1006 1025 wait( idle ); 1026 1027 #if !defined(__CFA_NO_STATISTICS__) 1028 if(this->print_halts) { 1029 printf("%d - %lld 1\n", this->id, rdtscl()); 1030 } 1031 #endif 1007 1032 } 1008 1033 … … 1190 1215 return true; 1191 1216 } 1217 1218 //----------------------------------------------------------------------------- 1219 // Statistics 1220 #if !defined(__CFA_NO_STATISTICS__) 1221 void print_halts( processor & this ) { 1222 this.print_halts = true; 1223 printf("Processor : %d - %s (%p)\n", this.id, this.name, (void*)&this); 1224 } 1225 #endif 1192 1226 // Local Variables: // 1193 1227 // mode: c //
Note: See TracChangeset
for help on using the changeset viewer.