OLD | NEW |
1 // Copyright 2013 the V8 project authors. All rights reserved. | 1 // Copyright 2013 the V8 project authors. All rights reserved. |
2 // Use of this source code is governed by a BSD-style license that can be | 2 // Use of this source code is governed by a BSD-style license that can be |
3 // found in the LICENSE file. | 3 // found in the LICENSE file. |
4 | 4 |
5 #include "src/sampler.h" | 5 #include "src/sampler.h" |
6 | 6 |
7 #if V8_OS_POSIX && !V8_OS_CYGWIN | 7 #if V8_OS_POSIX && !V8_OS_CYGWIN |
8 | 8 |
9 #define USE_SIGNALS | 9 #define USE_SIGNALS |
10 | 10 |
(...skipping 166 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
177 bool IsSamePage(byte* ptr1, byte* ptr2) { | 177 bool IsSamePage(byte* ptr1, byte* ptr2) { |
178 const uint32_t kPageSize = 4096; | 178 const uint32_t kPageSize = 4096; |
179 uintptr_t mask = ~static_cast<uintptr_t>(kPageSize - 1); | 179 uintptr_t mask = ~static_cast<uintptr_t>(kPageSize - 1); |
180 return (reinterpret_cast<uintptr_t>(ptr1) & mask) == | 180 return (reinterpret_cast<uintptr_t>(ptr1) & mask) == |
181 (reinterpret_cast<uintptr_t>(ptr2) & mask); | 181 (reinterpret_cast<uintptr_t>(ptr2) & mask); |
182 } | 182 } |
183 | 183 |
184 | 184 |
185 // Check if the code at specified address could potentially be a | 185 // Check if the code at specified address could potentially be a |
186 // frame setup code. | 186 // frame setup code. |
187 bool IsNoFrameRegion(Address address) { | 187 DISABLE_ASAN bool IsNoFrameRegion(Address address) { |
188 struct Pattern { | 188 struct Pattern { |
189 int bytes_count; | 189 int bytes_count; |
190 byte bytes[8]; | 190 byte bytes[8]; |
191 int offsets[4]; | 191 int offsets[4]; |
192 }; | 192 }; |
193 byte* pc = reinterpret_cast<byte*>(address); | 193 byte* pc = reinterpret_cast<byte*>(address); |
194 static Pattern patterns[] = { | 194 static Pattern patterns[] = { |
195 #if V8_HOST_ARCH_IA32 | 195 #if V8_HOST_ARCH_IA32 |
196 // push %ebp | 196 // push %ebp |
197 // mov %esp,%ebp | 197 // mov %esp,%ebp |
(...skipping 636 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
834 SampleStack(state); | 834 SampleStack(state); |
835 } | 835 } |
836 ResumeThread(profiled_thread); | 836 ResumeThread(profiled_thread); |
837 } | 837 } |
838 | 838 |
839 #endif // USE_SIGNALS | 839 #endif // USE_SIGNALS |
840 | 840 |
841 | 841 |
842 } // namespace internal | 842 } // namespace internal |
843 } // namespace v8 | 843 } // namespace v8 |
OLD | NEW |