Newsgroups: php.internals Path: news.php.net Xref: news.php.net php.internals:32397 Return-Path: Mailing-List: contact internals-help@lists.php.net; run by ezmlm Delivered-To: mailing list internals@lists.php.net Received: (qmail 44801 invoked by uid 1010); 20 Sep 2007 11:39:45 -0000 Delivered-To: ezmlm-scan-internals@lists.php.net Delivered-To: ezmlm-internals@lists.php.net Received: (qmail 44784 invoked from network); 20 Sep 2007 11:39:45 -0000 Received: from unknown (HELO lists.php.net) (127.0.0.1) by localhost with SMTP; 20 Sep 2007 11:39:45 -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 Linux 2.6 Received: from [82.94.239.5] ([82.94.239.5:58405] helo=jdi.jdi-ict.nl) by pb1.pair.com (ecelerity 2.1.1.9-wez r(12769M)) with ESMTP id F6/81-35158-EFB52F64 for ; Thu, 20 Sep 2007 07:39:44 -0400 Received: from localhost (localhost [127.0.0.1]) by jdi.jdi-ict.nl (8.13.7/8.12.11) with ESMTP id l8KBdd3M003049; Thu, 20 Sep 2007 13:39:39 +0200 Date: Thu, 20 Sep 2007 13:39:40 +0200 (CEST) X-X-Sender: derick@kossu.ez.no To: Stefan Esser cc: PHP internals In-Reply-To: <46F24A61.8050509@sektioneins.de> Message-ID: References: <46F24A61.8050509@sektioneins.de> MIME-Version: 1.0 Content-Type: TEXT/PLAIN; charset=UTF-8 Subject: Re: [PHP-DEV] RFC: Storing additional information for op_arrays From: derick@php.net (Derick Rethans) On Thu, 20 Sep 2007, Stefan Esser wrote: > One problem I and others have run into is that from time to time we need > to store extra information for specific opcode arrays. For simple values > it is possible to use one of the reserved slots in the op_array > structure, but in the past that has been unrelieable because APC for > example simply overwrote the first slots without asking the Zend Engine > to reserve some space. Have a pointer on how this is done? I sortof need/want to do this in Xdebug as well, however I don't want opcode caches to remember this value. > The next problem is that the amount of data you can store is not that big. > Leaving a pointer in the reserved field is also not a good idea, because > this will break as soon the opcode array is shared among processes or > was stored on the disk. > > Therefore it would be great if we can come up with a modification of the > op_array structure that allows extensions to append arbitrary sized data > to an op_array, that gets also cached by all the opcode cachers... > > What do you think? Sounds like a good idea to me - but the op code caches do need to some special trickery for this I guess. However, in my case I do *not* want an opcode cache to remember the stored data, so that perhaps needs to be taken into account as well. regards, Derick -- Derick Rethans http://derickrethans.nl | http://ez.no | http://xdebug.org