Changeset dec16a2 in mainline for uspace/app/top/top.h


Ignore:
Timestamp:
2010-04-18T16:52:47Z (15 years ago)
Author:
Martin Decky <martin@…>
Branches:
lfn, master, serial, ticket/834-toolchain-update, topic/msim-upgrade, topic/simplify-dev-export
Children:
5c45ca8
Parents:
e535eeb
Message:
  • sysinfo items "system.tasks" and "system.threads" now return complete statistics of all tasks and threads (statistics of individual tasks and threads can be still acquited from "system.tasks.#" and "system.threads.#")
  • update user space functions accordingly
  • cleanup top — it is fully functional again
File:
1 edited

Legend:

Unmodified
Added
Removed
  • uspace/app/top/top.h

    re535eeb rdec16a2  
    11/*
    2  * Copyright (c) 2008 Stanislav Kozina
     2 * Copyright (c) 2010 Stanislav Kozina
     3 * Copyright (c) 2010 Martin Decky
    34 * All rights reserved.
    45 *
     
    3536
    3637#include <task.h>
    37 #include <kernel/ps/cpuinfo.h>
    38 #include <kernel/ps/taskinfo.h>
     38#include <stats.h>
     39#include <time.h>
    3940
    4041#define FRACTION_TO_FLOAT(float, a, b) { \
     
    4344}
    4445
    45 #define OP_TASKS 1
    46 #define OP_IPC 2
     46#define OP_TASKS  1
     47#define OP_IPC    2
     48
    4749extern int operation_type;
    4850
     
    5052        uint64_t upper;
    5153        uint64_t lower;
    52 } ps_float;
     54} fixed_float;
    5355
    5456typedef struct {
    55         ps_float idle;
    56         ps_float busy;
    57 } cpu_perc_t;
     57        fixed_float idle;
     58        fixed_float busy;
     59} perc_cpu_t;
    5860
    5961typedef struct {
    60         ps_float ucycles;
    61         ps_float kcycles;
    62         ps_float mem;
    63 } task_perc_t;
     62        fixed_float ucycles;
     63        fixed_float kcycles;
     64        fixed_float virtmem;
     65} perc_task_t;
    6466
    6567typedef struct {
    66         unsigned int hours;
    67         unsigned int minutes;
    68         unsigned int seconds;
    69 
    70         unsigned int uptime_d;
    71         unsigned int uptime_h;
    72         unsigned int uptime_m;
    73         unsigned int uptime_s;
    74 
    75         unsigned long load[3];
    76 
    77         size_t task_count;
    78         task_info_t *taskinfos;
    79         task_perc_t *task_perc;
    80 
    81         size_t thread_count;
    82         thread_info_t *thread_infos;
    83 
    84         unsigned int cpu_count;
    85         uspace_cpu_info_t *cpus;
    86         cpu_perc_t *cpu_perc;
    87 
    88         uspace_mem_info_t mem_info;
     68        time_t hours;
     69        time_t minutes;
     70        time_t seconds;
     71       
     72        sysarg_t udays;
     73        sysarg_t uhours;
     74        sysarg_t uminutes;
     75        sysarg_t useconds;
     76       
     77        size_t load_count;
     78        load_t *load;
     79       
     80        size_t cpus_count;
     81        stats_cpu_t *cpus;
     82        perc_cpu_t *cpus_perc;
     83       
     84        size_t tasks_count;
     85        stats_task_t *tasks;
     86        perc_task_t *tasks_perc;
     87       
     88        size_t threads_count;
     89        stats_thread_t *threads;
     90       
     91        stats_physmem_t *physmem;
    8992} data_t;
    9093
Note: See TracChangeset for help on using the changeset viewer.