aboutsummaryrefslogtreecommitdiffstats
Commit message (Collapse)AuthorAgeFilesLines
* rb_shape_transition_shape_capa: use optimal sizes transitionsJean Boussier2023-10-233-4/+71
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Previously the growth was 3(embed), 6, 12, 24, ... With this change it's now 3(embed), 8, 16, 32, 64, ... by default. However, since power of two isn't the best size for all allocators, if `malloc_usable_size` is vailable, we use it to discover the best offset. On Linux/glibc 2.35 for instance, the growth will be 3(embed), 7, 15, 31 to avoid wasting 8B per object. Test program: ```c size_t test(size_t slots) { size_t allocated = slots * VALUE_SIZE; void *test_ptr = malloc(allocated); size_t wasted = malloc_usable_size(test_ptr) - allocated; free(test_ptr); fprintf(stderr, "slots = %lu, wasted_bytes = %lu\n", slots, wasted); return wasted; } int main(int argc, char *argv[]) { size_t best_padding = 0; size_t padding = 0; for (padding = 0; padding <= 2; padding++) { size_t wasted = test(8 - padding); if (wasted == 0) { best_padding = padding; break; } } size_t index = 0; fprintf(stderr, "=============== naive ================\n"); size_t list_size = 4; for (index = 0; index < 10; index++) { test(list_size); list_size *= 2; } fprintf(stderr, "=============== auto-padded (-%lu) ================\n", best_padding); list_size = 4; for (index = 0; index < 10; index ++) { test(list_size - best_padding); list_size *= 2; } fprintf(stderr, "\n\n"); return 0; } ``` ``` ===== glibc ====== slots = 8, wasted_bytes = 8 slots = 7, wasted_bytes = 0 =============== naive ================ slots = 4, wasted_bytes = 8 slots = 8, wasted_bytes = 8 slots = 16, wasted_bytes = 8 slots = 32, wasted_bytes = 8 slots = 64, wasted_bytes = 8 slots = 128, wasted_bytes = 8 slots = 256, wasted_bytes = 8 slots = 512, wasted_bytes = 8 slots = 1024, wasted_bytes = 8 slots = 2048, wasted_bytes = 8 =============== auto-padded (-1) ================ slots = 3, wasted_bytes = 0 slots = 7, wasted_bytes = 0 slots = 15, wasted_bytes = 0 slots = 31, wasted_bytes = 0 slots = 63, wasted_bytes = 0 slots = 127, wasted_bytes = 0 slots = 255, wasted_bytes = 0 slots = 511, wasted_bytes = 0 slots = 1023, wasted_bytes = 0 slots = 2047, wasted_bytes = 0 ``` ``` ========== jemalloc ======= slots = 8, wasted_bytes = 0 =============== naive ================ slots = 4, wasted_bytes = 0 slots = 8, wasted_bytes = 0 slots = 16, wasted_bytes = 0 slots = 32, wasted_bytes = 0 slots = 64, wasted_bytes = 0 slots = 128, wasted_bytes = 0 slots = 256, wasted_bytes = 0 slots = 512, wasted_bytes = 0 slots = 1024, wasted_bytes = 0 slots = 2048, wasted_bytes = 0 =============== auto-padded (-0) ================ slots = 4, wasted_bytes = 0 slots = 8, wasted_bytes = 0 slots = 16, wasted_bytes = 0 slots = 32, wasted_bytes = 0 slots = 64, wasted_bytes = 0 slots = 128, wasted_bytes = 0 slots = 256, wasted_bytes = 0 slots = 512, wasted_bytes = 0 slots = 1024, wasted_bytes = 0 slots = 2048, wasted_bytes = 0 ```
* [rubygems/rubygems] Restore using old way of passing Ruby version to resolverDavid Rodríguez2023-10-232-2/+2
| | | | | | | | | | | | | | | | We used `Bundler::RubyVersion.system.gem_version` for a long time, but I changed this to `Gem.ruby_version` at https://github.com/rubygems/rubygems/commit/94f96439438e. It's unclear why I did that though since I believe it was unrelated to the fix in there. Bootboot patches `Bundler::RubyVersion` to customize how Bundler works with Ruby versions, and that change broke that. Since it's unclear to me how to achieve what Bootboot is doing with the current code, and there was no strong reason for the change, let's restore it for now. https://github.com/rubygems/rubygems/commit/8ec36c6017
* [rubygems/rubygems] Handle base64 encoded checksums in lockfile for future ↵Martin Emde2023-10-236-31/+73
| | | | | | | | compatibility. Save checksums using = as separator. https://github.com/rubygems/rubygems/commit/a36ad7d160
* [rubygems/rubygems] Improve errors and register checksums reliablyMartin Emde2023-10-2324-271/+541
| | | | | | | | | | | | Improve error reporting for checksums, raises a new error class. Solve for multi-source checksum errors. Add CHECKSUMS to tool/bundler/(dev|standard|rubocop)26_gems.rb https://github.com/rubygems/rubygems/commit/26ceee0e76 Co-authored-by: Samuel Giddins <segiddins@segiddins.me>
* [rubygems/rubygems] rename Index#== to Index#subset?Martin Emde2023-10-232-4/+2
| | | | https://github.com/rubygems/rubygems/commit/a96a561087
* [rubygems/rubygems] Refactor Checksum classes and methods to reduceMartin Emde2023-10-2324-395/+333
| | | | | | | code. (https://github.com/rubygems/rubygems/pull/6917) https://github.com/rubygems/rubygems/commit/2238bdaadc
* [rubygems/rubygems] Refactor to checksums stored via sourceSamuel Giddins2023-10-2331-259/+536
| | | | | | | | | | | | | | | | | | | | This gets the specs passing, and handles the fact that we expect checkums to be pinned only to a particular source This also avoids reading in .gem files during lockfile generation, instead allowing us to query the source for each resolved gem to grab the checksum Finally, this opens up a route to having user-stored checksum databases, similar to how other package managers do this! Add checksums to dev lockfiles Handle full name conflicts from different original_platforms when adding checksums to store from compact index Specs passing on Bundler 3 https://github.com/rubygems/rubygems/commit/86c7084e1c
* [rubygems/rubygems] Use the server checksum, then calculate from gem on disk ↵Mercedes Bernard2023-10-2322-87/+355
| | | | | | | | | | | | | | | | | | | | | | if possible 1. Use the checksum provided by the server if provided: provides security knowing if the gem you downloaded matches the gem on the server 2. Calculate the checksum from the gem on disk: provides security knowing if the gem has changed between installs 3. In some cases, neither is possible in which case we don't put anything in the checksum and we maintain functionality as it is today Add the checksums to specs in the index if we already have them Prior to checksums, we didn't lose any information when overwriting specs in the index with stubs. But now when we overwrite EndpointSpecifications or RemoteSpecifications with more generic specs, we could lose checksum info. This manually sets checksum info so we keep it in the index. https://github.com/rubygems/rubygems/commit/de00a4f153
* [rubygems/rubygems] Add CHECKSUMS for each gem in lockfileThong Kuah2023-10-2331-21/+760
| | | | | | | | | | | | | We lock the checksum for each resolved spec under a new CHECKSUMS section in the lockfile. If the locked spec does not resolve for the local platform, we preserve the locked checksum, similar to how we preserve specs. Checksum locking only makes sense on install. The compact index information is only available then. https://github.com/rubygems/rubygems/commit/bde37ca6bf
* Lrama v0.5.7yui-knk2023-10-2314-785/+2197
|
* Bump ruby/setup-ruby from 1.156.0 to 1.157.0dependabot[bot]2023-10-224-4/+4
| | | | | | | | | | | | | | Bumps [ruby/setup-ruby](https://github.com/ruby/setup-ruby) from 1.156.0 to 1.157.0. - [Release notes](https://github.com/ruby/setup-ruby/releases) - [Commits](https://github.com/ruby/setup-ruby/compare/5cfe23c062c0aac352e765b1b7cc12ea5255ccc4...a05e47355e80e57b9a67566a813648fa67d92011) --- updated-dependencies: - dependency-name: ruby/setup-ruby dependency-type: direct:production update-type: version-update:semver-minor ... Signed-off-by: dependabot[bot] <support@github.com>
* [rubygems/rubygems] Fix spelling of extraneousMartin Emde2023-10-221-4/+4
| | | | https://github.com/rubygems/rubygems/commit/af61829432
* [DOC] Mention the omission of a superclass when reopening a classKouhei Yanagita2023-10-221-3/+25
|
* [DOC] Update documentation for typical implementation of hashYuki Tsujimoto2023-10-221-1/+1
|
* [ruby/io-console] Intersperse Win32 and termios implementationsNobuyoshi Nakada2023-10-221-141/+124
| | | | | | So that the both sources appear in RDoc generated HTMLs. https://github.com/ruby/io-console/commit/beec164a47
* Update default gems list at 8c0c7be65b21dc34156919b04b834e [ci skip]git2023-10-221-0/+1
|
* [ruby/io-console] Start 0.6.1Nobuyoshi Nakada2023-10-221-1/+1
| | | | https://github.com/ruby/io-console/commit/06307a755d
* [ruby/io-console] [DOC] Split .document files to sync with ruby/rubyNobuyoshi Nakada2023-10-222-2/+3
| | | | https://github.com/ruby/io-console/commit/13e0bcac9f
* Skip RBS `RbConfig::TOPDIR` test that is `nil` before installationNobuyoshi Nakada2023-10-221-0/+1
|
* RBS no longer has test/stdlib/Prime_test.rbNobuyoshi Nakada2023-10-221-1/+0
|
* Update rbs revision to testNobuyoshi Nakada2023-10-221-1/+1
|
* [ruby/io-console] [DOC] Add .documentNobuyoshi Nakada2023-10-211-0/+1
| | | | https://github.com/ruby/io-console/commit/62a677b51a
* [rubygems/rubygems] Gem::NameTuple equality ignores Gem::Platform/string ↵Martin Emde2023-10-212-14/+29
| | | | | | platform variation https://github.com/rubygems/rubygems/commit/49aaa46708
* [ruby/irb] Minor refactors around irb.rbStan Lo2023-10-213-131/+119
| | | | | | | | | | | | | | | | (https://github.com/ruby/irb/pull/736) * Remove dead method * Simplify IRB.version * Move private Irb methods together * Centralise @CONF initialization/assignment in init.rb * Move attr_* calls above initialize method https://github.com/ruby/irb/commit/cf23be4395
* [Bug #19967] Ignore library before buildNobuyoshi Nakada2023-10-211-1/+1
|
* Fallback job status to normal if no ttyNobuyoshi Nakada2023-10-211-1/+1
|
* [Bug #19967] Delete real pathNobuyoshi Nakada2023-10-211-1/+2
|
* Strip universal_archnamesNobuyoshi Nakada2023-10-211-2/+2
|
* [Bug #19967] Revert "configure.ac: LIBPATHENV on macOS"Nobuyoshi Nakada2023-10-211-1/+1
| | | | | This reverts commit 1961c786aab243b3eb60e7238224e87975d88056. These environment variables should no longer propagate to child processes.
* [Bug #19967] Reset `LIBPATHENV` env after startedNobuyoshi Nakada2023-10-214-1/+16
| | | | Not to affect other tools invoked as child processes.
* Avoid duplicate path in library pathsNobuyoshi Nakada2023-10-211-0/+12
|
* Raise TypeError for bad IO::Buffer.map argument (#8728)Charles Oliver Nutter2023-10-212-2/+9
| | | | | | | | | | | | | | | * Raise TypeError when IO::Buffer.map argument is neither IO nor implements #fileno * Use UNREACHABLE_CODE Co-authored-by: Nobuyoshi Nakada <nobu@ruby-lang.org> * Use macro for undef check Co-authored-by: Nobuyoshi Nakada <nobu@ruby-lang.org> --------- Co-authored-by: Nobuyoshi Nakada <nobu@ruby-lang.org>
* Extract IO::Buffer.for string locking test (#8729)Charles Oliver Nutter2023-10-211-5/+10
| | | | | | | String locking with locktmp is not really part of the public API, and the test relies in a side effect of using it to protect the buffer. On other implementations without locktmp this does not fail. Separate into its own test so it can be excluded from public API expectations.
* YJIT: Skip printing stats at exit if --yjit-disable (#8727)Takashi Kokubun2023-10-202-1/+5
|
* [PRISM] Setup encodings in prism compilerJemma Issroff2023-10-202-37/+48
|
* YJIT: On test_bug_19316, only check the resultAlan Wu2023-10-201-1/+1
| | | | | | | | | Because the `&` call checks for interrupts, the test was accidentally timing dependent. Stop checking for exits. [Bug #19921] Reported-by: Vít Ondruch <vondruch@redhat.com> Reported-by: Mamoru Tasaka <mtasaka@fedoraproject.org>
* Add tests for all implemented nodes, leave ones that need fixing commented outJemma Issroff2023-10-201-33/+56
|
* Added TODOs on all implemented nodes, matched orderingJemma Issroff2023-10-201-100/+244
|
* [PRISM] Fixed StringConcatNode, uncommented testsJemma Issroff2023-10-202-9/+12
|
* [DOC] Indentation fix in comments of MatchData#inspectHerwin2023-10-201-4/+3
| | | | The old version did not add syntax highlighting to the code block, and included the "Related:" line in the code block as well.
* [DOC] `configure -C` tipsNobuyoshi Nakada2023-10-201-0/+2
|
* [Bug #19966] [PRISM] Fix singleton method definitionNobuyoshi Nakada2023-10-202-1/+12
|
* [PRISM] Enclose in the test classNobuyoshi Nakada2023-10-201-0/+1
|
* Added explicitly begin-end block for Ruby 2.4.Hiroshi SHIBATA2023-10-201-5/+7
| | | | | | strscan, ipaddr and some default gems still support Ruby 2.4. After this, I extract this CoreAssertions to their repositories.
* Stop creating ripper.h because it's not usedyui-knk2023-10-202-2/+2
|
* [ruby/logger] Bump up required ruby version to 2.5Hiroshi SHIBATA2023-10-201-1/+1
| | | | https://github.com/ruby/logger/commit/ac911eae2b
* [ruby/logger] Use Gemfile instead of ↵Hiroshi SHIBATA2023-10-201-4/+0
| | | | | | Gem::Specification#add_development_dependency https://github.com/ruby/logger/commit/7b51af263f
* Partly revert a change in #8705Takashi Kokubun2023-10-191-2/+3
| | | | | | | | | | | Having this variable actually helps the performance of non-JITed calls. ----- ----------- ---------- ---------- ---------- ------------- ------------ bench before (ms) stddev (%) after (ms) stddev (%) after 1st itr before/after fib 241.9 0.5 225.4 1.0 1.06 1.07 ----- ----------- ---------- ---------- ---------- ------------- ------------ (benchmarked with --yjit-cold-threshold=0)
* Sort gem namesHiroshi SHIBATA2023-10-201-8/+8
|
* racc is also extracted to bundled gemsHiroshi SHIBATA2023-10-201-0/+1
|