| 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 113 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 124 UnixCppEntriesProvider.prototype.loadSymbols = oldLoadSymbols; | 124 UnixCppEntriesProvider.prototype.loadSymbols = oldLoadSymbols; |
| 125 })(); | 125 })(); |
| 126 | 126 |
| 127 | 127 |
| 128 (function testMacCppEntriesProvider() { | 128 (function testMacCppEntriesProvider() { |
| 129 var oldLoadSymbols = MacCppEntriesProvider.prototype.loadSymbols; | 129 var oldLoadSymbols = MacCppEntriesProvider.prototype.loadSymbols; |
| 130 | 130 |
| 131 // shell executable | 131 // shell executable |
| 132 MacCppEntriesProvider.prototype.loadSymbols = function(libName) { | 132 MacCppEntriesProvider.prototype.loadSymbols = function(libName) { |
| 133 this.symbols = [[ | 133 this.symbols = [[ |
| 134 ' U operator delete[]', | 134 ' operator delete[]', |
| 135 '00001000 A __mh_execute_header', | 135 '00001000 __mh_execute_header', |
| 136 '00001b00 T start', | 136 '00001b00 start', |
| 137 '00001b40 t dyld_stub_binding_helper', | 137 '00001b40 dyld_stub_binding_helper', |
| 138 '0011b710 T v8::internal::RegExpMacroAssembler::CheckPosition', | 138 '0011b710 v8::internal::RegExpMacroAssembler::CheckPosition', |
| 139 '00134250 t v8::internal::Runtime_StringReplaceRegExpWithString', | 139 '00134250 v8::internal::Runtime_StringReplaceRegExpWithString', |
| 140 '00137220 T v8::internal::Runtime::GetElementOrCharAt', | 140 '00137220 v8::internal::Runtime::GetElementOrCharAt', |
| 141 '00137400 t v8::internal::Runtime_DebugGetPropertyDetails', | 141 '00137400 v8::internal::Runtime_DebugGetPropertyDetails\n' |
| 142 '001c1a80 b _private_mem\n' | |
| 143 ].join('\n'), '']; | 142 ].join('\n'), '']; |
| 144 }; | 143 }; |
| 145 | 144 |
| 146 var shell_prov = new MacCppEntriesProvider(); | 145 var shell_prov = new MacCppEntriesProvider(); |
| 147 var shell_syms = []; | 146 var shell_syms = []; |
| 148 shell_prov.parseVmSymbols('shell', 0x00001c00, 0x00163256, 0x100, | 147 shell_prov.parseVmSymbols('shell', 0x00001c00, 0x00163256, 0x100, |
| 149 function (name, start, end) { | 148 function (name, start, end) { |
| 150 shell_syms.push(Array.prototype.slice.apply(arguments, [0])); | 149 shell_syms.push(Array.prototype.slice.apply(arguments, [0])); |
| 151 }); | 150 }); |
| 152 assertEquals( | 151 assertEquals( |
| 153 [['start', 0x00001c00, 0x00001c40], | 152 [['start', 0x00001c00, 0x00001c40], |
| 154 ['dyld_stub_binding_helper', 0x00001c40, 0x0011b810], | 153 ['dyld_stub_binding_helper', 0x00001c40, 0x0011b810], |
| 155 ['v8::internal::RegExpMacroAssembler::CheckPosition', 0x0011b810, 0x00134
350], | 154 ['v8::internal::RegExpMacroAssembler::CheckPosition', 0x0011b810, 0x00134
350], |
| 156 ['v8::internal::Runtime_StringReplaceRegExpWithString', 0x00134350, 0x001
37320], | 155 ['v8::internal::Runtime_StringReplaceRegExpWithString', 0x00134350, 0x001
37320], |
| 157 ['v8::internal::Runtime::GetElementOrCharAt', 0x00137320, 0x00137500], | 156 ['v8::internal::Runtime::GetElementOrCharAt', 0x00137320, 0x00137500], |
| 158 ['v8::internal::Runtime_DebugGetPropertyDetails', 0x00137500, 0x00163256]
], | 157 ['v8::internal::Runtime_DebugGetPropertyDetails', 0x00137500, 0x00163256]
], |
| 159 shell_syms); | 158 shell_syms); |
| 160 | 159 |
| 161 // stdc++ library | 160 // stdc++ library |
| 162 MacCppEntriesProvider.prototype.loadSymbols = function(libName) { | 161 MacCppEntriesProvider.prototype.loadSymbols = function(libName) { |
| 163 this.symbols = [[ | 162 this.symbols = [[ |
| 164 '0000107a T __gnu_cxx::balloc::__mini_vector<std::pair<__gnu_cxx::bitmap
_allocator<char>::_Alloc_block*, __gnu_cxx::bitmap_allocator<char>::_Alloc_block
*> >::__mini_vector', | 163 '0000107a __gnu_cxx::balloc::__mini_vector<std::pair<__gnu_cxx::bitmap_a
llocator<char>::_Alloc_block*, __gnu_cxx::bitmap_allocator<char>::_Alloc_block*>
>::__mini_vector', |
| 165 '0002c410 T std::basic_streambuf<char, std::char_traits<char> >::pubseek
off', | 164 '0002c410 std::basic_streambuf<char, std::char_traits<char> >::pubseekof
f', |
| 166 '0002c488 T std::basic_streambuf<char, std::char_traits<char> >::pubseek
pos', | 165 '0002c488 std::basic_streambuf<char, std::char_traits<char> >::pubseekpo
s', |
| 167 '000466aa T ___cxa_pure_virtual\n'].join('\n'), '']; | 166 '000466aa ___cxa_pure_virtual\n'].join('\n'), '']; |
| 168 }; | 167 }; |
| 169 var stdc_prov = new MacCppEntriesProvider(); | 168 var stdc_prov = new MacCppEntriesProvider(); |
| 170 var stdc_syms = []; | 169 var stdc_syms = []; |
| 171 stdc_prov.parseVmSymbols('stdc++', 0x95728fb4, 0x95770005, 0, | 170 stdc_prov.parseVmSymbols('stdc++', 0x95728fb4, 0x95770005, 0, |
| 172 function (name, start, end) { | 171 function (name, start, end) { |
| 173 stdc_syms.push(Array.prototype.slice.apply(arguments, [0])); | 172 stdc_syms.push(Array.prototype.slice.apply(arguments, [0])); |
| 174 }); | 173 }); |
| 175 var stdc_ref_syms = [['__gnu_cxx::balloc::__mini_vector<std::pair<__gnu_cxx::b
itmap_allocator<char>::_Alloc_block*, __gnu_cxx::bitmap_allocator<char>::_Alloc_
block*> >::__mini_vector', 0x0000107a, 0x0002c410], | 174 var stdc_ref_syms = [['__gnu_cxx::balloc::__mini_vector<std::pair<__gnu_cxx::b
itmap_allocator<char>::_Alloc_block*, __gnu_cxx::bitmap_allocator<char>::_Alloc_
block*> >::__mini_vector', 0x0000107a, 0x0002c410], |
| 176 ['std::basic_streambuf<char, std::char_traits<char> >::pubseekoff', 0x000
2c410, 0x0002c488], | 175 ['std::basic_streambuf<char, std::char_traits<char> >::pubseekoff', 0x000
2c410, 0x0002c488], |
| 177 ['std::basic_streambuf<char, std::char_traits<char> >::pubseekpos', 0x000
2c488, 0x000466aa], | 176 ['std::basic_streambuf<char, std::char_traits<char> >::pubseekpos', 0x000
2c488, 0x000466aa], |
| (...skipping 239 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 417 false], | 416 false], |
| 418 'OnlySummary': [ | 417 'OnlySummary': [ |
| 419 false, false, null, | 418 false, false, null, |
| 420 'tickprocessor-test.log', 'tickprocessor-test.only-summary', true] | 419 'tickprocessor-test.log', 'tickprocessor-test.only-summary', true] |
| 421 }; | 420 }; |
| 422 for (var testName in testData) { | 421 for (var testName in testData) { |
| 423 print('=== testProcessing-' + testName + ' ==='); | 422 print('=== testProcessing-' + testName + ' ==='); |
| 424 driveTickProcessorTest.apply(null, testData[testName]); | 423 driveTickProcessorTest.apply(null, testData[testName]); |
| 425 } | 424 } |
| 426 })(); | 425 })(); |
| OLD | NEW |