From 11156c61be719d8c9b4ab613fb18d797e15f0874 Mon Sep 17 00:00:00 2001 From: Mark Wielaard Date: Sun, 7 Aug 2011 14:38:28 +0200 Subject: [PATCH] proc_mem.stp: Always use atomic counters with kernel 3.1 or higher. Kernel commit 172703 "mm: delete non-atomic mm counter implementation" did away with the non-atomic variant of mm_struct rss_stat->count[member]. --- tapset/proc_mem.stp | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/tapset/proc_mem.stp b/tapset/proc_mem.stp index f8fe3c6c3..114af193d 100644 --- a/tapset/proc_mem.stp +++ b/tapset/proc_mem.stp @@ -65,9 +65,9 @@ function _MM_ANONPAGES:long() function _stp_get_mm_counter:long(mm:long, member:long) { - /* kernels >= 2.6.34 */ + /* kernels >= 2.6.34, 3.1 and later always use atomics */ if (@defined(&@cast(mm, "mm_struct", "kernel")->rss_stat)) { -%( CONFIG_NR_CPUS >= CONFIG_SPLIT_PTLOCK_CPUS %? +%( kernel_v >= "3.1.0" || CONFIG_NR_CPUS >= CONFIG_SPLIT_PTLOCK_CPUS %? val = atomic_long_read(&@cast(mm, "mm_struct", "kernel")->rss_stat->count[member]) %: -- 2.43.5