ruby-changes:61158
From: Nobuyoshi <ko1@a...>
Date: Sat, 9 May 2020 13:47:44 +0900 (JST)
Subject: [ruby-changes:61158] 5eb446d12f (master): mjit_worker.c: compile_compact_jit_code is not used on mingw
https://git.ruby-lang.org/ruby.git/commit/?id=5eb446d12f From 5eb446d12f3b6cffd2687fe2c472cbc3374aacf4 Mon Sep 17 00:00:00 2001 From: Nobuyoshi Nakada <nobu@r...> Date: Sat, 9 May 2020 13:46:47 +0900 Subject: mjit_worker.c: compile_compact_jit_code is not used on mingw diff --git a/mjit_worker.c b/mjit_worker.c index cebb9ce..a839c80 100644 --- a/mjit_worker.c +++ b/mjit_worker.c @@ -896,6 +896,13 @@ compile_c_to_so(const char *c_file, const char *so_file) https://github.com/ruby/ruby/blob/trunk/mjit_worker.c#L896 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 compile_compact_jit_code(char* c_file) { @@ -918,13 +925,14 @@ compile_compact_jit_code(char* c_file) https://github.com/ruby/ruby/blob/trunk/mjit_worker.c#L925 fclose(f); return true; } +# endif // USE_HEADER_TRANSFORMATION // 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. static 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; double start_time, end_time; static const char c_ext[] = ".c"; @@ -993,7 +1001,7 @@ compact_all_jit_code(void) https://github.com/ruby/ruby/blob/trunk/mjit_worker.c#L1001 free(unit); verbose(1, "JIT compaction failure (%.1fms): Failed to compact methods", end_time - start_time); } -# endif // _WIN32 +# endif // USE_HEADER_TRANSFORMATION } #endif // _MSC_VER -- cgit v0.10.2 -- ML: ruby-changes@q... Info: http://www.atdot.net/~ko1/quickml/