diff options
-rwxr-xr-x | plot.py | 62 | ||||
-rwxr-xr-x | plot_ohead.py | 19 |
2 files changed, 60 insertions, 21 deletions
@@ -10,6 +10,7 @@ options = [ | |||
10 | o('-f', '--format', action='store', dest='format', type='choice', | 10 | o('-f', '--format', action='store', dest='format', type='choice', |
11 | choices=FORMATS, help='output format'), | 11 | choices=FORMATS, help='output format'), |
12 | o(None, '--paper', action='store_true', dest='paper'), | 12 | o(None, '--paper', action='store_true', dest='paper'), |
13 | o(None, '--wide', action='store_true', dest='wide'), | ||
13 | o(None, '--split', action='store_true', dest='split'), | 14 | o(None, '--split', action='store_true', dest='split'), |
14 | ] | 15 | ] |
15 | 16 | ||
@@ -24,6 +25,7 @@ defaults = { | |||
24 | 'ylabel' : 'ratio of schedulable task sets', | 25 | 'ylabel' : 'ratio of schedulable task sets', |
25 | 'paper' : False, | 26 | 'paper' : False, |
26 | 'split' : False, | 27 | 'split' : False, |
28 | 'wide' : False, | ||
27 | } | 29 | } |
28 | 30 | ||
29 | def decode(name): | 31 | def decode(name): |
@@ -98,6 +100,21 @@ class SchedPlotter(defapp.App): | |||
98 | format=self.options.format, | 100 | format=self.options.format, |
99 | fname=name, **xtra) | 101 | fname=name, **xtra) |
100 | 102 | ||
103 | def plot_wide(self, graphs, title, name, conf, **xtra): | ||
104 | tops = 'rounded size 16cm,6.5cm' | ||
105 | gnuplot(graphs, title=title, | ||
106 | xlabel=self.options.xlabel, | ||
107 | ylabel=self.options.ylabel + | ||
108 | (' [soft]' if 'soft' in conf else ' [hard]'), | ||
109 | xrange=self.options.xrange, | ||
110 | yrange=self.options.yrange, | ||
111 | xticks=self.options.xticks, | ||
112 | yticks=self.options.yticks, | ||
113 | format=self.options.format, | ||
114 | fname=name, | ||
115 | term_opts=tops, | ||
116 | **xtra) | ||
117 | |||
101 | def plot_paper(self, graphs, title, name, conf, **xtra): | 118 | def plot_paper(self, graphs, title, name, conf, **xtra): |
102 | tops = 'color solid font "Helvetica,10" linewidth 1.0 rounded size 16cm,8.5cm' | 119 | tops = 'color solid font "Helvetica,10" linewidth 1.0 rounded size 16cm,8.5cm' |
103 | gnuplot(graphs, title=title, | 120 | gnuplot(graphs, title=title, |
@@ -179,54 +196,61 @@ class SchedPlotter(defapp.App): | |||
179 | def plot_rtss09(self, tmpfile, name, conf): | 196 | def plot_rtss09(self, tmpfile, name, conf): |
180 | title = scenario_heading(conf, want_period=True) | 197 | title = scenario_heading(conf, want_period=True) |
181 | graphs = [ | 198 | graphs = [ |
182 | (tmpfile, 1, 2, 'ideal'), | 199 | (tmpfile, 1, 2, 'G-EDF'), |
183 | (tmpfile, 1, 3, 'SEm'), | 200 | (tmpfile, 1, 3, 'CEm'), |
184 | (tmpfile, 1, 4, 'SE1'), | 201 | (tmpfile, 1, 4, 'CE1'), |
185 | (tmpfile, 1, 5, 'FEm'), | 202 | (tmpfile, 1, 5, 'FEm'), |
186 | (tmpfile, 1, 6, 'FE1'), | 203 | (tmpfile, 1, 6, 'FE1'), |
187 | (tmpfile, 1, 7, 'HEm'), | 204 | (tmpfile, 1, 7, 'HEm'), |
188 | (tmpfile, 1, 8, 'SQm'), | 205 | (tmpfile, 1, 8, 'CQm'), |
189 | (tmpfile, 1, 9, 'SQ1'), | 206 | (tmpfile, 1, 9, 'CQ1'), |
190 | ] | 207 | ] |
191 | staggered = [ | 208 | staggered = [ |
192 | (tmpfile, 1, 10, 'S-SQm'), | 209 | (tmpfile, 1, 10, 'S-CQm'), |
193 | (tmpfile, 1, 11, 'S-SQ1'), | 210 | (tmpfile, 1, 11, 'S-CQ1'), |
194 | ] | 211 | ] |
195 | if 'hard' in conf: | 212 | if 'hard' in conf: |
196 | graphs += staggered | 213 | graphs += staggered |
197 | if self.options.paper and self.options.format == 'pdf': | 214 | if self.options.paper and self.options.format == 'pdf': |
198 | self.plot_paper(graphs, title, name, conf) | 215 | self.plot_paper(graphs, title, name, conf) |
216 | elif self.options.wide and self.options.format == 'pdf': | ||
217 | self.plot_wide(graphs, title, name, conf) | ||
199 | else: | 218 | else: |
200 | self.plot(graphs, title, name, conf) | 219 | self.plot(graphs, title, name, conf) |
201 | 220 | ||
202 | def plot_rtss09_split(self, tmpfile, name, conf): | 221 | def plot_rtss09_split(self, tmpfile, name, conf): |
203 | title = scenario_heading(conf, want_period=True) | 222 | title = scenario_heading(conf, want_period=True) |
204 | ideal = (tmpfile, 1, 2, 'ideal') | 223 | ideal = (tmpfile, 1, 2, 'G-EDF') |
205 | 224 | ||
206 | subgraphs = [ | 225 | subgraphs = [ |
207 | # dedicated vs. non-dedicated | 226 | # dedicated vs. non-dedicated |
208 | [(tmpfile, 1, 3, 'SEm'), (tmpfile, 1, 4, 'SE1')], | 227 | [(tmpfile, 1, 3, 'CEm'), (tmpfile, 1, 4, 'CE1')], |
209 | [(tmpfile, 1, 5, 'FEm'), (tmpfile, 1, 6, 'FE1')], | 228 | [(tmpfile, 1, 5, 'FEm'), (tmpfile, 1, 6, 'FE1')], |
210 | [(tmpfile, 1, 8, 'SQm'), (tmpfile, 1, 9, 'SQ1')], | 229 | [(tmpfile, 1, 8, 'CQm'), (tmpfile, 1, 9, 'CQ1')], |
211 | 230 | ||
212 | # fine-grained vs. sequential | 231 | # fine-grained vs. sequential |
213 | [(tmpfile, 1, 3, 'SEm'), (tmpfile, 1, 5, 'FEm')], | 232 | [(tmpfile, 1, 3, 'CEm'), (tmpfile, 1, 5, 'FEm')], |
214 | [(tmpfile, 1, 4, 'SE1'), (tmpfile, 1, 6, 'FE1')], | 233 | [(tmpfile, 1, 4, 'CE1'), (tmpfile, 1, 6, 'FE1')], |
215 | 234 | ||
216 | # hierarchical vs. sequential | 235 | # hierarchical vs. sequential |
217 | [(tmpfile, 1, 3, 'SEm'), (tmpfile, 1, 7, 'HEm')], | 236 | [(tmpfile, 1, 3, 'CEm'), (tmpfile, 1, 7, 'HEm')], |
218 | 237 | ||
219 | # quantum vs. event | 238 | # quantum vs. event |
220 | [(tmpfile, 1, 3, 'SEm'), (tmpfile, 1, 8, 'SQm')], | 239 | [(tmpfile, 1, 3, 'CEm'), (tmpfile, 1, 8, 'CQm')], |
221 | [(tmpfile, 1, 6, 'FE1'), (tmpfile, 1, 9, 'SQ1')], | 240 | [(tmpfile, 1, 6, 'FE1'), (tmpfile, 1, 9, 'CQ1')], |
222 | ] | 241 | ] |
223 | staggered = [ | 242 | staggered = [ |
224 | # dedicated vs. non-dedicated | 243 | # dedicated vs. non-dedicated |
225 | [(tmpfile, 1, 10, 'S-SQm'), (tmpfile, 1, 11, 'S-SQ1')], | 244 | [(tmpfile, 1, 10, 'S-CQm'), (tmpfile, 1, 11, 'S-CQ1')], |
226 | 245 | ||
227 | # staggered vs. non-staggered | 246 | # staggered vs. non-staggered |
228 | [(tmpfile, 1, 8, 'SQm'), (tmpfile, 1, 10, 'S-SQm')], | 247 | [(tmpfile, 1, 8, 'CQm'), (tmpfile, 1, 10, 'S-CQm')], |
229 | [(tmpfile, 1, 9, 'SQ1'), (tmpfile, 1, 11, 'S-SQ1')], | 248 | [(tmpfile, 1, 9, 'CQ1'), (tmpfile, 1, 11, 'S-CQ1')], |
249 | |||
250 | # quantum vs. event | ||
251 | [(tmpfile, 1, 3, 'CEm'), (tmpfile, 1, 10, 'S-CQm')], | ||
252 | [(tmpfile, 1, 6, 'FE1'), (tmpfile, 1, 11, 'S-CQ1')], | ||
253 | |||
230 | ] | 254 | ] |
231 | if 'hard' in conf: | 255 | if 'hard' in conf: |
232 | subgraphs += staggered | 256 | subgraphs += staggered |
@@ -235,6 +259,8 @@ class SchedPlotter(defapp.App): | |||
235 | xname = name + '_' + '-vs-'.join([x[3] for x in g]) | 259 | xname = name + '_' + '-vs-'.join([x[3] for x in g]) |
236 | if self.options.paper and self.options.format == 'pdf': | 260 | if self.options.paper and self.options.format == 'pdf': |
237 | self.plot_paper(graphs, title, xname, conf) | 261 | self.plot_paper(graphs, title, xname, conf) |
262 | elif self.options.wide and self.options.format == 'pdf': | ||
263 | self.plot_wide(graphs, title, xname, conf) | ||
238 | else: | 264 | else: |
239 | self.plot(graphs, title, xname, conf) | 265 | self.plot(graphs, title, xname, conf) |
240 | 266 | ||
diff --git a/plot_ohead.py b/plot_ohead.py index 9d4913c..81b39a7 100755 --- a/plot_ohead.py +++ b/plot_ohead.py | |||
@@ -25,6 +25,7 @@ options = [ | |||
25 | choices=PLUGINS), | 25 | choices=PLUGINS), |
26 | o('-d', '--data', action='append', dest='data', type='choice', | 26 | o('-d', '--data', action='append', dest='data', type='choice', |
27 | choices=DATA), | 27 | choices=DATA), |
28 | o(None, '--prefix', action='store', dest='prefix'), | ||
28 | ] | 29 | ] |
29 | 30 | ||
30 | defaults = { | 31 | defaults = { |
@@ -41,6 +42,7 @@ defaults = { | |||
41 | 'plugins' : [], | 42 | 'plugins' : [], |
42 | 'master' : [], | 43 | 'master' : [], |
43 | 'data' : [], | 44 | 'data' : [], |
45 | 'prefix' : '', | ||
44 | } | 46 | } |
45 | 47 | ||
46 | 48 | ||
@@ -53,10 +55,21 @@ ev_name = { | |||
53 | 'CXS' : 'context-switching overhead', | 55 | 'CXS' : 'context-switching overhead', |
54 | } | 56 | } |
55 | 57 | ||
58 | plugin_name = { | ||
59 | 'GSN-EDF NO_CPU' : 'CEm', | ||
60 | 'GSN-EDF 3' : 'CE1', | ||
61 | 'G-EDF NO_CPU' : 'FEm', | ||
62 | 'G-EDF 3' : 'FE1', | ||
63 | 'GHQ-EDF NO_CPU' : 'HEm', | ||
64 | 'GQ-EDF NO_CPU' : 'CQm', | ||
65 | 'GQ-EDF 3' : 'CQ1', | ||
66 | } | ||
67 | |||
56 | def graph(plugin, master, event, wc): | 68 | def graph(plugin, master, event, wc): |
69 | name = "%s %s" % (plugin, master) | ||
57 | return ['%s.R-%s.%s.csv' % (plugin, master, event), 1, 3 if wc else 2, | 70 | return ['%s.R-%s.%s.csv' % (plugin, master, event), 1, 3 if wc else 2, |
58 | '%s %s %s %s' % (plugin, event, 'RM' if master != 'NO_CPU' else '', | 71 | '%s %s %s' % (plugin_name[name], ev_name[event], |
59 | 'WC' if wc else 'AVG')] | 72 | '(worst-case)' if wc else '(average)')] |
60 | 73 | ||
61 | class OheadPlotter(defapp.App): | 74 | class OheadPlotter(defapp.App): |
62 | def __init__(self): | 75 | def __init__(self): |
@@ -106,7 +119,7 @@ class OheadPlotter(defapp.App): | |||
106 | if (p != 'GHQ-EDF' or m == 'NO_CPU') and \ | 119 | if (p != 'GHQ-EDF' or m == 'NO_CPU') and \ |
107 | (p != 'GQ-EDF' or e != 'SEND_RESCHED'): | 120 | (p != 'GQ-EDF' or e != 'SEND_RESCHED'): |
108 | gs += [graph(p, m, e, wc)] | 121 | gs += [graph(p, m, e, wc)] |
109 | fname = '%s_%s' % (e, d) | 122 | fname = '%s%s_%s' % (self.options.prefix, e, d) |
110 | title = '%s %s' % ('worst-case' if wc else 'average-case' , ev_name[e]) | 123 | title = '%s %s' % ('worst-case' if wc else 'average-case' , ev_name[e]) |
111 | self.plot(gs, title=title, name=fname) | 124 | self.plot(gs, title=title, name=fname) |
112 | 125 | ||