Changeset 07640dfd in mainline for uspace/app/ps/ps.c


Ignore:
Timestamp:
2010-03-29T16:21:29Z (14 years ago)
Author:
Stanislav Kozina <stanislav.kozina@…>
Branches:
lfn, master, serial, ticket/834-toolchain-update, topic/msim-upgrade, topic/simplify-dev-export
Children:
ea55bc4
Parents:
a2a00e8
Message:

Small changes on kernel & user accounting.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • uspace/app/ps/ps.c

    ra2a00e8 r07640dfd  
    7070        }
    7171
    72         printf("      ID  Threads    Pages    [k]Cycles Name\n");
     72        printf("      ID  Threads    Pages   [k]uCycles   [k]kCycles  Cycle fault Name\n");
    7373
    7474        int i;
     
    7676                task_info_t taskinfo;
    7777                get_task_info(tasks[i], &taskinfo);
    78                 printf("%8llu %8u %8u %12llu %s\n", tasks[i], taskinfo.thread_count,
    79                                 taskinfo.pages, taskinfo.cycles / 1000, taskinfo.name);
     78                printf("%8llu %8u %8u %12llu %12llu %12llu %s\n", tasks[i],
     79                                taskinfo.thread_count, taskinfo.pages, taskinfo.ucycles / 1000,
     80                                taskinfo.kcycles / 1000, (taskinfo.ucycles + taskinfo.kcycles) -
     81                                taskinfo.cycles, taskinfo.name);
    8082        }
    8183}
     
    99101
    100102        int i;
    101         printf("    ID    State  CPU   Prio    [k]Cycles\n");
     103        printf("    ID    State  CPU   Prio   [k]uCycles   [k]kcycles  Cycle fault\n");
    102104        for (i = 0; i < result; ++i) {
    103                 printf("%6llu %-8s %4u %6d %12llu\n", threads[i].tid, thread_states[threads[i].state],
    104                                 threads[i].cpu, threads[i].priority, threads[i].cycles / 1000);
     105                printf("%6llu %-8s %4u %6d %12llu %12llu %12llu\n", threads[i].tid,
     106                        thread_states[threads[i].state], threads[i].cpu,
     107                        threads[i].priority, threads[i].ucycles / 1000,
     108                        threads[i].kcycles / 1000,
     109                        threads[i].ucycles + threads[i].kcycles - threads[i].cycles);
    105110        }
    106111}
Note: See TracChangeset for help on using the changeset viewer.