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

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

Issue 222004: Reverting 2950. (Closed) Base URL: http://v8.googlecode.com/svn/branches/bleeding_edge/
Patch Set: Created 11 years, 2 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 2009 the V8 project authors. All rights reserved. 1 // Copyright 2009 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 49 matching lines...) Expand 10 before | Expand all | Expand 10 after
60 } 60 }
61 static void InsertIntoTree(JSObjectsClusterTree* tree, 61 static void InsertIntoTree(JSObjectsClusterTree* tree,
62 const JSObjectsCluster& cluster, int size); 62 const JSObjectsCluster& cluster, int size);
63 }; 63 };
64 64
65 65
66 JSObjectsCluster Clusterizer::Clusterize(HeapObject* obj, bool fine_grain) { 66 JSObjectsCluster Clusterizer::Clusterize(HeapObject* obj, bool fine_grain) {
67 if (obj->IsJSObject()) { 67 if (obj->IsJSObject()) {
68 JSObject* js_obj = JSObject::cast(obj); 68 JSObject* js_obj = JSObject::cast(obj);
69 String* constructor = JSObject::cast(js_obj)->constructor_name(); 69 String* constructor = JSObject::cast(js_obj)->constructor_name();
70 // Differentiate Array, Function, and Object instances. 70 // Differentiate Object and Array instances.
71 if (fine_grain && (constructor == Heap::Object_symbol() || 71 if (fine_grain && (constructor == Heap::Object_symbol() ||
72 constructor == Heap::Array_symbol() || 72 constructor == Heap::Array_symbol())) {
73 constructor == Heap::function_class_symbol())) {
74 return JSObjectsCluster(constructor, obj); 73 return JSObjectsCluster(constructor, obj);
75 } else { 74 } else {
76 return JSObjectsCluster(constructor); 75 return JSObjectsCluster(constructor);
77 } 76 }
78 } else if (obj->IsString()) { 77 } else if (obj->IsString()) {
79 return JSObjectsCluster(Heap::String_symbol()); 78 return JSObjectsCluster(Heap::String_symbol());
80 } 79 }
81 return JSObjectsCluster(); 80 return JSObjectsCluster();
82 } 81 }
83 82
(...skipping 455 matching lines...) Expand 10 before | Expand all | Expand 10 after
539 js_retainer_profile.PrintStats(); 538 js_retainer_profile.PrintStats();
540 539
541 LOG(HeapSampleEndEvent("Heap", "allocated")); 540 LOG(HeapSampleEndEvent("Heap", "allocated"));
542 } 541 }
543 542
544 543
545 #endif // ENABLE_LOGGING_AND_PROFILING 544 #endif // ENABLE_LOGGING_AND_PROFILING
546 545
547 546
548 } } // namespace v8::internal 547 } } // 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