public inbox for systemtap@sourceware.org
 help / color / mirror / Atom feed
* _stp_pid no longer there?
@ 2007-03-28 10:11 Sébastien Dugué
  2007-03-28 10:26 ` Andreas Kostyrka
                   ` (2 more replies)
  0 siblings, 3 replies; 10+ messages in thread
From: Sébastien Dugué @ 2007-03-28 10:11 UTC (permalink / raw)
  To: systemtap; +Cc: Pierre PEIFFER


  Hi all,

  I just discovered that the _stp_pid module parameter has just vanished
from runtime/transport/transport.c.

  What is supposed to replace it or how one is supposed to retreive staprun's
pid from within a script as it is used by tapsets?

  Thanks,

  Sébastien.

  

^ permalink raw reply	[flat|nested] 10+ messages in thread

* Re: _stp_pid no longer there?
  2007-03-28 10:11 _stp_pid no longer there? Sébastien Dugué
@ 2007-03-28 10:26 ` Andreas Kostyrka
  2007-03-28 10:51   ` Sébastien Dugué
  2007-03-28 14:20 ` Frank Ch. Eigler
  2007-03-28 14:48 ` Martin Hunt
  2 siblings, 1 reply; 10+ messages in thread
From: Andreas Kostyrka @ 2007-03-28 10:26 UTC (permalink / raw)
  To: Sébastien Dugué; +Cc: systemtap, Pierre PEIFFER

* Sébastien Dugué <sebastien.dugue@bull.net> [070328 12:27]:
> 
>   Hi all,
> 
>   I just discovered that the _stp_pid module parameter has just vanished
> from runtime/transport/transport.c.
> 
>   What is supposed to replace it or how one is supposed to retreive staprun's
> pid from within a script as it is used by tapsets?
pid() ?

Andreas

^ permalink raw reply	[flat|nested] 10+ messages in thread

* Re: _stp_pid no longer there?
  2007-03-28 10:26 ` Andreas Kostyrka
@ 2007-03-28 10:51   ` Sébastien Dugué
  0 siblings, 0 replies; 10+ messages in thread
From: Sébastien Dugué @ 2007-03-28 10:51 UTC (permalink / raw)
  To: Andreas Kostyrka; +Cc: systemtap, Pierre PEIFFER

On Wed, 28 Mar 2007 12:27:46 +0200 Andreas Kostyrka <andreas@kostyrka.org> wrote:

> * Sébastien Dugué <sebastien.dugue@bull.net> [070328 12:27]:
> > 
> >   Hi all,
> > 
> >   I just discovered that the _stp_pid module parameter has just vanished
> > from runtime/transport/transport.c.
> > 
> >   What is supposed to replace it or how one is supposed to retreive staprun's
> > pid from within a script as it is used by tapsets?
> pid() ?
> 

  I don't think so, unless I'm missing something, as far as I can tell pid()
returns current->tgid.

  Sébastien.

^ permalink raw reply	[flat|nested] 10+ messages in thread

* Re: _stp_pid no longer there?
  2007-03-28 10:11 _stp_pid no longer there? Sébastien Dugué
  2007-03-28 10:26 ` Andreas Kostyrka
@ 2007-03-28 14:20 ` Frank Ch. Eigler
  2007-03-28 15:34   ` Sébastien Dugué
  2007-03-28 14:48 ` Martin Hunt
  2 siblings, 1 reply; 10+ messages in thread
From: Frank Ch. Eigler @ 2007-03-28 14:20 UTC (permalink / raw)
  To: Sébastien Dugué; +Cc: systemtap, Pierre PEIFFER

SÚbastien DuguÚ <sebastien.dugue@bull.net> writes:

> I just discovered that the _stp_pid module parameter has just
> vanished from runtime/transport/transport.c.

Yes, it seems to have gone away with the recent rewrite of the area.
This might have been because

> What is supposed to replace it or how one is supposed to retreive
> staprun's pid from within a script as it is used by tapsets?

Using variables defined by runtime C code directly is not appropriate.
Such code is considered to be a private interface between the
translator, the provided tapsets, and the runtime, and thus may change
frequently.

However, I agree that it is sometimes desirable to filter out events
caused caused by staprun's activities, so a properly documented and
tapset-exported version of that pid number should come back.

- FChE

^ permalink raw reply	[flat|nested] 10+ messages in thread

* Re: _stp_pid no longer there?
  2007-03-28 10:11 _stp_pid no longer there? Sébastien Dugué
  2007-03-28 10:26 ` Andreas Kostyrka
  2007-03-28 14:20 ` Frank Ch. Eigler
@ 2007-03-28 14:48 ` Martin Hunt
  2007-03-28 15:40   ` Sébastien Dugué
  2 siblings, 1 reply; 10+ messages in thread
From: Martin Hunt @ 2007-03-28 14:48 UTC (permalink / raw)
  To: Sébastien Dugué; +Cc: systemtap, Pierre PEIFFER

On Wed, 2007-03-28 at 12:08 +0200, Sébastien Dugué wrote:
>   Hi all,
> 
>   I just discovered that the _stp_pid module parameter has just vanished
> from runtime/transport/transport.c.

Sorry, my fault.  I removed the old code and did not check in a
replacement yet.  I'll get it in later today once I've tested on a few
older kernels.  Probably should get something in the testsuite too.

>   What is supposed to replace it or how one is supposed to retreive staprun's
> pid from within a script as it is used by tapsets?

The stp_pid() function in context.stp  should work like it used to.

Martin


^ permalink raw reply	[flat|nested] 10+ messages in thread

* Re: _stp_pid no longer there?
  2007-03-28 14:20 ` Frank Ch. Eigler
@ 2007-03-28 15:34   ` Sébastien Dugué
  2007-03-28 17:23     ` Frank Ch. Eigler
  0 siblings, 1 reply; 10+ messages in thread
From: Sébastien Dugué @ 2007-03-28 15:34 UTC (permalink / raw)
  To: Frank Ch. Eigler; +Cc: systemtap, Pierre PEIFFER

On 28 Mar 2007 10:20:35 -0400 fche@redhat.com (Frank Ch. Eigler) wrote:

> SÚbastien DuguÚ <sebastien.dugue@bull.net> writes:
> 
> > I just discovered that the _stp_pid module parameter has just
> > vanished from runtime/transport/transport.c.
> 
> Yes, it seems to have gone away with the recent rewrite of the area.
> This might have been because
> 
> > What is supposed to replace it or how one is supposed to retreive
> > staprun's pid from within a script as it is used by tapsets?
> 
> Using variables defined by runtime C code directly is not appropriate.
> Such code is considered to be a private interface between the
> translator, the provided tapsets, and the runtime, and thus may change
> frequently.

  I do not use this variable directly, it's simply that some of the tapsets
use it, namely tapset/context.stp, tapset/LKET/utils.stp and
tapset/LKET/tskdispatch.stp.

> 
> However, I agree that it is sometimes desirable to filter out events
> caused caused by staprun's activities, so a properly documented and
> tapset-exported version of that pid number should come back.

  Yep. I tripped it just running the testsuite.

  Thanks,

  Sébastien.

^ permalink raw reply	[flat|nested] 10+ messages in thread

* Re: _stp_pid no longer there?
  2007-03-28 14:48 ` Martin Hunt
@ 2007-03-28 15:40   ` Sébastien Dugué
  2007-03-28 16:13     ` Martin Hunt
  0 siblings, 1 reply; 10+ messages in thread
From: Sébastien Dugué @ 2007-03-28 15:40 UTC (permalink / raw)
  To: Martin Hunt; +Cc: systemtap, Pierre PEIFFER

On Wed, 28 Mar 2007 10:48:36 -0400 Martin Hunt <hunt@redhat.com> wrote:

> On Wed, 2007-03-28 at 12:08 +0200, Sébastien Dugué wrote:
> >   Hi all,
> > 
> >   I just discovered that the _stp_pid module parameter has just vanished
> > from runtime/transport/transport.c.
> 
> Sorry, my fault.  I removed the old code and did not check in a
> replacement yet.  I'll get it in later today once I've tested on a few
> older kernels.  Probably should get something in the testsuite too.

  No problem.

> 
> >   What is supposed to replace it or how one is supposed to retreive staprun's
> > pid from within a script as it is used by tapsets?
> 
> The stp_pid() function in context.stp  should work like it used to.
> 

  How could it? it just references __stp_pid.

  just try a:

    stap -vv -p4 -e 'probe begin {printf("staprun pid %d\n", stp_pid())}'


  Thanks,

  Sébastien.

^ permalink raw reply	[flat|nested] 10+ messages in thread

* Re: _stp_pid no longer there?
  2007-03-28 15:40   ` Sébastien Dugué
@ 2007-03-28 16:13     ` Martin Hunt
  2007-03-29  6:50       ` Sébastien Dugué
  0 siblings, 1 reply; 10+ messages in thread
From: Martin Hunt @ 2007-03-28 16:13 UTC (permalink / raw)
  To: Sébastien Dugué; +Cc: systemtap, Pierre PEIFFER

On Wed, 2007-03-28 at 17:37 +0200, Sébastien Dugué wrote:
> On Wed, 28 Mar 2007 10:48:36 -0400 Martin Hunt <hunt@redhat.com> wrote:

> > The stp_pid() function in context.stp  should work like it used to.
> > 
> 
>   How could it? it just references __stp_pid.
> 
>   just try a:
> 
>     stap -vv -p4 -e 'probe begin {printf("staprun pid %d\n", stp_pid())}'

I meant it would work like normal once I fixed it.

I've checked in the fix for newer kernels with debugfs. For older
kernels I will get the patch in later once I have had a chance to test
it.

Martin


^ permalink raw reply	[flat|nested] 10+ messages in thread

* Re: _stp_pid no longer there?
  2007-03-28 15:34   ` Sébastien Dugué
@ 2007-03-28 17:23     ` Frank Ch. Eigler
  0 siblings, 0 replies; 10+ messages in thread
From: Frank Ch. Eigler @ 2007-03-28 17:23 UTC (permalink / raw)
  To: Sébastien Dugué; +Cc: systemtap, Pierre PEIFFER

Hi -

On Wed, Mar 28, 2007 at 05:31:30PM +0200, Sébastien Dugué wrote:
> [...]
> I do not use this variable directly, it's simply that some of the tapsets
> use it, namely tapset/context.stp, tapset/LKET/utils.stp and
> tapset/LKET/tskdispatch.stp.

Very good point.
 
>   Yep. I tripped it just running the testsuite.

That's reassuring, but really, we systemtap developers have been too
sloppy with adding code (functions, probes) to the tapset without (a)
documentation, and (b) test suite entries, all contrary to the
guidelines of src/HACKING.  Let's try harder to follow them.

- FChE

^ permalink raw reply	[flat|nested] 10+ messages in thread

* Re: _stp_pid no longer there?
  2007-03-28 16:13     ` Martin Hunt
@ 2007-03-29  6:50       ` Sébastien Dugué
  0 siblings, 0 replies; 10+ messages in thread
From: Sébastien Dugué @ 2007-03-29  6:50 UTC (permalink / raw)
  To: Martin Hunt; +Cc: systemtap, Pierre PEIFFER

On Wed, 28 Mar 2007 12:13:26 -0400 Martin Hunt <hunt@redhat.com> wrote:

> On Wed, 2007-03-28 at 17:37 +0200, Sébastien Dugué wrote:
> > On Wed, 28 Mar 2007 10:48:36 -0400 Martin Hunt <hunt@redhat.com> wrote:
> 
> > > The stp_pid() function in context.stp  should work like it used to.
> > > 
> > 
> >   How could it? it just references __stp_pid.
> > 
> >   just try a:
> > 
> >     stap -vv -p4 -e 'probe begin {printf("staprun pid %d\n", stp_pid())}'
> 
> I meant it would work like normal once I fixed it.

  Ok, sorry, just misunderstood you.

> 
> I've checked in the fix for newer kernels with debugfs. For older
> kernels I will get the patch in later once I have had a chance to test
> it.

  Thanks.

  Sébastien.

^ permalink raw reply	[flat|nested] 10+ messages in thread

end of thread, other threads:[~2007-03-29  6:50 UTC | newest]

Thread overview: 10+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2007-03-28 10:11 _stp_pid no longer there? Sébastien Dugué
2007-03-28 10:26 ` Andreas Kostyrka
2007-03-28 10:51   ` Sébastien Dugué
2007-03-28 14:20 ` Frank Ch. Eigler
2007-03-28 15:34   ` Sébastien Dugué
2007-03-28 17:23     ` Frank Ch. Eigler
2007-03-28 14:48 ` Martin Hunt
2007-03-28 15:40   ` Sébastien Dugué
2007-03-28 16:13     ` Martin Hunt
2007-03-29  6:50       ` Sébastien Dugué

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).