[GHC] #7602: Threaded RTS performing badly on recent OS X (10.8?)

GHC cvs-ghc at haskell.org
Sat Feb 9 10:53:38 CET 2013


#7602: Threaded RTS performing badly on recent OS X (10.8?)
---------------------------------+------------------------------------------
    Reporter:  simonmar          |       Owner:                  
        Type:  bug               |      Status:  new             
    Priority:  normal            |   Milestone:  _|_             
   Component:  Runtime System    |     Version:  7.6.1           
    Keywords:                    |          Os:  Unknown/Multiple
Architecture:  Unknown/Multiple  |     Failure:  None/Unknown    
  Difficulty:  Unknown           |    Testcase:                  
   Blockedby:                    |    Blocking:                  
     Related:                    |  
---------------------------------+------------------------------------------

Comment(by thoughtpolice):

 Just as a note, I don't think GCC will help anymore; using GCC 4.7.2 on
 OSX 10.8, compiling my same 'foo' example earlier with ```gcc -O3```, I
 get:

 {{{
 (lldb) disassemble -m -n main
 a.out`main
 a.out[0x100000f00]:  cmpl   $1, %edi
 a.out[0x100000f03]:  pushq  %rbx
 a.out[0x100000f04]:  jle    0x100000f3f               ; main + 63
 a.out[0x100000f06]:  movq   8(%rsi), %rdi
 a.out[0x100000f0a]:  callq  0x100000f54               ; symbol stub for:
 atoi
 a.out[0x100000f0f]:  leaq   330(%rip), %rdi           ; __emutls_v.foo
 a.out[0x100000f16]:  movl   %eax, %ebx
 a.out[0x100000f18]:  callq  0x100000f66               ; symbol stub for:
 __emutls_get_address
 a.out[0x100000f1d]:  movl   %ebx, (%rax)
 a.out[0x100000f1f]:  leaq   314(%rip), %rdi           ; __emutls_v.foo
 a.out[0x100000f26]:  callq  0x100000f66               ; symbol stub for:
 __emutls_get_address
 a.out[0x100000f2b]:  leaq   114(%rip), %rdi           ; "foo = %d\n"
 a.out[0x100000f32]:  movl   (%rax), %esi
 a.out[0x100000f34]:  xorl   %eax, %eax
 a.out[0x100000f36]:  callq  0x100000f60               ; symbol stub for:
 printf
 a.out[0x100000f3b]:  xorl   %eax, %eax
 a.out[0x100000f3d]:  popq   %rbx
 a.out[0x100000f3e]:  ret
 a.out[0x100000f3f]:  leaq   282(%rip), %rdi           ; __emutls_v.foo
 a.out[0x100000f46]:  callq  0x100000f66               ; symbol stub for:
 __emutls_get_address
 a.out[0x100000f4b]:  movl   $10, (%rax)
 a.out[0x100000f51]:  jmp    0x100000f1f               ; main + 31
 }}}

 So I think for now we're going to have to just bite the bullet on this
 one, and make sure the build is solid with Clang on modern OS X anyway.
 Maybe we can do something evil here later to recover the loss :/

 David Peixotto's original patches made the RTS build with clang at first.
 I'll run a test against HEAD using Clang and see what I find.

-- 
Ticket URL: <http://hackage.haskell.org/trac/ghc/ticket/7602#comment:9>
GHC <http://www.haskell.org/ghc/>
The Glasgow Haskell Compiler



More information about the ghc-tickets mailing list