compilerOracle.hpp revision 2273:1d1603768966
1231990Smp/* 259243Sobrien * Copyright (c) 1998, 2011, Oracle and/or its affiliates. All rights reserved. 359243Sobrien * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. 459243Sobrien * 559243Sobrien * This code is free software; you can redistribute it and/or modify it 659243Sobrien * under the terms of the GNU General Public License version 2 only, as 759243Sobrien * published by the Free Software Foundation. 859243Sobrien * 959243Sobrien * This code is distributed in the hope that it will be useful, but WITHOUT 1059243Sobrien * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or 1159243Sobrien * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License 1259243Sobrien * version 2 for more details (a copy is included in the LICENSE file that 1359243Sobrien * accompanied this code). 1459243Sobrien * 1559243Sobrien * You should have received a copy of the GNU General Public License version 1659243Sobrien * 2 along with this work; if not, write to the Free Software Foundation, 17100616Smp * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA. 1859243Sobrien * 1959243Sobrien * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA 2059243Sobrien * or visit www.oracle.com if you need additional information or have any 2159243Sobrien * questions. 2259243Sobrien * 2359243Sobrien */ 2459243Sobrien 2559243Sobrien#ifndef SHARE_VM_COMPILER_COMPILERORACLE_HPP 2659243Sobrien#define SHARE_VM_COMPILER_COMPILERORACLE_HPP 2759243Sobrien 2859243Sobrien#include "memory/allocation.hpp" 2959243Sobrien#include "oops/oopsHierarchy.hpp" 3059243Sobrien 3159243Sobrien// CompilerOracle is an interface for turning on and off compilation 3259243Sobrien// for some methods 3359243Sobrien 3459243Sobrienclass CompilerOracle : AllStatic { 35231990Smp private: 3659243Sobrien static bool _quiet; 3759243Sobrien 3859243Sobrien public: 3959243Sobrien // Reads from file and adds to lists 4059243Sobrien static void parse_from_file(); 41167465Smp 4259243Sobrien // Tells whether we to exclude compilation of method 4359243Sobrien static bool should_exclude(methodHandle method, bool& quietly); 4459243Sobrien 45145479Smp // Tells whether we want to inline this method 4659243Sobrien static bool should_inline(methodHandle method); 4759243Sobrien 48195609Smp // Tells whether we want to disallow inlining of this method 49195609Smp static bool should_not_inline(methodHandle method); 50195609Smp 51195609Smp // Tells whether we should print the assembly for this method 5259243Sobrien static bool should_print(methodHandle method); 53167465Smp 54167465Smp // Tells whether we should log the compilation data for this method 55167465Smp static bool should_log(methodHandle method); 56167465Smp 57167465Smp // Tells whether to break when compiling method 58167465Smp static bool should_break_at(methodHandle method); 5959243Sobrien 60145479Smp // Check to see if this method has option set for it 6159243Sobrien static bool has_option_string(methodHandle method, const char * option); 6259243Sobrien 6359243Sobrien // Reads from string instead of file 64167465Smp static void parse_from_string(const char* command_string, void (*parser)(char*)); 6559243Sobrien 6659243Sobrien static void parse_from_line(char* line); 6759243Sobrien static void parse_compile_only(char * line); 6859243Sobrien 6959243Sobrien // For updating the oracle file 7059243Sobrien static void append_comment_to_file(const char* message); 7159243Sobrien static void append_exclude_to_file(methodHandle method); 7259243Sobrien}; 7359243Sobrien 7459243Sobrien#endif // SHARE_VM_COMPILER_COMPILERORACLE_HPP 7559243Sobrien