| OLD | NEW |
| 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 282 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 293 }); | 293 }); |
| 294 assertEquals( | 294 assertEquals( |
| 295 [], | 295 [], |
| 296 dll_exe_syms, '.dll with .exe symbols'); | 296 dll_exe_syms, '.dll with .exe symbols'); |
| 297 | 297 |
| 298 read = oldRead; | 298 read = oldRead; |
| 299 })(); | 299 })(); |
| 300 | 300 |
| 301 | 301 |
| 302 function CppEntriesProviderMock() { | 302 function CppEntriesProviderMock() { |
| 303 }; | 303 } |
| 304 | 304 |
| 305 | 305 |
| 306 CppEntriesProviderMock.prototype.parseVmSymbols = function( | 306 CppEntriesProviderMock.prototype.parseVmSymbols = function( |
| 307 name, startAddr, endAddr, symbolAdder) { | 307 name, startAddr, endAddr, symbolAdder) { |
| 308 var symbols = { | 308 var symbols = { |
| 309 'shell': | 309 'shell': |
| 310 [['v8::internal::JSObject::LocalLookupRealNamedProperty(v8::internal::St
ring*, v8::internal::LookupResult*)', 0x080f8800, 0x080f8d90], | 310 [['v8::internal::JSObject::LocalLookupRealNamedProperty(v8::internal::St
ring*, v8::internal::LookupResult*)', 0x080f8800, 0x080f8d90], |
| 311 ['v8::internal::HashTable<v8::internal::StringDictionaryShape, v8::inte
rnal::String*>::FindEntry(v8::internal::String*)', 0x080f8210, 0x080f8800], | 311 ['v8::internal::HashTable<v8::internal::StringDictionaryShape, v8::inte
rnal::String*>::FindEntry(v8::internal::String*)', 0x080f8210, 0x080f8800], |
| 312 ['v8::internal::Runtime_Math_exp(v8::internal::Arguments)', 0x08123b20,
0x08123b80]], | 312 ['v8::internal::Runtime_Math_exp(v8::internal::Arguments)', 0x08123b20,
0x08123b80]], |
| 313 '/lib32/libm-2.7.so': | 313 '/lib32/libm-2.7.so': |
| (...skipping 26 matching lines...) Expand all Loading... |
| 340 if (expectedOut[outputPos] != s) { | 340 if (expectedOut[outputPos] != s) { |
| 341 diffs.push('line ' + outputPos + ': expected <' + | 341 diffs.push('line ' + outputPos + ': expected <' + |
| 342 expectedOut[outputPos] + '> found <' + s + '>\n'); | 342 expectedOut[outputPos] + '> found <' + s + '>\n'); |
| 343 } | 343 } |
| 344 outputPos++; | 344 outputPos++; |
| 345 } else { | 345 } else { |
| 346 unexpectedOut = true; | 346 unexpectedOut = true; |
| 347 } | 347 } |
| 348 } | 348 } |
| 349 }; | 349 }; |
| 350 }; | 350 } |
| 351 | 351 |
| 352 | 352 |
| 353 PrintMonitor.prototype.loadExpectedOutput = function(fileName) { | 353 PrintMonitor.prototype.loadExpectedOutput = function(fileName) { |
| 354 var output = readFile(fileName); | 354 var output = readFile(fileName); |
| 355 return output.split('\n'); | 355 return output.split('\n'); |
| 356 }; | 356 }; |
| 357 | 357 |
| 358 | 358 |
| 359 PrintMonitor.prototype.finish = function() { | 359 PrintMonitor.prototype.finish = function() { |
| 360 print = this.oldPrint; | 360 print = this.oldPrint; |
| (...skipping 14 matching lines...) Expand all Loading... |
| 375 pathLen = TEST_FILE_NAME.lastIndexOf('\\'); | 375 pathLen = TEST_FILE_NAME.lastIndexOf('\\'); |
| 376 } | 376 } |
| 377 assertTrue(pathLen != -1); | 377 assertTrue(pathLen != -1); |
| 378 var testsPath = TEST_FILE_NAME.substr(0, pathLen + 1); | 378 var testsPath = TEST_FILE_NAME.substr(0, pathLen + 1); |
| 379 var tp = new TickProcessor( | 379 var tp = new TickProcessor( |
| 380 new CppEntriesProviderMock(), separateIc, ignoreUnknown, stateFilter); | 380 new CppEntriesProviderMock(), separateIc, ignoreUnknown, stateFilter); |
| 381 var pm = new PrintMonitor(testsPath + refOutput); | 381 var pm = new PrintMonitor(testsPath + refOutput); |
| 382 tp.processLogFileInTest(testsPath + logInput); | 382 tp.processLogFileInTest(testsPath + logInput); |
| 383 tp.printStatistics(); | 383 tp.printStatistics(); |
| 384 pm.finish(); | 384 pm.finish(); |
| 385 }; | 385 } |
| 386 | 386 |
| 387 | 387 |
| 388 (function testProcessing() { | 388 (function testProcessing() { |
| 389 var testData = { | 389 var testData = { |
| 390 'Default': [ | 390 'Default': [ |
| 391 false, false, null, | 391 false, false, null, |
| 392 'tickprocessor-test.log', 'tickprocessor-test.default'], | 392 'tickprocessor-test.log', 'tickprocessor-test.default'], |
| 393 'SeparateIc': [ | 393 'SeparateIc': [ |
| 394 true, false, null, | 394 true, false, null, |
| 395 'tickprocessor-test.log', 'tickprocessor-test.separate-ic'], | 395 'tickprocessor-test.log', 'tickprocessor-test.separate-ic'], |
| 396 'IgnoreUnknown': [ | 396 'IgnoreUnknown': [ |
| 397 false, true, null, | 397 false, true, null, |
| 398 'tickprocessor-test.log', 'tickprocessor-test.ignore-unknown'], | 398 'tickprocessor-test.log', 'tickprocessor-test.ignore-unknown'], |
| 399 'GcState': [ | 399 'GcState': [ |
| 400 false, false, TickProcessor.VmStates.GC, | 400 false, false, TickProcessor.VmStates.GC, |
| 401 'tickprocessor-test.log', 'tickprocessor-test.gc-state'], | 401 'tickprocessor-test.log', 'tickprocessor-test.gc-state'], |
| 402 'FunctionInfo': [ | 402 'FunctionInfo': [ |
| 403 false, false, null, | 403 false, false, null, |
| 404 'tickprocessor-test-func-info.log', 'tickprocessor-test.func-info'] | 404 'tickprocessor-test-func-info.log', 'tickprocessor-test.func-info'] |
| 405 }; | 405 }; |
| 406 for (var testName in testData) { | 406 for (var testName in testData) { |
| 407 print('=== testProcessing-' + testName + ' ==='); | 407 print('=== testProcessing-' + testName + ' ==='); |
| 408 driveTickProcessorTest.apply(null, testData[testName]); | 408 driveTickProcessorTest.apply(null, testData[testName]); |
| 409 } | 409 } |
| 410 })(); | 410 })(); |
| OLD | NEW |