[xdebug-dev] xdebug xdebug/php_xdebug.h xdebug/xdebug.c xdebug/xdebug_code_coverage.c - Fixed oparray prefill caching for code coverage.

From: Derick Rethans <derick[@]derickrethans.nl>
Date: Wed, 11 Oct 2006 10:54:30 +0200

Date: Wed Oct 11 10:54:30 CEST 2006
User: Derick Rethans
Directory: xdebug

Log Message:
[0.50]
- Fixed oparray prefill caching for code coverage.
- Overload yet another opcode to improve code coverage.

Modified files:
           xdebug/php_xdebug.h (version: 1.119)
           xdebug/xdebug.c (version: 1.354)
           xdebug/xdebug_code_coverage.c (version: 1.26)

[FILE: /xdebug/php_xdebug.h]

===================================================================
RCS file: cvstemp,v
retrieving revision 1.118
retrieving revision 1.119
diff -u -r1.118 -r1.119
--- xdebug/php_xdebug.h:1.118 Sun Oct 08 18:54:34 2006 GMT
+++ xdebug/php_xdebug.h Wed Oct 11 06:54:30 2006 GMT
@@ -20,7 +20,7 @@
 #define PHP_XDEBUG_H
 
 #define XDEBUG_NAME "Xdebug"
-#define XDEBUG_VERSION "2.0.0RC1"
+#define XDEBUG_VERSION "2.0.0RC2-dev"
 #define XDEBUG_AUTHOR "Derick Rethans"
 #define XDEBUG_COPYRIGHT "Copyright (c) 2002-2006 by Derick Rethans"
 #define XDEBUG_URL "http://xdebug.org"

[FILE: /xdebug/xdebug.c]

===================================================================
RCS file: cvstemp,v
retrieving revision 1.353
retrieving revision 1.354
diff -u -r1.353 -r1.354
--- xdebug/xdebug.c:1.353 Sun Oct 08 17:31:00 2006 GMT
+++ xdebug/xdebug.c Wed Oct 11 06:54:30 2006 GMT
@@ -525,6 +525,7 @@
 XDEBUG_OPCODE_OVERRIDE(bool)
 XDEBUG_OPCODE_OVERRIDE(add_string)
 XDEBUG_OPCODE_OVERRIDE(init_array)
+XDEBUG_OPCODE_OVERRIDE(fetch_obj_r)
 XDEBUG_OPCODE_OVERRIDE(fetch_dim_r)
 XDEBUG_OPCODE_OVERRIDE(fetch_obj_func_arg)
 XDEBUG_OPCODE_OVERRIDE(fetch_class)
@@ -586,6 +587,7 @@
         XDEBUG_SET_OPCODE_OVERRIDE(add_string, ZEND_ADD_STRING);
         XDEBUG_SET_OPCODE_OVERRIDE(init_array, ZEND_INIT_ARRAY);
         XDEBUG_SET_OPCODE_OVERRIDE(fetch_dim_r, ZEND_FETCH_DIM_R);
+ XDEBUG_SET_OPCODE_OVERRIDE(fetch_obj_r, ZEND_FETCH_OBJ_R);
         XDEBUG_SET_OPCODE_OVERRIDE(fetch_obj_func_arg, ZEND_FETCH_OBJ_FUNC_ARG);
         XDEBUG_SET_OPCODE_OVERRIDE(fetch_class, ZEND_FETCH_CLASS);
         XDEBUG_SET_OPCODE_OVERRIDE(concat, ZEND_CONCAT);

[FILE: /xdebug/xdebug_code_coverage.c]

===================================================================
RCS file: cvstemp,v
retrieving revision 1.25
retrieving revision 1.26
diff -u -r1.25 -r1.26
--- xdebug/xdebug_code_coverage.c:1.25 Sat Oct 07 21:10:32 2006 GMT
+++ xdebug/xdebug_code_coverage.c Wed Oct 11 06:54:30 2006 GMT
@@ -203,9 +203,18 @@
 }
 static void prefil_from_oparray(function_stack_entry *fse, char *fn, zend_op_array *opa TSRMLS_DC)
 {
+ char cache_key[256];
+ int cache_key_len;
+ void *dummy;
         unsigned int i;
         xdebug_set *set = NULL;
 
+ cache_key_len = snprintf(cache_key, sizeof(cache_key) - 1, "%p%s", opa, opa->function_name ? "" : opa->filename);
+ if (xdebug_hash_find(XG(code_coverage_op_array_cache), cache_key, cache_key_len, (void*) &dummy)) {
+ return;
+ }
+ xdebug_hash_add(XG(code_coverage_op_array_cache), cache_key, cache_key_len, NULL);
+
 #ifdef ZEND_ENGINE_2
         /* Check for abstract methods and simply return from this function in those
          * cases. */
@@ -272,16 +281,6 @@
 
 void xdebug_prefil_code_coverage(function_stack_entry *fse, zend_op_array *op_array TSRMLS_DC)
 {
- char cache_key[64];
- int cache_key_len;
- void *dummy;
-
- cache_key_len = snprintf(cache_key, sizeof(cache_key) - 1, "%p", op_array);
- if (xdebug_hash_find(XG(code_coverage_op_array_cache), cache_key, cache_key_len, (void*) &dummy)) {
- return;
- }
- xdebug_hash_add(XG(code_coverage_op_array_cache), cache_key, cache_key_len, NULL);
-
         prefil_from_oparray(fse, op_array->filename, op_array TSRMLS_CC);
 
         zend_hash_apply_with_arguments(CG(function_table), (apply_func_args_t) prefil_from_function_table, 1, op_array->filename);
Received on Wed Oct 11 2006 - 10:54:34 BST

This archive was generated by hypermail 2.2.0 : Sun Jun 24 2018 - 04:00:03 BST