Skip to content

Commit

Permalink
realtime: Include PID/TID in some error messages
Browse files Browse the repository at this point in the history
The PID is useful when debugging issues related to these messages,
so we can check whether the PID has some strange property
that caused the problem.
  • Loading branch information
andrew-sayers committed Feb 26, 2025
1 parent f7837cc commit d773b9e
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions src/realtime.c
Original file line number Diff line number Diff line change
Expand Up @@ -65,21 +65,21 @@ map_pid (XdpAppInfo *app_info, pid_t *pid, pid_t *tid, GError **error)

if (!xdp_app_info_get_pidns (app_info, &pidns_id, error))
{
g_prefix_error (error, "Could not get pidns: ");
g_prefix_error (error, "Could not get pidns for pid %d: ", *pid);
g_warning ("Realtime error: %s", (*error)->message);
return FALSE;
}

if (pidns_id != 0 && !xdp_map_pids (pidns_id, pid, 1, error))
{
g_prefix_error (error, "Could not map pid: ");
g_prefix_error (error, "Could not map pid %d: ", *pid);
g_warning ("Realtime error: %s", (*error)->message);
return FALSE;
}

if (pidns_id != 0 && !xdp_map_tids (pidns_id, *pid, tid, 1, error))
{
g_prefix_error (error, "Could not map tid: ");
g_prefix_error (error, "Could not map tid %d of mapped pid %d: ", *tid, *pid);
g_warning ("Realtime error: %s", (*error)->message);
return FALSE;
}
Expand Down

0 comments on commit d773b9e

Please sign in to comment.