<?xml version="1.0" encoding="UTF-8"?>
<rss xmlns:content="http://purl.org/rss/1.0/modules/content/" xmlns:taxo="http://purl.org/rss/1.0/modules/taxonomy/" xmlns:opensearch="http://a9.com/-/spec/opensearch/1.1/" xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:wfw="http://wellformedweb.org/CommentAPI/" xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#" xmlns:clearspace="http://www.jivesoftware.com/xmlns/clearspace/rss" version="2.0">
  <channel>
    <title>Commercial Computing with C/C++</title>
    <link>http://www-949.ibm.com/software/rational/cafe/blogs/ccpp-commercial</link>
    <description>Comment Feed for Commercial Computing with C/C++</description>
    <pubDate>Thu, 05 Nov 2009 22:33:07 GMT</pubDate>
    <generator>Clearspace 1.10.7 (http://jivesoftware.com/products/clearspace/)</generator>
    <dc:date>2009-11-05T22:33:07Z</dc:date>
    <item>
      <title>RE:&amp;nbsp;METAL C Compiler Option in z/OS</title>
      <link>http://www-949.ibm.com/software/rational/cafe/blogs/ccpp-commercial/2009/02/05/metal-c-compiler-option-in-zos#comments-1796</link>
      <description>Hi,&lt;br /&gt;
&lt;br /&gt;
What you plan to do should work. Provided you'll reload r12 with the initial 64-bit token returned from __cinit before you invoke malloc, free, __cterm, etc. I suppose you already knew how to do that from the example in Chapter 3 in Metal C Programming Guide and Reference. Mixing LE programs and Metal C programs requires your understanding on the difference in environmental requirements. R12 is one in particular that LE side of the program depends on.&lt;br /&gt;
&lt;br /&gt;
You can build such code in JCL with the proper options, e.g. Metal, GENASM, LP64, etc. The only requirement is that you compile 31-bit and 64-bit Metal code in separate steps.&lt;br /&gt;
&lt;br /&gt;
If you are looking for larger virtual storage for your data, I just want to point out that there are couple more choices in addition to use Metal C malloc. You can explore using the far pointers to address data in data spaces. You can also use MVS services directly to have full control over how and where you want to allocated your storage to avoid the need to tie down R12 when you use __cinit/__cterm.&lt;br /&gt;
&lt;br /&gt;
In terms of the data set up for __cinit, unless you want to specify subpool, I think you can set all fields to 0. You may want to override the default initial heap size and increment size to tune malloc performance.&lt;br /&gt;
&lt;br /&gt;
Hope you have fun with this. If you have further questions you are welcome to contact me directly using my email address which you can find in my profile.</description>
      <pubDate>Thu, 05 Nov 2009 22:33:07 GMT</pubDate>
      <author>chwan</author>
      <guid>http://www-949.ibm.com/software/rational/cafe/blogs/ccpp-commercial/2009/02/05/metal-c-compiler-option-in-zos#comments-1796</guid>
      <dc:date>2009-11-05T22:33:07Z</dc:date>
    </item>
    <item>
      <title>RE:&amp;nbsp;METAL C Compiler Option in z/OS</title>
      <link>http://www-949.ibm.com/software/rational/cafe/blogs/ccpp-commercial/2009/02/05/metal-c-compiler-option-in-zos#comments-1794</link>
      <description>Hello Raym,&lt;br /&gt;
&lt;br /&gt;
we want to use Metal C to create a 31-bit C routine that will be called from a 31-bit Z/OS PL/1 program in a Z/OS Batch JOB using JCL.&lt;br /&gt;
&lt;br /&gt;
using an Metal C environment handle, we want to call the C routine in the following entry points:&lt;br /&gt;
&lt;ul class="jive-dash"&gt;
&lt;li&gt;Create a Metal C environment, returning the handle( using the __cinit function&lt;/li&gt;
&lt;li&gt;passing the handle, allocate 64-bit very large buffer(using the A-mode switching feature provided from Z/OS v&amp;#38; rel 10 onwards, returning to the PL/1 program a 8 byte value containing the allocated pointer&lt;/li&gt;
&lt;/ul&gt;
-passing the handle and the 8 byte value containing the pointer and the address of a 31 bit adress of Buffer in the PL/1 program + its length,&lt;br /&gt;
a function to copy that storage into the gotten 64-bit buffer&lt;br /&gt;
-likewise a function to retrieve storage from the 64-bit buffer based on a key&lt;br /&gt;
&lt;ul class="jive-dash"&gt;
&lt;li&gt;finally a function to release the Metal C environment, freeing the 64-bit very large buffer&lt;/li&gt;
&lt;/ul&gt;
&lt;br /&gt;
Looked at the Metal C doc  a few things are unclear to me:&lt;br /&gt;
-A-Mode switching sample build + parms is under uss, I assume equivalent JCL can build a Load module under a PDSE, linking the PL/1 and Metal C routines together&lt;br /&gt;
&lt;ul class="jive-dash"&gt;
&lt;li&gt;what needs to be coded in the _cinit and __cterm routines.&lt;/li&gt;
&lt;/ul&gt;
&lt;br /&gt;
Looking for an expert able to help out</description>
      <pubDate>Wed, 04 Nov 2009 12:57:05 GMT</pubDate>
      <author>alainatogc</author>
      <guid>http://www-949.ibm.com/software/rational/cafe/blogs/ccpp-commercial/2009/02/05/metal-c-compiler-option-in-zos#comments-1794</guid>
      <dc:date>2009-11-04T12:57:05Z</dc:date>
    </item>
    <item>
      <title>RE:&amp;nbsp;Demistifying zOS Include files</title>
      <link>http://www-949.ibm.com/software/rational/cafe/blogs/ccpp-commercial/2009/10/15/demistifying-zos-include-files#comments-1788</link>
      <description>-I command line option is treated as it it were -qsearch and for most purposes are interchangeable.&lt;br /&gt;
&lt;br /&gt;
You may convince yourself of this by running the xlc command with -v flag:&lt;br /&gt;
&lt;br /&gt;
{quote}&lt;br /&gt;
$ xlc  -I. -v test.c&lt;br /&gt;
...object(./test.o),-qnosearch,SEARCH(.),SEARCH(//'tsctest...&lt;br /&gt;
{qoute}&lt;br /&gt;
&lt;br /&gt;
Volodymyr</description>
      <pubDate>Thu, 15 Oct 2009 12:41:02 GMT</pubDate>
      <author>VolodymyrPaprotski</author>
      <guid>http://www-949.ibm.com/software/rational/cafe/blogs/ccpp-commercial/2009/10/15/demistifying-zos-include-files#comments-1788</guid>
      <dc:date>2009-10-15T12:41:02Z</dc:date>
    </item>
    <item>
      <title>RE:&amp;nbsp;Demistifying zOS Include files</title>
      <link>http://www-949.ibm.com/software/rational/cafe/blogs/ccpp-commercial/2009/10/15/demistifying-zos-include-files#comments-1787</link>
      <description>Hello,&lt;br /&gt;
&lt;br /&gt;
This is great information!&lt;br /&gt;
&lt;br /&gt;
How do command-line options such as "-I &amp;lt;directoryName&amp;gt;" specified when the compiler is invoked (through a USS command shell or even from a Makefile) factor into the mix ?&lt;br /&gt;
&lt;br /&gt;
Tim Hahn</description>
      <pubDate>Thu, 15 Oct 2009 12:16:29 GMT</pubDate>
      <author>timhahn</author>
      <guid>http://www-949.ibm.com/software/rational/cafe/blogs/ccpp-commercial/2009/10/15/demistifying-zos-include-files#comments-1787</guid>
      <dc:date>2009-10-15T12:16:29Z</dc:date>
    </item>
    <item>
      <title>RE:&amp;nbsp;A quick one on SEARCH/NOSEARCH</title>
      <link>http://www-949.ibm.com/software/rational/cafe/blogs/ccpp-commercial/2009/07/25/a-quick-one-on-searchnosearch#comments-1786</link>
      <description>As promissed, I have created a post &lt;a class="jive-link-external" href="http://www-949.ibm.com/software/rational/cafe/blogs/ccpp-commercial/2009/10/14/demistifying-zos-include-files"&gt;here&lt;/a&gt; on zOS Include files and their options.</description>
      <pubDate>Wed, 14 Oct 2009 21:28:38 GMT</pubDate>
      <author>VolodymyrPaprotski</author>
      <guid>http://www-949.ibm.com/software/rational/cafe/blogs/ccpp-commercial/2009/07/25/a-quick-one-on-searchnosearch#comments-1786</guid>
      <dc:date>2009-10-14T21:28:38Z</dc:date>
    </item>
    <item>
      <title>RE:&amp;nbsp;Speedy debugging on z/OS</title>
      <link>http://www-949.ibm.com/software/rational/cafe/blogs/ccpp-commercial/2008/11/21/speedy-debugging-on-zos#comments-1634</link>
      <description>Hi Evandras, &lt;br /&gt;
&lt;br /&gt;
Can you please send the PMR numbers to me at kjarrey@ca.ibm.com ?&lt;br /&gt;
&lt;br /&gt;
Thanks, &lt;br /&gt;
&lt;br /&gt;
Kelly Arrey&lt;br /&gt;
&lt;br /&gt;
IBM z/OS XL C/C++ Release Manager</description>
      <pubDate>Fri, 14 Aug 2009 13:16:54 GMT</pubDate>
      <author>kelly.arrey</author>
      <guid>http://www-949.ibm.com/software/rational/cafe/blogs/ccpp-commercial/2008/11/21/speedy-debugging-on-zos#comments-1634</guid>
      <dc:date>2009-08-14T13:16:54Z</dc:date>
    </item>
    <item>
      <title>RE:&amp;nbsp;Speedy debugging on z/OS</title>
      <link>http://www-949.ibm.com/software/rational/cafe/blogs/ccpp-commercial/2008/11/21/speedy-debugging-on-zos#comments-1633</link>
      <description>Hi &lt;br /&gt;
&lt;br /&gt;
For month we try to debug via "dbx" with the remote debug option, large C/C++ projects from USS&lt;br /&gt;
Till now without sucess, we have opened several PMR's. &lt;br /&gt;
We are very interested about the "dbgld".&lt;br /&gt;
As I heard ithe "dbx" will support it from z/OS 1.11</description>
      <pubDate>Fri, 14 Aug 2009 08:18:10 GMT</pubDate>
      <author>evandras</author>
      <guid>http://www-949.ibm.com/software/rational/cafe/blogs/ccpp-commercial/2008/11/21/speedy-debugging-on-zos#comments-1633</guid>
      <dc:date>2009-08-14T08:18:10Z</dc:date>
    </item>
    <item>
      <title>RE:&amp;nbsp;TOC Overflow: Getting help from the XL compilers</title>
      <link>http://www-949.ibm.com/software/rational/cafe/blogs/ccpp-commercial/2009/04/19/toc-overflow-getting-help-from-the-xl-compilers#comments-1571</link>
      <description>I'm not sure what you mean by component.  I think you mean a component is the output of a link step.  If so, yes use one registry for each component.  Think of the registry as a database that keeps track of where a template has been instantiated.  To avoid unresolved symbols, all of the .o files the registry knows about (i.e. .o files that contain instantiations) would need to be included in the link step.&lt;br /&gt;
&lt;br /&gt;
You don't need to use the -qtemprecompile option.  It is on by default.  &lt;br /&gt;
&lt;br /&gt;
An incremental build is a build you do after changing a few files.  Make will only recompile the source files that are needed to update the out of date .o files. &lt;br /&gt;
&lt;br /&gt;
The -qtemplateregistry option will help compile time more than run time at any level of optimization.  The higher levels of optimization will be able to discover most of the duplication that -qtenplateregistry would find.  It really comes down to either avoiding the extra code up front or letting the compiler discover it.</description>
      <pubDate>Wed, 03 Jun 2009 15:52:57 GMT</pubDate>
      <author>Sean_Perry</author>
      <guid>http://www-949.ibm.com/software/rational/cafe/blogs/ccpp-commercial/2009/04/19/toc-overflow-getting-help-from-the-xl-compilers#comments-1571</guid>
      <dc:date>2009-06-03T15:52:57Z</dc:date>
    </item>
    <item>
      <title>RE:&amp;nbsp;TOC Overflow: Getting help from the XL compilers</title>
      <link>http://www-949.ibm.com/software/rational/cafe/blogs/ccpp-commercial/2009/04/19/toc-overflow-getting-help-from-the-xl-compilers#comments-1563</link>
      <description>Yes, the build does work with neither qtempinc nor qtemplateregistry.  The template instantiations are only defined in one lib but when i used tempinc it was putting the symbols to be exported for each template instantiation into the pfactimf.o file (the template class itself object file in the tempinc directory).  &lt;br/&gt;
&lt;br/&gt;
&lt;a class="jive-link-adddocument" href="http://www-949.ibm.com/software/rational/cafe/community-document-picker.jspa?communityID=&amp;subject=quote+sean+perry"&gt;quote sean perry&lt;/a&gt;&lt;br/&gt;
I would recommend one registry per shared library and to not use a registry when building the static libraries. You can add the -qfuncsect option to all the compile commands to help eliminate the extra duplicate instantiations in the static libraries.&lt;br/&gt;
&lt;a class="jive-link-adddocument" href="http://www-949.ibm.com/software/rational/cafe/community-document-picker.jspa?communityID=&amp;subject=end+quote"&gt;end quote&lt;/a&gt;&lt;br/&gt;
&lt;br/&gt;
So you're saying if you use templateregistry you use it only one per component?  What I'm concerned about is the examples and the way tempinc works would lead me to believe that for templateregistry you would have to do the same thing, so that the templateregistry has the symbols defined in there, and then you link your executables into that lib so that it can find them at runtime.&lt;br/&gt;
&lt;br/&gt;
I am okay without funcsect at least at first and I had tried to use -qtemplateregistry -qtemprecompile or what have you the first time I did it because that seemed like what was the "recommended" combination. You said "The -qtemplateregistry option can cause recompiles during the link step, but those are rarer and only happen when doing an incremental make."  I am not sure what you mean by an incremental make here; I am doing an incremental build of components and then they sometimes need other components' template instantiations inside them.   In the end the executables are built and must be able to find everything, we are using the runtime-linking option so I don't know about some things until I try to boot it.  I can understand some motivation for moving to static libs but the executables would be very large, I think +100MB and link times are slow for that.  Also I would have to figure out all the 3rd party linking again and the last few things I figured out were not too fun.&lt;br/&gt;
&lt;br/&gt;
 I am going to try to create another build using templateregistry and just keep the current build as a backup of a working O5 build. Do you think though that this method of template instantiation will really have a measurable impact on performance over just using the best optimization?</description>
      <pubDate>Wed, 27 May 2009 12:44:54 GMT</pubDate>
      <author>reganjeremy</author>
      <guid>http://www-949.ibm.com/software/rational/cafe/blogs/ccpp-commercial/2009/04/19/toc-overflow-getting-help-from-the-xl-compilers#comments-1563</guid>
      <dc:date>2009-05-27T12:44:54Z</dc:date>
    </item>
    <item>
      <title>RE:&amp;nbsp;TOC Overflow: Getting help from the XL compilers</title>
      <link>http://www-949.ibm.com/software/rational/cafe/blogs/ccpp-commercial/2009/04/19/toc-overflow-getting-help-from-the-xl-compilers#comments-1561</link>
      <description>Does your build work without -qtempinc or -qtemplateregistry?  The first tricky issues I see is making sure that your singletons that are template instantiations are only defined in one shared library.  By defined, I am talking about at the object file level.  You want to make sure the that the singletons are only defined and exported from one shared library and that the rest import that definition.  Once all that is straight adding in -qtemplateregistry should be fairly simple.  I would recommend one registry per shared library and to not use a registry when building the static libraries.  You can add the -qfuncsect option to all the compile commands to help eliminate the extra duplicate instantiations in the static libraries.&lt;br /&gt;
&lt;br /&gt;
I'd recommend using -qtemplateregistry over -qtempinc.  As you have noticed, -qtempinc requires source changes to use it and can have problems when linking.  The -qtemplateregistry option can cause recompiles during the link step, but those are rarer and only happen when doing an incremental make.</description>
      <pubDate>Tue, 26 May 2009 16:07:39 GMT</pubDate>
      <author>Sean_Perry</author>
      <guid>http://www-949.ibm.com/software/rational/cafe/blogs/ccpp-commercial/2009/04/19/toc-overflow-getting-help-from-the-xl-compilers#comments-1561</guid>
      <dc:date>2009-05-26T16:07:39Z</dc:date>
    </item>
    <item>
      <title>RE:&amp;nbsp;Compilers, what they might do ...</title>
      <link>http://www-949.ibm.com/software/rational/cafe/blogs/ccpp-commercial/2008/11/23/compilers-what-they-might-do-#comments-1560</link>
      <description>Add TEMPLATEREGISTRY to that list of template options.  The template registry solves many of the problems that TEMPINC had.  The most notable improvement is template registry doesn't require reorganizing your source.  I'd suggest using TEMPLATEREGISTRY over TEMPINC and migrating to TEMPLATEREGISTRY if you are using TEMPINC.</description>
      <pubDate>Tue, 26 May 2009 14:14:47 GMT</pubDate>
      <author>Sean_Perry</author>
      <guid>http://www-949.ibm.com/software/rational/cafe/blogs/ccpp-commercial/2008/11/23/compilers-what-they-might-do-#comments-1560</guid>
      <dc:date>2009-05-26T14:14:47Z</dc:date>
    </item>
    <item>
      <title>RE:&amp;nbsp;TOC Overflow: Getting help from the XL compilers</title>
      <link>http://www-949.ibm.com/software/rational/cafe/blogs/ccpp-commercial/2009/04/19/toc-overflow-getting-help-from-the-xl-compilers#comments-1559</link>
      <description>Sorry one additional piece of information, the current AIX build times are about:&lt;br /&gt;
&lt;br /&gt;
No optimization:&lt;br /&gt;
&lt;br /&gt;
3 hours&lt;br /&gt;
&lt;br /&gt;
O3 optimization, no qipa:&lt;br /&gt;
&lt;br /&gt;
6 hours&lt;br /&gt;
&lt;br /&gt;
O5 optimization:&lt;br /&gt;
&lt;br /&gt;
30 hours</description>
      <pubDate>Tue, 26 May 2009 13:18:07 GMT</pubDate>
      <author>reganjeremy</author>
      <guid>http://www-949.ibm.com/software/rational/cafe/blogs/ccpp-commercial/2009/04/19/toc-overflow-getting-help-from-the-xl-compilers#comments-1559</guid>
      <dc:date>2009-05-26T13:18:07Z</dc:date>
    </item>
    <item>
      <title>RE:&amp;nbsp;TOC Overflow: Getting help from the XL compilers</title>
      <link>http://www-949.ibm.com/software/rational/cafe/blogs/ccpp-commercial/2009/04/19/toc-overflow-getting-help-from-the-xl-compilers#comments-1558</link>
      <description>Hi Sean&lt;br /&gt;
&lt;br /&gt;
I think I can describe the code structure only to a point but I think enough for understanding.  There is a root-level directory and then each folder in there is either a library or a server but each server can share many of the other libraries.  So in the makefiles there is a generic "target" for each component and then a list of the libs it depends on.  This list is used for both the includes in the compile step and the libs in the link step.&lt;br /&gt;
&lt;br /&gt;
When I used tempinc what I did was I specified this one area ../tempinc from each component so that the libs and the servers both shared the same tempinc stuff.  I divided up our lowest level template class as a test into the .c and .h format; this is a persistent object factory class.  It looked good to me and what tipped me off is how I determined that as I went up the components in the list, it was building onto the file and what would fail to compile was due to missing symbols from #include files that could be reached from a particular template class instantiation.  The tempinc/pfactimf.o it was building got to be about 50 megs by the time I gave up.  Another factor is that I had to change the makefiles in new ways because a side effect of that incremental building is how it now links against an object file that has symbols from every other template class instantiation before it.  This is not desirable and when I explained this to one of our senior architects he said he did not like this approach and he actually knew it would involve changing the makefiles this way before I told him about it.  He recommended trying one with -qnotempinc I think also and that one did not work either for me.  &lt;br /&gt;
&lt;br /&gt;
What happens is this template class has static methods in it and they are using a class-local singleton to access stuff that would be instantiated with the class when a concrete implementation calls the method.  In the case of -qnotempinc and with -qtemplateregistry, the servers would fail to start up giving an unresolved external for each of the template instantiations that it needed but couldn't find.  I tried all sorts of permutations of changing if each component made its own templateregistry per folder, or using one big one in the source root, but they both yielded the same results.  What I realized is that I had some other build where I had introduced using -qmkshrobj and I thought it was only working for libraries but not for servers.  I found out though that it was working and this involves the least code changes of all, none! =)  When I used tempinc I only got about 50% through the makefiles and it had already taken me days to get there.  Not only that, but the link times were ridiculously getting longer and longer, up to an hour per component by the end.&lt;br /&gt;
&lt;br /&gt;
It is true that shared libraries complicates the template instantiation and you can see what I mean about how that is not a ready change here.  I think they originally went with the shared memory model for two main reasons:&lt;br /&gt;
&lt;br /&gt;
1) link time on solaris used to be astronomical even in its current state, we know compile times would be even longer now and we can not afford a 48-hour build on modern hardware when win32 build times are so short, usually 3 hours.&lt;br /&gt;
&lt;br /&gt;
2) ease of maintenance for delivering new shared libs&lt;br /&gt;
&lt;br /&gt;
I think another purpose and maybe the most important at least to me is the possibility that the shared lib memory model should be faster on the AIX kernel.  What I have been curious about as well is if all of the processes are sharing the libraries, then doesn't that mean there is contention there or does it generate a new copy?  And if so, then isn't managing the copies of the code expensive?&lt;br /&gt;
&lt;br /&gt;
Thanks for your assistance,&lt;br /&gt;
Jeremy</description>
      <pubDate>Tue, 26 May 2009 13:15:44 GMT</pubDate>
      <author>reganjeremy</author>
      <guid>http://www-949.ibm.com/software/rational/cafe/blogs/ccpp-commercial/2009/04/19/toc-overflow-getting-help-from-the-xl-compilers#comments-1558</guid>
      <dc:date>2009-05-26T13:15:44Z</dc:date>
    </item>
    <item>
      <title>RE:&amp;nbsp;TOC Overflow: Getting help from the XL compilers</title>
      <link>http://www-949.ibm.com/software/rational/cafe/blogs/ccpp-commercial/2009/04/19/toc-overflow-getting-help-from-the-xl-compilers#comments-1557</link>
      <description>Hi Jeremy.&lt;br /&gt;
&lt;br /&gt;
Let me try to address the issues you have seen.  Firstly, you noted that you need to pass the same compilation options to the link step as for compilation.  You don't have to always do this.  You only need to do this if the link step will, or could, result in a recompilation of a source file.  It appears that was happening for you.  The -qtemplateregistry is one option that can cause compilation during the linking process.  What options were you using?  The options that "need" to be passed to the link step will depend on the organization of your source code.  If an option must be specified (like some -D or -I option) then it should be included during the link step if that link step can cause a recompilation.&lt;br /&gt;
&lt;br /&gt;
You also mentioned about exploring the -qtempinc and -qtemplateregsitry options.  These options are independent.  I'll check out the manuals to make sure they don't say you can't use -qtemplateregistry unless the code compiles with -qtempinc and -qnotempinc.  The manuals should have an example of how to organize your code so you can use -qtempinc, -qnotempinc, -qtemplateregistry or another compiler's implicit instantiation method.  Most code that already compiles and links is ready to use -qtemplateregistry.  I think you should be able to use -qtemplateregistry without making any source changes.&lt;br /&gt;
&lt;br /&gt;
You mentioned you are building shared libraries.  These complicate managed template instantiation.  If you don't share object files that contain template instantiations between shared libraries then you can use the -qtemplateregistry option and use a different registry for each shared library.&lt;br /&gt;
&lt;br /&gt;
Finally, You can can use -qtemplateregistry with -qipa/-O4/-O5.</description>
      <pubDate>Mon, 25 May 2009 18:03:00 GMT</pubDate>
      <author>Sean_Perry</author>
      <guid>http://www-949.ibm.com/software/rational/cafe/blogs/ccpp-commercial/2009/04/19/toc-overflow-getting-help-from-the-xl-compilers#comments-1557</guid>
      <dc:date>2009-05-25T18:03:00Z</dc:date>
    </item>
    <item>
      <title>RE:&amp;nbsp;TOC Overflow: Getting help from the XL compilers</title>
      <link>http://www-949.ibm.com/software/rational/cafe/blogs/ccpp-commercial/2009/04/19/toc-overflow-getting-help-from-the-xl-compilers#comments-1555</link>
      <description>I was able to successfully use the -qipa=level=0 to solve this issue.  I ended up using the -O5 level for every component except two where I used this one in stead.  The follow-up issues were that with O5 the build takes about 35 hours which is a bit high but not bad if you just make a performance build at the end of all other development activities (I guess maybe another UAT run or something if it is considered a high risk but there do not seem to be any ill effects).  &lt;br /&gt;
&lt;br /&gt;
A main issue that I ran into was the use of the -qmkshrobj flag for the link step in stead of using makeC++SharedLib.  In this case, I had problems because we use a "template"-style makefile that builds the commands for each component automatically: compilation and then the link step.  In this case I found out I have to pass the library and includes exactly the same between compilation and linking or you have problems with template method instantiation.  It will look like it works but at runtime if you have template methods that do static methods or stuff like that then those methods will return null pointers.  &lt;br /&gt;
&lt;br /&gt;
Once I got the -qmkshrobj option working then I could finish the -O5 build.  We are currently now running performance tests and seeing a small improvement over O3 but maybe not enough to justify the longer compile time.  We are hoping to either use the Quantify tool or some of the run-time tuning stuff, or follow up with our IBM contact regarding kernel or scheduler tuning.  &lt;br /&gt;
&lt;br /&gt;
I looked for a long time at the -qtempinc and -qtemplaterepository link options but for one the tempinc required me to change too many makefiles and was very long compile times, I expected to add an extra week of effort to convert our app to use that style of template compilation.  The templaterepository I couldn't get to work on its own either and I think it will only work as it says in the migration guide that templaterepository will only work if tempinc and notempinc BOTH already work.  Also, perhaps you can respond as to whether or not it is really true that -qtemplaterepository negates the use of -qipa and how does this affect O4 and O5?  I am very interested in this piece of information.&lt;br /&gt;
&lt;p /&gt;
Thanks for your articles, very informative.&lt;br /&gt;
Jeremy</description>
      <pubDate>Fri, 22 May 2009 14:27:33 GMT</pubDate>
      <author>reganjeremy</author>
      <guid>http://www-949.ibm.com/software/rational/cafe/blogs/ccpp-commercial/2009/04/19/toc-overflow-getting-help-from-the-xl-compilers#comments-1555</guid>
      <dc:date>2009-05-22T14:27:33Z</dc:date>
    </item>
    <item>
      <title>RE:&amp;nbsp;Dealing with TOC overflow: the traditional approach</title>
      <link>http://www-949.ibm.com/software/rational/cafe/blogs/ccpp-commercial/2009/01/23/dealing-with-toc-overflow-the-traditional-approach#comments-1488</link>
      <description>Thank you very much for your time and valuable information.  I will update you on how it goes with the suggestions.</description>
      <pubDate>Mon, 20 Apr 2009 16:04:19 GMT</pubDate>
      <author>reganjeremy</author>
      <guid>http://www-949.ibm.com/software/rational/cafe/blogs/ccpp-commercial/2009/01/23/dealing-with-toc-overflow-the-traditional-approach#comments-1488</guid>
      <dc:date>2009-04-20T16:04:19Z</dc:date>
    </item>
    <item>
      <title>RE:&amp;nbsp;Dealing with TOC overflow: the traditional approach</title>
      <link>http://www-949.ibm.com/software/rational/cafe/blogs/ccpp-commercial/2009/01/23/dealing-with-toc-overflow-the-traditional-approach#comments-1487</link>
      <description>You're actually not very far away from the limit of the TOC. Are you linking with -qipa, or another option that implies -qipa? If not, I suggest you try linking with -qipa=level=0 and that should eliminate the overflow for you.&lt;br /&gt;
&lt;br /&gt;
Another alternative is to use -qminimaltoc on the largest source files you have; that will likely be enough to eliminate TOC overflow, and likely the performance will be better than what you're currently getting with -bbigtoc.&lt;br /&gt;
&lt;br /&gt;
About the Internal compiler error you saw before, that likely is a compiler bug. I would encourage&lt;br /&gt;
you to report it to IBM through your service channels.&lt;br /&gt;
&lt;br /&gt;
Also, about your question regarding -O5, yes basically -O5 is equivalent to -O3 -qhot -qipa=level=2 -qarch=auto</description>
      <pubDate>Mon, 20 Apr 2009 15:11:57 GMT</pubDate>
      <author>Raul_Silvera</author>
      <guid>http://www-949.ibm.com/software/rational/cafe/blogs/ccpp-commercial/2009/01/23/dealing-with-toc-overflow-the-traditional-approach#comments-1487</guid>
      <dc:date>2009-04-20T15:11:57Z</dc:date>
    </item>
    <item>
      <title>RE:&amp;nbsp;Dealing with TOC overflow: the traditional approach</title>
      <link>http://www-949.ibm.com/software/rational/cafe/blogs/ccpp-commercial/2009/01/23/dealing-with-toc-overflow-the-traditional-approach#comments-1485</link>
      <description>Some additional information... Here is the TOC warning we get currently:&lt;br /&gt;
&lt;br /&gt;
ld: 0711-783 WARNING: TOC overflow. TOC size: 71748     Maximum size: 65536&lt;br /&gt;
        Extra instructions are being generated for each reference to a TOC&lt;br /&gt;
        symbol if the symbol is in the TOC overflow area.&lt;br /&gt;
&lt;p /&gt;
This is an ERP system and the component is the reference classes for performing spending operations so this is a very critical component for spending.  Due to the inter-dependencies in spending logic this is also a difficult one to break up.</description>
      <pubDate>Mon, 20 Apr 2009 14:07:10 GMT</pubDate>
      <author>reganjeremy</author>
      <guid>http://www-949.ibm.com/software/rational/cafe/blogs/ccpp-commercial/2009/01/23/dealing-with-toc-overflow-the-traditional-approach#comments-1485</guid>
      <dc:date>2009-04-20T14:07:10Z</dc:date>
    </item>
    <item>
      <title>RE:&amp;nbsp;Dealing with TOC overflow: the traditional approach</title>
      <link>http://www-949.ibm.com/software/rational/cafe/blogs/ccpp-commercial/2009/01/23/dealing-with-toc-overflow-the-traditional-approach#comments-1484</link>
      <description>With O5 the component actually cannot compile at all, it gives&lt;br /&gt;
&lt;br /&gt;
1586-494 (U) INTERNAL COMPILER ERROR: Signal 11.&lt;br /&gt;
&lt;br /&gt;
What I have been doing is using O5 for all components that do not break with it, and then the few that it can't do I revert to O3.  We do use -qipa but have not seen significant gain from it, I think even less than the anticipated 10-15%.  I believe the main differences between O3 and O5 can also be added piecemeal with various options to the -qhot option as well is that correct?  It seems the problem with bigtoc does remain though.  Also, this is a very large application.  The components which fail to be under the threshold have maybe 100+ objects in that one library, each .cpp file associated with that object I would say is roughly 10k but there are some that are 50-60 and some that are over 100k for one source file.  We are also currently working with Ashu Gupta at IBM about our performance issues but since we have not specifically addressed bigtoc in the past with them I am still interested in your input.  Ashu has also indicated he will follow up with the bigtoc issue.</description>
      <pubDate>Mon, 20 Apr 2009 13:05:53 GMT</pubDate>
      <author>reganjeremy</author>
      <guid>http://www-949.ibm.com/software/rational/cafe/blogs/ccpp-commercial/2009/01/23/dealing-with-toc-overflow-the-traditional-approach#comments-1484</guid>
      <dc:date>2009-04-20T13:05:53Z</dc:date>
    </item>
    <item>
      <title>RE:&amp;nbsp;Dealing with TOC overflow: the traditional approach</title>
      <link>http://www-949.ibm.com/software/rational/cafe/blogs/ccpp-commercial/2009/01/23/dealing-with-toc-overflow-the-traditional-approach#comments-1483</link>
      <description>Thanks for your comment. If you compile and link with -O5 (or any other compiler option that implies -qipa), you should not see TOC overflow except for extremely large applications. Are you sure you're still getting TOC overflow even with -O5? The best way to check for that is to link with -O5 and not specify -bbigtoc: the linker will abort if you reach TOC overflow and did not specify -bbigtoc.&lt;br /&gt;
&lt;br /&gt;
If you did not link with -qipa in the past, I would suggest starting with -qipa=level=0, and moving up from there up to ipa=level=2, which is the level of IPA implied by -O5.</description>
      <pubDate>Mon, 20 Apr 2009 02:29:53 GMT</pubDate>
      <author>Raul_Silvera</author>
      <guid>http://www-949.ibm.com/software/rational/cafe/blogs/ccpp-commercial/2009/01/23/dealing-with-toc-overflow-the-traditional-approach#comments-1483</guid>
      <dc:date>2009-04-20T02:29:53Z</dc:date>
    </item>
    <item>
      <title>RE:&amp;nbsp;Dealing with TOC overflow: the traditional approach</title>
      <link>http://www-949.ibm.com/software/rational/cafe/blogs/ccpp-commercial/2009/01/23/dealing-with-toc-overflow-the-traditional-approach#comments-1472</link>
      <description>We do have an issue with this.  Currently we use the -bbigtoc option however we have lurking performance issues that I believe may be substantially due to the use of this option.  We are currently testing with -O3 and -O5 optimization levels and only seeing about 25% improvement, but still performance of our application vs. win32 is about only 55% where it should be over 100% with the hardware we are using.  The library that has the error thrown during compliation contains about 65 objects, each is very large with many symbols so we may end up breaking this library into smaller pieces but this is definitely a difficult task to do the dependency analysis and break it up.  I am very interested in learning more about other ways that the compiler has to deal with this issue if we can use those in stead of doing any breaking up of the library.</description>
      <pubDate>Wed, 15 Apr 2009 14:56:15 GMT</pubDate>
      <author>reganjeremy</author>
      <guid>http://www-949.ibm.com/software/rational/cafe/blogs/ccpp-commercial/2009/01/23/dealing-with-toc-overflow-the-traditional-approach#comments-1472</guid>
      <dc:date>2009-04-15T14:56:15Z</dc:date>
    </item>
    <item>
      <title>RE:&amp;nbsp;Compilers, what they might do ...</title>
      <link>http://www-949.ibm.com/software/rational/cafe/blogs/ccpp-commercial/2008/11/23/compilers-what-they-might-do-#comments-1368</link>
      <description>Since, I last posted I have done more selective optimization.  I have done it to debug functional problems, I have done it to get the performance back.  I have found #pragma option_override to be very useful.  So you see, I have not forgotten you.  Write me how has #pragma option_override made an impact on your application compile and run times.</description>
      <pubDate>Thu, 05 Feb 2009 15:40:51 GMT</pubDate>
      <author>Visda</author>
      <guid>http://www-949.ibm.com/software/rational/cafe/blogs/ccpp-commercial/2008/11/23/compilers-what-they-might-do-#comments-1368</guid>
      <dc:date>2009-02-05T15:40:51Z</dc:date>
    </item>
    <item>
      <title>RE:&amp;nbsp;Compilers, what they might do ...</title>
      <link>http://www-949.ibm.com/software/rational/cafe/blogs/ccpp-commercial/2008/11/23/compilers-what-they-might-do-#comments-1361</link>
      <description>Hi Visda. Don't forget me! By the way, I just reread your post. Why did you "want to disable optimization at the subprogram level"?</description>
      <pubDate>Wed, 04 Feb 2009 20:18:58 GMT</pubDate>
      <author>johnpm</author>
      <guid>http://www-949.ibm.com/software/rational/cafe/blogs/ccpp-commercial/2008/11/23/compilers-what-they-might-do-#comments-1361</guid>
      <dc:date>2009-02-04T20:18:58Z</dc:date>
    </item>
    <item>
      <title>RE:&amp;nbsp;Compilers, what they might do ...</title>
      <link>http://www-949.ibm.com/software/rational/cafe/blogs/ccpp-commercial/2008/11/23/compilers-what-they-might-do-#comments-1194</link>
      <description>Hello, John: Interesting questions!  Yes, in fact I am studying this at the moment.  I will write more soon.</description>
      <pubDate>Tue, 25 Nov 2008 03:34:59 GMT</pubDate>
      <author>Visda</author>
      <guid>http://www-949.ibm.com/software/rational/cafe/blogs/ccpp-commercial/2008/11/23/compilers-what-they-might-do-#comments-1194</guid>
      <dc:date>2008-11-25T03:34:59Z</dc:date>
    </item>
    <item>
      <title>RE:&amp;nbsp;Compilers, what they might do ...</title>
      <link>http://www-949.ibm.com/software/rational/cafe/blogs/ccpp-commercial/2008/11/23/compilers-what-they-might-do-#comments-1193</link>
      <description>HI Visda,The ability to pick and choose what you optimize is interesting.&lt;br /&gt;
&lt;br /&gt;
You said....."I wanted the entire compilation unit, CU, to be compiled at O3 except one, non-overloaded function. I used* #pragma option_override* to bump down the optimization level to O2 for that one function...." &lt;br /&gt;
&lt;br /&gt;
Did bumping down the optimization level for that one particular function make a big performance difference? What criteria did you use to decide to downlevel the optimization for that one function?</description>
      <pubDate>Mon, 24 Nov 2008 15:22:52 GMT</pubDate>
      <author>johnpm</author>
      <guid>http://www-949.ibm.com/software/rational/cafe/blogs/ccpp-commercial/2008/11/23/compilers-what-they-might-do-#comments-1193</guid>
      <dc:date>2008-11-24T15:22:52Z</dc:date>
    </item>
  </channel>
</rss>

