RFR: 8317697: refactor-encapsulate x86 VM_Version::CpuidInfo [v2]

David Holmes dholmes at openjdk.org
Mon Oct 23 06:04:38 UTC 2023


On Mon, 23 Oct 2023 03:31:58 GMT, Jan Kratochvil <jkratochvil at openjdk.org> wrote:

>> In OpenJDK project CRaC I had a [need to fetch new CpuidInfo without affecting the existing one](https://github.com/openjdk/crac/commit/ed4ad9ba31b77732dcede2eb743b2f389ec9a0fe#diff-6ed856c57ddbe33e49883adb7c52ec51ed377e5f697dfd6d8bea505a97bfc5a5R2743).
>> Which led me to encapsulate the object more and I think this no-functionality-change patch is even appropriate for JDK.
>> I am sure interested primarily to reduce the CRaC patchset boilerplate.
>
> Jan Kratochvil 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 three additional commits since the last revision:
> 
>  - Make CpuidInfo a class
>  - Merge branch 'master' into flagsencaps
>  - 8317697: refactor-encapsulate x86 VM_Version::CpuidInfo

src/hotspot/cpu/x86/vm_version_x86.hpp line 527:

> 525:   };
> 526: 
> 527:   class CpuidInfo : public _CpuidInfo {

Why not just declare the original `CpuidInfo` as a class instead of extending the struct ???

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

PR Review Comment: https://git.openjdk.org/jdk/pull/16093#discussion_r1368163276


More information about the hotspot-dev mailing list