comparison src/share/vm/code/nmethod.hpp @ 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 679e6584c177
children 1baf7f1e3f23
comparison
equal deleted inserted replaced
6999:679e6584c177 7000:bf2ea3ed3bce
267 int frame_size, 267 int frame_size,
268 OopMapSet* oop_maps, 268 OopMapSet* oop_maps,
269 ExceptionHandlerTable* handler_table, 269 ExceptionHandlerTable* handler_table,
270 ImplicitExceptionTable* nul_chk_table, 270 ImplicitExceptionTable* nul_chk_table,
271 AbstractCompiler* compiler, 271 AbstractCompiler* compiler,
272 int comp_level); 272 int comp_level
273 #ifdef GRAAL
274 , Handle installed_code = NULL
275 #endif
276 );
273 277
274 // helper methods 278 // helper methods
275 void* operator new(size_t size, int nmethod_size); 279 void* operator new(size_t size, int nmethod_size);
276 280
277 const char* reloc_string_for(u_char* begin, u_char* end); 281 const char* reloc_string_for(u_char* begin, u_char* end);
285 ExceptionCache* exception_cache_entry_for_exception(Handle exception); 289 ExceptionCache* exception_cache_entry_for_exception(Handle exception);
286 290
287 // Inform external interfaces that a compiled method has been unloaded 291 // Inform external interfaces that a compiled method has been unloaded
288 void post_compiled_method_unload(); 292 void post_compiled_method_unload();
289 293
290 // Initailize fields to their default values 294 // Initialize fields to their default values
291 void init_defaults(); 295 void init_defaults();
292 296
293 public: 297 public:
294 // create nmethod with entry_bci 298 // create nmethod with entry_bci
295 static nmethod* new_nmethod(methodHandle method, 299 static nmethod* new_nmethod(methodHandle method,
303 int frame_size, 307 int frame_size,
304 OopMapSet* oop_maps, 308 OopMapSet* oop_maps,
305 ExceptionHandlerTable* handler_table, 309 ExceptionHandlerTable* handler_table,
306 ImplicitExceptionTable* nul_chk_table, 310 ImplicitExceptionTable* nul_chk_table,
307 AbstractCompiler* compiler, 311 AbstractCompiler* compiler,
308 int comp_level); 312 int comp_level
313 #ifdef GRAAL
314 , Handle installed_code = NULL
315 #endif
316 );
309 317
310 static nmethod* new_native_nmethod(methodHandle method, 318 static nmethod* new_native_nmethod(methodHandle method,
311 int compile_id, 319 int compile_id,
312 CodeBuffer *code_buffer, 320 CodeBuffer *code_buffer,
313 int vep_offset, 321 int vep_offset,
568 576
569 // Evolution support. We make old (discarded) compiled methods point to new Method*s. 577 // Evolution support. We make old (discarded) compiled methods point to new Method*s.
570 void set_method(Method* method) { _method = method; } 578 void set_method(Method* method) { _method = method; }
571 579
572 #ifdef GRAAL 580 #ifdef GRAAL
573 oop graal_installed_code() { return _graal_installed_code == Universe::non_oop_word() ? NULL : _graal_installed_code ; } 581 oop graal_installed_code() { return _graal_installed_code ; }
574 void set_graal_installed_code(oop installed_code) { _graal_installed_code = installed_code; } 582 void set_graal_installed_code(oop installed_code) { _graal_installed_code = installed_code; }
575 #endif 583 #endif
576 584
577 // GC support 585 // GC support
578 void do_unloading(BoolObjectClosure* is_alive, bool unloading_occurred); 586 void do_unloading(BoolObjectClosure* is_alive, bool unloading_occurred);