[cfe-dev] Accuracy of -ftime-report

Argyrios Kyrtzidis kyrtzidis at apple.com
Thu Aug 5 06:08:26 PDT 2010


Hi,

When I try '-ftime-report' the numbers differ from 'time', either higher or lower, e.g:

> time clang -cc1 lib/VMCore/Dominators.cpp -Iinclude -Ilib/VMCore -D_DEBUG -D_GNU_SOURCE -D__STDC_LIMIT_MACROS -D__STDC_CONSTANT_MACROS -ftime-report -emit-llvm-bc -o t.o

[LLVM pass timers]

===-------------------------------------------------------------------------===
                         Miscellaneous Ungrouped Timers
===-------------------------------------------------------------------------===

   ---User Time---   --System Time--   --User+System--   ---Wall Time---  --- Name ---
   0.8070 ( 87.2%)   0.0550 ( 73.7%)   0.8620 ( 86.2%)   0.8620 ( 86.2%)  Clang front-end timer
   0.0747 (  8.1%)   0.0090 ( 12.0%)   0.0837 (  8.4%)   0.0840 (  8.4%)  LLVM IR Generation Time
   0.0435 (  4.7%)   0.0106 ( 14.3%)   0.0541 (  5.4%)   0.0541 (  5.4%)  Code Generation Time
   0.9251 (100.0%)   0.0746 (100.0%)   0.9998 (100.0%)   1.0001 (100.0%)  Total


real	0m0.903s
user	0m0.827s
sys	0m0.074s



> time clang -cc1 lib/VMCore/Dominators.cpp -Iinclude -Ilib/VMCore -D_DEBUG -D_GNU_SOURCE -D__STDC_LIMIT_MACROS -D__STDC_CONSTANT_MACROS -ftime-report -fsyntax-only

===-------------------------------------------------------------------------===
                         Miscellaneous Ungrouped Timers
===-------------------------------------------------------------------------===

   ---User Time---   --System Time--   --User+System--   ---Wall Time---  --- Name ---
   0.6823 (100.0%)   0.0317 (100.0%)   0.7139 (100.0%)   0.7139 (100.0%)  Clang front-end timer
   0.6823 (100.0%)   0.0317 (100.0%)   0.7139 (100.0%)   0.7139 (100.0%)  Total


real	0m0.736s
user	0m0.690s
sys	0m0.043s



Why the difference, am I doing something wrong ?

-Argiris
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.llvm.org/pipermail/cfe-dev/attachments/20100805/e62ca04b/attachment.html>


More information about the cfe-dev mailing list