Watch, Follow, &
Connect with Us

Please visit our new home
community.embarcadero.com.

Public Report
Report From: Optimizeit/Profiler    [ Add a report in this area ]  
Report #:  8775   Status: Reported
Allocation locations invalid with custom class loaders
Project:  Optimizeit Build #:  030503
Version:    5.0 Submitted By:   Pawel Veselov
Report Type:  Basic functionality failure Date Reported:  8/10/2004 6:28:49 PM
Severity:    Serious / Highly visible problem Last Updated: 8/10/2004 6:22:45 PM
Platform:    All versions Internal Tracking #:  
Resolution: None  Resolved in Build: : None
Duplicate of:  None
Voting and Rating
Overall Rating: No Ratings Yet
0.00 out of 5
Total Votes: None
Description
If a program uses it's own classloader to define classes (even if system classloader is used), the allocation location for objects is invalid.

Attached please find all required sources/info to reproduce this problem.
Steps to Reproduce:
Attached please find:

ParallelClassLoader.java : source code for the class loader used
Test.java : source code of the test program
test0.jar compiled and jar binary

At large, the test must be started with the following command:

$ java -cp test0.jar Test

For the OptimizeIt, original .ois file is attached.

To see the problem, start the test under OptimizeIt, with "VM cannot exit" and "Pause after launch" options on. Click on "Show memory profiler", "Show heap" and "Mark current instance count". Unpause the program, and wait for a second. About 19,000 String objects are created. Select java.lang.String in the Heap list, and click on "Show allocation backtraces". The bottom line for creates strings is shown at java.lang.reflect package, not at the actual location.
Workarounds
None
Attachment
test0.zip
Comments

None

Server Response from: ETNACODE01