Newsgroups: php.internals Path: news.php.net Xref: news.php.net php.internals:99054 Return-Path: Mailing-List: contact internals-help@lists.php.net; run by ezmlm Delivered-To: mailing list internals@lists.php.net Received: (qmail 74386 invoked from network); 15 May 2017 18:20:49 -0000 Received: from unknown (HELO lists.php.net) (127.0.0.1) by localhost with SMTP; 15 May 2017 18:20:49 -0000 Authentication-Results: pb1.pair.com header.from=dmitry@zend.com; sender-id=pass Authentication-Results: pb1.pair.com smtp.mail=dmitry@zend.com; spf=pass; sender-id=pass Received-SPF: pass (pb1.pair.com: domain zend.com designates 104.47.37.114 as permitted sender) X-PHP-List-Original-Sender: dmitry@zend.com X-Host-Fingerprint: 104.47.37.114 mail-cys01nam02on0114.outbound.protection.outlook.com Received: from [104.47.37.114] ([104.47.37.114:59072] helo=NAM02-CY1-obe.outbound.protection.outlook.com) by pb1.pair.com (ecelerity 2.1.1.9-wez r(12769M)) with ESMTP id A0/2F-15531-C71F9195 for ; Mon, 15 May 2017 14:20:46 -0400 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=RWSoftware.onmicrosoft.com; s=selector1-zend-com; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version; bh=XzDfPClVwiLKkEqPCa46AC7PkISy9WbUn/xAwTcZMSg=; b=Y3WxilL8eXQPz3oKk6lRX+fzF15bM+mCgu3XOQcrNLcez6OtyosbtEu02YQ+5SPW6JLwdWGWXZ9Ka0o8TifEoFe6DK63JF84xPMyfklwUNsDqh5Ho1JGwKFzxAw6tasHlu4DGrqTtRMD3xOj575Q2ahj91MNk6Gr1U99SA3eXLM= Received: from MWHPR02MB2477.namprd02.prod.outlook.com (10.168.204.147) by MWHPR02MB2510.namprd02.prod.outlook.com (10.168.205.12) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_128_CBC_SHA256_P256) id 15.1.1084.16; Mon, 15 May 2017 18:20:40 +0000 Received: from MWHPR02MB2477.namprd02.prod.outlook.com ([10.168.204.147]) by MWHPR02MB2477.namprd02.prod.outlook.com ([10.168.204.147]) with mapi id 15.01.1084.029; Mon, 15 May 2017 18:20:39 +0000 To: Derick Rethans CC: PHP internals list , Nikita Popov , Xinchen Hui , Sara Golemon , Zeev Suraski Thread-Topic: [PHP-DEV] HYBRID VM Thread-Index: AQHSzYUt8aN8f97/yE2fJzUT2zCciKH1hdaAgAAulqc= Date: Mon, 15 May 2017 18:20:39 +0000 Message-ID: References: , In-Reply-To: Accept-Language: en-US Content-Language: en-US X-MS-Has-Attach: X-MS-TNEF-Correlator: authentication-results: php.net; dkim=none (message not signed) header.d=none;php.net; dmarc=none action=none header.from=zend.com; x-originating-ip: [25.173.117.4] x-ms-publictraffictype: Email x-microsoft-exchange-diagnostics: 1;MWHPR02MB2510;7:/DfTxsVNSxJ1PoL5N/CUCCd59yYt6bjUhFyH8kbTfAHA8zDlQ+M58wTuvXs1CiPIOnItRjiFJ1FEN4GAoA7pzTjjLW1QnkbUkwV1NTCK/ANlLGvYuf47r33u4HooCaS7ZjETrb1hEzsYOL0tA3iW1mVa5Il90mzoHMaJXDr20IdSGjPmbHGowiQKeaZDccOs/py8AQhnOXUbup4Y0xl7bW8QuiKb43tWNTokQ+0SSejp96sfJ+8gLO4gsQk+djibXUCwfzQ2GgvAtMvjpeFrKYXCSTYDT0IJRh7nPjwFwKd9FhgFoxf+pnPUYS0LXmDI6lcr/lH6Ek46L5PRM66Qwg== x-forefront-antispam-report: SFV:SKI;SCL:-1SFV:NSPM;SFS:(10019020)(39410400002)(39400400002)(39450400003)(39840400002)(52314003)(24454002)(377454003)(53546009)(25786009)(8936002)(2900100001)(54906002)(99286003)(8676002)(81166006)(6916009)(53936002)(54896002)(6306002)(2950100002)(7696004)(5660300001)(4326008)(66066001)(74316002)(2906002)(3280700002)(7736002)(7906003)(3660700001)(33656002)(189998001)(55016002)(76176999)(86362001)(38730400002)(110136004)(107886003)(478600001)(229853002)(50986999)(122556002)(6246003)(54356999)(3846002)(9686003)(6506006)(236005)(53376002)(606005)(6436002)(77096006)(102836003)(6116002)(16799955002);DIR:OUT;SFP:1102;SCL:1;SRVR:MWHPR02MB2510;H:MWHPR02MB2477.namprd02.prod.outlook.com;FPR:;SPF:None;MLV:sfv;LANG:en; x-ms-office365-filtering-correlation-id: 009ef2f0-7169-4d7f-b0c5-08d49bbf1715 x-microsoft-antispam: UriScan:;BCL:0;PCL:0;RULEID:(22001)(2017030254075)(201703131423075)(201703031133081);SRVR:MWHPR02MB2510; x-microsoft-antispam-prvs: x-exchange-antispam-report-test: UriScan:(250305191791016)(158342451672863)(148322886591682)(22074186197030)(209352067349851)(211171220733660); x-exchange-antispam-report-cfa-test: BCL:0;PCL:0;RULEID:(6040450)(601004)(2401047)(8121501046)(5005006)(10201501046)(93006095)(93001095)(3002001)(6041248)(20161123564025)(20161123555025)(20161123558100)(20161123562025)(201703131423075)(201702281528075)(201703061421075)(201703061406153)(20161123560025)(6072148);SRVR:MWHPR02MB2510;BCL:0;PCL:0;RULEID:;SRVR:MWHPR02MB2510; x-forefront-prvs: 0308EE423E spamdiagnosticoutput: 1:99 spamdiagnosticmetadata: NSPM Content-Type: multipart/alternative; boundary="_000_MWHPR02MB247791A698E41FBA587D6DE6BFE10MWHPR02MB2477namp_" MIME-Version: 1.0 X-OriginatorOrg: zend.com X-MS-Exchange-CrossTenant-originalarrivaltime: 15 May 2017 18:20:39.1306 (UTC) X-MS-Exchange-CrossTenant-fromentityheader: Hosted X-MS-Exchange-CrossTenant-id: 32210298-c08b-4829-8097-6b12c025a892 X-MS-Exchange-Transport-CrossTenantHeadersStamped: MWHPR02MB2510 Subject: Re: [PHP-DEV] HYBRID VM From: dmitry@zend.com (Dmitry Stogov) --_000_MWHPR02MB247791A698E41FBA587D6DE6BFE10MWHPR02MB2477namp_ Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: quoted-printable Hi Derick, Sorry, it seems I tested it improperly. Anyway, I found and fixed the problem. It was a bug in USER_OPCODE handling in HYBRID VM. Thanks. Dmitry. ________________________________ From: Derick Rethans Sent: Monday, May 15, 2017 6:32:19 PM To: Dmitry Stogov Cc: PHP internals list; Nikita Popov; Xinchen Hui; Sara Golemon; Zeev Suras= ki Subject: Re: [PHP-DEV] HYBRID VM Hi! On Mon, 15 May 2017, Dmitry Stogov wrote: > Recently, I committed HYBRID VM into master, but didn't enable it by > default yet. > > It provides significant performance improvement on small benchmarks > (1.5 times faster on bench.php) and slight improvement on real-life > apps (1-2% on wordpress). Currently it improves PHP only on x86, > x86_64 and PPC compiled with GCC. It also crashes instantly when Xdebug is loaded. I think we should resolve that before making it default for 7.2 and above. > > Now, after additional testing, I like to make HYBRID VM the default VM fo= r PHP-7.2 and above. > > I would glad to do this without RFC, because it's a self containing chang= e that doesn't affect anything except the VM itself. > > It may only break some "system" PHP extensions (debuggers, profilers), th= at relay on CALL VM implementation. > > phpdbg and xdebug are not affected and work out of the box. Uh? Definitely just segfaults here: Number of tests : 476 388 Tests skipped : 88 ( 18.5%) -------- Tests warned : 0 ( 0.0%) ( 0.0%) Tests failed : 384 ( 80.7%) ( 99.0%) Expected fail : 0 ( 0.0%) ( 0.0%) Tests passed : 4 ( 0.8%) ( 1.0%) derick@singlemalt:~/dev/php/xdebug-xdebug $ cat tests/001.php [GIT: master][PHP: 7.2.0-dev ] derick@singlemalt:~/dev/php/xdebug-xdebug $ gdb --args /usr/local/php/trunk= /bin/php -n -c '/home/derick/dev/php/xdebug-xdebug/tmp-php.ini' -d "outpu= t_handler=3D" -d "open_basedir=3D" -d "disable_functions=3D" -d "output_buf= fering=3DOff" -d "error_reporting=3D32767" -d "display_errors=3D1" -d "disp= lay_startup_errors=3D1" -d "log_errors=3D0" -d "html_errors=3D0" -d "track_= errors=3D0" -d "report_memleaks=3D1" -d "report_zend_debug=3D0" -d "docref_= root=3D" -d "docref_ext=3D.html" -d "error_prepend_string=3D" -d "error_app= end_string=3D" -d "auto_prepend_file=3D" -d "auto_append_file=3D" -d "ignor= e_repeated_errors=3D0" -d "precision=3D14" -d "memory_limit=3D128M" -d "log= _errors_max_len=3D0" -d "opcache.fast_shutdown=3D0" -d "opcache.file_update= _protection=3D0" -d "extension_dir=3D/home/derick/dev/php/xdebug-xdebug/mod= ules/" -d "zend_extension=3D/home/derick/dev/php/xdebug-xdebug/modules/xdeb= ug.so" -d "session.auto_start=3D0" -d "zlib.output_compression=3DOff" -d "x= debug.default_enable=3D0" -d "mbstring.func_overload=3D0" -d "xdebug.profil= er_enable=3D0" -f "/home/derick/dev/php/xdebug-xdebug/tests/001.php" GNU gdb (Debian 7.12-6) 7.12.0.20161007-git Copyright (C) 2016 Free Software Foundation, Inc. License GPLv3+: GNU GPL version 3 or later This is free software: you are free to change and redistribute it. There is NO WARRANTY, to the extent permitted by law. Type "show copying" and "show warranty" for details. This GDB was configured as "x86_64-linux-gnu". Type "show configuration" for configuration details. For bug reporting instructions, please see: . Find the GDB manual and other documentation resources online at: . For help, type "help". Type "apropos word" to search for commands related to "word"... Reading symbols from /usr/local/php/trunk/bin/php...done. (gdb) run Starting program: /usr/local/php/trunk/bin/php -n -c /home/derick/dev/php/x= debug-xdebug/tmp-php.ini -d output_handler=3D -d open_basedir=3D -d disable= _functions=3D -d output_buffering=3DOff -d error_reporting=3D32767 -d displ= ay_errors=3D1 -d display_startup_errors=3D1 -d log_errors=3D0 -d html_error= s=3D0 -d track_errors=3D0 -d report_memleaks=3D1 -d report_zend_debug=3D0 -= d docref_root=3D -d docref_ext=3D.html -d error_prepend_string=3D -d error_= append_string=3D -d auto_prepend_file=3D -d auto_append_file=3D -d ignore_r= epeated_errors=3D0 -d precision=3D14 -d memory_limit=3D128M -d log_errors_m= ax_len=3D0 -d opcache.fast_shutdown=3D0 -d opcache.file_update_protection= =3D0 -d extension_dir=3D/home/derick/dev/php/xdebug-xdebug/modules/ -d zend= _extension=3D/home/derick/dev/php/xdebug-xdebug/modules/xdebug.so -d sessio= n.auto_start=3D0 -d zlib.output_compression=3DOff -d xdebug.default_enable= =3D0 -d mbstring.func_overload=3D0 -d xdebug.profiler_enable=3D0 -f /home/d= erick/dev/php/xdebug-xdebug/tests/001.php [Thread debugging using libthread_db enabled] Using host libthread_db library "/lib/x86_64-linux-gnu/libthread_db.so.1". xdebug extension is available Program received signal SIGSEGV, Segmentation fault. 0x0000555555e4c8f9 in execute_ex (ex=3D0x555555dd02ff ) at /home/derick/dev/php/php-src.git/Zend/zend_vm_execute.h:= 59065 59065 HYBRID_BREAK(); (gdb) bt #0 0x0000555555e4c8f9 in execute_ex (ex=3D0x555555dd02ff ) at /home/derick/dev/php/php-src.git/Zend/zend_vm_execut= e.h:59065 #1 0x0000555555e4c8f6 in execute_ex (ex=3D0x555555dd02ff ) at /home/derick/dev/php/php-src.git/Zend/zend_vm_execut= e.h:59064 #2 0x0000555555e4c8f6 in execute_ex (ex=3D0x7ffff1a1f030) at /home/derick/= dev/php/php-src.git/Zend/zend_vm_execute.h:59064 #3 0x00007ffff17be907 in xdebug_execute_ex (execute_data=3D0x7ffff1a1f030)= at /home/derick/dev/php/xdebug-xdebug/xdebug.c:1795 #4 0x0000555555e51a1d in zend_execute (op_array=3D0x7ffff1a83300, return_v= alue=3D0x0) at /home/derick/dev/php/php-src.git/Zend/zend_vm_execute.h:6294= 9 #5 0x0000555555d6d7f6 in zend_execute_scripts (type=3D8, retval=3D0x0, fil= e_count=3D3) at /home/derick/dev/php/php-src.git/Zend/zend.c:1537 #6 0x0000555555cdbd82 in php_execute_script (primary_file=3D0x7fffffffd7c0= ) at /home/derick/dev/php/php-src.git/main/main.c:2548 #7 0x0000555555e5408e in do_cli (argc=3D68, argv=3D0x5555569c5e70) at /hom= e/derick/dev/php/php-src.git/sapi/cli/php_cli.c:997 #8 0x0000555555e55048 in main (argc=3D68, argv=3D0x5555569c5e70) at /home/= derick/dev/php/php-src.git/sapi/cli/php_cli.c:1390 (gdb) Latest Xdebug from GitHub. cheers, Derick -- https://derickrethans.nl | https://xdebug.org | https://dram.io Like Xdebug? Consider a donation: https://xdebug.org/donate.php twitter: @derickr and @xdebug --_000_MWHPR02MB247791A698E41FBA587D6DE6BFE10MWHPR02MB2477namp_--