Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(4)

Side by Side Diff: src/profiler/heap-snapshot-generator.cc

Issue 1428793002: Reland v8::Private and related APIs (Closed) Base URL: https://chromium.googlesource.com/v8/v8.git@master
Patch Set: updates Created 5 years, 1 month ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch
OLDNEW
1 // Copyright 2013 the V8 project authors. All rights reserved. 1 // Copyright 2013 the V8 project authors. All rights reserved.
2 // Use of this source code is governed by a BSD-style license that can be 2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file. 3 // found in the LICENSE file.
4 4
5 #include "src/profiler/heap-snapshot-generator.h" 5 #include "src/profiler/heap-snapshot-generator.h"
6 6
7 #include "src/code-stubs.h" 7 #include "src/code-stubs.h"
8 #include "src/conversions.h" 8 #include "src/conversions.h"
9 #include "src/debug/debug.h" 9 #include "src/debug/debug.h"
10 #include "src/profiler/allocation-tracker.h" 10 #include "src/profiler/allocation-tracker.h"
(...skipping 818 matching lines...) Expand 10 before | Expand all | Expand 10 after
829 HeapEntry::kConsString, 829 HeapEntry::kConsString,
830 "(concatenated string)"); 830 "(concatenated string)");
831 if (string->IsSlicedString()) 831 if (string->IsSlicedString())
832 return AddEntry(object, 832 return AddEntry(object,
833 HeapEntry::kSlicedString, 833 HeapEntry::kSlicedString,
834 "(sliced string)"); 834 "(sliced string)");
835 return AddEntry(object, 835 return AddEntry(object,
836 HeapEntry::kString, 836 HeapEntry::kString,
837 names_->GetName(String::cast(object))); 837 names_->GetName(String::cast(object)));
838 } else if (object->IsSymbol()) { 838 } else if (object->IsSymbol()) {
839 return AddEntry(object, HeapEntry::kSymbol, "symbol"); 839 if (Symbol::cast(object)->is_private())
840 return AddEntry(object, HeapEntry::kHidden, "private symbol");
841 else
842 return AddEntry(object, HeapEntry::kSymbol, "symbol");
840 } else if (object->IsCode()) { 843 } else if (object->IsCode()) {
841 return AddEntry(object, HeapEntry::kCode, ""); 844 return AddEntry(object, HeapEntry::kCode, "");
842 } else if (object->IsSharedFunctionInfo()) { 845 } else if (object->IsSharedFunctionInfo()) {
843 String* name = String::cast(SharedFunctionInfo::cast(object)->name()); 846 String* name = String::cast(SharedFunctionInfo::cast(object)->name());
844 return AddEntry(object, 847 return AddEntry(object,
845 HeapEntry::kCode, 848 HeapEntry::kCode,
846 names_->GetName(name)); 849 names_->GetName(name));
847 } else if (object->IsScript()) { 850 } else if (object->IsScript()) {
848 Object* name = Script::cast(object)->name(); 851 Object* name = Script::cast(object)->name();
849 return AddEntry(object, 852 return AddEntry(object,
(...skipping 2319 matching lines...) Expand 10 before | Expand all | Expand 10 after
3169 for (int i = 1; i < sorted_strings.length(); ++i) { 3172 for (int i = 1; i < sorted_strings.length(); ++i) {
3170 writer_->AddCharacter(','); 3173 writer_->AddCharacter(',');
3171 SerializeString(sorted_strings[i]); 3174 SerializeString(sorted_strings[i]);
3172 if (writer_->aborted()) return; 3175 if (writer_->aborted()) return;
3173 } 3176 }
3174 } 3177 }
3175 3178
3176 3179
3177 } // namespace internal 3180 } // namespace internal
3178 } // namespace v8 3181 } // namespace v8
OLDNEW
« include/v8.h ('K') | « src/isolate.cc ('k') | src/runtime/runtime-symbol.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698