< prev index next >
test/hotspot/jtreg/vmTestbase/nsk/jvmti/IterateThroughHeap/filter-tagged/HeapFilter.cpp
Print this page
*** 419,439 ****
// Check that every field was found expected amount of times
void verify_objects(int reachable) {
int object;
int field;
for (object = 0; object < (reachable?TEST_OBJECTS_COUNT:TAGGED_OBJECTS); object++) {
for (field = 0; field < objects_info[object].fields_count; field++) {
// If primitive field of object that was not collected or
// non primitive field that was not collected was not found
// expected amount of times, than test failed.
if ((objects_info[object].fields[field].primitive &&
!objects_info[object].collected)
||
(!objects_info[object].fields[field].primitive &&
!objects_info[object].fields[field].collected)) {
! if (objects_info[object].fields[field].expected !=
! objects_info[object].fields[field].found) {
NSK_COMPLAIN4("Field %s::%s expected to be found %d times, "
"but it was found %d times.\n",
objects_info[object].name,
objects_info[object].fields[field].name,
objects_info[object].fields[field].expected,
--- 419,441 ----
// Check that every field was found expected amount of times
void verify_objects(int reachable) {
int object;
int field;
for (object = 0; object < (reachable?TEST_OBJECTS_COUNT:TAGGED_OBJECTS); object++) {
+ int tagged = object == 0;
for (field = 0; field < objects_info[object].fields_count; field++) {
// If primitive field of object that was not collected or
// non primitive field that was not collected was not found
// expected amount of times, than test failed.
if ((objects_info[object].fields[field].primitive &&
!objects_info[object].collected)
||
(!objects_info[object].fields[field].primitive &&
!objects_info[object].fields[field].collected)) {
! int expected = objects_info[object].fields[field].expected;
! int found = objects_info[object].fields[field].found;
! if (tagged ? expected != found : expected > found) {
NSK_COMPLAIN4("Field %s::%s expected to be found %d times, "
"but it was found %d times.\n",
objects_info[object].name,
objects_info[object].fields[field].name,
objects_info[object].fields[field].expected,
< prev index next >