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

Side by Side Diff: src/log.cc

Issue 13852005: Move *BSD and Solaris Sampler implementations into sampler.cc (Closed) Base URL: https://v8.googlecode.com/svn/branches/bleeding_edge
Patch Set: Removed class TickSample forward declaration Created 7 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
« no previous file with comments | « no previous file | src/platform.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 2011 the V8 project authors. All rights reserved. 1 // Copyright 2011 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 152 matching lines...) Expand 10 before | Expand all | Expand 10 after
163 IncreaseProfilingDepth(); 163 IncreaseProfilingDepth();
164 if (!FLAG_prof_lazy && !IsActive()) Start(); 164 if (!FLAG_prof_lazy && !IsActive()) Start();
165 } 165 }
166 166
167 void ClearProfiler() { 167 void ClearProfiler() {
168 DecreaseProfilingDepth(); 168 DecreaseProfilingDepth();
169 profiler_ = NULL; 169 profiler_ = NULL;
170 if (IsActive()) Stop(); 170 if (IsActive()) Stop();
171 } 171 }
172 172
173 protected:
174 virtual void DoSampleStack(TickSample* sample) {
175 StackTracer::Trace(isolate(), sample);
176 }
177
178 private: 173 private:
179 Profiler* profiler_; 174 Profiler* profiler_;
180 }; 175 };
181 176
182 177
183 // 178 //
184 // Profiler implementation. 179 // Profiler implementation.
185 // 180 //
186 Profiler::Profiler(Isolate* isolate) 181 Profiler::Profiler(Isolate* isolate)
187 : Thread("v8:Profiler"), 182 : Thread("v8:Profiler"),
(...skipping 1801 matching lines...) Expand 10 before | Expand all | Expand 10 after
1989 void SamplerRegistry::RemoveActiveSampler(Sampler* sampler) { 1984 void SamplerRegistry::RemoveActiveSampler(Sampler* sampler) {
1990 ASSERT(sampler->IsActive()); 1985 ASSERT(sampler->IsActive());
1991 ScopedLock lock(active_samplers_mutex); 1986 ScopedLock lock(active_samplers_mutex);
1992 ASSERT(active_samplers_ != NULL); 1987 ASSERT(active_samplers_ != NULL);
1993 bool removed = active_samplers_->RemoveElement(sampler); 1988 bool removed = active_samplers_->RemoveElement(sampler);
1994 ASSERT(removed); 1989 ASSERT(removed);
1995 USE(removed); 1990 USE(removed);
1996 } 1991 }
1997 1992
1998 } } // namespace v8::internal 1993 } } // namespace v8::internal
OLDNEW
« no previous file with comments | « no previous file | src/platform.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698