Bug 348979 - world type map fixed/expendable problems
Summary: world type map fixed/expendable problems
Status: RESOLVED FIXED
Alias: None
Product: AspectJ
Classification: Tools
Component: Compiler (show other bugs)
Version: DEVELOPMENT   Edit
Hardware: PC Mac OS X - Carbon (unsup.)
: P3 major (vote)
Target Milestone: 1.6.12   Edit
Assignee: aspectj inbox CLA
QA Contact:
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2011-06-09 18:59 EDT by Andrew Clement CLA
Modified: 2011-06-13 14:23 EDT (History)
0 users

See Also:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Andrew Clement CLA 2011-06-09 18:59:37 EDT
Discovered whilst working with Steve Ash on a build of a few projects that was consuming more than 2Gigs of heap.

To recover memory Steve activated type demotion.  This didn't appear to help much.  This was due to Steve's projects using aspectpath.  The aspectpath scanning to discover aspects was inadvertently making any types discovered on the aspectpath permanent types (not expendable) and they'd never be demoted/evicted.

The types were all being made permanent in case they were an aspect but never being demoted if it turns out they were not.  In a Roo petclinic I added spel as a dependency (on the aspectpath) and parsed a simple expression (just to further exaggerate the problem).  This was leaving 213 types in the fixed area of the typemap.  By correctly scanning aspectpath and demoting non-aspects this was reduced to 90.
Comment 1 Andrew Clement CLA 2011-06-09 19:28:21 EDT
fix is to demote them immediately if they are not an aspect.

Also observed is that array types of anything are considered permanent - whether it is String[] or ThisIsGoingToBeWoven[] they are all inserted in the fixed map, we should stop that.  However, we may still want to keep primitive arrays int[]/etc in the map.
Comment 2 Andrew Clement CLA 2011-06-13 14:23:35 EDT
ok - final changes are in.  primitive arrays are anchored (in addition to primitives), like [[I for example.