File tree Expand file tree Collapse file tree 2 files changed +12
-7
lines changed
Expand file tree Collapse file tree 2 files changed +12
-7
lines changed Original file line number Diff line number Diff line change @@ -769,7 +769,10 @@ void ponyint_actor_destroy(pony_actor_t* actor)
769769 ctx -> schedulerstats .mem_used_actors -= actor -> type -> size ;
770770 ctx -> schedulerstats .mem_allocated_actors -= ponyint_pool_used_size (actor -> type -> size );
771771 ctx -> schedulerstats .destroyed_actors_counter ++ ;
772- print_actor_stats (actor );
772+ if (print_stats )
773+ {
774+ print_actor_stats (actor );
775+ }
773776#endif
774777
775778 // Free variable sized actors correctly.
Original file line number Diff line number Diff line change @@ -1217,9 +1217,10 @@ static void run(scheduler_t* sched)
12171217 if (actor == NULL )
12181218 {
12191219#ifdef USE_RUNTIMESTATS
1220- uint64_t used_cpu = ponyint_sched_cpu_used (& sched -> ctx );
1221- sched -> ctx .schedulerstats .misc_cpu += used_cpu ;
1222- print_scheduler_stats (sched );
1220+ uint64_t used_cpu = ponyint_sched_cpu_used (& sched -> ctx );
1221+ sched -> ctx .schedulerstats .misc_cpu += used_cpu ;
1222+ if (print_stats )
1223+ print_scheduler_stats (sched );
12231224#endif
12241225
12251226 // Termination.
@@ -1454,8 +1455,9 @@ static void run_pinned_actors()
14541455 if (sched -> terminate )
14551456 {
14561457#ifdef USE_RUNTIMESTATS
1457- uint64_t used_cpu = ponyint_sched_cpu_used (& sched -> ctx );
1458- sched -> ctx .schedulerstats .misc_cpu += used_cpu ;
1458+ uint64_t used_cpu = ponyint_sched_cpu_used (& sched -> ctx );
1459+ sched -> ctx .schedulerstats .misc_cpu += used_cpu ;
1460+ if (print_stats )
14591461 print_scheduler_stats (sched );
14601462#endif
14611463
@@ -1484,7 +1486,7 @@ static void run_pinned_actors()
14841486 uint64_t clocks_elapsed = tsc2 - tsc ;
14851487
14861488 // We had an empty queue and no actor. need to suspend or sleep only if
1487- // mutemap is empty as this thread doesn't participate in work stealing
1489+ // mutemap is empty as this thread doesn't participate in work stealing
14881490 if (ponyint_mutemap_size (& sched -> mute_mapping ) == 0 && clocks_elapsed > scheduler_suspend_threshold )
14891491 {
14901492 // suspend
You can’t perform that action at this time.
0 commit comments