Commit graph

122 commits

Author SHA1 Message Date
Nirbheek Chauhan
a1c44cca3a leakstracer: Remove unused and redundant record fields
All leak records are obviously scoped to the process, and nothing in
the GstTracerRecord code uses these fields anyway.
2019-07-01 13:33:13 +00:00
Nirbheek Chauhan
bafa7a5ca7 leakstracer: Improve documentation for the element
Also print a useful g_warning() message when leaks are detected.
2019-07-01 13:33:13 +00:00
Nirbheek Chauhan
145f8546c4 gstinfo: Add an explicit enum for GST_STACK_TRACE_SHOW_NONE
The code implicitly uses this value when the stack trace is not FULL.
Mostly useful for documenting the behaviour when each flag is passed
and for translating to/from strings.
2019-07-01 10:36:09 +00:00
Guillaume Desmottes
f321f42359 latency: display event pointer in logs
This is quite useful for debugging when tracer is reporting the wrong
latency because of an element breaking the events/buffers ordering.
2019-06-20 16:42:01 +05:30
Thibault Saunier
f040102d45 docs: Add tracers support 2019-05-31 18:53:43 -04:00
Matthew Waters
29557fe623 docs: add coretracers to the list of plugins 2019-05-18 02:41:43 +00:00
Julian Bouzas
35788c8563 tracer: latency: Don't compare element name as element Id is already unique 2019-04-15 11:29:32 +00:00
Julian Bouzas
e128c7310c tracer: latency: Remove redundant if conditions 2019-04-15 11:29:32 +00:00
Julian Bouzas
780bf26e43 tracer: latency: Make GST_DEBUG logs consistent 2019-04-15 11:29:32 +00:00
Julian Bouzas
a376bab21d tracer: latency: Fix bug when dropping sub-latency probe event
Fixes #373
2019-04-15 11:29:32 +00:00
Julian Bouzas
d908dee9e9 tracer: latency: Fix typo bug 2019-04-10 09:17:01 -04:00
Julian Bouzas
308f505110 tracer: latency: Fix bug when storing latency probe event
The pad name sotred in the latency event has no longer the name of the element,
so we have to get the element Id, element name and pad name values from the data
structure and compare all 3 values.
2019-04-10 09:16:03 -04:00
Julian Bouzas
1ec8114717 tracer: latency: Show element id, element name and pad name 2019-04-09 08:50:16 -04:00
Julian Bouzas
0f0403e5d9 tracer: latency: Show per-element reported latency 2019-04-08 12:28:07 -04:00
Julian Bouzas
e975d5d1c4 tracer: latency: Show element's source pad name instead of element's name
The full pad name gives more information than the element's name, which is very
useful when elements have multiple source pads.
2019-04-08 12:28:07 -04:00
Nicolas Dufresne
5470f6df00 latency: Dot not override already stored events
First, the event would be leaved, but also when an element takes
several buffers before producing one, we want the reported latency to be
the aggregation, so the distance from the oldest buffer.
2019-04-08 12:28:07 -04:00
Nicolas Dufresne
bdb75a1450 tracer: latency: Add parameter to select latency type
This sets back the default to trace only pipeline latency, and add flags
to enabled element tracing. It is now possible to only trace element
latency, only trace pipeline latency, trace both or none.
2019-04-08 12:28:07 -04:00
Nicolas Dufresne
6a35153e4e tracer: latency: Add per element latency tracer
This adds per element latency tracing.
2019-04-08 12:28:07 -04:00
Nicolas Dufresne
4585d22a8d tracer: Don't pass pads inside GstEvent
This removes the passing of pad inside of a GstEvent. While this is not
a bug, it may affect the live time of the pad, hense change the pipeline
behaviour.
2019-04-08 12:28:07 -04:00
Nicolas Dufresne
e1be065293 tracers: log: Fix post query trace
The post tracer hooks have a GstQuery argument which was truncated from
the trace. As the post hook is the one that contains the useful data,
this bug was hiding the important information from that trace.
2018-11-06 15:41:01 -05:00
Matthew Waters
874ad5faca meson: generate pkg-config files for our plugins 2018-11-05 15:18:41 +00:00
Nirbheek Chauhan
38ec95460f meson: Don't add static printf library to executables
They should only need to link to libgstreamer.
2018-07-25 16:02:06 +05:30
Nirbheek Chauhan
4fb02fc85b meson: Update option names to omit disable_ and with- prefixes
Also yield common options to the outer project (gst-build in our case)
so that they don't have to be set manually.
2018-05-05 20:30:43 +05:30
luz.paz
4a402c1c7d Fix typos in comments and docs
Found via `codespell`

https://bugzilla.gnome.org/show_bug.cgi?id=795610
2018-05-01 11:18:03 +01:00
Matthew Waters
7fad93d035 tracers: latency: allow for non parented pads to send latency probes
Such a setup is used in rtspsrc for its TCP connection

https://bugzilla.gnome.org/show_bug.cgi?id=793478
2018-02-16 13:14:40 +00:00
Matthew Waters
a0400a0d28 docs: include tracers in the documentation
Requires exposing the tracer GType from the GstTracerFactory in order
to link the plugin with the tracer in the documentation.

https://bugzilla.gnome.org/show_bug.cgi?id=791253
2017-12-14 14:46:46 +11:00
Tim-Philipp Müller
e04c6694f1 tracers: log: no need to link to our internal printf implementation
The call to __gst_vasprintf() was removed in commit 1a3e218b8.
2017-11-26 11:14:01 +00:00
Guillaume Desmottes
4670036691 latency tracer: add timestamp to tracer records
Include the timestamp of the recorded log as in the 'stats' tracer.
This can be useful, for example, to plot a graph showing the latency
over time.

https://bugzilla.gnome.org/show_bug.cgi?id=781315
2017-11-04 13:51:00 -04:00
Mathieu Duponchelle
f911fe4314 gstleaks.c: always log leaks listing
https://bugzilla.gnome.org/show_bug.cgi?id=789556
2017-11-02 14:53:48 +01:00
Nicolas Dufresne
41e35c334b latency-tracer: Exclude synchronization time
The goal of this tracer is to measure the processing latency between a
src and a sink. In push mode, the time was read after the chain function
have returned. As the amount of time we wait to get synched is reverse
to the amount of latency the source introduced, the result was quite
surprising.

This patch moves the latency calculation in the pre-push hook. When
there is no processing in a a pipeline (e.g. fakesrc ! fakesink), the
latency will now be 0 as it's supposed to. For pull mode, the code was
already correct. When GstBaseSink operate in pull mode, the processing
time is done durring the pull, so pull-post is the right hook. The
synchronization will happen after the pull has ended. Note that
GstBaseSink rarely operate in pull mode.

https://bugzilla.gnome.org/show_bug.cgi?id=788431
2017-10-30 15:33:15 -04:00
Thibault Saunier
bd73551cc0 leaks: Handle subclasses in filters even for unhandled/lazy loaded types
Using typename in the set of unhandled types instead of the quark so
that we also handle subclasses as with other filters.
2017-05-20 15:42:16 +02:00
Nicolas Dufresne
d143af2c77 Remove plugin specific static build option
Static and dynamic plugins now have the same interface. The standard
--enable-static/--enable-shared toggle are sufficient.
2017-05-16 13:29:38 -04:00
Stefan Sauer
a5246f91af gstrusage: explicitly register to hooks
We were attaching to any probe point to take rusage samples. The new refcount
hooks are called way too frequently though to make this still feasible.
2016-12-21 22:19:51 +01:00
Nirbheek Chauhan
97f39cae63 meson: Derive defines from header/function names
This is what Autoconf already does for us, so just do this. Avoids
people making typos while adding header or function checks. Because we
use a config.h.meson, such typos won't even be noticed.

Also, starting from Meson 0.36.0, the XCode 8 workaround that we use for
clock_gettime is no longer needed.
2016-12-21 23:51:36 +05:30
Stefan Sauer
11cc260448 latency: the latency is not an aggregated value
The logged latencies are individual meassurements.
2016-12-20 21:07:14 +01:00
Thibault Saunier
29f0a79880 leaks: Allow user to set the flags to use to retrieve stack traces
https://bugzilla.gnome.org/show_bug.cgi?id=775541
2016-12-20 15:29:10 -03:00
Thibault Saunier
30133909ce leaks: Allow tracing Gst(Mini)Object reffing operations
It makes it much simpler to later debug refcount issues.

https://bugzilla.gnome.org/show_bug.cgi?id=775541
2016-12-20 15:29:10 -03:00
Thibault Saunier
32b17a8f3d leaks: Allow passing a GstStructure to configure the tracer
But keep understanding the simple synthax with a comma separated
list of filters

https://bugzilla.gnome.org/show_bug.cgi?id=775541
2016-12-20 15:29:10 -03:00
Stefan Sauer
1bfd04a5fe tracers/stats: log optional fields instead of GST_CLOCK_TIME_NONE
Simplify the traces and avoid trace analyzer to know that ((1<<64) - 1) means
we had no value.
2016-12-16 15:55:21 +01:00
Thibault Saunier
33616d47be info: Add a 'flags' parametter to gst_debug_get_stack_trace
This is an API break but that API has not been released yet.

We are passing a flag rather than a simple boolean as we can imagine
to implement more features in the future for example to retrieve a
stack trace for all the threads, etc..

Retrieving source file and line numbers is pretty
expensive while getting a stack trace, this new argument
allows the user to decide to retrieve a backtrace
without those infos instead which is much faster.

For example running $ GST_LEAKS_TRACER_STACK_TRACE=1 GST_DEBUG=GST_TRACER:7 \
GST_TRACERS=leaks time gst-launch-1.0 videotestsrc num-buffers=1 ! fakesink:

* With simple stack traces:

    0.04s user 0.02s system 99% cpu 0.060 total

* With full stack traces:

    0.66s user 0.23s system 96% cpu 0.926 total

https://bugzilla.gnome.org/show_bug.cgi?id=775423
2016-12-12 15:06:20 -03:00
Thibault Saunier
16bd0e7bac meson: Fix build 2016-12-09 19:31:51 -03:00
Thibault Saunier
bd5d43e8f9 meson: Support building with Gst debug disabled 2016-12-09 17:57:10 -03:00
Stefan Sauer
a25453c2c6 tracers/log: log more detail
Log the objects like we would in GST_TRACE_OBJECT. Add the hook function into
the fucntion field.
2016-12-08 22:03:19 +01:00
Stefan Sauer
8d819a51b8 tracer/log: fix hook prototype
s/GstElement/GstPad/
2016-12-08 22:02:17 +01:00
Stefan Sauer
cfb6c7d4f5 tracer/latency: clear qdata
When reading the qdata, clear it to avoid it being read and unreffed again.
Fixes #774332
2016-12-07 21:53:49 +01:00
Stefan Sauer
788c0d220a tracers/log: log messages in message category 2016-12-04 12:15:54 +01:00
Thibault Saunier
85179a674f tracers: leaks: Use the new gst_debug_get_stack_trace
And remove the local implementation of it.

https://bugzilla.gnome.org/show_bug.cgi?id=772555
2016-11-04 14:22:05 -03:00
Thibault Saunier
a8d4857555 gst: Use libunwind/libdw to generate backtraces if avalaible
Making the gst_debug_print_trace function more generally useful.

API:
  + gst_debug_get_trace

https://bugzilla.gnome.org/show_bug.cgi?id=772555
2016-11-04 14:22:05 -03:00
Thibault Saunier
2c6dd70217 stats: Fix warning 2016-10-14 17:30:01 +02:00
Vincent Penquerc'h
18d5d118ab tracers: fix structure leak
https://bugzilla.gnome.org/show_bug.cgi?id=772851
2016-10-13 13:06:40 +01:00