diff options
author | fche <fche> | 2006-02-22 18:19:11 +0000 |
---|---|---|
committer | fche <fche> | 2006-02-22 18:19:11 +0000 |
commit | 602149dadba5e74e6de8b5a172a64b13dcce6f1d (patch) | |
tree | 8a1cd62702e6aa7e8366efd1fb64690074e0b224 /tapset/timestamp.stp | |
parent | 03d569d3e8ee6f405b8e8489eaaf325c774b822d (diff) | |
download | systemtap-steved-602149dadba5e74e6de8b5a172a64b13dcce6f1d.tar.gz systemtap-steved-602149dadba5e74e6de8b5a172a64b13dcce6f1d.tar.xz systemtap-steved-602149dadba5e74e6de8b5a172a64b13dcce6f1d.zip |
2006-02-22 Frank Ch. Eigler <fche@elastic.org>
* stapfuncs.5.in: Document get_cycles().
* testsuite/buildok/timestamp.stp: Build it and its friends.
2006-02-22 Frank Ch. Eigler <fche@elastic.org>
* timestamp.stp (get_cycles): New function.
Diffstat (limited to 'tapset/timestamp.stp')
-rw-r--r-- | tapset/timestamp.stp | 9 |
1 files changed, 8 insertions, 1 deletions
diff --git a/tapset/timestamp.stp b/tapset/timestamp.stp index 009e1112..ee9478cb 100644 --- a/tapset/timestamp.stp +++ b/tapset/timestamp.stp @@ -1,5 +1,5 @@ // timestamp tapset -// Copyright (C) 2005 Red Hat Inc. +// Copyright (C) 2005-2006 Red Hat Inc. // // This file is part of systemtap, and is free software. You can // redistribute it and/or modify it under the terms of the GNU General @@ -12,6 +12,13 @@ %} +// return processor cycle counter (if any) +function get_cycles:long () %{ + cycles_t c = get_cycles(); + THIS->__retvalue = (int64_t) c; +%} + + // return in microseconds since epoch function gettimeofday_us:long () %{ struct timeval tm; |