This is the mail archive of the
systemtap@sourceware.org
mailing list for the systemtap project.
Re: [PATCH] Add the stopwatch.stp tapset
- From: fche at redhat dot com (Frank Ch. Eigler)
- To: William Cohen <wcohen at redhat dot com>
- Cc: systemtap at sourceware dot org
- Date: Thu, 26 Jan 2012 19:58:24 -0500
- Subject: Re: [PATCH] Add the stopwatch.stp tapset
- References: <1327610194-13346-1-git-send-email-wcohen@redhat.com>
William Cohen <wcohen@redhat.com> writes:
> The stopwatch.stp tapset provides multiple, independent timers to user
> scripts. Stopwatches can be created by the user script at
> anytime. [...]
Might you consider a somewhat simpler API?
function start_stopwatch (name:string) { }
function stop_stopwatch (name:string) { }
function read_stopwatch_ns:long (name:string) { }
function read_stopwatch_us:long (name:string) { }
function read_stopwatch_ms:long (name:string) { }
function read_stopwatch_s:long (name:string) { }
i.e., no explicit create (the tapset can create it on first encounter
of a new name), no enums (encode start/stop as distinct functions),
and explicit reader functions.
- FChE