# HG changeset patch # User sspitsyn # Date 1329267880 28800 # Node ID 7c8ab49996da80c5d43f368263785d6742edc48c # Parent 319ab6f186deaea1c82c6dfd7a806103cc3e4b48 7130993: nsk/jdi/ReferenceType/instances/instances004 fails with JFR: assert(ServiceUtil::visible_oop(obj)) Summary: Skip reporting invisible refs in iterate_over_object to avoid assert(ServiceUtil::visible_oop(obj)) Reviewed-by: dcubed, mgronlun, rbackman Contributed-by: serguei.spitsyn@oracle.com diff -r 319ab6f186de -r 7c8ab49996da hotspot/src/share/vm/prims/jvmtiTagMap.cpp --- a/hotspot/src/share/vm/prims/jvmtiTagMap.cpp Tue Feb 14 15:52:17 2012 -0500 +++ b/hotspot/src/share/vm/prims/jvmtiTagMap.cpp Tue Feb 14 17:04:40 2012 -0800 @@ -1,5 +1,5 @@ /* - * Copyright (c) 2003, 2011, Oracle and/or its affiliates. All rights reserved. + * Copyright (c) 2003, 2012, Oracle and/or its affiliates. All rights reserved. * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. * * This code is free software; you can redistribute it and/or modify it @@ -2999,7 +2999,8 @@ char type = field->field_type(); if (!is_primitive_field_type(type)) { oop fld_o = o->obj_field(field->field_offset()); - if (fld_o != NULL) { + // ignore any objects that aren't visible to profiler + if (fld_o != NULL && ServiceUtil::visible_oop(fld_o)) { // reflection code may have a reference to a klassOop. // - see sun.reflect.UnsafeStaticFieldAccessorImpl and sun.misc.Unsafe if (fld_o->is_klass()) {