Support for 2.6.24 and newer

2008-03-20  Soren Sandmann <sandmann@redhat.com>

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



svn path=/trunk/; revision=400
This commit is contained in:
Soren Sandmann
2008-03-20 07:19:13 +00:00
committed by Søren Sandmann Pedersen
parent 542967b1f7
commit 83fd2bbc31
2 changed files with 20 additions and 9 deletions

View File

@ -1,3 +1,7 @@
2008-03-20 Soren Sandmann <sandmann@redhat.com>
* module/sysprof-module.c: Support for 2.6.24 and newer
2008-02-23 Soren Sandmann <sandmann@redhat.com> 2008-02-23 Soren Sandmann <sandmann@redhat.com>
* process.c (process_lookup_symbol): Initialize offset to 1. Don't * process.c (process_lookup_symbol): Initialize offset to 1. Don't

View File

@ -61,17 +61,24 @@ DECLARE_WAIT_QUEUE_HEAD (wait_for_trace);
/* Macro the names of the registers that are used on each architecture */ /* Macro the names of the registers that are used on each architecture */
#if defined(CONFIG_X86_64) #if defined(CONFIG_X86_64)
# define REG_FRAME_PTR rbp # define REG_FRAME_PTR rbp
# define REG_INS_PTR rip # define REG_INS_PTR rip
# define REG_STACK_PTR rsp # define REG_STACK_PTR rsp
# define REG_STACK_PTR0 rsp0 # define REG_STACK_PTR0 rsp0
#elif defined(CONFIG_X86) #elif defined(CONFIG_X86)
# define REG_FRAME_PTR ebp # if LINUX_VERSION_CODE >= KERNEL_VERSION (2,6,24)
# define REG_INS_PTR eip # define REG_FRAME_PTR bp
# define REG_STACK_PTR esp # define REG_INS_PTR ip
# define REG_STACK_PTR0 esp0 # 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 #else
# error Sysprof only supports the i386 and x86-64 architectures # error Sysprof only supports the i386 and x86-64 architectures
#endif #endif
#define SAMPLES_PER_SECOND 250 #define SAMPLES_PER_SECOND 250