From 3320d024ed6c0b56bda93ca876d8aec9729d7771 Mon Sep 17 00:00:00 2001 From: =?utf8?q?Jos=C3=A9=20Fonseca?= Date: Sun, 18 Nov 2012 15:45:27 +0000 Subject: [PATCH] cli: Rename replay -> retrace. For consistency with the current terminology. --- cli/CMakeLists.txt | 2 +- cli/cli.hpp | 2 +- cli/cli_dump_images.cpp | 8 -------- cli/cli_main.cpp | 2 +- cli/{cli_replay.cpp => cli_retrace.cpp} | 15 +++++---------- 5 files changed, 8 insertions(+), 21 deletions(-) rename cli/{cli_replay.cpp => cli_retrace.cpp} (84%) diff --git a/cli/CMakeLists.txt b/cli/CMakeLists.txt index a0ffb71..ed99881 100644 --- a/cli/CMakeLists.txt +++ b/cli/CMakeLists.txt @@ -8,7 +8,7 @@ add_executable (apitrace cli_pager.cpp cli_pickle.cpp cli_repack.cpp - cli_replay.cpp + cli_retrace.cpp cli_trace.cpp cli_trim.cpp ) diff --git a/cli/cli.hpp b/cli/cli.hpp index c701f52..c35cb3a 100644 --- a/cli/cli.hpp +++ b/cli/cli.hpp @@ -47,7 +47,7 @@ extern const Command dump_command; extern const Command dump_images_command; extern const Command pickle_command; extern const Command repack_command; -extern const Command replay_command; +extern const Command retrace_command; extern const Command trace_command; extern const Command trim_command; diff --git a/cli/cli_dump_images.cpp b/cli/cli_dump_images.cpp index 2a856c7..594f001 100644 --- a/cli/cli_dump_images.cpp +++ b/cli/cli_dump_images.cpp @@ -116,14 +116,6 @@ command(int argc, char *argv[]) output = prefix.str(); } - /* FIXME: It would be cleaner to pull the replaying of the trace - * in-process here and generate the images directly. But that - * pulls in a non-trivial amount of the existing 'retrace' code, - * along with dependencies on GL, etc. - * - * It will definitely make sense to do that once all that code has - * already been pulled in for the "apitrace retrace" (or "apitrace - * replay") command. */ std::vector command; os::String glretracePath = trace::findProgram("glretrace"); diff --git a/cli/cli_main.cpp b/cli/cli_main.cpp index 6682717..040adcf 100644 --- a/cli/cli_main.cpp +++ b/cli/cli_main.cpp @@ -73,7 +73,7 @@ static const Command * commands[] = { &dump_images_command, &pickle_command, &repack_command, - &replay_command, + &retrace_command, &trace_command, &trim_command, &help_command diff --git a/cli/cli_replay.cpp b/cli/cli_retrace.cpp similarity index 84% rename from cli/cli_replay.cpp rename to cli/cli_retrace.cpp index aaa68e2..f88d7df 100644 --- a/cli/cli_replay.cpp +++ b/cli/cli_retrace.cpp @@ -43,7 +43,7 @@ static const char *synopsis = "Replay a trace."; static void usage(void) { - std::cout << "usage apitrace replay [OPTIONS] TRACE_FILE\n" + std::cout << "usage apitrace retrace [OPTIONS] TRACE_FILE\n" << synopsis << "\n" "\n" " -h, --help Show this help message and exit\n" @@ -84,24 +84,19 @@ command(int argc, char *argv[]) } if (optind >= argc) { - std::cerr << "error: apitrace replay requires a trace file as an argument.\n"; + std::cerr << "error: apitrace retrace requires a trace file as an argument.\n"; usage(); return 1; } if (optind < argc - 1) { - std::cerr << "error: apitrace replay can accept only a single trace file argument.\n"; + std::cerr << "error: apitrace retrace can accept only a single trace file argument.\n"; usage(); return 1; } filename = argv[optind]; - /* FIXME: It would be cleaner to pull the replaying of the trace - * in-process here and generate the images directly. But that - * pulls in a non-trivial amount of the existing 'retrace' code, - * along with dependencies on GL, etc. - */ std::vector command; os::String glretracePath = trace::findProgram("glretrace"); @@ -117,8 +112,8 @@ command(int argc, char *argv[]) return os::execute((char * const *)&command[0]); } -const Command replay_command = { - "replay", +const Command retrace_command = { + "retrace", synopsis, usage, command -- 2.43.0