• Home
  • Raw
  • Download

Lines Matching +full:reset +full:- +full:trace

4  * Use of this source code is governed by a BSD-style license that can be
17 void SkVMDebugTracePlayer::reset(sk_sp<SkVMDebugTrace> debugTrace) { in reset() function in SkSL::SkVMDebugTracePlayer
18 size_t nslots = debugTrace ? debugTrace->fSlotInfo.size() : 0; in reset()
27 fStack.push_back({/*fFunction=*/-1, in reset()
28 /*fLine=*/-1, in reset()
35 if (fDebugTrace->fSlotInfo[slotIdx].fnReturnValue >= 0) { in reset()
36 fReturnValues->set(slotIdx); in reset()
40 for (const SkVMTraceInfo& trace : fDebugTrace->fTraceInfo) { in reset() local
41 if (trace.op == SkVMTraceInfo::Op::kLine) { in reset()
42 fLineNumbers[trace.data[0]] += 1; in reset()
49 this->tidyState(); in step()
50 while (!this->traceHasCompleted()) { in step()
51 if (this->execute(fCursor++)) { in step()
58 this->tidyState(); in stepOver()
60 while (!this->traceHasCompleted()) { in stepOver()
62 if (this->execute(fCursor++)) { in stepOver()
63 if (canEscapeFromThisStackDepth || this->atBreakpoint()) { in stepOver()
71 this->tidyState(); in stepOut()
73 while (!this->traceHasCompleted()) { in stepOut()
74 if (this->execute(fCursor++)) { in stepOut()
76 if (hasEscapedFromInitialStackDepth || this->atBreakpoint()) { in stepOut()
84 this->tidyState(); in run()
85 while (!this->traceHasCompleted()) { in run()
86 if (this->execute(fCursor++)) { in run()
87 if (this->atBreakpoint()) { in run()
95 fDirtyMask->reset(); in tidyState()
99 fReturnValues->forEachSetIndex([&](int slot) { in tidyState()
100 fStack.back().fDisplayMask.reset(slot); in tidyState()
105 return !fDebugTrace || fCursor >= fDebugTrace->fTraceInfo.size(); in traceHasCompleted()
123 return fBreakpointLines.count(this->getCurrentLine()); in atBreakpoint()
141 funcs.reserve(fStack.size() - 1); in getCallStack()
150 return fStack.size() - 1; in getStackDepth()
159 double typedValue = fDebugTrace->interpretValueBits(slot, fSlots[slot].fValue); in getVariablesForDisplayMask()
160 vars.push_back({slot, fDirtyMask->test(slot), typedValue}); in getVariablesForDisplayMask()
162 // Order the variable list so that the most recently-written variables are shown at the top. in getVariablesForDisplayMask()
175 SkDEBUGFAILF("stack frame %d doesn't exist", stackFrameIndex - 1); in getLocalVariables()
178 return this->getVariablesForDisplayMask(fStack[stackFrameIndex].fDisplayMask); in getLocalVariables()
185 return this->getVariablesForDisplayMask(fStack.front().fDisplayMask); in getGlobalVariables()
192 const SkSL::SlotDebugInfo& changedSlot = fDebugTrace->fSlotInfo[slotIdx]; in updateVariableWriteTime()
193 slotIdx -= changedSlot.groupIndex; in updateVariableWriteTime()
195 SkASSERT(slotIdx < (int)fDebugTrace->fSlotInfo.size()); in updateVariableWriteTime()
201 if (slotIdx >= (int)fDebugTrace->fSlotInfo.size()) { in updateVariableWriteTime()
204 // Each separate variable-group starts with a groupIndex of 0; stop when we detect this. in updateVariableWriteTime()
205 if (fDebugTrace->fSlotInfo[slotIdx].groupIndex == 0) { in updateVariableWriteTime()
212 if (position >= fDebugTrace->fTraceInfo.size()) { in execute()
217 const SkVMTraceInfo& trace = fDebugTrace->fTraceInfo[position]; in execute() local
218 switch (trace.op) { in execute()
221 int lineNumber = trace.data[0]; in execute()
223 SkASSERT((size_t)lineNumber < fDebugTrace->fSource.size()); in execute()
226 fLineNumbers[lineNumber] -= 1; in execute()
230 int slotIdx = trace.data[0]; in execute()
231 int value = trace.data[1]; in execute()
233 SkASSERT((size_t)slotIdx < fDebugTrace->fSlotInfo.size()); in execute()
236 this->updateVariableWriteTime(slotIdx, position); in execute()
237 if (fDebugTrace->fSlotInfo[slotIdx].fnReturnValue < 0) { in execute()
247 fDirtyMask->set(slotIdx); in execute()
251 int fnIdx = trace.data[0]; in execute()
253 SkASSERT((size_t)fnIdx < fDebugTrace->fFuncInfo.size()); in execute()
255 /*fLine=*/-1, in execute()
256 /*fDisplayMask=*/SkBitSet(fDebugTrace->fSlotInfo.size())}); in execute()
261 SkASSERT(fStack.back().fFunction == trace.data[0]); in execute()
267 fScope += trace.data[0]; in execute()
268 if (trace.data[0] < 0) { in execute()
273 fStack.back().fDisplayMask.reset(slotIdx); in execute()