blob: 32491c787cf22f881663dd95c2f7134462992655 (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
|
#!/bin/bash
# This script renames all the functions and the macros defined in
# absl/base/dynamic_annotations.{h,cc} and absl/base/thread_annotations.h.
#
# Chromium's dynamic_annotations live in //base/third_party/dynamic_annotations
# and its //base contains a copy of thread_annotations.h which conflict with
# Abseil's versions (ODR violations and macro clashing).
# In order to avoid problems in Chromium, this copy of Abseil has its own
# dynamic_annotations and thread_annotations renamed.
# -------------------------- dynamic_annotations -------------------------
for w in \
AnnotateBarrierDestroy \
AnnotateBarrierInit \
AnnotateBarrierWaitAfter \
AnnotateBarrierWaitBefore \
AnnotateBenignRace \
AnnotateBenignRaceSized \
AnnotateCondVarSignal \
AnnotateCondVarSignalAll \
AnnotateCondVarWait \
AnnotateEnableRaceDetection \
AnnotateExpectRace \
AnnotateFlushExpectedRaces \
AnnotateFlushState \
AnnotateHappensAfter \
AnnotateHappensBefore \
AnnotateIgnoreReadsBegin \
AnnotateIgnoreReadsEnd \
AnnotateIgnoreSyncBegin \
AnnotateIgnoreSyncEnd \
AnnotateIgnoreWritesBegin \
AnnotateIgnoreWritesEnd \
AnnotateMemoryIsInitialized \
AnnotateMemoryIsUninitialized \
AnnotateMutexIsNotPHB \
AnnotateMutexIsUsedAsCondVar \
AnnotateNewMemory \
AnnotateNoOp \
AnnotatePCQCreate \
AnnotatePCQDestroy \
AnnotatePCQGet \
AnnotatePCQPut \
AnnotatePublishMemoryRange \
AnnotateRWLockAcquired \
AnnotateRWLockCreate \
AnnotateRWLockCreateStatic \
AnnotateRWLockDestroy \
AnnotateRWLockReleased \
AnnotateThreadName \
AnnotateTraceMemory \
AnnotateUnpublishMemoryRange \
GetRunningOnValgrind \
RunningOnValgrind \
StaticAnnotateIgnoreReadsBegin \
StaticAnnotateIgnoreReadsEnd \
StaticAnnotateIgnoreWritesBegin \
StaticAnnotateIgnoreWritesEnd \
ValgrindSlowdown \
; do
find absl/ -type f -exec sed -i "s/\b$w\b/Absl$w/g" {} \;
done
for w in \
ADDRESS_SANITIZER_REDZONE \
ANNOTALYSIS_ENABLED \
ANNOTATE_BARRIER_DESTROY \
ANNOTATE_BARRIER_INIT \
ANNOTATE_BARRIER_WAIT_AFTER \
ANNOTATE_BARRIER_WAIT_BEFORE \
ANNOTATE_BENIGN_RACE \
ANNOTATE_BENIGN_RACE_SIZED \
ANNOTATE_BENIGN_RACE_STATIC \
ANNOTATE_CONDVAR_LOCK_WAIT \
ANNOTATE_CONDVAR_SIGNAL \
ANNOTATE_CONDVAR_SIGNAL_ALL \
ANNOTATE_CONDVAR_WAIT \
ANNOTATE_CONTIGUOUS_CONTAINER \
ANNOTATE_ENABLE_RACE_DETECTION \
ANNOTATE_EXPECT_RACE \
ANNOTATE_FLUSH_EXPECTED_RACES \
ANNOTATE_FLUSH_STATE \
ANNOTATE_HAPPENS_AFTER \
ANNOTATE_HAPPENS_BEFORE \
ANNOTATE_IGNORE_READS_AND_WRITES_BEGIN ANNOTATE_IGNORE_READS_AND_WRITES_END \
ANNOTATE_IGNORE_READS_BEGIN \
ANNOTATE_IGNORE_READS_END \
ANNOTATE_IGNORE_SYNC_BEGIN \
ANNOTATE_IGNORE_SYNC_END \
ANNOTATE_IGNORE_WRITES_BEGIN \
ANNOTATE_IGNORE_WRITES_END \
ANNOTATE_MEMORY_IS_INITIALIZED \
ANNOTATE_MEMORY_IS_UNINITIALIZED \
ANNOTATE_MUTEX_IS_USED_AS_CONDVAR \
ANNOTATE_NEW_MEMORY \
ANNOTATE_NOT_HAPPENS_BEFORE_MUTEX \
ANNOTATE_NO_OP \
ANNOTATE_PCQ_CREATE ANNOTATE_PCQ_DESTROY \
ANNOTATE_PCQ_GET ANNOTATE_PCQ_PUT \
ANNOTATE_PUBLISH_MEMORY_RANGE \
ANNOTATE_PURE_HAPPENS_BEFORE_MUTEX \
ANNOTATE_RWLOCK_ACQUIRED \
ANNOTATE_RWLOCK_CREATE \
ANNOTATE_RWLOCK_CREATE_STATIC \
ANNOTATE_RWLOCK_DESTROY \
ANNOTATE_RWLOCK_RELEASED \
ANNOTATE_SWAP_MEMORY_RANGE \
ANNOTATE_THREAD_NAME \
ANNOTATE_TRACE_MEMORY \
ANNOTATE_UNPROTECTED_READ \
ANNOTATE_UNPUBLISH_MEMORY_RANGE \
ANNOTATIONS_ENABLED \
ATTRIBUTE_IGNORE_READS_BEGIN \
ATTRIBUTE_IGNORE_READS_END \
DYNAMIC_ANNOTATIONS_ATTRIBUTE_WEAK \
DYNAMIC_ANNOTATIONS_ENABLED \
DYNAMIC_ANNOTATIONS_EXTERNAL_IMPL \
DYNAMIC_ANNOTATIONS_GLUE \
DYNAMIC_ANNOTATIONS_GLUE0 \
DYNAMIC_ANNOTATIONS_IMPL \
DYNAMIC_ANNOTATIONS_NAME \
DYNAMIC_ANNOTATIONS_PREFIX \
DYNAMIC_ANNOTATIONS_PROVIDE_RUNNING_ON_VALGRIND \
DYNAMIC_ANNOTATIONS_WANT_ATTRIBUTE_WEAK \
; do
find absl/ -type f -exec sed -i "s/\b$w\b/ABSL_$w/g" {} \;
done
# -------------------------- thread_annotations -------------------------
for w in \
ts_unchecked_read \
; do
find absl/ -type f -exec sed -i "s/\b$w\b/absl_$w/g" {} \;
done
|