[m-dev.] for review: make profiling handle control-c

Tyson Dowd trd at cs.mu.OZ.AU
Tue Jan 16 10:20:43 AEDT 2001


On 15-Jan-2001, Fergus Henderson <fjh at cs.mu.OZ.AU> wrote:
> On 15-Jan-2001, Thomas Conway <conway at cs.mu.OZ.AU> wrote:
> > On Mon, Jan 15, 2001 at 04:12:08PM EST, Anthony Lee SENYARD wrote:
> > > That is odd.  I tried to do this (compile in profiling grade, run for a
> > > while then hit ctrl-c) on roy and no profiling information was generated.
> > > I asked Tyson and he indicated that ctrl-c and exceptions were not handled
> > > by the profiler.
> 
> Tyson is right.
> 
> > If you're using asm_fast.gc.prof then it should be happening - to
> > check, you could use -g in your MLFLAGS to prevent the executable
> > from being stripped, and use gdb to check that `checked_atexit' is
> > begin called.
> 
> Functions registered with atexit() are not called if the
> program exits because of an unhandled SIGINT signal.
> 
> The following patch should handle it.

This looks good -- if it works OK could you please commit it to both
branches?

-- 
       Tyson Dowd           # 
                            #  Surreal humour isn't everyone's cup of fur.
     trd at cs.mu.oz.au        # 
http://www.cs.mu.oz.au/~trd #
--------------------------------------------------------------------------
mercury-developers mailing list
Post messages to:       mercury-developers at cs.mu.oz.au
Administrative Queries: owner-mercury-developers at cs.mu.oz.au
Subscriptions:          mercury-developers-request at cs.mu.oz.au
--------------------------------------------------------------------------



More information about the developers mailing list