MCPcopy Create free account
hub / github.com/beefytech/Beef / PopulateHotCallstacks

Method PopulateHotCallstacks

IDEHelper/HotScanner.cpp:115–144  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

113}
114
115void DbgHotScanner::PopulateHotCallstacks()
116{
117 auto prevActiveThread = mDebugger->mActiveThread;
118 for (auto threadInfo : mDebugger->mThreadList)
119 {
120 mDebugger->mActiveThread = threadInfo;
121 mDebugger->ClearCallStack();
122 mDebugger->UpdateCallStack(false);
123
124 for (int stackFrameIdx = 0; stackFrameIdx < (int)mDebugger->mCallStack.size(); stackFrameIdx++)
125 mDebugger->UpdateCallStackMethod(stackFrameIdx);
126
127 for (int stackFrameIdx = 0; stackFrameIdx < (int)mDebugger->mCallStack.size(); stackFrameIdx++)
128 {
129 auto stackFrame = mDebugger->mCallStack[stackFrameIdx];
130 if ((stackFrame->mSubProgram != NULL) && (stackFrame->mSubProgram->GetLanguage() == DbgLanguage_Beef))
131 {
132 auto subProgram = stackFrame->mSubProgram;
133
134 if (subProgram->mHotReplaceKind == DbgSubprogram::HotReplaceKind_Replaced)
135 subProgram = mDebugger->TryFollowHotJump(subProgram, stackFrame->mRegisters.GetPC());
136
137 AddSubProgram(subProgram, false, "");
138 }
139 }
140 }
141
142 mDebugger->mActiveThread = prevActiveThread;
143 mDebugger->ClearCallStack();
144}
145
146void DbgHotScanner::ScanSpan(TCFake::Span* span, int expectedStartPage, int memKind)
147{

Callers

nothing calls this directly

Calls 7

TryFollowHotJumpMethod · 0.80
ClearCallStackMethod · 0.45
UpdateCallStackMethod · 0.45
sizeMethod · 0.45
UpdateCallStackMethodMethod · 0.45
GetLanguageMethod · 0.45
GetPCMethod · 0.45

Tested by

no test coverage detected