summaryrefslogtreecommitdiff
path: root/src/jit/flowgraph.cpp
diff options
context:
space:
mode:
authorBrian Sullivan <briansul@microsoft.com>2019-05-07 10:35:05 -0700
committerBrian Sullivan <briansul@microsoft.com>2019-05-07 10:36:02 -0700
commit68b4810203d7f6f1b4b7a4823a8d7610cda44190 (patch)
treecb648eea43db9b3f36981a053bdef2de280f552f /src/jit/flowgraph.cpp
parentc2e71fd5e711ca150e238741015a1a0229606793 (diff)
downloadcoreclr-68b4810203d7f6f1b4b7a4823a8d7610cda44190.tar.gz
coreclr-68b4810203d7f6f1b4b7a4823a8d7610cda44190.tar.bz2
coreclr-68b4810203d7f6f1b4b7a4823a8d7610cda44190.zip
Rename struct ICorJitInfo::ProfileBuffer to ICorJitInfo::BlockCounts
Rename method ICorJitInfo::allocBBProfileBuffer to ICorJitInfo::allocMethodBlockCounts Rename method ICorJitInfo::getBBProfileData to ICorJitInfo:"getMethodBlockCounts Rename args and use DWORD instead of ULONG for ICorJitInfo:allocMethodBlockCounts and ICorJitInfo:getMethodBlockCounts Rename Compiler::fgProfileBuffer to Compiler::fgBlockCounts Use an #ifdef FEATURE_CORECLR to fix the missing CORINFO_FLG_DISABLE_TIER0_FOR_LOOPS flag on the desktop. Make fgBlockCountsCount and fgNumProfileRuns DWORDs instead of ULONGs Rename local var bbCurrentBlockProfileBuffer to currentBlockCounts Rename local var bbProfileBufferStart to profileBlockCountsStart Use DWORD when iterating over BlockCounts instead of ULONG Rename ZapImage::hashBBProfileData to ZapImage::hashMethodBlockCounts SuperPMI - Fixed all references to allocBBProfileBuffer => allocMethodBlockCounts SuperPMI - fixed all reference to getBBProfileBuffer => getMethodBlockCounts
Diffstat (limited to 'src/jit/flowgraph.cpp')
-rw-r--r--src/jit/flowgraph.cpp32
1 files changed, 16 insertions, 16 deletions
diff --git a/src/jit/flowgraph.cpp b/src/jit/flowgraph.cpp
index c9348d88af..02a179dc8e 100644
--- a/src/jit/flowgraph.cpp
+++ b/src/jit/flowgraph.cpp
@@ -183,7 +183,7 @@ bool Compiler::fgHaveProfileData()
return false;
}
- return (fgProfileBuffer != nullptr);
+ return (fgBlockCounts != nullptr);
}
bool Compiler::fgGetProfileWeightForBasicBlock(IL_OFFSET offset, unsigned* weightWB)
@@ -232,11 +232,11 @@ bool Compiler::fgGetProfileWeightForBasicBlock(IL_OFFSET offset, unsigned* weigh
}
noway_assert(!compIsForInlining());
- for (unsigned i = 0; i < fgProfileBufferCount; i++)
+ for (DWORD i = 0; i < fgBlockCountsCount; i++)
{
- if (fgProfileBuffer[i].ILOffset == offset)
+ if (fgBlockCounts[i].ILOffset == offset)
{
- weight = fgProfileBuffer[i].ExecutionCount;
+ weight = fgBlockCounts[i].ExecutionCount;
*weightWB = weight;
return true;
@@ -266,9 +266,9 @@ void Compiler::fgInstrumentMethod()
// Allocate the profile buffer
- ICorJitInfo::ProfileBuffer* bbProfileBufferStart;
+ ICorJitInfo::BlockCounts* profileBlockCountsStart;
- HRESULT res = info.compCompHnd->allocBBProfileBuffer(countOfBlocks, &bbProfileBufferStart);
+ HRESULT res = info.compCompHnd->allocMethodBlockCounts(countOfBlocks, &profileBlockCountsStart);
GenTreeStmt* stmt;
@@ -286,7 +286,7 @@ void Compiler::fgInstrumentMethod()
}
else
{
- noway_assert(!"Error: failed to allocate bbProfileBuffer");
+ noway_assert(!"Error: failed to allocate profileBlockCounts");
return;
}
}
@@ -296,10 +296,10 @@ void Compiler::fgInstrumentMethod()
// 1. Assign the blocks bbCodeOffs to the ILOffset field of this blocks profile data.
// 2. Add an operation that increments the ExecutionCount field at the beginning of the block.
- // Each (non-Internal) block has it own ProfileBuffer tuple [ILOffset, ExecutionCount]
+ // Each (non-Internal) block has it own BlockCounts tuple [ILOffset, ExecutionCount]
// To start we initialize our current one with the first one that we allocated
//
- ICorJitInfo::ProfileBuffer* bbCurrentBlockProfileBuffer = bbProfileBufferStart;
+ ICorJitInfo::BlockCounts* currentBlockCounts = profileBlockCountsStart;
for (block = fgFirstBB; (block != nullptr); block = block->bbNext)
{
@@ -309,10 +309,10 @@ void Compiler::fgInstrumentMethod()
}
// Assign the current block's IL offset into the profile data
- bbCurrentBlockProfileBuffer->ILOffset = block->bbCodeOffs;
- assert(bbCurrentBlockProfileBuffer->ExecutionCount == 0); // This value should already be zero-ed out
+ currentBlockCounts->ILOffset = block->bbCodeOffs;
+ assert(currentBlockCounts->ExecutionCount == 0); // This value should already be zero-ed out
- size_t addrOfCurrentExecutionCount = (size_t)&bbCurrentBlockProfileBuffer->ExecutionCount;
+ size_t addrOfCurrentExecutionCount = (size_t)&currentBlockCounts->ExecutionCount;
// Read Basic-Block count value
GenTree* valueNode =
@@ -327,13 +327,13 @@ void Compiler::fgInstrumentMethod()
fgInsertStmtAtBeg(block, asgNode);
- // Advance to the next ProfileBuffer tuple [ILOffset, ExecutionCount]
- bbCurrentBlockProfileBuffer++;
+ // Advance to the next BlockCounts tuple [ILOffset, ExecutionCount]
+ currentBlockCounts++;
// One less block
countOfBlocks--;
}
- // Check that we allocated and initialized the same number of ProfileBuffer tuples
+ // Check that we allocated and initialized the same number of BlockCounts tuples
noway_assert(countOfBlocks == 0);
// Add the method entry callback node
@@ -365,7 +365,7 @@ void Compiler::fgInstrumentMethod()
GenTree* call = gtNewHelperCallNode(CORINFO_HELP_BBT_FCN_ENTER, TYP_VOID, args);
// Get the address of the first blocks ExecutionCount
- size_t addrOfFirstExecutionCount = (size_t)&bbProfileBufferStart->ExecutionCount;
+ size_t addrOfFirstExecutionCount = (size_t)&profileBlockCountsStart->ExecutionCount;
// Read Basic-Block count value
GenTree* valueNode = gtNewIndOfIconHandleNode(TYP_INT, addrOfFirstExecutionCount, GTF_ICON_BBC_PTR, false);