aboutsummaryrefslogtreecommitdiffstats
path: root/ext
Commit message (Collapse)AuthorAgeFilesLines
* [ruby/stringio] Development of 3.1.1 started.Sutou Kouhei2023-11-281-1/+1
| | | | https://github.com/ruby/stringio/commit/75da93d48f
* Refactor and fix the GVL instrumentation APIJean Boussier2023-11-271-73/+140
| | | | | | | | | | | | This entirely changes how it is tested. Rather than to use counters we now record the timeline of events with associated threads which makes it much easier to assert that certains events are only preceded by a specific event, and makes it much easier to debug unexpected timelines. Co-Authored-By: Étienne Barrié <etienne.barrie@gmail.com> Co-Authored-By: JP Camara <jp@jpcamara.com> Co-Authored-By: John Hawthorn <john@hawthorn.email>
* [ruby/stringio] Do not compile the C extension on TruffleRubyBenoit Daloze2023-11-271-1/+5
| | | | | | | | | | | * Before this it was compiled but not used, because TruffleRuby has a stringio.rb in stdlib and .rb has precedence over .so. In fact that extension never worked on TruffleRuby, because rb_io_extract_modeenc() has never been defined on TruffleRuby. * So this just skip compiling the extension since compilation of it now fails: https://github.com/ruby/openssl/issues/699 https://github.com/ruby/stringio/commit/d791b63df6
* [ruby/psych] Prefer each_char in Psych::Visitors::Visitor::ToRuby#deserializeMau Magnaguagno2023-11-271-1/+1
| | | | | | Use safe navigation operator with each_char to remove empty strings and improve readability. https://github.com/ruby/psych/commit/5fe714b216
* [ruby/openssl] History.md: Escape Markdown syntax Italic "*". [ci skip]Jun Aruga2023-11-251-1/+1
| | | | https://github.com/ruby/openssl/commit/dc26433ae5
* objspace_dump.c: dump call cache ids with dump_append_idJean Boussier2023-11-221-4/+5
| | | | | | Not all `ID` have an associated string. Fixes a SEGFAULT in ObjectSpace.dump_all spec.
* `ObjectSpace.count_nodes` doesn't count nodesyui-knk2023-11-211-142/+1
| | | | | | | Node has not been managed by GC from Ruby 2.5. Therefore these codes are not needed. If ObjectSpace depends on Node, it needs to update the file when node type is updated. Delete node related codes to avoid such update.
* Don't try compacting ivars on Classes that are "too complex"Aaron Patterson2023-11-201-0/+5
| | | | | Too complex classes use a hash table to store ivs, and should always pin their IVs. We shouldn't touch those classes in compaction.
* Revert "Revert "Remove SHAPE_CAPACITY_CHANGE shapes""Peter Zhu2023-11-131-5/+0
| | | | This reverts commit 5f3fb4f4e397735783743fe52a7899b614bece20.
* Record more info from CALLCACHE in heap dumpsJohn Hawthorn2023-11-131-3/+23
| | | | | This records the called_id and klass from imemo_callcache objects in heap dumps.
* GVL Instrumentation: pass thread->self as part of event dataJean Boussier2023-11-131-0/+19
| | | | | | | | | | | | | | | | | | | Context: https://github.com/ivoanjo/gvl-tracing/pull/4 Some hooks may want to collect data on a per thread basis. Right now the only way to identify the concerned thread is to use `rb_nativethread_self()` or similar, but even then because of the thread cache or MaNy, two distinct Ruby threads may report the same native thread id. By passing `thread->self`, hooks can use it as a key to store the metadata. NB: Most hooks are executed outside the GVL, so such data collection need to use a thread-safe data-structure, and shouldn't use the reference in other ways from inside the hook. They must also either pin that value or handle compaction.
* Revert "Remove SHAPE_CAPACITY_CHANGE shapes"Peter Zhu2023-11-101-0/+5
| | | | | | | This reverts commit f6910a61122931e4193bcc0fad18d839c319b720. We're seeing crashes in the test suite of Shopify's core monolith after this change.
* [ruby/io-console] bump up to 0.6.1.dev.1Nobuyoshi Nakada2023-11-101-1/+1
| | | | https://github.com/ruby/io-console/commit/057ab96a73
* [ruby/io-console] Include FFI version version.rbNobuyoshi Nakada2023-11-101-0/+1
| | | | https://github.com/ruby/io-console/commit/b0c688c57e
* [ruby/io-console] Define IO::ConsoleMode::VERSION from gemspecNobuyoshi Nakada2023-11-102-0/+7
| | | | https://github.com/ruby/io-console/commit/ebdbebf461
* [ruby/io-console] Update file list in gemspecNobuyoshi Nakada2023-11-101-8/+8
| | | | https://github.com/ruby/io-console/commit/0bfde8372c
* Remove SHAPE_CAPACITY_CHANGE shapesPeter Zhu2023-11-091-5/+0
| | | | | We don't need to create a shape to transition capacity as we can transition the capacity when the capacity of the SHAPE_IVAR changes.
* [ruby/digest] Suppress implicit cast down warningsNobuyoshi Nakada2023-11-091-1/+2
| | | | https://github.com/ruby/digest/commit/2f3505bf3f
* [ruby/stringio] Development of 3.1.0 started.Sutou Kouhei2023-11-081-1/+1
| | | | https://github.com/ruby/stringio/commit/a2f8ef1a6a
* [ruby/stringio] Add missing row separator encoding conversionSutou Kouhei2023-11-081-22/+41
| | | | | | | | | | | | | (https://github.com/ruby/stringio/pull/69) The conversion logic is borrowed from ruby/ruby's io.c: https://github.com/ruby/ruby/blob/40391faeab608665da87a05c686c074f91a5a206/io.c#L4059-L4079 Fix ruby/stringio#68 Reported by IWAMOTO Kouichi. Thanks!!! https://github.com/ruby/stringio/commit/4b170c1a68
* [ruby/strscan] Bump versionSutou Kouhei2023-11-081-1/+1
| | | | https://github.com/ruby/strscan/commit/1b3393be05
* [ruby/fiddle] Remove garbageSutou Kouhei2023-11-081-1/+0
| | | | https://github.com/ruby/fiddle/commit/bbcb66e16e
* [ruby/fiddle] Include stdbool.h explicitly for old RubySutou Kouhei2023-11-081-0/+1
| | | | https://github.com/ruby/fiddle/commit/74a05fb358
* [ruby/fiddle] Use Ruby's true/false for C boolSutou Kouhei2023-11-087-22/+89
| | | | | | | | GitHub: fix https://github.com/ruby/fiddle/pull/130 Reported by Benoit Daloze. Thanks!!! https://github.com/ruby/fiddle/commit/2640e0148e
* [flori/json] Enhanced RDoc for Range extensionsBurdetteLamar2023-11-081-7/+22
| | | | https://github.com/flori/json/commit/ec47749b53
* String for string literal is not resizableNobuyoshi Nakada2023-11-082-0/+13
|
* [ruby/cgi] Add snake case aliases for escapeURIComponentJean Boussier2023-11-071-0/+2
| | | | | | As agreed in [Feature #18822] https://github.com/ruby/cgi/commit/9d1161ec9d
* [ruby/zlib] Bump up 3.1.0Hiroshi SHIBATA2023-11-071-1/+1
| | | | https://github.com/ruby/zlib/commit/2561e122ac
* [ruby/zlib] Support Ruby 2.5+ againHiroshi SHIBATA2023-11-071-1/+1
| | | | https://github.com/ruby/zlib/commit/661ea3ec5f
* [ruby/pathname] Bump up 0.3.0Hiroshi SHIBATA2023-11-071-1/+1
| | | | https://github.com/ruby/pathname/commit/f3d23679b0
* [ruby/fcntl] Bump up 1.1.0Hiroshi SHIBATA2023-11-071-1/+1
| | | | https://github.com/ruby/fcntl/commit/fe780abe07
* [ruby/win32ole] Bump up 1.8.10Hiroshi SHIBATA2023-11-071-1/+1
| | | | https://github.com/ruby/win32ole/commit/9a18f388a9
* [ruby/bigdecimal] fixed docs for .scaleTim Kretschmer2023-11-071-1/+1
| | | | | | the scale of `1` is actually 0 https://github.com/ruby/bigdecimal/commit/9a8bc9c417
* [ruby/bigdecimal] Update doc for bigdecimal/utilKoichi ITO2023-11-071-5/+5
| | | | | | | | | | | | | Follow up https://github.com/ruby/bigdecimal/issues/89. `BigDecimal.new` has already been removed. This PR replaces `BigDecimal.new` with `Kernel.BigDecimal` in the documentation, following the message below: > BigDecimal.new is deprecated; use Kernel.BigDecimal method instead. https://github.com/ruby/bigdecimal/commit/26d84ba766e971da8eaaf2ce41e7b89935fa68da https://github.com/ruby/bigdecimal/commit/dd52adf3b2
* [ruby/date] Bump up 3.3.4Hiroshi SHIBATA2023-11-071-1/+1
| | | | https://github.com/ruby/date/commit/50e18d2684
* Prevent cpu_set_t overflow even if there are more than 63 coresYusuke Endoh2023-11-071-4/+10
| | | | | Do not use `pthread_attr_setaffinity_np` if `sched_getcpu()` exceeds `CPU_SETSIZE`. (Using `CPU_ALLOC()` would be more appropriate.)
* Fix a memory leakYusuke Endoh2023-11-071-1/+1
| | | | pointed by @nobu
* Use pthread_attr_setaffinity_np instead of pthread_setaffinity_npYusuke Endoh2023-11-072-11/+21
|
* Detach a pthread after pthread_setaffinity_npYusuke Endoh2023-11-071-2/+2
| | | | | | | | | | After a pthread for getaddrinfo is detached, we cannot predict when the thread will exit. It would lead to a segfault by setting pthread_setaffinity to the terminated pthread. I guess this problem would be more likely to occur in high-load environments. This change detaches the pthread after pthread_setaffinity is called. [Feature #19965]
* Revert "Do not use pthread_setaffinity_np on s390x"Yusuke Endoh2023-11-071-5/+2
| | | | This reverts commit de82439215dd2770ef9a3a2cf5798bdadb788533.
* [ruby/etc] Fix inconsistent dll linkage warningNobuyoshi Nakada2023-11-051-1/+1
| | | | https://github.com/ruby/etc/commit/e4c71e5996
* [ruby/stringio] Make STRINGIO_VERSION uniformNobuyoshi Nakada2023-11-042-2/+3
| | | | https://github.com/ruby/stringio/commit/4400bf3380
* [ruby/stringio] Move Java version to Java directoryNobuyoshi Nakada2023-11-041-1/+2
| | | | https://github.com/ruby/stringio/commit/3f90a0d619
* Make every initial size pool shape a root shapePeter Zhu2023-11-021-5/+0
| | | | | This commit makes every initial size pool shape a root shape and assigns it a capacity of 0.
* [Feature #10602] Add new API rb_profile_thread_frames()Daisuke Aritomo2023-10-311-0/+21
| | | | | | | | | | | | | | | | | | | | Add a new API rb_profile_thread_frames(), which is essentialy a per-thread version of rb_profile_frames(). While the original rb_profile_frames() always returns results about the current active thread obtained by GET_EC(), this new API takes a Thread to be profiled as an argument. This should come in handy when profiling I/O-bound programs such as webapps, since this new API allows us to learn about Threads performing I/O (which do not have the GVL). Profiling worker threads (such as Sidekiq workers) may be another application. Implements [Feature #10602] Co-authored-by: Mike Perham <mike@perham.net>
* [ruby/etc] Start 1.4.3Nobuyoshi Nakada2023-10-291-1/+1
| | | | https://github.com/ruby/etc/commit/a9e4d4730d
* [ruby/zlib] Check for z_size_t along with {crc,adler}32_z inKJ Tsanaktsidis2023-10-261-1/+3
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | extconf.rb (https://github.com/ruby/zlib/pull/69) The android NDK (android-ndk-r21e) does not have crc32_z, adler32_z, nor z_size_t in its zlib.h header file. However, it _does_ have the crc32_z and adler32_z symbols in the libz.a static library! mkmf performs two tests for have_func: * It sees if a program that includes the header and takes the address of the symbol can compile * It sees if a program that defines the symbol as `extern void sym_name()` and calls it can be linked If either test works, it considers the function present. The android-ndk-r21e is passing the second test but not the first for crc32_z/adler32_z. So, we define HAVE_ZLIB_SIZE_T_FUNCS, but then can't actually compile the extension (since the prototypes aren't in the header file). We can keep this working how it was working before by _also_ checking for `have_type("z_size_t", "zlib.h")`. The have_type check _only_ looks in the header file for the type; if a program including the header file and using the type can't compile, the type is considered absent regardless of what might be in libz.a. https://github.com/ruby/zlib/commit/3b9fe962d8
* [ruby/zlib] Fix misdetection of {crc32,alder32}_z in cloudflare zlib forkKJ Tsanaktsidis2023-10-262-4/+8
| | | | | | | | | | | | | | | | | | | | | | We use the Cloudflare fork of zlib (https://github.com/cloudflare/zlib), which we find gives improved performance on AWS Graviton ARM instances. That fork does not define crc32_z and alder32_z functions. Until two days ago, Ruby's zlib gem worked fine, because cloudflare zlib _also_ did not define z_size_t, which meant Ruby did not try and use these functions. Since https://github.com/cloudflare/zlib/commit/a3ba99596d6271224d39ef9d6853511f51821e05 however, cloudflare zlib _does_ define z_size_t (but NOT crc32_z or alder32_z). The zlib gem would try and use these nonexistant functions and not compile. This patch fixes it by actually specifically detecting the functions that the gem wants to call, rather than just the presence of the z_size_t type. https://github.com/ruby/zlib/commit/c96e8b9a57
* Do not use pthread_setaffinity_np on s390xYusuke Endoh2023-10-251-2/+5
| | | | | | | | | | Looks like it randomly causes a segfault https://rubyci.s3.amazonaws.com/rhel_zlinux/ruby-master/log/20231025T093302Z.fail.html.gz ``` [11186/26148] TestNetHTTP_v1_2#test_set_form/home/chkbuild/build/20231025T093302Z/ruby/tool/lib/webrick/httprequest.rb:197: [BUG] Segmentation fault at 0x000003ff1ffff000 ruby 3.3.0dev (2023-10-25T07:50:00Z master 526292d9fe) [s390x-linux] ```
* rb_getaddrinfo should return EAI_AGAIN instead of EAGAINYusuke Endoh2023-10-241-6/+6
|