| OLD | NEW |
| 1 /* | 1 /* |
| 2 * Copyright (C) 2011 Google Inc. All rights reserved. | 2 * Copyright (C) 2011 Google Inc. 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 * * Neither the name of Google Inc. nor the names of its | 10 * * Neither the name of Google Inc. nor the names of its |
| (...skipping 16 matching lines...) Expand all Loading... |
| 27 #include "config.h" | 27 #include "config.h" |
| 28 | 28 |
| 29 #include "DynamicAnnotations.h" | 29 #include "DynamicAnnotations.h" |
| 30 | 30 |
| 31 #if USE(DYNAMIC_ANNOTATIONS) && !USE(DYNAMIC_ANNOTATIONS_NOIMPL) | 31 #if USE(DYNAMIC_ANNOTATIONS) && !USE(DYNAMIC_ANNOTATIONS_NOIMPL) |
| 32 | 32 |
| 33 // Identical code folding(-Wl,--icf=all) countermeasures. | 33 // Identical code folding(-Wl,--icf=all) countermeasures. |
| 34 // This makes all Annotate* functions different, which prevents the linker from | 34 // This makes all Annotate* functions different, which prevents the linker from |
| 35 // folding them. | 35 // folding them. |
| 36 #ifdef __COUNTER__ | 36 #ifdef __COUNTER__ |
| 37 #define DYNAMIC_ANNOTATIONS_IMPL \ | 37 #define DYNAMIC_ANNOTATIONS_IMPL \ |
| 38 volatile short lineno = (__LINE__ << 8) + __COUNTER__; \ | 38 volatile short lineno = (__LINE__ << 8) + __COUNTER__; \ |
| 39 (void)lineno; | 39 (void) lineno; |
| 40 #else | 40 #else |
| 41 #define DYNAMIC_ANNOTATIONS_IMPL \ | 41 #define DYNAMIC_ANNOTATIONS_IMPL \ |
| 42 volatile short lineno = (__LINE__ << 8); \ | 42 volatile short lineno = (__LINE__ << 8); \ |
| 43 (void)lineno; | 43 (void) lineno; |
| 44 #endif | 44 #endif |
| 45 | 45 |
| 46 void WTFAnnotateBenignRaceSized(const char*, int, const volatile void*, long, co
nst char*) | 46 void WTFAnnotateBenignRaceSized(const char*, int, const volatile void*, long, co
nst char*) { |
| 47 { | 47 DYNAMIC_ANNOTATIONS_IMPL |
| 48 DYNAMIC_ANNOTATIONS_IMPL | |
| 49 } | 48 } |
| 50 | 49 |
| 51 void WTFAnnotateHappensBefore(const char*, int, const volatile void*) | 50 void WTFAnnotateHappensBefore(const char*, int, const volatile void*) { |
| 52 { | 51 DYNAMIC_ANNOTATIONS_IMPL |
| 53 DYNAMIC_ANNOTATIONS_IMPL | |
| 54 } | 52 } |
| 55 | 53 |
| 56 void WTFAnnotateHappensAfter(const char*, int, const volatile void*) | 54 void WTFAnnotateHappensAfter(const char*, int, const volatile void*) { |
| 57 { | 55 DYNAMIC_ANNOTATIONS_IMPL |
| 58 DYNAMIC_ANNOTATIONS_IMPL | |
| 59 } | 56 } |
| 60 | 57 |
| 61 #endif // USE(DYNAMIC_ANNOTATIONS) && !USE(DYNAMIC_ANNOTATIONS_NOIMPL) | 58 #endif // USE(DYNAMIC_ANNOTATIONS) && !USE(DYNAMIC_ANNOTATIONS_NOIMPL) |
| OLD | NEW |