Re: gprof & PHP
| From: | Marcus Boerger | Date: | Mon, 05 May 2008 19:40:54 +0000 |
| Subject: | Re: gprof & PHP | ||
| References: | 1 2 3 | Groups: | php.internals |
| Request: | Send a blank email to internals+get-37487@lists.php.net to get a copy of this message | ||
Hello George,
sounds like you found a bug to me. We somehow need to have a request
variale that tracks whetehr the signal handling was activated. Since the
user could change the ini settings during the script, we either need to
disallow that (in case we don't yet) and can use the same checks as for the
start or we need a completely new variable.
marcus
Monday, May 5, 2008, 9:12:28 PM, you wrote:
>>> Seems that PHP engine is using ITIMER_PROF and SIGPROF for limiting
>>> the max execution time of a php script, and gprof cannot produce
>>> useful results.
>>> Is there an option to turn it off temporarily? Is there a better tool
>>> for code optimization?
>>
>> IIRC if "max_execution_time" is 0 then timeout should not be set.
> It helps a little after I set both "max_execution_time" and
> "max_input_time" to 0, PHP engine no longer set ITIMER_PROF and SIGPROF
> at the beginning of the request.
> However, at the end of the request, PHP engine still set ITIMER_PROF to
> 0 regardless. I guess I have to patch the code.
> Thanks,
> George
Best regards,
Marcus