diff options
author | Koan-Sin Tan <freedom.tan@linaro.org> | 2014-11-27 17:10:48 +0800 |
---|---|---|
committer | Tuukka Tikkanen <tuukka.tikkanen@linaro.org> | 2014-11-28 05:43:51 +0200 |
commit | 62924570fcb8a84040ecfd02b280366fdb2cf7e8 (patch) | |
tree | 83c032115714d204d2ccd427a463820c922b64cf /idlestat.c | |
parent | db63259a01cb3c88b82dbecddd48a2c166c84e20 (diff) |
Add CSV report formats
1. add csv report ops in csv_report.c
2. add -C option
3. add simple description in csv-format.txt
Signed-off-by: Koan-Sin Tan <freedom.tan@linaro.org>
Signed-off-by: Tuukka Tikkanen <tuukka.tikkanen@linaro.org>
Diffstat (limited to 'idlestat.c')
-rw-r--r-- | idlestat.c | 8 |
1 files changed, 7 insertions, 1 deletions
@@ -1211,9 +1211,11 @@ static void help(const char *cmd) fprintf(stderr, "\nUsage:\nTrace mode:\n\t%s --trace -f|--trace-file <filename>" " -o|--output-file <filename> -t|--duration <seconds>" + " -C|--csv-report" " -c|--idle -p|--frequency -w|--wakeup", basename(cmd)); fprintf(stderr, "\nReporting mode:\n\t%s --import -f|--trace-file <filename>" + " -C|--csv-report" " -o|--output-file <filename>", basename(cmd)); fprintf(stderr, "\n\nExamples:\n1. Run a trace, post-process the results" @@ -1256,6 +1258,7 @@ int getoptions(int argc, char *argv[], struct program_options *options) { "frequency", no_argument, NULL, 'p' }, { "wakeup", no_argument, NULL, 'w' }, { "energy-model-file", required_argument, NULL, 'e' }, + { "csv-report", no_argument, NULL, 'C' }, { 0, 0, 0, 0 } }; int c; @@ -1271,7 +1274,7 @@ int getoptions(int argc, char *argv[], struct program_options *options) int optindex = 0; - c = getopt_long(argc, argv, ":de:f:o:ht:cpwVv", + c = getopt_long(argc, argv, ":de:f:o:ht:cpwVvC", long_options, &optindex); if (c == -1) break; @@ -1309,6 +1312,9 @@ int getoptions(int argc, char *argv[], struct program_options *options) case 'e': options->energy_model_filename = optarg; break; + case 'C': + options->report_ops = &csv_report_ops; + break; case 0: /* getopt_long() set a variable, just keep going */ break; case ':': /* missing option argument */ |