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

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

Issue 1318933004: [Tick processor] Add an option to the tick-processor to print the summary. (Closed) Base URL: https://chromium.googlesource.com/v8/v8.git@master
Patch Set: Review comments from Jakob and Michael. Created 5 years, 3 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 | « no previous file | test/mjsunit/tools/tickprocessor-test.only-summary » ('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 352 matching lines...) Expand 10 before | Expand all | Expand 10 after
363 print(this.realOut.join('\n')); 363 print(this.realOut.join('\n'));
364 print("===== expected output: ====="); 364 print("===== expected output: =====");
365 print(this.expectedOut.join('\n')); 365 print(this.expectedOut.join('\n'));
366 assertEquals([], this.diffs); 366 assertEquals([], this.diffs);
367 assertNull(this.unexpectedOut); 367 assertNull(this.unexpectedOut);
368 } 368 }
369 }; 369 };
370 370
371 371
372 function driveTickProcessorTest( 372 function driveTickProcessorTest(
373 separateIc, ignoreUnknown, stateFilter, logInput, refOutput) { 373 separateIc, ignoreUnknown, stateFilter, logInput, refOutput, onlySummary) {
374 // TEST_FILE_NAME must be provided by test runner. 374 // TEST_FILE_NAME must be provided by test runner.
375 assertEquals('string', typeof TEST_FILE_NAME); 375 assertEquals('string', typeof TEST_FILE_NAME);
376 var pathLen = TEST_FILE_NAME.lastIndexOf('/'); 376 var pathLen = TEST_FILE_NAME.lastIndexOf('/');
377 if (pathLen == -1) { 377 if (pathLen == -1) {
378 pathLen = TEST_FILE_NAME.lastIndexOf('\\'); 378 pathLen = TEST_FILE_NAME.lastIndexOf('\\');
379 } 379 }
380 assertTrue(pathLen != -1); 380 assertTrue(pathLen != -1);
381 var testsPath = TEST_FILE_NAME.substr(0, pathLen + 1); 381 var testsPath = TEST_FILE_NAME.substr(0, pathLen + 1);
382 var tp = new TickProcessor(new CppEntriesProviderMock(), 382 var tp = new TickProcessor(new CppEntriesProviderMock(),
383 separateIc, 383 separateIc,
384 TickProcessor.CALL_GRAPH_SIZE, 384 TickProcessor.CALL_GRAPH_SIZE,
385 ignoreUnknown, 385 ignoreUnknown,
386 stateFilter, 386 stateFilter,
387 undefined, 387 undefined,
388 "0", 388 "0",
389 "auto,auto", 389 "auto,auto",
390 false); 390 false,
391 false,
392 false,
393 onlySummary);
391 var pm = new PrintMonitor(testsPath + refOutput); 394 var pm = new PrintMonitor(testsPath + refOutput);
392 tp.processLogFileInTest(testsPath + logInput); 395 tp.processLogFileInTest(testsPath + logInput);
393 tp.printStatistics(); 396 tp.printStatistics();
394 pm.finish(); 397 pm.finish();
395 }; 398 };
396 399
397 400
398 (function testProcessing() { 401 (function testProcessing() {
399 var testData = { 402 var testData = {
400 'Default': [ 403 'Default': [
401 false, false, null, 404 false, false, null,
402 'tickprocessor-test.log', 'tickprocessor-test.default'], 405 'tickprocessor-test.log', 'tickprocessor-test.default', false],
403 'SeparateIc': [ 406 'SeparateIc': [
404 true, false, null, 407 true, false, null,
405 'tickprocessor-test.log', 'tickprocessor-test.separate-ic'], 408 'tickprocessor-test.log', 'tickprocessor-test.separate-ic', false],
406 'IgnoreUnknown': [ 409 'IgnoreUnknown': [
407 false, true, null, 410 false, true, null,
408 'tickprocessor-test.log', 'tickprocessor-test.ignore-unknown'], 411 'tickprocessor-test.log', 'tickprocessor-test.ignore-unknown', false],
409 'GcState': [ 412 'GcState': [
410 false, false, TickProcessor.VmStates.GC, 413 false, false, TickProcessor.VmStates.GC,
411 'tickprocessor-test.log', 'tickprocessor-test.gc-state'], 414 'tickprocessor-test.log', 'tickprocessor-test.gc-state', false],
412 'FunctionInfo': [ 415 'FunctionInfo': [
413 false, false, null, 416 false, false, null,
414 'tickprocessor-test-func-info.log', 'tickprocessor-test.func-info'] 417 'tickprocessor-test-func-info.log', 'tickprocessor-test.func-info',
418 false],
419 'OnlySummary': [
420 false, false, null,
421 'tickprocessor-test.log', 'tickprocessor-test.only-summary', true]
415 }; 422 };
416 for (var testName in testData) { 423 for (var testName in testData) {
417 print('=== testProcessing-' + testName + ' ==='); 424 print('=== testProcessing-' + testName + ' ===');
418 driveTickProcessorTest.apply(null, testData[testName]); 425 driveTickProcessorTest.apply(null, testData[testName]);
419 } 426 }
420 })(); 427 })();
OLDNEW
« no previous file with comments | « no previous file | test/mjsunit/tools/tickprocessor-test.only-summary » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698