summaryrefslogtreecommitdiff
path: root/deps/v8/src/profiler
diff options
context:
space:
mode:
authorMichaël Zasso <targos@protonmail.com>2017-06-06 10:28:14 +0200
committerMichaël Zasso <targos@protonmail.com>2017-06-07 10:33:31 +0200
commit3dc8c3bed4cf3a77607edbb0b015e33f8b60fc09 (patch)
tree9dee56e142638b34f1eccbd0ad88c3bce5377c29 /deps/v8/src/profiler
parent91a1bbe3055a660194ca4d403795aa0c03e9d056 (diff)
downloadandroid-node-v8-3dc8c3bed4cf3a77607edbb0b015e33f8b60fc09.tar.gz
android-node-v8-3dc8c3bed4cf3a77607edbb0b015e33f8b60fc09.tar.bz2
android-node-v8-3dc8c3bed4cf3a77607edbb0b015e33f8b60fc09.zip
deps: update V8 to 5.9.211.32
PR-URL: https://github.com/nodejs/node/pull/13263 Reviewed-By: Gibson Fahnestock <gibfahn@gmail.com> Reviewed-By: Ben Noordhuis <info@bnoordhuis.nl> Reviewed-By: Franziska Hinkelmann <franziska.hinkelmann@gmail.com> Reviewed-By: Myles Borins <myles.borins@gmail.com>
Diffstat (limited to 'deps/v8/src/profiler')
-rw-r--r--deps/v8/src/profiler/allocation-tracker.cc3
-rw-r--r--deps/v8/src/profiler/heap-profiler.cc8
-rw-r--r--deps/v8/src/profiler/heap-profiler.h1
-rw-r--r--deps/v8/src/profiler/heap-snapshot-generator.cc27
-rw-r--r--deps/v8/src/profiler/profiler-listener.cc2
-rw-r--r--deps/v8/src/profiler/profiler-listener.h3
-rw-r--r--deps/v8/src/profiler/tick-sample.cc7
7 files changed, 23 insertions, 28 deletions
diff --git a/deps/v8/src/profiler/allocation-tracker.cc b/deps/v8/src/profiler/allocation-tracker.cc
index 99b0b7096b..e2ed7f7817 100644
--- a/deps/v8/src/profiler/allocation-tracker.cc
+++ b/deps/v8/src/profiler/allocation-tracker.cc
@@ -302,8 +302,7 @@ AllocationTracker::UnresolvedLocation::UnresolvedLocation(
Script* script, int start, FunctionInfo* info)
: start_position_(start),
info_(info) {
- script_ = Handle<Script>::cast(
- script->GetIsolate()->global_handles()->Create(script));
+ script_ = script->GetIsolate()->global_handles()->Create(script);
GlobalHandles::MakeWeak(reinterpret_cast<Object**>(script_.location()), this,
&HandleWeakScript, v8::WeakCallbackType::kParameter);
}
diff --git a/deps/v8/src/profiler/heap-profiler.cc b/deps/v8/src/profiler/heap-profiler.cc
index 938bb12424..d1980d7fa9 100644
--- a/deps/v8/src/profiler/heap-profiler.cc
+++ b/deps/v8/src/profiler/heap-profiler.cc
@@ -201,14 +201,6 @@ void HeapProfiler::UpdateObjectSizeEvent(Address addr, int size) {
ids_->UpdateObjectSize(addr, size);
}
-
-void HeapProfiler::SetRetainedObjectInfo(UniqueId id,
- RetainedObjectInfo* info) {
- // TODO(yurus, marja): Don't route this information through GlobalHandles.
- heap()->isolate()->global_handles()->SetRetainedObjectInfo(id, info);
-}
-
-
Handle<HeapObject> HeapProfiler::FindHeapObjectById(SnapshotObjectId id) {
HeapObject* object = NULL;
HeapIterator iterator(heap(), HeapIterator::kFilterUnreachable);
diff --git a/deps/v8/src/profiler/heap-profiler.h b/deps/v8/src/profiler/heap-profiler.h
index a10cb9228f..1a43fc8edf 100644
--- a/deps/v8/src/profiler/heap-profiler.h
+++ b/deps/v8/src/profiler/heap-profiler.h
@@ -64,7 +64,6 @@ class HeapProfiler {
v8::RetainedObjectInfo* ExecuteWrapperClassCallback(uint16_t class_id,
Object** wrapper);
- void SetRetainedObjectInfo(UniqueId id, RetainedObjectInfo* info);
void SetGetRetainerInfosCallback(
v8::HeapProfiler::GetRetainerInfosCallback callback);
diff --git a/deps/v8/src/profiler/heap-snapshot-generator.cc b/deps/v8/src/profiler/heap-snapshot-generator.cc
index b7b97a8320..b360fccdfe 100644
--- a/deps/v8/src/profiler/heap-snapshot-generator.cc
+++ b/deps/v8/src/profiler/heap-snapshot-generator.cc
@@ -1299,7 +1299,14 @@ void V8HeapExplorer::ExtractMapReferences(int entry, Map* map) {
TagObject(constructor_or_backpointer, "(back pointer)");
SetInternalReference(map, entry, "back_pointer", constructor_or_backpointer,
Map::kConstructorOrBackPointerOffset);
+ } else if (constructor_or_backpointer->IsFunctionTemplateInfo()) {
+ TagObject(constructor_or_backpointer, "(constructor function data)");
+ SetInternalReference(map, entry, "constructor_function_data",
+ constructor_or_backpointer,
+ Map::kConstructorOrBackPointerOffset);
} else {
+ DCHECK(constructor_or_backpointer->IsJSFunction() ||
+ constructor_or_backpointer->IsNull(map->GetIsolate()));
SetInternalReference(map, entry, "constructor", constructor_or_backpointer,
Map::kConstructorOrBackPointerOffset);
}
@@ -1655,11 +1662,11 @@ void V8HeapExplorer::ExtractElementReferences(JSObject* js_obj, int entry) {
void V8HeapExplorer::ExtractInternalReferences(JSObject* js_obj, int entry) {
- int length = js_obj->GetInternalFieldCount();
+ int length = js_obj->GetEmbedderFieldCount();
for (int i = 0; i < length; ++i) {
- Object* o = js_obj->GetInternalField(i);
- SetInternalReference(
- js_obj, entry, i, o, js_obj->GetInternalFieldOffset(i));
+ Object* o = js_obj->GetEmbedderField(i);
+ SetInternalReference(js_obj, entry, i, o,
+ js_obj->GetEmbedderFieldOffset(i));
}
}
@@ -1708,6 +1715,7 @@ class RootsReferencesExtractor : public ObjectVisitor {
void FillReferences(V8HeapExplorer* explorer) {
DCHECK(strong_references_.length() <= all_references_.length());
Builtins* builtins = heap_->isolate()->builtins();
+ USE(builtins);
int strong_index = 0, all_index = 0, tags_index = 0, builtin_index = 0;
while (all_index < all_references_.length()) {
bool is_strong = strong_index < strong_references_.length()
@@ -2189,16 +2197,17 @@ void V8HeapExplorer::TagGlobalObjects() {
DeleteArray(urls);
}
-
-class GlobalHandlesExtractor : public ObjectVisitor {
+class GlobalHandlesExtractor : public PersistentHandleVisitor {
public:
explicit GlobalHandlesExtractor(NativeObjectsExplorer* explorer)
: explorer_(explorer) {}
~GlobalHandlesExtractor() override {}
- void VisitPointers(Object** start, Object** end) override { UNREACHABLE(); }
- void VisitEmbedderReference(Object** p, uint16_t class_id) override {
- explorer_->VisitSubtreeWrapper(p, class_id);
+ void VisitPersistentHandle(Persistent<Value>* value,
+ uint16_t class_id) override {
+ Handle<Object> object = Utils::OpenPersistent(value);
+ explorer_->VisitSubtreeWrapper(object.location(), class_id);
}
+
private:
NativeObjectsExplorer* explorer_;
};
diff --git a/deps/v8/src/profiler/profiler-listener.cc b/deps/v8/src/profiler/profiler-listener.cc
index bacfffaa73..7eb323a14e 100644
--- a/deps/v8/src/profiler/profiler-listener.cc
+++ b/deps/v8/src/profiler/profiler-listener.cc
@@ -145,7 +145,7 @@ void ProfilerListener::CodeDisableOptEvent(AbstractCode* code,
DispatchCodeEvent(evt_rec);
}
-void ProfilerListener::CodeDeoptEvent(Code* code, Address pc,
+void ProfilerListener::CodeDeoptEvent(Code* code, DeoptKind kind, Address pc,
int fp_to_sp_delta) {
CodeEventsContainer evt_rec(CodeEventRecord::CODE_DEOPT);
CodeDeoptEventRecord* rec = &evt_rec.CodeDeoptEventRecord_;
diff --git a/deps/v8/src/profiler/profiler-listener.h b/deps/v8/src/profiler/profiler-listener.h
index 500b7ae6be..f4a9e24c7d 100644
--- a/deps/v8/src/profiler/profiler-listener.h
+++ b/deps/v8/src/profiler/profiler-listener.h
@@ -43,7 +43,8 @@ class ProfilerListener : public CodeEventListener {
void CodeMoveEvent(AbstractCode* from, Address to) override;
void CodeDisableOptEvent(AbstractCode* code,
SharedFunctionInfo* shared) override;
- void CodeDeoptEvent(Code* code, Address pc, int fp_to_sp_delta) override;
+ void CodeDeoptEvent(Code* code, DeoptKind kind, Address pc,
+ int fp_to_sp_delta) override;
void GetterCallbackEvent(Name* name, Address entry_point) override;
void RegExpCodeCreateEvent(AbstractCode* code, String* source) override;
void SetterCallbackEvent(Name* name, Address entry_point) override;
diff --git a/deps/v8/src/profiler/tick-sample.cc b/deps/v8/src/profiler/tick-sample.cc
index e1c84c46bf..538223715b 100644
--- a/deps/v8/src/profiler/tick-sample.cc
+++ b/deps/v8/src/profiler/tick-sample.cc
@@ -225,12 +225,7 @@ bool TickSample::GetStackSample(Isolate* v8_isolate, RegisterState* regs,
i::SafeStackFrameIterator it(isolate, reinterpret_cast<i::Address>(regs->fp),
reinterpret_cast<i::Address>(regs->sp),
js_entry_sp);
-
- // If at this point iterator does not see any frames,
- // is usually means something is wrong with the FP,
- // e.g. it is used as a general purpose register in the function.
- // Bailout.
- if (it.done()) return false;
+ if (it.done()) return true;
size_t i = 0;
if (record_c_entry_frame == kIncludeCEntryFrame &&