Mercurial > hg > graal-jvmci-8
comparison src/share/vm/graal/graalEnv.cpp @ 8215:b89a97928e72
Implement weak reference semantics for HotSpotInstalledCode in the default method installation case. Add new boolean[] array as parameter to the code installation.
author | Thomas Wuerthinger <thomas.wuerthinger@oracle.com> |
---|---|
date | Mon, 11 Mar 2013 20:55:05 +0100 |
parents | 0799a7efbe7b |
children | 7ef66078d837 |
comparison
equal
deleted
inserted
replaced
8205:9efef773f521 | 8215:b89a97928e72 |
---|---|
41 #include "runtime/init.hpp" | 41 #include "runtime/init.hpp" |
42 #include "runtime/reflection.hpp" | 42 #include "runtime/reflection.hpp" |
43 #include "runtime/sharedRuntime.hpp" | 43 #include "runtime/sharedRuntime.hpp" |
44 #include "utilities/dtrace.hpp" | 44 #include "utilities/dtrace.hpp" |
45 #include "graal/graalRuntime.hpp" | 45 #include "graal/graalRuntime.hpp" |
46 #include "graal/graalJavaAccess.hpp" | |
46 | 47 |
47 // ------------------------------------------------------------------ | 48 // ------------------------------------------------------------------ |
48 // Note: the logic of this method should mirror the logic of | 49 // Note: the logic of this method should mirror the logic of |
49 // constantPoolOopDesc::verify_constant_pool_resolve. | 50 // constantPoolOopDesc::verify_constant_pool_resolve. |
50 bool GraalEnv::check_klass_accessibility(KlassHandle accessing_klass, KlassHandle resolved_klass) { | 51 bool GraalEnv::check_klass_accessibility(KlassHandle accessing_klass, KlassHandle resolved_klass) { |
416 CompileTask* task, | 417 CompileTask* task, |
417 int compile_id, | 418 int compile_id, |
418 bool has_debug_info, | 419 bool has_debug_info, |
419 bool has_unsafe_access, | 420 bool has_unsafe_access, |
420 GrowableArray<jlong>* leaf_graph_ids, | 421 GrowableArray<jlong>* leaf_graph_ids, |
421 Handle installed_code) { | 422 Handle installed_code, |
423 Handle triggered_deoptimizations) { | |
422 GRAAL_EXCEPTION_CONTEXT; | 424 GRAAL_EXCEPTION_CONTEXT; |
423 NMethodSweeper::possibly_sweep(); | 425 NMethodSweeper::possibly_sweep(); |
424 nm = NULL; | 426 nm = NULL; |
425 int comp_level = CompLevel_simple; | 427 int comp_level = CompLevel_simple; |
426 { | 428 { |
461 offsets, | 463 offsets, |
462 orig_pc_offset, | 464 orig_pc_offset, |
463 debug_info, dependencies, code_buffer, | 465 debug_info, dependencies, code_buffer, |
464 frame_words, oop_map_set, | 466 frame_words, oop_map_set, |
465 handler_table, &implicit_tbl, | 467 handler_table, &implicit_tbl, |
466 compiler, comp_level, leaf_graph_ids, installed_code); | 468 compiler, comp_level, leaf_graph_ids, installed_code, triggered_deoptimizations); |
467 | 469 |
468 // Free codeBlobs | 470 // Free codeBlobs |
469 //code_buffer->free_blob(); | 471 //code_buffer->free_blob(); |
470 | 472 |
471 // stress test 6243940 by immediately making the method | 473 // stress test 6243940 by immediately making the method |
490 | 492 |
491 // Record successful registration. | 493 // Record successful registration. |
492 // (Put nm into the task handle *before* publishing to the Java heap.) | 494 // (Put nm into the task handle *before* publishing to the Java heap.) |
493 if (task != NULL) task->set_code(nm); | 495 if (task != NULL) task->set_code(nm); |
494 | 496 |
495 if (installed_code.is_null()) { | 497 if (HotSpotInstalledCode::isDefault(installed_code())) { |
496 if (entry_bci == InvocationEntryBci) { | 498 if (entry_bci == InvocationEntryBci) { |
497 if (TieredCompilation) { | 499 if (TieredCompilation) { |
498 // If there is an old version we're done with it | 500 // If there is an old version we're done with it |
499 nmethod* old = method->code(); | 501 nmethod* old = method->code(); |
500 if (TraceMethodReplacement && old != NULL) { | 502 if (TraceMethodReplacement && old != NULL) { |