Changeset 1b033b8
- Timestamp:
- Nov 13, 2020, 11:32:15 AM (4 years ago)
- Branches:
- ADT, arm-eh, ast-experimental, enum, forall-pointer-decay, jacob/cs343-translation, master, new-ast-unique-expr, pthread-emulation, qualifiedEnum
- Children:
- ac12f1f
- Parents:
- 0989e79
- Location:
- libcfa/src/concurrency
- Files:
-
- 5 edited
Legend:
- Unmodified
- Added
- Removed
-
libcfa/src/concurrency/kernel.cfa
r0989e79 r1b033b8 742 742 743 743 void print_stats_now( cluster & this, int flags ) { 744 __print_stats( this.stats, this.print_stats, true, this.name, (void*)&this ); 744 __print_stats( this.stats, this.print_stats, "Cluster", this.name, (void*)&this ); 745 } 746 747 extern int __print_alarm_stats; 748 void print_alarm_stats() { 749 __print_alarm_stats = -1; 745 750 } 746 751 #endif -
libcfa/src/concurrency/kernel/startup.cfa
r0989e79 r1b033b8 360 360 __tally_stats(proc->cltr->stats, &local_stats); 361 361 if( 0 != proc->print_stats ) { 362 __print_stats( &local_stats, proc->print_stats, true, proc->name, (void*)proc );362 __print_stats( &local_stats, proc->print_stats, "Processor ", proc->name, (void*)proc ); 363 363 } 364 364 #endif … … 622 622 #if !defined(__CFA_NO_STATISTICS__) 623 623 if( 0 != this.print_stats ) { 624 __print_stats( this.stats, this.print_stats, true, this.name, (void*)&this );624 __print_stats( this.stats, this.print_stats, "Cluster", this.name, (void*)&this ); 625 625 } 626 626 free( this.stats ); -
libcfa/src/concurrency/preemption.cfa
r0989e79 r1b033b8 393 393 // reserved for future use 394 394 static void timeout( $thread * this ) { 395 #if !defined( __CFA_NO_STATISTICS__ )396 kernelTLS().this_stats = this->curr_cluster->stats;397 #endif398 395 unpark( this ); 399 396 } … … 610 607 } 611 608 609 #if !defined(__CFA_NO_STATISTICS__) 610 int __print_alarm_stats = 0; 611 #endif 612 612 613 // Main of the alarm thread 613 614 // Waits on SIGALRM and send SIGUSR1 to whom ever needs it … … 617 618 id.id = doregister(&id); 618 619 __cfaabi_tls.this_proc_id = &id; 620 621 #if !defined(__CFA_NO_STATISTICS__) 622 struct __stats_t local_stats; 623 __cfaabi_tls.this_stats = &local_stats; 624 __init_stats( &local_stats ); 625 #endif 619 626 620 627 // Block sigalrms to control when they arrive … … 676 683 __cfaabi_dbg_print_safe( "Kernel : Preemption thread stopping\n" ); 677 684 unregister(&id); 685 686 #if !defined(__CFA_NO_STATISTICS__) 687 if( 0 != __print_alarm_stats ) { 688 __print_stats( &local_stats, __print_alarm_stats, "Alarm", "Thread", 0p ); 689 } 690 #endif 678 691 return 0p; 679 692 } -
libcfa/src/concurrency/stats.cfa
r0989e79 r1b033b8 79 79 } 80 80 81 void __print_stats( struct __stats_t * stats, int flags, bool cluster, const char * name, void * id ) with( *stats ) {81 void __print_stats( struct __stats_t * stats, int flags, const char * type, const char * name, void * id ) with( *stats ) { 82 82 83 83 if( flags & CFA_STATS_READY_Q ) { … … 109 109 "-- wake on exit : %'15" PRIu64 "\n" 110 110 "\n" 111 , cluster ? "Cluster" : "Processor",name, id111 , type, name, id 112 112 , ready.pick.pop.success 113 113 , ready.pick.push.success -
libcfa/src/concurrency/stats.hfa
r0989e79 r1b033b8 7 7 static inline void __init_stats( struct __stats_t * ) {} 8 8 static inline void __tally_stats( struct __stats_t *, struct __stats_t * ) {} 9 static inline void __print_stats( struct __stats_t *, int, bool, const char *, void * ) {}9 static inline void __print_stats( struct __stats_t *, int, const char *, const char *, void * ) {} 10 10 #else 11 11 enum { … … 106 106 void __init_stats ( struct __stats_t * ); 107 107 void __tally_stats( struct __stats_t *, struct __stats_t * ); 108 void __print_stats( struct __stats_t *, int, bool, const char *, void * );108 void __print_stats( struct __stats_t *, int, const char *, const char *, void * ); 109 109 #endif 110 110
Note: See TracChangeset
for help on using the changeset viewer.