Re: RFC: Draft JEP: Generational ZGC
Hi Leslie, Could you test if this branch compiles as expected? https://github.com/stefank/jdk/tree/zgc_generational_found_old_initializatio... I asked around and it seems like array initialization uses copy-initialization of the elements, and that older GCCs didn't take the opportunity to convert the copying into move operations. Or something along those lines. I've restructured the code to prevent that problem. Thanks for reporting, StefanK On 2022-10-17 12:03, Leslie Zhai wrote:
Hi Stefan,
gcc 8.3.0 failed to work after the commit 7d0b267e87ec6120a74e5b6282c5e395786d2546: https://github.com/openjdk/zgc/commit/7d0b267e87ec6120a74e5b6282c5e395786d25...
Building target 'images' in configuration 'linux-aarch64-server-fastdebug' Updating support/modules_libs/java.base/server/libjvm.so due to 1 file(s) /home/zhaixiang/zgc/src/hotspot/share/gc/z/zPageTable.cpp: In constructor 'ZPageTable::FoundOld::FoundOld()': /home/zhaixiang/zgc/src/hotspot/share/gc/z/zPageTable.cpp:59:15: error: use of deleted function 'CHeapBitMap::CHeapBitMap(const CHeapBitMap&)' _current{0} {} ^ In file included from /home/zhaixiang/zgc/src/hotspot/share/memory/allocation.hpp:29, from /home/zhaixiang/zgc/src/hotspot/share/classfile/classLoaderData.hpp:28, from /home/zhaixiang/zgc/src/hotspot/share/precompiled/precompiled.hpp:34: /home/zhaixiang/zgc/src/hotspot/share/utilities/bitMap.hpp:488:15: note: declared here NONCOPYABLE(CHeapBitMap); ^~~~~~~~~~~ /home/zhaixiang/zgc/src/hotspot/share/utilities/globalDefinitions.hpp:84:24: note: in definition of macro 'NONCOPYABLE' #define NONCOPYABLE(C) C(C const&) = delete; C& operator=(C const&) = delete /* next token must be ; */ ^ make[3]: *** [lib/CompileJvm.gmk:149: /home/zhaixiang/zgc/build/linux-aarch64-server-fastdebug/hotspot/variant-server/libjvm/objs/zPageTable.o] Error 1 make[3]: *** Waiting for unfinished jobs.... make[2]: *** [make/Main.gmk:252: hotspot-server-libs] Error 2
ERROR: Build failed for target 'images' in configuration 'linux-aarch64-server-fastdebug' (exit code 2)
So I just reverted the commit then continue my porting work.
How to compatible with low version GNU compiler?
Thanks,
Leslie Zhai
在 2022/10/17 下午5:47, Stefan Karlsson 写道:
The development of Generational ZGC happens in this project branch: https://github.com/openjdk/zgc/tree/zgc_generational
StefanK
On 2022-10-14 14:47, Stefan Karlsson wrote:
Hi all,
I have created a draft JEP for Generational ZGC. For details, see the JBS entry:
https://bugs.openjdk.org/browse/JDK-8272979
Comments and feedback are welcome.
Thanks, StefanK
* Stefan Karlsson:
Hi Leslie,
Could you test if this branch compiles as expected? https://github.com/stefank/jdk/tree/zgc_generational_found_old_initializatio...
I asked around and it seems like array initialization uses copy-initialization of the elements, and that older GCCs didn't take the opportunity to convert the copying into move operations. Or something along those lines. I've restructured the code to prevent that problem.
GCC 10 needs this patch as well. I think the proper fix is to add a move constructor to CHeapBitMap (and move assignment as well): CHeapBitMap(CHeapBitMap &&) = default; CHeapBitMap &operator=(CHeapBitMap &&) = default; I don't see any pointers-to-self in the class definition (or its base class), so it should work, but I only have limited means to test this. At least it's building with the two lines added, and basic smoke testing shows nothing amiss. But I don't know how quickly bugs in this area would blow up in practice.
On 2022-10-17 23:29, Florian Weimer wrote:
* Stefan Karlsson:
Hi Leslie,
Could you test if this branch compiles as expected? https://urldefense.com/v3/__https://github.com/stefank/jdk/tree/zgc_generati...
I asked around and it seems like array initialization uses copy-initialization of the elements, and that older GCCs didn't take the opportunity to convert the copying into move operations. Or something along those lines. I've restructured the code to prevent that problem. GCC 10 needs this patch as well.
I think the proper fix is to add a move constructor to CHeapBitMap (and move assignment as well):
CHeapBitMap(CHeapBitMap &&) = default; CHeapBitMap &operator=(CHeapBitMap &&) = default;
I don't see any pointers-to-self in the class definition (or its base class), so it should work, but I only have limited means to test this.
At least it's building with the two lines added, and basic smoke testing shows nothing amiss. But I don't know how quickly bugs in this area would blow up in practice.
Thanks for the suggestion! I'm going to push my current patch for now, since it is limited in areas of the JVM that it potentially affects. I still think it's worth considering if we should make the bitmaps moveable, and I'd like us to handle that as a separate RFE. Thanks, StefanK
Hi Stefan, Works for gcc 8.3.0 :) Thanks, Leslie Zhai 在 2022/10/17 下午11:28, Stefan Karlsson 写道:
Hi Leslie,
Could you test if this branch compiles as expected? https://github.com/stefank/jdk/tree/zgc_generational_found_old_initializatio...
I asked around and it seems like array initialization uses copy-initialization of the elements, and that older GCCs didn't take the opportunity to convert the copying into move operations. Or something along those lines. I've restructured the code to prevent that problem.
Thanks for reporting, StefanK
On 2022-10-17 12:03, Leslie Zhai wrote:
Hi Stefan,
gcc 8.3.0 failed to work after the commit 7d0b267e87ec6120a74e5b6282c5e395786d2546: https://github.com/openjdk/zgc/commit/7d0b267e87ec6120a74e5b6282c5e395786d25...
Building target 'images' in configuration 'linux-aarch64-server-fastdebug' Updating support/modules_libs/java.base/server/libjvm.so due to 1 file(s) /home/zhaixiang/zgc/src/hotspot/share/gc/z/zPageTable.cpp: In constructor 'ZPageTable::FoundOld::FoundOld()': /home/zhaixiang/zgc/src/hotspot/share/gc/z/zPageTable.cpp:59:15: error: use of deleted function 'CHeapBitMap::CHeapBitMap(const CHeapBitMap&)' _current{0} {} ^ In file included from /home/zhaixiang/zgc/src/hotspot/share/memory/allocation.hpp:29, from /home/zhaixiang/zgc/src/hotspot/share/classfile/classLoaderData.hpp:28, from /home/zhaixiang/zgc/src/hotspot/share/precompiled/precompiled.hpp:34: /home/zhaixiang/zgc/src/hotspot/share/utilities/bitMap.hpp:488:15: note: declared here NONCOPYABLE(CHeapBitMap); ^~~~~~~~~~~ /home/zhaixiang/zgc/src/hotspot/share/utilities/globalDefinitions.hpp:84:24: note: in definition of macro 'NONCOPYABLE' #define NONCOPYABLE(C) C(C const&) = delete; C& operator=(C const&) = delete /* next token must be ; */ ^ make[3]: *** [lib/CompileJvm.gmk:149: /home/zhaixiang/zgc/build/linux-aarch64-server-fastdebug/hotspot/variant-server/libjvm/objs/zPageTable.o] Error 1 make[3]: *** Waiting for unfinished jobs.... make[2]: *** [make/Main.gmk:252: hotspot-server-libs] Error 2
ERROR: Build failed for target 'images' in configuration 'linux-aarch64-server-fastdebug' (exit code 2)
So I just reverted the commit then continue my porting work.
How to compatible with low version GNU compiler?
Thanks,
Leslie Zhai
在 2022/10/17 下午5:47, Stefan Karlsson 写道:
The development of Generational ZGC happens in this project branch: https://github.com/openjdk/zgc/tree/zgc_generational
StefanK
On 2022-10-14 14:47, Stefan Karlsson wrote:
Hi all,
I have created a draft JEP for Generational ZGC. For details, see the JBS entry:
https://bugs.openjdk.org/browse/JDK-8272979
Comments and feedback are welcome.
Thanks, StefanK
Thanks for confirming! StefanK On 2022-10-18 03:03, Leslie Zhai wrote:
Hi Stefan,
Works for gcc 8.3.0 :)
Thanks,
Leslie Zhai
在 2022/10/17 下午11:28, Stefan Karlsson 写道:
Hi Leslie,
Could you test if this branch compiles as expected? https://urldefense.com/v3/__https://github.com/stefank/jdk/tree/zgc_generati...
I asked around and it seems like array initialization uses copy-initialization of the elements, and that older GCCs didn't take the opportunity to convert the copying into move operations. Or something along those lines. I've restructured the code to prevent that problem.
Thanks for reporting, StefanK
On 2022-10-17 12:03, Leslie Zhai wrote:
Hi Stefan,
gcc 8.3.0 failed to work after the commit 7d0b267e87ec6120a74e5b6282c5e395786d2546: https://urldefense.com/v3/__https://github.com/openjdk/zgc/commit/7d0b267e87...
Building target 'images' in configuration 'linux-aarch64-server-fastdebug' Updating support/modules_libs/java.base/server/libjvm.so due to 1 file(s) /home/zhaixiang/zgc/src/hotspot/share/gc/z/zPageTable.cpp: In constructor 'ZPageTable::FoundOld::FoundOld()': /home/zhaixiang/zgc/src/hotspot/share/gc/z/zPageTable.cpp:59:15: error: use of deleted function 'CHeapBitMap::CHeapBitMap(const CHeapBitMap&)' _current{0} {} ^ In file included from /home/zhaixiang/zgc/src/hotspot/share/memory/allocation.hpp:29, from /home/zhaixiang/zgc/src/hotspot/share/classfile/classLoaderData.hpp:28, from /home/zhaixiang/zgc/src/hotspot/share/precompiled/precompiled.hpp:34: /home/zhaixiang/zgc/src/hotspot/share/utilities/bitMap.hpp:488:15: note: declared here NONCOPYABLE(CHeapBitMap); ^~~~~~~~~~~ /home/zhaixiang/zgc/src/hotspot/share/utilities/globalDefinitions.hpp:84:24: note: in definition of macro 'NONCOPYABLE' #define NONCOPYABLE(C) C(C const&) = delete; C& operator=(C const&) = delete /* next token must be ; */ ^ make[3]: *** [lib/CompileJvm.gmk:149: /home/zhaixiang/zgc/build/linux-aarch64-server-fastdebug/hotspot/variant-server/libjvm/objs/zPageTable.o] Error 1 make[3]: *** Waiting for unfinished jobs.... make[2]: *** [make/Main.gmk:252: hotspot-server-libs] Error 2
ERROR: Build failed for target 'images' in configuration 'linux-aarch64-server-fastdebug' (exit code 2)
So I just reverted the commit then continue my porting work.
How to compatible with low version GNU compiler?
Thanks,
Leslie Zhai
在 2022/10/17 下午5:47, Stefan Karlsson 写道:
The development of Generational ZGC happens in this project branch: https://urldefense.com/v3/__https://github.com/openjdk/zgc/tree/zgc_generati...
StefanK
On 2022-10-14 14:47, Stefan Karlsson wrote:
Hi all,
I have created a draft JEP for Generational ZGC. For details, see the JBS entry:
https://bugs.openjdk.org/browse/JDK-8272979
Comments and feedback are welcome.
Thanks, StefanK
participants (3)
-
Florian Weimer
-
Leslie Zhai
-
Stefan Karlsson