mirror of
https://github.com/ruby/ruby.git
synced 2022-11-09 12:17:21 -05:00
mjit_worker.c: compile_compact_jit_code is not used on mingw
This commit is contained in:
parent
1181edd54c
commit
5eb446d12f
1 changed files with 10 additions and 2 deletions
|
@ -896,6 +896,13 @@ compile_c_to_so(const char *c_file, const char *so_file)
|
||||||
|
|
||||||
static void compile_prelude(FILE *f);
|
static void compile_prelude(FILE *f);
|
||||||
|
|
||||||
|
# ifndef _WIN32 // This requires header transformation but we don't transform header on Windows for now
|
||||||
|
# define USE_HEADER_TRANSFORMATION 1
|
||||||
|
# else
|
||||||
|
# define USE_HEADER_TRANSFORMATION 0
|
||||||
|
# endif
|
||||||
|
|
||||||
|
# if USE_HEADER_TRANSFORMATION
|
||||||
static bool
|
static bool
|
||||||
compile_compact_jit_code(char* c_file)
|
compile_compact_jit_code(char* c_file)
|
||||||
{
|
{
|
||||||
|
@ -918,13 +925,14 @@ compile_compact_jit_code(char* c_file)
|
||||||
fclose(f);
|
fclose(f);
|
||||||
return true;
|
return true;
|
||||||
}
|
}
|
||||||
|
# endif // USE_HEADER_TRANSFORMATION
|
||||||
|
|
||||||
// Compile all cached .c files and build a single .so file. Reload all JIT func from it.
|
// Compile all cached .c files and build a single .so file. Reload all JIT func from it.
|
||||||
// This improves the code locality for better performance in terms of iTLB and iCache.
|
// This improves the code locality for better performance in terms of iTLB and iCache.
|
||||||
static void
|
static void
|
||||||
compact_all_jit_code(void)
|
compact_all_jit_code(void)
|
||||||
{
|
{
|
||||||
# ifndef _WIN32 // This requires header transformation but we don't transform header on Windows for now
|
# if USE_HEADER_TRANSFORMATION
|
||||||
struct rb_mjit_unit *unit, *cur = 0;
|
struct rb_mjit_unit *unit, *cur = 0;
|
||||||
double start_time, end_time;
|
double start_time, end_time;
|
||||||
static const char c_ext[] = ".c";
|
static const char c_ext[] = ".c";
|
||||||
|
@ -993,7 +1001,7 @@ compact_all_jit_code(void)
|
||||||
free(unit);
|
free(unit);
|
||||||
verbose(1, "JIT compaction failure (%.1fms): Failed to compact methods", end_time - start_time);
|
verbose(1, "JIT compaction failure (%.1fms): Failed to compact methods", end_time - start_time);
|
||||||
}
|
}
|
||||||
# endif // _WIN32
|
# endif // USE_HEADER_TRANSFORMATION
|
||||||
}
|
}
|
||||||
|
|
||||||
#endif // _MSC_VER
|
#endif // _MSC_VER
|
||||||
|
|
Loading…
Add table
Reference in a new issue