[svn:parrot] r43017 - in trunk: docs include/parrot src src/gc
darbelo at svn.parrot.org
darbelo at svn.parrot.org
Sat Dec 12 13:50:41 UTC 2009
Author: darbelo
Date: Sat Dec 12 13:50:40 2009
New Revision: 43017
URL: https://trac.parrot.org/parrot/changeset/43017
Log:
Remove unused and bitrotted GC_VERBOSE debugging output.
That's also one less ->strstart to cleanup too.
Modified:
trunk/docs/debug.pod
trunk/include/parrot/gc_api.h
trunk/include/parrot/settings.h
trunk/src/gc/api.c
trunk/src/gc/mark_sweep.c
trunk/src/pmc.c
Modified: trunk/docs/debug.pod
==============================================================================
--- trunk/docs/debug.pod Sat Dec 12 12:51:51 2009 (r43016)
+++ trunk/docs/debug.pod Sat Dec 12 13:50:40 2009 (r43017)
@@ -57,19 +57,6 @@
maximizes the probability that any newborn objects will run afoul of the
garbage collector.
-Within the C<--gc-debug> mode, there is another tool to help narrow down the
-problem. You can edit F<include/parrot/gc_api.h> and C<#define> the C<GC_VERBOSE> flag to
-1. After recompiling C<parrot>, the garbage collector will perform additional
-checks. After the garbage collector has traced all objects to find which ones
-are still alive, it will scan through all of the dead objects to see if any of
-them believe they are alive (which will happen for infants, since they come
-into existence marked live.) If it finds any, it will print them out.
-You can then re-run the program with a breakpoint set on the routine that
-allocated the object (e.g. C<get_free_object> in F<src/gc/mark_sweep.c>).
-You'll probably want to make the breakpoint conditional on the object having
-the version number that was reported, because the same memory location will
-probably hold many different objects over the lifetime of the program.
-
=head1 PIR AND PASM CODE
Let's say you have written (or generated) a huge .pasm or .pir file. It's not
Modified: trunk/include/parrot/gc_api.h
==============================================================================
--- trunk/include/parrot/gc_api.h Sat Dec 12 12:51:51 2009 (r43016)
+++ trunk/include/parrot/gc_api.h Sat Dec 12 13:50:40 2009 (r43017)
@@ -11,10 +11,6 @@
#ifndef PARROT_GC_API_H_GUARD
#define PARROT_GC_API_H_GUARD
-/* Set this to 1 to see if unanchored objects are found in system areas.
- * Please note: these objects might be bogus */
-#define GC_VERBOSE 0
-
#include "parrot/parrot.h"
/*
Modified: trunk/include/parrot/settings.h
==============================================================================
--- trunk/include/parrot/settings.h Sat Dec 12 12:51:51 2009 (r43016)
+++ trunk/include/parrot/settings.h Sat Dec 12 13:50:40 2009 (r43017)
@@ -26,8 +26,7 @@
#endif /* DISABLE_GC_DEBUG */
/* Helpful internal macro for testing whether we are currently
- * debugging garbage collection and memory management. See also the
- * definition of GC_VERBOSE in include/parrot/gc_api.h. */
+ * debugging garbage collection and memory management. */
#if DISABLE_GC_DEBUG
# define GC_DEBUG(interp) 0
#else
Modified: trunk/src/gc/api.c
==============================================================================
--- trunk/src/gc/api.c Sat Dec 12 12:51:51 2009 (r43016)
+++ trunk/src/gc/api.c Sat Dec 12 13:50:40 2009 (r43017)
@@ -210,14 +210,6 @@
if (PObj_is_live_or_free_TESTALL(obj))
return;
-#if ! DISABLE_GC_DEBUG
-# if GC_VERBOSE
- if (CONSERVATIVE_POINTER_CHASING)
- fprintf(stderr, "GC Warning! Unanchored %s %p found in system areas \n",
- PObj_is_PMC_TEST(obj) ? "PMC" : "Buffer", obj);
-
-# endif
-#endif
/* mark it live */
PObj_live_SET(obj);
@@ -232,13 +224,6 @@
else if (PMC_metadata(p))
Parrot_gc_mark_PMC_alive(interp, PMC_metadata(p));
}
-#if GC_VERBOSE
- /* buffer GC_DEBUG stuff */
- if (GC_DEBUG(interp) && PObj_report_TEST(obj))
- fprintf(stderr, "GC: buffer %p pointing to %p marked live\n",
- obj, Buffer_bufstart((Buffer *)obj));
-#endif
-
}
/*
Modified: trunk/src/gc/mark_sweep.c
==============================================================================
--- trunk/src/gc/mark_sweep.c Sat Dec 12 12:51:51 2009 (r43016)
+++ trunk/src/gc/mark_sweep.c Sat Dec 12 13:50:40 2009 (r43017)
@@ -271,19 +271,6 @@
const UINTVAL object_size = pool->object_size;
UINTVAL i;
-#if GC_VERBOSE
- if (Interp_trace_TEST(interp, 1)) {
- Interp * const tracer = interp->debugger;
- PMC *pio = Parrot_io_STDERR(interp);
-
- Parrot_io_flush(interp, pio);
-
- if (tracer) {
- pio = Parrot_io_STDERR(tracer);
- Parrot_io_flush(tracer, pio);
- }
- }
-#endif
/* Run through all the PObj header pools and mark */
for (cur_arena = pool->last_Arena; cur_arena; cur_arena = cur_arena->prev) {
@@ -304,15 +291,6 @@
else if (!PObj_on_free_list_TEST(b)) {
/* it must be dead */
-#if GC_VERBOSE
- if (Interp_trace_TEST(interp, 1)) {
- fprintf(stderr, "Freeing pobject %p\n", b);
- if (PObj_is_PMC_TEST(b)) {
- fprintf(stderr, "\t = PMC type %s\n",
- (char*) ((PMC*)b)->vtable->whoami->strstart);
- }
- }
-#endif
if (PObj_is_shared_TEST(b)) {
/* only mess with shared objects if we
Modified: trunk/src/pmc.c
==============================================================================
--- trunk/src/pmc.c Sat Dec 12 12:51:51 2009 (r43016)
+++ trunk/src/pmc.c Sat Dec 12 13:50:40 2009 (r43017)
@@ -460,13 +460,6 @@
if (vtable->attr_size)
Parrot_gc_allocate_pmc_attributes(interp, pmc);
-#if GC_VERBOSE
- if (Interp_flags_TEST(interp, PARROT_TRACE_FLAG)) {
- /* XXX make a more verbose trace flag */
- fprintf(stderr, "\t=> new %p type %d\n", pmc, (int)base_type);
- }
-#endif
-
return pmc;
}
More information about the parrot-commits
mailing list