void compiledICHolderKlass::oop_print_on(oop obj, outputStream* st) {
  assert(obj->is_compiledICHolder(), "must be compiledICHolder");
  Klass::oop_print_on(obj, st);
  compiledICHolderOop c = compiledICHolderOop(obj);
  st->print(" - method: "); c->holder_method()->print_value_on(st); st->cr();
  st->print(" - klass:  "); c->holder_klass()->print_value_on(st); st->cr();
}
void compiledICHolderKlass::oop_follow_contents(oop obj) {
  assert(obj->is_compiledICHolder(), "must be compiledICHolder");
  compiledICHolderOop c = compiledICHolderOop(obj);

  obj->follow_header();
  MarkSweep::mark_and_push(c->adr_holder_method());
  MarkSweep::mark_and_push(c->adr_holder_klass());
}
void compiledICHolderKlass::oop_follow_contents(ParCompactionManager* cm,
                                                oop obj) {
  assert(obj->is_compiledICHolder(), "must be compiledICHolder");
  compiledICHolderOop c = compiledICHolderOop(obj);

  obj->follow_header(cm);
  PSParallelCompact::mark_and_push(cm, c->adr_holder_method());
  PSParallelCompact::mark_and_push(cm, c->adr_holder_klass());
}
int compiledICHolderKlass::oop_update_pointers(ParCompactionManager* cm,
                                               oop obj) {
  assert(obj->is_compiledICHolder(), "must be compiledICHolder");
  compiledICHolderOop c = compiledICHolderOop(obj);

  PSParallelCompact::adjust_pointer(c->adr_holder_method());
  PSParallelCompact::adjust_pointer(c->adr_holder_klass());
  return c->object_size();
}
bool compiledICHolderKlass::oop_being_unloaded(
  BoolObjectClosure* is_alive, oop obj) {
  // Delegate to the method and klass
  assert(!is_alive->do_object_b(obj), "should not be live");
  assert(obj->is_compiledICHolder(), "must be compiledICHolder");
  compiledICHolderOop c = compiledICHolderOop(obj);
  return c->holder_method()->method_holder()->being_unloaded(is_alive)
         || c->holder_klass()->being_unloaded(is_alive);
}
void compiledICHolderKlass::oop_verify_on(oop obj, outputStream* st) {
  Klass::oop_verify_on(obj, st);
  guarantee(obj->is_compiledICHolder(), "must be compiledICHolder");
  compiledICHolderOop c = compiledICHolderOop(obj);
  guarantee(c->is_perm(),             "should be in permspace");
  guarantee(c->holder_method()->is_perm(),   "should be in permspace");
  guarantee(c->holder_method()->is_method(), "should be method");
  guarantee(c->holder_klass()->is_perm(),    "should be in permspace");
  guarantee(c->holder_klass()->is_klass(),   "should be klass");
}
int compiledICHolderKlass::oop_oop_iterate(oop obj, OopClosure* blk) {
  assert(obj->is_compiledICHolder(), "must be compiledICHolder");
  compiledICHolderOop c = compiledICHolderOop(obj);
  // Get size before changing pointers.
  // Don't call size() or oop_size() since that is a virtual call.
  int size = c->object_size();

  obj->oop_iterate_header(blk);
  blk->do_oop(c->adr_holder_method());
  blk->do_oop(c->adr_holder_klass());
  return size;
}
int compiledICHolderKlass::oop_adjust_pointers(oop obj) {
  assert(obj->is_compiledICHolder(), "must be compiledICHolder");
  compiledICHolderOop c = compiledICHolderOop(obj);
  // Get size before changing pointers.
  // Don't call size() or oop_size() since that is a virtual call.
  int size = c->object_size();

  MarkSweep::adjust_pointer(c->adr_holder_method());
  MarkSweep::adjust_pointer(c->adr_holder_klass());
  obj->adjust_header();
  return size;
}
Exemplo n.º 9
0
object_type ClassifyObjectClosure::classify_object(oop obj, bool count) {
  object_type type = unknown_type;

  Klass* k = obj->blueprint();

  if (k->as_klassOop() == SystemDictionary::Object_klass()) {
    tty->print_cr("Found the class!");
  }

  if (count) {
    k->set_alloc_count(k->alloc_count() + 1);
  }

  if (obj->is_instance()) {
    if (k->oop_is_instanceRef()) {
      type = instanceRef_type;
    } else {
      type = instance_type;
    }
  } else if (obj->is_typeArray()) {
    type = typeArray_type;
  } else if (obj->is_objArray()) {
    type = objArray_type;
  } else if (obj->is_symbol()) {
    type = symbol_type;
  } else if (obj->is_klass()) {
    Klass* k = ((klassOop)obj)->klass_part();
    if (k->oop_is_instance()) {
      type = instanceKlass_type;
    } else {
      type = klass_type;
    }
  } else if (obj->is_method()) {
    type = method_type;
  } else if (obj->is_constMethod()) {
    type = constMethod_type;
  } else if (obj->is_methodData()) {
    ShouldNotReachHere();
  } else if (obj->is_constantPool()) {
    type = constantPool_type;
  } else if (obj->is_constantPoolCache()) {
    type = constantPoolCache_type;
  } else if (obj->is_compiledICHolder()) {
    type = compiledICHolder_type;
  } else {
    ShouldNotReachHere();
  }

  assert(type != unknown_type, "found object of unknown type.");
  return type;
}
int compiledICHolderKlass::oop_update_pointers(ParCompactionManager* cm,
                                               oop obj,
                                               HeapWord* beg_addr,
                                               HeapWord* end_addr) {
  assert(obj->is_compiledICHolder(), "must be compiledICHolder");
  compiledICHolderOop c = compiledICHolderOop(obj);

  oop* p;
  p = c->adr_holder_method();
  PSParallelCompact::adjust_pointer(p, beg_addr, end_addr);
  p = c->adr_holder_klass();
  PSParallelCompact::adjust_pointer(p, beg_addr, end_addr);
  return c->object_size();
}
Exemplo n.º 11
0
  void do_object(oop obj) {
    // Zap data from the objects which is pertains only to this JVM.  We
    // want that data recreated in new JVMs when the shared file is used.
    if (obj->is_method()) {
      ((methodOop)obj)->remove_unshareable_info();
    }
    else if (obj->is_klass()) {
      Klass::cast((klassOop)obj)->remove_unshareable_info();
    }

    // Don't save compiler related special oops (shouldn't be any yet).
    if (obj->is_methodData() || obj->is_compiledICHolder()) {
      ShouldNotReachHere();
    }
  }
int compiledICHolderKlass::oop_oop_iterate_m(oop obj, OopClosure* blk,
                                              MemRegion mr) {
  assert(obj->is_compiledICHolder(), "must be compiledICHolder");
  compiledICHolderOop c = compiledICHolderOop(obj);
  // Get size before changing pointers.
  // Don't call size() or oop_size() since that is a virtual call.
  int size = c->object_size();

  obj->oop_iterate_header(blk, mr);

  oop* adr;
  adr = c->adr_holder_method();
  if (mr.contains(adr)) blk->do_oop(adr);
  adr = c->adr_holder_klass();
  if (mr.contains(adr)) blk->do_oop(adr);
  return size;
}
int compiledICHolderKlass::oop_size(oop obj) const {
  assert(obj->is_compiledICHolder(), "must be compiledICHolder");
  return compiledICHolderOop(obj)->object_size();
}
void compiledICHolderKlass::oop_print_value_on(oop obj, outputStream* st) {
  assert(obj->is_compiledICHolder(), "must be compiledICHolder");
  Klass::oop_print_value_on(obj, st);
}
void compiledICHolderKlass::oop_push_contents(PSPromotionManager* pm, oop obj) {
  assert(obj->is_compiledICHolder(), "must be compiledICHolder");
}