< prev index next >

src/share/vm/runtime/serviceThread.cpp

Print this page




  23  */
  24 
  25 #include "precompiled.hpp"
  26 #include "runtime/interfaceSupport.hpp"
  27 #include "runtime/javaCalls.hpp"
  28 #include "runtime/serviceThread.hpp"
  29 #include "runtime/mutexLocker.hpp"
  30 #include "runtime/os.hpp"
  31 #include "prims/jvmtiImpl.hpp"
  32 #include "services/allocationContextService.hpp"
  33 #include "services/diagnosticArgument.hpp"
  34 #include "services/diagnosticFramework.hpp"
  35 #include "services/gcNotifier.hpp"
  36 #include "services/lowMemoryDetector.hpp"
  37 
  38 ServiceThread* ServiceThread::_instance = NULL;
  39 
  40 void ServiceThread::initialize() {
  41   EXCEPTION_MARK;
  42 
  43   instanceKlassHandle klass (THREAD,  SystemDictionary::Thread_klass());
  44   instanceHandle thread_oop = klass->allocate_instance_handle(CHECK);
  45 
  46   const char* name = "Service Thread";
  47 
  48   Handle string = java_lang_String::create_from_str(name, CHECK);
  49 
  50   // Initialize thread_oop to put it into the system threadGroup
  51   Handle thread_group (THREAD, Universe::system_thread_group());
  52   JavaValue result(T_VOID);
  53   JavaCalls::call_special(&result, thread_oop,
  54                           klass,
  55                           vmSymbols::object_initializer_name(),
  56                           vmSymbols::threadgroup_string_void_signature(),
  57                           thread_group,
  58                           string,
  59                           CHECK);
  60 
  61   {
  62     MutexLocker mu(Threads_lock);
  63     ServiceThread* thread =  new ServiceThread(&service_thread_entry);




  23  */
  24 
  25 #include "precompiled.hpp"
  26 #include "runtime/interfaceSupport.hpp"
  27 #include "runtime/javaCalls.hpp"
  28 #include "runtime/serviceThread.hpp"
  29 #include "runtime/mutexLocker.hpp"
  30 #include "runtime/os.hpp"
  31 #include "prims/jvmtiImpl.hpp"
  32 #include "services/allocationContextService.hpp"
  33 #include "services/diagnosticArgument.hpp"
  34 #include "services/diagnosticFramework.hpp"
  35 #include "services/gcNotifier.hpp"
  36 #include "services/lowMemoryDetector.hpp"
  37 
  38 ServiceThread* ServiceThread::_instance = NULL;
  39 
  40 void ServiceThread::initialize() {
  41   EXCEPTION_MARK;
  42 
  43   InstanceKlass* klass = SystemDictionary::Thread_klass();
  44   instanceHandle thread_oop = klass->allocate_instance_handle(CHECK);
  45 
  46   const char* name = "Service Thread";
  47 
  48   Handle string = java_lang_String::create_from_str(name, CHECK);
  49 
  50   // Initialize thread_oop to put it into the system threadGroup
  51   Handle thread_group (THREAD, Universe::system_thread_group());
  52   JavaValue result(T_VOID);
  53   JavaCalls::call_special(&result, thread_oop,
  54                           klass,
  55                           vmSymbols::object_initializer_name(),
  56                           vmSymbols::threadgroup_string_void_signature(),
  57                           thread_group,
  58                           string,
  59                           CHECK);
  60 
  61   {
  62     MutexLocker mu(Threads_lock);
  63     ServiceThread* thread =  new ServiceThread(&service_thread_entry);


< prev index next >