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

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

Issue 10830309: Show map -> transition array -> descriptor array to the heap profiler. (Closed) Base URL: https://v8.googlecode.com/svn/branches/bleeding_edge
Patch Set: Adding test Created 8 years, 4 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 | « no previous file | test/cctest/test-heap-profiler.cc » ('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 2012 the V8 project authors. All rights reserved. 1 // Copyright 2012 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 1989 matching lines...) Expand 10 before | Expand all | Expand 10 after
2000 } 2000 }
2001 } 2001 }
2002 2002
2003 2003
2004 void V8HeapExplorer::ExtractMapReferences(int entry, Map* map) { 2004 void V8HeapExplorer::ExtractMapReferences(int entry, Map* map) {
2005 SetInternalReference(map, entry, 2005 SetInternalReference(map, entry,
2006 "prototype", map->prototype(), Map::kPrototypeOffset); 2006 "prototype", map->prototype(), Map::kPrototypeOffset);
2007 SetInternalReference(map, entry, 2007 SetInternalReference(map, entry,
2008 "constructor", map->constructor(), 2008 "constructor", map->constructor(),
2009 Map::kConstructorOffset); 2009 Map::kConstructorOffset);
2010 if (!map->instance_descriptors()->IsEmpty()) { 2010 if (map->HasTransitionArray()) {
2011 TagObject(map->instance_descriptors(), "(map descriptors)"); 2011 TransitionArray* transitions = map->transitions();
2012 // TODO(verwaest): Check what to do here. 2012 if (!transitions->descriptors()->IsEmpty()) {
2013 DescriptorArray* descriptors = transitions->descriptors();
2014 TagObject(descriptors, "(map descriptors)");
2015 SetInternalReference(transitions, entry,
2016 "descriptors", descriptors,
2017 TransitionArray::kDescriptorsOffset);
2018 IndexedReferencesExtractor refs_extractor(
2019 this, transitions, entry);
2020 transitions->Iterate(&refs_extractor);
2021 }
2022 TagObject(transitions, "(transition array)");
2013 SetInternalReference(map, entry, 2023 SetInternalReference(map, entry,
2014 "descriptors", map->instance_descriptors(), 2024 "transitions", transitions,
2015 Map::kTransitionsOrBackPointerOffset); 2025 Map::kTransitionsOrBackPointerOffset);
2016 } 2026 }
2017 SetInternalReference(map, entry, 2027 SetInternalReference(map, entry,
2018 "code_cache", map->code_cache(), 2028 "code_cache", map->code_cache(),
2019 Map::kCodeCacheOffset); 2029 Map::kCodeCacheOffset);
2020 } 2030 }
2021 2031
2022 2032
2023 void V8HeapExplorer::ExtractSharedFunctionInfoReferences( 2033 void V8HeapExplorer::ExtractSharedFunctionInfoReferences(
2024 int entry, SharedFunctionInfo* shared) { 2034 int entry, SharedFunctionInfo* shared) {
(...skipping 1544 matching lines...) Expand 10 before | Expand all | Expand 10 after
3569 3579
3570 3580
3571 void HeapSnapshotJSONSerializer::SortHashMap( 3581 void HeapSnapshotJSONSerializer::SortHashMap(
3572 HashMap* map, List<HashMap::Entry*>* sorted_entries) { 3582 HashMap* map, List<HashMap::Entry*>* sorted_entries) {
3573 for (HashMap::Entry* p = map->Start(); p != NULL; p = map->Next(p)) 3583 for (HashMap::Entry* p = map->Start(); p != NULL; p = map->Next(p))
3574 sorted_entries->Add(p); 3584 sorted_entries->Add(p);
3575 sorted_entries->Sort(SortUsingEntryValue); 3585 sorted_entries->Sort(SortUsingEntryValue);
3576 } 3586 }
3577 3587
3578 } } // namespace v8::internal 3588 } } // namespace v8::internal
OLDNEW
« no previous file with comments | « no previous file | test/cctest/test-heap-profiler.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698