Metadata: add env fields to ease lttng path hierarchy creation for viewer
authorJonathan Rajotte <jonathan.rajotte-julien@efficios.com>
Thu, 5 Sep 2019 22:23:52 +0000 (18:23 -0400)
committerJérémie Galarneau <jeremie.galarneau@efficios.com>
Thu, 5 Sep 2019 22:39:59 +0000 (18:39 -0400)
commit8de8806159d9d2544e2bc3091cc3c98abe4d97ad
tree6d1a99072f8b9ca17ca87f90f5fb747d8ec30463
parentd37856b8d3033144818786de1c5c5b898fe2946e
Metadata: add env fields to ease lttng path hierarchy creation for viewer

Add the following fields in the env section of the metadata:

  - trace_name
      The session name without datetime information.
      Hence when the session is an auto-generated one, only print
      LTTNG_DEFAULT_NAME.
  - trace_creation_datetime:
      The datetime at which the session was created.
      We use session->creation time for it.
  - tracer_buffering_scheme
      The buffering scheme used. The value can be uid or pid.
  - tracer_buffering_id
      The key used by the buffering scheme (uid/pid).
  - architecture_bit_width
      The bit width of the computer architecture (e.g 32 or 64)
  - vpid_datetime
      The registration time of the vpid for per-pid mode.

Adding these fields ensure that the trace itself carry information that
is normally carried via folder hierarchy. e.g

test-20190417-174951/                      <- trace_name, trace_creation_datetime
└── ust                                    <- domain
    └── uid                                <- tracer_buffering_scheme
        └── 1000                           <- tracer_buffering_id
            └── 64-bit                     <- architecture_bit_width
                ├── channel0_0
                ├── index
                │   ├── channel0_0.idx
                └── metadata

Per-pid buffering is quite similar.

auto-20190722-174816                        <- trace_name, trace_creation_datetime
└── ust                                     <- domain
    └── pid                                 <- tracer_buffering_scheme
        └── sample-ust-7640-20190722-174818 <- procname, tracer_buffering_id, vpid_datetime
            ├── my-channel_0
            ├── index
            │   ├── my-channel_0.idx
            ├── metadata

Signed-off-by: Jonathan Rajotte <jonathan.rajotte-julien@efficios.com>
Signed-off-by: Jérémie Galarneau <jeremie.galarneau@efficios.com>
src/bin/lttng-sessiond/ust-app.c
src/bin/lttng-sessiond/ust-metadata.c
src/bin/lttng-sessiond/ust-registry.c
src/bin/lttng-sessiond/ust-registry.h
src/common/time.c
This page took 0.028622 seconds and 4 git commands to generate.