src/share/vm/ci/ciMethodData.hpp
Index Unified diffs Context diffs Sdiffs Wdiffs Patch New Old Previous File Next File 6998541 Sdiff src/share/vm/ci

src/share/vm/ci/ciMethodData.hpp

Print this page


   1 /*
   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.
   4  *
   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
   7  * published by the Free Software Foundation.
   8  *
   9  * This code is distributed in the hope that it will be useful, but WITHOUT
  10  * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
  11  * FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
  12  * version 2 for more details (a copy is included in the LICENSE file that
  13  * accompanied this code).
  14  *
  15  * You should have received a copy of the GNU General Public License version
  16  * 2 along with this work; if not, write to the Free Software Foundation,
  17  * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
  18  *
  19  * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
  20  * or visit www.oracle.com if you need additional information or have any
  21  * questions.
  22  *


 216     _hint_di = di;
 217   }
 218   ciProfileData* data_before(int bci) {
 219     // avoid SEGV on this edge case
 220     if (data_size() == 0)
 221       return NULL;
 222     int hint = hint_di();
 223     if (data_layout_at(hint)->bci() <= bci)
 224       return data_at(hint);
 225     return first_data();
 226   }
 227 
 228 
 229   // What is the index of the first data entry?
 230   int first_di() { return 0; }
 231 
 232   ciArgInfoData *arg_info() const;
 233 
 234 public:
 235   bool is_method_data()  { return true; }



 236   bool is_empty() { return _state == empty_state; }
 237   bool is_mature() { return _state == mature_state; }
 238 
 239   int creation_mileage() { return _orig.creation_mileage(); }
 240   int current_mileage()  { return _current_mileage; }
 241 
 242   int invocation_count() { return _invocation_counter; }
 243   int backedge_count()   { return _backedge_counter;   }
 244   // Transfer information about the method to methodDataOop.
 245   // would_profile means we would like to profile this method,
 246   // meaning it's not trivial.
 247   void set_would_profile(bool p);
 248   // Also set the numer of loops and blocks in the method.
 249   // Again, this is used to determine if a method is trivial.
 250   void set_compilation_stats(short loops, short blocks);
 251 
 252   void load_data();
 253 
 254   // Convert a dp (data pointer) to a di (data index).
 255   int dp_to_di(address dp) {


   1 /*
   2  * Copyright (c) 2001, 2011, Oracle and/or its affiliates. All rights reserved.
   3  * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
   4  *
   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
   7  * published by the Free Software Foundation.
   8  *
   9  * This code is distributed in the hope that it will be useful, but WITHOUT
  10  * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
  11  * FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
  12  * version 2 for more details (a copy is included in the LICENSE file that
  13  * accompanied this code).
  14  *
  15  * You should have received a copy of the GNU General Public License version
  16  * 2 along with this work; if not, write to the Free Software Foundation,
  17  * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
  18  *
  19  * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
  20  * or visit www.oracle.com if you need additional information or have any
  21  * questions.
  22  *


 216     _hint_di = di;
 217   }
 218   ciProfileData* data_before(int bci) {
 219     // avoid SEGV on this edge case
 220     if (data_size() == 0)
 221       return NULL;
 222     int hint = hint_di();
 223     if (data_layout_at(hint)->bci() <= bci)
 224       return data_at(hint);
 225     return first_data();
 226   }
 227 
 228 
 229   // What is the index of the first data entry?
 230   int first_di() { return 0; }
 231 
 232   ciArgInfoData *arg_info() const;
 233 
 234 public:
 235   bool is_method_data()  { return true; }
 236 
 237   void set_mature() { _state = mature_state; }
 238 
 239   bool is_empty()  { return _state == empty_state; }
 240   bool is_mature() { return _state == mature_state; }
 241 
 242   int creation_mileage() { return _orig.creation_mileage(); }
 243   int current_mileage()  { return _current_mileage; }
 244 
 245   int invocation_count() { return _invocation_counter; }
 246   int backedge_count()   { return _backedge_counter;   }
 247   // Transfer information about the method to methodDataOop.
 248   // would_profile means we would like to profile this method,
 249   // meaning it's not trivial.
 250   void set_would_profile(bool p);
 251   // Also set the numer of loops and blocks in the method.
 252   // Again, this is used to determine if a method is trivial.
 253   void set_compilation_stats(short loops, short blocks);
 254 
 255   void load_data();
 256 
 257   // Convert a dp (data pointer) to a di (data index).
 258   int dp_to_di(address dp) {


src/share/vm/ci/ciMethodData.hpp
Index Unified diffs Context diffs Sdiffs Wdiffs Patch New Old Previous File Next File