Commit 9829dbfd authored by Pavel Emelyanov's avatar Pavel Emelyanov

rst: Add abstract rst_info on pstree_item

The plan is to put collected resources on this to avoid seeking the image.
Signed-off-by: 's avatarPavel Emelyanov <xemul@parallels.com>
parent 781201b7
...@@ -219,6 +219,10 @@ static int prepare_pstree(void) ...@@ -219,6 +219,10 @@ static int prepare_pstree(void)
if (pi == NULL) if (pi == NULL)
break; break;
pi->rst = xzalloc(sizeof(*pi->rst));
if (pi->rst == NULL)
break;
pi->pid = e.pid; pi->pid = e.pid;
pi->pgid = e.pgid; pi->pgid = e.pgid;
pi->sid = e.sid; pi->sid = e.sid;
......
...@@ -181,6 +181,9 @@ struct vma_area { ...@@ -181,6 +181,9 @@ struct vma_area {
#define vma_area_is(vma_area, s) vma_entry_is(&((vma_area)->vma), s) #define vma_area_is(vma_area, s) vma_entry_is(&((vma_area)->vma), s)
#define vma_area_len(vma_area) vma_entry_len(&((vma_area)->vma)) #define vma_area_len(vma_area) vma_entry_len(&((vma_area)->vma))
struct rst_info {
};
struct pstree_item { struct pstree_item {
struct list_head list; struct list_head list;
pid_t pid; /* leader pid */ pid_t pid; /* leader pid */
...@@ -192,6 +195,7 @@ struct pstree_item { ...@@ -192,6 +195,7 @@ struct pstree_item {
int nr_threads; /* number of threads */ int nr_threads; /* number of threads */
u32 *threads; /* array of threads */ u32 *threads; /* array of threads */
u32 *children; /* array of children */ u32 *children; /* array of children */
struct rst_info *rst;
}; };
static inline int in_vma_area(struct vma_area *vma, unsigned long addr) static inline int in_vma_area(struct vma_area *vma, unsigned long addr)
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment