summaryrefslogtreecommitdiffstats
path: root/sys/geom
diff options
context:
space:
mode:
authorpjd <pjd@FreeBSD.org>2007-10-26 06:55:00 +0000
committerpjd <pjd@FreeBSD.org>2007-10-26 06:55:00 +0000
commit4f3fb64c4bf72aca7f4fbf2a74404fe307677fb1 (patch)
tree940a1d00c587c669f05a0e4b2baa3b48e4e81020 /sys/geom
parent5d8267331c15f288b083823f82a09b61a1b1e869 (diff)
downloadFreeBSD-src-4f3fb64c4bf72aca7f4fbf2a74404fe307677fb1.zip
FreeBSD-src-4f3fb64c4bf72aca7f4fbf2a74404fe307677fb1.tar.gz
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
Diffstat (limited to 'sys/geom')
-rw-r--r--sys/geom/geom_io.c10
1 files changed, 5 insertions, 5 deletions
diff --git a/sys/geom/geom_io.c b/sys/geom/geom_io.c
index a69d764..3848f45 100644
--- a/sys/geom/geom_io.c
+++ b/sys/geom/geom_io.c
@@ -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);
OpenPOWER on IntegriCloud