From 7b48713334469818661fe276cf571de9c7899f2d Mon Sep 17 00:00:00 2001 From: Michaƫl Zasso Date: Tue, 12 Mar 2019 09:01:49 +0100 Subject: deps: update V8 to 7.3.492.25 PR-URL: https://github.com/nodejs/node/pull/25852 Reviewed-By: Ujjwal Sharma Reviewed-By: Matteo Collina Reviewed-By: Ali Ijaz Sheikh --- deps/v8/src/profiler/allocation-tracker.cc | 28 +- deps/v8/src/profiler/allocation-tracker.h | 4 +- deps/v8/src/profiler/circular-queue.h | 6 +- deps/v8/src/profiler/cpu-profiler-inl.h | 6 +- deps/v8/src/profiler/cpu-profiler.cc | 147 +++---- deps/v8/src/profiler/cpu-profiler.h | 89 +++-- deps/v8/src/profiler/heap-profiler.cc | 20 +- deps/v8/src/profiler/heap-profiler.h | 2 +- deps/v8/src/profiler/heap-snapshot-generator.cc | 485 +++++++++++++----------- deps/v8/src/profiler/heap-snapshot-generator.h | 152 ++++---- deps/v8/src/profiler/profile-generator.cc | 148 ++++++-- deps/v8/src/profiler/profile-generator.h | 56 ++- deps/v8/src/profiler/profiler-listener.cc | 188 ++++----- deps/v8/src/profiler/profiler-listener.h | 37 +- deps/v8/src/profiler/sampling-heap-profiler.cc | 85 +++-- deps/v8/src/profiler/sampling-heap-profiler.h | 101 +++-- deps/v8/src/profiler/strings-storage.cc | 8 +- deps/v8/src/profiler/strings-storage.h | 4 +- deps/v8/src/profiler/tick-sample.cc | 22 +- deps/v8/src/profiler/tick-sample.h | 2 + deps/v8/src/profiler/tracing-cpu-profiler.cc | 10 +- 21 files changed, 912 insertions(+), 688 deletions(-) (limited to 'deps/v8/src/profiler') diff --git a/deps/v8/src/profiler/allocation-tracker.cc b/deps/v8/src/profiler/allocation-tracker.cc index 51cb0eb47f..d01060543d 100644 --- a/deps/v8/src/profiler/allocation-tracker.cc +++ b/deps/v8/src/profiler/allocation-tracker.cc @@ -213,7 +213,7 @@ void AllocationTracker::AllocationEvent(Address addr, int size) { JavaScriptFrameIterator it(isolate); while (!it.done() && length < kMaxAllocationTraceLength) { JavaScriptFrame* frame = it.frame(); - SharedFunctionInfo* shared = frame->function()->shared(); + SharedFunctionInfo shared = frame->function()->shared(); SnapshotObjectId id = ids_->FindOrAddEntry( shared->address(), shared->Size(), false); allocation_trace_buffer_[length++] = AddFunctionInfo(shared, id); @@ -237,8 +237,7 @@ static uint32_t SnapshotObjectIdHash(SnapshotObjectId id) { return ComputeUnseededHash(static_cast(id)); } - -unsigned AllocationTracker::AddFunctionInfo(SharedFunctionInfo* shared, +unsigned AllocationTracker::AddFunctionInfo(SharedFunctionInfo shared, SnapshotObjectId id) { base::HashMap::Entry* entry = id_to_function_info_index_.LookupOrInsert( reinterpret_cast(id), SnapshotObjectIdHash(id)); @@ -247,9 +246,9 @@ unsigned AllocationTracker::AddFunctionInfo(SharedFunctionInfo* shared, info->name = names_->GetName(shared->DebugName()); info->function_id = id; if (shared->script()->IsScript()) { - Script* script = Script::cast(shared->script()); + Script script = Script::cast(shared->script()); if (script->name()->IsName()) { - Name* name = Name::cast(script->name()); + Name name = Name::cast(script->name()); info->script_name = names_->GetName(name); } info->script_id = script->id(); @@ -264,7 +263,6 @@ unsigned AllocationTracker::AddFunctionInfo(SharedFunctionInfo* shared, return static_cast(reinterpret_cast((entry->value))); } - unsigned AllocationTracker::functionInfoIndexForVMState(StateTag state) { if (state != OTHER) return 0; if (info_index_for_other_state_ == 0) { @@ -277,20 +275,18 @@ unsigned AllocationTracker::functionInfoIndexForVMState(StateTag state) { return info_index_for_other_state_; } - -AllocationTracker::UnresolvedLocation::UnresolvedLocation( - Script* script, int start, FunctionInfo* info) - : start_position_(start), - info_(info) { +AllocationTracker::UnresolvedLocation::UnresolvedLocation(Script script, + int start, + FunctionInfo* info) + : start_position_(start), info_(info) { script_ = script->GetIsolate()->global_handles()->Create(script); - GlobalHandles::MakeWeak(reinterpret_cast(script_.location()), this, - &HandleWeakScript, v8::WeakCallbackType::kParameter); + GlobalHandles::MakeWeak(script_.location(), this, &HandleWeakScript, + v8::WeakCallbackType::kParameter); } - AllocationTracker::UnresolvedLocation::~UnresolvedLocation() { if (!script_.is_null()) { - GlobalHandles::Destroy(reinterpret_cast(script_.location())); + GlobalHandles::Destroy(script_.location()); } } @@ -306,7 +302,7 @@ void AllocationTracker::UnresolvedLocation::HandleWeakScript( const v8::WeakCallbackInfo& data) { UnresolvedLocation* loc = reinterpret_cast(data.GetParameter()); - GlobalHandles::Destroy(reinterpret_cast(loc->script_.location())); + GlobalHandles::Destroy(loc->script_.location()); loc->script_ = Handle