options for the RTS in a dll

Previous Topic Next Topic
 
classic Classic list List threaded Threaded
3 messages Options
Reply | Threaded
Open this post in threaded view
|

options for the RTS in a dll

Kees Bleijenberg

I’ve written a windows dll in Haskell. The calling program is written in Delphi (pascal). I want to profile this dll.

Because you don’t have a command line in a dll for +RTS… -RTS, I call the dll with  hs_init_ghc (a exported function in the dll). I had to translate some parts of rtsopts.h to Delphi.

Everyting seems okay. The program does not hang, no catastrophic failures.  When I start with the parameter for rtsoptions in hs_init_ghc I get:

with  -t --machine-readable ->machine readable overview on the screen.

with -B sounds the bell with each garbage collection,

and also  --info works as expected.

 

But when I call hs_init_ghc with rtsoptions  –h I get 3 lines with on each line:  Can’t open profiling report file <unknown>.hp. 

With –p I get missing profiling report <unknown>.prof

Any idea what I’am doing wrong?

 

Kees

 

 


_______________________________________________
Haskell-Cafe mailing list
[hidden email]
http://www.haskell.org/mailman/listinfo/haskell-cafe
Reply | Threaded
Open this post in threaded view
|

Re: options for the RTS in a dll

Nicolas Wu
On Sun, Dec 1, 2013 at 10:10 AM, Kees Bleijenberg
<[hidden email]> wrote:
> But when I call hs_init_ghc with rtsoptions  –h I get 3 lines with on each
> line:  Can’t open profiling report file <unknown>.hp.
>
> With –p I get missing profiling report <unknown>.prof
>
> Any idea what I’am doing wrong?

Sounds odd. Have you ensured you have write permissions where the
profiling files will be created?
_______________________________________________
Haskell-Cafe mailing list
[hidden email]
http://www.haskell.org/mailman/listinfo/haskell-cafe
Reply | Threaded
Open this post in threaded view
|

Re: options for the RTS in a dll

Kees Bleijenberg
Nicolas,

If I profile a test executable in the same directory with +RTS -p everything works fine. So probably it is not a permission issue.

Kees

-----Oorspronkelijk bericht-----
Van: Nicolas Wu [mailto:[hidden email]]
Verzonden: zondag 1 december 2013 11:19
Aan: Kees Bleijenberg
CC: haskell-cafe
Onderwerp: Re: [Haskell-cafe] options for the RTS in a dll

On Sun, Dec 1, 2013 at 10:10 AM, Kees Bleijenberg <[hidden email]> wrote:
> But when I call hs_init_ghc with rtsoptions  –h I get 3 lines with on
> each
> line:  Can’t open profiling report file <unknown>.hp.
>
> With –p I get missing profiling report <unknown>.prof
>
> Any idea what I’am doing wrong?

Sounds odd. Have you ensured you have write permissions where the profiling files will be created?

_______________________________________________
Haskell-Cafe mailing list
[hidden email]
http://www.haskell.org/mailman/listinfo/haskell-cafe