diff options
author | dave-estes-syzexion <53795406+dave-estes-syzexion@users.noreply.github.com> | 2019-09-18 14:14:56 -0400 |
---|---|---|
committer | Andrew Waterman <andrew@sifive.com> | 2019-09-18 11:14:56 -0700 |
commit | c171379c7828ae94d969846874a7ac542dbda2c3 (patch) | |
tree | 872b8242f3178d86c7371a1a1a10e960a98539a7 /riscv/processor.cc | |
parent | 6d15c93fd75db322981fe58ea1db13035e0f7add (diff) | |
download | spike-c171379c7828ae94d969846874a7ac542dbda2c3.zip spike-c171379c7828ae94d969846874a7ac542dbda2c3.tar.gz spike-c171379c7828ae94d969846874a7ac542dbda2c3.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 'riscv/processor.cc')
-rw-r--r-- | riscv/processor.cc | 13 |
1 files changed, 13 insertions, 0 deletions
diff --git a/riscv/processor.cc b/riscv/processor.cc index da75803..5f956a1 100644 --- a/riscv/processor.cc +++ b/riscv/processor.cc @@ -241,6 +241,19 @@ void processor_t::set_histogram(bool value) if (value) { fprintf(stderr, "PC Histogram support has not been properly enabled;"); fprintf(stderr, " please re-build the riscv-isa-sim project using \"configure --enable-histogram\".\n"); + abort(); + } +#endif +} + +void processor_t::set_log_commits(bool value) +{ + log_commits_enabled = value; +#ifndef RISCV_ENABLE_COMMITLOG + if (value) { + fprintf(stderr, "Commit logging support has not been properly enabled;"); + fprintf(stderr, " please re-build the riscv-isa-sim project using \"configure --enable-commitlog\".\n"); + abort(); } #endif } |