2 * Copyright (C) 2005,2006,2008 Mathieu Desnoyers (mathieu.desnoyers@polymtl.ca)
4 * This contains the definitions for the Linux Trace Toolkit tracer.
11 #include <linux/types.h>
12 #include <linux/limits.h>
13 #include <linux/list.h>
14 #include <linux/cache.h>
15 #include <linux/kernel.h>
16 #include <linux/timex.h>
17 #include <linux/wait.h>
18 #include <linux/ltt-relay.h>
19 #include <linux/ltt-channels.h>
20 #include <linux/ltt-core.h>
21 #include <linux/marker.h>
22 #include <linux/trace-clock.h>
23 #include <asm/atomic.h>
24 #include <asm/local.h>
26 /* Number of bytes to log with a read/write event */
27 #define LTT_LOG_RW_SIZE 32L
29 /* Interval (in jiffies) at which the LTT per-CPU timer fires */
30 #define LTT_PERCPU_TIMER_INTERVAL 1
33 #define LTT_ARCH_TYPE LTT_ARCH_TYPE_UNDEFINED
36 #ifndef LTT_ARCH_VARIANT
37 #define LTT_ARCH_VARIANT LTT_ARCH_VARIANT_NONE
40 struct ltt_active_marker
;
42 /* Maximum number of callbacks per marker */
43 #define LTT_NR_CALLBACKS 10
45 struct ltt_serialize_closure
;
46 struct ltt_probe_private_data
;
48 /* Serialization callback '%k' */
49 typedef size_t (*ltt_serialize_cb
)(struct rchan_buf
*buf
, size_t buf_offset
,
50 struct ltt_serialize_closure
*closure
,
51 void *serialize_private
, int *largest_align
,
52 const char *fmt
, va_list *args
);
54 struct ltt_serialize_closure
{
55 ltt_serialize_cb
*callbacks
;
56 long cb_args
[LTT_NR_CALLBACKS
];
60 size_t ltt_serialize_data(struct rchan_buf
*buf
, size_t buf_offset
,
61 struct ltt_serialize_closure
*closure
,
62 void *serialize_private
,
63 int *largest_align
, const char *fmt
, va_list *args
);
65 struct ltt_available_probe
{
66 const char *name
; /* probe name */
68 marker_probe_func
*probe_func
;
69 ltt_serialize_cb callbacks
[LTT_NR_CALLBACKS
];
70 struct list_head node
; /* registered probes list */
73 struct ltt_probe_private_data
{
74 struct ltt_trace_struct
*trace
; /*
75 * Target trace, for metadata
78 ltt_serialize_cb serializer
; /*
79 * Serialization function override.
81 void *serialize_private
; /*
82 * Private data for serialization
90 LTT_CHANNEL_GLOBAL_STATE
,
91 LTT_CHANNEL_IRQ_STATE
,
92 LTT_CHANNEL_MODULE_STATE
,
93 LTT_CHANNEL_NETIF_STATE
,
94 LTT_CHANNEL_SOFTIRQ_STATE
,
95 LTT_CHANNEL_SWAP_STATE
,
96 LTT_CHANNEL_SYSCALL_STATE
,
97 LTT_CHANNEL_TASK_STATE
,
108 struct ltt_active_marker
{
109 struct list_head node
; /* active markers list */
113 struct ltt_available_probe
*probe
;
116 extern void ltt_vtrace(const struct marker
*mdata
, void *probe_data
,
117 void *call_data
, const char *fmt
, va_list *args
);
118 extern void ltt_trace(const struct marker
*mdata
, void *probe_data
,
119 void *call_data
, const char *fmt
, ...);
122 * Unique ID assigned to each registered probe.
125 MARKER_ID_SET_MARKER_ID
= 0, /* Static IDs available (range 0-7) */
126 MARKER_ID_SET_MARKER_FORMAT
,
127 MARKER_ID_COMPACT
, /* Compact IDs (range: 8-127) */
128 MARKER_ID_DYNAMIC
, /* Dynamic IDs (range: 128-65535) */
131 /* static ids 0-1 reserved for internal use. */
132 #define MARKER_CORE_IDS 2
133 static inline enum marker_id
marker_id_type(uint16_t id
)
135 if (id
< MARKER_CORE_IDS
)
136 return (enum marker_id
)id
;
138 return MARKER_ID_DYNAMIC
;
143 struct user_dbg_data
{
144 unsigned long avail_size
;
149 struct ltt_trace_ops
{
150 /* First 32 bytes cache-hot cacheline */
151 int (*reserve_slot
) (struct ltt_trace_struct
*trace
,
152 struct ltt_channel_struct
*channel
,
153 void **transport_data
, size_t data_size
,
154 size_t *slot_size
, long *buf_offset
, u64
*tsc
,
155 unsigned int *rflags
,
158 void (*commit_slot
) (struct ltt_channel_struct
*channel
,
159 void **transport_data
, long buf_offset
,
161 void (*wakeup_channel
) (struct ltt_channel_struct
*ltt_channel
);
162 int (*user_blocking
) (struct ltt_trace_struct
*trace
,
163 unsigned int index
, size_t data_size
,
164 struct user_dbg_data
*dbg
);
165 /* End of first 32 bytes cacheline */
166 int (*create_dirs
) (struct ltt_trace_struct
*new_trace
);
167 void (*remove_dirs
) (struct ltt_trace_struct
*new_trace
);
168 int (*create_channel
) (const char *trace_name
,
169 struct ltt_trace_struct
*trace
,
170 struct dentry
*dir
, const char *channel_name
,
171 struct ltt_channel_struct
*ltt_chan
,
172 unsigned int subbuf_size
,
173 unsigned int n_subbufs
, int overwrite
);
174 void (*finish_channel
) (struct ltt_channel_struct
*channel
);
175 void (*remove_channel
) (struct ltt_channel_struct
*channel
);
176 void (*user_errors
) (struct ltt_trace_struct
*trace
,
177 unsigned int index
, size_t data_size
,
178 struct user_dbg_data
*dbg
, int cpu
);
179 #ifdef CONFIG_HOTPLUG_CPU
180 int (*handle_cpuhp
) (struct notifier_block
*nb
,
181 unsigned long action
, void *hcpu
,
182 struct ltt_trace_struct
*trace
);
184 } ____cacheline_aligned
;
186 struct ltt_transport
{
188 struct module
*owner
;
189 struct list_head node
;
190 struct ltt_trace_ops ops
;
193 enum trace_mode
{ LTT_TRACE_NORMAL
, LTT_TRACE_FLIGHT
, LTT_TRACE_HYBRID
};
195 #define CHANNEL_FLAG_ENABLE (1U<<0)
196 #define CHANNEL_FLAG_OVERWRITE (1U<<1)
198 /* Per-trace information - each trace/flight recorder represented by one */
199 struct ltt_trace_struct
{
200 /* First 32 bytes cache-hot cacheline */
201 struct list_head list
;
202 struct ltt_trace_ops
*ops
;
204 /* Second 32 bytes cache-hot cacheline */
205 struct ltt_channel_struct
*channels
;
206 unsigned int nr_channels
;
210 unsigned long long start_monotonic
;
211 struct timeval start_time
;
212 struct ltt_channel_setting
*settings
;
214 struct dentry
*trace_root
;
216 struct rchan_callbacks callbacks
;
217 struct kref kref
; /* Each channel has a kref of the trace struct */
218 struct ltt_transport
*transport
;
219 struct kref ltt_transport_kref
;
220 wait_queue_head_t kref_wq
; /* Place for ltt_trace_destroy to sleep */
221 char trace_name
[NAME_MAX
];
222 } ____cacheline_aligned
;
224 /* Hardcoded event headers
226 * event header for a trace with active heartbeat : 27 bits timestamps
228 * headers are 32-bits aligned. In order to insure such alignment, a dynamic per
229 * trace alignment value must be done.
231 * Remember that the C compiler does align each member on the boundary
232 * equivalent to their own size.
234 * As relay subbuffers are aligned on pages, we are sure that they are 4 and 8
235 * bytes aligned, so the buffer header and trace header are aligned.
237 * Event headers are aligned depending on the trace alignment option.
239 * Note using C structure bitfields for cross-endianness and portability
243 #define LTT_RESERVED_EVENTS 3
244 #define LTT_EVENT_BITS 5
245 #define LTT_FREE_EVENTS ((1 << LTT_EVENT_BITS) - LTT_RESERVED_EVENTS)
246 #define LTT_TSC_BITS 27
247 #define LTT_TSC_MASK ((1 << LTT_TSC_BITS) - 1)
249 struct ltt_event_header
{
250 u32 id_time
; /* 5 bits event id (MSB); 27 bits time (LSB) */
253 /* Reservation flags */
254 #define LTT_RFLAG_ID (1 << 0)
255 #define LTT_RFLAG_ID_SIZE (1 << 1)
256 #define LTT_RFLAG_ID_SIZE_TSC (1 << 2)
259 * We use asm/timex.h : cpu_khz/HZ variable in here : we might have to deal
260 * specifically with CPU frequency scaling someday, so using an interpolation
261 * between the start and end of buffer values is not flexible enough. Using an
262 * immediate frequency value permits to calculate directly the times for parts
263 * of a buffer that would be before a frequency change.
265 * Keep the natural field alignment for _each field_ within this structure if
266 * you ever add/remove a field from this header. Packed attribute is not used
267 * because gcc generates poor code on at least powerpc and mips. Don't ever
268 * let gcc add padding between the structure elements.
270 struct ltt_subbuffer_header
{
271 uint64_t cycle_count_begin
; /* Cycle count at subbuffer start */
272 uint64_t cycle_count_end
; /* Cycle count at subbuffer end */
273 uint32_t magic_number
; /*
274 * Trace magic number.
275 * contains endianness information.
277 uint8_t major_version
;
278 uint8_t minor_version
;
279 uint8_t arch_size
; /* Architecture pointer size */
280 uint8_t alignment
; /* LTT data alignment */
281 uint64_t start_time_sec
; /* NTP-corrected start time */
282 uint64_t start_time_usec
;
283 uint64_t start_freq
; /*
284 * Frequency at trace start,
285 * used all along the trace.
287 uint32_t freq_scale
; /* Frequency scaling (divisor) */
288 uint32_t lost_size
; /* Size unused at end of subbuffer */
289 uint32_t buf_size
; /* Size of this subbuffer */
290 uint32_t events_lost
; /*
291 * Events lost in this subbuffer since
292 * the beginning of the trace.
295 uint32_t subbuf_corrupt
; /*
296 * Corrupted (lost) subbuffers since
297 * the begginig of the trace.
300 uint8_t header_end
[0]; /* End of header */
304 * ltt_subbuffer_header_size - called on buffer-switch to a new sub-buffer
306 * Return header size without padding after the structure. Don't use packed
307 * structure because gcc generates inefficient code on some architectures
310 static inline size_t ltt_subbuffer_header_size(void)
312 return offsetof(struct ltt_subbuffer_header
, header_end
);
316 * ltt_get_header_size
318 * Calculate alignment offset to 32-bits. This is the alignment offset of the
322 * The event header must be 32-bits. The total offset calculated here :
324 * Alignment of header struct on 32 bits (min arch size, header size)
325 * + sizeof(header struct) (32-bits)
326 * + (opt) u16 (ext. event id)
327 * + (opt) u16 (event_size) (if event_size == 0xFFFFUL, has ext. event size)
328 * + (opt) u32 (ext. event size)
329 * + (opt) u64 full TSC (aligned on min(64-bits, arch size))
331 * The payload must itself determine its own alignment from the biggest type it
334 static inline unsigned char ltt_get_header_size(
335 struct ltt_channel_struct
*channel
,
338 size_t *before_hdr_pad
,
341 size_t orig_offset
= offset
;
344 BUILD_BUG_ON(sizeof(struct ltt_event_header
) != sizeof(u32
));
346 padding
= ltt_align(offset
, sizeof(struct ltt_event_header
));
348 offset
+= sizeof(struct ltt_event_header
);
351 case LTT_RFLAG_ID_SIZE_TSC
:
352 offset
+= sizeof(u16
) + sizeof(u16
);
353 if (data_size
>= 0xFFFFU
)
354 offset
+= sizeof(u32
);
355 offset
+= ltt_align(offset
, sizeof(u64
));
356 offset
+= sizeof(u64
);
358 case LTT_RFLAG_ID_SIZE
:
359 offset
+= sizeof(u16
) + sizeof(u16
);
360 if (data_size
>= 0xFFFFU
)
361 offset
+= sizeof(u32
);
364 offset
+= sizeof(u16
);
368 *before_hdr_pad
= padding
;
369 return offset
- orig_offset
;
373 * ltt_write_event_header
375 * Writes the event header to the offset (already aligned on 32-bits).
377 * @trace : trace to write to.
378 * @channel : pointer to the channel structure..
379 * @buf : buffer to write to.
380 * @buf_offset : buffer offset to write to (aligned on 32 bits).
382 * @event_size : size of the event, excluding the event header.
383 * @tsc : time stamp counter.
384 * @rflags : reservation flags.
386 * returns : offset where the event data must be written.
388 static inline size_t ltt_write_event_header(struct ltt_trace_struct
*trace
,
389 struct ltt_channel_struct
*channel
,
390 struct rchan_buf
*buf
, long buf_offset
,
391 u16 eID
, size_t event_size
,
392 u64 tsc
, unsigned int rflags
)
394 struct ltt_event_header header
;
398 case LTT_RFLAG_ID_SIZE_TSC
:
399 header
.id_time
= 29 << LTT_TSC_BITS
;
401 case LTT_RFLAG_ID_SIZE
:
402 header
.id_time
= 30 << LTT_TSC_BITS
;
405 header
.id_time
= 31 << LTT_TSC_BITS
;
408 header
.id_time
= eID
<< LTT_TSC_BITS
;
411 header
.id_time
|= (u32
)tsc
& LTT_TSC_MASK
;
412 ltt_relay_write(buf
, buf_offset
, &header
, sizeof(header
));
413 buf_offset
+= sizeof(header
);
416 case LTT_RFLAG_ID_SIZE_TSC
:
417 small_size
= min_t(size_t, event_size
, 0xFFFFU
);
418 ltt_relay_write(buf
, buf_offset
,
419 (u16
[]){ (u16
)eID
}, sizeof(u16
));
420 buf_offset
+= sizeof(u16
);
421 ltt_relay_write(buf
, buf_offset
,
422 (u16
[]){ (u16
)small_size
}, sizeof(u16
));
423 buf_offset
+= sizeof(u16
);
424 if (small_size
== 0xFFFFU
) {
425 ltt_relay_write(buf
, buf_offset
,
426 (u32
[]){ (u32
)event_size
}, sizeof(u32
));
427 buf_offset
+= sizeof(u32
);
429 buf_offset
+= ltt_align(buf_offset
, sizeof(u64
));
430 ltt_relay_write(buf
, buf_offset
,
431 (u64
[]){ (u64
)tsc
}, sizeof(u64
));
432 buf_offset
+= sizeof(u64
);
434 case LTT_RFLAG_ID_SIZE
:
435 small_size
= min_t(size_t, event_size
, 0xFFFFU
);
436 ltt_relay_write(buf
, buf_offset
,
437 (u16
[]){ (u16
)eID
}, sizeof(u16
));
438 buf_offset
+= sizeof(u16
);
439 ltt_relay_write(buf
, buf_offset
,
440 (u16
[]){ (u16
)small_size
}, sizeof(u16
));
441 buf_offset
+= sizeof(u16
);
442 if (small_size
== 0xFFFFU
) {
443 ltt_relay_write(buf
, buf_offset
,
444 (u32
[]){ (u32
)event_size
}, sizeof(u32
));
445 buf_offset
+= sizeof(u32
);
449 ltt_relay_write(buf
, buf_offset
,
450 (u16
[]){ (u16
)eID
}, sizeof(u16
));
451 buf_offset
+= sizeof(u16
);
462 /* Buffer offset macros */
465 * BUFFER_TRUNC zeroes the subbuffer offset and the subbuffer number parts of
466 * the offset, which leaves only the buffer number.
468 #define BUFFER_TRUNC(offset, chan) \
469 ((offset) & (~((chan)->alloc_size-1)))
470 #define BUFFER_OFFSET(offset, chan) ((offset) & ((chan)->alloc_size - 1))
471 #define SUBBUF_OFFSET(offset, chan) ((offset) & ((chan)->subbuf_size - 1))
472 #define SUBBUF_ALIGN(offset, chan) \
473 (((offset) + (chan)->subbuf_size) & (~((chan)->subbuf_size - 1)))
474 #define SUBBUF_TRUNC(offset, chan) \
475 ((offset) & (~((chan)->subbuf_size - 1)))
476 #define SUBBUF_INDEX(offset, chan) \
477 (BUFFER_OFFSET((offset), chan) >> (chan)->subbuf_size_order)
482 * Atomic slot reservation in a LTTng buffer. It will take care of
483 * sub-buffer switching.
487 * @trace : the trace structure to log to.
488 * @channel : the chanel to reserve space into.
489 * @transport_data : specific transport data.
490 * @data_size : size of the variable length data to log.
491 * @slot_size : pointer to total size of the slot (out)
492 * @buf_offset : pointer to reserve offset (out)
493 * @tsc : pointer to the tsc at the slot reservation (out)
494 * @rflags : reservation flags (header specificity)
497 * Return : -ENOSPC if not enough space, else 0.
499 static inline int ltt_reserve_slot(
500 struct ltt_trace_struct
*trace
,
501 struct ltt_channel_struct
*channel
,
502 void **transport_data
,
507 unsigned int *rflags
,
511 return trace
->ops
->reserve_slot(trace
, channel
, transport_data
,
512 data_size
, slot_size
, buf_offset
, tsc
, rflags
,
520 * Atomic unordered slot commit. Increments the commit count in the
521 * specified sub-buffer, and delivers it if necessary.
525 * @channel : the chanel to reserve space into.
526 * @transport_data : specific transport data.
527 * @buf_offset : offset of beginning of reserved slot
528 * @slot_size : size of the reserved slot.
530 static inline void ltt_commit_slot(
531 struct ltt_channel_struct
*channel
,
532 void **transport_data
,
536 struct ltt_trace_struct
*trace
= channel
->trace
;
538 trace
->ops
->commit_slot(channel
, transport_data
, buf_offset
, slot_size
);
550 #define LTT_RELAY_ROOT "ltt"
551 #define LTT_RELAY_LOCKED_ROOT "ltt-locked"
553 #define LTT_METADATA_CHANNEL "metadata_state"
554 #define LTT_FD_STATE_CHANNEL "fd_state"
555 #define LTT_GLOBAL_STATE_CHANNEL "global_state"
556 #define LTT_IRQ_STATE_CHANNEL "irq_state"
557 #define LTT_MODULE_STATE_CHANNEL "module_state"
558 #define LTT_NETIF_STATE_CHANNEL "netif_state"
559 #define LTT_SOFTIRQ_STATE_CHANNEL "softirq_state"
560 #define LTT_SWAP_STATE_CHANNEL "swap_state"
561 #define LTT_SYSCALL_STATE_CHANNEL "syscall_state"
562 #define LTT_TASK_STATE_CHANNEL "task_state"
563 #define LTT_VM_STATE_CHANNEL "vm_state"
564 #define LTT_FS_CHANNEL "fs"
565 #define LTT_INPUT_CHANNEL "input"
566 #define LTT_IPC_CHANNEL "ipc"
567 #define LTT_KERNEL_CHANNEL "kernel"
568 #define LTT_MM_CHANNEL "mm"
569 #define LTT_RCU_CHANNEL "rcu"
571 #define LTT_FLIGHT_PREFIX "flight-"
573 /* Tracer properties */
574 #define LTT_DEFAULT_SUBBUF_SIZE_LOW 65536
575 #define LTT_DEFAULT_N_SUBBUFS_LOW 2
576 #define LTT_DEFAULT_SUBBUF_SIZE_MED 262144
577 #define LTT_DEFAULT_N_SUBBUFS_MED 2
578 #define LTT_DEFAULT_SUBBUF_SIZE_HIGH 1048576
579 #define LTT_DEFAULT_N_SUBBUFS_HIGH 2
580 #define LTT_TRACER_MAGIC_NUMBER 0x00D6B7ED
581 #define LTT_TRACER_VERSION_MAJOR 2
582 #define LTT_TRACER_VERSION_MINOR 3
585 * Size reserved for high priority events (interrupts, NMI, BH) at the end of a
586 * nearly full buffer. User space won't use this last amount of space when in
587 * blocking mode. This space also includes the event header that would be
588 * written by this user space event.
590 #define LTT_RESERVE_CRITICAL 4096
592 /* Register and unregister function pointers */
594 enum ltt_module_function
{
595 LTT_FUNCTION_RUN_FILTER
,
596 LTT_FUNCTION_FILTER_CONTROL
,
597 LTT_FUNCTION_STATEDUMP
600 extern int ltt_module_register(enum ltt_module_function name
, void *function
,
601 struct module
*owner
);
602 extern void ltt_module_unregister(enum ltt_module_function name
);
604 void ltt_transport_register(struct ltt_transport
*transport
);
605 void ltt_transport_unregister(struct ltt_transport
*transport
);
607 /* Exported control function */
609 enum ltt_control_msg
{
612 LTT_CONTROL_CREATE_TRACE
,
613 LTT_CONTROL_DESTROY_TRACE
616 union ltt_control_args
{
618 enum trace_mode mode
;
619 unsigned int subbuf_size_low
;
620 unsigned int n_subbufs_low
;
621 unsigned int subbuf_size_med
;
622 unsigned int n_subbufs_med
;
623 unsigned int subbuf_size_high
;
624 unsigned int n_subbufs_high
;
628 int _ltt_trace_setup(const char *trace_name
);
629 int ltt_trace_setup(const char *trace_name
);
630 struct ltt_trace_struct
*_ltt_trace_find_setup(const char *trace_name
);
631 int ltt_trace_set_type(const char *trace_name
, const char *trace_type
);
632 int ltt_trace_set_channel_subbufsize(const char *trace_name
,
633 const char *channel_name
, unsigned int size
);
634 int ltt_trace_set_channel_subbufcount(const char *trace_name
,
635 const char *channel_name
, unsigned int cnt
);
636 int ltt_trace_set_channel_enable(const char *trace_name
,
637 const char *channel_name
, unsigned int enable
);
638 int ltt_trace_set_channel_overwrite(const char *trace_name
,
639 const char *channel_name
, unsigned int overwrite
);
640 int ltt_trace_alloc(const char *trace_name
);
641 int ltt_trace_destroy(const char *trace_name
);
642 int ltt_trace_start(const char *trace_name
);
643 int ltt_trace_stop(const char *trace_name
);
645 extern int ltt_control(enum ltt_control_msg msg
, const char *trace_name
,
646 const char *trace_type
, union ltt_control_args args
);
648 enum ltt_filter_control_msg
{
649 LTT_FILTER_DEFAULT_ACCEPT
,
650 LTT_FILTER_DEFAULT_REJECT
653 extern int ltt_filter_control(enum ltt_filter_control_msg msg
,
654 const char *trace_name
);
656 extern struct dentry
*get_filter_root(void);
658 void ltt_write_trace_header(struct ltt_trace_struct
*trace
,
659 struct ltt_subbuffer_header
*header
);
660 extern void ltt_buffer_destroy(struct ltt_channel_struct
*ltt_chan
);
662 void ltt_core_register(int (*function
)(u8
, void *));
664 void ltt_core_unregister(void);
666 void ltt_release_trace(struct kref
*kref
);
667 void ltt_release_transport(struct kref
*kref
);
669 extern int ltt_probe_register(struct ltt_available_probe
*pdata
);
670 extern int ltt_probe_unregister(struct ltt_available_probe
*pdata
);
671 extern int ltt_marker_connect(const char *channel
, const char *mname
,
673 extern int ltt_marker_disconnect(const char *channel
, const char *mname
,
675 extern void ltt_dump_marker_state(struct ltt_trace_struct
*trace
);
677 void ltt_lock_traces(void);
678 void ltt_unlock_traces(void);
680 extern void ltt_dump_softirq_vec(void *call_data
);
682 #ifdef CONFIG_HAVE_LTT_DUMP_TABLES
683 extern void ltt_dump_sys_call_table(void *call_data
);
684 extern void ltt_dump_idt_table(void *call_data
);
686 static inline void ltt_dump_sys_call_table(void *call_data
)
690 static inline void ltt_dump_idt_table(void *call_data
)
695 #ifdef CONFIG_LTT_KPROBES
696 extern void ltt_dump_kprobes_table(void *call_data
);
698 static inline void ltt_dump_kprobes_table(void *call_data
)
705 /* Get the next sub buffer that can be read. */
706 #define RELAY_GET_SUBBUF _IOR(0xF5, 0x00, __u32)
707 /* Release the oldest reserved (by "get") sub buffer. */
708 #define RELAY_PUT_SUBBUF _IOW(0xF5, 0x01, __u32)
709 /* returns the number of sub buffers in the per cpu channel. */
710 #define RELAY_GET_N_SUBBUFS _IOR(0xF5, 0x02, __u32)
711 /* returns the size of the sub buffers. */
712 #define RELAY_GET_SUBBUF_SIZE _IOR(0xF5, 0x03, __u32)
714 #endif /* CONFIG_LTT */
716 #endif /* _LTT_TRACER_H */