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: Code to dump serialized objects


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


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