X-Git-Url: http://git.lttng.org/?a=blobdiff_plain;f=lttng-events.c;h=e3a842526dba6af21c5b7d696e7e6424fdb26db8;hb=0ca42eb7127913b7f35bcacc3bccc8ebedb429c5;hp=3964df5fbb2f55b8d98fdb8501023a2c37a2dbab;hpb=3aed4dca825a63757a3c95b9d41019660f83e02d;p=lttng-modules.git diff --git a/lttng-events.c b/lttng-events.c index 3964df5f..e3a84252 100644 --- a/lttng-events.c +++ b/lttng-events.c @@ -40,7 +40,6 @@ #include #include #include -#include #include #include @@ -130,7 +129,7 @@ struct lttng_session *lttng_session_create(void) GFP_KERNEL); if (!metadata_cache) goto err_free_session; - metadata_cache->data = lttng_vzalloc(METADATA_CACHE_DEFAULT_SIZE); + metadata_cache->data = vzalloc(METADATA_CACHE_DEFAULT_SIZE); if (!metadata_cache->data) goto err_free_cache; metadata_cache->cache_alloc = METADATA_CACHE_DEFAULT_SIZE; @@ -226,6 +225,9 @@ int lttng_session_enable(struct lttng_session *session) /* Set transient enabler state to "enabled" */ session->tstate = 1; + /* We need to sync enablers with session before activation. */ + lttng_session_sync_enablers(session); + /* * Snapshot the number of events per channel to know the type of header * we need to use. @@ -239,9 +241,6 @@ int lttng_session_enable(struct lttng_session *session) chan->header_type = 2; /* large */ } - /* We need to sync enablers with session before activation. */ - lttng_session_sync_enablers(session); - /* Clear each stream's quiescent state. */ list_for_each_entry(chan, &session->chan, list) { if (chan->channel_type != METADATA_CHANNEL) @@ -1692,7 +1691,7 @@ int lttng_metadata_printf(struct lttng_session *session, tmp_cache_alloc_size = max_t(unsigned int, session->metadata_cache->cache_alloc + len, session->metadata_cache->cache_alloc << 1); - tmp_cache_realloc = lttng_vzalloc(tmp_cache_alloc_size); + tmp_cache_realloc = vzalloc(tmp_cache_alloc_size); if (!tmp_cache_realloc) goto err; if (session->metadata_cache->data) {