Changeset 43b1e86 in mainline
- Timestamp:
- 2008-02-01T14:11:18Z (17 years ago)
- Branches:
- lfn, master, serial, ticket/834-toolchain-update, topic/msim-upgrade, topic/simplify-dev-export
- Children:
- 9652bd59
- Parents:
- acfdcb0
- Location:
- kernel
- Files:
-
- 8 edited
Legend:
- Unmodified
- Added
- Removed
-
kernel/arch/amd64/src/debugger.c
racfdcb0 r43b1e86 105 105 int cmd_print_breakpoints(cmd_arg_t *argv __attribute__((unused))) 106 106 { 107 int i;107 unsigned int i; 108 108 char *symbol; 109 110 printf("Breakpoint table.\n"); 111 for (i=0; i < BKPOINTS_MAX; i++) 109 110 if (sizeof(void *) == 4) { 111 printf("# Count Address In symbol\n"); 112 printf("-- ----- ---------- ---------\n"); 113 } else { 114 printf("# Count Address In symbol\n"); 115 printf("-- ----- ------------------ ---------\n"); 116 } 117 118 for (i = 0; i < BKPOINTS_MAX; i++) 112 119 if (breakpoints[i].address) { 113 120 symbol = get_symtab_entry(breakpoints[i].address); 114 printf("%d. %lx in %s\n", i, 115 breakpoints[i].address, symbol); 116 printf(" Count(%d) ", breakpoints[i].counter); 117 printf("\n"); 121 122 if (sizeof(void *) == 4) 123 printf("%-2u %-5d %#10zx %s\n", i, breakpoints[i].counter, 124 breakpoints[i].address, symbol); 125 else 126 printf("%-2u %-5d %#18zx %s\n", i, breakpoints[i].counter, 127 breakpoints[i].address, symbol); 118 128 } 119 129 return 1; -
kernel/arch/ia32/src/mm/frame.c
racfdcb0 r43b1e86 97 97 static int cmd_e820mem(cmd_arg_t *argv) 98 98 { 99 int i;99 unsigned int i; 100 100 char *name; 101 101 102 printf("Base Size Name\n"); 103 printf("------------------ ------------------ ---------\n"); 104 102 105 for (i = 0; i < e820counter; i++) { 103 106 if (e820table[i].type <= MEMMAP_MEMORY_UNUSABLE) … … 105 108 else 106 109 name = "invalid"; 107 printf("%.*p %#.16llXB %s\n", sizeof(unative_t) * 2,108 (unative_t) e820table[i].base_address,109 (uint64_t)e820table[i].size, name);110 111 printf("%#18llx %#18llx %s\n", e820table[i].base_address, 112 e820table[i].size, name); 110 113 } 111 114 return 0; -
kernel/generic/include/macros.h
racfdcb0 r43b1e86 63 63 return (s1 < e2) && (s2 < e1); 64 64 } 65 65 66 /* Compute overlapping of physical addresses */ 66 67 #define PA_overlaps(x, szx, y, szy) overlaps(KA2PA(x), szx, KA2PA(y), szy) -
kernel/generic/src/interrupt/interrupt.c
racfdcb0 r43b1e86 104 104 static int exc_print_cmd(cmd_arg_t *argv) 105 105 { 106 int i;106 unsigned int i; 107 107 char *symbol; 108 108 109 109 spinlock_lock(&exctbl_lock); 110 printf("Exc Description Handler\n"); 111 for (i=0; i < IVT_ITEMS; i++) { 112 symbol = get_symtab_entry((unative_t)exc_table[i].f); 110 111 if (sizeof(void *) == 4) { 112 printf("Exc Description Handler Symbol\n"); 113 printf("--- ------------ ---------- --------\n"); 114 } else { 115 printf("Exc Description Handler Symbol\n"); 116 printf("--- ------------ ------------------ --------\n"); 117 } 118 119 for (i = 0; i < IVT_ITEMS; i++) { 120 symbol = get_symtab_entry((unative_t) exc_table[i].f); 113 121 if (!symbol) 114 122 symbol = "not found"; 115 printf("%d %s %.*p(%s)\n", i + IVT_FIRST, exc_table[i].name, 116 sizeof(uintptr_t) * 2, exc_table[i].f,symbol); 117 if (!((i+1) % 20)) { 118 printf("Press any key to continue."); 123 124 if (sizeof(void *) == 4) 125 printf("%-3u %-12s %#10zx %s\n", i + IVT_FIRST, exc_table[i].name, 126 exc_table[i].f, symbol); 127 else 128 printf("%-3u %-12s %#18zx %s\n", i + IVT_FIRST, exc_table[i].name, 129 exc_table[i].f, symbol); 130 131 if (((i + 1) % 20) == 0) { 132 printf(" -- Press any key to continue -- "); 119 133 spinlock_unlock(&exctbl_lock); 120 134 getc(stdin); … … 123 137 } 124 138 } 139 125 140 spinlock_unlock(&exctbl_lock); 126 141 -
kernel/generic/src/mm/frame.c
racfdcb0 r43b1e86 1121 1121 ipl = interrupts_disable(); 1122 1122 spinlock_lock(&zones.lock); 1123 printf("# base address free frames busy frames\n"); 1124 printf("-- ------------ ------------ ------------\n"); 1123 1124 if (sizeof(void *) == 4) { 1125 printf("# base address free frames busy frames\n"); 1126 printf("-- ------------ ------------ ------------\n"); 1127 } else { 1128 printf("# base address free frames busy frames\n"); 1129 printf("-- -------------------- ------------ ------------\n"); 1130 } 1131 1125 1132 for (i = 0; i < zones.count; i++) { 1126 1133 zone = zones.info[i]; 1127 1134 spinlock_lock(&zone->lock); 1128 printf("%-2d %12p %12zd %12zd\n", i, PFN2ADDR(zone->base), 1129 zone->free_count, zone->busy_count); 1135 1136 if (sizeof(void *) == 4) 1137 printf("%-2d %#10zx %12zd %12zd\n", i, PFN2ADDR(zone->base), 1138 zone->free_count, zone->busy_count); 1139 else 1140 printf("%-2d %#18zx %12zd %12zd\n", i, PFN2ADDR(zone->base), 1141 zone->free_count, zone->busy_count); 1142 1130 1143 spinlock_unlock(&zone->lock); 1131 1144 } 1145 1132 1146 spinlock_unlock(&zones.lock); 1133 1147 interrupts_restore(ipl); -
kernel/generic/src/printf/printf_core.c
racfdcb0 r43b1e86 459 459 * - u Print unsigned decimal number. 460 460 * 461 * - X, x Print hexadecimal number with upper- or lower-case. Prefix is i461 * - X, x Print hexadecimal number with upper- or lower-case. Prefix is 462 462 * not printed by default. 463 463 * -
kernel/generic/src/proc/task.c
racfdcb0 r43b1e86 421 421 char suffix; 422 422 order(task_get_accounting(t), &cycles, &suffix); 423 424 printf("%-6llu %-10s %-3ld %#10zx %#10zx %9llu%c %7zd %6zd", 425 t->taskid, t->name, t->context, t, t->as, cycles, suffix, 426 t->refcount, atomic_get(&t->active_calls)); 423 424 if (sizeof(void *) == 4) 425 printf("%-6llu %-10s %-3ld %#10zx %#10zx %9llu%c %7zd %6zd", 426 t->taskid, t->name, t->context, t, t->as, cycles, suffix, 427 t->refcount, atomic_get(&t->active_calls)); 428 else 429 printf("%-6llu %-10s %-3ld %#18zx %#18zx %9llu%c %7zd %6zd", 430 t->taskid, t->name, t->context, t, t->as, cycles, suffix, 431 t->refcount, atomic_get(&t->active_calls)); 427 432 for (j = 0; j < IPC_MAX_PHONES; j++) { 428 433 if (t->phones[j].callee) … … 444 449 spinlock_lock(&tasks_lock); 445 450 446 printf("taskid name ctx address as cycles threads " 447 "calls callee\n"); 448 printf("------ ---------- --- ---------- ---------- ---------- ------- " 449 "------ ------>\n"); 451 if (sizeof(void *) == 4) { 452 printf("taskid name ctx address as " 453 "cycles threads calls callee\n"); 454 printf("------ ---------- --- ---------- ---------- " 455 "---------- ------- ------ ------>\n"); 456 } else { 457 printf("taskid name ctx address as " 458 "cycles threads calls callee\n"); 459 printf("------ ---------- --- ------------------ ------------------ " 460 "---------- ------- ------ ------>\n"); 461 } 450 462 451 463 avltree_walk(&tasks_tree, task_print_walker, NULL); -
kernel/generic/src/proc/thread.c
racfdcb0 r43b1e86 587 587 char suffix; 588 588 order(t->cycles, &cycles, &suffix); 589 590 printf("%-6llu %-10s %#10zx %-8s %#10zx %-3ld %#10zx %#10zx %9llu%c ", 591 t->tid, t->name, t, thread_states[t->state], t->task, 592 t->task->context, t->thread_code, t->kstack, cycles, suffix); 589 590 if (sizeof(void *) == 4) 591 printf("%-6llu %-10s %#10zx %-8s %#10zx %-3ld %#10zx %#10zx %9llu%c ", 592 t->tid, t->name, t, thread_states[t->state], t->task, 593 t->task->context, t->thread_code, t->kstack, cycles, suffix); 594 else 595 printf("%-6llu %-10s %#18zx %-8s %#18zx %-3ld %#18zx %#18zx %9llu%c ", 596 t->tid, t->name, t, thread_states[t->state], t->task, 597 t->task->context, t->thread_code, t->kstack, cycles, suffix); 593 598 594 599 if (t->cpu) … … 597 602 printf("none"); 598 603 599 if (t->state == Sleeping) 600 printf(" %#10zx", t->sleep_queue); 604 if (t->state == Sleeping) { 605 if (sizeof(uintptr_t) == 4) 606 printf(" %#10zx", t->sleep_queue); 607 else 608 printf(" %#18zx", t->sleep_queue); 609 } 601 610 602 611 printf("\n"); … … 614 623 spinlock_lock(&threads_lock); 615 624 616 printf("tid name address state task ctx code " 617 " stack cycles cpu waitqueue\n"); 618 printf("------ ---------- ---------- -------- ---------- --- --------" 619 "-- ---------- ---------- ---- ---------\n"); 625 if (sizeof(uintptr_t) == 4) { 626 printf("tid name address state task " 627 "ctx code stack cycles cpu " 628 "waitqueue\n"); 629 printf("------ ---------- ---------- -------- ---------- " 630 "--- ---------- ---------- ---------- ---- " 631 "----------\n"); 632 } else { 633 printf("tid name address state task " 634 "ctx code stack cycles cpu " 635 "waitqueue\n"); 636 printf("------ ---------- ------------------ -------- ------------------ " 637 "--- ------------------ ------------------ ---------- ---- " 638 "------------------\n"); 639 } 620 640 621 641 avltree_walk(&threads_tree, thread_walker, NULL);
Note:
See TracChangeset
for help on using the changeset viewer.