< prev index next >

src/share/vm/oops/oop.cpp

Print this page
rev 8961 : [mq]: diff-shenandoah.patch


  83     klass()->oop_print_value_on(obj, st);
  84   }
  85 }
  86 
  87 
  88 void oopDesc::verify_on(outputStream* st) {
  89   if (this != NULL) {
  90     klass()->oop_verify_on(this, st);
  91   }
  92 }
  93 
  94 
  95 void oopDesc::verify() {
  96   verify_on(tty);
  97 }
  98 
  99 intptr_t oopDesc::slow_identity_hash() {
 100   // slow case; we have to acquire the micro lock in order to locate the header
 101   ResetNoHandleMark rnm; // Might be called from LEAF/QUICK ENTRY
 102   HandleMark hm;
 103   Handle object(this);
 104   return ObjectSynchronizer::identity_hash_value_for(object);
 105 }
 106 
 107 // When String table needs to rehash
 108 unsigned int oopDesc::new_hash(juint seed) {
 109   EXCEPTION_MARK;
 110   ResourceMark rm;
 111   int length;
 112   jchar* chars = java_lang_String::as_unicode_string(this, length, THREAD);
 113   if (chars != NULL) {
 114     // Use alternate hashing algorithm on the string
 115     return AltHashing::murmur3_32(seed, chars, length);
 116   } else {
 117     vm_exit_out_of_memory(length, OOM_MALLOC_ERROR, "unable to create Unicode strings for String table rehash");
 118     return 0;
 119   }
 120 }
 121 
 122 VerifyOopClosure VerifyOopClosure::verify_oop;
 123 




  83     klass()->oop_print_value_on(obj, st);
  84   }
  85 }
  86 
  87 
  88 void oopDesc::verify_on(outputStream* st) {
  89   if (this != NULL) {
  90     klass()->oop_verify_on(this, st);
  91   }
  92 }
  93 
  94 
  95 void oopDesc::verify() {
  96   verify_on(tty);
  97 }
  98 
  99 intptr_t oopDesc::slow_identity_hash() {
 100   // slow case; we have to acquire the micro lock in order to locate the header
 101   ResetNoHandleMark rnm; // Might be called from LEAF/QUICK ENTRY
 102   HandleMark hm;
 103   Handle object(oopDesc::bs()->resolve_and_maybe_copy_oop(this));
 104   return ObjectSynchronizer::identity_hash_value_for(object);
 105 }
 106 
 107 // When String table needs to rehash
 108 unsigned int oopDesc::new_hash(juint seed) {
 109   EXCEPTION_MARK;
 110   ResourceMark rm;
 111   int length;
 112   jchar* chars = java_lang_String::as_unicode_string(this, length, THREAD);
 113   if (chars != NULL) {
 114     // Use alternate hashing algorithm on the string
 115     return AltHashing::murmur3_32(seed, chars, length);
 116   } else {
 117     vm_exit_out_of_memory(length, OOM_MALLOC_ERROR, "unable to create Unicode strings for String table rehash");
 118     return 0;
 119   }
 120 }
 121 
 122 VerifyOopClosure VerifyOopClosure::verify_oop;
 123 


< prev index next >