Lines Matching refs:st

57 	struct stack *st;  in stack_create()  local
59 st = malloc(sizeof(*st), M_STACK, flags | M_ZERO); in stack_create()
60 return (st); in stack_create()
64 stack_destroy(struct stack *st) in stack_destroy() argument
67 free(st, M_STACK); in stack_destroy()
71 stack_put(struct stack *st, vm_offset_t pc) in stack_put() argument
74 if (st->depth < STACK_MAX) { in stack_put()
75 st->pcs[st->depth++] = pc; in stack_put()
89 stack_zero(struct stack *st) in stack_zero() argument
92 bzero(st, sizeof *st); in stack_zero()
96 stack_print(const struct stack *st) in stack_print() argument
102 KASSERT(st->depth <= STACK_MAX, ("bogus stack")); in stack_print()
103 for (i = 0; i < st->depth; i++) { in stack_print()
104 (void)stack_symbol(st->pcs[i], namebuf, sizeof(namebuf), in stack_print()
106 printf("#%d %p at %s+%#lx\n", i, (void *)st->pcs[i], in stack_print()
112 stack_print_short(const struct stack *st) in stack_print_short() argument
118 KASSERT(st->depth <= STACK_MAX, ("bogus stack")); in stack_print_short()
119 for (i = 0; i < st->depth; i++) { in stack_print_short()
122 if (stack_symbol(st->pcs[i], namebuf, sizeof(namebuf), in stack_print_short()
126 printf("%p", (void *)st->pcs[i]); in stack_print_short()
132 stack_print_ddb(const struct stack *st) in stack_print_ddb() argument
138 KASSERT(st->depth <= STACK_MAX, ("bogus stack")); in stack_print_ddb()
139 for (i = 0; i < st->depth; i++) { in stack_print_ddb()
140 stack_symbol_ddb(st->pcs[i], &name, &offset); in stack_print_ddb()
141 printf("#%d %p at %s+%#lx\n", i, (void *)st->pcs[i], in stack_print_ddb()
148 stack_print_short_ddb(const struct stack *st) in stack_print_short_ddb() argument
154 KASSERT(st->depth <= STACK_MAX, ("bogus stack")); in stack_print_short_ddb()
155 for (i = 0; i < st->depth; i++) { in stack_print_short_ddb()
158 if (stack_symbol_ddb(st->pcs[i], &name, &offset) == 0) in stack_print_short_ddb()
161 printf("%p", (void *)st->pcs[i]); in stack_print_short_ddb()
172 stack_sbuf_print(struct sbuf *sb, const struct stack *st) in stack_sbuf_print() argument
178 KASSERT(st->depth <= STACK_MAX, ("bogus stack")); in stack_sbuf_print()
179 for (i = 0; i < st->depth; i++) { in stack_sbuf_print()
180 (void)stack_symbol(st->pcs[i], namebuf, sizeof(namebuf), in stack_sbuf_print()
182 sbuf_printf(sb, "#%d %p at %s+%#lx\n", i, (void *)st->pcs[i], in stack_sbuf_print()
189 stack_sbuf_print_ddb(struct sbuf *sb, const struct stack *st) in stack_sbuf_print_ddb() argument
195 KASSERT(st->depth <= STACK_MAX, ("bogus stack")); in stack_sbuf_print_ddb()
196 for (i = 0; i < st->depth; i++) { in stack_sbuf_print_ddb()
197 (void)stack_symbol_ddb(st->pcs[i], &name, &offset); in stack_sbuf_print_ddb()
198 sbuf_printf(sb, "#%d %p at %s+%#lx\n", i, (void *)st->pcs[i], in stack_sbuf_print_ddb()
206 stack_ktr(u_int mask, const char *file, int line, const struct stack *st, in stack_ktr() argument
215 KASSERT(st->depth <= STACK_MAX, ("bogus stack")); in stack_ktr()
218 st->pcs[0], st->pcs[1], st->pcs[2], st->pcs[3], in stack_ktr()
219 st->pcs[4], st->pcs[5]); in stack_ktr()
220 if (st->depth <= 6) in stack_ktr()
223 st->pcs[6], st->pcs[7], st->pcs[8], st->pcs[9], in stack_ktr()
224 st->pcs[10], st->pcs[11]); in stack_ktr()
225 if (st->depth <= 12) in stack_ktr()
228 st->pcs[12], st->pcs[13], st->pcs[14], st->pcs[15], in stack_ktr()
229 st->pcs[16], st->pcs[17]); in stack_ktr()
232 if (depth == 0 || st->depth < depth) in stack_ktr()
233 depth = st->depth; in stack_ktr()
235 (void)stack_symbol_ddb(st->pcs[i], &name, &offset); in stack_ktr()
237 i, st->pcs[i], (u_long)name, offset, 0, 0); in stack_ktr()