|
@@ -1933,6 +1933,11 @@ int cmd_timechart(int argc, const char **argv,
|
|
.merge_dist = 1000,
|
|
.merge_dist = 1000,
|
|
};
|
|
};
|
|
const char *output_name = "output.svg";
|
|
const char *output_name = "output.svg";
|
|
|
|
+ const struct option timechart_common_options[] = {
|
|
|
|
+ OPT_BOOLEAN('P', "power-only", &tchart.power_only, "output power data only"),
|
|
|
|
+ OPT_BOOLEAN('T', "tasks-only", &tchart.tasks_only, "output processes data only"),
|
|
|
|
+ OPT_END()
|
|
|
|
+ };
|
|
const struct option timechart_options[] = {
|
|
const struct option timechart_options[] = {
|
|
OPT_STRING('i', "input", &input_name, "file", "input file name"),
|
|
OPT_STRING('i', "input", &input_name, "file", "input file name"),
|
|
OPT_STRING('o', "output", &output_name, "file", "output file name"),
|
|
OPT_STRING('o', "output", &output_name, "file", "output file name"),
|
|
@@ -1940,9 +1945,6 @@ int cmd_timechart(int argc, const char **argv,
|
|
OPT_CALLBACK(0, "highlight", NULL, "duration or task name",
|
|
OPT_CALLBACK(0, "highlight", NULL, "duration or task name",
|
|
"highlight tasks. Pass duration in ns or process name.",
|
|
"highlight tasks. Pass duration in ns or process name.",
|
|
parse_highlight),
|
|
parse_highlight),
|
|
- OPT_BOOLEAN('P', "power-only", &tchart.power_only, "output power data only"),
|
|
|
|
- OPT_BOOLEAN('T', "tasks-only", &tchart.tasks_only,
|
|
|
|
- "output processes data only"),
|
|
|
|
OPT_CALLBACK('p', "process", NULL, "process",
|
|
OPT_CALLBACK('p', "process", NULL, "process",
|
|
"process selector. Pass a pid or process name.",
|
|
"process selector. Pass a pid or process name.",
|
|
parse_process),
|
|
parse_process),
|
|
@@ -1962,22 +1964,18 @@ int cmd_timechart(int argc, const char **argv,
|
|
"merge events that are merge-dist us apart",
|
|
"merge events that are merge-dist us apart",
|
|
parse_time),
|
|
parse_time),
|
|
OPT_BOOLEAN('f', "force", &tchart.force, "don't complain, do it"),
|
|
OPT_BOOLEAN('f', "force", &tchart.force, "don't complain, do it"),
|
|
- OPT_END()
|
|
|
|
|
|
+ OPT_PARENT(timechart_common_options),
|
|
};
|
|
};
|
|
const char * const timechart_subcommands[] = { "record", NULL };
|
|
const char * const timechart_subcommands[] = { "record", NULL };
|
|
const char *timechart_usage[] = {
|
|
const char *timechart_usage[] = {
|
|
"perf timechart [<options>] {record}",
|
|
"perf timechart [<options>] {record}",
|
|
NULL
|
|
NULL
|
|
};
|
|
};
|
|
-
|
|
|
|
const struct option timechart_record_options[] = {
|
|
const struct option timechart_record_options[] = {
|
|
- OPT_BOOLEAN('P', "power-only", &tchart.power_only, "output power data only"),
|
|
|
|
- OPT_BOOLEAN('T', "tasks-only", &tchart.tasks_only,
|
|
|
|
- "output processes data only"),
|
|
|
|
OPT_BOOLEAN('I', "io-only", &tchart.io_only,
|
|
OPT_BOOLEAN('I', "io-only", &tchart.io_only,
|
|
"record only IO data"),
|
|
"record only IO data"),
|
|
OPT_BOOLEAN('g', "callchain", &tchart.with_backtrace, "record callchain"),
|
|
OPT_BOOLEAN('g', "callchain", &tchart.with_backtrace, "record callchain"),
|
|
- OPT_END()
|
|
|
|
|
|
+ OPT_PARENT(timechart_common_options),
|
|
};
|
|
};
|
|
const char * const timechart_record_usage[] = {
|
|
const char * const timechart_record_usage[] = {
|
|
"perf timechart record [<options>]",
|
|
"perf timechart record [<options>]",
|