Repository navigation
CPU profiles: throw ERR_CPU_PROFILE_NOT_SUPPORTED under Record/Replay - #249
Merged
Merged
Conversation
V8 returns kErrorNotSupported from StartProfiling while recording or replaying (68c264c). v8.startCpuProfile() and Worker#startCpuProfile() mapped only kErrorTooManyProfilers to an error and returned no id for any other status, so the handle's stop() aborted on CHECK(args[0]->IsUint32()). Both now map the status through Environment::CpuProfileStartError, which raises ERR_CPU_PROFILE_NOT_SUPPORTED for it.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
🤖
Summary
v8.startCpuProfile()returns a handle whosestop()aborts the process withAssertion failed: args[0]->IsUint32().ERR_CPU_PROFILE_NOT_SUPPORTEDinstead.v8.startCpuProfile()andWorker#startCpuProfile().CPU profiles: unsupported status
CpuProfiler::StartProfilingreturnkErrorNotSupportedwhile recording or replaying.kErrorTooManyProfilersto an error. Any other status left the profile id undefined.StopCpuProfile(undefined)then failsCHECK(args[0]->IsUint32()). The worker path rejected nothing and resolved a handle with no id.Environment::CpuProfileStartErrormaps everyCpuProfilingStatusto an error, or to none when there is a profile to stop.ERR_CPU_PROFILE_NOT_SUPPORTED.runtime-node-build-and-testtest-node-core,test/parallel/test-v8-cpu-profile.js.Error while recording: Exited with signal SIGABRT.35e7b23c23and2e66f46eff.test-v8-cpu-profilenow fails with the thrown error instead of the abort.node-coreignore list is the place for it.