osnoise.c (1eceb2fc2ca549a170d7ee7cd1fde2daeda646ac) osnoise.c (829a6c0b5698c7d51aa2bcd16963fcd9de295476)
1// SPDX-License-Identifier: GPL-2.0
2/*
3 * Copyright (C) 2021 Red Hat Inc, Daniel Bristot de Oliveira <bristot@kernel.org>
4 */
5
6#include <sys/types.h>
7#include <sys/stat.h>
8#include <pthread.h>

--- 814 unchanged lines hidden (view full) ---

823
824 static const char *msg[] = {
825 "",
826 "osnoise version " VERSION,
827 "",
828 " usage: [rtla] osnoise [MODE] ...",
829 "",
830 " modes:",
1// SPDX-License-Identifier: GPL-2.0
2/*
3 * Copyright (C) 2021 Red Hat Inc, Daniel Bristot de Oliveira <bristot@kernel.org>
4 */
5
6#include <sys/types.h>
7#include <sys/stat.h>
8#include <pthread.h>

--- 814 unchanged lines hidden (view full) ---

823
824 static const char *msg[] = {
825 "",
826 "osnoise version " VERSION,
827 "",
828 " usage: [rtla] osnoise [MODE] ...",
829 "",
830 " modes:",
831 " top - prints the summary from osnoise tracer",
831 " top - prints the summary from osnoise tracer",
832 " hist - prints a histogram of osnoise samples",
832 "",
833 "if no MODE is given, the top mode is called, passing the arguments",
834 NULL,
835 };
836
837 for (i = 0; msg[i]; i++)
838 fprintf(stderr, "%s\n", msg[i]);
839 exit(1);

--- 18 unchanged lines hidden (view full) ---

858 exit(0);
859 } else if (strncmp(argv[1], "-", 1) == 0) {
860 /* the user skipped the tool, call the default one */
861 osnoise_top_main(argc, argv);
862 exit(0);
863 } else if (strcmp(argv[1], "top") == 0) {
864 osnoise_top_main(argc-1, &argv[1]);
865 exit(0);
833 "",
834 "if no MODE is given, the top mode is called, passing the arguments",
835 NULL,
836 };
837
838 for (i = 0; msg[i]; i++)
839 fprintf(stderr, "%s\n", msg[i]);
840 exit(1);

--- 18 unchanged lines hidden (view full) ---

859 exit(0);
860 } else if (strncmp(argv[1], "-", 1) == 0) {
861 /* the user skipped the tool, call the default one */
862 osnoise_top_main(argc, argv);
863 exit(0);
864 } else if (strcmp(argv[1], "top") == 0) {
865 osnoise_top_main(argc-1, &argv[1]);
866 exit(0);
867 } else if (strcmp(argv[1], "hist") == 0) {
868 osnoise_hist_main(argc-1, &argv[1]);
869 exit(0);
866 }
867
868usage:
869 osnoise_usage();
870 exit(1);
871}
870 }
871
872usage:
873 osnoise_usage();
874 exit(1);
875}