Skip to content

Commit 8d918e7

Browse files
Add frameless function call to validate stack walking
1 parent 617ba06 commit 8d918e7

File tree

2 files changed

+31
-6
lines changed

2 files changed

+31
-6
lines changed

profiling/tests/correctness/allocations.json

Lines changed: 27 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -7,29 +7,52 @@
77
"stack-content": [
88
{
99
"regular_expression": "<?php;main;a;standard\\|str_repeat$",
10-
"percent": 66,
10+
"percent": 33,
1111
"value": 1248240336,
1212
"error_margin": 5
1313
},
1414
{
15-
"regular_expression": "<?php;main;b;standard\\|str_repeat$",
15+
"regular_expression": "<?php;main;a;standard\\|str_replace$",
1616
"percent": 33,
17+
"value": 1248240336,
18+
"error_margin": 5
19+
},
20+
{
21+
"regular_expression": "<?php;main;b;standard\\|str_repeat$",
22+
"percent": 16,
23+
"value": 613620616,
24+
"error_margin": 5
25+
},
26+
{
27+
"regular_expression": "<?php;main;b;standard\\|str_replace$",
28+
"percent": 16,
1729
"value": 613620616,
1830
"error_margin": 5
1931
}
32+
2033
]
2134
},
2235
{
2336
"profile-type": "alloc-samples",
2437
"stack-content": [
2538
{
2639
"regular_expression": "<?php;main;a;standard\\|str_repeat$",
27-
"percent": 50,
40+
"percent": 25,
41+
"error_margin": 5
42+
},
43+
{
44+
"regular_expression": "<?php;main;a;standard\\|str_replace$",
45+
"percent": 25,
2846
"error_margin": 5
2947
},
3048
{
3149
"regular_expression": "<?php;main;b;standard\\|str_repeat$",
32-
"percent": 50,
50+
"percent": 25,
51+
"error_margin": 5
52+
},
53+
{
54+
"regular_expression": "<?php;main;b;standard\\|str_replace$",
55+
"percent": 25,
3356
"error_margin": 5
3457
}
3558
]

profiling/tests/correctness/allocations.php

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -2,12 +2,14 @@
22

33
function a()
44
{
5-
str_repeat("a", 1024 * 120_000);
5+
$a = str_repeat("a", 1024 * 120_000);
6+
str_replace('a', 'b', $a);
67
}
78

89
function b()
910
{
10-
str_repeat("a", 1024 * 60_000);
11+
$a = str_repeat("a", 1024 * 60_000);
12+
str_replace('a', 'b', $a);
1113
}
1214

1315
function main()

0 commit comments

Comments
 (0)