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

Side by Side Diff: src/profile-generator.cc

Issue 9139051: Cosmetic changes ("set up" is a verb, "setup" is a noun). (Closed) Base URL: http://v8.googlecode.com/svn/branches/bleeding_edge/
Patch Set: Created 8 years, 11 months 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 | Annotate | Revision Log
« no previous file with comments | « src/profile-generator.h ('k') | src/runtime-profiler.h » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 // Copyright 2011 the V8 project authors. All rights reserved. 1 // Copyright 2011 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 886 matching lines...) Expand 10 before | Expand all | Expand 10 after
897 } else if (sample.tos != NULL) { 897 } else if (sample.tos != NULL) {
898 // Find out, if top of stack was pointing inside a JS function 898 // Find out, if top of stack was pointing inside a JS function
899 // meaning that we have encountered a frameless invocation. 899 // meaning that we have encountered a frameless invocation.
900 *entry = code_map_.FindEntry(sample.tos); 900 *entry = code_map_.FindEntry(sample.tos);
901 if (*entry != NULL && !(*entry)->is_js_function()) { 901 if (*entry != NULL && !(*entry)->is_js_function()) {
902 *entry = NULL; 902 *entry = NULL;
903 } 903 }
904 entry++; 904 entry++;
905 } 905 }
906 906
907 for (const Address *stack_pos = sample.stack, 907 for (const Address* stack_pos = sample.stack,
908 *stack_end = stack_pos + sample.frames_count; 908 *stack_end = stack_pos + sample.frames_count;
909 stack_pos != stack_end; 909 stack_pos != stack_end;
910 ++stack_pos) { 910 ++stack_pos) {
911 *entry++ = code_map_.FindEntry(*stack_pos); 911 *entry++ = code_map_.FindEntry(*stack_pos);
912 } 912 }
913 } 913 }
914 914
915 if (FLAG_prof_browser_mode) { 915 if (FLAG_prof_browser_mode) {
916 bool no_symbolized_entries = true; 916 bool no_symbolized_entries = true;
917 for (CodeEntry** e = entries.start(); e != entry; ++e) { 917 for (CodeEntry** e = entries.start(); e != entry; ++e) {
(...skipping 670 matching lines...) Expand 10 before | Expand all | Expand 10 after
1588 if (ids_.FindObject(obj->address()) == id) { 1588 if (ids_.FindObject(obj->address()) == id) {
1589 ASSERT(object == NULL); 1589 ASSERT(object == NULL);
1590 object = obj; 1590 object = obj;
1591 // Can't break -- kFilterUnreachable requires full heap traversal. 1591 // Can't break -- kFilterUnreachable requires full heap traversal.
1592 } 1592 }
1593 } 1593 }
1594 return object != NULL ? Handle<HeapObject>(object) : Handle<HeapObject>(); 1594 return object != NULL ? Handle<HeapObject>(object) : Handle<HeapObject>();
1595 } 1595 }
1596 1596
1597 1597
1598 HeapEntry *const HeapEntriesMap::kHeapEntryPlaceholder = 1598 HeapEntry* const HeapEntriesMap::kHeapEntryPlaceholder =
1599 reinterpret_cast<HeapEntry*>(1); 1599 reinterpret_cast<HeapEntry*>(1);
1600 1600
1601 HeapEntriesMap::HeapEntriesMap() 1601 HeapEntriesMap::HeapEntriesMap()
1602 : entries_(HeapThingsMatch), 1602 : entries_(HeapThingsMatch),
1603 entries_count_(0), 1603 entries_count_(0),
1604 total_children_count_(0), 1604 total_children_count_(0),
1605 total_retainers_count_(0) { 1605 total_retainers_count_(0) {
1606 } 1606 }
1607 1607
1608 1608
(...skipping 108 matching lines...) Expand 10 before | Expand all | Expand 10 after
1717 1717
1718 void HeapObjectsSet::SetTag(Object* obj, const char* tag) { 1718 void HeapObjectsSet::SetTag(Object* obj, const char* tag) {
1719 if (!obj->IsHeapObject()) return; 1719 if (!obj->IsHeapObject()) return;
1720 HeapObject* object = HeapObject::cast(obj); 1720 HeapObject* object = HeapObject::cast(obj);
1721 HashMap::Entry* cache_entry = 1721 HashMap::Entry* cache_entry =
1722 entries_.Lookup(object, HeapEntriesMap::Hash(object), true); 1722 entries_.Lookup(object, HeapEntriesMap::Hash(object), true);
1723 cache_entry->value = const_cast<char*>(tag); 1723 cache_entry->value = const_cast<char*>(tag);
1724 } 1724 }
1725 1725
1726 1726
1727 HeapObject *const V8HeapExplorer::kInternalRootObject = 1727 HeapObject* const V8HeapExplorer::kInternalRootObject =
1728 reinterpret_cast<HeapObject*>( 1728 reinterpret_cast<HeapObject*>(
1729 static_cast<intptr_t>(HeapObjectsMap::kInternalRootObjectId)); 1729 static_cast<intptr_t>(HeapObjectsMap::kInternalRootObjectId));
1730 HeapObject *const V8HeapExplorer::kGcRootsObject = 1730 HeapObject* const V8HeapExplorer::kGcRootsObject =
1731 reinterpret_cast<HeapObject*>( 1731 reinterpret_cast<HeapObject*>(
1732 static_cast<intptr_t>(HeapObjectsMap::kGcRootsObjectId)); 1732 static_cast<intptr_t>(HeapObjectsMap::kGcRootsObjectId));
1733 HeapObject *const V8HeapExplorer::kFirstGcSubrootObject = 1733 HeapObject* const V8HeapExplorer::kFirstGcSubrootObject =
1734 reinterpret_cast<HeapObject*>( 1734 reinterpret_cast<HeapObject*>(
1735 static_cast<intptr_t>(HeapObjectsMap::kGcRootsFirstSubrootId)); 1735 static_cast<intptr_t>(HeapObjectsMap::kGcRootsFirstSubrootId));
1736 HeapObject *const V8HeapExplorer::kLastGcSubrootObject = 1736 HeapObject* const V8HeapExplorer::kLastGcSubrootObject =
1737 reinterpret_cast<HeapObject*>( 1737 reinterpret_cast<HeapObject*>(
1738 static_cast<intptr_t>(HeapObjectsMap::kFirstAvailableObjectId)); 1738 static_cast<intptr_t>(HeapObjectsMap::kFirstAvailableObjectId));
1739 1739
1740 1740
1741 V8HeapExplorer::V8HeapExplorer( 1741 V8HeapExplorer::V8HeapExplorer(
1742 HeapSnapshot* snapshot, 1742 HeapSnapshot* snapshot,
1743 SnapshottingProgressReportingInterface* progress) 1743 SnapshottingProgressReportingInterface* progress)
1744 : heap_(Isolate::Current()->heap()), 1744 : heap_(Isolate::Current()->heap()),
1745 snapshot_(snapshot), 1745 snapshot_(snapshot),
1746 collection_(snapshot_->collection()), 1746 collection_(snapshot_->collection()),
(...skipping 1891 matching lines...) Expand 10 before | Expand all | Expand 10 after
3638 3638
3639 3639
3640 void HeapSnapshotJSONSerializer::SortHashMap( 3640 void HeapSnapshotJSONSerializer::SortHashMap(
3641 HashMap* map, List<HashMap::Entry*>* sorted_entries) { 3641 HashMap* map, List<HashMap::Entry*>* sorted_entries) {
3642 for (HashMap::Entry* p = map->Start(); p != NULL; p = map->Next(p)) 3642 for (HashMap::Entry* p = map->Start(); p != NULL; p = map->Next(p))
3643 sorted_entries->Add(p); 3643 sorted_entries->Add(p);
3644 sorted_entries->Sort(SortUsingEntryValue); 3644 sorted_entries->Sort(SortUsingEntryValue);
3645 } 3645 }
3646 3646
3647 } } // namespace v8::internal 3647 } } // namespace v8::internal
OLDNEW
« no previous file with comments | « src/profile-generator.h ('k') | src/runtime-profiler.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698