about summary refs log tree commit diff
path: root/sysdeps/unix/sysv
diff options
context:
space:
mode:
authorRoland McGrath <roland@hack.frob.com>2012-05-25 13:31:57 -0700
committerRoland McGrath <roland@hack.frob.com>2012-05-25 13:41:03 -0700
commit8422c9a560e6e3c854739c8a13ecb1c6714f930f (patch)
tree145ab8a248defdcdc064755032eecb0eb69a4e97 /sysdeps/unix/sysv
parent3a097cc7a18309c864186c1b864b90889d2a45e9 (diff)
downloadglibc-8422c9a560e6e3c854739c8a13ecb1c6714f930f.tar.gz
glibc-8422c9a560e6e3c854739c8a13ecb1c6714f930f.tar.xz
glibc-8422c9a560e6e3c854739c8a13ecb1c6714f930f.zip
Add systemtap static probe points in setjmp/longjmp on x86.
Diffstat (limited to 'sysdeps/unix/sysv')
-rw-r--r--sysdeps/unix/sysv/linux/i386/____longjmp_chk.S8
-rw-r--r--sysdeps/unix/sysv/linux/x86_64/____longjmp_chk.S7
2 files changed, 12 insertions, 3 deletions
diff --git a/sysdeps/unix/sysv/linux/i386/____longjmp_chk.S b/sysdeps/unix/sysv/linux/i386/____longjmp_chk.S
index b2cc368839..e1350767b1 100644
--- a/sysdeps/unix/sysv/linux/i386/____longjmp_chk.S
+++ b/sysdeps/unix/sysv/linux/i386/____longjmp_chk.S
@@ -1,4 +1,4 @@
-/* Copyright (C) 2001,2004,2005,2006,2009 Free Software Foundation, Inc.
+/* Copyright (C) 2001-2012 Free Software Foundation, Inc.
    This file is part of the GNU C Library.
 
    The GNU C Library is free software; you can redistribute it and/or
@@ -18,6 +18,7 @@
 #include <sysdep.h>
 #include <jmpbuf-offsets.h>
 #include <asm-syntax.h>
+#include <stap-probe.h>
 
 
 	.section .rodata.str1.1,"aMS",@progbits,1
@@ -78,7 +79,9 @@ ENTRY (____longjmp_chk)
 	cfi_adjust_cfa_offset(-12)
 	movl	4(%esp), %ecx
 
-.Lok:	/* We add unwind information for the target here.  */
+.Lok:
+	LIBC_PROBE (longjmp, 3, 4@%ecx, -4@8(%esp), 4@%edx)
+	/* We add unwind information for the target here.  */
 	cfi_def_cfa(%ecx, 0)
 	cfi_register(%eip, %edx)
 	cfi_register(%esp, %edi)
@@ -101,5 +104,6 @@ ENTRY (____longjmp_chk)
 	cfi_restore(%ebp)
 
 	/* Jump to saved PC.  */
+	LIBC_PROBE (longjmp_target, 3, 4@%ecx, -4@%eax, 4@%edx)
 	jmp	*%edx
 END (____longjmp_chk)
diff --git a/sysdeps/unix/sysv/linux/x86_64/____longjmp_chk.S b/sysdeps/unix/sysv/linux/x86_64/____longjmp_chk.S
index c392820cd0..d9bdb67d52 100644
--- a/sysdeps/unix/sysv/linux/x86_64/____longjmp_chk.S
+++ b/sysdeps/unix/sysv/linux/x86_64/____longjmp_chk.S
@@ -18,6 +18,7 @@
 #include <sysdep.h>
 #include <jmpbuf-offsets.h>
 #include <asm-syntax.h>
+#include <stap-probe.h>
 
 #include <sigaltstack-offsets.h>
 
@@ -103,7 +104,9 @@ ENTRY(____longjmp_chk)
 	movl	%ebx, %esi
 	cfi_restore (%rsi)
 
-.Lok:	/* We add unwind information for the target here.  */
+.Lok:
+	LIBC_PROBE (longjmp, 3, LP_SIZE@%RDI_LP, -4@%esi, LP_SIZE@%RDX_LP)
+	/* We add unwind information for the target here.  */
 	cfi_def_cfa(%rdi, 0)
 	cfi_register(%rsp,%r8)
 	cfi_register(%rbp,%r9)
@@ -122,5 +125,7 @@ ENTRY(____longjmp_chk)
 	movl	%esi, %eax
 	mov	%R8_LP, %RSP_LP
 	movq	%r9,%rbp
+	LIBC_PROBE (longjmp_target, 3,
+		    LP_SIZE@%RDI_LP, -4@%eax, LP_SIZE@%RDX_LP)
 	jmpq	*%rdx
 END (____longjmp_chk)