[slang-users] Re: stkcheck conflicts with profile

Jörg Sommer joerg at alea.gnuu.de
Tue Jul 3 07:52:27 EDT 2007


Hi John,

"John E. Davis" <davis at space.mit.edu> wrote:
> =?UTF-8?Q?J=C3=B6rg?= Sommer <joerg at alea.gnuu.de> wrote:
>>using stkcheck while profiling breaks profile. Can you do anything about
>>this? E.g. disable stkcheck if profiling is active or abort profiling if
>>stkcheck is active?
>
> The debugger, profiler, and stack checker are implemented by defining
> hooks that get called before and after the execution of every
> statement/function.  There is only one set of such hooks and for that
> reason, only one of the above tasks can be performed at a time. 
>
> The only work-around

No, I don't want a work-around. You should add something like this

if (_get_bof_handler != profiler_bof)
  throw UsageError, "Another process grabbed the bof handler. Please
    pay attention that stckcheck is not active";

to profile_end() or

if (_get_bof_handler != NULL and _get_bof_handler != stkcheck_bof)
  throw UsageError, "Another bof handler is active. You can't use
    stkcheck and profiler at the same time";

to enable_stack_check(). It took me some time to find out that stkcheck
is the cause of cluttered profiling output.

Bye, Jörg.
-- 
“Programming today is a race between software engineers striving to
build bigger and better idiot—proof programs, and the Universe trying
to produce bigger and better idiots. So far, the Universe is winning.”
(Rich Cook)


More information about the slang-users-l mailing list