From fad1490176c55e21c396f007cfb12b4e9882b716 Mon Sep 17 00:00:00 2001 From: hboehm Date: Mon, 7 May 2007 22:22:34 +0000 Subject: [PATCH] 2007-05-07 Hans Boehm * pthread_stop_world.c (GC_push_all_stacks): Print thread count with GC_PRINT_VERBOSE_STATS. --- ChangeLog | 5 +++++ pthread_stop_world.c | 5 +++++ 2 files changed, 10 insertions(+) diff --git a/ChangeLog b/ChangeLog index c7244732..5d19ce93 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,3 +1,8 @@ +2007-05-07 Hans Boehm + + * pthread_stop_world.c (GC_push_all_stacks): Print thread count with + GC_PRINT_VERBOSE_STATS. + 2007-05-01 Hans Boehm (and Manuel Serrano, Craig McDaniel) diff --git a/pthread_stop_world.c b/pthread_stop_world.c index fb68586c..75ef567c 100644 --- a/pthread_stop_world.c +++ b/pthread_stop_world.c @@ -242,6 +242,7 @@ void GC_restart_handler(int sig) void GC_push_all_stacks() { GC_bool found_me = FALSE; + size_t nthreads = 0; int i; GC_thread p; ptr_t lo, hi; @@ -256,6 +257,7 @@ void GC_push_all_stacks() for (i = 0; i < THREAD_TABLE_SZ; i++) { for (p = GC_threads[i]; p != 0; p = p -> next) { if (p -> flags & FINISHED) continue; + ++nthreads; if (pthread_equal(p -> id, me)) { # ifdef SPARC lo = (ptr_t)GC_save_regs_in_stack(); @@ -302,6 +304,9 @@ void GC_push_all_stacks() # endif } } + if (GC_print_stats == VERBOSE) { + GC_log_printf("Pushed %d thread stacks\n", nthreads); + } if (!found_me && !GC_in_thread_creation) ABORT("Collecting from unknown thread."); } -- 2.40.0