< prev index next >

src/share/vm/ci/ciReplay.cpp

Print this page


   1 /* Copyright (c) 2013, 2015, 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 it
   5  * under the terms of the GNU General Public License version 2 only, as
   6  * published by the Free Software Foundation.
   7  *
   8  * This code is distributed in the hope that it will be useful, but WITHOUT
   9  * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
  10  * FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
  11  * version 2 for more details (a copy is included in the LICENSE file that
  12  * accompanied this code).
  13  *
  14  * You should have received a copy of the GNU General Public License version
  15  * 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 USA
  19  * or visit www.oracle.com if you need additional information or have any
  20  * questions.
  21  *


1040   }
1041   void* data = rp.process_inline(method, method->get_Method(), entry_bci, comp_level, THREAD);
1042   if (HAS_PENDING_EXCEPTION) {
1043     Handle throwable(THREAD, PENDING_EXCEPTION);
1044     CLEAR_PENDING_EXCEPTION;
1045     java_lang_Throwable::print_stack_trace(throwable, tty);
1046     tty->cr();
1047     return NULL;
1048   }
1049 
1050   if (rp.had_error()) {
1051     tty->print_cr("ciReplay: Failed on %s", rp.error_message());
1052     return NULL;
1053   }
1054   return data;
1055 }
1056 
1057 int ciReplay::replay_impl(TRAPS) {
1058   HandleMark hm;
1059   ResourceMark rm;
1060   // Make sure we don't run with background compilation
1061   BackgroundCompilation = false;
1062 
1063   if (ReplaySuppressInitializers > 2) {
1064     // ReplaySuppressInitializers > 2 means that we want to allow
1065     // normal VM bootstrap but once we get into the replay itself
1066     // don't allow any intializers to be run.
1067     ReplaySuppressInitializers = 1;
1068   }
1069 
1070   if (FLAG_IS_DEFAULT(ReplayDataFile)) {
1071     tty->print_cr("ERROR: no compiler replay data file specified (use -XX:ReplayDataFile=replay_pid12345.txt).");
1072     return 1;
1073   }
1074 
1075   // Load and parse the replay data
1076   CompileReplay rp(ReplayDataFile, THREAD);
1077   int exit_code = 0;
1078   if (rp.can_replay()) {
1079     rp.process(THREAD);
1080   } else {
1081     exit_code = 1;


   1 /* Copyright (c) 2013, 2016, 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 it
   5  * under the terms of the GNU General Public License version 2 only, as
   6  * published by the Free Software Foundation.
   7  *
   8  * This code is distributed in the hope that it will be useful, but WITHOUT
   9  * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
  10  * FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
  11  * version 2 for more details (a copy is included in the LICENSE file that
  12  * accompanied this code).
  13  *
  14  * You should have received a copy of the GNU General Public License version
  15  * 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 USA
  19  * or visit www.oracle.com if you need additional information or have any
  20  * questions.
  21  *


1040   }
1041   void* data = rp.process_inline(method, method->get_Method(), entry_bci, comp_level, THREAD);
1042   if (HAS_PENDING_EXCEPTION) {
1043     Handle throwable(THREAD, PENDING_EXCEPTION);
1044     CLEAR_PENDING_EXCEPTION;
1045     java_lang_Throwable::print_stack_trace(throwable, tty);
1046     tty->cr();
1047     return NULL;
1048   }
1049 
1050   if (rp.had_error()) {
1051     tty->print_cr("ciReplay: Failed on %s", rp.error_message());
1052     return NULL;
1053   }
1054   return data;
1055 }
1056 
1057 int ciReplay::replay_impl(TRAPS) {
1058   HandleMark hm;
1059   ResourceMark rm;


1060 
1061   if (ReplaySuppressInitializers > 2) {
1062     // ReplaySuppressInitializers > 2 means that we want to allow
1063     // normal VM bootstrap but once we get into the replay itself
1064     // don't allow any intializers to be run.
1065     ReplaySuppressInitializers = 1;
1066   }
1067 
1068   if (FLAG_IS_DEFAULT(ReplayDataFile)) {
1069     tty->print_cr("ERROR: no compiler replay data file specified (use -XX:ReplayDataFile=replay_pid12345.txt).");
1070     return 1;
1071   }
1072 
1073   // Load and parse the replay data
1074   CompileReplay rp(ReplayDataFile, THREAD);
1075   int exit_code = 0;
1076   if (rp.can_replay()) {
1077     rp.process(THREAD);
1078   } else {
1079     exit_code = 1;


< prev index next >