Changes in / [88dea9d:5ba201d] in mainline
- Files:
-
- 40 deleted
- 22 edited
Legend:
- Unmodified
- Added
- Removed
-
boot/Makefile.common
r88dea9d r5ba201d 92 92 $(USPACEDIR)/app/nettest2/nettest2 \ 93 93 $(USPACEDIR)/app/netecho/netecho \ 94 $(USPACEDIR)/app/ping/ping \ 95 $(USPACEDIR)/app/ps/ps \ 96 $(USPACEDIR)/app/top/top \ 97 $(USPACEDIR)/app/uptime/uptime \ 98 $(USPACEDIR)/app/dummy_load/dummy_load 94 $(USPACEDIR)/app/ping/ping 99 95 100 96 COMPONENTS = \ -
kernel/Makefile
r88dea9d r5ba201d 229 229 generic/src/ipc/event.c \ 230 230 generic/src/security/cap.c \ 231 generic/src/sysinfo/sysinfo.c \ 232 generic/src/ps/ps.c \ 233 generic/src/ps/cpu.c \ 234 generic/src/ps/load.c \ 235 generic/src/ps/uptime.c \ 236 generic/src/ps/mem.c 231 generic/src/sysinfo/sysinfo.c 237 232 238 233 ## Kernel console support -
kernel/generic/include/cpu.h
r88dea9d r5ba201d 68 68 are disabled. */ 69 69 70 bool idle;71 uint64_t idle_ticks;72 uint64_t busy_ticks;73 74 70 /** 75 71 * Processor ID assigned by kernel. -
kernel/generic/include/mm/frame.h
r88dea9d r5ba201d 170 170 extern void zone_merge_all(void); 171 171 extern uint64_t zone_total_size(void); 172 extern void zone_busy_and_free(uint64_t *out_busy, uint64_t *out_free);173 172 174 173 /* -
kernel/generic/include/proc/task.h
r88dea9d r5ba201d 57 57 #include <mm/as.h> 58 58 59 # include <ps/taskinfo.h>59 #define TASK_NAME_BUFLEN 20 60 60 61 61 struct thread; … … 94 94 answerbox_t answerbox; /**< Communication endpoint */ 95 95 phone_t phones[IPC_MAX_PHONES]; 96 task_ipc_info_t ipc_info; /**< IPC statistics */97 96 /** 98 97 * Active asynchronous messages. It is used for limiting uspace to … … 123 122 124 123 /** Accumulated accounting. */ 125 uint64_t ucycles; 126 uint64_t kcycles; 124 uint64_t cycles; 127 125 } task_t; 128 126 … … 136 134 extern task_t *task_find_by_id(task_id_t id); 137 135 extern int task_kill(task_id_t id); 138 extern void task_get_accounting(task_t *t, uint64_t *ucycles, uint64_t *kcycles);136 extern uint64_t task_get_accounting(task_t *t); 139 137 extern void task_print_list(void); 140 138 -
kernel/generic/include/proc/thread.h
r88dea9d r5ba201d 69 69 #define THREAD_FLAG_NOATTACH (1 << 3) 70 70 71 /* We need state_t enum definition */ 72 #include <ps/taskinfo.h> 71 /** Thread states. */ 72 typedef enum { 73 /** It is an error, if thread is found in this state. */ 74 Invalid, 75 /** State of a thread that is currently executing on some CPU. */ 76 Running, 77 /** Thread in this state is waiting for an event. */ 78 Sleeping, 79 /** State of threads in a run queue. */ 80 Ready, 81 /** Threads are in this state before they are first readied. */ 82 Entering, 83 /** After a thread calls thread_exit(), it is put into Exiting state. */ 84 Exiting, 85 /** Threads that were not detached but exited are Lingering. */ 86 Lingering 87 } state_t; 73 88 74 89 /** Thread structure. There is one per thread. */ … … 174 189 175 190 /** Thread accounting. */ 176 uint64_t ucycles; 177 uint64_t kcycles; 191 uint64_t cycles; 178 192 /** Last sampled cycle. */ 179 193 uint64_t last_cycle; … … 238 252 extern void thread_print_list(void); 239 253 extern void thread_destroy(thread_t *); 240 extern void thread_update_accounting( bool);254 extern void thread_update_accounting(void); 241 255 extern bool thread_exists(thread_t *); 242 256 -
kernel/generic/include/syscall/syscall.h
r88dea9d r5ba201d 89 89 SYS_DEBUG_ENABLE_CONSOLE, 90 90 SYS_DEBUG_DISABLE_CONSOLE, 91 92 SYS_PS_GET_CPU_INFO,93 SYS_PS_GET_MEM_INFO,94 SYS_PS_GET_TASKS,95 SYS_PS_GET_TASK_INFO,96 SYS_PS_GET_THREADS,97 SYS_PS_GET_UPTIME,98 SYS_PS_GET_LOAD,99 100 91 SYS_IPC_CONNECT_KBOX, 101 92 SYSCALL_END -
kernel/generic/src/console/cmd.c
r88dea9d r5ba201d 1049 1049 ipl_t ipl = interrupts_disable(); 1050 1050 spinlock_lock(&TASK->lock); 1051 uint64_t ucycles0, kcycles0; 1052 task_get_accounting(TASK, &ucycles0, &kcycles0); 1051 uint64_t t0 = task_get_accounting(TASK); 1053 1052 spinlock_unlock(&TASK->lock); 1054 1053 interrupts_restore(ipl); … … 1059 1058 1060 1059 /* Update and read thread accounting */ 1061 uint64_t ucycles1, kcycles1;1062 1060 ipl = interrupts_disable(); 1063 1061 spinlock_lock(&TASK->lock); 1064 task_get_accounting(TASK, &ucycles1, &kcycles1);1062 uint64_t dt = task_get_accounting(TASK) - t0; 1065 1063 spinlock_unlock(&TASK->lock); 1066 1064 interrupts_restore(ipl); 1067 1065 1068 uint64_t ucycles, kcycles; 1069 char usuffix, ksuffix; 1070 order(ucycles1 - ucycles0, &ucycles, &usuffix); 1071 order(kcycles1 - kcycles0, &kcycles, &ksuffix); 1072 1073 printf("Time: %" PRIu64 "%c user cycles, %" PRIu64 "%c kernel cycles\n", 1074 ucycles, usuffix, kcycles, ksuffix); 1066 uint64_t cycles; 1067 char suffix; 1068 order(dt, &cycles, &suffix); 1069 1070 printf("Time: %" PRIu64 "%c cycles\n", cycles, suffix); 1075 1071 1076 1072 if (ret == NULL) { … … 1087 1083 uint32_t i; 1088 1084 bool ret = true; 1089 uint64_t ucycles, kcycles;1090 char usuffix, ksuffix;1085 uint64_t cycles; 1086 char suffix; 1091 1087 1092 1088 if (cnt < 1) … … 1106 1102 ipl_t ipl = interrupts_disable(); 1107 1103 spinlock_lock(&TASK->lock); 1108 uint64_t ucycles0, kcycles0; 1109 task_get_accounting(TASK, &ucycles0, &kcycles0); 1104 uint64_t t0 = task_get_accounting(TASK); 1110 1105 spinlock_unlock(&TASK->lock); 1111 1106 interrupts_restore(ipl); … … 1118 1113 ipl = interrupts_disable(); 1119 1114 spinlock_lock(&TASK->lock); 1120 uint64_t ucycles1, kcycles1; 1121 task_get_accounting(TASK, &ucycles1, &kcycles1); 1115 uint64_t dt = task_get_accounting(TASK) - t0; 1122 1116 spinlock_unlock(&TASK->lock); 1123 1117 interrupts_restore(ipl); 1124 1118 1125 1119 if (ret != NULL) { 1126 1120 printf("%s\n", ret); … … 1129 1123 } 1130 1124 1131 data[i] = ucycles1 - ucycles0 + kcycles1 - kcycles0; 1132 order(ucycles1 - ucycles0, &ucycles, &usuffix); 1133 order(kcycles1 - kcycles0, &kcycles, &ksuffix); 1134 printf("OK (%" PRIu64 "%c user cycles, %" PRIu64 "%c kernel cycles)\n", 1135 ucycles, usuffix, kcycles, ksuffix); 1125 data[i] = dt; 1126 order(dt, &cycles, &suffix); 1127 printf("OK (%" PRIu64 "%c cycles)\n", cycles, suffix); 1136 1128 } 1137 1129 … … 1145 1137 } 1146 1138 1147 order(sum / (uint64_t) cnt, & ucycles, &usuffix);1148 printf("Average\t\t%" PRIu64 "%c\n", ucycles, usuffix);1139 order(sum / (uint64_t) cnt, &cycles, &suffix); 1140 printf("Average\t\t%" PRIu64 "%c\n", cycles, suffix); 1149 1141 } 1150 1142 -
kernel/generic/src/cpu/cpu.c
r88dea9d r5ba201d 48 48 #include <adt/list.h> 49 49 #include <print.h> 50 #include <sysinfo/sysinfo.h>51 50 52 51 cpu_t *cpus; … … 75 74 76 75 cpus[i].id = i; 77 cpus[i].idle_ticks = 0;78 cpus[i].busy_ticks = 0;79 76 80 77 spinlock_initialize(&cpus[i].lock, "cpu_t.lock"); … … 97 94 cpu_identify(); 98 95 cpu_arch_init(); 99 100 sysinfo_set_item_val("cpu.count", NULL, config.cpu_count);101 96 } 102 97 -
kernel/generic/src/interrupt/interrupt.c
r88dea9d r5ba201d 51 51 #include <print.h> 52 52 #include <symtab.h> 53 #include <proc/thread.h>54 53 55 54 static struct { … … 92 91 ASSERT(n < IVT_ITEMS); 93 92 94 /* Account user cycles */95 if (THREAD)96 thread_update_accounting(true);97 98 93 #ifdef CONFIG_UDEBUG 99 94 if (THREAD) THREAD->udebug.uspace_state = istate; … … 109 104 if (THREAD && THREAD->interrupted && istate_from_uspace(istate)) 110 105 thread_exit(); 111 112 if (THREAD)113 thread_update_accounting(false);114 106 } 115 107 -
kernel/generic/src/ipc/ipc.c
r88dea9d r5ba201d 219 219 bool do_lock = ((!selflocked) || callerbox != (&TASK->answerbox)); 220 220 221 /* Count sent answer */222 spinlock_lock(&TASK->lock);223 TASK->ipc_info.answer_sent++;224 spinlock_unlock(&TASK->lock);225 226 221 call->flags |= IPC_CALL_ANSWERED; 227 222 … … 281 276 static void _ipc_call(phone_t *phone, answerbox_t *box, call_t *call) 282 277 { 283 /* Count sent ipc call */284 spinlock_lock(&TASK->lock);285 TASK->ipc_info.call_sent++;286 spinlock_unlock(&TASK->lock);287 288 278 if (!(call->flags & IPC_CALL_FORWARDED)) { 289 279 atomic_inc(&phone->active_calls); … … 386 376 int ipc_forward(call_t *call, phone_t *newphone, answerbox_t *oldbox, int mode) 387 377 { 388 /* Count forwarded calls */389 spinlock_lock(&TASK->lock);390 TASK->ipc_info.forwarded++;391 spinlock_unlock(&TASK->lock);392 393 378 spinlock_lock(&oldbox->lock); 394 379 list_remove(&call->link); … … 431 416 spinlock_lock(&box->lock); 432 417 if (!list_empty(&box->irq_notifs)) { 433 434 /* Count recieved IRQ notification */435 spinlock_lock(&TASK->lock);436 TASK->ipc_info.irq_notif_recieved++;437 spinlock_unlock(&TASK->lock);438 439 418 ipl = interrupts_disable(); 440 419 spinlock_lock(&box->irq_lock); … … 446 425 interrupts_restore(ipl); 447 426 } else if (!list_empty(&box->answers)) { 448 /* Count recieved answer */449 spinlock_lock(&TASK->lock);450 TASK->ipc_info.answer_recieved++;451 spinlock_unlock(&TASK->lock);452 453 427 /* Handle asynchronous answers */ 454 428 request = list_get_instance(box->answers.next, call_t, link); … … 456 430 atomic_dec(&request->data.phone->active_calls); 457 431 } else if (!list_empty(&box->calls)) { 458 /* Count recieved call */459 spinlock_lock(&TASK->lock);460 TASK->ipc_info.call_recieved++;461 spinlock_unlock(&TASK->lock);462 463 432 /* Handle requests */ 464 433 request = list_get_instance(box->calls.next, call_t, link); -
kernel/generic/src/main/kinit.c
r88dea9d r5ba201d 67 67 #include <debug.h> 68 68 #include <str.h> 69 #include <ps/load.h>70 69 71 70 #ifdef CONFIG_SMP … … 164 163 #endif /* CONFIG_KCONSOLE */ 165 164 166 /* Start thread computing system load */167 thread = thread_create(kload_thread, NULL, TASK, 0, "kload", false);168 if (thread != NULL)169 thread_ready(thread);170 else171 printf("Unable to create kload thread\n");172 173 165 interrupts_enable(); 174 166 -
kernel/generic/src/main/main.c
r88dea9d r5ba201d 226 226 printf("Detected %" PRIs " CPU(s), %" PRIu64" MiB free memory\n", 227 227 config.cpu_count, SIZE2MB(zone_total_size())); 228 228 229 229 LOG_EXEC(cpu_init()); 230 230 -
kernel/generic/src/mm/frame.c
r88dea9d r5ba201d 1218 1218 } 1219 1219 1220 void zone_busy_and_free(uint64_t *out_busy, uint64_t *out_free)1221 {1222 ipl_t ipl = interrupts_disable();1223 spinlock_lock(&zones.lock);1224 1225 uint64_t busy = 0, free = 0;1226 size_t i;1227 for (i = 0; i < zones.count; i++) {1228 bool available = zone_flags_available(zones.info[i].flags);1229 /* Do not count reserved memory */1230 if (available) {1231 busy += (uint64_t) FRAMES2SIZE(zones.info[i].busy_count);1232 free += (uint64_t) FRAMES2SIZE(zones.info[i].free_count);1233 }1234 }1235 1236 spinlock_unlock(&zones.lock);1237 interrupts_restore(ipl);1238 *out_busy = busy;1239 *out_free = free;1240 }1241 1242 1220 /** Prints list of zones. */ 1243 1221 void zone_print_list(void) -
kernel/generic/src/proc/scheduler.c
r88dea9d r5ba201d 202 202 */ 203 203 204 spinlock_lock(&CPU->lock);205 CPU->idle = true;206 spinlock_unlock(&CPU->lock);207 204 cpu_sleep(); 208 205 goto loop; … … 316 313 spinlock_lock(&THREAD->lock); 317 314 318 /* Update thread kernelaccounting */319 THREAD-> kcycles += get_cycle() - THREAD->last_cycle;315 /* Update thread accounting */ 316 THREAD->cycles += get_cycle() - THREAD->last_cycle; 320 317 321 318 #ifndef CONFIG_FPU_LAZY -
kernel/generic/src/proc/task.c
r88dea9d r5ba201d 186 186 ta->context = CONTEXT; 187 187 ta->capabilities = 0; 188 ta->ucycles = 0; 189 ta->kcycles = 0; 190 191 ta->ipc_info.call_sent = 0; 192 ta->ipc_info.call_recieved = 0; 193 ta->ipc_info.answer_sent = 0; 194 ta->ipc_info.answer_recieved = 0; 195 ta->ipc_info.irq_notif_recieved = 0; 196 ta->ipc_info.forwarded = 0; 197 188 ta->cycles = 0; 189 198 190 #ifdef CONFIG_UDEBUG 199 191 /* Init debugging stuff */ … … 332 324 * already disabled. 333 325 * 334 * @param t Pointer to thread.335 * @param ucycles Out pointer to sum of all user cycles.336 * @ param kcycles Out pointer to sum of all kernel cycles.337 * 338 * /339 void task_get_accounting(task_t *t, uint64_t *ucycles, uint64_t *kcycles) 340 { 341 /* Accumulated values of task */ 342 uint64_t uret = t->ucycles;343 uint64_t kret = t->kcycles;326 * @param t Pointer to task. 327 * 328 * @return Number of cycles used by the task and all its threads 329 * so far. 330 * 331 */ 332 uint64_t task_get_accounting(task_t *t) 333 { 334 /* Accumulated value of task */ 335 uint64_t ret = t->cycles; 344 336 345 337 /* Current values of threads */ … … 353 345 if (thr == THREAD) { 354 346 /* Update accounting of current thread */ 355 thread_update_accounting( false);347 thread_update_accounting(); 356 348 } 357 uret += thr->ucycles; 358 kret += thr->kcycles; 349 ret += thr->cycles; 359 350 } 360 351 spinlock_unlock(&thr->lock); 361 352 } 362 353 363 *ucycles = uret; 364 *kcycles = kret; 354 return ret; 365 355 } 366 356 … … 429 419 spinlock_lock(&t->lock); 430 420 431 uint64_t ucycles; 432 uint64_t kcycles; 433 char usuffix, ksuffix; 434 task_get_accounting(t, &ucycles, &kcycles); 435 order(ucycles, &ucycles, &usuffix); 436 order(kcycles, &kcycles, &ksuffix); 437 438 #ifdef __32_BITS__ 439 printf("%-6" PRIu64 " %-12s %-3" PRIu32 " %10p %10p %9" PRIu64 "%c %9" 440 PRIu64 "%c %7ld %6ld", t->taskid, t->name, t->context, t, t->as, 441 ucycles, usuffix, kcycles, ksuffix, atomic_get(&t->refcount), 442 atomic_get(&t->active_calls)); 421 uint64_t cycles; 422 char suffix; 423 order(task_get_accounting(t), &cycles, &suffix); 424 425 #ifdef __32_BITS__ 426 printf("%-6" PRIu64 " %-12s %-3" PRIu32 " %10p %10p %9" PRIu64 427 "%c %7ld %6ld", t->taskid, t->name, t->context, t, t->as, cycles, 428 suffix, atomic_get(&t->refcount), atomic_get(&t->active_calls)); 443 429 #endif 444 430 445 431 #ifdef __64_BITS__ 446 printf("%-6" PRIu64 " %-12s %-3" PRIu32 " %18p %18p %9" PRIu64 "%c %9" 447 PRIu64 "%c %7ld %6ld", t->taskid, t->name, t->context, t, t->as, 448 ucycles, usuffix, kcycles, ksuffix, atomic_get(&t->refcount), 449 atomic_get(&t->active_calls)); 432 printf("%-6" PRIu64 " %-12s %-3" PRIu32 " %18p %18p %9" PRIu64 433 "%c %7ld %6ld", t->taskid, t->name, t->context, t, t->as, cycles, 434 suffix, atomic_get(&t->refcount), atomic_get(&t->active_calls)); 450 435 #endif 451 436 … … 470 455 471 456 #ifdef __32_BITS__ 472 printf("taskid name ctx address as "473 " ucycles kcyclesthreads calls callee\n");474 printf("------ ------------ --- ---------- ---------- "475 " -------------------- ------- ------ ------>\n");457 printf("taskid name ctx address as " 458 "cycles threads calls callee\n"); 459 printf("------ ------------ --- ---------- ---------- " 460 "---------- ------- ------ ------>\n"); 476 461 #endif 477 462 478 463 #ifdef __64_BITS__ 479 printf("taskid name ctx address as "480 " ucycles kcyclesthreads calls callee\n");481 printf("------ ------------ --- ------------------ ------------------ "482 " ---------- -------------------- ------- ------ ------>\n");464 printf("taskid name ctx address as " 465 "cycles threads calls callee\n"); 466 printf("------ ------------ --- ------------------ ------------------ " 467 "---------- ------- ------ ------>\n"); 483 468 #endif 484 469 -
kernel/generic/src/proc/thread.c
r88dea9d r5ba201d 132 132 spinlock_lock(&THREAD->lock); 133 133 if (!THREAD->uncounted) { 134 thread_update_accounting(true); 135 uint64_t ucycles = THREAD->ucycles; 136 THREAD->ucycles = 0; 137 uint64_t kcycles = THREAD->kcycles; 138 THREAD->kcycles = 0; 139 134 thread_update_accounting(); 135 uint64_t cycles = THREAD->cycles; 136 THREAD->cycles = 0; 140 137 spinlock_unlock(&THREAD->lock); 141 138 142 139 spinlock_lock(&TASK->lock); 143 TASK->ucycles += ucycles; 144 TASK->kcycles += kcycles; 140 TASK->cycles += cycles; 145 141 spinlock_unlock(&TASK->lock); 146 142 } else … … 327 323 t->thread_arg = arg; 328 324 t->ticks = -1; 329 t->ucycles = 0; 330 t->kcycles = 0; 325 t->cycles = 0; 331 326 t->uncounted = uncounted; 332 327 t->priority = -1; /* start in rq[0] */ … … 619 614 thread_t *t = avltree_get_instance(node, thread_t, threads_tree_node); 620 615 621 uint64_t ucycles, kcycles; 622 char usuffix, ksuffix; 623 order(t->ucycles, &ucycles, &usuffix); 624 order(t->kcycles, &kcycles, &ksuffix); 616 uint64_t cycles; 617 char suffix; 618 order(t->cycles, &cycles, &suffix); 625 619 626 620 #ifdef __32_BITS__ 627 printf("%-6" PRIu64" %-10s %10p %-8s %10p %-3" PRIu32 " %10p %10p %9" 628 PRIu64 "%c %9" PRIu64 "%c ", t->tid, t->name, t, 629 thread_states[t->state], t->task, t->task->context, t->thread_code, 630 t->kstack, ucycles, usuffix, kcycles, ksuffix); 621 printf("%-6" PRIu64" %-10s %10p %-8s %10p %-3" PRIu32 " %10p %10p %9" PRIu64 "%c ", 622 t->tid, t->name, t, thread_states[t->state], t->task, 623 t->task->context, t->thread_code, t->kstack, cycles, suffix); 631 624 #endif 632 625 633 626 #ifdef __64_BITS__ 634 printf("%-6" PRIu64" %-10s %18p %-8s %18p %-3" PRIu32 " %18p %18p %9" 635 PRIu64 "%c %9" PRIu64 "%c ", t->tid, t->name, t, 636 thread_states[t->state], t->task, t->task->context, t->thread_code, 637 t->kstack, ucycles, usuffix, kcycles, ksuffix); 627 printf("%-6" PRIu64" %-10s %18p %-8s %18p %-3" PRIu32 " %18p %18p %9" PRIu64 "%c ", 628 t->tid, t->name, t, thread_states[t->state], t->task, 629 t->task->context, t->thread_code, t->kstack, cycles, suffix); 638 630 #endif 639 631 … … 669 661 #ifdef __32_BITS__ 670 662 printf("tid name address state task " 671 "ctx code stack ucycles kcyclescpu "663 "ctx code stack cycles cpu " 672 664 "waitqueue\n"); 673 665 printf("------ ---------- ---------- -------- ---------- " 674 "--- ---------- ---------- ---------- ---- ------ ----"666 "--- ---------- ---------- ---------- ---- " 675 667 "----------\n"); 676 668 #endif … … 678 670 #ifdef __64_BITS__ 679 671 printf("tid name address state task " 680 "ctx code stack ucycles kcyclescpu "672 "ctx code stack cycles cpu " 681 673 "waitqueue\n"); 682 674 printf("------ ---------- ------------------ -------- ------------------ " 683 "--- ------------------ ------------------ ---------- ---- ------ ----"675 "--- ------------------ ------------------ ---------- ---- " 684 676 "------------------\n"); 685 677 #endif … … 714 706 * interrupts must be already disabled. 715 707 * 716 * @param user True to update user accounting, false for kernel. 717 */ 718 void thread_update_accounting(bool user) 708 */ 709 void thread_update_accounting(void) 719 710 { 720 711 uint64_t time = get_cycle(); 721 if (user) { 722 THREAD->ucycles += time - THREAD->last_cycle; 723 } else { 724 THREAD->kcycles += time - THREAD->last_cycle; 725 } 712 THREAD->cycles += time - THREAD->last_cycle; 726 713 THREAD->last_cycle = time; 727 714 } -
kernel/generic/src/synch/waitq.c
r88dea9d r5ba201d 54 54 #include <context.h> 55 55 #include <adt/list.h> 56 #include <arch/cycle.h>57 56 58 57 static void waitq_sleep_timed_out(void *data); … … 374 373 if (!context_save(&THREAD->sleep_interruption_context)) { 375 374 /* Short emulation of scheduler() return code. */ 376 THREAD->last_cycle = get_cycle();377 375 spinlock_unlock(&THREAD->lock); 378 376 return ESYNCH_INTERRUPTED; … … 387 385 if (!context_save(&THREAD->sleep_timeout_context)) { 388 386 /* Short emulation of scheduler() return code. */ 389 THREAD->last_cycle = get_cycle();390 387 spinlock_unlock(&THREAD->lock); 391 388 return ESYNCH_TIMEOUT; -
kernel/generic/src/syscall/syscall.c
r88dea9d r5ba201d 54 54 #include <console/console.h> 55 55 #include <udebug/udebug.h> 56 #include <ps/ps.h>57 #include <ps/load.h>58 #include <ps/uptime.h>59 56 60 57 /** Dispatch system call */ … … 63 60 { 64 61 unative_t rc; 65 66 /* Do userpace accounting */67 thread_update_accounting(true);68 62 69 63 #ifdef CONFIG_UDEBUG … … 101 95 } 102 96 #endif 103 104 /* Do kernel accounting */105 thread_update_accounting(false);106 97 107 98 return rc; … … 170 161 (syshandler_t) sys_debug_enable_console, 171 162 (syshandler_t) sys_debug_disable_console, 172 173 /* Ps calls */174 (syshandler_t) sys_ps_get_cpu_info,175 (syshandler_t) sys_ps_get_mem_info,176 (syshandler_t) sys_ps_get_tasks,177 (syshandler_t) sys_ps_get_task_info,178 (syshandler_t) sys_ps_get_threads,179 (syshandler_t) sys_ps_get_uptime,180 (syshandler_t) sys_ps_get_load,181 163 182 164 (syshandler_t) sys_ipc_connect_kbox -
kernel/generic/src/time/clock.c
r88dea9d r5ba201d 137 137 size_t missed_clock_ticks = CPU->missed_clock_ticks; 138 138 unsigned int i; 139 140 /* Account lost ticks to CPU usage */141 if (CPU->idle) {142 ASSERT(missed_clock_ticks == 0);143 CPU->idle_ticks++;144 } else {145 CPU->busy_ticks += missed_clock_ticks + 1;146 }147 CPU->idle = false;148 139 149 140 /* -
uspace/Makefile
r88dea9d r5ba201d 46 46 app/tetris \ 47 47 app/trace \ 48 app/ps \49 app/top \50 app/uptime \51 app/dummy_load \52 48 srv/clip \ 53 49 srv/devmap \ -
uspace/lib/c/Makefile
r88dea9d r5ba201d 95 95 generic/vfs/canonify.c \ 96 96 generic/stacktrace.c \ 97 generic/arg_parse.c \ 98 generic/ps.c \ 99 generic/cpuinfo.c \ 100 generic/meminfo.c \ 101 generic/load.c \ 102 generic/uptime.c 97 generic/arg_parse.c 103 98 104 99 SOURCES = \
Note:
See TracChangeset
for help on using the changeset viewer.