diff options
author | David Höppner <0xffea@gmail.com> | 2013-01-05 11:56:55 +0000 |
---|---|---|
committer | Samuel Thibault <samuel.thibault@ens-lyon.org> | 2013-01-13 20:28:51 +0100 |
commit | 55db6d133a92cf32aaac8bf3aec663dfd58660e0 (patch) | |
tree | 69abb9c4a7e454dfa04dbaf262cbc7a5470402ae | |
parent | 2b2d7fdc42475019e5ce3eabc9c9673e3c13d89f (diff) |
Add TASK_EVENTS_INFO support to libps
* libps/procstat.c (merge_procinfo): Also copy taskevents.
* libps/procstat.c (set_procinfo_flags): Set pointer to task_events_info.
* tasks: Remove TASK_EVENTS_INFO item.
-rw-r--r-- | libps/procstat.c | 6 | ||||
-rw-r--r-- | tasks | 2 |
2 files changed, 6 insertions, 2 deletions
diff --git a/libps/procstat.c b/libps/procstat.c index ba923780..845db6c0 100644 --- a/libps/procstat.c +++ b/libps/procstat.c @@ -226,6 +226,10 @@ merge_procinfo (struct proc_stat *ps, ps_flags_t need, ps_flags_t have) /* Task info. */ bcopy (&old_pi_hdr.taskinfo, &new_pi->taskinfo, sizeof (struct task_basic_info)); + if (have & PSTAT_TASK_EVENTS) + /* Event info. */ + bcopy (&old_pi_hdr.taskevents, &new_pi->taskevents, + sizeof (struct task_events_info)); /* That's it for now. */ if (new_pi != ps->proc_info) @@ -637,6 +641,8 @@ set_procinfo_flags (struct proc_stat *ps, ps_flags_t need, ps_flags_t have) gotten them, as the information will be newer. */ if (have & PSTAT_TASK_BASIC) ps->task_basic_info = &pi->taskinfo; + if (have & PSTAT_TASK_EVENTS) + ps->task_events_info = &pi->taskevents; if (have & PSTAT_NUM_THREADS) ps->num_threads = count_threads (pi, have); if (had & PSTAT_THREAD_BASIC) @@ -101,8 +101,6 @@ Please discuss proposed microkernel work with thomas@gnu.org. have said their could could be released to the public (but it has not appeared). - * Implement TASK_EVENTS_INFO. - * Add an anonymous swap allocation statistic to the task info structure. |