* When QSHOW is undefined FSHOW(...) expands into nothing, leading to unexpected
results for code like
if (gencgc_verbose)
FSHOW(...)
as the conditional will then apply to the next syntactic element.
* Patch by Daniel Lowe.
gc_assert(from_space_p(object));
gc_assert((nwords & 0x01) == 0);
gc_assert(from_space_p(object));
gc_assert((nwords & 0x01) == 0);
- if ((nwords > 1024*1024) && gencgc_verbose)
+ if ((nwords > 1024*1024) && gencgc_verbose) {
FSHOW((stderr, "/copy_large_unboxed_object: %d bytes\n",
nwords*N_WORD_BYTES));
FSHOW((stderr, "/copy_large_unboxed_object: %d bytes\n",
nwords*N_WORD_BYTES));
/* Check whether it's a large object. */
first_page = find_page_index((void *)object);
/* Check whether it's a large object. */
first_page = find_page_index((void *)object);
- if ((bytes_freed > 0) && gencgc_verbose)
+ if ((bytes_freed > 0) && gencgc_verbose) {
FSHOW((stderr,
"/copy_large_unboxed bytes_freed=%d\n",
bytes_freed));
FSHOW((stderr,
"/copy_large_unboxed bytes_freed=%d\n",
bytes_freed));
generations[from_space].bytes_allocated -=
nwords*N_WORD_BYTES + bytes_freed;
generations[from_space].bytes_allocated -=
nwords*N_WORD_BYTES + bytes_freed;
case FUNCALLABLE_INSTANCE_HEADER_WIDETAG:
if ((unsigned long)pointer !=
((unsigned long)start_addr+FUN_POINTER_LOWTAG)) {
case FUNCALLABLE_INSTANCE_HEADER_WIDETAG:
if ((unsigned long)pointer !=
((unsigned long)start_addr+FUN_POINTER_LOWTAG)) {
FSHOW((stderr,
"/Wf2: %x %x %x\n",
pointer, start_addr, *start_addr));
FSHOW((stderr,
"/Wf2: %x %x %x\n",
pointer, start_addr, *start_addr));
return 0;
}
break;
default:
return 0;
}
break;
default:
FSHOW((stderr,
"/Wf3: %x %x %x\n",
pointer, start_addr, *start_addr));
FSHOW((stderr,
"/Wf3: %x %x %x\n",
pointer, start_addr, *start_addr));
return 0;
}
break;
case LIST_POINTER_LOWTAG:
if ((unsigned long)pointer !=
((unsigned long)start_addr+LIST_POINTER_LOWTAG)) {
return 0;
}
break;
case LIST_POINTER_LOWTAG:
if ((unsigned long)pointer !=
((unsigned long)start_addr+LIST_POINTER_LOWTAG)) {
FSHOW((stderr,
"/Wl1: %x %x %x\n",
pointer, start_addr, *start_addr));
FSHOW((stderr,
"/Wl1: %x %x %x\n",
pointer, start_addr, *start_addr));
return 0;
}
/* Is it plausible cons? */
return 0;
}
/* Is it plausible cons? */
is_lisp_immediate(start_addr[1])))
break;
else {
is_lisp_immediate(start_addr[1])))
break;
else {
FSHOW((stderr,
"/Wl2: %x %x %x\n",
pointer, start_addr, *start_addr));
FSHOW((stderr,
"/Wl2: %x %x %x\n",
pointer, start_addr, *start_addr));
return 0;
}
case INSTANCE_POINTER_LOWTAG:
if ((unsigned long)pointer !=
((unsigned long)start_addr+INSTANCE_POINTER_LOWTAG)) {
return 0;
}
case INSTANCE_POINTER_LOWTAG:
if ((unsigned long)pointer !=
((unsigned long)start_addr+INSTANCE_POINTER_LOWTAG)) {
FSHOW((stderr,
"/Wi1: %x %x %x\n",
pointer, start_addr, *start_addr));
FSHOW((stderr,
"/Wi1: %x %x %x\n",
pointer, start_addr, *start_addr));
return 0;
}
if (widetag_of(start_addr[0]) != INSTANCE_HEADER_WIDETAG) {
return 0;
}
if (widetag_of(start_addr[0]) != INSTANCE_HEADER_WIDETAG) {
FSHOW((stderr,
"/Wi2: %x %x %x\n",
pointer, start_addr, *start_addr));
FSHOW((stderr,
"/Wi2: %x %x %x\n",
pointer, start_addr, *start_addr));
return 0;
}
break;
case OTHER_POINTER_LOWTAG:
if ((unsigned long)pointer !=
((unsigned long)start_addr+OTHER_POINTER_LOWTAG)) {
return 0;
}
break;
case OTHER_POINTER_LOWTAG:
if ((unsigned long)pointer !=
((unsigned long)start_addr+OTHER_POINTER_LOWTAG)) {
FSHOW((stderr,
"/Wo1: %x %x %x\n",
pointer, start_addr, *start_addr));
FSHOW((stderr,
"/Wo1: %x %x %x\n",
pointer, start_addr, *start_addr));
return 0;
}
/* Is it plausible? Not a cons. XXX should check the headers. */
if (is_lisp_pointer(start_addr[0]) || ((start_addr[0] & 3) == 0)) {
return 0;
}
/* Is it plausible? Not a cons. XXX should check the headers. */
if (is_lisp_pointer(start_addr[0]) || ((start_addr[0] & 3) == 0)) {
FSHOW((stderr,
"/Wo2: %x %x %x\n",
pointer, start_addr, *start_addr));
FSHOW((stderr,
"/Wo2: %x %x %x\n",
pointer, start_addr, *start_addr));
return 0;
}
switch (widetag_of(start_addr[0])) {
return 0;
}
switch (widetag_of(start_addr[0])) {
#if N_WORD_BITS == 64
case SINGLE_FLOAT_WIDETAG:
#endif
#if N_WORD_BITS == 64
case SINGLE_FLOAT_WIDETAG:
#endif
FSHOW((stderr,
"*Wo3: %x %x %x\n",
pointer, start_addr, *start_addr));
FSHOW((stderr,
"*Wo3: %x %x %x\n",
pointer, start_addr, *start_addr));
return 0;
/* only pointed to by function pointers? */
case CLOSURE_HEADER_WIDETAG:
case FUNCALLABLE_INSTANCE_HEADER_WIDETAG:
return 0;
/* only pointed to by function pointers? */
case CLOSURE_HEADER_WIDETAG:
case FUNCALLABLE_INSTANCE_HEADER_WIDETAG:
FSHOW((stderr,
"*Wo4: %x %x %x\n",
pointer, start_addr, *start_addr));
FSHOW((stderr,
"*Wo4: %x %x %x\n",
pointer, start_addr, *start_addr));
return 0;
case INSTANCE_HEADER_WIDETAG:
return 0;
case INSTANCE_HEADER_WIDETAG:
FSHOW((stderr,
"*Wo5: %x %x %x\n",
pointer, start_addr, *start_addr));
FSHOW((stderr,
"*Wo5: %x %x %x\n",
pointer, start_addr, *start_addr));
return 0;
/* the valid other immediate pointer objects */
return 0;
/* the valid other immediate pointer objects */
FSHOW((stderr,
"/Wo6: %x %x %x\n",
pointer, start_addr, *start_addr));
FSHOW((stderr,
"/Wo6: %x %x %x\n",
pointer, start_addr, *start_addr));
return 0;
}
break;
default:
return 0;
}
break;
default:
FSHOW((stderr,
"*W?: %x %x %x\n",
pointer, start_addr, *start_addr));
FSHOW((stderr,
"*W?: %x %x %x\n",
pointer, start_addr, *start_addr));
/* New areas of objects allocated have been lost so need to do a
* full scan to be sure! If this becomes a problem try
* increasing NUM_NEW_AREAS. */
/* New areas of objects allocated have been lost so need to do a
* full scan to be sure! If this becomes a problem try
* increasing NUM_NEW_AREAS. */
SHOW("new_areas overflow, doing full scavenge");
SHOW("new_areas overflow, doing full scavenge");
/* Don't need to record new areas that get scavenged
* anyway during scavenge_newspace_generation_one_scan. */
/* Don't need to record new areas that get scavenged
* anyway during scavenge_newspace_generation_one_scan. */
generations[generation].alloc_large_unboxed_start_page = 0;
if (generation >= verify_gens) {
generations[generation].alloc_large_unboxed_start_page = 0;
if (generation >= verify_gens) {
verify_gc();
verify_dynamic_space();
}
verify_gc();
verify_dynamic_space();
}
- if (gencgc_verbose > 1)
+ if (gencgc_verbose > 1) {
SHOW("entering gc_free_heap");
SHOW("entering gc_free_heap");
for (page = 0; page < page_table_pages; page++) {
/* Skip free pages which should already be zero filled. */
for (page = 0; page < page_table_pages; page++) {
/* Skip free pages which should already be zero filled. */
;;; checkins which aren't released. (And occasionally for internal
;;; versions, especially for internal versions off the main CVS
;;; branch, it gets hairier, e.g. "0.pre7.14.flaky4.13".)
;;; checkins which aren't released. (And occasionally for internal
;;; versions, especially for internal versions off the main CVS
;;; branch, it gets hairier, e.g. "0.pre7.14.flaky4.13".)