diff options
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; |