message: Add `CommandProfiling` to `redex-all`
  Summary: Support `GLOBAL_COMMAND_PROFILING` to profile all of `redex-all`'s `main`.
diff: #include <json/json.h>
  #include "ABExperimentContext.h"
  +#include "CommandProfiling.h"
  #include "CommentFilter.h"
  #include "ControlFlow.h" // To set DEBUG.
  #include "Debug.h"
  @@ -1096,6 +1097,25 @@ void dump_class_method_info_map(const std::string& file_path,
  });
  }
  +boost::optional<ScopedCommandProfiling> maybe_command_profile() {
  + if (getenv("GLOBAL_PROFILE_COMMAND") == nullptr) {
  + return boost::none;
  + }
  +
  + boost::optional<std::string> shutdown_cmd = boost::none;
  + if (getenv("GLOBAL_PROFILE_SHUTDOWN_COMMAND") != nullptr) {
  + shutdown_cmd = std::string(getenv("GLOBAL_PROFILE_SHUTDOWN_COMMAND"));
  + }
  + boost::optional<std::string> post_cmd = boost::none;
  + if (getenv("GLOBAL_PROFILE_POST_COMMAND")) {
  + post_cmd = std::string(getenv("GLOBAL_PROFILE_POST_COMMAND"));
  + }
  +
  + return ScopedCommandProfiling{
  + boost::make_optional(std::string(getenv("GLOBAL_PROFILE_COMMAND"))),
  + shutdown_cmd, post_cmd};
  +}
  +
  } // namespace
  int main(int argc, char* argv[]) {
  @@ -1111,6 +1131,8 @@ int main(int argc, char* argv[]) {
  // For better stacks in abort dumps.
  set_abort_if_not_this_thread();
  + auto maybe_global_profile = maybe_command_profile();
  +
  std::string stats_output_path;
  Json::Value stats;
  {
  