r279673 - [Order Files] On Darwin use DTrace's oneshot probe

Chris Bieneman via cfe-commits cfe-commits at lists.llvm.org
Wed Aug 24 15:09:46 PDT 2016


Author: cbieneman
Date: Wed Aug 24 17:09:46 2016
New Revision: 279673

URL: http://llvm.org/viewvc/llvm-project?rev=279673&view=rev
Log:
[Order Files] On Darwin use DTrace's oneshot probe

The oneshot probe only gets executed the first time the probe is hit in the process. For order file generation this is really all we care about.

Modified:
    cfe/trunk/utils/perf-training/order-files.lit.cfg

Modified: cfe/trunk/utils/perf-training/order-files.lit.cfg
URL: http://llvm.org/viewvc/llvm-project/cfe/trunk/utils/perf-training/order-files.lit.cfg?rev=279673&r1=279672&r2=279673&view=diff
==============================================================================
--- cfe/trunk/utils/perf-training/order-files.lit.cfg (original)
+++ cfe/trunk/utils/perf-training/order-files.lit.cfg Wed Aug 24 17:09:46 2016
@@ -30,6 +30,11 @@ config.suffixes = ['.c', '.cpp', '.m', '
 dtrace_wrapper = '%s %s/perf-helper.py dtrace' % (config.python_exe, config.test_source_root)
 dtrace_wrapper_cc1 = '%s %s/perf-helper.py dtrace --cc1' % (config.python_exe, config.test_source_root)
 
+if 'darwin' in config.target_triple:
+    lit_config.note('using DTrace oneshot probe')
+    dtrace_wrapper = '%s --use-oneshot' % dtrace_wrapper
+    dtrace_wrapper_cc1 = '%s --use-oneshot' % dtrace_wrapper_cc1
+
 use_lit_shell = os.environ.get("LIT_USE_INTERNAL_SHELL")
 config.test_format = lit.formats.ShTest(use_lit_shell == "0")
 config.substitutions.append( ('%clang_cpp_skip_driver', ' %s %s --driver-mode=cpp %s ' % (dtrace_wrapper_cc1, config.clang, sysroot_flags)))




More information about the cfe-commits mailing list