Ticket #1085 (closed task: fixed)

Opened 2 years ago

Last modified 10 months ago

Redesign of the scheme for getting the datacon symbol name of a closure in the RTS

Reported by: mnislaih Assigned to:
Priority: normal Milestone: 6.8.1
Component: Runtime System Version: 6.6
Severity: normal Keywords:
Cc: Difficulty: Moderate (1 day)
Test Case: Architecture: Unknown
Operating System: Unknown

Description

Currently, from the closure we get its info table address, and since those are static for Constr closures, we use a hashtable (defined in Linker.c) to relate symbol names obtained when linking and the addresses.

The proposal is to extend the info table with a field for the symbol name, making this process much more straightforward. The trade-off is that this will augment the size of binaries a bit, so we could make this 'labelling' of info tables optional via a flag.

Change History

01/04/07 02:26:14 changed by mnislaih

Does this explanation make sense?

01/04/07 02:28:30 changed by mnislaih

I wonder if then there would be special versions of the libs compiled under this 'debugging' flag, as currently happens for the profiling libs. Would the increment in size be big enough to justify this inconvenience? Most probably not.

01/05/07 07:48:18 changed by simonmar

No, we definitely don't want to build all the libs twice!

This only affects constructors, so the binary size increase should be minimal. We'll just live with it. Besides, we already derive Data for lots of types, and that instance already contains these strings - perhaps we could arrange to share them?

The right way is to make a new kind of info table for constructors, just as we currently have StgFunInfoTable for functions, and StgRetInfoTable for return addresses. The constructor info table would have a single extra field, containing a pointer to the name of the constructor (in UTF-8, of course).

05/07/07 03:48:02 changed by simonmar

  • status changed from new to closed.
  • resolution set to fixed.

This is now done.

11/05/07 07:03:55 changed by igloo

  • milestone changed from 6.8 branch to 6.8.1.