OLD | NEW |
---|---|
1 // Copyright 2010 the V8 project authors. All rights reserved. | 1 // Copyright 2010 the V8 project authors. All rights reserved. |
2 // Redistribution and use in source and binary forms, with or without | 2 // Redistribution and use in source and binary forms, with or without |
3 // modification, are permitted provided that the following conditions are | 3 // modification, are permitted provided that the following conditions are |
4 // met: | 4 // met: |
5 // | 5 // |
6 // * Redistributions of source code must retain the above copyright | 6 // * Redistributions of source code must retain the above copyright |
7 // notice, this list of conditions and the following disclaimer. | 7 // notice, this list of conditions and the following disclaimer. |
8 // * Redistributions in binary form must reproduce the above | 8 // * Redistributions in binary form must reproduce the above |
9 // copyright notice, this list of conditions and the following | 9 // copyright notice, this list of conditions and the following |
10 // disclaimer in the documentation and/or other materials provided | 10 // disclaimer in the documentation and/or other materials provided |
(...skipping 1808 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
1819 obj = iterator.next(), ++objects_count) {} | 1819 obj = iterator.next(), ++objects_count) {} |
1820 return objects_count; | 1820 return objects_count; |
1821 } | 1821 } |
1822 | 1822 |
1823 | 1823 |
1824 class IndexedReferencesExtractor : public ObjectVisitor { | 1824 class IndexedReferencesExtractor : public ObjectVisitor { |
1825 public: | 1825 public: |
1826 IndexedReferencesExtractor(V8HeapExplorer* generator, | 1826 IndexedReferencesExtractor(V8HeapExplorer* generator, |
1827 HeapObject* parent_obj, | 1827 HeapObject* parent_obj, |
1828 HeapEntry* parent_entry, | 1828 HeapEntry* parent_entry, |
1829 HeapObjectsSet* known_references = NULL) | 1829 bool process_failure_tags = false) |
1830 : generator_(generator), | 1830 : generator_(generator), |
1831 parent_obj_(parent_obj), | 1831 parent_obj_(parent_obj), |
1832 parent_(parent_entry), | 1832 parent_(parent_entry), |
1833 known_references_(known_references), | 1833 process_failure_tags_(process_failure_tags), |
1834 next_index_(1) { | 1834 next_index_(1) { |
1835 } | 1835 } |
1836 void VisitPointers(Object** start, Object** end) { | 1836 void VisitPointers(Object** start, Object** end) { |
1837 for (Object** p = start; p < end; p++) { | 1837 for (Object** p = start; p < end; p++) { |
1838 if (!known_references_ || !known_references_->Contains(*p)) { | 1838 if (process_failure_tags_ && (*p)->IsFailure()) { |
Vitaly Repeshko
2011/03/17 16:52:00
Please introduce a helper to test for the mark and
mnaganov (inactive)
2011/03/17 17:37:18
Done.
| |
1839 generator_->SetHiddenReference(parent_obj_, parent_, next_index_++, *p); | 1839 *p = reinterpret_cast<Object*>( |
1840 reinterpret_cast<intptr_t>(*p) | |
1841 & (~kFailureTagMask | kHeapObjectTag)); | |
1842 ASSERT((*p)->IsHeapObject()); | |
1840 } | 1843 } |
1844 generator_->SetHiddenReference(parent_obj_, parent_, next_index_++, *p); | |
1841 } | 1845 } |
1842 } | 1846 } |
1843 private: | 1847 private: |
1844 V8HeapExplorer* generator_; | 1848 V8HeapExplorer* generator_; |
1845 HeapObject* parent_obj_; | 1849 HeapObject* parent_obj_; |
1846 HeapEntry* parent_; | 1850 HeapEntry* parent_; |
1847 HeapObjectsSet* known_references_; | 1851 bool process_failure_tags_; |
Vitaly Repeshko
2011/03/17 16:52:00
Rename to "process_marks_"?
mnaganov (inactive)
2011/03/17 17:37:18
Renamed to process_field_marks_
| |
1848 int next_index_; | 1852 int next_index_; |
1849 }; | 1853 }; |
1850 | 1854 |
1851 | 1855 |
1852 void V8HeapExplorer::ExtractReferences(HeapObject* obj) { | 1856 void V8HeapExplorer::ExtractReferences(HeapObject* obj) { |
1853 HeapEntry* entry = GetEntry(obj); | 1857 HeapEntry* entry = GetEntry(obj); |
1854 if (entry == NULL) return; // No interest in this object. | 1858 if (entry == NULL) return; // No interest in this object. |
1855 | 1859 |
1856 known_references_.Clear(); | |
1857 if (obj->IsJSGlobalProxy()) { | 1860 if (obj->IsJSGlobalProxy()) { |
1858 // We need to reference JS global objects from snapshot's root. | 1861 // We need to reference JS global objects from snapshot's root. |
1859 // We use JSGlobalProxy because this is what embedder (e.g. browser) | 1862 // We use JSGlobalProxy because this is what embedder (e.g. browser) |
1860 // uses for the global object. | 1863 // uses for the global object. |
1861 JSGlobalProxy* proxy = JSGlobalProxy::cast(obj); | 1864 JSGlobalProxy* proxy = JSGlobalProxy::cast(obj); |
1862 SetRootShortcutReference(proxy->map()->prototype()); | 1865 SetRootShortcutReference(proxy->map()->prototype()); |
1863 IndexedReferencesExtractor refs_extractor(this, obj, entry); | 1866 IndexedReferencesExtractor refs_extractor(this, obj, entry); |
1864 obj->Iterate(&refs_extractor); | 1867 obj->Iterate(&refs_extractor); |
1865 } else if (obj->IsJSObject()) { | 1868 } else if (obj->IsJSObject()) { |
1866 JSObject* js_obj = JSObject::cast(obj); | 1869 JSObject* js_obj = JSObject::cast(obj); |
1867 ExtractClosureReferences(js_obj, entry); | 1870 ExtractClosureReferences(js_obj, entry); |
1868 ExtractPropertyReferences(js_obj, entry); | 1871 ExtractPropertyReferences(js_obj, entry); |
1869 ExtractElementReferences(js_obj, entry); | 1872 ExtractElementReferences(js_obj, entry); |
1870 ExtractInternalReferences(js_obj, entry); | 1873 ExtractInternalReferences(js_obj, entry); |
1871 SetPropertyReference( | 1874 SetPropertyReference(obj, entry, |
1872 obj, entry, Heap::Proto_symbol(), js_obj->GetPrototype()); | 1875 Heap::Proto_symbol(), js_obj->GetPrototype()); |
1873 if (obj->IsJSFunction()) { | 1876 if (obj->IsJSFunction()) { |
1874 JSFunction* js_fun = JSFunction::cast(obj); | 1877 JSFunction* js_fun = JSFunction::cast(js_obj); |
1875 if (js_fun->has_prototype()) { | 1878 SetInternalReference( |
1876 SetPropertyReference( | 1879 js_fun, entry, |
1877 obj, entry, Heap::prototype_symbol(), js_fun->prototype()); | 1880 "code", js_fun->shared(), |
1881 js_fun->GetFieldAddress(JSFunction::kSharedFunctionInfoOffset)); | |
1882 Object* proto_or_map = js_fun->prototype_or_initial_map(); | |
1883 if (!proto_or_map->IsTheHole()) { | |
1884 if (!proto_or_map->IsMap()) { | |
1885 SetPropertyReference( | |
1886 obj, entry, | |
1887 Heap::prototype_symbol(), proto_or_map, | |
1888 js_fun->GetFieldAddress( | |
1889 JSFunction::kPrototypeOrInitialMapOffset)); | |
1890 } else { | |
1891 SetPropertyReference( | |
1892 obj, entry, | |
1893 Heap::prototype_symbol(), js_fun->prototype()); | |
1894 } | |
1878 } | 1895 } |
1879 } | 1896 } |
1880 IndexedReferencesExtractor refs_extractor( | 1897 IndexedReferencesExtractor refs_extractor(this, obj, entry, true); |
1881 this, obj, entry, &known_references_); | |
1882 obj->Iterate(&refs_extractor); | 1898 obj->Iterate(&refs_extractor); |
1883 } else if (obj->IsString()) { | 1899 } else if (obj->IsString()) { |
1884 if (obj->IsConsString()) { | 1900 if (obj->IsConsString()) { |
1885 ConsString* cs = ConsString::cast(obj); | 1901 ConsString* cs = ConsString::cast(obj); |
1886 SetInternalReference(obj, entry, 1, cs->first()); | 1902 SetInternalReference(obj, entry, 1, cs->first()); |
Vitaly Repeshko
2011/03/17 16:52:00
Won't this leave a failure object in the heap?
Vitaly Repeshko
2011/03/17 16:53:13
Ah, I see. I won't because it doesn't take a field
| |
1887 SetInternalReference(obj, entry, 2, cs->second()); | 1903 SetInternalReference(obj, entry, 2, cs->second()); |
1888 } | 1904 } |
1889 } else { | 1905 } else { |
1890 IndexedReferencesExtractor refs_extractor(this, obj, entry); | 1906 IndexedReferencesExtractor refs_extractor(this, obj, entry); |
1891 obj->Iterate(&refs_extractor); | 1907 obj->Iterate(&refs_extractor); |
1892 } | 1908 } |
1893 } | 1909 } |
1894 | 1910 |
1895 | 1911 |
1896 void V8HeapExplorer::ExtractClosureReferences(JSObject* js_obj, | 1912 void V8HeapExplorer::ExtractClosureReferences(JSObject* js_obj, |
1897 HeapEntry* entry) { | 1913 HeapEntry* entry) { |
1898 if (js_obj->IsJSFunction()) { | 1914 if (js_obj->IsJSFunction()) { |
1899 HandleScope hs; | 1915 HandleScope hs; |
1900 JSFunction* func = JSFunction::cast(js_obj); | 1916 JSFunction* func = JSFunction::cast(js_obj); |
1901 Context* context = func->context(); | 1917 Context* context = func->context(); |
1902 ZoneScope zscope(DELETE_ON_EXIT); | 1918 ZoneScope zscope(DELETE_ON_EXIT); |
1903 SerializedScopeInfo* serialized_scope_info = | 1919 SerializedScopeInfo* serialized_scope_info = |
1904 context->closure()->shared()->scope_info(); | 1920 context->closure()->shared()->scope_info(); |
1905 ScopeInfo<ZoneListAllocationPolicy> zone_scope_info(serialized_scope_info); | 1921 ScopeInfo<ZoneListAllocationPolicy> zone_scope_info(serialized_scope_info); |
1906 int locals_number = zone_scope_info.NumberOfLocals(); | 1922 int locals_number = zone_scope_info.NumberOfLocals(); |
1907 for (int i = 0; i < locals_number; ++i) { | 1923 for (int i = 0; i < locals_number; ++i) { |
1908 String* local_name = *zone_scope_info.LocalName(i); | 1924 String* local_name = *zone_scope_info.LocalName(i); |
1909 int idx = serialized_scope_info->ContextSlotIndex(local_name, NULL); | 1925 int idx = serialized_scope_info->ContextSlotIndex(local_name, NULL); |
1910 if (idx >= 0 && idx < context->length()) { | 1926 if (idx >= 0 && idx < context->length()) { |
1911 SetClosureReference(js_obj, entry, local_name, context->get(idx)); | 1927 SetClosureReference(js_obj, entry, local_name, context->get(idx)); |
1912 } | 1928 } |
1913 } | 1929 } |
1914 SetInternalReference(js_obj, entry, "code", func->shared()); | |
1915 } | 1930 } |
1916 } | 1931 } |
1917 | 1932 |
1918 | 1933 |
1919 void V8HeapExplorer::ExtractPropertyReferences(JSObject* js_obj, | 1934 void V8HeapExplorer::ExtractPropertyReferences(JSObject* js_obj, |
1920 HeapEntry* entry) { | 1935 HeapEntry* entry) { |
1921 if (js_obj->HasFastProperties()) { | 1936 if (js_obj->HasFastProperties()) { |
1922 DescriptorArray* descs = js_obj->map()->instance_descriptors(); | 1937 DescriptorArray* descs = js_obj->map()->instance_descriptors(); |
1923 for (int i = 0; i < descs->number_of_descriptors(); i++) { | 1938 for (int i = 0; i < descs->number_of_descriptors(); i++) { |
1924 switch (descs->GetType(i)) { | 1939 switch (descs->GetType(i)) { |
1925 case FIELD: { | 1940 case FIELD: { |
1926 int index = descs->GetFieldIndex(i); | 1941 int index = descs->GetFieldIndex(i); |
1942 Address offset = js_obj->GetFastPropertyAddress(index); | |
1927 SetPropertyReference( | 1943 SetPropertyReference( |
1928 js_obj, entry, descs->GetKey(i), js_obj->FastPropertyAt(index)); | 1944 js_obj, entry, |
1945 descs->GetKey(i), js_obj->FastPropertyAt(index), | |
1946 offset); | |
1929 break; | 1947 break; |
1930 } | 1948 } |
1931 case CONSTANT_FUNCTION: | 1949 case CONSTANT_FUNCTION: |
1932 SetPropertyReference( | 1950 SetPropertyReference( |
1933 js_obj, entry, descs->GetKey(i), descs->GetConstantFunction(i)); | 1951 js_obj, entry, |
1952 descs->GetKey(i), descs->GetConstantFunction(i)); | |
1934 break; | 1953 break; |
1935 default: ; | 1954 default: ; |
1936 } | 1955 } |
1937 } | 1956 } |
1938 } else { | 1957 } else { |
1939 StringDictionary* dictionary = js_obj->property_dictionary(); | 1958 StringDictionary* dictionary = js_obj->property_dictionary(); |
1940 int length = dictionary->Capacity(); | 1959 int length = dictionary->Capacity(); |
1941 for (int i = 0; i < length; ++i) { | 1960 for (int i = 0; i < length; ++i) { |
1942 Object* k = dictionary->KeyAt(i); | 1961 Object* k = dictionary->KeyAt(i); |
1943 if (dictionary->IsKey(k)) { | 1962 if (dictionary->IsKey(k)) { |
(...skipping 39 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
1983 } | 2002 } |
1984 } | 2003 } |
1985 } | 2004 } |
1986 | 2005 |
1987 | 2006 |
1988 void V8HeapExplorer::ExtractInternalReferences(JSObject* js_obj, | 2007 void V8HeapExplorer::ExtractInternalReferences(JSObject* js_obj, |
1989 HeapEntry* entry) { | 2008 HeapEntry* entry) { |
1990 int length = js_obj->GetInternalFieldCount(); | 2009 int length = js_obj->GetInternalFieldCount(); |
1991 for (int i = 0; i < length; ++i) { | 2010 for (int i = 0; i < length; ++i) { |
1992 Object* o = js_obj->GetInternalField(i); | 2011 Object* o = js_obj->GetInternalField(i); |
1993 SetInternalReference(js_obj, entry, i, o); | 2012 SetInternalReference( |
2013 js_obj, entry, i, o, js_obj->GetInternalFieldOffset(i)); | |
1994 } | 2014 } |
1995 } | 2015 } |
1996 | 2016 |
1997 | 2017 |
1998 HeapEntry* V8HeapExplorer::GetEntry(Object* obj) { | 2018 HeapEntry* V8HeapExplorer::GetEntry(Object* obj) { |
1999 if (!obj->IsHeapObject()) return NULL; | 2019 if (!obj->IsHeapObject()) return NULL; |
2000 return filler_->FindOrAddEntry(obj, this); | 2020 return filler_->FindOrAddEntry(obj, this); |
2001 } | 2021 } |
2002 | 2022 |
2003 | 2023 |
(...skipping 29 matching lines...) Expand all Loading... | |
2033 return false; | 2053 return false; |
2034 } | 2054 } |
2035 SetRootGcRootsReference(); | 2055 SetRootGcRootsReference(); |
2036 RootsReferencesExtractor extractor(this); | 2056 RootsReferencesExtractor extractor(this); |
2037 Heap::IterateRoots(&extractor, VISIT_ALL); | 2057 Heap::IterateRoots(&extractor, VISIT_ALL); |
2038 filler_ = NULL; | 2058 filler_ = NULL; |
2039 return progress_->ProgressReport(false); | 2059 return progress_->ProgressReport(false); |
2040 } | 2060 } |
2041 | 2061 |
2042 | 2062 |
2063 void V8HeapExplorer::MarkAsFailure(Address field) { | |
2064 if (field != NULL) { | |
2065 ASSERT(!Memory::Object_at(field)->IsFailure()); | |
2066 ASSERT(Memory::Object_at(field)->IsHeapObject()); | |
2067 *field |= kFailureTag; | |
2068 } | |
2069 } | |
2070 | |
2071 | |
2043 void V8HeapExplorer::SetClosureReference(HeapObject* parent_obj, | 2072 void V8HeapExplorer::SetClosureReference(HeapObject* parent_obj, |
2044 HeapEntry* parent_entry, | 2073 HeapEntry* parent_entry, |
2045 String* reference_name, | 2074 String* reference_name, |
2046 Object* child_obj) { | 2075 Object* child_obj) { |
2047 HeapEntry* child_entry = GetEntry(child_obj); | 2076 HeapEntry* child_entry = GetEntry(child_obj); |
2048 if (child_entry != NULL) { | 2077 if (child_entry != NULL) { |
2049 filler_->SetNamedReference(HeapGraphEdge::kContextVariable, | 2078 filler_->SetNamedReference(HeapGraphEdge::kContextVariable, |
2050 parent_obj, | 2079 parent_obj, |
2051 parent_entry, | 2080 parent_entry, |
2052 collection_->names()->GetName(reference_name), | 2081 collection_->names()->GetName(reference_name), |
2053 child_obj, | 2082 child_obj, |
2054 child_entry); | 2083 child_entry); |
2055 known_references_.Insert(child_obj); | |
2056 } | 2084 } |
2057 } | 2085 } |
2058 | 2086 |
2059 | 2087 |
2060 void V8HeapExplorer::SetElementReference(HeapObject* parent_obj, | 2088 void V8HeapExplorer::SetElementReference(HeapObject* parent_obj, |
2061 HeapEntry* parent_entry, | 2089 HeapEntry* parent_entry, |
2062 int index, | 2090 int index, |
2063 Object* child_obj) { | 2091 Object* child_obj) { |
2064 HeapEntry* child_entry = GetEntry(child_obj); | 2092 HeapEntry* child_entry = GetEntry(child_obj); |
2065 if (child_entry != NULL) { | 2093 if (child_entry != NULL) { |
2066 filler_->SetIndexedReference(HeapGraphEdge::kElement, | 2094 filler_->SetIndexedReference(HeapGraphEdge::kElement, |
2067 parent_obj, | 2095 parent_obj, |
2068 parent_entry, | 2096 parent_entry, |
2069 index, | 2097 index, |
2070 child_obj, | 2098 child_obj, |
2071 child_entry); | 2099 child_entry); |
2072 known_references_.Insert(child_obj); | |
2073 } | 2100 } |
2074 } | 2101 } |
2075 | 2102 |
2076 | 2103 |
2077 void V8HeapExplorer::SetInternalReference(HeapObject* parent_obj, | 2104 void V8HeapExplorer::SetInternalReference(HeapObject* parent_obj, |
2078 HeapEntry* parent_entry, | 2105 HeapEntry* parent_entry, |
2079 const char* reference_name, | 2106 const char* reference_name, |
2080 Object* child_obj) { | 2107 Object* child_obj, |
2108 Address field) { | |
Vitaly Repeshko
2011/03/17 16:52:00
You can pass field offset instead of its address a
mnaganov (inactive)
2011/03/17 17:37:18
Done.
| |
2081 HeapEntry* child_entry = GetEntry(child_obj); | 2109 HeapEntry* child_entry = GetEntry(child_obj); |
2082 if (child_entry != NULL) { | 2110 if (child_entry != NULL) { |
2083 filler_->SetNamedReference(HeapGraphEdge::kInternal, | 2111 filler_->SetNamedReference(HeapGraphEdge::kInternal, |
2084 parent_obj, | 2112 parent_obj, |
2085 parent_entry, | 2113 parent_entry, |
2086 reference_name, | 2114 reference_name, |
2087 child_obj, | 2115 child_obj, |
2088 child_entry); | 2116 child_entry); |
2089 known_references_.Insert(child_obj); | 2117 MarkAsFailure(field); |
2090 } | 2118 } |
2091 } | 2119 } |
2092 | 2120 |
2093 | 2121 |
2094 void V8HeapExplorer::SetInternalReference(HeapObject* parent_obj, | 2122 void V8HeapExplorer::SetInternalReference(HeapObject* parent_obj, |
2095 HeapEntry* parent_entry, | 2123 HeapEntry* parent_entry, |
2096 int index, | 2124 int index, |
2097 Object* child_obj) { | 2125 Object* child_obj, |
2126 Address field) { | |
2098 HeapEntry* child_entry = GetEntry(child_obj); | 2127 HeapEntry* child_entry = GetEntry(child_obj); |
2099 if (child_entry != NULL) { | 2128 if (child_entry != NULL) { |
2100 filler_->SetNamedReference(HeapGraphEdge::kInternal, | 2129 filler_->SetNamedReference(HeapGraphEdge::kInternal, |
2101 parent_obj, | 2130 parent_obj, |
2102 parent_entry, | 2131 parent_entry, |
2103 collection_->names()->GetName(index), | 2132 collection_->names()->GetName(index), |
2104 child_obj, | 2133 child_obj, |
2105 child_entry); | 2134 child_entry); |
2106 known_references_.Insert(child_obj); | 2135 MarkAsFailure(field); |
2107 } | 2136 } |
2108 } | 2137 } |
2109 | 2138 |
2110 | 2139 |
2111 void V8HeapExplorer::SetHiddenReference(HeapObject* parent_obj, | 2140 void V8HeapExplorer::SetHiddenReference(HeapObject* parent_obj, |
2112 HeapEntry* parent_entry, | 2141 HeapEntry* parent_entry, |
2113 int index, | 2142 int index, |
2114 Object* child_obj) { | 2143 Object* child_obj) { |
2115 HeapEntry* child_entry = GetEntry(child_obj); | 2144 HeapEntry* child_entry = GetEntry(child_obj); |
2116 if (child_entry != NULL) { | 2145 if (child_entry != NULL) { |
2117 filler_->SetIndexedReference(HeapGraphEdge::kHidden, | 2146 filler_->SetIndexedReference(HeapGraphEdge::kHidden, |
2118 parent_obj, | 2147 parent_obj, |
2119 parent_entry, | 2148 parent_entry, |
2120 index, | 2149 index, |
2121 child_obj, | 2150 child_obj, |
2122 child_entry); | 2151 child_entry); |
2123 } | 2152 } |
2124 } | 2153 } |
2125 | 2154 |
2126 | 2155 |
2127 void V8HeapExplorer::SetPropertyReference(HeapObject* parent_obj, | 2156 void V8HeapExplorer::SetPropertyReference(HeapObject* parent_obj, |
2128 HeapEntry* parent_entry, | 2157 HeapEntry* parent_entry, |
2129 String* reference_name, | 2158 String* reference_name, |
2130 Object* child_obj) { | 2159 Object* child_obj, |
2160 Address field) { | |
2131 HeapEntry* child_entry = GetEntry(child_obj); | 2161 HeapEntry* child_entry = GetEntry(child_obj); |
2132 if (child_entry != NULL) { | 2162 if (child_entry != NULL) { |
2133 HeapGraphEdge::Type type = reference_name->length() > 0 ? | 2163 HeapGraphEdge::Type type = reference_name->length() > 0 ? |
2134 HeapGraphEdge::kProperty : HeapGraphEdge::kInternal; | 2164 HeapGraphEdge::kProperty : HeapGraphEdge::kInternal; |
2135 filler_->SetNamedReference(type, | 2165 filler_->SetNamedReference(type, |
2136 parent_obj, | 2166 parent_obj, |
2137 parent_entry, | 2167 parent_entry, |
2138 collection_->names()->GetName(reference_name), | 2168 collection_->names()->GetName(reference_name), |
2139 child_obj, | 2169 child_obj, |
2140 child_entry); | 2170 child_entry); |
2141 known_references_.Insert(child_obj); | 2171 MarkAsFailure(field); |
2142 } | 2172 } |
2143 } | 2173 } |
2144 | 2174 |
2145 | 2175 |
2146 void V8HeapExplorer::SetPropertyShortcutReference( | 2176 void V8HeapExplorer::SetPropertyShortcutReference( |
2147 HeapObject* parent_obj, | 2177 HeapObject* parent_obj, |
2148 HeapEntry* parent_entry, | 2178 HeapEntry* parent_entry, |
2149 String* reference_name, | 2179 String* reference_name, |
2150 Object* child_obj) { | 2180 Object* child_obj) { |
2151 HeapEntry* child_entry = GetEntry(child_obj); | 2181 HeapEntry* child_entry = GetEntry(child_obj); |
(...skipping 995 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
3147 | 3177 |
3148 | 3178 |
3149 String* GetConstructorNameForHeapProfile(JSObject* object) { | 3179 String* GetConstructorNameForHeapProfile(JSObject* object) { |
3150 if (object->IsJSFunction()) return Heap::closure_symbol(); | 3180 if (object->IsJSFunction()) return Heap::closure_symbol(); |
3151 return object->constructor_name(); | 3181 return object->constructor_name(); |
3152 } | 3182 } |
3153 | 3183 |
3154 } } // namespace v8::internal | 3184 } } // namespace v8::internal |
3155 | 3185 |
3156 #endif // ENABLE_LOGGING_AND_PROFILING | 3186 #endif // ENABLE_LOGGING_AND_PROFILING |
OLD | NEW |