projects
/
lttng-tools.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
Clean-up: rename double 'lttng' prefixed functions
[lttng-tools.git]
/
src
/
common
/
consumer
/
consumer.h
diff --git
a/src/common/consumer/consumer.h
b/src/common/consumer/consumer.h
index aa8a401a0416efe089057f2e07b6187c38bf78d5..5fb812c08edb377f213f26b91e53dc74a2364d9a 100644
(file)
--- a/
src/common/consumer/consumer.h
+++ b/
src/common/consumer/consumer.h
@@
-27,6
+27,7
@@
#include <common/trace-chunk-registry.h>
#include <common/credentials.h>
#include <common/buffer-view.h>
#include <common/trace-chunk-registry.h>
#include <common/credentials.h>
#include <common/buffer-view.h>
+#include <common/dynamic-array.h>
struct lttng_consumer_local_data;
struct lttng_consumer_local_data;
@@
-64,6
+65,7
@@
enum lttng_consumer_command {
LTTNG_CONSUMER_CLOSE_TRACE_CHUNK,
LTTNG_CONSUMER_TRACE_CHUNK_EXISTS,
LTTNG_CONSUMER_CLEAR_CHANNEL,
LTTNG_CONSUMER_CLOSE_TRACE_CHUNK,
LTTNG_CONSUMER_TRACE_CHUNK_EXISTS,
LTTNG_CONSUMER_CLEAR_CHANNEL,
+ LTTNG_CONSUMER_OPEN_CHANNEL_PACKETS,
};
enum lttng_consumer_type {
};
enum lttng_consumer_type {
@@
-88,7
+90,13
@@
enum consumer_channel_type {
CONSUMER_CHANNEL_TYPE_DATA = 1,
};
CONSUMER_CHANNEL_TYPE_DATA = 1,
};
-extern struct lttng_consumer_global_data consumer_data;
+enum sync_metadata_status {
+ SYNC_METADATA_STATUS_NEW_DATA,
+ SYNC_METADATA_STATUS_NO_DATA,
+ SYNC_METADATA_STATUS_ERROR,
+};
+
+extern struct lttng_consumer_global_data the_consumer_data;
struct stream_list {
struct cds_list_head head;
struct stream_list {
struct cds_list_head head;
@@
-152,7
+160,7
@@
struct lttng_consumer_channel {
/* For UST */
uid_t ust_app_uid; /* Application UID. */
/* For UST */
uid_t ust_app_uid; /* Application UID. */
- struct
ust
ctl_consumer_channel *uchan;
+ struct
lttng_ust_
ctl_consumer_channel *uchan;
unsigned char uuid[LTTNG_UUID_STR_LEN];
/*
* Temporary stream list used to store the streams once created and waiting
unsigned char uuid[LTTNG_UUID_STR_LEN];
/*
* Temporary stream list used to store the streams once created and waiting
@@
-265,6
+273,14
@@
struct stream_subbuffer {
unsigned long subbuf_size;
unsigned long padded_subbuf_size;
uint64_t version;
unsigned long subbuf_size;
unsigned long padded_subbuf_size;
uint64_t version;
+ /*
+ * Left unset when unsupported.
+ *
+ * Indicates that this is the last sub-buffer of
+ * a series of sub-buffer that makes-up a coherent
+ * (parseable) unit of metadata.
+ */
+ LTTNG_OPTIONAL(bool) coherent;
} metadata;
struct {
unsigned long subbuf_size;
} metadata;
struct {
unsigned long subbuf_size;
@@
-283,6
+299,12
@@
struct stream_subbuffer {
} info;
};
} info;
};
+enum get_next_subbuffer_status {
+ GET_NEXT_SUBBUFFER_STATUS_OK,
+ GET_NEXT_SUBBUFFER_STATUS_NO_DATA,
+ GET_NEXT_SUBBUFFER_STATUS_ERROR,
+};
+
/*
* Perform any operation required to acknowledge
* the wake-up of a consumer stream (e.g. consume a byte on a wake-up pipe).
/*
* Perform any operation required to acknowledge
* the wake-up of a consumer stream (e.g. consume a byte on a wake-up pipe).
@@
-305,8
+327,8
@@
typedef int (*on_sleep_cb)(struct lttng_consumer_stream *,
*
* Stream and channel locks are acquired during this call.
*/
*
* Stream and channel locks are acquired during this call.
*/
-typedef
int (*get_next_subbuffer_cb)(struct lttng_consumer_stream *,
- struct stream_subbuffer *);
+typedef
enum get_next_subbuffer_status (*get_next_subbuffer_cb)(
+ struct
lttng_consumer_stream *, struct
stream_subbuffer *);
/*
* Populate the stream_subbuffer's info member. The info to populate
/*
* Populate the stream_subbuffer's info member. The info to populate
@@
-524,7
+546,7
@@
struct lttng_consumer_stream {
/* Stream name. Format is: <channel_name>_<cpu_number> */
char name[LTTNG_SYMBOL_NAME_LEN];
/* Internal state of libustctl. */
/* Stream name. Format is: <channel_name>_<cpu_number> */
char name[LTTNG_SYMBOL_NAME_LEN];
/* Internal state of libustctl. */
- struct
ust
ctl_consumer_stream *ustream;
+ struct
lttng_ust_
ctl_consumer_stream *ustream;
struct cds_list_head send_node;
/* On-disk circular buffer */
uint64_t tracefile_size_current;
struct cds_list_head send_node;
/* On-disk circular buffer */
uint64_t tracefile_size_current;
@@
-582,6
+604,9
@@
struct lttng_consumer_stream {
*/
uint64_t rotate_position;
*/
uint64_t rotate_position;
+ /* Whether or not a packet was opened during the current trace chunk. */
+ bool opened_packet_in_current_trace_chunk;
+
/*
* Read-only copies of channel values. We cannot safely access the
* channel from a stream, so we need to have a local copy of these
/*
* Read-only copies of channel values. We cannot safely access the
* channel from a stream, so we need to have a local copy of these
@@
-618,11
+643,12
@@
struct lttng_consumer_stream {
reset_metadata_cb reset_metadata;
consume_subbuffer_cb consume_subbuffer;
put_next_subbuffer_cb put_next_subbuffer;
reset_metadata_cb reset_metadata;
consume_subbuffer_cb consume_subbuffer;
put_next_subbuffer_cb put_next_subbuffer;
-
post_consume_cb post_consume
;
+
struct lttng_dynamic_array post_consume_cbs
;
send_live_beacon_cb send_live_beacon;
on_sleep_cb on_sleep;
unlock_cb unlock;
} read_subbuffer_ops;
send_live_beacon_cb send_live_beacon;
on_sleep_cb on_sleep;
unlock_cb unlock;
} read_subbuffer_ops;
+ struct metadata_bucket *metadata_bucket;
};
/*
};
/*
@@
-954,7
+980,6
@@
struct lttng_consumer_local_data *lttng_consumer_create(
int (*update_stream)(uint64_t sessiond_key, uint32_t state));
void lttng_consumer_destroy(struct lttng_consumer_local_data *ctx);
ssize_t lttng_consumer_on_read_subbuffer_mmap(
int (*update_stream)(uint64_t sessiond_key, uint32_t state));
void lttng_consumer_destroy(struct lttng_consumer_local_data *ctx);
ssize_t lttng_consumer_on_read_subbuffer_mmap(
- struct lttng_consumer_local_data *ctx,
struct lttng_consumer_stream *stream,
const struct lttng_buffer_view *buffer,
unsigned long padding);
struct lttng_consumer_stream *stream,
const struct lttng_buffer_view *buffer,
unsigned long padding);
@@
-1031,5
+1056,8
@@
enum lttcomm_return_code lttng_consumer_init_command(
struct lttng_consumer_local_data *ctx,
const lttng_uuid sessiond_uuid);
int lttng_consumer_clear_channel(struct lttng_consumer_channel *channel);
struct lttng_consumer_local_data *ctx,
const lttng_uuid sessiond_uuid);
int lttng_consumer_clear_channel(struct lttng_consumer_channel *channel);
+enum lttcomm_return_code lttng_consumer_open_channel_packets(
+ struct lttng_consumer_channel *channel);
+int consumer_metadata_wakeup_pipe(const struct lttng_consumer_channel *channel);
#endif /* LIB_CONSUMER_H */
#endif /* LIB_CONSUMER_H */
This page took
0.026125 seconds
and
4
git commands to generate.