Mercurial > hg > graal-jvmci-8
comparison src/share/vm/runtime/simpleThresholdPolicy.hpp @ 2252:72d6c57d0658
7017434: Tiered needs to support reprofiling
Summary: Tiered needs to support proper method reprofiling after deopts.
Reviewed-by: kvn
author | iveresov |
---|---|
date | Wed, 09 Feb 2011 16:34:34 -0800 |
parents | f95d63e2154a |
children | 97b64f73103b |
comparison
equal
deleted
inserted
replaced
2251:336d17dff7cc | 2252:72d6c57d0658 |
---|---|
1 /* | 1 /* |
2 * Copyright (c) 2001, 2010, Oracle and/or its affiliates. All rights reserved. | 2 * Copyright (c) 2001, 2011, 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. |
60 int c1_count() const { return _c1_count; } | 60 int c1_count() const { return _c1_count; } |
61 int c2_count() const { return _c2_count; } | 61 int c2_count() const { return _c2_count; } |
62 void set_c1_count(int x) { _c1_count = x; } | 62 void set_c1_count(int x) { _c1_count = x; } |
63 void set_c2_count(int x) { _c2_count = x; } | 63 void set_c2_count(int x) { _c2_count = x; } |
64 | 64 |
65 enum EventType { CALL, LOOP, COMPILE }; | 65 enum EventType { CALL, LOOP, COMPILE, KILL, UPDATE, REPROFILE }; |
66 void print_event(EventType type, methodHandle mh, methodHandle imh, int bci, CompLevel level); | 66 void print_event(EventType type, methodHandle mh, methodHandle imh, int bci, CompLevel level); |
67 // Print policy-specific information if necessary | 67 // Print policy-specific information if necessary |
68 virtual void print_specific(EventType type, methodHandle mh, methodHandle imh, int bci, CompLevel level) { } | 68 virtual void print_specific(EventType type, methodHandle mh, methodHandle imh, int bci, CompLevel level) { } |
69 // Check if the method can be compiled, change level if necessary | 69 // Check if the method can be compiled, change level if necessary |
70 void compile(methodHandle mh, int bci, CompLevel level, TRAPS); | 70 void compile(methodHandle mh, int bci, CompLevel level, TRAPS); |
101 virtual void do_safepoint_work() { } | 101 virtual void do_safepoint_work() { } |
102 virtual void delay_compilation(methodOop method) { } | 102 virtual void delay_compilation(methodOop method) { } |
103 virtual void disable_compilation(methodOop method) { } | 103 virtual void disable_compilation(methodOop method) { } |
104 // TODO: we should honour reprofiling requests in the future. Currently reprofiling | 104 // TODO: we should honour reprofiling requests in the future. Currently reprofiling |
105 // would happen but not to the extent we would ideally like. | 105 // would happen but not to the extent we would ideally like. |
106 virtual void reprofile(ScopeDesc* trap_scope, bool is_osr) { } | 106 virtual void reprofile(ScopeDesc* trap_scope, bool is_osr); |
107 virtual nmethod* event(methodHandle method, methodHandle inlinee, | 107 virtual nmethod* event(methodHandle method, methodHandle inlinee, |
108 int branch_bci, int bci, CompLevel comp_level, TRAPS); | 108 int branch_bci, int bci, CompLevel comp_level, TRAPS); |
109 // Select task is called by CompileBroker. We should return a task or NULL. | 109 // Select task is called by CompileBroker. We should return a task or NULL. |
110 virtual CompileTask* select_task(CompileQueue* compile_queue); | 110 virtual CompileTask* select_task(CompileQueue* compile_queue); |
111 // Tell the runtime if we think a given method is adequately profiled. | 111 // Tell the runtime if we think a given method is adequately profiled. |