equal
deleted
inserted
replaced
1 /* |
1 /* |
2 * Copyright (c) 1999, 2013, Oracle and/or its affiliates. All rights reserved. |
2 * Copyright (c) 1999, 2014, 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. |
74 |
74 |
75 void FilteredFieldsMap::initialize() { |
75 void FilteredFieldsMap::initialize() { |
76 int offset; |
76 int offset; |
77 offset = java_lang_Throwable::get_backtrace_offset(); |
77 offset = java_lang_Throwable::get_backtrace_offset(); |
78 _filtered_fields->append(new FilteredField(SystemDictionary::Throwable_klass(), offset)); |
78 _filtered_fields->append(new FilteredField(SystemDictionary::Throwable_klass(), offset)); |
79 // The latest version of vm may be used with old jdk. |
79 offset = sun_reflect_ConstantPool::oop_offset(); |
80 if (JDK_Version::is_gte_jdk16x_version()) { |
80 _filtered_fields->append(new FilteredField(SystemDictionary::reflect_ConstantPool_klass(), offset)); |
81 // The following class fields do not exist in |
81 offset = sun_reflect_UnsafeStaticFieldAccessorImpl::base_offset(); |
82 // previous version of jdk. |
82 _filtered_fields->append(new FilteredField(SystemDictionary::reflect_UnsafeStaticFieldAccessorImpl_klass(), offset)); |
83 offset = sun_reflect_ConstantPool::oop_offset(); |
|
84 _filtered_fields->append(new FilteredField(SystemDictionary::reflect_ConstantPool_klass(), offset)); |
|
85 offset = sun_reflect_UnsafeStaticFieldAccessorImpl::base_offset(); |
|
86 _filtered_fields->append(new FilteredField(SystemDictionary::reflect_UnsafeStaticFieldAccessorImpl_klass(), offset)); |
|
87 } |
|
88 } |
83 } |
89 |
84 |
90 int FilteredFieldStream::field_count() { |
85 int FilteredFieldStream::field_count() { |
91 int numflds = 0; |
86 int numflds = 0; |
92 for (;!eos(); next()) { |
87 for (;!eos(); next()) { |