Path: blob/aarch64-shenandoah-jdk8u272-b10/hotspot/src/share/vm/compiler/compilerOracle.hpp
32285 views
/*1* Copyright (c) 1998, 2012, Oracle and/or its affiliates. All rights reserved.2* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.3*4* This code is free software; you can redistribute it and/or modify it5* under the terms of the GNU General Public License version 2 only, as6* published by the Free Software Foundation.7*8* This code is distributed in the hope that it will be useful, but WITHOUT9* ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or10* FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License11* version 2 for more details (a copy is included in the LICENSE file that12* accompanied this code).13*14* You should have received a copy of the GNU General Public License version15* 2 along with this work; if not, write to the Free Software Foundation,16* Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.17*18* Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA19* or visit www.oracle.com if you need additional information or have any20* questions.21*22*/2324#ifndef SHARE_VM_COMPILER_COMPILERORACLE_HPP25#define SHARE_VM_COMPILER_COMPILERORACLE_HPP2627#include "memory/allocation.hpp"28#include "oops/oopsHierarchy.hpp"2930// CompilerOracle is an interface for turning on and off compilation31// for some methods3233class CompilerOracle : AllStatic {34private:35static bool _quiet;3637public:3839// True if the command file has been specified or is implicit40static bool has_command_file();4142// Reads from file and adds to lists43static void parse_from_file();4445// Tells whether we to exclude compilation of method46static bool should_exclude(methodHandle method, bool& quietly);4748// Tells whether we want to inline this method49static bool should_inline(methodHandle method);5051// Tells whether we want to disallow inlining of this method52static bool should_not_inline(methodHandle method);5354// Tells whether we should print the assembly for this method55static bool should_print(methodHandle method);5657// Tells whether we should log the compilation data for this method58static bool should_log(methodHandle method);5960// Tells whether to break when compiling method61static bool should_break_at(methodHandle method);6263// Check to see if this method has option set for it64static bool has_option_string(methodHandle method, const char * option);6566// Check if method has option and value set. If yes, overwrite value and return true,67// otherwise leave value unchanged and return false.68template<typename T>69static bool has_option_value(methodHandle method, const char* option, T& value);7071// Reads from string instead of file72static void parse_from_string(const char* command_string, void (*parser)(char*));7374static void parse_from_line(char* line);75static void parse_compile_only(char * line);7677// For updating the oracle file78static void append_comment_to_file(const char* message);79static void append_exclude_to_file(methodHandle method);80};8182#endif // SHARE_VM_COMPILER_COMPILERORACLE_HPP838485