summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorPeter Kjellerstedt <peter.kjellerstedt@axis.com>2013-11-15 18:08:57 +0100
committerRichard Purdie <richard.purdie@linuxfoundation.org>2013-11-18 12:44:07 +0000
commit80cce56e820dff38acecd0efd0f222f7d2fd4fba (patch)
tree339bfbbca056aa33adc03b0777d890fe5ac9153e
parent730e350f043b10da38a42371060adde2137919a8 (diff)
downloadpoky-80cce56e820dff38acecd0efd0f222f7d2fd4fba.tar.gz
pybootchartgui: Disable options that do not make sense
(From OE-Core rev: e1cde0c8b65a56657a5a5669890dad442223fef4) Signed-off-by: Peter Kjellerstedt <peter.kjellerstedt@axis.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
-rw-r--r--scripts/pybootchartgui/pybootchartgui/main.py.in40
1 files changed, 25 insertions, 15 deletions
diff --git a/scripts/pybootchartgui/pybootchartgui/main.py.in b/scripts/pybootchartgui/pybootchartgui/main.py.in
index 265cb18383..39271865d6 100644
--- a/scripts/pybootchartgui/pybootchartgui/main.py.in
+++ b/scripts/pybootchartgui/pybootchartgui/main.py.in
@@ -40,29 +40,29 @@ def _mk_options_parser():
40 help="split the output chart into <NUM> charts, only works with \"-o PATH\"") 40 help="split the output chart into <NUM> charts, only works with \"-o PATH\"")
41 parser.add_option("-m", "--mintime", dest="mintime", type=int, default=8, 41 parser.add_option("-m", "--mintime", dest="mintime", type=int, default=8,
42 help="only tasks longer than this time will be displayed") 42 help="only tasks longer than this time will be displayed")
43 parser.add_option("-n", "--no-prune", action="store_false", dest="prune", default=True, 43# parser.add_option("-n", "--no-prune", action="store_false", dest="prune", default=True,
44 help="do not prune the process tree") 44# help="do not prune the process tree")
45 parser.add_option("-q", "--quiet", action="store_true", dest="quiet", default=False, 45 parser.add_option("-q", "--quiet", action="store_true", dest="quiet", default=False,
46 help="suppress informational messages") 46 help="suppress informational messages")
47 parser.add_option("-t", "--boot-time", action="store_true", dest="boottime", default=False, 47# parser.add_option("-t", "--boot-time", action="store_true", dest="boottime", default=False,
48 help="only display the boot time of the boot in text format (stdout)") 48# help="only display the boot time of the boot in text format (stdout)")
49 parser.add_option("--very-quiet", action="store_true", dest="veryquiet", default=False, 49 parser.add_option("--very-quiet", action="store_true", dest="veryquiet", default=False,
50 help="suppress all messages except errors") 50 help="suppress all messages except errors")
51 parser.add_option("--verbose", action="store_true", dest="verbose", default=False, 51 parser.add_option("--verbose", action="store_true", dest="verbose", default=False,
52 help="print all messages") 52 help="print all messages")
53 parser.add_option("--profile", action="store_true", dest="profile", default=False, 53# parser.add_option("--profile", action="store_true", dest="profile", default=False,
54 help="profile rendering of chart (only useful when in batch mode indicated by -f)") 54# help="profile rendering of chart (only useful when in batch mode indicated by -f)")
55 parser.add_option("--show-pid", action="store_true", dest="show_pid", default=False, 55# parser.add_option("--show-pid", action="store_true", dest="show_pid", default=False,
56 help="show process ids in the bootchart as 'processname [pid]'") 56# help="show process ids in the bootchart as 'processname [pid]'")
57 parser.add_option("--show-all", action="store_true", dest="show_all", default=False, 57 parser.add_option("--show-all", action="store_true", dest="show_all", default=False,
58 help="show all process information in the bootchart as '/process/path/exe [pid] [args]'") 58 help="show all process information in the bootchart as '/process/path/exe [pid] [args]'")
59 parser.add_option("--crop-after", dest="crop_after", metavar="PROCESS", default=None, 59# parser.add_option("--crop-after", dest="crop_after", metavar="PROCESS", default=None,
60 help="crop chart when idle after PROCESS is started") 60# help="crop chart when idle after PROCESS is started")
61 parser.add_option("--annotate", action="append", dest="annotate", metavar="PROCESS", default=None, 61# parser.add_option("--annotate", action="append", dest="annotate", metavar="PROCESS", default=None,
62 help="annotate position where PROCESS is started; can be specified multiple times. " + 62# help="annotate position where PROCESS is started; can be specified multiple times. " +
63 "To create a single annotation when any one of a set of processes is started, use commas to separate the names") 63# "To create a single annotation when any one of a set of processes is started, use commas to separate the names")
64 parser.add_option("--annotate-file", dest="annotate_file", metavar="FILENAME", default=None, 64# parser.add_option("--annotate-file", dest="annotate_file", metavar="FILENAME", default=None,
65 help="filename to write annotation points to") 65# help="filename to write annotation points to")
66 return parser 66 return parser
67 67
68class Writer: 68class Writer:
@@ -108,6 +108,16 @@ def main(argv=None):
108 108
109 parser = _mk_options_parser() 109 parser = _mk_options_parser()
110 options, args = parser.parse_args(argv) 110 options, args = parser.parse_args(argv)
111
112 # Default values for disabled options
113 options.prune = True
114 options.boottime = False
115 options.profile = False
116 options.show_pid = False
117 options.crop_after = None
118 options.annotate = None
119 options.annotate_file = None
120
111 writer = _mk_writer(options) 121 writer = _mk_writer(options)
112 122
113 if len(args) == 0: 123 if len(args) == 0: