Save stack only when KTR_GEOM is both compiled into the kernel and enabled
in debug.ktr.mask. Because saving stack is very expensive, it's better only to do it when one really wants to. Reported by: Dan Nelson
This commit is contained in:
parent
b2068c0c18
commit
b656c1b836
@ -115,7 +115,7 @@ g_new_bio(void)
|
||||
|
||||
bp = uma_zalloc(biozone, M_NOWAIT | M_ZERO);
|
||||
#ifdef KTR
|
||||
if (KTR_COMPILE & KTR_GEOM) {
|
||||
if ((KTR_COMPILE & KTR_GEOM) && (ktr_mask & KTR_GEOM)) {
|
||||
struct stack st;
|
||||
|
||||
CTR1(KTR_GEOM, "g_new_bio(): %p", bp);
|
||||
@ -133,7 +133,7 @@ g_alloc_bio(void)
|
||||
|
||||
bp = uma_zalloc(biozone, M_WAITOK | M_ZERO);
|
||||
#ifdef KTR
|
||||
if (KTR_COMPILE & KTR_GEOM) {
|
||||
if ((KTR_COMPILE & KTR_GEOM) && (ktr_mask & KTR_GEOM)) {
|
||||
struct stack st;
|
||||
|
||||
CTR1(KTR_GEOM, "g_alloc_bio(): %p", bp);
|
||||
@ -148,7 +148,7 @@ void
|
||||
g_destroy_bio(struct bio *bp)
|
||||
{
|
||||
#ifdef KTR
|
||||
if (KTR_COMPILE & KTR_GEOM) {
|
||||
if ((KTR_COMPILE & KTR_GEOM) && (ktr_mask & KTR_GEOM)) {
|
||||
struct stack st;
|
||||
|
||||
CTR1(KTR_GEOM, "g_destroy_bio(): %p", bp);
|
||||
@ -175,7 +175,7 @@ g_clone_bio(struct bio *bp)
|
||||
bp->bio_children++;
|
||||
}
|
||||
#ifdef KTR
|
||||
if (KTR_COMPILE & KTR_GEOM) {
|
||||
if ((KTR_COMPILE & KTR_GEOM) && (ktr_mask & KTR_GEOM)) {
|
||||
struct stack st;
|
||||
|
||||
CTR2(KTR_GEOM, "g_clone_bio(%p): %p", bp, bp2);
|
||||
@ -200,7 +200,7 @@ g_duplicate_bio(struct bio *bp)
|
||||
bp2->bio_attribute = bp->bio_attribute;
|
||||
bp->bio_children++;
|
||||
#ifdef KTR
|
||||
if (KTR_COMPILE & KTR_GEOM) {
|
||||
if ((KTR_COMPILE & KTR_GEOM) && (ktr_mask & KTR_GEOM)) {
|
||||
struct stack st;
|
||||
|
||||
CTR2(KTR_GEOM, "g_duplicate_bio(%p): %p", bp, bp2);
|
||||
|
Loading…
Reference in New Issue
Block a user