aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorSeongJae Park <sj38.park@gmail.com>2024-03-02 12:58:00 -0800
committerSeongJae Park <sj38.park@gmail.com>2024-03-02 12:58:00 -0800
commit5547ff534663b408e301554b133ca74217269c03 (patch)
treefc77fe252645d7f78521bc6712f2a51ab4e9a158
parent1693b326243768796b3ddb42bbdae01f630972c1 (diff)
downloaddamo-5547ff534663b408e301554b133ca74217269c03.tar.gz
damo_{show,report_profile,report_times}: Reuse _damon_reocrds code for setting access pattern options
Signed-off-by: SeongJae Park <sj38.park@gmail.com>
-rw-r--r--damo_report_profile.py13
-rw-r--r--damo_report_times.py13
-rw-r--r--damo_show.py13
3 files changed, 3 insertions, 36 deletions
diff --git a/damo_report_profile.py b/damo_report_profile.py
index d41e7acf..46bb155b 100644
--- a/damo_report_profile.py
+++ b/damo_report_profile.py
@@ -54,17 +54,6 @@ def set_argparser(parser):
parser.add_argument('--inputs', metavar='<file>', nargs=2,
default=['damon.data', 'damon.data.profile'],
help='access pattern and profile record files')
- parser.add_argument('--sz_region', metavar=('<min>', '<max>'), nargs=2,
- default=['min', 'max'],
- help='min/max size of regions (bytes) to show')
- parser.add_argument('--access_rate', metavar=('<min>', '<max>'), nargs=2,
- default=['min', 'max'],
- help='min/max access rate of regions (percent) to show')
- parser.add_argument('--age', metavar=('<min>', '<max>'), nargs=2,
- default=['min', 'max'],
- help='min/max age of regions (seconds) to show')
- parser.add_argument('--address', metavar=('<start>', '<end>'), nargs=2,
- action='append',
- help='address ranges to show')
+ _damon_records.set_access_pattern_argparser(parser)
parser.description='Show profiling report for specific access pattern'
diff --git a/damo_report_times.py b/damo_report_times.py
index b71a1c83..1ccc2a68 100644
--- a/damo_report_times.py
+++ b/damo_report_times.py
@@ -48,17 +48,6 @@ def set_argparser(parser):
parser.add_argument('--inputs', metavar='<file>', nargs=2,
default=['damon.data', 'damon.data.profile'],
help='access pattern and profile record files')
- parser.add_argument('--sz_region', metavar=('<min>', '<max>'), nargs=2,
- default=['min', 'max'],
- help='min/max size of regions (bytes) to show')
- parser.add_argument('--access_rate', metavar=('<min>', '<max>'), nargs=2,
- default=['min', 'max'],
- help='min/max access rate of regions (percent) to show')
- parser.add_argument('--age', metavar=('<min>', '<max>'), nargs=2,
- default=['min', 'max'],
- help='min/max age of regions (seconds) to show')
- parser.add_argument('--address', metavar=('<start>', '<end>'), nargs=2,
- action='append',
- help='address ranges to show')
+ _damon_records.set_access_pattern_argparser(parser)
parser.description='Show times of record having specific access pattern'
diff --git a/damo_show.py b/damo_show.py
index 92c2aa21..c05547d4 100644
--- a/damo_show.py
+++ b/damo_show.py
@@ -566,18 +566,7 @@ def set_argparser(parser):
_damon_args.set_common_argparser(parser)
# what to show
- parser.add_argument('--sz_region', metavar=('<min>', '<max>'), nargs=2,
- default=['min', 'max'],
- help='min/max size of regions (bytes) to show')
- parser.add_argument('--access_rate', metavar=('<min>', '<max>'), nargs=2,
- default=['min', 'max'],
- help='min/max access rate of regions (percent) to show')
- parser.add_argument('--age', metavar=('<min>', '<max>'), nargs=2,
- default=['min', 'max'],
- help='min/max age of regions (seconds) to show')
- parser.add_argument('--address', metavar=('<start>', '<end>'), nargs=2,
- action='append',
- help='address ranges to show')
+ _damon_records.set_access_pattern_argparser(parser)
parser.add_argument('--input_file', metavar='<file>',
help='source of the access pattern to show')