Mercurial > hg > graal-compiler
comparison src/share/vm/memory/threadLocalAllocBuffer.hpp @ 2100:b1a2afa37ec4
7003271: Hotspot should track cumulative Java heap bytes allocated on a per-thread basis
Summary: Track allocated bytes in Thread's, update on TLAB retirement and direct allocation in Eden and tenured, add JNI methods for ThreadMXBean.
Reviewed-by: coleenp, kvn, dholmes, ysr
author | phh |
---|---|
date | Fri, 07 Jan 2011 10:42:32 -0500 |
parents | f95d63e2154a |
children | 1af104d6cf99 |
comparison
equal
deleted
inserted
replaced
2097:039eb4201e06 | 2100:b1a2afa37ec4 |
---|---|
1 /* | 1 /* |
2 * Copyright (c) 1999, 2010, Oracle and/or its affiliates. All rights reserved. | 2 * Copyright (c) 1999, 2011, Oracle and/or its affiliates. All rights reserved. |
3 * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. | 3 * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. |
4 * | 4 * |
5 * This code is free software; you can redistribute it and/or modify it | 5 * This code is free software; you can redistribute it and/or modify it |
6 * under the terms of the GNU General Public License version 2 only, as | 6 * under the terms of the GNU General Public License version 2 only, as |
7 * published by the Free Software Foundation. | 7 * published by the Free Software Foundation. |
110 HeapWord* end() const { return _end; } | 110 HeapWord* end() const { return _end; } |
111 HeapWord* hard_end() const { return _end + alignment_reserve(); } | 111 HeapWord* hard_end() const { return _end + alignment_reserve(); } |
112 HeapWord* top() const { return _top; } | 112 HeapWord* top() const { return _top; } |
113 HeapWord* pf_top() const { return _pf_top; } | 113 HeapWord* pf_top() const { return _pf_top; } |
114 size_t desired_size() const { return _desired_size; } | 114 size_t desired_size() const { return _desired_size; } |
115 size_t used() const { return pointer_delta(top(), start()); } | |
116 size_t used_bytes() const { return pointer_delta(top(), start(), 1); } | |
115 size_t free() const { return pointer_delta(end(), top()); } | 117 size_t free() const { return pointer_delta(end(), top()); } |
116 // Don't discard tlab if remaining space is larger than this. | 118 // Don't discard tlab if remaining space is larger than this. |
117 size_t refill_waste_limit() const { return _refill_waste_limit; } | 119 size_t refill_waste_limit() const { return _refill_waste_limit; } |
118 | 120 |
119 // Allocate size HeapWords. The memory is NOT initialized to zero. | 121 // Allocate size HeapWords. The memory is NOT initialized to zero. |