You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Start tracking debug info for inlined statements (#61220)
* Refactor IL_OFFSETX into DebugInfo
Remove IL_OFFSETX in favor of a DebugInfo structure. Previously we were
packing extra information into the upper bits of IL_OFFSETX, which are
now separate bit fields on a new ILLocation structure. DebugInfo
contains an ILLocation and also an inline context, which will be used in
the future when tracking debug info inside of inlinees.
Another problem with IL_OFFSETX was that there were several sentinel
values used to describe prologs, epilogs and no mappings. However these
were only used in code-gen, so refactor codegen to track this separately
instead of having to muddle it into IL_OFFSETX. This makes it clearer
what we can expect from IL offsets during JIT.
This change is no-diff and PIN also shows that TP is not negatively
affected; in fact, there seems to be a small TP gain, maybe because we
don't have to handle sentinel values anymore.
* Track debug information in statements from inlinees
Add support for tracking debug information in statements coming from
inlinees. Changes:
* Turn on compDbgInfo in inlinees. We use the implicit boundaries from
the inline root, but we do not use any explicit boundaries. That is,
we do not query the EE for explicit boundaries for the inlinee.
* Create InlineContexts eagerly and use them during import. All
DebugInfo created in the JIT is in a "consistent" state, meaning that
we never see an IL location set without a corresponding inline
context. This was difficult before as InlineContexts would be created
quite late, after the importer for the inlinee had run. We now create
it eagerly and attach it to debug info during importation. Later, when
we figure out whether an inline succeeded or not, we mark it as
succeeded or failed.
* Stop carrying InlineContext around unconditionally in Statement. The
inline context is now only part of the debug info, which may not be
set. Inlining needs the inline context to create new inline contexts
and to check for recursive inlines. Previously it retrieved it from
the inline statement, but due to the above change we now have to get
it from somewhere else. To do this we now keep it unconditionally
together with InlineCandidateInfo so that we can retrieve it later.
* Validate all created debug information when associated with a
statement. This is done by creating a bitvector containing IL
locations that mark the beginning of IL instructions, and validating
that all IL offsets point to these when Statement::SetDebugInfo is
called.
* While we track debug info in statements from inlinees, the runtime
side is still not hooked up. Currently we track the information until
we get to rationalize, where we normalize all debug info back to the
root inserted as GT_IL_OFFSET nodes. The change is free of any diffs
due to this normalization. We also track IL offsets as part of basic
blocks: these are also normalized to be in the root.
0 commit comments