http://gcc.gnu.org/bugzilla/show_bug.cgi?id=49578
Summary: Profiling: call graph table overflows on Solaris. Product: gcc Version: 4.6.1 Status: UNCONFIRMED Severity: normal Priority: P3 Component: other AssignedTo: unassig...@gcc.gnu.org ReportedBy: a153...@warme.net Created attachment 24631 --> http://gcc.gnu.org/bugzilla/attachment.cgi?id=24631 Patch to increase max num edges in profile call graph under Solaris. The Solaris implementation of profiling (-pg option) links in a special gmon.o file that defines the mcount() routine, and related functions. (On Solaris, mcount() does not reside in libc.so, so GCC must provide its own implementation.) This implementation of mcount() creates linked lists of nodes using an "unsigned short" as the link field to the next node. This places a hard limit of 65533 edges in the call graph of any program that is profiled -- a limitation that is easily exceeded by modern programs. The attached patch (made to the gcc-4.6.1 distribution) replaces the pertinent "unsigned short" fields with "unsigned int", and eliminates the upper bound when dynamically allocating the "tos" table. This enables profiling of large programs under Solaris. David Warme, Ph.D. Principal Computer Scientist Group W, Inc. Fairfax, VA 22031 USA