src/share/vm/runtime/thread.cpp
Index Unified diffs Context diffs Sdiffs Wdiffs Patch New Old Previous File Next File
*** old/src/share/vm/runtime/thread.cpp	Mon Sep 17 16:14:10 2012
--- new/src/share/vm/runtime/thread.cpp	Mon Sep 17 16:14:09 2012

*** 317,328 **** --- 317,330 ---- set_stack_base(os::current_stack_base()); set_stack_size(os::current_stack_size()); // record thread's native stack, stack grows downward address low_stack_addr = stack_base() - stack_size(); + #if INCLUDE_NMT MemTracker::record_thread_stack(low_stack_addr, stack_size(), this, CURRENT_PC); + #endif // INCLUDE_NMT } Thread::~Thread() { // Reclaim the objectmonitors from the omFreeList of the moribund thread.
*** 330,343 **** --- 332,347 ---- // stack_base can be NULL if the thread is never started or exited before // record_stack_base_and_size called. Although, we would like to ensure // that all started threads do call record_stack_base_and_size(), there is // not proper way to enforce that. + #if INCLUDE_NMT if (_stack_base != NULL) { address low_stack_addr = stack_base() - stack_size(); MemTracker::release_thread_stack(low_stack_addr, stack_size(), this); } + #endif // INCLUDE_NMT // deallocate data structures delete resource_area(); // since the handle marks are using the handle area, we have to deallocated the root // handle mark before deallocating the thread's handle area,
*** 1345,1355 **** --- 1349,1361 ---- set_deopt_nmethod(NULL); clear_must_deopt_id(); set_monitor_chunks(NULL); set_next(NULL); set_thread_state(_thread_new); + #if INCLUDE_NMT set_recorder(NULL); + #endif _terminated = _not_terminated; _privileged_stack_top = NULL; _array_for_gc = NULL; _suspend_equivalent = false; _in_deopt_handler = 0;
*** 3507,3517 **** --- 3513,3525 ---- #else /* USDT2 */ HOTSPOT_VM_INIT_END(); #endif /* USDT2 */ // record VM initialization completion time + #if INCLUDE_MANAGEMENT Management::record_vm_init_completed(); + #endif // INCLUDE_MANAGEMENT // Compute system loader. Note that this has to occur after set_init_completed, since // valid exceptions may be thrown in the process. // Note that we do not use CHECK_0 here since we are inside an EXCEPTION_MARK and // set_init_completed has just been called, causing exceptions not to be shortcut
*** 3568,3580 **** --- 3576,3593 ---- if (CleanChunkPoolAsync) { Chunk::start_chunk_pool_cleaner_task(); } // initialize compiler(s) + #if defined(COMPILER1) || defined(COMPILER2) CompileBroker::compilation_init(); + #endif + #if INCLUDE_MANAGEMENT Management::initialize(THREAD); + #endif // INCLUDE_MANAGEMENT + if (HAS_PENDING_EXCEPTION) { // management agent fails to start possibly due to // configuration problem and is responsible for printing // stack trace if appropriate. Simply exit VM. vm_exit(1);
*** 3740,3749 **** --- 3753,3763 ---- void Threads::create_vm_init_agents() { extern struct JavaVM_ main_vm; AgentLibrary* agent; JvmtiExport::enter_onload_phase(); + for (agent = Arguments::agents(); agent != NULL; agent = agent->next()) { OnLoadEntry_t on_load_entry = lookup_agent_on_load(agent); if (on_load_entry != NULL) { // Invoke the Agent_OnLoad function

src/share/vm/runtime/thread.cpp
Index Unified diffs Context diffs Sdiffs Wdiffs Patch New Old Previous File Next File