Uh oh!
There was an error while loading. Please reload this page.
v8: add cpu profile APIs - #59429
Conversation
f7114fb to
d49b31fCompareUh oh!
There was an error while loading. Please reload this page.
There was a problem hiding this comment.
| classJSONOutputStream : publicv8::OutputStream { | |
| classJSONOutputStreamfinal: public v8::OutputStream { |
There was a problem hiding this comment.
Btw – we may want to use HeapSnapshotStream here? I know it requires a bit more setup, but it integrates nicely with existing stream primitives in Node.js
There was a problem hiding this comment.
I think these are two issues in HeapSnapshotStream:
- We should not delete the snapshot(which is created in worker) in main thread.
- It will crash when the worker exits.
constworker=require('worker_threads');constw=newworker.Worker("setInterval(() => {}, 100)",{eval: true})w.on('online',async()=>{conststream=awaitw.getHeapSnapshot()stream.on('data',()=>{});// Crashw.terminate();});Uh oh!
There was an error while loading. Please reload this page.
Uh oh!
There was an error while loading. Please reload this page.
Uh oh!
There was an error while loading. Please reload this page.
Uh oh!
There was an error while loading. Please reload this page.
Uh oh!
There was an error while loading. Please reload this page.
Uh oh!
There was an error while loading. Please reload this page.
Uh oh!
There was an error while loading. Please reload this page.
Uh oh!
There was an error while loading. Please reload this page.
Uh oh!
There was an error while loading. Please reload this page.
szegedi
left a comment
There was a problem hiding this comment.
Advocating for using CpuProfiler::Start and thus eliminating the need for users to invent names for the profiler sessions in order to use the API.
Uh oh!
There was an error while loading. Please reload this page.
Uh oh!
There was an error while loading. Please reload this page.
Uh oh!
There was an error while loading. Please reload this page.
f4618c5 to
e78d71aCompare5037a4a to
b3c64d0Compareb3c64d0 to
1b66417CompareCodecov Report❌ Patch coverage is
Additional details and impacted files@@ Coverage Diff @@## main #59429 +/- ##
==========================================
+ Coverage 89.93% 89.95% +0.01%
==========================================
Files 667 667 Lines 196775 196841 +66 Branches 38409 38422 +13 ==========================================
+ Hits 176977 177069 +92 + Misses 12247 12200 -47 - Partials 7551 7572 +21
🚀 New features to boost your workflow:
|
Add CPU profile APIs.
make -j4 test(UNIX), orvcbuild test(Windows) passes