enable more failed inline shape printing
- profile inline shapes that fail due to IR compat reasons
Esse commit está contido em:
@@ -1225,7 +1225,7 @@ Translator::translateFCall(const NormalizedInstruction& i) {
|
||||
* the call.
|
||||
*/
|
||||
if (i.calleeTrace) {
|
||||
if (!m_hhbcTrans->isInlining()) {
|
||||
if (!i.calleeTrace->m_inliningFailed && !m_hhbcTrans->isInlining()) {
|
||||
assert(shouldIRInline(curFunc(), i.funcd, *i.calleeTrace));
|
||||
|
||||
m_hhbcTrans->beginInlining(numArgs, i.funcd, returnBcOffset);
|
||||
|
||||
@@ -32,6 +32,7 @@
|
||||
#include "hphp/util/biased_coin.h"
|
||||
|
||||
#include "hphp/runtime/base/runtime_option.h"
|
||||
#include "hphp/runtime/base/stats.h"
|
||||
#include "hphp/runtime/base/types.h"
|
||||
#include "hphp/runtime/ext/ext_continuation.h"
|
||||
#include "hphp/runtime/ext/ext_collections.h"
|
||||
@@ -2707,7 +2708,9 @@ Translator::getOperandConstraintCategory(NormalizedInstruction* instr,
|
||||
// Note: instead of pessimizing calls that may be inlined with
|
||||
// DataTypeSpecific, we could apply the operand constraints of
|
||||
// the callee in constrainDep.
|
||||
return instr->calleeTrace ? DataTypeSpecific : DataTypeGeneric;
|
||||
return (instr->calleeTrace && !instr->calleeTrace->m_inliningFailed)
|
||||
? DataTypeSpecific
|
||||
: DataTypeGeneric;
|
||||
|
||||
case OpFCallArray:
|
||||
return DataTypeGeneric;
|
||||
@@ -3174,6 +3177,12 @@ void Translator::analyzeCallee(TraceletContext& tas,
|
||||
* want to do that unnecessarily.
|
||||
*/
|
||||
if (!shouldIRInline(callerFunc, target, *subTrace)) {
|
||||
if (UNLIKELY(Stats::enabledAny() && getenv("HHVM_STATS_FAILEDINL"))) {
|
||||
subTrace->m_inliningFailed = true;
|
||||
// Save the trace for stats purposes but don't waste time doing any
|
||||
// further processing since we know we won't inline it.
|
||||
fcall->calleeTrace = std::move(subTrace);
|
||||
}
|
||||
return;
|
||||
}
|
||||
|
||||
|
||||
@@ -529,6 +529,13 @@ struct Tracelet : private boost::noncopyable {
|
||||
*/
|
||||
bool m_analysisFailed;
|
||||
|
||||
/*
|
||||
* If IR inlining failed we may still need access to the trace for profiling
|
||||
* purposes if stats are enabled so maintain this to verify that we should use
|
||||
* this Tracelet for inlining purposes.
|
||||
*/
|
||||
bool m_inliningFailed;
|
||||
|
||||
// Track which NormalizedInstructions and DynLocations are owned by this
|
||||
// Tracelet; used for cleanup purposes
|
||||
boost::ptr_vector<NormalizedInstruction> m_instrs;
|
||||
@@ -537,7 +544,8 @@ struct Tracelet : private boost::noncopyable {
|
||||
Tracelet() :
|
||||
m_stackChange(0),
|
||||
m_arState(),
|
||||
m_analysisFailed(false) { }
|
||||
m_analysisFailed(false),
|
||||
m_inliningFailed(false){ }
|
||||
|
||||
void constructLiveRanges();
|
||||
bool isLiveAfterInstr(Location l, const NormalizedInstruction& i) const;
|
||||
|
||||
Referência em uma Nova Issue
Bloquear um usuário