< prev index next >

src/share/vm/runtime/thread.cpp

Print this page

        

*** 838,847 **** --- 838,857 ---- if (osthread()) { st->print(" [id=%d]", osthread()->thread_id()); } } + void JavaThread::print_vt_buffer_stats_on(outputStream* st) const { + st->print_cr("%s:", this->name()); + st->print_cr("\tChunks in use : %d", vtchunk_in_use()); + st->print_cr("\tCached chunk : %d", local_free_chunk() == NULL ? 0 : 1); + st->print_cr("\tMax chunks : %d", vtchunk_max()); + st->print_cr("\tReturned chunks: %d", vtchunk_total_returned()); + st->print_cr("\tMemory buffered: %ld", vtchunk_total_memory_buffered()); + st->print_cr(""); + } + #ifdef ASSERT void Thread::print_owned_locks_on(outputStream* st) const { Monitor *cur = _owned_locks; if (cur == NULL) { st->print(" (no locks) ");
*** 1509,1518 **** --- 1519,1538 ---- _popframe_condition = popframe_inactive; _popframe_preserved_args = NULL; _popframe_preserved_args_size = 0; _frames_to_pop_failed_realloc = 0; + // Buffered value types support + _vt_alloc_ptr = NULL; + _vt_alloc_limit = NULL; + _local_free_chunk = NULL; + // Buffered value types instrumentation support + _vtchunk_in_use = 0; + _vtchunk_max = 0; + _vtchunk_total_returned = 0; + _vtchunk_total_memory_buffered = 0; + pd_initialize(); } #if INCLUDE_ALL_GCS SATBMarkQueueSet JavaThread::_satb_mark_queue_set;
*** 2819,2829 **** --- 2839,2852 ---- } // Traverse instance variables at the end since the GC may be moving things // around using this function f->do_oop((oop*) &_threadObj); + // if (Universe::heap()->is_in_reserved_or_null((void*)_vm_result)) { + if (!VTBufferChunk::check_buffered(&_vm_result)) { f->do_oop((oop*) &_vm_result); + } f->do_oop((oop*) &_exception_oop); f->do_oop((oop*) &_pending_async_exception); if (jvmti_thread_state() != NULL) { jvmti_thread_state()->oops_do(f);
*** 4875,4879 **** --- 4898,4908 ---- p->verify(); } VMThread* thread = VMThread::vm_thread(); if (thread != NULL) thread->verify(); } + + void Threads::print_vt_buffer_stats_on(outputStream* st) { + ALL_JAVA_THREADS(p) { + p->print_vt_buffer_stats_on(st); + } + }
< prev index next >