mirror of
https://github.com/varun-r-mallya/sysprof.git
synced 2025-12-31 20:36:25 +00:00
capture: add pid-root frame type
While I'm not thrilled to add new frame types for every sort of thing, I think having this will be relatively useful so we can improve decoding operations. This adds SysprofCapturePidRoot which lets us specify a root directory on the host system for which is the real root (/) of the PID. This can be useful when reconstructing overlays for containers and you need to direct access to alternate roots. The layer gives us some ability to try to deal with overlayfs, albeit at a very rudimentary level. In most cases I anticipate we just deal with the main root and ignore overlays until necessary.
This commit is contained in:
@ -115,6 +115,18 @@ main (gint argc,
|
||||
break;
|
||||
}
|
||||
|
||||
case SYSPROF_CAPTURE_FRAME_PID_ROOT:
|
||||
{
|
||||
const SysprofCapturePidRoot *pr = sysprof_capture_reader_read_pid_root (reader);
|
||||
|
||||
if (pr == NULL)
|
||||
return EXIT_FAILURE;
|
||||
|
||||
g_print ("PID ROOT: pid=%d layer=%u path=%s\n", pr->frame.pid, pr->layer, pr->path);
|
||||
|
||||
break;
|
||||
}
|
||||
|
||||
case SYSPROF_CAPTURE_FRAME_JITMAP:
|
||||
{
|
||||
const SysprofCaptureJitmap *jitmap = sysprof_capture_reader_read_jitmap (reader);
|
||||
|
||||
Reference in New Issue
Block a user