Patch: Code to dump serialized objects

Anthony Green
Fri Nov 3 05:54:00 GMT 2000

Bryce wrote:
> Instead, I would suggest that this stuff gets activated via
> a system property (eg "gcj.dumpobjects") that can be set either by
> calling "System.setProperty()" or by using the -D option at compile-time.
> Even better, why not make a small utility (ala 'jcf-dump') that hooks
> into ObjectInputStream and gets installed with libgcj, ie
> 'ser-dump' or something?

Or we could build two versions of ObjectInputStream, with and without 
instrumentation.  The normal one goes in and the instrumented one 
goes in, so under Linux at least, you just run MyProgram like 

$ MyProgram get the new behaviour with zero overhead otherwise.


More information about the Java-patches mailing list