Commit | Line | Data |
---|---|---|
aeeb48c6 JG |
1 | /* |
2 | * Copyright (C) 2022 Jérémie Galarneau <jeremie.galarneau@efficios.com> | |
3 | * | |
4 | * SPDX-License-Identifier: GPL-2.0-only | |
5 | * | |
6 | */ | |
7 | ||
c4d702e6 JR |
8 | #include <lttng/trace-format-descriptor-internal.hpp> |
9 | ||
b0f2e8db | 10 | #include "ust-registry-session-uid.hpp" |
aeeb48c6 | 11 | |
d7bfb9b0 | 12 | namespace lst = lttng::sessiond::trace; |
b0f2e8db | 13 | namespace lsu = lttng::sessiond::ust; |
d7bfb9b0 | 14 | |
c4d702e6 | 15 | lsu::registry_session_per_uid::registry_session_per_uid(const struct lst::abi& in_abi, |
aeeb48c6 JG |
16 | uint32_t major, |
17 | uint32_t minor, | |
18 | const char *root_shm_path, | |
19 | const char *shm_path, | |
20 | uid_t euid, | |
21 | gid_t egid, | |
22 | uint64_t tracing_id, | |
c4d702e6 JR |
23 | uid_t tracing_uid, |
24 | const lttng::trace_format_descriptor& trace_format) : | |
25 | registry_session{in_abi, major, minor, root_shm_path, shm_path, euid, egid, tracing_id, | |
26 | trace_format}, | |
aeeb48c6 JG |
27 | _tracing_uid{tracing_uid} |
28 | { | |
d7bfb9b0 JG |
29 | lttng::pthread::lock_guard registry_lock(_lock); |
30 | _generate_metadata(); | |
aeeb48c6 JG |
31 | } |
32 | ||
b0f2e8db | 33 | lttng_buffer_type lsu::registry_session_per_uid::get_buffering_scheme() const noexcept |
aeeb48c6 JG |
34 | { |
35 | return LTTNG_BUFFER_PER_UID; | |
36 | } | |
d7bfb9b0 | 37 | |
eb5e469d | 38 | void lsu::registry_session_per_uid::accept(lst::trace_class_environment_visitor& visitor) const |
d7bfb9b0 | 39 | { |
eb5e469d | 40 | registry_session::accept(visitor); |
d7bfb9b0 JG |
41 | visitor.visit(lst::environment_field<int64_t>("tracer_buffering_id", _tracing_uid)); |
42 | } |