mirror of
https://github.com/openjdk/jdk.git
synced 2025-09-18 01:54:47 +02:00
7003271: Hotspot should track cumulative Java heap bytes allocated on a per-thread basis
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
This commit is contained in:
parent
6f2c2c3272
commit
7b0134a7cb
26 changed files with 447 additions and 212 deletions
|
@ -1,5 +1,5 @@
|
|||
/*
|
||||
* Copyright (c) 1999, 2010, Oracle and/or its affiliates. All rights reserved.
|
||||
* Copyright (c) 1999, 2011, Oracle and/or its affiliates. All rights reserved.
|
||||
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
|
||||
*
|
||||
* This code is free software; you can redistribute it and/or modify it
|
||||
|
@ -114,6 +114,11 @@ void ThreadLocalAllocBuffer::accumulate_statistics() {
|
|||
void ThreadLocalAllocBuffer::make_parsable(bool retire) {
|
||||
if (end() != NULL) {
|
||||
invariants();
|
||||
|
||||
if (retire) {
|
||||
myThread()->incr_allocated_bytes(used_bytes());
|
||||
}
|
||||
|
||||
CollectedHeap::fill_with_object(top(), hard_end(), retire);
|
||||
|
||||
if (retire || ZeroTLAB) { // "Reset" the TLAB
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue