Mercurial > hg > graal-compiler
diff src/share/vm/services/threadService.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 | d2a62e0f25eb |
line wrap: on
line diff
--- a/src/share/vm/services/threadService.hpp Fri Jan 07 03:38:19 2011 -0800 +++ b/src/share/vm/services/threadService.hpp Fri Jan 07 10:42:32 2011 -0500 @@ -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 @@ 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 @@ 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; }