#include <wrapper/file.h>
#include <linux/jhash.h>
#include <linux/uaccess.h>
-#include <linux/vmalloc.h>
#include <linux/uuid.h>
#include <linux/dmi.h>
+#include <linux/vmalloc.h>
-#include <wrapper/vmalloc.h> /* for wrapper_vmalloc_sync_all() */
#include <wrapper/random.h>
#include <wrapper/tracepoint.h>
#include <wrapper/list.h>
#include <lttng-string-utils.h>
#include <wrapper/ringbuffer/backend.h>
#include <wrapper/ringbuffer/frontend.h>
-#include <wrapper/time.h>
#define METADATA_CACHE_DEFAULT_SIZE 4096
int i;
mutex_lock(&sessions_mutex);
- session = lttng_kvzalloc(sizeof(struct lttng_session), GFP_KERNEL);
+ session = kvzalloc_node(sizeof(struct lttng_session), GFP_KERNEL,
+ NUMA_NO_NODE);
if (!session)
goto err;
INIT_LIST_HEAD(&session->chan);
err_free_cache:
kfree(metadata_cache);
err_free_session:
- lttng_kvfree(session);
+ kvfree(session);
err:
mutex_unlock(&sessions_mutex);
return NULL;
kref_put(&session->metadata_cache->refcount, metadata_cache_destroy);
list_del(&session->list);
mutex_unlock(&sessions_mutex);
- lttng_kvfree(session);
+ kvfree(session);
}
int lttng_session_statedump(struct lttng_session *session)
uint64_t tcf = trace_clock_freq();
int64_t offset;
unsigned long flags;
-#ifdef LTTNG_KERNEL_HAS_TIMESPEC64
struct timespec64 rts = { 0, 0 };
-#else
- struct timespec rts = { 0, 0 };
-#endif
/* Disable interrupts to increase correlation precision. */
local_irq_save(flags);
monotonic[0] = trace_clock_read64();
-#ifdef LTTNG_KERNEL_HAS_TIMESPEC64
ktime_get_real_ts64(&rts);
-#else
- getnstimeofday(&rts);
-#endif
monotonic[1] = trace_clock_read64();
local_irq_restore(flags);
* @transport: transport structure
*
* Registers a transport which can be used as output to extract the data out of
- * LTTng. The module calling this registration function must ensure that no
- * trap-inducing code will be executed by the transport functions. E.g.
- * vmalloc_sync_all() must be called between a vmalloc and the moment the memory
- * is made visible to the transport function. This registration acts as a
- * vmalloc_sync_all. Therefore, only if the module allocates virtual memory
- * after its registration must it synchronize the TLBs.
+ * LTTng.
*/
void lttng_transport_register(struct lttng_transport *transport)
{
- /*
- * Make sure no page fault can be triggered by the module about to be
- * registered. We deal with this here so we don't have to call
- * vmalloc_sync_all() in each module's init.
- */
- wrapper_vmalloc_sync_all();
-
mutex_lock(&sessions_mutex);
list_add_tail(&transport->node, <tng_transport_list);
mutex_unlock(&sessions_mutex);