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

Unified Diff: src/sampler.cc

Issue 18023019: Fix Mac compilation after r15484 (Closed) Base URL: https://v8.googlecode.com/svn/branches/bleeding_edge
Patch Set: Created 7 years, 6 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 side-by-side diff with in-line comments
Download patch
« no previous file with comments | « no previous file | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: src/sampler.cc
diff --git a/src/sampler.cc b/src/sampler.cc
index 5fee225b39290870a5dd2ed18b59c2c5bbf21ed0..982f2528079badb4faf0dbb3b7118e02161fa2e1 100644
--- a/src/sampler.cc
+++ b/src/sampler.cc
@@ -496,10 +496,10 @@ class SamplerThread : public Thread {
void SampleContext(Sampler* sampler) {
thread_act_t profiled_thread = sampler->platform_data()->profiled_thread();
- Isolate* isolate = sampler->isolate();
#if defined(USE_SIMULATOR)
SimulatorHelper helper;
+ Isolate* isolate = sampler->isolate();
if (!helper.Init(sampler, isolate)) return;
#endif
@@ -507,7 +507,7 @@ class SamplerThread : public Thread {
#if V8_HOST_ARCH_X64
thread_state_flavor_t flavor = x86_THREAD_STATE64;
- x86_thread_state64_t state;
+ x86_thread_state64_t thread_state;
mach_msg_type_number_t count = x86_THREAD_STATE64_COUNT;
#if __DARWIN_UNIX03
#define REGISTER_FIELD(name) __r ## name
@@ -516,7 +516,7 @@ class SamplerThread : public Thread {
#endif // __DARWIN_UNIX03
#elif V8_HOST_ARCH_IA32
thread_state_flavor_t flavor = i386_THREAD_STATE;
- i386_thread_state_t state;
+ i386_thread_state_t thread_state;
mach_msg_type_number_t count = i386_THREAD_STATE_COUNT;
#if __DARWIN_UNIX03
#define REGISTER_FIELD(name) __e ## name
@@ -529,15 +529,15 @@ class SamplerThread : public Thread {
if (thread_get_state(profiled_thread,
flavor,
- reinterpret_cast<natural_t*>(&state),
+ reinterpret_cast<natural_t*>(&thread_state),
&count) == KERN_SUCCESS) {
RegisterState state;
#if defined(USE_SIMULATOR)
helper.FillRegisters(&state);
#else
- state.pc = reinterpret_cast<Address>(state.REGISTER_FIELD(ip));
- state.sp = reinterpret_cast<Address>(state.REGISTER_FIELD(sp));
- state.fp = reinterpret_cast<Address>(state.REGISTER_FIELD(bp));
+ state.pc = reinterpret_cast<Address>(thread_state.REGISTER_FIELD(ip));
+ state.sp = reinterpret_cast<Address>(thread_state.REGISTER_FIELD(sp));
+ state.fp = reinterpret_cast<Address>(thread_state.REGISTER_FIELD(bp));
#endif // USE_SIMULATOR
#undef REGISTER_FIELD
sampler->SampleStack(state);
« no previous file with comments | « no previous file | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698