X-Git-Url: http://git.efficios.com/?p=lttng-tools.git;a=blobdiff_plain;f=src%2Fbin%2Flttng-sessiond%2Fbuffer-registry.h;h=7a817ec70464786c44c6d12e5e663516c63cfce1;hp=0bf439d78ce692938f605fde915495d2e3ef7754;hb=c8fea79c745d42ea8143b7020ae11b4fc2da0d8a;hpb=5c786dedd0156b93984f89ba47ec841277ed7dae diff --git a/src/bin/lttng-sessiond/buffer-registry.h b/src/bin/lttng-sessiond/buffer-registry.h index 0bf439d78..7a817ec70 100644 --- a/src/bin/lttng-sessiond/buffer-registry.h +++ b/src/bin/lttng-sessiond/buffer-registry.h @@ -49,6 +49,10 @@ struct buffer_reg_channel { pthread_mutex_t stream_list_lock; /* Node for hash table usage. */ 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; @@ -84,6 +88,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]; }; /* @@ -96,12 +103,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); @@ -111,7 +122,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);