Added error message when trying to use histogram
authorChristopher Celio <celio@eecs.berkeley.edu>
Thu, 30 Jul 2015 20:08:46 +0000 (13:08 -0700)
committerChristopher Celio <celio@eecs.berkeley.edu>
Thu, 30 Jul 2015 20:08:46 +0000 (13:08 -0700)
riscv/processor.cc

index 69a63f0fde3f16ae8f81472c6c03b2bfc0cb1442..5b533910ac0c368e3555b0551a04c18ba653639a 100644 (file)
@@ -121,6 +121,12 @@ void processor_t::set_debug(bool value)
 void processor_t::set_histogram(bool value)
 {
   histogram_enabled = value;
+#ifndef RISCV_ENABLE_HISTOGRAM
+  if (value) {
+    fprintf(stderr, "PC Histogram support has not been properly enabled;");
+    fprintf(stderr, " please re-build the riscv-isa-run project using \"configure --enable-histogram\".\n");
+  }
+#endif
 }
 
 void processor_t::reset(bool value)