Mercurial > hg > truffle
comparison src/share/vm/memory/threadLocalAllocBuffer.hpp @ 14521:29ccc4cbabca
Merge
author | Gilles Duboscq <duboscq@ssw.jku.at> |
---|---|
date | Wed, 12 Mar 2014 13:30:08 +0100 |
parents | 1e1c8d358b52 |
children | 4ca6dc0799b6 060cdf93040c |
comparison
equal
deleted
inserted
replaced
14520:f84115370178 | 14521:29ccc4cbabca |
---|---|
43 HeapWord* _top; // address after last allocation | 43 HeapWord* _top; // address after last allocation |
44 HeapWord* _pf_top; // allocation prefetch watermark | 44 HeapWord* _pf_top; // allocation prefetch watermark |
45 HeapWord* _end; // allocation end (excluding alignment_reserve) | 45 HeapWord* _end; // allocation end (excluding alignment_reserve) |
46 size_t _desired_size; // desired size (including alignment_reserve) | 46 size_t _desired_size; // desired size (including alignment_reserve) |
47 size_t _refill_waste_limit; // hold onto tlab if free() is larger than this | 47 size_t _refill_waste_limit; // hold onto tlab if free() is larger than this |
48 | 48 size_t _allocated_before_last_gc; // total bytes allocated up until the last gc |
49 | |
50 static size_t _max_size; // maximum size of any TLAB | |
49 static unsigned _target_refills; // expected number of refills between GCs | 51 static unsigned _target_refills; // expected number of refills between GCs |
50 | 52 |
51 unsigned _number_of_refills; | 53 unsigned _number_of_refills; |
52 unsigned _fast_refill_waste; | 54 unsigned _fast_refill_waste; |
53 unsigned _slow_refill_waste; | 55 unsigned _slow_refill_waste; |
97 | 99 |
98 static GlobalTLABStats* _global_stats; | 100 static GlobalTLABStats* _global_stats; |
99 static GlobalTLABStats* global_stats() { return _global_stats; } | 101 static GlobalTLABStats* global_stats() { return _global_stats; } |
100 | 102 |
101 public: | 103 public: |
102 ThreadLocalAllocBuffer() : _allocation_fraction(TLABAllocationWeight) { | 104 ThreadLocalAllocBuffer() : _allocation_fraction(TLABAllocationWeight), _allocated_before_last_gc(0) { |
103 // do nothing. tlabs must be inited by initialize() calls | 105 // do nothing. tlabs must be inited by initialize() calls |
104 } | 106 } |
105 | 107 |
106 static const size_t min_size() { return align_object_size(MinTLABSize / HeapWordSize); } | 108 static const size_t min_size() { return align_object_size(MinTLABSize / HeapWordSize); } |
107 static const size_t max_size(); | 109 static const size_t max_size() { assert(_max_size != 0, "max_size not set up"); return _max_size; } |
110 static void set_max_size(size_t max_size) { _max_size = max_size; } | |
108 | 111 |
109 HeapWord* start() const { return _start; } | 112 HeapWord* start() const { return _start; } |
110 HeapWord* end() const { return _end; } | 113 HeapWord* end() const { return _end; } |
111 HeapWord* hard_end() const { return _end + alignment_reserve(); } | 114 HeapWord* hard_end() const { return _end + alignment_reserve(); } |
112 HeapWord* top() const { return _top; } | 115 HeapWord* top() const { return _top; } |