+2007-05-07 Hans Boehm <Hans.Boehm@hp.com>
+
+ * pthread_stop_world.c (GC_push_all_stacks): Print thread count with
+ GC_PRINT_VERBOSE_STATS.
+
2007-05-01 Hans Boehm <Hans.Boehm@hp.com>
(and Manuel Serrano, Craig McDaniel)
void GC_push_all_stacks()
{
GC_bool found_me = FALSE;
+ size_t nthreads = 0;
int i;
GC_thread p;
ptr_t lo, hi;
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();
# 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.");
}