RFR: 8256618: Zero: Linux x86_32 build still fails [v4]
David Holmes
david.holmes at oracle.com
Tue Nov 24 01:47:00 UTC 2020
On 23/11/2020 5:39 pm, Aleksey Shipilev wrote:
> On Sun, 22 Nov 2020 22:53:34 GMT, David Holmes <dholmes at openjdk.org> wrote:
>
>> I guess I'm somewhat surprised that Zero doesn't need anything that is in os_linux_x86.cpp when building for x86. It sets a bad precedent to move CPU specific code to shared code just because zero doesn't conform to the expected use of cpu specific code.
>
> The way current sources are structured, Zero is the "cpu" unto itself. See that we have `os_cpu/linux_x86` and `os_cpu/linux_zero`, `os/linux` and `os/zero`, etc. I agree it is awkward and have consequences like this patch; it has even more consequences for error handling that wants to do arch-specific decoding...
That tends to argue for everything zero needs being explicitly in
linux_zero.*. While that may lead to code duplication of the cpu
specific code, I don't think a general solution is to pretend the code
isn't cpu-specific and to shove it out to os_linux.*.
> That said, the current patch just moves the IA32 definition to `os_linux.cpp`, where the IA32 use already is, and this IMO makes it a tad more consistent than it was before.
I'm not seeing the consistency argument here. os_linux.cpp is not
completely cpu agnostic (unfortunately) but this proposed change seems
far more significant than the pre-existing cases IMO.
>
>> Does Zero actually need this code, or could we make the call conditional?
>
> I think this code applies to all x86 variants. As the alternative, we can skip it for Zero, hoping that Zero x86 would never face a bug like this code tries to work around.
Hasn't zero functioned without this to-date?
Cheers,
David
> -------------
>
> PR: https://git.openjdk.java.net/jdk/pull/1310
>
More information about the hotspot-runtime-dev
mailing list