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

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

Issue 10169007: Add missing named fields to SharedFunctionInfo in heap snapshot. (Closed) Base URL: https://v8.googlecode.com/svn/branches/bleeding_edge
Patch Set: Addressing comments. Created 8 years, 8 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 | no next file » | 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 2006 matching lines...) Expand 10 before | Expand all | Expand 10 after
2017 } 2017 }
2018 SharedFunctionInfo* shared_info = js_fun->shared(); 2018 SharedFunctionInfo* shared_info = js_fun->shared();
2019 // JSFunction has either bindings or literals and never both. 2019 // JSFunction has either bindings or literals and never both.
2020 bool bound = shared_info->bound(); 2020 bool bound = shared_info->bound();
2021 TagObject(js_fun->literals_or_bindings(), 2021 TagObject(js_fun->literals_or_bindings(),
2022 bound ? "(function bindings)" : "(function literals)"); 2022 bound ? "(function bindings)" : "(function literals)");
2023 SetInternalReference(js_fun, entry, 2023 SetInternalReference(js_fun, entry,
2024 bound ? "bindings" : "literals", 2024 bound ? "bindings" : "literals",
2025 js_fun->literals_or_bindings(), 2025 js_fun->literals_or_bindings(),
2026 JSFunction::kLiteralsOffset); 2026 JSFunction::kLiteralsOffset);
2027 TagObject(shared_info, "(shared function info)");
2027 SetInternalReference(js_fun, entry, 2028 SetInternalReference(js_fun, entry,
2028 "shared", shared_info, 2029 "shared", shared_info,
2029 JSFunction::kSharedFunctionInfoOffset); 2030 JSFunction::kSharedFunctionInfoOffset);
2030 TagObject(js_fun->unchecked_context(), "(context)"); 2031 TagObject(js_fun->unchecked_context(), "(context)");
2031 SetInternalReference(js_fun, entry, 2032 SetInternalReference(js_fun, entry,
2032 "context", js_fun->unchecked_context(), 2033 "context", js_fun->unchecked_context(),
2033 JSFunction::kContextOffset); 2034 JSFunction::kContextOffset);
2034 for (int i = JSFunction::kNonWeakFieldsEndOffset; 2035 for (int i = JSFunction::kNonWeakFieldsEndOffset;
2035 i < JSFunction::kSize; 2036 i < JSFunction::kSize;
2036 i += kPointerSize) { 2037 i += kPointerSize) {
(...skipping 51 matching lines...) Expand 10 before | Expand all | Expand 10 after
2088 "prototype_transitions", map->prototype_transitions(), 2089 "prototype_transitions", map->prototype_transitions(),
2089 Map::kPrototypeTransitionsOffset); 2090 Map::kPrototypeTransitionsOffset);
2090 SetInternalReference(obj, entry, 2091 SetInternalReference(obj, entry,
2091 "code_cache", map->code_cache(), 2092 "code_cache", map->code_cache(),
2092 Map::kCodeCacheOffset); 2093 Map::kCodeCacheOffset);
2093 } else if (obj->IsSharedFunctionInfo()) { 2094 } else if (obj->IsSharedFunctionInfo()) {
2094 SharedFunctionInfo* shared = SharedFunctionInfo::cast(obj); 2095 SharedFunctionInfo* shared = SharedFunctionInfo::cast(obj);
2095 SetInternalReference(obj, entry, 2096 SetInternalReference(obj, entry,
2096 "name", shared->name(), 2097 "name", shared->name(),
2097 SharedFunctionInfo::kNameOffset); 2098 SharedFunctionInfo::kNameOffset);
2099 TagObject(shared->code(), "(code)");
2098 SetInternalReference(obj, entry, 2100 SetInternalReference(obj, entry,
2099 "code", shared->unchecked_code(), 2101 "code", shared->code(),
2100 SharedFunctionInfo::kCodeOffset); 2102 SharedFunctionInfo::kCodeOffset);
2101 TagObject(shared->scope_info(), "(function scope info)"); 2103 TagObject(shared->scope_info(), "(function scope info)");
2102 SetInternalReference(obj, entry, 2104 SetInternalReference(obj, entry,
2103 "scope_info", shared->scope_info(), 2105 "scope_info", shared->scope_info(),
2104 SharedFunctionInfo::kScopeInfoOffset); 2106 SharedFunctionInfo::kScopeInfoOffset);
2105 SetInternalReference(obj, entry, 2107 SetInternalReference(obj, entry,
2106 "instance_class_name", shared->instance_class_name(), 2108 "instance_class_name", shared->instance_class_name(),
2107 SharedFunctionInfo::kInstanceClassNameOffset); 2109 SharedFunctionInfo::kInstanceClassNameOffset);
2108 SetInternalReference(obj, entry, 2110 SetInternalReference(obj, entry,
2109 "script", shared->script(), 2111 "script", shared->script(),
2110 SharedFunctionInfo::kScriptOffset); 2112 SharedFunctionInfo::kScriptOffset);
2113 TagObject(shared->construct_stub(), "(code)");
2114 SetInternalReference(obj, entry,
2115 "construct_stub", shared->construct_stub(),
2116 SharedFunctionInfo::kConstructStubOffset);
2117 SetInternalReference(obj, entry,
2118 "function_data", shared->function_data(),
2119 SharedFunctionInfo::kFunctionDataOffset);
2120 SetInternalReference(obj, entry,
2121 "debug_info", shared->debug_info(),
2122 SharedFunctionInfo::kDebugInfoOffset);
2123 SetInternalReference(obj, entry,
2124 "inferred_name", shared->inferred_name(),
2125 SharedFunctionInfo::kInferredNameOffset);
2126 SetInternalReference(obj, entry,
2127 "this_property_assignments",
2128 shared->this_property_assignments(),
2129 SharedFunctionInfo::kThisPropertyAssignmentsOffset);
2111 SetWeakReference(obj, entry, 2130 SetWeakReference(obj, entry,
2112 1, shared->initial_map(), 2131 1, shared->initial_map(),
2113 SharedFunctionInfo::kInitialMapOffset); 2132 SharedFunctionInfo::kInitialMapOffset);
2114 } else if (obj->IsScript()) { 2133 } else if (obj->IsScript()) {
2115 Script* script = Script::cast(obj); 2134 Script* script = Script::cast(obj);
2116 SetInternalReference(obj, entry, 2135 SetInternalReference(obj, entry,
2117 "source", script->source(), 2136 "source", script->source(),
2118 Script::kSourceOffset); 2137 Script::kSourceOffset);
2119 SetInternalReference(obj, entry, 2138 SetInternalReference(obj, entry,
2120 "name", script->name(), 2139 "name", script->name(),
(...skipping 1808 matching lines...) Expand 10 before | Expand all | Expand 10 after
3929 3948
3930 3949
3931 void HeapSnapshotJSONSerializer::SortHashMap( 3950 void HeapSnapshotJSONSerializer::SortHashMap(
3932 HashMap* map, List<HashMap::Entry*>* sorted_entries) { 3951 HashMap* map, List<HashMap::Entry*>* sorted_entries) {
3933 for (HashMap::Entry* p = map->Start(); p != NULL; p = map->Next(p)) 3952 for (HashMap::Entry* p = map->Start(); p != NULL; p = map->Next(p))
3934 sorted_entries->Add(p); 3953 sorted_entries->Add(p);
3935 sorted_entries->Sort(SortUsingEntryValue); 3954 sorted_entries->Sort(SortUsingEntryValue);
3936 } 3955 }
3937 3956
3938 } } // namespace v8::internal 3957 } } // namespace v8::internal
OLDNEW
« no previous file with comments | « no previous file | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698