Changes in uspace/app/top/top.h [dec16a2:172aad6] in mainline


Ignore:
File:
1 edited

Legend:

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

    rdec16a2 r172aad6  
    3939#include <time.h>
    4040
    41 #define FRACTION_TO_FLOAT(float, a, b) { \
    42         (float).upper = (a); \
    43         (float).lower = (b); \
    44 }
     41#define FRACTION_TO_FLOAT(float, a, b) \
     42        do { \
     43                if ((b) != 0) { \
     44                        (float).upper = (a); \
     45                        (float).lower = (b); \
     46                } else { \
     47                        (float).upper = 0; \
     48                        (float).lower = 1; \
     49                } \
     50        } while (0)
    4551
    46 #define OP_TASKS  1
    47 #define OP_IPC    2
     52typedef enum {
     53        OP_TASKS,
     54        OP_IPC,
     55        OP_EXCS,
     56        OP_HELP
     57} op_mode_t;
    4858
    49 extern int operation_type;
     59typedef enum {
     60        SORT_TASK_CYCLES
     61} sort_mode_t;
     62
     63extern op_mode_t op_mode;
     64extern sort_mode_t sort_mode;
     65extern bool excs_all;
    5066
    5167typedef struct {
     
    6076
    6177typedef struct {
     78        fixed_float virtmem;
    6279        fixed_float ucycles;
    6380        fixed_float kcycles;
    64         fixed_float virtmem;
    6581} perc_task_t;
     82
     83typedef struct {
     84        fixed_float cycles;
     85        fixed_float count;
     86} perc_exc_t;
    6687
    6788typedef struct {
     
    85106        stats_task_t *tasks;
    86107        perc_task_t *tasks_perc;
     108        size_t *tasks_map;
    87109       
    88110        size_t threads_count;
    89111        stats_thread_t *threads;
    90112       
     113        size_t exceptions_count;
     114        stats_exc_t *exceptions;
     115        perc_exc_t *exceptions_perc;
     116       
    91117        stats_physmem_t *physmem;
     118       
     119        uint64_t *ucycles_diff;
     120        uint64_t *kcycles_diff;
     121        uint64_t *ecycles_diff;
     122        uint64_t *ecount_diff;
    92123} data_t;
    93124
Note: See TracChangeset for help on using the changeset viewer.