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

Collect a "full-featured" JFR file to use for native-image builds #4

Open
andrewazores opened this issue Dec 8, 2021 · 1 comment

Comments

@andrewazores
Copy link
Member

andrewazores commented Dec 8, 2021

As described in the README, native image builds of cryostat-reports need to fully exercise the rules report generator code paths. This means the JFR file used needs to contain events of all types that are checked for by any of the rule implementations in the JMC version used by cryostat-reports, which is dictated by the cryostat-core version.

Using Cryostat's ALL meta-template and running a recording on a target for a while almost does the trick:

all.jfr.zip (ZIP containing a single .jfr file)

This was collected by running the ALL meta-template for 5 minutes.

overview.html.txt (HTML report document renamed to .txt so GitHub will allow it to be uploaded...)

image

Some of the rules are still ignored and code paths therefore unexecuted.

@andrewazores
Copy link
Member Author

andrewazores commented Dec 9, 2021

Can these event types be explicitly created and committed in application code to ensure they appear in the flight recording? If so, the "full-featured" recording could be created by a simple Java program that simply launches, starts a recording on itself, creates and commits events of each required kind (all the ones processed by rules - can we enumerate these from JMC classes so they aren't hardcoded, too?), then dumps the recording to a file and exits. This could then be hooked into the Maven toolchain for native builds of this project.

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

No branches or pull requests

1 participant