diff options
author | gnn <gnn@FreeBSD.org> | 2016-05-19 19:51:39 +0000 |
---|---|---|
committer | gnn <gnn@FreeBSD.org> | 2016-05-19 19:51:39 +0000 |
commit | f6dffc405c7096f010b1b300da305496e6eccfbf (patch) | |
tree | d8ae9764a9fe69885151446bd98bb00d10a96f32 /cddl/contrib/dtracetoolkit/Include | |
parent | 6dc0fa9057a5a2eda45ab244907043956d7cbead (diff) | |
download | FreeBSD-src-f6dffc405c7096f010b1b300da305496e6eccfbf.zip FreeBSD-src-f6dffc405c7096f010b1b300da305496e6eccfbf.tar.gz |
Remove the old version of the DTraceToolkit from the source tree.
The DTraceToolkit is part of the Open DTrace effort and is supported
on FreeBSD as a port (sysutils/DTraceToolkit) which has been updated
to properly track toolkit development upstream.
Sponsored by: DARPA, AFRL
Diffstat (limited to 'cddl/contrib/dtracetoolkit/Include')
-rw-r--r-- | cddl/contrib/dtracetoolkit/Include/Readme | 18 | ||||
-rwxr-xr-x | cddl/contrib/dtracetoolkit/Include/test.ksh | 68 | ||||
-rw-r--r-- | cddl/contrib/dtracetoolkit/Include/time.h | 38 | ||||
-rw-r--r-- | cddl/contrib/dtracetoolkit/Include/tostr.h | 89 |
4 files changed, 0 insertions, 213 deletions
diff --git a/cddl/contrib/dtracetoolkit/Include/Readme b/cddl/contrib/dtracetoolkit/Include/Readme deleted file mode 100644 index 4aa4688..0000000 --- a/cddl/contrib/dtracetoolkit/Include/Readme +++ /dev/null @@ -1,18 +0,0 @@ -Include - include scripts for D scripting - - This directory contains files that can be included for use with D scripts. - - There are two types of include files, - - *.h - These can be included using, - - #!/usr/sbin/dtrace -Cs - #include <filename.h> - - *.d - These must be copyied to a translator directory (/usr/lib/dtrace), - and should be automatically pulled in. - - This directory does not contain runnable DTrace scripts. - diff --git a/cddl/contrib/dtracetoolkit/Include/test.ksh b/cddl/contrib/dtracetoolkit/Include/test.ksh deleted file mode 100755 index a3e1036..0000000 --- a/cddl/contrib/dtracetoolkit/Include/test.ksh +++ /dev/null @@ -1,68 +0,0 @@ -#!/usr/bin/ksh -/* - * test.ksh - DTrace include file test script. - * - * $Id: test.ksh 36 2007-09-15 06:51:18Z brendan $ - * - * COPYRIGHT: Copyright (c) 2007 Brendan Gregg. - * - * CDDL HEADER START - * - * The contents of this file are subject to the terms of the - * Common Development and Distribution License, Version 1.0 only - * (the "License"). You may not use this file except in compliance - * with the License. - * - * You can obtain a copy of the license at Docs/cddl1.txt - * or http://www.opensolaris.org/os/licensing. - * See the License for the specific language governing permissions - * and limitations under the License. - * - * CDDL HEADER END - * - * 16-Sep-2007 Brendan Gregg Created this. - */ - -dtrace -CI . -s /dev/stdin << END - -#include "tostr.h" -#include "time.h" - -#pragma D option quiet -#pragma D option destructive - -dtrace:::BEGIN -{ - i = 1; - printf("\nNUM_TO_STR %12d = %s\n", i, NUM_TO_STR(i)); - i = 1100; - printf("NUM_TO_STR %12d = %s\n", i, NUM_TO_STR(i)); - i = 1100000; - printf("NUM_TO_STR %12d = %s\n", i, NUM_TO_STR(i)); - i = 999999999; - printf("NUM_TO_STR %12d = %s\n", i, NUM_TO_STR(i)); - - i = 1; - printf("\nBYTES_TO_STR %12d = %s\n", i, BYTES_TO_STR(i)); - i = 1024; - printf("BYTES_TO_STR %12d = %s\n", i, BYTES_TO_STR(i)); - i = 1000000; - printf("BYTES_TO_STR %12d = %s\n", i, BYTES_TO_STR(i)); - i = 999999999; - printf("BYTES_TO_STR %12d = %s\n", i, BYTES_TO_STR(i)); - - i = 1; - printf("\nUS_TO_STR %12d = %s\n", i, US_TO_STR(i)); - i = 1100; - printf("US_TO_STR %12d = %s\n", i, US_TO_STR(i)); - i = 999999; - printf("US_TO_STR %12d = %s\n", i, US_TO_STR(i)); - - printf("\nwalltimestamp : %Y\n", walltimestamp); - printf("TZ=GMT date : "); - system("TZ=GMT date '+%%H:%%M:%%S'"); - printf("TIME_HHMMSS : %s\n", TIME_HHMMSS); - - exit(0); -} -END diff --git a/cddl/contrib/dtracetoolkit/Include/time.h b/cddl/contrib/dtracetoolkit/Include/time.h deleted file mode 100644 index 76caa2e..0000000 --- a/cddl/contrib/dtracetoolkit/Include/time.h +++ /dev/null @@ -1,38 +0,0 @@ -/* - * time.h - DTrace Time include file. - * - * $Id: time.h 36 2007-09-15 06:51:18Z brendan $ - * - * COPYRIGHT: Copyright (c) 2007 Brendan Gregg. - * - * CDDL HEADER START - * - * The contents of this file are subject to the terms of the - * Common Development and Distribution License, Version 1.0 only - * (the "License"). You may not use this file except in compliance - * with the License. - * - * You can obtain a copy of the license at Docs/cddl1.txt - * or http://www.opensolaris.org/os/licensing. - * See the License for the specific language governing permissions - * and limitations under the License. - * - * CDDL HEADER END - * - * 16-Sep-2007 Brendan Gregg Created this. - */ - -/* - * TIME_HHMMSS - Returns GMT time as a "HH:MM:SS" string. - * - * eg, "21:53:07" - */ -#define TIME_HHMMSS \ - strjoin(strjoin(strjoin(strjoin(strjoin( \ - (((walltimestamp / 1000000000) % 86400) / 3600) < 10 ? "0" : "",\ - lltostr(((walltimestamp / 1000000000) % 86400) / 3600)), ":"), \ - strjoin((((walltimestamp / 1000000000) % 3600) / 60) < 10 ? \ - "0" : "", lltostr(((walltimestamp / 1000000000) % 3600) / 60))),\ - ":"), strjoin(((walltimestamp / 1000000000) % 60) < 10 ? \ - "0" : "", lltostr((walltimestamp / 1000000000) % 60))) - diff --git a/cddl/contrib/dtracetoolkit/Include/tostr.h b/cddl/contrib/dtracetoolkit/Include/tostr.h deleted file mode 100644 index 6032f6a..0000000 --- a/cddl/contrib/dtracetoolkit/Include/tostr.h +++ /dev/null @@ -1,89 +0,0 @@ -/* - * tostr.h - DTrace To-String include file. - * - * $Id: tostr.h 36 2007-09-15 06:51:18Z brendan $ - * - * COPYRIGHT: Copyright (c) 2007 Brendan Gregg. - * - * CDDL HEADER START - * - * The contents of this file are subject to the terms of the - * Common Development and Distribution License, Version 1.0 only - * (the "License"). You may not use this file except in compliance - * with the License. - * - * You can obtain a copy of the license at Docs/cddl1.txt - * or http://www.opensolaris.org/os/licensing. - * See the License for the specific language governing permissions - * and limitations under the License. - * - * CDDL HEADER END - * - * 16-Sep-2007 Brendan Gregg Created this. - */ - -/* - * NUM_TO_STR(n) - takes a number and returns a string with a prefix, - * intended to fit withen 6 chars. - * - * Input Output - * 0 0 - * 1 1 - * 10 10 - * 999 999 - * 1000 1.0K - * 1100 1.1K - * 10000 10.0K - * 999999 999.0K - * 1000000 1.0M - * 10000000 10.0M - * 999999999 999.9M - */ -#define NUM_TO_STR(n) \ - n >= 1000000 ? \ - strjoin(strjoin(strjoin(lltostr(n / 1000000), "."), \ - lltostr((n % 1000000) / 100000)), "M") : n >= 1000 ? \ - strjoin(strjoin(strjoin(lltostr(n / 1000), "."), \ - lltostr((n % 1000) / 100)), "K") : lltostr(n) - -/* - * BYTES_TO_STR(n) - takes a byte count and returns a string with a prefix, - * intended to fit withen 6 chars. - * - * Input Output - * 0 0 - * 1 1 - * 10 10 - * 999 0.9K - * 1000 0.9K - * 1024 1.0K - * 10240 10.0K - * 1000000 976.5K - * 1048576 1.0M - * 1000000000 953.6M - */ -#define BYTES_TO_STR(n) \ - n >= 1024000 ? \ - strjoin(strjoin(strjoin(lltostr(n / 1048576), "."), \ - lltostr((n % 1048576) / 104858)), "M") : n >= 1000 ? \ - strjoin(strjoin(strjoin(lltostr(n / 1024), "."), \ - lltostr((n % 1024) / 103)), "K") : lltostr(n) - -/* - * US_TO_STR(n) - takes microseconds and returns a string with a prefix, - * intended to fit withen 6 chars. - * - * Input Output - * 0 0 - * 1 1u - * 10 10u - * 999 999u - * 1000 1.0m - * 1100 1.1m - * 10000 10.0m - * 999999 999.0m - */ -#define US_TO_STR(n) \ - n == 0 ? "0" : n >= 1000 ? \ - strjoin(lltostr(n / 1000), "m") : strjoin(lltostr(n), "u") - |