Newsgroups: php.internals Path: news.php.net Xref: news.php.net php.internals:45916 Return-Path: Mailing-List: contact internals-help@lists.php.net; run by ezmlm Delivered-To: mailing list internals@lists.php.net Received: (qmail 30243 invoked from network); 30 Oct 2009 14:18:59 -0000 Received: from unknown (HELO lists.php.net) (127.0.0.1) by localhost with SMTP; 30 Oct 2009 14:18:59 -0000 Authentication-Results: pb1.pair.com header.from=derick@php.net; sender-id=unknown Authentication-Results: pb1.pair.com smtp.mail=derick@php.net; spf=unknown; sender-id=unknown Received-SPF: unknown (pb1.pair.com: domain php.net does not designate 82.94.239.5 as permitted sender) X-PHP-List-Original-Sender: derick@php.net X-Host-Fingerprint: 82.94.239.5 jdi.jdi-ict.nl Received: from [82.94.239.5] ([82.94.239.5:55946] helo=jdi.jdi-ict.nl) by pb1.pair.com (ecelerity 2.1.1.9-wez r(12769M)) with ESMTP id 91/5B-57355-0D5FAEA4 for ; Fri, 30 Oct 2009 09:18:58 -0500 Received: from localhost (localhost [127.0.0.1]) by jdi.jdi-ict.nl (8.13.8/8.13.8) with ESMTP id n9UEIpkX005656; Fri, 30 Oct 2009 15:18:52 +0100 Date: Fri, 30 Oct 2009 15:18:51 +0100 (CET) X-X-Sender: derick@kossu.ez.no To: Arvind Srinivasan cc: internals@lists.php.net In-Reply-To: Message-ID: References: User-Agent: Alpine 2.00 (DEB 1167 2008-08-23) MIME-Version: 1.0 Content-Type: TEXT/PLAIN; charset=US-ASCII Subject: Re: [PHP-DEV] [PATCH] - Check configured error level before reporting E_NOTICE messages From: derick@php.net (Derick Rethans) On Fri, 30 Oct 2009, Arvind Srinivasan wrote: > When compiled with #ifdef ZTS, zend_error invokes pthread_get_specific. > > The performance analyzer tool indicated that zend_error was being > invoked during normal processing of requests, even though no error > messages were logged. The source of these calls were E_NOTICE > messages. > > Please review the attached patch which introduces a REPORT_ERROR macro > to avoid invoking the zend_error function when the error reporting > level indicates that E_NOTICE messages are not to be reported. > Although, all these codepaths are not executed, I guarded all E_NOTICE > messages using the REPORT_ERROR macro. This is a bad idea, because the error handler does other things as well. This is quite a bit of a BC break. regards, Derick -- http://derickrethans.nl | http://ezcomponents.org | http://xdebug.org twitter: @derickr