diff options
author | Frank Ch. Eigler <fche@elastic.org> | 2010-03-19 14:57:45 -0400 |
---|---|---|
committer | Frank Ch. Eigler <fche@elastic.org> | 2010-03-19 14:57:45 -0400 |
commit | 8890a74f7c6b71b0346f7fca8ce43674f706d247 (patch) | |
tree | f0c20659ae1b97a1a40ed2777c49b334af8ccebc | |
parent | a5d8d92a7c3b1ad18d6da416d4bb08922578f502 (diff) | |
download | systemtap-steved-8890a74f7c6b71b0346f7fca8ce43674f706d247.tar.gz systemtap-steved-8890a74f7c6b71b0346f7fca8ce43674f706d247.tar.xz systemtap-steved-8890a74f7c6b71b0346f7fca8ce43674f706d247.zip |
tapset: port addr_to_node() to rhel4
-rw-r--r-- | tapset/memory.stp | 6 |
1 files changed, 5 insertions, 1 deletions
diff --git a/tapset/memory.stp b/tapset/memory.stp index c170c5c7..bc3883cd 100644 --- a/tapset/memory.stp +++ b/tapset/memory.stp @@ -93,9 +93,13 @@ probe vm.pagefault.return = kernel.function("__handle_mm_fault@mm/memory.c").ret * */ function addr_to_node:long(addr:long) %{ /* pure */ - int nid; int pfn = __pa(THIS->addr) >> PAGE_SHIFT; + int nid; +#ifdef for_each_online_node for_each_online_node(nid) +#else + for (nid=0; nid<MAX_NUMNODES; nid++) /* if (node_online(nid)) */ +#endif if ( NODE_DATA(nid)->node_start_pfn <= pfn && pfn < (NODE_DATA(nid)->node_start_pfn + NODE_DATA(nid)->node_spanned_pages) ) |