Skip to content

Commit c9296fa

Browse files
committed
[MERGE #5410 @rajatd] Minor corrections in the usage of BGJIT_STATS
Merge pull request #5410 from rajatd:bgjitstats Fixes #122
2 parents bb8eb71 + 3ab8c10 commit c9296fa

File tree

2 files changed

+4
-7
lines changed

2 files changed

+4
-7
lines changed

lib/Backend/NativeCodeGenerator.cpp

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1802,12 +1802,12 @@ NativeCodeGenerator::PrioritizedButNotYetProcessed(JsUtil::Job *const job)
18021802
ASSERT_THREAD();
18031803
Assert(job);
18041804

1805-
#ifdef BGJIT_STATS
18061805
CodeGenWorkItem *const codeGenWorkItem = static_cast<CodeGenWorkItem *>(job);
18071806
if(codeGenWorkItem->Type() == JsFunctionType && codeGenWorkItem->IsInJitQueue())
18081807
{
1808+
#ifdef BGJIT_STATS
18091809
codeGenWorkItem->GetScriptContext()->interpretedCallsHighPri++;
1810-
1810+
#endif
18111811
if(codeGenWorkItem->GetJitMode() == ExecutionMode::FullJit)
18121812
{
18131813
QueuedFullJitWorkItem *const queuedFullJitWorkItem = codeGenWorkItem->GetQueuedFullJitWorkItem();
@@ -1817,7 +1817,6 @@ NativeCodeGenerator::PrioritizedButNotYetProcessed(JsUtil::Job *const job)
18171817
}
18181818
}
18191819
}
1820-
#endif
18211820
}
18221821

18231822

lib/Runtime/Library/ScriptFunction.cpp

Lines changed: 2 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -48,22 +48,20 @@ using namespace Js;
4848
DebugOnly(VerifyEntryPoint());
4949

5050
#if ENABLE_NATIVE_CODEGEN
51-
#ifdef BGJIT_STATS
5251
if (!proxy->IsDeferred())
5352
{
5453
FunctionBody* body = proxy->GetFunctionBody();
5554
if(!body->GetNativeEntryPointUsed() &&
5655
body->GetDefaultFunctionEntryPointInfo()->IsCodeGenDone())
5756
{
5857
MemoryBarrier();
59-
58+
#ifdef BGJIT_STATS
6059
type->GetScriptContext()->jitCodeUsed += body->GetByteCodeCount();
6160
type->GetScriptContext()->funcJitCodeUsed++;
62-
61+
#endif
6362
body->SetNativeEntryPointUsed(true);
6463
}
6564
}
66-
#endif
6765
#endif
6866
}
6967

0 commit comments

Comments
 (0)