@@ -636,7 +636,7 @@ class CompileReplay : public StackObj {
636636 int c = getc (_stream);
637637 while (c != EOF) {
638638 c = get_line (c);
639- process_command (THREAD);
639+ process_command (false , THREAD);
640640 if (had_error ()) {
641641 int pos = _bufptr - _buffer + 1 ;
642642 tty->print_cr (" Error while parsing line %d at position %d: %s\n " , line_no, pos, _error_message);
@@ -652,7 +652,7 @@ class CompileReplay : public StackObj {
652652 reset ();
653653 }
654654
655- void process_command (TRAPS) {
655+ void process_command (bool is_replay_inline, TRAPS) {
656656 char * cmd = parse_string ();
657657 if (cmd == nullptr ) {
658658 return ;
@@ -670,20 +670,24 @@ class CompileReplay : public StackObj {
670670 }
671671 } else if (strcmp (" compile" , cmd) == 0 ) {
672672 process_compile (CHECK);
673- } else if (strcmp (" ciMethod" , cmd) == 0 ) {
674- process_ciMethod (CHECK);
675- } else if (strcmp (" ciMethodData" , cmd) == 0 ) {
676- process_ciMethodData (CHECK);
677- } else if (strcmp (" staticfield" , cmd) == 0 ) {
678- process_staticfield (CHECK);
679- } else if (strcmp (" ciInstanceKlass" , cmd) == 0 ) {
680- process_ciInstanceKlass (CHECK);
681- } else if (strcmp (" instanceKlass" , cmd) == 0 ) {
682- process_instanceKlass (CHECK);
673+ } else if (!is_replay_inline) {
674+ if (strcmp (" ciMethod" , cmd) == 0 ) {
675+ process_ciMethod (CHECK);
676+ } else if (strcmp (" ciMethodData" , cmd) == 0 ) {
677+ process_ciMethodData (CHECK);
678+ } else if (strcmp (" staticfield" , cmd) == 0 ) {
679+ process_staticfield (CHECK);
680+ } else if (strcmp (" ciInstanceKlass" , cmd) == 0 ) {
681+ process_ciInstanceKlass (CHECK);
682+ } else if (strcmp (" instanceKlass" , cmd) == 0 ) {
683+ process_instanceKlass (CHECK);
683684#if INCLUDE_JVMTI
684- } else if (strcmp (" JvmtiExport" , cmd) == 0 ) {
685- process_JvmtiExport (CHECK);
685+ } else if (strcmp (" JvmtiExport" , cmd) == 0 ) {
686+ process_JvmtiExport (CHECK);
686687#endif // INCLUDE_JVMTI
688+ } else {
689+ report_error (" unknown command" );
690+ }
687691 } else {
688692 report_error (" unknown command" );
689693 }
@@ -723,12 +727,7 @@ class CompileReplay : public StackObj {
723727 int c = getc (_stream);
724728 while (c != EOF) {
725729 c = get_line (c);
726- // Expecting only lines with "compile" command in inline replay file.
727- char * cmd = parse_string ();
728- if (cmd == nullptr || strcmp (" compile" , cmd) != 0 ) {
729- return nullptr ;
730- }
731- process_compile (CHECK_NULL);
730+ process_command (true , CHECK_NULL);
732731 if (had_error ()) {
733732 tty->print_cr (" Error while parsing line %d: %s\n " , line_no, _error_message);
734733 tty->print_cr (" %s" , _buffer);
0 commit comments