[gst-devel] Rethinking --disable-gst-debug option in gstreamer configure script
Gruenke, Matt
mgruenke at Tycoint.com
Wed Oct 6 11:58:49 CEST 2010
Felipe, gst_debug_add_log_function() enables you to configure a custom log handler with the following signature:
void (*GstLogFunction) (GstDebugCategory *category,
GstDebugLevel level,
const gchar *file,
const gchar *function,
gint line,
GObject *object,
GstDebugMessage *message,
gpointer data);
If you want to alter behavior of your handler based on origin, you can use category and object (if this is non-null, you could check its type ID). From what I can tell, you can use this existing mechanism to satisfy all of your requirements. See http://gstreamer.freedesktop.org/data/doc/gstreamer/head/gstreamer/html/gstreamer-GstInfo.html#gst-debug-add-log-function for more info.
The issue that we're having is that simply calling gst_debug_log()/gst_debug_log_valist() for the messages logged at certain levels uses a significant amount of CPU time. We just want to be able to compile out some levels, while keeping others. We've found this simple and straight-forward to implement, and I'd prefer to keep it separate from discussions of other changes to the logging system.
Thanks,
Matt
-----Original Message-----
From: Felipe Contreras [mailto:felipe.contreras at gmail.com]
Sent: Monday, October 04, 2010 16:13
To: Discussion of the development of GStreamer
Subject: Re: [gst-devel] Rethinking --disable-gst-debug option in gstreamer configure script
Hi,
On Mon, Oct 4, 2010 at 8:49 PM, Crane, Matt <mattcrane at tycoint.com> wrote:
> I am an engineer in a group that has developed a gstreamer application that
> handles the recording of dozens of video streams in a single server. Recent
> load tests we've run with our application have revealed that disabling debug
> logging during compile time via use of the -disable-gst-debug option in the
> gstreamer configure script frees up about 10% of the CPU cycles on our
> target hardware configuration (CPU idle time with debugging enabled = ~50%;
> CPU idle time with debugging disabled = ~60%). While we would like to
> realize the performance improvement that would come from disabling (much of
> the) debug logging, we would still like to log ERROR and WARNING level
> messages on deployed production systems.
Totally agree, that's why I wrote my own:
http://github.com/felipec/gst-dsp/blob/master/log.c
http://github.com/felipec/gst-dsp/blob/master/log.h
Not only do I want the errors are warning to be printed, but stored in
the syslog. And more over, even if the systems's debugging
capabilities are disabled, I still would like to enable debugging on
my plug-in (override). And finally, I want a higher level that all
others that *always* print messages (not on the syslog though), in
order add logging only in certain areas (I call this pr_test).
Right now there's nothing like that on GStreamer, which is not ideal
for embedded systems.
Cheers.
--
Felipe Contreras
------------------------------------------------------------------------------
Virtualization is moving to the mainstream and overtaking non-virtualized
environment for deploying applications. Does it make network security
easier or more difficult to achieve? Read this whitepaper to separate the
two and get a better understanding.
http://p.sf.net/sfu/hp-phase2-d2d
_______________________________________________
gstreamer-devel mailing list
gstreamer-devel at lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/gstreamer-devel
More information about the gstreamer-devel
mailing list