static callCount field used for "every 256 calls" thread event polling interferes with parallelization ------------------------------------------------------------------------------------------------------
Key: JRUBY-2344 URL: http://jira.codehaus.org/browse/JRUBY-2344 Project: JRuby Issue Type: Bug Affects Versions: JRuby 1.1 Reporter: Charles Oliver Nutter Assignee: Charles Oliver Nutter Priority: Blocker Fix For: JRuby 1.1+ In our inline caching CallSite, there is an integer callCount field that increments on each call. When the callCount % 255 == 0, it polls for thread events. This was added to match Ruby's similar behavior for determining thread rescheduling. However with this field static on CallSite, a benchmark done at Sun shows that threads do not appropriately parallelize, actually running slower with multiple threads than with a single thread. Moving the call count into ThreadContext as a field appears to resolve the issue, so there must be some JVM weirdness happening with static mutable fields used for branching. I will make the appropriate change. -- This message is automatically generated by JIRA. - If you think it was sent incorrectly contact one of the administrators: http://jira.codehaus.org/secure/Administrators.jspa - For more information on JIRA, see: http://www.atlassian.com/software/jira --------------------------------------------------------------------- To unsubscribe from this list, please visit: http://xircles.codehaus.org/manage_email