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

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

Issue 2493553002: Fix -Wsign-compare warnings in parser, scanner, regexp, runtime. (Closed)
Patch Set: Created 4 years, 1 month 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 | « src/builtins/builtins-string.cc ('k') | src/parsing/scanner.h » ('j') | 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 263 matching lines...) Expand 10 before | Expand all | Expand 10 after
274 #if defined(USE_SIGNALS) 274 #if defined(USE_SIGNALS)
275 void DoSample(const v8::RegisterState& state) { 275 void DoSample(const v8::RegisterState& state) {
276 AtomicGuard atomic_guard(&SamplerManager::samplers_access_counter_, false); 276 AtomicGuard atomic_guard(&SamplerManager::samplers_access_counter_, false);
277 if (!atomic_guard.is_success()) return; 277 if (!atomic_guard.is_success()) return;
278 pthread_t thread_id = pthread_self(); 278 pthread_t thread_id = pthread_self();
279 base::HashMap::Entry* entry = 279 base::HashMap::Entry* entry =
280 sampler_map_.Lookup(ThreadKey(thread_id), ThreadHash(thread_id)); 280 sampler_map_.Lookup(ThreadKey(thread_id), ThreadHash(thread_id));
281 if (!entry) return; 281 if (!entry) return;
282 SamplerList& samplers = *static_cast<SamplerList*>(entry->value); 282 SamplerList& samplers = *static_cast<SamplerList*>(entry->value);
283 283
284 for (int i = 0; i < samplers.size(); ++i) { 284 for (size_t i = 0; i < samplers.size(); ++i) {
285 Sampler* sampler = samplers[i]; 285 Sampler* sampler = samplers[i];
286 Isolate* isolate = sampler->isolate(); 286 Isolate* isolate = sampler->isolate();
287 // We require a fully initialized and entered isolate. 287 // We require a fully initialized and entered isolate.
288 if (isolate == nullptr || !isolate->IsInUse()) continue; 288 if (isolate == nullptr || !isolate->IsInUse()) continue;
289 if (v8::Locker::IsActive() && !Locker::IsLocked(isolate)) continue; 289 if (v8::Locker::IsActive() && !Locker::IsLocked(isolate)) continue;
290 sampler->SampleStack(state); 290 sampler->SampleStack(state);
291 } 291 }
292 } 292 }
293 #endif 293 #endif
294 294
(...skipping 359 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 | « src/builtins/builtins-string.cc ('k') | src/parsing/scanner.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698