harmony-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Aleksey Shipilev (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 14:13:14 GMT

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

Aleksey Shipilev commented on HARMONY-5396:
-------------------------------------------

Egor, on ia32 it should be like:

__asm {
	mov ecx, targetPtr
	mov eax, 0
	mov edx, newValue
	lock cmpxchg [ecx], edx		
	mov result, eax
}

Then check result, if (result == 0) then operation finishes successfully, if (result == newValue),
then the update is failed.

 If you needn't to check this condition, you might use following code for atomic increment:

__asm {
	mov ecx, targetPtr
	mov edx, [ecx]
        add edx, 1
	lock cmpxchg [ecx], edx
}

As for x64, you might use cmpxchg8b instead of cmpxchg if you need to update 64-bit register.

> [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