Implement simpleperf stat subcommand.
Also add some simple unit-tests.
Change-Id: Ic30a2d4a879e028a8c82babbaf82e322fc49a838
diff --git a/simpleperf/command.h b/simpleperf/command.h
index a2e1923..46b49cb 100644
--- a/simpleperf/command.h
+++ b/simpleperf/command.h
@@ -31,6 +31,7 @@
}
virtual ~Command() {
+ UnRegisterCommand(this);
}
const std::string& Name() const {
@@ -56,6 +57,7 @@
const std::string long_help_string_;
static void RegisterCommand(Command* cmd);
+ static void UnRegisterCommand(Command* cmd);
DISALLOW_COPY_AND_ASSIGN(Command);
};