RFR: 5560: Support new nio events in JDK 10.

Henrik Dafgård hdafgard at openjdk.org
Fri Nov 24 16:07:20 UTC 2023


On Mon, 13 Nov 2023 21:17:23 GMT, Suchita Chaturvedi <schaturvedi at openjdk.org> wrote:

> This PR addresses the enhancement request of missing event File Force.
> 1. A new rule File Force has been added to the "Automated Analysis Page", Under Java Application -> File I/O.
> <img width="368" alt="image" src="https://github.com/openjdk/jmc/assets/11155712/833747bf-39b8-455f-9081-f7a23a6de3da">
> 
> 2. "File I/O" screen is updated to accomodate values for the new event. There are two new columns added - Force Count, Update Metadata. Both these columns are hidden by default and user need to make them visible by right clicking the header of the table. Also the corresponding chart for File Force Event has been introduced.
> <img width="960" alt="image" src="https://github.com/openjdk/jmc/assets/11155712/027400c5-ae83-499e-b4b5-531fe3b74e6a">
> 
> 3. There is a new preference/configuration introduced for the File Force Rule.
>  
> <img width="313" alt="image" src="https://github.com/openjdk/jmc/assets/11155712/968b341e-e0cb-4d21-9288-71d56a0b5883">

core/org.openjdk.jmc.flightrecorder.rules.jdk/src/main/java/org/openjdk/jmc/flightrecorder/rules/jdk/io/FileForceRule.java line 68:

> 66: import org.owasp.encoder.Encode;
> 67: 
> 68: public class FileForceRule implements IRule {

I'd like to see some testing of this rule and some clearer explanation of what is meant by the rule. When is it warning, what is it warning for and what (if anything) can the user do about that? If there's nothing to be done and there's no clear _problem_ with a long forced file update then we should maybe scrap the rule entirely?

I think having a UI that shows if 1) file force events are enabled and 2) if any such events occurred and if the force write was metadata only or not would be enough for supporting this event type. This is because the file force event might also be very valuable to know if it did _not_ happen and you expected that it should, i.e. an important update that needed to be written down to disk wasn't and then the application terminated unexpectedly. So when a user investigates what went wrong using a JFR dumped on exit that's the info they need, the _absence_ of a file force event. However, this logic is hard to formalize as a _rule_ so I think we might be better off without one.

-------------

PR Review Comment: https://git.openjdk.org/jmc/pull/533#discussion_r1404496252


More information about the jmc-dev mailing list