[GHC] #7674: Separate StablePtr table from StableName table.

GHC ghc-devs at haskell.org
Wed Aug 29 20:35:12 UTC 2018


#7674: Separate StablePtr table from StableName table.
-------------------------------------+-------------------------------------
        Reporter:  EyalLotem         |                Owner:  (none)
            Type:  task              |               Status:  closed
        Priority:  normal            |            Milestone:  7.8.1
       Component:  Runtime System    |              Version:  7.6.2
      Resolution:  fixed             |             Keywords:  rts
                                     |  stable_ptr stable_name performance
Operating System:  Unknown/Multiple  |         Architecture:
                                     |  Unknown/Multiple
 Type of failure:  None/Unknown      |            Test Case:
      Blocked By:                    |             Blocking:
 Related Tickets:  #15555            |  Differential Rev(s):
       Wiki Page:                    |
-------------------------------------+-------------------------------------

Comment (by David Feuer <David.Feuer@…>):

 In [changeset:"f48e276a5ba68d8b6fcb4a558022581fb30f9326/ghc"
 f48e276a/ghc]:
 {{{
 #!CommitTicketReference repository="ghc"
 revision="f48e276a5ba68d8b6fcb4a558022581fb30f9326"
 Finish stable split

 Long ago, the stable name table and stable pointer tables were one.
 Now, they are separate, and have significantly different
 implementations. I believe the time has come to finish the split
 that began in #7674.

 * Divide `rts/Stable` into `rts/StableName` and `rts/StablePtr`.

 * Give each table its own mutex.

 * Add FFI functions `hs_lock_stable_ptr_table` and
 `hs_unlock_stable_ptr_table` and document them.
   These are intended to replace the previously undocumented
 `hs_lock_stable_tables` and `hs_lock_stable_tables`,
   which are now documented as deprecated synonyms.

 * Make `eqStableName#` use pointer equality instead of unnecessarily
 comparing stable name table indices.

 Reviewers: simonmar, bgamari, erikd

 Reviewed By: bgamari

 Subscribers: rwbarton, carter

 GHC Trac Issues: #15555

 Differential Revision: https://phabricator.haskell.org/D5084
 }}}

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


More information about the ghc-tickets mailing list