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

Side by Side Diff: src/heap/spaces.h

Issue 1351983002: [heap] refactor inline allocation step code (Closed) Base URL: https://chromium.googlesource.com/v8/v8.git@master
Patch Set: fix nits from the code review Created 5 years, 2 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
« no previous file with comments | « no previous file | src/heap/spaces.cc » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 // Copyright 2011 the V8 project authors. All rights reserved. 1 // Copyright 2011 the V8 project authors. All rights reserved.
2 // Use of this source code is governed by a BSD-style license that can be 2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file. 3 // found in the LICENSE file.
4 4
5 #ifndef V8_HEAP_SPACES_H_ 5 #ifndef V8_HEAP_SPACES_H_
6 #define V8_HEAP_SPACES_H_ 6 #define V8_HEAP_SPACES_H_
7 7
8 #include "src/allocation.h" 8 #include "src/allocation.h"
9 #include "src/atomic-utils.h" 9 #include "src/atomic-utils.h"
10 #include "src/base/atomicops.h" 10 #include "src/base/atomicops.h"
(...skipping 2719 matching lines...) Expand 10 before | Expand all | Expand 10 after
2730 // when all allocation is performed from inlined generated code. 2730 // when all allocation is performed from inlined generated code.
2731 intptr_t inline_allocation_limit_step_; 2731 intptr_t inline_allocation_limit_step_;
2732 2732
2733 Address top_on_previous_step_; 2733 Address top_on_previous_step_;
2734 2734
2735 HistogramInfo* allocated_histogram_; 2735 HistogramInfo* allocated_histogram_;
2736 HistogramInfo* promoted_histogram_; 2736 HistogramInfo* promoted_histogram_;
2737 2737
2738 bool EnsureAllocation(int size_in_bytes, AllocationAlignment alignment); 2738 bool EnsureAllocation(int size_in_bytes, AllocationAlignment alignment);
2739 2739
2740 // If we are doing inline allocation in steps, this method performs the 'step'
2741 // operation. Right now incremental mark is the only consumer of inline
Hannes Payer (out of office) 2015/09/24 10:58:07 marking
2742 // allocation steps. top is the memory address of the bump pointer at the last
2743 // inline allocation (i.e. it determines the numbers of bytes actually
2744 // allocated since the last step.) new_top is the address of the bump pointer
2745 // where the next byte is going to be allocated from. top and new_top may be
2746 // different when we cross a page boundary or reset the space.
2747 void InlineAllocationStep(Address top, Address new_top);
2748
2740 friend class SemiSpaceIterator; 2749 friend class SemiSpaceIterator;
2741 }; 2750 };
2742 2751
2743 // ----------------------------------------------------------------------------- 2752 // -----------------------------------------------------------------------------
2744 // Compaction space that is used temporarily during compaction. 2753 // Compaction space that is used temporarily during compaction.
2745 2754
2746 class CompactionSpace : public PagedSpace { 2755 class CompactionSpace : public PagedSpace {
2747 public: 2756 public:
2748 CompactionSpace(Heap* heap, AllocationSpace id, Executability executable) 2757 CompactionSpace(Heap* heap, AllocationSpace id, Executability executable)
2749 : PagedSpace(heap, id, executable) {} 2758 : PagedSpace(heap, id, executable) {}
(...skipping 231 matching lines...) Expand 10 before | Expand all | Expand 10 after
2981 count = 0; 2990 count = 0;
2982 } 2991 }
2983 // Must be small, since an iteration is used for lookup. 2992 // Must be small, since an iteration is used for lookup.
2984 static const int kMaxComments = 64; 2993 static const int kMaxComments = 64;
2985 }; 2994 };
2986 #endif 2995 #endif
2987 } 2996 }
2988 } // namespace v8::internal 2997 } // namespace v8::internal
2989 2998
2990 #endif // V8_HEAP_SPACES_H_ 2999 #endif // V8_HEAP_SPACES_H_
OLDNEW
« no previous file with comments | « no previous file | src/heap/spaces.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698