main.py (4046:ef34b290091e) main.py (4053:ee914b22709e)
1# Copyright (c) 2005 The Regents of The University of Michigan
2# All rights reserved.
3#
4# Redistribution and use in source and binary forms, with or without
5# modification, are permitted provided that the following conditions are
6# met: redistributions of source code must retain the above copyright
7# notice, this list of conditions and the following disclaimer;
8# redistributions in binary form must reproduce the above copyright
9# notice, this list of conditions and the following disclaimer in the
10# documentation and/or other materials provided with the distribution;
11# neither the name of the copyright holders nor the names of its
12# contributors may be used to endorse or promote products derived from
13# this software without specific prior written permission.
14#
15# THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
16# "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
17# LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
18# A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT
19# OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
20# SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
21# LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
22# DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
23# THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
24# (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
25# OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
26#
27# Authors: Nathan Binkert
28
29import code, optparse, os, socket, sys
30from datetime import datetime
31from attrdict import attrdict
1# Copyright (c) 2005 The Regents of The University of Michigan
2# All rights reserved.
3#
4# Redistribution and use in source and binary forms, with or without
5# modification, are permitted provided that the following conditions are
6# met: redistributions of source code must retain the above copyright
7# notice, this list of conditions and the following disclaimer;
8# redistributions in binary form must reproduce the above copyright
9# notice, this list of conditions and the following disclaimer in the
10# documentation and/or other materials provided with the distribution;
11# neither the name of the copyright holders nor the names of its
12# contributors may be used to endorse or promote products derived from
13# this software without specific prior written permission.
14#
15# THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
16# "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
17# LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
18# A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT
19# OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
20# SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
21# LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
22# DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
23# THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
24# (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
25# OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
26#
27# Authors: Nathan Binkert
28
29import code, optparse, os, socket, sys
30from datetime import datetime
31from attrdict import attrdict
32import traceflags
32
33__all__ = [ 'options', 'arguments', 'main' ]
34
35usage="%prog [m5 options] script.py [script options]"
36version="%prog 2.0"
37brief_copyright='''
38Copyright (c) 2001-2006
39The Regents of The University of Michigan
40All Rights Reserved
41'''
42
33
34__all__ = [ 'options', 'arguments', 'main' ]
35
36usage="%prog [m5 options] script.py [script options]"
37version="%prog 2.0"
38brief_copyright='''
39Copyright (c) 2001-2006
40The Regents of The University of Michigan
41All Rights Reserved
42'''
43
44def print_list(items, indent=4):
45 line = ' ' * indent
46 for i,item in enumerate(items):
47 if len(line) + len(item) > 76:
48 print line
49 line = ' ' * indent
50
51 if i < len(items) - 1:
52 line += '%s, ' % item
53 else:
54 line += item
55 print line
56
43# there's only one option parsing done, so make it global and add some
44# helper functions to make it work well.
45parser = optparse.OptionParser(usage=usage, version=version,
46 description=brief_copyright,
47 formatter=optparse.TitledHelpFormatter())
48parser.disable_interspersed_args()
49
50# current option group
51group = None
52
53def set_group(*args, **kwargs):
54 '''set the current option group'''
55 global group
56 if not args and not kwargs:
57 group = None
58 else:
59 group = parser.add_option_group(*args, **kwargs)
60
61class splitter(object):
62 def __init__(self, split):
63 self.split = split
64 def __call__(self, option, opt_str, value, parser):
65 getattr(parser.values, option.dest).extend(value.split(self.split))
66
67def add_option(*args, **kwargs):
68 '''add an option to the current option group, or global none set'''
69
70 # if action=split, but allows the option arguments
71 # themselves to be lists separated by the split variable'''
72
73 if kwargs.get('action', None) == 'append' and 'split' in kwargs:
74 split = kwargs.pop('split')
75 kwargs['default'] = []
76 kwargs['type'] = 'string'
77 kwargs['action'] = 'callback'
78 kwargs['callback'] = splitter(split)
79
80 if group:
81 return group.add_option(*args, **kwargs)
82
83 return parser.add_option(*args, **kwargs)
84
85def bool_option(name, default, help):
86 '''add a boolean option called --name and --no-name.
87 Display help depending on which is the default'''
88
89 tname = '--%s' % name
90 fname = '--no-%s' % name
91 dest = name.replace('-', '_')
92 if default:
93 thelp = optparse.SUPPRESS_HELP
94 fhelp = help
95 else:
96 thelp = help
97 fhelp = optparse.SUPPRESS_HELP
98
99 add_option(tname, action="store_true", default=default, help=thelp)
100 add_option(fname, action="store_false", dest=dest, help=fhelp)
101
102# Help options
103add_option('-A', "--authors", action="store_true", default=False,
104 help="Show author information")
105add_option('-C', "--copyright", action="store_true", default=False,
106 help="Show full copyright information")
107add_option('-R', "--readme", action="store_true", default=False,
108 help="Show the readme")
109add_option('-N', "--release-notes", action="store_true", default=False,
110 help="Show the release notes")
111
112# Options for configuring the base simulator
113add_option('-d', "--outdir", metavar="DIR", default=".",
114 help="Set the output directory to DIR [Default: %default]")
115add_option('-i', "--interactive", action="store_true", default=False,
116 help="Invoke the interactive interpreter after running the script")
117add_option("--pdb", action="store_true", default=False,
118 help="Invoke the python debugger before running the script")
119add_option('-p', "--path", metavar="PATH[:PATH]", action='append', split=':',
120 help="Prepend PATH to the system path when invoking the script")
121add_option('-q', "--quiet", action="count", default=0,
122 help="Reduce verbosity")
123add_option('-v', "--verbose", action="count", default=0,
124 help="Increase verbosity")
125
126# Statistics options
127set_group("Statistics Options")
128add_option("--stats-file", metavar="FILE", default="m5stats.txt",
129 help="Sets the output file for statistics [Default: %default]")
130
131# Debugging options
132set_group("Debugging Options")
133add_option("--debug-break", metavar="TIME[,TIME]", action='append', split=',',
134 help="Cycle to create a breakpoint")
135
136# Tracing options
137set_group("Trace Options")
57# there's only one option parsing done, so make it global and add some
58# helper functions to make it work well.
59parser = optparse.OptionParser(usage=usage, version=version,
60 description=brief_copyright,
61 formatter=optparse.TitledHelpFormatter())
62parser.disable_interspersed_args()
63
64# current option group
65group = None
66
67def set_group(*args, **kwargs):
68 '''set the current option group'''
69 global group
70 if not args and not kwargs:
71 group = None
72 else:
73 group = parser.add_option_group(*args, **kwargs)
74
75class splitter(object):
76 def __init__(self, split):
77 self.split = split
78 def __call__(self, option, opt_str, value, parser):
79 getattr(parser.values, option.dest).extend(value.split(self.split))
80
81def add_option(*args, **kwargs):
82 '''add an option to the current option group, or global none set'''
83
84 # if action=split, but allows the option arguments
85 # themselves to be lists separated by the split variable'''
86
87 if kwargs.get('action', None) == 'append' and 'split' in kwargs:
88 split = kwargs.pop('split')
89 kwargs['default'] = []
90 kwargs['type'] = 'string'
91 kwargs['action'] = 'callback'
92 kwargs['callback'] = splitter(split)
93
94 if group:
95 return group.add_option(*args, **kwargs)
96
97 return parser.add_option(*args, **kwargs)
98
99def bool_option(name, default, help):
100 '''add a boolean option called --name and --no-name.
101 Display help depending on which is the default'''
102
103 tname = '--%s' % name
104 fname = '--no-%s' % name
105 dest = name.replace('-', '_')
106 if default:
107 thelp = optparse.SUPPRESS_HELP
108 fhelp = help
109 else:
110 thelp = help
111 fhelp = optparse.SUPPRESS_HELP
112
113 add_option(tname, action="store_true", default=default, help=thelp)
114 add_option(fname, action="store_false", dest=dest, help=fhelp)
115
116# Help options
117add_option('-A', "--authors", action="store_true", default=False,
118 help="Show author information")
119add_option('-C', "--copyright", action="store_true", default=False,
120 help="Show full copyright information")
121add_option('-R', "--readme", action="store_true", default=False,
122 help="Show the readme")
123add_option('-N', "--release-notes", action="store_true", default=False,
124 help="Show the release notes")
125
126# Options for configuring the base simulator
127add_option('-d', "--outdir", metavar="DIR", default=".",
128 help="Set the output directory to DIR [Default: %default]")
129add_option('-i', "--interactive", action="store_true", default=False,
130 help="Invoke the interactive interpreter after running the script")
131add_option("--pdb", action="store_true", default=False,
132 help="Invoke the python debugger before running the script")
133add_option('-p', "--path", metavar="PATH[:PATH]", action='append', split=':',
134 help="Prepend PATH to the system path when invoking the script")
135add_option('-q', "--quiet", action="count", default=0,
136 help="Reduce verbosity")
137add_option('-v', "--verbose", action="count", default=0,
138 help="Increase verbosity")
139
140# Statistics options
141set_group("Statistics Options")
142add_option("--stats-file", metavar="FILE", default="m5stats.txt",
143 help="Sets the output file for statistics [Default: %default]")
144
145# Debugging options
146set_group("Debugging Options")
147add_option("--debug-break", metavar="TIME[,TIME]", action='append', split=',',
148 help="Cycle to create a breakpoint")
149
150# Tracing options
151set_group("Trace Options")
152add_option("--trace-help", action='store_true',
153 help="Print help on trace flags")
138add_option("--trace-flags", metavar="FLAG[,FLAG]", action='append', split=',',
154add_option("--trace-flags", metavar="FLAG[,FLAG]", action='append', split=',',
139 help="Sets the flags for tracing")
155 help="Sets the flags for tracing (-FLAG disables a flag)")
140add_option("--trace-start", metavar="TIME", type='int',
141 help="Start tracing at TIME (must be in ticks)")
142add_option("--trace-file", metavar="FILE", default="cout",
143 help="Sets the output file for tracing [Default: %default]")
144add_option("--trace-ignore", metavar="EXPR", action='append', split=':',
145 help="Ignore EXPR sim objects")
146
147# Execution Trace options
148set_group("Execution Trace Options")
149bool_option("speculative", default=True,
150 help="Don't capture speculative instructions")
151bool_option("print-cycle", default=True,
152 help="Don't print cycle numbers in trace output")
153bool_option("print-symbol", default=True,
154 help="Disable PC symbols in trace output")
155bool_option("print-opclass", default=True,
156 help="Don't print op class type in trace output")
157bool_option("print-thread", default=True,
158 help="Don't print thread number in trace output")
159bool_option("print-effaddr", default=True,
160 help="Don't print effective address in trace output")
161bool_option("print-data", default=True,
162 help="Don't print result data in trace output")
163bool_option("print-iregs", default=False,
164 help="Print fetch sequence numbers in trace output")
165bool_option("print-fetch-seq", default=False,
166 help="Print fetch sequence numbers in trace output")
167bool_option("print-cpseq", default=False,
168 help="Print correct path sequence numbers in trace output")
169#bool_option("print-reg-delta", default=False,
170# help="Print which registers changed to what in trace output")
171bool_option("legion-lock", default=False,
172 help="Compare simulator state with Legion simulator every cycle")
173
174options = attrdict()
175arguments = []
176
177def usage(exitcode=None):
178 parser.print_help()
179 if exitcode is not None:
180 sys.exit(exitcode)
181
182def parse_args():
183 _opts,args = parser.parse_args()
184 opts = attrdict(_opts.__dict__)
185
186 # setting verbose and quiet at the same time doesn't make sense
187 if opts.verbose > 0 and opts.quiet > 0:
188 usage(2)
189
190 # store the verbosity in a single variable. 0 is default,
191 # negative numbers represent quiet and positive values indicate verbose
192 opts.verbose -= opts.quiet
193
194 del opts.quiet
195
196 options.update(opts)
197 arguments.extend(args)
198 return opts,args
199
200def main():
201 import defines
202 import info
203 import internal
204
205 parse_args()
206
207 done = False
208 if options.copyright:
209 done = True
210 print info.LICENSE
211 print
212
213 if options.authors:
214 done = True
215 print 'Author information:'
216 print
217 print info.AUTHORS
218 print
219
220 if options.readme:
221 done = True
222 print 'Readme:'
223 print
224 print info.README
225 print
226
227 if options.release_notes:
228 done = True
229 print 'Release Notes:'
230 print
231 print info.RELEASE_NOTES
232 print
233
156add_option("--trace-start", metavar="TIME", type='int',
157 help="Start tracing at TIME (must be in ticks)")
158add_option("--trace-file", metavar="FILE", default="cout",
159 help="Sets the output file for tracing [Default: %default]")
160add_option("--trace-ignore", metavar="EXPR", action='append', split=':',
161 help="Ignore EXPR sim objects")
162
163# Execution Trace options
164set_group("Execution Trace Options")
165bool_option("speculative", default=True,
166 help="Don't capture speculative instructions")
167bool_option("print-cycle", default=True,
168 help="Don't print cycle numbers in trace output")
169bool_option("print-symbol", default=True,
170 help="Disable PC symbols in trace output")
171bool_option("print-opclass", default=True,
172 help="Don't print op class type in trace output")
173bool_option("print-thread", default=True,
174 help="Don't print thread number in trace output")
175bool_option("print-effaddr", default=True,
176 help="Don't print effective address in trace output")
177bool_option("print-data", default=True,
178 help="Don't print result data in trace output")
179bool_option("print-iregs", default=False,
180 help="Print fetch sequence numbers in trace output")
181bool_option("print-fetch-seq", default=False,
182 help="Print fetch sequence numbers in trace output")
183bool_option("print-cpseq", default=False,
184 help="Print correct path sequence numbers in trace output")
185#bool_option("print-reg-delta", default=False,
186# help="Print which registers changed to what in trace output")
187bool_option("legion-lock", default=False,
188 help="Compare simulator state with Legion simulator every cycle")
189
190options = attrdict()
191arguments = []
192
193def usage(exitcode=None):
194 parser.print_help()
195 if exitcode is not None:
196 sys.exit(exitcode)
197
198def parse_args():
199 _opts,args = parser.parse_args()
200 opts = attrdict(_opts.__dict__)
201
202 # setting verbose and quiet at the same time doesn't make sense
203 if opts.verbose > 0 and opts.quiet > 0:
204 usage(2)
205
206 # store the verbosity in a single variable. 0 is default,
207 # negative numbers represent quiet and positive values indicate verbose
208 opts.verbose -= opts.quiet
209
210 del opts.quiet
211
212 options.update(opts)
213 arguments.extend(args)
214 return opts,args
215
216def main():
217 import defines
218 import info
219 import internal
220
221 parse_args()
222
223 done = False
224 if options.copyright:
225 done = True
226 print info.LICENSE
227 print
228
229 if options.authors:
230 done = True
231 print 'Author information:'
232 print
233 print info.AUTHORS
234 print
235
236 if options.readme:
237 done = True
238 print 'Readme:'
239 print
240 print info.README
241 print
242
243 if options.release_notes:
244 done = True
245 print 'Release Notes:'
246 print
247 print info.RELEASE_NOTES
248 print
249
250 if options.trace_help:
251 done = True
252 print "Base Flags:"
253 print_list(traceflags.baseFlags, indent=4)
254 print
255 print "Compound Flags:"
256 for flag in traceflags.compoundFlags:
257 if flag == 'All':
258 continue
259 print " %s:" % flag
260 print_list(traceflags.compoundFlagMap[flag], indent=8)
261 print
262
234 if done:
235 sys.exit(0)
236
237 if options.verbose >= 0:
238 print "M5 Simulator System"
239 print brief_copyright
240 print
241 print "M5 compiled %s" % internal.main.cvar.compileDate;
242 print "M5 started %s" % datetime.now().ctime()
243 print "M5 executing on %s" % socket.gethostname()
244 print "command line:",
245 for argv in sys.argv:
246 print argv,
247 print
248
249 # check to make sure we can find the listed script
250 if not arguments or not os.path.isfile(arguments[0]):
251 if arguments and not os.path.isfile(arguments[0]):
252 print "Script %s not found" % arguments[0]
263 if done:
264 sys.exit(0)
265
266 if options.verbose >= 0:
267 print "M5 Simulator System"
268 print brief_copyright
269 print
270 print "M5 compiled %s" % internal.main.cvar.compileDate;
271 print "M5 started %s" % datetime.now().ctime()
272 print "M5 executing on %s" % socket.gethostname()
273 print "command line:",
274 for argv in sys.argv:
275 print argv,
276 print
277
278 # check to make sure we can find the listed script
279 if not arguments or not os.path.isfile(arguments[0]):
280 if arguments and not os.path.isfile(arguments[0]):
281 print "Script %s not found" % arguments[0]
282
253 usage(2)
254
255 # tell C++ about output directory
256 internal.main.setOutputDir(options.outdir)
257
258 # update the system path with elements from the -p option
259 sys.path[0:0] = options.path
260
261 import objects
262
263 # set stats options
264 objects.Statistics.text_file = options.stats_file
265
266 # set debugging options
267 for when in options.debug_break:
268 internal.debug.schedBreakCycle(int(when))
269
283 usage(2)
284
285 # tell C++ about output directory
286 internal.main.setOutputDir(options.outdir)
287
288 # update the system path with elements from the -p option
289 sys.path[0:0] = options.path
290
291 import objects
292
293 # set stats options
294 objects.Statistics.text_file = options.stats_file
295
296 # set debugging options
297 for when in options.debug_break:
298 internal.debug.schedBreakCycle(int(when))
299
300 on_flags = []
301 off_flags = []
270 for flag in options.trace_flags:
302 for flag in options.trace_flags:
303 off = False
304 if flag.startswith('-'):
305 flag = flag[1:]
306 off = True
307 if flag not in traceflags.allFlags:
308 print >>sys.stderr, "invalid trace flag '%s'" % flag
309 sys.exit(1)
310
311 if off:
312 off_flags.append(flag)
313 else:
314 on_flags.append(flag)
315
316 for flag in on_flags:
271 internal.trace.set(flag)
272
317 internal.trace.set(flag)
318
319 for flag in off_flags:
320 internal.trace.clear(flag)
321
273 if options.trace_start is not None:
274 internal.trace.enabled = False
275 def enable_trace():
276 internal.event.enabled = True
277 internal.event.create(enable_trace, options.trace_start)
278
279 internal.trace.output(options.trace_file)
280
281 for ignore in options.trace_ignore:
282 internal.trace.ignore(ignore)
283
284 # set execution trace options
285 objects.ExecutionTrace.speculative = options.speculative
286 objects.ExecutionTrace.print_cycle = options.print_cycle
287 objects.ExecutionTrace.pc_symbol = options.print_symbol
288 objects.ExecutionTrace.print_opclass = options.print_opclass
289 objects.ExecutionTrace.print_thread = options.print_thread
290 objects.ExecutionTrace.print_effaddr = options.print_effaddr
291 objects.ExecutionTrace.print_data = options.print_data
292 objects.ExecutionTrace.print_iregs = options.print_iregs
293 objects.ExecutionTrace.print_fetchseq = options.print_fetch_seq
294 objects.ExecutionTrace.print_cpseq = options.print_cpseq
295 #objects.ExecutionTrace.print_reg_delta = options.print_reg_delta
296 objects.ExecutionTrace.legion_lockstep = options.legion_lock
297
298 sys.argv = arguments
299 sys.path = [ os.path.dirname(sys.argv[0]) ] + sys.path
300
301 scope = { '__file__' : sys.argv[0],
302 '__name__' : '__m5_main__' }
303
304 # we want readline if we're doing anything interactive
305 if options.interactive or options.pdb:
306 exec "import readline" in scope
307
308 # if pdb was requested, execfile the thing under pdb, otherwise,
309 # just do the execfile normally
310 if options.pdb:
311 from pdb import Pdb
312 debugger = Pdb()
313 debugger.run('execfile("%s")' % sys.argv[0], scope)
314 else:
315 execfile(sys.argv[0], scope)
316
317 # once the script is done
318 if options.interactive:
319 interact = code.InteractiveConsole(scope)
320 interact.interact("M5 Interactive Console")
321
322if __name__ == '__main__':
323 from pprint import pprint
324
325 parse_args()
326
327 print 'opts:'
328 pprint(options, indent=4)
329 print
330
331 print 'args:'
332 pprint(arguments, indent=4)
322 if options.trace_start is not None:
323 internal.trace.enabled = False
324 def enable_trace():
325 internal.event.enabled = True
326 internal.event.create(enable_trace, options.trace_start)
327
328 internal.trace.output(options.trace_file)
329
330 for ignore in options.trace_ignore:
331 internal.trace.ignore(ignore)
332
333 # set execution trace options
334 objects.ExecutionTrace.speculative = options.speculative
335 objects.ExecutionTrace.print_cycle = options.print_cycle
336 objects.ExecutionTrace.pc_symbol = options.print_symbol
337 objects.ExecutionTrace.print_opclass = options.print_opclass
338 objects.ExecutionTrace.print_thread = options.print_thread
339 objects.ExecutionTrace.print_effaddr = options.print_effaddr
340 objects.ExecutionTrace.print_data = options.print_data
341 objects.ExecutionTrace.print_iregs = options.print_iregs
342 objects.ExecutionTrace.print_fetchseq = options.print_fetch_seq
343 objects.ExecutionTrace.print_cpseq = options.print_cpseq
344 #objects.ExecutionTrace.print_reg_delta = options.print_reg_delta
345 objects.ExecutionTrace.legion_lockstep = options.legion_lock
346
347 sys.argv = arguments
348 sys.path = [ os.path.dirname(sys.argv[0]) ] + sys.path
349
350 scope = { '__file__' : sys.argv[0],
351 '__name__' : '__m5_main__' }
352
353 # we want readline if we're doing anything interactive
354 if options.interactive or options.pdb:
355 exec "import readline" in scope
356
357 # if pdb was requested, execfile the thing under pdb, otherwise,
358 # just do the execfile normally
359 if options.pdb:
360 from pdb import Pdb
361 debugger = Pdb()
362 debugger.run('execfile("%s")' % sys.argv[0], scope)
363 else:
364 execfile(sys.argv[0], scope)
365
366 # once the script is done
367 if options.interactive:
368 interact = code.InteractiveConsole(scope)
369 interact.interact("M5 Interactive Console")
370
371if __name__ == '__main__':
372 from pprint import pprint
373
374 parse_args()
375
376 print 'opts:'
377 pprint(options, indent=4)
378 print
379
380 print 'args:'
381 pprint(arguments, indent=4)