Lines Matching refs:st

54 	struct stack *st;  in stack_create()  local
56 st = malloc(sizeof(*st), M_STACK, flags | M_ZERO); in stack_create()
57 return (st); in stack_create()
61 stack_destroy(struct stack *st) in stack_destroy() argument
64 free(st, M_STACK); in stack_destroy()
68 stack_put(struct stack *st, vm_offset_t pc) in stack_put() argument
71 if (st->depth < STACK_MAX) { in stack_put()
72 st->pcs[st->depth++] = pc; in stack_put()
86 stack_zero(struct stack *st) in stack_zero() argument
89 bzero(st, sizeof *st); in stack_zero()
93 stack_print(const struct stack *st) in stack_print() argument
99 KASSERT(st->depth <= STACK_MAX, ("bogus stack")); in stack_print()
100 for (i = 0; i < st->depth; i++) { in stack_print()
101 (void)stack_symbol(st->pcs[i], namebuf, sizeof(namebuf), in stack_print()
103 printf("#%d %p at %s+%#lx\n", i, (void *)st->pcs[i], in stack_print()
109 stack_print_short(const struct stack *st) in stack_print_short() argument
115 KASSERT(st->depth <= STACK_MAX, ("bogus stack")); in stack_print_short()
116 for (i = 0; i < st->depth; i++) { in stack_print_short()
119 if (stack_symbol(st->pcs[i], namebuf, sizeof(namebuf), in stack_print_short()
123 printf("%p", (void *)st->pcs[i]); in stack_print_short()
129 stack_print_ddb(const struct stack *st) in stack_print_ddb() argument
135 KASSERT(st->depth <= STACK_MAX, ("bogus stack")); in stack_print_ddb()
136 for (i = 0; i < st->depth; i++) { in stack_print_ddb()
137 stack_symbol_ddb(st->pcs[i], &name, &offset); in stack_print_ddb()
138 printf("#%d %p at %s+%#lx\n", i, (void *)st->pcs[i], in stack_print_ddb()
145 stack_print_short_ddb(const struct stack *st) in stack_print_short_ddb() argument
151 KASSERT(st->depth <= STACK_MAX, ("bogus stack")); in stack_print_short_ddb()
152 for (i = 0; i < st->depth; i++) { in stack_print_short_ddb()
155 if (stack_symbol_ddb(st->pcs[i], &name, &offset) == 0) in stack_print_short_ddb()
158 printf("%p", (void *)st->pcs[i]); in stack_print_short_ddb()
170 stack_sbuf_print_flags(struct sbuf *sb, const struct stack *st, int flags, in stack_sbuf_print_flags() argument
177 KASSERT(st->depth <= STACK_MAX, ("bogus stack")); in stack_sbuf_print_flags()
178 for (i = 0; i < st->depth; i++) { in stack_sbuf_print_flags()
179 error = stack_symbol(st->pcs[i], namebuf, sizeof(namebuf), in stack_sbuf_print_flags()
186 (void *)st->pcs[i], namebuf, offset); in stack_sbuf_print_flags()
200 stack_sbuf_print(struct sbuf *sb, const struct stack *st) in stack_sbuf_print() argument
203 (void)stack_sbuf_print_flags(sb, st, M_WAITOK, STACK_SBUF_FMT_LONG); in stack_sbuf_print()
208 stack_sbuf_print_ddb(struct sbuf *sb, const struct stack *st) in stack_sbuf_print_ddb() argument
214 KASSERT(st->depth <= STACK_MAX, ("bogus stack")); in stack_sbuf_print_ddb()
215 for (i = 0; i < st->depth; i++) { in stack_sbuf_print_ddb()
216 (void)stack_symbol_ddb(st->pcs[i], &name, &offset); in stack_sbuf_print_ddb()
217 sbuf_printf(sb, "#%d %p at %s+%#lx\n", i, (void *)st->pcs[i], in stack_sbuf_print_ddb()
225 stack_ktr(u_int mask, const char *file, int line, const struct stack *st, in stack_ktr() argument
234 KASSERT(st->depth <= STACK_MAX, ("bogus stack")); in stack_ktr()
236 if (depth == 0 || st->depth < depth) in stack_ktr()
237 depth = st->depth; in stack_ktr()
239 (void)stack_symbol_ddb(st->pcs[i], &name, &offset); in stack_ktr()
241 i, st->pcs[i], (u_long)name, offset, 0, 0); in stack_ktr()