Lines Matching refs:st

55 	struct stack *st;  in stack_create()  local
57 st = malloc(sizeof(*st), M_STACK, flags | M_ZERO); in stack_create()
58 return (st); in stack_create()
62 stack_destroy(struct stack *st) in stack_destroy() argument
65 free(st, M_STACK); in stack_destroy()
69 stack_put(struct stack *st, vm_offset_t pc) in stack_put() argument
72 if (st->depth < STACK_MAX) { in stack_put()
73 st->pcs[st->depth++] = pc; in stack_put()
87 stack_zero(struct stack *st) in stack_zero() argument
90 bzero(st, sizeof *st); in stack_zero()
94 stack_print(const struct stack *st) in stack_print() argument
100 KASSERT(st->depth <= STACK_MAX, ("bogus stack")); in stack_print()
101 for (i = 0; i < st->depth; i++) { in stack_print()
102 (void)stack_symbol(st->pcs[i], namebuf, sizeof(namebuf), in stack_print()
104 printf("#%d %p at %s+%#lx\n", i, (void *)st->pcs[i], in stack_print()
110 stack_print_short(const struct stack *st) in stack_print_short() argument
116 KASSERT(st->depth <= STACK_MAX, ("bogus stack")); in stack_print_short()
117 for (i = 0; i < st->depth; i++) { in stack_print_short()
120 if (stack_symbol(st->pcs[i], namebuf, sizeof(namebuf), in stack_print_short()
124 printf("%p", (void *)st->pcs[i]); in stack_print_short()
130 stack_print_ddb(const struct stack *st) in stack_print_ddb() argument
136 KASSERT(st->depth <= STACK_MAX, ("bogus stack")); in stack_print_ddb()
137 for (i = 0; i < st->depth; i++) { in stack_print_ddb()
138 stack_symbol_ddb(st->pcs[i], &name, &offset); in stack_print_ddb()
139 printf("#%d %p at %s+%#lx\n", i, (void *)st->pcs[i], in stack_print_ddb()
146 stack_print_short_ddb(const struct stack *st) in stack_print_short_ddb() argument
152 KASSERT(st->depth <= STACK_MAX, ("bogus stack")); in stack_print_short_ddb()
153 for (i = 0; i < st->depth; i++) { in stack_print_short_ddb()
156 if (stack_symbol_ddb(st->pcs[i], &name, &offset) == 0) in stack_print_short_ddb()
159 printf("%p", (void *)st->pcs[i]); in stack_print_short_ddb()
171 stack_sbuf_print_flags(struct sbuf *sb, const struct stack *st, int flags, in stack_sbuf_print_flags() argument
178 KASSERT(st->depth <= STACK_MAX, ("bogus stack")); in stack_sbuf_print_flags()
179 for (i = 0; i < st->depth; i++) { in stack_sbuf_print_flags()
180 error = stack_symbol(st->pcs[i], namebuf, sizeof(namebuf), in stack_sbuf_print_flags()
187 (void *)st->pcs[i], namebuf, offset); in stack_sbuf_print_flags()
201 stack_sbuf_print(struct sbuf *sb, const struct stack *st) in stack_sbuf_print() argument
204 (void)stack_sbuf_print_flags(sb, st, M_WAITOK, STACK_SBUF_FMT_LONG); in stack_sbuf_print()
209 stack_sbuf_print_ddb(struct sbuf *sb, const struct stack *st) in stack_sbuf_print_ddb() argument
215 KASSERT(st->depth <= STACK_MAX, ("bogus stack")); in stack_sbuf_print_ddb()
216 for (i = 0; i < st->depth; i++) { in stack_sbuf_print_ddb()
217 (void)stack_symbol_ddb(st->pcs[i], &name, &offset); in stack_sbuf_print_ddb()
218 sbuf_printf(sb, "#%d %p at %s+%#lx\n", i, (void *)st->pcs[i], in stack_sbuf_print_ddb()
226 stack_ktr(u_int mask, const char *file, int line, const struct stack *st, in stack_ktr() argument
235 KASSERT(st->depth <= STACK_MAX, ("bogus stack")); in stack_ktr()
237 if (depth == 0 || st->depth < depth) in stack_ktr()
238 depth = st->depth; in stack_ktr()
240 (void)stack_symbol_ddb(st->pcs[i], &name, &offset); in stack_ktr()
242 i, st->pcs[i], (u_long)name, offset, 0, 0); in stack_ktr()