Mercurial > hg > truffle
comparison agent/src/share/classes/sun/jvm/hotspot/memory/CompactibleFreeListSpace.java @ 6725:da91efe96a93
6964458: Reimplement class meta-data storage to use native memory
Summary: Remove PermGen, allocate meta-data in metaspace linked to class loaders, rewrite GC walking, rewrite and rename metadata to be C++ classes
Reviewed-by: jmasa, stefank, never, coleenp, kvn, brutisso, mgerdin, dholmes, jrose, twisti, roland
Contributed-by: jmasa <jon.masamitsu@oracle.com>, stefank <stefan.karlsson@oracle.com>, mgerdin <mikael.gerdin@oracle.com>, never <tom.rodriguez@oracle.com>
author | coleenp |
---|---|
date | Sat, 01 Sep 2012 13:25:18 -0400 |
parents | 0a8e0d4345b3 |
children | 6cf2530f7fd3 |
comparison
equal
deleted
inserted
replaced
6724:36d1d483d5d6 | 6725:da91efe96a93 |
---|---|
1 /* | 1 /* |
2 * Copyright (c) 2003, 2010, 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. |
166 Address regionStart = cur; | 166 Address regionStart = cur; |
167 Address limit = end(); | 167 Address limit = end(); |
168 final long addressSize = vm.getAddressSize(); | 168 final long addressSize = vm.getAddressSize(); |
169 | 169 |
170 for (; cur.lessThan(limit);) { | 170 for (; cur.lessThan(limit);) { |
171 Address klassOop = cur.getAddressAt(addressSize); | 171 Address k = cur.getAddressAt(addressSize); |
172 if (FreeChunk.indicatesFreeChunk(cur)) { | 172 if (FreeChunk.indicatesFreeChunk(cur)) { |
173 if (! cur.equals(regionStart)) { | 173 if (! cur.equals(regionStart)) { |
174 res.add(new MemRegion(regionStart, cur)); | 174 res.add(new MemRegion(regionStart, cur)); |
175 } | 175 } |
176 FreeChunk fc = (FreeChunk) VMObjectFactory.newObject(FreeChunk.class, cur); | 176 FreeChunk fc = (FreeChunk) VMObjectFactory.newObject(FreeChunk.class, cur); |
179 Assert.that(chunkSize > 0, "invalid FreeChunk size"); | 179 Assert.that(chunkSize > 0, "invalid FreeChunk size"); |
180 } | 180 } |
181 // note that fc.size() gives chunk size in heap words | 181 // note that fc.size() gives chunk size in heap words |
182 cur = cur.addOffsetTo(chunkSize * addressSize); | 182 cur = cur.addOffsetTo(chunkSize * addressSize); |
183 regionStart = cur; | 183 regionStart = cur; |
184 } else if (klassOop != null) { | 184 } else if (k != null) { |
185 Oop obj = heap.newOop(cur.addOffsetToAsOopHandle(0)); | 185 Oop obj = heap.newOop(cur.addOffsetToAsOopHandle(0)); |
186 long objectSize = obj.getObjectSize(); | 186 long objectSize = obj.getObjectSize(); |
187 cur = cur.addOffsetTo(adjustObjectSizeInBytes(objectSize)); | 187 cur = cur.addOffsetTo(adjustObjectSizeInBytes(objectSize)); |
188 } else { | 188 } else { |
189 // FIXME: need to do a better job here. | 189 // FIXME: need to do a better job here. |