Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(188)

Side by Side Diff: test/mjsunit/tools/logreader.js

Issue 546089: Fix issue 553: function frame is skipped in profile when compare stub is called. (Closed)
Patch Set: Introduced dedicated log event types, added stuff for DevTools Created 10 years, 11 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch
« no previous file with comments | « test/cctest/test-log-stack-tracer.cc ('k') | test/mjsunit/tools/tickprocessor.js » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 // Copyright 2009 the V8 project authors. All rights reserved. 1 // Copyright 2009 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 49 matching lines...) Expand 10 before | Expand all | Expand 10 after
60 assertEquals(0x200, reader.prevAddresses_.test); 60 assertEquals(0x200, reader.prevAddresses_.test);
61 assertEquals(0x100, parser('-100')); 61 assertEquals(0x100, parser('-100'));
62 assertEquals(0x100, reader.prevAddresses_.test); 62 assertEquals(0x100, reader.prevAddresses_.test);
63 })(); 63 })();
64 64
65 65
66 (function testAddressParser() { 66 (function testAddressParser() {
67 var reader = new devtools.profiler.LogReader({}); 67 var reader = new devtools.profiler.LogReader({});
68 68
69 assertEquals([0x10000000, 0x10001000, 0xffff000, 0x10000000], 69 assertEquals([0x10000000, 0x10001000, 0xffff000, 0x10000000],
70 reader.processStack(0x10000000, ['overflow', 70 reader.processStack(0x10000000, 0, ['overflow',
71 '+1000', '-2000', '+1000'])); 71 '+1000', '-2000', '+1000']));
72 })(); 72 })();
73 73
74 74
75 (function testExpandBackRef() { 75 (function testExpandBackRef() {
76 var reader = new devtools.profiler.LogReader({}); 76 var reader = new devtools.profiler.LogReader({});
77 77
78 assertEquals('aaaaaaaa', reader.expandBackRef_('aaaaaaaa')); 78 assertEquals('aaaaaaaa', reader.expandBackRef_('aaaaaaaa'));
79 assertEquals('aaaaaaaa', reader.expandBackRef_('#1')); 79 assertEquals('aaaaaaaa', reader.expandBackRef_('#1'));
80 assertEquals('bbbbaaaa', reader.expandBackRef_('bbbb#2:4')); 80 assertEquals('bbbbaaaa', reader.expandBackRef_('bbbb#2:4'));
81 assertEquals('"#1:1"', reader.expandBackRef_('"#1:1"')); 81 assertEquals('"#1:1"', reader.expandBackRef_('"#1:1"'));
82 })(); 82 })();
83 83
84 84
85 // See http://code.google.com/p/v8/issues/detail?id=420 85 // See http://code.google.com/p/v8/issues/detail?id=420
86 (function testReadingTruncatedLog() { 86 (function testReadingTruncatedLog() {
87 // Having an incorrect event in the middle of a log should throw an exception. 87 // Having an incorrect event in the middle of a log should throw an exception.
88 var reader1 = new devtools.profiler.LogReader({}); 88 var reader1 = new devtools.profiler.LogReader({});
89 assertThrows(function() { 89 assertThrows(function() {
90 reader1.processLogChunk('alias,a,b\nxxxx\nalias,c,d\n'); 90 reader1.processLogChunk('alias,a,b\nxxxx\nalias,c,d\n');
91 }); 91 });
92 92
93 // But having it as the last record should not. 93 // But having it as the last record should not.
94 var reader2 = new devtools.profiler.LogReader({}); 94 var reader2 = new devtools.profiler.LogReader({});
95 assertDoesNotThrow(function() { 95 assertDoesNotThrow(function() {
96 reader2.processLogChunk('alias,a,b\nalias,c,d\nxxxx'); 96 reader2.processLogChunk('alias,a,b\nalias,c,d\nxxxx');
97 }); 97 });
98 })(); 98 })();
OLDNEW
« no previous file with comments | « test/cctest/test-log-stack-tracer.cc ('k') | test/mjsunit/tools/tickprocessor.js » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698