OLD | NEW |
1 // Copyright 2009 the V8 project authors. All rights reserved. | 1 // Copyright 2009 the V8 project authors. All rights reserved. |
2 // | 2 // |
3 // Tests for heap profiler | 3 // Tests for heap profiler |
4 | 4 |
5 #ifdef ENABLE_LOGGING_AND_PROFILING | 5 #ifdef ENABLE_LOGGING_AND_PROFILING |
6 | 6 |
7 #include "v8.h" | 7 #include "v8.h" |
8 #include "heap-profiler.h" | 8 #include "heap-profiler.h" |
9 #include "string-stream.h" | 9 #include "string-stream.h" |
10 #include "cctest.h" | 10 #include "cctest.h" |
(...skipping 310 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
321 ret_profile.CollectStats(obj); | 321 ret_profile.CollectStats(obj); |
322 } | 322 } |
323 RetainerProfilePrinter printer; | 323 RetainerProfilePrinter printer; |
324 ret_profile.DebugPrintStats(&printer); | 324 ret_profile.DebugPrintStats(&printer); |
325 CHECK_EQ("(global property);1,B;2,C;2", printer.GetRetainers("A")); | 325 CHECK_EQ("(global property);1,B;2,C;2", printer.GetRetainers("A")); |
326 CHECK_EQ("(global property);2", printer.GetRetainers("B")); | 326 CHECK_EQ("(global property);2", printer.GetRetainers("B")); |
327 CHECK_EQ("(global property);1", printer.GetRetainers("C")); | 327 CHECK_EQ("(global property);1", printer.GetRetainers("C")); |
328 } | 328 } |
329 | 329 |
330 #endif // ENABLE_LOGGING_AND_PROFILING | 330 #endif // ENABLE_LOGGING_AND_PROFILING |
OLD | NEW |