[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
A java DEBUG flag
From: |
Bryce McKinlay |
Subject: |
A java DEBUG flag |
Date: |
Thu, 23 Nov 2000 18:06:12 +1300 |
I think it would be useful to have a java file somewhere that defines
constants which can be used to enable/disable bits of java code at
compile time. The serialized object dumping facility in
ObjectInputStream, for example, currently adds a lot of overhead even
when its turned off, because the java code makes calls into native code
regardless of whether debugging is enabled or not. By setting a constant
somewhere, the compiler can optimize it out when not doing a debug
build.
I propose an interface (this ensures that only constants can be defined)
called gnu.classpath.Flags (or CompileSettings? DebugFlags?) which would
be generated at configure time from a Flags.java.in, and would change
based on whether "--enable-libgcj-debug" (or the classpath equivilant)
was specified at configure time.
Initially it will look something like this:
package gnu.classpath;
public interface Flags
{
boolean SERIALIZATION_DEBUGGING = true;
}
Comments?
regards
[ bryce ]
- A java DEBUG flag,
Bryce McKinlay <=
- Re: A java DEBUG flag, Tom Tromey, 2000/11/23
- Re: A java DEBUG flag, Brian Jones, 2000/11/26
- Re: A java DEBUG flag, Bryce McKinlay, 2000/11/26
- Re: A java DEBUG flag, Brian Jones, 2000/11/27
- Re: A java DEBUG flag, Kevin A. Burton, 2000/11/28
- Re: A java DEBUG flag, Bryce McKinlay, 2000/11/28
- Re: A java DEBUG flag, Brian Jones, 2000/11/28
- Re: A java DEBUG flag, Stuart Ballard, 2000/11/28
- Re: A java DEBUG flag, Brian Jones, 2000/11/29
- Re: A java DEBUG flag, Tom Tromey, 2000/11/29