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()
173 stack_sbuf_print_flags(struct sbuf *sb, const struct stack *st, int flags, in stack_sbuf_print_flags() argument
180 KASSERT(st->depth <= STACK_MAX, ("bogus stack")); in stack_sbuf_print_flags()
181 for (i = 0; i < st->depth; i++) { in stack_sbuf_print_flags()
182 error = stack_symbol(st->pcs[i], namebuf, sizeof(namebuf), in stack_sbuf_print_flags()
189 (void *)st->pcs[i], namebuf, offset); in stack_sbuf_print_flags()
203 stack_sbuf_print(struct sbuf *sb, const struct stack *st) in stack_sbuf_print() argument
206 (void)stack_sbuf_print_flags(sb, st, M_WAITOK, STACK_SBUF_FMT_LONG); in stack_sbuf_print()
211 stack_sbuf_print_ddb(struct sbuf *sb, const struct stack *st) in stack_sbuf_print_ddb() argument
217 KASSERT(st->depth <= STACK_MAX, ("bogus stack")); in stack_sbuf_print_ddb()
218 for (i = 0; i < st->depth; i++) { in stack_sbuf_print_ddb()
219 (void)stack_symbol_ddb(st->pcs[i], &name, &offset); in stack_sbuf_print_ddb()
220 sbuf_printf(sb, "#%d %p at %s+%#lx\n", i, (void *)st->pcs[i], in stack_sbuf_print_ddb()
228 stack_ktr(u_int mask, const char *file, int line, const struct stack *st, in stack_ktr() argument
237 KASSERT(st->depth <= STACK_MAX, ("bogus stack")); in stack_ktr()
239 if (depth == 0 || st->depth < depth) in stack_ktr()
240 depth = st->depth; in stack_ktr()
242 (void)stack_symbol_ddb(st->pcs[i], &name, &offset); in stack_ktr()
244 i, st->pcs[i], (u_long)name, offset, 0, 0); in stack_ktr()