RFR: 8264868: Reduce inclusion of registerMap.hpp and register.hpp

classic Classic list List threaded Threaded
8 messages Options
Reply | Threaded
Open this post in threaded view
|

RFR: 8264868: Reduce inclusion of registerMap.hpp and register.hpp

Ioi Lam-2
Register.hpp is included 815 times, and registerMap.hpp is include 862 times (out of about 1000 HotSpot .o files).

This can be reduced by refactoring the popular header file **frame.hpp**, so that it doesn't include registerMap.hpp anymore. This reduces the number of .o files that include register.hpp to 612, and that of registerMap.hpp to 109.

The total number of lines of C++ code compiled for HotSpot is reduced by about 0.5%.

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

Commit messages:
 - 8264868: Reduce inclusion of registerMap.hpp and register.hpp

Changes: https://git.openjdk.java.net/jdk/pull/3384/files
 Webrev: https://webrevs.openjdk.java.net/?repo=jdk&pr=3384&range=00
  Issue: https://bugs.openjdk.java.net/browse/JDK-8264868
  Stats: 263 lines in 27 files changed: 203 ins; 51 del; 9 mod
  Patch: https://git.openjdk.java.net/jdk/pull/3384.diff
  Fetch: git fetch https://git.openjdk.java.net/jdk pull/3384/head:pull/3384

PR: https://git.openjdk.java.net/jdk/pull/3384
Reply | Threaded
Open this post in threaded view
|

Re: RFR: 8264868: Reduce inclusion of registerMap.hpp and register.hpp

Coleen Phillimore-3
On Wed, 7 Apr 2021 21:03:10 GMT, Ioi Lam <[hidden email]> wrote:

> Register.hpp is included 815 times, and registerMap.hpp is include 862 times (out of about 1000 HotSpot .o files).
>
> This can be reduced by refactoring the popular header file **frame.hpp**, so that it doesn't include registerMap.hpp anymore. This reduces the number of .o files that include register.hpp to 612, and that of registerMap.hpp to 109.
>
> The total number of lines of C++ code compiled for HotSpot is reduced by about 0.5%.

I like StackFrameStream getting its own header file.

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

Marked as reviewed by coleenp (Reviewer).

PR: https://git.openjdk.java.net/jdk/pull/3384
Reply | Threaded
Open this post in threaded view
|

Re: RFR: 8264868: Reduce inclusion of registerMap.hpp and register.hpp

David Holmes-2
In reply to this post by Ioi Lam-2
On Wed, 7 Apr 2021 21:03:10 GMT, Ioi Lam <[hidden email]> wrote:

> Register.hpp is included 815 times, and registerMap.hpp is include 862 times (out of about 1000 HotSpot .o files).
>
> This can be reduced by refactoring the popular header file **frame.hpp**, so that it doesn't include registerMap.hpp anymore. This reduces the number of .o files that include register.hpp to 612, and that of registerMap.hpp to 109.
>
> The total number of lines of C++ code compiled for HotSpot is reduced by about 0.5%.

Hi Ioi,

It isn't at all obvious to me how the stackFrameStream refactoring relates to the topic of this RFE. :)

But I don't see anything amiss, and if it improves build time etc, then it seems fine.

Thanks,
David

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

Marked as reviewed by dholmes (Reviewer).

PR: https://git.openjdk.java.net/jdk/pull/3384
Reply | Threaded
Open this post in threaded view
|

Re: RFR: 8264868: Reduce inclusion of registerMap.hpp and register.hpp

Ioi Lam-2
On Fri, 9 Apr 2021 04:56:32 GMT, David Holmes <[hidden email]> wrote:

> Hi Ioi,
>
> It isn't at all obvious to me how the stackFrameStream refactoring relates to the topic of this RFE. :)
>
> But I don't see anything amiss, and if it improves build time etc, then it seems fine.
>
> Thanks,
> David

Thanks for the review!

`StackFrameStream` was the only thing in frame.hpp that needed to use `RegisterMap`. Since `StackFrameStream` is used by only 15 .o files, I moved it to its own header file. This makes possible to decouple frame.hpp with registerMap.hpp.

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

PR: https://git.openjdk.java.net/jdk/pull/3384
Reply | Threaded
Open this post in threaded view
|

Re: RFR: 8264868: Reduce inclusion of registerMap.hpp and register.hpp

David Holmes
On 9/04/2021 3:45 pm, Ioi Lam wrote:

> On Fri, 9 Apr 2021 04:56:32 GMT, David Holmes <[hidden email]> wrote:
>
>> Hi Ioi,
>>
>> It isn't at all obvious to me how the stackFrameStream refactoring relates to the topic of this RFE. :)
>>
>> But I don't see anything amiss, and if it improves build time etc, then it seems fine.
>>
>> Thanks,
>> David
>
> Thanks for the review!
>
> `StackFrameStream` was the only thing in frame.hpp that needed to use `RegisterMap`. Since `StackFrameStream` is used by only 15 .o files, I moved it to its own header file. This makes possible to decouple frame.hpp with registerMap.hpp.

Ah! Got it.

Thanks,
David

> -------------
>
> PR: https://git.openjdk.java.net/jdk/pull/3384
>
Reply | Threaded
Open this post in threaded view
|

Re: RFR: 8264868: Reduce inclusion of registerMap.hpp and register.hpp [v2]

Ioi Lam-2
In reply to this post by Ioi Lam-2
> Register.hpp is included 815 times, and registerMap.hpp is include 862 times (out of about 1000 HotSpot .o files).
>
> This can be reduced by refactoring the popular header file **frame.hpp**, so that it doesn't include registerMap.hpp anymore. This reduces the number of .o files that include register.hpp to 612, and that of registerMap.hpp to 109.
>
> The total number of lines of C++ code compiled for HotSpot is reduced by about 0.5%.

Ioi Lam 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 two additional commits since the last revision:

 - Merge branch 'master' into 8264868-reduce-registerMap-hpp
 - 8264868: Reduce inclusion of registerMap.hpp and register.hpp

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

Changes:
  - all: https://git.openjdk.java.net/jdk/pull/3384/files
  - new: https://git.openjdk.java.net/jdk/pull/3384/files/507136ef..288658cf

Webrevs:
 - full: https://webrevs.openjdk.java.net/?repo=jdk&pr=3384&range=01
 - incr: https://webrevs.openjdk.java.net/?repo=jdk&pr=3384&range=00-01

  Stats: 6195 lines in 169 files changed: 4507 ins; 1090 del; 598 mod
  Patch: https://git.openjdk.java.net/jdk/pull/3384.diff
  Fetch: git fetch https://git.openjdk.java.net/jdk pull/3384/head:pull/3384

PR: https://git.openjdk.java.net/jdk/pull/3384
Reply | Threaded
Open this post in threaded view
|

Re: RFR: 8264868: Reduce inclusion of registerMap.hpp and register.hpp [v2]

Ioi Lam-2
In reply to this post by Coleen Phillimore-3
On Wed, 7 Apr 2021 21:37:08 GMT, Coleen Phillimore <[hidden email]> wrote:

>> Ioi Lam 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 two additional commits since the last revision:
>>
>>  - Merge branch 'master' into 8264868-reduce-registerMap-hpp
>>  - 8264868: Reduce inclusion of registerMap.hpp and register.hpp
>
> I like StackFrameStream getting its own header file.

Thanks @coleenp and @dholmes-ora for the review.

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

PR: https://git.openjdk.java.net/jdk/pull/3384
Reply | Threaded
Open this post in threaded view
|

Integrated: 8264868: Reduce inclusion of registerMap.hpp and register.hpp

Ioi Lam-2
In reply to this post by Ioi Lam-2
On Wed, 7 Apr 2021 21:03:10 GMT, Ioi Lam <[hidden email]> wrote:

> Register.hpp is included 815 times, and registerMap.hpp is include 862 times (out of about 1000 HotSpot .o files).
>
> This can be reduced by refactoring the popular header file **frame.hpp**, so that it doesn't include registerMap.hpp anymore. This reduces the number of .o files that include register.hpp to 612, and that of registerMap.hpp to 109.
>
> The total number of lines of C++ code compiled for HotSpot is reduced by about 0.5%.

This pull request has now been integrated.

Changeset: c15680e7
Author:    Ioi Lam <[hidden email]>
URL:       https://git.openjdk.java.net/jdk/commit/c15680e7
Stats:     263 lines in 27 files changed: 203 ins; 51 del; 9 mod

8264868: Reduce inclusion of registerMap.hpp and register.hpp

Reviewed-by: coleenp, dholmes

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

PR: https://git.openjdk.java.net/jdk/pull/3384