diff options
author | dave-estes-syzexion <53795406+dave-estes-syzexion@users.noreply.github.com> | 2019-09-18 14:14:56 -0400 |
---|---|---|
committer | Chih-Min Chao <chihmin.chao@sifive.com> | 2019-09-29 22:27:14 -0700 |
commit | 66c4933e1a23c4504188f391ffc4886de09f9e91 (patch) | |
tree | 51f8601bda035cb97f62ea5d4f3ab5c6134519af /spike_main | |
parent | f353f81f6279ee0b51b778f68abf9bfb682f7264 (diff) | |
download | spike-66c4933e1a23c4504188f391ffc4886de09f9e91.zip spike-66c4933e1a23c4504188f391ffc4886de09f9e91.tar.gz spike-66c4933e1a23c4504188f391ffc4886de09f9e91.tar.bz2 |
Adds --log-commits commandline option. (#323)
* Adds --log-commits commandline option.
Similar to histogram support, the commit logging feature must be
enabled with a configure option: --enable-commitlog. However, unlike
that feature, there was no way to turn off the logging with a
commandline option once the functionality was built in. This (git)
commit provides that abilty.
* Changes addressing review feedback.
Diffstat (limited to 'spike_main')
-rw-r--r-- | spike_main/spike.cc | 3 |
1 files changed, 3 insertions, 0 deletions
diff --git a/spike_main/spike.cc b/spike_main/spike.cc index cf3c649..e25db74 100644 --- a/spike_main/spike.cc +++ b/spike_main/spike.cc @@ -131,6 +131,7 @@ int main(int argc, char** argv) std::unique_ptr<dcache_sim_t> dc; std::unique_ptr<cache_sim_t> l2; bool log_cache = false; + bool log_commits = false; std::function<extension_t*()> extension; const char* isa = DEFAULT_ISA; const char* varch = DEFAULT_VARCH; @@ -265,6 +266,7 @@ int main(int argc, char** argv) [&](const char* s){dm_config.support_abstract_csr_access = false;}); parser.option(0, "dm-no-halt-groups", 0, [&](const char* s){dm_config.support_haltgroups = false;}); + parser.option(0, "log-commits", 0, [&](const char* s){log_commits = true;}); auto argv1 = parser.parse(argv); std::vector<std::string> htif_args(argv1, (const char*const*)argv + argc); @@ -308,6 +310,7 @@ int main(int argc, char** argv) s.set_debug(debug); s.set_log(log); s.set_histogram(histogram); + s.set_log_commits(log_commits); auto return_code = s.run(); |