+2011-05-18 Ivan Maidanski <ivmai@mail.ru>
+
+ * checksums.c (GC_check_blocks, GC_check_dirty): Do log printing
+ only if GC_print_stats; print errors using GC_err_printf.
+ * checksums.c (GC_check_blocks): Join adjacent printf() calls into
+ a single one.
+
2011-05-17 Ivan Maidanski <ivmai@mail.ru>
* pthread_support.c (pthread_join): Add assertion (check thread is
GC_bytes_in_used_blocks = 0;
GC_apply_to_all_blocks(GC_add_block, (word)0);
- GC_log_printf(
- "GC_bytes_in_used_blocks = %lu, bytes_in_free_blocks = %lu ",
- (unsigned long)GC_bytes_in_used_blocks,
- (unsigned long)bytes_in_free_blocks);
- GC_log_printf("GC_heapsize = %lu\n", (unsigned long)GC_heapsize);
+ if (GC_print_stats)
+ GC_log_printf("GC_bytes_in_used_blocks = %lu,"
+ " bytes_in_free_blocks = %lu, heapsize = %lu\n",
+ (unsigned long)GC_bytes_in_used_blocks,
+ (unsigned long)bytes_in_free_blocks,
+ (unsigned long)GC_heapsize);
if (GC_bytes_in_used_blocks + bytes_in_free_blocks != GC_heapsize) {
- GC_log_printf("LOST SOME BLOCKS!!\n");
+ GC_err_printf("LOST SOME BLOCKS!!\n");
}
}
}
}
out:
- GC_log_printf("Checked %lu clean and %lu dirty pages\n",
- (unsigned long)GC_n_clean, (unsigned long)GC_n_dirty);
+ if (GC_print_stats)
+ GC_log_printf("Checked %lu clean and %lu dirty pages\n",
+ (unsigned long)GC_n_clean, (unsigned long)GC_n_dirty);
if (GC_n_dirty_errors > 0) {
- GC_log_printf("Found %d dirty bit errors (%d were faulted)\n",
+ GC_err_printf("Found %d dirty bit errors (%d were faulted)\n",
GC_n_dirty_errors, GC_n_faulted_dirty_errors);
}
if (GC_n_changed_errors > 0) {
- GC_log_printf("Found %lu changed bit errors\n",
+ GC_err_printf("Found %lu changed bit errors\n",
(unsigned long)GC_n_changed_errors);
- GC_log_printf(
+ GC_err_printf(
"These may be benign (provoked by nonpointer changes)\n");
# ifdef THREADS
- GC_log_printf(
+ GC_err_printf(
"Also expect 1 per thread currently allocating a stubborn obj\n");
# endif
}