You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: README.md
+11-2Lines changed: 11 additions & 2 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -41,7 +41,6 @@ Current requirements are:
41
41
***GNU/Linux**, **macOS** or **FreeBSD**
42
42
* zlib dev package (e.g. zlib1g-dev on Debian based distros)
43
43
* PHP 5.4 to 8.3
44
-
* Non-ZTS (threaded) build of PHP (ZTS support is theoretical)
45
44
46
45
## Installation
47
46
@@ -67,6 +66,16 @@ sudo make install
67
66
Then add `extension=spx.so` to your *php.ini*, or in a dedicated *spx.ini* file created within the include directory.
68
67
You may also want to override [default SPX configuration](#configuration) to be able to profile a web request, with [this one](#private-environment) for example for a local development environment.
69
68
69
+
70
+
### ZTS PHP (multi-thread)
71
+
72
+
ZTS PHP is supported, with these extra limitations:
73
+
- a little overhead (theorically unnoticeable in most cases) is added when SPX is loaded, even if it is not enabled.
74
+
- Ctrl-C a CLI script will not make the possible profiling session to be properly finished.
75
+
- segfaults are more likely than for NTS PHP. In this regard, avoid more than ever mixing SPX with other instrumenting extensions (debuggers, profilers...).
76
+
77
+
Also, consider ZTS PHP support as still being in beta.
78
+
70
79
### Linux, PHP-FPM & I/O stats
71
80
72
81
On GNU/Linux, SPX uses procfs (i.e. by reading files under `/proc` directory) to get some stats for the current process or thread. This is what is done under the hood when you select at least one of these metrics: `mor`, `io`, `ior` or `iow`.
@@ -324,7 +333,7 @@ Here is the list below:
324
333
325
334
| Name | Default | Description |
326
335
| ----- | -------- | ------------ |
327
-
|_SPX_ENABLED_|`0`| Whether to enable SPX profiler (i.e. triggering profiling). When disabled there is no performance impact on your application. |
336
+
|_SPX_ENABLED_|`0`| Whether to enable SPX profiler (i.e. triggering profiling). When disabled there is no performance impact on your application (except for ZTS PHP where a disabled SPX still adds a little overhead). |
328
337
|_SPX_AUTO_START_|`1`| Whether to enable SPX profiler's automatic start. When automatic start is disabled, you have to start & stop profiling on your own at runtime via the `spx_profiler_start()` & `spx_profiler_stop()` functions. [See here](#handle-long-living--daemon-processes) for more details. |
329
338
|_SPX_BUILTINS_|`0`| Whether to profile internal functions, script compilations, GC runs and request shutdown. |
330
339
|_SPX_DEPTH_|`0`| The stack depth at which profiling must stop (i.e. aggregate measures of deeper calls). 0 (default value) means unlimited. |
0 commit comments