tracer: rename the envvar to GST_TRACER_PLUGINS

The subsystem reused the GST_TRACE var that is allready in use by the alloc tracer.
Fixes #756760
This commit is contained in:
Stefan Sauer 2015-10-19 21:39:19 +02:00
parent 7c8f76a39f
commit 70d2a676af
3 changed files with 11 additions and 11 deletions

View file

@ -36,8 +36,8 @@ condition to check if active.
Certain GStreamer core function (such as gst_pad_push or gst_element_add_pad) Certain GStreamer core function (such as gst_pad_push or gst_element_add_pad)
will call into the tracer subsystem to dispatch into active tracing modules. will call into the tracer subsystem to dispatch into active tracing modules.
Developers will be able to select a list of plugins by setting an environment Developers will be able to select a list of plugins by setting an environment
variable, such as GST_TRACE="meminfo;dbus". One can also pass parameters to variable, such as GST_TRACER_PLUGINS="meminfo;dbus". One can also pass parameters to
plugins: GST_TRACE="log(events,buffers);stats(all)". plugins: GST_TRACER_PLUGINS="log(events,buffers);stats(all)".
When then plugins are loaded, we'll add them to certain hooks according to which When then plugins are loaded, we'll add them to certain hooks according to which
they are interested in. they are interested in.
@ -83,7 +83,7 @@ In addition to api hooks we should also provide timer hooks. Interval timers are
useful to get e.g. resource usage snapshots. Also absolute timers might make useful to get e.g. resource usage snapshots. Also absolute timers might make
sense. All this could be implemented with a clock thread. We can use another sense. All this could be implemented with a clock thread. We can use another
env-var GST_TRACE_TIMERS="100ms,75ms" to configure timers and then pass them to env-var GST_TRACE_TIMERS="100ms,75ms" to configure timers and then pass them to
the tracers like, GST_TRACE="rusage(timer=100ms);meminfo(timer=75ms)". Maybe the tracers like, GST_TRACER_PLUGINS="rusage(timer=100ms);meminfo(timer=75ms)". Maybe
we can create them ad-hoc and avoid the GST_TRACE_TIMERS var. we can create them ad-hoc and avoid the GST_TRACE_TIMERS var.
Hooks (* already implemented) Hooks (* already implemented)
@ -332,19 +332,19 @@ Problems / Open items
Try it Try it
====== ======
GST_DEBUG="GST_TRACER:7,GST_BUFFER*:7,GST_EVENT:7,GST_MESSAGE:7" GST_TRACE=log gst-launch-1.0 fakesrc num-buffers=10 ! fakesink GST_DEBUG="GST_TRACER:7,GST_BUFFER*:7,GST_EVENT:7,GST_MESSAGE:7" GST_TRACER_PLUGINS=log gst-launch-1.0 fakesrc num-buffers=10 ! fakesink
- traces for buffer flow in TRACE level - traces for buffer flow in TRACE level
GST_DEBUG="GST_TRACER:7" GST_TRACE="stats;rusage" GST_DEBUG_FILE=trace.log gst-launch-1.0 fakesrc num-buffers=10 sizetype=fixed ! queue ! fakesink GST_DEBUG="GST_TRACER:7" GST_TRACER_PLUGINS="stats;rusage" GST_DEBUG_FILE=trace.log gst-launch-1.0 fakesrc num-buffers=10 sizetype=fixed ! queue ! fakesink
gst-stats-1.0 trace.log gst-stats-1.0 trace.log
- print some pipeline stats on exit - print some pipeline stats on exit
GST_DEBUG="GST_TRACER:7" GST_TRACE="stats;rusage" GST_DEBUG_FILE=trace.log /usr/bin/gst-play-1.0 --interactive $HOME/Videos/movie.mp4 GST_DEBUG="GST_TRACER:7" GST_TRACER_PLUGINS="stats;rusage" GST_DEBUG_FILE=trace.log /usr/bin/gst-play-1.0 --interactive $HOME/Videos/movie.mp4
./scripts/gst-plot-traces.sh --format=png | gnuplot ./scripts/gst-plot-traces.sh --format=png | gnuplot
eog trace.log.*.png eog trace.log.*.png
- get ts, average-cpuload, current-cpuload, time and plot - get ts, average-cpuload, current-cpuload, time and plot
GST_DEBUG="GST_TRACER:7" GST_TRACE=latency gst-launch-1.0 audiotestsrc num-buffers=10 ! audioconvert ! volume volume=0.7 ! autoaudiosink GST_DEBUG="GST_TRACER:7" GST_TRACER_PLUGINS=latency gst-launch-1.0 audiotestsrc num-buffers=10 ! audioconvert ! volume volume=0.7 ! autoaudiosink
- print processing latencies - print processing latencies
Performance Performance

View file

@ -20,19 +20,19 @@
<xi:include href="xml/element-capsfilter.xml" /> <xi:include href="xml/element-capsfilter.xml" />
<xi:include href="xml/element-concat.xml" /> <xi:include href="xml/element-concat.xml" />
<xi:include href="xml/element-downloadbuffer.xml" /> <xi:include href="xml/element-downloadbuffer.xml" />
<xi:include href="xml/element-fakesrc.xml" />
<xi:include href="xml/element-fakesink.xml" /> <xi:include href="xml/element-fakesink.xml" />
<xi:include href="xml/element-fakesrc.xml" />
<xi:include href="xml/element-fdsink.xml" /> <xi:include href="xml/element-fdsink.xml" />
<xi:include href="xml/element-fdsrc.xml" /> <xi:include href="xml/element-fdsrc.xml" />
<xi:include href="xml/element-filesrc.xml" />
<xi:include href="xml/element-filesink.xml" /> <xi:include href="xml/element-filesink.xml" />
<xi:include href="xml/element-filesrc.xml" />
<xi:include href="xml/element-funnel.xml" /> <xi:include href="xml/element-funnel.xml" />
<xi:include href="xml/element-identity.xml" /> <xi:include href="xml/element-identity.xml" />
<xi:include href="xml/element-input-selector.xml" /> <xi:include href="xml/element-input-selector.xml" />
<xi:include href="xml/element-multiqueue.xml" /> <xi:include href="xml/element-multiqueue.xml" />
<xi:include href="xml/element-output-selector.xml" /> <xi:include href="xml/element-output-selector.xml" />
<xi:include href="xml/element-queue.xml" />
<xi:include href="xml/element-queue2.xml" /> <xi:include href="xml/element-queue2.xml" />
<xi:include href="xml/element-queue.xml" />
<xi:include href="xml/element-streamiddemux.xml" /> <xi:include href="xml/element-streamiddemux.xml" />
<xi:include href="xml/element-tee.xml" /> <xi:include href="xml/element-tee.xml" />
<xi:include href="xml/element-typefind.xml" /> <xi:include href="xml/element-typefind.xml" />

View file

@ -65,7 +65,7 @@ GHashTable *_priv_tracers = NULL;
void void
_priv_gst_tracing_init (void) _priv_gst_tracing_init (void)
{ {
const gchar *env = g_getenv ("GST_TRACE"); const gchar *env = g_getenv ("GST_TRACER_PLUGINS");
if (env != NULL && *env != '\0') { if (env != NULL && *env != '\0') {
GstRegistry *registry = gst_registry_get (); GstRegistry *registry = gst_registry_get ();