This is the mail archive of the java@gcc.gnu.org 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]
Other format: [Raw text]

Re: Small footprint on Embedded system


Jeff Sturm wrote:
Speaking of that... has anyone ever looked at the dwarf2 output of gcj?
It doesn't affect runtime footprint, but much of the bloated size of
libgcj.so has to do with emitting debug info for every class referenced
directly or indirectly from a source file.

I tried [a quick hac], but gdb didn't handle it well.
I think you're on the right track, but you go too far.  I believe
we want to set TYPE_DECL_SUPPRESS_DEBUG (TDECL) to 0 if TDECL is the
declaration for a class defined in the current compilation unit,
and 1 if the class is defined elsewhere.

You might try adding this somewhere in push_class:

  TYPE_DECL_SUPPRESS_DEBUG (decl) = 1;

and to undo this for classes we're actually compiling,
in make_class_data add:

  TYPE_DECL_SUPPRESS_DEBUG (TYPE_NAME (type)) = 0;
--
	--Per Bothner
per@bothner.com   http://www.bothner.com/per/


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