Skip to content
Projects
Groups
Snippets
Help
Loading...
Sign in
Toggle navigation
C
criu
Project
Project
Details
Activity
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
zhul
criu
Commits
5762076d
Commit
5762076d
authored
Jul 10, 2013
by
Pavel Emelyanov
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
dump: Factor out thread_core dumping
Signed-off-by:
Pavel Emelyanov
<
xemul@parallels.com
>
parent
a04ccc22
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
13 additions
and
10 deletions
+13
-10
cr-dump.c
cr-dump.c
+13
-10
No files found.
cr-dump.c
View file @
5762076d
...
@@ -626,6 +626,17 @@ static int dump_task_ids(struct pstree_item *item, const struct cr_fdset *cr_fds
...
@@ -626,6 +626,17 @@ static int dump_task_ids(struct pstree_item *item, const struct cr_fdset *cr_fds
return
pb_write_one
(
fdset_fd
(
cr_fdset
,
CR_FD_IDS
),
item
->
ids
,
PB_IDS
);
return
pb_write_one
(
fdset_fd
(
cr_fdset
,
CR_FD_IDS
),
item
->
ids
,
PB_IDS
);
}
}
static
int
dump_thread_core
(
int
pid
,
ThreadCoreEntry
*
tc
)
{
int
ret
;
ret
=
get_task_futex_robust_list
(
pid
,
tc
);
if
(
!
ret
)
ret
=
dump_sched_info
(
pid
,
tc
);
return
ret
;
}
static
int
dump_task_core_all
(
struct
parasite_ctl
*
ctl
,
static
int
dump_task_core_all
(
struct
parasite_ctl
*
ctl
,
CoreEntry
*
core
,
CoreEntry
*
core
,
const
struct
proc_pid_stat
*
stat
,
const
struct
proc_pid_stat
*
stat
,
...
@@ -640,10 +651,6 @@ static int dump_task_core_all(struct parasite_ctl *ctl,
...
@@ -640,10 +651,6 @@ static int dump_task_core_all(struct parasite_ctl *ctl,
pr_info
(
"Dumping core (pid: %d)
\n
"
,
pid
);
pr_info
(
"Dumping core (pid: %d)
\n
"
,
pid
);
pr_info
(
"----------------------------------------
\n
"
);
pr_info
(
"----------------------------------------
\n
"
);
ret
=
get_task_futex_robust_list
(
pid
,
core
->
thread_core
);
if
(
ret
)
goto
err
;
ret
=
get_task_personality
(
pid
,
&
core
->
tc
->
personality
);
ret
=
get_task_personality
(
pid
,
&
core
->
tc
->
personality
);
if
(
ret
)
if
(
ret
)
goto
err
;
goto
err
;
...
@@ -654,7 +661,7 @@ static int dump_task_core_all(struct parasite_ctl *ctl,
...
@@ -654,7 +661,7 @@ static int dump_task_core_all(struct parasite_ctl *ctl,
core
->
tc
->
task_state
=
TASK_ALIVE
;
core
->
tc
->
task_state
=
TASK_ALIVE
;
core
->
tc
->
exit_code
=
0
;
core
->
tc
->
exit_code
=
0
;
ret
=
dump_
sched_info
(
pid
,
core
->
thread_core
);
ret
=
dump_
thread_core
(
pid
,
core
->
thread_core
);
if
(
ret
)
if
(
ret
)
goto
err
;
goto
err
;
...
@@ -1082,17 +1089,13 @@ static int dump_task_thread(struct parasite_ctl *parasite_ctl,
...
@@ -1082,17 +1089,13 @@ static int dump_task_thread(struct parasite_ctl *parasite_ctl,
pr_info
(
"Dumping core for thread (pid: %d)
\n
"
,
pid
);
pr_info
(
"Dumping core for thread (pid: %d)
\n
"
,
pid
);
pr_info
(
"----------------------------------------
\n
"
);
pr_info
(
"----------------------------------------
\n
"
);
ret
=
get_task_futex_robust_list
(
pid
,
core
->
thread_core
);
if
(
ret
)
goto
err
;
ret
=
parasite_dump_thread_seized
(
parasite_ctl
,
id
,
tid
,
core
);
ret
=
parasite_dump_thread_seized
(
parasite_ctl
,
id
,
tid
,
core
);
if
(
ret
)
{
if
(
ret
)
{
pr_err
(
"Can't dump thread for pid %d
\n
"
,
pid
);
pr_err
(
"Can't dump thread for pid %d
\n
"
,
pid
);
goto
err
;
goto
err
;
}
}
ret
=
dump_
sched_info
(
pid
,
core
->
thread_core
);
ret
=
dump_
thread_core
(
pid
,
core
->
thread_core
);
if
(
ret
)
if
(
ret
)
goto
err
;
goto
err
;
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment