On Wed, 26 Jun 2024 17:00:23 GMT, Erik Gahlin <egah...@openjdk.org> wrote:
> All types in JFR is assigned an ID, regardless if they are events or a > structs. If we are going to index into the array, with the event type ID, > must not the holes be filled with something? Or are all native event type IDs > first? It looks like we [index using the `JfrEventId` enum](https://github.com/openjdk/jdk/blob/master/src/hotspot/share/jfr/recorder/jfrEventSetting.inline.hpp#L30-L56). This enum [only enumerates events](https://github.com/openjdk/jdk/blob/master/make/src/classes/build/tools/jfr/GenerateJfrFiles.java#L690-L695), not all types. So I don't think there will actually be any holes. I'm a bit confused about why structs were included originally. It seems like it was intentional: ["_Then, to make it easy to debug, add named struct members also_"](https://github.com/openjdk/jdk/blob/master/make/src/classes/build/tools/jfr/GenerateJfrFiles.java#L667). But I can't see why it makes sense to group them with events in this way. ------------- PR Comment: https://git.openjdk.org/jdk/pull/19891#issuecomment-2192401387