RFR: 8204939: Change Access nomenclature: root to native
Kim Barrett
kim.barrett at oracle.com
Wed Jun 13 08:49:52 UTC 2018
Please review this change of nomenclature in the Access API. Rather
than using the word "root" we now use "native". A "native" access has
an off-heap location, such as in a C/C++ data structure or global
variable. This involves renaming the RootAccess class template to
NativeAccess, and renaming the IN_ROOT access decorator to IN_NATIVE.
Note that we are not renaming the IN_CONCURRENT_ROOT access decorator
as part of this change. As discussed in JDK-8204690, we intend to
instead eliminate that decorator, as part of a later change.
This change consists of several sets of renamings and other minor
adjustments, all performed completely mechanically, e.g. by applying a
short sequence of bash commands to the repository being modified. To
aid in reviewing, in addition to a webrev containing the full set of
changes, there is also a sequence of 4 webrevs that combined make up
that same complete set, along with the commands to produce them.
CR:
https://bugs.openjdk.java.net/browse/JDK-8204939
Webrevs:
(1) Rename RootAccess to NativeAccess
http://cr.openjdk.java.net/~kbarrett/8204939/1.rename_RootAccess/
hg qnew rename_RootAccess
find . -type f -name "*.[ch]pp" \
-exec grep -q RootAccess {} \; -print \
| xargs sed -i 's/RootAccess/NativeAccess/'
hg qrefresh
-----
(2) Rename IN_ROOT to IN_NATIVE
http://cr.openjdk.java.net/~kbarrett/8204939/2.rename_IN_ROOT/
hg qnew rename_IN_ROOT
find . -type f -name "*.[ch]pp" \
-exec egrep -q " IN_ROOT \s*=" {} \; -print \
| xargs sed -i 's/ IN_ROOT / IN_NATIVE /'
find . -type f -name "*.[ch]pp" \
-exec grep -q IN_ROOT {} \; -print \
| xargs sed -i 's/IN_ROOT/IN_NATIVE/'
hg qrefresh
-----
(3) Rename some local variables named on_root and in_root to
in_native, for consistency.
http://cr.openjdk.java.net/~kbarrett/8204939/3.rename_on_root/
hg qnew rename_on_root
find . -type f -name "*.[ch]pp" \
-exec egrep -q "[^[:alnum:]_]on_root[^[:alnum:]_]" {} \; -print \
| xargs sed -i 's/on_root/in_native/'
find . -type f -name "*.[ch]pp" \
-exec egrep -q "[^[:alnum:]_]in_root[^[:alnum:]_]" {} \; -print \
| xargs sed -i 's/in_root/in_native/'
find . -type f -name "*.[ch]pp" \
-exec egrep -q " in_native =" {} \; -print \
| xargs sed -i 's/ in_native =/ in_native =/'
hg qrefresh
-----
(4) Rename some local variables named on_heap, for consistency.
http://cr.openjdk.java.net/~kbarrett/8204939/4.rename_on_heap/
hg qnew rename_on_heap
find . -type f -name "*.[ch]pp" \
-exec egrep -q "[^[:alnum:]_]on_heap[^[:alnum:]_]" {} \; -print \
| xargs sed -i 's/on_heap/in_heap/'
find . -type f -name "*.[ch]pp" \
-exec egrep -q " in_heap =" {} \; -print \
| xargs sed -i 's/ in_heap =/ in_heap =/'
hg qrefresh
-----
(5) All changes
http://cr.openjdk.java.net/~kbarrett/8204939/open.00/
Testing:
Local build and minimal testing of each of the partial webrevs.
Mach5 tier1,2,3 for the full change.
More information about the hotspot-dev
mailing list