Skip to content

Commit f472de7

Browse files
committed
/home/fox/release/dtrace/2009/dtrace-20090206.tar.bz2
1 parent 25eee46 commit f472de7

69 files changed

Lines changed: 312 additions & 2854 deletions

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

.ignore

Lines changed: 4 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -1,20 +1,14 @@
11
./.git
2-
./build/config.sh
3-
./build/dtrace
4-
./build/simple-c
5-
./build/simple-cpp
6-
./checksum.lst
7-
./drivers/dtrace/checksum.lst
2+
./build*
3+
checksum.lst
4+
*.so
5+
*.o
86
./drivers/dtrace/syscalls-x86-64.tbl
97
./drivers/dtrace/syscalls-x86.tbl
108
./drivers/dtrace/Module.symvers
119
./drivers/dtrace/Module.markers
1210
./libdtrace/dt_grammar.h
1311
./libdtrace/dt_lex.c
14-
./usdt/c/shlib.so
15-
./usdt/c/simple.o
16-
./usdt/cpp/shlib.so
17-
./usdt/cpp/simple.o
1812
./utils/access
1913
./utils/mknod
2014
./utils/pread

Changes

Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,14 @@
1+
Fri Feb 6 11:09:54 2009 fox
2+
3+
136* Archive: 1.0057
4+
5+
135* drivers/include -> ./include due to new build structure.
6+
build/ is a symlink to build-`uname -r`.
7+
drivers/dtrace/* -> driver
8+
9+
134* makefiles: Allow us to label the build dir with the appropriate
10+
kernel version, so we can do multiple kernel builds.
11+
112
Thu Feb 5 10:35:22 2009 fox
213

314
133* Archive: 1.055

Differences

Lines changed: 0 additions & 22 deletions
This file was deleted.

README

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

3-
April 2008
3+
Feb 2009
44
Paul D. Fox
55
fox@crisp.demon.co.uk
66

@@ -17,7 +17,10 @@ so please let me know if there are such cases.
1717

1818
The linux kernel was referred to in order to engineer the glue
1919
for dtrace behavior, and there is no intention of making this
20-
code fall under anything other than CDDL.
20+
code fall under anything other than CDDL. (If Sun migrate
21+
to a GPL friendly license, then this port of dtrace can follow).
22+
I do not own the license or assert any rights on the licensing
23+
other than that expected of me as a consumer/supplier.
2124

2225
I have no political affiliation or preference for a licensing scheme,
2326
simply that Sun has gracefully donated to the community a large body
@@ -34,6 +37,56 @@ If the code is useful to you - great. Spread it around and get
3437
people to use, debug and enhance it.
3538

3639

40+
Installation
41+
============
42+
43+
Very simple:
44+
45+
$ make all
46+
$ make install
47+
$ make load (need to be root or have sudo access)
48+
49+
More details
50+
============
51+
52+
Building is done in a build/ directory. The makefiles allow
53+
you to compile for alternate kernel releases in the same tree,
54+
which is useful for cross-version checking.
55+
56+
The result is:
57+
58+
build/dtrace User land executable
59+
build/drti.o Object file for USDT apps
60+
build/driver/dtracedrv.ko Kernel loadable module
61+
62+
Installing will copy them to Solaris compliant locations:
63+
64+
/usr/sbin/dtrace
65+
/usr/lib/dtrace/64/drti.o
66+
67+
68+
You dont need to 'install' to run dtrace, but you will need
69+
to load the driver.
70+
71+
Kernel versioning
72+
=================
73+
dtrace relies on a kernel module and so a binary is needed
74+
per system you deploy to, or kernel version.
75+
76+
dtrace is sensitive to the kernel - and attempts to cater for that,
77+
but very old, or very new kernels may not have been validated.
78+
Please feed back if that is the case.
79+
80+
No Linux Kernel source modifications required
81+
=============================================
82+
83+
This is important for a number of reasons -- unless dtrace
84+
is accepted into the kernel, it has to live with changes to header
85+
files and data structures. Also, from a licensing perspective it
86+
is not valid for dtrace to touch your sources. It is also much
87+
easier to not even require kernel sources - so long as
88+
a kernel build environment is available.
89+
3790
Miscellaneous
3891
=============
3992

@@ -95,6 +148,9 @@ make all
95148
Packages, for hints on what you need (not much, but libelf, kernel
96149
source, flex/yacc -- bison will do).
97150

151+
make install
152+
Copy dtrace binary and driver to correct install location.
153+
98154
make load
99155
To load the drivers, and then you can play with cmd/dtrace/dtrace.
100156

@@ -104,28 +160,3 @@ make unl
104160
make test
105161
To run the userland cmd/dtrace regression test
106162

107-
DRIVERS
108-
=======
109-
110-
You dont really need to worry about the drivers (its all encapsulated into
111-
a single driver file -- dtracedrv.ko, assuming all goes well). You
112-
may find these pop into /dev on 'make load'.
113-
114-
/dev/dtrace
115-
116-
The main component of the implementation.
117-
118-
/dev/fbt
119-
A 'provider' which provides a mechanism for accessing a collection
120-
of features via dtrace. This is the function-boundary-tracing module,
121-
and it the bit of magic which can plant breakpoints on any
122-
kernel function.
123-
124-
/dev/dtrace_profile
125-
Used by the profile-NNN and tick-NNN probe provider.
126-
127-
/dev/sdt
128-
Static dtrace probe driver.
129-
130-
/dev/systrace
131-
System call tracing driver.

archive.sh

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
NAME=dtrace
22
MAJ_VERSION=1
3-
MIN_VERSION=0055
3+
MIN_VERSION=0057
44
EXCLUDE="*.ko *.o"
55
EXCLUDE_DIRS="build"
6-
#date Thu Feb 5 11:08:08 GMT 2009
6+
#date Fri Feb 6 16:27:38 GMT 2009

cmd/dtrace/makefile

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,17 +1,18 @@
11
CFLAGS=-g -W $(PTR32)
22
LIBELF=/usr/lib/libelf.so.1
3-
BINDIR=../../build
3+
BINDIR=../../$(BUILD_DIR)
44
LIBS = \
55
$(BINDIR)/libctf.a \
66
$(BINDIR)/libdtrace.a \
77
$(BINDIR)/libproc.a \
88
$(BINDIR)/liblinux.a
99

1010
COMPILE = $(CC) $(CFLAGS) -o $(BINDIR)/dtrace \
11-
-L../../build \
11+
-L$(BINDIR) \
1212
$(BINDIR)/dtrace.o -ldtrace -lctf -lproc -llinux -lz -lrt -lpthread $$libelf -ldl
1313

1414
all: $(BINDIR)/dtrace
15+
@/bin/true
1516

1617
$(BINDIR)/dtrace: $(BINDIR)/dtrace.o $(LIBS)
1718
@libelf=$(LIBELF) ; \
File renamed without changes.
Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -39,7 +39,7 @@ ifdef BUILD_i386
3939
LDFLAGS += --wrap __udivdi3
4040
LDFLAGS += --wrap __umoddi3
4141
LDFLAGS += --wrap __divdi3
42-
dtracedrv-objs += ../../build/x86-32/libgcc.a
42+
dtracedrv-objs += ../libgcc.a
4343
endif
4444

4545
obj-m := dtracedrv.o
@@ -48,13 +48,13 @@ H = dtrace_linux.h dtrace_proto.h
4848
EXTRA_CFLAGS += \
4949
-I$(M) \
5050
-I$(M)/../.. \
51-
-I$(M)/../include \
51+
-I$(M)/../../include \
5252
-I$(M)/../../linux \
5353
-I$(M)/../../common/ctf \
5454
-I$(M)/../../uts/common \
5555
-D_KERNEL -DCTF_OLD_VERSIONS $(PTR32)
5656
clean:
57-
rm -rf .tmp_versions *.a *.o *.ko *.bak .*.d .*.cmd *.mod.c Module.symvers
57+
rm -rf .tmp_versions *.a *.o *.ko *.bak .*.d .*.cmd *.mod.c Module.* modules.order
5858

5959
unl:
6060
setuid root rmmod dtracedrv

driver/README

Lines changed: 14 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,14 @@
1+
This directory contains the kernel code. We have a number
2+
of drivers here, corresponding to the Solaris dtrace /dev
3+
area. Major files are Solaris source code, with appropriate (small)
4+
changes for working under Linux.
5+
6+
Other files, are linux drop-ins to complete the circle of
7+
bits needed to create a solaris driver.
8+
9+
We no longer build in the source tree, since Linux kernel builder
10+
deposits lots of build output files here, but we build in the
11+
build-`uname -r`/ tree instead, so that output files are
12+
segregated from the input sources.
13+
14+
P Fox Feb 2009

0 commit comments

Comments
 (0)