use of com.ibm.j9ddr.vm29.j9.gc.GCStringTableIterator in project openj9 by eclipse.
the class DumpStringTableCommand method getStringTableObjects.
private Set<J9ObjectPointer> getStringTableObjects() throws CorruptDataException {
/* Use sorted set to display string table ordered by address */
SortedSet<J9ObjectPointer> sortedSet = new TreeSet<J9ObjectPointer>(new Comparator<J9ObjectPointer>() {
public int compare(J9ObjectPointer o1, J9ObjectPointer o2) {
if (o1.getAddress() < o2.getAddress()) {
return -1;
} else if (o1.getAddress() > o2.getAddress()) {
return 1;
} else {
return 0;
}
}
});
GCStringTableIterator it = GCStringTableIterator.from();
while (it.hasNext()) {
J9ObjectPointer next = it.next();
sortedSet.add(next);
}
return sortedSet;
}
use of com.ibm.j9ddr.vm29.j9.gc.GCStringTableIterator in project openj9 by eclipse.
the class RootScanner method scanStringTable.
protected void scanStringTable() throws CorruptDataException {
if (_extensions.collectStringConstants()) {
setReachability(Reachability.WEAK);
} else {
setReachability(Reachability.STRONG);
}
GCStringTableIterator stringTableIterator = GCStringTableIterator.from();
GCStringTableIterator stringTableAddressIterator = GCStringTableIterator.from();
while (stringTableIterator.hasNext()) {
doStringTableSlot(stringTableIterator.next(), stringTableAddressIterator.nextAddress());
}
GCStringCacheTableIterator cacheIterator = GCStringCacheTableIterator.from();
GCStringCacheTableIterator cacheAddressIterator = GCStringCacheTableIterator.from();
while (cacheIterator.hasNext()) {
doStringCacheTableSlot(cacheIterator.next(), cacheAddressIterator.nextAddress());
}
}
Aggregations