Revision: 15413
Author:   [email protected]
Date:     Mon Jul  1 05:24:26 2013
Log:      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=
[email protected]

Review URL: https://codereview.chromium.org/18332004
http://code.google.com/p/v8/source/detail?r=15413

Modified:
 /branches/bleeding_edge/src/cpu-profiler.cc
 /branches/bleeding_edge/src/cpu-profiler.h
 /branches/bleeding_edge/test/cctest/test-cpu-profiler.cc

=======================================
--- /branches/bleeding_edge/src/cpu-profiler.cc Mon Jul  1 05:11:29 2013
+++ /branches/bleeding_edge/src/cpu-profiler.cc Mon Jul  1 05:24:26 2013
@@ -45,8 +45,7 @@
 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 @@
     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.
=======================================
--- /branches/bleeding_edge/src/cpu-profiler.h  Mon Jul  1 05:11:29 2013
+++ /branches/bleeding_edge/src/cpu-profiler.h  Mon Jul  1 05:24:26 2013
@@ -141,8 +141,7 @@
 // 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.
=======================================
--- /branches/bleeding_edge/test/cctest/test-cpu-profiler.cc Mon Jul 1 03:12:03 2013 +++ /branches/bleeding_edge/test/cctest/test-cpu-profiler.cc Mon Jul 1 05:24:26 2013
@@ -51,7 +51,7 @@
 TEST(StartStop) {
   CpuProfilesCollection profiles;
   ProfileGenerator generator(&profiles);
-  ProfilerEventsProcessor processor(&generator, &profiles);
+  ProfilerEventsProcessor processor(&generator);
   processor.Start();
   processor.Stop();
   processor.Join();
@@ -141,7 +141,7 @@
   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 @@
   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 @@
   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);

--
--
v8-dev mailing list
[email protected]
http://groups.google.com/group/v8-dev
--- You received this message because you are subscribed to the Google Groups "v8-dev" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to [email protected].
For more options, visit https://groups.google.com/groups/opt_out.


Reply via email to