Inline reports can be incorrect when basic blocks are regenerated

Description

The inline reports produced when running with -X:optrint_inline_report=true are generated on-the-fly during the inlining process. This causes misleading output to be generated when blocks that contain inline copies are being regenerated. In that case the inlining is executed multiple times, but there is only one inlined copy.

Example output from (shows Vector.size and PriorityQueue.size being inlined multiple times at the same BCI):

This is confusing at best and might cause problems in tools that parse this output. It is also conceivable that the output becomes totally incorrect for custom inlining oracles (e.g. when the state of the root method is being factored into inlining decisions).

IMHO the correct approach would be to gather information for the report during the initial HIR construction but defer the final report generation until BC2IR is finished. If we need more debug output for the inlining process itself, we could add more internal debug flags.

Environment

All

Status

Assignee

Unassigned

Reporter

Erik Brangs

Labels

None

Fix versions

Affects versions

Priority

Low
Configure