[wasm] Add histogram for streaming deserialization (from cache)
- Adds a histogram to measure time between streaming start and deserialization finished. Bug: chromium:719172 Change-Id: Ib4ce24bee05a0db7e1bbf50d3bf456af89dbd2a6 Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/1754721 Reviewed-by: Andreas Haas <ahaas@chromium.org> Commit-Queue: Bill Budge <bbudge@chromium.org> Cr-Commit-Position: refs/heads/master@{#63252}
This commit is contained in:
parent
5d4ca7ba86
commit
612cb2cb65
@ -188,6 +188,8 @@ namespace internal {
|
||||
V8.WasmCompileModuleAsyncMicroSeconds, 100000000, MICROSECOND) \
|
||||
HT(wasm_streaming_compile_wasm_module_time, \
|
||||
V8.WasmCompileModuleStreamingMicroSeconds, 100000000, MICROSECOND) \
|
||||
HT(wasm_streaming_deserialize_wasm_module_time, \
|
||||
V8.WasmDeserializeModuleStreamingMicroSeconds, 100000000, MICROSECOND) \
|
||||
HT(wasm_tier_up_module_time, V8.WasmTierUpModuleMicroSeconds, 100000000, \
|
||||
MICROSECOND) \
|
||||
HT(wasm_compile_asm_function_time, V8.WasmCompileFunctionMicroSeconds.asm, \
|
||||
|
@ -1460,6 +1460,7 @@ class AsyncStreamingProcessor final : public StreamingProcessor {
|
||||
AsyncCompileJob* job_;
|
||||
WasmEngine* wasm_engine_;
|
||||
std::unique_ptr<CompilationUnitBuilder> compilation_unit_builder_;
|
||||
base::TimeTicks start_time_;
|
||||
int num_functions_ = 0;
|
||||
};
|
||||
|
||||
@ -1958,7 +1959,8 @@ AsyncStreamingProcessor::AsyncStreamingProcessor(AsyncCompileJob* job)
|
||||
: decoder_(job->enabled_features_),
|
||||
job_(job),
|
||||
wasm_engine_(job_->isolate_->wasm_engine()),
|
||||
compilation_unit_builder_(nullptr) {}
|
||||
compilation_unit_builder_(nullptr),
|
||||
start_time_(base::TimeTicks::Now()) {}
|
||||
|
||||
void AsyncStreamingProcessor::FinishAsyncCompileJobWithError(
|
||||
const WasmError& error) {
|
||||
@ -2187,6 +2189,13 @@ bool AsyncStreamingProcessor::Deserialize(Vector<const uint8_t> module_bytes,
|
||||
|
||||
MaybeHandle<WasmModuleObject> result =
|
||||
DeserializeNativeModule(job_->isolate_, module_bytes, wire_bytes);
|
||||
if (base::TimeTicks::IsHighResolution()) {
|
||||
base::TimeDelta duration = base::TimeTicks::Now() - start_time_;
|
||||
auto* histogram = job_->isolate_->counters()
|
||||
->wasm_streaming_deserialize_wasm_module_time();
|
||||
histogram->AddSample(static_cast<int>(duration.InMicroseconds()));
|
||||
}
|
||||
|
||||
if (result.is_null()) return false;
|
||||
|
||||
job_->module_object_ =
|
||||
|
Loading…
Reference in New Issue
Block a user