sysprof r400 - in trunk: . module



Author: ssp
Date: Thu Mar 20 07:19:13 2008
New Revision: 400
URL: http://svn.gnome.org/viewvc/sysprof?rev=400&view=rev

Log:
2008-03-20  Soren Sandmann <sandmann redhat com>

       * module/sysprof-module.c: Support for 2.6.24 and newer




Modified:
   trunk/ChangeLog
   trunk/module/sysprof-module.c

Modified: trunk/module/sysprof-module.c
==============================================================================
--- trunk/module/sysprof-module.c	(original)
+++ trunk/module/sysprof-module.c	Thu Mar 20 07:19:13 2008
@@ -61,17 +61,24 @@
 
 /* Macro the names of the registers that are used on each architecture */
 #if defined(CONFIG_X86_64)
-# define REG_FRAME_PTR rbp
-# define REG_INS_PTR rip
-# define REG_STACK_PTR rsp
-# define REG_STACK_PTR0 rsp0
+#	define REG_FRAME_PTR rbp
+#	define REG_INS_PTR rip
+#	define REG_STACK_PTR rsp
+#	define REG_STACK_PTR0 rsp0
 #elif defined(CONFIG_X86)
-# define REG_FRAME_PTR ebp
-# define REG_INS_PTR eip
-# define REG_STACK_PTR esp
-# define REG_STACK_PTR0 esp0
+#	if LINUX_VERSION_CODE >= KERNEL_VERSION (2,6,24)
+#		define REG_FRAME_PTR bp
+#		define REG_INS_PTR ip
+#		define REG_STACK_PTR sp
+#		define REG_STACK_PTR0 sp0
+#	else
+#		define REG_FRAME_PTR ebp
+#		define REG_INS_PTR eip
+#		define REG_STACK_PTR esp
+#		define REG_STACK_PTR0 esp0
+#	endif
 #else
-# error Sysprof only supports the i386 and x86-64 architectures
+#	error Sysprof only supports the i386 and x86-64 architectures
 #endif
 
 #define SAMPLES_PER_SECOND 250



[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]