
Steven Watanabe wrote:
AMDG
Over the last few days, I've been working on a tool that counts the number of class template instantiations in a translation unit.
To use it from a jamfile
import profile_templates : : directory of the tool ; template-profile result : some_file.cpp : <include>some_directories ;
If everything works, this will create a file with the extension .tp which will contain the number of times each class template was instantiated, with the most common templates at the top.
I've put a zip of a rough version in the vault.
Steven, this sounds really interesting! I tried to test it out on your test program but get a lot of BBv2 errors, first off I had to change: import profile_templates ; to import ../profile_templates ; in the test/Jamfile.v2 otherwise I get an error from BB that it can't find "profile_templates". But then I see: c:/data/boost/boost/trunk/libs/profile_templates/test\../profile_templates.jam:32: in load *** argument error * rule path.make ( native ) * called with: ( ) * missing argument native c:/data/boost/boost/trunk/tools/build/v2/util\path.jam:44:see definition of rule 'make' being called c:/data/boost/boost/trunk/tools/build/v2/kernel\modules.jam:267: in modules.import c:/data/boost/boost/trunk/tools/build/v2/build\project.jam:847: in import Jamfile.v2:10: in modules.load c:/data/boost/boost/trunk/tools/build/v2/build\project.jam:307: in load-jamfile c:/data/boost/boost/trunk/tools/build/v2/build\project.jam:63: in load c:/data/boost/boost/trunk/tools/build/v2/build\project.jam:167: in project.find c:/data/boost/boost/trunk/tools/build/v2\build-system.jam:521: in load c:\data\boost\boost\trunk\tools\build\v2/kernel\modules.jam:267: in import c:\data\boost\boost\trunk\tools\build\v2/kernel/bootstrap.jam:128: in boost-build c:\data\boost\boost\trunk\boost-build.jam:11: in module scope This kind of error usually happens when some variable is not defined, but I can't spot the problem off hand, any ideas? Anything in user-config.jam that I should have set up? Cheers, John.