usr/src/cmd/php5/patches/php_dtrace.patch
author Jon Tibble <meths@btinternet.com>
Wed, 13 Feb 2013 10:12:56 +0000
branchoi_151a
changeset 198 be4eee29f428
parent 5 d07534556b03
permissions -rw-r--r--
Bump PHP to 5.2.17
Ignore whitespace changes - Everywhere: Within whitespace: At end of lines:
5
d07534556b03 Import sfw build 131
Cyril Plisko <cyril.plisko@grigale.com>
parents: 0
diff changeset
     1
Index: php-5.2.12/Zend/zend_dtrace.d
d07534556b03 Import sfw build 131
Cyril Plisko <cyril.plisko@grigale.com>
parents: 0
diff changeset
     2
===================================================================
d07534556b03 Import sfw build 131
Cyril Plisko <cyril.plisko@grigale.com>
parents: 0
diff changeset
     3
--- php-5.2.12.orig/Zend/zend_dtrace.d		Thu Dec 17 18:45:36 2009
d07534556b03 Import sfw build 131
Cyril Plisko <cyril.plisko@grigale.com>
parents: 0
diff changeset
     4
+++ php-5.2.12/Zend/zend_dtrace.d	Thu Dec 17 18:48:23 2009
d07534556b03 Import sfw build 131
Cyril Plisko <cyril.plisko@grigale.com>
parents: 0
diff changeset
     5
@@ -0,0 +1,39 @@
d07534556b03 Import sfw build 131
Cyril Plisko <cyril.plisko@grigale.com>
parents: 0
diff changeset
     6
+/*
d07534556b03 Import sfw build 131
Cyril Plisko <cyril.plisko@grigale.com>
parents: 0
diff changeset
     7
+   +----------------------------------------------------------------------+
d07534556b03 Import sfw build 131
Cyril Plisko <cyril.plisko@grigale.com>
parents: 0
diff changeset
     8
+   | Zend Engine                                                          |
d07534556b03 Import sfw build 131
Cyril Plisko <cyril.plisko@grigale.com>
parents: 0
diff changeset
     9
+   +----------------------------------------------------------------------+
d07534556b03 Import sfw build 131
Cyril Plisko <cyril.plisko@grigale.com>
parents: 0
diff changeset
    10
+   | Copyright (c) 1998-2009 Zend Technologies Ltd. (http://www.zend.com) |
d07534556b03 Import sfw build 131
Cyril Plisko <cyril.plisko@grigale.com>
parents: 0
diff changeset
    11
+   +----------------------------------------------------------------------+
d07534556b03 Import sfw build 131
Cyril Plisko <cyril.plisko@grigale.com>
parents: 0
diff changeset
    12
+   | This source file is subject to version 2.00 of the Zend license,     |
d07534556b03 Import sfw build 131
Cyril Plisko <cyril.plisko@grigale.com>
parents: 0
diff changeset
    13
+   | that is bundled with this package in the file LICENSE, and is        |
d07534556b03 Import sfw build 131
Cyril Plisko <cyril.plisko@grigale.com>
parents: 0
diff changeset
    14
+   | available through the world-wide-web at the following url:           |
d07534556b03 Import sfw build 131
Cyril Plisko <cyril.plisko@grigale.com>
parents: 0
diff changeset
    15
+   | http://www.zend.com/license/2_00.txt.                                |
d07534556b03 Import sfw build 131
Cyril Plisko <cyril.plisko@grigale.com>
parents: 0
diff changeset
    16
+   | If you did not receive a copy of the Zend license and are unable to  |
d07534556b03 Import sfw build 131
Cyril Plisko <cyril.plisko@grigale.com>
parents: 0
diff changeset
    17
+   | obtain it through the world-wide-web, please send a note to          |
d07534556b03 Import sfw build 131
Cyril Plisko <cyril.plisko@grigale.com>
parents: 0
diff changeset
    18
+   | [email protected] so we can mail you a copy immediately.              |
d07534556b03 Import sfw build 131
Cyril Plisko <cyril.plisko@grigale.com>
parents: 0
diff changeset
    19
+   +----------------------------------------------------------------------+
d07534556b03 Import sfw build 131
Cyril Plisko <cyril.plisko@grigale.com>
parents: 0
diff changeset
    20
+   | Authors: David Soria Parra <[email protected]>                |
d07534556b03 Import sfw build 131
Cyril Plisko <cyril.plisko@grigale.com>
parents: 0
diff changeset
    21
+   +----------------------------------------------------------------------+
d07534556b03 Import sfw build 131
Cyril Plisko <cyril.plisko@grigale.com>
parents: 0
diff changeset
    22
+*/
d07534556b03 Import sfw build 131
Cyril Plisko <cyril.plisko@grigale.com>
parents: 0
diff changeset
    23
+
d07534556b03 Import sfw build 131
Cyril Plisko <cyril.plisko@grigale.com>
parents: 0
diff changeset
    24
+/* $Id: $ */
d07534556b03 Import sfw build 131
Cyril Plisko <cyril.plisko@grigale.com>
parents: 0
diff changeset
    25
+
d07534556b03 Import sfw build 131
Cyril Plisko <cyril.plisko@grigale.com>
parents: 0
diff changeset
    26
+provider php {
d07534556b03 Import sfw build 131
Cyril Plisko <cyril.plisko@grigale.com>
parents: 0
diff changeset
    27
+	probe exception__caught(char *classname);
d07534556b03 Import sfw build 131
Cyril Plisko <cyril.plisko@grigale.com>
parents: 0
diff changeset
    28
+	probe exception__thrown(char* classname);
d07534556b03 Import sfw build 131
Cyril Plisko <cyril.plisko@grigale.com>
parents: 0
diff changeset
    29
+	probe request__startup(char* request_file, char* request_uri, char* request_method);
d07534556b03 Import sfw build 131
Cyril Plisko <cyril.plisko@grigale.com>
parents: 0
diff changeset
    30
+	probe request__shutdown(char* request_file, char* request_uri, char* request_method);
d07534556b03 Import sfw build 131
Cyril Plisko <cyril.plisko@grigale.com>
parents: 0
diff changeset
    31
+	probe compile__file__entry(char * compile_file, char *compile_file_translated);
d07534556b03 Import sfw build 131
Cyril Plisko <cyril.plisko@grigale.com>
parents: 0
diff changeset
    32
+	probe compile__file__return(char *compile_file, char *compile_file_translated);
d07534556b03 Import sfw build 131
Cyril Plisko <cyril.plisko@grigale.com>
parents: 0
diff changeset
    33
+	probe error(char *errormsg, char *request_file, int lineno);
d07534556b03 Import sfw build 131
Cyril Plisko <cyril.plisko@grigale.com>
parents: 0
diff changeset
    34
+	probe execute__entry(char* request_file, int lineno);
d07534556b03 Import sfw build 131
Cyril Plisko <cyril.plisko@grigale.com>
parents: 0
diff changeset
    35
+	probe execute__return(char* request_file, int lineno);
d07534556b03 Import sfw build 131
Cyril Plisko <cyril.plisko@grigale.com>
parents: 0
diff changeset
    36
+	probe function__entry(char* function_name, char* request_file, int lineno, char* classname, char* scope);
d07534556b03 Import sfw build 131
Cyril Plisko <cyril.plisko@grigale.com>
parents: 0
diff changeset
    37
+	probe function__return(char* function_name, char* request_file, int lineno, char* classname, char* scope);
d07534556b03 Import sfw build 131
Cyril Plisko <cyril.plisko@grigale.com>
parents: 0
diff changeset
    38
+ 	probe object__create(char *classname, char* request_file, int lineno);
d07534556b03 Import sfw build 131
Cyril Plisko <cyril.plisko@grigale.com>
parents: 0
diff changeset
    39
+ 	probe object__destroy(char *classname, char* request_file, int lineno);
d07534556b03 Import sfw build 131
Cyril Plisko <cyril.plisko@grigale.com>
parents: 0
diff changeset
    40
+};
d07534556b03 Import sfw build 131
Cyril Plisko <cyril.plisko@grigale.com>
parents: 0
diff changeset
    41
+
d07534556b03 Import sfw build 131
Cyril Plisko <cyril.plisko@grigale.com>
parents: 0
diff changeset
    42
+/*#pragma D attributes Private/Private/Unknown provider php module
d07534556b03 Import sfw build 131
Cyril Plisko <cyril.plisko@grigale.com>
parents: 0
diff changeset
    43
+#pragma D attributes Private/Private/Unknown provider php function
d07534556b03 Import sfw build 131
Cyril Plisko <cyril.plisko@grigale.com>
parents: 0
diff changeset
    44
+#pragma D attributes Evolving/Evolving/Common provider php provider */
d07534556b03 Import sfw build 131
Cyril Plisko <cyril.plisko@grigale.com>
parents: 0
diff changeset
    45
Index: php-5.2.12/Zend/zend_dtrace.h
d07534556b03 Import sfw build 131
Cyril Plisko <cyril.plisko@grigale.com>
parents: 0
diff changeset
    46
===================================================================
d07534556b03 Import sfw build 131
Cyril Plisko <cyril.plisko@grigale.com>
parents: 0
diff changeset
    47
--- php-5.2.12.orig/Zend/zend_dtrace.h		Thu Dec 17 18:45:36 2009
d07534556b03 Import sfw build 131
Cyril Plisko <cyril.plisko@grigale.com>
parents: 0
diff changeset
    48
+++ php-5.2.12/Zend/zend_dtrace.h	Thu Dec 17 18:48:23 2009
d07534556b03 Import sfw build 131
Cyril Plisko <cyril.plisko@grigale.com>
parents: 0
diff changeset
    49
@@ -0,0 +1,49 @@
d07534556b03 Import sfw build 131
Cyril Plisko <cyril.plisko@grigale.com>
parents: 0
diff changeset
    50
+/*
d07534556b03 Import sfw build 131
Cyril Plisko <cyril.plisko@grigale.com>
parents: 0
diff changeset
    51
+   +----------------------------------------------------------------------+
d07534556b03 Import sfw build 131
Cyril Plisko <cyril.plisko@grigale.com>
parents: 0
diff changeset
    52
+   | Zend Engine                                                          |
d07534556b03 Import sfw build 131
Cyril Plisko <cyril.plisko@grigale.com>
parents: 0
diff changeset
    53
+   +----------------------------------------------------------------------+
d07534556b03 Import sfw build 131
Cyril Plisko <cyril.plisko@grigale.com>
parents: 0
diff changeset
    54
+   | Copyright (c) 1998-2009 Zend Technologies Ltd. (http://www.zend.com) |
d07534556b03 Import sfw build 131
Cyril Plisko <cyril.plisko@grigale.com>
parents: 0
diff changeset
    55
+   +----------------------------------------------------------------------+
d07534556b03 Import sfw build 131
Cyril Plisko <cyril.plisko@grigale.com>
parents: 0
diff changeset
    56
+   | This source file is subject to version 2.00 of the Zend license,     |
d07534556b03 Import sfw build 131
Cyril Plisko <cyril.plisko@grigale.com>
parents: 0
diff changeset
    57
+   | that is bundled with this package in the file LICENSE, and is        |
d07534556b03 Import sfw build 131
Cyril Plisko <cyril.plisko@grigale.com>
parents: 0
diff changeset
    58
+   | available through the world-wide-web at the following url:           |
d07534556b03 Import sfw build 131
Cyril Plisko <cyril.plisko@grigale.com>
parents: 0
diff changeset
    59
+   | http://www.zend.com/license/2_00.txt.                                |
d07534556b03 Import sfw build 131
Cyril Plisko <cyril.plisko@grigale.com>
parents: 0
diff changeset
    60
+   | If you did not receive a copy of the Zend license and are unable to  |
d07534556b03 Import sfw build 131
Cyril Plisko <cyril.plisko@grigale.com>
parents: 0
diff changeset
    61
+   | obtain it through the world-wide-web, please send a note to          |
d07534556b03 Import sfw build 131
Cyril Plisko <cyril.plisko@grigale.com>
parents: 0
diff changeset
    62
+   | [email protected] so we can mail you a copy immediately.              |
d07534556b03 Import sfw build 131
Cyril Plisko <cyril.plisko@grigale.com>
parents: 0
diff changeset
    63
+   +----------------------------------------------------------------------+
d07534556b03 Import sfw build 131
Cyril Plisko <cyril.plisko@grigale.com>
parents: 0
diff changeset
    64
+   | Authors: David Soria Parra <[email protected]>                |
d07534556b03 Import sfw build 131
Cyril Plisko <cyril.plisko@grigale.com>
parents: 0
diff changeset
    65
+   +----------------------------------------------------------------------+
d07534556b03 Import sfw build 131
Cyril Plisko <cyril.plisko@grigale.com>
parents: 0
diff changeset
    66
+*/
d07534556b03 Import sfw build 131
Cyril Plisko <cyril.plisko@grigale.com>
parents: 0
diff changeset
    67
+
d07534556b03 Import sfw build 131
Cyril Plisko <cyril.plisko@grigale.com>
parents: 0
diff changeset
    68
+/* $Id: $ */
d07534556b03 Import sfw build 131
Cyril Plisko <cyril.plisko@grigale.com>
parents: 0
diff changeset
    69
+
d07534556b03 Import sfw build 131
Cyril Plisko <cyril.plisko@grigale.com>
parents: 0
diff changeset
    70
+#ifndef	_ZEND_DTRACE_H
d07534556b03 Import sfw build 131
Cyril Plisko <cyril.plisko@grigale.com>
parents: 0
diff changeset
    71
+#define	_ZEND_DTRACE_H
d07534556b03 Import sfw build 131
Cyril Plisko <cyril.plisko@grigale.com>
parents: 0
diff changeset
    72
+
d07534556b03 Import sfw build 131
Cyril Plisko <cyril.plisko@grigale.com>
parents: 0
diff changeset
    73
+#ifndef ZEND_WIN32
d07534556b03 Import sfw build 131
Cyril Plisko <cyril.plisko@grigale.com>
parents: 0
diff changeset
    74
+# include <unistd.h>
d07534556b03 Import sfw build 131
Cyril Plisko <cyril.plisko@grigale.com>
parents: 0
diff changeset
    75
+#endif
d07534556b03 Import sfw build 131
Cyril Plisko <cyril.plisko@grigale.com>
parents: 0
diff changeset
    76
+
d07534556b03 Import sfw build 131
Cyril Plisko <cyril.plisko@grigale.com>
parents: 0
diff changeset
    77
+#ifdef	__cplusplus
d07534556b03 Import sfw build 131
Cyril Plisko <cyril.plisko@grigale.com>
parents: 0
diff changeset
    78
+extern "C" {
d07534556b03 Import sfw build 131
Cyril Plisko <cyril.plisko@grigale.com>
parents: 0
diff changeset
    79
+#endif
d07534556b03 Import sfw build 131
Cyril Plisko <cyril.plisko@grigale.com>
parents: 0
diff changeset
    80
+
d07534556b03 Import sfw build 131
Cyril Plisko <cyril.plisko@grigale.com>
parents: 0
diff changeset
    81
+#ifdef HAVE_DTRACE
0
b34509ac961f Import sfw repo b126
Cyril Plisko <cyril.plisko@grigale.com>
parents:
diff changeset
    82
+ZEND_API zend_op_array *(*zend_dtrace_compile_file)(zend_file_handle *file_handle, int type TSRMLS_DC);
b34509ac961f Import sfw repo b126
Cyril Plisko <cyril.plisko@grigale.com>
parents:
diff changeset
    83
+ZEND_API void (*zend_dtrace_execute)(zend_op_array *op_array TSRMLS_DC);
b34509ac961f Import sfw repo b126
Cyril Plisko <cyril.plisko@grigale.com>
parents:
diff changeset
    84
+ZEND_API void (*zend_dtrace_execute_internal)(zend_execute_data *execute_data_ptr, int return_value_used TSRMLS_DC);
b34509ac961f Import sfw repo b126
Cyril Plisko <cyril.plisko@grigale.com>
parents:
diff changeset
    85
+
5
d07534556b03 Import sfw build 131
Cyril Plisko <cyril.plisko@grigale.com>
parents: 0
diff changeset
    86
+ZEND_API zend_op_array *dtrace_compile_file(zend_file_handle *file_handle, int type TSRMLS_DC);
d07534556b03 Import sfw build 131
Cyril Plisko <cyril.plisko@grigale.com>
parents: 0
diff changeset
    87
+ZEND_API void dtrace_execute(zend_op_array *op_array TSRMLS_DC);
d07534556b03 Import sfw build 131
Cyril Plisko <cyril.plisko@grigale.com>
parents: 0
diff changeset
    88
+ZEND_API void dtrace_execute_internal(zend_execute_data *execute_data_ptr, int return_value_used TSRMLS_DC);
d07534556b03 Import sfw build 131
Cyril Plisko <cyril.plisko@grigale.com>
parents: 0
diff changeset
    89
+ZEND_API char *dtrace_get_executed_filename(TSRMLS_D);
d07534556b03 Import sfw build 131
Cyril Plisko <cyril.plisko@grigale.com>
parents: 0
diff changeset
    90
+#include <zend_dtrace_gen.h>
d07534556b03 Import sfw build 131
Cyril Plisko <cyril.plisko@grigale.com>
parents: 0
diff changeset
    91
+
d07534556b03 Import sfw build 131
Cyril Plisko <cyril.plisko@grigale.com>
parents: 0
diff changeset
    92
+#endif /* HAVE_DTRACE */
d07534556b03 Import sfw build 131
Cyril Plisko <cyril.plisko@grigale.com>
parents: 0
diff changeset
    93
+
d07534556b03 Import sfw build 131
Cyril Plisko <cyril.plisko@grigale.com>
parents: 0
diff changeset
    94
+#ifdef	__cplusplus
d07534556b03 Import sfw build 131
Cyril Plisko <cyril.plisko@grigale.com>
parents: 0
diff changeset
    95
+}
d07534556b03 Import sfw build 131
Cyril Plisko <cyril.plisko@grigale.com>
parents: 0
diff changeset
    96
+#endif
d07534556b03 Import sfw build 131
Cyril Plisko <cyril.plisko@grigale.com>
parents: 0
diff changeset
    97
+
d07534556b03 Import sfw build 131
Cyril Plisko <cyril.plisko@grigale.com>
parents: 0
diff changeset
    98
+#endif	/* _ZEND_DTRACE_H */
d07534556b03 Import sfw build 131
Cyril Plisko <cyril.plisko@grigale.com>
parents: 0
diff changeset
    99
Index: php-5.2.12/Zend/zend_dtrace.c
d07534556b03 Import sfw build 131
Cyril Plisko <cyril.plisko@grigale.com>
parents: 0
diff changeset
   100
===================================================================
d07534556b03 Import sfw build 131
Cyril Plisko <cyril.plisko@grigale.com>
parents: 0
diff changeset
   101
--- php-5.2.12.orig/Zend/zend_dtrace.c		Thu Dec 17 18:45:36 2009
d07534556b03 Import sfw build 131
Cyril Plisko <cyril.plisko@grigale.com>
parents: 0
diff changeset
   102
+++ php-5.2.12/Zend/zend_dtrace.c	Thu Dec 17 18:48:23 2009
d07534556b03 Import sfw build 131
Cyril Plisko <cyril.plisko@grigale.com>
parents: 0
diff changeset
   103
@@ -0,0 +1,107 @@
d07534556b03 Import sfw build 131
Cyril Plisko <cyril.plisko@grigale.com>
parents: 0
diff changeset
   104
+/*
d07534556b03 Import sfw build 131
Cyril Plisko <cyril.plisko@grigale.com>
parents: 0
diff changeset
   105
+   +----------------------------------------------------------------------+
d07534556b03 Import sfw build 131
Cyril Plisko <cyril.plisko@grigale.com>
parents: 0
diff changeset
   106
+   | Zend Engine                                                          |
d07534556b03 Import sfw build 131
Cyril Plisko <cyril.plisko@grigale.com>
parents: 0
diff changeset
   107
+   +----------------------------------------------------------------------+
d07534556b03 Import sfw build 131
Cyril Plisko <cyril.plisko@grigale.com>
parents: 0
diff changeset
   108
+   | Copyright (c) 1998-2009 Zend Technologies Ltd. (http://www.zend.com) |
d07534556b03 Import sfw build 131
Cyril Plisko <cyril.plisko@grigale.com>
parents: 0
diff changeset
   109
+   +----------------------------------------------------------------------+
d07534556b03 Import sfw build 131
Cyril Plisko <cyril.plisko@grigale.com>
parents: 0
diff changeset
   110
+   | This source file is subject to version 2.00 of the Zend license,     |
d07534556b03 Import sfw build 131
Cyril Plisko <cyril.plisko@grigale.com>
parents: 0
diff changeset
   111
+   | that is bundled with this package in the file LICENSE, and is        |
d07534556b03 Import sfw build 131
Cyril Plisko <cyril.plisko@grigale.com>
parents: 0
diff changeset
   112
+   | available through the world-wide-web at the following url:           |
d07534556b03 Import sfw build 131
Cyril Plisko <cyril.plisko@grigale.com>
parents: 0
diff changeset
   113
+   | http://www.zend.com/license/2_00.txt.                                |
d07534556b03 Import sfw build 131
Cyril Plisko <cyril.plisko@grigale.com>
parents: 0
diff changeset
   114
+   | If you did not receive a copy of the Zend license and are unable to  |
d07534556b03 Import sfw build 131
Cyril Plisko <cyril.plisko@grigale.com>
parents: 0
diff changeset
   115
+   | obtain it through the world-wide-web, please send a note to          |
d07534556b03 Import sfw build 131
Cyril Plisko <cyril.plisko@grigale.com>
parents: 0
diff changeset
   116
+   | [email protected] so we can mail you a copy immediately.              |
d07534556b03 Import sfw build 131
Cyril Plisko <cyril.plisko@grigale.com>
parents: 0
diff changeset
   117
+   +----------------------------------------------------------------------+
d07534556b03 Import sfw build 131
Cyril Plisko <cyril.plisko@grigale.com>
parents: 0
diff changeset
   118
+   | Authors: David Soria Parra <[email protected]>                |
d07534556b03 Import sfw build 131
Cyril Plisko <cyril.plisko@grigale.com>
parents: 0
diff changeset
   119
+   +----------------------------------------------------------------------+
d07534556b03 Import sfw build 131
Cyril Plisko <cyril.plisko@grigale.com>
parents: 0
diff changeset
   120
+*/
d07534556b03 Import sfw build 131
Cyril Plisko <cyril.plisko@grigale.com>
parents: 0
diff changeset
   121
+
d07534556b03 Import sfw build 131
Cyril Plisko <cyril.plisko@grigale.com>
parents: 0
diff changeset
   122
+/* $Id: $ */
d07534556b03 Import sfw build 131
Cyril Plisko <cyril.plisko@grigale.com>
parents: 0
diff changeset
   123
+
d07534556b03 Import sfw build 131
Cyril Plisko <cyril.plisko@grigale.com>
parents: 0
diff changeset
   124
+#include "zend.h"
d07534556b03 Import sfw build 131
Cyril Plisko <cyril.plisko@grigale.com>
parents: 0
diff changeset
   125
+#include "zend_API.h"
d07534556b03 Import sfw build 131
Cyril Plisko <cyril.plisko@grigale.com>
parents: 0
diff changeset
   126
+#include "zend_dtrace.h"
d07534556b03 Import sfw build 131
Cyril Plisko <cyril.plisko@grigale.com>
parents: 0
diff changeset
   127
+
d07534556b03 Import sfw build 131
Cyril Plisko <cyril.plisko@grigale.com>
parents: 0
diff changeset
   128
+#ifdef HAVE_DTRACE
d07534556b03 Import sfw build 131
Cyril Plisko <cyril.plisko@grigale.com>
parents: 0
diff changeset
   129
+/* PHP DTrace probes {{{ */
d07534556b03 Import sfw build 131
Cyril Plisko <cyril.plisko@grigale.com>
parents: 0
diff changeset
   130
+ZEND_API char *dtrace_get_executed_filename(TSRMLS_D)
d07534556b03 Import sfw build 131
Cyril Plisko <cyril.plisko@grigale.com>
parents: 0
diff changeset
   131
+{
d07534556b03 Import sfw build 131
Cyril Plisko <cyril.plisko@grigale.com>
parents: 0
diff changeset
   132
+	if (EG(current_execute_data) && EG(current_execute_data)->op_array) {
d07534556b03 Import sfw build 131
Cyril Plisko <cyril.plisko@grigale.com>
parents: 0
diff changeset
   133
+		return EG(current_execute_data)->op_array->filename;
d07534556b03 Import sfw build 131
Cyril Plisko <cyril.plisko@grigale.com>
parents: 0
diff changeset
   134
+	} else {
d07534556b03 Import sfw build 131
Cyril Plisko <cyril.plisko@grigale.com>
parents: 0
diff changeset
   135
+		return zend_get_executed_filename(TSRMLS_C);
d07534556b03 Import sfw build 131
Cyril Plisko <cyril.plisko@grigale.com>
parents: 0
diff changeset
   136
+	}
d07534556b03 Import sfw build 131
Cyril Plisko <cyril.plisko@grigale.com>
parents: 0
diff changeset
   137
+}
d07534556b03 Import sfw build 131
Cyril Plisko <cyril.plisko@grigale.com>
parents: 0
diff changeset
   138
+
0
b34509ac961f Import sfw repo b126
Cyril Plisko <cyril.plisko@grigale.com>
parents:
diff changeset
   139
+ZEND_API zend_op_array *dtrace_compile_file(zend_file_handle *file_handle, int type TSRMLS_DC)
b34509ac961f Import sfw repo b126
Cyril Plisko <cyril.plisko@grigale.com>
parents:
diff changeset
   140
+{
b34509ac961f Import sfw repo b126
Cyril Plisko <cyril.plisko@grigale.com>
parents:
diff changeset
   141
+	zend_op_array *res;
b34509ac961f Import sfw repo b126
Cyril Plisko <cyril.plisko@grigale.com>
parents:
diff changeset
   142
+	DTRACE_COMPILE_FILE_ENTRY(file_handle->opened_path, file_handle->filename);
b34509ac961f Import sfw repo b126
Cyril Plisko <cyril.plisko@grigale.com>
parents:
diff changeset
   143
+	res = compile_file(file_handle, type TSRMLS_CC);
b34509ac961f Import sfw repo b126
Cyril Plisko <cyril.plisko@grigale.com>
parents:
diff changeset
   144
+	DTRACE_COMPILE_FILE_RETURN(file_handle->opened_path, file_handle->filename);
b34509ac961f Import sfw repo b126
Cyril Plisko <cyril.plisko@grigale.com>
parents:
diff changeset
   145
+
b34509ac961f Import sfw repo b126
Cyril Plisko <cyril.plisko@grigale.com>
parents:
diff changeset
   146
+	return res;
b34509ac961f Import sfw repo b126
Cyril Plisko <cyril.plisko@grigale.com>
parents:
diff changeset
   147
+}
b34509ac961f Import sfw repo b126
Cyril Plisko <cyril.plisko@grigale.com>
parents:
diff changeset
   148
+
5
d07534556b03 Import sfw build 131
Cyril Plisko <cyril.plisko@grigale.com>
parents: 0
diff changeset
   149
+/* We wrap the execute function to have fire the execute-entry/return and function-entry/return probes */
0
b34509ac961f Import sfw repo b126
Cyril Plisko <cyril.plisko@grigale.com>
parents:
diff changeset
   150
+ZEND_API void dtrace_execute(zend_op_array *op_array TSRMLS_DC)
b34509ac961f Import sfw repo b126
Cyril Plisko <cyril.plisko@grigale.com>
parents:
diff changeset
   151
+{
b34509ac961f Import sfw repo b126
Cyril Plisko <cyril.plisko@grigale.com>
parents:
diff changeset
   152
+	int lineno;
b34509ac961f Import sfw repo b126
Cyril Plisko <cyril.plisko@grigale.com>
parents:
diff changeset
   153
+	char *scope, *filename, *funcname, *classname;
b34509ac961f Import sfw repo b126
Cyril Plisko <cyril.plisko@grigale.com>
parents:
diff changeset
   154
+	scope = filename = funcname = classname = NULL;
5
d07534556b03 Import sfw build 131
Cyril Plisko <cyril.plisko@grigale.com>
parents: 0
diff changeset
   155
+
d07534556b03 Import sfw build 131
Cyril Plisko <cyril.plisko@grigale.com>
parents: 0
diff changeset
   156
+	/* we need filename and lineno for both execute and function probes */
0
b34509ac961f Import sfw repo b126
Cyril Plisko <cyril.plisko@grigale.com>
parents:
diff changeset
   157
+	if (DTRACE_EXECUTE_ENTRY_ENABLED() || DTRACE_EXECUTE_RETURN_ENABLED()) {
5
d07534556b03 Import sfw build 131
Cyril Plisko <cyril.plisko@grigale.com>
parents: 0
diff changeset
   158
+		filename = dtrace_get_executed_filename(TSRMLS_C);
0
b34509ac961f Import sfw repo b126
Cyril Plisko <cyril.plisko@grigale.com>
parents:
diff changeset
   159
+		lineno = zend_get_executed_lineno(TSRMLS_C);
b34509ac961f Import sfw repo b126
Cyril Plisko <cyril.plisko@grigale.com>
parents:
diff changeset
   160
+	}
5
d07534556b03 Import sfw build 131
Cyril Plisko <cyril.plisko@grigale.com>
parents: 0
diff changeset
   161
+
0
b34509ac961f Import sfw repo b126
Cyril Plisko <cyril.plisko@grigale.com>
parents:
diff changeset
   162
+	if (DTRACE_FUNCTION_ENTRY_ENABLED() || DTRACE_FUNCTION_RETURN_ENABLED()) {
5
d07534556b03 Import sfw build 131
Cyril Plisko <cyril.plisko@grigale.com>
parents: 0
diff changeset
   163
+		filename = dtrace_get_executed_filename(TSRMLS_C);
0
b34509ac961f Import sfw repo b126
Cyril Plisko <cyril.plisko@grigale.com>
parents:
diff changeset
   164
+		classname = get_active_class_name(&scope TSRMLS_CC);
b34509ac961f Import sfw repo b126
Cyril Plisko <cyril.plisko@grigale.com>
parents:
diff changeset
   165
+		funcname = get_active_function_name(TSRMLS_C);
b34509ac961f Import sfw repo b126
Cyril Plisko <cyril.plisko@grigale.com>
parents:
diff changeset
   166
+		lineno = zend_get_executed_lineno(TSRMLS_C);
b34509ac961f Import sfw repo b126
Cyril Plisko <cyril.plisko@grigale.com>
parents:
diff changeset
   167
+	}
5
d07534556b03 Import sfw build 131
Cyril Plisko <cyril.plisko@grigale.com>
parents: 0
diff changeset
   168
+
d07534556b03 Import sfw build 131
Cyril Plisko <cyril.plisko@grigale.com>
parents: 0
diff changeset
   169
+	if (DTRACE_EXECUTE_ENTRY_ENABLED()) {
d07534556b03 Import sfw build 131
Cyril Plisko <cyril.plisko@grigale.com>
parents: 0
diff changeset
   170
+		DTRACE_EXECUTE_ENTRY(filename, lineno);
d07534556b03 Import sfw build 131
Cyril Plisko <cyril.plisko@grigale.com>
parents: 0
diff changeset
   171
+	}
d07534556b03 Import sfw build 131
Cyril Plisko <cyril.plisko@grigale.com>
parents: 0
diff changeset
   172
+
d07534556b03 Import sfw build 131
Cyril Plisko <cyril.plisko@grigale.com>
parents: 0
diff changeset
   173
+	if (DTRACE_FUNCTION_ENTRY_ENABLED() && funcname != NULL) {
0
b34509ac961f Import sfw repo b126
Cyril Plisko <cyril.plisko@grigale.com>
parents:
diff changeset
   174
+		DTRACE_FUNCTION_ENTRY(funcname, filename, lineno, classname, scope);
b34509ac961f Import sfw repo b126
Cyril Plisko <cyril.plisko@grigale.com>
parents:
diff changeset
   175
+	}
b34509ac961f Import sfw repo b126
Cyril Plisko <cyril.plisko@grigale.com>
parents:
diff changeset
   176
+
b34509ac961f Import sfw repo b126
Cyril Plisko <cyril.plisko@grigale.com>
parents:
diff changeset
   177
+	execute(op_array TSRMLS_CC);
b34509ac961f Import sfw repo b126
Cyril Plisko <cyril.plisko@grigale.com>
parents:
diff changeset
   178
+
5
d07534556b03 Import sfw build 131
Cyril Plisko <cyril.plisko@grigale.com>
parents: 0
diff changeset
   179
+	if (DTRACE_FUNCTION_RETURN_ENABLED() && funcname != NULL) {
d07534556b03 Import sfw build 131
Cyril Plisko <cyril.plisko@grigale.com>
parents: 0
diff changeset
   180
+		DTRACE_FUNCTION_RETURN(funcname, filename, lineno, classname, scope);
d07534556b03 Import sfw build 131
Cyril Plisko <cyril.plisko@grigale.com>
parents: 0
diff changeset
   181
+	}
0
b34509ac961f Import sfw repo b126
Cyril Plisko <cyril.plisko@grigale.com>
parents:
diff changeset
   182
+
5
d07534556b03 Import sfw build 131
Cyril Plisko <cyril.plisko@grigale.com>
parents: 0
diff changeset
   183
+	if (DTRACE_EXECUTE_RETURN_ENABLED()) {
d07534556b03 Import sfw build 131
Cyril Plisko <cyril.plisko@grigale.com>
parents: 0
diff changeset
   184
+		DTRACE_EXECUTE_RETURN(filename, lineno);
0
b34509ac961f Import sfw repo b126
Cyril Plisko <cyril.plisko@grigale.com>
parents:
diff changeset
   185
+	}
b34509ac961f Import sfw repo b126
Cyril Plisko <cyril.plisko@grigale.com>
parents:
diff changeset
   186
+}
b34509ac961f Import sfw repo b126
Cyril Plisko <cyril.plisko@grigale.com>
parents:
diff changeset
   187
+
b34509ac961f Import sfw repo b126
Cyril Plisko <cyril.plisko@grigale.com>
parents:
diff changeset
   188
+ZEND_API void dtrace_execute_internal(zend_execute_data *execute_data_ptr, int return_value_used TSRMLS_DC)
b34509ac961f Import sfw repo b126
Cyril Plisko <cyril.plisko@grigale.com>
parents:
diff changeset
   189
+{
b34509ac961f Import sfw repo b126
Cyril Plisko <cyril.plisko@grigale.com>
parents:
diff changeset
   190
+	int lineno;
b34509ac961f Import sfw repo b126
Cyril Plisko <cyril.plisko@grigale.com>
parents:
diff changeset
   191
+	char *filename;
b34509ac961f Import sfw repo b126
Cyril Plisko <cyril.plisko@grigale.com>
parents:
diff changeset
   192
+	if (DTRACE_EXECUTE_ENTRY_ENABLED() || DTRACE_EXECUTE_RETURN_ENABLED()) {
5
d07534556b03 Import sfw build 131
Cyril Plisko <cyril.plisko@grigale.com>
parents: 0
diff changeset
   193
+		filename = dtrace_get_executed_filename(TSRMLS_C);
0
b34509ac961f Import sfw repo b126
Cyril Plisko <cyril.plisko@grigale.com>
parents:
diff changeset
   194
+		lineno = zend_get_executed_lineno(TSRMLS_C);
b34509ac961f Import sfw repo b126
Cyril Plisko <cyril.plisko@grigale.com>
parents:
diff changeset
   195
+	}
b34509ac961f Import sfw repo b126
Cyril Plisko <cyril.plisko@grigale.com>
parents:
diff changeset
   196
+
5
d07534556b03 Import sfw build 131
Cyril Plisko <cyril.plisko@grigale.com>
parents: 0
diff changeset
   197
+	if (DTRACE_EXECUTE_ENTRY_ENABLED()) {
d07534556b03 Import sfw build 131
Cyril Plisko <cyril.plisko@grigale.com>
parents: 0
diff changeset
   198
+		DTRACE_EXECUTE_ENTRY(filename, lineno);
d07534556b03 Import sfw build 131
Cyril Plisko <cyril.plisko@grigale.com>
parents: 0
diff changeset
   199
+	}
0
b34509ac961f Import sfw repo b126
Cyril Plisko <cyril.plisko@grigale.com>
parents:
diff changeset
   200
+
5
d07534556b03 Import sfw build 131
Cyril Plisko <cyril.plisko@grigale.com>
parents: 0
diff changeset
   201
+	execute_internal(execute_data_ptr, return_value_used TSRMLS_CC);
0
b34509ac961f Import sfw repo b126
Cyril Plisko <cyril.plisko@grigale.com>
parents:
diff changeset
   202
+
5
d07534556b03 Import sfw build 131
Cyril Plisko <cyril.plisko@grigale.com>
parents: 0
diff changeset
   203
+	if (DTRACE_EXECUTE_RETURN_ENABLED()) {
d07534556b03 Import sfw build 131
Cyril Plisko <cyril.plisko@grigale.com>
parents: 0
diff changeset
   204
+		DTRACE_EXECUTE_RETURN(filename, lineno);
d07534556b03 Import sfw build 131
Cyril Plisko <cyril.plisko@grigale.com>
parents: 0
diff changeset
   205
+	}
0
b34509ac961f Import sfw repo b126
Cyril Plisko <cyril.plisko@grigale.com>
parents:
diff changeset
   206
+}
b34509ac961f Import sfw repo b126
Cyril Plisko <cyril.plisko@grigale.com>
parents:
diff changeset
   207
+
5
d07534556b03 Import sfw build 131
Cyril Plisko <cyril.plisko@grigale.com>
parents: 0
diff changeset
   208
+/* }}} */
d07534556b03 Import sfw build 131
Cyril Plisko <cyril.plisko@grigale.com>
parents: 0
diff changeset
   209
+#endif /* HAVE_DTRACE */
0
b34509ac961f Import sfw repo b126
Cyril Plisko <cyril.plisko@grigale.com>
parents:
diff changeset
   210
+
5
d07534556b03 Import sfw build 131
Cyril Plisko <cyril.plisko@grigale.com>
parents: 0
diff changeset
   211
Index: php-5.2.9/Zend/zend_dtrace_gen.php
d07534556b03 Import sfw build 131
Cyril Plisko <cyril.plisko@grigale.com>
parents: 0
diff changeset
   212
===================================================================
d07534556b03 Import sfw build 131
Cyril Plisko <cyril.plisko@grigale.com>
parents: 0
diff changeset
   213
--- php-5.2.9.orig/Zend/zend_dtrace_gen.php  Thu Apr 02 22:18:32 2009 +0200
d07534556b03 Import sfw build 131
Cyril Plisko <cyril.plisko@grigale.com>
parents: 0
diff changeset
   214
+++ php-5.2.9/Zend/zend_dtrace_gen.php  Thu Apr 02 22:18:32 2009 +0200
0
b34509ac961f Import sfw repo b126
Cyril Plisko <cyril.plisko@grigale.com>
parents:
diff changeset
   215
@@ -0,0 +1,32 @@
b34509ac961f Import sfw repo b126
Cyril Plisko <cyril.plisko@grigale.com>
parents:
diff changeset
   216
+<?php
b34509ac961f Import sfw repo b126
Cyril Plisko <cyril.plisko@grigale.com>
parents:
diff changeset
   217
+/*
b34509ac961f Import sfw repo b126
Cyril Plisko <cyril.plisko@grigale.com>
parents:
diff changeset
   218
+   +----------------------------------------------------------------------+
b34509ac961f Import sfw repo b126
Cyril Plisko <cyril.plisko@grigale.com>
parents:
diff changeset
   219
+   | Zend Engine                                                          |
b34509ac961f Import sfw repo b126
Cyril Plisko <cyril.plisko@grigale.com>
parents:
diff changeset
   220
+   +----------------------------------------------------------------------+
b34509ac961f Import sfw repo b126
Cyril Plisko <cyril.plisko@grigale.com>
parents:
diff changeset
   221
+   | Copyright (c) 1998-2009 Zend Technologies Ltd. (http://www.zend.com) |
b34509ac961f Import sfw repo b126
Cyril Plisko <cyril.plisko@grigale.com>
parents:
diff changeset
   222
+   +----------------------------------------------------------------------+
b34509ac961f Import sfw repo b126
Cyril Plisko <cyril.plisko@grigale.com>
parents:
diff changeset
   223
+   | This source file is subject to version 2.00 of the Zend license,     |
b34509ac961f Import sfw repo b126
Cyril Plisko <cyril.plisko@grigale.com>
parents:
diff changeset
   224
+   | that is bundled with this package in the file LICENSE, and is        |
b34509ac961f Import sfw repo b126
Cyril Plisko <cyril.plisko@grigale.com>
parents:
diff changeset
   225
+   | available through the world-wide-web at the following url:           |
b34509ac961f Import sfw repo b126
Cyril Plisko <cyril.plisko@grigale.com>
parents:
diff changeset
   226
+   | http://www.zend.com/license/2_00.txt.                                |
b34509ac961f Import sfw repo b126
Cyril Plisko <cyril.plisko@grigale.com>
parents:
diff changeset
   227
+   | If you did not receive a copy of the Zend license and are unable to  |
b34509ac961f Import sfw repo b126
Cyril Plisko <cyril.plisko@grigale.com>
parents:
diff changeset
   228
+   | obtain it through the world-wide-web, please send a note to          |
b34509ac961f Import sfw repo b126
Cyril Plisko <cyril.plisko@grigale.com>
parents:
diff changeset
   229
+   | [email protected] so we can mail you a copy immediately.              |
b34509ac961f Import sfw repo b126
Cyril Plisko <cyril.plisko@grigale.com>
parents:
diff changeset
   230
+   +----------------------------------------------------------------------+
b34509ac961f Import sfw repo b126
Cyril Plisko <cyril.plisko@grigale.com>
parents:
diff changeset
   231
+   | Authors: David Soria Parra <[email protected]>                |
b34509ac961f Import sfw repo b126
Cyril Plisko <cyril.plisko@grigale.com>
parents:
diff changeset
   232
+   +----------------------------------------------------------------------+
b34509ac961f Import sfw repo b126
Cyril Plisko <cyril.plisko@grigale.com>
parents:
diff changeset
   233
+
b34509ac961f Import sfw repo b126
Cyril Plisko <cyril.plisko@grigale.com>
parents:
diff changeset
   234
+   $Id:$
b34509ac961f Import sfw repo b126
Cyril Plisko <cyril.plisko@grigale.com>
parents:
diff changeset
   235
+*/
b34509ac961f Import sfw repo b126
Cyril Plisko <cyril.plisko@grigale.com>
parents:
diff changeset
   236
+
b34509ac961f Import sfw repo b126
Cyril Plisko <cyril.plisko@grigale.com>
parents:
diff changeset
   237
+echo "regenerating zend_dtrace.h\n";
b34509ac961f Import sfw repo b126
Cyril Plisko <cyril.plisko@grigale.com>
parents:
diff changeset
   238
+system('dtrace -h -s zend_dtrace.d');
b34509ac961f Import sfw repo b126
Cyril Plisko <cyril.plisko@grigale.com>
parents:
diff changeset
   239
+
b34509ac961f Import sfw repo b126
Cyril Plisko <cyril.plisko@grigale.com>
parents:
diff changeset
   240
+echo "renaming probe definitions\n";
b34509ac961f Import sfw repo b126
Cyril Plisko <cyril.plisko@grigale.com>
parents:
diff changeset
   241
+$content = file_get_contents('zend_dtrace.h');
5
d07534556b03 Import sfw build 131
Cyril Plisko <cyril.plisko@grigale.com>
parents: 0
diff changeset
   242
+$content = str_replace('#define        PHP_', '#define DTRACE_', $content);
0
b34509ac961f Import sfw repo b126
Cyril Plisko <cyril.plisko@grigale.com>
parents:
diff changeset
   243
+$content = str_replace('PHP_STABILITY', 'DTRACE_STABILITY', $content);
b34509ac961f Import sfw repo b126
Cyril Plisko <cyril.plisko@grigale.com>
parents:
diff changeset
   244
+$content = str_replace('PHP_TYPEDEFS', 'DTRACE_TYPEDEFS', $content);
b34509ac961f Import sfw repo b126
Cyril Plisko <cyril.plisko@grigale.com>
parents:
diff changeset
   245
+$content = str_replace('#if _DTRACE_VERSION', '#if _DTRACE_VERSION && HAVE_SYS_SDT_H', $content);
b34509ac961f Import sfw repo b126
Cyril Plisko <cyril.plisko@grigale.com>
parents:
diff changeset
   246
+file_put_contents('zend_dtrace.h', $content);
b34509ac961f Import sfw repo b126
Cyril Plisko <cyril.plisko@grigale.com>
parents:
diff changeset
   247
+
5
d07534556b03 Import sfw build 131
Cyril Plisko <cyril.plisko@grigale.com>
parents: 0
diff changeset
   248
Index: php-5.2.11/Zend/zend.c
d07534556b03 Import sfw build 131
Cyril Plisko <cyril.plisko@grigale.com>
parents: 0
diff changeset
   249
===================================================================
d07534556b03 Import sfw build 131
Cyril Plisko <cyril.plisko@grigale.com>
parents: 0
diff changeset
   250
--- php-5.2.11.orig/Zend/zend.c	2009-11-02 02:59:10.971196190 +0100
d07534556b03 Import sfw build 131
Cyril Plisko <cyril.plisko@grigale.com>
parents: 0
diff changeset
   251
+++ php-5.2.11/Zend/zend.c	2009-11-02 02:59:56.087087949 +0100
d07534556b03 Import sfw build 131
Cyril Plisko <cyril.plisko@grigale.com>
parents: 0
diff changeset
   252
@@ -28,6 +28,7 @@
d07534556b03 Import sfw build 131
Cyril Plisko <cyril.plisko@grigale.com>
parents: 0
diff changeset
   253
 #include "zend_exceptions.h"
d07534556b03 Import sfw build 131
Cyril Plisko <cyril.plisko@grigale.com>
parents: 0
diff changeset
   254
 #include "zend_builtin_functions.h"
d07534556b03 Import sfw build 131
Cyril Plisko <cyril.plisko@grigale.com>
parents: 0
diff changeset
   255
 #include "zend_ini.h"
d07534556b03 Import sfw build 131
Cyril Plisko <cyril.plisko@grigale.com>
parents: 0
diff changeset
   256
+#include "zend_dtrace.h"
d07534556b03 Import sfw build 131
Cyril Plisko <cyril.plisko@grigale.com>
parents: 0
diff changeset
   257
 
d07534556b03 Import sfw build 131
Cyril Plisko <cyril.plisko@grigale.com>
parents: 0
diff changeset
   258
 #ifdef ZTS
d07534556b03 Import sfw build 131
Cyril Plisko <cyril.plisko@grigale.com>
parents: 0
diff changeset
   259
 #   define GLOBAL_FUNCTION_TABLE    global_function_table
d07534556b03 Import sfw build 131
Cyril Plisko <cyril.plisko@grigale.com>
parents: 0
diff changeset
   260
@@ -603,10 +604,17 @@
d07534556b03 Import sfw build 131
Cyril Plisko <cyril.plisko@grigale.com>
parents: 0
diff changeset
   261
 	zend_vspprintf = utility_functions->vspprintf_function;
d07534556b03 Import sfw build 131
Cyril Plisko <cyril.plisko@grigale.com>
parents: 0
diff changeset
   262
 	zend_getenv = utility_functions->getenv_function;
d07534556b03 Import sfw build 131
Cyril Plisko <cyril.plisko@grigale.com>
parents: 0
diff changeset
   263
 
d07534556b03 Import sfw build 131
Cyril Plisko <cyril.plisko@grigale.com>
parents: 0
diff changeset
   264
+#if HAVE_DTRACE
d07534556b03 Import sfw build 131
Cyril Plisko <cyril.plisko@grigale.com>
parents: 0
diff changeset
   265
+/* build with dtrace support */
d07534556b03 Import sfw build 131
Cyril Plisko <cyril.plisko@grigale.com>
parents: 0
diff changeset
   266
+	zend_compile_file = dtrace_compile_file;
d07534556b03 Import sfw build 131
Cyril Plisko <cyril.plisko@grigale.com>
parents: 0
diff changeset
   267
+	zend_execute = dtrace_execute;
d07534556b03 Import sfw build 131
Cyril Plisko <cyril.plisko@grigale.com>
parents: 0
diff changeset
   268
+	zend_execute_internal = dtrace_execute_internal;
d07534556b03 Import sfw build 131
Cyril Plisko <cyril.plisko@grigale.com>
parents: 0
diff changeset
   269
+#else
d07534556b03 Import sfw build 131
Cyril Plisko <cyril.plisko@grigale.com>
parents: 0
diff changeset
   270
 	zend_compile_file = compile_file;
d07534556b03 Import sfw build 131
Cyril Plisko <cyril.plisko@grigale.com>
parents: 0
diff changeset
   271
-	zend_compile_string = compile_string;
d07534556b03 Import sfw build 131
Cyril Plisko <cyril.plisko@grigale.com>
parents: 0
diff changeset
   272
 	zend_execute = execute;
d07534556b03 Import sfw build 131
Cyril Plisko <cyril.plisko@grigale.com>
parents: 0
diff changeset
   273
 	zend_execute_internal = NULL;
d07534556b03 Import sfw build 131
Cyril Plisko <cyril.plisko@grigale.com>
parents: 0
diff changeset
   274
+#endif /* HAVE_SYS_SDT_H */
d07534556b03 Import sfw build 131
Cyril Plisko <cyril.plisko@grigale.com>
parents: 0
diff changeset
   275
+	zend_compile_string = compile_string;
d07534556b03 Import sfw build 131
Cyril Plisko <cyril.plisko@grigale.com>
parents: 0
diff changeset
   276
 	zend_throw_exception_hook = NULL;
d07534556b03 Import sfw build 131
Cyril Plisko <cyril.plisko@grigale.com>
parents: 0
diff changeset
   277
 
d07534556b03 Import sfw build 131
Cyril Plisko <cyril.plisko@grigale.com>
parents: 0
diff changeset
   278
 	zend_init_opcodes_handlers();
d07534556b03 Import sfw build 131
Cyril Plisko <cyril.plisko@grigale.com>
parents: 0
diff changeset
   279
@@ -961,6 +970,15 @@
d07534556b03 Import sfw build 131
Cyril Plisko <cyril.plisko@grigale.com>
parents: 0
diff changeset
   280
 
d07534556b03 Import sfw build 131
Cyril Plisko <cyril.plisko@grigale.com>
parents: 0
diff changeset
   281
 	va_start(args, format);
d07534556b03 Import sfw build 131
Cyril Plisko <cyril.plisko@grigale.com>
parents: 0
diff changeset
   282
 
d07534556b03 Import sfw build 131
Cyril Plisko <cyril.plisko@grigale.com>
parents: 0
diff changeset
   283
+#ifdef HAVE_DTRACE
d07534556b03 Import sfw build 131
Cyril Plisko <cyril.plisko@grigale.com>
parents: 0
diff changeset
   284
+	if(DTRACE_ERROR_ENABLED()) {
d07534556b03 Import sfw build 131
Cyril Plisko <cyril.plisko@grigale.com>
parents: 0
diff changeset
   285
+		char *dtrace_error_buffer;
d07534556b03 Import sfw build 131
Cyril Plisko <cyril.plisko@grigale.com>
parents: 0
diff changeset
   286
+		zend_vspprintf(&dtrace_error_buffer, 0, format, args);
d07534556b03 Import sfw build 131
Cyril Plisko <cyril.plisko@grigale.com>
parents: 0
diff changeset
   287
+		DTRACE_ERROR(dtrace_error_buffer, error_filename, error_lineno);
d07534556b03 Import sfw build 131
Cyril Plisko <cyril.plisko@grigale.com>
parents: 0
diff changeset
   288
+		efree(dtrace_error_buffer);
d07534556b03 Import sfw build 131
Cyril Plisko <cyril.plisko@grigale.com>
parents: 0
diff changeset
   289
+	}
d07534556b03 Import sfw build 131
Cyril Plisko <cyril.plisko@grigale.com>
parents: 0
diff changeset
   290
+#endif /* HAVE_DTRACE */
d07534556b03 Import sfw build 131
Cyril Plisko <cyril.plisko@grigale.com>
parents: 0
diff changeset
   291
+
d07534556b03 Import sfw build 131
Cyril Plisko <cyril.plisko@grigale.com>
parents: 0
diff changeset
   292
 	/* if we don't have a user defined error handler */
d07534556b03 Import sfw build 131
Cyril Plisko <cyril.plisko@grigale.com>
parents: 0
diff changeset
   293
 	if (!EG(user_error_handler)
d07534556b03 Import sfw build 131
Cyril Plisko <cyril.plisko@grigale.com>
parents: 0
diff changeset
   294
 		|| !(EG(user_error_handler_error_reporting) & type)) {
d07534556b03 Import sfw build 131
Cyril Plisko <cyril.plisko@grigale.com>
parents: 0
diff changeset
   295
Index: php-5.2.12/Zend/zend_API.c
d07534556b03 Import sfw build 131
Cyril Plisko <cyril.plisko@grigale.com>
parents: 0
diff changeset
   296
===================================================================
d07534556b03 Import sfw build 131
Cyril Plisko <cyril.plisko@grigale.com>
parents: 0
diff changeset
   297
--- php-5.2.12.orig/Zend/zend_API.c.NEW2	Sat Sep  5 12:01:06 2009
d07534556b03 Import sfw build 131
Cyril Plisko <cyril.plisko@grigale.com>
parents: 0
diff changeset
   298
+++ php-5.2.12/Zend/zend_API.c	Thu Dec 17 18:48:23 2009
d07534556b03 Import sfw build 131
Cyril Plisko <cyril.plisko@grigale.com>
parents: 0
diff changeset
   299
@@ -25,11 +25,16 @@
d07534556b03 Import sfw build 131
Cyril Plisko <cyril.plisko@grigale.com>
parents: 0
diff changeset
   300
 #include "zend_API.h"
d07534556b03 Import sfw build 131
Cyril Plisko <cyril.plisko@grigale.com>
parents: 0
diff changeset
   301
 #include "zend_modules.h"
d07534556b03 Import sfw build 131
Cyril Plisko <cyril.plisko@grigale.com>
parents: 0
diff changeset
   302
 #include "zend_constants.h"
d07534556b03 Import sfw build 131
Cyril Plisko <cyril.plisko@grigale.com>
parents: 0
diff changeset
   303
+#include "zend_dtrace.h"
d07534556b03 Import sfw build 131
Cyril Plisko <cyril.plisko@grigale.com>
parents: 0
diff changeset
   304
 
d07534556b03 Import sfw build 131
Cyril Plisko <cyril.plisko@grigale.com>
parents: 0
diff changeset
   305
 #ifdef HAVE_STDARG_H
d07534556b03 Import sfw build 131
Cyril Plisko <cyril.plisko@grigale.com>
parents: 0
diff changeset
   306
 #include <stdarg.h>
d07534556b03 Import sfw build 131
Cyril Plisko <cyril.plisko@grigale.com>
parents: 0
diff changeset
   307
 #endif
d07534556b03 Import sfw build 131
Cyril Plisko <cyril.plisko@grigale.com>
parents: 0
diff changeset
   308
 
d07534556b03 Import sfw build 131
Cyril Plisko <cyril.plisko@grigale.com>
parents: 0
diff changeset
   309
+#ifdef HAVE_DTRACE
d07534556b03 Import sfw build 131
Cyril Plisko <cyril.plisko@grigale.com>
parents: 0
diff changeset
   310
+extern char* dtrace_get_executed_filename(TSRMLS_D);
d07534556b03 Import sfw build 131
Cyril Plisko <cyril.plisko@grigale.com>
parents: 0
diff changeset
   311
+#endif
d07534556b03 Import sfw build 131
Cyril Plisko <cyril.plisko@grigale.com>
parents: 0
diff changeset
   312
+
d07534556b03 Import sfw build 131
Cyril Plisko <cyril.plisko@grigale.com>
parents: 0
diff changeset
   313
 /* these variables are true statics/globals, and have to be mutex'ed on every access */
d07534556b03 Import sfw build 131
Cyril Plisko <cyril.plisko@grigale.com>
parents: 0
diff changeset
   314
 static int module_count=0;
d07534556b03 Import sfw build 131
Cyril Plisko <cyril.plisko@grigale.com>
parents: 0
diff changeset
   315
 ZEND_API HashTable module_registry;
d07534556b03 Import sfw build 131
Cyril Plisko <cyril.plisko@grigale.com>
parents: 0
diff changeset
   316
@@ -942,6 +947,17 @@
d07534556b03 Import sfw build 131
Cyril Plisko <cyril.plisko@grigale.com>
parents: 0
diff changeset
   317
 		zend_error(E_ERROR, "Cannot instantiate %s %s", what, class_type->name);
d07534556b03 Import sfw build 131
Cyril Plisko <cyril.plisko@grigale.com>
parents: 0
diff changeset
   318
 	}
d07534556b03 Import sfw build 131
Cyril Plisko <cyril.plisko@grigale.com>
parents: 0
diff changeset
   319
 
d07534556b03 Import sfw build 131
Cyril Plisko <cyril.plisko@grigale.com>
parents: 0
diff changeset
   320
+#ifdef HAVE_DTRACE
d07534556b03 Import sfw build 131
Cyril Plisko <cyril.plisko@grigale.com>
parents: 0
diff changeset
   321
+	if (DTRACE_OBJECT_CREATE_ENABLED()) {
d07534556b03 Import sfw build 131
Cyril Plisko <cyril.plisko@grigale.com>
parents: 0
diff changeset
   322
+		char *filename;
d07534556b03 Import sfw build 131
Cyril Plisko <cyril.plisko@grigale.com>
parents: 0
diff changeset
   323
+		int lineno;
d07534556b03 Import sfw build 131
Cyril Plisko <cyril.plisko@grigale.com>
parents: 0
diff changeset
   324
+
d07534556b03 Import sfw build 131
Cyril Plisko <cyril.plisko@grigale.com>
parents: 0
diff changeset
   325
+		filename = dtrace_get_executed_filename(TSRMLS_C);
d07534556b03 Import sfw build 131
Cyril Plisko <cyril.plisko@grigale.com>
parents: 0
diff changeset
   326
+		lineno = zend_get_executed_lineno(TSRMLS_C);
d07534556b03 Import sfw build 131
Cyril Plisko <cyril.plisko@grigale.com>
parents: 0
diff changeset
   327
+		DTRACE_OBJECT_CREATE(class_type->name, filename, lineno);
d07534556b03 Import sfw build 131
Cyril Plisko <cyril.plisko@grigale.com>
parents: 0
diff changeset
   328
+	}
d07534556b03 Import sfw build 131
Cyril Plisko <cyril.plisko@grigale.com>
parents: 0
diff changeset
   329
+#endif /* HAVE_DTRACE */
d07534556b03 Import sfw build 131
Cyril Plisko <cyril.plisko@grigale.com>
parents: 0
diff changeset
   330
+
d07534556b03 Import sfw build 131
Cyril Plisko <cyril.plisko@grigale.com>
parents: 0
diff changeset
   331
 	zend_update_class_constants(class_type TSRMLS_CC);
d07534556b03 Import sfw build 131
Cyril Plisko <cyril.plisko@grigale.com>
parents: 0
diff changeset
   332
 
d07534556b03 Import sfw build 131
Cyril Plisko <cyril.plisko@grigale.com>
parents: 0
diff changeset
   333
 	Z_TYPE_P(arg) = IS_OBJECT;
d07534556b03 Import sfw build 131
Cyril Plisko <cyril.plisko@grigale.com>
parents: 0
diff changeset
   334
Index: php-5.2.12/Zend/zend_objects.c
d07534556b03 Import sfw build 131
Cyril Plisko <cyril.plisko@grigale.com>
parents: 0
diff changeset
   335
===================================================================
d07534556b03 Import sfw build 131
Cyril Plisko <cyril.plisko@grigale.com>
parents: 0
diff changeset
   336
--- php-5.2.12.orig/Zend/zend_objects.c	Mon Oct 12 10:09:11 2009
d07534556b03 Import sfw build 131
Cyril Plisko <cyril.plisko@grigale.com>
parents: 0
diff changeset
   337
+++ php-5.2.12/Zend/zend_objects.c	Thu Dec 17 18:48:23 2009
d07534556b03 Import sfw build 131
Cyril Plisko <cyril.plisko@grigale.com>
parents: 0
diff changeset
   338
@@ -25,6 +25,7 @@
d07534556b03 Import sfw build 131
Cyril Plisko <cyril.plisko@grigale.com>
parents: 0
diff changeset
   339
 #include "zend_API.h"
d07534556b03 Import sfw build 131
Cyril Plisko <cyril.plisko@grigale.com>
parents: 0
diff changeset
   340
 #include "zend_interfaces.h"
d07534556b03 Import sfw build 131
Cyril Plisko <cyril.plisko@grigale.com>
parents: 0
diff changeset
   341
 #include "zend_exceptions.h"
d07534556b03 Import sfw build 131
Cyril Plisko <cyril.plisko@grigale.com>
parents: 0
diff changeset
   342
+#include "zend_dtrace.h"
d07534556b03 Import sfw build 131
Cyril Plisko <cyril.plisko@grigale.com>
parents: 0
diff changeset
   343
 
d07534556b03 Import sfw build 131
Cyril Plisko <cyril.plisko@grigale.com>
parents: 0
diff changeset
   344
 ZEND_API void zend_object_std_init(zend_object *object, zend_class_entry *ce TSRMLS_DC)
d07534556b03 Import sfw build 131
Cyril Plisko <cyril.plisko@grigale.com>
parents: 0
diff changeset
   345
 {
d07534556b03 Import sfw build 131
Cyril Plisko <cyril.plisko@grigale.com>
parents: 0
diff changeset
   346
@@ -51,6 +52,16 @@
d07534556b03 Import sfw build 131
Cyril Plisko <cyril.plisko@grigale.com>
parents: 0
diff changeset
   347
 {
d07534556b03 Import sfw build 131
Cyril Plisko <cyril.plisko@grigale.com>
parents: 0
diff changeset
   348
 	zend_function *destructor = object ? object->ce->destructor : NULL;
d07534556b03 Import sfw build 131
Cyril Plisko <cyril.plisko@grigale.com>
parents: 0
diff changeset
   349
 
d07534556b03 Import sfw build 131
Cyril Plisko <cyril.plisko@grigale.com>
parents: 0
diff changeset
   350
+#ifdef HAVE_DTRACE
d07534556b03 Import sfw build 131
Cyril Plisko <cyril.plisko@grigale.com>
parents: 0
diff changeset
   351
+	if (DTRACE_OBJECT_DESTROY_ENABLED()) {
d07534556b03 Import sfw build 131
Cyril Plisko <cyril.plisko@grigale.com>
parents: 0
diff changeset
   352
+		char *filename;
d07534556b03 Import sfw build 131
Cyril Plisko <cyril.plisko@grigale.com>
parents: 0
diff changeset
   353
+		int lineno;
d07534556b03 Import sfw build 131
Cyril Plisko <cyril.plisko@grigale.com>
parents: 0
diff changeset
   354
+
d07534556b03 Import sfw build 131
Cyril Plisko <cyril.plisko@grigale.com>
parents: 0
diff changeset
   355
+		filename = dtrace_get_executed_filename(TSRMLS_C);
d07534556b03 Import sfw build 131
Cyril Plisko <cyril.plisko@grigale.com>
parents: 0
diff changeset
   356
+		lineno = zend_get_executed_lineno(TSRMLS_C);
d07534556b03 Import sfw build 131
Cyril Plisko <cyril.plisko@grigale.com>
parents: 0
diff changeset
   357
+		DTRACE_OBJECT_DESTROY(object->ce->name, filename, lineno);
d07534556b03 Import sfw build 131
Cyril Plisko <cyril.plisko@grigale.com>
parents: 0
diff changeset
   358
+	}
d07534556b03 Import sfw build 131
Cyril Plisko <cyril.plisko@grigale.com>
parents: 0
diff changeset
   359
+#endif /* HAVE_DTRACE */
d07534556b03 Import sfw build 131
Cyril Plisko <cyril.plisko@grigale.com>
parents: 0
diff changeset
   360
 	if (destructor) {
d07534556b03 Import sfw build 131
Cyril Plisko <cyril.plisko@grigale.com>
parents: 0
diff changeset
   361
 		zval *obj;
d07534556b03 Import sfw build 131
Cyril Plisko <cyril.plisko@grigale.com>
parents: 0
diff changeset
   362
 		zval *old_exception;
d07534556b03 Import sfw build 131
Cyril Plisko <cyril.plisko@grigale.com>
parents: 0
diff changeset
   363
Index: php-5.2.11/Zend/zend_exceptions.c
d07534556b03 Import sfw build 131
Cyril Plisko <cyril.plisko@grigale.com>
parents: 0
diff changeset
   364
===================================================================
d07534556b03 Import sfw build 131
Cyril Plisko <cyril.plisko@grigale.com>
parents: 0
diff changeset
   365
--- php-5.2.11.orig/Zend/zend_exceptions.c	2009-11-02 02:59:10.970676604 +0100
d07534556b03 Import sfw build 131
Cyril Plisko <cyril.plisko@grigale.com>
parents: 0
diff changeset
   366
+++ php-5.2.11/Zend/zend_exceptions.c	2009-11-02 02:59:56.084156777 +0100
0
b34509ac961f Import sfw repo b126
Cyril Plisko <cyril.plisko@grigale.com>
parents:
diff changeset
   367
@@ -26,6 +26,7 @@
b34509ac961f Import sfw repo b126
Cyril Plisko <cyril.plisko@grigale.com>
parents:
diff changeset
   368
 #include "zend_builtin_functions.h"
b34509ac961f Import sfw repo b126
Cyril Plisko <cyril.plisko@grigale.com>
parents:
diff changeset
   369
 #include "zend_interfaces.h"
b34509ac961f Import sfw repo b126
Cyril Plisko <cyril.plisko@grigale.com>
parents:
diff changeset
   370
 #include "zend_exceptions.h"
b34509ac961f Import sfw repo b126
Cyril Plisko <cyril.plisko@grigale.com>
parents:
diff changeset
   371
+#include "zend_dtrace.h"
b34509ac961f Import sfw repo b126
Cyril Plisko <cyril.plisko@grigale.com>
parents:
diff changeset
   372
 
b34509ac961f Import sfw repo b126
Cyril Plisko <cyril.plisko@grigale.com>
parents:
diff changeset
   373
 zend_class_entry *default_exception_ce;
b34509ac961f Import sfw repo b126
Cyril Plisko <cyril.plisko@grigale.com>
parents:
diff changeset
   374
 zend_class_entry *error_exception_ce;
5
d07534556b03 Import sfw build 131
Cyril Plisko <cyril.plisko@grigale.com>
parents: 0
diff changeset
   375
@@ -34,6 +35,15 @@
0
b34509ac961f Import sfw repo b126
Cyril Plisko <cyril.plisko@grigale.com>
parents:
diff changeset
   376
 
b34509ac961f Import sfw repo b126
Cyril Plisko <cyril.plisko@grigale.com>
parents:
diff changeset
   377
 void zend_throw_exception_internal(zval *exception TSRMLS_DC) /* {{{ */
b34509ac961f Import sfw repo b126
Cyril Plisko <cyril.plisko@grigale.com>
parents:
diff changeset
   378
 {
5
d07534556b03 Import sfw build 131
Cyril Plisko <cyril.plisko@grigale.com>
parents: 0
diff changeset
   379
+#ifdef HAVE_DTRACE
0
b34509ac961f Import sfw repo b126
Cyril Plisko <cyril.plisko@grigale.com>
parents:
diff changeset
   380
+	if (DTRACE_EXCEPTION_THROWN_ENABLED()) {
5
d07534556b03 Import sfw build 131
Cyril Plisko <cyril.plisko@grigale.com>
parents: 0
diff changeset
   381
+		char *classname;
0
b34509ac961f Import sfw repo b126
Cyril Plisko <cyril.plisko@grigale.com>
parents:
diff changeset
   382
+		int name_len;
5
d07534556b03 Import sfw build 131
Cyril Plisko <cyril.plisko@grigale.com>
parents: 0
diff changeset
   383
+		zend_get_object_classname(exception, &classname, &name_len TSRMLS_CC);
d07534556b03 Import sfw build 131
Cyril Plisko <cyril.plisko@grigale.com>
parents: 0
diff changeset
   384
+		DTRACE_EXCEPTION_THROWN(classname);
0
b34509ac961f Import sfw repo b126
Cyril Plisko <cyril.plisko@grigale.com>
parents:
diff changeset
   385
+	}
5
d07534556b03 Import sfw build 131
Cyril Plisko <cyril.plisko@grigale.com>
parents: 0
diff changeset
   386
+#endif /* HAVE_DTRACE */
0
b34509ac961f Import sfw repo b126
Cyril Plisko <cyril.plisko@grigale.com>
parents:
diff changeset
   387
+
b34509ac961f Import sfw repo b126
Cyril Plisko <cyril.plisko@grigale.com>
parents:
diff changeset
   388
 	if (exception != NULL) {
b34509ac961f Import sfw repo b126
Cyril Plisko <cyril.plisko@grigale.com>
parents:
diff changeset
   389
 		if (EG(exception)) {
b34509ac961f Import sfw repo b126
Cyril Plisko <cyril.plisko@grigale.com>
parents:
diff changeset
   390
 			/* FIXME:  bail out? */
5
d07534556b03 Import sfw build 131
Cyril Plisko <cyril.plisko@grigale.com>
parents: 0
diff changeset
   391
Index: php-5.2.11/Zend/zend_execute.c
d07534556b03 Import sfw build 131
Cyril Plisko <cyril.plisko@grigale.com>
parents: 0
diff changeset
   392
===================================================================
d07534556b03 Import sfw build 131
Cyril Plisko <cyril.plisko@grigale.com>
parents: 0
diff changeset
   393
--- php-5.2.11.orig/Zend/zend_execute.c	2009-11-02 02:59:10.971029046 +0100
d07534556b03 Import sfw build 131
Cyril Plisko <cyril.plisko@grigale.com>
parents: 0
diff changeset
   394
+++ php-5.2.11/Zend/zend_execute.c	2009-11-02 02:59:56.084688879 +0100
0
b34509ac961f Import sfw repo b126
Cyril Plisko <cyril.plisko@grigale.com>
parents:
diff changeset
   395
@@ -35,6 +35,7 @@
b34509ac961f Import sfw repo b126
Cyril Plisko <cyril.plisko@grigale.com>
parents:
diff changeset
   396
 #include "zend_exceptions.h"
b34509ac961f Import sfw repo b126
Cyril Plisko <cyril.plisko@grigale.com>
parents:
diff changeset
   397
 #include "zend_interfaces.h"
b34509ac961f Import sfw repo b126
Cyril Plisko <cyril.plisko@grigale.com>
parents:
diff changeset
   398
 #include "zend_vm.h"
b34509ac961f Import sfw repo b126
Cyril Plisko <cyril.plisko@grigale.com>
parents:
diff changeset
   399
+#include "zend_dtrace.h"
b34509ac961f Import sfw repo b126
Cyril Plisko <cyril.plisko@grigale.com>
parents:
diff changeset
   400
 
b34509ac961f Import sfw repo b126
Cyril Plisko <cyril.plisko@grigale.com>
parents:
diff changeset
   401
 /* Virtual current working directory support */
b34509ac961f Import sfw repo b126
Cyril Plisko <cyril.plisko@grigale.com>
parents:
diff changeset
   402
 #include "tsrm_virtual_cwd.h"
5
d07534556b03 Import sfw build 131
Cyril Plisko <cyril.plisko@grigale.com>
parents: 0
diff changeset
   403
Index: php-5.2.11/Zend/zend_vm_def.h
d07534556b03 Import sfw build 131
Cyril Plisko <cyril.plisko@grigale.com>
parents: 0
diff changeset
   404
===================================================================
198
be4eee29f428 Bump PHP to 5.2.17
Jon Tibble <meths@btinternet.com>
parents: 5
diff changeset
   405
--- php-5.2.17/Zend/zend_vm_def.h.ORIG	Mon Jul  5 02:08:35 2010
be4eee29f428 Bump PHP to 5.2.17
Jon Tibble <meths@btinternet.com>
parents: 5
diff changeset
   406
+++ php-5.2.17/Zend/zend_vm_def.h	Mon Jan 31 13:46:32 2011
be4eee29f428 Bump PHP to 5.2.17
Jon Tibble <meths@btinternet.com>
parents: 5
diff changeset
   407
@@ -2249,6 +2249,11 @@
0
b34509ac961f Import sfw repo b126
Cyril Plisko <cyril.plisko@grigale.com>
parents:
diff changeset
   408
 		ZEND_VM_CONTINUE(); /* CHECK_ME */
b34509ac961f Import sfw repo b126
Cyril Plisko <cyril.plisko@grigale.com>
parents:
diff changeset
   409
 	}
b34509ac961f Import sfw repo b126
Cyril Plisko <cyril.plisko@grigale.com>
parents:
diff changeset
   410
 	ce = Z_OBJCE_P(EG(exception));
b34509ac961f Import sfw repo b126
Cyril Plisko <cyril.plisko@grigale.com>
parents:
diff changeset
   411
+
5
d07534556b03 Import sfw build 131
Cyril Plisko <cyril.plisko@grigale.com>
parents: 0
diff changeset
   412
+#ifdef HAVE_DTRACE
d07534556b03 Import sfw build 131
Cyril Plisko <cyril.plisko@grigale.com>
parents: 0
diff changeset
   413
+	DTRACE_EXCEPTION_CAUGHT(ce->name);
d07534556b03 Import sfw build 131
Cyril Plisko <cyril.plisko@grigale.com>
parents: 0
diff changeset
   414
+#endif /* HAVE_DTRACE */
d07534556b03 Import sfw build 131
Cyril Plisko <cyril.plisko@grigale.com>
parents: 0
diff changeset
   415
+
d07534556b03 Import sfw build 131
Cyril Plisko <cyril.plisko@grigale.com>
parents: 0
diff changeset
   416
 	if (ce != EX_T(opline->op1.u.var).class_entry) {
d07534556b03 Import sfw build 131
Cyril Plisko <cyril.plisko@grigale.com>
parents: 0
diff changeset
   417
 		if (!instanceof_function(ce, EX_T(opline->op1.u.var).class_entry TSRMLS_CC)) {
d07534556b03 Import sfw build 131
Cyril Plisko <cyril.plisko@grigale.com>
parents: 0
diff changeset
   418
 			if (opline->op1.u.EA.type) {
d07534556b03 Import sfw build 131
Cyril Plisko <cyril.plisko@grigale.com>
parents: 0
diff changeset
   419
Index: php-5.2.11/Zend/zend_vm_execute.h
d07534556b03 Import sfw build 131
Cyril Plisko <cyril.plisko@grigale.com>
parents: 0
diff changeset
   420
===================================================================
d07534556b03 Import sfw build 131
Cyril Plisko <cyril.plisko@grigale.com>
parents: 0
diff changeset
   421
--- php-5.2.11.orig/Zend/zend_vm_execute.h	2009-11-02 02:59:10.970794327 +0100
d07534556b03 Import sfw build 131
Cyril Plisko <cyril.plisko@grigale.com>
parents: 0
diff changeset
   422
+++ php-5.2.11/Zend/zend_vm_execute.h	2009-11-02 02:59:56.095206861 +0100
d07534556b03 Import sfw build 131
Cyril Plisko <cyril.plisko@grigale.com>
parents: 0
diff changeset
   423
@@ -333,6 +333,11 @@
d07534556b03 Import sfw build 131
Cyril Plisko <cyril.plisko@grigale.com>
parents: 0
diff changeset
   424
 		ZEND_VM_CONTINUE(); /* CHECK_ME */
d07534556b03 Import sfw build 131
Cyril Plisko <cyril.plisko@grigale.com>
parents: 0
diff changeset
   425
 	}
d07534556b03 Import sfw build 131
Cyril Plisko <cyril.plisko@grigale.com>
parents: 0
diff changeset
   426
 	ce = Z_OBJCE_P(EG(exception));
d07534556b03 Import sfw build 131
Cyril Plisko <cyril.plisko@grigale.com>
parents: 0
diff changeset
   427
+
d07534556b03 Import sfw build 131
Cyril Plisko <cyril.plisko@grigale.com>
parents: 0
diff changeset
   428
+#ifdef HAVE_DTRACE
d07534556b03 Import sfw build 131
Cyril Plisko <cyril.plisko@grigale.com>
parents: 0
diff changeset
   429
+	DTRACE_EXCEPTION_CAUGHT(ce->name);
d07534556b03 Import sfw build 131
Cyril Plisko <cyril.plisko@grigale.com>
parents: 0
diff changeset
   430
+#endif /* HAVE_DTRACE */
0
b34509ac961f Import sfw repo b126
Cyril Plisko <cyril.plisko@grigale.com>
parents:
diff changeset
   431
+
b34509ac961f Import sfw repo b126
Cyril Plisko <cyril.plisko@grigale.com>
parents:
diff changeset
   432
 	if (ce != EX_T(opline->op1.u.var).class_entry) {
b34509ac961f Import sfw repo b126
Cyril Plisko <cyril.plisko@grigale.com>
parents:
diff changeset
   433
 		if (!instanceof_function(ce, EX_T(opline->op1.u.var).class_entry TSRMLS_CC)) {
b34509ac961f Import sfw repo b126
Cyril Plisko <cyril.plisko@grigale.com>
parents:
diff changeset
   434
 			if (opline->op1.u.EA.type) {
5
d07534556b03 Import sfw build 131
Cyril Plisko <cyril.plisko@grigale.com>
parents: 0
diff changeset
   435
Index: php-5.2.11/main/main.c
d07534556b03 Import sfw build 131
Cyril Plisko <cyril.plisko@grigale.com>
parents: 0
diff changeset
   436
===================================================================
d07534556b03 Import sfw build 131
Cyril Plisko <cyril.plisko@grigale.com>
parents: 0
diff changeset
   437
--- php-5.2.11.orig/main/main.c	2009-11-02 02:59:10.970427110 +0100
d07534556b03 Import sfw build 131
Cyril Plisko <cyril.plisko@grigale.com>
parents: 0
diff changeset
   438
+++ php-5.2.11/main/main.c	2009-11-02 02:59:56.083717631 +0100
d07534556b03 Import sfw build 131
Cyril Plisko <cyril.plisko@grigale.com>
parents: 0
diff changeset
   439
@@ -81,6 +81,7 @@
d07534556b03 Import sfw build 131
Cyril Plisko <cyril.plisko@grigale.com>
parents: 0
diff changeset
   440
 #include "zend_indent.h"
d07534556b03 Import sfw build 131
Cyril Plisko <cyril.plisko@grigale.com>
parents: 0
diff changeset
   441
 #include "zend_extensions.h"
d07534556b03 Import sfw build 131
Cyril Plisko <cyril.plisko@grigale.com>
parents: 0
diff changeset
   442
 #include "zend_ini.h"
d07534556b03 Import sfw build 131
Cyril Plisko <cyril.plisko@grigale.com>
parents: 0
diff changeset
   443
+#include "zend_dtrace.h"
d07534556b03 Import sfw build 131
Cyril Plisko <cyril.plisko@grigale.com>
parents: 0
diff changeset
   444
 
d07534556b03 Import sfw build 131
Cyril Plisko <cyril.plisko@grigale.com>
parents: 0
diff changeset
   445
 #include "php_content_types.h"
d07534556b03 Import sfw build 131
Cyril Plisko <cyril.plisko@grigale.com>
parents: 0
diff changeset
   446
 #include "php_ticks.h"
d07534556b03 Import sfw build 131
Cyril Plisko <cyril.plisko@grigale.com>
parents: 0
diff changeset
   447
@@ -1260,6 +1261,10 @@
d07534556b03 Import sfw build 131
Cyril Plisko <cyril.plisko@grigale.com>
parents: 0
diff changeset
   448
 {
d07534556b03 Import sfw build 131
Cyril Plisko <cyril.plisko@grigale.com>
parents: 0
diff changeset
   449
 	int retval = SUCCESS;
d07534556b03 Import sfw build 131
Cyril Plisko <cyril.plisko@grigale.com>
parents: 0
diff changeset
   450
 
d07534556b03 Import sfw build 131
Cyril Plisko <cyril.plisko@grigale.com>
parents: 0
diff changeset
   451
+#ifdef HAVE_DTRACE
d07534556b03 Import sfw build 131
Cyril Plisko <cyril.plisko@grigale.com>
parents: 0
diff changeset
   452
+	DTRACE_REQUEST_STARTUP(SAFE_FILENAME(SG(request_info).path_translated), SAFE_FILENAME(SG(request_info).request_uri), SAFE_FILENAME(SG(request_info).request_method));
d07534556b03 Import sfw build 131
Cyril Plisko <cyril.plisko@grigale.com>
parents: 0
diff changeset
   453
+#endif /* HAVE_DTRACE */
0
b34509ac961f Import sfw repo b126
Cyril Plisko <cyril.plisko@grigale.com>
parents:
diff changeset
   454
+
5
d07534556b03 Import sfw build 131
Cyril Plisko <cyril.plisko@grigale.com>
parents: 0
diff changeset
   455
 #ifdef PHP_WIN32
d07534556b03 Import sfw build 131
Cyril Plisko <cyril.plisko@grigale.com>
parents: 0
diff changeset
   456
 	PG(com_initialized) = 0;
d07534556b03 Import sfw build 131
Cyril Plisko <cyril.plisko@grigale.com>
parents: 0
diff changeset
   457
 #endif
d07534556b03 Import sfw build 131
Cyril Plisko <cyril.plisko@grigale.com>
parents: 0
diff changeset
   458
@@ -1534,6 +1539,10 @@
d07534556b03 Import sfw build 131
Cyril Plisko <cyril.plisko@grigale.com>
parents: 0
diff changeset
   459
 		PG(com_initialized) = 0;
d07534556b03 Import sfw build 131
Cyril Plisko <cyril.plisko@grigale.com>
parents: 0
diff changeset
   460
 	}
d07534556b03 Import sfw build 131
Cyril Plisko <cyril.plisko@grigale.com>
parents: 0
diff changeset
   461
 #endif
0
b34509ac961f Import sfw repo b126
Cyril Plisko <cyril.plisko@grigale.com>
parents:
diff changeset
   462
+
5
d07534556b03 Import sfw build 131
Cyril Plisko <cyril.plisko@grigale.com>
parents: 0
diff changeset
   463
+#ifdef HAVE_DTRACE
d07534556b03 Import sfw build 131
Cyril Plisko <cyril.plisko@grigale.com>
parents: 0
diff changeset
   464
+	DTRACE_REQUEST_SHUTDOWN(SAFE_FILENAME(SG(request_info).path_translated), SAFE_FILENAME(SG(request_info).request_uri), SAFE_FILENAME(SG(request_info).request_method));
d07534556b03 Import sfw build 131
Cyril Plisko <cyril.plisko@grigale.com>
parents: 0
diff changeset
   465
+#endif /* HAVE_DTRACE */
d07534556b03 Import sfw build 131
Cyril Plisko <cyril.plisko@grigale.com>
parents: 0
diff changeset
   466
 }
d07534556b03 Import sfw build 131
Cyril Plisko <cyril.plisko@grigale.com>
parents: 0
diff changeset
   467
 /* }}} */
d07534556b03 Import sfw build 131
Cyril Plisko <cyril.plisko@grigale.com>
parents: 0
diff changeset
   468
 
d07534556b03 Import sfw build 131
Cyril Plisko <cyril.plisko@grigale.com>
parents: 0
diff changeset
   469
Index: php-5.2.11/main/php_config.h.in
d07534556b03 Import sfw build 131
Cyril Plisko <cyril.plisko@grigale.com>
parents: 0
diff changeset
   470
===================================================================
198
be4eee29f428 Bump PHP to 5.2.17
Jon Tibble <meths@btinternet.com>
parents: 5
diff changeset
   471
--- php-5.2.17/main/php_config.h.in.ORIG	Thu Jan  6 15:04:47 2011
be4eee29f428 Bump PHP to 5.2.17
Jon Tibble <meths@btinternet.com>
parents: 5
diff changeset
   472
+++ php-5.2.17/main/php_config.h.in	Mon Jan 31 13:46:34 2011
be4eee29f428 Bump PHP to 5.2.17
Jon Tibble <meths@btinternet.com>
parents: 5
diff changeset
   473
@@ -725,6 +725,9 @@
5
d07534556b03 Import sfw build 131
Cyril Plisko <cyril.plisko@grigale.com>
parents: 0
diff changeset
   474
 /* Define if you have the <sys/resource.h> header file.  */
d07534556b03 Import sfw build 131
Cyril Plisko <cyril.plisko@grigale.com>
parents: 0
diff changeset
   475
 #undef HAVE_SYS_RESOURCE_H
d07534556b03 Import sfw build 131
Cyril Plisko <cyril.plisko@grigale.com>
parents: 0
diff changeset
   476
 
d07534556b03 Import sfw build 131
Cyril Plisko <cyril.plisko@grigale.com>
parents: 0
diff changeset
   477
+/* Define to 1 if you have the <sys/sdt.h> header file. */
d07534556b03 Import sfw build 131
Cyril Plisko <cyril.plisko@grigale.com>
parents: 0
diff changeset
   478
+#undef HAVE_SYS_SDT_H
d07534556b03 Import sfw build 131
Cyril Plisko <cyril.plisko@grigale.com>
parents: 0
diff changeset
   479
+
d07534556b03 Import sfw build 131
Cyril Plisko <cyril.plisko@grigale.com>
parents: 0
diff changeset
   480
 /* Define if you have the <sys/select.h> header file.  */
d07534556b03 Import sfw build 131
Cyril Plisko <cyril.plisko@grigale.com>
parents: 0
diff changeset
   481
 #undef HAVE_SYS_SELECT_H
d07534556b03 Import sfw build 131
Cyril Plisko <cyril.plisko@grigale.com>
parents: 0
diff changeset
   482
 
d07534556b03 Import sfw build 131
Cyril Plisko <cyril.plisko@grigale.com>
parents: 0
diff changeset
   483
Index: php-5.2.12/acinclude.m4
d07534556b03 Import sfw build 131
Cyril Plisko <cyril.plisko@grigale.com>
parents: 0
diff changeset
   484
===================================================================
198
be4eee29f428 Bump PHP to 5.2.17
Jon Tibble <meths@btinternet.com>
parents: 5
diff changeset
   485
--- php-5.2.17/acinclude.m4.ORIG	Wed May  5 14:55:44 2010
be4eee29f428 Bump PHP to 5.2.17
Jon Tibble <meths@btinternet.com>
parents: 5
diff changeset
   486
+++ php-5.2.17/acinclude.m4	Mon Jan 31 13:46:34 2011
be4eee29f428 Bump PHP to 5.2.17
Jon Tibble <meths@btinternet.com>
parents: 5
diff changeset
   487
@@ -2877,3 +2877,56 @@
0
b34509ac961f Import sfw repo b126
Cyril Plisko <cyril.plisko@grigale.com>
parents:
diff changeset
   488
   fi
b34509ac961f Import sfw repo b126
Cyril Plisko <cyril.plisko@grigale.com>
parents:
diff changeset
   489
 ])
b34509ac961f Import sfw repo b126
Cyril Plisko <cyril.plisko@grigale.com>
parents:
diff changeset
   490
 
b34509ac961f Import sfw repo b126
Cyril Plisko <cyril.plisko@grigale.com>
parents:
diff changeset
   491
+dnl
b34509ac961f Import sfw repo b126
Cyril Plisko <cyril.plisko@grigale.com>
parents:
diff changeset
   492
+dnl Generate dtrace targets
b34509ac961f Import sfw repo b126
Cyril Plisko <cyril.plisko@grigale.com>
parents:
diff changeset
   493
+dnl
b34509ac961f Import sfw repo b126
Cyril Plisko <cyril.plisko@grigale.com>
parents:
diff changeset
   494
+AC_DEFUN([PHP_GENERATE_DTRACE],[
b34509ac961f Import sfw repo b126
Cyril Plisko <cyril.plisko@grigale.com>
parents:
diff changeset
   495
+  old_IFS=[$]IFS
b34509ac961f Import sfw repo b126
Cyril Plisko <cyril.plisko@grigale.com>
parents:
diff changeset
   496
+  IFS=.
b34509ac961f Import sfw repo b126
Cyril Plisko <cyril.plisko@grigale.com>
parents:
diff changeset
   497
+  set $ac_src
b34509ac961f Import sfw repo b126
Cyril Plisko <cyril.plisko@grigale.com>
parents:
diff changeset
   498
+  IFS=$old_IFS
b34509ac961f Import sfw repo b126
Cyril Plisko <cyril.plisko@grigale.com>
parents:
diff changeset
   499
+  build_target=$2
b34509ac961f Import sfw repo b126
Cyril Plisko <cyril.plisko@grigale.com>
parents:
diff changeset
   500
+  PHP_GLOBAL_OBJS="[$]PHP_GLOBAL_OBJS $1.o"
b34509ac961f Import sfw repo b126
Cyril Plisko <cyril.plisko@grigale.com>
parents:
diff changeset
   501
+  for src in $PHP_DTRACE_OBJS; do
b34509ac961f Import sfw repo b126
Cyril Plisko <cyril.plisko@grigale.com>
parents:
diff changeset
   502
+    case [$]build_target in
b34509ac961f Import sfw repo b126
Cyril Plisko <cyril.plisko@grigale.com>
parents:
diff changeset
   503
+      *)
5
d07534556b03 Import sfw build 131
Cyril Plisko <cyril.plisko@grigale.com>
parents: 0
diff changeset
   504
+        obj="$obj `dirname $src`/.libs/`basename $src | sed 's,\.lo$,.o,'` " ;;
0
b34509ac961f Import sfw repo b126
Cyril Plisko <cyril.plisko@grigale.com>
parents:
diff changeset
   505
+    esac
b34509ac961f Import sfw repo b126
Cyril Plisko <cyril.plisko@grigale.com>
parents:
diff changeset
   506
+  done
b34509ac961f Import sfw repo b126
Cyril Plisko <cyril.plisko@grigale.com>
parents:
diff changeset
   507
+
b34509ac961f Import sfw repo b126
Cyril Plisko <cyril.plisko@grigale.com>
parents:
diff changeset
   508
+  cat >>Makefile.objects<<EOF
b34509ac961f Import sfw repo b126
Cyril Plisko <cyril.plisko@grigale.com>
parents:
diff changeset
   509
+$1.o: \$(PHP_DTRACE_OBJS)
b34509ac961f Import sfw repo b126
Cyril Plisko <cyril.plisko@grigale.com>
parents:
diff changeset
   510
+	dtrace -G -o $1.o -s $1 $obj
b34509ac961f Import sfw repo b126
Cyril Plisko <cyril.plisko@grigale.com>
parents:
diff changeset
   511
+EOF
b34509ac961f Import sfw repo b126
Cyril Plisko <cyril.plisko@grigale.com>
parents:
diff changeset
   512
+
b34509ac961f Import sfw repo b126
Cyril Plisko <cyril.plisko@grigale.com>
parents:
diff changeset
   513
+])
b34509ac961f Import sfw repo b126
Cyril Plisko <cyril.plisko@grigale.com>
parents:
diff changeset
   514
+
b34509ac961f Import sfw repo b126
Cyril Plisko <cyril.plisko@grigale.com>
parents:
diff changeset
   515
+dnl
b34509ac961f Import sfw repo b126
Cyril Plisko <cyril.plisko@grigale.com>
parents:
diff changeset
   516
+dnl Link given source files with dtrace
b34509ac961f Import sfw repo b126
Cyril Plisko <cyril.plisko@grigale.com>
parents:
diff changeset
   517
+dnl PHP_ADD_DTRACE(providerdesc, sources, module)
b34509ac961f Import sfw repo b126
Cyril Plisko <cyril.plisko@grigale.com>
parents:
diff changeset
   518
+dnl
b34509ac961f Import sfw repo b126
Cyril Plisko <cyril.plisko@grigale.com>
parents:
diff changeset
   519
+AC_DEFUN([PHP_ADD_DTRACE],[
b34509ac961f Import sfw repo b126
Cyril Plisko <cyril.plisko@grigale.com>
parents:
diff changeset
   520
+   case "$3" in
5
d07534556b03 Import sfw build 131
Cyril Plisko <cyril.plisko@grigale.com>
parents: 0
diff changeset
   521
+    ""[)] unset ac_bdir;;
d07534556b03 Import sfw build 131
Cyril Plisko <cyril.plisko@grigale.com>
parents: 0
diff changeset
   522
+    /*[)] ac_bdir=$ac_srcdir;;
d07534556b03 Import sfw build 131
Cyril Plisko <cyril.plisko@grigale.com>
parents: 0
diff changeset
   523
+    *[)] extdir=PHP_EXT_DIR($3); ac_bdir="$extdir/";;
0
b34509ac961f Import sfw repo b126
Cyril Plisko <cyril.plisko@grigale.com>
parents:
diff changeset
   524
+    esac
b34509ac961f Import sfw repo b126
Cyril Plisko <cyril.plisko@grigale.com>
parents:
diff changeset
   525
+  old_IFS=[$]IFS
b34509ac961f Import sfw repo b126
Cyril Plisko <cyril.plisko@grigale.com>
parents:
diff changeset
   526
+  for ac_src in $2; do
b34509ac961f Import sfw repo b126
Cyril Plisko <cyril.plisko@grigale.com>
parents:
diff changeset
   527
+    IFS=.
b34509ac961f Import sfw repo b126
Cyril Plisko <cyril.plisko@grigale.com>
parents:
diff changeset
   528
+    set $ac_src
b34509ac961f Import sfw repo b126
Cyril Plisko <cyril.plisko@grigale.com>
parents:
diff changeset
   529
+    ac_obj=[$]1
b34509ac961f Import sfw repo b126
Cyril Plisko <cyril.plisko@grigale.com>
parents:
diff changeset
   530
+    IFS=$old_IFS
b34509ac961f Import sfw repo b126
Cyril Plisko <cyril.plisko@grigale.com>
parents:
diff changeset
   531
+
b34509ac961f Import sfw repo b126
Cyril Plisko <cyril.plisko@grigale.com>
parents:
diff changeset
   532
+    PHP_DTRACE_OBJS="[$]PHP_DTRACE_OBJS [$]ac_bdir[$]ac_obj.lo"
b34509ac961f Import sfw repo b126
Cyril Plisko <cyril.plisko@grigale.com>
parents:
diff changeset
   533
+  done;
b34509ac961f Import sfw repo b126
Cyril Plisko <cyril.plisko@grigale.com>
parents:
diff changeset
   534
+])
5
d07534556b03 Import sfw build 131
Cyril Plisko <cyril.plisko@grigale.com>
parents: 0
diff changeset
   535
+
d07534556b03 Import sfw build 131
Cyril Plisko <cyril.plisko@grigale.com>
parents: 0
diff changeset
   536
+dnl
d07534556b03 Import sfw build 131
Cyril Plisko <cyril.plisko@grigale.com>
parents: 0
diff changeset
   537
+dnl Generate platform specific dtrace header
d07534556b03 Import sfw build 131
Cyril Plisko <cyril.plisko@grigale.com>
parents: 0
diff changeset
   538
+dnl
d07534556b03 Import sfw build 131
Cyril Plisko <cyril.plisko@grigale.com>
parents: 0
diff changeset
   539
+AC_DEFUN([PHP_INIT_DTRACE], [
d07534556b03 Import sfw build 131
Cyril Plisko <cyril.plisko@grigale.com>
parents: 0
diff changeset
   540
+  dtrace -h -C -s $1 -o $2
d07534556b03 Import sfw build 131
Cyril Plisko <cyril.plisko@grigale.com>
parents: 0
diff changeset
   541
+  $SED -ibak 's,PHP_,DTRACE_,g' $2
d07534556b03 Import sfw build 131
Cyril Plisko <cyril.plisko@grigale.com>
parents: 0
diff changeset
   542
+])
d07534556b03 Import sfw build 131
Cyril Plisko <cyril.plisko@grigale.com>
parents: 0
diff changeset
   543
+
198
be4eee29f428 Bump PHP to 5.2.17
Jon Tibble <meths@btinternet.com>
parents: 5
diff changeset
   544
 
5
d07534556b03 Import sfw build 131
Cyril Plisko <cyril.plisko@grigale.com>
parents: 0
diff changeset
   545
Index: php-5.2.12/configure.in
d07534556b03 Import sfw build 131
Cyril Plisko <cyril.plisko@grigale.com>
parents: 0
diff changeset
   546
===================================================================
198
be4eee29f428 Bump PHP to 5.2.17
Jon Tibble <meths@btinternet.com>
parents: 5
diff changeset
   547
--- php-5.2.17/configure.in.ORIG	Thu Jan  6 15:01:19 2011
be4eee29f428 Bump PHP to 5.2.17
Jon Tibble <meths@btinternet.com>
parents: 5
diff changeset
   548
+++ php-5.2.17/configure.in	Mon Jan 31 13:46:34 2011
be4eee29f428 Bump PHP to 5.2.17
Jon Tibble <meths@btinternet.com>
parents: 5
diff changeset
   549
@@ -881,6 +881,23 @@
0
b34509ac961f Import sfw repo b126
Cyril Plisko <cyril.plisko@grigale.com>
parents:
diff changeset
   550
   AC_DEFINE(HAVE_IPV6, 1, [Whether to enable IPv6 support])
b34509ac961f Import sfw repo b126
Cyril Plisko <cyril.plisko@grigale.com>
parents:
diff changeset
   551
 fi
b34509ac961f Import sfw repo b126
Cyril Plisko <cyril.plisko@grigale.com>
parents:
diff changeset
   552
 
b34509ac961f Import sfw repo b126
Cyril Plisko <cyril.plisko@grigale.com>
parents:
diff changeset
   553
+dnl ## DTRACE CHECHKS
b34509ac961f Import sfw repo b126
Cyril Plisko <cyril.plisko@grigale.com>
parents:
diff changeset
   554
+dnl ## this needs to be done before SAPI configureation
5
d07534556b03 Import sfw build 131
Cyril Plisko <cyril.plisko@grigale.com>
parents: 0
diff changeset
   555
+PHP_ARG_ENABLE(dtrace, whether to enable DTrace support,
0
b34509ac961f Import sfw repo b126
Cyril Plisko <cyril.plisko@grigale.com>
parents:
diff changeset
   556
+[  --enable-dtrace         Enable DTrace support], no, no)
b34509ac961f Import sfw repo b126
Cyril Plisko <cyril.plisko@grigale.com>
parents:
diff changeset
   557
+
b34509ac961f Import sfw repo b126
Cyril Plisko <cyril.plisko@grigale.com>
parents:
diff changeset
   558
+dnl ## DTRACE CHECHKS
b34509ac961f Import sfw repo b126
Cyril Plisko <cyril.plisko@grigale.com>
parents:
diff changeset
   559
+dnl ## this needs to be done before SAPI configureation
b34509ac961f Import sfw repo b126
Cyril Plisko <cyril.plisko@grigale.com>
parents:
diff changeset
   560
+if test "$PHP_DTRACE" = "yes"; then
b34509ac961f Import sfw repo b126
Cyril Plisko <cyril.plisko@grigale.com>
parents:
diff changeset
   561
+  AC_CHECK_HEADERS([sys/sdt.h],
b34509ac961f Import sfw repo b126
Cyril Plisko <cyril.plisko@grigale.com>
parents:
diff changeset
   562
+    [PHP_ADD_DTRACE([Zend/zend_dtrace.d], [main/main.c, Zend/zend_API.c \
5
d07534556b03 Import sfw build 131
Cyril Plisko <cyril.plisko@grigale.com>
parents: 0
diff changeset
   563
+       Zend/zend_execute.c Zend/zend_exceptions.c Zend/zend_objects.c \
d07534556b03 Import sfw build 131
Cyril Plisko <cyril.plisko@grigale.com>
parents: 0
diff changeset
   564
+       Zend/zend_dtrace.c Zend/zend.c])
d07534556b03 Import sfw build 131
Cyril Plisko <cyril.plisko@grigale.com>
parents: 0
diff changeset
   565
+     AC_DEFINE(HAVE_DTRACE, 1, [Whether to enable DTrace support])
d07534556b03 Import sfw build 131
Cyril Plisko <cyril.plisko@grigale.com>
parents: 0
diff changeset
   566
+     PHP_INIT_DTRACE([Zend/zend_dtrace.d], [Zend/zend_dtrace_gen.h])],
0
b34509ac961f Import sfw repo b126
Cyril Plisko <cyril.plisko@grigale.com>
parents:
diff changeset
   567
+    [])
b34509ac961f Import sfw repo b126
Cyril Plisko <cyril.plisko@grigale.com>
parents:
diff changeset
   568
+fi
b34509ac961f Import sfw repo b126
Cyril Plisko <cyril.plisko@grigale.com>
parents:
diff changeset
   569
+
b34509ac961f Import sfw repo b126
Cyril Plisko <cyril.plisko@grigale.com>
parents:
diff changeset
   570
 AC_MSG_CHECKING([how big to make fd sets])
b34509ac961f Import sfw repo b126
Cyril Plisko <cyril.plisko@grigale.com>
parents:
diff changeset
   571
 PHP_ARG_ENABLE(fd-setsize,,
b34509ac961f Import sfw repo b126
Cyril Plisko <cyril.plisko@grigale.com>
parents:
diff changeset
   572
 [  --enable-fd-setsize     Set size of descriptor sets], no, no)
198
be4eee29f428 Bump PHP to 5.2.17
Jon Tibble <meths@btinternet.com>
parents: 5
diff changeset
   573
@@ -1211,6 +1228,7 @@
0
b34509ac961f Import sfw repo b126
Cyril Plisko <cyril.plisko@grigale.com>
parents:
diff changeset
   574
 PHP_SUBST(PHP_CLI_TARGET)
b34509ac961f Import sfw repo b126
Cyril Plisko <cyril.plisko@grigale.com>
parents:
diff changeset
   575
 PHP_SUBST(PHP_SAPI_OBJS)
b34509ac961f Import sfw repo b126
Cyril Plisko <cyril.plisko@grigale.com>
parents:
diff changeset
   576
 PHP_SUBST(PHP_CLI_OBJS)
b34509ac961f Import sfw repo b126
Cyril Plisko <cyril.plisko@grigale.com>
parents:
diff changeset
   577
+PHP_SUBST(PHP_DTRACE_OBJS)
b34509ac961f Import sfw repo b126
Cyril Plisko <cyril.plisko@grigale.com>
parents:
diff changeset
   578
 PHP_SUBST(PHP_GLOBAL_OBJS)
b34509ac961f Import sfw repo b126
Cyril Plisko <cyril.plisko@grigale.com>
parents:
diff changeset
   579
 
b34509ac961f Import sfw repo b126
Cyril Plisko <cyril.plisko@grigale.com>
parents:
diff changeset
   580
 PHP_SUBST(PHP_MODULES)
198
be4eee29f428 Bump PHP to 5.2.17
Jon Tibble <meths@btinternet.com>
parents: 5
diff changeset
   581
@@ -1400,7 +1418,7 @@
5
d07534556b03 Import sfw build 131
Cyril Plisko <cyril.plisko@grigale.com>
parents: 0
diff changeset
   582
 PHP_ADD_SOURCES(Zend, \
d07534556b03 Import sfw build 131
Cyril Plisko <cyril.plisko@grigale.com>
parents: 0
diff changeset
   583
     zend_language_parser.c zend_language_scanner.c \
d07534556b03 Import sfw build 131
Cyril Plisko <cyril.plisko@grigale.com>
parents: 0
diff changeset
   584
     zend_ini_parser.c zend_ini_scanner.c \
d07534556b03 Import sfw build 131
Cyril Plisko <cyril.plisko@grigale.com>
parents: 0
diff changeset
   585
-    zend_alloc.c zend_compile.c zend_constants.c zend_dynamic_array.c \
d07534556b03 Import sfw build 131
Cyril Plisko <cyril.plisko@grigale.com>
parents: 0
diff changeset
   586
+    zend_alloc.c zend_compile.c zend_constants.c zend_dynamic_array.c zend_dtrace.c \
d07534556b03 Import sfw build 131
Cyril Plisko <cyril.plisko@grigale.com>
parents: 0
diff changeset
   587
     zend_execute_API.c zend_highlight.c zend_llist.c \
d07534556b03 Import sfw build 131
Cyril Plisko <cyril.plisko@grigale.com>
parents: 0
diff changeset
   588
     zend_opcode.c zend_operators.c zend_ptr_stack.c zend_stack.c \
d07534556b03 Import sfw build 131
Cyril Plisko <cyril.plisko@grigale.com>
parents: 0
diff changeset
   589
     zend_variables.c zend.c zend_API.c zend_extensions.c zend_hash.c \
198
be4eee29f428 Bump PHP to 5.2.17
Jon Tibble <meths@btinternet.com>
parents: 5
diff changeset
   590
@@ -1432,6 +1450,13 @@
0
b34509ac961f Import sfw repo b126
Cyril Plisko <cyril.plisko@grigale.com>
parents:
diff changeset
   591
 PHP_ADD_MAKEFILE_FRAGMENT($abs_srcdir/Makefile.frag,$abs_srcdir/Zend,Zend)
b34509ac961f Import sfw repo b126
Cyril Plisko <cyril.plisko@grigale.com>
parents:
diff changeset
   592
 PHP_ADD_MAKEFILE_FRAGMENT($abs_srcdir/Zend/Makefile.frag,$abs_srcdir/Zend,Zend)
b34509ac961f Import sfw repo b126
Cyril Plisko <cyril.plisko@grigale.com>
parents:
diff changeset
   593
 
b34509ac961f Import sfw repo b126
Cyril Plisko <cyril.plisko@grigale.com>
parents:
diff changeset
   594
+if test "$PHP_DTRACE" = "yes"; then
b34509ac961f Import sfw repo b126
Cyril Plisko <cyril.plisko@grigale.com>
parents:
diff changeset
   595
+  case $host_alias in
b34509ac961f Import sfw repo b126
Cyril Plisko <cyril.plisko@grigale.com>
parents:
diff changeset
   596
+    *solaris*)
b34509ac961f Import sfw repo b126
Cyril Plisko <cyril.plisko@grigale.com>
parents:
diff changeset
   597
+      PHP_GENERATE_DTRACE([Zend/zend_dtrace.d],$php_build_target);;
b34509ac961f Import sfw repo b126
Cyril Plisko <cyril.plisko@grigale.com>
parents:
diff changeset
   598
+  esac
b34509ac961f Import sfw repo b126
Cyril Plisko <cyril.plisko@grigale.com>
parents:
diff changeset
   599
+fi
b34509ac961f Import sfw repo b126
Cyril Plisko <cyril.plisko@grigale.com>
parents:
diff changeset
   600
+
b34509ac961f Import sfw repo b126
Cyril Plisko <cyril.plisko@grigale.com>
parents:
diff changeset
   601
 PHP_GEN_BUILD_DIRS
b34509ac961f Import sfw repo b126
Cyril Plisko <cyril.plisko@grigale.com>
parents:
diff changeset
   602
 PHP_GEN_GLOBAL_MAKEFILE