Changeset 443 for trunk/kernel/mm


Ignore:
Timestamp:
May 16, 2018, 4:15:22 PM (4 years ago)
Author:
alain
Message:

Fix few bugs whike debugging the sort multi-thread application.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/kernel/mm/vmm.c

    r441 r443  
    201201    gpt_t * gpt = &vmm->gpt;
    202202
    203     printk("\n***** VSL and GPT for process %x in cluster %x\n\n",
    204     process->pid , local_cxy );
     203    printk("\n***** VSL and GPT for process %x in cluster %x\n\n", process->pid , local_cxy );
    205204
    206205    // get lock protecting the vseg list
     
    666665uint32_t cycle = (uint32_t)hal_get_cycles();
    667666if( DEBUG_VMM_DESTROY < cycle )
    668 printk("\n[DBG] %s : thread %x enter for process %x / cycle %d\n",
    669 __FUNCTION__ , CURRENT_THREAD , process->pid , cycle );
     667printk("\n[DBG] %s : thread %x enter for process %x in cluster %x / cycle %d\n",
     668__FUNCTION__ , CURRENT_THREAD , process->pid , local_cxy , cycle );
    670669#endif
    671670
    672671#if (DEBUG_VMM_DESTROY & 1 )
     672if( DEBUG_VMM_DESTROY < cycle )
    673673vmm_display( process , true );
    674674#endif
     
    693693#if( DEBUG_VMM_DESTROY & 1 )
    694694if( DEBUG_VMM_DESTROY < cycle )
    695 printk("\n[DBG] %s : %s / vpn_base %x / vpn_size %d\n",
     695printk("\n[DBG] %s : found %s vseg / vpn_base %x / vpn_size %d\n",
    696696__FUNCTION__ , vseg_type_str( vseg->type ), vseg->vpn_base, vseg->vpn_size );
    697697#endif
    698 
    699698        // unmap and release physical pages
    700699        vmm_unmap_vseg( process , vseg );
     
    705704        // release memory allocated to vseg descriptor
    706705        vseg_free( vseg );
     706
     707#if( DEBUG_VMM_DESTROY & 1 )
     708if( DEBUG_VMM_DESTROY < cycle )
     709printk("\n[DBG] %s : %s vseg released / vpn_base %x / vpn_size %d\n",
     710__FUNCTION__ , vseg_type_str( vseg->type ), vseg->vpn_base, vseg->vpn_size );
     711#endif
     712
    707713        }
    708714
     
    717723            {
    718724                    vseg = LIST_FIRST( &vmm->mmap_mgr.zombi_list[i] , vseg_t , zlist );
     725
     726#if( DEBUG_VMM_DESTROY & 1 )
     727if( DEBUG_VMM_DESTROY < cycle )
     728printk("\n[DBG] %s : found zombi vseg / vpn_base %x / vpn_size %d\n",
     729__FUNCTION__ , vseg_type_str( vseg->type ), vseg->vpn_base, vseg->vpn_size );
     730#endif
    719731                    vseg_detach( vmm , vseg );
    720732            vseg_free( vseg );
     733
     734#if( DEBUG_VMM_DESTROY & 1 )
     735if( DEBUG_VMM_DESTROY < cycle )
     736printk("\n[DBG] %s : zombi vseg released / vpn_base %x / vpn_size %d\n",
     737__FUNCTION__ , vseg_type_str( vseg->type ), vseg->vpn_base, vseg->vpn_size );
     738#endif
    721739            }
    722740    }
     
    728746cycle = (uint32_t)hal_get_cycles();
    729747if( DEBUG_VMM_DESTROY < cycle )
    730 printk("\n[DBG] %s : thread %x exit / cycle %d\n",
    731 __FUNCTION__ , CURRENT_THREAD , cycle );
     748printk("\n[DBG] %s : thread %x exit for process %x in cluster %x / cycle %d\n",
     749__FUNCTION__ , CURRENT_THREAD , process->pid , local_cxy , cycle );
    732750#endif
    733751
Note: See TracChangeset for help on using the changeset viewer.