hotspot/src/share/vm/runtime/frame.cpp
changeset 11571 23f825a42a85
parent 11565 713a0398ca58
child 11636 3c07b54482a5
equal deleted inserted replaced
11570:25f3e9348905 11571:23f825a42a85
  1313   }
  1313   }
  1314   return false;
  1314   return false;
  1315 }
  1315 }
  1316 #endif
  1316 #endif
  1317 
  1317 
  1318 
       
  1319 #ifdef ASSERT
  1318 #ifdef ASSERT
  1320 void frame::interpreter_frame_verify_monitor(BasicObjectLock* value) const {
  1319 void frame::interpreter_frame_verify_monitor(BasicObjectLock* value) const {
  1321   assert(is_interpreted_frame(), "Not an interpreted frame");
  1320   assert(is_interpreted_frame(), "Not an interpreted frame");
  1322   // verify that the value is in the right part of the frame
  1321   // verify that the value is in the right part of the frame
  1323   address low_mark  = (address) interpreter_frame_monitor_end();
  1322   address low_mark  = (address) interpreter_frame_monitor_end();
  1329   guarantee( high_mark > current                                , "Current BasicObjectLock* higher than high_mark");
  1328   guarantee( high_mark > current                                , "Current BasicObjectLock* higher than high_mark");
  1330 
  1329 
  1331   guarantee((current - low_mark) % monitor_size  ==  0         , "Misaligned bottom of BasicObjectLock*");
  1330   guarantee((current - low_mark) % monitor_size  ==  0         , "Misaligned bottom of BasicObjectLock*");
  1332   guarantee( current >= low_mark                               , "Current BasicObjectLock* below than low_mark");
  1331   guarantee( current >= low_mark                               , "Current BasicObjectLock* below than low_mark");
  1333 }
  1332 }
  1334 
  1333 #endif
  1335 
  1334 
       
  1335 #ifndef PRODUCT
  1336 void frame::describe(FrameValues& values, int frame_no) {
  1336 void frame::describe(FrameValues& values, int frame_no) {
  1337   // boundaries: sp and the 'real' frame pointer
  1337   // boundaries: sp and the 'real' frame pointer
  1338   values.describe(-1, sp(), err_msg("sp for #%d", frame_no), 1);
  1338   values.describe(-1, sp(), err_msg("sp for #%d", frame_no), 1);
  1339   intptr_t* frame_pointer = real_fp(); // Note: may differ from fp()
  1339   intptr_t* frame_pointer = real_fp(); // Note: may differ from fp()
  1340 
  1340 
  1434   _fr = thread->last_frame();
  1434   _fr = thread->last_frame();
  1435   _is_done = false;
  1435   _is_done = false;
  1436 }
  1436 }
  1437 
  1437 
  1438 
  1438 
  1439 #ifdef ASSERT
  1439 #ifndef PRODUCT
  1440 
  1440 
  1441 void FrameValues::describe(int owner, intptr_t* location, const char* description, int priority) {
  1441 void FrameValues::describe(int owner, intptr_t* location, const char* description, int priority) {
  1442   FrameValue fv;
  1442   FrameValue fv;
  1443   fv.location = location;
  1443   fv.location = location;
  1444   fv.owner = owner;
  1444   fv.owner = owner;
  1447   strcpy(fv.description, description);
  1447   strcpy(fv.description, description);
  1448   _values.append(fv);
  1448   _values.append(fv);
  1449 }
  1449 }
  1450 
  1450 
  1451 
  1451 
       
  1452 #ifdef ASSERT
  1452 void FrameValues::validate() {
  1453 void FrameValues::validate() {
  1453   _values.sort(compare);
  1454   _values.sort(compare);
  1454   bool error = false;
  1455   bool error = false;
  1455   FrameValue prev;
  1456   FrameValue prev;
  1456   prev.owner = -1;
  1457   prev.owner = -1;
  1472       prev = fv;
  1473       prev = fv;
  1473     }
  1474     }
  1474   }
  1475   }
  1475   assert(!error, "invalid layout");
  1476   assert(!error, "invalid layout");
  1476 }
  1477 }
  1477 
  1478 #endif // ASSERT
  1478 
  1479 
  1479 void FrameValues::print(JavaThread* thread) {
  1480 void FrameValues::print(JavaThread* thread) {
  1480   _values.sort(compare);
  1481   _values.sort(compare);
  1481 
  1482 
  1482   // Sometimes values like the fp can be invalid values if the
  1483   // Sometimes values like the fp can be invalid values if the
  1521       cur--;
  1522       cur--;
  1522     }
  1523     }
  1523   }
  1524   }
  1524 }
  1525 }
  1525 
  1526 
  1526 #endif
  1527 #endif // ndef PRODUCT