summaryrefslogtreecommitdiff
path: root/HOWTO
diff options
context:
space:
mode:
authorLukas Larsson <lukas@erlang-solutions.com>2012-07-19 15:47:46 +0200
committerLukas Larsson <lukas@erlang-solutions.com>2012-07-19 15:47:46 +0200
commit82470e1c820e367007338b8e188d7d985aabe77b (patch)
tree884c0a0028021a0c5dd5c9243509b95f35a03da7 /HOWTO
parent0948779bd59c07653b157789c2edfd67892d3958 (diff)
parent88c8bfd614477085bfc9f878d3812a47d16f25d4 (diff)
downloaderlang-82470e1c820e367007338b8e188d7d985aabe77b.tar.gz
Merge branch 'lukas/runtime_tools/dtrace_userguide/OTP-10155'
* lukas/runtime_tools/dtrace_userguide/OTP-10155: Add DTRACE and SYSTEMTAP howtos as User Guide
Diffstat (limited to 'HOWTO')
-rw-r--r--HOWTO/DTRACE.md26
-rw-r--r--HOWTO/SYSTEMTAP.md28
2 files changed, 26 insertions, 28 deletions
diff --git a/HOWTO/DTRACE.md b/HOWTO/DTRACE.md
index 1d495b0eaf..b719c68c59 100644
--- a/HOWTO/DTRACE.md
+++ b/HOWTO/DTRACE.md
@@ -16,13 +16,13 @@ e.g. `foo_module:dtrace_probe("message goes here!")`.
Goals
-----
-1. Annotate as much of the Erlang VM as is practical.
+* Annotate as much of the Erlang VM as is practical.
* The initial goal is to trace file I/O operations.
-2. Support all platforms that implement DTrace: OS X, Solaris,
- and (I hope) FreeBSD and NetBSD.
-3. To the extent that it's practical, support SystemTap on Linux
- via DTrace provider compatibility.
-4. Allow Erlang code to supply annotations.
+* Support all platforms that implement DTrace: OS X, Solaris,
+ and (I hope) FreeBSD and NetBSD.
+* To the extent that it's practical, support SystemTap on Linux
+ via DTrace provider compatibility.
+* Allow Erlang code to supply annotations.
Supported platforms
-------------------
@@ -43,10 +43,10 @@ is `--with-dynamic-trace=systemtap`
Status
------
-As of R15B01, the dynamic trace code is included in the main OTP distribution,
+As of R15B01, the dynamic trace code is included in the OTP source distribution,
although it's considered experimental. The main development of the dtrace code
still happens outside of Ericsson, but there is no need to fetch a patched
-version of OTP to get the basic funtionality.
+version of the OTP source to get the basic funtionality.
Implementation summary
----------------------
@@ -66,9 +66,7 @@ following may be executed in a different Pthread:
* `efile_drv` command execution (C code)
* `efile_drv` status return (C code)
-**TODO: keep this description up-to-date.**
-
-Example output from `lib/dtrace/examples/efile_drv.d` while executing
+Example output from `lib/runtime_tools/examples/efile_drv.d` while executing
`file:rename("old-name", "new-name")`:
efile_drv enter tag={3,84} user tag some-user-tag | RENAME (12) | args: old-name new-name , 0 0 (port #Port<0.59>)
@@ -83,7 +81,7 @@ Example output from `lib/dtrace/examples/efile_drv.d` while executing
these two numbers form a unique ID for the I/O operation.
* `12` is the command number for the rename operation. See the
definition for `FILE_RENAME` in the source code file `efile_drv.c`
- or the `BEGIN` section of the D script `lib/dtrace/examples/efile_drv.d`.
+ or the `BEGIN` section of the D script `lib/runtime_tools/examples/efile_drv.d`.
* `old-name` and `new-name` are the two string arguments for the
source and destination of the `rename(2)` system call.
The two integer arguments are unused; the simple formatting code
@@ -101,8 +99,8 @@ So, where does the `some-user-tag` string come from?
At the moment, the user tag comes from code like the following:
- put(dtrace_utag, "some-user-tag"),
- file:rename("old-name", "new-name").
+ dyntrace:put_tag("some-user-tag"),
+ file:rename("old-name", "new-name"),
This method of tagging I/O at the Erlang level is subject to change.
diff --git a/HOWTO/SYSTEMTAP.md b/HOWTO/SYSTEMTAP.md
index 094b61f1c0..ce9c0b2f0c 100644
--- a/HOWTO/SYSTEMTAP.md
+++ b/HOWTO/SYSTEMTAP.md
@@ -11,24 +11,24 @@ introduction to Erlang DTrace support read [$ERL_TOP/HOWTO/DTRACE.md][].
Requisites
----------
-* Linux Kernel with UTRACE support
-
- check for UTRACE support in your current kernel:
+* Linux Kernel with UTRACE support
+
+ check for UTRACE support in your current kernel:
# grep CONFIG_UTRACE /boot/config-`uname -r`
CONFIG_UTRACE=y
- Fedora 16 is known to contain UTRACE, for most other Linux distributions
- a custom build kernel will be required.
- Check Fedora's SystemTap documentation for additional required packages
- (e.g. Kernel Debug Symbols)
-
-* SystemTap > 1.6
-
- A the time of writing this, the latest released version of SystemTap is
- version 1.6. Erlang's DTrace support requires a MACRO that was introduced
- after that release. So either get a newer release or build SystemTap from
- git yourself (see: http://sourceware.org/systemtap/getinvolved.html)
+ Fedora 16 is known to contain UTRACE, for most other Linux distributions
+ a custom build kernel will be required.
+ Check Fedora's SystemTap documentation for additional required packages
+ (e.g. Kernel Debug Symbols)
+
+* SystemTap > 1.6
+
+ A the time of writing this, the latest released version of SystemTap is
+ version 1.6. Erlang's DTrace support requires a MACRO that was introduced
+ after that release. So either get a newer release or build SystemTap from
+ git yourself (see: http://sourceware.org/systemtap/getinvolved.html)
Building Erlang
---------------