ctf: add metadata decoder config. and `strict-metadata` param in src.ctf.fs
authorPhilippe Proulx <eeppeliteloop@gmail.com>
Wed, 14 Jun 2017 15:15:00 +0000 (11:15 -0400)
committerJérémie Galarneau <jeremie.galarneau@efficios.com>
Wed, 14 Jun 2017 22:09:41 +0000 (18:09 -0400)
commit53ac34280b8e354671b94046b4cb39a643931926
treeb12f6d14367f2e90400fefe7a461a5125941d8e0
parent8d9f9e97f8ec3fd205745e3c49c283e614623db1
ctf: add metadata decoder config. and `strict-metadata` param in src.ctf.fs

The common metadata decoder now accepts an optional configuration
structure. The offset (seconds and nanoseconds) to apply to all the
clock classes is found in there, as well as a new option which makes the
decoder strict. In strict mode, the decoder does not allow the decoded
metadata stream to be off semantically. For example, in strict mode,
clock classes named `monotonic` are not forced to be absolute when it is
detected that the stream was produced by an LTTng tracer.

It's not expected that the strict mode be something that any user would
want under normal conditions because the non-strict mode fixes errors
made by known tracers to make things work for the other components of
the graph. As such, there's no quick --strict option in the CLI's
`convert` command: the user can instantiate its own source.ctf.fs
component with --component for this and pass the options with --params:

    babeltrace -c src.ctf.fs --path ~/my-traces/trace -p strict-metadata=yes

I'm also fixing the parameter names and types for the clock class
offsets, both in the CLI and in source.ctf.fs, so that all the project's
modules are in sync regarding this. The parameters are now
`clock-class-offset-s` and `clock-class-offset-ns`, and with the
`convert` command, they are set with resp. --clock-offset and
--clock-offset-ns. They used to be passed to the `run` command as string
values (using --key and --value), but now they are part of the
component's --params option so that they are recognized as constant
integer values (even if negative).

Signed-off-by: Philippe Proulx <eeppeliteloop@gmail.com>
Signed-off-by: Jérémie Galarneau <jeremie.galarneau@efficios.com>
cli/babeltrace-cfg-cli-args.c
plugins/ctf/common/metadata/ast.h
plugins/ctf/common/metadata/decoder.c
plugins/ctf/common/metadata/decoder.h
plugins/ctf/common/metadata/visitor-generate-ir.c
plugins/ctf/fs-src/fs.c
plugins/ctf/fs-src/fs.h
plugins/ctf/fs-src/metadata.c
plugins/ctf/fs-src/metadata.h
plugins/ctf/lttng-live/metadata.c
This page took 0.026459 seconds and 4 git commands to generate.