MantisBT

View Issue Details Jump to Notes ] Issue History ] Print ]
IDProjectCategoryView StatusDate SubmittedLast Update
0001216XdebugFeature/Change requestpublic2015-11-29 21:002016-12-13 21:42
Reporterderick 
Assigned To 
PrioritynormalSeverityminorReproducibilityhave not tried
StatusacknowledgedResolutionopen 
PlatformOSOS Version
Product Version 
Target VersionFixed in Version 
Summary0001216: Investigate optimisations in when to turn things on and off
DescriptionTry to not have too much overhead for when specific features are not enabled or so.
TagsNo tags attached.
Operating System
PHP Version5.6.15-5.6.19
Attached Files

- Relationships

-  Notes
(0003272)
derick (administrator)
2015-11-29 21:01

diff --git a/xdebug.c b/xdebug.c
index ae63993..ea2b304 100644
--- a/xdebug.c
+++ b/xdebug.c
@@ -1629,10 +1629,14 @@ void xdebug_execute(zend_op_array *op_array TSRMLS_DC)
 
 #if PHP_VERSION_ID >= 70000
        /* For PHP 7, we need to reset the opline to the start, so that all opcode
- * handlers are being hit. But not for generators, as that would make an
- * endless loop. TODO: Fix RECV handling with generators. */
- if (!(EX(func)->op_array.fn_flags & ZEND_ACC_GENERATOR)) {
- EX(opline) = EX(func)->op_array.opcodes;
+ * handlers are being hit. This is only important when we are doing code
+ * coverage, so only do it when path/branch coverage is requested. But not
+ * for generators, as that would make an endless loop. TODO: Fix RECV
+ * handling with generators. */
+ if (XG(do_code_coverage) && XG(code_coverage_branch_check)) {
+ if (!(EX(func)->op_array.fn_flags & ZEND_ACC_GENERATOR)) {
+ EX(opline) = EX(func)->op_array.opcodes;
+ }
        }
 #endif
(0004056)
derick (administrator)
2016-12-13 21:42

I might want to implement this, but it's not high on my list of things to do.

- Issue History
Date Modified Username Field Change
2015-11-29 21:00 derick New Issue
2015-11-29 21:01 derick Note Added: 0003272
2016-12-04 18:34 derick Target Version 2.5.0dev =>
2016-12-13 21:42 derick Status new => acknowledged
2016-12-13 21:42 derick Note Added: 0004056


Copyright © 2000 - 2017 MantisBT Team
Powered by Mantis Bugtracker