[Bug libstdc++/46347] Profile-mode executables too large

2010-11-11 Thread rus at google dot com
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=46347

--- Comment #1 from rus at google dot com 2010-11-11 23:14:45 UTC ---
The size difference of 100 KB on small tests is actually expected.  The vector
instantiation will trigger instantiation of several profile analysis methods. 
All these methods use internally unordered_map and some use other standard
library components.  I don't know a good way to avoid this.

The compilation time is much higher as well.  The precompiled sources increase
from 5,000 lines to 31,000 lines.  I wonder if this can be reduced somehow.

However, this is a toy example.  I measured binary sizes on medium size
binaries between 1 MB and 10 MB (built -O2 -g0).  The numbers are full binary
sizes, not just text size.  The profile-mode binaries are in between the
original ones and the debug-mode ones, which makes sense given that
profile-mode doesn't have as much coverage as debug-mode.

Paolo, could you please try to reproduce these ratios independently on a larger
binary?  Just to make sure it's not due to some linker mechanism turned on just
in my setup.

   Original   Profile Debug
Binary  1  8.0M  8.9M   11M
Binary  2  6.0M  6.6M  7.2M
Binary  3  1.5M  2.1M  2.6M
Binary  4  1.6M  2.2M  2.7M
Binary  5  1.6M  2.2M  2.7M
Binary  6  5.8M  6.4M  6.9M
Binary  7  5.9M  6.6M  7.1M
Binary  8  6.4M  7.0M  7.6M
Binary  9  6.0M  6.6M  7.2M
Binary 10  1.6M  2.2M  2.7M
Binary 11  1.7M  2.3M  2.8M
Binary 12  7.4M  8.3M  9.7M
Binary 13  1.5M  2.1M  2.6M
Binary 14  7.4M  8.2M  9.7M
Binary 15  1.5M  2.1M  2.6M
Binary 16  1.6M  2.1M  2.7M
Binary 17  1.6M  2.2M  2.7M
Binary 18  5.9M  6.5M  7.1M
Binary 19  6.0M  6.6M  7.2M
Binary 20  5.7M  6.2M  6.8M
Binary 21  1.5M  2.1M  2.6M
Binary 22  1.2M  1.6M  2.0M
Binary 23  7.6M  8.4M   11M
Binary 24  1.2M  1.7M  2.1M
Binary 25  7.5M  8.3M  9.9M
Binary 26  812K  1.2M  1.4M
Binary 27  1.5M  2.1M  2.6M
Binary 28  1.7M  2.3M  2.8M
Binary 29  8.0K  8.0K  8.0K
Binary 30  8.0K  8.0K  8.0K
Binary 31  8.0K  8.0K  8.0K
Binary 32  8.0K  8.0K  8.0K
Binary 33  1.4M  1.9M  2.4M
Binary 34  1.2M  1.8M  2.2M
Binary 35  1.3M  1.7M  2.1M
Binary 36  1.6M  2.2M  2.7M
Binary 37  812K  1.2M  1.4M
Binary 38  2.2M  2.8M  3.5M
Binary 39  1.1M  1.5M  1.8M
Binary 40  1.6M  2.2M  2.8M
Binary 41  1.7M  2.3M  2.8M
Binary 42  1.5M  2.1M  2.6M
Binary 43  8.0M  8.8M   11M
Binary 44  6.7M  7.3M  8.2M
Binary 45  1.6M  2.1M  2.7M
Binary 46  804K  1.2M  1.4M


[Bug libstdc++/43554] profile-mode version of forward_list missing

2010-10-03 Thread rus at google dot com
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=43554

--- Comment #7 from rus at google dot com 2010-10-03 07:06:26 UTC ---
Hello Paolo,

Thank you for the notification.  It's *much* easier to use debug mode as a
template than to start from scratch.

What is the time frame for 4.6.0?

For reference, what needs to be done at this point is a couple of new
diagnostics
1. forward_list to vector: if the only operations are insert_after last
element and iteration, and if the size is always about the same.
2. forward_list to deque: this needs a cost model.

Paolo, would it make sense to open tickets for other diagnostics as well,
even if it would take me a while to close them?  Maybe some student out
there will pick them if they're well defined.

Thank you,
Silvius


On Wed, Sep 29, 2010 at 5:01 AM, paolo.carlini at oracle dot com 
gcc-bugzi...@gcc.gnu.org wrote:

 http://gcc.gnu.org/bugzilla/show_bug.cgi?id=43554

 --- Comment #6 from Paolo Carlini paolo.carlini at oracle dot com
 2010-09-29 12:01:16 UTC ---
 The debug-mode bits are now in. It would be nice to have the profile-mode
 bits
 too for 4.6.0...

 --
 Configure bugmail: http://gcc.gnu.org/bugzilla/userprefs.cgi?tab=email
 --- You are receiving this mail because: ---
 You are the assignee for the bug.



[Bug libstdc++/43554] profile-mode version of forward_list missing

2010-10-03 Thread rus at google dot com
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=43554

--- Comment #8 from rus at google dot com 2010-10-03 07:40:42 UTC ---
Hello Paolo,

Thank you for the notification.  It's *much* easier to use debug mode as a
template than to start from scratch.

What is the time frame for 4.6.0?

For reference, what needs to be done at this point is a couple of new
diagnostics
1. forward_list to vector: if the only operations are insert_after last
element and iteration, and if the size is always about the same.
2. forward_list to deque: this needs a cost model.

Paolo, would it make sense to open tickets for other diagnostics as well,
even if it would take me a while to close them?  Maybe some student out
there will pick them if they're well defined.

Thank you,
Silvius


On Wed, Sep 29, 2010 at 5:01 AM, paolo.carlini at oracle dot com 
gcc-bugzi...@gcc.gnu.org wrote:

 http://gcc.gnu.org/bugzilla/show_bug.cgi?id=43554

 --- Comment #6 from Paolo Carlini paolo.carlini at oracle dot com
 2010-09-29 12:01:16 UTC ---
 The debug-mode bits are now in. It would be nice to have the profile-mode
 bits
 too for 4.6.0...

 --
 Configure bugmail: http://gcc.gnu.org/bugzilla/userprefs.cgi?tab=email
 --- You are receiving this mail because: ---
 You are the assignee for the bug.



[Bug libstdc++/44630] profiler_trace.h defines functions __max and __min which causes portability problems

2010-06-22 Thread rus at google dot com


--- Comment #8 from rus at google dot com  2010-06-23 00:29 ---
Subject: Re:  profiler_trace.h defines functions __max 
and __min which causes portability problems

On Tue, Jun 22, 2010 at 7:10 AM, paolo dot carlini at oracle dot com
gcc-bugzi...@gcc.gnu.org wrote:


 --- Comment #4 from paolo dot carlini at oracle dot com  2010-06-22 14:10 
 ---
 I can do this, I noticed it already a couple of weeks ago, but didn't consider
 it high priority because didn't know about the BAD names issue.

I am on a leave and will not be able to take care of it before 6/30.
If it can wait, I'll be glad to do it then.  Sorry for the trouble.

Silvius


-- 


http://gcc.gnu.org/bugzilla/show_bug.cgi?id=44630



[Bug libstdc++/43259] ext/profile/all.cc fails on Solaris

2010-05-07 Thread rus at google dot com


--- Comment #23 from rus at google dot com  2010-05-07 17:49 ---
Subject: Re:  ext/profile/all.cc fails on Solaris

On Thu, May 6, 2010 at 11:53 PM, kgardas at objectsecurity dot com
gcc-bugzi...@gcc.gnu.org wrote:


 --- Comment #22 from kgardas at objectsecurity dot com  2010-05-07 06:53 
 ---
 Viola! Something happens now! Thanks for fixing this.

Great!  Sure, no problem.  Let me know if you need help with anything
in the profile extension.  In particular, let me know if there's a
class of diagnostics you'd like added to the few ones already there,
or if you find bugs in the current diagnostics.

Silvius


-- 


http://gcc.gnu.org/bugzilla/show_bug.cgi?id=43259



[Bug libstdc++/43259] ext/profile/all.cc fails on Solaris

2010-05-06 Thread rus at google dot com


--- Comment #20 from rus at google dot com  2010-05-06 19:43 ---
(In reply to comment #19)
 Note that in all those patches, the open curly brackets are in the wrong 
 place:
 in GCC, C++ runtime included, must *always* follow a newline. Just stylistic
 issues, of course.
 

Thank you for pointing that out.  I'll go ahead and make changes throughout the
profile extension -- though I'll do it in a separate changelist.


-- 


http://gcc.gnu.org/bugzilla/show_bug.cgi?id=43259



[Bug libstdc++/43259] ext/profile/all.cc fails on Solaris

2010-05-05 Thread rus at google dot com


--- Comment #17 from rus at google dot com  2010-05-06 02:03 ---
Created an attachment (id=20574)
 -- (http://gcc.gnu.org/bugzilla/attachment.cgi?id=20574action=view)
Wrote custom algos, removed include algorithm, minor fixes.

This should fix several issues.  I still see failing tests but they all seem to
be either synopsis.cc which have been failing for a while, or failures related
to my system/config (only runtime backtrace failures).  Could you please try
this patch and let me know if it fixes this issue and does not introduce
regressions for you.


-- 

rus at google dot com changed:

   What|Removed |Added

  Attachment #20559|0   |1
is obsolete||


http://gcc.gnu.org/bugzilla/show_bug.cgi?id=43259



[Bug libstdc++/43259] ext/profile/all.cc fails on Solaris

2010-05-05 Thread rus at google dot com


--- Comment #18 from rus at google dot com  2010-05-06 02:18 ---
Created an attachment (id=20575)
 -- (http://gcc.gnu.org/bugzilla/attachment.cgi?id=20575action=view)
Minor fix to previous patch.

Here's a minor fix.  It will not affect tests, but just in case you're trying
it for real, this fixes diagnostic sorting, which had gotten broken in the last
patch.


-- 


http://gcc.gnu.org/bugzilla/show_bug.cgi?id=43259



[Bug libstdc++/43259] ext/profile/all.cc fails on Solaris

2010-05-04 Thread rus at google dot com


--- Comment #14 from rus at google dot com  2010-05-05 03:08 ---
Created an attachment (id=20559)
 -- (http://gcc.gnu.org/bugzilla/attachment.cgi?id=20559action=view)
use ext/concurrence __mutex instead of pthread_mutex_t

Could you please try this patch out on your system?  It appears to work on the
few examples I tried on linux x86_64.

[Many tests are currently broken in profile mode so I can't test it
thoroughly.]


-- 


http://gcc.gnu.org/bugzilla/show_bug.cgi?id=43259



[Bug libstdc++/43554] profile-mode version of forward_list missing

2010-05-03 Thread rus at google dot com


--- Comment #2 from rus at google dot com  2010-05-03 22:46 ---
It's not clear from the description what the problem is here.  The profile mode
doesn't instrument either forward_list or slist at this point, so all
inclusions of forward_list should fall back to normal mode.

Could you please clarify the problem?


-- 

rus at google dot com changed:

   What|Removed |Added

 Status|ASSIGNED|WAITING


http://gcc.gnu.org/bugzilla/show_bug.cgi?id=43554



[Bug libstdc++/43554] profile-mode version of forward_list missing

2010-05-03 Thread rus at google dot com


--- Comment #4 from rus at google dot com  2010-05-03 23:12 ---
Oh, OK.  I misunderstood.  Then let's keep it open to track the addition of new
modules including forward_list.


-- 


http://gcc.gnu.org/bugzilla/show_bug.cgi?id=43554



[Bug libstdc++/43259] ext/profile/all.cc fails on Solaris

2010-04-28 Thread rus at google dot com


--- Comment #13 from rus at google dot com  2010-04-28 19:06 ---
Subject: Re:  ext/profile/all.cc fails on Solaris

On Wed, Apr 28, 2010 at 11:36 AM, ro at gcc dot gnu dot org
gcc-bugzi...@gcc.gnu.org wrote:


 --- Comment #12 from ro at gcc dot gnu dot org  2010-04-28 18:36 ---
 Any progress on this?  The bug is open for almost 2 months now.


I looked at it already, but it wasn't the quick fix I expected.  I did
not anticipate having to support systems without static mutex
initialization.  Will fix it one way or another soon.

Silvius


-- 


http://gcc.gnu.org/bugzilla/show_bug.cgi?id=43259



[Bug libstdc++/43554] profile-mode version of forward_list missing

2010-03-28 Thread rus at google dot com


--- Comment #1 from rus at google dot com  2010-03-28 22:58 ---
Subject: Re:  profile-mode version of forward_list 
missing

On Sun, Mar 28, 2010 at 3:36 AM, paolo dot carlini at oracle dot com
gcc-bugzi...@gcc.gnu.org wrote:


 --

 paolo dot carlini at oracle dot com changed:

           What    |Removed                     |Added
 
             Status|UNCONFIRMED                 |NEW
     Ever Confirmed|0                           |1
   Last reconfirmed|-00-00 00:00:00         |2010-03-28 10:36:29
               date|                            |


 http://gcc.gnu.org/bugzilla/show_bug.cgi?id=43554

 --- You are receiving this mail because: ---
 You are on the CC list for the bug, or are watching someone who is.


Hello Paolo,

Could you please assign it to me.  (Also feel free to assign any other
unclaimed profile mode bugs to me, current or future.)

Thank you,
Silvius


-- 


http://gcc.gnu.org/bugzilla/show_bug.cgi?id=43554



[Bug libstdc++/43259] ext/profile/all.cc fails on Solaris

2010-03-20 Thread rus at google dot com


--- Comment #8 from rus at google dot com  2010-03-21 04:52 ---
Good point. I don't think that setenv should be there in the first place
actually.  I'll try to fix that as well.

Just FYI, I'm planning to fix all the reported libstdc++ profile issues around
second week of April.


-- 


http://gcc.gnu.org/bugzilla/show_bug.cgi?id=43259