From fbfac3ea825a863400f7196750f016b6a6a0d48d Mon Sep 17 00:00:00 2001 From: "Bjoern B. Brandenburg" Date: Mon, 1 Jun 2009 08:58:39 -0700 Subject: appendix work --- plot.py | 62 ++++++++++++++++++++++++++++++++++++++++++----------------- plot_ohead.py | 19 +++++++++++++++--- 2 files changed, 60 insertions(+), 21 deletions(-) diff --git a/plot.py b/plot.py index 83855e8..befd7ee 100755 --- a/plot.py +++ b/plot.py @@ -10,6 +10,7 @@ options = [ o('-f', '--format', action='store', dest='format', type='choice', choices=FORMATS, help='output format'), o(None, '--paper', action='store_true', dest='paper'), + o(None, '--wide', action='store_true', dest='wide'), o(None, '--split', action='store_true', dest='split'), ] @@ -24,6 +25,7 @@ defaults = { 'ylabel' : 'ratio of schedulable task sets', 'paper' : False, 'split' : False, + 'wide' : False, } def decode(name): @@ -98,6 +100,21 @@ class SchedPlotter(defapp.App): format=self.options.format, fname=name, **xtra) + def plot_wide(self, graphs, title, name, conf, **xtra): + tops = 'rounded size 16cm,6.5cm' + gnuplot(graphs, title=title, + xlabel=self.options.xlabel, + ylabel=self.options.ylabel + + (' [soft]' if 'soft' in conf else ' [hard]'), + xrange=self.options.xrange, + yrange=self.options.yrange, + xticks=self.options.xticks, + yticks=self.options.yticks, + format=self.options.format, + fname=name, + term_opts=tops, + **xtra) + def plot_paper(self, graphs, title, name, conf, **xtra): tops = 'color solid font "Helvetica,10" linewidth 1.0 rounded size 16cm,8.5cm' gnuplot(graphs, title=title, @@ -179,54 +196,61 @@ class SchedPlotter(defapp.App): def plot_rtss09(self, tmpfile, name, conf): title = scenario_heading(conf, want_period=True) graphs = [ - (tmpfile, 1, 2, 'ideal'), - (tmpfile, 1, 3, 'SEm'), - (tmpfile, 1, 4, 'SE1'), + (tmpfile, 1, 2, 'G-EDF'), + (tmpfile, 1, 3, 'CEm'), + (tmpfile, 1, 4, 'CE1'), (tmpfile, 1, 5, 'FEm'), (tmpfile, 1, 6, 'FE1'), (tmpfile, 1, 7, 'HEm'), - (tmpfile, 1, 8, 'SQm'), - (tmpfile, 1, 9, 'SQ1'), + (tmpfile, 1, 8, 'CQm'), + (tmpfile, 1, 9, 'CQ1'), ] staggered = [ - (tmpfile, 1, 10, 'S-SQm'), - (tmpfile, 1, 11, 'S-SQ1'), + (tmpfile, 1, 10, 'S-CQm'), + (tmpfile, 1, 11, 'S-CQ1'), ] if 'hard' in conf: graphs += staggered if self.options.paper and self.options.format == 'pdf': self.plot_paper(graphs, title, name, conf) + elif self.options.wide and self.options.format == 'pdf': + self.plot_wide(graphs, title, name, conf) else: self.plot(graphs, title, name, conf) def plot_rtss09_split(self, tmpfile, name, conf): title = scenario_heading(conf, want_period=True) - ideal = (tmpfile, 1, 2, 'ideal') + ideal = (tmpfile, 1, 2, 'G-EDF') subgraphs = [ # dedicated vs. non-dedicated - [(tmpfile, 1, 3, 'SEm'), (tmpfile, 1, 4, 'SE1')], + [(tmpfile, 1, 3, 'CEm'), (tmpfile, 1, 4, 'CE1')], [(tmpfile, 1, 5, 'FEm'), (tmpfile, 1, 6, 'FE1')], - [(tmpfile, 1, 8, 'SQm'), (tmpfile, 1, 9, 'SQ1')], + [(tmpfile, 1, 8, 'CQm'), (tmpfile, 1, 9, 'CQ1')], # fine-grained vs. sequential - [(tmpfile, 1, 3, 'SEm'), (tmpfile, 1, 5, 'FEm')], - [(tmpfile, 1, 4, 'SE1'), (tmpfile, 1, 6, 'FE1')], + [(tmpfile, 1, 3, 'CEm'), (tmpfile, 1, 5, 'FEm')], + [(tmpfile, 1, 4, 'CE1'), (tmpfile, 1, 6, 'FE1')], # hierarchical vs. sequential - [(tmpfile, 1, 3, 'SEm'), (tmpfile, 1, 7, 'HEm')], + [(tmpfile, 1, 3, 'CEm'), (tmpfile, 1, 7, 'HEm')], # quantum vs. event - [(tmpfile, 1, 3, 'SEm'), (tmpfile, 1, 8, 'SQm')], - [(tmpfile, 1, 6, 'FE1'), (tmpfile, 1, 9, 'SQ1')], + [(tmpfile, 1, 3, 'CEm'), (tmpfile, 1, 8, 'CQm')], + [(tmpfile, 1, 6, 'FE1'), (tmpfile, 1, 9, 'CQ1')], ] staggered = [ # dedicated vs. non-dedicated - [(tmpfile, 1, 10, 'S-SQm'), (tmpfile, 1, 11, 'S-SQ1')], + [(tmpfile, 1, 10, 'S-CQm'), (tmpfile, 1, 11, 'S-CQ1')], # staggered vs. non-staggered - [(tmpfile, 1, 8, 'SQm'), (tmpfile, 1, 10, 'S-SQm')], - [(tmpfile, 1, 9, 'SQ1'), (tmpfile, 1, 11, 'S-SQ1')], + [(tmpfile, 1, 8, 'CQm'), (tmpfile, 1, 10, 'S-CQm')], + [(tmpfile, 1, 9, 'CQ1'), (tmpfile, 1, 11, 'S-CQ1')], + +# quantum vs. event + [(tmpfile, 1, 3, 'CEm'), (tmpfile, 1, 10, 'S-CQm')], + [(tmpfile, 1, 6, 'FE1'), (tmpfile, 1, 11, 'S-CQ1')], + ] if 'hard' in conf: subgraphs += staggered @@ -235,6 +259,8 @@ class SchedPlotter(defapp.App): xname = name + '_' + '-vs-'.join([x[3] for x in g]) if self.options.paper and self.options.format == 'pdf': self.plot_paper(graphs, title, xname, conf) + elif self.options.wide and self.options.format == 'pdf': + self.plot_wide(graphs, title, xname, conf) else: self.plot(graphs, title, xname, conf) 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 = [ choices=PLUGINS), o('-d', '--data', action='append', dest='data', type='choice', choices=DATA), + o(None, '--prefix', action='store', dest='prefix'), ] defaults = { @@ -41,6 +42,7 @@ defaults = { 'plugins' : [], 'master' : [], 'data' : [], + 'prefix' : '', } @@ -53,10 +55,21 @@ ev_name = { 'CXS' : 'context-switching overhead', } +plugin_name = { + 'GSN-EDF NO_CPU' : 'CEm', + 'GSN-EDF 3' : 'CE1', + 'G-EDF NO_CPU' : 'FEm', + 'G-EDF 3' : 'FE1', + 'GHQ-EDF NO_CPU' : 'HEm', + 'GQ-EDF NO_CPU' : 'CQm', + 'GQ-EDF 3' : 'CQ1', +} + def graph(plugin, master, event, wc): + name = "%s %s" % (plugin, master) return ['%s.R-%s.%s.csv' % (plugin, master, event), 1, 3 if wc else 2, - '%s %s %s %s' % (plugin, event, 'RM' if master != 'NO_CPU' else '', - 'WC' if wc else 'AVG')] + '%s %s %s' % (plugin_name[name], ev_name[event], + '(worst-case)' if wc else '(average)')] class OheadPlotter(defapp.App): def __init__(self): @@ -106,7 +119,7 @@ class OheadPlotter(defapp.App): if (p != 'GHQ-EDF' or m == 'NO_CPU') and \ (p != 'GQ-EDF' or e != 'SEND_RESCHED'): gs += [graph(p, m, e, wc)] - fname = '%s_%s' % (e, d) + fname = '%s%s_%s' % (self.options.prefix, e, d) title = '%s %s' % ('worst-case' if wc else 'average-case' , ev_name[e]) self.plot(gs, title=title, name=fname) -- cgit v1.2.2