Skip to content

inspector: implement --cpu-prof-interval

src: refactor V8ProfilerConnection::DispatchMessage()

  • Auto-generate the message id and return it for future use (we can always parse the response to find the message containing the profile instead of relying on the inspector connection being synchornous).
  • Generate the message from method and parameter strings and create a StringView directly to avoid the unnecessary copy in ToProtocolString().

inspector: implement --cpu-prof-interval

This patch implements --cpu-prof-interval to specify the sampling interval of the CPU profiler started by --cpu-prof from the command line. Also adjust the interval to 100 in test-cpu-prof.js to make the test less flaky - it would fail if the time taken to finish the workload is smaller than the sampling interval, which was more likely on powerful machines when the interval was 1000.

Checklist
  • make -j4 test (UNIX), or vcbuild test (Windows) passes
  • tests and/or benchmarks are included
  • documentation is changed or added
  • commit message follows commit guidelines

Merge request reports

Loading