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
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
|
from __future__ import print_function
import itertools
from common import get_executable_hint,ft_freq
'''Paths to binaries.'''
BINS = {'rtspin' : get_executable_hint('rtspin', 'liblitmus'),
'mc2spin' : get_executable_hint('mc2spin', 'liblitmus'),
'release' : get_executable_hint('release_ts', 'liblitmus'),
'ftcat' : get_executable_hint('ftcat', 'feather-trace-tools'),
'ftsplit' : get_executable_hint('ft2csv', 'feather-trace-tools'),
'ftsort' : get_executable_hint('ftsort', 'feather-trace-tools'),
'st_trace' : get_executable_hint('st_trace', 'feather-trace-tools'),
# Optional, as not everyone uses kernelshark yet
'trace-cmd' : get_executable_hint('trace-cmd', 'rt-kernelshark', True),
# Optional, as sched_trace is not a publically supported repository
'st_show' : get_executable_hint('st_show', 'sched_trace', True)}
'''Names of data files.'''
FILES = {'params_file' : 'params.py',
'sched_file' : 'sched.py',
'ft_data' : 'ft.bin',
'ft_msg_data' : 'ftmsg.bin',
'ft_matches' : r'(ft.*\.bin$)|(ftmsg.*\.bin$)|(.*\.ft)',
'linux_data' : 'trace.dat',
'sched_data' : 'st-{}.bin',
'log_data' : 'trace.slog'}
'''Default parameter names in params.py.'''
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
'copts' : 'config-options', # Required kernel configuration options
'cycles' : 'clock-frequency', # Frequency run_exps was run with
'tasks' : 'tasks', # Number of tasks
'trial' : 'trial', # For multiple exps with same config
'pre' : 'pre-experiment', # Run before each experiment
'post' : 'post-experiment', # Run after each experiment
'trace' : 'tracers' # Tracers to run with an experiment
}
'''Default values for program options.'''
DEFAULTS = {'duration' : 10,
#'prog' : 'rtspin',
'prog' : 'mc2spin',
'out-gen' : 'exps',
'out-run' : 'run-data',
'out-parse' : 'parse-data',
'out-plot' : 'plot-data',
'cycles' : ft_freq()} #ft_freq()} # or 2000}
'''Default sched_trace events (this is all of them).'''
SCHED_EVENTS = range(501, 513)
'''Overhead events.'''
#OVH_BASE_EVENTS = ['SCHED', 'RELEASE', 'RELEASE_C', 'SCHED2', 'TICK', 'CXS', 'LOCK', 'UNLOCK', 'ISR', 'SCHED_A', 'SCHED_C']
OVH_BASE_EVENTS = ['SCHED', 'RELEASE', 'RELEASE_C', 'SCHED2', 'TICK', 'CXS', 'ISR', 'SCHED_A', 'SCHED_C']
OVH_ALL_EVENTS = ["%s_%s" % (e, t) for (e,t) in
itertools.product(OVH_BASE_EVENTS, ["START","END"])]
OVH_ALL_EVENTS += ['RELEASE_LATENCY']
OVH_ALL_EVENTS += ['RELEASE_LATENCY_A']
OVH_ALL_EVENTS += ['RELEASE_LATENCY_B']
OVH_ALL_EVENTS += ['RELEASE_LATENCY_C']
# This event doesn't have a START and END
OVH_BASE_EVENTS += ['RELEASE_LATENCY']
OVH_BASE_EVENTS += ['RELEASE_LATENCY_A']
OVH_BASE_EVENTS += ['RELEASE_LATENCY_B']
OVH_BASE_EVENTS += ['RELEASE_LATENCY_C']
OVH_MSG_EVENTS = ['SEND_RESCHED_START' , 'SEND_RESCHED_END']
OVH_BASE_EVENTS += ['SEND_RESCHED']
# If a task is missing more than this many records, its measurements
# are not included in sched_trace summaries
MAX_RECORD_LOSS = .2
|