[8u] RFR: JFR possible generate same symbol/cstring id for different symbol/string

kalinshi(施慧) kalinshi at tencent.com
Mon Oct 19 12:28:15 UTC 2020


Hi All,

Please help review this JFR issue again in 8u. This problem can be easily reproduced with CDS and reproduce steps in JBS.

Fix includes:
1.  Remove map_symbol/map_cstring methods with only hashcode, all lookup must pass symbol or cstring with hashcode.
2.  In JfrSymbolId::equals methods, compare symbol reference or cstring contents when hashcodes are same.
3.  Rebuild anonymous klass cstring when search its sctring entry id.

JBS: https://bugs.openjdk.java.net/browse/JDK-8253837
Webrev: http://cr.openjdk.java.net/~hshi/8253837/webrev_2/


Early review threads https://mail.openjdk.java.net/pipermail/jdk8u-dev/2020-October/012754.html  https://mail.openjdk.java.net/pipermail/jdk8u-dev/2020-October/012782.html
In early discussion, jdk11u fix equals method in https://bugs.openjdk.java.net/browse/JDK-8231081, major concern is if the entire change need be backported.
Actually partial change is included such as changes in mark_unsafe_anonymous_klass_name and create_unsafe_anonymous_klass_symbol. 
It might not easy to backport it cleanly at this time.


Regards
Hui


More information about the jdk8u-dev mailing list