4 * The contents of this file are subject to the terms of the
5 * Common Development and Distribution License (the "License").
6 * You may not use this file except in compliance with the License.
8 * You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE
9 * or http://www.opensolaris.org/os/licensing.
10 * See the License for the specific language governing permissions
11 * and limitations under the License.
13 * When distributing Covered Code, include this CDDL HEADER in each
14 * file and include the License file at usr/src/OPENSOLARIS.LICENSE.
15 * If applicable, add the following below this CDDL HEADER, with the
16 * fields enclosed by brackets "[]" replaced with your own identifying
17 * information: Portions Copyright [yyyy] [name of copyright owner]
23 * Copyright 2006 Sun Microsystems, Inc. All rights reserved.
24 * Use is subject to license terms.
27 #
pragma ident
"%Z%%M% %I% %E% SMI"
32 * Signed integer keys print and sort as expected.
34 * SECTION: Aggregations, Printing Aggregations
36 * NOTES: DTrace sorts integer keys as unsigned values, yet prints 32-
37 * and 64-bit integers as signed values. Since the Java DTrace API is
38 * expected to emulate this behavior, this test was added to ensure that
39 * the behavior is preserved. Consistency with trace() output is also
43 #
pragma D option quiet
44 #
pragma D option aggsortkey
95 @i8[(char)-2] = sum(-2);
96 @i8[(char)-1] = sum(-1);
97 @i8[(char)0] = sum(0);
98 @i8[(char)1] = sum(1);
99 @i8[(char)2] = sum(2);
101 @i16[(short)-2] = sum(-2);
102 @i16[(short)-1] = sum(-1);
103 @i16[(short)0] = sum(0);
104 @i16[(short)1] = sum(1);
105 @i16[(short)2] = sum(2);
113 @i64[(long long)-2] = sum(-2);
114 @i64[(long long)-1] = sum(-1);
115 @i64[(long long)0] = sum(0);
116 @i64[(long long)1] = sum(1);
117 @i64[(long long)2] = sum(2);