Newsgroups: php.internals Path: news.php.net Xref: news.php.net php.internals:79422 Return-Path: Mailing-List: contact internals-help@lists.php.net; run by ezmlm Delivered-To: mailing list internals@lists.php.net Received: (qmail 47414 invoked from network); 4 Dec 2014 11:39:46 -0000 Received: from unknown (HELO lists.php.net) (127.0.0.1) by localhost with SMTP; 4 Dec 2014 11:39:46 -0000 Authentication-Results: pb1.pair.com header.from=tyra3l@gmail.com; sender-id=pass Authentication-Results: pb1.pair.com smtp.mail=tyra3l@gmail.com; spf=pass; sender-id=pass Received-SPF: pass (pb1.pair.com: domain gmail.com designates 74.125.82.49 as permitted sender) X-PHP-List-Original-Sender: tyra3l@gmail.com X-Host-Fingerprint: 74.125.82.49 mail-wg0-f49.google.com Received: from [74.125.82.49] ([74.125.82.49:33755] helo=mail-wg0-f49.google.com) by pb1.pair.com (ecelerity 2.1.1.9-wez r(12769M)) with ESMTP id D2/82-34106-EF740845 for ; Thu, 04 Dec 2014 06:39:42 -0500 Received: by mail-wg0-f49.google.com with SMTP id n12so14036406wgh.8 for ; Thu, 04 Dec 2014 03:39:39 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=mime-version:in-reply-to:references:date:message-id:subject:from:to :cc:content-type; bh=d1828WwE+cAbYIeBIga1FQ1Agnaf6rF/ViTiZYW6P14=; b=nmGT8aqH4V+r3de/VIARULun/hhMdww/Ag6RNCTt4dDRbY8QP8id3loRtMOjDdDKtz x3Xiw9bc7tZSWQfSgrm8ON/IYDKIUOfWSm+rbCfsyCj4cR/BDCJJ8c53UgW3tZXx+iQo sG2ivfLS9G3A/sfvCHQVymrPLDaoGQxLLpsCoSRNk+cuufsMQ1rzUFz2Un+a8ZiMpmDt UQASTgWlX3ucPeLwKLWrDQ91v7DOH10mcxQIY+IVltGdDHaV1lPmkOnJ2fDhKVkuMe82 PhMqUev4XN8eTWIK+/GQ4Uhk0oDcblMne+PceMf6EC1DMUhv7tXlYieXmZWgOEB6/p0H RzPQ== MIME-Version: 1.0 X-Received: by 10.194.121.129 with SMTP id lk1mr14447490wjb.99.1417693179623; Thu, 04 Dec 2014 03:39:39 -0800 (PST) Received: by 10.180.88.33 with HTTP; Thu, 4 Dec 2014 03:39:39 -0800 (PST) In-Reply-To: References: Date: Thu, 4 Dec 2014 12:39:39 +0100 Message-ID: To: Julien Pauli Cc: Benjamin Eberlei , PHP Internals Content-Type: multipart/alternative; boundary=089e011779f55f3f460509626a73 Subject: Re: [PHP-DEV] [RFC] Turn gc_collect_cycles into a function pointer From: tyra3l@gmail.com (Ferenc Kovacs) --089e011779f55f3f460509626a73 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: quoted-printable On Thu, Dec 4, 2014 at 11:53 AM, Julien Pauli wrote: > On Thu, Dec 4, 2014 at 9:30 AM, Benjamin Eberlei > wrote: > > Good morning, > > > > This is just a very small change, I propose this RFC for discussion to > turn > > the C function "gc_collect_cycles" into a pointer. > > > > https://wiki.php.net/rfc/gc_fn_pointer > > > > Composer's garbage collection optimization showed that PHP Profilers fa= il > > to capture the dynamics of GC and we need better hooks to make this > > possible. > > There are many other things that could be turned into function > pointers to allow extensions to hook. > Our hook strategy should be reviewed entirely. > > Not only GC. If you look at streams, many of them are not > overwritable, and some are, but they are missing from the headers file > so you may not overwrite them. > > I suggest we design a wider RFC for PHP7 about what we would be able > to hook, and what not (and what is the impact, because the more you > hook , the more complex it becomes about bad interactions). > > This may also include a refactoring in the zend_module_entry and the > zend_extension structs. Fe, zend_extension hooks about the op_array > could be reworked , I find the op_array_dtor_handler hook misplaced in > the chain. > zend_module_entry could also benefit from refactoring to have a better > knowing of other extensions, and a true dependency manager. > > That sounds like a lot of work. +1 if somebody willing to champion that effort, but I wouldn't delay/discard this small improvement on the vague promise that maybe this will be solved as part of a bigger rfc. just my 2 cents ofc. --=20 Ferenc Kov=C3=A1cs @Tyr43l - http://tyrael.hu --089e011779f55f3f460509626a73--