| OLD | NEW |
| 1 // Copyright 2012 the V8 project authors. All rights reserved. | 1 // Copyright 2012 the V8 project authors. All rights reserved. |
| 2 // Redistribution and use in source and binary forms, with or without | 2 // Redistribution and use in source and binary forms, with or without |
| 3 // modification, are permitted provided that the following conditions are | 3 // modification, are permitted provided that the following conditions are |
| 4 // met: | 4 // met: |
| 5 // | 5 // |
| 6 // * Redistributions of source code must retain the above copyright | 6 // * Redistributions of source code must retain the above copyright |
| 7 // notice, this list of conditions and the following disclaimer. | 7 // notice, this list of conditions and the following disclaimer. |
| 8 // * Redistributions in binary form must reproduce the above | 8 // * Redistributions in binary form must reproduce the above |
| 9 // copyright notice, this list of conditions and the following | 9 // copyright notice, this list of conditions and the following |
| 10 // disclaimer in the documentation and/or other materials provided | 10 // disclaimer in the documentation and/or other materials provided |
| (...skipping 1850 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1861 ASSERT(sub_type <= LAST_FIXED_ARRAY_SUB_TYPE); | 1861 ASSERT(sub_type <= LAST_FIXED_ARRAY_SUB_TYPE); |
| 1862 object_counts_[FIRST_FIXED_ARRAY_SUB_TYPE + sub_type]++; | 1862 object_counts_[FIRST_FIXED_ARRAY_SUB_TYPE + sub_type]++; |
| 1863 object_sizes_[FIRST_FIXED_ARRAY_SUB_TYPE + sub_type] += size; | 1863 object_sizes_[FIRST_FIXED_ARRAY_SUB_TYPE + sub_type] += size; |
| 1864 } | 1864 } |
| 1865 } | 1865 } |
| 1866 } | 1866 } |
| 1867 | 1867 |
| 1868 void CheckpointObjectStats(); | 1868 void CheckpointObjectStats(); |
| 1869 | 1869 |
| 1870 // We don't use a ScopedLock here since we want to lock the heap | 1870 // We don't use a ScopedLock here since we want to lock the heap |
| 1871 // only when FLAG_parallel_recompilation is true. | 1871 // only when FLAG_concurrent_recompilation is true. |
| 1872 class RelocationLock { | 1872 class RelocationLock { |
| 1873 public: | 1873 public: |
| 1874 explicit RelocationLock(Heap* heap); | 1874 explicit RelocationLock(Heap* heap); |
| 1875 | 1875 |
| 1876 ~RelocationLock() { | 1876 ~RelocationLock() { |
| 1877 if (FLAG_parallel_recompilation) { | 1877 if (FLAG_concurrent_recompilation) { |
| 1878 #ifdef DEBUG | 1878 #ifdef DEBUG |
| 1879 heap_->relocation_mutex_locked_by_optimizer_thread_ = false; | 1879 heap_->relocation_mutex_locked_by_optimizer_thread_ = false; |
| 1880 #endif // DEBUG | 1880 #endif // DEBUG |
| 1881 heap_->relocation_mutex_->Unlock(); | 1881 heap_->relocation_mutex_->Unlock(); |
| 1882 } | 1882 } |
| 1883 } | 1883 } |
| 1884 | 1884 |
| 1885 #ifdef DEBUG | 1885 #ifdef DEBUG |
| 1886 static bool IsLockedByOptimizerThread(Heap* heap) { | 1886 static bool IsLockedByOptimizerThread(Heap* heap) { |
| 1887 return heap->relocation_mutex_locked_by_optimizer_thread_; | 1887 return heap->relocation_mutex_locked_by_optimizer_thread_; |
| (...skipping 1156 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 3044 DisallowHeapAllocation no_allocation; // i.e. no gc allowed. | 3044 DisallowHeapAllocation no_allocation; // i.e. no gc allowed. |
| 3045 | 3045 |
| 3046 private: | 3046 private: |
| 3047 DISALLOW_IMPLICIT_CONSTRUCTORS(PathTracer); | 3047 DISALLOW_IMPLICIT_CONSTRUCTORS(PathTracer); |
| 3048 }; | 3048 }; |
| 3049 #endif // DEBUG | 3049 #endif // DEBUG |
| 3050 | 3050 |
| 3051 } } // namespace v8::internal | 3051 } } // namespace v8::internal |
| 3052 | 3052 |
| 3053 #endif // V8_HEAP_H_ | 3053 #endif // V8_HEAP_H_ |
| OLD | NEW |