diff --git a/Makefile b/Makefile index 466f308..fc7524d 100644 --- a/Makefile +++ b/Makefile @@ -18,7 +18,7 @@ LOG_TOTAL ?= /tmp/banshee_tests_total TARGET_DIR ?= $(shell cargo metadata --format-version 1 | sed -n 's/.*"target_directory":"\([^"]*\)".*/\1/p') BANSHEE ?= $(TARGET_DIR)/debug/banshee -SNITCH_LOG ?= info +BANSHEE_LOG ?= info test: test-info $(TEST_TARGETS) @echo @@ -51,7 +51,7 @@ define test_template echo -n "$$CMD ... "; \ if [ ! -z $(filter $(1),$(TESTS_BLACKLIST)) ]; then \ echo "`tput setaf 3`ignored`tput sgr0`"; \ - elif ! env SNITCH_LOG=$(SNITCH_LOG) $$CMD &> $$LOGFILE; then \ + elif ! env BANSHEE_LOG=$(BANSHEE_LOG) $$CMD &> $$LOGFILE; then \ echo "`tput setaf 1`FAILED`tput sgr0`"; \ cat $$LOGFILE; \ echo $$CMD >>$(LOG_FAILED); \ diff --git a/README.md b/README.md index 03751d9..91b5afc 100644 --- a/README.md +++ b/README.md @@ -89,7 +89,7 @@ Run a binary as follows: If you make any changes to `src/runtime.rs` or the `../riscv-opcodes`, run `make` to update the `src/runtime.ll` and `src/riscv.rs` files. -To enable logging output, set the `SNITCH_LOG` environment variable to `error`, `warn`, `info`, `debug`, or `trace`. More detailed [configurations](https://docs.rs/env_logger) are possible. +To enable logging output, set the `BANSHEE_LOG` environment variable to `error`, `warn`, `info`, `debug`, or `trace`. More detailed [configurations](https://docs.rs/env_logger) are possible. For larger executable you might encounter segmentation faults due to an insufficient stack size. To increase the stack size of the emulation threads set the `RUST_MIN_STACK` environment variable to the desired number of bytes (default is 2MiB). ([More Information](https://doc.rust-lang.org/std/thread/#stack-size)) @@ -117,7 +117,7 @@ Piping the output into `sort` will cause the trace to be sorted by cycle and har 00000005 0005 80010010 x5:20000028 […] # sw a0, 0(t0) 00000006 0005 80010014 # wfi (args unknown) -**Caution:** Piping the stdout through `spike-dasm` can cause the instruction trace to look delayed with respect to debug and trace logs (which run through stderr), if you have them enabled in `SNITCH_LOG`. This is just a visual artifact. +**Caution:** Piping the stdout through `spike-dasm` can cause the instruction trace to look delayed with respect to debug and trace logs (which run through stderr), if you have them enabled in `BANSHEE_LOG`. This is just a visual artifact. ### Unit Tests diff --git a/src/main.rs b/src/main.rs index 8c73563..79fece7 100644 --- a/src/main.rs +++ b/src/main.rs @@ -158,7 +158,7 @@ fn main() -> Result<()> { .get_matches(); // Configure the logger. - pretty_env_logger::init_custom_env("SNITCH_LOG"); + pretty_env_logger::init_custom_env("BANSHEE_LOG"); // Initialize the LLVM core. let context = unsafe {