| Index: test/mjsunit/tools/tickprocessor.js
|
| diff --git a/test/mjsunit/tools/tickprocessor.js b/test/mjsunit/tools/tickprocessor.js
|
| index 587106ac0a5bee46c54be99f38d554bc2bf2f9d3..0e77b7d5b23fe504f6f9a11faf68589e6196efa7 100644
|
| --- a/test/mjsunit/tools/tickprocessor.js
|
| +++ b/test/mjsunit/tools/tickprocessor.js
|
| @@ -31,6 +31,7 @@
|
| // Files: tools/logreader.js tools/tickprocessor.js
|
| // Env: TEST_FILE_NAME
|
|
|
| +
|
| (function testArgumentsProcessor() {
|
| var p_default = new ArgumentsProcessor([]);
|
| assertTrue(p_default.parse());
|
| @@ -69,12 +70,12 @@
|
| ' U operator delete[](void*)@@GLIBCXX_3.4',
|
| '08049790 T _init',
|
| '08049f50 T _start',
|
| - '08139150 t v8::internal::Runtime_StringReplaceRegExpWithString(v8::internal::Arguments)',
|
| - '08139ca0 T v8::internal::Runtime::GetElementOrCharAt(v8::internal::Handle<v8::internal::Object>, unsigned int)',
|
| - '0813a0b0 t v8::internal::Runtime_DebugGetPropertyDetails(v8::internal::Arguments)',
|
| - '08181d30 W v8::internal::RegExpMacroAssemblerIrregexp::stack_limit_slack()',
|
| + '08139150 00000b4b t v8::internal::Runtime_StringReplaceRegExpWithString(v8::internal::Arguments)',
|
| + '08139ca0 000003f1 T v8::internal::Runtime::GetElementOrCharAt(v8::internal::Handle<v8::internal::Object>, unsigned int)',
|
| + '0813a0b0 00000855 t v8::internal::Runtime_DebugGetPropertyDetails(v8::internal::Arguments)',
|
| + '0818b220 00000036 W v8::internal::RegExpMacroAssembler::CheckPosition(int, v8::internal::Label*)',
|
| ' w __gmon_start__',
|
| - '081f08a0 B stdout'
|
| + '081f08a0 00000004 B stdout'
|
| ].join('\n'), ''];
|
| };
|
|
|
| @@ -87,22 +88,22 @@
|
| assertEquals(
|
| [['_init', 0x08049790, 0x08049f50],
|
| ['_start', 0x08049f50, 0x08139150],
|
| - ['v8::internal::Runtime_StringReplaceRegExpWithString(v8::internal::Arguments)', 0x08139150, 0x08139ca0],
|
| - ['v8::internal::Runtime::GetElementOrCharAt(v8::internal::Handle<v8::internal::Object>, unsigned int)', 0x08139ca0, 0x0813a0b0],
|
| - ['v8::internal::Runtime_DebugGetPropertyDetails(v8::internal::Arguments)', 0x0813a0b0, 0x08181d30],
|
| - ['v8::internal::RegExpMacroAssemblerIrregexp::stack_limit_slack()', 0x08181d30, 0x081ee000]],
|
| + ['v8::internal::Runtime_StringReplaceRegExpWithString(v8::internal::Arguments)', 0x08139150, 0x08139150 + 0xb4b],
|
| + ['v8::internal::Runtime::GetElementOrCharAt(v8::internal::Handle<v8::internal::Object>, unsigned int)', 0x08139ca0, 0x08139ca0 + 0x3f1],
|
| + ['v8::internal::Runtime_DebugGetPropertyDetails(v8::internal::Arguments)', 0x0813a0b0, 0x0813a0b0 + 0x855],
|
| + ['v8::internal::RegExpMacroAssembler::CheckPosition(int, v8::internal::Label*)', 0x0818b220, 0x0818b220 + 0x36]],
|
| shell_syms);
|
|
|
| // libc library
|
| UnixCppEntriesProvider.prototype.loadSymbols = function(libName) {
|
| this.symbols = [[
|
| - '000162a0 T __libc_init_first',
|
| - '0002a5f0 T __isnan',
|
| - '0002a5f0 W isnan',
|
| - '0002aaa0 W scalblnf',
|
| - '0002aaa0 W scalbnf',
|
| - '0011a340 T __libc_thread_freeres',
|
| - '00128860 R _itoa_lower_digits'].join('\n'), ''];
|
| + '000162a0 00000005 T __libc_init_first',
|
| + '0002a5f0 0000002d T __isnan',
|
| + '0002a5f0 0000002d W isnan',
|
| + '0002aaa0 0000000d W scalblnf',
|
| + '0002aaa0 0000000d W scalbnf',
|
| + '0011a340 00000048 T __libc_thread_freeres',
|
| + '00128860 00000024 R _itoa_lower_digits'].join('\n'), ''];
|
| };
|
| var libc_prov = new UnixCppEntriesProvider();
|
| var libc_syms = [];
|
| @@ -110,12 +111,15 @@
|
| function (name, start, end) {
|
| libc_syms.push(Array.prototype.slice.apply(arguments, [0]));
|
| });
|
| - assertEquals(
|
| - [['__libc_init_first', 0xf7c5c000 + 0x000162a0, 0xf7c5c000 + 0x0002a5f0],
|
| - ['isnan', 0xf7c5c000 + 0x0002a5f0, 0xf7c5c000 + 0x0002aaa0],
|
| - ['scalbnf', 0xf7c5c000 + 0x0002aaa0, 0xf7c5c000 + 0x0011a340],
|
| - ['__libc_thread_freeres', 0xf7c5c000 + 0x0011a340, 0xf7da5000]],
|
| - libc_syms);
|
| + var libc_ref_syms = [['__libc_init_first', 0x000162a0, 0x000162a0 + 0x5],
|
| + ['__isnan', 0x0002a5f0, 0x0002a5f0 + 0x2d],
|
| + ['scalblnf', 0x0002aaa0, 0x0002aaa0 + 0xd],
|
| + ['__libc_thread_freeres', 0x0011a340, 0x0011a340 + 0x48]];
|
| + for (var i = 0; i < libc_ref_syms.length; ++i) {
|
| + libc_ref_syms[i][1] += 0xf7c5c000;
|
| + libc_ref_syms[i][2] += 0xf7c5c000;
|
| + }
|
| + assertEquals(libc_ref_syms, libc_syms);
|
|
|
| UnixCppEntriesProvider.prototype.loadSymbols = oldLoadSymbols;
|
| })();
|
| @@ -174,8 +178,8 @@ CppEntriesProviderMock.prototype.parseVmSymbols = function(
|
| ['v8::internal::HashTable<v8::internal::StringDictionaryShape, v8::internal::String*>::FindEntry(v8::internal::String*)', 0x080f8210, 0x080f8800],
|
| ['v8::internal::Runtime_Math_exp(v8::internal::Arguments)', 0x08123b20, 0x08123b80]],
|
| '/lib32/libm-2.7.so':
|
| - [['exp', startAddr + 0x00009e80, startAddr + 0x00009f30],
|
| - ['fegetexcept', startAddr + 0x000061e0, startAddr + 0x00008b10]],
|
| + [['exp', startAddr + 0x00009e80, startAddr + 0x00009e80 + 0xa3],
|
| + ['fegetexcept', startAddr + 0x000061e0, startAddr + 0x000061e0 + 0x15]],
|
| 'ffffe000-fffff000': []};
|
| assertTrue(name in symbols);
|
| var syms = symbols[name];
|
| @@ -191,6 +195,7 @@ function PrintMonitor(outputOrFileName) {
|
| var outputPos = 0;
|
| var diffs = this.diffs = [];
|
| var realOut = this.realOut = [];
|
| + var unexpectedOut = this.unexpectedOut = null;
|
|
|
| this.oldPrint = print;
|
| print = function(str) {
|
| @@ -198,13 +203,15 @@ function PrintMonitor(outputOrFileName) {
|
| for (var i = 0; i < strSplit.length; ++i) {
|
| s = strSplit[i];
|
| realOut.push(s);
|
| - assertTrue(outputPos < expectedOut.length,
|
| - 'unexpected output: "' + s + '"');
|
| - if (expectedOut[outputPos] != s) {
|
| - diffs.push('line ' + outputPos + ': expected <' +
|
| - expectedOut[outputPos] + '> found <' + s + '>\n');
|
| + if (outputPos < expectedOut.length) {
|
| + if (expectedOut[outputPos] != s) {
|
| + diffs.push('line ' + outputPos + ': expected <' +
|
| + expectedOut[outputPos] + '> found <' + s + '>\n');
|
| + }
|
| + outputPos++;
|
| + } else {
|
| + unexpectedOut = true;
|
| }
|
| - outputPos++;
|
| }
|
| };
|
| };
|
| @@ -218,9 +225,10 @@ PrintMonitor.prototype.loadExpectedOutput = function(fileName) {
|
|
|
| PrintMonitor.prototype.finish = function() {
|
| print = this.oldPrint;
|
| - if (this.diffs.length > 0) {
|
| + if (this.diffs.length > 0 || this.unexpectedOut != null) {
|
| print(this.realOut.join('\n'));
|
| assertEquals([], this.diffs);
|
| + assertNull(this.unexpectedOut);
|
| }
|
| };
|
|
|
|
|