Reviewers: Søren Gjesse,

Description:
Heap profiler: consider Function instances separately, similar to Arrays and
Objects.

Please review this at http://codereview.chromium.org/209066

Affected files:
   M src/heap-profiler.cc


Index: src/heap-profiler.cc
diff --git a/src/heap-profiler.cc b/src/heap-profiler.cc
index  
5e945b49a0ca126c72eaba27ccaa746d00039d8b..c1122c4b79b62a72047394c661e1fdbe66149d89
  
100644
--- a/src/heap-profiler.cc
+++ b/src/heap-profiler.cc
@@ -67,9 +67,10 @@ JSObjectsCluster Clusterizer::Clusterize(HeapObject*  
obj, bool fine_grain) {
    if (obj->IsJSObject()) {
      JSObject* js_obj = JSObject::cast(obj);
      String* constructor = JSObject::cast(js_obj)->constructor_name();
-    // Differentiate Object and Array instances.
+    // Differentiate Array, Function, and Object instances.
      if (fine_grain && (constructor == Heap::Object_symbol() ||
-                       constructor == Heap::Array_symbol())) {
+                       constructor == Heap::Array_symbol() ||
+                       constructor == Heap::function_class_symbol())) {
        return JSObjectsCluster(constructor, obj);
      } else {
        return JSObjectsCluster(constructor);



--~--~---------~--~----~------------~-------~--~----~
v8-dev mailing list
[email protected]
http://groups.google.com/group/v8-dev
-~----------~----~----~----~------~----~------~--~---

Reply via email to