Skip to content

Commit e10bda6

Browse files
committed
Add transition map debug counters.
1 parent e2ac839 commit e10bda6

File tree

1 file changed

+4
-0
lines changed
  • truffle/src/com.oracle.truffle.object/src/com/oracle/truffle/object

1 file changed

+4
-0
lines changed

truffle/src/com.oracle.truffle.object/src/com/oracle/truffle/object/ShapeImpl.java

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -426,6 +426,7 @@ private static ShapeImpl addToTransitionMap(Transition transition, ShapeImpl suc
426426
}
427427

428428
private static TransitionMap<Transition, ShapeImpl> newTransitionMap() {
429+
transitionMapsCreated.inc();
429430
return TransitionMap.create();
430431
}
431432

@@ -447,6 +448,7 @@ private static boolean isTransitionMap(Object trans) {
447448
}
448449

449450
private static Object newSingleEntry(Transition transition, ShapeImpl successor) {
451+
transitionSingleEntriesCreated.inc();
450452
Object key = transition;
451453
if (transition.hasConstantLocation()) {
452454
key = new WeakKey<>(transition);
@@ -1368,5 +1370,7 @@ Assumption getSingleContextAssumption() {
13681370
static final DebugCounter shapeCacheWeakKeys = DebugCounter.create("Shape cache weak keys");
13691371
static final DebugCounter propertyAssumptionsCreated = DebugCounter.create("Property assumptions created");
13701372
static final DebugCounter propertyAssumptionsRemoved = DebugCounter.create("Property assumptions removed");
1373+
static final DebugCounter transitionSingleEntriesCreated = DebugCounter.create("Transition single-entry maps created");
1374+
static final DebugCounter transitionMapsCreated = DebugCounter.create("Transition multi-entry maps created");
13711375

13721376
}

0 commit comments

Comments
 (0)