RFR: 8234748: Clean up atomic and orderAccess includes
david.holmes at oracle.com
Wed Nov 27 10:47:26 UTC 2019
On 27/11/2019 8:34 pm, Stefan Karlsson wrote:
> Hi Thomas,
> On 2019-11-27 11:20, Thomas Schatzl wrote:
>> Hi Stefan,
>> thanks for tackling this.
>> On 26.11.19 12:11, Stefan Karlsson wrote:
>>> Hi all,
>>> Please review this trivial, but large, patch to cleanup the includes
>>> of atomic.hpp and orderAccess.hpp.
>> I did the following bash-fu to find missing/superfluous includes:
>> grep "Atomic::" `find . -name '*.?pp'` | sed 's/\(.*pp\):.*/\1/' |
>> uniq | sort > users.txt
>> $ grep "atomic.hpp" `find . -name '*.?pp'` | sed 's/\(.*\):.*/\1/' |
>> uniq | sort > includers.txt
>> $ diff users.txt includers.txt > diff.txt
>> diff.txt then contained the differences, with some false positives,
>> all about containing the keywords in comments. Otherwise I think this
>> should be complete.
>> The same has been done with "OrderAccess::" and "orderAccess.hpp".
>> Here are the results:
>> Improvements to orderAccess.hpp includes:
>> - gc/shenandoah/shenandoahVerifier.cpp misses it
>> - the #include from gc/z/zLiveMap.inline.hpp should maybe be moved to
>> Improvements to atomic.hpp includes:
>> In the following files the include of atomic.hpp should be removed as
>> it seems unnecessary:
>> - share/utilities/bitMap.hpp
>> - share/oops/oop.hpp
> These needs atomic.hpp since they use atomic_memory_order.
>> - share/gc/z/zNMethodTable.cpp
>> - share/gc/shenandoah/shenandoahForwarding.inline.hpp
>> - share/gc/g1/g1CardTable.cpp
>> - os_cpu/solaris_x86/os_solaris_x86.cpp
>> The following need a #include atomic.hpp:
>> - share/oops/methodData.cpp
>> - share/oops/constantPool.cpp
>> - share/memory/metaspace/virtualSpaceNdoe.cpp
>> - os/posix/os_posix.cpp
>> Looks good otherwise.
> Since, I already pushed the original bug, I created a new with your
I've verified each of those as well.
> I intend to take this through our build steps, and push it if it's
More information about the hotspot-dev