8183151: DCmd Compiler.codelist should print all compiled methods
Add support for AOT methods in codelist dcmd Reviewed-by: neliasso, kvn
This commit is contained in:
parent
5ae3d88bb7
commit
340108f92b
@ -1609,14 +1609,15 @@ void CodeCache::print_summary(outputStream* st, bool detailed) {
|
|||||||
void CodeCache::print_codelist(outputStream* st) {
|
void CodeCache::print_codelist(outputStream* st) {
|
||||||
MutexLockerEx mu(CodeCache_lock, Mutex::_no_safepoint_check_flag);
|
MutexLockerEx mu(CodeCache_lock, Mutex::_no_safepoint_check_flag);
|
||||||
|
|
||||||
NMethodIterator iter;
|
CompiledMethodIterator iter;
|
||||||
while (iter.next_alive()) {
|
while (iter.next_alive()) {
|
||||||
nmethod* nm = iter.method();
|
CompiledMethod* cm = iter.method();
|
||||||
ResourceMark rm;
|
ResourceMark rm;
|
||||||
char *method_name = nm->method()->name_and_sig_as_C_string();
|
char* method_name = cm->method()->name_and_sig_as_C_string();
|
||||||
st->print_cr("%d %d %s [" INTPTR_FORMAT ", " INTPTR_FORMAT " - " INTPTR_FORMAT "]",
|
st->print_cr("%d %d %d %s [" INTPTR_FORMAT ", " INTPTR_FORMAT " - " INTPTR_FORMAT "]",
|
||||||
nm->compile_id(), nm->comp_level(), method_name, (intptr_t)nm->header_begin(),
|
cm->compile_id(), cm->comp_level(), cm->get_state(),
|
||||||
(intptr_t)nm->code_begin(), (intptr_t)nm->code_end());
|
method_name,
|
||||||
|
(intptr_t)cm->header_begin(), (intptr_t)cm->code_begin(), (intptr_t)cm->code_end());
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -118,9 +118,17 @@ public class CodelistTest {
|
|||||||
if (line.contains("CodelistTest.testcaseMethod")) {
|
if (line.contains("CodelistTest.testcaseMethod")) {
|
||||||
String[] parts = line.split(" ");
|
String[] parts = line.split(" ");
|
||||||
int compileID = Integer.parseInt(parts[0]);
|
int compileID = Integer.parseInt(parts[0]);
|
||||||
int compileLevel = Integer.parseInt(parts[1]);
|
Assert.assertTrue(compileID > 0, "CompileID must be positive");
|
||||||
String str = parts[2];
|
|
||||||
|
|
||||||
|
int compileLevel = Integer.parseInt(parts[1]);
|
||||||
|
Assert.assertTrue(compileLevel >= -1, "CompileLevel must be at least -1 (AOT)");
|
||||||
|
Assert.assertTrue(compileLevel <= 4, "CompileLevel must be at most 4 (C2)");
|
||||||
|
|
||||||
|
int codeState = Integer.parseInt(parts[2]);
|
||||||
|
Assert.assertTrue(codeState >= 0, "CodeState must be at least 0 (In Use)");
|
||||||
|
Assert.assertTrue(codeState <= 4, "CodeState must be at most 4 (Unloaded)");
|
||||||
|
|
||||||
|
String str = parts[3];
|
||||||
for (TestCase testcase : testcases) {
|
for (TestCase testcase : testcases) {
|
||||||
if (str.contains(testcase.methodName)) {
|
if (str.contains(testcase.methodName)) {
|
||||||
Assert.assertFalse(testcase.check, "Must not be found or already found.");
|
Assert.assertFalse(testcase.check, "Must not be found or already found.");
|
||||||
|
Loading…
Reference in New Issue
Block a user