Mercurial > hg > graal-jvmci-8
diff src/share/vm/classfile/classLoader.cpp @ 3555:22d11b3bc561
Various hacks to be able to install machine code from a Java thread.
author | Thomas Wuerthinger <thomas@wuerthinger.net> |
---|---|
date | Wed, 24 Aug 2011 01:05:02 +0200 |
parents | 4aa80ca3dbec |
children | 04b9a2566eec |
line wrap: on
line diff
--- a/src/share/vm/classfile/classLoader.cpp Mon Aug 22 19:55:06 2011 +0200 +++ b/src/share/vm/classfile/classLoader.cpp Wed Aug 24 01:05:02 2011 +0200 @@ -585,7 +585,7 @@ // File or directory found ClassPathEntry* new_entry = NULL; create_class_path_entry((char *)path, st, &new_entry, LazyBootClassLoader); - new_entry->set_compiler_thread_only(compiler_cp); + //new_entry->set_compiler_thread_only(compiler_cp); // The kernel VM adds dynamically to the end of the classloader path and // doesn't reorder the bootclasspath which would break java.lang.Package // (see PackageInfo). @@ -913,6 +913,22 @@ } } + if (stream == NULL && !(THREAD->is_Compiler_thread())) { + classpath_index = 0; + PerfClassTraceTime vmtimer(perf_sys_class_lookup_time(), + ((JavaThread*) THREAD)->get_thread_stat()->perf_timers_addr(), + PerfClassTraceTime::CLASS_LOAD); + ClassPathEntry* e = _first_entry; + while (e != NULL) { + stream = e->open_stream(name); + if (stream != NULL) { + break; + } + e = e->next(); + ++classpath_index; + } + } + instanceKlassHandle h(THREAD, klassOop(NULL)); if (stream != NULL) {