This is the mail archive of the systemtap@sourceware.org mailing list for the systemtap project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

Re: [PATCH] tty: improving the ttyspy example


In general, the tapset and testcase look fine.  There are two questions
I have that I've asked about below.

But, I'm not sure these changes improves the ttyspy.stp example.  I've
never actually run it, but I believe your changes will display data that
the existing probes have already printed (and disrupt the output
formatting).

On 10/20/2009 01:08 PM, leitao@linux.vnet.ibm.com wrote:
> This patch just adds some probe examples to ttyspy.stp example.
> ---
>  testsuite/systemtap.examples/io/ttyspy.stp |   15 +++++++++++++++
>  1 files changed, 15 insertions(+), 0 deletions(-)
> 
> diff --git a/testsuite/systemtap.examples/io/ttyspy.stp b/testsuite/systemtap.examples/io/ttyspy.stp
> index 272d82e..1830509 100755
> --- a/testsuite/systemtap.examples/io/ttyspy.stp
> +++ b/testsuite/systemtap.examples/io/ttyspy.stp
> @@ -44,3 +44,18 @@ probe timer.s(3) {
>        }
>  }
>  
> +probe tty.receive_buf {
> +	printf("Buffer %s received by driver %s\n", cp, fp, name)
> +}

Shouldn't this be 'tty.receive', not 'tty.receive_buf'?

> +
> +probe tty.put_char {
> +	printf("Char %d sent by driver %s\n", cp, name)
> +}

I don't see a 'tty.put_char' probe in the tapset.  Was this supposed to
be something else?

> +probe tty.write {
> +	printf("buffer %s wrote on %s\n", buffer, file_name)
> +}
> +
> +probe tty.read {
> +	printf("buffer %s read from %s\n", buffer, file_name)
> +}


-- 
David Smith
dsmith@redhat.com
Red Hat
http://www.redhat.com
256.217.0141 (direct)
256.837.0057 (fax)


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]