[lttng-dev] [RFC babeltrace 0/2] fs-src: add metadata-src parameter
Alexander Aring
aring at mojatatu.com
Mon Apr 30 17:31:05 EDT 2018
Hi,
my use-case is just... we have several application with the same metadata
file. Currently I build a wrapper around babeltrace to run something like:
find $(TRACE_DIR}/* -maxdepth 1 -type d -exec cp ${PATH_TO_MY_APP_DATA}/ctf/metadata '{}' \;
which is terrible... so I try this here somehow.
As you see it has no support for fs-query and I didn't figured out yet
for what fs-query is for.
Also I was struggle some hours how to tell popt the right argument string,
it need to be:
--metadata-src=\"/usr/share/$APP_DIR/ctf\"
with the ugly escape things... I saw there is a complex INI parser system
behind (never saw such complex option parser in an open source project).
It's not easy to add such use-case because the whole code things everything
which has a metadata inside is ctf trace... and so far I know that's what
the spec and man-page says [0].
As there is no metadata file anymore needed with this parameter, it will
assume every regular file is a ctf stream, if only there is no other subdir
inside the directory. So only "leafs" regular files will be assume as a ctf
stream. If there exists regular files not as leafs - babeltrace will fail.
Also I think I still need to have a wrapper around babeltrace to specify the
metadata dir as metadata-src then... but better than this cp in front of it.
- Alex
[0] http://man7.org/linux/man-pages/man7/babeltrace-source.ctf.fs.7.html
See "trace naming".
Alexander Aring (2):
fs-src: add argument for metadata src dir
doc: man: babeltrace-source.ctf.fs.7: add metadata-src
cli/babeltrace-cfg-cli-args.c | 10 ++++
doc/man/babeltrace-source.ctf.fs.7.txt | 7 +++
plugins/ctf/fs-src/fs.c | 88 ++++++++++++++++++++++++++++------
plugins/ctf/fs-src/fs.h | 3 +-
plugins/ctf/fs-src/metadata.c | 8 +++-
plugins/ctf/fs-src/metadata.h | 1 +
plugins/ctf/fs-src/query.c | 2 +-
7 files changed, 101 insertions(+), 18 deletions(-)
--
2.11.0
More information about the lttng-dev
mailing list