Remove redundant 'running' checks for ProfilerEventsProcessor in tests.
authormikhail.naganov@gmail.com <mikhail.naganov@gmail.com@ce2b1a6d-e550-0410-aec6-3dcde31c8c00>
Fri, 20 May 2011 15:11:00 +0000 (15:11 +0000)
committermikhail.naganov@gmail.com <mikhail.naganov@gmail.com@ce2b1a6d-e550-0410-aec6-3dcde31c8c00>
Fri, 20 May 2011 15:11:00 +0000 (15:11 +0000)
A follow up to r7949

R=vitalyr@chromium.org
BUG=none
TEST=none

Review URL: http://codereview.chromium.org/7040014

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@7969 ce2b1a6d-e550-0410-aec6-3dcde31c8c00

src/cpu-profiler.h
test/cctest/test-cpu-profiler.cc

index 9481d3b..f9f6167 100644 (file)
@@ -134,8 +134,8 @@ class TickSampleEventRecord BASE_EMBEDDED {
 // methods called by event producers: VM and stack sampler threads.
 class ProfilerEventsProcessor : public Thread {
  public:
-  explicit ProfilerEventsProcessor(Isolate* isolate,
-                                   ProfileGenerator* generator);
+  ProfilerEventsProcessor(Isolate* isolate,
+                          ProfileGenerator* generator);
   virtual ~ProfilerEventsProcessor() {}
 
   // Thread control.
index 17611ac..beb73c5 100644 (file)
@@ -26,9 +26,6 @@ TEST(StartStop) {
   ProfileGenerator generator(&profiles);
   ProfilerEventsProcessor processor(i::Isolate::Current(), &generator);
   processor.Start();
-  while (!processor.running()) {
-    i::Thread::YieldCPU();
-  }
   processor.Stop();
   processor.Join();
 }
@@ -90,9 +87,6 @@ TEST(CodeEvents) {
   ProfileGenerator generator(&profiles);
   ProfilerEventsProcessor processor(i::Isolate::Current(), &generator);
   processor.Start();
-  while (!processor.running()) {
-    i::Thread::YieldCPU();
-  }
 
   // Enqueue code creation events.
   i::HandleScope scope;
@@ -154,9 +148,6 @@ TEST(TickEvents) {
   ProfileGenerator generator(&profiles);
   ProfilerEventsProcessor processor(i::Isolate::Current(), &generator);
   processor.Start();
-  while (!processor.running()) {
-    i::Thread::YieldCPU();
-  }
 
   processor.CodeCreateEvent(i::Logger::BUILTIN_TAG,
                             "bbb",
@@ -247,9 +238,6 @@ TEST(Issue1398) {
   ProfileGenerator generator(&profiles);
   ProfilerEventsProcessor processor(i::Isolate::Current(), &generator);
   processor.Start();
-  while (!processor.running()) {
-    i::Thread::YieldCPU();
-  }
 
   processor.CodeCreateEvent(i::Logger::BUILTIN_TAG,
                             "bbb",