-
Notifications
You must be signed in to change notification settings - Fork 772
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
3021 option for time-ordered output from dtrace(1M)
3022 DTrace: keys should not affect the sort order when sorting by value 3023 it should be possible to dereference dynamic variables 3024 D integer narrowing needs some work 3025 register leak in D code generation 3026 libdtrace should set LD_NOLAZYLOAD=1 to help the pid provider Reviewed by: Bryan Cantrill <bmc@joyent.com> Reviewed by: Eric Schrock <eschrock@delphix.com> Reviewed by: Matt Ahrens <mahrens@delphix.com> Approved by: Garrett D'Amore <garrett@damore.org>
- Loading branch information
Adam H. Leventhal
committed
Jul 25, 2012
1 parent
ff50e8e
commit e5803b7
Showing
76 changed files
with
2,554 additions
and
918 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,35 @@ | ||
/* | ||
* CDDL HEADER START | ||
* | ||
* This file and its contents are supplied under the terms of the | ||
* Common Development and Distribution License ("CDDL"), version 1.0. | ||
* You may only use this file in accordance with the terms of version | ||
* 1.0 of the CDDL. | ||
* | ||
* A full copy of the text of the CDDL should have accompanied this | ||
* source. A copy of the CDDL is also available via the Internet at | ||
* http://www.illumos.org/license/CDDL. | ||
* | ||
* CDDL HEADER END | ||
*/ | ||
|
||
/* | ||
* Copyright (c) 2012 by Delphix. All rights reserved. | ||
*/ | ||
|
||
#pragma D option quiet | ||
|
||
/* | ||
* Make sure the sizes of compatible keys doesn't affect the sort order. | ||
*/ | ||
|
||
BEGIN | ||
{ | ||
@[(int)1, 0] = sum(10); | ||
@[(uint64_t)2, 0] = sum(20); | ||
@[(int)3, 0] = sum(30); | ||
@[(uint64_t)4, 0] = sum(40); | ||
printa(@); | ||
|
||
exit(0); | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,6 @@ | ||
|
||
1 0 10 | ||
2 0 20 | ||
3 0 30 | ||
4 0 40 | ||
|
8 changes: 8 additions & 0 deletions
8
usr/src/cmd/dtrace/test/tst/common/arithmetic/tst.basics.d.out
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,8 @@ | ||
The value of i is 6 | ||
The value of i is 18 | ||
The value of i is 72 | ||
The value of i is 25920 | ||
The value of i is 935761216 | ||
The value of i is -91738734 | ||
The value of i is -91738729 | ||
|
50 changes: 50 additions & 0 deletions
50
usr/src/cmd/dtrace/test/tst/common/arithmetic/tst.compcast.d
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,50 @@ | ||
/* | ||
* CDDL HEADER START | ||
* | ||
* This file and its contents are supplied under the terms of the | ||
* Common Development and Distribution License ("CDDL"), version 1.0. | ||
* You may only use this file in accordance with the terms of version | ||
* 1.0 of the CDDL. | ||
* | ||
* A full copy of the text of the CDDL should have accompanied this | ||
* source. A copy of the CDDL is also available via the Internet at | ||
* http://www.illumos.org/license/CDDL. | ||
* | ||
* CDDL HEADER END | ||
*/ | ||
|
||
/* | ||
* Copyright (c) 2012 by Delphix. All rights reserved. | ||
*/ | ||
|
||
/* | ||
* Test compile-time casting between integer types of different size. | ||
*/ | ||
|
||
#pragma D option quiet | ||
|
||
int64_t x; | ||
|
||
BEGIN | ||
{ | ||
x = (int32_t)(int16_t)0xfff0; | ||
printf("%16x %20d %20u\n", x, x, x); | ||
x = (int32_t)(uint16_t)0xfff0; | ||
printf("%16x %20d %20u\n", x, x, x); | ||
x = (uint32_t)(int16_t)0xfff0; | ||
printf("%16x %20d %20u\n", x, x, x); | ||
x = (uint32_t)(uint16_t)0xfff0; | ||
printf("%16x %20d %20u\n", x, x, x); | ||
printf("\n"); | ||
|
||
x = (int16_t)(int32_t)0xfff0; | ||
printf("%16x %20d %20u\n", x, x, x); | ||
x = (int16_t)(uint32_t)0xfff0; | ||
printf("%16x %20d %20u\n", x, x, x); | ||
x = (uint16_t)(int32_t)0xfff0; | ||
printf("%16x %20d %20u\n", x, x, x); | ||
x = (uint16_t)(uint32_t)0xfff0; | ||
printf("%16x %20d %20u\n", x, x, x); | ||
|
||
exit(0); | ||
} |
10 changes: 10 additions & 0 deletions
10
usr/src/cmd/dtrace/test/tst/common/arithmetic/tst.compcast.d.out
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,10 @@ | ||
fffffffffffffff0 -16 18446744073709551600 | ||
fff0 65520 65520 | ||
fffffff0 4294967280 4294967280 | ||
fff0 65520 65520 | ||
|
||
fffffffffffffff0 -16 18446744073709551600 | ||
fffffffffffffff0 -16 18446744073709551600 | ||
fff0 65520 65520 | ||
fff0 65520 65520 | ||
|
57 changes: 0 additions & 57 deletions
57
usr/src/cmd/dtrace/test/tst/common/arithmetic/tst.complex.d
This file was deleted.
Oops, something went wrong.
36 changes: 36 additions & 0 deletions
36
usr/src/cmd/dtrace/test/tst/common/arithmetic/tst.compnarrowassign.d
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,36 @@ | ||
/* | ||
* CDDL HEADER START | ||
* | ||
* This file and its contents are supplied under the terms of the | ||
* Common Development and Distribution License ("CDDL"), version 1.0. | ||
* You may only use this file in accordance with the terms of version | ||
* 1.0 of the CDDL. | ||
* | ||
* A full copy of the text of the CDDL should have accompanied this | ||
* source. A copy of the CDDL is also available via the Internet at | ||
* http://www.illumos.org/license/CDDL. | ||
* | ||
* CDDL HEADER END | ||
*/ | ||
|
||
/* | ||
* Copyright (c) 2012 by Delphix. All rights reserved. | ||
*/ | ||
|
||
/* | ||
* Test narrowing at assignment. | ||
*/ | ||
|
||
#pragma D option quiet | ||
|
||
uint16_t x; | ||
uint32_t y; | ||
|
||
BEGIN | ||
{ | ||
x = 0xbeefcafe; | ||
y = x; | ||
printf("%x", y); /* where's the beef? */ | ||
|
||
exit(0); | ||
} |
1 change: 1 addition & 0 deletions
1
usr/src/cmd/dtrace/test/tst/common/arithmetic/tst.compnarrowassign.d.out
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1 @@ | ||
cafe |
52 changes: 52 additions & 0 deletions
52
usr/src/cmd/dtrace/test/tst/common/arithmetic/tst.execcast.d
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,52 @@ | ||
/* | ||
* CDDL HEADER START | ||
* | ||
* This file and its contents are supplied under the terms of the | ||
* Common Development and Distribution License ("CDDL"), version 1.0. | ||
* You may only use this file in accordance with the terms of version | ||
* 1.0 of the CDDL. | ||
* | ||
* A full copy of the text of the CDDL should have accompanied this | ||
* source. A copy of the CDDL is also available via the Internet at | ||
* http://www.illumos.org/license/CDDL. | ||
* | ||
* CDDL HEADER END | ||
*/ | ||
|
||
/* | ||
* Copyright (c) 2012 by Delphix. All rights reserved. | ||
*/ | ||
|
||
/* | ||
* Test execution-time casting between integer types of different size. | ||
*/ | ||
|
||
#pragma D option quiet | ||
|
||
int64_t x; | ||
|
||
BEGIN | ||
{ | ||
z = 0xfff0; | ||
|
||
x = (int32_t)(int16_t)z; | ||
printf("%16x %20d %20u\n", x, x, x); | ||
x = (int32_t)(uint16_t)z; | ||
printf("%16x %20d %20u\n", x, x, x); | ||
x = (uint32_t)(int16_t)z; | ||
printf("%16x %20d %20u\n", x, x, x); | ||
x = (uint32_t)(uint16_t)z; | ||
printf("%16x %20d %20u\n", x, x, x); | ||
printf("\n"); | ||
|
||
x = (int16_t)(int32_t)z; | ||
printf("%16x %20d %20u\n", x, x, x); | ||
x = (int16_t)(uint32_t)z; | ||
printf("%16x %20d %20u\n", x, x, x); | ||
x = (uint16_t)(int32_t)z; | ||
printf("%16x %20d %20u\n", x, x, x); | ||
x = (uint16_t)(uint32_t)z; | ||
printf("%16x %20d %20u\n", x, x, x); | ||
|
||
exit(0); | ||
} |
10 changes: 10 additions & 0 deletions
10
usr/src/cmd/dtrace/test/tst/common/arithmetic/tst.execcast.d.out
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,10 @@ | ||
fffffffffffffff0 -16 18446744073709551600 | ||
fff0 65520 65520 | ||
fffffff0 4294967280 4294967280 | ||
fff0 65520 65520 | ||
|
||
fffffffffffffff0 -16 18446744073709551600 | ||
fffffffffffffff0 -16 18446744073709551600 | ||
fff0 65520 65520 | ||
fff0 65520 65520 | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.