ghci with -prof

Simon Marlow simonmar@microsoft.com
Wed, 27 Aug 2003 11:09:35 +0100


=20
> running ghci with -prof turned on makes it die immediately (with an
> appropriate message about this combination being illegal).  however, i
> find that i would almost always *rather* run ghci with -prof turned on
> than without it.  i don't particularly want to create=20
> profiles, but i'd
> really like stack backtraces in ghci.
>=20
> how much effort would be required to allow ghci to (at least) *use*
> profiled objects, if not build them itself?

Not trivial, I suspect.  When -prof is turned on, lots of conventions
change, including the layout of heap objects and info tables.  This
means the whole binary has to be compiled with -prof: that includes GHCi
itself.
The byte-code back-end would need some work to make it generate and
interpret byte codes in a profiled world.

Cheers,
	Simon