| 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 358 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 369 function driveTickProcessorTest( | 369 function driveTickProcessorTest( |
| 370 separateIc, ignoreUnknown, stateFilter, logInput, refOutput) { | 370 separateIc, ignoreUnknown, stateFilter, logInput, refOutput) { |
| 371 // TEST_FILE_NAME must be provided by test runner. | 371 // TEST_FILE_NAME must be provided by test runner. |
| 372 assertEquals('string', typeof TEST_FILE_NAME); | 372 assertEquals('string', typeof TEST_FILE_NAME); |
| 373 var pathLen = TEST_FILE_NAME.lastIndexOf('/'); | 373 var pathLen = TEST_FILE_NAME.lastIndexOf('/'); |
| 374 if (pathLen == -1) { | 374 if (pathLen == -1) { |
| 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(new CppEntriesProviderMock(), |
| 380 new CppEntriesProviderMock(), separateIc, ignoreUnknown, stateFilter); | 380 separateIc, |
| 381 TickProcessor.CALL_GRAPH_SIZE, |
| 382 ignoreUnknown, |
| 383 stateFilter); |
| 381 var pm = new PrintMonitor(testsPath + refOutput); | 384 var pm = new PrintMonitor(testsPath + refOutput); |
| 382 tp.processLogFileInTest(testsPath + logInput); | 385 tp.processLogFileInTest(testsPath + logInput); |
| 383 tp.printStatistics(); | 386 tp.printStatistics(); |
| 384 pm.finish(); | 387 pm.finish(); |
| 385 }; | 388 }; |
| 386 | 389 |
| 387 | 390 |
| 388 (function testProcessing() { | 391 (function testProcessing() { |
| 389 var testData = { | 392 var testData = { |
| 390 'Default': [ | 393 'Default': [ |
| (...skipping 10 matching lines...) Expand all Loading... |
| 401 'tickprocessor-test.log', 'tickprocessor-test.gc-state'], | 404 'tickprocessor-test.log', 'tickprocessor-test.gc-state'], |
| 402 'FunctionInfo': [ | 405 'FunctionInfo': [ |
| 403 false, false, null, | 406 false, false, null, |
| 404 'tickprocessor-test-func-info.log', 'tickprocessor-test.func-info'] | 407 'tickprocessor-test-func-info.log', 'tickprocessor-test.func-info'] |
| 405 }; | 408 }; |
| 406 for (var testName in testData) { | 409 for (var testName in testData) { |
| 407 print('=== testProcessing-' + testName + ' ==='); | 410 print('=== testProcessing-' + testName + ' ==='); |
| 408 driveTickProcessorTest.apply(null, testData[testName]); | 411 driveTickProcessorTest.apply(null, testData[testName]); |
| 409 } | 412 } |
| 410 })(); | 413 })(); |
| OLD | NEW |