RFR(S): 8247732: validate user-input intrinsic_ids in ControlIntrinsic
xxinliu at amazon.com
Wed Jul 8 08:26:01 UTC 2020
Please allow me to ping this CR.
It's the last left-over task for -XX:ControlIntrinsic=. it adds a sanity check for user-input.
On 6/25/20 6:59 PM, Liu, Xin wrote:
Could you review this patch?
The core logic is class ControlIntrinsicValidator in compilerDirectives.hpp
It iterates the ccstrlist option and makes sure user-input intrinsic ids are all valid. It stops and take a record when it meets the first unrecognized intrinsic.
I used constraints to validate the global options ControlIntrinsic and DisableIntrinsic.
ControlIntrinsic/DisableIntrinsic in compiler directives are more complex. The matched directive is only parsed when hotspot attempts to compile the corresponding method.
I validate at that time and JVM will crash if it doesnot meet guarantee() statement.
I added Method::external_name_short() which only returns the shorter method name in the form of "classname::method".
Probably hotspot has had similar code, but I failed to discover. please let me know and I will remove it.
passed hotspot:tier1 and gtest:all
manually tests with wrong inputs.
More information about the hotspot-runtime-dev