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 21:38:08 +0000 (17:38 -0400)
commita2a545450763347fd1c1e5c089a296238e1cbc11
treea8d57d359d0b6421b460c178db26ed6899d6d896
parentbe1546bde135e26e1e43e31361d318108f31a89f
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.025648 seconds and 4 git commands to generate.