X-Git-Url: http://git.liburcu.org/?a=blobdiff_plain;f=ltt-tracer.h;h=d98d9d0c98214f5f87e22fb557f0dccf4122e147;hb=17baffe29814f2508556e498ab8c41a192e76b67;hp=f1cd2d90f75e4d258f335c400a6c0aa759c9533c;hpb=d793d5e111fe1436fb8e15daa5d7fb1be8987bb4;p=lttng-modules.git diff --git a/ltt-tracer.h b/ltt-tracer.h index f1cd2d90..d98d9d0c 100644 --- a/ltt-tracer.h +++ b/ltt-tracer.h @@ -1,14 +1,16 @@ +#ifndef _LTT_TRACER_H +#define _LTT_TRACER_H + /* - * Copyright (C) 2005,2006,2008 Mathieu Desnoyers (mathieu.desnoyers@polymtl.ca) + * ltt-tracer.h + * + * Copyright (C) 2005-2011 Mathieu Desnoyers * * This contains the definitions for the Linux Trace Toolkit tracer. * * Dual LGPL v2.1/GPL v2 license. */ -#ifndef _LTT_TRACER_H -#define _LTT_TRACER_H - #include #include #include @@ -23,6 +25,10 @@ #include "ltt-tracer-core.h" #include "ltt-events.h" +#define LTTNG_VERSION 0 +#define LTTNG_PATCHLEVEL 9 +#define LTTNG_SUBLEVEL 1 + #ifndef CHAR_BIT #define CHAR_BIT 8 #endif @@ -96,38 +102,11 @@ enum ltt_channels { * concerns. */ -#define LTT_RESERVED_EVENTS 3 -#define LTT_EVENT_BITS 5 -#define LTT_FREE_EVENTS ((1 << LTT_EVENT_BITS) - LTT_RESERVED_EVENTS) -#define LTT_TSC_BITS 27 -#define LTT_TSC_MASK ((1 << LTT_TSC_BITS) - 1) - -struct event_header { - u32 id_time; /* 5 bits event id (MSB); 27 bits time (LSB) */ -}; - -/* Reservation flags */ -#define LTT_RFLAG_ID (1 << 0) -#define LTT_RFLAG_ID_SIZE (1 << 1) -#define LTT_RFLAG_ID_SIZE_TSC (1 << 2) - #define LTT_MAX_SMALL_SIZE 0xFFFFU #ifdef RING_BUFFER_ALIGN -static inline -size_t ltt_get_header_alignment(void) -{ - return sizeof(struct event_header) * CHAR_BIT; -} - #define ltt_alignof(type) __alignof__(type) #else -static inline -size_t ltt_get_header_alignment(void) -{ - return CHAR_BIT; -} - #define ltt_alignof(type) 1 #endif @@ -151,6 +130,9 @@ size_t ltt_get_header_alignment(void) */ #define LTT_RESERVE_CRITICAL 4096 +#define LTT_RFLAG_EXTENDED RING_BUFFER_RFLAG_END +#define LTT_RFLAG_END (LTT_RFLAG_EXTENDED << 1) + /* Register and unregister function pointers */ enum ltt_module_function {