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: MAXACTION exceeded error while using systemtap


Badari Pulavarty wrote:

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





------------------------------------------------------------------------

#! 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()
}


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>



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