1357 // Debugging |
1357 // Debugging |
1358 friend class JavaClasses; |
1358 friend class JavaClasses; |
1359 }; |
1359 }; |
1360 |
1360 |
1361 |
1361 |
1362 class Backtrace: AllStatic { |
|
1363 public: |
|
1364 // Helper backtrace functions to store bci|version together. |
|
1365 static int merge_bci_and_version(int bci, int version); |
|
1366 static int merge_mid_and_cpref(int mid, int cpref); |
|
1367 static int bci_at(unsigned int merged); |
|
1368 static int version_at(unsigned int merged); |
|
1369 static int mid_at(unsigned int merged); |
|
1370 static int cpref_at(unsigned int merged); |
|
1371 static int get_line_number(const methodHandle& method, int bci); |
|
1372 static Symbol* get_source_file_name(InstanceKlass* holder, int version); |
|
1373 |
|
1374 // Debugging |
|
1375 friend class JavaClasses; |
|
1376 }; |
|
1377 |
|
1378 // Interface to java.lang.StackFrameInfo objects |
|
1379 |
|
1380 #define STACKFRAMEINFO_INJECTED_FIELDS(macro) \ |
|
1381 macro(java_lang_StackFrameInfo, mid, short_signature, false) \ |
|
1382 macro(java_lang_StackFrameInfo, version, short_signature, false) \ |
|
1383 macro(java_lang_StackFrameInfo, cpref, short_signature, false) |
|
1384 |
|
1385 class java_lang_StackFrameInfo: AllStatic { |
|
1386 private: |
|
1387 static int _declaringClass_offset; |
|
1388 static int _memberName_offset; |
|
1389 static int _bci_offset; |
|
1390 static int _methodName_offset; |
|
1391 static int _fileName_offset; |
|
1392 static int _lineNumber_offset; |
|
1393 |
|
1394 static int _mid_offset; |
|
1395 static int _version_offset; |
|
1396 static int _cpref_offset; |
|
1397 |
|
1398 static Method* get_method(Handle stackFrame, InstanceKlass* holder, TRAPS); |
|
1399 static Symbol* get_file_name(Handle stackFrame, InstanceKlass* holder); |
|
1400 |
|
1401 public: |
|
1402 // Setters |
|
1403 static void set_declaringClass(oop info, oop value); |
|
1404 static void set_method_and_bci(Handle stackFrame, const methodHandle& method, int bci); |
|
1405 static void set_bci(oop info, int value); |
|
1406 |
|
1407 // set method info in an instance of StackFrameInfo |
|
1408 static void fill_methodInfo(Handle info, TRAPS); |
|
1409 static void set_methodName(oop info, oop value); |
|
1410 static void set_fileName(oop info, oop value); |
|
1411 static void set_lineNumber(oop info, int value); |
|
1412 |
|
1413 // these injected fields are only used if -XX:-MemberNameInStackFrame set |
|
1414 static void set_mid(oop info, short value); |
|
1415 static void set_version(oop info, short value); |
|
1416 static void set_cpref(oop info, short value); |
|
1417 |
|
1418 static void compute_offsets(); |
|
1419 |
|
1420 // Debugging |
|
1421 friend class JavaClasses; |
|
1422 }; |
|
1423 |
|
1424 class java_lang_LiveStackFrameInfo: AllStatic { |
|
1425 private: |
|
1426 static int _monitors_offset; |
|
1427 static int _locals_offset; |
|
1428 static int _operands_offset; |
|
1429 |
|
1430 public: |
|
1431 static void set_monitors(oop info, oop value); |
|
1432 static void set_locals(oop info, oop value); |
|
1433 static void set_operands(oop info, oop value); |
|
1434 |
|
1435 static void compute_offsets(); |
|
1436 |
|
1437 // Debugging |
|
1438 friend class JavaClasses; |
|
1439 }; |
|
1440 |
|
1441 // Interface to java.lang.AssertionStatusDirectives objects |
1362 // Interface to java.lang.AssertionStatusDirectives objects |
1442 |
1363 |
1443 class java_lang_AssertionStatusDirectives: AllStatic { |
1364 class java_lang_AssertionStatusDirectives: AllStatic { |
1444 private: |
1365 private: |
1445 enum { |
1366 enum { |
1519 |
1440 |
1520 #define ALL_INJECTED_FIELDS(macro) \ |
1441 #define ALL_INJECTED_FIELDS(macro) \ |
1521 CLASS_INJECTED_FIELDS(macro) \ |
1442 CLASS_INJECTED_FIELDS(macro) \ |
1522 CLASSLOADER_INJECTED_FIELDS(macro) \ |
1443 CLASSLOADER_INJECTED_FIELDS(macro) \ |
1523 MEMBERNAME_INJECTED_FIELDS(macro) \ |
1444 MEMBERNAME_INJECTED_FIELDS(macro) \ |
1524 CALLSITECONTEXT_INJECTED_FIELDS(macro) \ |
1445 CALLSITECONTEXT_INJECTED_FIELDS(macro) |
1525 STACKFRAMEINFO_INJECTED_FIELDS(macro) |
|
1526 |
|
1527 |
1446 |
1528 // Interface to hard-coded offset checking |
1447 // Interface to hard-coded offset checking |
1529 |
1448 |
1530 class JavaClasses : AllStatic { |
1449 class JavaClasses : AllStatic { |
1531 private: |
1450 private: |