harmony-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Egor Pasko (JIRA)" <j...@apache.org>
Subject [jira] Commented: (HARMONY-5396) [drlvm][em] excess ValueProfiler locking causes degradation on JITted code with profiling
Date Sun, 24 Feb 2008 19:03:14 GMT

    [ https://issues.apache.org/jira/browse/HARMONY-5396?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=12571928#action_12571928
] 

Egor Pasko commented on HARMONY-5396:
-------------------------------------

Aleksey,

in fact I proposed something (slightly) different:
lock add [eax], 1
this solution avoids cmpxcg (see patch 0006-... for details)

complete GCC inline assembly from the patch:
INLINE void port_atomic_inc32(volatile uint32 * data)
{
#if defined(_IA32_) || defined(_EM64T_)
    __asm__ __volatile__(
        "lock addl $1, (%1)"
        : "=m" (*data) /* output */
        : "r" (data) /* input */
        : "memory"
    );
#elif
    ABORT("Not supported");
#endif
}

On windows it should look like:
INLINE void port_atomic_inc32(volatile uint32 * data)
{
    __asm {
        mov eax,  data
        lock add [eax], 1
    }
}

I do not have a handy windows machine to verify, sorry.


> [drlvm][em] excess ValueProfiler locking causes degradation on JITted code with profiling
> -----------------------------------------------------------------------------------------
>
>                 Key: HARMONY-5396
>                 URL: https://issues.apache.org/jira/browse/HARMONY-5396
>             Project: Harmony
>          Issue Type: Improvement
>          Components: DRLVM
>            Reporter: Aleksey Shipilev
>            Assignee: Egor Pasko
>         Attachments: 0001-ValueProfileCollector-refactoring-to-separate-FirstN-and-Divided-methods.txt,
0002-value-profiling-options-locked-flagged_all-flagged_insert-unsafe.txt, 0002-ValueProfileCollector-implementing-locking-strategies.txt,
0003-value-profiling-options-locked-flagged_all-flagged_insert-unsafe.txt, 0004-value-profiling-reviving-locked-profile.txt,
0005-volatile-fix.txt, 0006-ATOMIC_INC-strategy-linux-only.txt, HARMONY-5396-syncTie.patch
>
>
> During investigation of serious slowdown in some microbenchmark, excess locking in ValueProfiler
was identified. 
> Please see Harmony-dev thread for the details: http://markmail.org/message/tatsfbyb7eb3q3rr

-- 
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.


Mime
View raw message