hotspot/src/share/vm/ci/ciMethod.cpp
changeset 38133 78b95467b9f1
parent 35071 a0910b1d3e0d
child 38144 0976c0c5c5d3
equal deleted inserted replaced
38132:ba888a4f352a 38133:78b95467b9f1
     1 /*
     1 /*
     2  * Copyright (c) 1999, 2015, Oracle and/or its affiliates. All rights reserved.
     2  * Copyright (c) 1999, 2016, Oracle and/or its affiliates. All rights reserved.
     3  * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
     3  * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
     4  *
     4  *
     5  * This code is free software; you can redistribute it and/or modify it
     5  * This code is free software; you can redistribute it and/or modify it
     6  * under the terms of the GNU General Public License version 2 only, as
     6  * under the terms of the GNU General Public License version 2 only, as
     7  * published by the Free Software Foundation.
     7  * published by the Free Software Foundation.
  1113 }
  1113 }
  1114 
  1114 
  1115 int ciMethod::comp_level() {
  1115 int ciMethod::comp_level() {
  1116   check_is_loaded();
  1116   check_is_loaded();
  1117   VM_ENTRY_MARK;
  1117   VM_ENTRY_MARK;
  1118   nmethod* nm = get_Method()->code();
  1118   CompiledMethod* nm = get_Method()->code();
  1119   if (nm != NULL) return nm->comp_level();
  1119   if (nm != NULL) return nm->comp_level();
  1120   return 0;
  1120   return 0;
  1121 }
  1121 }
  1122 
  1122 
  1123 int ciMethod::highest_osr_comp_level() {
  1123 int ciMethod::highest_osr_comp_level() {
  1148 // not highly relevant to an inlined method.  So we use the more
  1148 // not highly relevant to an inlined method.  So we use the more
  1149 // specific accessor nmethod::insts_size.
  1149 // specific accessor nmethod::insts_size.
  1150 int ciMethod::instructions_size() {
  1150 int ciMethod::instructions_size() {
  1151   if (_instructions_size == -1) {
  1151   if (_instructions_size == -1) {
  1152     GUARDED_VM_ENTRY(
  1152     GUARDED_VM_ENTRY(
  1153                      nmethod* code = get_Method()->code();
  1153                      CompiledMethod* code = get_Method()->code();
  1154                      if (code != NULL && (code->comp_level() == CompLevel_full_optimization)) {
  1154                      if (code != NULL && (code->comp_level() == CompLevel_full_optimization)) {
  1155                        _instructions_size = code->insts_end() - code->verified_entry_point();
  1155                        _instructions_size = code->insts_end() - code->verified_entry_point();
  1156                      } else {
  1156                      } else {
  1157                        _instructions_size = 0;
  1157                        _instructions_size = 0;
  1158                      }
  1158                      }
  1163 
  1163 
  1164 // ------------------------------------------------------------------
  1164 // ------------------------------------------------------------------
  1165 // ciMethod::log_nmethod_identity
  1165 // ciMethod::log_nmethod_identity
  1166 void ciMethod::log_nmethod_identity(xmlStream* log) {
  1166 void ciMethod::log_nmethod_identity(xmlStream* log) {
  1167   GUARDED_VM_ENTRY(
  1167   GUARDED_VM_ENTRY(
  1168     nmethod* code = get_Method()->code();
  1168     CompiledMethod* code = get_Method()->code();
  1169     if (code != NULL) {
  1169     if (code != NULL) {
  1170       code->log_identity(log);
  1170       code->log_identity(log);
  1171     }
  1171     }
  1172   )
  1172   )
  1173 }
  1173 }