Lines Matching +full:- +full:- +full:depth
1 /*-
2 * SPDX-License-Identifier: BSD-2-Clause
71 if (st->depth < STACK_MAX) { in stack_put()
72 st->pcs[st->depth++] = pc; in stack_put()
75 return (-1); in stack_put()
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()
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()
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()
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()
167 * flags - M_WAITOK or M_NOWAIT (EWOULDBLOCK).
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()
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()
226 u_int depth) 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()
238 for (i = 0; i < depth; i++) { 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()
248 * Two variants of stack symbol lookup -- one that uses the DDB interfaces