mirror of
https://github.com/varun-r-mallya/sysprof.git
synced 2025-12-31 20:36:25 +00:00
libsysprof-profile: add version info as metadata
This commit is contained in:
@ -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 */
|
||||
|
||||
Reference in New Issue
Block a user