summaryrefslogtreecommitdiff
path: root/Notes/ALLoncpu_notes.txt
diff options
context:
space:
mode:
authorGeorge V. Neville-Neil <gnn@FreeBSD.org>2012-05-12 20:38:18 +0000
committerGeorge V. Neville-Neil <gnn@FreeBSD.org>2012-05-12 20:38:18 +0000
commit055173dba4a263acf10325a49eebf82915369ed2 (patch)
treeaec2772e8855e6dbaea6d8136ed0c47bcb825dee /Notes/ALLoncpu_notes.txt
parent87c8f7aa3a46118212b99f0d58b18aa93c06b02a (diff)
Notes
Diffstat (limited to 'Notes/ALLoncpu_notes.txt')
-rw-r--r--Notes/ALLoncpu_notes.txt42
1 files changed, 42 insertions, 0 deletions
diff --git a/Notes/ALLoncpu_notes.txt b/Notes/ALLoncpu_notes.txt
new file mode 100644
index 000000000000..41aead027bc9
--- /dev/null
+++ b/Notes/ALLoncpu_notes.txt
@@ -0,0 +1,42 @@
+**************************************************************************
+* The following are notes for all scripts that measure on-CPU times.
+*
+* $Id: ALLoncpu_notes.txt 58 2007-10-01 13:36:29Z brendan $
+*
+* COPYRIGHT: Copyright (c) 2007 Brendan Gregg.
+**************************************************************************
+
+
+* What is "on-CPU" time?
+
+This is the time that a thread spent running on a CPU. It does not include
+time spent off-CPU time such as sleeping for I/O or waiting for scheduling.
+
+On-CPU times are useful for showing who is causing the CPUs to be busy,
+since they measure how much CPU time has been consumed by that thread.
+
+On-CPU times are also less susceptible to system "noise" than elapsed times,
+since much of the noise will be filtered out. DTrace itself also tries
+to subtract the small overheads of DTrace from the on-CPU time, to improve
+the accuracy of this time.
+
+See Notes/ALLelapsed_notes.txt for a description of a different time
+measurement, "elapsed" time.
+
+
+* How is "on-CPU" time measured?
+
+In DTrace, the following template provides on-CPU time as "this->oncpu",
+
+ <start-probe>
+ {
+ self->vstart = vtimestamp;
+ }
+
+ <end-probe>
+ {
+ this->oncpu = vtimestamp - self->vstart;
+ self->vstart = 0;
+ ...
+ }
+