This function is pointless. It was added initially for debugging purpose, remove it.
Signed-off-by: Daniel Lezcano daniel.lezcano@linaro.org --- idlestat.c | 16 ++-------------- idlestat.h | 1 - 2 files changed, 2 insertions(+), 15 deletions(-)
diff --git a/idlestat.c b/idlestat.c index 30860db..abbb787 100644 --- a/idlestat.c +++ b/idlestat.c @@ -1042,11 +1042,11 @@ static void help(const char *cmd) fprintf(stderr, "\nUsage:\nTrace mode: %s --trace -f|--trace-file <filename>" " -t|--duration <seconds> " - "[-z|--dump] [-i|--iterations <number>] [-d|--debug]\n", + "[-z|--dump] [-i|--iterations <number>]\n", basename(cmd)); fprintf(stderr, "\nReporting mode: %s --import -f|--trace-file <filename>" - "[-z|--dump] [-i|--iterations <number>] [-d|--debug]\n", + "[-z|--dump] [-i|--iterations <number>]\n", basename(cmd)); fprintf(stderr, "\nExample:\n%s --trace -f /tmp/myoutput -t 30\n", basename(cmd)); @@ -1064,7 +1064,6 @@ int getoptions(int argc, char *argv[], struct program_options *options) struct option long_options[] = { { "trace", no_argument, &options->mode, TRACE }, { "import", no_argument, &options->mode, IMPORT }, - { "debug", no_argument, NULL, 'd' }, { "trace-file", required_argument, NULL, 'f' }, { "help", no_argument, NULL, 'h' }, { "iterations", required_argument, NULL, 'i' }, @@ -1089,9 +1088,6 @@ int getoptions(int argc, char *argv[], struct program_options *options) break;
switch (c) { - case 'd': - options->debug = true; - break; case 'f': options->filename = optarg; break; @@ -1315,7 +1311,6 @@ int main(int argc, char *argv[], char *const envp[]) struct cpuidle_datas *datas; struct cpuidle_datas *cluster; struct program_options options; - struct rusage rusage; int args;
args = getoptions(argc, argv, &options); @@ -1420,13 +1415,6 @@ int main(int argc, char *argv[], char *const envp[]) free(cluster); }
- /* Computation could be heavy, let's give some information - * about the memory consumption */ - if (options.debug) { - getrusage(RUSAGE_SELF, &rusage); - printf("max rss : %ld kB\n", rusage.ru_maxrss); - } - release_cpu_topo_cstates(); release_cpu_topo_info(); release_pstate_info(datas->pstates, datas->nrcpus); diff --git a/idlestat.h b/idlestat.h index 4397984..3317a8f 100644 --- a/idlestat.h +++ b/idlestat.h @@ -127,7 +127,6 @@ enum formats { };
struct program_options { - bool debug; bool dump; int iterations; int mode;