lttng-load and save are somewhat schizophrenic
It seems LTTng, when asked to load a session, reads all the files in
~/.lttng/sessions and checks their
sessions: session: name elements, stopping as soon as it gets a match. This happens regardless of the
.lttng file names. So having multiple versions of a single session file in that directory is a recipe for disaster.
lttng load and
save are a little schizophrenic in this regard: a single
.lttng file can store multiple sessions, but the only way to load them all is to use '
lttng load --all'. Conversely,
lttng save cannot create bundled sessions: '
lttng save --all' merely creates one file per session, naming each file to match its included session.
At this point, my suggestion would be to improve
lttng save to allow explicit bundling:
lttng [GENERAL OPTIONS] save [--force] [--output-path=PATH] [SESSION | SESSION_BUNDLE SESSION,SESSION...]
Trying to store the same
SESSION more than once in a
SESSION_BUNDLE would be an error. Session names using spaces or commas (if the comma is used as suggested above) will need to escape said spaces and commas.
lttng load should, when asked to load a
SESSION_BUNDLE), privilege using the corresponding
SESSION.lttng file. It should scan the remaining
.lttng files only if no filename match is found, and it should also emit an error if it finds the
SESSION in more than one
.lttng file (something which '
lttng load --all' presumably already does unless
--force is specified).
No data to display