diff --git a/sample/profiles/Chrome/141/no-arg-data.json b/sample/profiles/Chrome/141/no-arg-data.json new file mode 100644 index 000000000..3f2d9e052 --- /dev/null +++ b/sample/profiles/Chrome/141/no-arg-data.json @@ -0,0 +1,91 @@ +{"metadata": { + "source": "DevTools", + "startTime": "2025-10-20T21:55:40.761Z", + "dataOrigin": "TraceEvents", + "hostDPR": 2, + "modifications": { + "entriesModifications": { + "hiddenEntries": [], + "expandableEntries": [] + }, + "initialBreadcrumb": { + "window": { + "min": 336043688856, + "max": 336066014545, + "range": 22325689 + }, + "child": null + }, + "annotations": { + "entryLabels": [], + "labelledTimeRanges": [], + "linksBetweenEntries": [] + } + } + } +, + "traceEvents": [ + {"args":{"name":"swapper"},"cat":"__metadata","name":"thread_name","ph":"M","pid":0,"tid":0,"ts":0}, + {"args":{"name":"CrBrowserMain"},"cat":"__metadata","name":"thread_name","ph":"M","pid":72871,"tid":6148905,"ts":0}, + {"args":{"name":"Compositor"},"cat":"__metadata","name":"thread_name","ph":"M","pid":7787,"tid":6209038,"ts":0}, + {"args":{"name":"PerfettoTrace"},"cat":"__metadata","name":"thread_name","ph":"M","pid":72892,"tid":6149146,"ts":0}, + {"args":{"name":"PerfettoTrace"},"cat":"__metadata","name":"thread_name","ph":"M","pid":72871,"tid":6149100,"ts":0}, + {"args":{"name":"PerfettoTrace"},"cat":"__metadata","name":"thread_name","ph":"M","pid":7787,"tid":6209032,"ts":0}, + {"args":{"name":"Chrome_IOThread"},"cat":"__metadata","name":"thread_name","ph":"M","pid":72871,"tid":6149106,"ts":0}, + {"args":{"name":"VizCompositorThread"},"cat":"__metadata","name":"thread_name","ph":"M","pid":72892,"tid":6149353,"ts":0}, + {"args":{"name":"CrGpuMain"},"cat":"__metadata","name":"thread_name","ph":"M","pid":72892,"tid":6149123,"ts":0}, + {"args":{"name":"CompositorTileWorker1"},"cat":"__metadata","name":"thread_name","ph":"M","pid":72871,"tid":6149120,"ts":0}, + {"args":{"name":"CrRendererMain"},"cat":"__metadata","name":"thread_name","ph":"M","pid":7787,"tid":6209019,"ts":0}, + {"args":{"name":"v8:ProfEvntProc"},"cat":"__metadata","name":"thread_name","ph":"M","pid":7787,"tid":15626891,"ts":0}, + {"args":{"name":"Chrome_DevToolsADBThread"},"cat":"__metadata","name":"thread_name","ph":"M","pid":72871,"tid":7160349,"ts":0}, + {"args":{"name":"Chrome_ChildIOThread"},"cat":"__metadata","name":"thread_name","ph":"M","pid":7787,"tid":6209037,"ts":0}, + {"args":{"name":"ThreadPoolForegroundWorker"},"cat":"__metadata","name":"thread_name","ph":"M","pid":72871,"tid":6149102,"ts":0}, + {"args":{"name":"ThreadPoolServiceThread"},"cat":"__metadata","name":"thread_name","ph":"M","pid":7787,"tid":6209034,"ts":0}, + {"args":{"name":"ThreadPoolServiceThread"},"cat":"__metadata","name":"thread_name","ph":"M","pid":72871,"tid":6149101,"ts":0}, + {"args":{"name":"ThreadPoolForegroundWorker"},"cat":"__metadata","name":"thread_name","ph":"M","pid":7787,"tid":6209035,"ts":0}, + {"args":{"name":"ThreadPoolForegroundWorker"},"cat":"__metadata","name":"thread_name","ph":"M","pid":7787,"tid":6209040,"ts":0}, + {"args":{"name":"ThreadPoolForegroundWorker"},"cat":"__metadata","name":"thread_name","ph":"M","pid":7787,"tid":6209111,"ts":0}, + {"args":{"name":"ThreadPoolForegroundWorker"},"cat":"__metadata","name":"thread_name","ph":"M","pid":7787,"tid":6209113,"ts":0}, + {"args":{"name":"ThreadPoolForegroundWorker"},"cat":"__metadata","name":"thread_name","ph":"M","pid":7787,"tid":6209112,"ts":0}, + {"args":{"name":"Chrome_ChildIOThread"},"cat":"__metadata","name":"thread_name","ph":"M","pid":72892,"tid":6149352,"ts":0}, + {"args":{"name":"MemoryInfra"},"cat":"__metadata","name":"thread_name","ph":"M","pid":72871,"tid":6149107,"ts":0}, + {"args":{"name":"ThreadPoolForegroundWorker"},"cat":"__metadata","name":"thread_name","ph":"M","pid":7787,"tid":6209117,"ts":0}, + {"args":{"name":"ThreadPoolForegroundWorker"},"cat":"__metadata","name":"thread_name","ph":"M","pid":7787,"tid":6209115,"ts":0}, + {"args":{"name":"ThreadPoolForegroundWorker"},"cat":"__metadata","name":"thread_name","ph":"M","pid":7787,"tid":6209114,"ts":0}, + {"args":{"name":"ThreadPoolForegroundWorker"},"cat":"__metadata","name":"thread_name","ph":"M","pid":7787,"tid":6209116,"ts":0}, + {"args":{"name":"DedicatedWorker thread"},"cat":"__metadata","name":"thread_name","ph":"M","pid":7787,"tid":15627165,"ts":0}, + {"args":{"name":"v8:ProfEvntProc"},"cat":"__metadata","name":"thread_name","ph":"M","pid":7787,"tid":15627166,"ts":0}, + {"args":{"name":"ThreadPoolForegroundWorker"},"cat":"__metadata","name":"thread_name","ph":"M","pid":7787,"tid":6209118,"ts":0}, + {"args":{"name":"ThreadPoolForegroundWorker"},"cat":"__metadata","name":"thread_name","ph":"M","pid":7787,"tid":6209173,"ts":0}, + {"args":{"name":"v8:ProfEvntProc"},"cat":"__metadata","name":"thread_name","ph":"M","pid":7787,"tid":15627188,"ts":0}, + {"args":{"name":"DedicatedWorker thread"},"cat":"__metadata","name":"thread_name","ph":"M","pid":7787,"tid":15627221,"ts":0}, + {"args":{"name":"v8:ProfEvntProc"},"cat":"__metadata","name":"thread_name","ph":"M","pid":7787,"tid":15627222,"ts":0}, + {"args":{"name":"DedicatedWorker thread"},"cat":"__metadata","name":"thread_name","ph":"M","pid":7787,"tid":15627227,"ts":0}, + {"args":{"name":"v8:ProfEvntProc"},"cat":"__metadata","name":"thread_name","ph":"M","pid":7787,"tid":15627228,"ts":0}, + {"args":{"name":"ThreadPoolSingleThreadSharedForeground1"},"cat":"__metadata","name":"thread_name","ph":"M","pid":7787,"tid":6209252,"ts":0}, + {"args":{"name":"v8:ProfEvntProc"},"cat":"__metadata","name":"thread_name","ph":"M","pid":7787,"tid":15627233,"ts":0}, + {"args":{"name":"GpuWatchdog"},"cat":"__metadata","name":"thread_name","ph":"M","pid":72892,"tid":6149157,"ts":0}, + {"args":{"name":"DedicatedWorker thread"},"cat":"__metadata","name":"thread_name","ph":"M","pid":7787,"tid":15627585,"ts":0}, + {"args":{"name":"v8:ProfEvntProc"},"cat":"__metadata","name":"thread_name","ph":"M","pid":7787,"tid":15627586,"ts":0}, + {"args":{"name":"v8:ProfEvntProc"},"cat":"__metadata","name":"thread_name","ph":"M","pid":7787,"tid":15627588,"ts":0}, + {"args":{"name":"v8:ProfEvntProc"},"cat":"__metadata","name":"thread_name","ph":"M","pid":7787,"tid":15627616,"ts":0}, + {"args":{"name":"v8:ProfEvntProc"},"cat":"__metadata","name":"thread_name","ph":"M","pid":7787,"tid":15627639,"ts":0}, + {"args":{"name":"Browser"},"cat":"__metadata","name":"process_name","ph":"M","pid":72871,"tid":0,"ts":0}, + {"args":{"name":"Renderer"},"cat":"__metadata","name":"process_name","ph":"M","pid":7787,"tid":0,"ts":0}, + {"args":{"name":"GPU Process"},"cat":"__metadata","name":"process_name","ph":"M","pid":72892,"tid":0,"ts":0}, + {"args":{"uptime":"167669"},"cat":"__metadata","name":"process_uptime_seconds","ph":"M","pid":72871,"tid":0,"ts":0}, + {"args":{"uptime":"166236"},"cat":"__metadata","name":"process_uptime_seconds","ph":"M","pid":7787,"tid":0,"ts":0}, + {"args":{"uptime":"167669"},"cat":"__metadata","name":"process_uptime_seconds","ph":"M","pid":72892,"tid":0,"ts":0}, + {"args":{"data":{"startTime":336043691785}},"cat":"disabled-by-default-v8.cpu_profiler","id":"0x7b","name":"Profile","ph":"P","pid":7787,"tid":6209019,"ts":336043691785,"tts":549446893}, + {"args":{"data":{"startTime":336047836902}},"cat":"disabled-by-default-v8.cpu_profiler","id":"0x7d","name":"Profile","ph":"P","pid":7787,"tid":6209019,"ts":336047836901,"tts":552305008}, + {"args":{"data":{"cpuProfile":{"nodes":[{"callFrame":{"codeType":"other","functionName":"(root)","scriptId":0},"id":1},{"callFrame":{"codeType":"other","functionName":"(program)","scriptId":0},"id":2,"parent":1}],"samples":[2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2]},"timeDeltas":[315877,227,131,132,134,139,138,144,140,145,147,136,131,141,140,139,131,132,134,134,132,131,134,133,134,132,132,132,132,131,131,132,131,133,131,130,130,131,130,131,131,130,132,131,130,129,131,131,132,131,130,131,130,130,131,130,131,131,130,135,131,129,131,136,126,131,131,130,130,132,129,130,129,131,130,130,132,128,128,130,130,129,131,131,131,131,133,130,131,131,133,133,131,131,134,132,132,132,132,132]}},"cat":"disabled-by-default-v8.cpu_profiler","id":"0x7b","name":"ProfileChunk","ph":"P","pid":7787,"tid":15626891,"ts":336044020991,"tts":849}, + {"args":{"data":{"cpuProfile":{"samples":[2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2]},"timeDeltas":[130,122,132,131,131,132,130,132,131,132,131,133,131,133,131,132,132,131,132,132,131,135,129,133,131,132,138,138,133,134,133,133,136,132,134,133,133,132,134,132,133,133,134,134,132,133,132,137,129,135,134,134,133,134,132,133,132,132,132,136,133,132,133,132,132,132,133,132,131,131,132,133,131,132,131,132,132,132,132,132,132,132,132,133,132,131,131,130,130,130,131,130,131,130,131,130,131,131,132,131]}},"cat":"disabled-by-default-v8.cpu_profiler","id":"0x7b","name":"ProfileChunk","ph":"P","pid":7787,"tid":15626891,"ts":336044034188,"tts":1574}, + {"args":{"data":{"cpuProfile":{"samples":[2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2]},"timeDeltas":[134,124,133,131,129,131,130,131,129,131,132,130,131,130,130,130,131,130,130,130,131,130,129,130,131,133,135,164,130,130,128,129,130,130,128,130,130,130,129,129,131,131,128,130,129,130,129,130,130,131,130,131,131,130,132,130,133,132,130,132,131,130,130,131,130,131,137,134,132,133,137,137,129,130,130,130,131,128,130,130,131,128,129,130,130,130,129,129,129,130,129,130,129,130,128,130,129,129,130,129]}},"cat":"disabled-by-default-v8.cpu_profiler","id":"0x7b","name":"ProfileChunk","ph":"P","pid":7787,"tid":15626891,"ts":336044073434,"tts":3342}, + {"args":{"data":{"cpuProfile":{"samples":[2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2]},"timeDeltas":[131,128,130,130,130,129,131,130,131,131,130,141,134,283,240,159,253,141,140,144,140,133,130,131,131,130,130,130,131,131,130,135,130,130,131,129,131,130,132,131,130,130,130,130,133,128,131,130,131,131,130,129,132,131,136,138,165,141,136,156,124,130,131,132,135,132,132,131,131,131,133,139,134,131,128,129,129,131,131,128,129,129,129,129,130,145,114,129,128,130,129,129,129,130,129,131,137,131,132,130]}},"cat":"disabled-by-default-v8.cpu_profiler","id":"0x7b","name":"ProfileChunk","ph":"P","pid":7787,"tid":15626891,"ts":336044113144,"tts":5263}, + {"args":{"data":{"columns":[644598,141,141,141,141,141,141,141,141,197802],"cpuProfile":{"nodes":[{"callFrame":{"codeType":"JS","columnNumber":644579,"functionName":"","lineNumber":92,"scriptId":25088,"url":"https://example.com/example-1.js"},"id":757,"parent":753},{"callFrame":{"codeType":"JS","columnNumber":589206,"functionName":"800492","lineNumber":92,"scriptId":25088,"url":"https://example.com/example-1.js"},"id":758,"parent":752},{"callFrame":{"codeType":"JS","columnNumber":43,"functionName":"a","lineNumber":2,"scriptId":25069,"url":"https://example.com/example-2.js"},"id":759,"parent":758},{"callFrame":{"codeType":"JS","columnNumber":619288,"functionName":"467222","lineNumber":92,"scriptId":25088,"url":"https://example.com/example-1.js"},"id":760,"parent":759},{"callFrame":{"codeType":"JS","columnNumber":43,"functionName":"a","lineNumber":2,"scriptId":25069,"url":"https://example.com/example-2.js"},"id":761,"parent":760},{"callFrame":{"codeType":"JS","columnNumber":617050,"functionName":"305089","lineNumber":92,"scriptId":25088,"url":"https://example.com/example-1.js"},"id":762,"parent":761},{"callFrame":{"codeType":"JS","columnNumber":43,"functionName":"a","lineNumber":2,"scriptId":25069,"url":"https://example.com/example-2.js"},"id":763,"parent":762},{"callFrame":{"codeType":"JS","columnNumber":198327,"functionName":"620076","lineNumber":127,"scriptId":25083,"url":"https://example.com/example-3.js"},"id":764,"parent":763},{"callFrame":{"codeType":"JS","columnNumber":43,"functionName":"a","lineNumber":2,"scriptId":25069,"url":"https://example.com/example-2.js"},"id":765,"parent":764},{"callFrame":{"codeType":"JS","columnNumber":179386,"functionName":"617233","lineNumber":127,"scriptId":25083,"url":"https://example.com/example-3.js"},"id":766,"parent":765},{"callFrame":{"codeType":"JS","columnNumber":43,"functionName":"a","lineNumber":2,"scriptId":25069,"url":"https://example.com/example-2.js"},"id":767,"parent":766},{"callFrame":{"codeType":"JS","columnNumber":283227,"functionName":"645507","lineNumber":127,"scriptId":25083,"url":"https://example.com/example-3.js"},"id":768,"parent":767},{"callFrame":{"codeType":"JS","columnNumber":43,"functionName":"a","lineNumber":2,"scriptId":25069,"url":"https://example.com/example-2.js"},"id":769,"parent":768},{"callFrame":{"codeType":"JS","columnNumber":196753,"functionName":"376719","lineNumber":127,"scriptId":25083,"url":"https://example.com/example-3.js"},"id":770,"parent":769}],"samples":[757,752,752,752,752,759,759,759,761,770]},"lines":[93,3,3,3,3,3,3,3,3,128],"timeDeltas":[136,128,143,135,131,131,127,134,128,132]}},"cat":"disabled-by-default-v8.cpu_profiler","id":"0x7b","name":"ProfileChunk","ph":"P","pid":7787,"tid":15626891,"ts":336046634875,"tts":167066}, + {"args":{"data":{"columns":[618599,197840],"cpuProfile":{"nodes":[{"callFrame":{"codeType":"JS","columnNumber":617872,"functionName":"new","lineNumber":92,"scriptId":25088,"url":"https://example.com/example-1.js"},"id":771,"parent":760},{"callFrame":{"codeType":"JS","columnNumber":617967,"functionName":"fields","lineNumber":92,"scriptId":25088,"url":"https://example.com/example-1.js"},"id":772,"parent":771},{"callFrame":{"codeType":"JS","columnNumber":277747,"functionName":"a","lineNumber":127,"scriptId":25083,"url":"https://example.com/example-3.js"},"id":773,"parent":772},{"callFrame":{"codeType":"JS","columnNumber":166543,"functionName":"s","lineNumber":127,"scriptId":25083,"url":"https://example.com/example-3.js"},"id":774,"parent":773},{"callFrame":{"codeType":"JS","columnNumber":179045,"functionName":"","lineNumber":127,"scriptId":25083,"url":"https://example.com/example-3.js"},"id":775,"parent":774},{"callFrame":{"codeType":"JS","columnNumber":277790,"functionName":"","lineNumber":127,"scriptId":25083,"url":"https://example.com/example-3.js"},"id":776,"parent":775},{"callFrame":{"codeType":"JS","columnNumber":617991,"functionName":"","lineNumber":92,"scriptId":25088,"url":"https://example.com/example-1.js"},"id":777,"parent":776},{"callFrame":{"codeType":"JS","columnNumber":618590,"functionName":"new","lineNumber":92,"scriptId":25088,"url":"https://example.com/example-1.js"},"id":778,"parent":777},{"callFrame":{"codeType":"JS","columnNumber":618166,"functionName":"u","lineNumber":92,"scriptId":25088,"url":"https://example.com/example-1.js"},"id":779,"parent":778},{"callFrame":{"codeType":"JS","columnNumber":618555,"functionName":"","lineNumber":92,"scriptId":25088,"url":"https://example.com/example-1.js"},"id":780,"parent":779},{"callFrame":{"codeType":"JS","columnNumber":179491,"functionName":"","lineNumber":127,"scriptId":25083,"url":"https://example.com/example-3.js"},"id":781,"parent":780},{"callFrame":{"codeType":"JS","columnNumber":283299,"functionName":"h","lineNumber":127,"scriptId":25083,"url":"https://example.com/example-3.js"},"id":782,"parent":781},{"callFrame":{"codeType":"JS","columnNumber":197826,"functionName":"R","lineNumber":127,"scriptId":25083,"url":"https://example.com/example-3.js"},"id":783,"parent":782}],"samples":[778,783]},"lines":[93,128],"timeDeltas":[123,133]}},"cat":"disabled-by-default-v8.cpu_profiler","id":"0x7b","name":"ProfileChunk","ph":"P","pid":7787,"tid":15626891,"ts":336046635127,"tts":167114}, + {"args":{"data":{"columns":[197840,0,283308],"cpuProfile":{"nodes":[{"callFrame":{"codeType":"JS","columnNumber":617967,"functionName":"fields","lineNumber":92,"scriptId":25088,"url":"https://example.com/example-1.js"},"id":784,"parent":760},{"callFrame":{"codeType":"JS","columnNumber":277747,"functionName":"a","lineNumber":127,"scriptId":25083,"url":"https://example.com/example-3.js"},"id":785,"parent":784},{"callFrame":{"codeType":"JS","columnNumber":166543,"functionName":"s","lineNumber":127,"scriptId":25083,"url":"https://example.com/example-3.js"},"id":786,"parent":785},{"callFrame":{"codeType":"JS","columnNumber":179045,"functionName":"","lineNumber":127,"scriptId":25083,"url":"https://example.com/example-3.js"},"id":787,"parent":786},{"callFrame":{"codeType":"JS","columnNumber":277790,"functionName":"","lineNumber":127,"scriptId":25083,"url":"https://example.com/example-3.js"},"id":788,"parent":787},{"callFrame":{"codeType":"JS","columnNumber":617991,"functionName":"","lineNumber":92,"scriptId":25088,"url":"https://example.com/example-1.js"},"id":789,"parent":788},{"callFrame":{"codeType":"JS","columnNumber":618590,"functionName":"new","lineNumber":92,"scriptId":25088,"url":"https://example.com/example-1.js"},"id":790,"parent":789},{"callFrame":{"codeType":"JS","columnNumber":618166,"functionName":"u","lineNumber":92,"scriptId":25088,"url":"https://example.com/example-1.js"},"id":791,"parent":790},{"callFrame":{"codeType":"JS","columnNumber":618555,"functionName":"","lineNumber":92,"scriptId":25088,"url":"https://example.com/example-1.js"},"id":792,"parent":791},{"callFrame":{"codeType":"JS","columnNumber":179491,"functionName":"","lineNumber":127,"scriptId":25083,"url":"https://example.com/example-3.js"},"id":793,"parent":792},{"callFrame":{"codeType":"JS","columnNumber":283299,"functionName":"h","lineNumber":127,"scriptId":25083,"url":"https://example.com/example-3.js"},"id":794,"parent":793}],"samples":[783,160,794]},"lines":[128,0,128],"timeDeltas":[128,137,128]}},"cat":"disabled-by-default-v8.cpu_profiler","id":"0x7b","name":"ProfileChunk","ph":"P","pid":7787,"tid":15626891,"ts":336046635516,"tts":167170}, + {"args":{"data":{"columns":[179503,618566,197840,179361,280331,161914],"cpuProfile":{"nodes":[{"callFrame":{"codeType":"JS","columnNumber":179491,"functionName":"","lineNumber":127,"scriptId":25083,"url":"https://example.com/example-3.js"},"id":795,"parent":779},{"callFrame":{"codeType":"JS","columnNumber":283299,"functionName":"h","lineNumber":127,"scriptId":25083,"url":"https://example.com/example-3.js"},"id":796,"parent":795},{"callFrame":{"codeType":"JS","columnNumber":197826,"functionName":"R","lineNumber":127,"scriptId":25083,"url":"https://example.com/example-3.js"},"id":797,"parent":796},{"callFrame":{"codeType":"JS","columnNumber":161913,"functionName":"r","lineNumber":127,"scriptId":25083,"url":"https://example.com/example-3.js"},"id":798,"parent":795},{"callFrame":{"codeType":"JS","columnNumber":198373,"functionName":"","lineNumber":127,"scriptId":25083,"url":"https://example.com/example-3.js"},"id":799,"parent":798},{"callFrame":{"codeType":"JS","columnNumber":198489,"functionName":"s","lineNumber":127,"scriptId":25083,"url":"https://example.com/example-3.js"},"id":800,"parent":799},{"callFrame":{"codeType":"JS","columnNumber":179265,"functionName":"","lineNumber":127,"scriptId":25083,"url":"https://example.com/example-3.js"},"id":801,"parent":800},{"callFrame":{"codeType":"JS","columnNumber":280330,"functionName":"","lineNumber":127,"scriptId":25083,"url":"https://example.com/example-3.js"},"id":802,"parent":781},{"callFrame":{"codeType":"JS","columnNumber":625394,"functionName":"y","lineNumber":92,"scriptId":25088,"url":"https://example.com/example-1.js"},"id":803,"parent":760},{"callFrame":{"codeType":"JS","columnNumber":617872,"functionName":"new","lineNumber":92,"scriptId":25088,"url":"https://example.com/example-1.js"},"id":804,"parent":803},{"callFrame":{"codeType":"JS","columnNumber":617967,"functionName":"fields","lineNumber":92,"scriptId":25088,"url":"https://example.com/example-1.js"},"id":805,"parent":804},{"callFrame":{"codeType":"JS","columnNumber":277747,"functionName":"a","lineNumber":127,"scriptId":25083,"url":"https://example.com/example-3.js"},"id":806,"parent":805},{"callFrame":{"codeType":"JS","columnNumber":166543,"functionName":"s","lineNumber":127,"scriptId":25083,"url":"https://example.com/example-3.js"},"id":807,"parent":806},{"callFrame":{"codeType":"JS","columnNumber":179045,"functionName":"","lineNumber":127,"scriptId":25083,"url":"https://example.com/example-3.js"},"id":808,"parent":807},{"callFrame":{"codeType":"JS","columnNumber":277790,"functionName":"","lineNumber":127,"scriptId":25083,"url":"https://example.com/example-3.js"},"id":809,"parent":808},{"callFrame":{"codeType":"JS","columnNumber":617991,"functionName":"","lineNumber":92,"scriptId":25088,"url":"https://example.com/example-1.js"},"id":810,"parent":809},{"callFrame":{"codeType":"JS","columnNumber":618590,"functionName":"new","lineNumber":92,"scriptId":25088,"url":"https://example.com/example-1.js"},"id":811,"parent":810},{"callFrame":{"codeType":"JS","columnNumber":618166,"functionName":"u","lineNumber":92,"scriptId":25088,"url":"https://example.com/example-1.js"},"id":812,"parent":811},{"callFrame":{"codeType":"JS","columnNumber":618555,"functionName":"","lineNumber":92,"scriptId":25088,"url":"https://example.com/example-1.js"},"id":813,"parent":812},{"callFrame":{"codeType":"JS","columnNumber":179491,"functionName":"","lineNumber":127,"scriptId":25083,"url":"https://example.com/example-3.js"},"id":814,"parent":813},{"callFrame":{"codeType":"JS","columnNumber":161913,"functionName":"r","lineNumber":127,"scriptId":25083,"url":"https://example.com/example-3.js"},"id":815,"parent":814}],"samples":[781,780,797,801,802,815]},"lines":[128,93,128,128,128,128],"timeDeltas":[139,144,133,132,131,135]}},"cat":"disabled-by-default-v8.cpu_profiler","id":"0x7b","name":"ProfileChunk","ph":"P","pid":7787,"tid":15626891,"ts":336046636362,"tts":167313}, + {"args":{},"cat":"disabled-by-default-v8.cpu_profiler","id":"0x7b","name":"ProfileChunk","ph":"P","pid":7787,"tid":15626891,"ts":336046641251,"tts":167894}, + {"args":{},"cat":"disabled-by-default-v8.cpu_profiler","id":"0x7d","name":"ProfileChunk","ph":"P","pid":7787,"tid":6209019,"ts":336049901870,"tts":554281590} +]} diff --git a/src/import/__snapshots__/chrome.test.ts.snap b/src/import/__snapshots__/chrome.test.ts.snap index 4ac3b1bdc..781cd0a19 100644 --- a/src/import/__snapshots__/chrome.test.ts.snap +++ b/src/import/__snapshots__/chrome.test.ts.snap @@ -2211,3 +2211,300 @@ Object { exports[`importFromV8Profiler Node 10: indexToView 1`] = `0`; exports[`importFromV8Profiler Node 10: profileGroup.name 1`] = `"example.cpuprofile"`; + +exports[`importTraceEvents Chrome 141 profile with missing arg data 1`] = ` +Object { + "frames": Array [ + Frame { + "col": undefined, + "file": undefined, + "key": "(program):undefined:undefined:undefined", + "line": undefined, + "name": "(program)", + "selfWeight": 53210, + "totalWeight": 53210, + }, + Frame { + "col": 644580, + "file": "https://example.com/example-1.js", + "key": "(anonymous example-1.js:93):https://example.com/example-1.js:93:644580", + "line": 93, + "name": "(anonymous example-1.js:93)", + "selfWeight": 668, + "totalWeight": 668, + }, + Frame { + "col": 589207, + "file": "https://example.com/example-1.js", + "key": "800492:https://example.com/example-1.js:93:589207", + "line": 93, + "name": "800492", + "selfWeight": 0, + "totalWeight": 1984, + }, + Frame { + "col": 44, + "file": "https://example.com/example-2.js", + "key": "a:https://example.com/example-2.js:3:44", + "line": 3, + "name": "a", + "selfWeight": 521, + "totalWeight": 1984, + }, + Frame { + "col": 619289, + "file": "https://example.com/example-1.js", + "key": "467222:https://example.com/example-1.js:93:619289", + "line": 93, + "name": "467222", + "selfWeight": 0, + "totalWeight": 1595, + }, + Frame { + "col": 617051, + "file": "https://example.com/example-1.js", + "key": "305089:https://example.com/example-1.js:93:617051", + "line": 93, + "name": "305089", + "selfWeight": 0, + "totalWeight": 123, + }, + Frame { + "col": 198328, + "file": "https://example.com/example-3.js", + "key": "620076:https://example.com/example-3.js:128:198328", + "line": 128, + "name": "620076", + "selfWeight": 0, + "totalWeight": 123, + }, + Frame { + "col": 179387, + "file": "https://example.com/example-3.js", + "key": "617233:https://example.com/example-3.js:128:179387", + "line": 128, + "name": "617233", + "selfWeight": 0, + "totalWeight": 123, + }, + Frame { + "col": 283228, + "file": "https://example.com/example-3.js", + "key": "645507:https://example.com/example-3.js:128:283228", + "line": 128, + "name": "645507", + "selfWeight": 0, + "totalWeight": 123, + }, + Frame { + "col": 196754, + "file": "https://example.com/example-3.js", + "key": "376719:https://example.com/example-3.js:128:196754", + "line": 128, + "name": "376719", + "selfWeight": 123, + "totalWeight": 123, + }, + Frame { + "col": 617873, + "file": "https://example.com/example-1.js", + "key": "new:https://example.com/example-1.js:93:617873", + "line": 93, + "name": "new", + "selfWeight": 0, + "totalWeight": 1201, + }, + Frame { + "col": 617968, + "file": "https://example.com/example-1.js", + "key": "fields:https://example.com/example-1.js:93:617968", + "line": 93, + "name": "fields", + "selfWeight": 0, + "totalWeight": 1340, + }, + Frame { + "col": 277748, + "file": "https://example.com/example-3.js", + "key": "a:https://example.com/example-3.js:128:277748", + "line": 128, + "name": "a", + "selfWeight": 0, + "totalWeight": 1340, + }, + Frame { + "col": 166544, + "file": "https://example.com/example-3.js", + "key": "s:https://example.com/example-3.js:128:166544", + "line": 128, + "name": "s", + "selfWeight": 0, + "totalWeight": 1340, + }, + Frame { + "col": 179046, + "file": "https://example.com/example-3.js", + "key": "(anonymous example-3.js:128):https://example.com/example-3.js:128:179046", + "line": 128, + "name": "(anonymous example-3.js:128)", + "selfWeight": 0, + "totalWeight": 1340, + }, + Frame { + "col": 277791, + "file": "https://example.com/example-3.js", + "key": "(anonymous example-3.js:128):https://example.com/example-3.js:128:277791", + "line": 128, + "name": "(anonymous example-3.js:128)", + "selfWeight": 0, + "totalWeight": 1340, + }, + Frame { + "col": 617992, + "file": "https://example.com/example-1.js", + "key": "(anonymous example-1.js:93):https://example.com/example-1.js:93:617992", + "line": 93, + "name": "(anonymous example-1.js:93)", + "selfWeight": 0, + "totalWeight": 1340, + }, + Frame { + "col": 618591, + "file": "https://example.com/example-1.js", + "key": "new:https://example.com/example-1.js:93:618591", + "line": 93, + "name": "new", + "selfWeight": 133, + "totalWeight": 1340, + }, + Frame { + "col": 618167, + "file": "https://example.com/example-1.js", + "key": "u:https://example.com/example-1.js:93:618167", + "line": 93, + "name": "u", + "selfWeight": 0, + "totalWeight": 1207, + }, + Frame { + "col": 618556, + "file": "https://example.com/example-1.js", + "key": "(anonymous example-1.js:93):https://example.com/example-1.js:93:618556", + "line": 93, + "name": "(anonymous example-1.js:93)", + "selfWeight": 133, + "totalWeight": 944, + }, + Frame { + "col": 179492, + "file": "https://example.com/example-3.js", + "key": "(anonymous example-3.js:128):https://example.com/example-3.js:128:179492", + "line": 128, + "name": "(anonymous example-3.js:128)", + "selfWeight": 144, + "totalWeight": 1074, + }, + Frame { + "col": 283300, + "file": "https://example.com/example-3.js", + "key": "h:https://example.com/example-3.js:128:283300", + "line": 128, + "name": "h", + "selfWeight": 139, + "totalWeight": 664, + }, + Frame { + "col": 197827, + "file": "https://example.com/example-3.js", + "key": "R:https://example.com/example-3.js:128:197827", + "line": 128, + "name": "R", + "selfWeight": 525, + "totalWeight": 525, + }, + Frame { + "col": 161914, + "file": "https://example.com/example-3.js", + "key": "r:https://example.com/example-3.js:128:161914", + "line": 128, + "name": "r", + "selfWeight": 0, + "totalWeight": 131, + }, + Frame { + "col": 198374, + "file": "https://example.com/example-3.js", + "key": "(anonymous example-3.js:128):https://example.com/example-3.js:128:198374", + "line": 128, + "name": "(anonymous example-3.js:128)", + "selfWeight": 0, + "totalWeight": 131, + }, + Frame { + "col": 198490, + "file": "https://example.com/example-3.js", + "key": "s:https://example.com/example-3.js:128:198490", + "line": 128, + "name": "s", + "selfWeight": 0, + "totalWeight": 131, + }, + Frame { + "col": 179266, + "file": "https://example.com/example-3.js", + "key": "(anonymous example-3.js:128):https://example.com/example-3.js:128:179266", + "line": 128, + "name": "(anonymous example-3.js:128)", + "selfWeight": 131, + "totalWeight": 131, + }, + Frame { + "col": 280331, + "file": "https://example.com/example-3.js", + "key": "(anonymous example-3.js:128):https://example.com/example-3.js:128:280331", + "line": 128, + "name": "(anonymous example-3.js:128)", + "selfWeight": 135, + "totalWeight": 135, + }, + Frame { + "col": 625395, + "file": "https://example.com/example-1.js", + "key": "y:https://example.com/example-1.js:93:625395", + "line": 93, + "name": "y", + "selfWeight": 0, + "totalWeight": 0, + }, + ], + "name": "no-arg-data.json - CrRendererMain", + "stacks": Array [ + " 315.88ms", + "(program) 53.21ms", + "(anonymous example-1.js:93) 668.00µs", + "800492;a 389.00µs", + "800492;a;467222;a 132.00µs", + "800492;a;467222;a;305089;a;620076;a;617233;a;645507;a;376719 123.00µs", + "800492;a;467222;new;fields;a;s;(anonymous example-3.js:128);(anonymous example-3.js:128);(anonymous example-1.js:93);new 133.00µs", + "800492;a;467222;new;fields;a;s;(anonymous example-3.js:128);(anonymous example-3.js:128);(anonymous example-1.js:93);new;u;(anonymous example-1.js:93);(anonymous example-3.js:128);h;R 393.00µs", + "800492;a;467222;fields;a;s;(anonymous example-3.js:128);(anonymous example-3.js:128);(anonymous example-1.js:93);new;u;(anonymous example-1.js:93);(anonymous example-3.js:128);h 139.00µs", + "800492;a;467222;new;fields;a;s;(anonymous example-3.js:128);(anonymous example-3.js:128);(anonymous example-1.js:93);new;u;(anonymous example-1.js:93);(anonymous example-3.js:128) 144.00µs", + "800492;a;467222;new;fields;a;s;(anonymous example-3.js:128);(anonymous example-3.js:128);(anonymous example-1.js:93);new;u;(anonymous example-1.js:93) 133.00µs", + "800492;a;467222;new;fields;a;s;(anonymous example-3.js:128);(anonymous example-3.js:128);(anonymous example-1.js:93);new;u;(anonymous example-3.js:128);h;R 132.00µs", + "800492;a;467222;new;fields;a;s;(anonymous example-3.js:128);(anonymous example-3.js:128);(anonymous example-1.js:93);new;u;(anonymous example-3.js:128);r;(anonymous example-3.js:128);s;(anonymous example-3.js:128) 131.00µs", + "800492;a;467222;new;fields;a;s;(anonymous example-3.js:128);(anonymous example-3.js:128);(anonymous example-1.js:93);new;u;(anonymous example-1.js:93);(anonymous example-3.js:128);(anonymous example-3.js:128) 135.00µs", + ], +} +`; + +exports[`importTraceEvents Chrome 141 profile with missing arg data 2`] = ` +Object { + "frames": Array [], + "name": "no-arg-data.json - CrRendererMain", + "stacks": Array [], +} +`; + +exports[`importTraceEvents Chrome 141 profile with missing arg data: indexToView 1`] = `1`; + +exports[`importTraceEvents Chrome 141 profile with missing arg data: profileGroup.name 1`] = `"no-arg-data.json"`; diff --git a/src/import/chrome.test.ts b/src/import/chrome.test.ts index b2efbef5c..e7b43ff56 100644 --- a/src/import/chrome.test.ts +++ b/src/import/chrome.test.ts @@ -34,3 +34,7 @@ test('importFromChromeTimeline Workers Chrome 70', async () => { test('importFromChromeTimeline Chrome 116', async () => { await checkProfileSnapshot('./sample/profiles/Chrome/116/Trace-20230603T221323.json') }) + +test('importTraceEvents Chrome 141 profile with missing arg data', async () => { + await checkProfileSnapshot('./sample/profiles/Chrome/141/no-arg-data.json') +}) diff --git a/src/import/chrome.ts b/src/import/chrome.ts index 3c8b7e571..6163398f2 100644 --- a/src/import/chrome.ts +++ b/src/import/chrome.ts @@ -91,6 +91,12 @@ export function importFromChromeTimeline(events: TimelineEvent[], fileName: stri if (event.name === 'CpuProfile') { const pidTid = `${event.pid}:${event.tid}` const id = event.id || pidTid + + if (event.args.data == null) { + // Some Chrome profiles contain events where data is not defined + continue + } + cpuProfileByID.set(id, event.args.data.cpuProfile as CPUProfile) pidTidById.set(id, pidTid) } @@ -120,6 +126,11 @@ export function importFromChromeTimeline(events: TimelineEvent[], fileName: stri const cpuProfile = cpuProfileByID.get(event.id || pidTid) if (cpuProfile) { const chunk = event.args.data + if (chunk == null) { + // Some Chrome profiles contain events where data is not defined + continue + } + if (chunk.cpuProfile) { if (chunk.cpuProfile.nodes) { cpuProfile.nodes = cpuProfile.nodes.concat(chunk.cpuProfile.nodes)