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

Side by Side Diff: third_party/tcmalloc/chromium/src/base/dynamic_annotations.h

Issue 1076002: Revert 41938 - Merged third_party/tcmalloc/vendor/src(googleperftools r87) in... (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src/
Patch Set: Created 10 years, 9 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
OLDNEW
1 /* Copyright (c) 2008, Google Inc. 1 /* Copyright (c) 2008, Google Inc.
2 * All rights reserved. 2 * All rights reserved.
3 * 3 *
4 * Redistribution and use in source and binary forms, with or without 4 * Redistribution and use in source and binary forms, with or without
5 * modification, are permitted provided that the following conditions are 5 * modification, are permitted provided that the following conditions are
6 * met: 6 * met:
7 * 7 *
8 * * Redistributions of source code must retain the above copyright 8 * * Redistributions of source code must retain the above copyright
9 * notice, this list of conditions and the following disclaimer. 9 * notice, this list of conditions and the following disclaimer.
10 * * Redistributions in binary form must reproduce the above 10 * * Redistributions in binary form must reproduce the above
(...skipping 185 matching lines...) Expand 10 before | Expand all | Expand 10 after
196 // } 196 // }
197 // tmp->DoSomething(); 197 // tmp->DoSomething();
198 // } 198 // }
199 #define ANNOTATE_SWAP_MEMORY_RANGE(pointer, size) \ 199 #define ANNOTATE_SWAP_MEMORY_RANGE(pointer, size) \
200 do { \ 200 do { \
201 ANNOTATE_UNPUBLISH_MEMORY_RANGE(pointer, size); \ 201 ANNOTATE_UNPUBLISH_MEMORY_RANGE(pointer, size); \
202 ANNOTATE_PUBLISH_MEMORY_RANGE(pointer, size); \ 202 ANNOTATE_PUBLISH_MEMORY_RANGE(pointer, size); \
203 } while (0) 203 } while (0)
204 204
205 // Instruct the tool to create a happens-before arc between mu->Unlock() and 205 // Instruct the tool to create a happens-before arc between mu->Unlock() and
206 // mu->Lock(). This annotation may slow down the race detector and hide real 206 // mu->Lock(). This annotation may slow down the race detector; normally it
207 // races. Normally it is used only when it would be difficult to annotate each 207 // is used only when it would be difficult to annotate each of the mutex's
208 // of the mutex's critical sections individually using the annotations above. 208 // critical sections individually using the annotations above.
209 // This annotation makes sense only for hybrid race detectors. For pure
210 // happens-before detectors this is a no-op. For more details see
211 // http://code.google.com/p/data-race-test/wiki/PureHappensBeforeVsHybrid .
212 #define ANNOTATE_PURE_HAPPENS_BEFORE_MUTEX(mu) \
213 AnnotateMutexIsUsedAsCondVar(__FILE__, __LINE__, mu)
214
215 // Deprecated. Use ANNOTATE_PURE_HAPPENS_BEFORE_MUTEX.
216 #define ANNOTATE_MUTEX_IS_USED_AS_CONDVAR(mu) \ 209 #define ANNOTATE_MUTEX_IS_USED_AS_CONDVAR(mu) \
217 AnnotateMutexIsUsedAsCondVar(__FILE__, __LINE__, mu) 210 AnnotateMutexIsUsedAsCondVar(__FILE__, __LINE__, mu)
218 211
219 // ------------------------------------------------------------- 212 // -------------------------------------------------------------
220 // Annotations useful when defining memory allocators, or when memory that 213 // Annotations useful when defining memory allocators, or when memory that
221 // was protected in one way starts to be protected in another. 214 // was protected in one way starts to be protected in another.
222 215
223 // Report that a new memory at "address" of size "size" has been allocated. 216 // Report that a new memory at "address" of size "size" has been allocated.
224 // This might be used when the memory has been retrieved from a free list and 217 // This might be used when the memory has been retrieved from a free list and
225 // is about to be reused, or when a the locking discipline for a variable 218 // is about to be reused, or when a the locking discipline for a variable
(...skipping 131 matching lines...) Expand 10 before | Expand all | Expand 10 after
357 #define ANNOTATE_PUBLISH_MEMORY_RANGE(address, size) // empty 350 #define ANNOTATE_PUBLISH_MEMORY_RANGE(address, size) // empty
358 #define ANNOTATE_UNPUBLISH_MEMORY_RANGE(address, size) // empty 351 #define ANNOTATE_UNPUBLISH_MEMORY_RANGE(address, size) // empty
359 #define ANNOTATE_SWAP_MEMORY_RANGE(address, size) // empty 352 #define ANNOTATE_SWAP_MEMORY_RANGE(address, size) // empty
360 #define ANNOTATE_PCQ_CREATE(pcq) // empty 353 #define ANNOTATE_PCQ_CREATE(pcq) // empty
361 #define ANNOTATE_PCQ_DESTROY(pcq) // empty 354 #define ANNOTATE_PCQ_DESTROY(pcq) // empty
362 #define ANNOTATE_PCQ_PUT(pcq) // empty 355 #define ANNOTATE_PCQ_PUT(pcq) // empty
363 #define ANNOTATE_PCQ_GET(pcq) // empty 356 #define ANNOTATE_PCQ_GET(pcq) // empty
364 #define ANNOTATE_NEW_MEMORY(address, size) // empty 357 #define ANNOTATE_NEW_MEMORY(address, size) // empty
365 #define ANNOTATE_EXPECT_RACE(address, description) // empty 358 #define ANNOTATE_EXPECT_RACE(address, description) // empty
366 #define ANNOTATE_BENIGN_RACE(address, description) // empty 359 #define ANNOTATE_BENIGN_RACE(address, description) // empty
367 #define ANNOTATE_PURE_HAPPENS_BEFORE_MUTEX(mu) // empty
368 #define ANNOTATE_MUTEX_IS_USED_AS_CONDVAR(mu) // empty 360 #define ANNOTATE_MUTEX_IS_USED_AS_CONDVAR(mu) // empty
369 #define ANNOTATE_TRACE_MEMORY(arg) // empty 361 #define ANNOTATE_TRACE_MEMORY(arg) // empty
370 #define ANNOTATE_THREAD_NAME(name) // empty 362 #define ANNOTATE_THREAD_NAME(name) // empty
371 #define ANNOTATE_IGNORE_READS_BEGIN() // empty 363 #define ANNOTATE_IGNORE_READS_BEGIN() // empty
372 #define ANNOTATE_IGNORE_READS_END() // empty 364 #define ANNOTATE_IGNORE_READS_END() // empty
373 #define ANNOTATE_IGNORE_WRITES_BEGIN() // empty 365 #define ANNOTATE_IGNORE_WRITES_BEGIN() // empty
374 #define ANNOTATE_IGNORE_WRITES_END() // empty 366 #define ANNOTATE_IGNORE_WRITES_END() // empty
375 #define ANNOTATE_IGNORE_READS_AND_WRITES_BEGIN() // empty 367 #define ANNOTATE_IGNORE_READS_AND_WRITES_BEGIN() // empty
376 #define ANNOTATE_IGNORE_READS_AND_WRITES_END() // empty 368 #define ANNOTATE_IGNORE_READS_AND_WRITES_END() // empty
377 #define ANNOTATE_NO_OP(arg) // empty 369 #define ANNOTATE_NO_OP(arg) // empty
(...skipping 88 matching lines...) Expand 10 before | Expand all | Expand 10 after
466 #define ANNOTATE_UNPROTECTED_READ(x) (x) 458 #define ANNOTATE_UNPROTECTED_READ(x) (x)
467 #define ANNOTATE_BENIGN_RACE_STATIC(static_var, description) // empty 459 #define ANNOTATE_BENIGN_RACE_STATIC(static_var, description) // empty
468 460
469 #endif // !NDEBUG 461 #endif // !NDEBUG
470 462
471 // Return non-zero value if running under valgrind. 463 // Return non-zero value if running under valgrind.
472 extern "C" int RunningOnValgrind(); 464 extern "C" int RunningOnValgrind();
473 465
474 466
475 #endif // BASE_DYNAMIC_ANNOTATIONS_H_ 467 #endif // BASE_DYNAMIC_ANNOTATIONS_H_
OLDNEW
« no previous file with comments | « third_party/tcmalloc/chromium/src/base/basictypes.h ('k') | third_party/tcmalloc/chromium/src/base/logging.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698