hotspot/src/share/vm/opto/output.hpp
author coleenp
Mon, 14 Jan 2013 11:01:39 -0500
changeset 15194 a35093d73168
parent 8921 14bfe81f2a9d
child 19279 4be3c2e6663c
child 22807 1cf02ef734e2
permissions -rw-r--r--
8006005: Fix constant pool index validation and alignment trap for method parameter reflection Summary: This patch addresses an alignment trap due to the storage format of method parameters data in constMethod. It also adds code to validate constant pool indexes for method parameters data. Reviewed-by: jrose, dholmes Contributed-by: eric.mccorkle@oracle.com
Ignore whitespace changes - Everywhere: Within whitespace: At end of lines:
1
489c9b5090e2 Initial load
duke
parents:
diff changeset
     1
/*
8921
14bfe81f2a9d 7010070: Update all 2010 Oracle-changed OpenJDK files to have the proper copyright dates - second pass
trims
parents: 8107
diff changeset
     2
 * Copyright (c) 2000, 2011, Oracle and/or its affiliates. All rights reserved.
1
489c9b5090e2 Initial load
duke
parents:
diff changeset
     3
 * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
489c9b5090e2 Initial load
duke
parents:
diff changeset
     4
 *
489c9b5090e2 Initial load
duke
parents:
diff changeset
     5
 * This code is free software; you can redistribute it and/or modify it
489c9b5090e2 Initial load
duke
parents:
diff changeset
     6
 * under the terms of the GNU General Public License version 2 only, as
489c9b5090e2 Initial load
duke
parents:
diff changeset
     7
 * published by the Free Software Foundation.
489c9b5090e2 Initial load
duke
parents:
diff changeset
     8
 *
489c9b5090e2 Initial load
duke
parents:
diff changeset
     9
 * This code is distributed in the hope that it will be useful, but WITHOUT
489c9b5090e2 Initial load
duke
parents:
diff changeset
    10
 * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
489c9b5090e2 Initial load
duke
parents:
diff changeset
    11
 * FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
489c9b5090e2 Initial load
duke
parents:
diff changeset
    12
 * version 2 for more details (a copy is included in the LICENSE file that
489c9b5090e2 Initial load
duke
parents:
diff changeset
    13
 * accompanied this code).
489c9b5090e2 Initial load
duke
parents:
diff changeset
    14
 *
489c9b5090e2 Initial load
duke
parents:
diff changeset
    15
 * You should have received a copy of the GNU General Public License version
489c9b5090e2 Initial load
duke
parents:
diff changeset
    16
 * 2 along with this work; if not, write to the Free Software Foundation,
489c9b5090e2 Initial load
duke
parents:
diff changeset
    17
 * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
489c9b5090e2 Initial load
duke
parents:
diff changeset
    18
 *
5547
f4b087cbb361 6941466: Oracle rebranding changes for Hotspot repositories
trims
parents: 1
diff changeset
    19
 * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
f4b087cbb361 6941466: Oracle rebranding changes for Hotspot repositories
trims
parents: 1
diff changeset
    20
 * or visit www.oracle.com if you need additional information or have any
f4b087cbb361 6941466: Oracle rebranding changes for Hotspot repositories
trims
parents: 1
diff changeset
    21
 * questions.
1
489c9b5090e2 Initial load
duke
parents:
diff changeset
    22
 *
489c9b5090e2 Initial load
duke
parents:
diff changeset
    23
 */
489c9b5090e2 Initial load
duke
parents:
diff changeset
    24
7397
5b173b4ca846 6989984: Use standard include model for Hospot
stefank
parents: 5547
diff changeset
    25
#ifndef SHARE_VM_OPTO_OUTPUT_HPP
5b173b4ca846 6989984: Use standard include model for Hospot
stefank
parents: 5547
diff changeset
    26
#define SHARE_VM_OPTO_OUTPUT_HPP
5b173b4ca846 6989984: Use standard include model for Hospot
stefank
parents: 5547
diff changeset
    27
5b173b4ca846 6989984: Use standard include model for Hospot
stefank
parents: 5547
diff changeset
    28
#include "opto/block.hpp"
5b173b4ca846 6989984: Use standard include model for Hospot
stefank
parents: 5547
diff changeset
    29
#include "opto/node.hpp"
5b173b4ca846 6989984: Use standard include model for Hospot
stefank
parents: 5547
diff changeset
    30
#ifdef TARGET_ARCH_MODEL_x86_32
5b173b4ca846 6989984: Use standard include model for Hospot
stefank
parents: 5547
diff changeset
    31
# include "adfiles/ad_x86_32.hpp"
5b173b4ca846 6989984: Use standard include model for Hospot
stefank
parents: 5547
diff changeset
    32
#endif
5b173b4ca846 6989984: Use standard include model for Hospot
stefank
parents: 5547
diff changeset
    33
#ifdef TARGET_ARCH_MODEL_x86_64
5b173b4ca846 6989984: Use standard include model for Hospot
stefank
parents: 5547
diff changeset
    34
# include "adfiles/ad_x86_64.hpp"
5b173b4ca846 6989984: Use standard include model for Hospot
stefank
parents: 5547
diff changeset
    35
#endif
5b173b4ca846 6989984: Use standard include model for Hospot
stefank
parents: 5547
diff changeset
    36
#ifdef TARGET_ARCH_MODEL_sparc
5b173b4ca846 6989984: Use standard include model for Hospot
stefank
parents: 5547
diff changeset
    37
# include "adfiles/ad_sparc.hpp"
5b173b4ca846 6989984: Use standard include model for Hospot
stefank
parents: 5547
diff changeset
    38
#endif
5b173b4ca846 6989984: Use standard include model for Hospot
stefank
parents: 5547
diff changeset
    39
#ifdef TARGET_ARCH_MODEL_zero
5b173b4ca846 6989984: Use standard include model for Hospot
stefank
parents: 5547
diff changeset
    40
# include "adfiles/ad_zero.hpp"
5b173b4ca846 6989984: Use standard include model for Hospot
stefank
parents: 5547
diff changeset
    41
#endif
8107
78e5bd944384 7016023: Enable building ARM and PPC from src/closed repository
bobv
parents: 7397
diff changeset
    42
#ifdef TARGET_ARCH_MODEL_arm
78e5bd944384 7016023: Enable building ARM and PPC from src/closed repository
bobv
parents: 7397
diff changeset
    43
# include "adfiles/ad_arm.hpp"
78e5bd944384 7016023: Enable building ARM and PPC from src/closed repository
bobv
parents: 7397
diff changeset
    44
#endif
78e5bd944384 7016023: Enable building ARM and PPC from src/closed repository
bobv
parents: 7397
diff changeset
    45
#ifdef TARGET_ARCH_MODEL_ppc
78e5bd944384 7016023: Enable building ARM and PPC from src/closed repository
bobv
parents: 7397
diff changeset
    46
# include "adfiles/ad_ppc.hpp"
78e5bd944384 7016023: Enable building ARM and PPC from src/closed repository
bobv
parents: 7397
diff changeset
    47
#endif
7397
5b173b4ca846 6989984: Use standard include model for Hospot
stefank
parents: 5547
diff changeset
    48
1
489c9b5090e2 Initial load
duke
parents:
diff changeset
    49
class Arena;
489c9b5090e2 Initial load
duke
parents:
diff changeset
    50
class Bundle;
489c9b5090e2 Initial load
duke
parents:
diff changeset
    51
class Block;
489c9b5090e2 Initial load
duke
parents:
diff changeset
    52
class Block_Array;
489c9b5090e2 Initial load
duke
parents:
diff changeset
    53
class Node;
489c9b5090e2 Initial load
duke
parents:
diff changeset
    54
class Node_Array;
489c9b5090e2 Initial load
duke
parents:
diff changeset
    55
class Node_List;
489c9b5090e2 Initial load
duke
parents:
diff changeset
    56
class PhaseCFG;
489c9b5090e2 Initial load
duke
parents:
diff changeset
    57
class PhaseChaitin;
489c9b5090e2 Initial load
duke
parents:
diff changeset
    58
class Pipeline_Use_Element;
489c9b5090e2 Initial load
duke
parents:
diff changeset
    59
class Pipeline_Use;
489c9b5090e2 Initial load
duke
parents:
diff changeset
    60
489c9b5090e2 Initial load
duke
parents:
diff changeset
    61
#ifndef PRODUCT
489c9b5090e2 Initial load
duke
parents:
diff changeset
    62
#define DEBUG_ARG(x) , x
489c9b5090e2 Initial load
duke
parents:
diff changeset
    63
#else
489c9b5090e2 Initial load
duke
parents:
diff changeset
    64
#define DEBUG_ARG(x)
489c9b5090e2 Initial load
duke
parents:
diff changeset
    65
#endif
489c9b5090e2 Initial load
duke
parents:
diff changeset
    66
489c9b5090e2 Initial load
duke
parents:
diff changeset
    67
// Define the initial sizes for allocation of the resizable code buffer
489c9b5090e2 Initial load
duke
parents:
diff changeset
    68
enum {
489c9b5090e2 Initial load
duke
parents:
diff changeset
    69
  initial_code_capacity  =  16 * 1024,
489c9b5090e2 Initial load
duke
parents:
diff changeset
    70
  initial_stub_capacity  =   4 * 1024,
489c9b5090e2 Initial load
duke
parents:
diff changeset
    71
  initial_const_capacity =   4 * 1024,
489c9b5090e2 Initial load
duke
parents:
diff changeset
    72
  initial_locs_capacity  =   3 * 1024
489c9b5090e2 Initial load
duke
parents:
diff changeset
    73
};
489c9b5090e2 Initial load
duke
parents:
diff changeset
    74
489c9b5090e2 Initial load
duke
parents:
diff changeset
    75
//------------------------------Scheduling----------------------------------
489c9b5090e2 Initial load
duke
parents:
diff changeset
    76
// This class contains all the information necessary to implement instruction
489c9b5090e2 Initial load
duke
parents:
diff changeset
    77
// scheduling and bundling.
489c9b5090e2 Initial load
duke
parents:
diff changeset
    78
class Scheduling {
489c9b5090e2 Initial load
duke
parents:
diff changeset
    79
489c9b5090e2 Initial load
duke
parents:
diff changeset
    80
private:
489c9b5090e2 Initial load
duke
parents:
diff changeset
    81
  // Arena to use
489c9b5090e2 Initial load
duke
parents:
diff changeset
    82
  Arena *_arena;
489c9b5090e2 Initial load
duke
parents:
diff changeset
    83
489c9b5090e2 Initial load
duke
parents:
diff changeset
    84
  // Control-Flow Graph info
489c9b5090e2 Initial load
duke
parents:
diff changeset
    85
  PhaseCFG *_cfg;
489c9b5090e2 Initial load
duke
parents:
diff changeset
    86
489c9b5090e2 Initial load
duke
parents:
diff changeset
    87
  // Register Allocation info
489c9b5090e2 Initial load
duke
parents:
diff changeset
    88
  PhaseRegAlloc *_regalloc;
489c9b5090e2 Initial load
duke
parents:
diff changeset
    89
489c9b5090e2 Initial load
duke
parents:
diff changeset
    90
  // Number of nodes in the method
489c9b5090e2 Initial load
duke
parents:
diff changeset
    91
  uint _node_bundling_limit;
489c9b5090e2 Initial load
duke
parents:
diff changeset
    92
489c9b5090e2 Initial load
duke
parents:
diff changeset
    93
  // List of scheduled nodes. Generated in reverse order
489c9b5090e2 Initial load
duke
parents:
diff changeset
    94
  Node_List _scheduled;
489c9b5090e2 Initial load
duke
parents:
diff changeset
    95
489c9b5090e2 Initial load
duke
parents:
diff changeset
    96
  // List of nodes currently available for choosing for scheduling
489c9b5090e2 Initial load
duke
parents:
diff changeset
    97
  Node_List _available;
489c9b5090e2 Initial load
duke
parents:
diff changeset
    98
489c9b5090e2 Initial load
duke
parents:
diff changeset
    99
  // Mapping from node (index) to basic block
489c9b5090e2 Initial load
duke
parents:
diff changeset
   100
  Block_Array& _bbs;
489c9b5090e2 Initial load
duke
parents:
diff changeset
   101
489c9b5090e2 Initial load
duke
parents:
diff changeset
   102
  // For each instruction beginning a bundle, the number of following
489c9b5090e2 Initial load
duke
parents:
diff changeset
   103
  // nodes to be bundled with it.
489c9b5090e2 Initial load
duke
parents:
diff changeset
   104
  Bundle *_node_bundling_base;
489c9b5090e2 Initial load
duke
parents:
diff changeset
   105
489c9b5090e2 Initial load
duke
parents:
diff changeset
   106
  // Mapping from register to Node
489c9b5090e2 Initial load
duke
parents:
diff changeset
   107
  Node_List _reg_node;
489c9b5090e2 Initial load
duke
parents:
diff changeset
   108
489c9b5090e2 Initial load
duke
parents:
diff changeset
   109
  // Free list for pinch nodes.
489c9b5090e2 Initial load
duke
parents:
diff changeset
   110
  Node_List _pinch_free_list;
489c9b5090e2 Initial load
duke
parents:
diff changeset
   111
489c9b5090e2 Initial load
duke
parents:
diff changeset
   112
  // Latency from the beginning of the containing basic block (base 1)
489c9b5090e2 Initial load
duke
parents:
diff changeset
   113
  // for each node.
489c9b5090e2 Initial load
duke
parents:
diff changeset
   114
  unsigned short *_node_latency;
489c9b5090e2 Initial load
duke
parents:
diff changeset
   115
489c9b5090e2 Initial load
duke
parents:
diff changeset
   116
  // Number of uses of this node within the containing basic block.
489c9b5090e2 Initial load
duke
parents:
diff changeset
   117
  short *_uses;
489c9b5090e2 Initial load
duke
parents:
diff changeset
   118
489c9b5090e2 Initial load
duke
parents:
diff changeset
   119
  // Schedulable portion of current block.  Skips Region/Phi/CreateEx up
489c9b5090e2 Initial load
duke
parents:
diff changeset
   120
  // front, branch+proj at end.  Also skips Catch/CProj (same as
489c9b5090e2 Initial load
duke
parents:
diff changeset
   121
  // branch-at-end), plus just-prior exception-throwing call.
489c9b5090e2 Initial load
duke
parents:
diff changeset
   122
  uint _bb_start, _bb_end;
489c9b5090e2 Initial load
duke
parents:
diff changeset
   123
489c9b5090e2 Initial load
duke
parents:
diff changeset
   124
  // Latency from the end of the basic block as scheduled
489c9b5090e2 Initial load
duke
parents:
diff changeset
   125
  unsigned short *_current_latency;
489c9b5090e2 Initial load
duke
parents:
diff changeset
   126
489c9b5090e2 Initial load
duke
parents:
diff changeset
   127
  // Remember the next node
489c9b5090e2 Initial load
duke
parents:
diff changeset
   128
  Node *_next_node;
489c9b5090e2 Initial load
duke
parents:
diff changeset
   129
489c9b5090e2 Initial load
duke
parents:
diff changeset
   130
  // Use this for an unconditional branch delay slot
489c9b5090e2 Initial load
duke
parents:
diff changeset
   131
  Node *_unconditional_delay_slot;
489c9b5090e2 Initial load
duke
parents:
diff changeset
   132
489c9b5090e2 Initial load
duke
parents:
diff changeset
   133
  // Pointer to a Nop
489c9b5090e2 Initial load
duke
parents:
diff changeset
   134
  MachNopNode *_nop;
489c9b5090e2 Initial load
duke
parents:
diff changeset
   135
489c9b5090e2 Initial load
duke
parents:
diff changeset
   136
  // Length of the current bundle, in instructions
489c9b5090e2 Initial load
duke
parents:
diff changeset
   137
  uint _bundle_instr_count;
489c9b5090e2 Initial load
duke
parents:
diff changeset
   138
489c9b5090e2 Initial load
duke
parents:
diff changeset
   139
  // Current Cycle number, for computing latencies and bundling
489c9b5090e2 Initial load
duke
parents:
diff changeset
   140
  uint _bundle_cycle_number;
489c9b5090e2 Initial load
duke
parents:
diff changeset
   141
489c9b5090e2 Initial load
duke
parents:
diff changeset
   142
  // Bundle information
489c9b5090e2 Initial load
duke
parents:
diff changeset
   143
  Pipeline_Use_Element _bundle_use_elements[resource_count];
489c9b5090e2 Initial load
duke
parents:
diff changeset
   144
  Pipeline_Use         _bundle_use;
489c9b5090e2 Initial load
duke
parents:
diff changeset
   145
489c9b5090e2 Initial load
duke
parents:
diff changeset
   146
  // Dump the available list
489c9b5090e2 Initial load
duke
parents:
diff changeset
   147
  void dump_available() const;
489c9b5090e2 Initial load
duke
parents:
diff changeset
   148
489c9b5090e2 Initial load
duke
parents:
diff changeset
   149
public:
489c9b5090e2 Initial load
duke
parents:
diff changeset
   150
  Scheduling(Arena *arena, Compile &compile);
489c9b5090e2 Initial load
duke
parents:
diff changeset
   151
489c9b5090e2 Initial load
duke
parents:
diff changeset
   152
  // Destructor
489c9b5090e2 Initial load
duke
parents:
diff changeset
   153
  NOT_PRODUCT( ~Scheduling(); )
489c9b5090e2 Initial load
duke
parents:
diff changeset
   154
489c9b5090e2 Initial load
duke
parents:
diff changeset
   155
  // Step ahead "i" cycles
489c9b5090e2 Initial load
duke
parents:
diff changeset
   156
  void step(uint i);
489c9b5090e2 Initial load
duke
parents:
diff changeset
   157
489c9b5090e2 Initial load
duke
parents:
diff changeset
   158
  // Step ahead 1 cycle, and clear the bundle state (for example,
489c9b5090e2 Initial load
duke
parents:
diff changeset
   159
  // at a branch target)
489c9b5090e2 Initial load
duke
parents:
diff changeset
   160
  void step_and_clear();
489c9b5090e2 Initial load
duke
parents:
diff changeset
   161
489c9b5090e2 Initial load
duke
parents:
diff changeset
   162
  Bundle* node_bundling(const Node *n) {
489c9b5090e2 Initial load
duke
parents:
diff changeset
   163
    assert(valid_bundle_info(n), "oob");
489c9b5090e2 Initial load
duke
parents:
diff changeset
   164
    return (&_node_bundling_base[n->_idx]);
489c9b5090e2 Initial load
duke
parents:
diff changeset
   165
  }
489c9b5090e2 Initial load
duke
parents:
diff changeset
   166
489c9b5090e2 Initial load
duke
parents:
diff changeset
   167
  bool valid_bundle_info(const Node *n) const {
489c9b5090e2 Initial load
duke
parents:
diff changeset
   168
    return (_node_bundling_limit > n->_idx);
489c9b5090e2 Initial load
duke
parents:
diff changeset
   169
  }
489c9b5090e2 Initial load
duke
parents:
diff changeset
   170
489c9b5090e2 Initial load
duke
parents:
diff changeset
   171
  bool starts_bundle(const Node *n) const {
489c9b5090e2 Initial load
duke
parents:
diff changeset
   172
    return (_node_bundling_limit > n->_idx && _node_bundling_base[n->_idx].starts_bundle());
489c9b5090e2 Initial load
duke
parents:
diff changeset
   173
  }
489c9b5090e2 Initial load
duke
parents:
diff changeset
   174
489c9b5090e2 Initial load
duke
parents:
diff changeset
   175
  // Do the scheduling
489c9b5090e2 Initial load
duke
parents:
diff changeset
   176
  void DoScheduling();
489c9b5090e2 Initial load
duke
parents:
diff changeset
   177
489c9b5090e2 Initial load
duke
parents:
diff changeset
   178
  // Compute the local latencies walking forward over the list of
489c9b5090e2 Initial load
duke
parents:
diff changeset
   179
  // nodes for a basic block
489c9b5090e2 Initial load
duke
parents:
diff changeset
   180
  void ComputeLocalLatenciesForward(const Block *bb);
489c9b5090e2 Initial load
duke
parents:
diff changeset
   181
489c9b5090e2 Initial load
duke
parents:
diff changeset
   182
  // Compute the register antidependencies within a basic block
489c9b5090e2 Initial load
duke
parents:
diff changeset
   183
  void ComputeRegisterAntidependencies(Block *bb);
489c9b5090e2 Initial load
duke
parents:
diff changeset
   184
  void verify_do_def( Node *n, OptoReg::Name def, const char *msg );
489c9b5090e2 Initial load
duke
parents:
diff changeset
   185
  void verify_good_schedule( Block *b, const char *msg );
489c9b5090e2 Initial load
duke
parents:
diff changeset
   186
  void anti_do_def( Block *b, Node *def, OptoReg::Name def_reg, int is_def );
489c9b5090e2 Initial load
duke
parents:
diff changeset
   187
  void anti_do_use( Block *b, Node *use, OptoReg::Name use_reg );
489c9b5090e2 Initial load
duke
parents:
diff changeset
   188
489c9b5090e2 Initial load
duke
parents:
diff changeset
   189
  // Add a node to the current bundle
489c9b5090e2 Initial load
duke
parents:
diff changeset
   190
  void AddNodeToBundle(Node *n, const Block *bb);
489c9b5090e2 Initial load
duke
parents:
diff changeset
   191
489c9b5090e2 Initial load
duke
parents:
diff changeset
   192
  // Add a node to the list of available nodes
489c9b5090e2 Initial load
duke
parents:
diff changeset
   193
  void AddNodeToAvailableList(Node *n);
489c9b5090e2 Initial load
duke
parents:
diff changeset
   194
489c9b5090e2 Initial load
duke
parents:
diff changeset
   195
  // Compute the local use count for the nodes in a block, and compute
489c9b5090e2 Initial load
duke
parents:
diff changeset
   196
  // the list of instructions with no uses in the block as available
489c9b5090e2 Initial load
duke
parents:
diff changeset
   197
  void ComputeUseCount(const Block *bb);
489c9b5090e2 Initial load
duke
parents:
diff changeset
   198
489c9b5090e2 Initial load
duke
parents:
diff changeset
   199
  // Choose an instruction from the available list to add to the bundle
489c9b5090e2 Initial load
duke
parents:
diff changeset
   200
  Node * ChooseNodeToBundle();
489c9b5090e2 Initial load
duke
parents:
diff changeset
   201
489c9b5090e2 Initial load
duke
parents:
diff changeset
   202
  // See if this Node fits into the currently accumulating bundle
489c9b5090e2 Initial load
duke
parents:
diff changeset
   203
  bool NodeFitsInBundle(Node *n);
489c9b5090e2 Initial load
duke
parents:
diff changeset
   204
489c9b5090e2 Initial load
duke
parents:
diff changeset
   205
  // Decrement the use count for a node
489c9b5090e2 Initial load
duke
parents:
diff changeset
   206
 void DecrementUseCounts(Node *n, const Block *bb);
489c9b5090e2 Initial load
duke
parents:
diff changeset
   207
489c9b5090e2 Initial load
duke
parents:
diff changeset
   208
  // Garbage collect pinch nodes for reuse by other blocks.
489c9b5090e2 Initial load
duke
parents:
diff changeset
   209
  void garbage_collect_pinch_nodes();
489c9b5090e2 Initial load
duke
parents:
diff changeset
   210
  // Clean up a pinch node for reuse (helper for above).
489c9b5090e2 Initial load
duke
parents:
diff changeset
   211
  void cleanup_pinch( Node *pinch );
489c9b5090e2 Initial load
duke
parents:
diff changeset
   212
489c9b5090e2 Initial load
duke
parents:
diff changeset
   213
  // Information for statistics gathering
489c9b5090e2 Initial load
duke
parents:
diff changeset
   214
#ifndef PRODUCT
489c9b5090e2 Initial load
duke
parents:
diff changeset
   215
private:
489c9b5090e2 Initial load
duke
parents:
diff changeset
   216
  // Gather information on size of nops relative to total
489c9b5090e2 Initial load
duke
parents:
diff changeset
   217
  uint _branches, _unconditional_delays;
489c9b5090e2 Initial load
duke
parents:
diff changeset
   218
489c9b5090e2 Initial load
duke
parents:
diff changeset
   219
  static uint _total_nop_size, _total_method_size;
489c9b5090e2 Initial load
duke
parents:
diff changeset
   220
  static uint _total_branches, _total_unconditional_delays;
489c9b5090e2 Initial load
duke
parents:
diff changeset
   221
  static uint _total_instructions_per_bundle[Pipeline::_max_instrs_per_cycle+1];
489c9b5090e2 Initial load
duke
parents:
diff changeset
   222
489c9b5090e2 Initial load
duke
parents:
diff changeset
   223
public:
489c9b5090e2 Initial load
duke
parents:
diff changeset
   224
  static void print_statistics();
489c9b5090e2 Initial load
duke
parents:
diff changeset
   225
489c9b5090e2 Initial load
duke
parents:
diff changeset
   226
  static void increment_instructions_per_bundle(uint i) {
489c9b5090e2 Initial load
duke
parents:
diff changeset
   227
    _total_instructions_per_bundle[i]++;
489c9b5090e2 Initial load
duke
parents:
diff changeset
   228
  }
489c9b5090e2 Initial load
duke
parents:
diff changeset
   229
489c9b5090e2 Initial load
duke
parents:
diff changeset
   230
  static void increment_nop_size(uint s) {
489c9b5090e2 Initial load
duke
parents:
diff changeset
   231
    _total_nop_size += s;
489c9b5090e2 Initial load
duke
parents:
diff changeset
   232
  }
489c9b5090e2 Initial load
duke
parents:
diff changeset
   233
489c9b5090e2 Initial load
duke
parents:
diff changeset
   234
  static void increment_method_size(uint s) {
489c9b5090e2 Initial load
duke
parents:
diff changeset
   235
    _total_method_size += s;
489c9b5090e2 Initial load
duke
parents:
diff changeset
   236
  }
489c9b5090e2 Initial load
duke
parents:
diff changeset
   237
#endif
489c9b5090e2 Initial load
duke
parents:
diff changeset
   238
489c9b5090e2 Initial load
duke
parents:
diff changeset
   239
};
7397
5b173b4ca846 6989984: Use standard include model for Hospot
stefank
parents: 5547
diff changeset
   240
5b173b4ca846 6989984: Use standard include model for Hospot
stefank
parents: 5547
diff changeset
   241
#endif // SHARE_VM_OPTO_OUTPUT_HPP