Skip to content

Ruby ergonomics #1

@chrisseaton

Description

@chrisseaton

There's some very low-hanging fruit for basic Ruby ergonomics with MMTk. I'd like to get approval for these but then reserve them for some beginners that I'd like to encourage to try the project.

Version flag

When you run Ruby with one of the JITs you get a flag in --version so that it's really obvious in error messages. We should do the same for MMTk, and print the plan in use.

% ruby -v
ruby 3.1.1p18 (2022-02-18 revision 53f5fc4236) [arm64-darwin21]
% ruby --jit -v 
ruby 3.1.1p18 (2022-02-18 revision 53f5fc4236) +MJIT [arm64-darwin21]

We could add:

% MMTK_PLAN=MarkSweep ruby -v 
ruby 3.1.1p18 (2022-02-18 revision 53f5fc4236) +MMTk(MarkSweep) [arm64-darwin21]

MMTk command-line flag

It'd be great if we could have MMTk as a run-time option. Can we do that? It'd be so much more convenient for shipping and experiments.

% ruby --mmtk ...

Plan command-line flag

Should it be possible to set the plan using a command-line flag? That's more common for these kind of options in Ruby than an environment variable.

% ruby --mmtk-plan=MarkSweep ...

Default heap size

Is there a default heap size we should use? What's the default if you don't set one? Can we calculate a default from system parameters?

Basic GC.stat support

What should GC.stat show for MMTk and the various plans? Can we get some basic stats out of MarkSweep and None already?

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions