< prev index next >

src/share/vm/compiler/compileBroker.cpp

Print this page




   9  * This code is distributed in the hope that it will be useful, but WITHOUT
  10  * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
  11  * FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
  12  * version 2 for more details (a copy is included in the LICENSE file that
  13  * accompanied this code).
  14  *
  15  * You should have received a copy of the GNU General Public License version
  16  * 2 along with this work; if not, write to the Free Software Foundation,
  17  * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
  18  *
  19  * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
  20  * or visit www.oracle.com if you need additional information or have any
  21  * questions.
  22  *
  23  */
  24 
  25 #include "precompiled.hpp"
  26 #include "classfile/systemDictionary.hpp"
  27 #include "classfile/vmSymbols.hpp"
  28 #include "code/codeCache.hpp"

  29 #include "compiler/compileBroker.hpp"
  30 #include "compiler/compileLog.hpp"
  31 #include "compiler/compilerOracle.hpp"
  32 #include "interpreter/linkResolver.hpp"
  33 #include "memory/allocation.inline.hpp"
  34 #include "oops/methodData.hpp"
  35 #include "oops/method.hpp"
  36 #include "oops/oop.inline.hpp"
  37 #include "prims/nativeLookup.hpp"
  38 #include "prims/whitebox.hpp"
  39 #include "runtime/arguments.hpp"
  40 #include "runtime/atomic.inline.hpp"
  41 #include "runtime/compilationPolicy.hpp"
  42 #include "runtime/init.hpp"
  43 #include "runtime/interfaceSupport.hpp"
  44 #include "runtime/javaCalls.hpp"
  45 #include "runtime/os.hpp"
  46 #include "runtime/sharedRuntime.hpp"
  47 #include "runtime/sweeper.hpp"
  48 #include "trace/tracing.hpp"


 953                                               CHECK);
 954 
 955     _perf_last_compile_size =
 956              PerfDataManager::create_variable(SUN_CI, "lastSize",
 957                                               PerfData::U_Bytes,
 958                                               (jlong)CompileBroker::no_compile,
 959                                               CHECK);
 960 
 961 
 962     _perf_last_failed_type =
 963              PerfDataManager::create_variable(SUN_CI, "lastFailedType",
 964                                               PerfData::U_None,
 965                                               (jlong)CompileBroker::no_compile,
 966                                               CHECK);
 967 
 968     _perf_last_invalidated_type =
 969          PerfDataManager::create_variable(SUN_CI, "lastInvalidatedType",
 970                                           PerfData::U_None,
 971                                           (jlong)CompileBroker::no_compile,
 972                                           CHECK);




















 973   }
 974 
 975   _initialized = true;
 976 }
 977 
 978 
 979 JavaThread* CompileBroker::make_thread(const char* name, CompileQueue* queue, CompilerCounters* counters,
 980                                        AbstractCompiler* comp, bool compiler_thread, TRAPS) {
 981   JavaThread* thread = NULL;
 982   Klass* k = SystemDictionary::resolve_or_fail(vmSymbols::java_lang_Thread(), true, CHECK_0);
 983   instanceKlassHandle klass (THREAD, k);
 984   instanceHandle thread_oop = klass->allocate_instance_handle(CHECK_0);
 985   Handle string = java_lang_String::create_from_str(name, CHECK_0);
 986 
 987   // Initialize thread_oop to put it into the system threadGroup
 988   Handle thread_group (THREAD,  Universe::system_thread_group());
 989   JavaValue result(T_VOID);
 990   JavaCalls::call_special(&result, thread_oop,
 991                        klass,
 992                        vmSymbols::object_initializer_name(),




   9  * This code is distributed in the hope that it will be useful, but WITHOUT
  10  * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
  11  * FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
  12  * version 2 for more details (a copy is included in the LICENSE file that
  13  * accompanied this code).
  14  *
  15  * You should have received a copy of the GNU General Public License version
  16  * 2 along with this work; if not, write to the Free Software Foundation,
  17  * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
  18  *
  19  * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
  20  * or visit www.oracle.com if you need additional information or have any
  21  * questions.
  22  *
  23  */
  24 
  25 #include "precompiled.hpp"
  26 #include "classfile/systemDictionary.hpp"
  27 #include "classfile/vmSymbols.hpp"
  28 #include "code/codeCache.hpp"
  29 #include "code/dependencies.hpp"
  30 #include "compiler/compileBroker.hpp"
  31 #include "compiler/compileLog.hpp"
  32 #include "compiler/compilerOracle.hpp"
  33 #include "interpreter/linkResolver.hpp"
  34 #include "memory/allocation.inline.hpp"
  35 #include "oops/methodData.hpp"
  36 #include "oops/method.hpp"
  37 #include "oops/oop.inline.hpp"
  38 #include "prims/nativeLookup.hpp"
  39 #include "prims/whitebox.hpp"
  40 #include "runtime/arguments.hpp"
  41 #include "runtime/atomic.inline.hpp"
  42 #include "runtime/compilationPolicy.hpp"
  43 #include "runtime/init.hpp"
  44 #include "runtime/interfaceSupport.hpp"
  45 #include "runtime/javaCalls.hpp"
  46 #include "runtime/os.hpp"
  47 #include "runtime/sharedRuntime.hpp"
  48 #include "runtime/sweeper.hpp"
  49 #include "trace/tracing.hpp"


 954                                               CHECK);
 955 
 956     _perf_last_compile_size =
 957              PerfDataManager::create_variable(SUN_CI, "lastSize",
 958                                               PerfData::U_Bytes,
 959                                               (jlong)CompileBroker::no_compile,
 960                                               CHECK);
 961 
 962 
 963     _perf_last_failed_type =
 964              PerfDataManager::create_variable(SUN_CI, "lastFailedType",
 965                                               PerfData::U_None,
 966                                               (jlong)CompileBroker::no_compile,
 967                                               CHECK);
 968 
 969     _perf_last_invalidated_type =
 970          PerfDataManager::create_variable(SUN_CI, "lastInvalidatedType",
 971                                           PerfData::U_None,
 972                                           (jlong)CompileBroker::no_compile,
 973                                           CHECK);
 974 
 975     Dependencies::_perf_dependency_checking_time =
 976          PerfDataManager::create_counter(SUN_CI, "NMethodDependenciesCheckingTime",
 977                                          PerfData::U_Ticks, CHECK);
 978 
 979     Dependencies::_perf_dependencies_checked_count =
 980          PerfDataManager::create_counter(SUN_CI, "NMethodDependenciesCheckedCount",
 981                                          PerfData::U_Events, CHECK);
 982 
 983     Dependencies::_perf_dependencies_invalidated =
 984          PerfDataManager::create_counter(SUN_CI, "NMethodDependenciesInvalidated",
 985                                          PerfData::U_Events, CHECK);
 986 
 987     Dependencies::_perf_dependencies_total_count =
 988          PerfDataManager::create_counter(SUN_CI, "NMethodDependenciesTotalCount",
 989                                          PerfData::U_Events, CHECK);
 990 
 991     Dependencies::_perf_dependencies_context_traversals =
 992          PerfDataManager::create_counter(SUN_CI, "NMethodDependenciesContextTraversals",
 993                                          PerfData::U_Events, CHECK);
 994   }
 995 
 996   _initialized = true;
 997 }
 998 
 999 
1000 JavaThread* CompileBroker::make_thread(const char* name, CompileQueue* queue, CompilerCounters* counters,
1001                                        AbstractCompiler* comp, bool compiler_thread, TRAPS) {
1002   JavaThread* thread = NULL;
1003   Klass* k = SystemDictionary::resolve_or_fail(vmSymbols::java_lang_Thread(), true, CHECK_0);
1004   instanceKlassHandle klass (THREAD, k);
1005   instanceHandle thread_oop = klass->allocate_instance_handle(CHECK_0);
1006   Handle string = java_lang_String::create_from_str(name, CHECK_0);
1007 
1008   // Initialize thread_oop to put it into the system threadGroup
1009   Handle thread_group (THREAD,  Universe::system_thread_group());
1010   JavaValue result(T_VOID);
1011   JavaCalls::call_special(&result, thread_oop,
1012                        klass,
1013                        vmSymbols::object_initializer_name(),


< prev index next >