aboutsummaryrefslogtreecommitdiffstats
path: root/common.mk
Commit message (Collapse)AuthorAgeFilesLines
* cancel theap on multi-ractorsKoichi Sasada2020-12-071-0/+1
| | | | | | | accessing theap needs complicating synchronization but it reduce performance on multi-ractor mode. So simply stop using theap on multi-ractor mode. In future, theap should be replaced with more cleaver memory strategy.
* Moved update-bundled_gems code to a toolNobuyoshi Nakada2020-12-061-10/+1
|
* Proposed method for dealing with stack locals which have non-local lifetime.Samuel Williams2020-12-051-0/+1
|
* test-bundled-gems: select bundled gems to test by BUNDLED_GEMSNobuyoshi Nakada2020-12-021-1/+2
|
* ractor local storage C-APIKoichi Sasada2020-12-011-0/+1
| | | | | | | | | | | | | | | | | | | | | | To manage ractor-local data for C extension, the following APIs are defined. * rb_ractor_local_storage_value_newkey * rb_ractor_local_storage_value * rb_ractor_local_storage_value_set * rb_ractor_local_storage_ptr_newkey * rb_ractor_local_storage_ptr * rb_ractor_local_storage_ptr_set At first, you need to create a key of storage by rb_ractor_local_(value|ptr)_newkey(). For ptr storage, it accepts the type of storage, how to mark and how to free with ractor's lifetime. rb_ractor_local_storage_value/set are used to access a VALUE and rb_ractor_local_storage_ptr/set are used to access a pointer. random.c uses this API.
* Clean temproray directory created by test-specNobuyoshi Nakada2020-11-301-0/+1
|
* Clean static-rubyNobuyoshi Nakada2020-11-301-1/+1
|
* Keep references of memory-view-exported objects (#3816)Kenta Murata2020-11-301-0/+1
| | | | | | | | | * memory_view.c: remove a reference in view->obj at rb_memory_view_release * memory_view.c: keep references of memory-view-exported objects * Update common.mk * memory_view.c: Use st_update
* Make --disable-jit-support compileTakashi Kokubun2020-11-221-0/+1
| | | | | | vm_core.h needs to be included to know rb_execution_context_t, etc. I also added a trivial refactoring in mjit.c and missing dependency for process.c.
* Combine mjit.h and internal/mjit.hTakashi Kokubun2020-11-221-5/+1
| | | | It's very hard to remember which mjit.h has what.
* dist: added DISTOPTS and PKGSDIRNobuyoshi Nakada2020-11-221-1/+2
|
* fix public interfaceKoichi Sasada2020-11-181-15/+13
| | | | | | | | | | | | | | | | | | To make some kind of Ractor related extensions, some functions should be exposed. * include/ruby/thread_native.h * rb_native_mutex_* * rb_native_cond_* * include/ruby/ractor.h * RB_OBJ_SHAREABLE_P(obj) * rb_ractor_shareable_p(obj) * rb_ractor_std*() * rb_cRactor and rm ractor_pub.h and rename srcdir/ractor.h to srcdir/ractor_core.h (to avoid conflict with include/ruby/ractor.h)
* Update dependenciesSamuel Williams2020-11-071-0/+24
|
* Include c_escape.rb in COMPILE_PRELUDENobuyoshi Nakada2020-10-261-1/+2
| | | | template/prelude.c.tmpl requires tool/ruby_vm/helpers/c_escape.rb.
* Ractor.make_shareable(obj)Koichi Sasada2020-10-211-0/+9
| | | | | | | | | | | | | | | | | | | | | | | | | | Introduce new method Ractor.make_shareable(obj) which tries to make obj shareable object. Protocol is here. (1) If obj is shareable, it is shareable. (2) If obj is not a shareable object and if obj can be shareable object if it is frozen, then freeze obj. If obj has reachable objects (rs), do rs.each{|o| Ractor.make_shareable(o)} recursively (recursion is not Ruby-level, but C-level). (3) Otherwise, raise Ractor::Error. Now T_DATA is not a shareable object even if the object is frozen. If the method finished without error, given obj is marked as a sharable object. To allow makng a shareable frozen T_DATA object, then set `RUBY_TYPED_FROZEN_SHAREABLE` as type->flags. On default, this flag is not set. It means user defined T_DATA objects are not allowed to become shareable objects when it is frozen. You can make any object shareable by setting FL_SHAREABLE flag, so if you know that the T_DATA object is shareable (== thread-safe), set this flag, at creation time for example. `Ractor` object is one example, which is not a frozen, but a shareable object.
* Some global variables can be accessed from ractorsKoichi Sasada2020-10-201-0/+3
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Some global variables should be used from non-main Ractors. [Bug #17268] ```ruby # ractor-local (derived from created ractor): debug '$DEBUG' => $DEBUG, '$-d' => $-d, # ractor-local (derived from created ractor): verbose '$VERBOSE' => $VERBOSE, '$-w' => $-w, '$-W' => $-W, '$-v' => $-v, # process-local (readonly): other commandline parameters '$-p' => $-p, '$-l' => $-l, '$-a' => $-a, # process-local (readonly): getpid '$$' => $$, # thread local: process result '$?' => $?, # scope local: match '$~' => $~.inspect, '$&' => $&, '$`' => $`, '$\'' => $', '$+' => $+, '$1' => $1, # scope local: last line '$_' => $_, # scope local: last backtrace '$@' => $@, '$!' => $!, # ractor local: stdin, out, err '$stdin' => $stdin.inspect, '$stdout' => $stdout.inspect, '$stderr' => $stderr.inspect, ```
* Bundle typeprof gem as bundled gemsYusuke Endoh2020-10-201-1/+1
|
* sync RClass::ext::iv_index_tblKoichi Sasada2020-10-171-0/+1
| | | | | | | | | | | | iv_index_tbl manages instance variable indexes (ID -> index). This data structure should be synchronized with other ractors so introduce some VM locks. This patch also introduced atomic ivar cache used by set/getinlinecache instructions. To make updating ivar cache (IVC), we changed iv_index_tbl data structure to manage (ID -> entry) and an entry points serial and index. IVC points to this entry so that cache update becomes atomically.
* sync generic_ivtblKoichi Sasada2020-10-141-0/+1
| | | | | | | | | generic_ivtbl is a process global table to maintain instance variables for non T_OBJECT/T_CLASS/... objects. So we need to protect them for multi-Ractor exection. Hint: we can make them Ractor local for unshareable objects, but now it is premature optimization.
* sync enc_table and rb_encoding_listKoichi Sasada2020-10-141-0/+4
| | | | | | | | | | | | | | | | | enc_table which manages Encoding information. rb_encoding_list also manages Encoding objects. Both are accessed/modified by ractors simultaneously so that they should be synchronized. For enc_table, this patch introduced GLOBAL_ENC_TABLE_ENTER/LEAVE/EVAL to access this table with VM lock. To make shortcut, three new global variables global_enc_ascii, global_enc_utf_8, global_enc_us_ascii are also introduced. For rb_encoding_list, we split it to rb_default_encoding_list (256 entries) and rb_additional_encoding_list. rb_default_encoding_list is fixed sized Array so we don't need to synchronized (and most of apps only needs it). To manage 257 or more encoding objects, they are stored into rb_additional_encoding_list. To access rb_additional_encoding_list., VM lock is needed.
* Fixed installation failure [Bug #17191]Nobuyoshi Nakada2020-09-291-1/+1
| | | | | | | Try update and extract bundled gems only when baseruby is available. It should be done only when installing from developemental build and not from the tarball, but it is not obvious to differentiate them.
* Fix up dependencies on internal/sanitizers.hNobuyoshi Nakada2020-09-291-0/+1
|
* update-depsNARUSE, Yui2020-09-261-0/+3
| | | | https://github.com/ruby/ruby/runs/1169621878
* Buffer protocol proposal (#3261)Kenta Murata2020-09-251-0/+162
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | * Add buffer protocol * Modify for some review comments * Per-object buffer availability * Rename to MemoryView from Buffer and make compilable * Support integral repeat count in memory view format * Support 'x' for padding bytes * Add rb_memory_view_parse_item_format * Check type in rb_memory_view_register * Update dependencies in common.mk * Add test of MemoryView * Add test of rb_memory_view_init_as_byte_array * Add native size format test * Add MemoryView test utilities * Add test of rb_memory_view_fill_contiguous_strides * Skip spaces in format string * Support endianness specifiers * Update documentation * Support alignment * Use RUBY_ALIGNOF * Fix format parser to follow the pack format * Support the _ modifier * Parse count specifiers in get_format_size function. * Use STRUCT_ALIGNOF * Fix test * Fix test * Fix total size for the case with tail padding * Fix rb_memory_view_get_item_pointer * Fix rb_memory_view_parse_item_format again
* Update dependenciesKazuhiro NISHIYAMA2020-09-251-0/+1
|
* Bundle rbs gem as bundled gems (#3496)Hiroshi SHIBATA2020-09-231-1/+1
| | | | * Added rbs as bundled gems * Added the missing dependencies for rbs gem
* When setting current thread scheduler to nil, invoke `#close`.Samuel Williams2020-09-211-0/+1
|
* sync ruby_global_symbolsKoichi Sasada2020-09-181-0/+3
| | | | | ruby_global_symbols can be accessed with multiple ractors so that the accesses should be synchronized.
* sync fstring poolKoichi Sasada2020-09-151-0/+3
| | | | fstring pool should be sync with other Ractors.
* Update dependenciesSamuel Williams2020-09-141-1/+170
|
* Standardised scheduler interface.Samuel Williams2020-09-141-0/+3
|
* separate rb_random_tNobuyoshi Nakada2020-09-071-0/+1
| | | | | | | | | | | | * random.c: separate abstract rb_random_t and rb_random_mt_t for Mersenne Twister implementation. * include/ruby/random.h: the interface for extensions of Random class. * DLL imported symbol reference is not constant on Windows. * check if properly initialized.
* common.mk: UNALIGNED_MEMBER_ACCESS needs internal/warnings.h on some platformsNobuyoshi Nakada2020-09-051-0/+5
|
* Updated dependencyNobuyoshi Nakada2020-09-041-0/+1
|
* Introduce Ractor mechanism for parallel executionKoichi Sasada2020-09-031-1/+446
| | | | | | | | | | | | | | | | This commit introduces Ractor mechanism to run Ruby program in parallel. See doc/ractor.md for more details about Ractor. See ticket [Feature #17100] to see the implementation details and discussions. [Feature #17100] This commit does not complete the implementation. You can find many bugs on using Ractor. Also the specification will be changed so that this feature is experimental. You will see a warning when you make the first Ractor with `Ractor.new`. I hope this feature can help programmers from thread-safety issues.
* Revert the workaround of minitest and hoeHiroshi SHIBATA2020-09-011-1/+1
| | | | | 86737c509cd49cfe4509a65d300d390da0f07be6 3e1aea461320094e634ab32ca0b13dd43b69d8b0
* Removed minitest and hoe because they didn't support Ruby 3 yetHiroshi SHIBATA2020-08-311-1/+1
|
* sed -i '/rmodule.h/d'卜部昌平2020-08-271-74/+0
|
* sed -i '/r_cast.h/d'卜部昌平2020-08-271-74/+0
|
* sed -i '\,2/extern.h,d'卜部昌平2020-08-271-75/+0
|
* tool/update-deps -fix卜部昌平2020-08-191-0/+33
|
* tool/update-deps --fix卜部昌平2020-08-151-0/+8
|
* Skip already extracted gemsNobuyoshi Nakada2020-07-291-1/+2
|
* common.mk: add missing dependency卜部昌平2020-07-131-1/+2
|
* Skip comment and empty lines in gems/bundled_gems fileNobuyoshi Nakada2020-07-051-1/+5
|
* Annotate Kernel#class as inline (#3250)Takashi Kokubun2020-06-231-0/+2
| | | | | | | | | | | | | | | | | | | | | | | | | | ``` $ benchmark-driver -v --rbenv 'before;after;before --jit;after --jit' benchmark/mjit_class.yml --repeat-count=4 before: ruby 2.8.0dev (2020-06-23T07:09:54Z master 37a2e48d76) [x86_64-linux] after: ruby 2.8.0dev (2020-06-23T17:29:56Z inline-class 0ff147c007) [x86_64-linux] before --jit: ruby 2.8.0dev (2020-06-23T07:09:54Z master 37a2e48d76) +JIT [x86_64-linux] after --jit: ruby 2.8.0dev (2020-06-23T17:29:56Z inline-class 0ff147c007) +JIT [x86_64-linux] Calculating ------------------------------------- before after before --jit after --jit mjit_class(self) 39.219M 40.060M 53.502M 69.202M i/s - 40.000M times in 1.019915s 0.998495s 0.747631s 0.578021s mjit_class(1) 39.567M 41.242M 52.100M 68.895M i/s - 40.000M times in 1.010935s 0.969885s 0.767749s 0.580591s Comparison: mjit_class(self) after --jit: 69201690.7 i/s before --jit: 53502336.4 i/s - 1.29x slower after: 40060289.1 i/s - 1.73x slower before: 39218939.2 i/s - 1.76x slower mjit_class(1) after --jit: 68895358.6 i/s before --jit: 52100353.0 i/s - 1.32x slower after: 41241993.6 i/s - 1.67x slower before: 39567314.0 i/s - 1.74x slower ```
* Stop relying on `make benchmark`'s `-I$(srcdir)/benchmark/lib`Takashi Kokubun2020-06-221-1/+1
| | | | | | These days I don't use `make benchmark`. The YAML files should be executable with bare `benchmark-driver` CLI without passing `RUBYOPT=-Ibenchmark/lib`.
* Make Integer#zero? a separated method and builtin (#3226)Takashi Kokubun2020-06-201-0/+5
| | | | | | | A prerequisite to fix https://bugs.ruby-lang.org/issues/15589 with JIT. This commit alone doesn't make a significant difference yet, but I thought this commit should be committed independently. This method override was discussed in [Misc #16961].
* Build configured extension libraries onlyNobuyoshi Nakada2020-06-191-1/+1
| | | | | Consider the libraries, which remain exts.mk but not listed in ext/configure-ext.mk, removed.
* $(PREP) is needed to run $(MINIRUBY)Nobuyoshi Nakada2020-06-181-1/+1
|