<s>
DTrace	B-Application
is	O
a	O
comprehensive	O
dynamic	O
tracing	O
framework	O
originally	O
created	O
by	O
Sun	O
Microsystems	O
for	O
troubleshooting	O
kernel	B-Operating_System
and	O
application	O
problems	O
on	O
production	O
systems	O
in	O
real	O
time	O
.	O
</s>
<s>
Originally	O
developed	O
for	O
Solaris	B-Application
,	O
it	O
has	O
since	O
been	O
released	O
under	O
the	O
free	O
Common	B-Application
Development	I-Application
and	I-Application
Distribution	I-Application
License	I-Application
(	O
CDDL	B-Application
)	O
in	O
OpenSolaris	B-Operating_System
and	O
its	O
descendant	O
illumos	B-Application
,	O
and	O
has	O
been	O
ported	O
to	O
several	O
other	O
Unix-like	B-Operating_System
systems	I-Operating_System
.	O
</s>
<s>
DTrace	B-Application
can	O
be	O
used	O
to	O
get	O
a	O
global	O
overview	O
of	O
a	O
running	O
system	O
,	O
such	O
as	O
the	O
amount	O
of	O
memory	O
,	O
CPU	O
time	O
,	O
filesystem	O
and	O
network	O
resources	O
used	O
by	O
the	O
active	O
processes	O
.	O
</s>
<s>
In	O
2010	O
,	O
Oracle	B-Application
Corporation	I-Application
acquired	O
Sun	O
Microsystems	O
and	O
announced	O
discontinuing	O
OpenSolaris	B-Operating_System
.	O
</s>
<s>
As	O
a	O
community	O
effort	O
of	O
some	O
core	O
Solaris	B-Application
engineers	O
to	O
create	O
a	O
truly	O
open	O
source	O
Solaris	B-Application
,	O
illumos	B-Application
operating	B-General_Concept
system	I-General_Concept
was	O
announced	O
via	O
webinar	B-Protocol
on	O
Thursday	O
,	O
3	O
August	O
2010	O
,	O
as	O
a	O
fork	O
on	O
OpenSolaris	B-Operating_System
OS/Net	B-Operating_System
consolidation	O
,	O
including	O
DTrace	B-Application
technology	O
.	O
</s>
<s>
In	O
October	O
2011	O
,	O
Oracle	B-General_Concept
announced	O
the	O
porting	O
of	O
DTrace	B-Application
to	O
Linux	B-Application
,	O
and	O
in	O
2019	O
official	O
DTrace	B-Application
for	O
Fedora	O
is	O
available	O
on	O
GitHub	B-Application
.	O
</s>
<s>
For	O
several	O
years	O
an	O
unofficial	O
DTrace	B-Application
port	O
to	O
Linux	B-Application
was	O
available	O
,	O
with	O
no	O
changes	O
in	O
licensing	O
terms	O
.	O
</s>
<s>
In	O
August	O
2017	O
,	O
Oracle	B-General_Concept
released	O
DTrace	B-Application
kernel	B-Operating_System
code	O
under	O
the	O
GPLv2+	O
license	O
,	O
and	O
user	B-Operating_System
space	I-Operating_System
code	O
under	O
GPLv2	O
and	O
UPL	O
licensing	O
.	O
</s>
<s>
In	O
September	O
2018	O
Microsoft	O
announced	O
that	O
they	O
had	O
ported	O
DTrace	B-Application
from	O
FreeBSD	B-Operating_System
to	O
Windows	B-Application
.	O
</s>
<s>
The	O
OpenDTrace	O
effort	O
maintains	O
the	O
original	O
CDDL	B-Application
licensing	O
for	O
the	O
code	O
from	O
OpenSolaris	B-Operating_System
with	O
additional	O
code	O
contributions	O
coming	O
under	O
a	O
BSD	O
2	O
Clause	O
license	O
.	O
</s>
<s>
The	O
goal	O
of	O
OpenDTrace	O
is	O
to	O
provide	O
an	O
OS	O
agnostic	O
,	O
portable	O
implementation	O
of	O
DTrace	B-Application
that	O
is	O
acceptable	O
to	O
all	O
consumers	O
,	O
including	O
macOS	B-Application
,	O
FreeBSD	B-Operating_System
,	O
OpenBSD	O
,	O
NetBSD	B-Device
,	O
and	O
Linux	B-Application
as	O
well	O
as	O
embedded	O
systems	O
.	O
</s>
<s>
Sun	O
Microsystems	O
designed	O
DTrace	B-Application
to	O
give	O
operational	O
insights	O
that	O
allow	O
users	O
to	O
tune	O
and	O
troubleshoot	O
applications	O
and	O
the	O
OS	O
itself	O
.	O
</s>
<s>
Testers	O
write	O
tracing	O
programs	O
(	O
also	O
referred	O
to	O
as	O
scripts	O
)	O
using	O
the	O
D	B-Application
programming	I-Application
language	I-Application
(	O
not	O
to	O
be	O
confused	O
with	O
other	O
programming	O
languages	O
named	O
"	O
D	O
"	O
)	O
.	O
</s>
<s>
The	O
language	O
,	O
inspired	O
by	O
C	B-Language
,	O
includes	O
added	O
functions	O
and	O
variables	O
specific	O
to	O
tracing	O
.	O
</s>
<s>
D	O
programs	O
resemble	O
awk	B-Application
programs	O
in	O
structure	O
;	O
they	O
consist	O
of	O
a	O
list	O
of	O
one	O
or	O
more	O
probes	O
(	O
instrumentation	O
points	O
)	O
,	O
and	O
each	O
probe	O
is	O
associated	O
with	O
an	O
action	O
.	O
</s>
<s>
These	O
probes	O
are	O
comparable	O
to	O
a	O
pointcut	B-Application
in	O
aspect-oriented	B-Architecture
programming	I-Architecture
.	O
</s>
<s>
A	O
probe	O
that	O
fires	O
may	O
analyze	O
the	O
run-time	O
situation	O
by	O
accessing	O
the	O
call	B-General_Concept
stack	I-General_Concept
and	O
context	O
variables	O
and	O
evaluating	O
expressions	O
;	O
it	O
can	O
then	O
print	O
out	O
or	O
log	O
some	O
information	O
,	O
record	O
it	O
in	O
a	O
database	O
,	O
or	O
modify	O
context	O
variables	O
.	O
</s>
<s>
Special	O
consideration	O
has	O
been	O
taken	O
to	O
make	O
DTrace	B-Application
safe	O
to	O
use	O
in	O
a	O
production	O
environment	O
.	O
</s>
<s>
For	O
example	O
,	O
there	O
is	O
minimal	O
probe	O
effect	O
when	O
tracing	O
is	O
underway	O
,	O
and	O
no	O
performance	O
impact	O
associated	O
with	O
any	O
disabled	O
probe	O
;	O
this	O
is	O
important	O
since	O
there	O
are	O
tens	O
of	O
thousands	O
of	O
DTrace	B-Application
probes	O
that	O
can	O
be	O
enabled	O
.	O
</s>
<s>
DTrace	B-Application
scripts	O
can	O
be	O
invoked	O
directly	O
from	O
the	O
command	O
line	O
,	O
providing	O
one	O
or	O
more	O
probes	O
and	O
actions	O
as	O
arguments	O
.	O
</s>
<s>
Over	O
200	O
examples	O
of	O
open	O
source	O
DTrace	B-Application
scripts	O
can	O
be	O
found	O
in	O
the	O
DTraceToolkit	O
,	O
created	O
by	O
Brendan	O
Gregg	O
(	O
author	O
of	O
the	O
DTrace	B-Application
book	O
)	O
,	O
which	O
also	O
provides	O
documentation	O
and	O
demonstrations	O
of	O
each	O
.	O
</s>
<s>
DTrace	B-Application
first	O
became	O
available	O
for	O
use	O
in	O
November	O
2003	O
,	O
and	O
was	O
formally	O
released	O
as	O
part	O
of	O
Sun	O
's	O
Solaris	B-Application
10	I-Application
in	O
January	O
2005	O
.	O
</s>
<s>
DTrace	B-Application
was	O
the	O
first	O
component	O
of	O
the	O
OpenSolaris	B-Operating_System
project	O
to	O
have	O
its	O
source	O
code	O
released	O
under	O
the	O
Common	B-Application
Development	I-Application
and	I-Application
Distribution	I-Application
License	I-Application
(	O
CDDL	B-Application
)	O
.	O
</s>
<s>
DTrace	B-Application
is	O
an	O
integral	O
part	O
of	O
illumos	B-Application
and	O
related	O
distributions	O
.	O
</s>
<s>
DTrace	B-Application
is	O
a	O
standard	O
part	O
of	O
FreeBSD	B-Operating_System
and	O
NetBSD	B-Device
.	O
</s>
<s>
Apple	O
added	O
DTrace	B-Application
support	O
in	O
Mac	B-Application
OS	I-Application
X	I-Application
10.5	I-Application
"	I-Application
Leopard	I-Application
"	I-Application
,	O
including	O
a	O
GUI	O
called	O
Instruments	B-Operating_System
.	O
</s>
<s>
Over	O
40	O
DTrace	B-Application
scripts	O
from	O
the	O
DTraceToolkit	O
are	O
included	O
in	O
/usr/bin	O
,	O
including	O
tools	O
to	O
examine	O
disk	O
I/O	O
(	O
iosnoop	O
)	O
and	O
process	O
execution	O
(	O
execsnoop	O
)	O
.	O
</s>
<s>
Unlike	O
other	O
platforms	O
that	O
DTrace	B-Application
is	O
supported	O
on	O
,	O
Mac	B-Application
OS	I-Application
X	O
has	O
a	O
flag	O
(	O
P_LNOATTACH	O
)	O
that	O
a	O
program	O
may	O
set	O
that	O
disallows	O
tracing	O
of	O
that	O
process	O
by	O
debugging	O
utilities	O
such	O
as	O
DTrace	B-Application
and	O
gdb	B-Language
.	O
</s>
<s>
In	O
the	O
original	O
Mac	B-Application
OS	I-Application
X	O
DTrace	B-Application
implementation	O
,	O
this	O
could	O
affect	O
tracing	O
of	O
other	O
system	O
information	O
,	O
as	O
unrelated	O
probes	O
that	O
should	O
fire	O
while	O
a	O
program	O
with	O
this	O
flag	O
set	O
was	O
running	O
would	O
fail	O
to	O
do	O
so	O
.	O
</s>
<s>
However	O
,	O
since	O
El	O
Capitan	O
,	O
System	B-Operating_System
Integrity	I-Operating_System
Protection	I-Operating_System
prevents	O
user	O
from	O
DTracing	O
protected	O
binary	O
by	O
default	O
.	O
</s>
<s>
The	O
Linux	B-Application
port	O
of	O
DTrace	B-Application
has	O
been	O
available	O
since	O
2008	O
;	O
work	O
continues	O
actively	O
to	O
enhance	O
and	O
fix	O
issues	O
.	O
</s>
<s>
Standard	O
core	O
providers	O
are	O
available	O
(	O
fbt	O
,	O
syscall	O
,	O
profile	O
)	O
,	O
plus	O
a	O
special	O
"	O
instr	O
"	O
provider	O
(	O
some	O
of	O
the	O
Solaris	B-Application
providers	O
are	O
not	O
yet	O
available	O
)	O
.	O
</s>
<s>
The	O
Linux	B-Application
DTrace	B-Application
implementation	O
is	O
a	O
loadable	B-Application
kernel	I-Application
module	I-Application
,	O
which	O
means	O
that	O
the	O
kernel	B-Operating_System
itself	O
requires	O
no	O
modification	O
,	O
and	O
thus	O
allows	O
DTrace	B-Application
to	O
avoid	O
CDDL	B-Application
vs.	O
GPL	O
licensing	O
conflicts	O
(	O
in	O
its	O
source	O
form	O
,	O
at	O
least	O
)	O
.	O
</s>
<s>
However	O
,	O
once	O
DTrace	B-Application
is	O
loaded	O
the	O
kernel	B-Operating_System
instance	O
will	O
be	O
marked	O
as	O
tainted	O
.	O
</s>
<s>
In	O
2007	O
,	O
a	O
developer	O
at	O
QNX	B-Operating_System
Software	I-Operating_System
Systems	I-Operating_System
announced	O
on	O
his	O
blog	O
that	O
he	O
and	O
a	O
colleague	O
were	O
working	O
on	O
incorporating	O
DTrace	B-Application
into	O
the	O
QNX	B-Operating_System
operating	B-General_Concept
system	I-General_Concept
.	O
</s>
<s>
Oracle	B-Application
Corporation	I-Application
added	O
beta	O
DTrace	B-Application
support	O
for	O
Oracle	B-General_Concept
Linux	B-Application
in	O
2011	O
,	O
as	O
a	O
technology	O
preview	O
in	O
the	O
Unbreakable	O
Enterprise	O
Kernel	B-Operating_System
release	O
2	O
,	O
which	O
is	O
under	O
GPLv2	O
(	O
the	O
DTrace	B-Application
Linux	B-Application
kernel	I-Application
module	I-Application
was	O
originally	O
released	O
under	O
CDDL	B-Application
)	O
.	O
</s>
<s>
On	O
March	O
11	O
,	O
2019	O
,	O
Microsoft	O
released	O
their	O
build	O
of	O
DTrace	B-Application
for	O
the	O
Windows	B-Application
10	O
insider	O
builds	O
.	O
</s>
<s>
With	O
a	O
supported	O
language	O
provider	O
,	O
DTrace	B-Application
can	O
retrieve	O
context	O
of	O
the	O
code	O
,	O
including	O
function	O
,	O
source	O
file	O
,	O
and	O
line	O
number	O
location	O
.	O
</s>
<s>
Supported	O
language	O
providers	O
include	O
assembly	B-Language
language	I-Language
,	O
C	B-Language
,	O
C++	B-Language
,	O
Java	B-Language
,	O
Erlang	B-Operating_System
,	O
JavaScript	B-Language
,	O
Perl	B-Language
,	O
PHP	B-Application
,	O
Python	B-Language
,	O
Ruby	B-Language
,	O
shell	B-Language
script	I-Language
,	O
and	O
Tcl	B-Operating_System
.	O
</s>
<s>
Application	O
providers	O
allow	O
DTrace	B-Application
to	O
follow	O
the	O
operation	O
of	O
applications	O
through	O
system	O
calls	O
and	O
into	O
the	O
kernel	B-Operating_System
.	O
</s>
<s>
Applications	O
that	O
offer	O
DTrace	B-Application
application	O
providers	O
include	O
MySQL	B-Application
,	O
PostgreSQL	B-Application
,	O
Oracle	B-General_Concept
Database	I-General_Concept
,	O
Oracle	B-Operating_System
Grid	I-Operating_System
Engine	I-Operating_System
,	O
and	O
Firefox	B-Application
.	O
</s>
<s>
DTrace	B-Application
was	O
designed	O
and	O
implemented	O
by	O
Bryan	O
Cantrill	O
,	O
Mike	O
Shapiro	O
,	O
and	O
Adam	O
Leventhal	O
.	O
</s>
<s>
The	O
authors	O
received	O
recognition	O
in	O
2005	O
for	O
the	O
innovations	O
in	O
DTrace	B-Application
from	O
InfoWorld	O
and	O
Technology	O
Review	O
.	O
</s>
<s>
DTrace	B-Application
won	O
the	O
top	O
prize	O
in	O
The	O
Wall	O
Street	O
Journals	O
2006	O
Technology	O
Innovation	O
Awards	O
competition	O
.	O
</s>
<s>
The	O
authors	O
were	O
recognized	O
by	O
USENIX	B-Operating_System
with	O
the	O
Software	O
Tools	O
User	O
Group	O
(	O
STUG	O
)	O
award	O
in	O
2008	O
.	O
</s>
