diff options
author | Elijah Conners <business@elijahpepe.com> | 2022-08-30 07:38:27 -0700 |
---|---|---|
committer | Tejun Heo <tj@kernel.org> | 2022-09-23 16:57:10 -1000 |
commit | b74440d89895816660236be4433f0891e37d44eb (patch) | |
tree | 722658028a62c3fefd9f74caacd66110ae68852a /tools/cgroup | |
parent | 61c41711b12b808ec388b739444372430942c2e8 (diff) | |
download | linux-b74440d89895816660236be4433f0891e37d44eb.tar.bz2 |
iocost_monitor: reorder BlkgIterator
In order to comply with PEP 8, the first parameter of a class should be
__init__.
Signed-off-by: Elijah Conners <business@elijahpepe.com>
Signed-off-by: Tejun Heo <tj@kernel.org>
Diffstat (limited to 'tools/cgroup')
-rw-r--r-- | tools/cgroup/iocost_monitor.py | 10 |
1 files changed, 5 insertions, 5 deletions
diff --git a/tools/cgroup/iocost_monitor.py b/tools/cgroup/iocost_monitor.py index c4ff907c078b..0dbbc67400fc 100644 --- a/tools/cgroup/iocost_monitor.py +++ b/tools/cgroup/iocost_monitor.py @@ -61,6 +61,11 @@ autop_names = { } class BlkgIterator: + def __init__(self, root_blkcg, q_id, include_dying=False): + self.include_dying = include_dying + self.blkgs = [] + self.walk(root_blkcg, q_id, '') + def blkcg_name(blkcg): return blkcg.css.cgroup.kn.name.string_().decode('utf-8') @@ -82,11 +87,6 @@ class BlkgIterator: blkcg.css.children.address_of_(), 'css.sibling'): self.walk(c, q_id, path) - def __init__(self, root_blkcg, q_id, include_dying=False): - self.include_dying = include_dying - self.blkgs = [] - self.walk(root_blkcg, q_id, '') - def __iter__(self): return iter(self.blkgs) |