-
-
Notifications
You must be signed in to change notification settings - Fork 210
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
realtime: Include PID/TID in some error messages #1655
base: main
Are you sure you want to change the base?
Conversation
src/realtime.c
Outdated
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 pid %d: ", *tid, *pid); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This will log the mapped pid, the other will log the unmapped pid. That might be confusing if not explicit, e.g. "of mapped pid %d" or "of pid %d mapped to %d" or something.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Good point - updated to "mapped pid". The original pid would need to be stored separately if we wanted to print it here - seems like overkill unless a use case pops up for this particular message.
c541dcc
to
d773b9e
Compare
d773b9e
to
ce776d9
Compare
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.
LGTM |
ce776d9
to
eddeed3
Compare
For the record, I was adding the comment at the top of the patch at the same time @swick was typing this, based on feedback in the now-resolved discussion. The PR is otherwise identical. |
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.
In my case, this made it easier to debug #1653 - the PID showed it was caused by Firefox, so I knew to look there.