JDK-6324827 : HPROF: The field index values don't match up with the field list created by hprof
  • Type: Bug
  • Component: tools
  • Sub-Component: hprof
  • Affected Version: 6
  • Priority: P3
  • Status: Resolved
  • Resolution: Fixed
  • OS: generic
  • CPU: generic
  • Submitted: 2005-09-15
  • Updated: 2010-04-02
  • Resolved: 2005-12-22
The Version table provides details related to the release that this issue/RFE will be addressed.

Unresolved : Release in which this issue/RFE will be addressed.
Resolved: Release in which this issue/RFE has been resolved.
Fixed : Release in which this issue/RFE has been fixed. The release containing this fix may be available for download as an Early Access Release or a General Availability Release.

To download the current JDK release, click here.
Other
5.0u7 b01Fixed
Related Reports
Relates :  
Description
The "all" field list created for a class has got the order wrong in Tiger inside HPROF.
The interfaces implemented should be processed before the super class.
See suggested fix.

Comments
EVALUATION Need to add interfaces before super classes.
20-09-2005

SUGGESTED FIX ######### File: ./hprof_util.c ######### (cd . && sccs diffs -C -w -s -b hprof_util.c) ------- hprof_util.c ------- *** /tmp/sccs.NHaaGO Thu Sep 15 16:15:58 2005 --- hprof_util.c Thu Sep 15 16:11:52 2005 *************** *** 1087,1092 **** --- 1087,1100 ---- } } + /* Class or Interface, do implemented interfaces recursively */ + getImplementedInterfaces(klass, &n_interfaces, &interfaces); + for ( i = 0 ; i < n_interfaces ; i++ ) { + add_class_fields(env, get_cnum(env, interfaces[i]), interfaces[i], + field_list, class_list); + } + jvmtiDeallocate(interfaces); + /* Begin graph traversal, go up super chain recursively */ if ( !isInterface(klass) ) { jclass super_klass; *************** *** 1098,1110 **** } } - /* Class or Interface, do implemented interfaces recursively */ - getImplementedInterfaces(klass, &n_interfaces, &interfaces); - for ( i = 0 ; i < n_interfaces ; i++ ) { - add_class_fields(env, get_cnum(env, interfaces[i]), interfaces[i], - field_list, class_list); - } - jvmtiDeallocate(interfaces); /* Only now we add klass to list so we don't repeat it later */ stack_push(class_list, &klass); --- 1106,1111 ----
15-09-2005