Commit ae194a1e authored by yonghong-song's avatar yonghong-song Committed by GitHub

Merge pull request #1408 from afiskon/master

Explain possible reason of an error in scripts that rely on /proc/kallsyms (fixes #1391)
parents 648554df 4a950bfe
...@@ -175,6 +175,7 @@ with open(kallsyms) as syms: ...@@ -175,6 +175,7 @@ with open(kallsyms) as syms:
break break
if ops == '': if ops == '':
print("ERROR: no btrfs_file_operations in /proc/kallsyms. Exiting.") print("ERROR: no btrfs_file_operations in /proc/kallsyms. Exiting.")
print("HINT: the kernel should be built with CONFIG_KALLSYMS_ALL.")
exit() exit()
bpf_text = bpf_text.replace('BTRFS_FILE_OPERATIONS', ops) bpf_text = bpf_text.replace('BTRFS_FILE_OPERATIONS', ops)
bpf_text = bpf_text.replace('FACTOR', str(factor)) bpf_text = bpf_text.replace('FACTOR', str(factor))
......
...@@ -268,6 +268,7 @@ with open(kallsyms) as syms: ...@@ -268,6 +268,7 @@ with open(kallsyms) as syms:
break break
if ops == '': if ops == '':
print("ERROR: no btrfs_file_operations in /proc/kallsyms. Exiting.") print("ERROR: no btrfs_file_operations in /proc/kallsyms. Exiting.")
print("HINT: the kernel should be built with CONFIG_KALLSYMS_ALL.")
exit() exit()
bpf_text = bpf_text.replace('BTRFS_FILE_OPERATIONS', ops) bpf_text = bpf_text.replace('BTRFS_FILE_OPERATIONS', ops)
if min_ms == 0: if min_ms == 0:
......
...@@ -155,6 +155,7 @@ with open(kallsyms) as syms: ...@@ -155,6 +155,7 @@ with open(kallsyms) as syms:
break break
if ops == '': if ops == '':
print("ERROR: no ext4_file_operations in /proc/kallsyms. Exiting.") print("ERROR: no ext4_file_operations in /proc/kallsyms. Exiting.")
print("HINT: the kernel should be built with CONFIG_KALLSYMS_ALL.")
exit() exit()
bpf_text = bpf_text.replace('EXT4_FILE_OPERATIONS', ops) bpf_text = bpf_text.replace('EXT4_FILE_OPERATIONS', ops)
bpf_text = bpf_text.replace('FACTOR', str(factor)) bpf_text = bpf_text.replace('FACTOR', str(factor))
......
...@@ -262,6 +262,7 @@ with open(kallsyms) as syms: ...@@ -262,6 +262,7 @@ with open(kallsyms) as syms:
break break
if ops == '': if ops == '':
print("ERROR: no ext4_file_operations in /proc/kallsyms. Exiting.") print("ERROR: no ext4_file_operations in /proc/kallsyms. Exiting.")
print("HINT: the kernel should be built with CONFIG_KALLSYMS_ALL.")
exit() exit()
bpf_text = bpf_text.replace('EXT4_FILE_OPERATIONS', ops) bpf_text = bpf_text.replace('EXT4_FILE_OPERATIONS', ops)
if min_ms == 0: if min_ms == 0:
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment