Граф коммитов

23 Коммитов

Автор SHA1 Сообщение Дата
k0kubun 50f2520b1f mjit_worker.c: clean up all unnecessary files on mswin
test_jit.rb: passed all MJIT tests.


git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@64945 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2018-10-07 15:09:58 +00:00
k0kubun ceab2821a0 mjit_worker.c: don't suppress cl.exe logs
on --jit-verbose=2+.


git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@64944 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2018-10-07 14:51:53 +00:00
k0kubun b62c1a22b3 mjit_worker.c: print warning if FreeLibrary fails
because somehow AppVeyor fails to remove so file by Permission Deined.


git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@64939 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2018-10-07 12:28:46 +00:00
k0kubun 77a682a3dd mjit_worker.c: clean up .obj file on mswin
prior to this commit, .obj file is generated on current directory and nobody deletes that.
This changes it to make sure it's generated to temporary directory and removes that.



git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@64934 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2018-10-07 08:03:36 +00:00
nobu 7e9ee35fb8 Remove -Wno-parentheses flag.
[Fix GH-1958]

From: Jun Aruga <jaruga@redhat.com>

git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@64806 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2018-09-21 10:19:10 +00:00
k0kubun 9f6e9b40d3 mjit_worker.c: atomically print main message and \n
To attempt to fix CI failure on rubyci freebsd:
https://rubyci.org/logs/rubyci.s3.amazonaws.com/freebsd11zfs/ruby-trunk/log/20180911T123001Z.fail.html.gz

```
JIT success (68.7ms): mjit9@(eval):1 -> /usr/home/hsbt/chkbuild/tmp/build/20180911T123001Z/tmp/jit_test_unload_units_20180911-96427-13cagj9/_ruby_mjit_p99188u9.c
JIT compaction (25.1ms): Compacted 10 methods -> /usr/home/hsbt/chkbuild/tmp/build/20180911T123001Z/tmp/jit_test_unload_units_20180911-96427-13cagj9/_ruby_mjit_p99188u10.soToo many JIT code -- 1 units unloaded

JIT success (68.2ms): mjit10@(eval):1 -> /usr/home/hsbt/chkbuild/tmp/build/20180911T123001Z/tmp/jit_test_unload_units_20180911-96427-13cagj9/_ruby_mjit_p99188u11.c
```

git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@64686 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2018-09-11 14:38:05 +00:00
k0kubun b173fc92c0 mjit_worker.c: revert r64322 and r64323
I gave up to introduce the optimization that skips pc motion by checking
C code's line number. The same code can often be shared by multiple
program counters and it's so hard to achieve the optimization in MJIT's
architecture.

Reverting to improve performance by removing -g1 and to remove so file
when it becomes not necessary.

git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@64424 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2018-08-18 01:10:03 +00:00
k0kubun 0ab6266c9d Makefile.in: drop MJIT_DLDFLAGS_NOCOMPRESS
which is obsoleted by r64331

git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@64335 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2018-08-13 11:02:37 +00:00
k0kubun 422f4e3e1b configure.ac: MJIT_DLDFLAGS_NOCOMPRESS
is configured now, to force -Wl,--compress-debug-sections=no
for MJIT only when the option is used in MJIT_DLDFLAGS.

This needs to be done in configure.ac to resolve build failure like
https://travis-ci.org/ruby/ruby/builds/415120662.

Makefile.in: define it in mjit_config.h

mjit_worker.c: replace hard-coded flag to MJIT_DLDFLAGS_NOCOMPRESS

git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@64325 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2018-08-12 15:13:06 +00:00
k0kubun 7e478ba366 mjit_worker.c: lazily delete so file
on ELF.

I need symbol name and line number to lazily create program counter for
optimization on ELF binary.

git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@64323 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2018-08-12 15:00:03 +00:00
k0kubun bd789fa590 mjit_worker.c: allow showing line number
on addr2line.c, if --jit-save-temps is specified.

I'm going to use the line number to lazily create program counter to
improve the performance degraded in r64283.

git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@64322 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2018-08-12 14:42:25 +00:00
k0kubun 69bfb6d850 mjit_worker.c: remove redundant cast for calloc/alloca
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@64305 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2018-08-11 14:36:14 +00:00
k0kubun 5cd84d247f mjit_worker.c: handle calloc failure
Unlike ZALLOC, it's not automatically handled.

mjit.c: ditto

git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@64304 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2018-08-11 14:34:05 +00:00
k0kubun 1b157084a4 mjit_worker.c: never trigger GC on MJIT worker
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@64302 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2018-08-11 14:27:53 +00:00
k0kubun 004b8ad0c3 mjit_worker.c: don't use ruby_strdup
on MJIT worker. That may trigger GC. And handled strdup failure instead.

mjit_compile.c: update comment about GC

git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@64301 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2018-08-11 14:18:55 +00:00
k0kubun d9260c5a50 mjit_worker.c: share MJIT warning logic
as mjit_warning().

mjit.c: ditto

git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@64298 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2018-08-11 14:05:34 +00:00
k0kubun 3d2e7b6158 mjit_worker.c: resurrect more static declarations
and remove old mjit_ prefixes again.

mjit.c: ditto

git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@64292 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2018-08-11 10:05:56 +00:00
k0kubun cfe7f7ca7e mjit_worker.c: reorder functions and variables
so that related things are placed closely.

Sorry for mixing them in previous commits...

git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@64291 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2018-08-11 09:58:20 +00:00
k0kubun 3c442229d6 mjit.c: make some variables static again
and remove redundant mjit_ prefixes.

mjit_worker.c: ditto

git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@64290 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2018-08-11 09:48:07 +00:00
k0kubun a48d1d7991 mjit.c: include mjit_worker.c
instead of linking functions with mjit_worker.o.

In the r64285's structure, we needed to publish some variables with
mjit_ prefix. But ideally those variables should be completely private
in mjit.o (or old mjit_worker.o), and it was hard.

So I chose an approach similar to vm*.c for mjit.c and mjit_worker.c.
I believe mjit_compile.c is still nice to be separated.

After this commit, I'll remove the mjit_ prefix again...

git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@64289 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2018-08-11 09:37:14 +00:00
k0kubun 6306aa9222 mjit.c: exclude mjit_valid_class_serial_p
from mjit.c because it's executed only on MJIT worker thread.

Instead of that, `valid_class_serials` is shared with mjit_ prefix.

git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@64288 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2018-08-11 08:34:25 +00:00
k0kubun b2e0d54024 mjit_worker.c: prefix mjit_ to pch_status
which was just forgotten.

mjit.c: ditto

mjit_internal.h: moved some macros only used by mjit_worker.c to it.

git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@64287 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2018-08-11 08:07:13 +00:00
k0kubun ddcb40f595 mjit_worker.c: carve out worker-related code
The motivation of this change is to make sure rb_funcall or GC-related
functions are not called on worker-related code. Currently such
functions are used in some places and I believe it's partly because it's
hard to identify which part is called on MJIT worker thread.

Now, mjit.c is safe to use them but we know we need to safely deal with
mjit_compile.c, mjit_worker.c and mjit_internal.h.

mjit_compile.c: update the comment about it

git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@64285 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2018-08-11 07:57:58 +00:00