| 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 361 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 372 | 372 |
| 373 CppEntriesProvider.prototype.parseVmSymbols = function( | 373 CppEntriesProvider.prototype.parseVmSymbols = function( |
| 374 libName, libStart, libEnd, processorFunc) { | 374 libName, libStart, libEnd, processorFunc) { |
| 375 this.loadSymbols(libName); | 375 this.loadSymbols(libName); |
| 376 | 376 |
| 377 var prevEntry; | 377 var prevEntry; |
| 378 | 378 |
| 379 function addPrevEntry(end) { | 379 function addPrevEntry(end) { |
| 380 // Several functions can be mapped onto the same address. To avoid | 380 // Several functions can be mapped onto the same address. To avoid |
| 381 // creating zero-sized entries, skip such duplicates. | 381 // creating zero-sized entries, skip such duplicates. |
| 382 if (prevEntry && prevEntry.start < end) { | 382 // Also double-check that function belongs to the library address space. |
| 383 if (prevEntry && prevEntry.start < end && |
| 384 prevEntry.start >= libStart && end <= libEnd) { |
| 383 processorFunc(prevEntry.name, prevEntry.start, end); | 385 processorFunc(prevEntry.name, prevEntry.start, end); |
| 384 } | 386 } |
| 385 } | 387 } |
| 386 | 388 |
| 387 while (true) { | 389 while (true) { |
| 388 var funcInfo = this.parseNextLine(); | 390 var funcInfo = this.parseNextLine(); |
| 389 if (funcInfo === null) { | 391 if (funcInfo === null) { |
| 390 continue; | 392 continue; |
| 391 } else if (funcInfo === false) { | 393 } else if (funcInfo === false) { |
| 392 break; | 394 break; |
| (...skipping 199 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 592 | 594 |
| 593 var params = processArguments(arguments); | 595 var params = processArguments(arguments); |
| 594 var tickProcessor = new TickProcessor( | 596 var tickProcessor = new TickProcessor( |
| 595 params.platform == 'unix' ? new UnixCppEntriesProvider() : | 597 params.platform == 'unix' ? new UnixCppEntriesProvider() : |
| 596 new WindowsCppEntriesProvider(), | 598 new WindowsCppEntriesProvider(), |
| 597 params.separateIc, | 599 params.separateIc, |
| 598 params.ignoreUnknown, | 600 params.ignoreUnknown, |
| 599 params.stateFilter); | 601 params.stateFilter); |
| 600 tickProcessor.processLogFile(params.logFileName); | 602 tickProcessor.processLogFile(params.logFileName); |
| 601 tickProcessor.printStatistics(); | 603 tickProcessor.printStatistics(); |
| OLD | NEW |