Skip to content

Commit ca4d122

Browse files
committed
Update DTrace probes
1 parent e504ed6 commit ca4d122

File tree

5 files changed

+16
-7
lines changed

5 files changed

+16
-7
lines changed

ext/oci8/oci8.c

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2317,6 +2317,12 @@ static int php_oci_connection_close(php_oci_connection *connection TSRMLS_DC)
23172317
int result = 0;
23182318
zend_bool in_call_save = OCI_G(in_call);
23192319

2320+
#ifdef HAVE_OCI8_DTRACE
2321+
if (DTRACE_OCI8_CONNECTION_CLOSE_ENABLED()) {
2322+
DTRACE_OCI8_CONNECTION_CLOSE(connection);
2323+
}
2324+
#endif /* HAVE_OCI8_DTRACE */
2325+
23202326
if (!connection->is_stub) {
23212327
/* Release resources associated with connection */
23222328
php_oci_connection_release(connection TSRMLS_CC);

ext/oci8/oci8_dtrace.d

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -17,12 +17,13 @@
1717
*/
1818

1919
provider php {
20+
probe oci8__check__connection(void *connection, int is_open, long errcode, unsigned long server_status);
2021
probe oci8__connect__entry(char *username, char *dbname, char *charset, long session_mode, int persistent, int exclusive);
2122
probe oci8__connect__return(void *connection);
22-
probe oci8__check__connection(void *connection, int is_open, long errcode, unsigned long serverstatus);
23-
probe oci8__sqltext(char *sql);
23+
probe oci8__connection__close(void *connection);
2424
probe oci8__error(int status, long errcode);
25-
probe oci8__execute__mode(unsigned int mode);
25+
probe oci8__execute__mode(void *connection, unsigned int mode);
26+
probe oci8__sqltext(void *connection, char *sql);
2627

2728
probe oci8__connect__p__dtor__close(void *connection);
2829
probe oci8__connect__p__dtor__release(void *connection);

ext/oci8/oci8_statement.c

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -58,7 +58,7 @@ php_oci_statement *php_oci_statement_create(php_oci_connection *connection, char
5858
} else {
5959
#ifdef HAVE_OCI8_DTRACE
6060
if (DTRACE_OCI8_SQLTEXT_ENABLED()) {
61-
DTRACE_OCI8_SQLTEXT(query);
61+
DTRACE_OCI8_SQLTEXT(connection, query);
6262
}
6363
#endif /* HAVE_OCI8_DTRACE */
6464
}
@@ -498,7 +498,7 @@ int php_oci_statement_execute(php_oci_statement *statement, ub4 mode TSRMLS_DC)
498498
/* only these are allowed */
499499
#ifdef HAVE_OCI8_DTRACE
500500
if (DTRACE_OCI8_EXECUTE_MODE_ENABLED()) {
501-
DTRACE_OCI8_EXECUTE_MODE(mode);
501+
DTRACE_OCI8_EXECUTE_MODE(statement->connection, mode);
502502
}
503503
#endif /* HAVE_OCI8_DTRACE */
504504
break;

ext/oci8/package.xml

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -40,7 +40,7 @@ http://pear.php.net/dtd/package-2.0.xsd">
4040
<active>no</active>
4141
</lead>
4242

43-
<date>2013-09-03</date>
43+
<date>2013-09-06</date>
4444
<time>12:00:00</time>
4545

4646
<version>
@@ -55,6 +55,8 @@ http://pear.php.net/dtd/package-2.0.xsd">
5555
<notes>
5656
Review and improve error handling code and data types.
5757
Fix oci_set_*($connection, ...) error handling so oci_error($connection) works.
58+
Add DTrace oci8-connection-close probe
59+
Add the connection handle to several DTrace probes.
5860
</notes>
5961
<contents>
6062
<dir name="/">

ext/oci8/php_oci8.h

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -46,7 +46,7 @@
4646
*/
4747
#undef PHP_OCI8_VERSION
4848
#endif
49-
#define PHP_OCI8_VERSION "2.0.1-dev"
49+
#define PHP_OCI8_VERSION "2.0.2-dev"
5050

5151
extern zend_module_entry oci8_module_entry;
5252
#define phpext_oci8_ptr &oci8_module_entry

0 commit comments

Comments
 (0)