<div dir="ltr"><div>timeout(1) allows you to specify the signal(7) sent with the --signal option. It may be worth experimenting with different values. One of them might terminate the program while allowing it to clean up and generate profiling information. I don't know enough about the haskell runtime to know.<br><br></div>-vale<br></div><div class="gmail_extra"><br clear="all"><div><div class="gmail_signature"><div dir="ltr"><div>--<br>vale cofer-shabica<br>401.267.8253</div></div></div></div>
<br><div class="gmail_quote">On Wed, May 4, 2016 at 7:06 PM, Tim Perry <span dir="ltr"><<a href="mailto:tim.v2.0@gmail.com" target="_blank">tim.v2.0@gmail.com</a>></span> wrote:<br><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><div dir="ltr">I believe that timeout sends a kill signal to the process in question. I imagine that the process is killed before the profiling information is written and so you get an empty file. When you close the program with alt-F4, the program gets a chance to shut down cleanly and writes on the profiling information (.prof)<div><br></div></div><div class="gmail_extra"><br><div class="gmail_quote"><div><div class="h5">On Wed, May 4, 2016 at 9:11 AM, Ben Rogalski <span dir="ltr"><<a href="mailto:bwrogalski@gmail.com" target="_blank">bwrogalski@gmail.com</a>></span> wrote:<br></div></div><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><div><div class="h5"><div dir="ltr"><div><div><div>I would like to generate a time and allocation profiling report after running my program for exactly 60 seconds (on Ubuntu Linux).<br><br></div>I compiled with the following flags:<br><br>-rtsopts -auto-all -caf-all -fforce-recomp<br><br></div>I then ran the program:<br><br></div><div>The program stops after 60 seconds, but the .prof file is empty.<br><br></div><div>When I run the program without using timeout, and close it manually (Alt F4, it is a graphical program), the .prof file contains the information I would expect.<br></div></div>
<br></div></div>_______________________________________________<br>
Beginners mailing list<br>
<a href="mailto:Beginners@haskell.org" target="_blank">Beginners@haskell.org</a><br>
<a href="http://mail.haskell.org/cgi-bin/mailman/listinfo/beginners" rel="noreferrer" target="_blank">http://mail.haskell.org/cgi-bin/mailman/listinfo/beginners</a><br>
<br></blockquote></div><br></div>
<br>_______________________________________________<br>
Beginners mailing list<br>
<a href="mailto:Beginners@haskell.org">Beginners@haskell.org</a><br>
<a href="http://mail.haskell.org/cgi-bin/mailman/listinfo/beginners" rel="noreferrer" target="_blank">http://mail.haskell.org/cgi-bin/mailman/listinfo/beginners</a><br>
<br></blockquote></div><br></div>