Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
L
lxc
Project
Overview
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
Chen Yisong
lxc
Commits
1a704014
Unverified
Commit
1a704014
authored
Oct 30, 2016
by
Christian Brauner
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
cgfs: add print_cgfs_init_debuginfo()
Signed-off-by:
Christian Brauner
<
christian.brauner@canonical.com
>
parent
d93cd547
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
30 additions
and
0 deletions
+30
-0
cgfs.c
src/lxc/cgroups/cgfs.c
+30
-0
No files found.
src/lxc/cgroups/cgfs.c
View file @
1a704014
...
@@ -2270,6 +2270,33 @@ static bool init_cpuset_if_needed(struct cgroup_mount_point *mp,
...
@@ -2270,6 +2270,33 @@ static bool init_cpuset_if_needed(struct cgroup_mount_point *mp,
do_init_cpuset_file
(
mp
,
path
,
"/cpuset.mems"
)
);
do_init_cpuset_file
(
mp
,
path
,
"/cpuset.mems"
)
);
}
}
static
void
print_cgfs_init_debuginfo
(
struct
cgfs_data
*
d
)
{
int
i
;
if
(
!
getenv
(
"LXC_DEBUG_CGFS"
))
return
;
DEBUG
(
"Cgroup information:"
);
DEBUG
(
" container name: %s"
,
d
->
name
);
if
(
!
d
->
meta
||
!
d
->
meta
->
hierarchies
)
{
DEBUG
(
" No hierarchies found."
);
return
;
}
DEBUG
(
" Controllers:"
);
for
(
i
=
0
;
i
<=
d
->
meta
->
maximum_hierarchy
;
i
++
)
{
char
**
p
;
struct
cgroup_hierarchy
*
h
=
d
->
meta
->
hierarchies
[
i
];
if
(
!
h
)
{
DEBUG
(
" Empty hierarchy number %d."
,
i
);
continue
;
}
for
(
p
=
h
->
subsystems
;
p
&&
*
p
;
p
++
)
{
DEBUG
(
" %2d: %s"
,
i
,
*
p
);
}
}
}
struct
cgroup_ops
*
cgfs_ops_init
(
void
)
struct
cgroup_ops
*
cgfs_ops_init
(
void
)
{
{
return
&
cgfs_ops
;
return
&
cgfs_ops
;
...
@@ -2295,6 +2322,9 @@ static void *cgfs_init(const char *name)
...
@@ -2295,6 +2322,9 @@ static void *cgfs_init(const char *name)
ERROR
(
"cgroupfs failed to detect cgroup metadata"
);
ERROR
(
"cgroupfs failed to detect cgroup metadata"
);
goto
err2
;
goto
err2
;
}
}
print_cgfs_init_debuginfo
(
d
);
return
d
;
return
d
;
err2:
err2:
...
...
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