| 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 30 matching lines...) Expand all Loading... |
| 41 * In C/C++ program the annotations are represented as C macros. | 41 * In C/C++ program the annotations are represented as C macros. |
| 42 * With the default build flags, these macros are empty, hence don't affect | 42 * With the default build flags, these macros are empty, hence don't affect |
| 43 * performance of a compiled binary. | 43 * performance of a compiled binary. |
| 44 * If dynamic annotations are enabled, they just call no-op functions. | 44 * If dynamic annotations are enabled, they just call no-op functions. |
| 45 * The dynamic analysis tools can intercept these functions and replace them | 45 * The dynamic analysis tools can intercept these functions and replace them |
| 46 * with their own implementations. | 46 * with their own implementations. |
| 47 * | 47 * |
| 48 * See http://code.google.com/p/data-race-test/wiki/DynamicAnnotations for more
information. | 48 * See http://code.google.com/p/data-race-test/wiki/DynamicAnnotations for more
information. |
| 49 */ | 49 */ |
| 50 | 50 |
| 51 #include "sky/engine/wtf/OperatingSystem.h" |
| 51 #include "sky/engine/wtf/WTFExport.h" | 52 #include "sky/engine/wtf/WTFExport.h" |
| 52 | 53 |
| 53 #if USE(DYNAMIC_ANNOTATIONS) | 54 #if USE(DYNAMIC_ANNOTATIONS) |
| 54 /* Tell data race detector that we're not interested in reports on the given add
ress range. */ | 55 /* Tell data race detector that we're not interested in reports on the given add
ress range. */ |
| 55 #define WTF_ANNOTATE_BENIGN_RACE_SIZED(address, size, description) WTFAnnotateBe
nignRaceSized(__FILE__, __LINE__, address, size, description) | 56 #define WTF_ANNOTATE_BENIGN_RACE_SIZED(address, size, description) WTFAnnotateBe
nignRaceSized(__FILE__, __LINE__, address, size, description) |
| 56 #define WTF_ANNOTATE_BENIGN_RACE(pointer, description) WTFAnnotateBenignRaceSize
d(__FILE__, __LINE__, pointer, sizeof(*(pointer)), description) | 57 #define WTF_ANNOTATE_BENIGN_RACE(pointer, description) WTFAnnotateBenignRaceSize
d(__FILE__, __LINE__, pointer, sizeof(*(pointer)), description) |
| 57 | 58 |
| 58 /* Annotations for user-defined synchronization mechanisms. | 59 /* Annotations for user-defined synchronization mechanisms. |
| 59 * These annotations can be used to define happens-before arcs in user-defined | 60 * These annotations can be used to define happens-before arcs in user-defined |
| 60 * synchronization mechanisms: the race detector will infer an arc from | 61 * synchronization mechanisms: the race detector will infer an arc from |
| (...skipping 28 matching lines...) Expand all Loading... |
| 89 #else // USE(DYNAMIC_ANNOTATIONS) | 90 #else // USE(DYNAMIC_ANNOTATIONS) |
| 90 /* These macros are empty when dynamic annotations are not enabled so you can | 91 /* These macros are empty when dynamic annotations are not enabled so you can |
| 91 * use them without affecting the performance of release binaries. */ | 92 * use them without affecting the performance of release binaries. */ |
| 92 #define WTF_ANNOTATE_BENIGN_RACE_SIZED(address, size, description) | 93 #define WTF_ANNOTATE_BENIGN_RACE_SIZED(address, size, description) |
| 93 #define WTF_ANNOTATE_BENIGN_RACE(pointer, description) | 94 #define WTF_ANNOTATE_BENIGN_RACE(pointer, description) |
| 94 #define WTF_ANNOTATE_HAPPENS_BEFORE(address) | 95 #define WTF_ANNOTATE_HAPPENS_BEFORE(address) |
| 95 #define WTF_ANNOTATE_HAPPENS_AFTER(address) | 96 #define WTF_ANNOTATE_HAPPENS_AFTER(address) |
| 96 #endif // USE(DYNAMIC_ANNOTATIONS) | 97 #endif // USE(DYNAMIC_ANNOTATIONS) |
| 97 | 98 |
| 98 #endif // SKY_ENGINE_WTF_DYNAMICANNOTATIONS_H_ | 99 #endif // SKY_ENGINE_WTF_DYNAMICANNOTATIONS_H_ |
| OLD | NEW |