[GHC] #1747: debugger: :trace is wasting time

GHC trac at haskell.org
Fri Sep 28 11:05:57 EDT 2007


#1747: debugger: :trace is wasting time
-------------------------+--------------------------------------------------
    Reporter:  simonmar  |        Owner:            
        Type:  bug       |       Status:  new       
    Priority:  low       |    Milestone:  6.8 branch
   Component:  GHCi      |      Version:  6.6.1     
    Severity:  minor     |   Resolution:            
    Keywords:            |   Difficulty:  Unknown   
          Os:  Unknown   |     Testcase:            
Architecture:  Unknown   |  
-------------------------+--------------------------------------------------
Old description:

> When using `:trace`, executing is constantly switching between the main
> GHCi thread and the execution thread.  The main GHCi thread is a bound
> thread, whereas the other thread is an unbound thread, so these context
> switches are real OS-thread switches, consequently `:trace` wastes a lot
> of time context-switching.
>
> Perhaps the main GHCi thread in an unbound thread, or else `:trace`
> should fork an unbound thread before starting execution.

New description:

 When using `:trace`, execution is constantly switching between the main
 GHCi thread and the execution thread.  The main GHCi thread is a bound
 thread, whereas the other thread is an unbound thread, so these context
 switches are real OS-thread switches, consequently `:trace` wastes a lot
 of time context-switching.

 Perhaps the main GHCi thread should be an unbound thread, or else `:trace`
 should fork an unbound thread before starting execution.

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


More information about the Glasgow-haskell-bugs mailing list