Re: [PATCH 2/4] dvbsky: added debug logging

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



On 11/03/2014 03:04 PM, Mauro Carvalho Chehab wrote:
Em Sun, 12 Oct 2014 13:03:09 +0300
Olli Salonen <olli.salonen@xxxxxx> escreveu:

Added debug logging using dev_dgb.


@@ -396,6 +415,8 @@ static void dvbsky_exit(struct dvb_usb_device *d)
  	struct dvbsky_state *state = d_to_priv(d);
  	struct i2c_client *client;

+	dev_dbg(&d->udev->dev, "\n");
+

No need to add new debug macros that only prints the called functions,
as you could get it too with Kernel tracing.

ftrace [1] is a bit heavy tool for module debugs like that. There is many different debugs for different use cases. When you add debugs to module those are usually used just to see how your module works and functions are called. Same is for V4L core debugs too; enable those and you will get tons of unneeded/useless information which makes totally hard to develop driver in question. When you add debugs to driver module, those are generally useful for cases where you want develop that certain driver module and not see zillion lines of unrelated debug data.

Also, I think that kind of debug log will not generate any binary code when debug options are not enabled by Kconfig, so it is not even reason for optimization.

[1] https://www.kernel.org/doc/Documentation/trace/ftrace.txt

regards
Antti

--
http://palosaari.fi/
--
To unsubscribe from this list: send the line "unsubscribe linux-media" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at  http://vger.kernel.org/majordomo-info.html




[Index of Archives]     [Linux Input]     [Video for Linux]     [Gstreamer Embedded]     [Mplayer Users]     [Linux USB Devel]     [Linux Audio Users]     [Linux Kernel]     [Linux SCSI]     [Yosemite Backpacking]
  Powered by Linux