Mercurial > hg > graal-jvmci-8
comparison src/share/vm/runtime/compilationPolicy.cpp @ 1179:3d6016e040d6
Merge
author | iveresov |
---|---|
date | Wed, 20 Jan 2010 12:54:25 -0800 |
parents | ddb7834449d0 |
children | 5f24d0319e54 |
comparison
equal
deleted
inserted
replaced
1171:5b00c9feb9ea | 1179:3d6016e040d6 |
---|---|
1 /* | 1 /* |
2 * Copyright 2000-2007 Sun Microsystems, Inc. All Rights Reserved. | 2 * Copyright 2000-2010 Sun Microsystems, Inc. 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. |
72 // Returns true if m is allowed to be compiled | 72 // Returns true if m is allowed to be compiled |
73 bool CompilationPolicy::canBeCompiled(methodHandle m) { | 73 bool CompilationPolicy::canBeCompiled(methodHandle m) { |
74 if (m->is_abstract()) return false; | 74 if (m->is_abstract()) return false; |
75 if (DontCompileHugeMethods && m->code_size() > HugeMethodLimit) return false; | 75 if (DontCompileHugeMethods && m->code_size() > HugeMethodLimit) return false; |
76 | 76 |
77 // Math intrinsics should never be compiled as this can lead to | |
78 // monotonicity problems because the interpreter will prefer the | |
79 // compiled code to the intrinsic version. This can't happen in | |
80 // production because the invocation counter can't be incremented | |
81 // but we shouldn't expose the system to this problem in testing | |
82 // modes. | |
83 if (!AbstractInterpreter::can_be_compiled(m)) { | |
84 return false; | |
85 } | |
86 | |
77 return !m->is_not_compilable(); | 87 return !m->is_not_compilable(); |
78 } | 88 } |
79 | 89 |
80 #ifndef PRODUCT | 90 #ifndef PRODUCT |
81 void CompilationPolicy::print_time() { | 91 void CompilationPolicy::print_time() { |