kernel-ctl: Expose kernel clear buffer operation
[lttng-tools.git] / src / common / kernel-ctl / kernel-ctl.c
1 /*
2 * Copyright (C) 2011 - Julien Desfossez <julien.desfossez@polymtl.ca>
3 * Mathieu Desnoyers <mathieu.desnoyers@efficios.com>
4 * 2016 - Jérémie Galarneau <jeremie.galarneau@efficios.com>
5 *
6 * This program is free software; you can redistribute it and/or modify
7 * it under the terms of the GNU General Public License, version 2 only,
8 * as published by the Free Software Foundation.
9 *
10 * This program is distributed in the hope that it will be useful,
11 * but WITHOUT ANY WARRANTY; without even the implied warranty of
12 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
13 * GNU General Public License for more details.
14 *
15 * You should have received a copy of the GNU General Public License along
16 * with this program; if not, write to the Free Software Foundation, Inc.,
17 * 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.
18 */
19
20 #define _LGPL_SOURCE
21 #define __USE_LINUX_IOCTL_DEFS
22 #include <sys/ioctl.h>
23 #include <string.h>
24 #include <common/align.h>
25 #include <common/macros.h>
26 #include <errno.h>
27 #include <stdarg.h>
28 #include <assert.h>
29 #include <common/time.h>
30
31 #include "kernel-ctl.h"
32 #include "kernel-ioctl.h"
33
34 #define LTTNG_IOCTL_CHECK(fildes, request, ...) ({ \
35 int ret = ioctl(fildes, request, ##__VA_ARGS__);\
36 assert(ret <= 0); \
37 !ret ? 0 : -errno; \
38 })
39
40 #define LTTNG_IOCTL_NO_CHECK(fildes, request, ...) ({ \
41 int ret = ioctl(fildes, request, ##__VA_ARGS__);\
42 ret >= 0 ? ret : -errno; \
43 })
44
45 /*
46 * This flag indicates which version of the kernel ABI to use. The old
47 * ABI (namespace _old) does not support a 32-bit user-space when the
48 * kernel is 64-bit. The old ABI is kept here for compatibility but is
49 * deprecated and will be removed eventually.
50 */
51 static int lttng_kernel_use_old_abi = -1;
52
53 /*
54 * Execute the new or old ioctl depending on the ABI version.
55 * If the ABI version is not determined yet (lttng_kernel_use_old_abi = -1),
56 * this function tests if the new ABI is available and otherwise fallbacks
57 * on the old one.
58 * This function takes the fd on which the ioctl must be executed and the old
59 * and new request codes.
60 * It returns the return value of the ioctl executed.
61 */
62 static inline int compat_ioctl_no_arg(int fd, unsigned long oldname,
63 unsigned long newname)
64 {
65 int ret;
66
67 if (lttng_kernel_use_old_abi == -1) {
68 ret = LTTNG_IOCTL_NO_CHECK(fd, newname);
69 if (!ret) {
70 lttng_kernel_use_old_abi = 0;
71 goto end;
72 }
73 lttng_kernel_use_old_abi = 1;
74 }
75 if (lttng_kernel_use_old_abi) {
76 ret = LTTNG_IOCTL_NO_CHECK(fd, oldname);
77 } else {
78 ret = LTTNG_IOCTL_NO_CHECK(fd, newname);
79 }
80
81 end:
82 return ret;
83 }
84
85 int kernctl_create_session(int fd)
86 {
87 return compat_ioctl_no_arg(fd, LTTNG_KERNEL_OLD_SESSION,
88 LTTNG_KERNEL_SESSION);
89 }
90
91 /* open the metadata global channel */
92 int kernctl_open_metadata(int fd, struct lttng_channel_attr *chops)
93 {
94 struct lttng_kernel_channel channel;
95
96 if (lttng_kernel_use_old_abi) {
97 struct lttng_kernel_old_channel old_channel;
98
99 memset(&old_channel, 0, sizeof(old_channel));
100 old_channel.overwrite = chops->overwrite;
101 old_channel.subbuf_size = chops->subbuf_size;
102 old_channel.num_subbuf = chops->num_subbuf;
103 old_channel.switch_timer_interval = chops->switch_timer_interval;
104 old_channel.read_timer_interval = chops->read_timer_interval;
105 old_channel.output = chops->output;
106
107 memset(old_channel.padding, 0, sizeof(old_channel.padding));
108 /*
109 * The new channel padding is smaller than the old ABI so we use the
110 * new ABI padding size for the memcpy.
111 */
112 memcpy(old_channel.padding, chops->padding, sizeof(chops->padding));
113
114 return LTTNG_IOCTL_NO_CHECK(fd, LTTNG_KERNEL_OLD_METADATA,
115 &old_channel);
116 }
117
118 memset(&channel, 0, sizeof(channel));
119 channel.overwrite = chops->overwrite;
120 channel.subbuf_size = chops->subbuf_size;
121 channel.num_subbuf = chops->num_subbuf;
122 channel.switch_timer_interval = chops->switch_timer_interval;
123 channel.read_timer_interval = chops->read_timer_interval;
124 channel.output = chops->output;
125 memcpy(channel.padding, chops->padding, sizeof(chops->padding));
126
127 return LTTNG_IOCTL_NO_CHECK(fd, LTTNG_KERNEL_METADATA, &channel);
128 }
129
130 int kernctl_create_channel(int fd, struct lttng_channel_attr *chops)
131 {
132 struct lttng_kernel_channel channel;
133
134 memset(&channel, 0, sizeof(channel));
135 if (lttng_kernel_use_old_abi) {
136 struct lttng_kernel_old_channel old_channel;
137
138 old_channel.overwrite = chops->overwrite;
139 old_channel.subbuf_size = chops->subbuf_size;
140 old_channel.num_subbuf = chops->num_subbuf;
141 old_channel.switch_timer_interval = chops->switch_timer_interval;
142 old_channel.read_timer_interval = chops->read_timer_interval;
143 old_channel.output = chops->output;
144
145 memset(old_channel.padding, 0, sizeof(old_channel.padding));
146 /*
147 * The new channel padding is smaller than the old ABI so we use the
148 * new ABI padding size for the memcpy.
149 */
150 memcpy(old_channel.padding, chops->padding, sizeof(chops->padding));
151
152 return LTTNG_IOCTL_NO_CHECK(fd, LTTNG_KERNEL_OLD_CHANNEL,
153 &old_channel);
154 }
155
156 channel.overwrite = chops->overwrite;
157 channel.subbuf_size = chops->subbuf_size;
158 channel.num_subbuf = chops->num_subbuf;
159 channel.switch_timer_interval = chops->switch_timer_interval;
160 channel.read_timer_interval = chops->read_timer_interval;
161 channel.output = chops->output;
162 memcpy(channel.padding, chops->padding, sizeof(chops->padding));
163
164 return LTTNG_IOCTL_NO_CHECK(fd, LTTNG_KERNEL_CHANNEL, &channel);
165 }
166
167 int kernctl_syscall_mask(int fd, char **syscall_mask, uint32_t *nr_bits)
168 {
169 struct lttng_kernel_syscall_mask kmask_len, *kmask = NULL;
170 size_t array_alloc_len;
171 char *new_mask;
172 int ret = 0;
173
174 if (!syscall_mask) {
175 ret = -1;
176 goto end;
177 }
178
179 if (!nr_bits) {
180 ret = -1;
181 goto end;
182 }
183
184 kmask_len.len = 0;
185 ret = LTTNG_IOCTL_CHECK(fd, LTTNG_KERNEL_SYSCALL_MASK, &kmask_len);
186 if (ret) {
187 goto end;
188 }
189
190 array_alloc_len = ALIGN(kmask_len.len, 8) >> 3;
191
192 kmask = zmalloc(sizeof(*kmask) + array_alloc_len);
193 if (!kmask) {
194 ret = -1;
195 goto end;
196 }
197
198 kmask->len = kmask_len.len;
199 ret = LTTNG_IOCTL_CHECK(fd, LTTNG_KERNEL_SYSCALL_MASK, kmask);
200 if (ret) {
201 goto end;
202 }
203
204 new_mask = realloc(*syscall_mask, array_alloc_len);
205 if (!new_mask) {
206 ret = -1;
207 goto end;
208 }
209 memcpy(new_mask, kmask->mask, array_alloc_len);
210 *syscall_mask = new_mask;
211 *nr_bits = kmask->len;
212
213 end:
214 free(kmask);
215 return ret;
216 }
217
218 int kernctl_track_pid(int fd, int pid)
219 {
220 return LTTNG_IOCTL_CHECK(fd, LTTNG_KERNEL_SESSION_TRACK_PID, pid);
221 }
222
223 int kernctl_untrack_pid(int fd, int pid)
224 {
225 return LTTNG_IOCTL_CHECK(fd, LTTNG_KERNEL_SESSION_UNTRACK_PID, pid);
226 }
227
228 int kernctl_list_tracker_pids(int fd)
229 {
230 return LTTNG_IOCTL_NO_CHECK(fd, LTTNG_KERNEL_SESSION_LIST_TRACKER_PIDS);
231 }
232
233 int kernctl_session_regenerate_metadata(int fd)
234 {
235 return LTTNG_IOCTL_CHECK(fd, LTTNG_KERNEL_SESSION_METADATA_REGEN);
236 }
237
238 int kernctl_session_regenerate_statedump(int fd)
239 {
240 return LTTNG_IOCTL_CHECK(fd, LTTNG_KERNEL_SESSION_STATEDUMP);
241 }
242
243 int kernctl_session_set_name(int fd, const char *name)
244 {
245 int ret;
246 struct lttng_kernel_session_name session_name;
247
248 ret = lttng_strncpy(session_name.name, name, sizeof(session_name.name));
249 if (ret) {
250 goto end;
251 }
252
253 ret = LTTNG_IOCTL_CHECK(
254 fd, LTTNG_KERNEL_SESSION_SET_NAME, &session_name);
255 end:
256 return ret;
257 }
258
259 int kernctl_session_set_creation_time(int fd, time_t time)
260 {
261 int ret;
262 struct lttng_kernel_session_creation_time creation_time;
263
264 ret = time_to_iso8601_str(time, creation_time.iso8601,
265 sizeof(creation_time.iso8601));
266 if (ret) {
267 goto end;
268 }
269
270 ret = LTTNG_IOCTL_CHECK(fd, LTTNG_KERNEL_SESSION_SET_CREATION_TIME,
271 &creation_time);
272 end:
273 return ret;
274 }
275
276 int kernctl_create_stream(int fd)
277 {
278 return compat_ioctl_no_arg(fd, LTTNG_KERNEL_OLD_STREAM,
279 LTTNG_KERNEL_STREAM);
280 }
281
282 int kernctl_create_event(int fd, struct lttng_kernel_event *ev)
283 {
284 if (lttng_kernel_use_old_abi) {
285 struct lttng_kernel_old_event old_event;
286
287 memset(&old_event, 0, sizeof(old_event));
288 memcpy(old_event.name, ev->name, sizeof(old_event.name));
289 old_event.instrumentation = ev->instrumentation;
290 switch (ev->instrumentation) {
291 case LTTNG_KERNEL_KPROBE:
292 old_event.u.kprobe.addr = ev->u.kprobe.addr;
293 old_event.u.kprobe.offset = ev->u.kprobe.offset;
294 memcpy(old_event.u.kprobe.symbol_name,
295 ev->u.kprobe.symbol_name,
296 sizeof(old_event.u.kprobe.symbol_name));
297 break;
298 case LTTNG_KERNEL_KRETPROBE:
299 old_event.u.kretprobe.addr = ev->u.kretprobe.addr;
300 old_event.u.kretprobe.offset = ev->u.kretprobe.offset;
301 memcpy(old_event.u.kretprobe.symbol_name,
302 ev->u.kretprobe.symbol_name,
303 sizeof(old_event.u.kretprobe.symbol_name));
304 break;
305 case LTTNG_KERNEL_FUNCTION:
306 memcpy(old_event.u.ftrace.symbol_name,
307 ev->u.ftrace.symbol_name,
308 sizeof(old_event.u.ftrace.symbol_name));
309 break;
310 default:
311 break;
312 }
313
314 return LTTNG_IOCTL_NO_CHECK(fd, LTTNG_KERNEL_OLD_EVENT,
315 &old_event);
316 }
317 return LTTNG_IOCTL_NO_CHECK(fd, LTTNG_KERNEL_EVENT, ev);
318 }
319
320 int kernctl_add_context(int fd, struct lttng_kernel_context *ctx)
321 {
322 if (lttng_kernel_use_old_abi) {
323 struct lttng_kernel_old_context old_ctx;
324
325 memset(&old_ctx, 0, sizeof(old_ctx));
326 old_ctx.ctx = ctx->ctx;
327 /* only type that uses the union */
328 if (ctx->ctx == LTTNG_KERNEL_CONTEXT_PERF_CPU_COUNTER) {
329 old_ctx.u.perf_counter.type =
330 ctx->u.perf_counter.type;
331 old_ctx.u.perf_counter.config =
332 ctx->u.perf_counter.config;
333 memcpy(old_ctx.u.perf_counter.name,
334 ctx->u.perf_counter.name,
335 sizeof(old_ctx.u.perf_counter.name));
336 }
337 return LTTNG_IOCTL_CHECK(fd, LTTNG_KERNEL_OLD_CONTEXT, &old_ctx);
338 }
339 return LTTNG_IOCTL_CHECK(fd, LTTNG_KERNEL_CONTEXT, ctx);
340 }
341
342
343 /* Enable event, channel and session LTTNG_IOCTL_CHECK */
344 int kernctl_enable(int fd)
345 {
346 return compat_ioctl_no_arg(fd, LTTNG_KERNEL_OLD_ENABLE,
347 LTTNG_KERNEL_ENABLE);
348 }
349
350 /* Disable event, channel and session LTTNG_IOCTL_CHECK */
351 int kernctl_disable(int fd)
352 {
353 return compat_ioctl_no_arg(fd, LTTNG_KERNEL_OLD_DISABLE,
354 LTTNG_KERNEL_DISABLE);
355 }
356
357 int kernctl_start_session(int fd)
358 {
359 return compat_ioctl_no_arg(fd, LTTNG_KERNEL_OLD_SESSION_START,
360 LTTNG_KERNEL_SESSION_START);
361 }
362
363 int kernctl_stop_session(int fd)
364 {
365 return compat_ioctl_no_arg(fd, LTTNG_KERNEL_OLD_SESSION_STOP,
366 LTTNG_KERNEL_SESSION_STOP);
367 }
368
369 int kernctl_filter(int fd, struct lttng_filter_bytecode *filter)
370 {
371 struct lttng_kernel_filter_bytecode *kb;
372 uint32_t len;
373 int ret;
374
375 /* Translate bytecode to kernel bytecode */
376 kb = zmalloc(sizeof(*kb) + filter->len);
377 if (!kb)
378 return -ENOMEM;
379 kb->len = len = filter->len;
380 kb->reloc_offset = filter->reloc_table_offset;
381 kb->seqnum = filter->seqnum;
382 memcpy(kb->data, filter->data, len);
383 ret = LTTNG_IOCTL_CHECK(fd, LTTNG_KERNEL_FILTER, kb);
384 free(kb);
385 return ret;
386 }
387
388 int kernctl_add_callsite(int fd, struct lttng_kernel_event_callsite *callsite)
389 {
390 return LTTNG_IOCTL_CHECK(fd, LTTNG_KERNEL_ADD_CALLSITE, callsite);
391 }
392
393 int kernctl_tracepoint_list(int fd)
394 {
395 return compat_ioctl_no_arg(fd, LTTNG_KERNEL_OLD_TRACEPOINT_LIST,
396 LTTNG_KERNEL_TRACEPOINT_LIST);
397 }
398
399 int kernctl_syscall_list(int fd)
400 {
401 return LTTNG_IOCTL_NO_CHECK(fd, LTTNG_KERNEL_SYSCALL_LIST);
402 }
403
404 int kernctl_tracer_version(int fd, struct lttng_kernel_tracer_version *v)
405 {
406 int ret;
407
408 if (lttng_kernel_use_old_abi == -1) {
409 ret = LTTNG_IOCTL_CHECK(fd, LTTNG_KERNEL_TRACER_VERSION, v);
410 if (!ret) {
411 lttng_kernel_use_old_abi = 0;
412 goto end;
413 }
414 lttng_kernel_use_old_abi = 1;
415 }
416 if (lttng_kernel_use_old_abi) {
417 struct lttng_kernel_old_tracer_version old_v;
418
419 ret = LTTNG_IOCTL_CHECK(fd, LTTNG_KERNEL_OLD_TRACER_VERSION, &old_v);
420 if (ret) {
421 goto end;
422 }
423 v->major = old_v.major;
424 v->minor = old_v.minor;
425 v->patchlevel = old_v.patchlevel;
426 } else {
427 ret = LTTNG_IOCTL_CHECK(fd, LTTNG_KERNEL_TRACER_VERSION, v);
428 }
429
430 end:
431 return ret;
432 }
433
434 int kernctl_tracer_abi_version(int fd,
435 struct lttng_kernel_tracer_abi_version *v)
436 {
437 return LTTNG_IOCTL_CHECK(fd, LTTNG_KERNEL_TRACER_ABI_VERSION, v);
438 }
439
440 int kernctl_wait_quiescent(int fd)
441 {
442 return compat_ioctl_no_arg(fd, LTTNG_KERNEL_OLD_WAIT_QUIESCENT,
443 LTTNG_KERNEL_WAIT_QUIESCENT);
444 }
445
446 int kernctl_buffer_flush(int fd)
447 {
448 return LTTNG_IOCTL_CHECK(fd, RING_BUFFER_FLUSH);
449 }
450
451 int kernctl_buffer_flush_empty(int fd)
452 {
453 return LTTNG_IOCTL_CHECK(fd, RING_BUFFER_FLUSH_EMPTY);
454 }
455
456 int kernctl_buffer_clear(int fd)
457 {
458 return LTTNG_IOCTL_CHECK(fd, RING_BUFFER_CLEAR);
459 }
460
461 /* returns the version of the metadata. */
462 int kernctl_get_metadata_version(int fd, uint64_t *version)
463 {
464 return LTTNG_IOCTL_CHECK(fd, RING_BUFFER_GET_METADATA_VERSION, version);
465 }
466
467 int kernctl_metadata_cache_dump(int fd)
468 {
469 return LTTNG_IOCTL_CHECK(fd, RING_BUFFER_METADATA_CACHE_DUMP);
470 }
471
472 /* Buffer operations */
473
474 /* For mmap mode, readable without "get" operation */
475
476 /* returns the length to mmap. */
477 int kernctl_get_mmap_len(int fd, unsigned long *len)
478 {
479 return LTTNG_IOCTL_CHECK(fd, RING_BUFFER_GET_MMAP_LEN, len);
480 }
481
482 /* returns the maximum size for sub-buffers. */
483 int kernctl_get_max_subbuf_size(int fd, unsigned long *len)
484 {
485 return LTTNG_IOCTL_CHECK(fd, RING_BUFFER_GET_MAX_SUBBUF_SIZE, len);
486 }
487
488 /*
489 * For mmap mode, operate on the current packet (between get/put or
490 * get_next/put_next).
491 */
492
493 /* returns the offset of the subbuffer belonging to the mmap reader. */
494 int kernctl_get_mmap_read_offset(int fd, unsigned long *off)
495 {
496 return LTTNG_IOCTL_CHECK(fd, RING_BUFFER_GET_MMAP_READ_OFFSET, off);
497 }
498
499 /* returns the size of the current sub-buffer, without padding (for mmap). */
500 int kernctl_get_subbuf_size(int fd, unsigned long *len)
501 {
502 return LTTNG_IOCTL_CHECK(fd, RING_BUFFER_GET_SUBBUF_SIZE, len);
503 }
504
505 /* returns the size of the current sub-buffer, without padding (for mmap). */
506 int kernctl_get_padded_subbuf_size(int fd, unsigned long *len)
507 {
508 return LTTNG_IOCTL_CHECK(fd, RING_BUFFER_GET_PADDED_SUBBUF_SIZE, len);
509 }
510
511 /* Get exclusive read access to the next sub-buffer that can be read. */
512 int kernctl_get_next_subbuf(int fd)
513 {
514 return LTTNG_IOCTL_CHECK(fd, RING_BUFFER_GET_NEXT_SUBBUF);
515 }
516
517
518 /* Release exclusive sub-buffer access, move consumer forward. */
519 int kernctl_put_next_subbuf(int fd)
520 {
521 return LTTNG_IOCTL_CHECK(fd, RING_BUFFER_PUT_NEXT_SUBBUF);
522 }
523
524 /* snapshot */
525
526 /* Get a snapshot of the current ring buffer producer and consumer positions */
527 int kernctl_snapshot(int fd)
528 {
529 return LTTNG_IOCTL_CHECK(fd, RING_BUFFER_SNAPSHOT);
530 }
531
532 /*
533 * Get a snapshot of the current ring buffer producer and consumer positions,
534 * regardless of whether or not the two positions are contained within the
535 * same sub-buffer.
536 */
537 int kernctl_snapshot_sample_positions(int fd)
538 {
539 return LTTNG_IOCTL_CHECK(fd, RING_BUFFER_SNAPSHOT_SAMPLE_POSITIONS);
540 }
541
542 /* Get the consumer position (iteration start) */
543 int kernctl_snapshot_get_consumed(int fd, unsigned long *pos)
544 {
545 return LTTNG_IOCTL_CHECK(fd, RING_BUFFER_SNAPSHOT_GET_CONSUMED, pos);
546 }
547
548 /* Get the producer position (iteration end) */
549 int kernctl_snapshot_get_produced(int fd, unsigned long *pos)
550 {
551 return LTTNG_IOCTL_CHECK(fd, RING_BUFFER_SNAPSHOT_GET_PRODUCED, pos);
552 }
553
554 /* Get exclusive read access to the specified sub-buffer position */
555 int kernctl_get_subbuf(int fd, unsigned long *len)
556 {
557 return LTTNG_IOCTL_CHECK(fd, RING_BUFFER_GET_SUBBUF, len);
558 }
559
560 /* Release exclusive sub-buffer access */
561 int kernctl_put_subbuf(int fd)
562 {
563 return LTTNG_IOCTL_CHECK(fd, RING_BUFFER_PUT_SUBBUF);
564 }
565
566 /* Returns the timestamp begin of the current sub-buffer. */
567 int kernctl_get_timestamp_begin(int fd, uint64_t *timestamp_begin)
568 {
569 return LTTNG_IOCTL_CHECK(fd, LTTNG_RING_BUFFER_GET_TIMESTAMP_BEGIN,
570 timestamp_begin);
571 }
572
573 /* Returns the timestamp end of the current sub-buffer. */
574 int kernctl_get_timestamp_end(int fd, uint64_t *timestamp_end)
575 {
576 return LTTNG_IOCTL_CHECK(fd, LTTNG_RING_BUFFER_GET_TIMESTAMP_END,
577 timestamp_end);
578 }
579
580 /* Returns the number of discarded events in the current sub-buffer. */
581 int kernctl_get_events_discarded(int fd, uint64_t *events_discarded)
582 {
583 return LTTNG_IOCTL_CHECK(fd, LTTNG_RING_BUFFER_GET_EVENTS_DISCARDED,
584 events_discarded);
585 }
586
587 /* Returns the content size in the current sub-buffer. */
588 int kernctl_get_content_size(int fd, uint64_t *content_size)
589 {
590 return LTTNG_IOCTL_CHECK(fd, LTTNG_RING_BUFFER_GET_CONTENT_SIZE,
591 content_size);
592 }
593
594 /* Returns the packet size in the current sub-buffer. */
595 int kernctl_get_packet_size(int fd, uint64_t *packet_size)
596 {
597 return LTTNG_IOCTL_CHECK(fd, LTTNG_RING_BUFFER_GET_PACKET_SIZE,
598 packet_size);
599 }
600
601 /* Returns the stream id of the current sub-buffer. */
602 int kernctl_get_stream_id(int fd, uint64_t *stream_id)
603 {
604 return LTTNG_IOCTL_CHECK(fd, LTTNG_RING_BUFFER_GET_STREAM_ID,
605 stream_id);
606 }
607
608 /* Returns the current timestamp. */
609 int kernctl_get_current_timestamp(int fd, uint64_t *ts)
610 {
611 return LTTNG_IOCTL_CHECK(fd, LTTNG_RING_BUFFER_GET_CURRENT_TIMESTAMP,
612 ts);
613 }
614
615 /* Returns the packet sequence number of the current sub-buffer. */
616 int kernctl_get_sequence_number(int fd, uint64_t *seq)
617 {
618 return LTTNG_IOCTL_CHECK(fd, LTTNG_RING_BUFFER_GET_SEQ_NUM, seq);
619 }
620
621 /* Returns the stream instance id. */
622 int kernctl_get_instance_id(int fd, uint64_t *id)
623 {
624 return LTTNG_IOCTL_CHECK(fd, LTTNG_RING_BUFFER_INSTANCE_ID, id);
625 }
This page took 0.063644 seconds and 4 git commands to generate.