Reviewers: danno, Jakob,
Description:
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=
Please review this at https://codereview.chromium.org/18332004/
SVN Base: https://v8.googlecode.com/svn/branches/bleeding_edge
Affected files:
M src/cpu-profiler.h
M src/cpu-profiler.cc
M test/cctest/test-cpu-profiler.cc
Index: src/cpu-profiler.cc
diff --git a/src/cpu-profiler.cc b/src/cpu-profiler.cc
index
13096048516ba9395e51865537bed330245dbdac..512f7d5123edb0ff8ba1a220322dd80a253997c0
100644
--- a/src/cpu-profiler.cc
+++ b/src/cpu-profiler.cc
@@ -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.
Index: src/cpu-profiler.h
diff --git a/src/cpu-profiler.h b/src/cpu-profiler.h
index
1e8ac791b0aa51f36a2113d0b5037b64c43bd3fd..98096be090c7b6b0dfd5ebaa72791728aad17a12
100644
--- a/src/cpu-profiler.h
+++ b/src/cpu-profiler.h
@@ -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.
Index: test/cctest/test-cpu-profiler.cc
diff --git a/test/cctest/test-cpu-profiler.cc
b/test/cctest/test-cpu-profiler.cc
index
7374a5455f476f9cbe84741de4607bf15722b757..fb0566d38ed3e42675352e21ee81ff07c361a819
100644
--- a/test/cctest/test-cpu-profiler.cc
+++ b/test/cctest/test-cpu-profiler.cc
@@ -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);
--
--
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.