src/share/vm/compiler/compilerOracle.cpp
Index Unified diffs Context diffs Sdiffs Patch New Old Previous File Next File
*** old/src/share/vm/compiler/compilerOracle.cpp	Wed Jan 21 16:02:35 2015
--- new/src/share/vm/compiler/compilerOracle.cpp	Wed Jan 21 16:02:35 2015

*** 687,696 **** --- 687,703 ---- jio_snprintf(errorbuf, sizeof(errorbuf), " Flag name for type %s should be alphanumeric ", type); } return NULL; } + int skip_whitespace(char* line) { + // Skip any leading spaces + int whitespace_read = 0; + sscanf(line, "%*[ \t]%n", &whitespace_read); + return whitespace_read; + } + void CompilerOracle::parse_from_line(char* line) { if (line[0] == '\0') return; if (line[0] == '#') return; bool have_colon = (strstr(line, "::") != NULL);
*** 753,771 **** --- 760,772 ---- Symbol* m_name = SymbolTable::new_symbol(method_name, CHECK); Symbol* signature = NULL; line += bytes_read; // Skip any leading spaces before signature int whitespace_read = 0; sscanf(line, "%*[ \t]%n", &whitespace_read); if (whitespace_read > 0) { line += whitespace_read; } // there might be a signature following the method. // signatures always begin with ( so match that by hand + line += skip_whitespace(line); if (1 == sscanf(line, "(%254[[);/" RANGEBASE "]%n", sig + 1, &bytes_read)) { sig[0] = '('; line += bytes_read; signature = SymbolTable::new_symbol(sig, CHECK); }
*** 784,794 **** --- 785,797 ---- // Type (2) is used to support options with a value. Values can have the // the following types: intx, uintx, bool, ccstr, ccstrlist, and double. // // For future extensions: extend scan_flag_and_value() char option[256]; // stores flag for Type (1) and type of Type (2) while (sscanf(line, "%*[ \t]%255[a-zA-Z0-9]%n", option, &bytes_read) == 1) { + + line += skip_whitespace(line); + while (sscanf(line, "%255[a-zA-Z0-9]%n", option, &bytes_read) == 1) { if (match != NULL && !_quiet) { // Print out the last match added ttyLocker ttyl; tty->print("CompileCommand: %s ", command_names[command]); match->print();
*** 814,823 **** --- 817,827 ---- line += bytes_read; } else { // Type (1) option match = add_option_string(c_name, c_match, m_name, m_match, signature, option, true); } + line += skip_whitespace(line); } // while( } else { match = add_predicate(command, c_name, c_match, m_name, m_match, signature); } }

src/share/vm/compiler/compilerOracle.cpp
Index Unified diffs Context diffs Sdiffs Patch New Old Previous File Next File