Mercurial > hg > truffle
comparison src/share/vm/prims/jvmtiTagMap.cpp @ 4929:2b150750d53d
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
author | sspitsyn |
---|---|
date | Tue, 14 Feb 2012 17:04:40 -0800 |
parents | 88dce6a60ac8 |
children | 588f559105c1 |
comparison
equal
deleted
inserted
replaced
4924:a9ac4910e7f2 | 4929:2b150750d53d |
---|---|
1 /* | 1 /* |
2 * Copyright (c) 2003, 2011, Oracle and/or its affiliates. All rights reserved. | 2 * Copyright (c) 2003, 2012, Oracle and/or its affiliates. All rights reserved. |
3 * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. | 3 * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. |
4 * | 4 * |
5 * This code is free software; you can redistribute it and/or modify it | 5 * This code is free software; you can redistribute it and/or modify it |
6 * under the terms of the GNU General Public License version 2 only, as | 6 * under the terms of the GNU General Public License version 2 only, as |
7 * published by the Free Software Foundation. | 7 * published by the Free Software Foundation. |
2997 for (int i=0; i<field_map->field_count(); i++) { | 2997 for (int i=0; i<field_map->field_count(); i++) { |
2998 ClassFieldDescriptor* field = field_map->field_at(i); | 2998 ClassFieldDescriptor* field = field_map->field_at(i); |
2999 char type = field->field_type(); | 2999 char type = field->field_type(); |
3000 if (!is_primitive_field_type(type)) { | 3000 if (!is_primitive_field_type(type)) { |
3001 oop fld_o = o->obj_field(field->field_offset()); | 3001 oop fld_o = o->obj_field(field->field_offset()); |
3002 if (fld_o != NULL) { | 3002 // ignore any objects that aren't visible to profiler |
3003 if (fld_o != NULL && ServiceUtil::visible_oop(fld_o)) { | |
3003 // reflection code may have a reference to a klassOop. | 3004 // reflection code may have a reference to a klassOop. |
3004 // - see sun.reflect.UnsafeStaticFieldAccessorImpl and sun.misc.Unsafe | 3005 // - see sun.reflect.UnsafeStaticFieldAccessorImpl and sun.misc.Unsafe |
3005 if (fld_o->is_klass()) { | 3006 if (fld_o->is_klass()) { |
3006 klassOop k = (klassOop)fld_o; | 3007 klassOop k = (klassOop)fld_o; |
3007 fld_o = Klass::cast(k)->java_mirror(); | 3008 fld_o = Klass::cast(k)->java_mirror(); |