From c171379c7828ae94d969846874a7ac542dbda2c3 Mon Sep 17 00:00:00 2001 From: dave-estes-syzexion <53795406+dave-estes-syzexion@users.noreply.github.com> Date: Wed, 18 Sep 2019 14:14:56 -0400 Subject: 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. --- riscv/processor.cc | 13 +++++++++++++ 1 file changed, 13 insertions(+) (limited to 'riscv/processor.cc') 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 } -- cgit v1.1