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/thread.c

    r637 r640  
    890890    core_t        * core    = thread->core;
    891891
    892 #if DEBUG_THREAD_DESTROY
    893 uint32_t   cycle = (uint32_t)hal_get_cycles();
     892
     893#if DEBUG_THREAD_DESTROY || CONFIG_INSTRUMENTATION_PGFAULTS
     894uint32_t   cycle;
    894895thread_t * this  = CURRENT_THREAD;
     896#endif
     897
     898#if (DEBUG_THREAD_DESTROY & 1)
     899cycle = (uint32_t)hal_get_cycles();
    895900if( DEBUG_THREAD_DESTROY < cycle )
    896901printk("\n[%s] thread[%x,%x] enter to destroy thread[%x,%x] / cycle %d\n",
     
    902907
    903908#if CONFIG_INSTRUMENTATION_PGFAULTS
    904         process->vmm.false_pgfault_nr    += thread->info.false_pgfault_nr;
    905         process->vmm.local_pgfault_nr    += thread->info.local_pgfault_nr;
    906         process->vmm.global_pgfault_nr   += thread->info.global_pgfault_nr;
    907         process->vmm.false_pgfault_cost  += thread->info.false_pgfault_cost;
    908         process->vmm.local_pgfault_cost  += thread->info.local_pgfault_cost;
    909         process->vmm.global_pgfault_cost += thread->info.global_pgfault_cost;
     909process->vmm.false_pgfault_nr    += thread->info.false_pgfault_nr;
     910process->vmm.local_pgfault_nr    += thread->info.local_pgfault_nr;
     911process->vmm.global_pgfault_nr   += thread->info.global_pgfault_nr;
     912process->vmm.false_pgfault_cost  += thread->info.false_pgfault_cost;
     913process->vmm.local_pgfault_cost  += thread->info.local_pgfault_cost;
     914process->vmm.global_pgfault_cost += thread->info.global_pgfault_cost;
     915#endif
     916
     917#if (CONFIG_INSTRUMENTATION_PGFAULTS & 1)
     918uint32_t false_nr    = thread->info.false_pgfault_nr;
     919uint32_t local_nr    = thread->info.local_pgfault_nr;
     920uint32_t global_nr   = thread->info.global_pgfault_nr;
     921uint32_t false_cost  = thread->info.false_pgfault_cost;
     922uint32_t local_cost  = thread->info.local_pgfault_cost;
     923uint32_t global_cost = thread->info.global_pgfault_cost;
     924printk("***** thread[%x,%x] page-faults\n"
     925       " - false    %d ( %d cycles )\n"
     926       " - local    %d ( %d cycles )\n"
     927       " - global   %d ( %d cycles )\n",
     928       this->process->pid, this->trdid,
     929       false_nr , false_cost / false_nr,
     930       local_nr , local_cost / local_nr,
     931       global_nr, global_cost / global_nr );
    910932#endif
    911933
     
    12701292cycle = (uint32_t)hal_get_cycles();
    12711293if( DEBUG_THREAD_IDLE < cycle )
    1272 sched_display( CURRENT_THREAD->core->lid );
     1294sched_remote_display( local_cxy , CURRENT_THREAD->core->lid );
    12731295#endif     
    12741296        // search a runable thread
Note: See TracChangeset for help on using the changeset viewer.