git: sys/dev/disk/dm: Add if(debug) conditional to kprintf in strategy()

Tomohiro Kusumi tkusumi at crater.dragonflybsd.org
Sat Oct 10 05:46:04 PDT 2015


commit a3c6b8ec99ce8a3fe6f1ca8ace1d35c9b45e2bd4
Author: Tomohiro Kusumi <kusumi.tomohiro at gmail.com>
Date:   Thu Oct 1 19:17:44 2015 +0900

    sys/dev/disk/dm: Add if(debug) conditional to kprintf in strategy()
    
    There are 6 unconditional aprint_debug() in dm strategy which
    means there are 6 if(debug) conditional kprintf() for each
    dm mapping entry.
    
    Compilers may optimize (it doesn't on my env via buildkernel),
    but add if(debug) outside these prints and use aprint_normal().

Summary of changes:
 sys/dev/disk/dm/device-mapper.c | 22 ++++++++++++----------
 1 file changed, 12 insertions(+), 10 deletions(-)

http://gitweb.dragonflybsd.org/dragonfly.git/commitdiff/a3c6b8ec99ce8a3fe6f1ca8ace1d35c9b45e2bd4


-- 
DragonFly BSD source repository



More information about the Commits mailing list