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

Write the log in XML format suitable for VisualVM 'UI Actions' #4110

Merged
merged 6 commits into from
Feb 5, 2023

Conversation

JaroslavTulach
Copy link
Member

@JaroslavTulach JaroslavTulach commented Feb 1, 2023

Pull Request Description

Start project-manager with following options to provide first 20s of the startup sequence:

$ project-manager --profiling-events-log-path=start.log --profiling-path=start.npss --profiling-time=20

once the start.log and start.npss files are generated (next to each other), open them in GraalVM's VisualVM:

$ graalvm/bin/jvisualvm --openfile start.npss

analyze.

Checklist

Please include the following checklist in your PR:

  • The documentation has been updated if necessary.
  • All code conforms to the
    Scala,
    Java,
    style guides.
  • All code has been tested:
    • Manually tested

@JaroslavTulach JaroslavTulach added the CI: No changelog needed Do not require a changelog entry for this PR. label Feb 1, 2023
@JaroslavTulach JaroslavTulach self-assigned this Feb 1, 2023
@JaroslavTulach
Copy link
Member Author

VisualVM shows timeline with "stackdepth" and also "UI Actions". Hovering over boxes in "UI Actions" shows the messages describing what happens in the engine. One can then select an interval and get profiling information for that interval:

VisualVM

This picture shows that 2.7s is spend in compiler.

private lazy val fmt = {
Files.write(
path,
"<?xml version='1.0'?>\n<records>".getBytes(StandardCharsets.UTF_8),
Copy link
Member Author

Choose a reason for hiding this comment

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

@4e6, is it OK to just switch the format to XML? Or do we rely on the original format somewhere?

Copy link
Contributor

Choose a reason for hiding this comment

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

I think the CSV output can be used by IDE profiling. Maybe we should ask @kazcw or @MichaelMauderer

Copy link
Member Author

Choose a reason for hiding this comment

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

@kazcw, @MichaelMauderer can you take a look? I am not aware of any (finished) attempt to merge the IDE and engine logging together, but I may not have the overall picture. CCing @xvcgreg...

Copy link
Contributor

@hubertp hubertp left a comment

Choose a reason for hiding this comment

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

Can we have these steps documented, please?

@JaroslavTulach JaroslavTulach force-pushed the wip/jtulach/UIActions_184369994 branch 2 times, most recently from 3f393ce to 9a9a7bb Compare February 4, 2023 11:32
@JaroslavTulach
Copy link
Member Author

Can we have these steps documented, please?

Here is the documentation for your consideration, @hubertp.

Copy link
Contributor

@hubertp hubertp left a comment

Choose a reason for hiding this comment

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

Documentation looks good, thanks!

@JaroslavTulach JaroslavTulach removed the CI: No changelog needed Do not require a changelog entry for this PR. label Feb 5, 2023
@JaroslavTulach JaroslavTulach added the CI: Ready to merge This PR is eligible for automatic merge label Feb 5, 2023
@mergify mergify bot merged commit 04415a2 into develop Feb 5, 2023
@mergify mergify bot deleted the wip/jtulach/UIActions_184369994 branch February 5, 2023 06:36
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
CI: Ready to merge This PR is eligible for automatic merge
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants