src/share/vm/ci/ciMethodData.cpp

Print this page




   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  *
  23  */
  24 
  25 #include "incls/_precompiled.incl"
  26 #include "incls/_ciMethodData.cpp.incl"





  27 
  28 // ciMethodData
  29 
  30 // ------------------------------------------------------------------
  31 // ciMethodData::ciMethodData
  32 //
  33 ciMethodData::ciMethodData(methodDataHandle h_md) : ciObject(h_md) {
  34   assert(h_md() != NULL, "no null method data");
  35   Copy::zero_to_words((HeapWord*) &_orig, sizeof(_orig) / sizeof(HeapWord));
  36   _data = NULL;
  37   _data_size = 0;
  38   _extra_data_size = 0;
  39   _current_mileage = 0;
  40   _invocation_counter = 0;
  41   _backedge_counter = 0;
  42   _state = empty_state;
  43   _saw_free_extra_data = false;
  44   // Set an initial hint. Don't use set_hint_di() because
  45   // first_di() may be out of bounds if data_size is 0.
  46   _hint_di = first_di();




   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  *
  23  */
  24 
  25 #include "precompiled.hpp"
  26 #include "ci/ciMethodData.hpp"
  27 #include "ci/ciUtilities.hpp"
  28 #include "memory/allocation.inline.hpp"
  29 #include "memory/resourceArea.hpp"
  30 #include "runtime/deoptimization.hpp"
  31 #include "utilities/copy.hpp"
  32 
  33 // ciMethodData
  34 
  35 // ------------------------------------------------------------------
  36 // ciMethodData::ciMethodData
  37 //
  38 ciMethodData::ciMethodData(methodDataHandle h_md) : ciObject(h_md) {
  39   assert(h_md() != NULL, "no null method data");
  40   Copy::zero_to_words((HeapWord*) &_orig, sizeof(_orig) / sizeof(HeapWord));
  41   _data = NULL;
  42   _data_size = 0;
  43   _extra_data_size = 0;
  44   _current_mileage = 0;
  45   _invocation_counter = 0;
  46   _backedge_counter = 0;
  47   _state = empty_state;
  48   _saw_free_extra_data = false;
  49   // Set an initial hint. Don't use set_hint_di() because
  50   // first_di() may be out of bounds if data_size is 0.
  51   _hint_di = first_di();