Skip to content

Commit 548c474

Browse files
Add frameless function call to validate stack walking
1 parent 617ba06 commit 548c474

File tree

2 files changed

+32
-8
lines changed

2 files changed

+32
-8
lines changed

profiling/tests/correctness/allocations.json

Lines changed: 28 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -7,14 +7,26 @@
77
"stack-content": [
88
{
99
"regular_expression": "<?php;main;a;standard\\|str_repeat$",
10-
"percent": 66,
11-
"value": 1248240336,
10+
"percent": 33,
11+
"value": 61440016,
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": 613620616,
17+
"value": 61440016,
18+
"error_margin": 5
19+
},
20+
{
21+
"regular_expression": "<?php;main;b;standard\\|str_repeat$",
22+
"percent": 16,
23+
"value": 30720029,
24+
"error_margin": 5
25+
},
26+
{
27+
"regular_expression": "<?php;main;b;standard\\|str_replace$",
28+
"percent": 16,
29+
"value": 30720029,
1830
"error_margin": 5
1931
}
2032
]
@@ -24,12 +36,22 @@
2436
"stack-content": [
2537
{
2638
"regular_expression": "<?php;main;a;standard\\|str_repeat$",
27-
"percent": 50,
39+
"percent": 25,
40+
"error_margin": 5
41+
},
42+
{
43+
"regular_expression": "<?php;main;a;standard\\|str_replace$",
44+
"percent": 25,
2845
"error_margin": 5
2946
},
3047
{
3148
"regular_expression": "<?php;main;b;standard\\|str_repeat$",
32-
"percent": 50,
49+
"percent": 25,
50+
"error_margin": 5
51+
},
52+
{
53+
"regular_expression": "<?php;main;b;standard\\|str_replace$",
54+
"percent": 25,
3355
"error_margin": 5
3456
}
3557
]

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)