summaryrefslogtreecommitdiffstats
path: root/scripts
diff options
context:
space:
mode:
authorAdrien Schildknecht <adrien+dev@schischi.me>2015-05-28 15:44:40 -0700
committerLinus Torvalds <torvalds@linux-foundation.org>2015-05-28 18:25:19 -0700
commitca3f172c197b5fa6b2693f5f93d4928a1420fb07 (patch)
treea7a68d53eb441e4b8661a54d14dab5c28e1c274b /scripts
parent5a6b2b36a8249ec9dfb2a714acadad86d9cc0aee (diff)
downloadlinux-ca3f172c197b5fa6b2693f5f93d4928a1420fb07.tar.gz
linux-ca3f172c197b5fa6b2693f5f93d4928a1420fb07.tar.bz2
linux-ca3f172c197b5fa6b2693f5f93d4928a1420fb07.zip
scripts/gdb: fix lx-lsmod refcnt
Commit 2f35c41f58a9 ("module: Replace module_ref with atomic_t refcnt") changes the way refcnt is handled but did not update the gdb script to use the new variable. Since refcnt is not per-cpu anymore, we can directly read its value. Signed-off-by: Adrien Schildknecht <adrien+dev@schischi.me> Reviewed-by: Jan Kiszka <jan.kiszka@siemens.com> Cc: Pantelis Koukousoulas <pktoss@gmail.com> Signed-off-by: Andrew Morton <akpm@linux-foundation.org> Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
Diffstat (limited to 'scripts')
-rw-r--r--scripts/gdb/linux/modules.py9
1 files changed, 1 insertions, 8 deletions
diff --git a/scripts/gdb/linux/modules.py b/scripts/gdb/linux/modules.py
index a1504c4f1900..25db8cff44a2 100644
--- a/scripts/gdb/linux/modules.py
+++ b/scripts/gdb/linux/modules.py
@@ -73,18 +73,11 @@ class LxLsmod(gdb.Command):
" " if utils.get_long_type().sizeof == 8 else ""))
for module in module_list():
- ref = 0
- module_refptr = module['refptr']
- for cpu in cpus.cpu_list("cpu_possible_mask"):
- refptr = cpus.per_cpu(module_refptr, cpu)
- ref += refptr['incs']
- ref -= refptr['decs']
-
gdb.write("{address} {name:<19} {size:>8} {ref}".format(
address=str(module['module_core']).split()[0],
name=module['name'].string(),
size=str(module['core_size']),
- ref=str(ref)))
+ ref=str(module['refcnt']['counter'])))
source_list = module['source_list']
t = self._module_use_type.get_type().pointer()