src/share/vm/ci/ciEnv.cpp
Index Unified diffs Context diffs Sdiffs Patch New Old Previous File Next File
*** old/src/share/vm/ci/ciEnv.cpp	Tue Sep 22 16:26:51 2015
--- new/src/share/vm/ci/ciEnv.cpp	Tue Sep 22 16:26:51 2015

*** 36,46 **** --- 36,46 ---- #include "classfile/vmSymbols.hpp" #include "code/codeCache.hpp" #include "code/scopeDesc.hpp" #include "compiler/compileBroker.hpp" #include "compiler/compileLog.hpp" ! #include "compiler/compilerOracle.hpp" ! #include "compiler/compilerDirectives.hpp" #include "gc/shared/collectedHeap.inline.hpp" #include "interpreter/linkResolver.hpp" #include "memory/allocation.inline.hpp" #include "memory/oopFactory.hpp" #include "memory/universe.inline.hpp"
*** 86,96 **** --- 86,96 ---- static bool firstEnv = true; #endif /* PRODUCT */ // ------------------------------------------------------------------ // ciEnv::ciEnv ! ciEnv::ciEnv(CompileTask* task, DirectiveSet* directive_set, int system_dictionary_modification_counter) : _ciEnv_arena(mtCompiler) { VM_ENTRY_MARK; // Set up ciEnv::current immediately, for the sake of ciObjectFactory, etc. thread->set_env(this);
*** 99,118 **** --- 99,119 ---- _oop_recorder = NULL; _debug_info = NULL; _dependencies = NULL; _failure_reason = NULL; _compilable = MethodCompilable; _break_at_compile = false; _compiler_data = NULL; #ifndef PRODUCT assert(!firstEnv, "not initialized properly"); #endif /* !PRODUCT */ _system_dictionary_modification_counter = system_dictionary_modification_counter; _num_inlined_bytecodes = 0; assert(task == NULL || thread->task() == task, "sanity"); _task = task; + assert(directive_set != NULL, "Must always supply a directive"); + _directive_set = directive_set; _log = NULL; // Temporary buffer for creating symbols and such. _name_buffer = NULL; _name_buffer_len = 0;
*** 159,170 **** --- 160,171 ---- _oop_recorder = NULL; _debug_info = NULL; _dependencies = NULL; _failure_reason = NULL; _compilable = MethodCompilable_never; _break_at_compile = false; _compiler_data = NULL; + _directive_set = NULL; #ifndef PRODUCT assert(firstEnv, "must be first"); firstEnv = false; #endif /* !PRODUCT */
*** 202,211 **** --- 203,223 ---- _jvmti_can_pop_frame = false; } ciEnv::~ciEnv() { CompilerThread* current_thread = CompilerThread::current(); + { + MutexLockerEx locker(DirectivesStack_lock, Mutex::_no_safepoint_check_flag); + if (_directive_set != NULL){ // May be null during init + if (_directive_set->is_exclusive_copy()) { + // Old CompilecCmmands forced us to create an exclusive copy + delete _directive_set; + } else { + _directive_set->directive()->dec_refcount(); + } + } + } _factory->remove_symbols(); // Need safepoint to clear the env on the thread. RedefineClasses might // be reading it. GUARDED_VM_ENTRY(current_thread->set_env(NULL);) }
*** 1033,1046 **** --- 1045,1067 ---- orig_pc_offset, debug_info(), dependencies(), code_buffer, frame_words, oop_map_set, handler_table, inc_table, compiler, comp_level); + // Free codeBlobs code_buffer->free_blob(); if (nm != NULL) { + bool printnmethods = dirset()->PrintAssemblyOption || dirset()->PrintNMethodsOption; + if (printnmethods || PrintDebugInfo || PrintRelocations || PrintDependencies || PrintExceptionHandlers) { + nm->print_nmethod(printnmethods); + } + if (dirset()->PrintAssemblyOption) { + Disassembler::decode(nm); + } + nm->set_has_unsafe_access(has_unsafe_access); nm->set_has_wide_vectors(has_wide_vectors); #if INCLUDE_RTM_OPT nm->set_rtm_state(rtm_state); #endif

src/share/vm/ci/ciEnv.cpp
Index Unified diffs Context diffs Sdiffs Patch New Old Previous File Next File