[aspectc-user] Source files not changing

Olaf Spinczyk Olaf.Spinczyk at informatik.uni-erlangen.de
Mon Nov 21 09:36:56 CET 2005


Hi Dimple,

Dimple wrote:
> Hi Olaf,
> 
>>-----Original Message-----
>>From: Olaf Spinczyk [mailto:Olaf.Spinczyk at informatik.uni-erlangen.de]
>>Sent: Friday, November 18, 2005 8:28 AM
>>To: dkaul at isis.vanderbilt.edu
>>Cc: aspectc-user at aspectc.org
>>Subject: Re: [aspectc-user] Source files not changing
>>
>>HI,
>>
>>Dimple wrote:
>>>Hi Olaf,
>>>Does size of executable increase when you introduce aspect's. Also with
>>the
>>>following option :
>>>     ASPECT_PATH=$HOME/aspect/ac-1.0pre1
>>>     export "CXX=$ASPECT_PATH/ag++ -p $ACE_ROOT/ace --Xcompiler"
>>>and using of normal make file in ACE.
>>>Source file is not changing. Is it okay that source file is not
>>changing.
>>>But I can see aspect weaver is weaving my code when I run my make file.
>>>
>>>Also I want to say is that I is faster than previous version of
>>AspectC++.
>>>Thanks,
>>>Dimple Kaul
>>aspect code of course affects the size of the generated executables. You
>>should be able to observe a changed size of libACE.so.xxx. Use the
>>'size' command. The size of test programs will only differ if there are
>>join points with a location in header files, because the library is
>>normally linked dynamically.
>>
>>Your optimization aspect might even reduce the size but it is rather
>>unlikely that the size will remain *exactly* the same.
>>
>>Best regards,
>>
>>Olaf
> 
> One question, I am removing indirections in my class hierarchy using
> aspectc++ to optimize my code.
> But if size of executable size is increased won't it affect performance of
> my application. Is their a way to reduce run time checks in executable?
> Also I tried using -d option in ag++ to see how my source code is affected.
> What I noticed is that my source code was saved as *.acc file and these file
> were quite big.
> 
> Thanks,
> Dimple

although virtual functions are no longer called with dynamic dispatch 
(this should improve the performance), the target function is still a 
virtual function. Therefore, there is still a virtual function table. 
There is still a non-inline version of the code. There is still 
constructor code that initializes the virtual function table pointer in 
each object. Avoiding the dynamic dispatch when a virtual function is 
called does not mean that the code size will be reduced.

Due to the increased size you *might* also have a negative impact on the 
performance. However, I don't think that it will be bigger than the 
performance improvements. Eventually only measurements on real 
applications can show if I'm right.

- Olaf



More information about the aspectc-user mailing list