1 /*
2 * Copyright (c) 2000, 2005, 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 *
23 */
24
25 class Arena;
26 class Bundle;
27 class Block;
28 class Block_Array;
29 class Node;
30 class Node_Array;
31 class Node_List;
32 class PhaseCFG;
33 class PhaseChaitin;
34 class Pipeline_Use_Element;
35 class Pipeline_Use;
36
37 #ifndef PRODUCT
38 #define DEBUG_ARG(x) , x
39 #else
40 #define DEBUG_ARG(x)
41 #endif
42
43 // Define the initial sizes for allocation of the resizable code buffer
44 enum {
196 static uint _total_branches, _total_unconditional_delays;
197 static uint _total_instructions_per_bundle[Pipeline::_max_instrs_per_cycle+1];
198
199 public:
200 static void print_statistics();
201
202 static void increment_instructions_per_bundle(uint i) {
203 _total_instructions_per_bundle[i]++;
204 }
205
206 static void increment_nop_size(uint s) {
207 _total_nop_size += s;
208 }
209
210 static void increment_method_size(uint s) {
211 _total_method_size += s;
212 }
213 #endif
214
215 };
|
1 /*
2 * Copyright (c) 2000, 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 *
23 */
24
25 #ifndef SHARE_VM_OPTO_OUTPUT_HPP
26 #define SHARE_VM_OPTO_OUTPUT_HPP
27
28 #include "opto/block.hpp"
29 #include "opto/node.hpp"
30 #ifdef TARGET_ARCH_MODEL_x86_32
31 # include "adfiles/ad_x86_32.hpp"
32 #endif
33 #ifdef TARGET_ARCH_MODEL_x86_64
34 # include "adfiles/ad_x86_64.hpp"
35 #endif
36 #ifdef TARGET_ARCH_MODEL_sparc
37 # include "adfiles/ad_sparc.hpp"
38 #endif
39 #ifdef TARGET_ARCH_MODEL_zero
40 # include "adfiles/ad_zero.hpp"
41 #endif
42
43 class Arena;
44 class Bundle;
45 class Block;
46 class Block_Array;
47 class Node;
48 class Node_Array;
49 class Node_List;
50 class PhaseCFG;
51 class PhaseChaitin;
52 class Pipeline_Use_Element;
53 class Pipeline_Use;
54
55 #ifndef PRODUCT
56 #define DEBUG_ARG(x) , x
57 #else
58 #define DEBUG_ARG(x)
59 #endif
60
61 // Define the initial sizes for allocation of the resizable code buffer
62 enum {
214 static uint _total_branches, _total_unconditional_delays;
215 static uint _total_instructions_per_bundle[Pipeline::_max_instrs_per_cycle+1];
216
217 public:
218 static void print_statistics();
219
220 static void increment_instructions_per_bundle(uint i) {
221 _total_instructions_per_bundle[i]++;
222 }
223
224 static void increment_nop_size(uint s) {
225 _total_nop_size += s;
226 }
227
228 static void increment_method_size(uint s) {
229 _total_method_size += s;
230 }
231 #endif
232
233 };
234
235 #endif // SHARE_VM_OPTO_OUTPUT_HPP
|