+static
+int print_metadata_app_information(struct ust_registry_session *registry,
+ struct ust_app *app)
+{
+ int ret;
+ char datetime[ISO8601_LEN];
+
+ if (!app) {
+ ret = 0;
+ goto end;
+ }
+
+ ret = time_t_to_ISO8601(datetime, sizeof(datetime),
+ app->registration_time);
+ if (ret) {
+ goto end;
+ }
+
+ ret = lttng_metadata_printf(registry,
+ " tracer_patchlevel = %u;\n"
+ " vpid = %d;\n"
+ " procname = \"%s\";\n"
+ " vpid_datetime = \"%s\";\n" ,
+ app->version.patchlevel,
+ (int) app->pid,
+ app->name,
+ datetime
+ );
+
+end:
+ return ret;
+}
+