History

iocost: Fix iocost_monitor.py due to helper type mismatch

iocost_monitor.py broke with recent versions of drgn due to helper being stricter about types. Fix it so that it uses the correct type.

Tejun Heo committed 6 years ago

Commit 9ea37e21 parent 3bc0bb31 file · +2 −2Browse files

Unified · Split

tools/cgroup/iocost_monitor.py+2−2
@@ -72,7 +72,7 @@ class BlkgIterator: · 71 unmodified lines
72 name = BlkgIterator.blkcg_name(blkcg)72 name = BlkgIterator.blkcg_name(blkcg)
73 path = parent_path + '/' + name if parent_path else name73 path = parent_path + '/' + name if parent_path else name
74 blkg = drgn.Object(prog, 'struct blkcg_gq',74 blkg = drgn.Object(prog, 'struct blkcg_gq',
75 address=radix_tree_lookup(blkcg.blkg_tree, q_id))75 address=radix_tree_lookup(blkcg.blkg_tree.address_of_(), q_id))
76 if not blkg.address_:76 if not blkg.address_:
77 return77 return
78 78
@@ -228,7 +228,7 @@ q_id = None · 149 unmodified lines
228root_iocg = None228root_iocg = None
229ioc = None229ioc = None
230 230
231for i, ptr in radix_tree_for_each(blkcg_root.blkg_tree):231for i, ptr in radix_tree_for_each(blkcg_root.blkg_tree.address_of_()):
232 blkg = drgn.Object(prog, 'struct blkcg_gq', address=ptr)232 blkg = drgn.Object(prog, 'struct blkcg_gq', address=ptr)
233 try:233 try:
234 if devname == blkg.q.kobj.parent.name.string_().decode('utf-8'):234 if devname == blkg.q.kobj.parent.name.string_().decode('utf-8'):

Keyboard shortcuts

General

Show keyboard shortcuts
?
Focus the current search
/

Issues and pull requests

Open filters
f

Issues, pull requests and Inbox

Select next item
j↓
Select previous item
k↑
Open selected item
Enter
Dismiss filters or clear selection
Esc

Repository code

Go to file
t