• Home
  • Raw
  • Download

Lines Matching refs:shadowSpace

39     self->shadowSpace = (ShadowSpace*) calloc(1, sizeof(ShadowSpace));  in dvmSelfVerificationShadowSpaceAlloc()
40 if (self->shadowSpace == NULL) in dvmSelfVerificationShadowSpaceAlloc()
43 self->shadowSpace->registerSpaceSize = REG_SPACE; in dvmSelfVerificationShadowSpaceAlloc()
44 self->shadowSpace->registerSpace = in dvmSelfVerificationShadowSpaceAlloc()
45 (int*) calloc(self->shadowSpace->registerSpaceSize, sizeof(int)); in dvmSelfVerificationShadowSpaceAlloc()
47 return self->shadowSpace->registerSpace; in dvmSelfVerificationShadowSpaceAlloc()
53 free(self->shadowSpace->registerSpace); in dvmSelfVerificationShadowSpaceFree()
54 free(self->shadowSpace); in dvmSelfVerificationShadowSpaceFree()
72 ShadowSpace *shadowSpace = self->shadowSpace; in dvmSelfVerificationSaveState() local
80 if (shadowSpace->selfVerificationState != kSVSIdle) { in dvmSelfVerificationSaveState()
82 self->threadId, shadowSpace->selfVerificationState); in dvmSelfVerificationSaveState()
86 shadowSpace->selfVerificationState = kSVSStart; in dvmSelfVerificationSaveState()
89 if (preBytes + postBytes > shadowSpace->registerSpaceSize * sizeof(u4)) { in dvmSelfVerificationSaveState()
90 free(shadowSpace->registerSpace); in dvmSelfVerificationSaveState()
91 shadowSpace->registerSpaceSize = (preBytes + postBytes) / sizeof(u4); in dvmSelfVerificationSaveState()
92 shadowSpace->registerSpace = in dvmSelfVerificationSaveState()
93 (int*) calloc(shadowSpace->registerSpaceSize, sizeof(u4)); in dvmSelfVerificationSaveState()
97 shadowSpace->startPC = pc; in dvmSelfVerificationSaveState()
98 shadowSpace->fp = fp; in dvmSelfVerificationSaveState()
99 shadowSpace->retval = self->interpSave.retval; in dvmSelfVerificationSaveState()
100 shadowSpace->interpStackEnd = self->interpStackEnd; in dvmSelfVerificationSaveState()
106 shadowSpace->method = self->interpSave.method; in dvmSelfVerificationSaveState()
107 shadowSpace->methodClassDex = self->interpSave.methodClassDex; in dvmSelfVerificationSaveState()
109 shadowSpace->shadowFP = shadowSpace->registerSpace + in dvmSelfVerificationSaveState()
110 shadowSpace->registerSpaceSize - postBytes/4; in dvmSelfVerificationSaveState()
112 self->interpSave.curFrame = (u4*)shadowSpace->shadowFP; in dvmSelfVerificationSaveState()
113 self->interpStackEnd = (u1*)shadowSpace->registerSpace; in dvmSelfVerificationSaveState()
116 memcpy(((char*)shadowSpace->shadowFP)-preBytes, ((char*)fp)-preBytes, in dvmSelfVerificationSaveState()
120 shadowSpace->heapSpaceTail = shadowSpace->heapSpace; in dvmSelfVerificationSaveState()
123 shadowSpace->traceLength = 0; in dvmSelfVerificationSaveState()
125 return shadowSpace; in dvmSelfVerificationSaveState()
136 ShadowSpace *shadowSpace = self->shadowSpace; in dvmSelfVerificationRestoreState() local
137 shadowSpace->endPC = pc; in dvmSelfVerificationRestoreState()
138 shadowSpace->endShadowFP = fp; in dvmSelfVerificationRestoreState()
139 shadowSpace->jitExitState = exitState; in dvmSelfVerificationRestoreState()
145 if (shadowSpace->selfVerificationState != kSVSStart) { in dvmSelfVerificationRestoreState()
147 self->threadId, shadowSpace->selfVerificationState); in dvmSelfVerificationRestoreState()
149 ALOGD("Dalvik PC: %#x endPC: %#x", (int)shadowSpace->startPC, in dvmSelfVerificationRestoreState()
150 (int)shadowSpace->endPC); in dvmSelfVerificationRestoreState()
151 ALOGD("Interp FP: %#x", (int)shadowSpace->fp); in dvmSelfVerificationRestoreState()
152 ALOGD("Shadow FP: %#x endFP: %#x", (int)shadowSpace->shadowFP, in dvmSelfVerificationRestoreState()
153 (int)shadowSpace->endShadowFP); in dvmSelfVerificationRestoreState()
157 if (exitState == kSVSPunt && pc == shadowSpace->startPC) { in dvmSelfVerificationRestoreState()
158 shadowSpace->selfVerificationState = kSVSIdle; in dvmSelfVerificationRestoreState()
160 shadowSpace->selfVerificationState = exitState; in dvmSelfVerificationRestoreState()
164 self->interpSave.pc = shadowSpace->startPC; in dvmSelfVerificationRestoreState()
165 self->interpSave.curFrame = shadowSpace->fp; in dvmSelfVerificationRestoreState()
166 self->interpSave.method = shadowSpace->method; in dvmSelfVerificationRestoreState()
167 self->interpSave.methodClassDex = shadowSpace->methodClassDex; in dvmSelfVerificationRestoreState()
168 self->interpSave.retval = shadowSpace->retval; in dvmSelfVerificationRestoreState()
169 self->interpStackEnd = shadowSpace->interpStackEnd; in dvmSelfVerificationRestoreState()
171 return shadowSpace; in dvmSelfVerificationRestoreState()
187 ShadowSpace* shadowSpace = self->shadowSpace; in selfVerificationDumpState() local
189 int frameBytes = (int) shadowSpace->registerSpace + in selfVerificationDumpState()
190 shadowSpace->registerSpaceSize*4 - in selfVerificationDumpState()
191 (int) shadowSpace->shadowFP; in selfVerificationDumpState()
194 if ((uintptr_t)self->interpSave.curFrame < (uintptr_t)shadowSpace->fp) { in selfVerificationDumpState()
197 frameBytes2 = (int) shadowSpace->fp - in selfVerificationDumpState()
203 ALOGD("Class: %s", shadowSpace->method->clazz->descriptor); in selfVerificationDumpState()
204 ALOGD("Method: %s", shadowSpace->method->name); in selfVerificationDumpState()
205 ALOGD("Dalvik PC: %#x endPC: %#x", (int)shadowSpace->startPC, in selfVerificationDumpState()
206 (int)shadowSpace->endPC); in selfVerificationDumpState()
207 ALOGD("Interp FP: %#x endFP: %#x", (int)shadowSpace->fp, in selfVerificationDumpState()
209 ALOGD("Shadow FP: %#x endFP: %#x", (int)shadowSpace->shadowFP, in selfVerificationDumpState()
210 (int)shadowSpace->endShadowFP); in selfVerificationDumpState()
213 ALOGD("Trace length: %d State: %d", shadowSpace->traceLength, in selfVerificationDumpState()
214 shadowSpace->selfVerificationState); in selfVerificationDumpState()
220 ShadowSpace* shadowSpace = self->shadowSpace; in selfVerificationDumpTrace() local
226 for (i = 0; i < shadowSpace->traceLength; i++) { in selfVerificationDumpTrace()
227 addr = shadowSpace->trace[i].addr; in selfVerificationDumpTrace()
229 decInsn = &(shadowSpace->trace[i].decInsn); in selfVerificationDumpTrace()
237 static void selfVerificationSpinLoop(ShadowSpace *shadowSpace) in selfVerificationSpinLoop() argument
239 const u2 *startPC = shadowSpace->startPC; in selfVerificationSpinLoop()
266 ShadowSpace *shadowSpace = self->shadowSpace; in dvmCheckSelfVerification() local
267 SelfVerificationState state = shadowSpace->selfVerificationState; in dvmCheckSelfVerification()
288 shadowSpace->selfVerificationState = kSVSDebugInterp; in dvmCheckSelfVerification()
295 if (pc == shadowSpace->endPC && in dvmCheckSelfVerification()
297 (state == kSVSBackwardBranch && shadowSpace->traceLength != 0))) { in dvmCheckSelfVerification()
299 shadowSpace->selfVerificationState = kSVSIdle; in dvmCheckSelfVerification()
302 int frameBytes = (int) shadowSpace->registerSpace + in dvmCheckSelfVerification()
303 shadowSpace->registerSpaceSize*4 - in dvmCheckSelfVerification()
304 (int) shadowSpace->shadowFP; in dvmCheckSelfVerification()
305 if (memcmp(shadowSpace->fp, shadowSpace->shadowFP, frameBytes)) { in dvmCheckSelfVerification()
308 shadowSpace->selfVerificationState = kSVSDebugInterp; in dvmCheckSelfVerification()
315 (int)shadowSpace->fp, frameBytes); in dvmCheckSelfVerification()
316 selfVerificationPrintRegisters((int*)shadowSpace->fp, in dvmCheckSelfVerification()
317 (int*)shadowSpace->shadowFP, in dvmCheckSelfVerification()
320 (int)shadowSpace->shadowFP, frameBytes); in dvmCheckSelfVerification()
321 selfVerificationPrintRegisters((int*)shadowSpace->shadowFP, in dvmCheckSelfVerification()
322 (int*)shadowSpace->fp, in dvmCheckSelfVerification()
324 selfVerificationSpinLoop(shadowSpace); in dvmCheckSelfVerification()
327 if ((uintptr_t)self->interpSave.curFrame < (uintptr_t)shadowSpace->fp) { in dvmCheckSelfVerification()
332 int frameBytes2 = (int) shadowSpace->fp - in dvmCheckSelfVerification()
335 ((char*)shadowSpace->endShadowFP)+localRegs, frameBytes2)) { in dvmCheckSelfVerification()
341 shadowSpace->selfVerificationState = kSVSDebugInterp; in dvmCheckSelfVerification()
351 (int*)shadowSpace->endShadowFP, in dvmCheckSelfVerification()
354 (int)shadowSpace->endShadowFP, localRegs, frameBytes2); in dvmCheckSelfVerification()
355 selfVerificationPrintRegisters((int*)shadowSpace->endShadowFP, in dvmCheckSelfVerification()
358 selfVerificationSpinLoop(shadowSpace); in dvmCheckSelfVerification()
365 for (heapSpacePtr = shadowSpace->heapSpace; in dvmCheckSelfVerification()
366 heapSpacePtr != shadowSpace->heapSpaceTail; heapSpacePtr++) { in dvmCheckSelfVerification()
374 shadowSpace->selfVerificationState = kSVSDebugInterp; in dvmCheckSelfVerification()
385 if (memDiff) selfVerificationSpinLoop(shadowSpace); in dvmCheckSelfVerification()
411 if (shadowSpace->traceLength >= JIT_MAX_TRACE_LEN) { in dvmCheckSelfVerification()
414 (int)shadowSpace->startPC, (int)shadowSpace->endPC, (int)pc); in dvmCheckSelfVerification()
417 selfVerificationSpinLoop(shadowSpace); in dvmCheckSelfVerification()
421 shadowSpace->trace[shadowSpace->traceLength].addr = (int)pc; in dvmCheckSelfVerification()
422 shadowSpace->trace[shadowSpace->traceLength].decInsn = decInsn; in dvmCheckSelfVerification()
423 shadowSpace->traceLength++; in dvmCheckSelfVerification()