diff options
author | Andy Wingo <wingo@pobox.com> | 2018-08-31 11:28:38 +0200 |
---|---|---|
committer | Andy Wingo <wingo@pobox.com> | 2018-08-31 11:28:38 +0200 |
commit | cc997293e2f8725d0f3699331930b5490b033226 (patch) | |
tree | 0e2b48c0f3ae3a35e7e12cf77cfbe1a41d733177 /libguile/jit.h | |
parent | def671974c64ace851ac019b5cdff2228284310d (diff) | |
download | guile-cc997293e2f8725d0f3699331930b5490b033226.tar.gz |
JIT threshold controlled by environment variable
* libguile/jit.c (scm_jit_counter_threshold): Make a static variable
instead of a compile-time constant.
(scm_init_jit): Init scm_jit_counter_threshold from
GUILE_JIT_COUNTER_THRESHOLD environment variable. Default is -1
indicating "never JIT".
* libguile/vm-engine.c (instrument-entry, instrument-loop): Adapt to new
variable.
Diffstat (limited to 'libguile/jit.h')
-rw-r--r-- | libguile/jit.h | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/libguile/jit.h b/libguile/jit.h index ae5c9da21..a1863c2c0 100644 --- a/libguile/jit.h +++ b/libguile/jit.h @@ -48,10 +48,11 @@ enum scm_jit_counter_value { SCM_JIT_COUNTER_ENTRY_INCREMENT = 15, SCM_JIT_COUNTER_LOOP_INCREMENT = 1, - SCM_JIT_COUNTER_THRESHOLD = 50 }; #endif +SCM_INTERNAL uint32_t scm_jit_counter_threshold; + SCM_INTERNAL const uint8_t *scm_jit_compute_mcode (scm_thread *thread, struct scm_jit_function_data *data); SCM_INTERNAL void scm_jit_enter_mcode (scm_thread *thread, |