xref: /illumos-gate/usr/src/cmd/dtrace/test/tst/common/aggs/tst.negquant.d (revision dd72704bd9e794056c558153663c739e2012d721)
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 D option quiet
28 
29 BEGIN
30 {
31 	@["j-church"] = quantize(1, 100);
32 	@["j-church"] = quantize(1, -99);
33 	@["j-church"] = quantize(1, -1);
34 	val = 123;
35 }
36 
37 BEGIN
38 {
39 	@["k-ingleside"] = quantize(1, -val);
40 }
41 
42 BEGIN
43 {
44 	@["l-taraval"] = quantize(0, -val);
45 	@["l-taraval"] = quantize(-1, -val);
46 	@["l-taraval"] = quantize(1, val);
47 	@["l-taraval"] = quantize(1, val);
48 }
49 
50 BEGIN
51 {
52 	@["m-oceanview"] = quantize(1, (1 << 63) - 1);
53 	@["m-oceanview"] = quantize(1);
54 	@["m-oceanview"] = quantize(2, (1 << 63) - 1);
55 	@["m-oceanview"] = quantize(8, 400000);
56 }
57 
58 BEGIN
59 {
60 	@["n-judah"] = quantize(1, val);
61 	@["n-judah"] = quantize(2, val);
62 	@["n-judah"] = quantize(2, val);
63 	@["n-judah"] = quantize(2);
64 }
65 
66 BEGIN
67 {
68 	this->i = 1;
69 	this->val = (1 << 63) - 1;
70 
71 	@["f-market"] = quantize(this->i, this->val);
72 	this->i <<= 1;
73 	this->val >>= 1;
74 
75 	@["f-market"] = quantize(this->i, this->val);
76 	this->i <<= 1;
77 	this->val >>= 1;
78 
79 	@["f-market"] = quantize(this->i, this->val);
80 	this->i <<= 1;
81 	this->val >>= 1;
82 
83 	@["f-market"] = quantize(this->i, this->val);
84 	this->i <<= 1;
85 	this->val >>= 1;
86 }
87 
88 BEGIN
89 {
90 	this->i = 1;
91 	this->val = (1 << 63) - 4;
92 
93 	@["s-castro"] = quantize(this->i, this->val);
94 	this->i <<= 1;
95 	this->val >>= 1;
96 
97 	@["s-castro"] = quantize(this->i, this->val);
98 	this->i <<= 1;
99 	this->val >>= 1;
100 
101 	@["s-castro"] = quantize(this->i, this->val);
102 	this->i <<= 1;
103 	this->val >>= 1;
104 
105 	@["s-castro"] = quantize(this->i, this->val);
106 	this->i <<= 1;
107 	this->val >>= 1;
108 }
109 
110 BEGIN
111 {
112 	exit(0);
113 }
114