sessiond: trigger: run trigger actions through an action executor
[lttng-tools.git] / src / bin / lttng-sessiond / buffer-registry.h
index c2099b6883c7ff70174431635b33080eb3e4d4b2..0812414e5b4f260253f10f58d5dad2cbf4035e43 100644 (file)
@@ -1,18 +1,8 @@
 /*
- * Copyright (C) 2013 David Goulet <dgoulet@efficios.com>
+ * Copyright (C) 2013 David Goulet <dgoulet@efficios.com>
  *
- * This program is free software; you can redistribute it and/or modify it
- * under the terms of the GNU General Public License, version 2 only, as
- * published by the Free Software Foundation.
+ * SPDX-License-Identifier: GPL-2.0-only
  *
- * This program is distributed in the hope that it will be useful, but WITHOUT
- * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
- * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for
- * more details.
- *
- * You should have received a copy of the GNU General Public License along with
- * this program; if not, write to the Free Software Foundation, Inc., 51
- * Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.
  */
 
 #ifndef LTTNG_BUFFER_REGISTRY_H
@@ -25,7 +15,7 @@
 #include <common/hashtable/hashtable.h>
 
 #include "consumer.h"
-#include "ust-ctl.h"
+#include "lttng-ust-ctl.h"
 #include "ust-registry.h"
 
 struct buffer_reg_stream {
@@ -51,6 +41,8 @@ struct buffer_reg_channel {
        struct lttng_ht_node_u64 node;
        /* Size of subbuffers in this channel. */
        size_t subbuf_size;
+       /* Number of subbuffers per stream. */
+       size_t num_subbuf;
        union {
                /* Original object data that MUST be copied over. */
                struct lttng_ust_object_data *ust;
@@ -86,6 +78,9 @@ struct buffer_reg_uid {
        struct lttng_ht_node_u64 node;
        /* Node of a linked list used to teardown object at a destroy session. */
        struct cds_list_head lnode;
+
+       char root_shm_path[PATH_MAX];
+       char shm_path[PATH_MAX];
 };
 
 /*
@@ -98,12 +93,16 @@ struct buffer_reg_pid {
 
        /* Indexed by session id. */
        struct lttng_ht_node_u64 node;
+
+       char root_shm_path[PATH_MAX];
+       char shm_path[PATH_MAX];
 };
 
 /* Buffer registry per UID. */
 void buffer_reg_init_uid_registry(void);
 int buffer_reg_uid_create(uint64_t session_id, uint32_t bits_per_long, uid_t uid,
-               enum lttng_domain_type domain, struct buffer_reg_uid **regp);
+               enum lttng_domain_type domain, struct buffer_reg_uid **regp,
+               const char *root_shm_path, const char *shm_path);
 void buffer_reg_uid_add(struct buffer_reg_uid *reg);
 struct buffer_reg_uid *buffer_reg_uid_find(uint64_t session_id,
                uint32_t bits_per_long, uid_t uid);
@@ -113,7 +112,8 @@ void buffer_reg_uid_destroy(struct buffer_reg_uid *regp,
 
 /* Buffer registry per PID. */
 void buffer_reg_init_pid_registry(void);
-int buffer_reg_pid_create(uint64_t session_id, struct buffer_reg_pid **regp);
+int buffer_reg_pid_create(uint64_t session_id, struct buffer_reg_pid **regp,
+               const char *root_shm_path, const char *shm_path);
 void buffer_reg_pid_add(struct buffer_reg_pid *reg);
 struct buffer_reg_pid *buffer_reg_pid_find(uint64_t session_id);
 void buffer_reg_pid_remove(struct buffer_reg_pid *regp);
@@ -140,4 +140,8 @@ void buffer_reg_stream_destroy(struct buffer_reg_stream *regp,
 /* Global registry. */
 void buffer_reg_destroy_registries(void);
 
+int buffer_reg_uid_consumer_channel_key(
+               struct cds_list_head *buffer_reg_uid_list,
+               uint64_t chan_key, uint64_t *consumer_chan_key);
+
 #endif /* LTTNG_BUFFER_REGISTRY_H */
This page took 0.025061 seconds and 5 git commands to generate.