Adds counter for snapshot decompress time when creating context
BUG=chromium:1257321 TEST=none Change-Id: I59f34e8b41ba08f5046754c13be8f1df6a335655 Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/3271389 Reviewed-by: Jakob Gruber <jgruber@chromium.org> Reviewed-by: Michael Lippautz <mlippautz@chromium.org> Commit-Queue: Scott Violet <sky@chromium.org> Cr-Commit-Position: refs/heads/main@{#77824}
This commit is contained in:
parent
937d44e9ec
commit
581355befe
@ -131,8 +131,11 @@ namespace internal {
|
||||
/* Time for lazily compiling Wasm functions. */ \
|
||||
HT(wasm_lazy_compile_time, V8.WasmLazyCompileTimeMicroSeconds, 100000000, \
|
||||
MICROSECOND) \
|
||||
/* Total time to decompress snapshots. */ \
|
||||
HT(snapshot_decompress, V8.SnapshotDecompress, 10000000, MICROSECOND)
|
||||
/* Total time to decompress isolate snapshot. */ \
|
||||
HT(snapshot_decompress, V8.SnapshotDecompress, 10000000, MICROSECOND) \
|
||||
/* Time to decompress context snapshot. */ \
|
||||
HT(context_snapshot_decompress, V8.ContextSnapshotDecompress, 10000000, \
|
||||
MICROSECOND)
|
||||
|
||||
#define NESTED_TIMED_HISTOGRAM_LIST_SLOW(HT) \
|
||||
/* Total V8 time (including JS and runtime calls, exluding callbacks) */ \
|
||||
|
@ -210,10 +210,20 @@ MaybeHandle<Context> Snapshot::NewContextFromSnapshot(
|
||||
bool can_rehash = ExtractRehashability(blob);
|
||||
base::Vector<const byte> context_data = SnapshotImpl::ExtractContextData(
|
||||
blob, static_cast<uint32_t>(context_index));
|
||||
SnapshotData snapshot_data(MaybeDecompress(context_data));
|
||||
base::Optional<SnapshotData> snapshot_data;
|
||||
{
|
||||
#ifdef V8_SNAPSHOT_COMPRESSION
|
||||
base::Optional<NestedTimedHistogramScope> decompress_histogram;
|
||||
if (base::TimeTicks::IsHighResolution()) {
|
||||
decompress_histogram.emplace(
|
||||
isolate->counters()->context_snapshot_decompress());
|
||||
}
|
||||
#endif
|
||||
snapshot_data.emplace(MaybeDecompress(context_data));
|
||||
}
|
||||
|
||||
MaybeHandle<Context> maybe_result = ContextDeserializer::DeserializeContext(
|
||||
isolate, &snapshot_data, can_rehash, global_proxy,
|
||||
isolate, &(*snapshot_data), can_rehash, global_proxy,
|
||||
embedder_fields_deserializer);
|
||||
|
||||
Handle<Context> result;
|
||||
|
Loading…
Reference in New Issue
Block a user