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 18 matching lines...) Expand all Loading... |
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/allocation-tracker.h" | 35 #include "src/allocation-tracker.h" |
36 #include "src/debug.h" | 36 #include "src/debug.h" |
37 #include "src/hashmap.h" | 37 #include "src/hashmap.h" |
38 #include "src/heap-profiler.h" | 38 #include "src/heap-profiler.h" |
39 #include "src/snapshot.h" | |
40 #include "src/utils-inl.h" | 39 #include "src/utils-inl.h" |
41 #include "test/cctest/cctest.h" | 40 #include "test/cctest/cctest.h" |
42 | 41 |
43 using i::AllocationTraceNode; | 42 using i::AllocationTraceNode; |
44 using i::AllocationTraceTree; | 43 using i::AllocationTraceTree; |
45 using i::AllocationTracker; | 44 using i::AllocationTracker; |
46 using i::HashMap; | 45 using i::HashMap; |
47 using i::Vector; | 46 using i::Vector; |
48 | 47 |
49 namespace { | 48 namespace { |
(...skipping 2714 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
2764 map.AddRange(ToAddress(0x180), 0x80, 6U); | 2763 map.AddRange(ToAddress(0x180), 0x80, 6U); |
2765 map.AddRange(ToAddress(0x180), 0x80, 7U); | 2764 map.AddRange(ToAddress(0x180), 0x80, 7U); |
2766 CHECK_EQ(7u, map.GetTraceNodeId(ToAddress(0x180))); | 2765 CHECK_EQ(7u, map.GetTraceNodeId(ToAddress(0x180))); |
2767 CHECK_EQ(5u, map.GetTraceNodeId(ToAddress(0x200))); | 2766 CHECK_EQ(5u, map.GetTraceNodeId(ToAddress(0x200))); |
2768 CHECK_EQ(3u, map.size()); | 2767 CHECK_EQ(3u, map.size()); |
2769 | 2768 |
2770 map.Clear(); | 2769 map.Clear(); |
2771 CHECK_EQ(0u, map.size()); | 2770 CHECK_EQ(0u, map.size()); |
2772 CHECK_EQ(0u, map.GetTraceNodeId(ToAddress(0x400))); | 2771 CHECK_EQ(0u, map.GetTraceNodeId(ToAddress(0x400))); |
2773 } | 2772 } |
OLD | NEW |