Re: opjitconv runs indefinitely
William Cohen <[email protected]>
| Newsgroups | gmane.linux.oprofile |
|---|---|
| Message-ID | <[email protected]> |
On 05/05/2015 02:50 PM, 大平怜 wrote:
> Hi,
>
> I found opjitconv ran indefinitely when profiling a Java application running on
> OpenJDK/ppc64le. This is because OpenJDK sometimes reports generation of
> zero-size jitted code via JVMTI, but scan_overlaps() in opjitconv does not assume
> the existence of jitted code with size zero.
>
> (1) scan_overlaps() finds overlap between a normal jitted code and a zero-size
> jitted code.
> (2) eliminate_overlaps() tries to split the zero-size jitted code but cannot.
> (3) resolve_overlaps() incorrectly thinks the split has happened and invokes
> scan_overlaps() again.
> (4) Back to (1)
>
> One workaround would be to remove all the zero-size entries before resolving
> overlaps (patch attached), but I am not sure if this is a good solution.
> It works at least in my environment.
>
>
> Regards,
> Rei Odaira
Hi Rei,
Thanks for the patch. I corrected the formatting of the patch and checked it in. It is now in the upstream oprofile git repository. Could you verify that the upstream oprofile solves the observed problem?
-Will
>
>
> --- oprofile-1.0.0/opjitconv/jitsymbol.c2014-09-12 09:39:47.000000000 -0500
> +++ oprofile-1.0.0-openjdk8-src/opjitconv/jitsymbol.c2015-05-05 13:37:13.931202002 -0500
> @@ -201,6 +201,26 @@
> }
> }
>
> +static void invalidate_zero_size_entries(void)
> +{
> +u32 i;
> +int flag;
> +struct jitentry * a;
> +
> +flag = 0;
> +for (i = 0; i < entry_count; i++) {
> +a = entries_address_ascending[i];
> +if (a->code_size == 0) {
> +invalidate_entry(a);
> +flag = 1;
> +}
> +}
> +if (flag) {
> +resort_address();
> +resort_symbol();
> +}
> +}
> +
>
> /* select the symbol with the longest life time in the index range */
> static int select_one(int start_idx, int end_idx)
> @@ -505,6 +525,7 @@
> int cnt = 0;
>
> invalidate_earlybirds(start_time);
> +invalidate_zero_size_entries();
> while ((rc = scan_overlaps()) && rc != OP_JIT_CONV_FAIL) {
> resort_address();
> if (cnt == 0) {
>
>
>
> ------------------------------------------------------------------------------
> One dashboard for servers and applications across Physical-Virtual-Cloud
> Widest out-of-the-box monitoring support with 50+ applications
> Performance metrics, stats and reports that give you Actionable Insights
> Deep dive visibility with transaction tracing using APM Insight.
> http://ad.doubleclick.net/ddm/clk/290420510;117567292;y
>
>
>
> _______________________________________________
> oprofile-list mailing list
> [email protected]
> https://lists.sourceforge.net/lists/listinfo/oprofile-list
>
------------------------------------------------------------------------------
One dashboard for servers and applications across Physical-Virtual-Cloud
Widest out-of-the-box monitoring support with 50+ applications
Performance metrics, stats and reports that give you Actionable Insights
Deep dive visibility with transaction tracing using APM Insight.
http://ad.doubleclick.net/ddm/clk/290420510;117567292;y
_______________________________________________
oprofile-list mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/oprofile-list