Skip site navigation (1)Skip section navigation (2)
Date:      Sun, 11 Aug 2013 18:01:26 -0700
From:      Adrian Chadd <adrian@freebsd.org>
To:        Scott Long <scott4long@yahoo.com>
Cc:        svn-src-head@freebsd.org, Alexander Motin <mav@freebsd.org>, src-committers@freebsd.org, Scott Long <scottl@freebsd.org>, svn-src-all@freebsd.org
Subject:   Re: svn commit: r253460 - head/sys/dev/mps
Message-ID:  <CAJ-Vmon_%2BRvfAFcKcotGf3yVXG4qRB59pktzip=D02xD6DOZFA@mail.gmail.com>
In-Reply-To: <E28B06A7-D09C-4CFB-ABCA-CD9FC43E89E6@yahoo.com>
References:  <201307190012.r6J0Cg1r027645@svn.freebsd.org> <52077D0D.8090607@FreeBSD.org> <E28B06A7-D09C-4CFB-ABCA-CD9FC43E89E6@yahoo.com>

next in thread | previous in thread | raw e-mail | index | archive | help
On 11 August 2013 14:40, Scott Long <scott4long@yahoo.com> wrote:
> Thanks, I'll look into it.

Yo!

Damnit, I really should create a generic "here's a 64 bit mask for
debug" set of macros we can use elsewhere.

Anyway, you should consider a #define that means you can avoid
actually evaluating the arguments that you pass in. That saves even
more CPU.

Ie:

#ifdef DRV_DEBUG
#define DPRINTF(sc, mask, ...) do { if ( (sc)->sc_debug & mask )
dev_printf(sc->sc_dev, __VA_ARGS__); } while (0)
#else
#define DPRINTF(sc, mask, ...)
#endif



-adrian



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?CAJ-Vmon_%2BRvfAFcKcotGf3yVXG4qRB59pktzip=D02xD6DOZFA>