--- old/com/oracle/jfr/gc/GCEventAll.java 2013-05-02 15:03:54.000000000 +0200 +++ new/com/oracle/jfr/gc/GCEventAll.java 2013-05-02 15:03:54.000000000 +0200 @@ -60,7 +60,7 @@ * */ public class GCEventAll { - private static Set gcIds = new HashSet(); + private static Set gcIds = new HashSet(); private static int systemGcCount = 0; private boolean isIncompleteBatchRemoved = false; @@ -222,7 +222,7 @@ List returnEvents = new ArrayList(); returnEvents.addAll(events); - long lastGcId = getLastGcId(events); + int lastGcId = getLastGcId(events); List lastBatchEvents = getEventsWithGcId(events, lastGcId); String[] endEvents = {GCHelper.event_garbage_collection, GCHelper.event_old_garbage_collection, GCHelper.event_young_garbage_collection}; boolean isComplete = containsAnyPath(lastBatchEvents, endEvents); @@ -265,7 +265,7 @@ * @param gcId The specified gcId. * @return A list of the events with the specified gcId. */ - private List getEventsWithGcId(List events, long gcId) { + private List getEventsWithGcId(List events, int gcId) { List batchEvents = new ArrayList(); for (FLREvent event : events) { if (GCHelper.isGcEvent(event) && GCHelper.getGcId(event) == gcId) { @@ -296,11 +296,11 @@ * @param events All events. * @return the highest gcId found in the list or -1 if no event had a gcId. */ - private long getLastGcId(List events) { - long lastGcId = -1; + private int getLastGcId(List events) { + int lastGcId = -1; for (FLREvent event : events) { if (GCHelper.isGcEvent(event)) { - long gcId = GCHelper.getGcId(event); + int gcId = GCHelper.getGcId(event); if (gcId > lastGcId) { lastGcId = gcId; } @@ -400,9 +400,9 @@ /** * Verify that all gcId are unique. */ - private void verifyUniqueIds(List batches, Set gcIds) { + private void verifyUniqueIds(List batches, Set gcIds) { for (GCHelper.GcBatch batch : batches) { - Long gcId = new Long(batch.getGcId()); + Integer gcId = new Integer(batch.getGcId()); Asserts.assertFalse(gcIds.contains(gcId), "Duplicate gcId: " + gcId); gcIds.add(gcId); }