X-Git-Url: http://git.efficios.com/?p=lttng-tools.git;a=blobdiff_plain;f=src%2Fbin%2Flttng-sessiond%2Fsave.c;h=a8f3ec79588e7bf1e09d6a39c7dd861bf400ecab;hp=b9bcc666d797cf0bb97fc0ec88c5eff2e508a141;hb=16c4c9914f4e9aa1cf1a6f71f4b030fc8928e10e;hpb=4fc2b12601cd1bd62a6bbdb75f08f1d32cdb781f diff --git a/src/bin/lttng-sessiond/save.c b/src/bin/lttng-sessiond/save.c index b9bcc666d..a8f3ec795 100644 --- a/src/bin/lttng-sessiond/save.c +++ b/src/bin/lttng-sessiond/save.c @@ -32,7 +32,7 @@ #include "kernel.h" #include "save.h" #include "session.h" -#include "syscall.h" +#include "lttng-syscall.h" #include "trace-ust.h" #include "agent.h" @@ -115,6 +115,13 @@ int save_kernel_channel_attributes(struct config_writer *writer, if (ret) { goto end; } + + ret = config_writer_write_element_signed_int(writer, + config_element_blocking_timeout, + ext->blocking_timeout); + if (ret) { + goto end; + } } end: @@ -171,6 +178,13 @@ int save_ust_channel_attributes(struct config_writer *writer, goto end; } + ret = config_writer_write_element_signed_int(writer, + config_element_blocking_timeout, + attr->u.s.blocking_timeout); + if (ret) { + goto end; + } + /* * Fetch the monitor timer which is located in the parent of * lttng_ust_channel_attr @@ -271,6 +285,12 @@ const char *get_kernel_context_type_string( case LTTNG_KERNEL_CONTEXT_MIGRATABLE: context_type_string = config_event_context_migratable; break; + case LTTNG_KERNEL_CONTEXT_CALLSTACK_USER: + context_type_string = config_event_context_callstack_user; + break; + case LTTNG_KERNEL_CONTEXT_CALLSTACK_KERNEL: + context_type_string = config_event_context_callstack_kernel; + break; default: context_type_string = NULL; } @@ -766,7 +786,6 @@ end: static int save_agent_events(struct config_writer *writer, - struct ltt_ust_channel *chan, struct agent *agent) { int ret; @@ -1240,7 +1259,7 @@ int save_ust_channel(struct config_writer *writer, * the "agent" events associated with this channel and serialize * them. */ - ret = save_agent_events(writer, ust_chan, agent); + ret = save_agent_events(writer, agent); if (ret) { goto end; } @@ -1659,7 +1678,7 @@ int save_consumer_output(struct config_writer *writer, switch (output->type) { case CONSUMER_DST_LOCAL: ret = config_writer_write_element_string(writer, - config_element_path, output->dst.trace_path); + config_element_path, output->dst.session_root_path); if (ret) { ret = LTTNG_ERR_SAVE_IO_FAIL; goto end; @@ -2019,7 +2038,8 @@ int save_session(struct ltt_session *session, goto end; } - if (session->snapshot_mode || session->live_timer) { + if (session->snapshot_mode || session->live_timer || + session->rotate_timer_period || session->rotate_size) { ret = config_writer_open_element(writer, config_element_attributes); if (ret) { ret = LTTNG_ERR_SAVE_IO_FAIL; @@ -2033,7 +2053,7 @@ int save_session(struct ltt_session *session, ret = LTTNG_ERR_SAVE_IO_FAIL; goto end; } - } else { + } else if (session->live_timer) { ret = config_writer_write_element_unsigned_int(writer, config_element_live_timer_interval, session->live_timer); if (ret) { @@ -2041,6 +2061,25 @@ int save_session(struct ltt_session *session, goto end; } } + if (session->rotate_timer_period) { + ret = config_writer_write_element_unsigned_int(writer, + config_element_rotation_timer_interval, + session->rotate_timer_period); + if (ret) { + ret = LTTNG_ERR_SAVE_IO_FAIL; + goto end; + } + } + + if (session->rotate_size) { + ret = config_writer_write_element_unsigned_int(writer, + config_element_rotation_size, + session->rotate_size); + if (ret) { + ret = LTTNG_ERR_SAVE_IO_FAIL; + goto end; + } + } /* /attributes */ ret = config_writer_close_element(writer);