1 /*
2 * Copyright (c) 2005, 2008, 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 DebugInfoCache;
26 class FpuStackAllocator;
27 class IRScopeDebugInfo;
28 class Interval;
29 class IntervalWalker;
30 class LIRGenerator;
31 class LinearScan;
32 class MoveResolver;
33 class Range;
34
35 define_array(IntervalArray, Interval*)
36 define_stack(IntervalList, IntervalArray)
37
38 define_array(IntervalsArray, IntervalList*)
39 define_stack(IntervalsList, IntervalsArray)
40
41 define_array(OopMapArray, OopMap*)
42 define_stack(OopMapList, OopMapArray)
43
44 define_array(ScopeValueArray, ScopeValue*)
938
939 private:
940 elapsedTimer _timers[number_of_timers];
941 const char* timer_name(int idx);
942
943 public:
944 LinearScanTimers();
945
946 void begin_method(); // called for each method when register allocation starts
947 void end_method(LinearScan* allocator); // called for each method when register allocation completed
948 void print(double total_time); // called before termination of VM to print global summary
949
950 elapsedTimer* timer(int idx) { return &(_timers[idx]); }
951 };
952
953
954 #endif // ifndef PRODUCT
955
956
957 // Pick up platform-dependent implementation details
958 # include "incls/_c1_LinearScan_pd.hpp.incl"
|
1 /*
2 * Copyright (c) 2005, 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_C1_C1_LINEARSCAN_HPP
26 #define SHARE_VM_C1_C1_LINEARSCAN_HPP
27
28 #include "c1/c1_FpuStackSim.hpp"
29 #include "c1/c1_FrameMap.hpp"
30 #include "c1/c1_IR.hpp"
31 #include "c1/c1_Instruction.hpp"
32 #include "c1/c1_LIR.hpp"
33 #include "c1/c1_LIRGenerator.hpp"
34
35 class DebugInfoCache;
36 class FpuStackAllocator;
37 class IRScopeDebugInfo;
38 class Interval;
39 class IntervalWalker;
40 class LIRGenerator;
41 class LinearScan;
42 class MoveResolver;
43 class Range;
44
45 define_array(IntervalArray, Interval*)
46 define_stack(IntervalList, IntervalArray)
47
48 define_array(IntervalsArray, IntervalList*)
49 define_stack(IntervalsList, IntervalsArray)
50
51 define_array(OopMapArray, OopMap*)
52 define_stack(OopMapList, OopMapArray)
53
54 define_array(ScopeValueArray, ScopeValue*)
948
949 private:
950 elapsedTimer _timers[number_of_timers];
951 const char* timer_name(int idx);
952
953 public:
954 LinearScanTimers();
955
956 void begin_method(); // called for each method when register allocation starts
957 void end_method(LinearScan* allocator); // called for each method when register allocation completed
958 void print(double total_time); // called before termination of VM to print global summary
959
960 elapsedTimer* timer(int idx) { return &(_timers[idx]); }
961 };
962
963
964 #endif // ifndef PRODUCT
965
966
967 // Pick up platform-dependent implementation details
968 #ifdef TARGET_ARCH_x86
969 # include "c1_LinearScan_x86.hpp"
970 #endif
971 #ifdef TARGET_ARCH_sparc
972 # include "c1_LinearScan_sparc.hpp"
973 #endif
974
975
976 #endif // SHARE_VM_C1_C1_LINEARSCAN_HPP
|