stack(9): Drop unused API mode and comment that referenced it
Reviewed by: markj Differential Revision: https://reviews.freebsd.org/D19601
This commit is contained in:
parent
192cdbcab2
commit
4d504c5762
@ -155,7 +155,7 @@ g_new_bio(void)
|
||||
|
||||
CTR1(KTR_GEOM, "g_new_bio(): %p", bp);
|
||||
stack_save(&st);
|
||||
CTRSTACK(KTR_GEOM, &st, 3, 0);
|
||||
CTRSTACK(KTR_GEOM, &st, 3);
|
||||
}
|
||||
#endif
|
||||
return (bp);
|
||||
@ -173,7 +173,7 @@ g_alloc_bio(void)
|
||||
|
||||
CTR1(KTR_GEOM, "g_alloc_bio(): %p", bp);
|
||||
stack_save(&st);
|
||||
CTRSTACK(KTR_GEOM, &st, 3, 0);
|
||||
CTRSTACK(KTR_GEOM, &st, 3);
|
||||
}
|
||||
#endif
|
||||
return (bp);
|
||||
@ -188,7 +188,7 @@ g_destroy_bio(struct bio *bp)
|
||||
|
||||
CTR1(KTR_GEOM, "g_destroy_bio(): %p", bp);
|
||||
stack_save(&st);
|
||||
CTRSTACK(KTR_GEOM, &st, 3, 0);
|
||||
CTRSTACK(KTR_GEOM, &st, 3);
|
||||
}
|
||||
#endif
|
||||
uma_zfree(biozone, bp);
|
||||
@ -236,7 +236,7 @@ g_clone_bio(struct bio *bp)
|
||||
|
||||
CTR2(KTR_GEOM, "g_clone_bio(%p): %p", bp, bp2);
|
||||
stack_save(&st);
|
||||
CTRSTACK(KTR_GEOM, &st, 3, 0);
|
||||
CTRSTACK(KTR_GEOM, &st, 3);
|
||||
}
|
||||
#endif
|
||||
return(bp2);
|
||||
@ -265,7 +265,7 @@ g_duplicate_bio(struct bio *bp)
|
||||
|
||||
CTR2(KTR_GEOM, "g_duplicate_bio(%p): %p", bp, bp2);
|
||||
stack_save(&st);
|
||||
CTRSTACK(KTR_GEOM, &st, 3, 0);
|
||||
CTRSTACK(KTR_GEOM, &st, 3);
|
||||
}
|
||||
#endif
|
||||
return(bp2);
|
||||
|
@ -215,7 +215,7 @@ stack_sbuf_print_ddb(struct sbuf *sb, const struct stack *st)
|
||||
#ifdef KTR
|
||||
void
|
||||
stack_ktr(u_int mask, const char *file, int line, const struct stack *st,
|
||||
u_int depth, int cheap)
|
||||
u_int depth)
|
||||
{
|
||||
#ifdef DDB
|
||||
const char *name;
|
||||
@ -224,31 +224,15 @@ stack_ktr(u_int mask, const char *file, int line, const struct stack *st,
|
||||
#endif
|
||||
|
||||
KASSERT(st->depth <= STACK_MAX, ("bogus stack"));
|
||||
if (cheap) {
|
||||
ktr_tracepoint(mask, file, line, "#0 %p %p %p %p %p %p",
|
||||
st->pcs[0], st->pcs[1], st->pcs[2], st->pcs[3],
|
||||
st->pcs[4], st->pcs[5]);
|
||||
if (st->depth <= 6)
|
||||
return;
|
||||
ktr_tracepoint(mask, file, line, "#1 %p %p %p %p %p %p",
|
||||
st->pcs[6], st->pcs[7], st->pcs[8], st->pcs[9],
|
||||
st->pcs[10], st->pcs[11]);
|
||||
if (st->depth <= 12)
|
||||
return;
|
||||
ktr_tracepoint(mask, file, line, "#2 %p %p %p %p %p %p",
|
||||
st->pcs[12], st->pcs[13], st->pcs[14], st->pcs[15],
|
||||
st->pcs[16], st->pcs[17]);
|
||||
#ifdef DDB
|
||||
} else {
|
||||
if (depth == 0 || st->depth < depth)
|
||||
depth = st->depth;
|
||||
for (i = 0; i < depth; i++) {
|
||||
(void)stack_symbol_ddb(st->pcs[i], &name, &offset);
|
||||
ktr_tracepoint(mask, file, line, "#%d %p at %s+%#lx",
|
||||
i, st->pcs[i], (u_long)name, offset, 0, 0);
|
||||
}
|
||||
#endif
|
||||
if (depth == 0 || st->depth < depth)
|
||||
depth = st->depth;
|
||||
for (i = 0; i < depth; i++) {
|
||||
(void)stack_symbol_ddb(st->pcs[i], &name, &offset);
|
||||
ktr_tracepoint(mask, file, line, "#%d %p at %s+%#lx",
|
||||
i, st->pcs[i], (u_long)name, offset, 0, 0);
|
||||
}
|
||||
#endif
|
||||
}
|
||||
#endif
|
||||
|
||||
|
@ -31,7 +31,7 @@
|
||||
#ifndef _SYS__STACK_H_
|
||||
#define _SYS__STACK_H_
|
||||
|
||||
#define STACK_MAX 18 /* Don't change, stack_ktr relies on this. */
|
||||
#define STACK_MAX 18
|
||||
|
||||
struct stack {
|
||||
int depth;
|
||||
|
@ -51,13 +51,13 @@ int stack_sbuf_print_flags(struct sbuf *, const struct stack *,
|
||||
int);
|
||||
#ifdef KTR
|
||||
void stack_ktr(u_int, const char *, int, const struct stack *,
|
||||
u_int, int);
|
||||
#define CTRSTACK(m, st, depth, cheap) do { \
|
||||
u_int);
|
||||
#define CTRSTACK(m, st, depth) do { \
|
||||
if (KTR_COMPILE & (m)) \
|
||||
stack_ktr((m), __FILE__, __LINE__, st, depth, cheap); \
|
||||
stack_ktr((m), __FILE__, __LINE__, st, depth); \
|
||||
} while(0)
|
||||
#else
|
||||
#define CTRSTACK(m, st, depth, cheap)
|
||||
#define CTRSTACK(m, st, depth)
|
||||
#endif
|
||||
|
||||
/* MD Routines. */
|
||||
|
Loading…
x
Reference in New Issue
Block a user