no file named init_regions in /sys/kernel/debug/damon
DanielLee343 opened this issue · 1 comments
DanielLee343 commented
Hi, I'm testing on 5.15.0 with CONFIG_DAMON
enabled, but I'm experiencing the following error doing damo record
Traceback (most recent call last):
File "./damo", line 98, in <module>
main()
File "./damo", line 95, in main
subcmd.execute(args)
File "/home/cc/damo/_damo_subcmds.py", line 31, in execute
self.module.main(args)
File "/home/cc/damo/damo_record.py", line 129, in main
set_data_for_cleanup(data_for_cleanup, args, output_permission)
File "/home/cc/damo/damo_record.py", line 59, in set_data_for_cleanup
data_for_cleanup.orig_kdamonds = _damon.current_kdamonds()
File "/home/cc/damo/_damon.py", line 870, in current_kdamonds
return _damon_fs.current_kdamonds()
File "/home/cc/damo/_damon_dbgfs.py", line 315, in current_kdamonds
return files_content_to_kdamonds(
File "/home/cc/damo/_damon_dbgfs.py", line 277, in files_content_to_kdamonds
fields = [int(x) for x in files_content['init_regions'].strip().split()]
KeyError: 'init_regions'
After back tracing the error, it's because in my server I don't have a file called init_regions
in /sys/kernel/debug/damon
directory.
system version and configure:
cc@uc-inst-1:~/damo$ if grep CONFIG_DAMON /boot/config-$(uname -r); then echo "installed"; fi
CONFIG_DAMON=y
CONFIG_DAMON_VADDR=y
CONFIG_DAMON_DBGFS=y
installed
cc@uc-inst-1:~/damo$ cat /etc/os-release
NAME="Ubuntu"
VERSION="20.04.5 LTS (Focal Fossa)"
ID=ubuntu
ID_LIKE=debian
PRETTY_NAME="Ubuntu 20.04.5 LTS"
VERSION_ID="20.04"
HOME_URL="https://www.ubuntu.com/"
SUPPORT_URL="https://help.ubuntu.com/"
BUG_REPORT_URL="https://bugs.launchpad.net/ubuntu/"
PRIVACY_POLICY_URL="https://www.ubuntu.com/legal/terms-and-policies/privacy-policy"
VERSION_CODENAME=focal
UBUNTU_CODENAME=focal
sj-aws commented
Thank you for reporting this, Daniel! The problem was due to the absence of the supported feature check. I just made and pushed the fix[1]. With the fix, I confirmed DAMO tests pass as below.
~/damo$ sudo ./tests/run.sh
PASS unit-python test_damon_args.py
PASS unit-python3 test_damon_args.py
PASS unit-python test_damon_args_schemes.py
PASS unit-python3 test_damon_args_schemes.py
PASS unit-python test_damon_dbgfs.py
PASS unit-python3 test_damon_dbgfs.py
PASS unit-python test_damon.py
PASS unit-python3 test_damon.py
PASS unit-python test_damon_result.py
PASS unit-python3 test_damon_result.py
PASS unit-python test_damon_sysfs.py
PASS unit-python3 test_damon_sysfs.py
PASS unit-python test_damo_scheme_dbgfs_conversion.py
PASS unit-python3 test_damo_scheme_dbgfs_conversion.py
PASS unit-python test_fmt_str.py
PASS unit-python3 test_fmt_str.py
PASS record-validate "sleep 3" 4 none debugfs
SKIP record-validate paddr 3 (paddr unsupported)
PASS record-permission
PASS record
PASS report-raw
PASS report-raw_perf_script
PASS report-wss
PASS report-wss_worktime_1s
PASS report-aggr_1s_raw
PASS report-aggr_1s_raw_skip_30
PASS report-nr_regions
PASS report-heats_guide
PASS report-heats
PASS report
SKIP schemes
SKIP damon_reclaim (the sys dir not found)
SKIP damon_lru_sort (the sys dir not found)
SKIP start_stop (DAMON interface not found)
PASS ALL
Please open this issue again if you the fix doesn't work for you.
[1] 821e9ee