hotspot/src/share/vm/oops/methodCounters.hpp
author iveresov
Tue, 13 May 2014 11:32:10 -0700
changeset 24442 4d4ae31dea26
parent 17000 11bf92e571a2
child 26586 992efa57514f
permissions -rw-r--r--
8032463: VirtualDispatch test timeout with DeoptimizeALot Summary: Introduce code aging for warm method detection Reviewed-by: kvn, twisti
Ignore whitespace changes - Everywhere: Within whitespace: At end of lines:
17000
11bf92e571a2 8010862: The Method counter fields used for profiling can be allocated lazily.
jiangli
parents:
diff changeset
     1
/*
11bf92e571a2 8010862: The Method counter fields used for profiling can be allocated lazily.
jiangli
parents:
diff changeset
     2
 * Copyright (c) 2013, Oracle and/or its affiliates. All rights reserved.
11bf92e571a2 8010862: The Method counter fields used for profiling can be allocated lazily.
jiangli
parents:
diff changeset
     3
 * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
11bf92e571a2 8010862: The Method counter fields used for profiling can be allocated lazily.
jiangli
parents:
diff changeset
     4
 *
11bf92e571a2 8010862: The Method counter fields used for profiling can be allocated lazily.
jiangli
parents:
diff changeset
     5
 * This code is free software; you can redistribute it and/or modify it
11bf92e571a2 8010862: The Method counter fields used for profiling can be allocated lazily.
jiangli
parents:
diff changeset
     6
 * under the terms of the GNU General Public License version 2 only, as
11bf92e571a2 8010862: The Method counter fields used for profiling can be allocated lazily.
jiangli
parents:
diff changeset
     7
 * published by the Free Software Foundation.
11bf92e571a2 8010862: The Method counter fields used for profiling can be allocated lazily.
jiangli
parents:
diff changeset
     8
 *
11bf92e571a2 8010862: The Method counter fields used for profiling can be allocated lazily.
jiangli
parents:
diff changeset
     9
 * This code is distributed in the hope that it will be useful, but WITHOUT
11bf92e571a2 8010862: The Method counter fields used for profiling can be allocated lazily.
jiangli
parents:
diff changeset
    10
 * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
11bf92e571a2 8010862: The Method counter fields used for profiling can be allocated lazily.
jiangli
parents:
diff changeset
    11
 * FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
11bf92e571a2 8010862: The Method counter fields used for profiling can be allocated lazily.
jiangli
parents:
diff changeset
    12
 * version 2 for more details (a copy is included in the LICENSE file that
11bf92e571a2 8010862: The Method counter fields used for profiling can be allocated lazily.
jiangli
parents:
diff changeset
    13
 * accompanied this code).
11bf92e571a2 8010862: The Method counter fields used for profiling can be allocated lazily.
jiangli
parents:
diff changeset
    14
 *
11bf92e571a2 8010862: The Method counter fields used for profiling can be allocated lazily.
jiangli
parents:
diff changeset
    15
 * You should have received a copy of the GNU General Public License version
11bf92e571a2 8010862: The Method counter fields used for profiling can be allocated lazily.
jiangli
parents:
diff changeset
    16
 * 2 along with this work; if not, write to the Free Software Foundation,
11bf92e571a2 8010862: The Method counter fields used for profiling can be allocated lazily.
jiangli
parents:
diff changeset
    17
 * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
11bf92e571a2 8010862: The Method counter fields used for profiling can be allocated lazily.
jiangli
parents:
diff changeset
    18
 *
11bf92e571a2 8010862: The Method counter fields used for profiling can be allocated lazily.
jiangli
parents:
diff changeset
    19
 * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
11bf92e571a2 8010862: The Method counter fields used for profiling can be allocated lazily.
jiangli
parents:
diff changeset
    20
 * or visit www.oracle.com if you need additional information or have any
11bf92e571a2 8010862: The Method counter fields used for profiling can be allocated lazily.
jiangli
parents:
diff changeset
    21
 * questions.
11bf92e571a2 8010862: The Method counter fields used for profiling can be allocated lazily.
jiangli
parents:
diff changeset
    22
 *
11bf92e571a2 8010862: The Method counter fields used for profiling can be allocated lazily.
jiangli
parents:
diff changeset
    23
 */
11bf92e571a2 8010862: The Method counter fields used for profiling can be allocated lazily.
jiangli
parents:
diff changeset
    24
11bf92e571a2 8010862: The Method counter fields used for profiling can be allocated lazily.
jiangli
parents:
diff changeset
    25
#ifndef SHARE_VM_OOPS_METHODCOUNTERS_HPP
11bf92e571a2 8010862: The Method counter fields used for profiling can be allocated lazily.
jiangli
parents:
diff changeset
    26
#define SHARE_VM_OOPS_METHODCOUNTERS_HPP
11bf92e571a2 8010862: The Method counter fields used for profiling can be allocated lazily.
jiangli
parents:
diff changeset
    27
11bf92e571a2 8010862: The Method counter fields used for profiling can be allocated lazily.
jiangli
parents:
diff changeset
    28
#include "oops/metadata.hpp"
11bf92e571a2 8010862: The Method counter fields used for profiling can be allocated lazily.
jiangli
parents:
diff changeset
    29
#include "interpreter/invocationCounter.hpp"
11bf92e571a2 8010862: The Method counter fields used for profiling can be allocated lazily.
jiangli
parents:
diff changeset
    30
11bf92e571a2 8010862: The Method counter fields used for profiling can be allocated lazily.
jiangli
parents:
diff changeset
    31
class MethodCounters: public MetaspaceObj {
11bf92e571a2 8010862: The Method counter fields used for profiling can be allocated lazily.
jiangli
parents:
diff changeset
    32
 friend class VMStructs;
11bf92e571a2 8010862: The Method counter fields used for profiling can be allocated lazily.
jiangli
parents:
diff changeset
    33
 private:
11bf92e571a2 8010862: The Method counter fields used for profiling can be allocated lazily.
jiangli
parents:
diff changeset
    34
  int               _interpreter_invocation_count; // Count of times invoked (reused as prev_event_count in tiered)
11bf92e571a2 8010862: The Method counter fields used for profiling can be allocated lazily.
jiangli
parents:
diff changeset
    35
  u2                _interpreter_throwout_count; // Count of times method was exited via exception while interpreting
11bf92e571a2 8010862: The Method counter fields used for profiling can be allocated lazily.
jiangli
parents:
diff changeset
    36
  u2                _number_of_breakpoints;      // fullspeed debugging support
11bf92e571a2 8010862: The Method counter fields used for profiling can be allocated lazily.
jiangli
parents:
diff changeset
    37
  InvocationCounter _invocation_counter;         // Incremented before each activation of the method - used to trigger frequency-based optimizations
11bf92e571a2 8010862: The Method counter fields used for profiling can be allocated lazily.
jiangli
parents:
diff changeset
    38
  InvocationCounter _backedge_counter;           // Incremented before each backedge taken - used to trigger frequencey-based optimizations
24442
4d4ae31dea26 8032463: VirtualDispatch test timeout with DeoptimizeALot
iveresov
parents: 17000
diff changeset
    39
  // NMethod age is a counter for warm methods detection in the code cache sweeper.
4d4ae31dea26 8032463: VirtualDispatch test timeout with DeoptimizeALot
iveresov
parents: 17000
diff changeset
    40
  // The counter is reset by the sweeper and is decremented by some of the compiled
4d4ae31dea26 8032463: VirtualDispatch test timeout with DeoptimizeALot
iveresov
parents: 17000
diff changeset
    41
  // code. The counter values are interpreted as follows:
4d4ae31dea26 8032463: VirtualDispatch test timeout with DeoptimizeALot
iveresov
parents: 17000
diff changeset
    42
  // 1. (HotMethodDetection..INT_MAX] - initial value, no counters inserted
4d4ae31dea26 8032463: VirtualDispatch test timeout with DeoptimizeALot
iveresov
parents: 17000
diff changeset
    43
  // 2. (1..HotMethodDetectionLimit)  - the method is warm, the counter is used
4d4ae31dea26 8032463: VirtualDispatch test timeout with DeoptimizeALot
iveresov
parents: 17000
diff changeset
    44
  //                                    to figure out which methods can be flushed.
4d4ae31dea26 8032463: VirtualDispatch test timeout with DeoptimizeALot
iveresov
parents: 17000
diff changeset
    45
  // 3. (INT_MIN..0]                  - method is hot and will deopt and get
4d4ae31dea26 8032463: VirtualDispatch test timeout with DeoptimizeALot
iveresov
parents: 17000
diff changeset
    46
  //                                    recompiled without the counters
4d4ae31dea26 8032463: VirtualDispatch test timeout with DeoptimizeALot
iveresov
parents: 17000
diff changeset
    47
  int               _nmethod_age;
17000
11bf92e571a2 8010862: The Method counter fields used for profiling can be allocated lazily.
jiangli
parents:
diff changeset
    48
11bf92e571a2 8010862: The Method counter fields used for profiling can be allocated lazily.
jiangli
parents:
diff changeset
    49
#ifdef TIERED
11bf92e571a2 8010862: The Method counter fields used for profiling can be allocated lazily.
jiangli
parents:
diff changeset
    50
  float             _rate;                        // Events (invocation and backedge counter increments) per millisecond
11bf92e571a2 8010862: The Method counter fields used for profiling can be allocated lazily.
jiangli
parents:
diff changeset
    51
  jlong             _prev_time;                   // Previous time the rate was acquired
11bf92e571a2 8010862: The Method counter fields used for profiling can be allocated lazily.
jiangli
parents:
diff changeset
    52
#endif
11bf92e571a2 8010862: The Method counter fields used for profiling can be allocated lazily.
jiangli
parents:
diff changeset
    53
11bf92e571a2 8010862: The Method counter fields used for profiling can be allocated lazily.
jiangli
parents:
diff changeset
    54
  MethodCounters() : _interpreter_invocation_count(0),
11bf92e571a2 8010862: The Method counter fields used for profiling can be allocated lazily.
jiangli
parents:
diff changeset
    55
                     _interpreter_throwout_count(0),
24442
4d4ae31dea26 8032463: VirtualDispatch test timeout with DeoptimizeALot
iveresov
parents: 17000
diff changeset
    56
                     _number_of_breakpoints(0),
4d4ae31dea26 8032463: VirtualDispatch test timeout with DeoptimizeALot
iveresov
parents: 17000
diff changeset
    57
                     _nmethod_age(INT_MAX)
17000
11bf92e571a2 8010862: The Method counter fields used for profiling can be allocated lazily.
jiangli
parents:
diff changeset
    58
#ifdef TIERED
11bf92e571a2 8010862: The Method counter fields used for profiling can be allocated lazily.
jiangli
parents:
diff changeset
    59
                   , _rate(0),
11bf92e571a2 8010862: The Method counter fields used for profiling can be allocated lazily.
jiangli
parents:
diff changeset
    60
                     _prev_time(0)
11bf92e571a2 8010862: The Method counter fields used for profiling can be allocated lazily.
jiangli
parents:
diff changeset
    61
#endif
11bf92e571a2 8010862: The Method counter fields used for profiling can be allocated lazily.
jiangli
parents:
diff changeset
    62
  {
11bf92e571a2 8010862: The Method counter fields used for profiling can be allocated lazily.
jiangli
parents:
diff changeset
    63
    invocation_counter()->init();
11bf92e571a2 8010862: The Method counter fields used for profiling can be allocated lazily.
jiangli
parents:
diff changeset
    64
    backedge_counter()->init();
24442
4d4ae31dea26 8032463: VirtualDispatch test timeout with DeoptimizeALot
iveresov
parents: 17000
diff changeset
    65
4d4ae31dea26 8032463: VirtualDispatch test timeout with DeoptimizeALot
iveresov
parents: 17000
diff changeset
    66
    if (StressCodeAging) {
4d4ae31dea26 8032463: VirtualDispatch test timeout with DeoptimizeALot
iveresov
parents: 17000
diff changeset
    67
      set_nmethod_age(HotMethodDetectionLimit);
4d4ae31dea26 8032463: VirtualDispatch test timeout with DeoptimizeALot
iveresov
parents: 17000
diff changeset
    68
    }
17000
11bf92e571a2 8010862: The Method counter fields used for profiling can be allocated lazily.
jiangli
parents:
diff changeset
    69
  }
11bf92e571a2 8010862: The Method counter fields used for profiling can be allocated lazily.
jiangli
parents:
diff changeset
    70
11bf92e571a2 8010862: The Method counter fields used for profiling can be allocated lazily.
jiangli
parents:
diff changeset
    71
 public:
11bf92e571a2 8010862: The Method counter fields used for profiling can be allocated lazily.
jiangli
parents:
diff changeset
    72
  static MethodCounters* allocate(ClassLoaderData* loader_data, TRAPS);
11bf92e571a2 8010862: The Method counter fields used for profiling can be allocated lazily.
jiangli
parents:
diff changeset
    73
11bf92e571a2 8010862: The Method counter fields used for profiling can be allocated lazily.
jiangli
parents:
diff changeset
    74
  void deallocate_contents(ClassLoaderData* loader_data) {}
11bf92e571a2 8010862: The Method counter fields used for profiling can be allocated lazily.
jiangli
parents:
diff changeset
    75
  DEBUG_ONLY(bool on_stack() { return false; })  // for template
11bf92e571a2 8010862: The Method counter fields used for profiling can be allocated lazily.
jiangli
parents:
diff changeset
    76
11bf92e571a2 8010862: The Method counter fields used for profiling can be allocated lazily.
jiangli
parents:
diff changeset
    77
  static int size() { return sizeof(MethodCounters) / wordSize; }
11bf92e571a2 8010862: The Method counter fields used for profiling can be allocated lazily.
jiangli
parents:
diff changeset
    78
11bf92e571a2 8010862: The Method counter fields used for profiling can be allocated lazily.
jiangli
parents:
diff changeset
    79
  bool is_klass() const { return false; }
11bf92e571a2 8010862: The Method counter fields used for profiling can be allocated lazily.
jiangli
parents:
diff changeset
    80
11bf92e571a2 8010862: The Method counter fields used for profiling can be allocated lazily.
jiangli
parents:
diff changeset
    81
  void clear_counters();
11bf92e571a2 8010862: The Method counter fields used for profiling can be allocated lazily.
jiangli
parents:
diff changeset
    82
11bf92e571a2 8010862: The Method counter fields used for profiling can be allocated lazily.
jiangli
parents:
diff changeset
    83
  int interpreter_invocation_count() {
11bf92e571a2 8010862: The Method counter fields used for profiling can be allocated lazily.
jiangli
parents:
diff changeset
    84
    return _interpreter_invocation_count;
11bf92e571a2 8010862: The Method counter fields used for profiling can be allocated lazily.
jiangli
parents:
diff changeset
    85
  }
11bf92e571a2 8010862: The Method counter fields used for profiling can be allocated lazily.
jiangli
parents:
diff changeset
    86
  void set_interpreter_invocation_count(int count) {
11bf92e571a2 8010862: The Method counter fields used for profiling can be allocated lazily.
jiangli
parents:
diff changeset
    87
    _interpreter_invocation_count = count;
11bf92e571a2 8010862: The Method counter fields used for profiling can be allocated lazily.
jiangli
parents:
diff changeset
    88
  }
11bf92e571a2 8010862: The Method counter fields used for profiling can be allocated lazily.
jiangli
parents:
diff changeset
    89
  int increment_interpreter_invocation_count() {
11bf92e571a2 8010862: The Method counter fields used for profiling can be allocated lazily.
jiangli
parents:
diff changeset
    90
    return ++_interpreter_invocation_count;
11bf92e571a2 8010862: The Method counter fields used for profiling can be allocated lazily.
jiangli
parents:
diff changeset
    91
  }
11bf92e571a2 8010862: The Method counter fields used for profiling can be allocated lazily.
jiangli
parents:
diff changeset
    92
11bf92e571a2 8010862: The Method counter fields used for profiling can be allocated lazily.
jiangli
parents:
diff changeset
    93
  void interpreter_throwout_increment() {
11bf92e571a2 8010862: The Method counter fields used for profiling can be allocated lazily.
jiangli
parents:
diff changeset
    94
    if (_interpreter_throwout_count < 65534) {
11bf92e571a2 8010862: The Method counter fields used for profiling can be allocated lazily.
jiangli
parents:
diff changeset
    95
      _interpreter_throwout_count++;
11bf92e571a2 8010862: The Method counter fields used for profiling can be allocated lazily.
jiangli
parents:
diff changeset
    96
    }
11bf92e571a2 8010862: The Method counter fields used for profiling can be allocated lazily.
jiangli
parents:
diff changeset
    97
  }
11bf92e571a2 8010862: The Method counter fields used for profiling can be allocated lazily.
jiangli
parents:
diff changeset
    98
  int  interpreter_throwout_count() const {
11bf92e571a2 8010862: The Method counter fields used for profiling can be allocated lazily.
jiangli
parents:
diff changeset
    99
    return _interpreter_throwout_count;
11bf92e571a2 8010862: The Method counter fields used for profiling can be allocated lazily.
jiangli
parents:
diff changeset
   100
  }
11bf92e571a2 8010862: The Method counter fields used for profiling can be allocated lazily.
jiangli
parents:
diff changeset
   101
  void set_interpreter_throwout_count(int count) {
11bf92e571a2 8010862: The Method counter fields used for profiling can be allocated lazily.
jiangli
parents:
diff changeset
   102
    _interpreter_throwout_count = count;
11bf92e571a2 8010862: The Method counter fields used for profiling can be allocated lazily.
jiangli
parents:
diff changeset
   103
  }
11bf92e571a2 8010862: The Method counter fields used for profiling can be allocated lazily.
jiangli
parents:
diff changeset
   104
11bf92e571a2 8010862: The Method counter fields used for profiling can be allocated lazily.
jiangli
parents:
diff changeset
   105
  u2   number_of_breakpoints() const   { return _number_of_breakpoints; }
11bf92e571a2 8010862: The Method counter fields used for profiling can be allocated lazily.
jiangli
parents:
diff changeset
   106
  void incr_number_of_breakpoints()    { ++_number_of_breakpoints; }
11bf92e571a2 8010862: The Method counter fields used for profiling can be allocated lazily.
jiangli
parents:
diff changeset
   107
  void decr_number_of_breakpoints()    { --_number_of_breakpoints; }
11bf92e571a2 8010862: The Method counter fields used for profiling can be allocated lazily.
jiangli
parents:
diff changeset
   108
  void clear_number_of_breakpoints()   { _number_of_breakpoints = 0; }
11bf92e571a2 8010862: The Method counter fields used for profiling can be allocated lazily.
jiangli
parents:
diff changeset
   109
11bf92e571a2 8010862: The Method counter fields used for profiling can be allocated lazily.
jiangli
parents:
diff changeset
   110
#ifdef TIERED
11bf92e571a2 8010862: The Method counter fields used for profiling can be allocated lazily.
jiangli
parents:
diff changeset
   111
  jlong prev_time() const                        { return _prev_time; }
11bf92e571a2 8010862: The Method counter fields used for profiling can be allocated lazily.
jiangli
parents:
diff changeset
   112
  void set_prev_time(jlong time)                 { _prev_time = time; }
11bf92e571a2 8010862: The Method counter fields used for profiling can be allocated lazily.
jiangli
parents:
diff changeset
   113
  float rate() const                             { return _rate; }
11bf92e571a2 8010862: The Method counter fields used for profiling can be allocated lazily.
jiangli
parents:
diff changeset
   114
  void set_rate(float rate)                      { _rate = rate; }
11bf92e571a2 8010862: The Method counter fields used for profiling can be allocated lazily.
jiangli
parents:
diff changeset
   115
#endif
11bf92e571a2 8010862: The Method counter fields used for profiling can be allocated lazily.
jiangli
parents:
diff changeset
   116
11bf92e571a2 8010862: The Method counter fields used for profiling can be allocated lazily.
jiangli
parents:
diff changeset
   117
  // invocation counter
11bf92e571a2 8010862: The Method counter fields used for profiling can be allocated lazily.
jiangli
parents:
diff changeset
   118
  InvocationCounter* invocation_counter() { return &_invocation_counter; }
11bf92e571a2 8010862: The Method counter fields used for profiling can be allocated lazily.
jiangli
parents:
diff changeset
   119
  InvocationCounter* backedge_counter()   { return &_backedge_counter; }
11bf92e571a2 8010862: The Method counter fields used for profiling can be allocated lazily.
jiangli
parents:
diff changeset
   120
24442
4d4ae31dea26 8032463: VirtualDispatch test timeout with DeoptimizeALot
iveresov
parents: 17000
diff changeset
   121
  int nmethod_age() {
4d4ae31dea26 8032463: VirtualDispatch test timeout with DeoptimizeALot
iveresov
parents: 17000
diff changeset
   122
    return _nmethod_age;
4d4ae31dea26 8032463: VirtualDispatch test timeout with DeoptimizeALot
iveresov
parents: 17000
diff changeset
   123
  }
4d4ae31dea26 8032463: VirtualDispatch test timeout with DeoptimizeALot
iveresov
parents: 17000
diff changeset
   124
  void set_nmethod_age(int age) {
4d4ae31dea26 8032463: VirtualDispatch test timeout with DeoptimizeALot
iveresov
parents: 17000
diff changeset
   125
    _nmethod_age = age;
4d4ae31dea26 8032463: VirtualDispatch test timeout with DeoptimizeALot
iveresov
parents: 17000
diff changeset
   126
  }
4d4ae31dea26 8032463: VirtualDispatch test timeout with DeoptimizeALot
iveresov
parents: 17000
diff changeset
   127
  void reset_nmethod_age() {
4d4ae31dea26 8032463: VirtualDispatch test timeout with DeoptimizeALot
iveresov
parents: 17000
diff changeset
   128
    set_nmethod_age(HotMethodDetectionLimit);
4d4ae31dea26 8032463: VirtualDispatch test timeout with DeoptimizeALot
iveresov
parents: 17000
diff changeset
   129
  }
4d4ae31dea26 8032463: VirtualDispatch test timeout with DeoptimizeALot
iveresov
parents: 17000
diff changeset
   130
4d4ae31dea26 8032463: VirtualDispatch test timeout with DeoptimizeALot
iveresov
parents: 17000
diff changeset
   131
  static bool is_nmethod_hot(int age)       { return age <= 0; }
4d4ae31dea26 8032463: VirtualDispatch test timeout with DeoptimizeALot
iveresov
parents: 17000
diff changeset
   132
  static bool is_nmethod_warm(int age)      { return age < HotMethodDetectionLimit; }
4d4ae31dea26 8032463: VirtualDispatch test timeout with DeoptimizeALot
iveresov
parents: 17000
diff changeset
   133
  static bool is_nmethod_age_unset(int age) { return age > HotMethodDetectionLimit; }
4d4ae31dea26 8032463: VirtualDispatch test timeout with DeoptimizeALot
iveresov
parents: 17000
diff changeset
   134
4d4ae31dea26 8032463: VirtualDispatch test timeout with DeoptimizeALot
iveresov
parents: 17000
diff changeset
   135
  static ByteSize nmethod_age_offset() {
4d4ae31dea26 8032463: VirtualDispatch test timeout with DeoptimizeALot
iveresov
parents: 17000
diff changeset
   136
    return byte_offset_of(MethodCounters, _nmethod_age);
4d4ae31dea26 8032463: VirtualDispatch test timeout with DeoptimizeALot
iveresov
parents: 17000
diff changeset
   137
  }
4d4ae31dea26 8032463: VirtualDispatch test timeout with DeoptimizeALot
iveresov
parents: 17000
diff changeset
   138
17000
11bf92e571a2 8010862: The Method counter fields used for profiling can be allocated lazily.
jiangli
parents:
diff changeset
   139
  static ByteSize interpreter_invocation_counter_offset() {
11bf92e571a2 8010862: The Method counter fields used for profiling can be allocated lazily.
jiangli
parents:
diff changeset
   140
    return byte_offset_of(MethodCounters, _interpreter_invocation_count);
11bf92e571a2 8010862: The Method counter fields used for profiling can be allocated lazily.
jiangli
parents:
diff changeset
   141
  }
11bf92e571a2 8010862: The Method counter fields used for profiling can be allocated lazily.
jiangli
parents:
diff changeset
   142
11bf92e571a2 8010862: The Method counter fields used for profiling can be allocated lazily.
jiangli
parents:
diff changeset
   143
  static ByteSize invocation_counter_offset()    {
11bf92e571a2 8010862: The Method counter fields used for profiling can be allocated lazily.
jiangli
parents:
diff changeset
   144
    return byte_offset_of(MethodCounters, _invocation_counter);
11bf92e571a2 8010862: The Method counter fields used for profiling can be allocated lazily.
jiangli
parents:
diff changeset
   145
  }
11bf92e571a2 8010862: The Method counter fields used for profiling can be allocated lazily.
jiangli
parents:
diff changeset
   146
11bf92e571a2 8010862: The Method counter fields used for profiling can be allocated lazily.
jiangli
parents:
diff changeset
   147
  static ByteSize backedge_counter_offset()      {
11bf92e571a2 8010862: The Method counter fields used for profiling can be allocated lazily.
jiangli
parents:
diff changeset
   148
    return byte_offset_of(MethodCounters, _backedge_counter);
11bf92e571a2 8010862: The Method counter fields used for profiling can be allocated lazily.
jiangli
parents:
diff changeset
   149
  }
11bf92e571a2 8010862: The Method counter fields used for profiling can be allocated lazily.
jiangli
parents:
diff changeset
   150
11bf92e571a2 8010862: The Method counter fields used for profiling can be allocated lazily.
jiangli
parents:
diff changeset
   151
  static int interpreter_invocation_counter_offset_in_bytes() {
11bf92e571a2 8010862: The Method counter fields used for profiling can be allocated lazily.
jiangli
parents:
diff changeset
   152
    return offset_of(MethodCounters, _interpreter_invocation_count);
11bf92e571a2 8010862: The Method counter fields used for profiling can be allocated lazily.
jiangli
parents:
diff changeset
   153
  }
11bf92e571a2 8010862: The Method counter fields used for profiling can be allocated lazily.
jiangli
parents:
diff changeset
   154
11bf92e571a2 8010862: The Method counter fields used for profiling can be allocated lazily.
jiangli
parents:
diff changeset
   155
};
11bf92e571a2 8010862: The Method counter fields used for profiling can be allocated lazily.
jiangli
parents:
diff changeset
   156
#endif //SHARE_VM_OOPS_METHODCOUNTERS_HPP