summaryrefslogtreecommitdiffstats
path: root/doc/tutorial/timer-jiffies.stp
diff options
context:
space:
mode:
authorFrank Ch. Eigler <fche@elastic.org>2008-02-27 21:32:43 -0500
committerFrank Ch. Eigler <fche@elastic.org>2008-02-27 21:32:43 -0500
commit23220a9c611cd088418d108b3fa6d35aad177175 (patch)
treee7e459d81a344d958ff7739215f24e17db3324f1 /doc/tutorial/timer-jiffies.stp
parented1f47c32969a60eb074dc246c79ccda456ebf58 (diff)
parent872a4b73dc80fd865d61f17911b84494e1f820d9 (diff)
downloadsystemtap-steved-23220a9c611cd088418d108b3fa6d35aad177175.tar.gz
systemtap-steved-23220a9c611cd088418d108b3fa6d35aad177175.tar.xz
systemtap-steved-23220a9c611cd088418d108b3fa6d35aad177175.zip
Merge branch 'master' of git://sources.redhat.com/git/systemtap
Diffstat (limited to 'doc/tutorial/timer-jiffies.stp')
-rw-r--r--doc/tutorial/timer-jiffies.stp10
1 files changed, 10 insertions, 0 deletions
diff --git a/doc/tutorial/timer-jiffies.stp b/doc/tutorial/timer-jiffies.stp
new file mode 100644
index 00000000..d5e92e4a
--- /dev/null
+++ b/doc/tutorial/timer-jiffies.stp
@@ -0,0 +1,10 @@
+global count_jiffies, count_ms
+probe timer.jiffies(100) { count_jiffies ++ }
+probe timer.ms(100) { count_ms ++ }
+probe timer.ms(12345)
+{
+ hz=(1000*count_jiffies) / count_ms
+ printf ("jiffies:ms ratio %d:%d => CONFIG_HZ=%d\n",
+ count_jiffies, count_ms, hz)
+ exit ()
+}