
Just a quick addition to my previous question- using the ghci linker to load object code, I am currently using the following files from the system libraries:
HSstd.o HSstd_cbits.o HSlang.o HSlang_cbits.o HSdata.o HStext.o HSnet.o HSconcurrent.o HSutil.o HSutil_cbits.o HSposix.o HSposix_cbits.o
However, when tring to profile the code I need to load profiling versions of these objects, but the ghci-linkers loadObject doesn't appear to be able to load the libHSstd_p.a (nor the libHSstd.a) library... how do I get the ghci-linker to link my profiling objects against the profiling versions of the system libraries.
You can't do profiling inside GHCi. Compile the program into a standalone binary to do profiling. Cheers, Simon

Re the current and recurring conflicts between profiling and non-profiling code; how hard would it be to name GHC's output files differently when compiling with -prof? I.e. without, you get the normal foo.hs -> foo.o result, but with -prof you could get e.g. foo.po or foo.p.o instead? (And of course, linking these instead when making the executable) I can probably hack this in a makefile, but it'd be nice to be able to just ghc --make as well. -kzm -- If I haven't seen further, it is by standing in the footprints of giants

Actually, could you generalize this a bit (if you're considering it) and allow global replacement of ".o" instead? Something like --o-postfix=o would be the default and Ketil could get what he wants by --o-postfix=p.o The reason I suggest this is because I often maintain both Sparc Solaris and x86 Linux builds of my programs and basically have to keep two separate directory structures to house them. With this, I could simply point my solaris ghc to do --o-postfix=s.o and my linux ghc to do --o-postfix=l.o or something. - Hal -- Hal Daume III "Computer science is no more about computers | hdaume@isi.edu than astronomy is about telescopes." -Dijkstra | www.isi.edu/~hdaume On 10 May 2002, Ketil Z. Malde wrote:
Re the current and recurring conflicts between profiling and non-profiling code; how hard would it be to name GHC's output files differently when compiling with -prof?
I.e. without, you get the normal foo.hs -> foo.o result, but with -prof you could get e.g. foo.po or foo.p.o instead? (And of course, linking these instead when making the executable)
I can probably hack this in a makefile, but it'd be nice to be able to just ghc --make as well.
-kzm -- If I haven't seen further, it is by standing in the footprints of giants _______________________________________________ Glasgow-haskell-users mailing list Glasgow-haskell-users@haskell.org http://www.haskell.org/mailman/listinfo/glasgow-haskell-users
participants (3)
-
Hal Daume III
-
ketil@ii.uib.no
-
Simon Marlow