Skip to content
Permalink
Browse files
8277423: ciReplay: hidden class with comment expected error
Reviewed-by: chagedorn, thartmann
  • Loading branch information
dean-long committed Nov 22, 2021
1 parent 1049aba commit 05a9a51dbfc46eb52bc28f1f9a618c75ee2597e9
Show file tree
Hide file tree
Showing 3 changed files with 20 additions and 11 deletions.
@@ -1654,9 +1654,11 @@ void ciEnv::dump_replay_data_helper(outputStream* out) {

GrowableArray<ciMetadata*>* objects = _factory->get_ci_metadata();
out->print_cr("# %d ciObject found", objects->length());

// The very first entry is the InstanceKlass of the root method of the current compilation in order to get the right
// protection domain to load subsequent classes during replay compilation.
out->print_cr("instanceKlass %s", CURRENT_ENV->replay_name(task()->method()->method_holder()));
ciInstanceKlass::dump_replay_instanceKlass(out, task()->method()->method_holder());

for (int i = 0; i < objects->length(); i++) {
objects->at(i)->dump_replay_data(out);
}
@@ -732,6 +732,19 @@ const char *ciInstanceKlass::replay_name() const {
return CURRENT_ENV->replay_name(get_instanceKlass());
}

void ciInstanceKlass::dump_replay_instanceKlass(outputStream* out, InstanceKlass* ik) {
if (ik->is_hidden()) {
const char *name = CURRENT_ENV->dyno_name(ik);
if (name != NULL) {
out->print_cr("instanceKlass %s # %s", name, ik->name()->as_quoted_ascii());
} else {
out->print_cr("# instanceKlass %s", ik->name()->as_quoted_ascii());
}
} else {
out->print_cr("instanceKlass %s", ik->name()->as_quoted_ascii());
}
}

void ciInstanceKlass::dump_replay_data(outputStream* out) {
ResourceMark rm;

@@ -743,16 +756,7 @@ void ciInstanceKlass::dump_replay_data(outputStream* out) {
while (sub != NULL) {
if (sub->is_instance_klass()) {
InstanceKlass *isub = InstanceKlass::cast(sub);
if (isub->is_hidden()) {
const char *name = CURRENT_ENV->dyno_name(isub);
if (name != NULL) {
out->print_cr("instanceKlass %s # %s", name, sub->name()->as_quoted_ascii());
} else {
out->print_cr("# instanceKlass %s", sub->name()->as_quoted_ascii());
}
} else {
out->print_cr("instanceKlass %s", sub->name()->as_quoted_ascii());
}
dump_replay_instanceKlass(out, isub);
}
sub = sub->next_sibling();
}
@@ -293,6 +293,9 @@ class ciInstanceKlass : public ciKlass {
// Dump the current state of this klass for compilation replay.
virtual void dump_replay_data(outputStream* out);

static void dump_replay_instanceKlass(outputStream* out, InstanceKlass* ik);


// Return stable class name suitable for replay file.
const char *replay_name() const;

1 comment on commit 05a9a51

@openjdk-notifier
Copy link

@openjdk-notifier openjdk-notifier bot commented on 05a9a51 Nov 22, 2021

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Please sign in to comment.