hotspot/src/share/vm/services/classLoadingService.cpp
changeset 46329 53ccc37bda19
parent 40924 226073476e18
child 46335 da075aa9241f
--- a/hotspot/src/share/vm/services/classLoadingService.cpp	Wed Mar 15 11:44:46 2017 +0100
+++ b/hotspot/src/share/vm/services/classLoadingService.cpp	Wed Mar 15 10:25:37 2017 -0400
@@ -1,5 +1,5 @@
 /*
- * Copyright (c) 2003, 2016, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 2003, 2017, Oracle and/or its affiliates. All rights reserved.
  * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
  *
  * This code is free software; you can redistribute it and/or modify it
@@ -197,24 +197,21 @@
   LogConfiguration::configure_stdout(level, false, LOG_TAGS(class, unload));
 }
 
-GrowableArray<KlassHandle>* LoadedClassesEnumerator::_loaded_classes = NULL;
-Thread* LoadedClassesEnumerator::_current_thread = NULL;
+GrowableArray<Klass*>* LoadedClassesEnumerator::_loaded_classes = NULL;
 
-LoadedClassesEnumerator::LoadedClassesEnumerator(Thread* cur_thread) {
-  assert(cur_thread == Thread::current(), "Check current thread");
+LoadedClassesEnumerator::LoadedClassesEnumerator() {
 
   int init_size = ClassLoadingService::loaded_class_count();
-  _klass_handle_array = new GrowableArray<KlassHandle>(init_size);
+  _klass_array = new GrowableArray<Klass*>(init_size);
 
   // For consistency of the loaded classes, grab the SystemDictionary lock
   MutexLocker sd_mutex(SystemDictionary_lock);
 
-  // Set _loaded_classes and _current_thread and begin enumerating all classes.
+  // Set _loaded_classes and begin enumerating all classes.
   // Only one thread will do the enumeration at a time.
   // These static variables are needed and they are used by the static method
   // add_loaded_class called from classes_do().
-  _loaded_classes = _klass_handle_array;
-  _current_thread = cur_thread;
+  _loaded_classes = _klass_array;
 
   SystemDictionary::classes_do(&add_loaded_class);