3 <script src=
"../../http/tests/inspector/inspector-test.js"></script>
4 <script src=
"../tracing-test.js"></script>
8 var codemap
= new WebInspector
.TimelineJSProfileProcessor
.CodeMap();
9 for (var i
= 0; i
< 10; i
++) {
10 var address
= i
* 0x100 + 0x77000;
11 codemap
.addEntry("0x" + address
.toString(16), 0x80, "frame" + i
);
14 codemap
.addEntry( "0x77010", 0x10, "frame1killer");
15 codemap
.addEntry( "0x77090", 0x200, "frames234killer");
16 codemap
.moveEntry("0x77090", "0x55000", 0x300);
17 codemap
.moveEntry("0x77500", "0xfffffffffffff000", 0x80);
18 codemap
.moveEntry("0x77600", "0x77700", 0x80);
21 // bank -> BBBAAAAAAAAAAAAA <- address
22 codemap
.addEntry("0xffffffffffffff00", 2, "frameA");
23 codemap
.addEntry("0xffffffffffffff02", 2, "frameB");
24 codemap
.addEntry("0xffffffffffffff04", 2, "frameC");
25 codemap
.addEntry("0xffffffffffffff06", 2, "frameD");
26 codemap
.addEntry("0xffffffffffffff01", 5, "frameE");
28 InspectorTest
.addResult("Lookup test:");
45 for (var i
= 0; i
< addresses
.length
; ++i
)
46 InspectorTest
.addResult(" " + addresses
[i
] + " -> " + codemap
.lookupEntry(addresses
[i
]));
48 InspectorTest
.addResult("");
49 for (var bankName
of codemap
._banks
.keysArray()) {
50 InspectorTest
.addResult("Bank \"" + bankName
+ "\":");
51 var bank
= codemap
._banks
.get(bankName
);
52 for (var i
= 0; i
< bank
._entries
.length
; ++i
) {
53 var entry
= bank
._entries
[i
];
54 InspectorTest
.addResult(" 0x" + entry
.address
.toString(16) + " / " + entry
.size
+ " : " + entry
.callFrame
);
57 InspectorTest
.completeTest();
62 <body onload=
"runTest()">