aboutsummaryrefslogtreecommitdiffstats
path: root/config/config.py
blob: d4639992eda0608546852ffcd5a447b40486dcb6 (plain) (blame)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
from __future__ import print_function
import itertools
from common import get_executable

'''Paths to binaries.'''
BINS = {'rtspin'    : get_executable('rtspin', 'liblitmus'),
        'release'   : get_executable('release_ts', 'liblitmus'),
        'ftcat'     : get_executable('ftcat', 'feather-trace-tools'),
        'ftsplit'   : get_executable('ft2csv', 'feather-trace-tools'),
        'ftsort'    : get_executable('ftsort', 'feather-trace-tools'),
        'st_trace'  : get_executable('st_trace', 'feather-trace-tools'),
        'trace-cmd' : get_executable('trace-cmd', 'rt-kernelshark'),
		# Optional, as sched_trace is not a publically supported repository
        'st_show'   : get_executable('st_show', 'sched_trace', True)}

'''Names of output files.'''
FILES = {'ft_data'    : 'ft.bin',
         'linux_data' : 'trace.dat',
         'sched_data' : 'st-{}.bin',
         'log_data'   : 'trace.slog'}

'''Default parameter names in params.py.'''
# TODO: add check for config options
PARAMS = {'sched'  : 'scheduler',     # Scheduler used by run_exps
          'dur'    : 'duration',      # Duration of tests in run_exps
          'kernel' : 'uname',         # Regex of required OS name in run_exps
          'cycles' : 'cpu-frequency', # Frequency run_exps was run with
          'tasks'  : 'tasks'          # Number of tasks
          }

'''Default values for program options.'''
DEFAULTS = {'params_file' : 'params.py',
            'sched_file'  : 'sched.py',
            'duration'    : 10,
            'spin'		  : 'rtspin',
            'cycles'      : 2000}

'''Default sched_trace events (this is all of them).'''
SCHED_EVENTS = range(501, 513)

'''Overhead events.'''
OVH_BASE_EVENTS  = ['SCHED', 'RELEASE', 'SCHED2', 'TICK', 'CXS']
OVH_ALL_EVENTS   = ["%s_%s" % (e, t) for (e,t) in
                    itertools.product(OVH_BASE_EVENTS, ["START","END"])]
OVH_ALL_EVENTS  += ['RELEASE_LATENCY']
# This event doesn't have a START and END
OVH_BASE_EVENTS += ['RELEASE_LATENCY']