SV: SV: JMC-5596: Rule to detect if there has been a Full GC with G1 or CMS
Marcus Hirt
marcus at hirt.se
Wed Dec 12 12:43:08 UTC 2018
Hi Andrew,
There are, sadly, no official guidelines for adding recordings.
That said, try to:
1. Keep the recording small, e.g. make the recording as short as possible,
use a template where some unrelated events are disabled (take care,
some events are more or less expected, e.g. Flight Recorder meta events).
2. Look through the data to ensure it doesn't contain something you don't want
to share. For example, it's all too easy to get a password or password hash
in the environment variable or system property events.
Kind regards,
Marcus
-----Ursprungligt meddelande-----
Från: Andrew Azores <aazores at redhat.com>
Skickat: den 11 december 2018 21:31
Till: Marcus Hirt <marcus at hirt.se>; jmc-dev at openjdk.java.net
Ämne: Re: SV: JMC-5596: Rule to detect if there has been a Full GC with G1 or CMS
On 2018-12-11 7:36 a.m., Marcus Hirt wrote:
> Hi Andrew,
>
> Looks good, but please fix the associated tests first, then I'll take
> a closer look.
>
> <--8<-->
> [ERROR] Tests run: 2, Failures: 2, Errors: 0, Skipped: 0, Time
> elapsed: 9.674 s <<< FAILURE! - in
> org.openjdk.jmc.flightrecorder.test.rules.jdk.TestRulesWithJfr
> [ERROR] verifyOneResult(org.openjdk.jmc.flightrecorder.test.rules.jdk.TestRulesWithJfr) Time elapsed: 2.398 s <<< FAILURE!
> java.lang.AssertionError:
>
>
> Report for file "allocation_10s_before.jfr", rule result for "FullGc" could not be found in the other report.
> at org.openjdk.jmc.flightrecorder.test.rules.jdk.TestRulesWithJfr.verifyRuleResults(TestRulesWithJfr.java:159)
> at
> org.openjdk.jmc.flightrecorder.test.rules.jdk.TestRulesWithJfr.verifyO
> neResult(TestRulesWithJfr.java:126)
>
> [ERROR] verifyAllResults(org.openjdk.jmc.flightrecorder.test.rules.jdk.TestRulesWithJfr) Time elapsed: 7.234 s <<< FAILURE!
> java.lang.AssertionError:
>
>
> Report for file "wls-medrec-jdk9.jfr", rule result for "FullGc" could not be found in the other report.
>
> Report for file "wldf.jfr", rule result for "FullGc" could not be found in the other report.
>
> Report for file "stringdedup_enabled_jdk9.jfr", rule result for "FullGc" could not be found in the other report.
>
> Report for file "parallel-on-singlecpu.jfr", rule result for "FullGc" could not be found in the other report.
>
> Report for file "parallel-gc_cpu.jfr", rule result for "FullGc" could not be found in the other report.
>
> Report for file "flight_recording_hidden.jfr", rule result for "FullGc" could not be found in the other report.
>
> Report for file "crash_jdk9.jfr", rule result for "FullGc" could not be found in the other report.
>
> Report for file "allocation_10s_fixed.jfr", rule result for "FullGc" could not be found in the other report.
>
> Report for file "allocation_10s_before.jfr", rule result for "FullGc" could not be found in the other report.
> at org.openjdk.jmc.flightrecorder.test.rules.jdk.TestRulesWithJfr.verifyRuleResults(TestRulesWithJfr.java:159)
> at
> org.openjdk.jmc.flightrecorder.test.rules.jdk.TestRulesWithJfr.verifyA
> llResults(TestRulesWithJfr.java:132)
> <--8<-->
>
> Kind regards,
> Marcus
>
Ah, sorry for that. Thanks for the notice. An updated patch is attached.
The existing test cases do not fully exercise the rule - the exercised pathways are "events emitted but no Full GCs" and "no events emitted", so we are missing the path where Full GC events do occur (x2, for each collector). Is there a procedure or guideline for adding additional flight recordings which do capture this scenario and exercise the rules in this manner?
--
Andrew Azores
Software Engineer, OpenJDK Team
Red Hat
More information about the jmc-dev
mailing list