From beda83efaa45fb04f142034f61eb1ae9fe872c59 Mon Sep 17 00:00:00 2001 From: David Höppner <0xffea@gmail.com> Date: Fri, 4 Jan 2013 22:43:53 +0000 Subject: Add statistics for task_events_info * ipc/ipc_mqueue.c (ipc_mqueue_send, ipc_mqueue_receive): Increment counters for message sent and received. * kern/ipc_kobject.c (ipc_kobject_server): Increment sent and received counters for the kernel task. * kern/task.c (task_create): Zero statistics. * kern/task.c (task_info): Add task_events_info call. * kern/task.h: Add statistics. * vm/vm_fault.c (vm_fault_page): Increment zero_fills, pageins, reactivations and cow_faults counters. * vm/vm_fault.c (vm_fault_wire_fast): Increment faults counters. * vm/vm_pageout.c (vm_pageout_scan): Increment reactivations counter. --- ipc/ipc_mqueue.c | 4 ++++ 1 file changed, 4 insertions(+) (limited to 'ipc/ipc_mqueue.c') diff --git a/ipc/ipc_mqueue.c b/ipc/ipc_mqueue.c index f3d5d4b0..80a34d3a 100644 --- a/ipc/ipc_mqueue.c +++ b/ipc/ipc_mqueue.c @@ -374,6 +374,8 @@ ipc_mqueue_send(kmsg, option, time_out) } } + current_task()->messages_sent++; + return MACH_MSG_SUCCESS; } @@ -684,6 +686,8 @@ ipc_mqueue_receive( ip_unlock(port); } + current_task()->messages_received++; + *kmsgp = kmsg; *seqnop = seqno; return MACH_MSG_SUCCESS; -- cgit v1.2.3