< prev index next >

src/share/vm/oops/method.cpp

Print this page
rev 8470 : [mq]: linkToNative.hotspot.02
rev 8471 : [mq]: dont_profile.8074551


  76                                           CHECK_NULL);
  77 
  78   int size = Method::size(access_flags.is_native());
  79 
  80   return new (loader_data, size, false, MetaspaceObj::MethodType, THREAD) Method(cm, access_flags, size);
  81 }
  82 
  83 Method::Method(ConstMethod* xconst, AccessFlags access_flags, int size) {
  84   No_Safepoint_Verifier no_safepoint;
  85   set_constMethod(xconst);
  86   set_access_flags(access_flags);
  87   set_method_size(size);
  88 #ifdef CC_INTERP
  89   set_result_index(T_VOID);
  90 #endif
  91   set_intrinsic_id(vmIntrinsics::_none);
  92   set_jfr_towrite(false);
  93   set_force_inline(false);
  94   set_hidden(false);
  95   set_dont_inline(false);

  96   set_method_data(NULL);
  97   clear_method_counters();
  98   set_vtable_index(Method::garbage_vtable_index);
  99 
 100   // Fix and bury in Method*
 101   set_interpreter_entry(NULL); // sets i2i entry and from_int
 102   set_adapter_entry(NULL);
 103   clear_code(); // from_c/from_i get set to c2i/i2i
 104 
 105   if (access_flags.is_native()) {
 106     clear_native_function();
 107     set_signature_handler(NULL);
 108   }
 109 
 110   NOT_PRODUCT(set_compiled_invocation_count(0);)
 111 }
 112 
 113 // Release Method*.  The nmethod will be gone when we get here because
 114 // we've walked the code cache.
 115 void Method::deallocate_contents(ClassLoaderData* loader_data) {




  76                                           CHECK_NULL);
  77 
  78   int size = Method::size(access_flags.is_native());
  79 
  80   return new (loader_data, size, false, MetaspaceObj::MethodType, THREAD) Method(cm, access_flags, size);
  81 }
  82 
  83 Method::Method(ConstMethod* xconst, AccessFlags access_flags, int size) {
  84   No_Safepoint_Verifier no_safepoint;
  85   set_constMethod(xconst);
  86   set_access_flags(access_flags);
  87   set_method_size(size);
  88 #ifdef CC_INTERP
  89   set_result_index(T_VOID);
  90 #endif
  91   set_intrinsic_id(vmIntrinsics::_none);
  92   set_jfr_towrite(false);
  93   set_force_inline(false);
  94   set_hidden(false);
  95   set_dont_inline(false);
  96   set_has_injected_profile(false);
  97   set_method_data(NULL);
  98   clear_method_counters();
  99   set_vtable_index(Method::garbage_vtable_index);
 100 
 101   // Fix and bury in Method*
 102   set_interpreter_entry(NULL); // sets i2i entry and from_int
 103   set_adapter_entry(NULL);
 104   clear_code(); // from_c/from_i get set to c2i/i2i
 105 
 106   if (access_flags.is_native()) {
 107     clear_native_function();
 108     set_signature_handler(NULL);
 109   }
 110 
 111   NOT_PRODUCT(set_compiled_invocation_count(0);)
 112 }
 113 
 114 // Release Method*.  The nmethod will be gone when we get here because
 115 // we've walked the code cache.
 116 void Method::deallocate_contents(ClassLoaderData* loader_data) {


< prev index next >