Verbosity

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

Verbosity

Luca Bruno aka Lethalman
Hello,
sorry if my patches are really small, this is the first time i'm reading  
the code ;)
However this patch set verbosity > 2 for both Scavenging messages and  
readline symbols traceback on SIGINT, which are pretty boring.

Bye.

--
http://lethalman.blogspot.com - Thoughts about computer technologies
_______________________________________________
help-smalltalk mailing list
[hidden email]
http://lists.gnu.org/mailman/listinfo/help-smalltalk

verbosity.patch (1K) Download Attachment
Reply | Threaded
Open this post in threaded view
|

Re: Verbosity

Paolo Bonzini
Luca Bruno wrote:
> Hello,
> sorry if my patches are really small, this is the first time i'm
> reading the code ;)
No problem.  It's the right way to start.  Still, please configure your
mailer to encode them as text/plain rather than application/octet-stream.
> However this patch set verbosity > 2 for both Scavenging messages and
> readline symbols traceback on SIGINT, which are pretty boring.
The latter is wrong because in some cases (SIGSEGV) the backtrace is
necessary.  I'd prefer something like this:

      if (is_serious_error || sig == SIGUSR1
           || (_gst_verbosity > 2 && (ip || _gst_gc_running))

Can you confirm that it works?

Paolo



_______________________________________________
help-smalltalk mailing list
[hidden email]
http://lists.gnu.org/mailman/listinfo/help-smalltalk
Reply | Threaded
Open this post in threaded view
|

Re: Verbosity

Luca Bruno aka Lethalman
In data 02 ottobre 2006 alle ore 07:37:36, Paolo Bonzini  
<[hidden email]> ha scritto:

> Luca Bruno wrote:
>> Hello,
>> sorry if my patches are really small, this is the first time i'm  
>> reading the code ;)
> No problem.  It's the right way to start.  Still, please configure your  
> mailer to encode them as text/plain rather than application/octet-stream.
>> However this patch set verbosity > 2 for both Scavenging messages and  
>> readline symbols traceback on SIGINT, which are pretty boring.
> The latter is wrong because in some cases (SIGSEGV) the backtrace is  
> necessary.  I'd prefer something like this:
>

I was looking at this:

case SIGINT:
       is_serious_error = false;
       if (!_gst_non_interactive && in_interpreter)
        {
          _gst_set_signal_handler (sig, interrupt_handler);
          stop_executing ("userInterrupt");
          return;
        }
       break;

Isn't ^C an user interruption?


>       if (is_serious_error || sig == SIGUSR1
>            || (_gst_verbosity > 2 && (ip || _gst_gc_running))
>
> Can you confirm that it works?
>
> Paolo
>

Is important to show backtrace for SIGUSR1 anyway if verbosity is less  
than 3?

        if (is_serious_error || (_gst_verbosity > 2 && (ip ||  
_gst_gc_running))

--
http://lethalman.blogspot.com - Thoughts about computer technologies


_______________________________________________
help-smalltalk mailing list
[hidden email]
http://lists.gnu.org/mailman/listinfo/help-smalltalk
Reply | Threaded
Open this post in threaded view
|

Re: Verbosity

Paolo Bonzini

> I was looking at this:
>
> case SIGINT:
>       is_serious_error = false;
>       if (!_gst_non_interactive && in_interpreter)
>     {
>       _gst_set_signal_handler (sig, interrupt_handler);
>       stop_executing ("userInterrupt");
>       return;
>     }
>       break;
>
> Isn't ^C an user interruption?
Yes, but the code that you patched it is not only run for SIGINT.  It
runs also for other signals, including SIGSEGV and SIGUSR1, for which we
need the backtrace:
>>       if (is_serious_error || sig == SIGUSR1
>>            || (_gst_verbosity > 2 && (ip || _gst_gc_running))
>>
> Is important to show backtrace for SIGUSR1 anyway if verbosity is less
> than 3?
>
>        if (is_serious_error || (_gst_verbosity > 2 && (ip ||
> _gst_gc_running))
>
SIGUSR1 is a quick'n'dirty way to show backtraces.  It will not occur
unless the user asks for it.

Paolo


_______________________________________________
help-smalltalk mailing list
[hidden email]
http://lists.gnu.org/mailman/listinfo/help-smalltalk