JMC-5895 - JFR in JDK 11 changed event paths from 'com.oracle.jdk' to 'jdk', and type paths from 'com.oracle.jfr.types' to 'jdk.types'
Marcus Hirt
marcus.hirt at oracle.com
Sat Jul 14 18:58:43 UTC 2018
Hi Sharath,
Some minor nits:
In SyntheticAttributeExtension.java:
+ eventTypeId = JdkTypeIDsPreJdk11.translate(eventTypeId);
if (REC_SETTING_EVENT_ID_ATTRIBUTE.getIdentifier().equals(fieldId)
&& JdkTypeIDs.RECORDING_SETTING.equals(eventTypeId)) {
return JfrInternalConstants.TYPE_IDENTIFIER_VALUE_INTERPRETATION;
}
The translated eventTypeId is only used once, instead of redefining the parameter, please consider just translating the eventTypeId where it is used:
if (REC_SETTING_EVENT_ID_ATTRIBUTE.getIdentifier().equals(fieldId)
&& JdkTypeIDs.RECORDING_SETTING.equals(JdkTypeIDsPreJdk11.translate(eventTypeId))) {
return JfrInternalConstants.TYPE_IDENTIFIER_VALUE_INTERPRETATION;
}
Indentation problem in needTransform in JdkTypeIDsPreJdk11:
211 /**
212 * Determine if a typeId needs to be transformed into a JDK 11 type id.
213 *
214 * @param typeId
215 * type id
216 * @return true if transformation is needed, false otherwise.
217 */
218 public static boolean needTransform(String typeId) {
219 if (typeId.startsWith(PREFIX)) {
220 return false;
221 }
222 return typeId.startsWith(EVENT_ID_ROOT) || typeId.startsWith(PREFIX_9_10) ;
223 }
224
Kind regards,
Marcus
On 2018-07-14, 07:02, "jmc-dev on behalf of Sharath Ballal" <jmc-dev-bounces at openjdk.java.net on behalf of sharath.ballal at oracle.com> wrote:
The fix has undergone changes from last time as 'mvn verify' was failing. The code changes now include:
1. Changes to the V1 parser to use the SettingsTransformer for JDK 9 & 10 events.
2. Changes to some of the tests and their baseline files.
Testing done:
mvn verify passes.
JDK 7/8/9/10 - Recording, loading and automated analysis works. Verified that scores of the automated analysis doesn't change from earlier.
JDK 11 - Recording, loading and automated analysis works.
Latest webrev at : http://cr.openjdk.java.net/~sballal/JMC-5895/webrev.03/
Kindly review the fix.
Thanks,
Sharath
From: Sharath Ballal [mailto:sharath.ballal at oracle.com]
Sent: Friday, June 08, 2018 3:03 PM
To: 'jmc-dev at openjdk.java.net'
Subject: RFR: JMC-5895 - JFR in JDK 11 changed event paths from 'com.oracle.jdk' to 'jdk', and type paths from 'com.oracle.jfr.types' to 'jdk.types'
Hello,
Pls review fix for the following P1 issue:
ID: https://bugs.openjdk.java.net/browse/JMC-5895
Webrev: http://cr.openjdk.java.net/~sballal/JMC-5895/webrev.00/
Thanks,
Sharath
More information about the jmc-dev
mailing list