poor performance of JNI AttachCurrentThread after fix for 7017193

XMLWordPrintable

    • Type: Bug
    • Resolution: Fixed
    • Priority: P2
    • hs25
    • Affects Version/s: hs24
    • Component/s: hotspot
    • None
    • b49
    • generic
    • linux
    • Not verified

        -------- Original Message --------
        Date: Tue, 26 Feb 2013 17:58:45 +0000
        From: Andrew Haley <aph@redhat.com>

        get_stack_bounds() was rewritten because of a small memory leak.
        Instead of simply free()ing the memory to prevent the leak, it was
        rewritten to use a byte-by-byte loop around read() :

        http://mail.openjdk.java.net/pipermail/hotspot-runtime-dev/2011-February/001864.html

        Unfortunately, the performance impact of this change is tragic. As
        you can imagine, tens of thousands of system calls are made whenever
        get_stack_bounds() is called.

        Before rewrite: typically 100 microseconds
        After rewrite: typically 1500 microseconds

              Assignee:
              Dmitriy Samersoff
              Reporter:
              Dmitriy Samersoff
              Votes:
              0 Vote for this issue
              Watchers:
              3 Start watching this issue

                Created:
                Updated:
                Resolved:
                Imported:
                Indexed: