Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[Feature #18364] Add GC.stat_pool to get stats for memory pools #5177

Merged
merged 1 commit into from Jan 4, 2022

Conversation

peterzhu2118
Copy link
Member

@peterzhu2118 peterzhu2118 commented Nov 25, 2021

GC.stat_pool is used return stats for memory pools. This is used for the Variable Width Allocation feature.

Copy link
Member

@XrXr XrXr left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@eregon just thought you might appreciate a ping since this is a new method. Is this okay for TruffleRuby? It can return an empty hash to implement this.

gc.rb Outdated Show resolved Hide resolved
gc.rb Outdated Show resolved Hide resolved
@eregon
Copy link
Member

eregon commented Nov 27, 2021

@XrXr Thanks. Yes, I think we don't have this information from the JVM, at least not in this form.
I guess we could raise ArgumentError since there is known pool of a given size.

There is something maybe related in TruffleRuby and JRuby, I replied on https://bugs.ruby-lang.org/issues/18364?next_issue_id=18360#note-3

@peterzhu2118 peterzhu2118 force-pushed the pz-gc-stat-size-pool branch 2 times, most recently from 030c67c to 47a820c Compare November 30, 2021 15:41
@peterzhu2118 peterzhu2118 changed the title [Feature #18364] Add GC.stat_size_pool to get stats for a size pool [Feature #18364] Add GC.stat_pool to get stats for memory pools Nov 30, 2021
@peterzhu2118 peterzhu2118 force-pushed the pz-gc-stat-size-pool branch 2 times, most recently from dc28551 to 0aaeeed Compare December 15, 2021 18:17
GC.stat_heap will return stats for memory heaps. This is
used for the Variable Width Allocation feature.
@peterzhu2118 peterzhu2118 merged commit 615e9b2 into ruby:master Jan 4, 2022
@peterzhu2118 peterzhu2118 deleted the pz-gc-stat-size-pool branch January 4, 2022 14:46
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
3 participants