comparison src/share/vm/gc_interface/collectedHeap.inline.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 c9ca3f51cf41
comparison
equal deleted inserted replaced
2097:039eb4201e06 2100:b1a2afa37ec4
1 /* 1 /*
2 * Copyright (c) 2001, 2010, Oracle and/or its affiliates. All rights reserved. 2 * Copyright (c) 2001, 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.
151 if (result != NULL) { 151 if (result != NULL) {
152 NOT_PRODUCT(Universe::heap()-> 152 NOT_PRODUCT(Universe::heap()->
153 check_for_non_bad_heap_word_value(result, size)); 153 check_for_non_bad_heap_word_value(result, size));
154 assert(!HAS_PENDING_EXCEPTION, 154 assert(!HAS_PENDING_EXCEPTION,
155 "Unexpected exception, will result in uninitialized storage"); 155 "Unexpected exception, will result in uninitialized storage");
156 THREAD->incr_allocated_bytes(size * HeapWordSize);
156 return result; 157 return result;
157 } 158 }
158 159
159 160
160 if (!gc_overhead_limit_was_exceeded) { 161 if (!gc_overhead_limit_was_exceeded) {