return raw_offset &= ~0b1;
}
#else /* defined(__arm__) || defined(__aarch64__) */
-static inline uint64_t sanitize_uprobe_offset(uint64_t raw_offset)
+inline uint64_t sanitize_uprobe_offset(uint64_t raw_offset)
{
return raw_offset;
}
LTTNG_ASSERT(event);
- lttng::urcu::read_lock_guard read_lock;
+ const lttng::urcu::read_lock_guard read_lock;
cds_lfht_del(kernel_token_to_event_notifier_rule_ht, &event->ht_node);
ret = kernctl_disable(event->fd);
void kernel_wait_quiescent()
{
int ret;
- int fd = kernel_tracer_fd;
+ const int fd = kernel_tracer_fd;
DBG("Kernel quiescent wait on %d", fd);
struct lttng_ht_iter iter;
/* For each consumer socket. */
- lttng::urcu::read_lock_guard read_lock;
+ const lttng::urcu::read_lock_guard read_lock;
cds_lfht_for_each_entry (
ksess->consumer->socks->ht, &iter.iter, socket, node.node) {
{
/* Send metadata to consumer and snapshot everything. */
- lttng::urcu::read_lock_guard read_lock;
+ const lttng::urcu::read_lock_guard read_lock;
cds_lfht_for_each_entry (output->socks->ht, &iter.iter, socket, node.node) {
struct ltt_kernel_channel *chan;
* Note that this loop will end after one iteration given that there is
* only one kernel consumer.
*/
- lttng::urcu::read_lock_guard read_lock;
+ const lttng::urcu::read_lock_guard read_lock;
cds_lfht_for_each_entry (
ksess->consumer->socks->ht, &iter.iter, socket, node.node) {
enum lttng_error_code ret = LTTNG_OK;
enum lttng_trace_chunk_status chunk_status;
- lttng::urcu::read_lock_guard read_lock;
+ const lttng::urcu::read_lock_guard read_lock;
LTTNG_ASSERT(ksess->current_trace_chunk);
/*
int init_kernel_tracer()
{
int ret;
- bool is_root = !getuid();
+ const bool is_root = !getuid();
const auto log_status_on_exit = lttng::make_scope_exit([]() noexcept {
DBG_FMT("Kernel tracer status set to `{}`",
* Note that this loop will end after one iteration given that there is
* only one kernel consumer.
*/
- lttng::urcu::read_lock_guard read_lock;
+ const lttng::urcu::read_lock_guard read_lock;
cds_lfht_for_each_entry (
ksess->consumer->socks->ht, &iter.iter, socket, node.node) {
enum lttng_error_code
kernel_destroy_event_notifier_group_notification_fd(int event_notifier_group_notification_fd)
{
- enum lttng_error_code ret_code = LTTNG_OK;
+ const lttng_error_code ret_code = LTTNG_OK;
DBG("Closing event notifier group notification file descriptor: fd = %d",
event_notifier_group_notification_fd);
/* Add trigger to kernel token mapping in the hash table. */
{
- lttng::urcu::read_lock_guard read_lock;
+ const lttng::urcu::read_lock_guard read_lock;
cds_lfht_add(kernel_token_to_event_notifier_rule_ht,
hash_trigger(trigger),
&event_notifier_rule->ht_node);
enum lttng_error_code error_code_ret;
int ret;
- lttng::urcu::read_lock_guard read_lock;
+ const lttng::urcu::read_lock_guard read_lock;
cds_lfht_lookup(kernel_token_to_event_notifier_rule_ht,
hash_trigger(trigger),