libsysprof-profile: add version info as metadata

This commit is contained in:
Christian Hergert
2023-07-08 12:41:06 -07:00
parent 052f44ccb0
commit 79ac0a2c73

View File

@ -101,6 +101,16 @@ _sysprof_recording_spawn (SysprofSpawnable *spawnable)
return dex_subprocess_wait_check (subprocess);
}
static inline void
add_metadata (SysprofRecording *self,
const char *id,
const char *value)
{
sysprof_capture_writer_add_metadata (self->writer,
SYSPROF_CAPTURE_CURRENT_TIME,
-1, -1, id, value, -1);
}
static DexFuture *
sysprof_recording_fiber (gpointer user_data)
{
@ -140,6 +150,10 @@ sysprof_recording_fiber (gpointer user_data)
else
monitor = dex_future_new_infinite ();
/* Track various metadata */
add_metadata (self, "org.gnome.sysprof.app-id", APP_ID_S);
add_metadata (self, "org.gnome.sysprof.version", PACKAGE_VERSION);
self->start_time = g_get_monotonic_time ();
/* Queue receive of first message */