This is the mail archive of the gcc-patches@gcc.gnu.org mailing list for the GCC 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: patch to emit debug into emitted classes


On Thu, Mar 10, 2005 at 03:12:05PM -0800, Per Bothner wrote:
> The attched patch suppresses debug into for classes that are
> not emitted.  Instead, we make use of the same "cross-reference
> stubs" mechanism used for C++.  The difference is huge:
> 
> $ ls -l libgcj.a libgcj.so.6.0.0 # before
> -rw-rw-r--  1 bothner bothner 154564856 Mar  1 00:11 libgcj.a
> -rwxrwxr-x  1 bothner bothner  72487975 Mar  1 00:09 libgcj.so.6.0.0
> $ ls -l libgcj.a libgcj.so.6.0.0 # after
> -rw-rw-r--  1 bothner bothner  54098170 Mar 10 14:10 libgcj.a
> -rwxrwxr-x  1 bothner bothner  32394412 Mar 10 14:05 libgcj.so.6.0.0
> 
> The question of course is how well gdb handles such stubs for Java
> code.  Could somebody try it out?  If it doesn't work, the savings
> are substantial enough that it might be worth fixing gdb, assuming
> that is doable.
> 
> If this works out, we might want this patch for 4.0 - the savings
> are worth it.

Did you examine the diffs in debug info?  I don't think your patch does
at all what you think it does:

> 	(finish_class): Enable debug output for classes we're emitting.

vs

> @@ -1904,6 +1905,7 @@ finish_class (void)
>    java_expand_catch_classes (current_class);
>  
>    current_function_decl = NULL_TREE;
> +  TYPE_DECL_SUPPRESS_DEBUG (TYPE_NAME (current_class)) = 1;
>    make_class_data (current_class);
>    register_class ();
>    rest_of_decl_compilation (TYPE_NAME (current_class), 1, 0);

-- 
Daniel Jacobowitz
CodeSourcery, LLC


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