hotspot/src/share/vm/ci/ciMethod.cpp
changeset 6418 6671edbd230e
parent 6187 4fa7845f7c14
child 6453 970dc585ab63
equal deleted inserted replaced
6417:82e8f98f22d8 6418:6671edbd230e
   920   return get_methodOop()->code() != NULL;
   920   return get_methodOop()->code() != NULL;
   921 }
   921 }
   922 
   922 
   923 // ------------------------------------------------------------------
   923 // ------------------------------------------------------------------
   924 // ciMethod::instructions_size
   924 // ciMethod::instructions_size
   925 // This is a rough metric for "fat" methods, compared
   925 //
   926 // before inlining with InlineSmallCode.
   926 // This is a rough metric for "fat" methods, compared before inlining
   927 // The CodeBlob::instructions_size accessor includes
   927 // with InlineSmallCode.  The CodeBlob::code_size accessor includes
   928 // junk like exception handler, stubs, and constant table,
   928 // junk like exception handler, stubs, and constant table, which are
   929 // which are not highly relevant to an inlined method.
   929 // not highly relevant to an inlined method.  So we use the more
   930 // So we use the more specific accessor nmethod::code_size.
   930 // specific accessor nmethod::insts_size.
   931 int ciMethod::instructions_size() {
   931 int ciMethod::instructions_size() {
   932   GUARDED_VM_ENTRY(
   932   GUARDED_VM_ENTRY(
   933     nmethod* code = get_methodOop()->code();
   933     nmethod* code = get_methodOop()->code();
   934     // if there's no compiled code or the code was produced by the
   934     // if there's no compiled code or the code was produced by the
   935     // tier1 profiler return 0 for the code size.  This should
   935     // tier1 profiler return 0 for the code size.  This should
   937     // that currently isn't properly recorded.
   937     // that currently isn't properly recorded.
   938     if (code == NULL ||
   938     if (code == NULL ||
   939         (TieredCompilation && code->compiler() != NULL && code->compiler()->is_c1())) {
   939         (TieredCompilation && code->compiler() != NULL && code->compiler()->is_c1())) {
   940       return 0;
   940       return 0;
   941     }
   941     }
   942     return code->code_end() - code->verified_entry_point();
   942     return code->insts_end() - code->verified_entry_point();
   943   )
   943   )
   944 }
   944 }
   945 
   945 
   946 // ------------------------------------------------------------------
   946 // ------------------------------------------------------------------
   947 // ciMethod::log_nmethod_identity
   947 // ciMethod::log_nmethod_identity