xref: /illumos-gate/usr/src/cmd/dtrace/test/tst/common/aggs/tst.negquant.d (revision f012ee0c3db17469b492c2cf757226f3d7b1ebbc)
1 /*
2  * CDDL HEADER START
3  *
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.
7  *
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.
12  *
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]
18  *
19  * CDDL HEADER END
20  */
21 
22 /*
23  * Copyright 2006 Sun Microsystems, Inc.  All rights reserved.
24  * Use is subject to license terms.
25  */
26 
27 #pragma ident	"%Z%%M%	%I%	%E% SMI"
28 
29 #pragma D option quiet
30 
31 BEGIN
32 {
33 	@["j-church"] = quantize(1, 100);
34 	@["j-church"] = quantize(1, -99);
35 	@["j-church"] = quantize(1, -1);
36 	val = 123;
37 }
38 
39 BEGIN
40 {
41 	@["k-ingleside"] = quantize(1, -val);
42 }
43 
44 BEGIN
45 {
46 	@["l-taraval"] = quantize(0, -val);
47 	@["l-taraval"] = quantize(-1, -val);
48 	@["l-taraval"] = quantize(1, val);
49 	@["l-taraval"] = quantize(1, val);
50 }
51 
52 BEGIN
53 {
54 	@["m-oceanview"] = quantize(1, (1 << 63) - 1);
55 	@["m-oceanview"] = quantize(1);
56 	@["m-oceanview"] = quantize(2, (1 << 63) - 1);
57 	@["m-oceanview"] = quantize(8, 400000);
58 }
59 
60 BEGIN
61 {
62 	@["n-judah"] = quantize(1, val);
63 	@["n-judah"] = quantize(2, val);
64 	@["n-judah"] = quantize(2, val);
65 	@["n-judah"] = quantize(2);
66 }
67 
68 BEGIN
69 {
70 	this->i = 1;
71 	this->val = (1 << 63) - 1;
72 
73 	@["f-market"] = quantize(this->i, this->val);
74 	this->i <<= 1;
75 	this->val >>= 1;
76 
77 	@["f-market"] = quantize(this->i, this->val);
78 	this->i <<= 1;
79 	this->val >>= 1;
80 
81 	@["f-market"] = quantize(this->i, this->val);
82 	this->i <<= 1;
83 	this->val >>= 1;
84 
85 	@["f-market"] = quantize(this->i, this->val);
86 	this->i <<= 1;
87 	this->val >>= 1;
88 }
89 
90 BEGIN
91 {
92 	this->i = 1;
93 	this->val = (1 << 63) - 4;
94 
95 	@["s-castro"] = quantize(this->i, this->val);
96 	this->i <<= 1;
97 	this->val >>= 1;
98 
99 	@["s-castro"] = quantize(this->i, this->val);
100 	this->i <<= 1;
101 	this->val >>= 1;
102 
103 	@["s-castro"] = quantize(this->i, this->val);
104 	this->i <<= 1;
105 	this->val >>= 1;
106 
107 	@["s-castro"] = quantize(this->i, this->val);
108 	this->i <<= 1;
109 	this->val >>= 1;
110 }
111 
112 BEGIN
113 {
114 	exit(0);
115 }
116