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 //---------------------------CallGenerator-------------------------------------
26 // The subclasses of this class handle generation of ideal nodes for
27 // call sites and method entry points.
28
29 class CallGenerator : public ResourceObj {
30 public:
31 enum {
32 xxxunusedxxx
33 };
34
35 private:
36 ciMethod* _method; // The method being called.
37
38 protected:
39 CallGenerator(ciMethod* method);
40
41 public:
42 // Accessors
43 ciMethod* method() const { return _method; }
44
264 // Force a warm call to be hot. This worklists the call node for inlining.
265 void make_hot();
266
267 // Force a warm call to be cold. This worklists the call node for out-of-lining.
268 void make_cold();
269
270 // A reproducible total ordering, in which heat is the major key.
271 bool warmer_than(WarmCallInfo* that);
272
273 // List management. These methods are called with the list head,
274 // and return the new list head, inserting or removing the receiver.
275 WarmCallInfo* insert_into(WarmCallInfo* head);
276 WarmCallInfo* remove_from(WarmCallInfo* head);
277
278 #ifndef PRODUCT
279 void print() const;
280 void print_all() const;
281 int count_all() const;
282 #endif
283 };
|
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_CALLGENERATOR_HPP
26 #define SHARE_VM_OPTO_CALLGENERATOR_HPP
27
28 #include "opto/callnode.hpp"
29 #include "opto/compile.hpp"
30 #include "opto/type.hpp"
31 #include "runtime/deoptimization.hpp"
32
33 //---------------------------CallGenerator-------------------------------------
34 // The subclasses of this class handle generation of ideal nodes for
35 // call sites and method entry points.
36
37 class CallGenerator : public ResourceObj {
38 public:
39 enum {
40 xxxunusedxxx
41 };
42
43 private:
44 ciMethod* _method; // The method being called.
45
46 protected:
47 CallGenerator(ciMethod* method);
48
49 public:
50 // Accessors
51 ciMethod* method() const { return _method; }
52
272 // Force a warm call to be hot. This worklists the call node for inlining.
273 void make_hot();
274
275 // Force a warm call to be cold. This worklists the call node for out-of-lining.
276 void make_cold();
277
278 // A reproducible total ordering, in which heat is the major key.
279 bool warmer_than(WarmCallInfo* that);
280
281 // List management. These methods are called with the list head,
282 // and return the new list head, inserting or removing the receiver.
283 WarmCallInfo* insert_into(WarmCallInfo* head);
284 WarmCallInfo* remove_from(WarmCallInfo* head);
285
286 #ifndef PRODUCT
287 void print() const;
288 void print_all() const;
289 int count_all() const;
290 #endif
291 };
292
293 #endif // SHARE_VM_OPTO_CALLGENERATOR_HPP
|