mirror of
https://github.com/openjdk/jdk.git
synced 2025-08-26 06:14:49 +02:00
8054889: Compiler team's implementation task
Adding three new diagnostic commands for compiler Reviewed-by: anoll, kvn, drchase
This commit is contained in:
parent
7275456c3a
commit
6062c2db15
14 changed files with 747 additions and 53 deletions
|
@ -249,6 +249,7 @@ void CodeCache::commit(CodeBlob* cb) {
|
|||
#define FOR_ALL_BLOBS(var) for (CodeBlob *var = first() ; var != NULL; var = next(var) )
|
||||
#define FOR_ALL_ALIVE_BLOBS(var) for (CodeBlob *var = alive(first()); var != NULL; var = alive(next(var)))
|
||||
#define FOR_ALL_ALIVE_NMETHODS(var) for (nmethod *var = alive_nmethod(first()); var != NULL; var = alive_nmethod(next(var)))
|
||||
#define FOR_ALL_NMETHODS(var) for (nmethod *var = first_nmethod(); var != NULL; var = next_nmethod(var))
|
||||
|
||||
|
||||
bool CodeCache::contains(void *p) {
|
||||
|
@ -969,6 +970,25 @@ void CodeCache::print_summary(outputStream* st, bool detailed) {
|
|||
}
|
||||
}
|
||||
|
||||
void CodeCache::print_codelist(outputStream* st) {
|
||||
assert_locked_or_safepoint(CodeCache_lock);
|
||||
|
||||
FOR_ALL_NMETHODS(p) {
|
||||
ResourceMark rm;
|
||||
char *method_name = p->method()->name_and_sig_as_C_string();
|
||||
st->print_cr("%d %d %s ["INTPTR_FORMAT", "INTPTR_FORMAT" - "INTPTR_FORMAT"]",
|
||||
p->compile_id(), p->comp_level(), method_name, (intptr_t)p->header_begin(),
|
||||
(intptr_t)p->code_begin(), (intptr_t)p->code_end());
|
||||
}
|
||||
}
|
||||
|
||||
void CodeCache::print_layout(outputStream* st) {
|
||||
assert_locked_or_safepoint(CodeCache_lock);
|
||||
ResourceMark rm;
|
||||
|
||||
print_summary(st, true);
|
||||
}
|
||||
|
||||
void CodeCache::log_state(outputStream* st) {
|
||||
st->print(" total_blobs='" UINT32_FORMAT "' nmethods='" UINT32_FORMAT "'"
|
||||
" adapters='" UINT32_FORMAT "' free_code_cache='" SIZE_FORMAT "'",
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue