php.net |  support |  documentation |  report a bug |  advanced search |  search howto |  statistics |  random bug |  login
Bug #71166 Wrong output of GC statistics
Submitted: 2015-12-19 08:10 UTC Modified: 2015-12-20 07:05 UTC
From: y dot uchiyama dot 1015 at gmail dot com Assigned:
Status: Not a bug Package: Scripting Engine problem
PHP Version: 7.0.1 OS: Any
Private report: No CVE-ID: None
View Add Comment Developer Edit
Welcome! If you don't have a Git account, you can't do anything here.
You can add a comment by following this link or if you reported this bug, you can edit this bug over here.
(description)
Block user comment
Status: Assign to:
Package:
Bug Type:
Summary:
From: y dot uchiyama dot 1015 at gmail dot com
New email:
PHP Version: OS:

 

 [2015-12-19 08:10 UTC] y dot uchiyama dot 1015 at gmail dot com
Description:
------------
PHP 7 outputs wrong GC stats when compiled with -DGC_BENCH=1, because root_buf_length is not decreased when cyclic garbages are collected on GC.


Test script:
---------------
./sapi/cli/php </tmp/example1.php

where example1.php is shown at the following
http://www.php.net/manual/en/features.gc.performance-considerations.php


Expected result:
----------------
Root buffer length/peak should be <= 10000.

Actual result:
--------------
GC Statistics
-------------
Runs:               10
Collected:          99999
Root buffer length: 100001
Root buffer peak:   100006


Patches

decrease-root_buf_length-correctly (last revision 2015-12-19 08:11 UTC by y dot uchiyama dot 1015 at gmail dot com)

Add a Patch

Pull Requests

Add a Pull Request

History

AllCommentsChangesGit/SVN commitsRelated reports
 [2015-12-19 08:54 UTC] y dot uchiyama dot 1015 at gmail dot com
Sorry, but now I'm not certain my patch is right.
 [2015-12-20 07:05 UTC] laruence@php.net
-Status: Open +Status: Not a bug
 [2015-12-20 07:05 UTC] laruence@php.net
Thank you for taking the time to write to us, but this is not
a bug. Please double-check the documentation available at
http://www.php.net/manual/ and the instructions on how to report
a bug at http://bugs.php.net/how-to-report.php

in PHP7, we introduced a gc_additional_buffer. so I think >1000 make sense in this case.
 
PHP Copyright © 2001-2024 The PHP Group
All rights reserved.
Last updated: Sun May 05 23:01:30 2024 UTC