kernel - Allow kprintf() output targets to be managed as a debugging aid.
authorMatthew Dillon <dillon@apollo.backplane.com>
Thu, 6 Aug 2015 04:34:39 +0000 (21:34 -0700)
committerMatthew Dillon <dillon@apollo.backplane.com>
Thu, 6 Aug 2015 04:34:39 +0000 (21:34 -0700)
commit62b54f3115ebc391f294c9877630727c98c10b4a
tree7c307876980b75f241dcff2230dcc6d0638d9484
parent0dbf0ea8255afaf7dcbb8572fd681a7a45b3d3ce
kernel - Allow kprintf() output targets to be managed as a debugging aid.

* Add kern.kprintf_logging which is a bitmask of kprintf() logging targets.
  This can be adjusted to reduce kprintf() overhead and serialization when
  using it to debug kernel issues.

* The default value is 0x05 which outputs to the console and the
  dmesg buffer.  One can disable console logging and spin-lock
  serialization by setting this to 0x14, causing kprintf() to only
  log to the dmesg buffer.

  0x01 Output to console
  0x02 (unsafe for general kprintf operation, do not use)
  0x04 Output to dmesg buffer
  0x08 (do not use)
  0x10 Do not serialize the whole kprintf() with a spin-lock.
sys/kern/subr_prf.c