This is the mail archive of the java-patches@sources.redhat.com mailing list for the Java project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]

Re: PATCH: object stream dumping


On Fri, 24 Nov 2000, Bryce McKinlay wrote:

> This patch makes the serialized object dumping code conditional on the
> value of the Configuration.DEBUG flag. It also changes the code to be
> enabled at runtime by setting the "gcj.dumpobjects" system property
> rather than by calling a method (we should never add new public methods
> to the core java classes defined in the spec).
> 
> To get the debugging output, you should do BOTH of the following:
> 
> 1. configure libgcj with "--enable-libgcj-debug"
> 2. set "gcj.dumpobjects" to anything other than null or the empty
> string. You can do this by calling System.setProperty("gcj.dumpobjects",
> "true") in program code or by using "-Dgcj.dumpobjects=true" on the gcj
> command line.
> 
> ok to commit?

Thanks Bryce, it certainly is an improvement on what I checked in before.
I should mention that my original desire (though not achieved in what I
checked in) was to allow for code in a "production" environment that was
devoid of the debug checks and the overhead they incurred (hence, my
attempt to at least partially accomplish this via the #ifdef's in the
native code).

I'd still like that to be the case.  The only clean way I can think of
doing this without resorting to a lot more native code, is to have 2
versions of the ObjectInputStream module (i.e. with and without the
dumping code; with the desired one is used based on --enable-libjava-debug).
Or am I underestimating the ability of the compiler to optimize out calls
to the dumping code when --enable-libjava-debug is not set?
--warrenl



Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]