On Thu, 22 Apr 2021 16:00:32 GMT, Jaroslav Bachorik <jbacho...@openjdk.org> wrote:
>> With this change it becomes possible to surface various cgroup level metrics >> (available via `jdk.internal.platform.Metrics`) as JFR events. >> >> Only a subset of the metrics exposed by `jdk.internal.platform.Metrics` is >> turned into JFR events to start with. >> * CPU related metrics >> * Memory related metrics >> * I/O related metrics >> >> For each of those subsystems a configuration data will be emitted as well. >> The initial proposal is to emit the configuration data events at least once >> per chunk and the metrics values at 30 seconds interval. >> By using these values the emitted events seem to contain useful information >> without increasing overhead (the metrics values are read from `/proc` >> filesystem so that should not be done too frequently). > > Jaroslav Bachorik has updated the pull request with a new target base due to > a merge or a rebase. The incremental webrev excludes the unrelated changes > brought in by the merge/rebase. The pull request contains 13 additional > commits since the last revision: > > - Prevent event container bytecode generation if no container present > - Fix event metadata > - Roll back conditional registration of container events > - Remove container events flag > - Remove trailing spaces > - Doh > - Report container type and register events conditionally > - Remove unused test files > - Initial test support for JFR container events > - Update the JFR control files > - ... and 3 more: > https://git.openjdk.java.net/jdk/compare/904d9495...04c3f092 src/jdk.jfr/share/classes/jdk/jfr/internal/Utils.java line 729: > 727: > 728: public static boolean shouldSkipBytecode(String eventName, Class<?> > superClass) { > 729: if > (!superClass.getName().equals("jdk.jfr.events.AbstractJDKEvent")) { Was there a problem checking against the class instance? If so, perhaps you could add a check that the class is in the boot class loader (null). src/jdk.jfr/share/classes/jdk/jfr/internal/Utils.java line 737: > 735: private static Metrics getMetrics() { > 736: if (metrics == null) { > 737: metrics = Metrics.systemMetrics(); Will this not lead to a lookup every time in an non-container environment? ------------- PR: https://git.openjdk.java.net/jdk/pull/3126