Home | History | Annotate | Download | only in examples
      1  1449  tomee /*
      2  1449  tomee  * CDDL HEADER START
      3  1449  tomee  *
      4  1449  tomee  * The contents of this file are subject to the terms of the
      5  1449  tomee  * Common Development and Distribution License (the "License").
      6  1449  tomee  * You may not use this file except in compliance with the License.
      7  1449  tomee  *
      8  1449  tomee  * You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE
      9  1449  tomee  * or http://www.opensolaris.org/os/licensing.
     10  1449  tomee  * See the License for the specific language governing permissions
     11  1449  tomee  * and limitations under the License.
     12  1449  tomee  *
     13  1449  tomee  * When distributing Covered Code, include this CDDL HEADER in each
     14  1449  tomee  * file and include the License file at usr/src/OPENSOLARIS.LICENSE.
     15  1449  tomee  * If applicable, add the following below this CDDL HEADER, with the
     16  1449  tomee  * fields enclosed by brackets "[]" replaced with your own identifying
     17  1449  tomee  * information: Portions Copyright [yyyy] [name of copyright owner]
     18  1449  tomee  *
     19  1449  tomee  * CDDL HEADER END
     20  1449  tomee  */
     21  1449  tomee 
     22  1449  tomee /*
     23  1449  tomee  * Copyright 2006 Sun Microsystems, Inc.  All rights reserved.
     24  1449  tomee  * Use is subject to license terms.
     25  1449  tomee  */
     26  1449  tomee 
     27  1449  tomee #pragma	ident	"%Z%%M%	%I%	%E% SMI"
     28  1449  tomee 
     29  1449  tomee sdt:::interrupt-start
     30  1449  tomee {
     31  1449  tomee 	self->ts = vtimestamp;
     32  1449  tomee }
     33  1449  tomee 
     34  1449  tomee sdt:::interrupt-complete
     35  1449  tomee /self->ts && arg0/
     36  1449  tomee {
     37  1449  tomee 	this->devi = (struct dev_info *)arg0;
     38  1449  tomee 	@counts[stringof(`devnamesp[this->devi->devi_major].dn_name),
     39  1449  tomee 	     this->devi->devi_instance, cpu] = count();
     40  1449  tomee 	@times[stringof(`devnamesp[this->devi->devi_major].dn_name),
     41  1449  tomee 	     this->devi->devi_instance, cpu] = sum(vtimestamp - self->ts);
     42  1449  tomee 	self->ts = 0;
     43  1449  tomee }
     44