Ignore:
Timestamp:
Oct 1, 2019, 1:19:00 PM (5 years ago)
Author:
alain
Message:

Remove all RPCs in page-fault handling.

File:
1 edited

Legend:

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

    r635 r640  
    507507#if (DEBUG_SCHED_YIELD & 0x1)
    508508if( sched->trace || (cycle > DEBUG_SCHED_YIELD) )
    509 sched_display( lid );
     509sched_remote_display( local_cxy , lid );
    510510#endif
    511511
     
    593593}  // end sched_yield()
    594594
    595 
    596 ///////////////////////////////
    597 void sched_display( lid_t lid )
    598 {
    599     list_entry_t * iter;
    600     thread_t     * thread;
    601 
    602     core_t       * core    = &LOCAL_CLUSTER->core_tbl[lid];
    603     scheduler_t  * sched   = &core->scheduler;
    604    
    605     // get pointers on TXT0 chdev
    606     xptr_t    txt0_xp  = chdev_dir.txt_tx[0];
    607     cxy_t     txt0_cxy = GET_CXY( txt0_xp );
    608     chdev_t * txt0_ptr = GET_PTR( txt0_xp );
    609 
    610     // get extended pointer on remote TXT0 lock
    611     xptr_t  lock_xp = XPTR( txt0_cxy , &txt0_ptr->wait_lock );
    612 
    613     // get TXT0 lock
    614     remote_busylock_acquire( lock_xp );
    615 
    616     nolock_printk("\n***** threads on core[%x,%d] / current %x / rpc_threads %d / cycle %d\n",
    617     local_cxy , lid, sched->current, LOCAL_CLUSTER->rpc_threads[lid],
    618     (uint32_t)hal_get_cycles() );
    619 
    620     // display kernel threads
    621     LIST_FOREACH( &sched->k_root , iter )
    622     {
    623         thread = LIST_ELEMENT( iter , thread_t , sched_list );
    624         if (thread->type == THREAD_DEV)
    625         {
    626             nolock_printk(" - %s / pid %X / trdid %X / desc %X / block %X / flags %X / %s\n",
    627             thread_type_str( thread->type ), thread->process->pid, thread->trdid,
    628             thread, thread->blocked, thread->flags, thread->chdev->name );
    629         }
    630         else
    631         {
    632             nolock_printk(" - %s / pid %X / trdid %X / desc %X / block %X / flags %X\n",
    633             thread_type_str( thread->type ), thread->process->pid, thread->trdid,
    634             thread, thread->blocked, thread->flags );
    635         }
    636     }
    637 
    638     // display user threads
    639     LIST_FOREACH( &sched->u_root , iter )
    640     {
    641         thread = LIST_ELEMENT( iter , thread_t , sched_list );
    642         nolock_printk(" - %s / pid %X / trdid %X / desc %X / block %X / flags %X\n",
    643         thread_type_str( thread->type ), thread->process->pid, thread->trdid,
    644         thread, thread->blocked, thread->flags );
    645     }
    646 
    647     // release TXT0 lock
    648     remote_busylock_release( lock_xp );
    649 
    650 }  // end sched_display()
    651595
    652596/////////////////////////////////////
     
    684628    nolock_printk("\n***** threads on core[%x,%d] / current %x / rpc_threads %d / cycle %d\n",
    685629    cxy , lid, current, rpcs, (uint32_t)hal_get_cycles() );
     630    nolock_printk("  type | pid        | trdid      | desc       | block      | flags      | func\n");
    686631
    687632    // display kernel threads
     
    706651            hal_remote_strcpy( XPTR( local_cxy , name ), XPTR( cxy , chdev->name ) );
    707652
    708             nolock_printk(" - %s / pid %X / trdid %X / desc %X / block %X / flags %X / %s\n",
     653            nolock_printk(" - %s | %X | %X | %X | %X | %X | %s\n",
    709654            thread_type_str( type ), pid, trdid, thread, blocked, flags, name );
    710655        }
    711656        else
    712657        {
    713             nolock_printk(" - %s / pid %X / trdid %X / desc %X / block %X / flags %X\n",
     658            nolock_printk(" - %s | %X | %X | %X | %X | %X |\n",
    714659            thread_type_str( type ), pid, trdid, thread, blocked, flags );
    715660        }
     
    732677        process_t *   process = hal_remote_lpt ( XPTR( cxy , &thread->process ) );
    733678        pid_t         pid     = hal_remote_l32 ( XPTR( cxy , &process->pid ) );
    734 
    735         nolock_printk(" - %s / pid %X / trdid %X / desc %X / block %X / flags %X\n",
    736         thread_type_str( type ), pid, trdid, thread, blocked, flags );
     679        void      *   func    = hal_remote_lpt ( XPTR( cxy , &thread->entry_func ) );
     680
     681        nolock_printk(" - %s | %X | %X | %X | %X | %X | %x\n",
     682        thread_type_str( type ), pid, trdid, thread, blocked, flags, (uint32_t)func );
    737683
    738684        // get next user thread list_entry
Note: See TracChangeset for help on using the changeset viewer.