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

Update README.md and default local mmtk location #223

Open
wants to merge 3 commits into
base: master
Choose a base branch
from

Conversation

shamouda
Copy link

@shamouda shamouda commented Jun 24, 2023

Minor edits to README

so that the instructions are correct when users choose a differnt debug level.
to make mmtk dependency value (even if commented) consistent with
the default directory structure in README.md
@k-sareen
Copy link
Collaborator

@shamouda Thanks for the PR! I think we need to fix the CI scripts before we can merge this. Some of the CI scripts expect the previous location. I'll make another PR for it.

@@ -121,10 +121,10 @@ The output jdk is at `./build/linux-x86_64-normal-server-$DEBUG_LEVEL/jdk`.
**Note:** The above `make` command will build what is known as the [`default` target or "exploded image"](https://github.com/openjdk/jdk11u/blob/master/doc/building.md#Running-make). This build is exclusively meant for developers who want quick and incremental builds to test changes. If you are planning on evaluating your build (be it performance, minimum heap, etc.), then it is *highly advised* to use the `images` target. The `default` target is the (roughly) minimal set of outputs required to run the built JDK and is not guaranteed to run all benchmarks. It may have bloated minimum heap values as well. The `images` target can be built like so:

```console
$ make CONF=linux-x86_64-normal-server-release THIRD_PARTY_HEAP=$PWD/../mmtk-openjdk/openjdk images
Copy link
Collaborator

Choose a reason for hiding this comment

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

Could you add a line saying "For performance evaluation, we expect you are using the release build"? That was the original reason the make command was not using $DEBUG_LEVEL and directly using release. I agree that it should have been sign posted a bit better.

Copy link
Collaborator

Choose a reason for hiding this comment

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

Or better yet, mention it in the note directly above the make command.

Copy link
Author

@shamouda shamouda Jun 26, 2023

Choose a reason for hiding this comment

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

Does the same apply to the "Profile-Guided Optimized Build" section?
If that is the case, then I should probably either:

  1. undo all the changes (i.e. restore the hardcoded -release values) but add a clarifying note, or
  2. add "DEBUG_LEVEL=release" before the make commands to make it more explicit.

What do you think?

Copy link
Collaborator

@k-sareen k-sareen Jun 27, 2023

Choose a reason for hiding this comment

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

I think the first one is probably better. And yes, the PGO build is also generally used for evaluation only. The images (and PGO build) have extra steps involved in them which only make sense when you want to perform some kind of evaluation. In the images case, the default build (an unoptimized dev build) is used to bootstrap a production build and in the PGO case, the Rust compiler uses execution profiles to inform inlining decisions.

…images target

As per k-sareen's review, users are expected to use the release mode for performance evaluations. So using a hardcoded debug mode here is OK.
Updated the note text to clarify that.
@k-sareen
Copy link
Collaborator

@qinsoon Which CI script is even using the hardcoded value? I don't see it being used by the old CI script here? Clearly it's passing the tests above.

@qinsoon
Copy link
Member

qinsoon commented Jun 27, 2023

@qinsoon Which CI script is even using the hardcoded value? I don't see it being used by the old CI script here? Clearly it's passing the tests above.

https://github.com/mmtk/mmtk-core/blob/40c977308cb24d8bdf46b82916a388c10fa956e7/.github/workflows/post-review-ci.yml#L77-L86

We can update the mmtk-core CI to parse and modify the toml semantically. In that case, it doesn't matter which value we put in the toml file. See mmtk/mmtk-core#856

@k-sareen
Copy link
Collaborator

Ah right it's in the mmtk-core CI script. I see. Yes we should parse it in a more robust way imo. I'll investigate how best to do it tonight. jq sounds like the best idea.

@qinsoon
Copy link
Member

qinsoon commented Jun 27, 2023

Ah right it's in the mmtk-core CI script. I see. Yes we should parse it in a more robust way imo. I'll investigate how best to do it tonight. jq sounds like the best idea.

What Kunshan posted is about reading data from toml. So we can use cargo metadata to parse toml as json, and use jq to read it. Here we need to write to toml.

@k-sareen
Copy link
Collaborator

What Kunshan posted is about reading data from toml. So we can use cargo metadata to parse toml as json, and use jq to read it. Here we need to write to toml.

Yes that makes sense. How about using a slightly non-standard tool like this: https://github.com/TomWright/dasel. I found it by doing a bit of quick googling.

@wks
Copy link
Contributor

wks commented Jun 27, 2023

I think when we modify, we should directly modify the TOML file, not the generated JSON from cargo metadata. cargo metadata also aggregates implied information not included in the TOML file, including metadata of dependencies.

There are TOML libraries for Python, too.

Alternatively, there is a tool named fq (https://github.com/wader/fq) which can parse many formats including TOML. But it is a bit unstable and not very well-documented.

@k-sareen
Copy link
Collaborator

That's why I suggested the dasel tool. Seems fairly stable and works directly on TOML files.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants