X-Git-Url: http://git.lttng.org./?a=blobdiff_plain;f=liblttng-ust%2Flttng-events.c;h=75e48a3c823b80a9e38b4a842e9d7471828b427f;hb=74211da04fac64abca20883d03bab5bdd80cf5af;hp=855f8d8739d1ff0ecb07d6779957c4f11153f9db;hpb=735bef4705cc42f25d26f25be09ba98f1efb8511;p=lttng-ust.git diff --git a/liblttng-ust/lttng-events.c b/liblttng-ust/lttng-events.c index 855f8d87..75e48a3c 100644 --- a/liblttng-ust/lttng-events.c +++ b/liblttng-ust/lttng-events.c @@ -766,8 +766,10 @@ void lttng_create_event_if_missing(struct lttng_enabler *enabler) head = &session->events_ht.table[hash & (LTTNG_UST_EVENT_HT_SIZE - 1)]; cds_hlist_for_each_entry(event, node, head, hlist) { if (event->desc == desc - && event->chan == enabler->chan) + && event->chan == enabler->chan) { found = 1; + break; + } } if (found) continue; @@ -901,6 +903,9 @@ int lttng_enabler_ref_events(struct lttng_enabler *enabler) struct lttng_session *session = enabler->chan->session; struct lttng_event *event; + if (!enabler->enabled) + goto end; + /* First ensure that probe events are created for this enabler. */ lttng_create_event_if_missing(enabler); @@ -932,6 +937,7 @@ int lttng_enabler_ref_events(struct lttng_enabler *enabler) /* TODO: merge event context. */ } +end: return 0; } @@ -1126,6 +1132,18 @@ int lttng_attach_context(struct lttng_ust_context *context_param, return lttng_add_user_ns_to_ctx(ctx); case LTTNG_UST_CONTEXT_UTS_NS: return lttng_add_uts_ns_to_ctx(ctx); + case LTTNG_UST_CONTEXT_VUID: + return lttng_add_vuid_to_ctx(ctx); + case LTTNG_UST_CONTEXT_VEUID: + return lttng_add_veuid_to_ctx(ctx); + case LTTNG_UST_CONTEXT_VSUID: + return lttng_add_vsuid_to_ctx(ctx); + case LTTNG_UST_CONTEXT_VGID: + return lttng_add_vgid_to_ctx(ctx); + case LTTNG_UST_CONTEXT_VEGID: + return lttng_add_vegid_to_ctx(ctx); + case LTTNG_UST_CONTEXT_VSGID: + return lttng_add_vsgid_to_ctx(ctx); default: return -EINVAL; }