/*
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
*
* under the terms of the GNU General Public License version 2 only, as
* published by the Free Software Foundation.
*
* This code is distributed in the hope that it will be useful, but WITHOUT
* ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
* FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
* version 2 for more details (a copy is included in the LICENSE file that
* accompanied this code).
*
* You should have received a copy of the GNU General Public License version
* 2 along with this work; if not, write to the Free Software Foundation,
* Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
*
* Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
* or visit www.oracle.com if you need additional information or have any
* questions.
*
*/
#include "precompiled.hpp"
#include "compiler/compilerOracle.hpp"
#include "memory/allocation.inline.hpp"
#include "memory/oopFactory.hpp"
#include "memory/resourceArea.hpp"
#include "oops/methodOop.hpp"
#include "oops/oop.inline.hpp"
#include "oops/symbol.hpp"
#include "runtime/handles.inline.hpp"
#include "runtime/jniHandles.hpp"
public:
enum Mode {
Any,
};
protected:
public:
// utility method
return current;
}
}
return NULL;
}
}
}
h->print_symbol_on(tty);
}
}
}
void print_base() {
}
}
virtual void print() {
print_base();
}
};
_signature = NULL;
}
, _signature(signature) {
}
if (match_mode == Any) {
return true;
}
if (match_mode == Exact) {
}
switch (match_mode) {
case Prefix:
case Suffix: {
}
case Substring:
default:
return false;
}
}
const char * option;
public:
}
return false;
}
return true;
}
}
return false;
}
return (MethodOptionMatcher*)_next;
}
virtual void print() {
print_base();
}
};
// this must parallel the command_names below
enum OracleCommand {
OracleFirstCommand = 0,
};
// this must parallel the enum OracleCommand
static const char * command_names[] = {
"break",
"print",
"exclude",
"inline",
"dontinline",
"compileonly",
"log",
"option",
"quiet",
"help"
};
return "unknown command";
}
return command_names[command];
}
class MethodMatcher;
}
tty->print_cr("Warning: +LogCompilation must be enabled in order for individual methods to be logged.");
lists[command] = new MethodMatcher(class_name, c_mode, method_name, m_mode, signature, lists[command]);
}
const char* option) {
return lists[OptionCommand];
}
}
quietly = true;
return true;
}
}
}
return false;
}
}
}
}
if (!LogCompilation) return false;
}
}
"command_names size mismatch");
*bytes_read = 0;
return (OracleCommand)i;
}
}
return UnknownCommand;
}
static void usage() {
}
// The characters allowed in a class or method name. All characters > 0x7f
// are allowed in order to handle obfuscated class files (e.g. Volano)
"\x80\x81\x82\x83\x84\x85\x86\x87\x88\x89\x8a\x8b\x8c\x8d\x8e\x8f" \
"\x90\x91\x92\x93\x94\x95\x96\x97\x98\x99\x9a\x9b\x9c\x9d\x9e\x9f" \
"\xa0\xa1\xa2\xa3\xa4\xa5\xa6\xa7\xa8\xa9\xaa\xab\xac\xad\xae\xaf" \
"\xb0\xb1\xb2\xb3\xb4\xb5\xb6\xb7\xb8\xb9\xba\xbb\xbc\xbd\xbe\xbf" \
"\xc0\xc1\xc2\xc3\xc4\xc5\xc6\xc7\xc8\xc9\xca\xcb\xcc\xcd\xce\xcf" \
"\xd0\xd1\xd2\xd3\xd4\xd5\xd6\xd7\xd8\xd9\xda\xdb\xdc\xdd\xde\xdf" \
"\xe0\xe1\xe2\xe3\xe4\xe5\xe6\xe7\xe8\xe9\xea\xeb\xec\xed\xee\xef" \
"\xf0\xf1\xf2\xf3\xf4\xf5\xf6\xf7\xf8\xf9\xfa\xfb\xfc\xfd\xfe\xff"
// Accept several syntaxes for these patterns
// original syntax
// cmd java.lang.String foo
// PrintCompilation syntax
// cmd java.lang.String::foo
// VM syntax
//
static const char* patterns[] = {
};
while (name[0] == '*') {
}
}
error_msg = " Embedded * not allowed";
return MethodMatcher::Unknown;
}
}
int* bytes_read, const char*& error_msg) {
*bytes_read = 0;
}
}
return false;
}
if (line[0] == '\0') return;
if (line[0] == '#') return;
// Allow '.' to separate the class name from the method name.
// This is the preferred spelling of methods:
// exclude java/lang/String.indexOf(I)I
// Allow ',' for spaces (eases command line quoting).
// exclude,java/lang/String.indexOf
// For backward compatibility, allow space as separator also.
// For easy cut-and-paste of method names, allow VM output format
// as produced by methodOopDesc::print_short_name:
// exclude java.lang.String::indexOf
// For simple implementation convenience here, convert them all to space.
if (have_colon) {
}
}
int bytes_read;
line += bytes_read;
if (command == UnknownCommand) {
return;
}
if (command == QuietCommand) {
_quiet = true;
return;
}
if (command == HelpCommand) {
usage();
return;
}
line += bytes_read;
// there might be a signature following the method.
// signatures always begin with ( so match that by hand
sig[0] = '(';
line += bytes_read;
}
if (command == OptionCommand) {
// Look for trailing options to support
// ciMethod::has_option("string") to control features in the
// compiler. Multiple options may follow the method name.
// Print out the last match added
}
line += bytes_read;
}
} else {
bytes_read = 0;
} else {
}
}
}
if (!_quiet) {
}
} else {
}
}
}
static const char* cc_file() {
#ifdef ASSERT
if (CompileCommandFile == NULL)
return default_cc_file;
#endif
return CompileCommandFile;
}
}
int pos = 0;
if (c == '\n') {
pos = 0;
} else {
}
}
}
int pos = 0;
int c = *sp++;
if (c == '\n') {
pos = 0;
} else {
}
c = *sp++;
}
}
}
}
}
void compilerOracle_init() {
if (CompilerOracle::has_command_file()) {
} else {
warning("%s file is present but has been ignored. "
"Run with -XX:CompileCommandFile=%s to load the file.",
}
}
if (PrintAssembly) {
warning("CompileCommand and/or %s file contains 'print' commands, but PrintAssembly is also enabled", default_cc_file);
} else if (FLAG_IS_DEFAULT(DebugNonSafepoints)) {
warning("printing of assembly code is enabled; turning on DebugNonSafepoints to gain additional output");
DebugNonSafepoints = true;
}
}
}
int i;
if (Verbose) {
}
while (*line != '\0') {
for (i = 0;
line++, i++) {
}
if (i > 0) {
return;
newName[i] = '\0';
} else {
}
}
if (*line == method_sep) {
className = "";
} else {
} else {
}
}
} else {
} else {
} else if (className[0] == '\0') {
} else {
}
}
}
// each directive is terminated by , or NUL or . followed by NUL
if (methodName == NULL) {
methodName = "";
if (*line != method_sep) {
}
}
if (PrintVMOptions) {
}
methodName = NULL;
}
}
}