--- a/src/hotspot/share/runtime/thread.hpp Tue Jun 26 08:13:02 2018 +0100
+++ b/src/hotspot/share/runtime/thread.hpp Mon Jun 25 16:00:56 2018 +0200
@@ -44,6 +44,7 @@
#include "runtime/stubRoutines.hpp"
#include "runtime/threadHeapSampler.hpp"
#include "runtime/threadLocalStorage.hpp"
+#include "runtime/threadStatisticalInfo.hpp"
#include "runtime/unhandledOops.hpp"
#include "utilities/align.hpp"
#include "utilities/exceptions.hpp"
@@ -341,6 +342,8 @@
// the Java heap
ThreadHeapSampler _heap_sampler; // For use when sampling the memory.
+ ThreadStatisticalInfo _statistical_info; // Statistics about the thread
+
JFR_ONLY(DEFINE_THREAD_LOCAL_FIELD_JFR;) // Thread-local data for jfr
int _vm_operation_started_count; // VM_Operation support
@@ -521,6 +524,8 @@
ThreadHeapSampler& heap_sampler() { return _heap_sampler; }
+ ThreadStatisticalInfo& statistical_info() { return _statistical_info; }
+
JFR_ONLY(DEFINE_THREAD_LOCAL_ACCESSOR_JFR;)
bool is_trace_suspend() { return (_suspend_flags & _trace_flag) != 0; }
@@ -638,7 +643,8 @@
void set_lgrp_id(int value) { _lgrp_id = value; }
// Printing
- virtual void print_on(outputStream* st) const;
+ void print_on(outputStream* st, bool print_extended_info) const;
+ virtual void print_on(outputStream* st) const { print_on(st, false); }
void print() const { print_on(tty); }
virtual void print_on_error(outputStream* st, char* buf, int buflen) const;
void print_value_on(outputStream* st) const;
@@ -1759,7 +1765,8 @@
// Misc. operations
char* name() const { return (char*)get_thread_name(); }
- void print_on(outputStream* st) const;
+ void print_on(outputStream* st, bool print_extended_info) const;
+ void print_on(outputStream* st) const { print_on(st, false); }
void print_value();
void print_thread_state_on(outputStream*) const PRODUCT_RETURN;
void print_thread_state() const PRODUCT_RETURN;
@@ -2173,10 +2180,10 @@
// Verification
static void verify();
- static void print_on(outputStream* st, bool print_stacks, bool internal_format, bool print_concurrent_locks);
+ static void print_on(outputStream* st, bool print_stacks, bool internal_format, bool print_concurrent_locks, bool print_extended_info);
static void print(bool print_stacks, bool internal_format) {
// this function is only used by debug.cpp
- print_on(tty, print_stacks, internal_format, false /* no concurrent lock printed */);
+ print_on(tty, print_stacks, internal_format, false /* no concurrent lock printed */, false /* simple format */);
}
static void print_on_error(outputStream* st, Thread* current, char* buf, int buflen);
static void print_on_error(Thread* this_thread, outputStream* st, Thread* current, char* buf,