Changeset 88dea9d in mainline for kernel/generic/include


Ignore:
Timestamp:
2010-04-17T16:28:49Z (15 years ago)
Author:
Martin Decky <martin@…>
Branches:
lfn, master, serial, ticket/834-toolchain-update, topic/msim-upgrade, topic/simplify-dev-export
Children:
30a5470
Parents:
5ba201d (diff), 95319bd (diff)
Note: this is a merge changeset, the changes displayed below correspond to the merge itself.
Use the (diff) links above to see all the changes relative to each parent.
Message:

merge from measuring branch

Location:
kernel/generic/include
Files:
6 added
5 edited

Legend:

Unmodified
Added
Removed
  • kernel/generic/include/cpu.h

    r5ba201d r88dea9d  
    6868                                             are disabled. */
    6969
     70        bool idle;
     71        uint64_t idle_ticks;
     72        uint64_t busy_ticks;
     73
    7074        /**
    7175         * Processor ID assigned by kernel.
  • kernel/generic/include/mm/frame.h

    r5ba201d r88dea9d  
    170170extern void zone_merge_all(void);
    171171extern uint64_t zone_total_size(void);
     172extern void zone_busy_and_free(uint64_t *out_busy, uint64_t *out_free);
    172173
    173174/*
  • kernel/generic/include/proc/task.h

    r5ba201d r88dea9d  
    5757#include <mm/as.h>
    5858
    59 #define TASK_NAME_BUFLEN        20
     59#include <ps/taskinfo.h>
    6060
    6161struct thread;
     
    9494        answerbox_t answerbox;  /**< Communication endpoint */
    9595        phone_t phones[IPC_MAX_PHONES];
     96        task_ipc_info_t ipc_info; /**< IPC statistics */
    9697        /**
    9798         * Active asynchronous messages. It is used for limiting uspace to
     
    122123       
    123124        /** Accumulated accounting. */
    124         uint64_t cycles;
     125        uint64_t ucycles;
     126        uint64_t kcycles;
    125127} task_t;
    126128
     
    134136extern task_t *task_find_by_id(task_id_t id);
    135137extern int task_kill(task_id_t id);
    136 extern uint64_t task_get_accounting(task_t *t);
     138extern void task_get_accounting(task_t *t, uint64_t *ucycles, uint64_t *kcycles);
    137139extern void task_print_list(void);
    138140
  • kernel/generic/include/proc/thread.h

    r5ba201d r88dea9d  
    6969#define THREAD_FLAG_NOATTACH    (1 << 3)
    7070
    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;
     71/* We need state_t enum definition */
     72#include <ps/taskinfo.h>
    8873
    8974/** Thread structure. There is one per thread. */
     
    189174       
    190175        /** Thread accounting. */
    191         uint64_t cycles;
     176        uint64_t ucycles;
     177        uint64_t kcycles;
    192178        /** Last sampled cycle. */
    193179        uint64_t last_cycle;
     
    252238extern void thread_print_list(void);
    253239extern void thread_destroy(thread_t *);
    254 extern void thread_update_accounting(void);
     240extern void thread_update_accounting(bool);
    255241extern bool thread_exists(thread_t *);
    256242
  • kernel/generic/include/syscall/syscall.h

    r5ba201d r88dea9d  
    8989        SYS_DEBUG_ENABLE_CONSOLE,
    9090        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
    91100        SYS_IPC_CONNECT_KBOX,
    92101        SYSCALL_END
Note: See TracChangeset for help on using the changeset viewer.