| OLD | NEW |
| 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 14 matching lines...) Expand all Loading... |
| 25 // (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE | 25 // (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE |
| 26 // OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. | 26 // OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. |
| 27 // | 27 // |
| 28 // Tests for heap profiler | 28 // Tests for heap profiler |
| 29 | 29 |
| 30 #include <ctype.h> | 30 #include <ctype.h> |
| 31 | 31 |
| 32 #include "src/v8.h" | 32 #include "src/v8.h" |
| 33 | 33 |
| 34 #include "include/v8-profiler.h" | 34 #include "include/v8-profiler.h" |
| 35 #include "src/collector.h" |
| 35 #include "src/debug/debug.h" | 36 #include "src/debug/debug.h" |
| 36 #include "src/hashmap.h" | 37 #include "src/hashmap.h" |
| 37 #include "src/profiler/allocation-tracker.h" | 38 #include "src/profiler/allocation-tracker.h" |
| 38 #include "src/profiler/heap-profiler.h" | 39 #include "src/profiler/heap-profiler.h" |
| 39 #include "src/profiler/heap-snapshot-generator-inl.h" | 40 #include "src/profiler/heap-snapshot-generator-inl.h" |
| 40 #include "test/cctest/cctest.h" | 41 #include "test/cctest/cctest.h" |
| 41 | 42 |
| 42 using i::AllocationTraceNode; | 43 using i::AllocationTraceNode; |
| 43 using i::AllocationTraceTree; | 44 using i::AllocationTraceTree; |
| 44 using i::AllocationTracker; | 45 using i::AllocationTracker; |
| (...skipping 2958 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 3003 v8::base::SmartPointer<v8::AllocationProfile> profile( | 3004 v8::base::SmartPointer<v8::AllocationProfile> profile( |
| 3004 heap_profiler->GetAllocationProfile()); | 3005 heap_profiler->GetAllocationProfile()); |
| 3005 CHECK(!profile.is_empty()); | 3006 CHECK(!profile.is_empty()); |
| 3006 const char* names[] = {"(V8 API)"}; | 3007 const char* names[] = {"(V8 API)"}; |
| 3007 auto node = FindAllocationProfileNode( | 3008 auto node = FindAllocationProfileNode( |
| 3008 *profile, Vector<const char*>(names, arraysize(names))); | 3009 *profile, Vector<const char*>(names, arraysize(names))); |
| 3009 CHECK(node); | 3010 CHECK(node); |
| 3010 | 3011 |
| 3011 heap_profiler->StopSamplingHeapProfiler(); | 3012 heap_profiler->StopSamplingHeapProfiler(); |
| 3012 } | 3013 } |
| OLD | NEW |