Re: RFR: 8287008: Improve tests for thread dumps in JSON format

2022-05-19 Thread Chris Plummer
On Thu, 19 May 2022 09:38:06 GMT, Alan Bateman wrote: > This is a test-only change to add some test infrastructure and improve the > testing of thread dumps in JSON format. The new tests added by JEP 425 for > this thread dump format search the JSON text for strings but don't parse it >

Re: RFR: 8286983: Add mention of "Preview Feature" for new loom related jdb and debug agent options [v2]

2022-05-19 Thread Chris Plummer
> As part of the loom integration, jdb added -trackvthreads and the debug agent > added "enumeratevthreads". The help text for these options should call out > that they are Preview Features. Chris Plummer has updated the pull request incrementally with one additional commit since the last

Integrated: 8280035: Use Class.isInstance instead of Class.isAssignableFrom where applicable

2022-05-19 Thread Andrey Turbanov
On Thu, 13 Jan 2022 08:25:22 GMT, Andrey Turbanov wrote: > Method `Class.isAssignableFrom` is often used in form of: > > if (clazz.isAssignableFrom(obj.getClass())) { > Such condition could be simplified to more shorter and performarnt code > > if (clazz.isInstance(obj)) { > >

Re: RFR: 8280035: Use Class.isInstance instead of Class.isAssignableFrom where applicable [v2]

2022-05-19 Thread Andrey Turbanov
On Thu, 31 Mar 2022 08:03:23 GMT, Andrey Turbanov wrote: >> Method `Class.isAssignableFrom` is often used in form of: >> >> if (clazz.isAssignableFrom(obj.getClass())) { >> Such condition could be simplified to more shorter and performarnt code >> >> if (clazz.isInstance(obj)) { >>

Re: RFR: 8280035: Use Class.isInstance instead of Class.isAssignableFrom where applicable [v2]

2022-05-19 Thread Roger Riggs
On Thu, 31 Mar 2022 08:03:23 GMT, Andrey Turbanov wrote: >> Method `Class.isAssignableFrom` is often used in form of: >> >> if (clazz.isAssignableFrom(obj.getClass())) { >> Such condition could be simplified to more shorter and performarnt code >> >> if (clazz.isInstance(obj)) { >>

Re: RFR: 8286212: Cgroup v1 initialization causes NPE on some systems [v3]

2022-05-19 Thread Ioi Lam
On Thu, 19 May 2022 19:59:18 GMT, Ioi Lam wrote: >>> What happens if cgroup_path is "/foo/bar" and _root is "/fo"? >> >> With a mount path of `/bar` this ends up being `/bar/o/bar`. Pretty strange, >> but then again it's a bit of a contrived example as those paths come from >> `/proc`

Re: RFR: 8286212: Cgroup v1 initialization causes NPE on some systems [v3]

2022-05-19 Thread Ioi Lam
On Thu, 19 May 2022 09:06:18 GMT, Severin Gehwolf wrote: >> src/hotspot/os/linux/cgroupV1Subsystem_linux.cpp line 63: >> >>> 61: } else { >>> 62: char *p = strstr(cgroup_path, _root); >>> 63: if (p != NULL && p == cgroup_path) { >> >> What happens if cgroup_path is

Re: RFR: 8284191: Replace usages of 'a the' in hotspot and java.base [v2]

2022-05-19 Thread Alexey Ivanov
On Thu, 19 May 2022 09:38:40 GMT, Kevin Walls wrote: >> Alexey Ivanov has updated the pull request incrementally with seven >> additional commits since the last revision: >> >> - ...set to the values... >> - ...will result in a Zip64 Extra (EXT) header >> - ...in addition to the main

Re: RFR: 8284191: Replace usages of 'a the' in hotspot and java.base [v2]

2022-05-19 Thread Alexey Ivanov
On Thu, 19 May 2022 08:47:47 GMT, Kevin Walls wrote: >> Alexey Ivanov has updated the pull request incrementally with seven >> additional commits since the last revision: >> >> - ...set to the values... >> - ...will result in a Zip64 Extra (EXT) header >> - ...in addition to the main

Re: RFR: 8284191: Replace usages of 'a the' in hotspot and java.base [v2]

2022-05-19 Thread Alexey Ivanov
> Replaces usages of articles that follow each other in all combinations: > a/the, an?/an?, the/the… > > Also, I fixed a couple of spelling mistakes. Alexey Ivanov has updated the pull request incrementally with seven additional commits since the last revision: - ...set to the values... -

Re: RFR: 8287008: Improve tests for thread dumps in JSON format

2022-05-19 Thread Alan Bateman
On Thu, 19 May 2022 09:38:06 GMT, Alan Bateman wrote: > This is a test-only change to add some test infrastructure and improve the > testing of thread dumps in JSON format. The new tests added by JEP 425 for > this thread dump format search the JSON text for strings but don't parse it >

Re: RFR: 8287008: Improve tests for thread dumps in JSON format

2022-05-19 Thread Chris Plummer
On Thu, 19 May 2022 09:38:06 GMT, Alan Bateman wrote: > This is a test-only change to add some test infrastructure and improve the > testing of thread dumps in JSON format. The new tests added by JEP 425 for > this thread dump format search the JSON text for strings but don't parse it >

Re: RFR: 8287008: Improve tests for thread dumps in JSON format

2022-05-19 Thread Alan Bateman
On Thu, 19 May 2022 15:28:01 GMT, Chris Plummer wrote: > It would be useful if ThreadDump.java contained a comment with a description > of the JSON file syntax. It could either be in the form of a simple dump or > as a simple syntactic description. Still TBD on where the JSON "schema" will be

Re: RFR: 8286983: Add mention of "Preview Feature" for new loom related jdb and debug agent options

2022-05-19 Thread Chris Plummer
On Thu, 19 May 2022 13:10:50 GMT, Alan Bateman wrote: >> As part of the loom integration, jdb added -trackvthreads and the debug >> agent added "enumeratevthreads". The help text for these options should call >> out that they are Preview Features. > >

Re: RFR: 8287008: Improve tests for thread dumps in JSON format

2022-05-19 Thread Chris Plummer
On Thu, 19 May 2022 09:38:06 GMT, Alan Bateman wrote: > This is a test-only change to add some test infrastructure and improve the > testing of thread dumps in JSON format. The new tests added by JEP 425 for > this thread dump format search the JSON text for strings but don't parse it >

Re: RFR: 8284191: Replace usages of 'a the' in hotspot and java.base

2022-05-19 Thread Xue-Lei Andrew Fan
On Thu, 19 May 2022 09:31:07 GMT, Kevin Walls wrote: >> Replaces usages of articles that follow each other in all combinations: >> a/the, an?/an?, the/the… >> >> Also, I fixed a couple of spelling mistakes. > > test/jdk/sun/security/tools/jarsigner/OldSig.java line 32: > >> 30: /* >> 31: *

Re: RFR: 8284191: Replace usages of 'a the' in hotspot and java.base

2022-05-19 Thread Xue-Lei Andrew Fan
On Wed, 18 May 2022 13:27:24 GMT, Alexey Ivanov wrote: > Replaces usages of articles that follow each other in all combinations: > a/the, an?/an?, the/the… > > Also, I fixed a couple of spelling mistakes. The security/crypto parts look good to me. - Marked as reviewed by xuelei

Re: RFR: 8286983: Add mention of "Preview Feature" for new loom related jdb and debug agent options

2022-05-19 Thread Alan Bateman
On Thu, 19 May 2022 00:10:15 GMT, Chris Plummer wrote: > As part of the loom integration, jdb added -trackvthreads and the debug agent > added "enumeratevthreads". The help text for these options should call out > that they are Preview Features.

RFR: 8287008: Improve tests for thread dumps in JSON format

2022-05-19 Thread Alan Bateman
This is a test-only change to add some test infrastructure and improve the testing of thread dumps in JSON format. The new tests added by JEP 425 for this thread dump format search the JSON text for strings but don't parse it completely. These tests can be improved with a test class that

Re: RFR: 8286212: Cgroup v1 initialization causes NPE on some systems [v3]

2022-05-19 Thread Severin Gehwolf
On Thu, 19 May 2022 05:58:31 GMT, Ioi Lam wrote: >> Severin Gehwolf has updated the pull request incrementally with two >> additional commits since the last revision: >> >> - Refactor hotspot gtest >> - Separate into function. Fix comment. > > src/hotspot/os/linux/cgroupV1Subsystem_linux.cpp

Re: RFR: 8284191: Replace usages of 'a the' in hotspot and java.base

2022-05-19 Thread Kevin Walls
On Wed, 18 May 2022 13:27:24 GMT, Alexey Ivanov wrote: > Replaces usages of articles that follow each other in all combinations: > a/the, an?/an?, the/the… > > Also, I fixed a couple of spelling mistakes. OK. I started with serviceability but then went through everything as it's hard to

Re: RFR: 8284191: Replace usages of 'a the' in hotspot and java.base

2022-05-19 Thread Kevin Walls
On Wed, 18 May 2022 13:27:24 GMT, Alexey Ivanov wrote: > Replaces usages of articles that follow each other in all combinations: > a/the, an?/an?, the/the… > > Also, I fixed a couple of spelling mistakes. test/jdk/jdk/nio/zipfs/TestLocOffsetFromZip64EF.java line 84: > 82: > 83: /** >

Re: RFR: 8286212: Cgroup v1 initialization causes NPE on some systems [v3]

2022-05-19 Thread Severin Gehwolf
On Thu, 19 May 2022 06:00:06 GMT, Ioi Lam wrote: >> Severin Gehwolf has updated the pull request incrementally with two >> additional commits since the last revision: >> >> - Refactor hotspot gtest >> - Separate into function. Fix comment. > > src/hotspot/os/linux/cgroupV1Subsystem_linux.cpp

Re: RFR: 8284191: Replace usages of 'a the' in hotspot and java.base

2022-05-19 Thread Kevin Walls
On Wed, 18 May 2022 13:27:24 GMT, Alexey Ivanov wrote: > Replaces usages of articles that follow each other in all combinations: > a/the, an?/an?, the/the… > > Also, I fixed a couple of spelling mistakes. src/hotspot/share/cds/filemap.cpp line 1914: > 1912: > 1913: // the current value

Re: RFR: 8286212: Cgroup v1 initialization causes NPE on some systems [v3]

2022-05-19 Thread Severin Gehwolf
On Thu, 19 May 2022 05:53:19 GMT, Ioi Lam wrote: >> Severin Gehwolf has updated the pull request incrementally with two >> additional commits since the last revision: >> >> - Refactor hotspot gtest >> - Separate into function. Fix comment. > > src/hotspot/os/linux/cgroupV1Subsystem_linux.cpp

Re: RFR: 8284191: Replace usages of 'a the' in hotspot and java.base

2022-05-19 Thread Kevin Walls
On Wed, 18 May 2022 13:27:24 GMT, Alexey Ivanov wrote: > Replaces usages of articles that follow each other in all combinations: > a/the, an?/an?, the/the… > > Also, I fixed a couple of spelling mistakes. src/hotspot/share/interpreter/bytecodeUtils.cpp line 186: > 184: static const int

Re: RFR: 8284191: Replace usages of 'a the' in hotspot and java.base

2022-05-19 Thread Kevin Walls
On Wed, 18 May 2022 13:27:24 GMT, Alexey Ivanov wrote: > Replaces usages of articles that follow each other in all combinations: > a/the, an?/an?, the/the… > > Also, I fixed a couple of spelling mistakes. src/hotspot/share/opto/graphKit.cpp line 3626: > 3624: // The optional arguments are

Re: RFR: 8284191: Replace usages of 'a the' in hotspot and java.base

2022-05-19 Thread Kevin Walls
On Wed, 18 May 2022 13:27:24 GMT, Alexey Ivanov wrote: > Replaces usages of articles that follow each other in all combinations: > a/the, an?/an?, the/the… > > Also, I fixed a couple of spelling mistakes. src/jdk.jdi/share/classes/com/sun/jdi/ClassType.java line 348: > 346: > 347: /** >

Re: RFR: 8284191: Replace usages of 'a the' in hotspot and java.base

2022-05-19 Thread Kevin Walls
On Wed, 18 May 2022 13:27:24 GMT, Alexey Ivanov wrote: > Replaces usages of articles that follow each other in all combinations: > a/the, an?/an?, the/the… > > Also, I fixed a couple of spelling mistakes. src/jdk.sctp/share/classes/com/sun/nio/sctp/ShutdownNotification.java line 28: > 26: >

Re: RFR: 8286212: Cgroup v1 initialization causes NPE on some systems [v2]

2022-05-19 Thread Severin Gehwolf
On Thu, 19 May 2022 07:02:13 GMT, Thomas Stuefe wrote: >> I'm not convinced the extra function makes the code more readable, but here >> it is. I can revert back if this is too much. > > @jerboaa Feel free to go back to your original variant. This was only a > proposal. understood.

Re: RFR: 8286212: Cgroup v1 initialization causes NPE on some systems [v2]

2022-05-19 Thread Thomas Stuefe
On Wed, 18 May 2022 18:10:45 GMT, Severin Gehwolf wrote: >> @iklam yes I meant `Find the longest common prefix`. Fixed the comment. > > I'm not convinced the extra function makes the code more readable, but here > it is. I can revert back if this is too much. @jerboaa Feel free to go back to

Re: RFR: 8286212: Cgroup v1 initialization causes NPE on some systems [v3]

2022-05-19 Thread Ioi Lam
On Wed, 18 May 2022 18:14:52 GMT, Severin Gehwolf wrote: >> Please review this change to the cgroup v1 subsystem which makes it more >> resilient on some of the stranger systems. Unfortunately, I wasn't able to >> re-create a similar system as the reporter. The idea of using the longest >>