]>
git.lttng.org Git - lttng-tools.git/log
Jérémie Galarneau [Tue, 30 Jul 2024 20:00:15 +0000 (20:00 +0000)]
relayd: session.cpp: iterate on rcu list using rcu_list_iteration_adapter
Change-Id: I9cfca29e54873c696ef6b8c84454e77e299ddd10
Signed-off-by: Jérémie Galarneau <jeremie.galarneau@efficios.com>
Jérémie Galarneau [Tue, 30 Jul 2024 19:58:10 +0000 (19:58 +0000)]
relayd: live.cpp: iterate on rcu list using rcu_list_iteration_adapter
Change-Id: I89824eb36bb317a424880f34dc962cf7b1eca1ed
Signed-off-by: Jérémie Galarneau <jeremie.galarneau@efficios.com>
Jérémie Galarneau [Tue, 30 Jul 2024 19:43:01 +0000 (19:43 +0000)]
relayd: main.cpp: iterate on rcu list using rcu_list_iteration_adapter
Change-Id: Id3070b39458b3e44185875c87dca069c2dbb6ed6
Signed-off-by: Jérémie Galarneau <jeremie.galarneau@efficios.com>
Jérémie Galarneau [Tue, 30 Jul 2024 19:34:23 +0000 (19:34 +0000)]
urcu: add rcu_list_iteration_adapter
Like its list_iteration_adapter counterpart, this utility allows
the iteration over cds_list structures and provides ranged-for
semantics.
This utility differs in that it provides an RCU-protected iteration
over the list.
Change-Id: I810126ee5e099a6e6bb15509d00efa0ebfa56e73
Signed-off-by: Jérémie Galarneau <jeremie.galarneau@efficios.com>
Jérémie Galarneau [Tue, 30 Jul 2024 15:33:33 +0000 (15:33 +0000)]
sessiond: save.cpp: iterate on list using list_iteration_adapter
Change-Id: Ib413d1bf87c4c557c049c3ee329e9255525f7666
Signed-off-by: Jérémie Galarneau <jeremie.galarneau@efficios.com>
Jérémie Galarneau [Tue, 30 Jul 2024 03:35:47 +0000 (03:35 +0000)]
sessiond: cmd.cpp: iterate on list using list_iteration_adapter
Change-Id: I79eeaad0b57da7d7650ca77c26a781d44b3a8152
Signed-off-by: Jérémie Galarneau <jeremie.galarneau@efficios.com>
Jérémie Galarneau [Tue, 30 Jul 2024 03:26:08 +0000 (03:26 +0000)]
sessiond: buffer-registry.cpp: iterate on list using list_iteration_adapter
Change-Id: I30a861585a5c5c398f9999ab2efa687a133e09e6
Signed-off-by: Jérémie Galarneau <jeremie.galarneau@efficios.com>
Jérémie Galarneau [Tue, 30 Jul 2024 03:22:07 +0000 (03:22 +0000)]
sessiond: session.cpp: iterate on list using list_iteration_adapter
Change-Id: Ie138974d18f25db7e449a856c59bfb3be87ac06a
Signed-off-by: Jérémie Galarneau <jeremie.galarneau@efficios.com>
Jérémie Galarneau [Tue, 30 Jul 2024 03:16:18 +0000 (03:16 +0000)]
sessiond: context.cpp: iterate on list using list_iteration_adapter
Change-Id: I2e9d80dcf167d28c33d78bc269cd3e179c22f299
Signed-off-by: Jérémie Galarneau <jeremie.galarneau@efficios.com>
Jérémie Galarneau [Tue, 30 Jul 2024 03:09:39 +0000 (03:09 +0000)]
consumerd: ust-consumer.cpp: iterate on list using list_iteration_adapter
Change-Id: I90d06ef8bbe674bc91fc19f489758a8c7c07cad1
Signed-off-by: Jérémie Galarneau <jeremie.galarneau@efficios.com>
Jérémie Galarneau [Tue, 30 Jul 2024 02:59:29 +0000 (02:59 +0000)]
consumerd: kernel-consumer.cpp: iterate on list using list_iteration_adapter
Change-Id: I4464898e56cc88baa9a9b2b4c56461d95f342ac0
Signed-off-by: Jérémie Galarneau <jeremie.galarneau@efficios.com>
Jérémie Galarneau [Tue, 30 Jul 2024 02:44:58 +0000 (02:44 +0000)]
consumerd: consumer.cpp: iterate on list using list_iteration_adapter
Change-Id: Iad57a1bfdce8b2b3f14702e93f2eceb4ff535f6a
Signed-off-by: Jérémie Galarneau <jeremie.galarneau@efficios.com>
Jérémie Galarneau [Tue, 30 Jul 2024 02:35:32 +0000 (02:35 +0000)]
urcu: add list_iteration_adapter
Add a type-safe cds_list iteration adapter. Like those provided for
the lfht, this adapter provides type-safe range-for semantics for
cds_list structures.
Change-Id: I03d3b3c31911d495c9c6187000400563a3d05ad8
Signed-off-by: Jérémie Galarneau <jeremie.galarneau@efficios.com>
Jérémie Galarneau [Tue, 30 Jul 2024 01:38:23 +0000 (01:38 +0000)]
consumerd: ust-consumer.cpp: iterate on lfht using lfht_filtered_iteration_adapter
Change-Id: If4f54d8e79a8eb68e2214d3182150b974b806398
Signed-off-by: Jérémie Galarneau <jeremie.galarneau@efficios.com>
Jérémie Galarneau [Tue, 30 Jul 2024 01:26:10 +0000 (01:26 +0000)]
consumerd: consumer.cpp: iterate on lfht using lfht_filtered_iteration_adapter
Change-Id: I6f7e66d8446e1ebc05679a61fd190053f252902f
Signed-off-by: Jérémie Galarneau <jeremie.galarneau@efficios.com>
Jérémie Galarneau [Mon, 29 Jul 2024 20:45:36 +0000 (20:45 +0000)]
consumerd: consumer-timer.cpp: iterate on lfht using lfht_filtered_iteration_adapter
Change-Id: I3fc6eab351d901379e2ebcbf81e98d7b54c09586
Signed-off-by: Jérémie Galarneau <jeremie.galarneau@efficios.com>
Jérémie Galarneau [Mon, 29 Jul 2024 20:26:13 +0000 (20:26 +0000)]
consumerd: consumer-stream.cpp: iterate on lfht using lfht_filtered_iteration_adapter
Change-Id: I625c1a942fc7aa635d78a62cf468b17651596412
Signed-off-by: Jérémie Galarneau <jeremie.galarneau@efficios.com>
Jérémie Galarneau [Mon, 29 Jul 2024 20:23:47 +0000 (20:23 +0000)]
urcu: add lfht_filtered_iteration_adapter helper
The urcu lfht macros often make use of caa_container_of (and other equivalent
variations) which use offsetof. Unfortunately, offsetof is conditionally
supported by compilers for non-POD types.
The tree already has lttng::utils::container_of to work around this
problem. This new utils makes it possible to iterate on the
elements of an lfht that match a given key without using those macros. Those iterations are the
main reason such warnings are emitted. The interface of
lfht_filtered_iteration_adapter also allows the use of ranged-for loops.
Change-Id: I9acd3fa9f6523de8006bc9107bcca6b6b654d6fa
Signed-off-by: Jérémie Galarneau <jeremie.galarneau@efficios.com>
Jérémie Galarneau [Fri, 26 Jul 2024 21:54:59 +0000 (21:54 +0000)]
consumerd: consumer.cpp: iterate on lfht using lfht_iteration_adapter
Change-Id: Icecd70d1023847b1489b298e4c04625bac4ebcc9
Signed-off-by: Jérémie Galarneau <jeremie.galarneau@efficios.com>
Jérémie Galarneau [Fri, 26 Jul 2024 21:49:06 +0000 (21:49 +0000)]
consumerd: ust-consumer.cpp: iterate on lfht using lfht_iteration_adapter
Change-Id: Idbbfd6be4666bca420faf408241f5f195818981a
Signed-off-by: Jérémie Galarneau <jeremie.galarneau@efficios.com>
Jérémie Galarneau [Fri, 26 Jul 2024 21:47:36 +0000 (21:47 +0000)]
common: fd-tracker.cpp: iterate on lfht using lfht_iteration_adapter
Change-Id: Ic28cf4f9a8534540f2e28dd5d69a146367280a9b
Signed-off-by: Jérémie Galarneau <jeremie.galarneau@efficios.com>
Jérémie Galarneau [Fri, 26 Jul 2024 21:44:20 +0000 (21:44 +0000)]
common: trace-chunk.cpp: iterate on lfht using lfht_iteration_adapter
Change-Id: Ia05a6b974a9bafac993de76a781a22be487e94cd
Signed-off-by: Jérémie Galarneau <jeremie.galarneau@efficios.com>
Jérémie Galarneau [Fri, 26 Jul 2024 21:31:00 +0000 (21:31 +0000)]
sessiond: ust-registry-session.cpp: iterate on lfht using lfht_iteration_adapter
Change-Id: I0bc5ff2754be9ba417c6fa16535cf20cd23875f3
Signed-off-by: Jérémie Galarneau <jeremie.galarneau@efficios.com>
Jérémie Galarneau [Fri, 26 Jul 2024 21:20:18 +0000 (21:20 +0000)]
sessiond: ust-registry-channel.cpp: iterate on lfht using lfht_iteration_adapter
Change-Id: Ie415952021ef795259b9290e4b16d68051403524
Signed-off-by: Jérémie Galarneau <jeremie.galarneau@efficios.com>
Jérémie Galarneau [Fri, 26 Jul 2024 21:11:16 +0000 (21:11 +0000)]
sessiond: tracker.cpp: iterate on lfht using lfht_iteration_adapter
Change-Id: I96b0cd3bfe84357f9ec09d254a6d7f8757c52c69
Signed-off-by: Jérémie Galarneau <jeremie.galarneau@efficios.com>
Jérémie Galarneau [Fri, 26 Jul 2024 21:07:41 +0000 (21:07 +0000)]
sessiond: trace-ust.cpp: iterate on lfht using lfht_iteration_adapter
Change-Id: I5f87aebb6d8e4fc0ef6a4088faf0b7b1a84f37d0
Signed-off-by: Jérémie Galarneau <jeremie.galarneau@efficios.com>
Jérémie Galarneau [Fri, 26 Jul 2024 20:55:53 +0000 (20:55 +0000)]
sessiond: snapshot.cpp: iterate on lfht using lfht_iteration_adapter
Change-Id: I826575008b4ba2d828ad5ac52dc28d78ccca5e7d
Signed-off-by: Jérémie Galarneau <jeremie.galarneau@efficios.com>
Jérémie Galarneau [Fri, 26 Jul 2024 20:53:58 +0000 (20:53 +0000)]
sessiond: session.cpp: iterate on lfht using lfht_iteration_adapter
Change-Id: I2deae4866e0664e32cc40b891fc9e19b9936d66e
Signed-off-by: Jérémie Galarneau <jeremie.galarneau@efficios.com>
Jérémie Galarneau [Fri, 26 Jul 2024 20:51:42 +0000 (20:51 +0000)]
sessiond: save.cpp: iterate on lfht using lfht_iteration_adapter
Change-Id: I760ad9294584718e308775af65279688c2f58c65
Signed-off-by: Jérémie Galarneau <jeremie.galarneau@efficios.com>
Jérémie Galarneau [Fri, 26 Jul 2024 20:47:01 +0000 (20:47 +0000)]
sessiond: rotation-thread.cpp: iterate on lfht using lfht_iteration_adapter
Change-Id: I00f293b25e8747058c643ba63c07813a8d9a24ec
Signed-off-by: Jérémie Galarneau <jeremie.galarneau@efficios.com>
Jérémie Galarneau [Fri, 26 Jul 2024 20:43:11 +0000 (20:43 +0000)]
sessiond: manage-kernel.cpp: iterate on lfht using lfht_iteration_adapter
Change-Id: Id6a47ca1971f48dec5563085fa9e5affd48a1567
Signed-off-by: Jérémie Galarneau <jeremie.galarneau@efficios.com>
Jérémie Galarneau [Fri, 26 Jul 2024 20:41:58 +0000 (20:41 +0000)]
sessiond: lttng-syscall.cpp: iterate on lfht using lfht_iteration_adapter
Change-Id: Ib4439701c48b64b2244b346c86c7b1abb55503c4
Signed-off-by: Jérémie Galarneau <jeremie.galarneau@efficios.com>
Jérémie Galarneau [Fri, 26 Jul 2024 20:38:54 +0000 (20:38 +0000)]
sessiond: notification-thread-events.cpp: iterate on lfht using lfht_iteration_adapter
Change-Id: I15de31ca184c255b4a7540c2bf15f90ddf633da0
Signed-off-by: Jérémie Galarneau <jeremie.galarneau@efficios.com>
Jérémie Galarneau [Fri, 26 Jul 2024 20:32:36 +0000 (20:32 +0000)]
sessiond: kernel.cpp: iterate on lfht using lfht_iteration_adapter
Change-Id: Ib129073617fc79c0dc9844129e637cac3d715598
Signed-off-by: Jérémie Galarneau <jeremie.galarneau@efficios.com>
Jérémie Galarneau [Fri, 26 Jul 2024 20:16:02 +0000 (20:16 +0000)]
sessiond: event.cpp: iterate on lfht using lfht_iteration_adapter
Change-Id: I12292f505e9f867898c92bcf6cbd81c10204d5d8
Signed-off-by: Jérémie Galarneau <jeremie.galarneau@efficios.com>
Jérémie Galarneau [Fri, 26 Jul 2024 20:07:03 +0000 (20:07 +0000)]
sessiond: event-notifier-error-accounting.cpp: iterate on lfht using lfht_iteration_adapter
Change-Id: I8a4486f86e634187439b8e6c13fdd1a52fd051de
Signed-off-by: Jérémie Galarneau <jeremie.galarneau@efficios.com>
Jérémie Galarneau [Fri, 26 Jul 2024 19:52:38 +0000 (19:52 +0000)]
sessiond: context.cpp: iterate on lfht using lfht_iteration_adapter
Change-Id: Idbcd23b281188732f1746e9f1f911c527b1f0903
Signed-off-by: Jérémie Galarneau <jeremie.galarneau@efficios.com>
Jérémie Galarneau [Fri, 26 Jul 2024 19:51:14 +0000 (19:51 +0000)]
sessiond: consumer.cpp: iterate on lfht using lfht_iteration_adapter
Change-Id: Ie970c9da116aa7daa87287366dc4935353152bbb
Signed-off-by: Jérémie Galarneau <jeremie.galarneau@efficios.com>
Jérémie Galarneau [Fri, 26 Jul 2024 19:47:06 +0000 (19:47 +0000)]
sessiond: cmd.cpp: iterate on lfht using lfht_iteration_adapter
Change-Id: I6118ba8c0b5177f4c82b3c2bac77e9bc2eefecc1
Signed-off-by: Jérémie Galarneau <jeremie.galarneau@efficios.com>
Jérémie Galarneau [Fri, 26 Jul 2024 19:39:32 +0000 (19:39 +0000)]
sessiond: buffer-registry.cpp: iterate on lfht using lfht_iteration_adapter
Change-Id: I75daca3d9556c36bf2f08ec2c4c0184f2a2939e6
Signed-off-by: Jérémie Galarneau <jeremie.galarneau@efficios.com>
Jérémie Galarneau [Fri, 26 Jul 2024 19:30:31 +0000 (19:30 +0000)]
sessiond: agent.cpp: iterate on lfht using lfht_iteration_adapter
Change-Id: I4c590968f244bbffc4f685a611bfc8ec28c46688
Signed-off-by: Jérémie Galarneau <jeremie.galarneau@efficios.com>
Jérémie Galarneau [Fri, 26 Jul 2024 19:18:59 +0000 (19:18 +0000)]
sessiond: agent-thread.cpp: iterate on lfht using lfht_iteration_adapter
Change-Id: I059c11d8820ffb8416f265a59e21b66d884d722d
Signed-off-by: Jérémie Galarneau <jeremie.galarneau@efficios.com>
Jérémie Galarneau [Fri, 26 Jul 2024 19:17:26 +0000 (19:17 +0000)]
relayd: viewer-stream.cpp: iterate on lfht using lfht_iteration_adapter
Change-Id: Idd3de68df6d9a81b3b04d8bc36a24aad14333916
Signed-off-by: Jérémie Galarneau <jeremie.galarneau@efficios.com>
Jérémie Galarneau [Fri, 26 Jul 2024 19:15:48 +0000 (19:15 +0000)]
relayd: viewer-session.cpp: iterate on lfht using lfht_iteration_adapter
Change-Id: Ice79de9905f6fd374c6de897541ac7915a3f8231
Signed-off-by: Jérémie Galarneau <jeremie.galarneau@efficios.com>
Jérémie Galarneau [Fri, 26 Jul 2024 19:13:44 +0000 (19:13 +0000)]
relayd: stream.cpp: iterate on lfht using lfht_iteration_adapter
Change-Id: I42d455ed488a5992705a5e59ac55104da948b592
Signed-off-by: Jérémie Galarneau <jeremie.galarneau@efficios.com>
Jérémie Galarneau [Fri, 26 Jul 2024 19:11:51 +0000 (19:11 +0000)]
relayd: session.cpp: iterate on lfht using lfht_iteration_adapter
Change-Id: I113be144c1a7da100106b12d85a244f603472fed
Signed-off-by: Jérémie Galarneau <jeremie.galarneau@efficios.com>
Jérémie Galarneau [Fri, 26 Jul 2024 19:06:54 +0000 (19:06 +0000)]
relayd: main.cpp: iterate on lfht using lfht_iteration_adapter
Change-Id: Ibe839a6733432e2ed464e1785569ed92087cf329
Signed-off-by: Jérémie Galarneau <jeremie.galarneau@efficios.com>
Jérémie Galarneau [Fri, 26 Jul 2024 19:02:49 +0000 (19:02 +0000)]
sessiond: ust-app.cpp: iterate on lfht using lfht_iteration_adapter
Change-Id: Ibe4990750a371f67d41b02061500ab8b1cdbe60e
Signed-off-by: Jérémie Galarneau <jeremie.galarneau@efficios.com>
Jérémie Galarneau [Wed, 24 Jul 2024 20:07:09 +0000 (20:07 +0000)]
relayd: live.cpp: iterate on lfht using lfht_iteration_adapter
Change-Id: Id738d57f3bdfc26e08dc865dfdfed06834a09bc7
Signed-off-by: Jérémie Galarneau <jeremie.galarneau@efficios.com>
Jérémie Galarneau [Wed, 24 Jul 2024 18:22:22 +0000 (18:22 +0000)]
Clean-up: sessiond: ust-ctl-internal: fix clang-tidy warnings
Change-Id: I797e49ed73524d19decb9fc53a5423ccfd5df7a1
Signed-off-by: Jérémie Galarneau <jeremie.galarneau@efficios.com>
Jérémie Galarneau [Wed, 24 Jul 2024 17:26:52 +0000 (17:26 +0000)]
clang-tidy: LTTNG_IOCTL_CHECK can use const return variable
clang-tidy reports:
kernel-ctl/kernel-ctl.cpp:70:9: warning: variable '_ioctl_ret' of type 'int' can be declared 'const' [misc-const-correctness]
Change-Id: I87ca5168eeca6af3e9ec459a1887493df1a51793
Signed-off-by: Jérémie Galarneau <jeremie.galarneau@efficios.com>
Jérémie Galarneau [Wed, 24 Jul 2024 17:14:44 +0000 (17:14 +0000)]
Fix: sessiond: missing include causes multiple conflicting definitions
clang-tidy reports that
/root/lttng-tools/src/bin/lttng-sessiond/ust-ctl-internal.hpp:346:3: error: redefinition of 'LTTNG_PACKED' with a different type: 'struct lttng_ust_ctl_integer_type' vs 'struct lttng_ust_ctl_consumer_channel_attr' [clang-diagnostic-error]
346 | } LTTNG_PACKED;
Indeed, that header is missing macros.hpp causing LTTNG_PACKED
to be misinterpreted.
Change-Id: I9a0ec916e7ad1c4d926f4d9a33dd6a85fb5b809c
Signed-off-by: Jérémie Galarneau <jeremie.galarneau@efficios.com>
Jérémie Galarneau [Tue, 23 Jul 2024 21:00:34 +0000 (21:00 +0000)]
clang-tidy: cppcoreguidelines-special-member-functions
clang-tidy reports an infringement of
cppcoreguidelines-special-member-functions[1] for
_scoped_rcu_read_lock, iterator, session_not_found_error,
and session_not_found_error.
The copy constructor, move constructor, and assignment operators
are deleted when they are not explicitly defined.
[1] https://isocpp.github.io/CppCoreGuidelines/CppCoreGuidelines#c21-if-you-define-or-delete-any-copy-move-or-destructor-function-define-or-delete-them-all
Change-Id: I1ec5470fed8ddf30025d7c71994bff9bafcfbf56
Signed-off-by: Jérémie Galarneau <jeremie.galarneau@efficios.com>
Jérémie Galarneau [Wed, 24 Jul 2024 15:15:22 +0000 (15:15 +0000)]
clang-tidy: remove performance-enum-size
Specifying the size of enumerators is verbose and provides dubious
performance benefits for most of our uses. Silence the warning.
Change-Id: I2dd482437f649f031b5b425d8952360bbe8ceae0
Signed-off-by: Jérémie Galarneau <jeremie.galarneau@efficios.com>
Jérémie Galarneau [Mon, 22 Jul 2024 20:12:01 +0000 (20:12 +0000)]
consumerd: lttng_consumer_channel: use lttng::utils::container_of
caa_container_of makes use of offsetof which is conditionally
supported for non-POD types. Replace its use by
lttng::utils::container_of.
Change-Id: I69a15b9ad2e086d02beabb5c5f98d54d2ebf538d
Signed-off-by: Jérémie Galarneau <jeremie.galarneau@efficios.com>
Jérémie Galarneau [Mon, 22 Jul 2024 20:09:57 +0000 (20:09 +0000)]
consumerd: lttng_consumer_stream: use lttng::utils::container_of
caa_container_of makes use of offsetof which is conditionally
supported for non-POD types. Replace its use by
lttng::utils::container_of.
Change-Id: I1b8075c3ab3bdda7a345c3278ee251c6f6ee1023
Signed-off-by: Jérémie Galarneau <jeremie.galarneau@efficios.com>
Jérémie Galarneau [Mon, 22 Jul 2024 20:03:43 +0000 (20:03 +0000)]
sessiond: iterate on ust_app_ht using lfht_iteration_adapter
offsetof conditionally support for non-POD types and is used by
the cds_lfht_for_each_[...] macros. Replace them with
lfht_iteration_adapter which also provides ranged-for semantics.
Change-Id: I7759c7e6e0ae5a83a8c3a2e98b74d3c3c1993af7
Signed-off-by: Jérémie Galarneau <jeremie.galarneau@efficios.com>
Jérémie Galarneau [Mon, 22 Jul 2024 20:05:35 +0000 (20:05 +0000)]
sessiond: ust_app_channel: use lttng::utils::container_of
caa_container_of makes use of offsetof which is conditionally
supported for non-POD types. Replace its use by
lttng::utils::container_of.
Change-Id: I29980d41d068b29a41f8148188d66a636ea5b46f
Signed-off-by: Jérémie Galarneau <jeremie.galarneau@efficios.com>
Jérémie Galarneau [Mon, 22 Jul 2024 20:01:19 +0000 (20:01 +0000)]
sessiond: ust_app_ctx: use lttng::utils::container_of
caa_container_of makes use of offsetof which is conditionally
supported for non-POD types. Replace its use by
lttng::utils::container_of.
Change-Id: I9d3616ccccd15d94447456df415ead2b9b4ff2c3
Signed-off-by: Jérémie Galarneau <jeremie.galarneau@efficios.com>
Jérémie Galarneau [Mon, 22 Jul 2024 19:59:40 +0000 (19:59 +0000)]
sessiond: delete_ust_app_channel: iterate on lfht using lfht_iteration_adapter
offsetof conditionally support for non-POD types and is used by
the cds_lfht_for_each_[...] macros. Replace them with
lfht_iteration_adapter which also provides ranged-for semantics.
Change-Id: I163697d83f235f46a1d70b596a34b6e010ec4169
Signed-off-by: Jérémie Galarneau <jeremie.galarneau@efficios.com>
Jérémie Galarneau [Mon, 22 Jul 2024 19:58:33 +0000 (19:58 +0000)]
sessiond: ust_app_event: use lttng::utils::container_of
caa_container_of makes use of offsetof which is conditionally
supported for non-POD types. Replace its use by
lttng::utils::container_of.
Change-Id: Ica13ae34db7c0fd04118d0e80c7ae71b77f66ad6
Signed-off-by: Jérémie Galarneau <jeremie.galarneau@efficios.com>
Jérémie Galarneau [Mon, 22 Jul 2024 19:56:56 +0000 (19:56 +0000)]
sessiond: ust_id_tracker_node: use lttng::utils::container_of
caa_container_of makes use of offsetof which is conditionally
supported for non-POD types. Replace its use by
lttng::utils::container_of.
Change-Id: I6c45b7d5138152728f67885ac5cc00ea1bc1603a
Signed-off-by: Jérémie Galarneau <jeremie.galarneau@efficios.com>
Jérémie Galarneau [Mon, 22 Jul 2024 19:16:27 +0000 (19:16 +0000)]
Clean-up: sessiond: automatic memory management of ltt_ust_event
Simplify trace_ust_create_event by wrapping the created ltt_ust_event
in a unique_ptr until it is returned (on success).
Change-Id: I1b14df589f30d4cd19c9712b70f6c5656335123b
Signed-off-by: Jérémie Galarneau <jeremie.galarneau@efficios.com>
Jérémie Galarneau [Mon, 22 Jul 2024 19:15:32 +0000 (19:15 +0000)]
sessiond: ltt_ust_event: use lttng::utils::container_of
caa_container_of makes use of offsetof which is conditionally
supported for non-POD types. Replace its use by
lttng::utils::container_of.
Change-Id: I043c6a01ea4f96624d21bb034e545503995a2794
Signed-off-by: Jérémie Galarneau <jeremie.galarneau@efficios.com>
Jérémie Galarneau [Mon, 22 Jul 2024 19:14:18 +0000 (19:14 +0000)]
sessiond: consumer_socket: use lttng::utils::container_of
caa_container_of makes use of offsetof which is conditionally
supported for non-POD types. Replace its use by
lttng::utils::container_of.
Change-Id: I49b36b3ba7be6f4cacde7f44022db459c97bf950
Signed-off-by: Jérémie Galarneau <jeremie.galarneau@efficios.com>
Jérémie Galarneau [Mon, 22 Jul 2024 19:13:11 +0000 (19:13 +0000)]
sessiond: index_ht_entry: use lttng::utils::container_of
caa_container_of makes use of offsetof which is conditionally
supported for non-POD types. Replace its use by
lttng::utils::container_of.
Change-Id: Ic2ed13700b8258b274aef9153ebc9d2a6a3536f3
Signed-off-by: Jérémie Galarneau <jeremie.galarneau@efficios.com>
Jérémie Galarneau [Mon, 22 Jul 2024 19:12:15 +0000 (19:12 +0000)]
sessiond: ust_error_accounting_entry: use lttng::utils::container_of
caa_container_of makes use of offsetof which is conditionally
supported for non-POD types. Replace its use by
lttng::utils::container_of.
Change-Id: I8b9167ad2e8100ed9a9f99d2ef23a8859713838d
Signed-off-by: Jérémie Galarneau <jeremie.galarneau@efficios.com>
Jérémie Galarneau [Mon, 22 Jul 2024 19:11:32 +0000 (19:11 +0000)]
sessiond: ust_channel: use lttng::utils::container_of
caa_container_of makes use of offsetof which is conditionally
supported for non-POD types. Replace its use by
lttng::utils::container_of.
Change-Id: Ib00bfa536d9412824d49f7c8bff429b0aa03762e
Signed-off-by: Jérémie Galarneau <jeremie.galarneau@efficios.com>
Jérémie Galarneau [Mon, 22 Jul 2024 19:10:37 +0000 (19:10 +0000)]
sessiond: buffer_reg_uid: use lttng::utils::container_of
caa_container_of makes use of offsetof which is conditionally
supported for non-POD types. Replace its use by
lttng::utils::container_of.
Change-Id: I96a42df9c82ad6b520d3b53a6445159bce692120
Signed-off-by: Jérémie Galarneau <jeremie.galarneau@efficios.com>
Jérémie Galarneau [Mon, 22 Jul 2024 19:09:53 +0000 (19:09 +0000)]
sessiond: agent_event: use lttng::utils::container_of
caa_container_of makes use of offsetof which is conditionally
supported for non-POD types. Replace its use by
lttng::utils::container_of.
Change-Id: I28f5b7db71ce0c7a7d0ff367d88a8350bd66d988
Signed-off-by: Jérémie Galarneau <jeremie.galarneau@efficios.com>
Jérémie Galarneau [Mon, 22 Jul 2024 19:08:47 +0000 (19:08 +0000)]
relayd: viewer_stream: use lttng::utils::container_of
caa_container_of makes use of offsetof which is conditionally
supported for non-POD types. Replace its use by
lttng::utils::container_of.
Change-Id: Ied676a7003749a82b0ae4eeb8a1bcedb0e081673
Signed-off-by: Jérémie Galarneau <jeremie.galarneau@efficios.com>
Jérémie Galarneau [Mon, 22 Jul 2024 19:08:00 +0000 (19:08 +0000)]
sessiond: relay_session: use lttng::utils::container_of
caa_container_of makes use of offsetof which is conditionally
supported for non-POD types. Replace its use by
lttng::utils::container_of.
Change-Id: I0fb69c7132665ea0ee3067445884ec1115ba9872
Signed-off-by: Jérémie Galarneau <jeremie.galarneau@efficios.com>
Jérémie Galarneau [Mon, 22 Jul 2024 19:04:48 +0000 (19:04 +0000)]
relayd: use lfht_iteration_adapter to iterate on stream indices
offsetof conditionally support for non-POD types and is used by
the cds_lfht_for_each_[...] macros. Replace them with
lfht_iteration_adapter which also provides ranged-for semantics.
Change-Id: Id1460004322e1e778a1affd41c82527a05190f59
Signed-off-by: Jérémie Galarneau <jeremie.galarneau@efficios.com>
Jérémie Galarneau [Mon, 22 Jul 2024 19:02:49 +0000 (19:02 +0000)]
relayd: offsetof conditionally supported for non-POD types
caa_container_of makes use of offsetof which is conditionally
supported for non-POD types. Replace its use by
lttng_ht_node_container_of.
Change-Id: If2f19ab1aba8c59cf9ca2e0d5b815a396512b2d9
Signed-off-by: Jérémie Galarneau <jeremie.galarneau@efficios.com>
Jérémie Galarneau [Wed, 17 Jul 2024 20:39:54 +0000 (20:39 +0000)]
urcu: add lfht_iteration_adapter helper
The urcu lfht macros often make use of caa_container_of (and other
equivalent variations) which use offsetof. Unfortunately, offsetof is
conditionally supported by compilers for non-POD types.
The tree already has lttng::utils::container_of to work around this
problem. This new utils makes it possible to iterate on all of the
elements of an lfht without using those macros. Those iterations are the
main reason such warnings are emitted. The interface of
lfht_iteration_adapter also allows the use of ranged-for loops.
Change-Id: I61906e025bd0dd7512f02180700f3ddb3c9cf3ca
Signed-off-by: Jérémie Galarneau <jeremie.galarneau@efficios.com>
Jérémie Galarneau [Thu, 18 Jul 2024 17:37:43 +0000 (17:37 +0000)]
sessiond: manage syscall table allocation using std::vector
Transitioning to the use of std::vector to manage the allocation and
resizing of the syscall table allows us to do away with memset() of the
syscall structure. The memset becomes problematic when lttng_ht_node_*
becomes non-POD in a follow-up change.
Change-Id: I94096782360f85ffffb0f72d188224af15e54d07
Signed-off-by: Jérémie Galarneau <jeremie.galarneau@efficios.com>
Jérémie Galarneau [Mon, 8 Jul 2024 20:14:36 +0000 (16:14 -0400)]
Fix: remove use of offset_of for ust_app_session lists
Signed-off-by: Jérémie Galarneau <jeremie.galarneau@efficios.com>
Change-Id: I17429be1ce0a48257b75532582552720aaec1e0d
Jérémie Galarneau [Mon, 8 Jul 2024 15:50:01 +0000 (11:50 -0400)]
Fix: sessiond: g++ reports shm_path truncation issue
On the CI, g++ reports:
char* strncpy(char*, const char*, size_t)' specified bound 4096 equals destination size [-Wstringop-truncation]
The shm_path provided by liblttng-ctl is truncated to PATH_MAX
regardless of its contents.
LTTN_ERR_INVALID is returned if the shm_path is not null terminated.
Signed-off-by: Jérémie Galarneau <jeremie.galarneau@efficios.com>
Change-Id: Ie369f2ee368c70e2b3b41c45a69da7e6d9fa45f8
Jérémie Galarneau [Fri, 19 Jul 2024 20:38:29 +0000 (20:38 +0000)]
Fix: relayd: incorrect use of lfht add_unique API
cds_lfht_add_unique is misused in relay_index_add_unique. The address
of the node is used instead of the address of the key for both the
key parameter and to compute the hash of the index entry's key.
This caused problems in an upcoming change that changes the layout
of the lttng_ht node since the key is no longer the first member
of the node.
Change-Id: Iec67f78b8ced4f4e520dc0dbebda8d30e283aa38
Signed-off-by: Jérémie Galarneau <jeremie.galarneau@efficios.com>
Mathieu Desnoyers [Mon, 29 Jul 2024 13:55:50 +0000 (09:55 -0400)]
Adapt to LTTng-UST ABI/control API updates
Adapt to ABI/control API updates introduced by LTTng-UST commit
24f7193c9b91 ("Introduce extension points for trace hit counters")
Note that this commit reverts back to uint32_t for channel event ids.
UST notification LTTNG_UST_CTL_NOTIFY_CMD_KEY is currently handled as
-LTTNG_UST_ERR_NOSYS (TODO).
The type of the argument to is_max_event_id() is changed to
lttng::sessiond::ust::event_id to match the newly introduced event_id
type definition. Likewise for the registry_channel _next_event_id
member.
Signed-off-by: Mathieu Desnoyers <mathieu.desnoyers@efficios.com>
Signed-off-by: Jérémie Galarneau <jeremie.galarneau@efficios.com>
Change-Id: I6299b07c02d35b067aed5e94f11353d3cc14f24c
Francis Deslauriers [Fri, 28 May 2021 20:18:05 +0000 (16:18 -0400)]
kernel: Add new counter ABI IOCTL macros
Signed-off-by: Francis Deslauriers <francis.deslauriers@efficios.com>
Signed-off-by: Jérémie Galarneau <jeremie.galarneau@efficios.com>
Depends-on: lttng-ust: I1a706cf60059c7106525cf484d4a290c38e197c7
Depends-on: lttng-modules: Ide6aa85f4fc6055b7b76604b107094373d0bf874
Change-Id: I1a1d8f265e42e68632863127721e755f7948b660
Francis Deslauriers [Fri, 28 May 2021 12:57:47 +0000 (08:57 -0400)]
sessiond: ust: Update UST definitions for counters
Update the internal ust-abi and ust-ctl headers to match LTTng-UST's
changes to support counter events.
Signed-off-by: Francis Deslauriers <francis.deslauriers@efficios.com>
Signed-off-by: Jérémie Galarneau <jeremie.galarneau@efficios.com>
Change-Id: I85fdb02710eaecebab950407d12c85ebfe27615f
Depends-on: lttng-ust: I1a706cf60059c7106525cf484d4a290c38e197c7
Jérémie Galarneau [Mon, 8 Jul 2024 15:17:52 +0000 (11:17 -0400)]
Revert "lttng-ctl: Hide symbol introduced by fix"
This reverts commit
83f2539c5c084d853308993a05999016264be90e .
The change is only needed for stable branches.
Signed-off-by: Jérémie Galarneau <jeremie.galarneau@efficios.com>
Change-Id: I0ef85d857ebc391388d43bb236db7f9fbf3c4a11
Jérémie Galarneau [Thu, 14 Mar 2024 19:01:54 +0000 (15:01 -0400)]
Clean-up: lock-file: quote lock file path in debug logging message
Signed-off-by: Jérémie Galarneau <jeremie.galarneau@efficios.com>
Change-Id: Icf2a15768414cec93a5fcfc8d8dfeec463e550a8
Jérémie Galarneau [Mon, 22 Apr 2024 19:52:28 +0000 (15:52 -0400)]
lttng-ctl: Hide symbol introduced by fix
Michael Jeanson noticed that
f94318611 mistakenly introduces a new
public symbol in liblttng-ctl.so. This change was not intended and is
due to a bad backport of a fix initially developed against the master
branch.
The master branch (and upcoming version) of LTTng-tools is built with
the -fvisibility=hidden. Hence, the initial version of the fix had no
need to hide the utils_create_lock_file symbol.
Since the supported stable releases (2.12 and 2.13) are not built with
those options, that symbol has to be explicitly marked as hidden.
Reported-by: Michael Jeanson <mjeanson@efficios.com>
Signed-off-by: Jérémie Galarneau <jeremie.galarneau@efficios.com>
Change-Id: I874538317617003eb1c58c2d3b7b0a2bdf905ef7
Jérémie Galarneau [Thu, 20 Jun 2024 18:25:21 +0000 (18:25 +0000)]
sessiond: open_packets: use user_space_consumer_channel_keys util
Replace the hand-rolled consumer channel key iteration logic of
ust_app_open_packets by an iteration on the user_space_consumer_channel_keys
returned by the ltt_session.
Change-Id: Ida9eaecbc1146764df9935ca9af9cf71d267906d
Signed-off-by: Jérémie Galarneau <jeremie.galarneau@efficios.com>
Jérémie Galarneau [Thu, 20 Jun 2024 20:07:57 +0000 (20:07 +0000)]
sessiond: clear_session: use user_space_consumer_channel_keys util
Replace the hand-rolled consumer channel key iteration logic of
ust_app_clear_session by an iteration on the user_space_consumer_channel_keys
returned by the ltt_session.
Change-Id: Id47af95d7cdad55581339c1a5319baf424848912
Signed-off-by: Jérémie Galarneau <jeremie.galarneau@efficios.com>
Jérémie Galarneau [Thu, 20 Jun 2024 17:31:20 +0000 (17:31 +0000)]
clang-tidy: apply suggested fixes
Apply FixIts proposed by clang-tidy (mostly missing 'const' qualifiers).
Change-Id: Ic616ddf6e826ee787c048de3f18aec18f9481532
Signed-off-by: Jérémie Galarneau <jeremie.galarneau@efficios.com>
Jérémie Galarneau [Thu, 13 Jun 2024 21:50:04 +0000 (21:50 +0000)]
refactor: session: provide an iterator over consumer data channel keys
The code iterating over the various data channel keys of the userspace domain is
relatively complex and repeated in many places. It is refactored to provide an
iterator that can be used in those various places.
Change-Id: I560484f63757b5da0313dd651724bbea9bbd6867
Signed-off-by: Jérémie Galarneau <jeremie.galarneau@efficios.com>
Jérémie Galarneau [Thu, 13 Jun 2024 22:00:53 +0000 (22:00 +0000)]
sessiond: ust-app: Remove unused buffer_type attribute
Change-Id: Iea510844f7d1dec439b56ab509eb510e195464d8
Signed-off-by: Jérémie Galarneau <jeremie.galarneau@efficios.com>
Jérémie Galarneau [Thu, 13 Jun 2024 21:52:18 +0000 (21:52 +0000)]
sessiond: ust_app: use RAII to manage ust_app_session locking
Like ltt_session, use the non_copyable_reference util to implement weak locked
reference helpers that are used instead of directly manipulating the
ust_app_session's pthread mutex.
Change-Id: I2c362f2b5944b3d8e089beabc07987b797bb5d36
Signed-off-by: Jérémie Galarneau <jeremie.galarneau@efficios.com>
Jérémie Galarneau [Thu, 13 Jun 2024 19:00:17 +0000 (19:00 +0000)]
hashtable: replace non-const iterator node accessors by a const version
The various lttng_ht_iter_get_node_* functions are not const-correct which makes
their use difficult in some places. This is mostly due to the fact that
cds_lfht_iter_get_node (from liburcu) is, itself, not const-correct.
These functions are replaced by a single templated function that is
const-correct by virtue of inlining the trivial iterator node accessor of
liburcu.
Change-Id: I4df87abedb1ec6b14eb52ce4c212a10805898954
Signed-off-by: Jérémie Galarneau <jeremie.galarneau@efficios.com>
Jérémie Galarneau [Wed, 29 May 2024 18:32:44 +0000 (18:32 +0000)]
clang-tidy: sessiond: superfluous static specifier
clang-tidy reports:
'get_session_registry' is a static definition in anonymous namespace; static is redundant here
Remove the redundant static specifier.
Change-Id: Iae7be221cde1f0789d3c3a560f1ea70d4d4e5e7a
Signed-off-by: Jérémie Galarneau <jeremie.galarneau@efficios.com>
Jérémie Galarneau [Wed, 29 May 2024 18:29:23 +0000 (18:29 +0000)]
clang-tidy: c_string_view: unmatched NOLINTBEGIN
clang-tidy reports:
'NOLINTBEGIN' comment without a subsequent 'NOLINTEND' comment
If a specific warning is mentionned as part of the NOLINTBEGIN clause, it must
also be mentionned in the matching NOLINTEND clause. Otherwise, clang-tidy
doesn't match them.
Change-Id: I6adef610227b162ba8a5715c3b426e4c49a1b346
Signed-off-by: Jérémie Galarneau <jeremie.galarneau@efficios.com>
Jérémie Galarneau [Tue, 28 May 2024 03:21:18 +0000 (03:21 +0000)]
sessiond: propagate the use of ltt_session::locked_ref
The mix of managed and unmanaged ltt_session references makes their use
potentially confusing. Move to managed locked references for most of the client
request processing paths.
Change-Id: Iecb1668969ba07acfd84aa25127adb0addddbf10
Signed-off-by: Jérémie Galarneau <jeremie.galarneau@efficios.com>
Jérémie Galarneau [Fri, 24 May 2024 02:09:04 +0000 (02:09 +0000)]
sessiond: introduce ltt_session::locked_ref look-up functions
Introduce ltt_session::locked_ref look-up functions and use them at the various
sites performing session look-ups by id or name.
The users of those look-up functions are refactored to make them exception-safe.
The biggest change is that process_client_msg is now exception-safe. The
functions are also moved inside of the ltt_session class as static methods. This
namespaces them implicitly.
A number of functions that expect a locked ltt_session are modified to accept an
ltt_session::locked_ref, thus enforcing the locking assumptions of the session
at compile time.
Change-Id: If9e4f8b25d03fa8d36a5898dd421da947ec4030c
Signed-off-by: Jérémie Galarneau <jeremie.galarneau@efficios.com>
Jérémie Galarneau [Wed, 15 May 2024 23:29:55 +0000 (23:29 +0000)]
Exception: make source location print-out optional
The project-specific exceptions are changed to not include the source location
as part of the exception's message (return of what()) since it is unsuitable in
some contexts (the output of the lttng client for example).
Moreover, the exceptions are modified to provide their own message formatting
instead of relying on the user doing it at the site at which it is thrown since
that formatting is often repetitive. The sites at which the exceptions are
thrown can still augment the exceptions with more context.
The intention of our exceptions is that they still contain the requisite context
to change the print-out based on their members; that context should not be baked
into the message string at the site at which the exception is thrown.
Change-Id: I2733b58d4daf6b9fffc1221c9d03ffef2e246893
Signed-off-by: Jérémie Galarneau <jeremie.galarneau@efficios.com>
Jérémie Galarneau [Wed, 22 May 2024 19:48:04 +0000 (19:48 +0000)]
sessiond: transition session_list synchronization from pthread to std
In order to allow the use of RAII to manage the locking in the client command
handler (process_client_msg), the session list's synchronization primitives are
changed to use those of libstd.
No change in behavior is intended by this change.
Change-Id: I6367e25557b05e16a48436304791cd7a37dc8904
Signed-off-by: Jérémie Galarneau <jeremie.galarneau@efficios.com>
Jérémie Galarneau [Wed, 22 May 2024 17:20:46 +0000 (17:20 +0000)]
sessiond: rename locked_ptr to locked_ref
The locked_ref semantics garantee that an instance of an is locked and that it
exists (it can't be null). It is currently implemented with a unique_ptr, but
that will most likely change in the future to enforce the non-null requirement.
Change-Id: I6442840f944ded1ddc46cad3d23e8e0fe8fef586
Signed-off-by: Jérémie Galarneau <jeremie.galarneau@efficios.com>
Jérémie Galarneau [Wed, 22 May 2024 19:12:48 +0000 (19:12 +0000)]
Clean-up: sessiond: session.hpp: remove duplicated comment
Change-Id: I65eeb7af77bf9160f94bf6f9c381aeddccb4df31
Signed-off-by: Jérémie Galarneau <jeremie.galarneau@efficios.com>
This page took 0.048329 seconds and 4 git commands to generate.