| 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 1888 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1899 object_sizes_[FIRST_FIXED_ARRAY_SUB_TYPE + array_sub_type] += size; | 1899 object_sizes_[FIRST_FIXED_ARRAY_SUB_TYPE + array_sub_type] += size; |
| 1900 } | 1900 } |
| 1901 | 1901 |
| 1902 void CheckpointObjectStats(); | 1902 void CheckpointObjectStats(); |
| 1903 | 1903 |
| 1904 // We don't use a LockGuard here since we want to lock the heap | 1904 // We don't use a LockGuard here since we want to lock the heap |
| 1905 // only when FLAG_concurrent_recompilation is true. | 1905 // only when FLAG_concurrent_recompilation is true. |
| 1906 class RelocationLock { | 1906 class RelocationLock { |
| 1907 public: | 1907 public: |
| 1908 explicit RelocationLock(Heap* heap) : heap_(heap) { | 1908 explicit RelocationLock(Heap* heap) : heap_(heap) { |
| 1909 if (FLAG_concurrent_recompilation) { | 1909 heap_->relocation_mutex_.Lock(); |
| 1910 heap_->relocation_mutex_->Lock(); | |
| 1911 } | |
| 1912 } | 1910 } |
| 1913 | 1911 |
| 1914 | 1912 |
| 1915 ~RelocationLock() { | 1913 ~RelocationLock() { |
| 1916 if (FLAG_concurrent_recompilation) { | 1914 heap_->relocation_mutex_.Unlock(); |
| 1917 heap_->relocation_mutex_->Unlock(); | |
| 1918 } | |
| 1919 } | 1915 } |
| 1920 | 1916 |
| 1921 private: | 1917 private: |
| 1922 Heap* heap_; | 1918 Heap* heap_; |
| 1923 }; | 1919 }; |
| 1924 | 1920 |
| 1925 MaybeObject* AddWeakObjectToCodeDependency(Object* obj, DependentCode* dep); | 1921 MaybeObject* AddWeakObjectToCodeDependency(Object* obj, DependentCode* dep); |
| 1926 | 1922 |
| 1927 DependentCode* LookupWeakObjectToCodeDependency(Object* obj); | 1923 DependentCode* LookupWeakObjectToCodeDependency(Object* obj); |
| 1928 | 1924 |
| (...skipping 582 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 2511 // Flag is set when the heap has been configured. The heap can be repeatedly | 2507 // Flag is set when the heap has been configured. The heap can be repeatedly |
| 2512 // configured through the API until it is set up. | 2508 // configured through the API until it is set up. |
| 2513 bool configured_; | 2509 bool configured_; |
| 2514 | 2510 |
| 2515 ExternalStringTable external_string_table_; | 2511 ExternalStringTable external_string_table_; |
| 2516 | 2512 |
| 2517 VisitorDispatchTable<ScavengingCallback> scavenging_visitors_table_; | 2513 VisitorDispatchTable<ScavengingCallback> scavenging_visitors_table_; |
| 2518 | 2514 |
| 2519 MemoryChunk* chunks_queued_for_free_; | 2515 MemoryChunk* chunks_queued_for_free_; |
| 2520 | 2516 |
| 2521 Mutex* relocation_mutex_; | 2517 Mutex relocation_mutex_; |
| 2522 | 2518 |
| 2523 int gc_callbacks_depth_; | 2519 int gc_callbacks_depth_; |
| 2524 | 2520 |
| 2525 friend class Factory; | 2521 friend class Factory; |
| 2526 friend class GCTracer; | 2522 friend class GCTracer; |
| 2527 friend class AlwaysAllocateScope; | 2523 friend class AlwaysAllocateScope; |
| 2528 friend class Page; | 2524 friend class Page; |
| 2529 friend class Isolate; | 2525 friend class Isolate; |
| 2530 friend class MarkCompactCollector; | 2526 friend class MarkCompactCollector; |
| 2531 friend class MarkCompactMarkingVisitor; | 2527 friend class MarkCompactMarkingVisitor; |
| (...skipping 596 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 3128 DisallowHeapAllocation no_allocation; // i.e. no gc allowed. | 3124 DisallowHeapAllocation no_allocation; // i.e. no gc allowed. |
| 3129 | 3125 |
| 3130 private: | 3126 private: |
| 3131 DISALLOW_IMPLICIT_CONSTRUCTORS(PathTracer); | 3127 DISALLOW_IMPLICIT_CONSTRUCTORS(PathTracer); |
| 3132 }; | 3128 }; |
| 3133 #endif // DEBUG | 3129 #endif // DEBUG |
| 3134 | 3130 |
| 3135 } } // namespace v8::internal | 3131 } } // namespace v8::internal |
| 3136 | 3132 |
| 3137 #endif // V8_HEAP_H_ | 3133 #endif // V8_HEAP_H_ |
| OLD | NEW |