mes: Make debug levels 4 and 5 usable.

* HACKING: Update debug policy.
* lib/linux/read.c (read): Print read in level 5.
* src/mes.c (eval_apply): Print module in level 6.
(main): Likewise.  Remove redundant module printing.
* src/gc.c (gc): Print symbols in level 6.
This commit is contained in:
Jan Nieuwenhuizen 2019-05-27 21:30:48 +02:00
parent c33d6d00bc
commit 952b92dfec
No known key found for this signature in database
GPG Key ID: F3C1A0D9C1D65273
4 changed files with 11 additions and 25 deletions

View File

@ -132,8 +132,10 @@ enough to work on compiling tinycc's tcc.c albeit a somewhat modified version.
- list of symbol
- opened input strings
- gc details
5) usage of opened input strings
5) lots of data
- usage of opened input strings
- bytes read
6) globals
* Bugs
** mes: performance, Mes is now 2-10x slower than Guile.

View File

@ -22,7 +22,7 @@ ssize_t
read (int filedes, void *buffer, size_t size)
{
ssize_t bytes = _sys_call3 (SYS_read, (int) filedes, (long) buffer, (long) size);
if (__mes_debug () > 3)
if (__mes_debug () > 4)
{
if (bytes == 1)
{

View File

@ -225,7 +225,7 @@ gc_ () ///((internal))
SCM
gc ()
{
if (g_debug > 4)
if (g_debug > 5)
{
eputs ("symbols: ");
write_error_ (g_symbols);
@ -237,7 +237,7 @@ gc ()
gc_push_frame ();
gc_ ();
gc_pop_frame ();
if (g_debug > 4)
if (g_debug > 5)
{
eputs ("symbols: ");
write_error_ (g_symbols);

View File

@ -1547,7 +1547,7 @@ begin_expand:
push_cc (input, r2, r0, cell_vm_return);
x = read_input_file_env (r0);
if (g_debug > 3)
if (g_debug > 5)
module_printer (m0);
gc_pop_frame ();
input = r1;
@ -2307,7 +2307,7 @@ main (int argc, char *argv[])
m0 = make_initial_module (a);
g_macros = make_hash_table_ (0);
if (g_debug > 3)
if (g_debug > 5)
module_printer (m0);
SCM program = read_boot ();
@ -2334,7 +2334,7 @@ main (int argc, char *argv[])
}
if (g_debug)
{
if (g_debug > 3)
if (g_debug > 5)
module_printer (m0);
eputs ("\ngc stats: [");
@ -2345,25 +2345,9 @@ main (int argc, char *argv[])
eputs (" => ");
eputs (itoa (g_free));
eputs ("]\n");
if (g_debug > 3)
module_printer (m0);
eputs ("\n");
gc (g_stack);
eputs (" => ");
eputs (itoa (g_free));
eputs ("]\n");
if (g_debug > 3)
module_printer (m0);
eputs ("\n");
gc (g_stack);
eputs (" => ");
eputs (itoa (g_free));
eputs ("]\n");
if (g_debug > 3)
module_printer (m0);
if (g_debug > 3)
if (g_debug > 5)
{
eputs ("ports:");
write_error_ (g_ports);