summaryrefslogtreecommitdiffstats
path: root/base/third_party
diff options
context:
space:
mode:
authorglider@chromium.org <glider@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2012-07-03 10:24:23 +0000
committerglider@chromium.org <glider@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2012-07-03 10:24:23 +0000
commit74bee7fd4b7cf0c66ee62407328187a1eb5fe905 (patch)
treee62eb0ac36cfb7a5992e1bdcee7a2af503546427 /base/third_party
parent8ae44cae90a260317b4f09bdcb4035d364864e0b (diff)
downloadchromium_src-74bee7fd4b7cf0c66ee62407328187a1eb5fe905.zip
chromium_src-74bee7fd4b7cf0c66ee62407328187a1eb5fe905.tar.gz
chromium_src-74bee7fd4b7cf0c66ee62407328187a1eb5fe905.tar.bz2
Update dynamic_annotations to r4384.
TBR=darin,timurrrr Review URL: https://chromiumcodereview.appspot.com/10696089 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@145281 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'base/third_party')
-rw-r--r--base/third_party/dynamic_annotations/README.chromium3
-rw-r--r--base/third_party/dynamic_annotations/dynamic_annotations.c20
2 files changed, 18 insertions, 5 deletions
diff --git a/base/third_party/dynamic_annotations/README.chromium b/base/third_party/dynamic_annotations/README.chromium
index f78a982..b248121 100644
--- a/base/third_party/dynamic_annotations/README.chromium
+++ b/base/third_party/dynamic_annotations/README.chromium
@@ -1,5 +1,6 @@
Name: dynamic annotations
URL: http://code.google.com/p/data-race-test/wiki/DynamicAnnotations
+Version: 4384
One header and one source file (dynamic_annotations.h and dynamic_annotations.c)
in this directory define runtime macros useful for annotating synchronization
@@ -7,5 +8,5 @@ utilities and benign data races so data race detectors can handle Chromium code
with better precision.
These files were taken from
-http://code.google.com/p/data-race-test/source/browse/?r=2062#svn/trunk/dynamic_annotations
+http://code.google.com/p/data-race-test/source/browse/?#svn/trunk/dynamic_annotations
The files are covered under BSD license as described within the files.
diff --git a/base/third_party/dynamic_annotations/dynamic_annotations.c b/base/third_party/dynamic_annotations/dynamic_annotations.c
index e7d44f4..f57cb12 100644
--- a/base/third_party/dynamic_annotations/dynamic_annotations.c
+++ b/base/third_party/dynamic_annotations/dynamic_annotations.c
@@ -42,10 +42,19 @@
# include "base/third_party/valgrind/valgrind.h"
#endif
+/* Compiler-based ThreadSanitizer defines
+ DYNAMIC_ANNOTATIONS_EXTERNAL_IMPL = 1
+ and provides its own definitions of the functions. */
+
+#ifndef DYNAMIC_ANNOTATIONS_EXTERNAL_IMPL
+# define DYNAMIC_ANNOTATIONS_EXTERNAL_IMPL 0
+#endif
+
/* Each function is empty and called (via a macro) only in debug mode.
The arguments are captured by dynamic tools at runtime. */
-#if DYNAMIC_ANNOTATIONS_ENABLED == 1
+#if DYNAMIC_ANNOTATIONS_ENABLED == 1 \
+ && DYNAMIC_ANNOTATIONS_EXTERNAL_IMPL == 0
/* Identical code folding(-Wl,--icf=all) countermeasures.
This makes all Annotate* functions different, which prevents the linker from
@@ -214,9 +223,11 @@ void DYNAMIC_ANNOTATIONS_NAME(AnnotateFlushState)(
const char *file, int line)
{DYNAMIC_ANNOTATIONS_IMPL}
-#endif /* DYNAMIC_ANNOTATIONS_ENABLED == 1 */
+#endif /* DYNAMIC_ANNOTATIONS_ENABLED == 1
+ && DYNAMIC_ANNOTATIONS_EXTERNAL_IMPL == 0 */
-#if DYNAMIC_ANNOTATIONS_PROVIDE_RUNNING_ON_VALGRIND == 1
+#if DYNAMIC_ANNOTATIONS_PROVIDE_RUNNING_ON_VALGRIND == 1 \
+ && DYNAMIC_ANNOTATIONS_EXTERNAL_IMPL == 0
static int GetRunningOnValgrind(void) {
#ifdef RUNNING_ON_VALGRIND
if (RUNNING_ON_VALGRIND) return 1;
@@ -254,4 +265,5 @@ int RunningOnValgrind(void) {
return local_running_on_valgrind;
}
-#endif /* DYNAMIC_ANNOTATIONS_PROVIDE_RUNNING_ON_VALGRIND == 1 */
+#endif /* DYNAMIC_ANNOTATIONS_PROVIDE_RUNNING_ON_VALGRIND == 1
+ && DYNAMIC_ANNOTATIONS_EXTERNAL_IMPL == 0 */