-
Bug
-
Resolution: Unresolved
-
P4
-
21
Immature profiles report "-1" as a call site count and callers have to handle it as a special case.
If `ciCallProfile::count()` is used as is, it breaks call site frequency computation (makes the result negative) and, hence, negatively affects inlining decisions.
The code below demonstrates the issue:
private static final int SIZE = 1_000_000;
@Benchmark
public MyList<Point> erasedIndirect() {
var result = ListMinMap.<Point>createIndirectErased(SIZE);
for (int i = 0; i < SIZE; i++) {
result.set(i, erased.get(i).times(23));
}
return result;
}
static <T> MyList<T> createIndirectErased(int size) {
return ErasedList.create(size);
}
7494 67 b 4 org.bench.ListMinMap::erasedIndirect (48 bytes)
@ 2 org.bench.ListMinMap::createIndirectErased (5 bytes) inline (hot)
@ 1 org.bench.ListMinMap$ErasedList::create (9 bytes) failed to inline: low call site frequency
...
Originally reported by [~mcimadamore]
If `ciCallProfile::count()` is used as is, it breaks call site frequency computation (makes the result negative) and, hence, negatively affects inlining decisions.
The code below demonstrates the issue:
private static final int SIZE = 1_000_000;
@Benchmark
public MyList<Point> erasedIndirect() {
var result = ListMinMap.<Point>createIndirectErased(SIZE);
for (int i = 0; i < SIZE; i++) {
result.set(i, erased.get(i).times(23));
}
return result;
}
static <T> MyList<T> createIndirectErased(int size) {
return ErasedList.create(size);
}
7494 67 b 4 org.bench.ListMinMap::erasedIndirect (48 bytes)
@ 2 org.bench.ListMinMap::createIndirectErased (5 bytes) inline (hot)
@ 1 org.bench.ListMinMap$ErasedList::create (9 bytes) failed to inline: low call site frequency
...
Originally reported by [~mcimadamore]
- relates to
-
JDK-8273712 C2: Add mechanism for rejecting inlining of low frequency call sites and deprecate MinInliningThreshold.
-
- Resolved
-