Lines Matching refs:stack
177 struct intel_pt_stack stack;
387 static void intel_pt_pop_blk(struct intel_pt_stack *stack)
389 struct intel_pt_blk *blk = stack->blk;
391 stack->blk = blk->prev;
392 if (!stack->spare)
393 stack->spare = blk;
398 static uint64_t intel_pt_pop(struct intel_pt_stack *stack)
400 if (!stack->pos) {
401 if (!stack->blk)
403 intel_pt_pop_blk(stack);
404 if (!stack->blk)
406 stack->pos = INTEL_PT_BLK_SIZE;
408 return stack->blk->ip[--stack->pos];
411 static int intel_pt_alloc_blk(struct intel_pt_stack *stack)
415 if (stack->spare) {
416 blk = stack->spare;
417 stack->spare = NULL;
424 blk->prev = stack->blk;
425 stack->blk = blk;
426 stack->pos = 0;
430 static int intel_pt_push(struct intel_pt_stack *stack, uint64_t ip)
434 if (!stack->blk || stack->pos == INTEL_PT_BLK_SIZE) {
435 err = intel_pt_alloc_blk(stack);
440 stack->blk->ip[stack->pos++] = ip;
444 static void intel_pt_clear_stack(struct intel_pt_stack *stack)
446 while (stack->blk)
447 intel_pt_pop_blk(stack);
448 stack->pos = 0;
451 static void intel_pt_free_stack(struct intel_pt_stack *stack)
453 intel_pt_clear_stack(stack);
454 zfree(&stack->blk);
455 zfree(&stack->spare);
460 intel_pt_free_stack(&decoder->stack);
1208 err = intel_pt_push(&decoder->stack, decoder->ip +
1214 decoder->ret_addr = intel_pt_pop(&decoder->stack);
1653 intel_pt_log_at("ERROR: Bad RET compression (stack empty)",
3147 intel_pt_clear_stack(&decoder->stack);
3752 intel_pt_clear_stack(&decoder->stack);
3914 intel_pt_clear_stack(&decoder->stack);