[gst-devel] Naming threads ? Other performance debugging helpers ?

Florent fthiery at gmail.com
Sat Oct 17 15:16:36 CEST 2009


Hello Stefan,

> https://bugzilla.gnome.org/show_bug.cgi?id=580505
>
> I'd like to have this too, but I don't think it can be done in a crossplatform,
> non hackish way.
> What you could do is to add some thread-id name association to gstreamer. The
> you could write gdb extension to query it? Or the logging could print the name
> as well. Where would you need the name?

Indeed, naming threads is a non-standard feature. The elements which
spawn a thread could report their new PID in the gst logs, and/or emit
a gst message ("new-thread", with {"pid", "gst_element_name"} as
contents). This would be cross-platform, right ?

> As my time permits I hack on gst-tracelib [1]. One plan is to intergrate the
> graphing (which is done by gnuplot) into gst-debug-viewer [2]. The later is
> written in python. Would be cool if you would consider helping on that one.

I quickly tried them, this is awesome work :) I agree, integrating
plotting into gst-debug-viewer would be great. However, it also means
that log generation (and dynamic linking) should be unified, so that
both gstreamer log and performance logs are generated in the same step
? As for integrating the plots, some kind of image viewer could do the
trick, right (scrollable pane with png/svg inside)?

Sadly, performance tracing doesn't work with python-based gstreamer
apps... Any idea how to let python also use them ?

My question was however more related to quick/real time performance
debugging. I ended up coding http://code.google.com/p/gst-viewperf/,
which uses queue filling states to graphically point out performance
starvations. This is merely a prototype, but it works and helped me
already. I am planning on integrating python-gtop (not before Ubuntu
9.04 though), which will enable the use of libgtop (aka
gnome-system-monitor's lib) so that system performance plotting would
be integrable (cpu, mem, disk, network) in python apps. If onlt i
could get the gst element's spawned PIDs, i could also embed the
plugin-related CPU usage.

In this scope, i am asking for help regarding getting the graph
structure of a pipeline: how can i get a graph representation of the
pipeline ? Here, i merely parse the pipeline description... Works for
linearly-defined pipelines, but not in all cases.

PS: sorry for the delay, i don't have much time for spare projects...

Florent




More information about the gstreamer-devel mailing list