Re: RFR: 8329332: Remove CompiledMethod and CodeBlobLayout classes [v4]

2024-04-04 Thread Vladimir Kozlov
On Thu, 4 Apr 2024 17:31:53 GMT, Stefan Karlsson wrote: >> Vladimir Kozlov has updated the pull request incrementally with one >> additional commit since the last revision: >> >> Address next round of comments > > Looks good. Thank you, @stefank, @iwanowww, @dean-long and @xmas92 for

Re: RFR: 8329332: Remove CompiledMethod and CodeBlobLayout classes [v4]

2024-04-04 Thread Stefan Karlsson
On Thu, 4 Apr 2024 17:04:30 GMT, Vladimir Kozlov wrote: >> Revert [JDK-8152664](https://bugs.openjdk.org/browse/JDK-8152664) RFE >> [changes](https://github.com/openjdk/jdk/commit/b853eb7f5ca24eeeda18acbb14287f706499c365) >> which was used for AOT [JEP 295](https://openjdk.org/jeps/295) >>

Re: RFR: 8329332: Remove CompiledMethod and CodeBlobLayout classes [v4]

2024-04-04 Thread Vladimir Kozlov
> Revert [JDK-8152664](https://bugs.openjdk.org/browse/JDK-8152664) RFE > [changes](https://github.com/openjdk/jdk/commit/b853eb7f5ca24eeeda18acbb14287f706499c365) > which was used for AOT [JEP 295](https://openjdk.org/jeps/295) > implementation in JDK 9. The code was left in HotSpot assuming

Re: RFR: 8329332: Remove CompiledMethod and CodeBlobLayout classes [v3]

2024-04-04 Thread Vladimir Kozlov
On Thu, 4 Apr 2024 07:54:16 GMT, Stefan Karlsson wrote: >> Vladimir Kozlov 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 five additional >>

Re: RFR: 8329332: Remove CompiledMethod and CodeBlobLayout classes [v3]

2024-04-04 Thread Vladimir Kozlov
On Thu, 4 Apr 2024 16:03:12 GMT, Stefan Karlsson wrote: >> Quote: "an" goes before words that begin with vowels. > > I don't think that holds if the 'n' is pronounced the way nmethod is > pronounced. `grep` shows that we have both cases but `an nmethod` is used more. - PR Review

Re: RFR: 8329332: Remove CompiledMethod and CodeBlobLayout classes [v3]

2024-04-04 Thread Vladimir Kozlov
On Thu, 4 Apr 2024 16:16:41 GMT, Vladimir Kozlov wrote: >> I don't think that holds if the 'n' is pronounced the way nmethod is >> pronounced. > > `grep` shows that we have both cases but `an nmethod` is used more. I will fix it here as you suggested but I am not touching other places.

Re: RFR: 8329332: Remove CompiledMethod and CodeBlobLayout classes [v3]

2024-04-04 Thread Vladimir Kozlov
On Thu, 4 Apr 2024 07:51:47 GMT, Stefan Karlsson wrote: >> Vladimir Kozlov 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 five additional >>

Re: RFR: 8329332: Remove CompiledMethod and CodeBlobLayout classes [v3]

2024-04-04 Thread Stefan Karlsson
On Thu, 4 Apr 2024 15:56:34 GMT, Vladimir Kozlov wrote: >> src/hotspot/share/gc/shared/gcBehaviours.hpp line 31: >> >>> 29: #include "oops/oopsHierarchy.hpp" >>> 30: >>> 31: // This is the behaviour for checking if a nmethod is unloading >> >> Maybe this should be *an* nmethod? > > Quote:

Re: RFR: 8329332: Remove CompiledMethod and CodeBlobLayout classes [v3]

2024-04-04 Thread Vladimir Kozlov
On Thu, 4 Apr 2024 07:31:24 GMT, Stefan Karlsson wrote: >> Vladimir Kozlov 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 five additional >>

Re: RFR: 8329332: Remove CompiledMethod and CodeBlobLayout classes [v3]

2024-04-04 Thread Vladimir Kozlov
On Thu, 4 Apr 2024 07:26:21 GMT, Stefan Karlsson wrote: >> Vladimir Kozlov 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 five additional >>

Re: RFR: 8329332: Remove CompiledMethod and CodeBlobLayout classes [v3]

2024-04-04 Thread Stefan Karlsson
On Thu, 4 Apr 2024 00:05:20 GMT, Vladimir Kozlov wrote: >> Revert [JDK-8152664](https://bugs.openjdk.org/browse/JDK-8152664) RFE >> [changes](https://github.com/openjdk/jdk/commit/b853eb7f5ca24eeeda18acbb14287f706499c365) >> which was used for AOT [JEP 295](https://openjdk.org/jeps/295) >>

Re: RFR: 8329332: Remove CompiledMethod and CodeBlobLayout classes [v3]

2024-04-04 Thread Axel Boldt-Christmas
On Thu, 4 Apr 2024 00:05:20 GMT, Vladimir Kozlov wrote: >> Revert [JDK-8152664](https://bugs.openjdk.org/browse/JDK-8152664) RFE >> [changes](https://github.com/openjdk/jdk/commit/b853eb7f5ca24eeeda18acbb14287f706499c365) >> which was used for AOT [JEP 295](https://openjdk.org/jeps/295) >>

Re: RFR: 8329332: Remove CompiledMethod and CodeBlobLayout classes [v3]

2024-04-03 Thread Vladimir Kozlov
On Thu, 4 Apr 2024 00:05:20 GMT, Vladimir Kozlov wrote: >> Revert [JDK-8152664](https://bugs.openjdk.org/browse/JDK-8152664) RFE >> [changes](https://github.com/openjdk/jdk/commit/b853eb7f5ca24eeeda18acbb14287f706499c365) >> which was used for AOT [JEP 295](https://openjdk.org/jeps/295) >>

Re: RFR: 8329332: Remove CompiledMethod and CodeBlobLayout classes [v3]

2024-04-03 Thread Vladimir Kozlov
> Revert [JDK-8152664](https://bugs.openjdk.org/browse/JDK-8152664) RFE > [changes](https://github.com/openjdk/jdk/commit/b853eb7f5ca24eeeda18acbb14287f706499c365) > which was used for AOT [JEP 295](https://openjdk.org/jeps/295) > implementation in JDK 9. The code was left in HotSpot assuming

Re: RFR: 8329332: Remove CompiledMethod and CodeBlobLayout classes [v2]

2024-04-03 Thread Vladimir Kozlov
On Wed, 3 Apr 2024 17:55:38 GMT, Stefan Karlsson wrote: >> No, `CodeCache::blob_count()` uses different macro `FOR_ALL_HEAPS(heap)` >> because it looks for all code blobs, not only nmethods. >> >> `CodeCache::nmethod_count()` is the only place where `FOR_ALL_NMETHOD_HEAPS >> ` was used. So I

Re: RFR: 8329332: Remove CompiledMethod and CodeBlobLayout classes [v2]

2024-04-03 Thread Vladimir Kozlov
On Wed, 3 Apr 2024 17:50:15 GMT, Stefan Karlsson wrote: >> No special rules here. I simply want to see all `virtual` methods explicitly >> and `override` is required by C++. >> I would like to keep it this way in these changes. I am investigating >> possibility to convert all these virtual

Re: RFR: 8329332: Remove CompiledMethod and CodeBlobLayout classes [v2]

2024-04-03 Thread Vladimir Kozlov
On Mon, 1 Apr 2024 21:07:31 GMT, Vladimir Kozlov wrote: >> Revert [JDK-8152664](https://bugs.openjdk.org/browse/JDK-8152664) RFE >> [changes](https://github.com/openjdk/jdk/commit/b853eb7f5ca24eeeda18acbb14287f706499c365) >> which was used for AOT [JEP 295](https://openjdk.org/jeps/295) >>

Re: RFR: 8329332: Remove CompiledMethod and CodeBlobLayout classes [v2]

2024-04-03 Thread Vladimir Kozlov
On Wed, 3 Apr 2024 16:00:01 GMT, Stefan Karlsson wrote: >> Vladimir Kozlov has updated the pull request incrementally with one >> additional commit since the last revision: >> >> Removed not_used state of nmethod > > Nice! > > We've wanted to clean up some interfaces between the CodeCache

Re: RFR: 8329332: Remove CompiledMethod and CodeBlobLayout classes [v2]

2024-04-03 Thread Vladimir Kozlov
On Wed, 3 Apr 2024 15:35:49 GMT, Stefan Karlsson wrote: >> Vladimir Kozlov has updated the pull request incrementally with one >> additional commit since the last revision: >> >> Removed not_used state of nmethod > > src/hotspot/share/gc/x/xUnload.cpp line 78: > >> 76: class

Re: RFR: 8329332: Remove CompiledMethod and CodeBlobLayout classes [v2]

2024-04-03 Thread Vladimir Kozlov
On Wed, 3 Apr 2024 15:49:00 GMT, Stefan Karlsson wrote: >> Vladimir Kozlov has updated the pull request incrementally with one >> additional commit since the last revision: >> >> Removed not_used state of nmethod > > src/hotspot/share/runtime/frame.cpp line 208: > >> 206: address

Re: RFR: 8329332: Remove CompiledMethod and CodeBlobLayout classes [v2]

2024-04-03 Thread Stefan Karlsson
On Wed, 3 Apr 2024 16:38:13 GMT, Vladimir Kozlov wrote: >> src/hotspot/share/code/codeCache.cpp line 1009: >> >>> 1007: int CodeCache::nmethod_count() { >>> 1008: int count = 0; >>> 1009: for (GrowableArrayIterator heap = >>> _nmethod_heaps->begin(); heap != _nmethod_heaps->end(); ++heap)

Re: RFR: 8329332: Remove CompiledMethod and CodeBlobLayout classes [v2]

2024-04-03 Thread Stefan Karlsson
On Wed, 3 Apr 2024 16:29:03 GMT, Vladimir Kozlov wrote: >> src/hotspot/share/code/codeBlob.hpp line 409: >> >>> 407: >>> 408: // GC/Verification support >>> 409: virtual void preserve_callee_argument_oops(frame fr, const >>> RegisterMap *reg_map, OopClosure* f) override { /* nothing to do

Re: RFR: 8329332: Remove CompiledMethod and CodeBlobLayout classes [v2]

2024-04-03 Thread Vladimir Kozlov
On Wed, 3 Apr 2024 15:30:00 GMT, Stefan Karlsson wrote: >> Vladimir Kozlov has updated the pull request incrementally with one >> additional commit since the last revision: >> >> Removed not_used state of nmethod > > src/hotspot/share/compiler/compileBroker.cpp line 1379: > >> 1377: if

Re: RFR: 8329332: Remove CompiledMethod and CodeBlobLayout classes [v2]

2024-04-03 Thread Vladimir Kozlov
On Wed, 3 Apr 2024 15:12:31 GMT, Stefan Karlsson wrote: >> Vladimir Kozlov has updated the pull request incrementally with one >> additional commit since the last revision: >> >> Removed not_used state of nmethod > > src/hotspot/share/code/nmethod.cpp line 812: > >> 810: // By calling

Re: RFR: 8329332: Remove CompiledMethod and CodeBlobLayout classes [v2]

2024-04-03 Thread Vladimir Kozlov
On Wed, 3 Apr 2024 15:01:22 GMT, Stefan Karlsson wrote: >> Vladimir Kozlov has updated the pull request incrementally with one >> additional commit since the last revision: >> >> Removed not_used state of nmethod > > src/hotspot/share/code/codeCache.cpp line 1009: > >> 1007: int

Re: RFR: 8329332: Remove CompiledMethod and CodeBlobLayout classes [v2]

2024-04-03 Thread Vladimir Kozlov
On Wed, 3 Apr 2024 14:44:03 GMT, Stefan Karlsson wrote: >> Vladimir Kozlov has updated the pull request incrementally with one >> additional commit since the last revision: >> >> Removed not_used state of nmethod > > src/hotspot/share/code/codeBlob.hpp line 409: > >> 407: >> 408: //

Re: RFR: 8329332: Remove CompiledMethod and CodeBlobLayout classes [v2]

2024-04-03 Thread Vladimir Kozlov
On Wed, 3 Apr 2024 02:55:52 GMT, Vladimir Ivanov wrote: > What about `CompiledMethod_lock`? There's no `CompiledMethod` anymore, but > the lock name still refers to it. It was different changes [JDK-8226705](https://bugs.openjdk.org/browse/JDK-8226705). Renaming it will complicate these

Re: RFR: 8329332: Remove CompiledMethod and CodeBlobLayout classes [v2]

2024-04-03 Thread Stefan Karlsson
On Mon, 1 Apr 2024 21:07:31 GMT, Vladimir Kozlov wrote: >> Revert [JDK-8152664](https://bugs.openjdk.org/browse/JDK-8152664) RFE >> [changes](https://github.com/openjdk/jdk/commit/b853eb7f5ca24eeeda18acbb14287f706499c365) >> which was used for AOT [JEP 295](https://openjdk.org/jeps/295) >>

Re: RFR: 8329332: Remove CompiledMethod and CodeBlobLayout classes [v2]

2024-04-02 Thread Vladimir Ivanov
On Mon, 1 Apr 2024 21:07:31 GMT, Vladimir Kozlov wrote: >> Revert [JDK-8152664](https://bugs.openjdk.org/browse/JDK-8152664) RFE >> [changes](https://github.com/openjdk/jdk/commit/b853eb7f5ca24eeeda18acbb14287f706499c365) >> which was used for AOT [JEP 295](https://openjdk.org/jeps/295) >>

Re: RFR: 8329332: Remove CompiledMethod and CodeBlobLayout classes [v2]

2024-04-01 Thread Vladimir Kozlov
On Mon, 1 Apr 2024 21:07:31 GMT, Vladimir Kozlov wrote: >> Revert [JDK-8152664](https://bugs.openjdk.org/browse/JDK-8152664) RFE >> [changes](https://github.com/openjdk/jdk/commit/b853eb7f5ca24eeeda18acbb14287f706499c365) >> which was used for AOT [JEP 295](https://openjdk.org/jeps/295) >>

Re: RFR: 8329332: Remove CompiledMethod and CodeBlobLayout classes [v2]

2024-04-01 Thread Vladimir Kozlov
> Revert [JDK-8152664](https://bugs.openjdk.org/browse/JDK-8152664) RFE > [changes](https://github.com/openjdk/jdk/commit/b853eb7f5ca24eeeda18acbb14287f706499c365) > which was used for AOT [JEP 295](https://openjdk.org/jeps/295) > implementation in JDK 9. The code was left in HotSpot assuming

Re: RFR: 8329332: Remove CompiledMethod and CodeBlobLayout classes

2024-04-01 Thread Vladimir Kozlov
On Mon, 1 Apr 2024 18:15:43 GMT, Dean Long wrote: > The `not_used` state was introduced for AOT. It can go away now. Good catch, Dean. I want to keep `nmethod::make_not_used()` method because we use it in Leyden to keep AOT code (outside of CodeCache):

Re: RFR: 8329332: Remove CompiledMethod and CodeBlobLayout classes

2024-04-01 Thread Vladimir Kozlov
On Mon, 1 Apr 2024 00:19:32 GMT, Fei Yang wrote: >> Revert [JDK-8152664](https://bugs.openjdk.org/browse/JDK-8152664) RFE >> [changes](https://github.com/openjdk/jdk/commit/b853eb7f5ca24eeeda18acbb14287f706499c365) >> which was used for AOT [JEP 295](https://openjdk.org/jeps/295) >>

Re: RFR: 8329332: Remove CompiledMethod and CodeBlobLayout classes

2024-04-01 Thread Dean Long
On Fri, 29 Mar 2024 19:35:45 GMT, Vladimir Kozlov wrote: > Revert [JDK-8152664](https://bugs.openjdk.org/browse/JDK-8152664) RFE > [changes](https://github.com/openjdk/jdk/commit/b853eb7f5ca24eeeda18acbb14287f706499c365) > which was used for AOT [JEP 295](https://openjdk.org/jeps/295) >

Re: RFR: 8329332: Remove CompiledMethod and CodeBlobLayout classes

2024-04-01 Thread Amit Kumar
On Fri, 29 Mar 2024 19:35:45 GMT, Vladimir Kozlov wrote: > Revert [JDK-8152664](https://bugs.openjdk.org/browse/JDK-8152664) RFE > [changes](https://github.com/openjdk/jdk/commit/b853eb7f5ca24eeeda18acbb14287f706499c365) > which was used for AOT [JEP 295](https://openjdk.org/jeps/295) >

Re: RFR: 8329332: Remove CompiledMethod and CodeBlobLayout classes

2024-03-31 Thread Fei Yang
On Fri, 29 Mar 2024 19:35:45 GMT, Vladimir Kozlov wrote: > Revert [JDK-8152664](https://bugs.openjdk.org/browse/JDK-8152664) RFE > [changes](https://github.com/openjdk/jdk/commit/b853eb7f5ca24eeeda18acbb14287f706499c365) > which was used for AOT [JEP 295](https://openjdk.org/jeps/295) >

RFR: 8329332: Remove CompiledMethod and CodeBlobLayout classes

2024-03-29 Thread Vladimir Kozlov
Revert [JDK-8152664](https://bugs.openjdk.org/browse/JDK-8152664) RFE [changes](https://github.com/openjdk/jdk/commit/b853eb7f5ca24eeeda18acbb14287f706499c365) which was used for AOT [JEP 295](https://openjdk.org/jeps/295) implementation in JDK 9. The code was left in HotSpot assuming it will