Newsgroups: php.internals Path: news.php.net Xref: news.php.net php.internals:37487 Return-Path: Mailing-List: contact internals-help@lists.php.net; run by ezmlm Delivered-To: mailing list internals@lists.php.net Received: (qmail 2382 invoked from network); 5 May 2008 19:40:57 -0000 Received: from unknown (HELO lists.php.net) (127.0.0.1) by localhost with SMTP; 5 May 2008 19:40:57 -0000 Authentication-Results: pb1.pair.com smtp.mail=helly@php.net; spf=unknown; sender-id=unknown Authentication-Results: pb1.pair.com header.from=helly@php.net; sender-id=unknown Received-SPF: unknown (pb1.pair.com: domain php.net does not designate 85.214.94.56 as permitted sender) X-PHP-List-Original-Sender: helly@php.net X-Host-Fingerprint: 85.214.94.56 aixcept.net Linux 2.6 Received: from [85.214.94.56] ([85.214.94.56:51796] helo=h1149922.serverkompetenz.net) by pb1.pair.com (ecelerity 2.1.1.9-wez r(12769M)) with ESMTP id 17/50-00315-8C26F184 for ; Mon, 05 May 2008 15:40:56 -0400 Received: from dhcp-172-28-202-226.zrh.corp.google.com (unknown [193.142.125.1]) (using TLSv1 with cipher AES256-SHA (256/256 bits)) (No client certificate requested) by h1149922.serverkompetenz.net (Postfix) with ESMTP id 713B811EFC4; Mon, 5 May 2008 21:40:53 +0200 (CEST) Date: Mon, 5 May 2008 21:40:54 +0200 Reply-To: Marcus Boerger X-Priority: 3 (Normal) Message-ID: <828046104.20080505214054@marcus-boerger.de> To: George Wang CC: Stanislav Malyshev , internals@lists.php.net In-Reply-To: <481F5C1C.2040604@litespeedtech.com> References: <481F54DE.1000604@litespeedtech.com> <481F5631.7000301@zend.com> <481F5C1C.2040604@litespeedtech.com> MIME-Version: 1.0 Content-Type: text/plain; charset=iso-8859-1 Content-Transfer-Encoding: 8bit Subject: Re: [PHP-DEV] gprof & PHP From: helly@php.net (Marcus Boerger) 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