2 * Copyright (C) 2013 David Goulet <dgoulet@efficios.com>
4 * SPDX-License-Identifier: GPL-2.0-only
14 #include <common/common.h>
15 #include <common/hashtable/hashtable.h>
16 #include <common/uri.h>
20 struct consumer_output
;
23 struct snapshot_output
{
26 /* Number of snapshot taken with that output. */
29 struct consumer_output
*consumer
;
30 int kernel_sockets_copied
;
31 int ust_sockets_copied
;
33 * Contains the string with "<date>-<time>" for when the snapshot command
34 * is triggered. This is to make sure every streams will use the same time
35 * for the directory output.
40 struct lttng_ht_node_ulong node
;
44 unsigned long next_output_id
;
47 * Number of snapshot taken for that object. This value is used with a
48 * temporary output of a snapshot record.
51 struct lttng_ht
*output_ht
;
54 /* Snapshot object. */
55 struct snapshot
*snapshot_alloc(void);
56 void snapshot_destroy(struct snapshot
*obj
);
57 int snapshot_init(struct snapshot
*obj
);
58 void snapshot_delete_output(struct snapshot
*snapshot
,
59 struct snapshot_output
*output
);
60 void snapshot_add_output(struct snapshot
*snapshot
,
61 struct snapshot_output
*output
);
63 /* Snapshot output object. */
64 struct snapshot_output
*snapshot_output_alloc(void);
65 void snapshot_output_destroy(struct snapshot_output
*obj
);
66 int snapshot_output_init(const struct ltt_session
*session
,
67 uint64_t max_size
, const char *name
,
68 const char *ctrl_url
, const char *data_url
,
69 struct consumer_output
*consumer
, struct snapshot_output
*output
,
70 struct snapshot
*snapshot
);
71 int snapshot_output_init_with_uri(const struct ltt_session
*session
,
72 uint64_t max_size
, const char *name
,
73 struct lttng_uri
*uris
, size_t nb_uri
,
74 struct consumer_output
*consumer
, struct snapshot_output
*output
,
75 struct snapshot
*snapshot
);
76 struct snapshot_output
*snapshot_find_output_by_id(uint32_t id
,
77 struct snapshot
*snapshot
);
78 struct snapshot_output
*snapshot_find_output_by_name(const char *name
,
79 struct snapshot
*snapshot
);
81 #endif /* SNAPSHOT_H */
This page took 0.03137 seconds and 4 git commands to generate.