Commit 08e2de1
authored
Revive and improve the JS compiler brenchmarker profiler. NFC (#25711)
There is a sample output:
```
$ EMPROFILE=2 ./emcc ~/test/hello.cprofiler:INFO: start block "read_ports"
profiler:INFO: block "read_ports" took 0.004 seconds
profiler:INFO: start block "main"
profiler:INFO: start block "parse_arguments"
profiler:INFO: block "parse_arguments" took 0.000 seconds
profiler:INFO: start block "check_sanity"
profiler:INFO: block "check_sanity" took 0.000 seconds
profiler:INFO: start block "setup"
profiler:INFO: block "setup" took 0.000 seconds
profiler:INFO: start block "compile inputs"
profiler:INFO: start block "ensure_sysroot"
profiler:INFO: block "ensure_sysroot" took 0.000 seconds
profiler:INFO: block "compile inputs" took 0.067 seconds
profiler:INFO: start block "linker_setup"
profiler:INFO: block "linker_setup" took 0.048 seconds
profiler:INFO: start block "calculate linker inputs"
profiler:INFO: block "calculate linker inputs" took 0.000 seconds
profiler:INFO: start block "calculate system libraries"
profiler:INFO: block "calculate system libraries" took 0.001 seconds
profiler:INFO: start block "JS symbol generation"
profiler:INFO: block "JS symbol generation" took 0.013 seconds
profiler:INFO: start block "link"
profiler:INFO: block "link" took 0.079 seconds
profiler:INFO: start block "post link"
profiler:INFO: start block "emscript"
profiler:INFO: start block "get_metadata"
profiler:INFO: block "get_metadata" took 0.001 seconds
profiler:INFO: start block "compile_javascript"
[prof] -> overall
[prof] -> startup
[prof] -> loadSettingsFile
[prof] <- loadSettingsFile [1.8 ms]
[prof] -> loadSettingsFile
[prof] <- loadSettingsFile [1.6 ms]
[prof] -> read settings
[prof] <- read settings [0.2 ms]
[prof] -> dynamic imports
[prof] <- dynamic imports [8.1 ms]
[prof] <- startup [13.2 ms]
[prof] -> runJSify
[prof] -> load
[prof] -> preprocessFiles
[prof] <- preprocessFiles [65.9 ms]
[prof] -> executeJS
[prof] <- executeJS [31.0 ms]
[prof] <- load [97.9 ms]
[prof] -> finalCombiner
[prof] <- finalCombiner [12.4 ms]
[prof] <- runJSify [114.0 ms]
[prof] <- overall [135.6 ms]
profiler:INFO: block "compile_javascript" took 0.177 seconds
profiler:INFO: block "emscript" took 0.188 seconds
profiler:INFO: start block "binaryen"
profiler:INFO: block "binaryen" took 0.000 seconds
profiler:INFO: start block "final emitting"
profiler:INFO: block "final emitting" took 0.001 seconds
profiler:INFO: block "post link" took 0.189 seconds
profiler:INFO: block "main" took 0.403 seconds
```1 parent 74f5428 commit 08e2de1
4 files changed
+72
-26
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
39 | 39 | | |
40 | 40 | | |
41 | 41 | | |
| 42 | + | |
42 | 43 | | |
43 | 44 | | |
44 | 45 | | |
| |||
918 | 919 | | |
919 | 920 | | |
920 | 921 | | |
| 922 | + | |
921 | 923 | | |
| 924 | + | |
922 | 925 | | |
923 | 926 | | |
924 | 927 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
22 | 22 | | |
23 | 23 | | |
24 | 24 | | |
| 25 | + | |
25 | 26 | | |
26 | 27 | | |
27 | 28 | | |
| |||
224 | 225 | | |
225 | 226 | | |
226 | 227 | | |
| 228 | + | |
227 | 229 | | |
228 | 230 | | |
229 | 231 | | |
| |||
237 | 239 | | |
238 | 240 | | |
239 | 241 | | |
| 242 | + | |
240 | 243 | | |
241 | 244 | | |
242 | 245 | | |
| |||
262 | 265 | | |
263 | 266 | | |
264 | 267 | | |
| 268 | + | |
| 269 | + | |
265 | 270 | | |
266 | 271 | | |
267 | 272 | | |
268 | 273 | | |
269 | 274 | | |
270 | 275 | | |
| 276 | + | |
| 277 | + | |
271 | 278 | | |
272 | 279 | | |
273 | 280 | | |
| 281 | + | |
| 282 | + | |
| 283 | + | |
274 | 284 | | |
275 | 285 | | |
276 | 286 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
251 | 251 | | |
252 | 252 | | |
253 | 253 | | |
254 | | - | |
255 | | - | |
| 254 | + | |
256 | 255 | | |
257 | 256 | | |
258 | 257 | | |
| 258 | + | |
| 259 | + | |
| 260 | + | |
| 261 | + | |
| 262 | + | |
| 263 | + | |
| 264 | + | |
| 265 | + | |
| 266 | + | |
| 267 | + | |
| 268 | + | |
259 | 269 | | |
260 | | - | |
261 | | - | |
262 | | - | |
263 | | - | |
264 | | - | |
265 | | - | |
266 | | - | |
| 270 | + | |
| 271 | + | |
| 272 | + | |
267 | 273 | | |
268 | 274 | | |
269 | 275 | | |
270 | | - | |
271 | | - | |
272 | | - | |
273 | | - | |
274 | | - | |
| 276 | + | |
| 277 | + | |
| 278 | + | |
| 279 | + | |
| 280 | + | |
275 | 281 | | |
276 | 282 | | |
277 | | - | |
278 | | - | |
279 | | - | |
280 | | - | |
281 | | - | |
282 | | - | |
283 | | - | |
| 283 | + | |
| 284 | + | |
| 285 | + | |
| 286 | + | |
284 | 287 | | |
| 288 | + | |
| 289 | + | |
285 | 290 | | |
286 | 291 | | |
287 | 292 | | |
| 293 | + | |
| 294 | + | |
| 295 | + | |
| 296 | + | |
| 297 | + | |
| 298 | + | |
| 299 | + | |
| 300 | + | |
| 301 | + | |
| 302 | + | |
| 303 | + | |
| 304 | + | |
| 305 | + | |
| 306 | + | |
| 307 | + | |
| 308 | + | |
288 | 309 | | |
289 | 310 | | |
290 | 311 | | |
| |||
311 | 332 | | |
312 | 333 | | |
313 | 334 | | |
| 335 | + | |
314 | 336 | | |
315 | 337 | | |
316 | 338 | | |
| 339 | + | |
317 | 340 | | |
318 | 341 | | |
319 | 342 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
10 | 10 | | |
11 | 11 | | |
12 | 12 | | |
13 | | - | |
14 | 13 | | |
15 | 14 | | |
16 | 15 | | |
17 | 16 | | |
| 17 | + | |
18 | 18 | | |
19 | 19 | | |
| 20 | + | |
| 21 | + | |
20 | 22 | | |
21 | 23 | | |
22 | 24 | | |
| |||
36 | 38 | | |
37 | 39 | | |
38 | 40 | | |
| 41 | + | |
| 42 | + | |
39 | 43 | | |
40 | 44 | | |
41 | 45 | | |
| |||
46 | 50 | | |
47 | 51 | | |
48 | 52 | | |
| 53 | + | |
| 54 | + | |
49 | 55 | | |
50 | 56 | | |
51 | 57 | | |
| |||
77 | 83 | | |
78 | 84 | | |
79 | 85 | | |
| 86 | + | |
| 87 | + | |
80 | 88 | | |
81 | 89 | | |
82 | 90 | | |
| |||
87 | 95 | | |
88 | 96 | | |
89 | 97 | | |
| 98 | + | |
| 99 | + | |
| 100 | + | |
| 101 | + | |
90 | 102 | | |
91 | 103 | | |
92 | 104 | | |
93 | 105 | | |
94 | | - | |
95 | | - | |
96 | 106 | | |
| 107 | + | |
97 | 108 | | |
98 | | - | |
99 | | - | |
| 109 | + | |
100 | 110 | | |
101 | 111 | | |
102 | 112 | | |
| |||
0 commit comments