This is the mail archive of the
systemtap@sourceware.org
mailing list for the systemtap project.
Re: trace buffer tapset proposal
- From: fche at redhat dot com (Frank Ch. Eigler)
- To: William Cohen <wcohen at redhat dot com>
- Cc: SystemTAP <systemtap at sources dot redhat dot com>
- Date: Wed, 28 Jul 2010 20:35:15 -0400
- Subject: Re: trace buffer tapset proposal
- References: <4C4F4D7B.9080006@redhat.com>
William Cohen <wcohen@redhat.com> writes:
> [...] I spent some time implementing a "trace buffer" tapset. [...]
Perhaps this sort of thing would be better as a testsuite.example than
a tapset, at least until its utility is more clear. (Note that the
tutorial includes an exercise to construct something simlar to this.
Hm, I wonder if we should provide sample solutions to the exercises!)
By the way, in the example usage, this:
if (cmd_len >= 0) s = s . sprintf (" %02x", $cmd->cmnd[0]);
if (cmd_len >= 1) s = s . sprintf (" %02x", $cmd->cmnd[1]);
[...]
if (cmd_len >= 14) s = s . sprintf (" %02x", $cmd->cmnd[14]);
if (cmd_len >= 15) s = s . sprintf (" %02x", $cmd->cmnd[15]);
might be approximately abbreviated as:
s = sprintf("%*M", cmd_len, $cmd->cmnd)
- FChE