Changeset 89547 in webkit
- Timestamp:
- Jun 23, 2011 2:55:37 AM (13 years ago)
- Location:
- trunk/Source/JavaScriptCore
- Files:
-
- 3 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/Source/JavaScriptCore/ChangeLog
r89516 r89547 1 2011-06-23 Timur Iskhodzhanov <timurrrr@google.com> 2 3 Reviewed by David Levin. 4 5 Make dynamic annotations weak symbols and prevent identical code folding by the linker 6 https://bugs.webkit.org/show_bug.cgi?id=62443 7 8 * wtf/DynamicAnnotations.cpp: 9 (WTFAnnotateBenignRaceSized): 10 (WTFAnnotateHappensBefore): 11 (WTFAnnotateHappensAfter): 12 * wtf/DynamicAnnotations.h: 13 1 14 2011-06-22 Yael Aharon <yael.aharon@nokia.com> 2 15 -
trunk/Source/JavaScriptCore/wtf/DynamicAnnotations.cpp
r82508 r89547 30 30 31 31 #if USE(DYNAMIC_ANNOTATIONS) 32 void WTFAnnotateBenignRaceSized(const char*, int, const volatile void*, long, const char*) { } 33 void WTFAnnotateHappensBefore(const char*, int, const volatile void*) { } 34 void WTFAnnotateHappensAfter(const char*, int, const volatile void*) { } 32 33 /* Identical code folding(-Wl,--icf=all) countermeasures. 34 * This makes all Annotate* functions different, which prevents the linker from folding them. 35 */ 36 #ifdef __COUNTER__ 37 #define DYNAMIC_ANNOTATIONS_IMPL \ 38 volatile short lineno = (__LINE__ << 8) + __COUNTER__; \ 39 (void)lineno; 40 #else 41 #define DYNAMIC_ANNOTATIONS_IMPL \ 42 volatile short lineno = (__LINE__ << 8); \ 43 (void)lineno; 44 #endif 45 46 void WTFAnnotateBenignRaceSized(const char*, int, const volatile void*, long, const char*) { DYNAMIC_ANNOTATIONS_IMPL } 47 void WTFAnnotateHappensBefore(const char*, int, const volatile void*) { DYNAMIC_ANNOTATIONS_IMPL } 48 void WTFAnnotateHappensAfter(const char*, int, const volatile void*) { DYNAMIC_ANNOTATIONS_IMPL } 35 49 #endif // USE(DYNAMIC_ANNOTATIONS) 50 -
trunk/Source/JavaScriptCore/wtf/DynamicAnnotations.h
r82508 r89547 74 74 #define WTF_ANNOTATE_HAPPENS_AFTER(address) WTFAnnotateHappensAfter(__FILE__, __LINE__, address) 75 75 76 /* The dynamic annotations must be weak symbols to be interceptable by a linker. */ 77 #if defined(__GNUC__) 78 #define WTF_DYNAMIC_ANNOTATIONS_ATTRIBUTE_WEAK __attribute__((weak)) 79 #else 80 #define WTF_DYNAMIC_ANNOTATIONS_ATTRIBUTE_WEAK 81 #endif 82 76 83 #ifdef __cplusplus 77 84 extern "C" { 78 85 #endif 79 86 /* Don't use these directly, use the above macros instead. */ 80 void WTFAnnotateBenignRaceSized(const char* file, int line, const volatile void* memory, long size, const char* description) ;81 void WTFAnnotateHappensBefore(const char* file, int line, const volatile void* address) ;82 void WTFAnnotateHappensAfter(const char* file, int line, const volatile void* address) ;87 void WTFAnnotateBenignRaceSized(const char* file, int line, const volatile void* memory, long size, const char* description) WTF_DYNAMIC_ANNOTATIONS_ATTRIBUTE_WEAK; 88 void WTFAnnotateHappensBefore(const char* file, int line, const volatile void* address) WTF_DYNAMIC_ANNOTATIONS_ATTRIBUTE_WEAK; 89 void WTFAnnotateHappensAfter(const char* file, int line, const volatile void* address) WTF_DYNAMIC_ANNOTATIONS_ATTRIBUTE_WEAK; 83 90 #ifdef __cplusplus 84 91 } // extern "C" 85 92 #endif 93 94 #undef WTF_DYNAMIC_ANNOTATIONS_ATTRIBUTE_WEAK 86 95 87 96 #else // USE(DYNAMIC_ANNOTATIONS)
Note: See TracChangeset
for help on using the changeset viewer.