hotspot/src/share/vm/ci/ciMethodData.hpp
changeset 6453 970dc585ab63
parent 5547 f4b087cbb361
child 7397 5b173b4ca846
equal deleted inserted replaced
6452:cc624b341ab2 6453:970dc585ab63
     1 /*
     1 /*
     2  * Copyright (c) 2001, 2008, Oracle and/or its affiliates. All rights reserved.
     2  * Copyright (c) 2001, 2010, 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.
   160   intx              _arg_returned;    // bit set of returned arguments
   160   intx              _arg_returned;    // bit set of returned arguments
   161 
   161 
   162   // Maturity of the oop when the snapshot is taken.
   162   // Maturity of the oop when the snapshot is taken.
   163   int _current_mileage;
   163   int _current_mileage;
   164 
   164 
       
   165   // These counters hold the age of MDO in tiered. In tiered we can have the same method
       
   166   // running at different compilation levels concurrently. So, in order to precisely measure
       
   167   // its maturity we need separate counters.
       
   168   int _invocation_counter;
       
   169   int _backedge_counter;
       
   170 
   165   // Coherent snapshot of original header.
   171   // Coherent snapshot of original header.
   166   methodDataOopDesc _orig;
   172   methodDataOopDesc _orig;
   167 
   173 
   168   ciMethodData(methodDataHandle h_md);
   174   ciMethodData(methodDataHandle h_md);
   169   ciMethodData();
   175   ciMethodData();
   221   bool is_mature() { return _state == mature_state; }
   227   bool is_mature() { return _state == mature_state; }
   222 
   228 
   223   int creation_mileage() { return _orig.creation_mileage(); }
   229   int creation_mileage() { return _orig.creation_mileage(); }
   224   int current_mileage()  { return _current_mileage; }
   230   int current_mileage()  { return _current_mileage; }
   225 
   231 
       
   232   int invocation_count() { return _invocation_counter; }
       
   233   int backedge_count()   { return _backedge_counter;   }
       
   234   // Transfer information about the method to methodDataOop.
       
   235   // would_profile means we would like to profile this method,
       
   236   // meaning it's not trivial.
       
   237   void set_would_profile(bool p);
       
   238   // Also set the numer of loops and blocks in the method.
       
   239   // Again, this is used to determine if a method is trivial.
       
   240   void set_compilation_stats(short loops, short blocks);
       
   241 
   226   void load_data();
   242   void load_data();
   227 
   243 
   228   // Convert a dp (data pointer) to a di (data index).
   244   // Convert a dp (data pointer) to a di (data index).
   229   int dp_to_di(address dp) {
   245   int dp_to_di(address dp) {
   230     return dp - ((address)_data);
   246     return dp - ((address)_data);