comparison src/share/vm/runtime/compilationPolicy.hpp @ 6725:da91efe96a93

6964458: Reimplement class meta-data storage to use native memory Summary: Remove PermGen, allocate meta-data in metaspace linked to class loaders, rewrite GC walking, rewrite and rename metadata to be C++ classes Reviewed-by: jmasa, stefank, never, coleenp, kvn, brutisso, mgerdin, dholmes, jrose, twisti, roland Contributed-by: jmasa <jon.masamitsu@oracle.com>, stefank <stefan.karlsson@oracle.com>, mgerdin <mikael.gerdin@oracle.com>, never <tom.rodriguez@oracle.com>
author coleenp
date Sat, 01 Sep 2012 13:25:18 -0400
parents d2a62e0f25eb
children e522a00b91aa b84fd7d73702
comparison
equal deleted inserted replaced
6724:36d1d483d5d6 6725:da91efe96a93
1 /* 1 /*
2 * Copyright (c) 2000, 2010, Oracle and/or its affiliates. All rights reserved. 2 * Copyright (c) 2000, 2012, Oracle and/or its affiliates. All rights reserved.
3 * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. 3 * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
4 * 4 *
5 * This code is free software; you can redistribute it and/or modify it 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 6 * under the terms of the GNU General Public License version 2 only, as
7 * published by the Free Software Foundation. 7 * published by the Free Software Foundation.
69 virtual void do_safepoint_work() = 0; 69 virtual void do_safepoint_work() = 0;
70 // reprofile request 70 // reprofile request
71 virtual void reprofile(ScopeDesc* trap_scope, bool is_osr) = 0; 71 virtual void reprofile(ScopeDesc* trap_scope, bool is_osr) = 0;
72 // delay_compilation(method) can be called by any component of the runtime to notify the policy 72 // delay_compilation(method) can be called by any component of the runtime to notify the policy
73 // that it's recommended to delay the complation of this method. 73 // that it's recommended to delay the complation of this method.
74 virtual void delay_compilation(methodOop method) = 0; 74 virtual void delay_compilation(Method* method) = 0;
75 // disable_compilation() is called whenever the runtime decides to disable compilation of the 75 // disable_compilation() is called whenever the runtime decides to disable compilation of the
76 // specified method. 76 // specified method.
77 virtual void disable_compilation(methodOop method) = 0; 77 virtual void disable_compilation(Method* method) = 0;
78 // Select task is called by CompileBroker. The queue is guaranteed to have at least one 78 // Select task is called by CompileBroker. The queue is guaranteed to have at least one
79 // element and is locked. The function should select one and return it. 79 // element and is locked. The function should select one and return it.
80 virtual CompileTask* select_task(CompileQueue* compile_queue) = 0; 80 virtual CompileTask* select_task(CompileQueue* compile_queue) = 0;
81 // Tell the runtime if we think a given method is adequately profiled. 81 // Tell the runtime if we think a given method is adequately profiled.
82 virtual bool is_mature(methodOop method) = 0; 82 virtual bool is_mature(Method* method) = 0;
83 // Do policy initialization 83 // Do policy initialization
84 virtual void initialize() = 0; 84 virtual void initialize() = 0;
85 virtual bool should_not_inline(ciEnv* env, ciMethod* method) { return false; } 85 virtual bool should_not_inline(ciEnv* env, ciMethod* method) { return false; }
86 }; 86 };
87 87
98 NonTieredCompPolicy() : _compiler_count(0) { } 98 NonTieredCompPolicy() : _compiler_count(0) { }
99 virtual CompLevel initial_compile_level() { return CompLevel_initial_compile; } 99 virtual CompLevel initial_compile_level() { return CompLevel_initial_compile; }
100 virtual int compiler_count(CompLevel comp_level); 100 virtual int compiler_count(CompLevel comp_level);
101 virtual void do_safepoint_work(); 101 virtual void do_safepoint_work();
102 virtual void reprofile(ScopeDesc* trap_scope, bool is_osr); 102 virtual void reprofile(ScopeDesc* trap_scope, bool is_osr);
103 virtual void delay_compilation(methodOop method); 103 virtual void delay_compilation(Method* method);
104 virtual void disable_compilation(methodOop method); 104 virtual void disable_compilation(Method* method);
105 virtual bool is_mature(methodOop method); 105 virtual bool is_mature(Method* method);
106 virtual void initialize(); 106 virtual void initialize();
107 virtual CompileTask* select_task(CompileQueue* compile_queue); 107 virtual CompileTask* select_task(CompileQueue* compile_queue);
108 virtual nmethod* event(methodHandle method, methodHandle inlinee, int branch_bci, int bci, CompLevel comp_level, nmethod* nm, JavaThread* thread); 108 virtual nmethod* event(methodHandle method, methodHandle inlinee, int branch_bci, int bci, CompLevel comp_level, nmethod* nm, JavaThread* thread);
109 virtual void method_invocation_event(methodHandle m, JavaThread* thread) = 0; 109 virtual void method_invocation_event(methodHandle m, JavaThread* thread) = 0;
110 virtual void method_back_branch_event(methodHandle m, int bci, JavaThread* thread) = 0; 110 virtual void method_back_branch_event(methodHandle m, int bci, JavaThread* thread) = 0;