Commit graph

39 commits

Author SHA1 Message Date
Thibault Saunier f040102d45 docs: Add tracers support 2019-05-31 18:53:43 -04: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
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 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
Stefan Sauer ec75b68984 tracerrecord: don't leak the spec structures
Change the gst_tracer_record_new() api to take the parameters the make the
spec structure directly. This allows us to own the top-level structure and
also collect the args so that we can take ownership of the sub-structures.

https://bugzilla.gnome.org/show_bug.cgi?id=760821
2016-01-22 10:07:26 +01:00
Stefan Sauer f69382c5f9 tracer/gststats: fix mismatch between '.class' and tracer args
Clean up from the recent changes. The logging descriptiors did not match what we logged.
2016-01-20 09:14:12 +01:00
Tim-Philipp Müller 8641d7c911 tracers: fix thread-id casts to 64-bit ints on 32-bit systems
https://bugzilla.gnome.org/show_bug.cgi?id=760762
2016-01-18 11:28:28 +00:00
Stefan Sauer 84554af301 tracer/stats: use the right log template
When porting we used the wrong record (copy and paste).
2016-01-16 21:23:10 +01:00
Stefan Sauer af91d23204 tracer: use the new flags to create the optional field in the format string
This spares us explicitly listing the field in the spec. and thus hide this
implementation detail.
2016-01-16 19:21:00 +01:00
Stefan Sauer 8cd76a918a tracer: add a GstTracerValueFlags and replace strings
This allows us to document the flags and makes the logs a bit smaller.
2016-01-16 18:52:32 +01:00
Stefan Sauer 89ee5d948d tracer: add a GFlag for the tracer scope
Port all tracers. Add the GST_USE_UNSTABLE_API flag to the internal CFLAGS so
that we don't have to specify this for gir, docs, mkenum, ...
2016-01-16 13:31:51 +01:00
Stefan Sauer 10b78d872b tracerrecord: add a log record class
We use this class to register tracer log entry metadata and build a log
template. With the log template we can serialize log data very efficiently.
This also simplifies the logging code, since that is now a simple varargs
function that is not exposing the implementation details.

Add docs for the new class and basic tests.

Remove the previous log handler.

Fixes #760267
2016-01-15 21:54:01 +01:00
Stefan Sauer 30741e0206 tracers: code clean ups
Drop some trailing whilespace. Make field order consistent.
2016-01-10 14:30:05 +01:00
Stefan Sauer 2f41e7bc6a tracer: harmonize the query hooks
In post hooks always pass the return value as the last param. Pass the query
also to post hooks since it is still alive.
2016-01-07 23:03:48 +01:00
Stefan Sauer fb249dadcb tracers/stats: add missing parameters to callback functions 2016-01-07 22:47:37 +01:00
Thiago Santos cf5e7c03c2 stats: log the element-new hook properly
To be able to get the time the elements were created instead of
just logging them without a time
2015-10-29 07:27:35 -03:00
Thiago Santos 7c5f7173c8 tracers: stats: add message structure to output
The name of the message is not enough. For example, state-change
is not enough to know the transition.

https://bugzilla.gnome.org/show_bug.cgi?id=754496
2015-10-05 19:06:41 -03:00
Thiago Santos 0913f699e2 tracer: gststats: add thread-id to log line 2015-10-05 20:59:39 +02:00
Thiago Santos 567865c81c tracer: add pad query hooks 2015-10-05 20:59:39 +02:00
Stefan Sauer e5eb05741b stats: TIMESTAMP -> PTS 2015-10-05 20:59:39 +02:00
Stefan Sauer 660049bb38 tracing: rename the global api to gst_tracing
This makes it more obvious what is the api for tracer elements and what is api
for the global state.
2015-10-05 20:59:39 +02:00
Stefan Sauer 5e2770566f tracers: eliminate var_args
Register tracer hooks as GCallback. Use macros for hook dispatch and cast the
hook functions back to the appropriate type.
2015-10-05 20:59:39 +02:00
Stefan Sauer b10b10cf1e tracers: code cleanups
Move static variables to instance variables. Add finalize methods. Remove code
that is commented out. Cleanup locking code.
2015-10-05 20:59:39 +02:00
Stefan Sauer 4881d1c16c tracer: use GQuark or strings for the hook id
This way one can define new tracing probes without changing the core. We are
using our own quark table, as 1) we only want to initialize them if we're
tracing, 2) we want to share them with the tracers.
2015-10-05 20:59:39 +02:00
Stefan Sauer 1a3e218b89 tracer: simplify hook api
Instead of a single invoke() function and a 'mask', register to individual
hooks. This avoids one level of indirection and allows us to remove the
hook enums. The message enms are now renamed to hook enums.
2015-10-05 20:59:39 +02:00
Stefan Sauer 7b24d76260 tracer: drop the HookId hid from the invoke method
The MessageId is more detailed and anyway needed to interpret the varargs.
2015-10-05 20:59:39 +02:00
Stefan Sauer 4ab1e6e3f7 stats: fixup doc name and remove commented code 2015-10-05 20:59:39 +02:00
Stefan Sauer 4f6f8cb811 tracers: add metadata for the logged values 2015-10-05 20:59:39 +02:00
Stefan Sauer 6ea2b41364 docs: add gtk-doc blobs 2015-10-05 20:59:39 +02:00
Stefan Sauer 7dfc0a8ead tracers: add a logging helper to remove identical copies from the tracers 2015-10-05 20:59:39 +02:00
Stefan Sauer 635a4b5c00 tracers: tweak the get_real_pad_parent()
By using the we ended up on the actual element, not the parent.
2015-10-05 20:59:39 +02:00
Stefan Sauer 0c26387e62 stats: improve the handling of parentage
Log new object after we did the check for parents.
2015-10-05 20:59:39 +02:00
Stefan Sauer b8eef6ba2c stats: add a stats frontend
Parse the log and collect data from tracer messages.
2015-10-05 20:59:39 +02:00
Stefan Sauer ce7ce2d866 tracer: add more hooks and handle it in the plugins 2015-10-05 20:59:39 +02:00
Stefan Sauer 37721fdc9d stats: handle buffer lists 2015-10-05 20:59:39 +02:00
Stefan Sauer 11d6e13d73 tracer: use a macros for the enabled check
Avoid a function call and check the variables from the macro.
2015-10-05 20:59:39 +02:00
Stefan Sauer 9d3975b5da tracer: pass the timestamp directly
Avoid the structure mashalling (and weird field naming).
2015-10-05 20:59:39 +02:00
Stefan Sauer d663b78612 stats: add a tracer that collects pipeline statistics
This is more or less equiv to the the statistics in gst-tracelib.
2015-10-05 20:59:39 +02:00