hotspot/src/share/vm/services/classLoadingService.cpp
changeset 40924 226073476e18
parent 38151 fffedc5e5cf8
child 46329 53ccc37bda19
equal deleted inserted replaced
40922:d9f1eaf18f9a 40924:226073476e18
   181 }
   181 }
   182 
   182 
   183 bool ClassLoadingService::set_verbose(bool verbose) {
   183 bool ClassLoadingService::set_verbose(bool verbose) {
   184   MutexLocker m(Management_lock);
   184   MutexLocker m(Management_lock);
   185   // verbose will be set to the previous value
   185   // verbose will be set to the previous value
   186   if (verbose) {
   186   LogLevelType level = verbose ? LogLevel::Info : LogLevel::Off;
   187     LogConfiguration::parse_log_arguments("stdout", "class+load=info", NULL, NULL, NULL);
   187   LogConfiguration::configure_stdout(level, false, LOG_TAGS(class, load));
   188   } else {
       
   189     LogConfiguration::parse_log_arguments("stdout", "class+load=off", NULL, NULL, NULL);
       
   190   }
       
   191   reset_trace_class_unloading();
   188   reset_trace_class_unloading();
   192   return verbose;
   189   return verbose;
   193 }
   190 }
   194 
   191 
   195 // Caller to this function must own Management_lock
   192 // Caller to this function must own Management_lock
   196 void ClassLoadingService::reset_trace_class_unloading() {
   193 void ClassLoadingService::reset_trace_class_unloading() {
   197   assert(Management_lock->owned_by_self(), "Must own the Management_lock");
   194   assert(Management_lock->owned_by_self(), "Must own the Management_lock");
   198   bool value = MemoryService::get_verbose() || ClassLoadingService::get_verbose();
   195   bool value = MemoryService::get_verbose() || ClassLoadingService::get_verbose();
   199   if (value) {
   196   LogLevelType level = value ? LogLevel::Info : LogLevel::Off;
   200     LogConfiguration::parse_log_arguments("stdout", "class+unload=info", NULL, NULL, NULL);
   197   LogConfiguration::configure_stdout(level, false, LOG_TAGS(class, unload));
   201   } else {
       
   202     LogConfiguration::parse_log_arguments("stdout", "class+unload=off", NULL, NULL, NULL);
       
   203   }
       
   204 }
   198 }
   205 
   199 
   206 GrowableArray<KlassHandle>* LoadedClassesEnumerator::_loaded_classes = NULL;
   200 GrowableArray<KlassHandle>* LoadedClassesEnumerator::_loaded_classes = NULL;
   207 Thread* LoadedClassesEnumerator::_current_thread = NULL;
   201 Thread* LoadedClassesEnumerator::_current_thread = NULL;
   208 
   202