mirror of
https://git.savannah.gnu.org/git/guile.git
synced 2025-05-30 00:40:20 +02:00
JIT counter tweaks
* libguile/vm-engine.c (instrument-entry, instrument-loop): Make the counter check >=, so that we can set the threshold to 0 and still get compilation. * libguile/jit.h (enum scm_jit_counter_value): Make the increments event.
This commit is contained in:
parent
b176e714f8
commit
076c3ad8d7
2 changed files with 7 additions and 4 deletions
|
@ -44,10 +44,13 @@ struct scm_jit_function_data
|
||||||
#endif
|
#endif
|
||||||
};
|
};
|
||||||
|
|
||||||
|
/* These values should be even, so that a function's counter is never
|
||||||
|
0xffffffff, so that setting the JIT threshold to 0xffffffff always
|
||||||
|
disables compilation. */
|
||||||
enum scm_jit_counter_value
|
enum scm_jit_counter_value
|
||||||
{
|
{
|
||||||
SCM_JIT_COUNTER_ENTRY_INCREMENT = 15,
|
SCM_JIT_COUNTER_ENTRY_INCREMENT = 30,
|
||||||
SCM_JIT_COUNTER_LOOP_INCREMENT = 1,
|
SCM_JIT_COUNTER_LOOP_INCREMENT = 2,
|
||||||
};
|
};
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
|
|
|
@ -471,7 +471,7 @@ VM_NAME (scm_thread *thread)
|
||||||
NEXT (0);
|
NEXT (0);
|
||||||
}
|
}
|
||||||
|
|
||||||
if (data->counter > scm_jit_counter_threshold)
|
if (data->counter >= scm_jit_counter_threshold)
|
||||||
{
|
{
|
||||||
const uint8_t *mcode;
|
const uint8_t *mcode;
|
||||||
|
|
||||||
|
@ -722,7 +722,7 @@ VM_NAME (scm_thread *thread)
|
||||||
|
|
||||||
data = (struct scm_jit_function_data *) (ip + data_offset);
|
data = (struct scm_jit_function_data *) (ip + data_offset);
|
||||||
|
|
||||||
if (data->counter > scm_jit_counter_threshold)
|
if (data->counter >= scm_jit_counter_threshold)
|
||||||
{
|
{
|
||||||
const uint8_t *mcode;
|
const uint8_t *mcode;
|
||||||
|
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue