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

Side by Side Diff: src/log.cc

Issue 6794019: Simplify isolates access during stack iteration (WAS: Move SafeStackFrameIterator::active_count_...) (Closed) Base URL: https://v8.googlecode.com/svn/branches/bleeding_edge
Patch Set: A couple more changes Created 9 years, 8 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 | Annotate | Revision Log
OLDNEW
1 // Copyright 2009 the V8 project authors. All rights reserved. 1 // Copyright 2009 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 173 matching lines...) Expand 10 before | Expand all | Expand 10 after
184 sample->frames_count = i; 184 sample->frames_count = i;
185 } 185 }
186 186
187 187
188 // 188 //
189 // Ticker used to provide ticks to the profiler and the sliding state 189 // Ticker used to provide ticks to the profiler and the sliding state
190 // window. 190 // window.
191 // 191 //
192 class Ticker: public Sampler { 192 class Ticker: public Sampler {
193 public: 193 public:
194 explicit Ticker(Isolate* isolate, int interval): 194 Ticker(Isolate* isolate, int interval):
195 Sampler(isolate, interval), 195 Sampler(isolate, interval),
196 window_(NULL), 196 window_(NULL),
197 profiler_(NULL) {} 197 profiler_(NULL) {}
198 198
199 ~Ticker() { if (IsActive()) Stop(); } 199 ~Ticker() { if (IsActive()) Stop(); }
200 200
201 virtual void Tick(TickSample* sample) { 201 virtual void Tick(TickSample* sample) {
202 if (profiler_) profiler_->Insert(sample); 202 if (profiler_) profiler_->Insert(sample);
203 if (window_) window_->AddState(sample->state); 203 if (window_) window_->AddState(sample->state);
204 } 204 }
(...skipping 1452 matching lines...) Expand 10 before | Expand all | Expand 10 after
1657 void SamplerRegistry::RemoveActiveSampler(Sampler* sampler) { 1657 void SamplerRegistry::RemoveActiveSampler(Sampler* sampler) {
1658 ASSERT(sampler->IsActive()); 1658 ASSERT(sampler->IsActive());
1659 ScopedLock lock(mutex_); 1659 ScopedLock lock(mutex_);
1660 ASSERT(active_samplers_ != NULL); 1660 ASSERT(active_samplers_ != NULL);
1661 bool removed = active_samplers_->RemoveElement(sampler); 1661 bool removed = active_samplers_->RemoveElement(sampler);
1662 ASSERT(removed); 1662 ASSERT(removed);
1663 USE(removed); 1663 USE(removed);
1664 } 1664 }
1665 1665
1666 } } // namespace v8::internal 1666 } } // namespace v8::internal
OLDNEW
« src/frames-inl.h ('K') | « src/liveedit.cc ('k') | src/mark-compact.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698