2 * Copyright (C) 2013 - David Goulet <dgoulet@efficios.com>
4 * This program is free software; you can redistribute it and/or modify it
5 * under the terms of the GNU General Public License, version 2 only, as
6 * published by the Free Software Foundation.
8 * This program is distributed in the hope that it will be useful, but WITHOUT
9 * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
10 * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for
13 * You should have received a copy of the GNU General Public License along with
14 * this program; if not, write to the Free Software Foundation, Inc., 51
15 * Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.
24 #include <common/common.h>
25 #include <common/hashtable/hashtable.h>
26 #include <common/uri.h>
30 struct consumer_output
;
32 struct snapshot_output
{
35 /* Number of snapshot taken with that output. */
38 struct consumer_output
*consumer
;
39 int kernel_sockets_copied
;
40 int ust_sockets_copied
;
42 * Contains the string with "<date>-<time>" for when the snapshot command
43 * is triggered. This is to make sure every streams will use the same time
44 * for the directory output.
49 struct lttng_ht_node_ulong node
;
53 unsigned long next_output_id
;
56 * Number of snapshot taken for that object. This value is used with a
57 * temporary output of a snapshot record.
60 struct lttng_ht
*output_ht
;
63 /* Snapshot object. */
64 struct snapshot
*snapshot_alloc(void);
65 void snapshot_destroy(struct snapshot
*obj
);
66 int snapshot_init(struct snapshot
*obj
);
67 void snapshot_delete_output(struct snapshot
*snapshot
,
68 struct snapshot_output
*output
);
69 void snapshot_add_output(struct snapshot
*snapshot
,
70 struct snapshot_output
*output
);
72 /* Snapshot output object. */
73 struct snapshot_output
*snapshot_output_alloc(void);
74 void snapshot_output_destroy(struct snapshot_output
*obj
);
75 int snapshot_output_init(uint64_t max_size
, const char *name
,
76 const char *ctrl_url
, const char *data_url
,
77 struct consumer_output
*consumer
, struct snapshot_output
*output
,
78 struct snapshot
*snapshot
);
79 int snapshot_output_init_with_uri(uint64_t max_size
, const char *name
,
80 struct lttng_uri
*uris
, size_t nb_uri
,
81 struct consumer_output
*consumer
, struct snapshot_output
*output
,
82 struct snapshot
*snapshot
);
83 struct snapshot_output
*snapshot_find_output_by_id(uint32_t id
,
84 struct snapshot
*snapshot
);
85 struct snapshot_output
*snapshot_find_output_by_name(const char *name
,
86 struct snapshot
*snapshot
);
88 #endif /* SNAPSHOT_H */
This page took 0.030936 seconds and 5 git commands to generate.