Revision: 3105 Author: [email protected] Date: Wed Oct 21 06:04:53 2009 Log: Heap profiler: guard calls to Producer profile.
Patch by Steve Block. [email protected] Review URL: http://codereview.chromium.org/307018 http://code.google.com/p/v8/source/detail?r=3105 Modified: /branches/bleeding_edge/src/heap.cc ======================================= --- /branches/bleeding_edge/src/heap.cc Tue Oct 20 08:26:17 2009 +++ /branches/bleeding_edge/src/heap.cc Wed Oct 21 06:04:53 2009 @@ -2133,7 +2133,9 @@ TargetSpaceId(map->instance_type())); if (result->IsFailure()) return result; HeapObject::cast(result)->set_map(map); +#ifdef ENABLE_LOGGING_AND_PROFILING ProducerHeapProfile::RecordJSObjectAllocation(result); +#endif return result; } @@ -2455,7 +2457,9 @@ JSObject::cast(clone)->set_properties(FixedArray::cast(prop)); } // Return the new clone. +#ifdef ENABLE_LOGGING_AND_PROFILING ProducerHeapProfile::RecordJSObjectAllocation(clone); +#endif return clone; } @@ -3422,8 +3426,10 @@ LOG(IntEvent("heap-capacity", Capacity())); LOG(IntEvent("heap-available", Available())); +#ifdef ENABLE_LOGGING_AND_PROFILING // This should be called only after initial objects have been created. ProducerHeapProfile::Setup(); +#endif return true; } --~--~---------~--~----~------------~-------~--~----~ v8-dev mailing list [email protected] http://groups.google.com/group/v8-dev -~----------~----~----~----~------~----~------~--~---
