Changeset 611 for trunk/kernel/mm/kmem.c
- Timestamp:
- Jan 9, 2019, 3:02:51 PM (5 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/kernel/mm/kmem.c
r577 r611 40 40 #include <fatfs.h> 41 41 #include <ramfs.h> 42 #include <remote_dir.h> 42 43 #include <remote_sem.h> 43 44 #include <remote_barrier.h> … … 100 101 else if( type == KMEM_CONDVAR ) return sizeof( remote_condvar_t ); 101 102 else if( type == KMEM_MUTEX ) return sizeof( remote_mutex_t ); 103 else if( type == KMEM_DIR ) return sizeof( remote_dir_t ); 104 102 105 else if( type == KMEM_512_BYTES ) return 512; 103 106 … … 128 131 else if( type == KMEM_CONDVAR ) return "KMEM_CONDVAR"; 129 132 else if( type == KMEM_MUTEX ) return "KMEM_MUTEX"; 133 else if( type == KMEM_DIR ) return "KMEM_DIR"; 134 130 135 else if( type == KMEM_512_BYTES ) return "KMEM_512_BYTES"; 131 136 … … 144 149 145 150 #if DEBUG_KMEM 151 thread_t * this = CURRENT_THREAD; 146 152 uint32_t cycle = (uint32_t)hal_get_cycles(); 147 153 if( DEBUG_KMEM < cycle ) 148 printk("\n[ DBG] %s : thread %xenter / KCM type %s missing in cluster %x / cycle %d\n",149 __FUNCTION__, CURRENT_THREAD, kmem_type_str( type ), local_cxy, cycle );154 printk("\n[%s] thread[%x,%x] enter / KCM type %s missing in cluster %x / cycle %d\n", 155 __FUNCTION__, this->process->pid, this->trdid, kmem_type_str( type ), local_cxy, cycle ); 150 156 #endif 151 157 … … 174 180 cycle = (uint32_t)hal_get_cycles(); 175 181 if( DEBUG_KMEM < cycle ) 176 printk("\n[ DBG] %s : thread %xexit / cycle %d\n",177 __FUNCTION__, CURRENT_THREAD, cycle );182 printk("\n[%s] thread[%x,%x] exit / cycle %d\n", 183 __FUNCTION__, this->process->pid, this->trdid, cycle ); 178 184 #endif 179 185 … … 198 204 199 205 #if DEBUG_KMEM 206 thread_t * this = CURRENT_THREAD; 200 207 uint32_t cycle = (uint32_t)hal_get_cycles(); 201 208 if( DEBUG_KMEM < cycle ) 202 printk("\n[DBG] %s : thread %x enter / type %s / cluster %x / cycle %d\n", 203 __FUNCTION__, CURRENT_THREAD, kmem_type_str( type ), local_cxy, cycle ); 209 printk("\n[%s] thread [%x,%x] enter / %s / size %d / cluster %x / cycle %d\n", 210 __FUNCTION__, this->process->pid, this->trdid, 211 kmem_type_str( type ), size, local_cxy, cycle ); 204 212 #endif 205 213 … … 222 230 cycle = (uint32_t)hal_get_cycles(); 223 231 if( DEBUG_KMEM < cycle ) 224 printk("\n[DBG] %s : thread %x exit / %d page(s) allocated / ppn %x / cycle %d\n", 225 __FUNCTION__, CURRENT_THREAD, 1<<size, ppm_page2ppn(XPTR(local_cxy,ptr)), cycle ); 232 printk("\n[%s] thread[%x,%x] exit / %d page(s) allocated / ppn %x / cycle %d\n", 233 __FUNCTION__, this->process->pid, this->trdid, 234 1<<size, ppm_page2ppn(XPTR(local_cxy,ptr)), cycle ); 226 235 #endif 227 236 … … 244 253 cycle = (uint32_t)hal_get_cycles(); 245 254 if( DEBUG_KMEM < cycle ) 246 printk("\n[DBG] %s : thread %x exit / type %s allocated / base %x / size %d / cycle %d\n", 247 __FUNCTION__, CURRENT_THREAD, kmem_type_str( type ), (intptr_t)ptr, size, cycle ); 255 printk("\n[%s] thread[%x,%x] exit / type %s allocated / base %x / size %d / cycle %d\n", 256 __FUNCTION__, this->process->pid, this->trdid, 257 kmem_type_str( type ), (intptr_t)ptr, size, cycle ); 248 258 #endif 249 259 … … 286 296 cycle = (uint32_t)hal_get_cycles(); 287 297 if( DEBUG_KMEM < cycle ) 288 printk("\n[ DBG] %s : thread %xexit / type %s allocated / base %x / size %d / cycle %d\n",289 __FUNCTION__, CURRENT_THREAD, kmem_type_str(type), (intptr_t)ptr,298 printk("\n[%s] thread [%x,%x] exit / type %s allocated / base %x / size %d / cycle %d\n", 299 __FUNCTION__, this->process->pid, this->trdid, kmem_type_str(type), (intptr_t)ptr, 290 300 kmem_type_size(type), cycle ); 291 301 #endif
Note: See TracChangeset
for help on using the changeset viewer.