public inbox for systemtap@sourceware.org
 help / color / mirror / Atom feed
From: Martin Hunt <hunt@redhat.com>
To: weikong@redflag-linux.com
Cc: systemtap@sourceware.org
Subject: Re: DTrace for Linux
Date: Fri, 16 Dec 2005 07:55:00 -0000	[thread overview]
Message-ID: <1134711455.3949.15.camel@monkey2> (raw)
In-Reply-To: <200512161102.25820.weikong@redflag-linux.com>

On Fri, 2005-12-16 at 11:02 +0800, weikong@redflag-linux.com wrote:

> # BUG 1: The "log" function always throw "segment error", I do not
> konw why. So I "#" them, and add the title in the result

They work fine for me. 

> #        by myself.
> # BUG 2: I can not enter the switch_to function, So I use "schedule"
> instead, but it result may not very precision.

I'll look into this. I saw something about it earlier this week.

> # BUG 3: "delete the global variable", it does not work. Let me so
> sad. 

Can you explain what you are expecting and what it did?

To get the best results, you should probably filter your probes using
something like "if (target() == pid())" or "if (execname == "top"))"


>                 log( string( pid ) . "\t" . string( pid_count[ pid,
> cmd ] ) . "\t" . string( pid_time[ pid, cmd ] ) . "\t\t" . string
> ( pids[ pid, cmd ] ) . "\t\t" . string( pid_time[ pid, cmd ] - pids
> [ pid, cmd ] ) . "\t\t" . cmd )

It would be best to use printf() instead of log().


> probe timer.jiffies( 1000 ) 
> {
>         print_cmpcall( )
>         exit( )
> }

It you use a timer to print out a large amount of information, like you
do here, it will cause some inaccuracy in your data due to the data
structures being locked for a long time while they are printed.  If you
are only going to print once, it would be best to simply move the
print_cmpcall() to probe end.



      reply	other threads:[~2005-12-16  5:37 UTC|newest]

Thread overview: 8+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2005-12-14 21:49 Stone, Joshua I
2005-12-14 23:51 ` Martin Hunt
2005-12-15  1:55   ` Kevin Stafford
2005-12-16  1:05   ` Andi Kleen
     [not found]     ` <cd09bdd10512151753t2c5234e2p6e244c24460eea8b@mail.gmail.com>
2005-12-16  2:24       ` Fwd: " James Dickens
2005-12-16  3:02       ` Andi Kleen
2005-12-16  5:02   ` weikong
2005-12-16  7:55     ` Martin Hunt [this message]

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=1134711455.3949.15.camel@monkey2 \
    --to=hunt@redhat.com \
    --cc=systemtap@sourceware.org \
    --cc=weikong@redflag-linux.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).