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

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

Issue 10198011: Refactoring of heap profiler: split ExtractReferences into several functions. (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 | src/profile-generator.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 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 957 matching lines...) Expand 10 before | Expand all | Expand 10 after
968 968
969 private: 969 private:
970 HeapEntry* AddEntry( 970 HeapEntry* AddEntry(
971 HeapObject* object, int children_count, int retainers_count); 971 HeapObject* object, int children_count, int retainers_count);
972 HeapEntry* AddEntry(HeapObject* object, 972 HeapEntry* AddEntry(HeapObject* object,
973 HeapEntry::Type type, 973 HeapEntry::Type type,
974 const char* name, 974 const char* name,
975 int children_count, 975 int children_count,
976 int retainers_count); 976 int retainers_count);
977 const char* GetSystemEntryName(HeapObject* object); 977 const char* GetSystemEntryName(HeapObject* object);
978
978 void ExtractReferences(HeapObject* obj); 979 void ExtractReferences(HeapObject* obj);
980 void ExtractJSGlobalProxy(JSGlobalProxy* proxy);
981 void ExtractJSObject(HeapEntry* entry, JSObject* js_obj);
982 void ExtractString(HeapEntry* entry, String* obj);
983 void ExtractContext(HeapEntry* entry, Context* context);
984 void ExtractMap(HeapEntry* entry, Map* map);
985 void ExtractSharedFunctionInfo(HeapEntry* entry, SharedFunctionInfo* shared);
986 void ExtractScript(HeapEntry* entry, Script* script);
987 void ExtractCodeCache(HeapEntry* entry, CodeCache* code_cache);
988 void ExtractCode(HeapEntry* entry, Code* code);
yurys 2012/04/25 06:30:44 You should be more consistent in using/not using *
979 void ExtractClosureReferences(JSObject* js_obj, HeapEntry* entry); 989 void ExtractClosureReferences(JSObject* js_obj, HeapEntry* entry);
980 void ExtractPropertyReferences(JSObject* js_obj, HeapEntry* entry); 990 void ExtractPropertyReferences(JSObject* js_obj, HeapEntry* entry);
981 void ExtractElementReferences(JSObject* js_obj, HeapEntry* entry); 991 void ExtractElementReferences(JSObject* js_obj, HeapEntry* entry);
982 void ExtractInternalReferences(JSObject* js_obj, HeapEntry* entry); 992 void ExtractInternalReferences(JSObject* js_obj, HeapEntry* entry);
983 bool IsEssentialObject(Object* object); 993 bool IsEssentialObject(Object* object);
984 void SetClosureReference(HeapObject* parent_obj, 994 void SetClosureReference(HeapObject* parent_obj,
985 HeapEntry* parent, 995 HeapEntry* parent,
986 String* reference_name, 996 String* reference_name,
987 Object* child); 997 Object* child);
988 void SetNativeBindReference(HeapObject* parent_obj, 998 void SetNativeBindReference(HeapObject* parent_obj,
(...skipping 207 matching lines...) Expand 10 before | Expand all | Expand 10 after
1196 1206
1197 friend class HeapSnapshotJSONSerializerEnumerator; 1207 friend class HeapSnapshotJSONSerializerEnumerator;
1198 friend class HeapSnapshotJSONSerializerIterator; 1208 friend class HeapSnapshotJSONSerializerIterator;
1199 1209
1200 DISALLOW_COPY_AND_ASSIGN(HeapSnapshotJSONSerializer); 1210 DISALLOW_COPY_AND_ASSIGN(HeapSnapshotJSONSerializer);
1201 }; 1211 };
1202 1212
1203 } } // namespace v8::internal 1213 } } // namespace v8::internal
1204 1214
1205 #endif // V8_PROFILE_GENERATOR_H_ 1215 #endif // V8_PROFILE_GENERATOR_H_
OLDNEW
« no previous file with comments | « no previous file | src/profile-generator.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698