main.py (13868:b990dd40cc4b) main.py (14213:6eabb443ab3f)
1# Copyright (c) 2016 ARM Limited
1# Copyright (c) 2016, 2019 Arm Limited
2# All rights reserved.
3#
4# The license below extends only to copyright in the software and shall
5# not be construed as granting a license to any other intellectual
6# property including but not limited to intellectual property relating
7# to a hardware implementation of the functionality of the software
8# licensed hereunder. You may use the software subject to the license
9# terms below provided that you ensure that this notice is replicated

--- 38 unchanged lines hidden (view full) ---

48
49__all__ = [ 'options', 'arguments', 'main' ]
50
51usage="%prog [gem5 options] script.py [script options]"
52version="%prog 2.0"
53brief_copyright=\
54 "gem5 is copyrighted software; use the --copyright option for details."
55
2# All rights reserved.
3#
4# The license below extends only to copyright in the software and shall
5# not be construed as granting a license to any other intellectual
6# property including but not limited to intellectual property relating
7# to a hardware implementation of the functionality of the software
8# licensed hereunder. You may use the software subject to the license
9# terms below provided that you ensure that this notice is replicated

--- 38 unchanged lines hidden (view full) ---

48
49__all__ = [ 'options', 'arguments', 'main' ]
50
51usage="%prog [gem5 options] script.py [script options]"
52version="%prog 2.0"
53brief_copyright=\
54 "gem5 is copyrighted software; use the --copyright option for details."
55
56def _stats_help(option, opt, value, parser):
57 import m5
58 print("A stat file can either be specified as a URI or a plain")
59 print("path. When specified as a path, gem5 uses the default text ")
60 print("format.")
61 print()
62 print("The following stat formats are supported:")
63 print()
64 m5.stats.printStatVisitorTypes()
65 sys.exit(0)
66
67
56def parse_options():
57 from . import config
58 from .options import OptionParser
59
60 options = OptionParser(usage=usage, version=version,
61 description=brief_copyright)
62 option = options.add_option
63 group = options.set_group

--- 36 unchanged lines hidden (view full) ---

100 help="Reduce verbosity")
101 option('-v', "--verbose", action="count", default=0,
102 help="Increase verbosity")
103
104 # Statistics options
105 group("Statistics Options")
106 option("--stats-file", metavar="FILE", default="stats.txt",
107 help="Sets the output file for statistics [Default: %default]")
68def parse_options():
69 from . import config
70 from .options import OptionParser
71
72 options = OptionParser(usage=usage, version=version,
73 description=brief_copyright)
74 option = options.add_option
75 group = options.set_group

--- 36 unchanged lines hidden (view full) ---

112 help="Reduce verbosity")
113 option('-v', "--verbose", action="count", default=0,
114 help="Increase verbosity")
115
116 # Statistics options
117 group("Statistics Options")
118 option("--stats-file", metavar="FILE", default="stats.txt",
119 help="Sets the output file for statistics [Default: %default]")
120 option("--stats-help",
121 action="callback", callback=_stats_help,
122 help="Display documentation for available stat visitors")
108
109 # Configuration Options
110 group("Configuration Options")
111 option("--dump-config", metavar="FILE", default="config.ini",
112 help="Dump configuration output file [Default: %default]")
113 option("--json-config", metavar="FILE", default="config.json",
114 help="Create JSON output of the configuration [Default: %default]")
115 option("--dot-config", metavar="FILE", default="config.dot",

--- 339 unchanged lines hidden ---
123
124 # Configuration Options
125 group("Configuration Options")
126 option("--dump-config", metavar="FILE", default="config.ini",
127 help="Dump configuration output file [Default: %default]")
128 option("--json-config", metavar="FILE", default="config.json",
129 help="Create JSON output of the configuration [Default: %default]")
130 option("--dot-config", metavar="FILE", default="config.dot",

--- 339 unchanged lines hidden ---