diff options
author | Mac Mollison <mollison@cs.unc.edu> | 2009-02-23 20:16:53 -0500 |
---|---|---|
committer | Mac Mollison <mollison@cs.unc.edu> | 2009-02-23 20:16:53 -0500 |
commit | ff06de040c4fad522ea38d9bc450da7dc3913501 (patch) | |
tree | 7d22331ab2230c8681953cff03a577d89c02b9fc | |
parent | 0c95b7332d08cbf45f25fae04bb5595489ba6dec (diff) |
Removed some files (in process of cleaning up...)
-rw-r--r-- | DEV_NOTES | 18 | ||||
-rw-r--r-- | list.py | 14 | ||||
-rw-r--r-- | sta_output.py | 12 | ||||
-rw-r--r-- | sta_types.py | 89 |
4 files changed, 0 insertions, 133 deletions
diff --git a/DEV_NOTES b/DEV_NOTES deleted file mode 100644 index 41f77a4..0000000 --- a/DEV_NOTES +++ /dev/null | |||
@@ -1,18 +0,0 @@ | |||
1 | Sched Trace Analyzer | ||
2 | |||
3 | File Summary: | ||
4 | -sta.py : business logic | ||
5 | -sta_types.py : specifies binary format of sched trace data | ||
6 | -sta_output.py : output formatting function(s) | ||
7 | -run.py : gives an example of how to use sta.py | ||
8 | -list.py : list of trace files. (you would have to change this file to be | ||
9 | point to trace files on the local machine.) | ||
10 | |||
11 | To test: | ||
12 | 1) Modify list.py to point to trace files on your local machine | ||
13 | 2) execute run.py (e.g. run.py > out) | ||
14 | |||
15 | Likely next steps: | ||
16 | - Try to get StParamData working | ||
17 | |||
18 | |||
diff --git a/list.py b/list.py deleted file mode 100644 index 194a0cb..0000000 --- a/list.py +++ /dev/null | |||
@@ -1,14 +0,0 @@ | |||
1 | full_list = [ | ||
2 | '/home/mollison/sta-alt/traces/st-g6-0.bin', | ||
3 | '/home/mollison/sta-alt/traces/st-g6-1.bin', | ||
4 | '/home/mollison/sta-alt/traces/st-g6-2.bin', | ||
5 | '/home/mollison/sta-alt/traces/st-g6-3.bin', | ||
6 | '/home/mollison/sta-alt/traces/st-x19-0.bin', | ||
7 | '/home/mollison/sta-alt/traces/st-x19-1.bin', | ||
8 | '/home/mollison/sta-alt/traces/st-x19-2.bin', | ||
9 | '/home/mollison/sta-alt/traces/st-x19-3.bin', | ||
10 | '/home/mollison/sta-alt/traces/st0.fg', | ||
11 | '/home/mollison/sta-alt/traces/st1.fg'] | ||
12 | |||
13 | list = [ | ||
14 | '/home/mollison/sta-alt/traces/st0.fg'] | ||
diff --git a/sta_output.py b/sta_output.py deleted file mode 100644 index 1e46f78..0000000 --- a/sta_output.py +++ /dev/null | |||
@@ -1,12 +0,0 @@ | |||
1 | #################################### | ||
2 | # Output formatting functions # | ||
3 | #################################### | ||
4 | |||
5 | from sta_types import get_type | ||
6 | |||
7 | def print_record_verbose(record): | ||
8 | """Prints a record verbosely, given the record as a dict.""" | ||
9 | print(50*'=') | ||
10 | print(get_type(record['type']).message) | ||
11 | for k,v in record.items(): | ||
12 | print(k +":", v) | ||
diff --git a/sta_types.py b/sta_types.py deleted file mode 100644 index aaff49e..0000000 --- a/sta_types.py +++ /dev/null | |||
@@ -1,89 +0,0 @@ | |||
1 | #################################### | ||
2 | # Types for binary data conversion # | ||
3 | #################################### | ||
4 | |||
5 | import struct | ||
6 | |||
7 | st_record_size = 192 | ||
8 | |||
9 | class StHeader: | ||
10 | format = '<bbhi' | ||
11 | formatStr = struct.Struct(format) | ||
12 | keys = ['type','cpu','pid','job'] | ||
13 | message = 'The header.' | ||
14 | |||
15 | |||
16 | class StNameData: | ||
17 | format = '16s' | ||
18 | formatStr = struct.Struct(StHeader.format + format) | ||
19 | keys = StHeader.keys + ['name'] | ||
20 | message = 'The name of the executable of this process.' | ||
21 | |||
22 | # Untested because this never appears in my sample files | ||
23 | # ACTUALLY: None in 0, none in 1, a bunch in 2, and none in 3 | ||
24 | class StParamData: | ||
25 | format = 'III8?' | ||
26 | formatStr = struct.Struct(StHeader.format + format) | ||
27 | keys = StHeader.keys + ['wcet','period','phase','partition'] | ||
28 | message = 'Regular parameters.' | ||
29 | |||
30 | |||
31 | class StReleaseData: | ||
32 | format = 'LL' | ||
33 | formatStr = struct.Struct(StHeader.format + format) | ||
34 | keys = StHeader.keys + ['release_time','deadline'] | ||
35 | message = 'A job was/is going to be released.' | ||
36 | |||
37 | |||
38 | class StAssignedData: | ||
39 | format = 'Lh' | ||
40 | formatStr = struct.Struct(StHeader.format + format) | ||
41 | keys = StHeader.keys + ['when','target'] | ||
42 | message = 'A job was assigned to a CPU.' | ||
43 | |||
44 | class StSwitchToData: | ||
45 | format = 'LI' | ||
46 | formatStr = struct.Struct(StHeader.format + format) | ||
47 | keys = StHeader.keys + ['when','exec_time'] | ||
48 | message = 'A process was switched to on a given CPU.' | ||
49 | |||
50 | |||
51 | class StSwitchAwayData: | ||
52 | format = 'LI' | ||
53 | formatStr = struct.Struct(StHeader.format + format) | ||
54 | keys = StHeader.keys + ['when','exec_time'] | ||
55 | message = 'A process was away on a given CPU.' | ||
56 | |||
57 | class StCompletionData: | ||
58 | format = 'L7x?c' | ||
59 | formatStr = struct.Struct(StHeader.format + format) | ||
60 | keys = StHeader.keys + ['when','forced?','flags'] | ||
61 | message = 'A job completed.' | ||
62 | |||
63 | |||
64 | class StBlockData: | ||
65 | format = 'L' | ||
66 | formatStr = struct.Struct(StHeader.format + format) | ||
67 | keys = StHeader.keys + ['when'] | ||
68 | message = 'A task blocks.' | ||
69 | |||
70 | |||
71 | class StResumeData: | ||
72 | format = 'L' | ||
73 | formatStr = struct.Struct(StHeader.format + format) | ||
74 | keys = StHeader.keys + ['when'] | ||
75 | message = 'A task resumes.' | ||
76 | |||
77 | |||
78 | class StSysReleaseData: | ||
79 | format = 'LL' | ||
80 | formatStr = struct.Struct(StHeader.format + format) | ||
81 | keys = StHeader.keys + ['when','release'] | ||
82 | message = 'StSysReleaseData (no details).' | ||
83 | |||
84 | def get_type(type_num): | ||
85 | """Return the binary data type, given the type_num""" | ||
86 | types = [None,StNameData,StParamData,StReleaseData,StAssignedData, | ||
87 | StSwitchToData,StSwitchAwayData,StCompletionData,StBlockData, | ||
88 | StResumeData,StSysReleaseData] | ||
89 | return types[type_num] | ||