Odd Loop x86 CodeGen Behavior
    Edward Lee 
    edilee at gmail.com
       
    Wed Dec 10 07:46:09 PST 2008
    
    
  
On Wed, Dec 10, 2008 at 12:29 AM, Edward Lee <edilee at gmail.com> wrote:
> I've attached the original output...
To help figure out what the ideal graph/x86 is doing, I've
"hand-disassembled" to the resulting inlined/magic high level, which
should be something similar to..
BasePage FileContainer::getUserPage(BaseContainerHandle a0,
    long pageNumber, boolean a2, boolean a3) {
  Entry[] table = this.pageCache.cache_.table;
  int hash = (int) (this.identity.containerId ^ this.identity.segmentId);
  hash = (int) ((long) hash ^ pageNumber);
  hash = hash ^ (hash >>> 20) ^ (hash >>> 12);
  hash = hash ^ (hash >>> 7) ^ (hash >>> 4);
  Entry<PageKey, CachedItem> entry = table[hash & table.length - 1];
  while (entry != null) {
    if (entry.hash == hash && entry.key.pageNumber == pageNumber)
      break;
    entry = entry.next;
  }
  this.pageCache.stat.findHit++;
  entry.value.recentlyUsed_ = true;
  entry.value.keepCount++;
  this.latchPage(a0, entry.value.entry, a3);
  return entry.value.entry;
}
Ed
    
    
More information about the hotspot-dev
mailing list