ret = ust_registry_session_init(®_pid->registry->reg.ust, app,
app->bits_per_long, app->uint8_t_alignment,
app->uint16_t_alignment, app->uint32_t_alignment,
- app->uint64_t_alignment, app->long_alignment, app->byte_order);
+ app->uint64_t_alignment, app->long_alignment,
+ app->byte_order, app->version.major,
+ app->version.minor);
if (ret < 0) {
goto error;
}
}
/* Initialize registry. */
- ret = ust_registry_session_init(®_uid->registry->reg.ust, app,
+ ret = ust_registry_session_init(®_uid->registry->reg.ust, NULL,
app->bits_per_long, app->uint8_t_alignment,
app->uint16_t_alignment, app->uint32_t_alignment,
- app->uint64_t_alignment, app->long_alignment, app->byte_order);
+ app->uint64_t_alignment, app->long_alignment,
+ app->byte_order, app->version.major,
+ app->version.minor);
if (ret < 0) {
goto error;
}
* Should be called with session registry mutex held.
*/
int ust_metadata_session_statedump(struct ust_registry_session *session,
- struct ust_app *app)
+ struct ust_app *app,
+ uint32_t major,
+ uint32_t minor)
{
unsigned char *uuid_c;
char uuid_s[UUID_STR_LEN],
char hostname[HOST_NAME_MAX];
assert(session);
- assert(app);
uuid_c = session->uuid;
" domain = \"ust\";\n"
" tracer_name = \"lttng-ust\";\n"
" tracer_major = %u;\n"
- " tracer_minor = %u;\n"
- " tracer_patchlevel = %u;\n",
+ " tracer_minor = %u;\n",
hostname,
- app->version.major,
- app->version.minor,
- app->version.patchlevel
+ major,
+ minor
);
if (ret)
goto end;
*/
if (app) {
ret = lttng_metadata_printf(session,
+ " tracer_patchlevel = %u;\n"
" vpid = %d;\n"
" procname = \"%s\";\n",
+ app->version.patchlevel,
(int) app->pid,
app->name
);
uint32_t uint32_t_alignment,
uint32_t uint64_t_alignment,
uint32_t long_alignment,
- int byte_order)
+ int byte_order,
+ uint32_t major,
+ uint32_t minor)
{
int ret;
struct ust_registry_session *session;
assert(sessionp);
- assert(app);
session = zmalloc(sizeof(*session));
if (!session) {
}
pthread_mutex_lock(&session->lock);
- ret = ust_metadata_session_statedump(session, app);
+ ret = ust_metadata_session_statedump(session, app, major, minor);
pthread_mutex_unlock(&session->lock);
if (ret) {
ERR("Failed to generate session metadata (errno = %d)", ret);
uint32_t uint32_t_alignment,
uint32_t uint64_t_alignment,
uint32_t long_alignment,
- int byte_order);
+ int byte_order,
+ uint32_t major,
+ uint32_t minor);
void ust_registry_session_destroy(struct ust_registry_session *session);
int ust_registry_create_event(struct ust_registry_session *session,
/* app can be NULL for registry shared across applications. */
int ust_metadata_session_statedump(struct ust_registry_session *session,
- struct ust_app *app);
+ struct ust_app *app, uint32_t major, uint32_t minor);
int ust_metadata_channel_statedump(struct ust_registry_session *session,
struct ust_registry_channel *chan);
int ust_metadata_event_statedump(struct ust_registry_session *session,