Commit 89661dbe authored by Clemens Hammacher's avatar Clemens Hammacher Committed by Commit Bot

[wasm] Record wire byte size on streaming compilation

Samples for the wire bytes size histogram were only recorded in
synchronous and asynchronous (non-streaming) compilation. This CL adds
another sample for streaming compilation.

R=ahaas@chromium.org

Change-Id: I11e2606796a83d6bebb35bd1d554aea43907bfba
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/1676284Reviewed-by: 's avatarAndreas Haas <ahaas@chromium.org>
Commit-Queue: Clemens Hammacher <clemensh@chromium.org>
Cr-Commit-Position: refs/heads/master@{#62366}
parent 6bcd854f
......@@ -2001,6 +2001,11 @@ void AsyncStreamingProcessor::OnFinishedStream(OwnedVector<uint8_t> bytes) {
HandleScope scope(job_->isolate_);
SaveAndSwitchContext saved_context(job_->isolate_, *job_->native_context_);
// Record the size of the wire bytes. In synchronous and asynchronous
// (non-streaming) compilation, this happens in {DecodeWasmModule}.
auto* histogram = job_->isolate_->counters()->wasm_wasm_module_size_bytes();
histogram->AddSample(static_cast<int>(bytes.size()));
bool needs_finish = job_->DecrementAndCheckFinisherCount();
if (job_->native_module_ == nullptr) {
// We are processing a WebAssembly module without code section. Create the
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment