Newsgroups: php.internals Path: news.php.net Xref: news.php.net php.internals:104129 Return-Path: Delivered-To: mailing list internals@lists.php.net Received: (qmail 10357 invoked from network); 4 Feb 2019 18:42:21 -0000 Received: from unknown (HELO mail-it1-f175.google.com) (209.85.166.175) by pb1.pair.com with SMTP; 4 Feb 2019 18:42:21 -0000 Received: by mail-it1-f175.google.com with SMTP id h193so510483ita.5 for ; Mon, 04 Feb 2019 07:23:16 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=mime-version:references:in-reply-to:from:date:message-id:subject:to :cc; bh=RGJOrUeYXiegunwJwUM3hd90Trj0M9HueHFx+EOMftk=; b=Q/y57izd1BXI8Y+vvToqjrn/6HV3PVwNMcyyVxEO27XgPdjPb+DUYRnw13uo2ifM0I NJB6Uh3reaTXPhDRv/+sQ7UY/VazBTMQHhZOC6chAzWQOfRmUu/SPKvpmgDyh5QY4sXA J8WSx43Zox6+OaPiLeKevOKEMDrT5lELYJXtEZvUAV5IpD1rBUTj4BuoHa70XEVilFPu Jn09nzGRZRgDpM/o30QJoLooI20FA+iUAN/XjRYZ4F8DdlG9KSO0aX3Jhz6JqoAqJghx ter2JG20DhwKXEK5so+ImyHzw6tpovhvkgVKqevY6uu6+jLiMa9Hrwdo+HB3Si9/4S3U a+Yg== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:mime-version:references:in-reply-to:from:date :message-id:subject:to:cc; bh=RGJOrUeYXiegunwJwUM3hd90Trj0M9HueHFx+EOMftk=; b=N7ggb7jZ01hAWunnKif6BfVvGUaKKOJMsJZvB7ya2le2z4CCUnFr0PgtXTBKrgtYmt 84OYVLJEnWT6xaVCzvCvsGmqT4fD5g/BtoDPL06B6cKYIbHPMDKwu/mLtMUM7VoNHDFy 5qRJFl2hkvJbDtw8Ltobf9+N8XcYAdFNDzsM0pI1Tuc9LrkhugfZQHvWraQ0aSBWOAnI v0/vER/uSKBWchGhINSnlIPPo/Rn6u8ZJiTOjOASQ4XAVH42wLbFSzODLcqpQV9HzVRP 3z27J4znpPjSom3Lh+MMdftB9S35uPHUySQiI8CCMwnvOaRfhMzpCeF549luIjo4zrPa NXMg== X-Gm-Message-State: AHQUAuYxNmxRCSUXT6KiYKr+5gvTWCFzEZbtRhvW6q2JiYbYkmQt3FIm B+r4tposHZmtjxz1GmqZVs2RzRA8wITf5vmm0/UvfzdS X-Google-Smtp-Source: AHgI3IYX/wRzpye6mDVn80JY9O7nEHHinmB2NAJ8skgMHi+VEgNm+rfIFXiDI9YdBDRz6iExVS+BKzRQfmnaL8JXX9E= X-Received: by 2002:a5e:c906:: with SMTP id z6mr1186215iol.47.1549293795614; Mon, 04 Feb 2019 07:23:15 -0800 (PST) MIME-Version: 1.0 References: <866a9262-4f49-fa20-e9d2-dcf2f4b0d320@zend.com> <6fda2b56-b99d-d383-af4d-24280767096e@zend.com> <96038f57-2036-628b-98cf-c54c8bfbe8f0@zend.com> In-Reply-To: <96038f57-2036-628b-98cf-c54c8bfbe8f0@zend.com> Date: Mon, 4 Feb 2019 16:22:59 +0100 Message-ID: To: Dmitry Stogov Cc: PHP internals Content-Type: multipart/alternative; boundary="0000000000005722590581131227" Subject: Re: [PHP-DEV] [RFC] JIT From: nikita.ppv@gmail.com (Nikita Popov) --0000000000005722590581131227 Content-Type: text/plain; charset="UTF-8" On Mon, Feb 4, 2019 at 4:11 PM Dmitry Stogov wrote: > > > On 2/4/19 5:44 PM, Nikita Popov wrote: > > On Mon, Feb 4, 2019 at 2:26 PM Dmitry Stogov > > wrote: > > > > > > > > On 2/1/19 4:23 PM, Dmitry Stogov wrote: > > > > > > > > > On 2/1/19 3:09 PM, Nikita Popov wrote: > > >> On Thu, Jan 31, 2019 at 10:44 AM Dmitry Stogov > > > >> >> wrote: > > >> > > >> Hi Internals, > > >> > > >> > > >> I'm glad to finally propose including JIT into PHP. > > >> > > >> > > >> https://wiki.php.net/rfc/jit > > >> > > >> > > >> In the current state it may be included both into PHP-8, > > where we > > >> are going to continue active improvement, and into PHP-7.4, > > as an > > >> experimental feature. > > >> > > >> > > >> Thanks. Dmitry. > > >> > > >> > > >> I would like to check if the JIT provides an improvement for > > PHP-Parser. > > >> Unfortunately I'm getting a segfault when running the tests. > > Should be > > >> reproducible with > > >> > > >> git clone git@github.com:nikic/PHP-Parser.git > > >> cd PHP-Parser > > >> composer install > > >> php-jit vendor/bin/phpunit > > >> > > >> I tried to debug this. Unfortunately my gdb doesn't seem to work > > with > > >> JIT: It hangs when the script starts running, on line > > Zend/zend_gdb.c:84 > > >> in zend_gdb_register_code. I don't know if that's a bug or I > > need to do > > >> something additional here (I'm using GNU gdb (Ubuntu > 8.1-0ubuntu3) > > >> 8.1.0.20180409-git). > > > > > > GDB takes enormous time registering too many JIT-ed functions... > > > It should be possible to catch the name of problematic functions > > and the > > > JIT only them (using PHPDOC trigger). I'll try to analyze the > > crash, but > > > most probably, only on next week. > > > > I fixed the problem caused JIT to fail on PHP-Parser tests (it was > > related to changes introduced by typed properties patch). > > > > I'm also going to disable automatic JIT code registration in GDB. > > > > Thanks. Dmitry. > > > > > > Thanks. I was now able to run a PHP-Parser benchmark, which showed ~1.5x > > speedup with default JIT configuration. That's promising :) > > > > Next I want to try https://github.com/amphp/hpack (part of HTTP 2 > > implementation), where I also expect good results. Currently there is a > > segfault while running tests. > > Could you provide a quick instruction, how to reproduce this (in the > same way like with PHP-Parser). > The reproduce steps are basically the same in this case, just on a different repo: git clone git@github.com:amphp/hpack.git cd hpack composer install php-jit vendor/bin/phpunit Nikita --0000000000005722590581131227--