No need to pass profiles to ProfilerEventsProcessor.
Following up on https://codereview.chromium.org/18353002, there's no need to pass the profiles to ProfilerEventsProcessor's constructor. BUG= R=danno@chromium.org Review URL: https://codereview.chromium.org/18332004 git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@15413 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
This commit is contained in:
parent
73d32d2fb7
commit
d7618796f6
@ -45,8 +45,7 @@ static const int kTickSamplesBufferChunksCount = 16;
|
||||
static const int kProfilerStackSize = 64 * KB;
|
||||
|
||||
|
||||
ProfilerEventsProcessor::ProfilerEventsProcessor(
|
||||
ProfileGenerator* generator, CpuProfilesCollection* profiles)
|
||||
ProfilerEventsProcessor::ProfilerEventsProcessor(ProfileGenerator* generator)
|
||||
: Thread(Thread::Options("v8:ProfEvntProc", kProfilerStackSize)),
|
||||
generator_(generator),
|
||||
running_(true),
|
||||
@ -435,7 +434,7 @@ void CpuProfiler::StartProcessorIfNotStarted() {
|
||||
saved_logging_nesting_ = isolate_->logger()->logging_nesting_;
|
||||
isolate_->logger()->logging_nesting_ = 0;
|
||||
generator_ = new ProfileGenerator(profiles_);
|
||||
processor_ = new ProfilerEventsProcessor(generator_, profiles_);
|
||||
processor_ = new ProfilerEventsProcessor(generator_);
|
||||
is_profiling_ = true;
|
||||
processor_->StartSynchronously();
|
||||
// Enumerate stuff we already have in the heap.
|
||||
|
@ -141,8 +141,7 @@ class CodeEventsContainer {
|
||||
// methods called by event producers: VM and stack sampler threads.
|
||||
class ProfilerEventsProcessor : public Thread {
|
||||
public:
|
||||
ProfilerEventsProcessor(ProfileGenerator* generator,
|
||||
CpuProfilesCollection* profiles);
|
||||
explicit ProfilerEventsProcessor(ProfileGenerator* generator);
|
||||
virtual ~ProfilerEventsProcessor() {}
|
||||
|
||||
// Thread control.
|
||||
|
@ -51,7 +51,7 @@ using i::Vector;
|
||||
TEST(StartStop) {
|
||||
CpuProfilesCollection profiles;
|
||||
ProfileGenerator generator(&profiles);
|
||||
ProfilerEventsProcessor processor(&generator, &profiles);
|
||||
ProfilerEventsProcessor processor(&generator);
|
||||
processor.Start();
|
||||
processor.Stop();
|
||||
processor.Join();
|
||||
@ -141,7 +141,7 @@ TEST(CodeEvents) {
|
||||
CpuProfilesCollection* profiles = new CpuProfilesCollection;
|
||||
profiles->StartProfiling("", 1, false);
|
||||
ProfileGenerator generator(profiles);
|
||||
ProfilerEventsProcessor processor(&generator, profiles);
|
||||
ProfilerEventsProcessor processor(&generator);
|
||||
processor.Start();
|
||||
CpuProfiler profiler(isolate, profiles, &generator, &processor);
|
||||
|
||||
@ -202,7 +202,7 @@ TEST(TickEvents) {
|
||||
CpuProfilesCollection* profiles = new CpuProfilesCollection;
|
||||
profiles->StartProfiling("", 1, false);
|
||||
ProfileGenerator generator(profiles);
|
||||
ProfilerEventsProcessor processor(&generator, profiles);
|
||||
ProfilerEventsProcessor processor(&generator);
|
||||
processor.Start();
|
||||
CpuProfiler profiler(isolate, profiles, &generator, &processor);
|
||||
|
||||
@ -272,7 +272,7 @@ TEST(Issue1398) {
|
||||
CpuProfilesCollection* profiles = new CpuProfilesCollection;
|
||||
profiles->StartProfiling("", 1, false);
|
||||
ProfileGenerator generator(profiles);
|
||||
ProfilerEventsProcessor processor(&generator, profiles);
|
||||
ProfilerEventsProcessor processor(&generator);
|
||||
processor.Start();
|
||||
CpuProfiler profiler(isolate, profiles, &generator, &processor);
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user