Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(284)

Side by Side Diff: src/heap.h

Issue 23625003: Cleanup Mutex and related classes. (Closed) Base URL: https://v8.googlecode.com/svn/branches/bleeding_edge
Patch Set: Created 7 years, 3 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch | Annotate | Revision Log
« no previous file with comments | « src/gdb-jit.cc ('k') | src/heap.cc » ('j') | src/isolate.cc » ('J')
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
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 1853 matching lines...) Expand 10 before | Expand all | Expand 10 after
1864 } else if (type == FIXED_ARRAY_TYPE) { 1864 } else if (type == FIXED_ARRAY_TYPE) {
1865 ASSERT(sub_type <= LAST_FIXED_ARRAY_SUB_TYPE); 1865 ASSERT(sub_type <= LAST_FIXED_ARRAY_SUB_TYPE);
1866 object_counts_[FIRST_FIXED_ARRAY_SUB_TYPE + sub_type]++; 1866 object_counts_[FIRST_FIXED_ARRAY_SUB_TYPE + sub_type]++;
1867 object_sizes_[FIRST_FIXED_ARRAY_SUB_TYPE + sub_type] += size; 1867 object_sizes_[FIRST_FIXED_ARRAY_SUB_TYPE + sub_type] += size;
1868 } 1868 }
1869 } 1869 }
1870 } 1870 }
1871 1871
1872 void CheckpointObjectStats(); 1872 void CheckpointObjectStats();
1873 1873
1874 // We don't use a ScopedLock here since we want to lock the heap 1874 // We don't use a LockGuard here since we want to lock the heap
1875 // only when FLAG_concurrent_recompilation is true. 1875 // only when FLAG_concurrent_recompilation is true.
1876 class RelocationLock { 1876 class RelocationLock {
1877 public: 1877 public:
1878 explicit RelocationLock(Heap* heap); 1878 explicit RelocationLock(Heap* heap);
1879 1879
1880 ~RelocationLock() { 1880 ~RelocationLock() {
1881 if (FLAG_concurrent_recompilation) { 1881 if (FLAG_concurrent_recompilation) {
1882 #ifdef DEBUG 1882 #ifdef DEBUG
1883 heap_->relocation_mutex_locked_by_optimizer_thread_ = false; 1883 heap_->relocation_mutex_locked_by_optimizer_thread_ = false;
1884 #endif // DEBUG 1884 #endif // DEBUG
(...skipping 1163 matching lines...) Expand 10 before | Expand all | Expand 10 after
3048 DisallowHeapAllocation no_allocation; // i.e. no gc allowed. 3048 DisallowHeapAllocation no_allocation; // i.e. no gc allowed.
3049 3049
3050 private: 3050 private:
3051 DISALLOW_IMPLICIT_CONSTRUCTORS(PathTracer); 3051 DISALLOW_IMPLICIT_CONSTRUCTORS(PathTracer);
3052 }; 3052 };
3053 #endif // DEBUG 3053 #endif // DEBUG
3054 3054
3055 } } // namespace v8::internal 3055 } } // namespace v8::internal
3056 3056
3057 #endif // V8_HEAP_H_ 3057 #endif // V8_HEAP_H_
OLDNEW
« no previous file with comments | « src/gdb-jit.cc ('k') | src/heap.cc » ('j') | src/isolate.cc » ('J')

Powered by Google App Engine
This is Rietveld 408576698