projects
/
lttng-tools.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
relayd: add remote trace chunk close command
[lttng-tools.git]
/
src
/
bin
/
lttng-sessiond
/
session.c
diff --git
a/src/bin/lttng-sessiond/session.c
b/src/bin/lttng-sessiond/session.c
index 61cbb0c1af2f3e10abed78c1394de238706597dd..4b5c22bfb8626ef8f52b48ebbb75a77d9b4b05e8 100644
(file)
--- a/
src/bin/lttng-sessiond/session.c
+++ b/
src/bin/lttng-sessiond/session.c
@@
-677,7
+677,8
@@
error:
}
int session_close_trace_chunk(const struct ltt_session *session,
}
int session_close_trace_chunk(const struct ltt_session *session,
- struct lttng_trace_chunk *trace_chunk)
+ struct lttng_trace_chunk *trace_chunk,
+ const enum lttng_trace_chunk_command_type *close_command)
{
int ret = 0;
bool error_occurred = false;
{
int ret = 0;
bool error_occurred = false;
@@
-686,6
+687,15
@@
int session_close_trace_chunk(const struct ltt_session *session,
enum lttng_trace_chunk_status chunk_status;
const time_t chunk_close_timestamp = time(NULL);
enum lttng_trace_chunk_status chunk_status;
const time_t chunk_close_timestamp = time(NULL);
+ if (close_command) {
+ chunk_status = lttng_trace_chunk_set_close_command(
+ trace_chunk, *close_command);
+ if (chunk_status != LTTNG_TRACE_CHUNK_STATUS_OK) {
+ ret = -1;
+ goto end;
+ }
+ }
+
if (chunk_close_timestamp == (time_t) -1) {
ERR("Failed to sample the close timestamp of the current trace chunk of session \"%s\"",
session->name);
if (chunk_close_timestamp == (time_t) -1) {
ERR("Failed to sample the close timestamp of the current trace chunk of session \"%s\"",
session->name);
@@
-784,7
+794,7
@@
void session_release(struct urcu_ref *ref)
session_notify_destruction(session);
lttng_dynamic_array_reset(&session->destroy_notifiers);
if (session->current_trace_chunk) {
session_notify_destruction(session);
lttng_dynamic_array_reset(&session->destroy_notifiers);
if (session->current_trace_chunk) {
- ret = session_close_trace_chunk(session, session->current_trace_chunk);
+ ret = session_close_trace_chunk(session, session->current_trace_chunk
, NULL
);
if (ret) {
ERR("Failed to close the current trace chunk of session \"%s\" during its release",
session->name);
if (ret) {
ERR("Failed to close the current trace chunk of session \"%s\" during its release",
session->name);
This page took
0.02685 seconds
and
5
git commands to generate.