mirror of
https://github.com/openjdk/jdk.git
synced 2025-09-21 19:44:41 +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) 2003, 2010, Oracle and/or its affiliates. All rights reserved.
|
||||
* Copyright (c) 2003, 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
|
||||
|
@ -65,6 +65,7 @@ private:
|
|||
|
||||
static bool _thread_monitoring_contention_enabled;
|
||||
static bool _thread_cpu_time_enabled;
|
||||
static bool _thread_allocated_memory_enabled;
|
||||
|
||||
// Need to keep the list of thread dump result that
|
||||
// keep references to methodOop since thread dump can be
|
||||
|
@ -83,6 +84,9 @@ public:
|
|||
static bool set_thread_cpu_time_enabled(bool flag);
|
||||
static bool is_thread_cpu_time_enabled() { return _thread_cpu_time_enabled; }
|
||||
|
||||
static bool set_thread_allocated_memory_enabled(bool flag);
|
||||
static bool is_thread_allocated_memory_enabled() { return _thread_cpu_time_enabled; }
|
||||
|
||||
static jlong get_total_thread_count() { return _total_threads_count->get_value(); }
|
||||
static jlong get_peak_thread_count() { return _peak_threads_count->get_value(); }
|
||||
static jlong get_live_thread_count() { return _live_threads_count->get_value() - _exiting_threads_count; }
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue