trace/simple: Replace asprintf by g_strdup_printf