Skip to content

Commit 5d79edd

Browse files
committed
/home/fox/release/dtrace/dtrace-20120205a.tar.bz2
1 parent ddde1d7 commit 5d79edd

File tree

11 files changed

+92
-74
lines changed

11 files changed

+92
-74
lines changed

.release

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,3 @@
1-
date=Sun Feb 5 16:28:32 GMT 2012
2-
release=dtrace-20120205
3-
build=370
1+
date=Sun Feb 5 22:21:34 GMT 2012
2+
release=dtrace-20120205a
3+
build=372

CONTRIB

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,7 @@
11
Following is a list of people who have contributed to the
2-
code. This is a team effort.
2+
code.
33

4+
C.Bergstr�m
45
Nigel.Smith
56
67

Changes

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,12 @@
11
Sun Feb 5 10:18:55 2012 fox
22

3+
676* driver/intr.c: Fix license.
4+
5+
675* liblinux/proc2.c: Fix to avoid leaving target USDT proc in
6+
a stopped state. (We did this due to bugs in libproc handling
7+
but we shouldnt even if we are buggy). Not detecting 't'
8+
process state properly.
9+
310
674* Archive: 1.0137
411

512
673* dtrace_linux.c: Fix clflush issue in <= 2.6.21 kernels

README

Lines changed: 42 additions & 50 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
Linux port of DTrace
22

3-
January 2011
3+
February 2012
44
Paul D. Fox
55
66
http://www.twitter.com/crispeditor
@@ -16,6 +16,24 @@ Download dtrace tarballs for linux here:
1616
http://dl.dropbox.com/u/45405441/dtrace-latest.tar.gz
1717
ftp://crisp.dynalias.com/pub/release/website/dtrace
1818

19+
Introduction
20+
============
21+
22+
This is a port of the Sun DTrace user and kernel code to Linux.
23+
No linux kernel code is touched in this build, but what is produced
24+
is a dynamically loadable kernel module. This avoids licensing
25+
issues and allows people to load and update dtrace as they desire.
26+
27+
The goal of this project is to ensure dtrace is everywhere - so
28+
that we can all benefit from faster systems and software,
29+
better kernels and generally be a good citizen to the user and
30+
administrators systems.
31+
32+
If this works for you, great. If not, feel free to feedback
33+
what/why it doesnt work and we may be able to address the
34+
issues.
35+
36+
1937
PayPal
2038
======
2139
If you want to make a donation for this software, feel free to do so.
@@ -27,75 +45,49 @@ use this reference for donations:
2745

2846
2947

30-
Introduction
31-
============
32-
33-
This is a port of the Sun DTrace user and kernel code to Linux.
34-
No linux kernel code is touched in this build, but what is produced
35-
is a dynamically loadable kernel module. This avoids licensing
36-
issues and allows people to load and update dtrace as they desire.
37-
38-
It also makes it more of a challenge than Solaris or FreeBSD or
39-
MacOSX, which have dtrace too, since we are trying to support old
40-
and new kernels, 32 and 64 bit kernels, and have to fit in with
41-
Linux's desire to change and evolve. So, if this works for you, great.
42-
If not, feel free to feedback what/why it doesnt work and we
43-
may be able to address the issues.
44-
45-
The goal of this project is to ensure dtrace is everywhere - so
46-
that we can all benefit from faster systems and software, better
47-
kernels and generally be a good citizen to the user and administrators
48-
systems.
49-
5048
Licensing
5149
=========
5250

5351
The majority (if not all) of this code falls under Sun's CDDL
54-
license. Some files or headers may originate with GPL code, e.g.
55-
ELF libraries from GLIBC or RedHat. The original files
56-
copyrights are left intact, so please honour those as appropriate.
57-
Any files without an attributed copyright are likely my own
58-
invention and can be placed under the GPLv3, but this is a mixed-mode
59-
project, and it is not *my* right to give Dtrace away under GPL.
52+
license. The original files copyrights are left intact, so
53+
please honour those as appropriate. Any files without an
54+
attributed copyright are likely my own invention and can be
55+
placed under the GPLv3, but this is a mixed-mode project, and
56+
it is not *my* right to give Dtrace away under GPL.
6057

61-
Any mistakes or omissions in copyright attribution will be my mistake,
62-
so please let me know if there are such cases.
58+
Any mistakes or omissions in copyright attribution will be my
59+
mistake, so please let me know if there are such cases.
6360

6461
The linux kernel was referred to in order to engineer the glue
6562
for dtrace behavior, and there is no intention of making this
66-
code fall under anything other than CDDL. (If Sun migrate
67-
to a GPL friendly license, then this port of dtrace can follow).
68-
I do not own the license or assert any rights on the licensing
63+
code fall under anything other than CDDL. (If Sun migrate to a
64+
GPL friendly license, then this port of dtrace can follow). I
65+
do not own the license or assert any rights on the licensing
6966
other than that expected of me as a consumer/supplier.
7067

71-
I have no political affiliation or preference for a licensing scheme,
72-
simply that Sun has gracefully donated to the community a large body
73-
of work.
68+
I have no political affiliation or preference for a licensing
69+
scheme, simply that Sun has gracefully donated to the community
70+
a large body of work.
7471

7572
My efforts are simply in glueing pieces together and as such,
76-
these pieces of work may be considered falling somewhere between
77-
GPL and CDDL. I reserve the right to change the licensing model
78-
for my own code at a later date, when and if someone puts forward
79-
a case as to the correct license agreement. I will not and can not
80-
ascribe code that does not belong to me.
73+
these pieces of work may be considered falling somewhere
74+
between GPL and CDDL. I reserve the right to change the
75+
licensing model for my own code at a later date, when and if
76+
someone puts forward a case as to the correct license
77+
agreement. I will not and can not ascribe code that does not
78+
belong to me.
8179

8280
If the code is useful to you - great. Spread it around and get
8381
people to use, debug and enhance it.
8482

8583
GIT Repository
8684
==============
8785

88-
https://github.com/pdmccormick/dtrace-for-linux
89-
90-
Thanks to Peter McCormick for setting this up.
91-
92-
NOTE: This is not the master archive for dtrace. Peter has
93-
kindly set this up and it may lag the master releases. See
94-
the links at the top of this document for the current homepage
95-
data.
86+
https://github.com/dtrace4linux/dtrace
9687

97-
As of March 2011, I dont believe the git repository is being
98-
synced, so do not rely on it, or check the dates.
88+
(Theres an older and orphaned github repository under
89+
Peter McCormicks name, please ignore this as it has not been
90+
updated in a long while and is no longer active).
9991

10092
Installation
10193
============

doc/usdt.html

Lines changed: 29 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -170,6 +170,35 @@ <h2>Annotating a program with custom probes</h2>
170170
probes with dtrace, the checksum will change, and as you Ctrl-C dtrace,
171171
the checksum will be restored.
172172

173+
<h2>Apple/Mac OS X</h2>
174+
<p>
175+
176+
Apple has done some enhancements to dtrace, which are interesting and
177+
simplify the mechanism for creating a USDT enabled application.
178+
With Apple's dtrace mechanism, only two commands are needed to generate
179+
a probable executable:
180+
181+
<pre>
182+
$ dtrace -h -s simple_probes.d
183+
$ gcc -I../../uts/common -o simple simple.c
184+
</pre>
185+
186+
The dtrace command generates the header file, containing the probe
187+
definitions, e.g.
188+
189+
<pre>
190+
define SIMPLE_SAW_LINE(arg0) \
191+
do { \
192+
__asm__ volatile(".reference " SIMPLE_TYPEDEFS); \
193+
__dtrace_probe$simple$saw__line$v1$696e74(arg0); \
194+
__asm__ volatile(".reference " SIMPLE_STABILITY); \
195+
} while (0)
196+
</pre>
197+
198+
The use of ".reference" is interesting, since this is doing the work
199+
of the traditional phase used to create an ELF object file with
200+
the probe table information.
201+
173202
<h2>Issues</h2>
174203
<p>
175204
DTrace relies on the DTRACE_PROBE macros to create the assembler

driver/intr.c

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -5,9 +5,9 @@
55
/* Date: December 2011 */
66
/* Author: Paul D. Fox */
77
/* */
8-
/* License: GPLv2 */
8+
/* License: CDDL */
99
/* */
10-
/* $Header: Last edited: 31-Jan-2012 1.14 $ */
10+
/* $Header: Last edited: 05-Feb-2012 1.15 $ */
1111
/**********************************************************************/
1212

1313
#include <linux/mm.h>

driver/printf.c

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -6,6 +6,8 @@
66
/* */
77
/* Author: Paul D. Fox */
88
/* Date: December 2011 */
9+
/* */
10+
/* License: CDDL */
911
/**********************************************************************/
1012

1113
#include <linux/mm.h>

liblinux/proc2.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -127,7 +127,7 @@ int lx_read_stat(struct ps_prochandle *P, pstatus_t *pst)
127127
close(fd);
128128
}
129129
//printf("lx_read_stat pid=%d: state='%s'\n", P->pid, state);
130-
if (*state == 'T')
130+
if (*state == 'T' || *state == 't')
131131
pst->pr_flags |= PR_STOPPED;
132132
P->status.pr_flags = pst->pr_flags;
133133

tools/mkrelease.pl

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -60,15 +60,13 @@ sub main
6060
# Handle multireleases in a day. #
6161
###############################################
6262
my $pkg = "dtrace";
63-
if (-f "ENV{HOME}/release/$pkg/$pkg-$rel.tar.bz2") {
63+
if (-f "$ENV{HOME}/release/$pkg/$pkg-$rel.tar.bz2") {
6464
foreach my $letter (qw/a b c d e f g h i j k l m n o p q r s t u v w x y z/) {
6565
if (! -f "$ENV{HOME}/$pkg/$pkg-$rel$letter.tar.bz2") {
6666
$rel .= $letter;
6767
last;
6868
}
6969
}
70-
print "hello\n";
71-
exit;
7270
}
7371
$fh = new FileHandle(".release");
7472
die "Cannot open .release file -- $!\n" if !$fh;

usdt/c/mkapple

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,3 @@
1+
# This is how it is done on Apple, due to compiler/linker enhancements.
2+
dtrace -h -s simple_probes.d
3+
gcc -I../../uts/common -o simple simple.c

0 commit comments

Comments
 (0)