comparison src/share/vm/graal/graalEnv.cpp @ 7000:bf2ea3ed3bce

Fixed nmethod not being unloaded after their classloader has been unloaded by initializing _graal_installed_code in an nmethod's constructor
author Gilles Duboscq <duboscq@ssw.jku.at>
date Wed, 21 Nov 2012 23:33:43 +0100
parents 2afd99933ae6
children 263bc2349f15
comparison
equal deleted inserted replaced
6999:679e6584c177 7000:bf2ea3ed3bce
442 Dependencies* dependencies, 442 Dependencies* dependencies,
443 CompileTask* task, 443 CompileTask* task,
444 int compile_id, 444 int compile_id,
445 bool has_debug_info, 445 bool has_debug_info,
446 bool has_unsafe_access, 446 bool has_unsafe_access,
447 bool bind_to_method) { 447 Handle installed_code) {
448 EXCEPTION_CONTEXT; 448 EXCEPTION_CONTEXT;
449 NMethodSweeper::possibly_sweep(); 449 NMethodSweeper::possibly_sweep();
450 nmethod* nm = NULL; 450 nmethod* nm = NULL;
451 int comp_level = CompLevel_simple; 451 int comp_level = CompLevel_simple;
452 { 452 {
481 offsets, 481 offsets,
482 orig_pc_offset, 482 orig_pc_offset,
483 debug_info, dependencies, code_buffer, 483 debug_info, dependencies, code_buffer,
484 frame_words, oop_map_set, 484 frame_words, oop_map_set,
485 handler_table, inc_table, 485 handler_table, inc_table,
486 compiler, comp_level); 486 compiler, comp_level, installed_code);
487 487
488 // Free codeBlobs 488 // Free codeBlobs
489 //code_buffer->free_blob(); 489 //code_buffer->free_blob();
490 490
491 // stress test 6243940 by immediately making the method 491 // stress test 6243940 by immediately making the method
510 510
511 // Record successful registration. 511 // Record successful registration.
512 // (Put nm into the task handle *before* publishing to the Java heap.) 512 // (Put nm into the task handle *before* publishing to the Java heap.)
513 if (task != NULL) task->set_code(nm); 513 if (task != NULL) task->set_code(nm);
514 514
515 if (bind_to_method) { 515 if (installed_code.is_null()) {
516 if (entry_bci == InvocationEntryBci) { 516 if (entry_bci == InvocationEntryBci) {
517 if (TieredCompilation) { 517 if (TieredCompilation) {
518 // If there is an old version we're done with it 518 // If there is an old version we're done with it
519 nmethod* old = method->code(); 519 nmethod* old = method->code();
520 if (TraceMethodReplacement && old != NULL) { 520 if (TraceMethodReplacement && old != NULL) {