diff options
-rw-r--r-- | mjit.c | 13 | ||||
-rw-r--r-- | ruby.c | 4 |
2 files changed, 8 insertions, 9 deletions
@@ -563,13 +563,12 @@ system_tmpdir(void) # undef RETURN_ENV } -/* Default permitted number of units with a JIT code kept in - memory. */ -#define DEFAULT_CACHE_SIZE 1000 -/* A default threshold used to add iseq to JIT. */ -#define DEFAULT_MIN_CALLS_TO_ADD 5 -/* Minimum value for JIT cache size. */ +// Minimum value for JIT cache size. #define MIN_CACHE_SIZE 10 +// Default permitted number of units with a JIT code kept in memory. +#define DEFAULT_MAX_CACHE_SIZE 100 +// A default threshold used to add iseq to JIT. +#define DEFAULT_MIN_CALLS_TO_ADD 10000 /* Start MJIT worker. Return TRUE if worker is sucessfully started. */ static bool @@ -605,7 +604,7 @@ mjit_init(struct mjit_options *opts) if (mjit_opts.min_calls == 0) mjit_opts.min_calls = DEFAULT_MIN_CALLS_TO_ADD; if (mjit_opts.max_cache_size <= 0) - mjit_opts.max_cache_size = DEFAULT_CACHE_SIZE; + mjit_opts.max_cache_size = DEFAULT_MAX_CACHE_SIZE; if (mjit_opts.max_cache_size < MIN_CACHE_SIZE) mjit_opts.max_cache_size = MIN_CACHE_SIZE; @@ -287,8 +287,8 @@ usage(const char *name, int help) M("--jit-wait", "", "Wait until JIT compilation is finished everytime (for testing)"), M("--jit-save-temps", "", "Save JIT temporary files in $TMP or /tmp (for testing)"), M("--jit-verbose=num", "", "Print JIT logs of level num or less to stderr (default: 0)"), - M("--jit-max-cache=num", "", "Max number of methods to be JIT-ed in a cache (default: 1000)"), - M("--jit-min-calls=num", "", "Number of calls to trigger JIT (for testing, default: 5)"), + M("--jit-max-cache=num", "", "Max number of methods to be JIT-ed in a cache (default: 100)"), + M("--jit-min-calls=num", "", "Number of calls to trigger JIT (for testing, default: 10000)"), }; int i; const int num = numberof(usage_msg) - (help ? 1 : 0); |