Mercurial > hg > graal-compiler
comparison src/share/vm/runtime/compilationPolicy.cpp @ 2348:5d8f5a6dced7
7020403: Add AdvancedCompilationPolicy for tiered
Summary: This implements adaptive tiered compilation policy.
Reviewed-by: kvn, never
author | iveresov |
---|---|
date | Fri, 04 Mar 2011 15:14:16 -0800 |
parents | f95d63e2154a |
children | e2eb7f986c64 |
comparison
equal
deleted
inserted
replaced
2325:8c9c9ee30d71 | 2348:5d8f5a6dced7 |
---|---|
1 /* | 1 /* |
2 * Copyright (c) 2000, 2010, Oracle and/or its affiliates. All rights reserved. | 2 * Copyright (c) 2000, 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. |
30 #include "interpreter/interpreter.hpp" | 30 #include "interpreter/interpreter.hpp" |
31 #include "oops/methodDataOop.hpp" | 31 #include "oops/methodDataOop.hpp" |
32 #include "oops/methodOop.hpp" | 32 #include "oops/methodOop.hpp" |
33 #include "oops/oop.inline.hpp" | 33 #include "oops/oop.inline.hpp" |
34 #include "prims/nativeLookup.hpp" | 34 #include "prims/nativeLookup.hpp" |
35 #include "runtime/advancedThresholdPolicy.hpp" | |
35 #include "runtime/compilationPolicy.hpp" | 36 #include "runtime/compilationPolicy.hpp" |
36 #include "runtime/frame.hpp" | 37 #include "runtime/frame.hpp" |
37 #include "runtime/handles.inline.hpp" | 38 #include "runtime/handles.inline.hpp" |
38 #include "runtime/rframe.hpp" | 39 #include "runtime/rframe.hpp" |
39 #include "runtime/simpleThresholdPolicy.hpp" | 40 #include "runtime/simpleThresholdPolicy.hpp" |
70 CompilationPolicy::set_policy(new SimpleThresholdPolicy()); | 71 CompilationPolicy::set_policy(new SimpleThresholdPolicy()); |
71 #else | 72 #else |
72 Unimplemented(); | 73 Unimplemented(); |
73 #endif | 74 #endif |
74 break; | 75 break; |
76 case 3: | |
77 #ifdef TIERED | |
78 CompilationPolicy::set_policy(new AdvancedThresholdPolicy()); | |
79 #else | |
80 Unimplemented(); | |
81 #endif | |
82 break; | |
75 default: | 83 default: |
76 fatal("CompilationPolicyChoice must be in the range: [0-2]"); | 84 fatal("CompilationPolicyChoice must be in the range: [0-3]"); |
77 } | 85 } |
78 CompilationPolicy::policy()->initialize(); | 86 CompilationPolicy::policy()->initialize(); |
79 } | 87 } |
80 | 88 |
81 void CompilationPolicy::completed_vm_startup() { | 89 void CompilationPolicy::completed_vm_startup() { |