OLD | NEW |
1 // Copyright 2014 The Chromium Authors. All rights reserved. | 1 // Copyright 2014 The Chromium Authors. All rights reserved. |
2 // Use of this source code is governed by a BSD-style license that can be | 2 // Use of this source code is governed by a BSD-style license that can be |
3 // found in the LICENSE file. | 3 // found in the LICENSE file. |
4 // | 4 // |
5 // This file contains the default options for various compiler-based dynamic | 5 // This file contains the default options for various compiler-based dynamic |
6 // tools. | 6 // tools. |
7 | 7 |
8 #include "build/build_config.h" | 8 #include "build/build_config.h" |
9 | 9 |
10 // Functions returning default options are declared weak in the tools' runtime | 10 // Functions returning default options are declared weak in the tools' runtime |
(...skipping 62 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
73 | 73 |
74 #if defined(THREAD_SANITIZER) && defined(OS_LINUX) | 74 #if defined(THREAD_SANITIZER) && defined(OS_LINUX) |
75 // Default options for ThreadSanitizer in various configurations: | 75 // Default options for ThreadSanitizer in various configurations: |
76 // detect_deadlocks=1 - enable deadlock (lock inversion) detection. | 76 // detect_deadlocks=1 - enable deadlock (lock inversion) detection. |
77 // second_deadlock_stack=1 - more verbose deadlock reports. | 77 // second_deadlock_stack=1 - more verbose deadlock reports. |
78 // report_signal_unsafe=0 - do not report async-signal-unsafe functions | 78 // report_signal_unsafe=0 - do not report async-signal-unsafe functions |
79 // called from signal handlers. | 79 // called from signal handlers. |
80 // report_thread_leaks=0 - do not report unjoined threads at the end of | 80 // report_thread_leaks=0 - do not report unjoined threads at the end of |
81 // the program execution. | 81 // the program execution. |
82 // print_suppressions=1 - print the list of matched suppressions. | 82 // print_suppressions=1 - print the list of matched suppressions. |
83 // suppressions=<path> - path to the suppressions file. | |
84 // external_symbolizer_path=<path> - path to the llvm-symbolizer binary. | |
85 const char kTsanDefaultOptions[] = | 83 const char kTsanDefaultOptions[] = |
86 "detect_deadlocks=1 second_deadlock_stack=1 report_signal_unsafe=0 " | 84 "detect_deadlocks=1 second_deadlock_stack=1 report_signal_unsafe=0 " |
87 "report_thread_leaks=0 print_suppressions=1 " | 85 "report_thread_leaks=0 print_suppressions=1 "; |
88 "suppressions=tools/valgrind/tsan_v2/suppressions.txt " | |
89 "external_symbolizer_path=" | |
90 "third_party/llvm-build/Release+Asserts/bin/llvm-symbolizer "; | |
91 | 86 |
92 extern "C" | 87 extern "C" |
93 __attribute__((no_sanitize_thread)) | 88 __attribute__((no_sanitize_thread)) |
94 __attribute__((visibility("default"))) | 89 __attribute__((visibility("default"))) |
95 // The function isn't referenced from the executable itself. Make sure it isn't | 90 // The function isn't referenced from the executable itself. Make sure it isn't |
96 // stripped by the linker. | 91 // stripped by the linker. |
97 __attribute__((used)) | 92 __attribute__((used)) |
98 const char *__tsan_default_options() { | 93 const char *__tsan_default_options() { |
99 return kTsanDefaultOptions; | 94 return kTsanDefaultOptions; |
100 } | 95 } |
101 | 96 |
102 #endif // THREAD_SANITIZER && OS_LINUX | 97 #endif // THREAD_SANITIZER && OS_LINUX |
OLD | NEW |