diff options
author | Soren Sandmann <sandmann@redhat.com> | 2008-03-20 07:19:13 +0000 |
---|---|---|
committer | Søren Sandmann Pedersen <ssp@src.gnome.org> | 2008-03-20 07:19:13 +0000 |
commit | 83fd2bbc3167b8c60dd922fda9a0707003ec12f2 (patch) | |
tree | db4dc33905384162313d975a42291ac910158b35 /module | |
parent | 542967b1f746ded36c23d342e3ddbaf319c3a1cf (diff) |
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
Diffstat (limited to 'module')
-rw-r--r-- | module/sysprof-module.c | 25 |
1 files changed, 16 insertions, 9 deletions
diff --git a/module/sysprof-module.c b/module/sysprof-module.c index 94a67ad..97b11b1 100644 --- a/module/sysprof-module.c +++ b/module/sysprof-module.c @@ -61,17 +61,24 @@ DECLARE_WAIT_QUEUE_HEAD (wait_for_trace); /* 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 |