public inbox for systemtap@sourceware.org
 help / color / mirror / Atom feed
* MAXACTION exceeded error while using systemtap
@ 2005-12-06 16:40 Badari Pulavarty
  2005-12-06 16:59 ` Frank Ch. Eigler
  2005-12-06 17:01 ` Hien Nguyen
  0 siblings, 2 replies; 23+ messages in thread
From: Badari Pulavarty @ 2005-12-06 16:40 UTC (permalink / raw)
  To: SystemTAP

[-- Attachment #1: Type: text/plain, Size: 999 bytes --]

Hi,

I am trying to collect pagecache usage info using systemtap
and I get following error, while reporting. What should I 
do fix it ?

Thanks,
Badari


....
mapping = 0xffff8100b1de8a50 nrpages = 3
mapping = 0xffff8100b1dfaa50 nrpages = 2
mapping = 0xffff8100b1d03260 nrpages = 1
mapping = 0xffff8100b1d04e48 nrpages = 3
mapping = 0xffff8100b1e0ee48 nrpages = 1
mapping = 0xffff8100b1e12658 nrpages = 1
mapping = 0xffff8100b1e18a50 nrpages = 2
mapping = 0xffff8100b1e1ce48 nrpages = 1
mapping = 0xffff8100b1e2d658 nrpages = 2
mapping = 0xffff8100b1e34a50 nrpages = 1
mapping = 0xffff8100b1e40a50 nrpages = 3
mapping = 0xffff8100b1e4a658 nrpages = 1
mapping = 0xffff8100b1e9ca50 nrpages = 1
mapping = 0xffff8100b1d6ba50 nrpages = 3
mapping = 0xffff8100b1eb2a50 nrpages = 3
mapping = 0xffff8100b1db3a50 nrpages = 2
mapping = 0xffff8100b1ec2a50 nrpages = 1
mapping = 0xffff8100b1eeb658 nrpages = 1
ERROR: MAXACTION exceeded near embedded-code
at /usr/local/share/systemtap/tapset/logging.stp:9:29




[-- Attachment #2: pagecache.stp --]
[-- Type: text/plain, Size: 630 bytes --]

#! stap

global page_cache_pages
global pageadd, pagedel

function _(n) { return string(n) } 

probe kernel.function("add_to_page_cache") {
	page_cache_pages[$mapping] = $mapping->nrpages;
	pageadd++
}

probe kernel.function("__remove_from_page_cache") {
	page_cache_pages[$page->mapping] = $page->mapping->nrpages;
	pagedel++
}

function report () {
  foreach (mapping in page_cache_pages) {
	print("mapping = " . hexstring(mapping) . 
		" nrpages = " . _(page_cache_pages[mapping]) . "\n")
  }
  print("Totals PageAdd = " . _(pageadd) .
		" PageDel = " . _(pagedel) . "\n")
  delete page_cache_pages
}

probe end {
  report()
}

^ permalink raw reply	[flat|nested] 23+ messages in thread
* RE: MAXACTION exceeded error while using systemtap
@ 2005-12-06 20:41 Stone, Joshua I
  2005-12-06 20:55 ` Frank Ch. Eigler
  0 siblings, 1 reply; 23+ messages in thread
From: Stone, Joshua I @ 2005-12-06 20:41 UTC (permalink / raw)
  To: Hien Nguyen, Frank Ch. Eigler; +Cc: SystemTAP

Hien Nguyen wrote:
> Try to reset MAXACTION once in a while with this
> 
> function reset_maxaction () %{
>         if (CONTEXT && CONTEXT->actioncount)
>                 CONTEXT->actioncount=0;
> %}
> 
> OR try to start your script with -DMAXACTION=<somehugenumber>

To me, both of these solutions are really just workarounds for what will
likely be a common problem.  The first requires guru-mode, which should
not be necessary for a simple reporting script.  The second is better,
though cumbersome.


Frank Ch. Eigler wrote:
> See http://sourceware.org/bugzilla/show_bug.cgi?id=1866

This bug was dismissed as being "behavior as designed" - but I think it
is worth questioning the design.  Do we expect this to be a common
problem?  If so, we need to find a way to make it less painful...

At the very least, we should have something along the Dtrace's printa():
http://docs.sun.com/app/docs/doc/817-6223/6mlkidlhv?a=view#chp-fmt-print
a

Their printa() only deals with aggregations (stats), but we really need
something like this for general arrays as well.

Bug #1121 seems applicable to this problem - is there any work being
done here?
http://sourceware.org/bugzilla/show_bug.cgi?id=1121


Josh

^ permalink raw reply	[flat|nested] 23+ messages in thread
* RE: MAXACTION exceeded error while using systemtap
@ 2005-12-06 21:56 Stone, Joshua I
  2005-12-06 22:11 ` Frank Ch. Eigler
  0 siblings, 1 reply; 23+ messages in thread
From: Stone, Joshua I @ 2005-12-06 21:56 UTC (permalink / raw)
  To: Frank Ch. Eigler; +Cc: systemtap

Frank Ch. Eigler wrote:
> Bug #1866 links to #1884, which does that.

Oops, sorry, I interpreted the "duplicate of" message backwards...

>> At the very least, we should have something along the Dtrace's
>> printa(): [...] Bug #1121 seems applicable to this problem [...]
> 
> The print/printf routines have worked for a few weeks now.  I don't
> know whether Graydon intends to extend them to print arrays also.

The bug mentions printing entire arrays - that is what I was referring
to.

> I am unsure about how to estimate the very real cost of an array-print
> operator.  Calling it approximately zero would make it into a
> something like a DoS vector.  Intuitively, it should be proportional
> to the amount of output generated, so it relates to bug #1885.

I guess it's a question of the purpose of MAXACTION.  My understanding
is that it is meant to avoid infinite loops/recursion.  In this sense,
giving printa a cost of one is ok, because the size of the array is
bound by MAXMAPENTRIES.

If you mean for MAXACTION to also provide a bound on time, then I tend
to agree with your comment #4 on 1884 - we need a way to determine a
more representative MAXACTION.


Josh

^ permalink raw reply	[flat|nested] 23+ messages in thread
* RE: MAXACTION exceeded error while using systemtap
@ 2005-12-08 17:50 Stone, Joshua I
  0 siblings, 0 replies; 23+ messages in thread
From: Stone, Joshua I @ 2005-12-08 17:50 UTC (permalink / raw)
  To: Martin Hunt, Frank Ch. Eigler; +Cc: systemtap

Martin Hunt wrote:
> Because timer probes can run in process context which means they
> sleep, can be scheduled, take as long as they want? Whereas a kprobe
> might be in the middle of a task switch.

I just want to point out that this is not true of the timer.profile
variety, which runs (by necessity) in a true interrupt context.

Josh

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

end of thread, other threads:[~2005-12-28 20:38 UTC | newest]

Thread overview: 23+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2005-12-06 16:40 MAXACTION exceeded error while using systemtap Badari Pulavarty
2005-12-06 16:59 ` Frank Ch. Eigler
2005-12-07  1:10   ` Badari Pulavarty
2005-12-07 15:21     ` William Cohen
2005-12-07 16:37       ` Badari Pulavarty
2005-12-06 17:01 ` Hien Nguyen
2005-12-06 20:41 Stone, Joshua I
2005-12-06 20:55 ` Frank Ch. Eigler
2005-12-06 21:56 Stone, Joshua I
2005-12-06 22:11 ` Frank Ch. Eigler
2005-12-07 20:53   ` Martin Hunt
2005-12-07 21:09     ` Frank Ch. Eigler
2005-12-07 22:29       ` Martin Hunt
2005-12-07 23:07         ` Frank Ch. Eigler
2005-12-08  8:55           ` Martin Hunt
2005-12-08 12:52             ` James Dickens
2005-12-08 13:57               ` Frank Ch. Eigler
2005-12-28 19:06                 ` Marcelo Tosatti
2005-12-28 20:12                   ` Tom Zanussi
2005-12-28 20:38                     ` Marcelo Tosatti
2005-12-28 21:13                   ` Frank Ch. Eigler
2005-12-08 13:37             ` Frank Ch. Eigler
2005-12-08 17:50 Stone, Joshua I

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