--- old/src/share/vm/services/diagnosticCommand.hpp 2014-09-17 10:38:05.208150640 +0200 +++ new/src/share/vm/services/diagnosticCommand.hpp 2014-09-17 10:38:05.100150636 +0200 @@ -427,7 +427,7 @@ return "Compiler.codelist"; } static const char* description() { - return "Print all compiled methods in code cache."; + return "Print all compiled methods in code cache that are alive"; } static const char* impact() { return "Medium"; --- old/test/serviceability/dcmd/CodeCacheTest.java 2014-09-17 10:38:05.308150644 +0200 +++ new/test/serviceability/dcmd/CodeCacheTest.java 2014-09-17 10:38:05.196150640 +0200 @@ -80,22 +80,15 @@ line = r.readLine(); m = line2.matcher(line); if (m.matches()) { - long start = Long.parseLong(m.group(1), 16); - if (start < 0) { + String start = m.group(1); + String mark = m.group(2); + String top = m.group(3); + + // Lexical compare of hex numbers to check that they look sane. + if (start.compareTo(mark) > 1) { throw new Exception("Failed parsing dcmd codecache output"); } - long mark = Long.parseLong(m.group(2), 16); - if (mark < 0) { - throw new Exception("Failed parsing dcmd codecache output"); - } - long top = Long.parseLong(m.group(3), 16); - if (top < 0) { - throw new Exception("Failed parsing dcmd codecache output"); - } - if (start > mark) { - throw new Exception("Failed parsing dcmd codecache output"); - } - if (mark > top) { + if (mark.compareTo(top) > 1) { throw new Exception("Failed parsing dcmd codecache output"); } } else { --- old/src/share/vm/compiler/compileBroker.cpp 2014-09-17 10:38:05.320150645 +0200 +++ new/src/share/vm/compiler/compileBroker.cpp 2014-09-17 10:38:05.212150640 +0200 @@ -789,12 +789,12 @@ void CompileQueue::print(outputStream* st) { - assert_locked_or_safepoint(lock()); + MutexLocker locker(lock()); st->print_cr("Contents of %s", name()); st->print_cr("----------------------------"); CompileTask* task = _first; if (task == NULL) { - st->print_cr("Empty");; + st->print_cr("Empty"); } else { while (task != NULL) { task->print_compilation(st, NULL, true, true);