This is the mail archive of the
java-patches@sources.redhat.com
mailing list for the Java project.
RE: Patch: Code to dump serialized objects
- To: "'Bryce McKinlay'" <bryce at albatross dot co dot nz>, Warren Levy <warrenl at cygnus dot com>
- Subject: RE: Patch: Code to dump serialized objects
- From: Anthony Green <green at redhat dot com>
- Date: Fri, 3 Nov 2000 05:56:22 -0800
- Cc: Java Patch List <java-patches at sourceware dot cygnus dot com>, "classpath at gnu dot org" <classpath at gnu dot org>
- Encoding: 19 TEXT
- Organization: Red Hat, Inc.
- Reply-To: "green at cygnus dot com" <green at cygnus dot com>
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 libgcj.so and the instrumented one
goes in ser-dump.so, so under Linux at least, you just run MyProgram like
so....
$ LD_PRELOAD=ser-dump.so MyProgram
...to get the new behaviour with zero overhead otherwise.
AG