]> granicus.if.org Git - clang/commitdiff
make -print-stats print stats about the amount of the SLoc
authorChris Lattner <sabre@nondot.org>
Tue, 27 Jan 2009 05:22:43 +0000 (05:22 +0000)
committerChris Lattner <sabre@nondot.org>
Tue, 27 Jan 2009 05:22:43 +0000 (05:22 +0000)
address space we used up.  Some interesting data:

For c99-intconst-1.c:
6912762 SLocEntry's allocated, 25592386B of Sloc address space used.

For cocoa.h:
26469 SLocEntry's allocated, 10278752B of Sloc address space used.

For carbon.h:
27364 SLocEntry's allocated, 12398141B of Sloc address space used.

Clearly 2G of sloc address space should be enough for anyone?!

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@63093 91177308-0d34-0410-b5e6-96231b3b80d8

lib/Basic/SourceManager.cpp

index 6c82b9bf2e853aa7adea71e98e8f60a094b989ae..9b509a56845226efed47d59de8e888df94c39e1f 100644 (file)
@@ -576,8 +576,9 @@ const char *SourceManager::getSourceName(SourceLocation Loc) const {
 void SourceManager::PrintStats() const {
   llvm::cerr << "\n*** Source Manager Stats:\n";
   llvm::cerr << FileInfos.size() << " files mapped, " << MemBufferInfos.size()
-             << " mem buffers mapped, " << SLocEntryTable.size() 
-             << " SLocEntry's allocated.\n";
+             << " mem buffers mapped.\n";
+  llvm::cerr << SLocEntryTable.size() << " SLocEntry's allocated, "
+             << NextOffset << "B of Sloc address space used.\n";
     
   unsigned NumLineNumsComputed = 0;
   unsigned NumFileBytesMapped = 0;