Re: opjitconv runs indefinitely
Daniel Hansel <[email protected]>
| Newsgroups | gmane.linux.oprofile |
|---|---|
| Message-ID | <[email protected]> |
Hi Rei Odaira,
the JIT extension of oprofile is processing the samples that are reported via the JVM tool interface (aka JVMTI).
The problem with zero sized samples could be handled by oprofile with such a work around as you posted already.
But I think it should be reported to the JDK maintainer (i.e. OpenJDK community) to see if zero sized samples are valid to be reported via JVMTI.
Did you already look for such a bug report or a discussion on the OpenJDK community mailing lists?
Kind regards,
Daniel
On 05.05.2015 20:50, 大平怜 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
>
>
> --- 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
>
--
Mit freundlichen Grüßen / Kind regards
Daniel Hansel
IBM Deutschland Research & Development GmbH
Vorsitzende des Aufsichtsrats: Martina Koederitz
Geschäftsführung: Dirk Wittkopp
Sitz der Gesellschaft: Böblingen
Registergericht: Amtsgericht Stuttgart, HRB 243294
------------------------------------------------------------------------------
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