public inbox for linux-kernel@vger.kernel.org
 help / color / mirror / Atom feed
* [PATCH] s390: remove DEBUG_MALLOC
@ 2009-06-17  6:42 Pekka J Enberg
  2009-06-17  7:23 ` Martin Schwidefsky
  0 siblings, 1 reply; 2+ messages in thread
From: Pekka J Enberg @ 2009-06-17  6:42 UTC (permalink / raw)
  To: akpm; +Cc: linux-kernel, linux-s390, heiko.carstens, schwidefsky

From: Pekka Enberg <penberg@cs.helsinki.fi>

The kernel now has kmemleak and kmemtrace so there's no reason to keep
this ugly s390 hack around. I am not sure how it's supposed to work on
SMP anyway as it uses a global variable to temporarily store the return 
value of all kmalloc() calls:

  void *b;

  #define kmalloc(x...) (PRINT_INFO(" kmalloc %p\n",b=kmalloc(x)),b)

Cc: <linux-s390@vger.kernel.org>
Cc: Heiko Carstens <heiko.carstens@de.ibm.com>
Cc: Martin Schwidefsky <schwidefsky@de.ibm.com>
Signed-off-by: Pekka Enberg <penberg@cs.helsinki.fi>
---
 arch/s390/include/asm/debug.h |    9 ---------
 1 files changed, 0 insertions(+), 9 deletions(-)

diff --git a/arch/s390/include/asm/debug.h b/arch/s390/include/asm/debug.h
index 9450ce6..31ed568 100644
--- a/arch/s390/include/asm/debug.h
+++ b/arch/s390/include/asm/debug.h
@@ -248,14 +248,5 @@ int debug_unregister_view(debug_info_t* id, struct debug_view* view);
 #define PRINT_FATAL(x...) printk ( KERN_DEBUG PRINTK_HEADER x )
 #endif				/* DASD_DEBUG */
 
-#undef DEBUG_MALLOC
-#ifdef DEBUG_MALLOC
-void *b;
-#define kmalloc(x...) (PRINT_INFO(" kmalloc %p\n",b=kmalloc(x)),b)
-#define kfree(x) PRINT_INFO(" kfree %p\n",x);kfree(x)
-#define get_zeroed_page(x...) (PRINT_INFO(" gfp %p\n",b=get_zeroed_page(x)),b)
-#define __get_free_pages(x...) (PRINT_INFO(" gfps %p\n",b=__get_free_pages(x)),b)
-#endif				/* DEBUG_MALLOC */
-
 #endif				/* __KERNEL__ */
 #endif				/* DEBUG_H */
-- 
1.5.6.3


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

* Re: [PATCH] s390: remove DEBUG_MALLOC
  2009-06-17  6:42 [PATCH] s390: remove DEBUG_MALLOC Pekka J Enberg
@ 2009-06-17  7:23 ` Martin Schwidefsky
  0 siblings, 0 replies; 2+ messages in thread
From: Martin Schwidefsky @ 2009-06-17  7:23 UTC (permalink / raw)
  To: Pekka J Enberg; +Cc: akpm, linux-kernel, linux-s390, heiko.carstens

On Wed, 17 Jun 2009 09:42:38 +0300 (EEST)
Pekka J Enberg <penberg@cs.helsinki.fi> wrote:

> The kernel now has kmemleak and kmemtrace so there's no reason to keep
> this ugly s390 hack around. I am not sure how it's supposed to work on
> SMP anyway as it uses a global variable to temporarily store the return 
> value of all kmalloc() calls:
> 
>   void *b;
> 
>   #define kmalloc(x...) (PRINT_INFO(" kmalloc %p\n",b=kmalloc(x)),b)

Ouch! Yes, we better remove this quickly before anybody else sees it.
I'll add it to git390.

-- 
blue skies,
   Martin.

"Reality continues to ruin my life." - Calvin.


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

end of thread, other threads:[~2009-06-17  7:24 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2009-06-17  6:42 [PATCH] s390: remove DEBUG_MALLOC Pekka J Enberg
2009-06-17  7:23 ` Martin Schwidefsky

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox