View Issue Details

IDProjectCategoryView StatusLast Update
0000407XdebugProfilingpublic2025-11-25 14:22
Reportersmoe Assigned To 
PrioritynormalSeveritymajorReproducibilityalways
Status confirmedResolutionopen 
Target Version3.6dev 
Summary0000407: Profilerdumpfile name is always auto_prepend_file name
Description

my php.ini:
{{{
auto_prepend_file = prepend.php
xdebug.profiler_output_name = cachegrind.out.%s
}}}

then the dumpfilename is always "cachegrind.out._path_to_prepend-php_prepend_php", regardless which script i requested

Additional Information

Im using PHP5 as FastCGI

TagsNo tags attached.
Operating SystemGnu/Linux Debian Lenny
PHP Version5.2.6

Relationships

child of 0002072 acknowledged Rewrite the profiler 

Activities

derick

2016-11-27 19:50

administrator   ~0003798

This bug still exists, and can be reproduced with the one liner:

touch index.php start.php; php -dauto_prepend_file=start.php -dxdebug.profiler_output_name=^Cachegrind.out.%s -dxdebug.profiler_enable=1 index.php

However, I don't see how I can figure our which script is the "auto prepend" script, or the normal script in PHP itself.

Xenos

2019-05-16 08:07

reporter   ~0005025

I couldn't reproduce this now (3 years after so might have been fixed):


--TEST--
Test for bug 0000407: Profilerdumpfile name is always auto_prepend_file name
--INI--
auto_prepend_file = C:\dev\git\php-7.3.3\ext\xdebug\tests\bug00407.prepend.php
xdebug.profiler_enable = 1
xdebug.profiler_output_dir = C:\dev\git\php-7.3.3\ext\xdebug\tests
xdebug.profiler_output_name = bug00407.cachegrind.%s.out
--FILE--
<?php

echo "\$prepended = $prepended\n";

--EXPECTF--
$prepended = yes

Gets 2 files:
bug00407.cachegrind.C__dev_git_php-7.3.3_ext_xdebug_tests_bug00407_php.out =


version: 1
creator: xdebug 2.7.3-dev (PHP 7.3.3)
cmd: C:\dev\git\php-7.3.3\ext\xdebug\tests\bug00407.php
part: 1
positions: line

events: Time Memory

fl=(2) C:\dev\git\php-7.3.3\ext\xdebug\tests\bug00407.php
fn=(1)

summary: 26 32

1 26 32

bug00407.cachegrind.C__dev_git_php-7.3.3_ext_xdebug_tests_bug00407.prepend_php.out =


version: 1
creator: xdebug 2.7.3-dev (PHP 7.3.3)
cmd: C:\dev\git\php-7.3.3\ext\xdebug\tests\bug00407.prepend.php
part: 1
positions: line

events: Time Memory

fl=(1) C:\dev\git\php-7.3.3\ext\xdebug\tests\bug00407.prepend.php
fn=(1) {main}

summary: 16 0

1 16 0

So, should this issue be closed? Do I need to commit the phpt? If so, I would like to know how to remove the two absolute paths I have in the phpt file (otherwise, it's gonna fail on everyone else's computer!)

derick

2021-03-17 09:33

administrator   ~0005756

Check whether this is now fixed.

derick

2021-03-17 10:13

administrator   ~0005779

This is still a problem, now with the reproducible new case:

touch /tmp/prepend.inc && touch /tmp/test.php && php -n -dzend_extension=xdebug -dxdebug.mode=profile -dauto_prepend_file=/tmp/prepend.inc -dxdebug.profiler_output_name=bug00407.cachegrind.%s.out /tmp/test.php