Ignore:
Timestamp:
Nov 10, 2018, 2:16:38 PM (3 years ago)
Author:
alain
Message:

Cosmetic: improve debug.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/kernel/kern/cluster.c

    r583 r593  
    113113
    114114#if DEBUG_CLUSTER_INIT
    115 uint32_t cycle = (uint32_t)hal_get_cycles();
     115uint32_t   cycle = (uint32_t)hal_get_cycles();
     116thread_t * this  = CURRENT_THREAD;
    116117if( DEBUG_CLUSTER_INIT < cycle )
    117 printk("\n[DBG] %s : thread %x in process %x enters for cluster %x / cycle %d\n",
    118 __FUNCTION__, CURRENT_THREAD->trdid, CURRENT_THREAD->process->pid, local_cxy , cycle );
     118printk("\n[%s] thread[%x,%x] enters for cluster %x / cycle %d\n",
     119__FUNCTION__, this->process->pid, this->trdid, local_cxy , cycle );
    119120#endif
    120121
     
    132133cycle = (uint32_t)hal_get_cycles();
    133134if( DEBUG_CLUSTER_INIT < cycle )
    134 printk("\n[DBG] %s : PPM initialized in cluster %x / cycle %d\n",
     135printk("\n[%s] PPM initialized in cluster %x / cycle %d\n",
    135136__FUNCTION__ , local_cxy , cycle );
    136137#endif
     
    142143cycle = (uint32_t)hal_get_cycles();
    143144if( DEBUG_CLUSTER_INIT < cycle )
    144 printk("\n[DBG] %s : KHM initialized in cluster %x at cycle %d\n",
     145printk("\n[%s] KHM initialized in cluster %x at cycle %d\n",
    145146__FUNCTION__ , local_cxy , hal_get_cycles() );
    146147#endif
     
    152153cycle = (uint32_t)hal_get_cycles();
    153154if( DEBUG_CLUSTER_INIT < cycle )
    154 printk("\n[DBG] %s : KCM initialized in cluster %x at cycle %d\n",
     155printk("\n[%s] KCM initialized in cluster %x at cycle %d\n",
    155156__FUNCTION__ , local_cxy , hal_get_cycles() );
    156157#endif
     
    167168cycle = (uint32_t)hal_get_cycles();
    168169if( DEBUG_CLUSTER_INIT < cycle )
    169 printk("\n[DBG] %s : cores initialized in cluster %x / cycle %d\n",
     170printk("\n[%s] cores initialized in cluster %x / cycle %d\n",
    170171__FUNCTION__ , local_cxy , cycle );
    171172#endif
     
    181182cycle = (uint32_t)hal_get_cycles();
    182183if( DEBUG_CLUSTER_INIT < cycle )
    183 printk("\n[DBG] %s : RPC fifo inialized in cluster %x at cycle %d\n",
     184printk("\n[%s] RPC fifo inialized in cluster %x at cycle %d\n",
    184185__FUNCTION__ , local_cxy , hal_get_cycles() );
    185186#endif
     
    212213cycle = (uint32_t)hal_get_cycles();
    213214if( DEBUG_CLUSTER_INIT < cycle )
    214 printk("\n[DBG] %s : thread %x in process %x exit for cluster %x / cycle %d\n",
    215 __FUNCTION__, CURRENT_THREAD->trdid, CURRENT_THREAD->process->pid , local_cxy , cycle );
     215printk("\n[%s] thread[%x,%x] exit for cluster %x / cycle %d\n",
     216__FUNCTION__, this->process->pid, this->trdid, local_cxy, cycle );
    216217#endif
    217218
     
    430431
    431432#if DEBUG_CLUSTER_PID_ALLOC
    432 uint32_t cycle = (uint32_t)hal_get_cycles();
     433uint32_t   cycle = (uint32_t)hal_get_cycles();
     434thread_t * this  = CURRENT_THREAD;
    433435if( DEBUG_CLUSTER_PID_ALLOC < cycle )
    434 printk("\n[DBG] %s : thread %x enters in cluster %x / cycle %d\n",
    435 __FUNCTION__ , CURRENT_THREAD , local_cxy , cycle );
     436printk("\n[%s] thread[%x,%x] enters in cluster %x / cycle %d\n",
     437__FUNCTION__ , this->process->pid , this->trdid , local_cxy , cycle );
    436438#endif
    437439
     
    477479cycle = (uint32_t)hal_get_cycles();
    478480if( DEBUG_CLUSTER_PID_ALLOC < cycle )
    479 printk("\n[DBG] %s : thread %x exit in cluster %x / pid %x / cycle %d\n",
    480 __FUNCTION__ , CURRENT_THREAD , local_cxy , *pid , cycle );
     481printk("\n[%s] thread[%x,%x] exit in cluster %x / cycle %d\n",
     482__FUNCTION__ , this->process->pid , this->trdid , local_cxy , cycle );
    481483#endif
    482484
     
    488490
    489491#if DEBUG_CLUSTER_PID_RELEASE
    490 uint32_t cycle = (uint32_t)hal_get_cycles();
    491 if( DEBUG_CLUSTER_PID_RELEASE < cycle )
    492 printk("\n[DBG] %s : thread %x enters in cluster %x / pid %x / cycle %d\n",
    493 __FUNCTION__ , CURRENT_THREAD , local_cxy , pid , cycle );
     492uint32_t   cycle = (uint32_t)hal_get_cycles();
     493thread_t * this  = CURRENT_THREAD;
     494if( DEBUG_CLUSTER_PID_ALLOC < cycle )
     495printk("\n[%s] thread[%x,%x] enters in cluster %x / pid %x / cycle %d\n",
     496__FUNCTION__ , this->process->pid , this->trdid , local_cxy , pid, cycle );
    494497#endif
    495498
     
    519522#if DEBUG_CLUSTER_PID_RELEASE
    520523cycle = (uint32_t)hal_get_cycles();
    521 if( DEBUG_CLUSTER_PID_RELEASE < cycle )
    522 printk("\n[DBG] %s : thread %x exit in cluster %x / cycle %d\n",
    523 __FUNCTION__ , CURRENT_THREAD , local_cxy , cycle );
     524if( DEBUG_CLUSTER_PID_ALLOC < cycle )
     525printk("\n[%s] thread[%x,%x] exit in cluster %x / cycle %d\n",
     526__FUNCTION__ , this->process->pid , this->trdid , local_cxy , cycle );
    524527#endif
    525528
     
    599602
    600603#if DEBUG_CLUSTER_PROCESS_COPIES
    601 uint32_t cycle = (uint32_t)hal_get_cycles();
     604uint32_t   cycle = (uint32_t)hal_get_cycles();
     605thread_t * this  = CURRENT_THREAD;
    602606if( DEBUG_CLUSTER_PROCESS_COPIES < cycle )
    603 printk("\n[DBG] %s enters / cluster %x / process %x / cycle %d\n",
    604 __FUNCTION__ , local_cxy , process , cycle );
     607printk("\n[%s] thread[%x,%x] enters for process %x / cycle %d\n",
     608__FUNCTION__ , this->process->pid , this->trdid , process->pid , cycle );
    605609#endif
    606610
     
    632636cycle = (uint32_t)hal_get_cycles();
    633637if( DEBUG_CLUSTER_PROCESS_COPIES < cycle )
    634 printk("\n[DBG] %s exit / cluster %x / process %x / cycle %d\n",
    635 __FUNCTION__ , local_cxy , process , cycle );
     638printk("\n[%s] thread[%x,%x] exit for process %x / cycle %d\n",
     639__FUNCTION__ , this->process->pid , this->trdid , process->pid , cycle );
    636640#endif
    637641
     
    644648
    645649#if DEBUG_CLUSTER_PROCESS_COPIES
    646 uint32_t cycle = (uint32_t)hal_get_cycles();
     650uint32_t   cycle = (uint32_t)hal_get_cycles();
     651thread_t * this  = CURRENT_THREAD;
    647652if( DEBUG_CLUSTER_PROCESS_COPIES < cycle )
    648 printk("\n[DBG] %s enters / cluster %x / process %x / cycle %d\n",
    649 __FUNCTION__ , local_cxy , process , cycle );
     653printk("\n[%s] thread[%x,%x] enters for process %x / cycle %d\n",
     654__FUNCTION__ , this->process->pid , this->trdid , process->pid , cycle );
    650655#endif
    651656
     
    674679cycle = (uint32_t)hal_get_cycles();
    675680if( DEBUG_CLUSTER_PROCESS_COPIES < cycle )
    676 printk("\n[DBG] %s exit / cluster %x / process %x / cycle %d\n",
    677 __FUNCTION__ , local_cxy , process , cycle );
     681printk("\n[%s] thread[%x,%x] exit for process %x / cycle %d\n",
     682__FUNCTION__ , this->process->pid , this->trdid , process->pid , cycle );
    678683#endif
    679684
Note: See TracChangeset for help on using the changeset viewer.