Source-Changes-HG archive

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]

[src/trunk]: src/sys/arch/newsmips/apbus Account APbus interrupts by evcnt(9).



details:   https://anonhg.NetBSD.org/src/rev/74b25bc93f57
branches:  trunk
changeset: 993796:74b25bc93f57
user:      tsutsui <tsutsui%NetBSD.org@localhost>
date:      Sun Sep 30 14:09:35 2018 +0000

description:
Account APbus interrupts by evcnt(9).

diffstat:

 sys/arch/newsmips/apbus/apbus.c |  10 +++++++---
 1 files changed, 7 insertions(+), 3 deletions(-)

diffs (39 lines):

diff -r 981b73c9c1e8 -r 74b25bc93f57 sys/arch/newsmips/apbus/apbus.c
--- a/sys/arch/newsmips/apbus/apbus.c   Sun Sep 30 14:04:51 2018 +0000
+++ b/sys/arch/newsmips/apbus/apbus.c   Sun Sep 30 14:09:35 2018 +0000
@@ -1,4 +1,4 @@
-/*     $NetBSD: apbus.c,v 1.23 2018/09/30 06:14:23 tsutsui Exp $       */
+/*     $NetBSD: apbus.c,v 1.24 2018/09/30 14:09:35 tsutsui Exp $       */
 
 /*-
  * Copyright (C) 1999 SHIMIZU Ryo.  All rights reserved.
@@ -27,7 +27,7 @@
  */
 
 #include <sys/cdefs.h>
-__KERNEL_RCSID(0, "$NetBSD: apbus.c,v 1.23 2018/09/30 06:14:23 tsutsui Exp $");
+__KERNEL_RCSID(0, "$NetBSD: apbus.c,v 1.24 2018/09/30 14:09:35 tsutsui Exp $");
 
 #define __INTR_PRIVATE
 
@@ -201,8 +201,10 @@
 
        nintr = 0;
        LIST_FOREACH(ih, &ip->intr_q, ih_q) {
-               if (ih->ih_mask & stat)
+               if (ih->ih_mask & stat) {
                        nintr += (*ih->ih_func)(ih->ih_arg);
+                       ih->intr_count.ev_count++;
+               }
        }
        return nintr;
 }
@@ -227,6 +229,8 @@
        ih->ih_priority = priority;
        ih->ih_func = func;
        ih->ih_arg = arg;
+       evcnt_attach_dynamic(&ih->intr_count, EVCNT_TYPE_INTR,
+           NULL, "apbus", name);
 
        if (LIST_EMPTY(&ip->intr_q)) {
                LIST_INSERT_HEAD(&ip->intr_q, ih, ih_q);



Home | Main Index | Thread Index | Old Index