err.D_CLEAR_AGGARG.bad.d revision 2633:71bab08d24b2
14887Schin/* 24887Schin * CDDL HEADER START 34887Schin * 44887Schin * The contents of this file are subject to the terms of the 54887Schin * Common Development and Distribution License (the "License"). 612068SRoger.Faulkner@Oracle.COM * You may not use this file except in compliance with the License. 74887Schin * 84887Schin * You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE 98462SApril.Chin@Sun.COM * or http://www.opensolaris.org/os/licensing. 104887Schin * See the License for the specific language governing permissions 114887Schin * and limitations under the License. 124887Schin * 134887Schin * When distributing Covered Code, include this CDDL HEADER in each 144887Schin * file and include the License file at usr/src/OPENSOLARIS.LICENSE. 154887Schin * If applicable, add the following below this CDDL HEADER, with the 164887Schin * fields enclosed by brackets "[]" replaced with your own identifying 174887Schin * information: Portions Copyright [yyyy] [name of copyright owner] 184887Schin * 194887Schin * CDDL HEADER END 204887Schin */ 214887Schin 224887Schin/* 234887Schin * Copyright 2006 Sun Microsystems, Inc. All rights reserved. 244887Schin * Use is subject to license terms. 254887Schin */ 264887Schin 274887Schin 284887Schin#pragma ident "%Z%%M% %I% %E% SMI" 294887Schin 304887Schin 314887Schin/* 324887Schin * ASSERTION: 334887Schin * The argument to clear() must be an aggregation. 344887Schin * 354887Schin * SECTION: Aggregations/Clearing aggregations 364887Schin * 374887Schin * 384887Schin */ 394887Schin 404887Schin#pragma D option quiet 414887Schin#pragma D option aggrate=10ms 424887Schin#pragma D option switchrate=10ms 438462SApril.Chin@Sun.COM 448462SApril.Chin@Sun.COMBEGIN 458462SApril.Chin@Sun.COM{ 468462SApril.Chin@Sun.COM i = 0; 474887Schin start = timestamp; 488462SApril.Chin@Sun.COM} 494887Schin 504887Schintick-100ms 514887Schin/i < 20/ 528462SApril.Chin@Sun.COM{ 538462SApril.Chin@Sun.COM @func[i%5] = sum(i * 100); 548462SApril.Chin@Sun.COM i++; 558462SApril.Chin@Sun.COM} 568462SApril.Chin@Sun.COM 578462SApril.Chin@Sun.COMtick-100ms 5810898Sroland.mainz@nrubsig.org/i == 10/ 5910898Sroland.mainz@nrubsig.org{ 608462SApril.Chin@Sun.COM printf("Aggregation data before clear():\n"); 618462SApril.Chin@Sun.COM printa(@func); 628462SApril.Chin@Sun.COM 638462SApril.Chin@Sun.COM clear(count()); 648462SApril.Chin@Sun.COM 6510898Sroland.mainz@nrubsig.org printf("Aggregation data after clear():\n"); 6610898Sroland.mainz@nrubsig.org printa(@func); 678462SApril.Chin@Sun.COM i++; 6810898Sroland.mainz@nrubsig.org} 698462SApril.Chin@Sun.COM 704887Schintick-100ms 718462SApril.Chin@Sun.COM/i == 20/ 724887Schin{ 734887Schin printf("Final aggregation data:\n"); 744887Schin printa(@func); 758462SApril.Chin@Sun.COM 768462SApril.Chin@Sun.COM exit(0); 778462SApril.Chin@Sun.COM} 788462SApril.Chin@Sun.COM