< prev index next >

src/hotspot/share/runtime/os.cpp

Print this page

        

@@ -36,14 +36,14 @@
 #include "logging/log.hpp"
 #include "interpreter/interpreter.hpp"
 #include "logging/log.hpp"
 #include "logging/logStream.hpp"
 #include "memory/allocation.inline.hpp"
+#ifdef ASSERT
 #include "memory/guardedMemory.hpp"
+#endif
 #include "memory/resourceArea.hpp"
-#include "memory/universe.hpp"
-#include "oops/compressedOops.inline.hpp"
 #include "oops/oop.inline.hpp"
 #include "prims/jvm_misc.hpp"
 #include "runtime/arguments.hpp"
 #include "runtime/atomic.hpp"
 #include "runtime/frame.inline.hpp"

@@ -856,11 +856,11 @@
 // to do so in a context in which races are impossible, or should do appropriate
 // locking.
 
 void os::start_thread(Thread* thread) {
   // guard suspend/resume
-  MutexLocker ml(thread->SR_lock(), Mutex::_no_safepoint_check_flag);
+  MutexLockerEx ml(thread->SR_lock(), Mutex::_no_safepoint_check_flag);
   OSThread* osthread = thread->osthread();
   osthread->set_state(RUNNABLE);
   pd_start_thread(thread);
 }
 

@@ -1022,13 +1022,12 @@
   int deadbeef = 0xdeadbeef;  // tester value 2
   return (SafeFetch32(aligned, cafebabe) != cafebabe) || (SafeFetch32(aligned, deadbeef) != deadbeef);
 }
 
 bool os::is_readable_range(const void* from, const void* to) {
-  if ((uintptr_t)from >= (uintptr_t)to) return false;
-  for (uintptr_t p = align_down((uintptr_t)from, min_page_size()); p < (uintptr_t)to; p += min_page_size()) {
-    if (!is_readable_pointer((const void*)p)) {
+  for (address p = align_down((address)from, min_page_size()); p < to; p += min_page_size()) {
+    if (!is_readable_pointer(p)) {
       return false;
     }
   }
   return true;
 }

@@ -1070,11 +1069,11 @@
 
   // Compressed oop needs to be decoded first.
 #ifdef _LP64
   if (UseCompressedOops && ((uintptr_t)addr &~ (uintptr_t)max_juint) == 0) {
     narrowOop narrow_oop = (narrowOop)(uintptr_t)addr;
-    oop o = CompressedOops::decode_raw(narrow_oop);
+    oop o = oopDesc::decode_oop_raw(narrow_oop);
 
     if (oopDesc::is_valid(o)) {
       st->print(UINT32_FORMAT " is a compressed pointer to object: ", narrow_oop);
       o->print_on(st);
       return;

@@ -1141,11 +1140,11 @@
 
   // Compressed klass needs to be decoded first.
 #ifdef _LP64
   if (UseCompressedClassPointers && ((uintptr_t)addr &~ (uintptr_t)max_juint) == 0) {
     narrowKlass narrow_klass = (narrowKlass)(uintptr_t)addr;
-    Klass* k = CompressedKlassPointers::decode_raw(narrow_klass);
+    Klass* k = Klass::decode_klass_raw(narrow_klass);
 
     if (Klass::is_valid(k)) {
       st->print_cr(UINT32_FORMAT " is a compressed pointer to class: " INTPTR_FORMAT, narrow_klass, p2i((HeapWord*)k));
       k->print_on(st);
       return;
< prev index next >