| Index: runtime/vm/compiler_stats.h
|
| diff --git a/runtime/vm/compiler_stats.h b/runtime/vm/compiler_stats.h
|
| index 4487991224b94bcb84f543dcb677a05726a1cd14..b8894dc17d83519a5f40a87e811a5732f5fff2a6 100644
|
| --- a/runtime/vm/compiler_stats.h
|
| +++ b/runtime/vm/compiler_stats.h
|
| @@ -73,10 +73,11 @@ class CompilerStats {
|
| char* PrintToZone();
|
| };
|
|
|
| -// TODO(hausner): make the increment thread-safe.
|
| #define INC_STAT(thread, counter, incr) \
|
| if (FLAG_compiler_stats) { \
|
| - (thread)->isolate()->compiler_stats()->counter += (incr); }
|
| + MutexLocker ml((thread)->isolate()->mutex()); \
|
| + (thread)->isolate()->compiler_stats()->counter += (incr); \
|
| + }
|
|
|
| #define STAT_VALUE(thread, counter) \
|
| ((FLAG_compiler_stats != false) ? \
|
|
|