Skip to content

Commit

Permalink
Merge branch '0.9.x' into 0.10.x
Browse files Browse the repository at this point in the history
  • Loading branch information
sj-i committed Nov 24, 2023
2 parents 5af99d1 + 7bd2311 commit 21d257b
Showing 1 changed file with 18 additions and 1 deletion.
19 changes: 18 additions & 1 deletion docs/memory-profiler.md
Original file line number Diff line number Diff line change
Expand Up @@ -486,11 +486,28 @@ The references in the objects_store don't add refcount to the objects.
- Data that can only be reached from circular references that don't contain any objects
- Support for the opcache SHM
# Troubleshooting
## jq says "parse error: Exceeds depth limit for parsing at line 1"
It's not a bug of Reli, but a limitation of `jq`. Currently, `jq` doesn't have a way to increase the limit without recompiling it. You can also try some other tools like `gojq` or `jj` instead.
## Cannot find a way to use this tool in docker
Try this.
```bash
$ docker run -it --security-opt="apparmor=unconfined" --cap-add=SYS_PTRACE --pid=host reliforp/reli-prof i:m -p <pid_of_target_process> >memory_analyzed.json
```
If you hit the memory_limit during the analysis, then you can increase the memory_limit like this.
```bash
$ docker run --entrypoint=php -it --security-opt="apparmor=unconfined" --cap-add=SYS_PTRACE --pid=host reliforp/reli-prof -dmemory_limit=2G reli i:m -p <pid_of_target_process> >memory_analyzed.json
```
# See also
- [PHP Internals Book](https://www.phpinternalsbook.com/)
- [PHP's new hashtable implementation ](https://www.npopov.com/2014/12/22/PHPs-new-hashtable-implementation.html)
- [PHP 7 Virtual Machine](https://www.npopov.com/2017/04/14/PHP-7-Virtual-machine.html)
- [Internal value representation in PHP 7 - Part 1 ](https://www.npopov.com/2015/05/05/Internal-value-representation-in-PHP-7-part-1.html)
- [Internal value representation in PHP 7 - Part 2 ](https://www.npopov.com/2015/06/19/Internal-value-representation-in-PHP-7-part-2.html)
- https://github.com/adsr/phpspy
- https://github.com/BitOne/php-meminfo
- https://github.com/BitOne/php-meminfo

0 comments on commit 21d257b

Please sign in to comment.