comparison src/share/vm/ci/ciReplay.cpp @ 10195:e12c9b3740db

8012260: ciReplay: Include PID into the name of replay data file Reviewed-by: kvn, twisti
author vlivanov
date Thu, 25 Apr 2013 11:02:32 -0700
parents aeaca88565e6
children 7b23cb975cf2
comparison
equal deleted inserted replaced
10141:47766e2d2527 10195:e12c9b3740db
87 CompileReplay(const char* filename, TRAPS) { 87 CompileReplay(const char* filename, TRAPS) {
88 thread = THREAD; 88 thread = THREAD;
89 loader = Handle(thread, SystemDictionary::java_system_loader()); 89 loader = Handle(thread, SystemDictionary::java_system_loader());
90 stream = fopen(filename, "rt"); 90 stream = fopen(filename, "rt");
91 if (stream == NULL) { 91 if (stream == NULL) {
92 fprintf(stderr, "Can't open replay file %s\n", filename); 92 fprintf(stderr, "ERROR: Can't open replay file %s\n", filename);
93 } 93 }
94 buffer_length = 32; 94 buffer_length = 32;
95 buffer = NEW_RESOURCE_ARRAY(char, buffer_length); 95 buffer = NEW_RESOURCE_ARRAY(char, buffer_length);
96 _error_message = NULL; 96 _error_message = NULL;
97 97
325 bufptr = buffer; 325 bufptr = buffer;
326 process_command(CHECK); 326 process_command(CHECK);
327 if (had_error()) { 327 if (had_error()) {
328 tty->print_cr("Error while parsing line %d: %s\n", line_no, _error_message); 328 tty->print_cr("Error while parsing line %d: %s\n", line_no, _error_message);
329 tty->print_cr("%s", buffer); 329 tty->print_cr("%s", buffer);
330 assert(false, "error");
331 return; 330 return;
332 } 331 }
333 pos = 0; 332 pos = 0;
334 buffer_end = 0; 333 buffer_end = 0;
335 line_no++; 334 line_no++;
549 548
550 case 0: 549 case 0:
551 if (parsed_two_word == i) continue; 550 if (parsed_two_word == i) continue;
552 551
553 default: 552 default:
554 ShouldNotReachHere(); 553 fatal(err_msg_res("Unexpected tag: %d", cp->tag_at(i).value()));
555 break; 554 break;
556 } 555 }
557 556
558 } 557 }
559 } 558 }
817 // normal VM bootstrap but once we get into the replay itself 816 // normal VM bootstrap but once we get into the replay itself
818 // don't allow any intializers to be run. 817 // don't allow any intializers to be run.
819 ReplaySuppressInitializers = 1; 818 ReplaySuppressInitializers = 1;
820 } 819 }
821 820
821 if (FLAG_IS_DEFAULT(ReplayDataFile)) {
822 tty->print_cr("ERROR: no compiler replay data file specified (use -XX:ReplayDataFile=replay_pid12345.txt).");
823 return 1;
824 }
825
822 // Load and parse the replay data 826 // Load and parse the replay data
823 CompileReplay rp(ReplayDataFile, THREAD); 827 CompileReplay rp(ReplayDataFile, THREAD);
824 int exit_code = 0; 828 int exit_code = 0;
825 if (rp.can_replay()) { 829 if (rp.can_replay()) {
826 rp.process(THREAD); 830 rp.process(THREAD);