Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(26)

Side by Side Diff: base/dynamic_annotations.cc

Issue 147008: Added dynamic annotation files into base/...,... (Closed) Base URL: http://src.chromium.org/svn/trunk/src/
Patch Set: '' Created 11 years, 6 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch | Annotate | Revision Log
« no previous file with comments | « base/dynamic_annotations.h ('k') | base/lazy_instance.h » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
(Empty)
1 // Copyright (c) 2006-2008 The Chromium Authors. All rights reserved.
2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file.
4
5 #include "base/dynamic_annotations.h"
6 #include "base/third_party/valgrind/valgrind.h"
7
8 #ifndef NDEBUG
9 // Each function is empty and called (via a macro) only in debug mode.
10 // The arguments are captured by dynamic tools at runtime.
11
12 extern "C" void AnnotateRWLockCreate(const char *file, int line,
13 const volatile void *lock) {}
14 extern "C" void AnnotateRWLockDestroy(const char *file, int line,
15 const volatile void *lock) {}
16 extern "C" void AnnotateRWLockAcquired(const char *file, int line,
17 const volatile void *lock, long is_w) {}
18 extern "C" void AnnotateRWLockReleased(const char *file, int line,
19 const volatile void *lock, long is_w) {}
20 extern "C" void AnnotateCondVarWait(const char *file, int line,
21 const volatile void *cv,
22 const volatile void *lock) {}
23 extern "C" void AnnotateCondVarSignal(const char *file, int line,
24 const volatile void *cv) {}
25 extern "C" void AnnotateCondVarSignalAll(const char *file, int line,
26 const volatile void *cv) {}
27 extern "C" void AnnotatePublishMemoryRange(const char *file, int line,
28 const volatile void *address,
29 long size) {}
30 extern "C" void AnnotatePCQCreate(const char *file, int line,
31 const volatile void *pcq) {}
32 extern "C" void AnnotatePCQDestroy(const char *file, int line,
33 const volatile void *pcq) {}
34 extern "C" void AnnotatePCQPut(const char *file, int line,
35 const volatile void *pcq) {}
36 extern "C" void AnnotatePCQGet(const char *file, int line,
37 const volatile void *pcq) {}
38 extern "C" void AnnotateNewMemory(const char *file, int line,
39 const volatile void *mem,
40 long size) {}
41 extern "C" void AnnotateExpectRace(const char *file, int line,
42 const volatile void *mem,
43 const char *description) {}
44 extern "C" void AnnotateBenignRace(const char *file, int line,
45 const volatile void *mem,
46 const char *description) {}
47 extern "C" void AnnotateMutexIsUsedAsCondVar(const char *file, int line,
48 const volatile void *mu) {}
49 extern "C" void AnnotateTraceMemory(const char *file, int line,
50 const volatile void *arg) {}
51 extern "C" void AnnotateThreadName(const char *file, int line,
52 const char *name) {}
53 extern "C" void AnnotateIgnoreReadsBegin(const char *file, int line) {}
54 extern "C" void AnnotateIgnoreReadsEnd(const char *file, int line) {}
55 extern "C" void AnnotateIgnoreWritesBegin(const char *file, int line) {}
56 extern "C" void AnnotateIgnoreWritesEnd(const char *file, int line) {}
57 extern "C" void AnnotateNoOp(const char *file, int line,
58 const volatile void *arg) {}
59 #endif // NDEBUG
60
61 // When running under valgrind, a non-zero value will be returned.
62 extern "C" int RunningOnValgrind() {
63 #if defined(NVALGRIND)
64 return 0;
65 #else
66 return RUNNING_ON_VALGRIND;
67 #endif
68 }
OLDNEW
« no previous file with comments | « base/dynamic_annotations.h ('k') | base/lazy_instance.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698