public inbox for systemtap@sourceware.org
 help / color / mirror / Atom feed
* What can I access in return probe
@ 2005-12-03  0:07 Badari Pulavarty
       [not found] ` <4390E8AA.1070105@us.ibm.com>
                   ` (2 more replies)
  0 siblings, 3 replies; 5+ messages in thread
From: Badari Pulavarty @ 2005-12-03  0:07 UTC (permalink / raw)
  To: systemtap

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

Hi,

I am wondering if I can access arguments in my return probe ?
And also, how do I access return value ?
 
Whats wrong here ?

# stap -g pagecache.stp
ERROR: pointer dereference fault near identifier 'page_cache_pages' at
pagecache.stp:8:2


Thanks,
Badari





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

#! stap

global page_cache_pages

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

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

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

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

probe end {
  report()
}

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

end of thread, other threads:[~2005-12-18 21:01 UTC | newest]

Thread overview: 5+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2005-12-03  0:07 What can I access in return probe Badari Pulavarty
     [not found] ` <4390E8AA.1070105@us.ibm.com>
2005-12-03  0:42   ` Kevin Stafford
2005-12-03  1:35 ` Frank Ch. Eigler
2005-12-17 23:22 ` Marcelo Tosatti
2005-12-19  4:45   ` Badari Pulavarty

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