From: nikita Date: Thu, 7 Dec 2006 15:59:44 +0000 (+0000) Subject: tmp-debug: use stacktrace_record() instead of dunmping onto console. X-Git-Tag: v1_8_0_110~486^2~31 X-Git-Url: https://git.whamcloud.com/gitweb?a=commitdiff_plain;h=3c66e8be27f962c753b6ba229f40ce42699c7d7c;p=fs%2Flustre-release.git tmp-debug: use stacktrace_record() instead of dunmping onto console. --- diff --git a/lustre/kernel_patches/patches/tmp-debug.patch b/lustre/kernel_patches/patches/tmp-debug.patch index 660daf8..e1638838 100644 --- a/lustre/kernel_patches/patches/tmp-debug.patch +++ b/lustre/kernel_patches/patches/tmp-debug.patch @@ -12,21 +12,12 @@ Index: linux/fs/buffer.c /* * Perform a pagecache lookup for the matching buffer. If it's there, refresh * it in the LRU and mark it as accessed. If it is not present then return -@@ -1538,6 +1541,18 @@ __find_get_block(struct block_device *bd +@@ -1538,6 +1541,9 @@ __find_get_block(struct block_device *bd { struct buffer_head *bh = lookup_bh_lru(bdev, block, size); -+ if (__find_get_block_trace != 0) { -+ static unsigned long last_dump = 0; -+ -+ if (last_dump == 0 || -+ time_after(jiffies, -+ last_dump + __find_get_block_trace * HZ)) { -+ last_dump = jiffies; -+ printk("%s@%lu\n", __FUNCTION__, last_dump); -+ dump_stack(); -+ } -+ } ++ if (__find_get_block_trace != 0) ++ stacktrace_record(); + if (bh == NULL) { bh = __find_get_block_slow(bdev, block, size); @@ -45,21 +36,12 @@ Index: linux/kernel/sched.c /*** * try_to_wake_up - wake up a thread * @p: the to-be-woken-up thread -@@ -1132,6 +1135,18 @@ static int try_to_wake_up(task_t * p, un +@@ -1132,6 +1135,9 @@ static int try_to_wake_up(task_t * p, un int new_cpu; #endif -+ if (try_to_wake_up_trace != 0) { -+ static unsigned long last_dump = 0; -+ -+ if (last_dump == 0 || -+ time_after(jiffies, -+ last_dump + try_to_wake_up_trace * HZ)) { -+ last_dump = jiffies; -+ printk("%s@%lu\n", __FUNCTION__, last_dump); -+ dump_stack(); -+ } -+ } ++ if (try_to_wake_up_trace != 0) ++ stacktrace_record(); + rq = task_rq_lock(p, &flags); schedstat_inc(rq, ttwu_cnt);