compilerOracle.hpp revision 3414
0N/A/*
2362N/A * Copyright (c) 1998, 2012, Oracle and/or its affiliates. All rights reserved.
0N/A * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
0N/A *
0N/A * This code is free software; you can redistribute it and/or modify it
0N/A * under the terms of the GNU General Public License version 2 only, as
0N/A * published by the Free Software Foundation.
0N/A *
0N/A * This code is distributed in the hope that it will be useful, but WITHOUT
0N/A * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
0N/A * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
0N/A * version 2 for more details (a copy is included in the LICENSE file that
0N/A * accompanied this code).
0N/A *
0N/A * You should have received a copy of the GNU General Public License version
0N/A * 2 along with this work; if not, write to the Free Software Foundation,
0N/A * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
0N/A *
2362N/A * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
2362N/A * or visit www.oracle.com if you need additional information or have any
2362N/A * questions.
0N/A *
0N/A */
0N/A
0N/A#ifndef SHARE_VM_COMPILER_COMPILERORACLE_HPP
496N/A#define SHARE_VM_COMPILER_COMPILERORACLE_HPP
0N/A
0N/A#include "memory/allocation.hpp"
0N/A#include "oops/oopsHierarchy.hpp"
0N/A
0N/A// CompilerOracle is an interface for turning on and off compilation
0N/A// for some methods
0N/A
0N/Aclass CompilerOracle : AllStatic {
0N/A private:
0N/A static bool _quiet;
0N/A
0N/A public:
0N/A
496N/A // True if the command file has been specified or is implicit
496N/A static bool has_command_file();
496N/A
496N/A // Reads from file and adds to lists
496N/A static void parse_from_file();
0N/A
0N/A // Tells whether we to exclude compilation of method
0N/A static bool should_exclude(methodHandle method, bool& quietly);
0N/A
0N/A // Tells whether we want to inline this method
0N/A static bool should_inline(methodHandle method);
0N/A
0N/A // Tells whether we want to disallow inlining of this method
0N/A static bool should_not_inline(methodHandle method);
// Tells whether we should print the assembly for this method
static bool should_print(methodHandle method);
// Tells whether we should log the compilation data for this method
static bool should_log(methodHandle method);
// Tells whether to break when compiling method
static bool should_break_at(methodHandle method);
// Check to see if this method has option set for it
static bool has_option_string(methodHandle method, const char * option);
// Reads from string instead of file
static void parse_from_string(const char* command_string, void (*parser)(char*));
static void parse_from_line(char* line);
static void parse_compile_only(char * line);
// For updating the oracle file
static void append_comment_to_file(const char* message);
static void append_exclude_to_file(methodHandle method);
};
#endif // SHARE_VM_COMPILER_COMPILERORACLE_HPP