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: next steps


Frank Ch. Eigler <fche@redhat.com> [050926]:
> Hi -
> 
> On Mon, Sep 26, 2005 at 10:11:01AM -0500, Jose R. Santos wrote:
> 
> > [...]  one of the requirements that the tool need is that for every
> > probe inserted, the cpu, pid, tid and a time-stamp (jiffies?) be
> > returned as well as some additional information that would be probe
> > specific.
> 
> function ln /* labeled number */ (name, value) {
>   print (name . "=" . string(value) . " ")
> }
> function trace_common_stuff () {
>   ln ("cpu", cpu()) # cpu() to go into context tapset
This would need to look something like this:

function cpu:long () %{
        if (unlikely(in_interrupt()))
                THIS->__retvalue = 0;
        else
                THIS->__retvalue = task_cpu(current);
%}

right?  Seems to be working on my 4-way system.

>   ln ("pid", pid()) 
>   ln ("jiffies", jiffies()))  # jiffies() to go into in timestamp tapset

Just notice the availability of gettimeofday_(us/ms/s) on the
timestamp tapset so I don't think jiffies are needed.  Either
way, it should be quick and painless to implement.

Thanks again.

-JRS


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