02c6b731e10217cccd04d97547b47fcb0940f523
[lttng-tools.git] / src / common / mi-lttng.h
1 /*
2 * Copyright (C) 2014 - Jonathan Rajotte <jonathan.r.julien@gmail.com>
3 * - Olivier Cotte <olivier.cotte@polymtl.ca>
4 *
5 * This program is free software; you can redistribute it and/or modify it
6 * under the terms of the GNU General Public License, version 2 only, as
7 * published by the Free Software Foundation.
8 *
9 * This program is distributed in the hope that it will be useful, but WITHOUT
10 * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
11 * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for
12 * more details.
13 *
14 * You should have received a copy of the GNU General Public License along with
15 * this program; if not, write to the Free Software Foundation, Inc., 51
16 * Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.
17 */
18
19 #ifndef _MI_LTTNG_H
20 #define _MI_LTTNG_H
21
22 #include <stdint.h>
23
24 #include <common/error.h>
25 #include <common/macros.h>
26 #include <common/config/config.h>
27 #include <lttng/lttng.h>
28
29 /* Don't want to reference snapshot-internal.h here */
30 struct lttng_snapshot_output;
31
32 /* Instance of a machine interface writer. */
33 struct mi_writer {
34 struct config_writer *writer;
35 enum lttng_mi_output_type type;
36 };
37
38 /*
39 * Version information for the machine interface.
40 */
41 struct mi_lttng_version {
42 char version[NAME_MAX]; /* Version number of package */
43 uint32_t version_major; /* LTTng-Tools major version number */
44 uint32_t version_minor; /* LTTng-Tools minor version number */
45 uint32_t version_patchlevel; /* LTTng-Tools patchlevel version number */
46 char version_commit[NAME_MAX]; /* Commit hash of the current version */
47 char version_name[NAME_MAX];
48 char package_url[NAME_MAX]; /* Define to the home page for this package. */
49 };
50
51 /* Strings related to command */
52 const char * const mi_lttng_element_command;
53 const char * const mi_lttng_element_command_action;
54 const char * const mi_lttng_element_command_add_context;
55 const char * const mi_lttng_element_command_calibrate;
56 const char * const mi_lttng_element_command_create;
57 const char * const mi_lttng_element_command_destroy;
58 const char * const mi_lttng_element_command_disable_channel;
59 const char * const mi_lttng_element_command_disable_event;
60 const char * const mi_lttng_element_command_enable_channels;
61 const char * const mi_lttng_element_command_enable_event;
62 const char * const mi_lttng_element_command_list;
63 const char * const mi_lttng_element_command_load;
64 const char * const mi_lttng_element_command_name;
65 const char * const mi_lttng_element_command_output;
66 const char * const mi_lttng_element_command_save;
67 const char * const mi_lttng_element_command_set_session;
68 const char * const mi_lttng_element_command_snapshot;
69 const char * const mi_lttng_element_command_snapshot_add;
70 const char * const mi_lttng_element_command_snapshot_del;
71 const char * const mi_lttng_element_command_snapshot_list;
72 const char * const mi_lttng_element_command_snapshot_record;
73 const char * const mi_lttng_element_command_start;
74 const char * const mi_lttng_element_command_stop;
75 const char * const mi_lttng_element_command_success;
76 const char * const mi_lttng_element_command_track;
77 const char * const mi_lttng_element_command_untrack;
78 const char * const mi_lttng_element_command_version;
79
80 /* Strings related to version command */
81 const char * const mi_lttng_element_version;
82 const char * const mi_lttng_element_version_commit;
83 const char * const mi_lttng_element_version_description;
84 const char * const mi_lttng_element_version_license;
85 const char * const mi_lttng_element_version_major;
86 const char * const mi_lttng_element_version_minor;
87 const char * const mi_lttng_element_version_patch_level;
88 const char * const mi_lttng_element_version_str;
89 const char * const mi_lttng_element_version_web;
90
91 /* String related to a lttng_event_field */
92 const char * const mi_lttng_element_event_field;
93 const char * const mi_lttng_element_event_fields;
94
95 /* String related to lttng_event_context */
96 const char * const mi_lttng_context_type_perf_counter;
97 const char * const mi_lttng_context_type_perf_cpu_counter;
98 const char * const mi_lttng_context_type_perf_thread_counter;
99
100 /* String related to lttng_event_perf_counter_ctx */
101 const char * const mi_lttng_element_perf_counter_context;
102
103 /* Strings related to pid */
104 const char * const mi_lttng_element_pids;
105 const char * const mi_lttng_element_pid;
106 const char * const mi_lttng_element_pid_id;
107
108 /* Strings related to save command */
109 const char * const mi_lttng_element_save;
110
111 /* Strings related to load command */
112 const char * const mi_lttng_element_load;
113
114 /* General element of mi_lttng */
115 const char * const mi_lttng_element_empty;
116 const char * const mi_lttng_element_id;
117 const char * const mi_lttng_element_nowrite;
118 const char * const mi_lttng_element_success;
119 const char * const mi_lttng_element_type_enum;
120 const char * const mi_lttng_element_type_float;
121 const char * const mi_lttng_element_type_integer;
122 const char * const mi_lttng_element_type_other;
123 const char * const mi_lttng_element_type_string;
124
125 /* String related to loglevel */
126 const char * const mi_lttng_loglevel_str_alert;
127 const char * const mi_lttng_loglevel_str_crit;
128 const char * const mi_lttng_loglevel_str_debug;
129 const char * const mi_lttng_loglevel_str_debug_function;
130 const char * const mi_lttng_loglevel_str_debug_line;
131 const char * const mi_lttng_loglevel_str_debug_module;
132 const char * const mi_lttng_loglevel_str_debug_process;
133 const char * const mi_lttng_loglevel_str_debug_program;
134 const char * const mi_lttng_loglevel_str_debug_system;
135 const char * const mi_lttng_loglevel_str_debug_unit;
136 const char * const mi_lttng_loglevel_str_emerg;
137 const char * const mi_lttng_loglevel_str_err;
138 const char * const mi_lttng_loglevel_str_info;
139 const char * const mi_lttng_loglevel_str_notice;
140 const char * const mi_lttng_loglevel_str_unknown;
141 const char * const mi_lttng_loglevel_str_warning;
142
143 /* String related to loglevel JUL */
144 const char * const mi_lttng_loglevel_str_jul_all;
145 const char * const mi_lttng_loglevel_str_jul_config;
146 const char * const mi_lttng_loglevel_str_jul_fine;
147 const char * const mi_lttng_loglevel_str_jul_finer;
148 const char * const mi_lttng_loglevel_str_jul_finest;
149 const char * const mi_lttng_loglevel_str_jul_info;
150 const char * const mi_lttng_loglevel_str_jul_off;
151 const char * const mi_lttng_loglevel_str_jul_severe;
152 const char * const mi_lttng_loglevel_str_jul_warning;
153
154 /* String related to loglevel Log4j */
155 const char * const mi_lttng_loglevel_str_log4j_off;
156 const char * const mi_lttng_loglevel_str_log4j_fatal;
157 const char * const mi_lttng_loglevel_str_log4j_error;
158 const char * const mi_lttng_loglevel_str_log4j_warn;
159 const char * const mi_lttng_loglevel_str_log4j_info;
160 const char * const mi_lttng_loglevel_str_log4j_debug;
161 const char * const mi_lttng_loglevel_str_log4j_trace;
162 const char * const mi_lttng_loglevel_str_log4j_all;
163
164 /* String related to loglevel Python */
165 const char * const mi_lttng_loglevel_str_python_critical;
166 const char * const mi_lttng_loglevel_str_python_error;
167 const char * const mi_lttng_loglevel_str_python_warning;
168 const char * const mi_lttng_loglevel_str_python_info;
169 const char * const mi_lttng_loglevel_str_python_debug;
170 const char * const mi_lttng_loglevel_str_python_notset;
171
172 /* String related to loglevel type */
173 const char * const mi_lttng_loglevel_type_all;
174 const char * const mi_lttng_loglevel_type_range;
175 const char * const mi_lttng_loglevel_type_single;
176 const char * const mi_lttng_loglevel_type_unknown;
177
178 /* Sting related to lttng_calibrate */
179 const char * const mi_lttng_element_calibrate;
180 const char * const mi_lttng_element_calibrate_function;
181
182 /* String related to a lttng_snapshot */
183 const char * const mi_lttng_element_snapshot_ctrl_url;
184 const char * const mi_lttng_element_snapshot_data_url;
185 const char * const mi_lttng_element_snapshot_max_size;
186 const char * const mi_lttng_element_snapshot_n_ptr;
187 const char * const mi_lttng_element_snapshot_session_name;
188 const char * const mi_lttng_element_snapshots;
189
190 /* Utility string function */
191 const char *mi_lttng_loglevel_string(int value, enum lttng_domain_type domain);
192 const char *mi_lttng_logleveltype_string(enum lttng_loglevel_type value);
193 const char *mi_lttng_eventfieldtype_string(enum lttng_event_field_type value);
194 const char *mi_lttng_domaintype_string(enum lttng_domain_type value);
195 const char *mi_lttng_buffertype_string(enum lttng_buffer_type value);
196 const char *mi_lttng_calibratetype_string(enum lttng_calibrate_type val);
197
198 /*
199 * Create an instance of a machine interface writer.
200 *
201 * fd_output File to which the XML content must be written. The file will be
202 * closed once the mi_writer has been destroyed.
203 *
204 * Returns an instance of a machine interface writer on success, NULL on
205 * error.
206 */
207 struct mi_writer *mi_lttng_writer_create(int fd_output, int mi_output_type);
208
209 /*
210 * Destroy an instance of a machine interface writer.
211 *
212 * writer An instance of a machine interface writer.
213 *
214 * Returns zero if the XML document could be closed cleanly. Negative values
215 * indicate an error.
216 */
217 int mi_lttng_writer_destroy(struct mi_writer *writer);
218
219 /*
220 * Open a command tag and add it's name node.
221 *
222 * writer An instance of a machine interface writer.
223 * command The command name.
224 *
225 * Returns zero if the XML document could be closed cleanly.
226 * Negative values indicate an error.
227 */
228 int mi_lttng_writer_command_open(struct mi_writer *writer, const char *command);
229
230 /*
231 * Close a command tag.
232 *
233 * writer An instance of a machine interface writer.
234 *
235 * Returns zero if the XML document could be closed cleanly.
236 * Negative values indicate an error.
237 */
238 int mi_lttng_writer_command_close(struct mi_writer *writer);
239
240 /*
241 * Open an element tag.
242 *
243 * writer An instance of a machine interface writer.
244 * element_name Element tag name.
245 *
246 * Returns zero if the XML document could be closed cleanly.
247 * Negative values indicate an error.
248 */
249 int mi_lttng_writer_open_element(struct mi_writer *writer,
250 const char *element_name);
251
252 /*
253 * Close the current element tag.
254 *
255 * writer An instance of a machine interface writer.
256 *
257 * Returns zero if the XML document could be closed cleanly.
258 * Negative values indicate an error.
259 */
260 int mi_lttng_writer_close_element(struct mi_writer *writer);
261
262 /*
263 * Close multiple element.
264 *
265 * writer An instance of a machine interface writer.
266 * nb_element Number of elements.
267 *
268 * Returns zero if the XML document could be closed cleanly.
269 * Negative values indicate an error.
270 */
271 int mi_lttng_close_multi_element(struct mi_writer *writer,
272 unsigned int nb_element);
273
274 /*
275 * Write an element of type unsigned int.
276 *
277 * writer An instance of a machine interface writer.
278 * element_name Element name.
279 * value Unsigned int value of the element
280 *
281 * Returns zero if the element's value could be written.
282 * Negative values indicate an error.
283 */
284 int mi_lttng_writer_write_element_unsigned_int(struct mi_writer *writer,
285 const char *element_name, uint64_t value);
286
287 /*
288 * Write an element of type signed int.
289 *
290 * writer An instance of a machine interface writer.
291 * element_name Element name.
292 * value Signed int value of the element.
293 *
294 * Returns zero if the element's value could be written.
295 * Negative values indicate an error.
296 */
297 int mi_lttng_writer_write_element_signed_int(struct mi_writer *writer,
298 const char *element_name, int64_t value);
299
300 /*
301 * Write an element of type boolean.
302 *
303 * writer An instance of a machine interface writer.
304 * element_name Element name.
305 * value Boolean value of the element.
306 *
307 * Returns zero if the element's value could be written.
308 * Negative values indicate an error.
309 */
310 int mi_lttng_writer_write_element_bool(struct mi_writer *writer,
311 const char *element_name, int value);
312
313 /*
314 * Write an element of type string.
315 *
316 * writer An instance of a machine interface writer.
317 * element_name Element name.
318 * value String value of the element.
319 *
320 * Returns zero if the element's value could be written.
321 * Negative values indicate an error.
322 */
323 int mi_lttng_writer_write_element_string(struct mi_writer *writer,
324 const char *element_name, const char *value);
325
326 /*
327 * Machine interface of struct version.
328 *
329 * writer An instance of a machine interface writer.
330 * version Version struct.
331 * lttng_description String value of the version description.
332 * lttng_license String value of the version license.
333 *
334 * Returns zero if the element's value could be written.
335 * Negative values indicate an error.
336 */
337 int mi_lttng_version(struct mi_writer *writer, struct mi_lttng_version *version,
338 const char *lttng_description, const char *lttng_license);
339
340 /*
341 * Machine interface: open a sessions element.
342 *
343 * writer An instance of a machine interface writer.
344 *
345 * Returns zero if the element's value could be written.
346 * Negative values indicate an error.
347 */
348 int mi_lttng_sessions_open(struct mi_writer *writer);
349
350 /*
351 * Machine interface of struct session.
352 *
353 * writer An instance of a machine interface writer.
354 * session An instance of a session.
355 * is_open Defines whether or not the session element shall be closed.
356 * This should be used carefully and the client
357 * must close the session element.
358 * Use case: nested additional information on a session
359 * ex: domain,channel event.
360 *
361 * Returns zero if the element's value could be written.
362 * Negative values indicate an error.
363 */
364 int mi_lttng_session(struct mi_writer *writer,
365 struct lttng_session *session, int is_open);
366
367 /*
368 * Machine interface: open a domains element.
369 *
370 * writer An instance of a machine interface writer.
371 *
372 * Returns zero if the element's value could be written.
373 * Negative values indicate an error.
374 */
375 int mi_lttng_domains_open(struct mi_writer *writer);
376
377 /*
378 * Machine interface of struct domain.
379 *
380 * writer An instance of a machine interface writer.
381 * domain An instance of a domain.
382 *
383 * is_open Defines whether or not the session element shall be closed.
384 * This should be used carefully and the client
385 * must close the domain element.
386 * Use case: nested addition information on a domain
387 * ex: channel event.
388 *
389 * Returns zero if the element's value could be written.
390 * Negative values indicate an error.
391 */
392 int mi_lttng_domain(struct mi_writer *writer,
393 struct lttng_domain *domain, int is_open);
394
395 /*
396 * Machine interface: open a channels element.
397 *
398 * writer An instance of a machine interface writer.
399 *
400 * Returns zero if the element's value could be written.
401 * Negative values indicate an error.
402 */
403 int mi_lttng_channels_open(struct mi_writer *writer);
404
405 /*
406 * Machine interface of struct channel.
407 *
408 * writer An instance of a machine interface writer.
409 * channel An instance of a channel.
410 *
411 * is_open Defines whether or not the session element shall be closed.
412 * This should be used carefully and the client
413 * must close the channel element.
414 * Use case: nested addition information on a channel.
415 * ex: channel event.
416 *
417 * Returns zero if the element's value could be written.
418 * Negative values indicate an error.
419 */
420 int mi_lttng_channel(struct mi_writer *writer,
421 struct lttng_channel *channel, int is_open);
422
423 /*
424 * Machine interface of struct channel_attr.
425 *
426 * writer An instance of a machine interface writer.
427 * attr An instance of a channel_attr struct.
428 *
429 * Returns zero if the element's value could be written.
430 * Negative values indicate an error.
431 */
432 int mi_lttng_channel_attr(struct mi_writer *writer,
433 struct lttng_channel_attr *attr);
434
435 /*
436 * Machine interface for event common attributes.
437 *
438 * writer An instance of a mi writer.
439 * event single trace event.
440 *
441 * The common attribute are:
442 * - mi event element
443 * - event name
444 * - event type
445 * - enabled tag
446 * - event filter
447 *
448 * Returns zero if the element's value could be written.
449 * Negative values indicate an error.
450 */
451 int mi_lttng_event_common_attributes(struct mi_writer *writer,
452 struct lttng_event *event);
453
454 /*
455 * Machine interface for kernel tracepoint event with a loglevel.
456 *
457 * writer An instance of a mi writer.
458 * event single trace event.
459 * domain Event's domain
460 *
461 * Returns zero if the element's value could be written.
462 * Negative values indicate an error.
463 */
464 int mi_lttng_event_tracepoint_loglevel(struct mi_writer *writer,
465 struct lttng_event *event, enum lttng_domain_type domain);
466
467 /*
468 * Machine interface for kernel tracepoint event with no loglevel.
469 *
470 * writer An instance of a mi writer.
471 * event single trace event.
472 *
473 * Returns zero if the element's value could be written.
474 * Negative values indicate an error.
475 */
476 int mi_lttng_event_tracepoint_no_loglevel(struct mi_writer *writer,
477 struct lttng_event *event);
478
479 /*
480 * Machine interface for kernel function and probe event.
481 *
482 * writer An instance of a mi writer.
483 * event single trace event.
484 *
485 * Returns zero if the element's value could be written.
486 * Negative values indicate an error.
487 */
488 int mi_lttng_event_function_probe(struct mi_writer *writer,
489 struct lttng_event *event);
490
491 /*
492 * Machine interface for kernel function entry event.
493 *
494 * writer An instance of a mi writer.
495 * event single trace event.
496 *
497 * Returns zero if the element's value could be written.
498 * Negative values indicate an error.
499 */
500 int mi_lttng_event_function_entry(struct mi_writer *writer,
501 struct lttng_event *event);
502
503 /*
504 * Machine interface: open an events element.
505 *
506 * writer An instance of a machine interface writer.
507 *
508 * Returns zero if the element's value could be written.
509 * Negative values indicate an error.
510 */
511 int mi_lttng_events_open(struct mi_writer *writer);
512
513 /*
514 * Machine interface for printing an event.
515 * The trace event type currently supported are:
516 * TRACEPOINT,
517 * PROBE,
518 * FUNCTION,
519 * FUNCTION_ENTRY,
520 * SYSCALL
521 *
522 * writer An instance of a mi writer.
523 * event single trace event.
524 * is_open Defines whether or not the session element shall be closed.
525 * This should be used carefully and the client
526 * must close the event element.
527 * Use case: nested additional information
528 * domain Event's domain
529 *
530 * Returns zero if the element's value could be written.
531 * Negative values indicate an error.
532 */
533 int mi_lttng_event(struct mi_writer *writer, struct lttng_event *event,
534 int is_open, enum lttng_domain_type domain);
535
536 /*
537 * Machine interface for struct lttng_event_field.
538 *
539 * writer An instance of a mi writer.
540 * field An event_field instance.
541 *
542 * Returns zero if the element's value could be written.
543 * Negative values indicate an error.
544 */
545 int mi_lttng_event_field(struct mi_writer *writer,
546 struct lttng_event_field *field);
547
548 /*
549 * Machine interface: open a event_fields element.
550 *
551 * writer An instance of a machine interface writer.
552 *
553 * Returns zero if the element have be written.
554 * Negative values indicate an error.
555 */
556 int mi_lttng_event_fields_open(struct mi_writer *writer);
557
558 /*
559 * Machine interface: open a PIDs element.
560 *
561 * writer An instance of a machine interface writer.
562 *
563 * Returns zero if the element's value could be written.
564 * Negative values indicate an error.
565 */
566 int mi_lttng_pids_open(struct mi_writer *writer);
567
568 /*
569 * Machine interface of a PID.
570 *
571 * writer An instance of a machine interface writer.
572 * pid A PID.
573 *
574 * is_open Defines whether or not the session element shall be closed.
575 * This should be used carefully and the client
576 * must close the pid element.
577 * Use case: nested addition information on a domain
578 * ex: channel event.
579 *
580 * Returns zero if the element's value could be written.
581 * Negative values indicate an error.
582 */
583 int mi_lttng_pid(struct mi_writer *writer, pid_t pid , const char *cmdline,
584 int is_open);
585
586 /*
587 * Machine interface for struct lttng_calibrate.
588 *
589 * writer An instance of a machine interface writer.
590 *
591 * calibrate A lttng_calibrate instance.
592 *
593 * Returns zero if the element's value could be written.
594 * Negative values indicate an error.
595 */
596 int mi_lttng_calibrate(struct mi_writer *writer,
597 struct lttng_calibrate *calibrate);
598
599 /*
600 * Machine interface of a context.
601 *
602 * writer An instance of a machine interface writer
603 *
604 * context An instance of a lttng_event_context
605 *
606 * is_open Define if we close the context element
607 * This should be used carefully and the client
608 * need to close the context element.
609 * Returns zero if the element's value could be written.
610 * Negative values indicate an error.
611 */
612 int mi_lttng_context(struct mi_writer *writer,
613 struct lttng_event_context *context, int is_open);
614
615 /*
616 * Machine interface of a perf_counter_context.
617 *
618 * writer An instance of a machine interface writer
619 *
620 * contest An instance of a lttng_event_perf_counter_ctx
621 *
622 * Returns zero if the element's value could be written.
623 * Negative values indicate an error.
624 */
625 int mi_lttng_perf_counter_context(struct mi_writer *writer,
626 struct lttng_event_perf_counter_ctx *perf_context);
627
628 /*
629 * Machine interface of the snapshot list_output.
630 * It specifies the session for which we are listing snapshots,
631 * and it opens a snapshots element to list a sequence
632 * of snapshots.
633 *
634 * writer An instance of a machine interface writer.
635 *
636 * session_name: Snapshot output for session "session_name".
637 *
638 * Note: The client has to close the session and the snapshots elements after
639 * having listed every lttng_snapshot_output.
640 *
641 * Returns zero if the element's value could be written.
642 * Negative values indicate an error.
643 */
644 int mi_lttng_snapshot_output_session_name(struct mi_writer *writer,
645 const char *session_name);
646
647 /*
648 * Machine interface of the snapshot output.
649 * The machine interface serializes the following attributes:
650 * - id: ID of the snapshot output.
651 * - name: Name of the output.
652 * - data_url : Destination of the output.
653 * - ctrl_url: Destination of the output.
654 * - max_size: total size of all stream combined.
655 *
656 * writer An instance of a machine interface writer.
657 *
658 * output: A list of snapshot_output.
659 *
660 * Returns zero if the element's value could be written.
661 * Negative values indicate an error.
662 */
663 int mi_lttng_snapshot_list_output(struct mi_writer *writer,
664 struct lttng_snapshot_output *output);
665
666 /*
667 * Machine interface of the output of the command snapshot del output
668 * when deleting a snapshot either by id or by name.
669 * If the snapshot was found and successfully deleted using its id,
670 * it return the id of the snapshot and the current session name on which it
671 * was attached.
672 *
673 * Otherwise, it do the same process with the name of the snapshot, if the
674 * snapshot output id is undefined.
675 *
676 * writer An instance of a machine interface writer.
677 *
678 * id: ID of the snapshot output.
679 *
680 * name: Name of the snapshot.
681 *
682 * current_session_name: Session to which the snapshot belongs.
683 *
684 * Returns zero if the element's value could be written.
685 * Negative values indicate an error.
686 */
687 int mi_lttng_snapshot_del_output(struct mi_writer *writer, int id,
688 const char *name, const char *current_session_name);
689
690 /*
691 * Machine interface of the output of the command snapshot add output
692 * when adding a snapshot from a user URL.
693 *
694 * If the snapshot was successfully added, the machine interface lists
695 * these information:
696 * - id: ID of the newly add snapshot output.
697 * - current_session_name: Name of the session to which the output was added.
698 * - ctrl_url: Destination of the output.
699 * - max_size: total size of all stream combined.
700 *
701 * writer An instance of a machine interface writer.
702 *
703 * current_session_name: Session to which the snapshot belongs.
704 *
705 * n_ptr:
706 *
707 * output: iterator over a lttng_snapshot_output_list which contain
708 * the snapshot output informations.
709 *
710 * Returns zero if the element's value could be written.
711 * Negative values indicate an error.
712 */
713 int mi_lttng_snapshot_add_output(struct mi_writer *writer,
714 const char *current_session_name, const char *n_ptr,
715 struct lttng_snapshot_output *output);
716
717 /*
718 * Machine interface of the output of the command snapshot
719 * record from a URL (if given).
720 *
721 * If the snapshot is successfully recorded from a url, the machine interface
722 * output the following information:
723 * - url: Destination of the output stored in the snapshot.
724 *
725 * Otherwise, the machine interface output the data and ctrl url received
726 * from the command-line.
727 *
728 * writer An instance of a machine interface writer.
729 *
730 * current_session_name: Snapshot record for session "current_session_name".
731 *
732 * ctrl_url, data_url: Destination of the output receive from the command-line.
733 *
734 * Returns zero if the element's value could be written.
735 * Negative values indicate an error.
736 */
737 int mi_lttng_snapshot_record(struct mi_writer *writer,
738 const char *current_session_name, const char *url,
739 const char *cmdline_ctrl_url, const char *cmdline_data_url);
740
741 #endif /* _MI_LTTNG_H */
This page took 0.048528 seconds and 4 git commands to generate.