| OLD | NEW |
| 1 // Copyright 2011 the V8 project authors. All rights reserved. | 1 // Copyright 2011 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 1281 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1292 NULL); // TranslateAddress | 1292 NULL); // TranslateAddress |
| 1293 if (!ok) break; | 1293 if (!ok) break; |
| 1294 | 1294 |
| 1295 // Store the address. | 1295 // Store the address. |
| 1296 ASSERT((stack_frame.AddrPC.Offset >> 32) == 0); // 32-bit address. | 1296 ASSERT((stack_frame.AddrPC.Offset >> 32) == 0); // 32-bit address. |
| 1297 frames[frames_count].address = | 1297 frames[frames_count].address = |
| 1298 reinterpret_cast<void*>(stack_frame.AddrPC.Offset); | 1298 reinterpret_cast<void*>(stack_frame.AddrPC.Offset); |
| 1299 | 1299 |
| 1300 // Try to locate a symbol for this frame. | 1300 // Try to locate a symbol for this frame. |
| 1301 DWORD64 symbol_displacement; | 1301 DWORD64 symbol_displacement; |
| 1302 SmartPointer<IMAGEHLP_SYMBOL64> symbol( | 1302 SmartArrayPointer<IMAGEHLP_SYMBOL64> symbol( |
| 1303 NewArray<IMAGEHLP_SYMBOL64>(kStackWalkMaxNameLen)); | 1303 NewArray<IMAGEHLP_SYMBOL64>(kStackWalkMaxNameLen)); |
| 1304 if (symbol.is_empty()) return kStackWalkError; // Out of memory. | 1304 if (symbol.is_empty()) return kStackWalkError; // Out of memory. |
| 1305 memset(*symbol, 0, sizeof(IMAGEHLP_SYMBOL64) + kStackWalkMaxNameLen); | 1305 memset(*symbol, 0, sizeof(IMAGEHLP_SYMBOL64) + kStackWalkMaxNameLen); |
| 1306 (*symbol)->SizeOfStruct = sizeof(IMAGEHLP_SYMBOL64); | 1306 (*symbol)->SizeOfStruct = sizeof(IMAGEHLP_SYMBOL64); |
| 1307 (*symbol)->MaxNameLength = kStackWalkMaxNameLen; | 1307 (*symbol)->MaxNameLength = kStackWalkMaxNameLen; |
| 1308 ok = _SymGetSymFromAddr64(process_handle, // hProcess | 1308 ok = _SymGetSymFromAddr64(process_handle, // hProcess |
| 1309 stack_frame.AddrPC.Offset, // Address | 1309 stack_frame.AddrPC.Offset, // Address |
| 1310 &symbol_displacement, // Displacement | 1310 &symbol_displacement, // Displacement |
| 1311 *symbol); // Symbol | 1311 *symbol); // Symbol |
| 1312 if (ok) { | 1312 if (ok) { |
| (...skipping 657 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1970 | 1970 |
| 1971 | 1971 |
| 1972 void Sampler::Stop() { | 1972 void Sampler::Stop() { |
| 1973 ASSERT(IsActive()); | 1973 ASSERT(IsActive()); |
| 1974 SamplerThread::RemoveActiveSampler(this); | 1974 SamplerThread::RemoveActiveSampler(this); |
| 1975 SetActive(false); | 1975 SetActive(false); |
| 1976 } | 1976 } |
| 1977 | 1977 |
| 1978 | 1978 |
| 1979 } } // namespace v8::internal | 1979 } } // namespace v8::internal |
| OLD | NEW |