public inbox for systemtap@sourceware.org
 help / color / mirror / Atom feed
* Defintion of CONTEXT
@ 2012-08-03 16:28 Domenico Di Leo
  2012-08-03 16:50 ` Frank Ch. Eigler
  0 siblings, 1 reply; 4+ messages in thread
From: Domenico Di Leo @ 2012-08-03 16:28 UTC (permalink / raw)
  To: systemtap

Hello,
in several stp scripts, files .c and .h  appear the variable CONTEXT,
I would like to take at look at its definition,
I guess it is a struct, but where is it defined?
Thank you in  advance,
Domenico

-- 
Domenico Di Leo, PhD student, Università degli Studi di Napoli Federico II
Ph:     +39 081 676770
Fax:    +39 081 676574
Web: http://wpage.unina.it/domenico.dileo (WP)

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

* Re: Defintion of CONTEXT
  2012-08-03 16:28 Defintion of CONTEXT Domenico Di Leo
@ 2012-08-03 16:50 ` Frank Ch. Eigler
  2012-08-06  8:21   ` domenico.dileo
  0 siblings, 1 reply; 4+ messages in thread
From: Frank Ch. Eigler @ 2012-08-03 16:50 UTC (permalink / raw)
  To: Domenico Di Leo; +Cc: systemtap

Domenico Di Leo <domenico.dileo@unina.it> writes:

> in several stp scripts, files .c and .h  appear the variable CONTEXT,
> I would like to take at look at its definition,
> I guess it is a struct, but where is it defined?

CONTEXT is a pointer into a "struct context[]" array, which is a place
to store sizeable local variables for the currently running
probe/function.  Such locals are stored on the heap rather than on the
(scarce) kernel stack.

- FChE

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

* Re: Defintion of CONTEXT
  2012-08-03 16:50 ` Frank Ch. Eigler
@ 2012-08-06  8:21   ` domenico.dileo
  2012-08-06  9:26     ` Mark Wielaard
  0 siblings, 1 reply; 4+ messages in thread
From: domenico.dileo @ 2012-08-06  8:21 UTC (permalink / raw)
  To: Frank Ch. Eigler; +Cc: systemtap

ok, but I would like to find out about the several
information to which is possible to access with CONTEXT.
For instance, CONTEXT->regs allows you to get the
value stored in some registers (I guess),
There are other fields, such as CONTEXT->regflags, CONTEXT->pi
and so on. Where can I find a full description (or definition)
of CONTEXT? What can I access to with CONTEXT?.
Thank you in advance.



Quoting "Frank Ch. Eigler" <fche@redhat.com>:

> Domenico Di Leo <domenico.dileo@unina.it> writes:
>
>> in several stp scripts, files .c and .h  appear the variable CONTEXT,
>> I would like to take at look at its definition,
>> I guess it is a struct, but where is it defined?
>
> CONTEXT is a pointer into a "struct context[]" array, which is a place
> to store sizeable local variables for the currently running
> probe/function.  Such locals are stored on the heap rather than on the
> (scarce) kernel stack.
>
> - FChE
>
>



Domenico Di Leo, PhD student, Universit? degli Studi di Napoli Federico II
Ph:     +39 081 676770
Fax:    +39 081 676574
Web: http://wpage.unina.it/domenico.dileo

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

* Re: Defintion of CONTEXT
  2012-08-06  8:21   ` domenico.dileo
@ 2012-08-06  9:26     ` Mark Wielaard
  0 siblings, 0 replies; 4+ messages in thread
From: Mark Wielaard @ 2012-08-06  9:26 UTC (permalink / raw)
  To: domenico.dileo; +Cc: Frank Ch. Eigler, systemtap

On Mon, 2012-08-06 at 10:20 +0200, domenico.dileo@unina.it wrote:
> ok, but I would like to find out about the several
> information to which is possible to access with CONTEXT.
> For instance, CONTEXT->regs allows you to get the
> value stored in some registers (I guess),
> There are other fields, such as CONTEXT->regflags, CONTEXT->pi
> and so on. Where can I find a full description (or definition)
> of CONTEXT? What can I access to with CONTEXT?.

It is internal to the systemtap runtime and really not supposed to be
accessed by user code. But if you are interested in the internals then
take a look at runtime/common_probe_context.h which has several comments
describing the fields:
http://www.sourceware.org/git/gitweb.cgi?p=systemtap.git;a=blob;f=runtime/common_probe_context.h;hb=HEAD

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

end of thread, other threads:[~2012-08-06  9:26 UTC | newest]

Thread overview: 4+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2012-08-03 16:28 Defintion of CONTEXT Domenico Di Leo
2012-08-03 16:50 ` Frank Ch. Eigler
2012-08-06  8:21   ` domenico.dileo
2012-08-06  9:26     ` Mark Wielaard

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