#11100: Remote GHCi -------------------------------------+------------------------------------- Reporter: simonmar | Owner: simonmar Type: task | Status: new Priority: normal | Milestone: 8.0.1 Component: GHCi | Version: 7.10.2 Keywords: | Operating System: Unknown/Multiple Architecture: | Type of failure: None/Unknown Unknown/Multiple | Test Case: | Blocked By: Blocking: | Related Tickets: Differential Rev(s): | Wiki Page: -------------------------------------+------------------------------------- This task is to implement Remote GHCi, i.e. running interpreted code in a separate process. For more details see [wiki:RemoteGHCi]. -- Ticket URL: <http://ghc.haskell.org/trac/ghc/ticket/11100> GHC <http://www.haskell.org/ghc/> The Glasgow Haskell Compiler
#11100: Remote GHCi -------------------------------------+------------------------------------- Reporter: simonmar | Owner: simonmar Type: task | Status: new Priority: normal | Milestone: 8.0.1 Component: GHCi | Version: 7.10.2 Resolution: | Keywords: Operating System: Unknown/Multiple | Architecture: | Unknown/Multiple Type of failure: None/Unknown | Test Case: Blocked By: | Blocking: Related Tickets: #11047 | Differential Rev(s): Wiki Page: | -------------------------------------+------------------------------------- Changes (by simonmar): * related: => #11047 -- Ticket URL: <http://ghc.haskell.org/trac/ghc/ticket/11100#comment:1> GHC <http://www.haskell.org/ghc/> The Glasgow Haskell Compiler
#11100: Remote GHCi -------------------------------------+------------------------------------- Reporter: simonmar | Owner: simonmar Type: task | Status: new Priority: normal | Milestone: 8.0.1 Component: GHCi | Version: 7.10.2 Resolution: | Keywords: Operating System: Unknown/Multiple | Architecture: | Unknown/Multiple Type of failure: None/Unknown | Test Case: Blocked By: | Blocking: Related Tickets: #11047, #8736 | Differential Rev(s): Wiki Page: | -------------------------------------+------------------------------------- Changes (by simonmar): * related: #11047 => #11047, #8736 -- Ticket URL: <http://ghc.haskell.org/trac/ghc/ticket/11100#comment:2> GHC <http://www.haskell.org/ghc/> The Glasgow Haskell Compiler
#11100: Remote GHCi -------------------------------------+------------------------------------- Reporter: simonmar | Owner: simonmar Type: task | Status: new Priority: normal | Milestone: 8.0.1 Component: GHCi | Version: 7.10.2 Resolution: | Keywords: Operating System: Unknown/Multiple | Architecture: | Unknown/Multiple Type of failure: None/Unknown | Test Case: Blocked By: | Blocking: Related Tickets: #11047, #8736 | Differential Rev(s): Phab:D1562 Wiki Page: | -------------------------------------+------------------------------------- Changes (by bgamari): * differential: => Phab:D1562 Comment: Perhaps we can close this now since we've merged Phab:D1562? -- Ticket URL: <http://ghc.haskell.org/trac/ghc/ticket/11100#comment:3> GHC <http://www.haskell.org/ghc/> The Glasgow Haskell Compiler
#11100: Remote GHCi -------------------------------------+------------------------------------- Reporter: simonmar | Owner: simonmar Type: task | Status: new Priority: normal | Milestone: 8.0.1 Component: GHCi | Version: 7.10.2 Resolution: | Keywords: Operating System: Unknown/Multiple | Architecture: | Unknown/Multiple Type of failure: None/Unknown | Test Case: Blocked By: | Blocking: Related Tickets: #11047, #8736 | Differential Rev(s): Phab:D1562 Wiki Page: | -------------------------------------+------------------------------------- Comment (by simonmar): It's not quite done yet, I still have to finish TH (`recover` isn't implemented), and do something about the GHCi debugger. -- Ticket URL: <http://ghc.haskell.org/trac/ghc/ticket/11100#comment:4> GHC <http://www.haskell.org/ghc/> The Glasgow Haskell Compiler
#11100: Remote GHCi -------------------------------------+------------------------------------- Reporter: simonmar | Owner: simonmar Type: task | Status: new Priority: normal | Milestone: 8.0.1 Component: GHCi | Version: 7.10.2 Resolution: | Keywords: Operating System: Unknown/Multiple | Architecture: | Unknown/Multiple Type of failure: None/Unknown | Test Case: Blocked By: | Blocking: Related Tickets: #11047, #8736 | Differential Rev(s): Wiki Page: | Phab:D1562,Phab:D1747,Phab:D1748 -------------------------------------+------------------------------------- Changes (by simonmar): * differential: Phab:D1562 => Phab:D1562,Phab:D1747,Phab:D1748 -- Ticket URL: <http://ghc.haskell.org/trac/ghc/ticket/11100#comment:5> GHC <http://www.haskell.org/ghc/> The Glasgow Haskell Compiler
#11100: Remote GHCi -------------------------------------+------------------------------------- Reporter: simonmar | Owner: simonmar Type: task | Status: new Priority: normal | Milestone: 8.0.1 Component: GHCi | Version: 7.10.2 Resolution: | Keywords: Operating System: Unknown/Multiple | Architecture: | Unknown/Multiple Type of failure: None/Unknown | Test Case: Blocked By: | Blocking: Related Tickets: #11047, #8736 | Differential Rev(s): Wiki Page: | Phab:D1562,Phab:D1747,Phab:D1748 -------------------------------------+------------------------------------- Comment (by Simon Marlow <marlowsd@…>): In [changeset:"6be09e884730f19da6c24fc565980f515300e53c/ghc" 6be09e8/ghc]: {{{ #!CommitTicketReference repository="ghc" revision="6be09e884730f19da6c24fc565980f515300e53c" Enable stack traces with ghci -fexternal-interpreter -prof Summary: The main goal here is enable stack traces in GHCi. After this change, if you start GHCi like this: ghci -fexternal-interpreter -prof (which requires packages to be built for profiling, but not GHC itself) then the interpreter manages cost-centre stacks during execution and can produce a stack trace on request. Call locations are available for all interpreted code, and any compiled code that was built with the `-fprof-auto` familiy of flags. There are a couple of ways to get a stack trace: * `error`/`undefined` automatically get one attached * `Debug.Trace.traceStack` can be used anywhere, and prints the current stack Because the interpreter is running in a separate process, only the interpreted code is running in profiled mode and the compiler itself isn't slowed down by profiling. The GHCi debugger still doesn't work with -fexternal-interpreter, although this patch gets it a step closer. Most of the functionality of breakpoints is implemented, but the runtime value introspection is still not supported. Along the way I also did some refactoring and added type arguments to the various remote pointer types in `GHCi.RemotePtr`, so there's better type safety and documentation in the bridge code between GHC and ghc-iserv. Test Plan: validate Reviewers: bgamari, ezyang, austin, hvr, goldfire, erikd Subscribers: thomie Differential Revision: https://phabricator.haskell.org/D1747 GHC Trac Issues: #11047, #11100 }}} -- Ticket URL: <http://ghc.haskell.org/trac/ghc/ticket/11100#comment:6> GHC <http://www.haskell.org/ghc/> The Glasgow Haskell Compiler
#11100: Remote GHCi -------------------------------------+------------------------------------- Reporter: simonmar | Owner: simonmar Type: task | Status: new Priority: normal | Milestone: 8.0.1 Component: GHCi | Version: 7.10.2 Resolution: | Keywords: Operating System: Unknown/Multiple | Architecture: | Unknown/Multiple Type of failure: None/Unknown | Test Case: Blocked By: | Blocking: Related Tickets: #11047, #8736 | Differential Rev(s): Wiki Page: | Phab:D1562,Phab:D1747,Phab:D1748 -------------------------------------+------------------------------------- Comment (by Simon Marlow <marlowsd@…>): In [changeset:"09425cbe4fb93ac3af4932937478d46972ecf91f/ghc" 09425cb/ghc]: {{{ #!CommitTicketReference repository="ghc" revision="09425cbe4fb93ac3af4932937478d46972ecf91f" Support for qRecover in TH with -fexternal-interpreter Summary: This completes the support for TH with -fexternal-interpreter. Test Plan: validate Reviewers: bgamari, ezyang, austin, niteria, goldfire, erikd Subscribers: thomie Differential Revision: https://phabricator.haskell.org/D1748 GHC Trac Issues: #11100 }}} -- Ticket URL: <http://ghc.haskell.org/trac/ghc/ticket/11100#comment:7> GHC <http://www.haskell.org/ghc/> The Glasgow Haskell Compiler
#11100: Remote GHCi -------------------------------------+------------------------------------- Reporter: simonmar | Owner: simonmar Type: task | Status: new Priority: normal | Milestone: 8.0.1 Component: GHCi | Version: 7.10.2 Resolution: | Keywords: Operating System: Unknown/Multiple | Architecture: | Unknown/Multiple Type of failure: None/Unknown | Test Case: Blocked By: | Blocking: Related Tickets: #11047, #8736 | Differential Rev(s): Wiki Page: | Phab:D1562,Phab:D1747,Phab:D1748 -------------------------------------+------------------------------------- Comment (by simonmar): The last missing functionality is the GHCi debugger, everything else should now work. -- Ticket URL: <http://ghc.haskell.org/trac/ghc/ticket/11100#comment:8> GHC <http://www.haskell.org/ghc/> The Glasgow Haskell Compiler
#11100: Remote GHCi -------------------------------------+------------------------------------- Reporter: simonmar | Owner: simonmar Type: task | Status: new Priority: normal | Milestone: 8.0.1 Component: GHCi | Version: 7.10.2 Resolution: | Keywords: Operating System: Unknown/Multiple | Architecture: | Unknown/Multiple Type of failure: None/Unknown | Test Case: Blocked By: | Blocking: Related Tickets: #11047, #8736 | Differential Rev(s): Wiki Page: | Phab:D1562,Phab:D1747,Phab:D1748 -------------------------------------+------------------------------------- Changes (by simonmar): * cc: Phyx- (added) Comment: @Phyx-, I don't know if you're interested in looking at this, but there's a bit of Windows-specific hacking needed to get this working for Windows. We use pipes directly to communicate between GHC and the ghc-iserv process, and there's currently no library support to do this on Windows. `System.Process` rolls its own, but it's not reusable directly. Starting place is `iserv/Main.hs` and `compiler/ghci/GHCi.hs`. -- Ticket URL: <http://ghc.haskell.org/trac/ghc/ticket/11100#comment:9> GHC <http://www.haskell.org/ghc/> The Glasgow Haskell Compiler
#11100: Remote GHCi -------------------------------------+------------------------------------- Reporter: simonmar | Owner: simonmar Type: task | Status: new Priority: normal | Milestone: 8.0.1 Component: GHCi | Version: 7.10.2 Resolution: | Keywords: Operating System: Unknown/Multiple | Architecture: | Unknown/Multiple Type of failure: None/Unknown | Test Case: Blocked By: | Blocking: Related Tickets: #11047, #8736 | Differential Rev(s): Wiki Page: | Phab:D1562,Phab:D1747,Phab:D1748 -------------------------------------+------------------------------------- Comment (by Phyx-): @simonmar, Sure I'd be happy to do that bit. I should be finished with my current linker changes end of next week and will start on this then. -- Ticket URL: <http://ghc.haskell.org/trac/ghc/ticket/11100#comment:10> GHC <http://www.haskell.org/ghc/> The Glasgow Haskell Compiler
#11100: Remote GHCi -------------------------------------+------------------------------------- Reporter: simonmar | Owner: simonmar Type: task | Status: new Priority: normal | Milestone: 8.0.1 Component: GHCi | Version: 7.10.2 Resolution: | Keywords: Operating System: Unknown/Multiple | Architecture: | Unknown/Multiple Type of failure: None/Unknown | Test Case: Blocked By: | Blocking: Related Tickets: #11047, #8736 | Differential Rev(s): Wiki Page: | Phab:D1562,Phab:D1747,Phab:D1748 -------------------------------------+------------------------------------- Comment (by Simon Marlow <marlowsd@…>): In [changeset:"3e796e1ae8b13ec1c607a1864894171a58cef592/ghc" 3e796e1a/ghc]: {{{ #!CommitTicketReference repository="ghc" revision="3e796e1ae8b13ec1c607a1864894171a58cef592" A little closer to supporting breakpoints with -fexternal-interpreter Summary: Moves getIdValFromApStack to the server, and removes one use of wormhole. Test Plan: validate Reviewers: bgamari, niteria, austin, hvr, erikd Subscribers: thomie Differential Revision: https://phabricator.haskell.org/D1768 GHC Trac Issues: #11100 }}} -- Ticket URL: <http://ghc.haskell.org/trac/ghc/ticket/11100#comment:11> GHC <http://www.haskell.org/ghc/> The Glasgow Haskell Compiler
#11100: Remote GHCi -------------------------------------+------------------------------------- Reporter: simonmar | Owner: simonmar Type: task | Status: new Priority: normal | Milestone: 8.0.1 Component: GHCi | Version: 7.10.2 Resolution: | Keywords: Operating System: Unknown/Multiple | Architecture: | Unknown/Multiple Type of failure: None/Unknown | Test Case: Blocked By: | Blocking: Related Tickets: #11047, #8736 | Differential Rev(s): Wiki Page: | Phab:D1562,Phab:D1747,Phab:D1748 -------------------------------------+------------------------------------- Comment (by Phyx-): I have it working on Windows now. Will clean it up and put it for review soon. -- Ticket URL: <http://ghc.haskell.org/trac/ghc/ticket/11100#comment:12> GHC <http://www.haskell.org/ghc/> The Glasgow Haskell Compiler
#11100: Remote GHCi -------------------------------------+------------------------------------- Reporter: simonmar | Owner: simonmar Type: task | Status: new Priority: normal | Milestone: 8.0.1 Component: GHCi | Version: 7.10.2 Resolution: | Keywords: Operating System: Unknown/Multiple | Architecture: | Unknown/Multiple Type of failure: None/Unknown | Test Case: Blocked By: | Blocking: Related Tickets: #11047, #8736 | Differential Rev(s): Wiki Page: | Phab:D1562,Phab:D1747,Phab:D1748,Phab:D1836 -------------------------------------+------------------------------------- Changes (by Phyx-): * differential: Phab:D1562,Phab:D1747,Phab:D1748 => Phab:D1562,Phab:D1747,Phab:D1748,Phab:D1836 -- Ticket URL: <http://ghc.haskell.org/trac/ghc/ticket/11100#comment:13> GHC <http://www.haskell.org/ghc/> The Glasgow Haskell Compiler
#11100: Remote GHCi -------------------------------------+------------------------------------- Reporter: simonmar | Owner: simonmar Type: task | Status: new Priority: normal | Milestone: 8.0.1 Component: GHCi | Version: 7.10.2 Resolution: | Keywords: Operating System: Unknown/Multiple | Architecture: | Unknown/Multiple Type of failure: None/Unknown | Test Case: Blocked By: | Blocking: Related Tickets: #11047, #8736 | Differential Rev(s): Phab:D1562 Wiki Page: | Phab:D1747 Phab:D1748 Phab:D1836 -------------------------------------+------------------------------------- Changes (by Phyx-): * differential: Phab:D1562,Phab:D1747,Phab:D1748,Phab:D1836 => Phab:D1562 Phab:D1747 Phab:D1748 Phab:D1836 -- Ticket URL: <http://ghc.haskell.org/trac/ghc/ticket/11100#comment:14> GHC <http://www.haskell.org/ghc/> The Glasgow Haskell Compiler
#11100: Remote GHCi -------------------------------------+------------------------------------- Reporter: simonmar | Owner: simonmar Type: task | Status: new Priority: normal | Milestone: 8.0.1 Component: GHCi | Version: 7.10.2 Resolution: | Keywords: Operating System: Unknown/Multiple | Architecture: | Unknown/Multiple Type of failure: None/Unknown | Test Case: Blocked By: | Blocking: Related Tickets: #11047, #8736 | Differential Rev(s): Phab:D1562 Wiki Page: | Phab:D1747 Phab:D1748 Phab:D1836 -------------------------------------+------------------------------------- Comment (by Herbert Valerio Riedel <hvr@…>): In [changeset:"f1885dfd7ee84fae478e2e8398d2eff14ee36b2c/ghc" f1885df/ghc]: {{{ #!CommitTicketReference repository="ghc" revision="f1885dfd7ee84fae478e2e8398d2eff14ee36b2c" Update process submodule to 1.4.2.0 release Most notably, this pulls in a feature needed for #11100 (remote ghci) windows-support }}} -- Ticket URL: <http://ghc.haskell.org/trac/ghc/ticket/11100#comment:15> GHC <http://www.haskell.org/ghc/> The Glasgow Haskell Compiler
#11100: Remote GHCi -------------------------------------+------------------------------------- Reporter: simonmar | Owner: simonmar Type: task | Status: new Priority: normal | Milestone: 8.0.1 Component: GHCi | Version: 7.10.2 Resolution: | Keywords: Operating System: Unknown/Multiple | Architecture: | Unknown/Multiple Type of failure: None/Unknown | Test Case: Blocked By: | Blocking: Related Tickets: #11047, #8736 | Differential Rev(s): Phab:D1562 Wiki Page: | Phab:D1747 Phab:D1748 Phab:D1836 -------------------------------------+------------------------------------- Comment (by Ben Gamari <ben@…>): In [changeset:"44a5d51a4892b85c7eba09dcb90ca02245637812/ghc" 44a5d51a/ghc]: {{{ #!CommitTicketReference repository="ghc" revision="44a5d51a4892b85c7eba09dcb90ca02245637812" Enable RemoteGHCi on Windows Makes the needed changes to make RemoteGHCi work on Windows. The approach passes OS Handles areound instead of the Posix Fd as on Linux. The reason is that I could not find any real documentation about the behaviour of Windows w.r.t inheritance and Posix FDs. The implementation with Fd did not seem to be able to find the Fd in the child process. Instead I'm using the much better documented approach of passing inheriting handles. This requires a small modification to the `process` library. https://github.com/haskell/process/pull/52 Test Plan: ./validate On Windows x86_64 Reviewers: thomie, erikd, bgamari, simonmar, austin, hvr Reviewed By: simonmar Subscribers: #ghc_windows_task_force Differential Revision: https://phabricator.haskell.org/D1836 GHC Trac Issues: #11100 }}} -- Ticket URL: <http://ghc.haskell.org/trac/ghc/ticket/11100#comment:16> GHC <http://www.haskell.org/ghc/> The Glasgow Haskell Compiler
#11100: Remote GHCi -------------------------------------+------------------------------------- Reporter: simonmar | Owner: simonmar Type: task | Status: merge Priority: normal | Milestone: 8.0.1 Component: GHCi | Version: 7.10.2 Resolution: | Keywords: Operating System: Unknown/Multiple | Architecture: | Unknown/Multiple Type of failure: None/Unknown | Test Case: Blocked By: | Blocking: Related Tickets: #11047, #8736 | Differential Rev(s): Phab:D1562 Wiki Page: | Phab:D1747 Phab:D1748 Phab:D1836 -------------------------------------+------------------------------------- Changes (by bgamari): * status: new => merge -- Ticket URL: <http://ghc.haskell.org/trac/ghc/ticket/11100#comment:17> GHC <http://www.haskell.org/ghc/> The Glasgow Haskell Compiler
#11100: Remote GHCi -------------------------------------+------------------------------------- Reporter: simonmar | Owner: simonmar Type: task | Status: closed Priority: normal | Milestone: 8.0.1 Component: GHCi | Version: 7.10.2 Resolution: fixed | Keywords: Operating System: Unknown/Multiple | Architecture: | Unknown/Multiple Type of failure: None/Unknown | Test Case: Blocked By: | Blocking: Related Tickets: #11047, #8736 | Differential Rev(s): Phab:D1562 Wiki Page: | Phab:D1747 Phab:D1748 Phab:D1836 -------------------------------------+------------------------------------- Changes (by bgamari): * status: merge => closed * resolution: => fixed Comment: Merged as 0e90d3bded49f42d25527cd4a67f2b1ef9cf5ff3. -- Ticket URL: <http://ghc.haskell.org/trac/ghc/ticket/11100#comment:18> GHC <http://www.haskell.org/ghc/> The Glasgow Haskell Compiler
#11100: Remote GHCi -------------------------------------+------------------------------------- Reporter: simonmar | Owner: simonmar Type: task | Status: closed Priority: normal | Milestone: 8.0.1 Component: GHCi | Version: 7.10.2 Resolution: fixed | Keywords: Operating System: Unknown/Multiple | Architecture: | Unknown/Multiple Type of failure: None/Unknown | Test Case: Blocked By: | Blocking: Related Tickets: #11047, #8736 | Differential Rev(s): Phab:D1562 Wiki Page: | Phab:D1747 Phab:D1748 Phab:D1836 -------------------------------------+------------------------------------- Comment (by Simon Marlow <marlowsd@…>): In [changeset:"2fb6a8c30567e7d071ffcf88e22ea7f72f60b826/ghc" 2fb6a8c/ghc]: {{{ #!CommitTicketReference repository="ghc" revision="2fb6a8c30567e7d071ffcf88e22ea7f72f60b826" Remote GHCi: Optimize the serialization/deserialization of byte code Summary: This cuts allocations by about a quarter. Test Plan: * validate * `ghci -fexternal-interpreter` in `nofib/real/anna` Reviewers: niteria, bgamari, ezyang, austin, hvr, erikd Subscribers: thomie Differential Revision: https://phabricator.haskell.org/D1875 GHC Trac Issues: #11100 }}} -- Ticket URL: <http://ghc.haskell.org/trac/ghc/ticket/11100#comment:19> GHC <http://www.haskell.org/ghc/> The Glasgow Haskell Compiler
#11100: Remote GHCi -------------------------------------+------------------------------------- Reporter: simonmar | Owner: simonmar Type: task | Status: closed Priority: normal | Milestone: 8.0.1 Component: GHCi | Version: 7.10.2 Resolution: fixed | Keywords: Operating System: Unknown/Multiple | Architecture: | Unknown/Multiple Type of failure: None/Unknown | Test Case: Blocked By: | Blocking: Related Tickets: #11047, #8736 | Differential Rev(s): Phab:D1562 Wiki Page: | Phab:D1747 Phab:D1748 Phab:D1836 -------------------------------------+------------------------------------- Comment (by Simon Marlow <marlowsd@…>): In [changeset:"7cb1fae2d6ec90b10708a2631cd1069561177bd4/ghc" 7cb1fae2/ghc]: {{{ #!CommitTicketReference repository="ghc" revision="7cb1fae2d6ec90b10708a2631cd1069561177bd4" Remote GHCi: batch the creation of strings Summary: This makes a big performance difference especially when loading a large number of modules and using parallel compilation (ghci -jN). Test Plan: * validate * `ghci -fexternal-interpreter` in `nofib/real/anna` Reviewers: niteria, bgamari, ezyang, austin, hvr, erikd Subscribers: thomie Differential Revision: https://phabricator.haskell.org/D1876 GHC Trac Issues: #11100 }}} -- Ticket URL: <http://ghc.haskell.org/trac/ghc/ticket/11100#comment:20> GHC <http://www.haskell.org/ghc/> The Glasgow Haskell Compiler
#11100: Remote GHCi -------------------------------------+------------------------------------- Reporter: simonmar | Owner: simonmar Type: task | Status: closed Priority: normal | Milestone: 8.0.1 Component: GHCi | Version: 7.10.2 Resolution: fixed | Keywords: Operating System: Unknown/Multiple | Architecture: | Unknown/Multiple Type of failure: None/Unknown | Test Case: Blocked By: | Blocking: Related Tickets: #11047, #8736 | Differential Rev(s): Phab:D1562 Wiki Page: | Phab:D1747 Phab:D1748 Phab:D1836 -------------------------------------+------------------------------------- Comment (by Simon Marlow <marlowsd@…>): In [changeset:"c996db5b1802ebeb93420785127f7fd55b7ec0c0/ghc" c996db5/ghc]: {{{ #!CommitTicketReference repository="ghc" revision="c996db5b1802ebeb93420785127f7fd55b7ec0c0" Remote GHCi: parallelise BCO serialization Summary: Serialization of BCOs is slow, but we can parallelise it when using ghci -j<n>. It parallelises nicely, saving multiple seconds off the link time in a large example I have. Test Plan: * validate * `ghci -fexternal-interpreter` in `nofib/real/anna` Reviewers: niteria, bgamari, ezyang, austin, hvr, erikd Subscribers: thomie Differential Revision: https://phabricator.haskell.org/D1877 GHC Trac Issues: #11100 }}} -- Ticket URL: <http://ghc.haskell.org/trac/ghc/ticket/11100#comment:21> GHC <http://www.haskell.org/ghc/> The Glasgow Haskell Compiler
participants (1)
-
GHC