src/hotspot/share/compiler/compilerOracle.cpp
changeset 54374 22eb1f7416f1
parent 47765 b7c7428eaab9
child 54786 ebf733a324d4
equal deleted inserted replaced
54373:13935056b05e 54374:22eb1f7416f1
     1 /*
     1 /*
     2  * Copyright (c) 1998, 2017, Oracle and/or its affiliates. All rights reserved.
     2  * Copyright (c) 1998, 2019, Oracle and/or its affiliates. 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.
   736   }
   736   }
   737   token[pos++] = '\0';
   737   token[pos++] = '\0';
   738   parse_line(token);
   738   parse_line(token);
   739 }
   739 }
   740 
   740 
   741 void CompilerOracle::append_comment_to_file(const char* message) {
       
   742   assert(has_command_file(), "command file must be specified");
       
   743   fileStream stream(fopen(cc_file(), "at"));
       
   744   stream.print("# ");
       
   745   for (int index = 0; message[index] != '\0'; index++) {
       
   746     stream.put(message[index]);
       
   747     if (message[index] == '\n') stream.print("# ");
       
   748   }
       
   749   stream.cr();
       
   750 }
       
   751 
       
   752 void CompilerOracle::append_exclude_to_file(const methodHandle& method) {
       
   753   assert(has_command_file(), "command file must be specified");
       
   754   fileStream stream(fopen(cc_file(), "at"));
       
   755   stream.print("exclude ");
       
   756   method->method_holder()->name()->print_symbol_on(&stream);
       
   757   stream.print(".");
       
   758   method->name()->print_symbol_on(&stream);
       
   759   method->signature()->print_symbol_on(&stream);
       
   760   stream.cr();
       
   761   stream.cr();
       
   762 }
       
   763 
       
   764 
       
   765 void compilerOracle_init() {
   741 void compilerOracle_init() {
   766   CompilerOracle::parse_from_string(CompileCommand, CompilerOracle::parse_from_line);
   742   CompilerOracle::parse_from_string(CompileCommand, CompilerOracle::parse_from_line);
   767   CompilerOracle::parse_from_string(CompileOnly, CompilerOracle::parse_compile_only);
   743   CompilerOracle::parse_from_string(CompileOnly, CompilerOracle::parse_compile_only);
   768   if (CompilerOracle::has_command_file()) {
   744   if (CompilerOracle::has_command_file()) {
   769     CompilerOracle::parse_from_file();
   745     CompilerOracle::parse_from_file();