Fix inline markers for all instructions
commitbe34711dae443d3f5f4f48d9742e4166420df7f8
authorShaunak Kishore <kshaunak@fb.com>
Thu, 13 May 2021 18:57:09 +0000 (13 11:57 -0700)
committerFacebook GitHub Bot <facebook-github-bot@users.noreply.github.com>
Thu, 13 May 2021 18:58:19 +0000 (13 11:58 -0700)
treea12f084cdfb51ffb0b1fc8ae0087999126ccd0a6
parent033015adfee5a1047d48c3990b8d8c149698c5c1
Fix inline markers for all instructions

Summary:
There are certain IR ops for which we may make native calls with a fixup without raising. This usage comes up a lot for classy PGO, because we use fixups to attribute sink operations to a Hack bytecode that caused them. However, our current logic for computing fixups only works for IR ops that may raise. That's why our attribution for Release has been broken. Now that we have non-raising setters, like StructDictSet, the incorrect fixups are causing us to core, too.

Fix the issue by executing adjust_inline_marker for all IR ops in the inlined region. Doing so reveals a logic error: adjust_inline_marker breaks if the input instruction is in a parent frame of the last published frame. To handle this case, we compute a list of all currently-materialized frames and check if the instruction is part of any of them; if so, we can skip the fixup for it.

Reviewed By: paulbiss

Differential Revision: D28388632

fbshipit-source-id: 04f60541139ff64fd03745f312505ffa41c786be
hphp/runtime/base/bespoke/logging-profile.cpp
hphp/runtime/vm/jit/fixup.cpp
hphp/runtime/vm/jit/memory-effects.cpp
hphp/runtime/vm/jit/store-elim.cpp