From a5e2ce53bf0400165110751930882d5ed3cb855f Mon Sep 17 00:00:00 2001 From: ygrek Date: Mon, 27 Jun 2016 12:54:55 -0700 Subject: [PATCH] tools: fix getting {ext4,btrfs}_file_operations address (ref #583) --- tools/btrfsdist.py | 1 + tools/btrfsslower.py | 1 + tools/ext4dist.py | 1 + 3 files changed, 3 insertions(+) diff --git a/tools/btrfsdist.py b/tools/btrfsdist.py index 2ce077c..6189da0 100755 --- a/tools/btrfsdist.py +++ b/tools/btrfsdist.py @@ -169,6 +169,7 @@ with open(kallsyms) as syms: for line in syms: a = line.rstrip().split() (addr, name) = (a[0], a[2]) + name = name.split("\t")[0] if name == "btrfs_file_operations": ops = "0x" + addr break diff --git a/tools/btrfsslower.py b/tools/btrfsslower.py index de0e3e0..111076c 100755 --- a/tools/btrfsslower.py +++ b/tools/btrfsslower.py @@ -251,6 +251,7 @@ with open(kallsyms) as syms: for line in syms: a = line.rstrip().split() (addr, name) = (a[0], a[2]) + name = name.split("\t")[0] if name == "btrfs_file_operations": ops = "0x" + addr break diff --git a/tools/ext4dist.py b/tools/ext4dist.py index b59a227..cd51b8a 100755 --- a/tools/ext4dist.py +++ b/tools/ext4dist.py @@ -149,6 +149,7 @@ with open(kallsyms) as syms: ops = '' for line in syms: (addr, size, name) = line.rstrip().split(" ", 2) + name = name.split("\t")[0] if name == "ext4_file_operations": ops = "0x" + addr break -- 2.7.4