/*
* The sessions mutex is the centralized mutex across UST tracing
* control and probe registration. All operations within this file are
/*
* The sessions mutex is the centralized mutex across UST tracing
* control and probe registration. All operations within this file are
- if (name_len > LTTNG_UST_SYM_NAME_LEN - 1) {
- WARN("Truncating tracepoint name %s which exceeds size limits of %u chars", name, LTTNG_UST_SYM_NAME_LEN - 1);
- name_len = LTTNG_UST_SYM_NAME_LEN - 1;
+ if (name_len > LTTNG_UST_SYM_NAME_LEN) {
+ WARN("Truncating tracepoint name %s which exceeds size limits of %u chars", name, LTTNG_UST_SYM_NAME_LEN);
+ name_len = LTTNG_UST_SYM_NAME_LEN;
head = &pending_probe_table[hash & (PENDING_PROBE_HASH_SIZE - 1)];
e = zmalloc(sizeof(struct ust_pending_probe) + name_len);
if (!e)
return -ENOMEM;
head = &pending_probe_table[hash & (PENDING_PROBE_HASH_SIZE - 1)];
e = zmalloc(sizeof(struct ust_pending_probe) + name_len);
if (!e)
return -ENOMEM;
- memcpy(&e->name[0], name, name_len + 1);
- e->name[name_len] = '\0';
+ memcpy(&e->name[0], name, name_len);
+ e->name[name_len - 1] = '\0';
e->loglevel_type = loglevel_type;
e->loglevel = loglevel;
cds_hlist_add_head(&e->node, head);
e->loglevel_type = loglevel_type;
e->loglevel = loglevel;
cds_hlist_add_head(&e->node, head);
- if (name_len > LTTNG_UST_SYM_NAME_LEN - 1) {
- WARN("Truncating tracepoint name %s which exceeds size limits of %u chars", name, LTTNG_UST_SYM_NAME_LEN - 1);
- name_len = LTTNG_UST_SYM_NAME_LEN - 1;
+ if (name_len > LTTNG_UST_SYM_NAME_LEN) {
+ WARN("Truncating tracepoint name %s which exceeds size limits of %u chars", name, LTTNG_UST_SYM_NAME_LEN);
+ name_len = LTTNG_UST_SYM_NAME_LEN;
head = &pending_probe_table[hash & (PENDING_PROBE_HASH_SIZE - 1)];
cds_hlist_for_each_entry_safe(e, node, p, head, node) {
struct ltt_event *event;
head = &pending_probe_table[hash & (PENDING_PROBE_HASH_SIZE - 1)];
cds_hlist_for_each_entry_safe(e, node, p, head, node) {
struct ltt_event *event;
CDS_INIT_LIST_HEAD(&session->chan);
CDS_INIT_LIST_HEAD(&session->events);
CDS_INIT_LIST_HEAD(&session->wildcards);
CDS_INIT_LIST_HEAD(&session->chan);
CDS_INIT_LIST_HEAD(&session->events);
CDS_INIT_LIST_HEAD(&session->wildcards);
size_t subbuf_size, size_t num_subbuf,
unsigned int switch_timer_interval,
unsigned int read_timer_interval,
size_t subbuf_size, size_t num_subbuf,
unsigned int switch_timer_interval,
unsigned int read_timer_interval,
- int **shm_fd, int **wait_fd,
+ int **shm_fd, char **shm_path,
+ int **wait_fd, char **wait_pipe_path,
uint64_t **memory_map_size,
struct ltt_channel *chan_priv_init)
{
uint64_t **memory_map_size,
struct ltt_channel *chan_priv_init)
{
*/
chan = transport->ops.channel_create(transport_name, buf_addr,
subbuf_size, num_subbuf, switch_timer_interval,
*/
chan = transport->ops.channel_create(transport_name, buf_addr,
subbuf_size, num_subbuf, switch_timer_interval,
- read_timer_interval, shm_fd, wait_fd,
- memory_map_size, chan_priv_init);
+ read_timer_interval, shm_fd, shm_path,
+ wait_fd, wait_pipe_path, memory_map_size,
+ chan_priv_init);
*/
int ltt_event_create(struct ltt_channel *chan,
struct lttng_ust_event *event_param,
*/
int ltt_event_create(struct ltt_channel *chan,
struct lttng_ust_event *event_param,
int _ltt_session_metadata_statedump(struct ltt_session *session)
{
unsigned char *uuid_c = session->uuid;
int _ltt_session_metadata_statedump(struct ltt_session *session)
{
unsigned char *uuid_c = session->uuid;
- (void) prctl(PR_GET_NAME, (unsigned long) procname, 0, 0, 0);
- procname[PROCNAME_LEN - 1] = '\0';
+ lttng_ust_getprocname(procname);
+ procname[LTTNG_UST_PROCNAME_LEN - 1] = '\0';
cds_list_add(&e->list, &wildcard_list);
CDS_INIT_LIST_HEAD(&e->session_list);
}
cds_list_add(&e->list, &wildcard_list);
CDS_INIT_LIST_HEAD(&e->session_list);
}