Newsgroups: php.internals Path: news.php.net Xref: news.php.net php.internals:79421 Return-Path: Mailing-List: contact internals-help@lists.php.net; run by ezmlm Delivered-To: mailing list internals@lists.php.net Received: (qmail 44501 invoked from network); 4 Dec 2014 10:54:34 -0000 Received: from unknown (HELO lists.php.net) (127.0.0.1) by localhost with SMTP; 4 Dec 2014 10:54:34 -0000 Authentication-Results: pb1.pair.com header.from=julienpauli@gmail.com; sender-id=pass Authentication-Results: pb1.pair.com smtp.mail=julienpauli@gmail.com; spf=pass; sender-id=pass Received-SPF: pass (pb1.pair.com: domain gmail.com designates 209.85.216.54 as permitted sender) X-PHP-List-Original-Sender: julienpauli@gmail.com X-Host-Fingerprint: 209.85.216.54 mail-qa0-f54.google.com Received: from [209.85.216.54] ([209.85.216.54:41323] helo=mail-qa0-f54.google.com) by pb1.pair.com (ecelerity 2.1.1.9-wez r(12769M)) with ESMTP id F0/12-34106-56D30845 for ; Thu, 04 Dec 2014 05:54:30 -0500 Received: by mail-qa0-f54.google.com with SMTP id i13so11512347qae.41 for ; Thu, 04 Dec 2014 02:54:27 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=mime-version:sender:in-reply-to:references:from:date:message-id :subject:to:cc:content-type; bh=dqBDoHmnhHPF8xNXGhTNBv/bxBXgqljMRuopD+IJprE=; b=taesTgQqHFCl1tND02dLiRoobilZMo+yvpKX9k3FN0B41/YTOye3nE2j6zLab6CqZM 4aI3y9wlLeNta61uxPuisQpVCt6lg8NwQa/GVNWvTP8btHE0tS1/HahoagpFmW6ScA4A 76lDcyIMLpjMijUhx7HYo5yb9n3Y5CqAi2qyIDTrcrO2pG1/R8yl5YuaQfdHK78wd6mJ JUvZyMoDwylBPGbS7vvlw8LGe4ceHY/GeIy4C/ET3XJD4M8qmXGswCMLuALoHoF2Tp7P loRX6daoh4G0QIURR8N6eSSiJ5F4oqJgl8Co3T1Xm7PJItjQXJC4IIO0lCuuPcldRnpa d66A== X-Received: by 10.224.131.135 with SMTP id x7mr16179720qas.38.1417690467330; Thu, 04 Dec 2014 02:54:27 -0800 (PST) MIME-Version: 1.0 Sender: julienpauli@gmail.com Received: by 10.140.20.86 with HTTP; Thu, 4 Dec 2014 02:53:47 -0800 (PST) In-Reply-To: References: Date: Thu, 4 Dec 2014 11:53:47 +0100 X-Google-Sender-Auth: 4F01ttl_DX6mtJ9MDs844epKIn4 Message-ID: To: Benjamin Eberlei Cc: PHP Internals Content-Type: text/plain; charset=UTF-8 Subject: Re: [PHP-DEV] [RFC] Turn gc_collect_cycles into a function pointer From: jpauli@php.net (Julien Pauli) 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 fail > 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. Julien Pauli