aboutsummaryrefslogtreecommitdiffstats
path: root/win32/mkexports.rb
Commit message (Collapse)AuthorAgeFilesLines
* win32/mkexports.rb: do not export internal symbolsNobuyoshi Nakada2020-05-121-1/+1
| | | | | Functions using `rb_thread_t` and `rb_execution_context_t` are internal use only.
* Do not export InitVM functionsNobuyoshi Nakada2019-05-171-1/+1
|
* mkexports.rb: flip-flopnobu2018-07-291-1/+7
| | | | | | | * win32/mkexports.rb (Exports::Mswin#each_export): get rid of flip-flop warning. [ruby-core:88147] [Bug #14946] git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@64095 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* mjit_compile.c: merge initial JIT compilerk0kubun2018-02-041-1/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | which has been developed by Takashi Kokubun <takashikkbn@gmail> as YARV-MJIT. Many of its bugs are fixed by wanabe <s.wanabe@gmail.com>. This JIT compiler is designed to be a safe migration path to introduce JIT compiler to MRI. So this commit does not include any bytecode changes or dynamic instruction modifications, which are done in original MJIT. This commit even strips off some aggressive optimizations from YARV-MJIT, and thus it's slower than YARV-MJIT too. But it's still fairly faster than Ruby 2.5 in some benchmarks (attached below). Note that this JIT compiler passes `make test`, `make test-all`, `make test-spec` without JIT, and even with JIT. Not only it's perfectly safe with JIT disabled because it does not replace VM instructions unlike MJIT, but also with JIT enabled it stably runs Ruby applications including Rails applications. I'm expecting this version as just "initial" JIT compiler. I have many optimization ideas which are skipped for initial merging, and you may easily replace this JIT compiler with a faster one by just replacing mjit_compile.c. `mjit_compile` interface is designed for the purpose. common.mk: update dependencies for mjit_compile.c. internal.h: declare `rb_vm_insn_addr2insn` for MJIT. vm.c: exclude some definitions if `-DMJIT_HEADER` is provided to compiler. This avoids to include some functions which take a long time to compile, e.g. vm_exec_core. Some of the purpose is achieved in transform_mjit_header.rb (see `IGNORED_FUNCTIONS`) but others are manually resolved for now. Load mjit_helper.h for MJIT header. mjit_helper.h: New. This is a file used only by JIT-ed code. I'll refactor `mjit_call_cfunc` later. vm_eval.c: add some #ifdef switches to skip compiling some functions like Init_vm_eval. win32/mkexports.rb: export thread/ec functions, which are used by MJIT. include/ruby/defines.h: add MJIT_FUNC_EXPORTED macro alis to clarify that a function is exported only for MJIT. array.c: export a function used by MJIT. bignum.c: ditto. class.c: ditto. compile.c: ditto. error.c: ditto. gc.c: ditto. hash.c: ditto. iseq.c: ditto. numeric.c: ditto. object.c: ditto. proc.c: ditto. re.c: ditto. st.c: ditto. string.c: ditto. thread.c: ditto. variable.c: ditto. vm_backtrace.c: ditto. vm_insnhelper.c: ditto. vm_method.c: ditto. I would like to improve maintainability of function exports, but I believe this way is acceptable as initial merging if we clarify the new exports are for MJIT (so that we can use them as TODO list to fix) and add unit tests to detect unresolved symbols. I'll add unit tests of JIT compilations in succeeding commits. Author: Takashi Kokubun <takashikkbn@gmail.com> Contributor: wanabe <s.wanabe@gmail.com> Part of [Feature #14235] --- * Known issues * Code generated by gcc is faster than clang. The benchmark may be worse in macOS. Following benchmark result is provided by gcc w/ Linux. * Performance is decreased when Google Chrome is running * JIT can work on MinGW, but it doesn't improve performance at least in short running benchmark. * Currently it doesn't perform well with Rails. We'll try to fix this before release. --- * Benchmark reslts Benchmarked with: Intel 4.0GHz i7-4790K with 16GB memory under x86-64 Ubuntu 8 Cores - 2.0.0-p0: Ruby 2.0.0-p0 - r62186: Ruby trunk (early 2.6.0), before MJIT changes - JIT off: On this commit, but without `--jit` option - JIT on: On this commit, and with `--jit` option ** Optcarrot fps Benchmark: https://github.com/mame/optcarrot | |2.0.0-p0 |r62186 |JIT off |JIT on | |:--------|:--------|:--------|:--------|:--------| |fps |37.32 |51.46 |51.31 |58.88 | |vs 2.0.0 |1.00x |1.38x |1.37x |1.58x | ** MJIT benchmarks Benchmark: https://github.com/benchmark-driver/mjit-benchmarks (Original: https://github.com/vnmakarov/ruby/tree/rtl_mjit_branch/MJIT-benchmarks) | |2.0.0-p0 |r62186 |JIT off |JIT on | |:----------|:--------|:--------|:--------|:--------| |aread |1.00 |1.09 |1.07 |2.19 | |aref |1.00 |1.13 |1.11 |2.22 | |aset |1.00 |1.50 |1.45 |2.64 | |awrite |1.00 |1.17 |1.13 |2.20 | |call |1.00 |1.29 |1.26 |2.02 | |const2 |1.00 |1.10 |1.10 |2.19 | |const |1.00 |1.11 |1.10 |2.19 | |fannk |1.00 |1.04 |1.02 |1.00 | |fib |1.00 |1.32 |1.31 |1.84 | |ivread |1.00 |1.13 |1.12 |2.43 | |ivwrite |1.00 |1.23 |1.21 |2.40 | |mandelbrot |1.00 |1.13 |1.16 |1.28 | |meteor |1.00 |2.97 |2.92 |3.17 | |nbody |1.00 |1.17 |1.15 |1.49 | |nest-ntimes|1.00 |1.22 |1.20 |1.39 | |nest-while |1.00 |1.10 |1.10 |1.37 | |norm |1.00 |1.18 |1.16 |1.24 | |nsvb |1.00 |1.16 |1.16 |1.17 | |red-black |1.00 |1.02 |0.99 |1.12 | |sieve |1.00 |1.30 |1.28 |1.62 | |trees |1.00 |1.14 |1.13 |1.19 | |while |1.00 |1.12 |1.11 |2.41 | ** Discourse's script/bench.rb Benchmark: https://github.com/discourse/discourse/blob/v1.8.7/script/bench.rb NOTE: Rails performance was somehow a little degraded with JIT for now. We should fix this. (At least I know opt_aref is performing badly in JIT and I have an idea to fix it. Please wait for the fix.) *** JIT off Your Results: (note for timings- percentile is first, duration is second in millisecs) categories_admin: 50: 17 75: 18 90: 22 99: 29 home_admin: 50: 21 75: 21 90: 27 99: 40 topic_admin: 50: 17 75: 18 90: 22 99: 32 categories: 50: 35 75: 41 90: 43 99: 77 home: 50: 39 75: 46 90: 49 99: 95 topic: 50: 46 75: 52 90: 56 99: 101 *** JIT on Your Results: (note for timings- percentile is first, duration is second in millisecs) categories_admin: 50: 19 75: 21 90: 25 99: 33 home_admin: 50: 24 75: 26 90: 30 99: 35 topic_admin: 50: 19 75: 20 90: 25 99: 30 categories: 50: 40 75: 44 90: 48 99: 76 home: 50: 42 75: 48 90: 51 99: 89 topic: 50: 49 75: 55 90: 58 99: 99 git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@62197 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* Localize EC functionsnobu2017-10-281-1/+1
| | | | git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@60533 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* Fixed link error with VC14.usa2016-12-141-1/+1
| | | | | | | | | * win32/mkexports.rb (Exports::Mswin#each_exports): should ignore `vsprintf_s_l` and the like just like `vsprintf_l`. [ruby-dev:49899] [Bug #13033] git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@57079 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* Support MSVC14 and 15 [Bug #11118]naruse2016-04-231-0/+1
| | | | | | | Search _pioinfo which is not exported after MSVC14. [Bug #12014] [GH-884] git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@54737 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* Makefile.in: make static IDs symbols localnobu2015-02-231-2/+4
| | | | | | | * Makefile.in (LIBRUBY_SO): make symbols for static IDs which begin with ruby_static_id_ local too. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@49699 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* * win32/mkexports.rb (each_export): skip garbages generated by VS2012'susa2012-11-121-1/+1
| | | | | | | | nmake. reported and patched by Yoshida Masato at [Bug #7333] [ruby-dev:46484] git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@37625 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* * win32/mkexports.rb: should not export DllMain().usa2012-07-271-2/+2
| | | | | | | | reported by luis at [ruby-core:46743] [Bug #6790], solved by Heesob Park, and confirmed by nobu. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@36544 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* * win32/mkexports.rb (Exports#initialize): remove old symbol name.usa2011-11-281-1/+0
| | | | git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@33880 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* * win32/mkexports.rb (Exports#read_substitution): need to readnobu2011-11-281-6/+11
| | | | | | from subst.h too. [Bug #5675] git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@33879 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* * win32/mkexports.rb (Exports::Mswin#each_export): exclude Init_nobu2011-08-161-1/+2
| | | | | | | and _threadptr_ functions, as well as mingw. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@32985 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* * configure.in (SYMBOL_PREFIX): separate from EXPORT_PREFIX.nobu2010-11-111-1/+4
| | | | | | * win32/mkexports.rb (Exports#each_export): use SYMBOL_PREFIX. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@29739 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* * cygwin/GNUmakefile.in (scriptbin): make executable file fromnobu2010-11-091-0/+1
| | | | | | | | | | | | | scripts with stub. * ruby.c (load_file_internal): assume xflag for exe file as well as no-shebang file. * tool/rbinstall.rb: install script programs. * win32/mkexports.rb (Exports#initialize): alias ruby_sysinit for stub. * win32/stub.c: stub for scripts. [EXPERIMENTAL] git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@29738 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* * win32/mkexports.rb: revert r29320 and r29402.wanabe2010-10-051-4/+1
| | | | git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@29411 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* * tool/config.sub: revert r29320, r29324, r29347, r29354, r29365wanabe2010-10-031-10/+2
| | | | | | | | | to automake-1.11.1. [ruby-core:32634] * win32/mkexports.rb: no longer use 'mingw64'. a patch from Luis Lavena at [ruby-core:32678]. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@29402 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* * tool/config.sub: add mingw64.wanabe2010-09-231-1/+12
| | | | | | | | * win32/mkexports.rb (Exports::Mingw64): added. * win32/mkexports.rb (Exports::Mingw32): renamed from Exports::Mingw. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@29320 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* * win32/mkexports.rb (each_export): VC10 support.usa2010-04-051-1/+1
| | | | | | | a patch from Charlie Savage in [ruby-core:29254] git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@27220 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* * include/ruby/ruby.h: replace snprintf and vsnprintf bynaruse2010-04-041-2/+2
| | | | | | | | | | | | | | | | | | | | ruby_snprintf and ruby_vsnprintf. [ruby-dev:40909] * configure.in: don't check snprintf(3) and vsnprintf(3). * include/ruby/missing.h: don't delare snprintf and vsnprintf. * include/ruby/ruby.h: include stdarg.h. * sprintf.c: include vsnprintf.c * vsnprintf.c: renamed from missing/vsnprintf.c. * vsnprintf.c: remove useless ifdefs. * win32/mkexports.rb: use ruby_snprintf and ruby_vsnprintf. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@27214 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* * common.mk (COMPILE_PRELUDE): rbconfig is loaded on demand.nobu2010-02-081-1/+1
| | | | | | | | * tool/eval.rb, win32/{mkexports,resource}.rb: miniruby no longer contains "." in $:. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@26618 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* * configure.in, Makefile.in (LIBRUBY_SO), common.mk (ruby.imp),nobu2009-10-101-1/+1
| | | | | | | win32/mkexports.rb (each_export): exclude _threadptr_ functions. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@25284 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* * win32/mkexports.rb: rbconfig.rb exists on ".".usa2009-06-241-1/+1
| | | | git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@23838 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* * win32/mkexports.rb: shouldn't export DllMain.usa2009-02-041-2/+3
| | | | | | | | reported at http://pc11.2ch.net/test/read.cgi/tech/1233686068/21 git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@22025 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* * cygwin/GNUmakefile.in (RUBYDEF): uses mkexports.rb on cygwin too.nobu2009-02-021-4/+10
| | | | | | | * win32/mkexports.rb (Exports::Cygwin): added. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@21989 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* * cygwin/GNUmakefile.in (RUBYDEF): needs DATA marks to exportnobu2009-01-271-1/+1
| | | | | | | | | non-function symbols. [ruby-core:21582] * win32/mkexports.rb (Exports::Mingw#each_export): ditto. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@21795 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* * Makefile.in (miniruby): renames and then removes, to get rid ofnobu2009-01-201-5/+1
| | | | | | | | | | | | | | | | | EPERM on cygwin and mingw. * Makefile.in ($(LIBRUBY_SO)): use wildcard option of objcopy. * configure.in (DLDFLAGS): do not export all symbols. * cygwin/GNUmakefile.in (RUBYDEF): rejects symbols prefixex with Init_. * win32/mkexports.rb (Exports::Mingw): includes all symbols except for prefixed with Init_ as well as mswin32. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@21685 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* * cygwin/GNUmakefile.in (rubydll.def), win32/mkexports.rbnobu2008-12-221-0/+5
| | | | | | | (Exports#exports): added VERSION. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@20912 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* * configure.in (mingw): no longer uses snprintf and vsnprintf ofnobu2008-12-221-0/+2
| | | | | | | | | | | | | | | | | | msvcrt. * win32/win32.c (rb_w32_vsnprintf, rb_w32_snprintf): removed. * win32/Makefile.sub (config.h): vsnprintf exists in VC7 or later. * win32/mkexports.rb (Exports#initialize): aliases rb_w32_vsnprintf and rb_w32_snprintf for binary compatibility. * sprintf.c (rb_str_format): uses snprintf instead of sprintf. * numeric.c (flo_to_s, rb_num2long, rb_num2ll): ditto. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@20909 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* * win32/mkexports.rb (Exports#objdump, Exports#each_line): extracted.nobu2008-05-281-22/+38
| | | | git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@16669 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* * win32/mkexports.rb (Exports::Mswin#each_export): speed up.usa2008-05-281-0/+1
| | | | git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@16667 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* * win32/mkexports.rb: deal with __fastcall name decorations.nobu2007-10-131-3/+3
| | | | | | | [ruby-list:44111] git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@13694 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* * {bcc,win}32/mkexports.rb: explicit data. [ruby-list:44108]nobu2007-10-131-3/+4
| | | | git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@13688 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* * main.c (main): use platform-independent per-process initialization.nobu2007-09-291-0/+1
| | | | | | | | | | | | | | | | [ruby-dev:31900] * ruby.c (ruby_sysinit): new function for per-process initialization. * include/ruby/ruby.h (RUBY_GLOBAL_SETUP): toplevel setup declaration. * include/ruby/win32.h, win32/mkexports.rb: alias NtInitialize ruby_sysinit. * win32/win32.c (rb_w32_sysinit): renamed from NtInitialize. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@13569 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* * include/ruby/win32.h, win32/Makefile.sub, win32/configure.bat,usa2007-06-271-1/+1
| | | | | | | | | win32/mkexports.rb, win32/setup.mak, win32/win32.c: import x64-mswin64 port. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@12635 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* * include/ruby: moved public headers.nobu2007-06-101-2/+2
| | | | git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@12501 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* * instruby.rb, mkconfig.rb, rubytest.rb, bcc32/mkexports.rb, ↵nobu2006-12-211-0/+0
| | | | | | win32/{resource,mkexports}.rb: set executable. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@11411 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* * win32/mkexports.rb, win32/resource.rb: use unique variable names.nobu2006-10-241-3/+1
| | | | git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@11214 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* * Makefile.in, win32/Makefile.sub (MINIRUBY): append MINIRUBYOPT.nobu2006-09-081-1/+3
| | | | | | | | | | * mkconfig.rb, ext/extmk.rb, lib/mkmf.rb, win32/mkexports.rb: suppress warnings with $VERBOSE. * win32/resource.rb: only file which has more than one icon is DLL. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@10891 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* * mkconfig.rb: generate RbConfig instead of Config.akr2006-02-201-2/+2
| | | | | | | | | | | | | | | * instruby.rb, rubytest.rb, runruby.rb, bcc32/Makefile.sub, ext/extmk.rb, ext/dl/extconf.rb, ext/iconv/charset_alias.rb, lib/mkmf.rb, lib/rdoc/ri/ri_paths.rb, lib/webrick/httpservlet/cgihandler.rb, test/dbm/test_dbm.rb, test/gdbm/test_gdbm.rb, test/ruby/envutil.rb, test/soap/calc/test_calc_cgi.rb, test/soap/header/test_authheader_cgi.rb, test/soap/ssl/test_ssl.rb, win32/mkexports.rb, win32/resource.rb: Use RbConfig instead of Config. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@9970 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* * configure.in, cygwin/GNUmakefile.in (mingw): use def file to aliasnobu2005-11-051-23/+127
| | | | | | | | | | | | symbols. [ruby-dev:27532] * bcc32/mkexports.rb, win32/mkexports.rb: make aliases in DLL. * win32/win32.c, win32/win32.h: replace symbols only when RUBY_EXPORT is defined. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@9502 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* * win32/mkexports.rb: remove unnecessary exports. (ruby-dev:17418)usa2002-06-181-1/+1
| | | | git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@2581 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* * win32/mkexports.rb: support VC++.NET.usa2002-03-261-1/+1
| | | | git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@2284 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* * win32/mkexports.rb: follow the change of rb_io_puts().usa2001-10-301-2/+2
| | | | git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@1804 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* matz - add/remove filesmatz2000-08-031-0/+30
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@873 b2dd03c8-39d4-4d8f-98ff-823fe69b080e