< prev index next >
src/hotspot/share/runtime/thread.hpp
Print this page
rev 49521 : 8198756: Lazy allocation of compiler threads
Reviewed-by: kvn
@@ -2037,16 +2037,18 @@
CompileTask* volatile _task; // print_threads_compiling can read this concurrently.
CompileQueue* _queue;
BufferBlob* _buffer_blob;
AbstractCompiler* _compiler;
+ TimeStamp _idle_time;
public:
static CompilerThread* current();
CompilerThread(CompileQueue* queue, CompilerCounters* counters);
+ ~CompilerThread();
bool is_Compiler_thread() const { return true; }
virtual bool can_call_java() const;
@@ -2072,10 +2074,15 @@
// Set once, for good.
assert(_log == NULL, "set only once");
_log = log;
}
+ void start_idle_timer() { _idle_time.update(); }
+ jlong idle_time_millis() {
+ return TimeHelper::counter_to_millis(_idle_time.ticks_since_update());
+ }
+
#ifndef PRODUCT
private:
IdealGraphPrinter *_ideal_graph_printer;
public:
IdealGraphPrinter *ideal_graph_printer() { return _ideal_graph_printer; }
< prev index next >