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

Side by Side Diff: src/libsampler/sampler.cc

Issue 2251603004: Fix compilation on BSD platforms (Closed) Base URL: https://chromium.googlesource.com/v8/v8.git@master
Patch Set: Created 4 years, 4 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 unified diff | Download patch
« no previous file with comments | « no previous file | no next file » | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 // Copyright 2016 the V8 project authors. All rights reserved. 1 // Copyright 2016 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/libsampler/sampler.h" 5 #include "src/libsampler/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 175 matching lines...) Expand 10 before | Expand all | Expand 10 after
186 bool is_success_; 186 bool is_success_;
187 }; 187 };
188 188
189 // Returns key for hash map. 189 // Returns key for hash map.
190 void* ThreadKey(pthread_t thread_id) { 190 void* ThreadKey(pthread_t thread_id) {
191 return reinterpret_cast<void*>(thread_id); 191 return reinterpret_cast<void*>(thread_id);
192 } 192 }
193 193
194 // Returns hash value for hash map. 194 // Returns hash value for hash map.
195 uint32_t ThreadHash(pthread_t thread_id) { 195 uint32_t ThreadHash(pthread_t thread_id) {
196 #if V8_OS_MACOSX 196 #if V8_OS_BSD
197 return static_cast<uint32_t>(reinterpret_cast<intptr_t>(thread_id)); 197 return static_cast<uint32_t>(reinterpret_cast<intptr_t>(thread_id));
198 #else 198 #else
199 return static_cast<uint32_t>(thread_id); 199 return static_cast<uint32_t>(thread_id);
200 #endif 200 #endif
201 } 201 }
202 202
203 #endif // USE_SIGNALS 203 #endif // USE_SIGNALS
204 204
205 } // namespace 205 } // namespace
206 206
(...skipping 447 matching lines...) Expand 10 before | Expand all | Expand 10 after
654 #endif 654 #endif
655 SampleStack(state); 655 SampleStack(state);
656 } 656 }
657 ResumeThread(profiled_thread); 657 ResumeThread(profiled_thread);
658 } 658 }
659 659
660 #endif // USE_SIGNALS 660 #endif // USE_SIGNALS
661 661
662 } // namespace sampler 662 } // namespace sampler
663 } // namespace v8 663 } // namespace v8
OLDNEW
« 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