Mercurial > hg > graal-jvmci-8
comparison src/share/vm/compiler/compileBroker.cpp @ 6266:1d7922586cf6
7023639: JSR 292 method handle invocation needs a fast path for compiled code
6984705: JSR 292 method handle creation should not go through JNI
Summary: remove assembly code for JDK 7 chained method handles
Reviewed-by: jrose, twisti, kvn, mhaupt
Contributed-by: John Rose <john.r.rose@oracle.com>, Christian Thalinger <christian.thalinger@oracle.com>, Michael Haupt <michael.haupt@oracle.com>
author | twisti |
---|---|
date | Tue, 24 Jul 2012 10:51:00 -0700 |
parents | d2a62e0f25eb |
children | 957c266d8bc5 da91efe96a93 |
comparison
equal
deleted
inserted
replaced
6241:aba91a731143 | 6266:1d7922586cf6 |
---|---|
405 } else { | 405 } else { |
406 method->print_short_name(st); | 406 method->print_short_name(st); |
407 if (is_osr_method) { | 407 if (is_osr_method) { |
408 st->print(" @ %d", osr_bci); | 408 st->print(" @ %d", osr_bci); |
409 } | 409 } |
410 st->print(" (%d bytes)", method->code_size()); | 410 if (method->is_native()) |
411 st->print(" (native)"); | |
412 else | |
413 st->print(" (%d bytes)", method->code_size()); | |
411 } | 414 } |
412 | 415 |
413 if (msg != NULL) { | 416 if (msg != NULL) { |
414 st->print(" %s", msg); | 417 st->print(" %s", msg); |
415 } | 418 } |
425 st->print(" "); // print timestamp | 428 st->print(" "); // print timestamp |
426 // 1234 | 429 // 1234 |
427 st->print(" "); // print compilation number | 430 st->print(" "); // print compilation number |
428 | 431 |
429 // method attributes | 432 // method attributes |
430 const char sync_char = method->is_synchronized() ? 's' : ' '; | 433 if (method->is_loaded()) { |
431 const char exception_char = method->has_exception_handlers() ? '!' : ' '; | 434 const char sync_char = method->is_synchronized() ? 's' : ' '; |
432 const char monitors_char = method->has_monitor_bytecodes() ? 'm' : ' '; | 435 const char exception_char = method->has_exception_handlers() ? '!' : ' '; |
433 | 436 const char monitors_char = method->has_monitor_bytecodes() ? 'm' : ' '; |
434 // print method attributes | 437 |
435 st->print(" %c%c%c ", sync_char, exception_char, monitors_char); | 438 // print method attributes |
439 st->print(" %c%c%c ", sync_char, exception_char, monitors_char); | |
440 } else { | |
441 // %s!bn | |
442 st->print(" "); // print method attributes | |
443 } | |
436 | 444 |
437 if (TieredCompilation) { | 445 if (TieredCompilation) { |
438 st->print(" "); | 446 st->print(" "); |
439 } | 447 } |
440 st->print(" "); // more indent | 448 st->print(" "); // more indent |
442 | 450 |
443 for (int i = 0; i < inline_level; i++) st->print(" "); | 451 for (int i = 0; i < inline_level; i++) st->print(" "); |
444 | 452 |
445 st->print("@ %d ", bci); // print bci | 453 st->print("@ %d ", bci); // print bci |
446 method->print_short_name(st); | 454 method->print_short_name(st); |
447 st->print(" (%d bytes)", method->code_size()); | 455 if (method->is_loaded()) |
456 st->print(" (%d bytes)", method->code_size()); | |
457 else | |
458 st->print(" (not loaded)"); | |
448 | 459 |
449 if (msg != NULL) { | 460 if (msg != NULL) { |
450 st->print(" %s", msg); | 461 st->print(" %s", msg); |
451 } | 462 } |
452 st->cr(); | 463 st->cr(); |
1016 guarantee(!method->is_abstract(), "cannot compile abstract methods"); | 1027 guarantee(!method->is_abstract(), "cannot compile abstract methods"); |
1017 assert(method->method_holder()->klass_part()->oop_is_instance(), | 1028 assert(method->method_holder()->klass_part()->oop_is_instance(), |
1018 "sanity check"); | 1029 "sanity check"); |
1019 assert(!instanceKlass::cast(method->method_holder())->is_not_initialized(), | 1030 assert(!instanceKlass::cast(method->method_holder())->is_not_initialized(), |
1020 "method holder must be initialized"); | 1031 "method holder must be initialized"); |
1032 assert(!method->is_method_handle_intrinsic(), "do not enqueue these guys"); | |
1021 | 1033 |
1022 if (CIPrintRequests) { | 1034 if (CIPrintRequests) { |
1023 tty->print("request: "); | 1035 tty->print("request: "); |
1024 method->print_short_name(tty); | 1036 method->print_short_name(tty); |
1025 if (osr_bci != InvocationEntryBci) { | 1037 if (osr_bci != InvocationEntryBci) { |
1229 // the compilation. Native lookups can load code, which is not | 1241 // the compilation. Native lookups can load code, which is not |
1230 // permitted during compilation. | 1242 // permitted during compilation. |
1231 // | 1243 // |
1232 // Note: A native method implies non-osr compilation which is | 1244 // Note: A native method implies non-osr compilation which is |
1233 // checked with an assertion at the entry of this method. | 1245 // checked with an assertion at the entry of this method. |
1234 if (method->is_native()) { | 1246 if (method->is_native() && !method->is_method_handle_intrinsic()) { |
1235 bool in_base_library; | 1247 bool in_base_library; |
1236 address adr = NativeLookup::lookup(method, in_base_library, THREAD); | 1248 address adr = NativeLookup::lookup(method, in_base_library, THREAD); |
1237 if (HAS_PENDING_EXCEPTION) { | 1249 if (HAS_PENDING_EXCEPTION) { |
1238 // In case of an exception looking up the method, we just forget | 1250 // In case of an exception looking up the method, we just forget |
1239 // about it. The interpreter will kick-in and throw the exception. | 1251 // about it. The interpreter will kick-in and throw the exception. |
1262 return NULL; | 1274 return NULL; |
1263 } | 1275 } |
1264 | 1276 |
1265 // do the compilation | 1277 // do the compilation |
1266 if (method->is_native()) { | 1278 if (method->is_native()) { |
1267 if (!PreferInterpreterNativeStubs) { | 1279 if (!PreferInterpreterNativeStubs || method->is_method_handle_intrinsic()) { |
1268 // Acquire our lock. | 1280 // Acquire our lock. |
1269 int compile_id; | 1281 int compile_id; |
1270 { | 1282 { |
1271 MutexLocker locker(MethodCompileQueue_lock, THREAD); | 1283 MutexLocker locker(MethodCompileQueue_lock, THREAD); |
1272 compile_id = assign_compile_id(method, standard_entry_bci); | 1284 compile_id = assign_compile_id(method, standard_entry_bci); |