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

Unified Diff: test/cctest/test-api.cc

Issue 1118533003: Make CPU profiler do not hog 100% of CPU. (Closed) Base URL: https://chromium.googlesource.com/v8/v8.git@master
Patch Set: still uploading Created 5 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 side-by-side diff with in-line comments
Download patch
« no previous file with comments | « src/sampler.cc ('k') | test/cctest/test-cpu-profiler.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: test/cctest/test-api.cc
diff --git a/test/cctest/test-api.cc b/test/cctest/test-api.cc
index f54428875c88bd95185d87015ce01a36da22c60f..12f481019b05cfe2d87693b15354ac9f2514d519 100644
--- a/test/cctest/test-api.cc
+++ b/test/cctest/test-api.cc
@@ -13095,10 +13095,12 @@ class RegExpInterruptionThread : public v8::base::Thread {
v8::base::NoBarrier_Load(&regexp_interruption_data.loop_count) < 7;
v8::base::NoBarrier_AtomicIncrement(
&regexp_interruption_data.loop_count, 1)) {
- v8::base::OS::Sleep(50); // Wait a bit before requesting GC.
+ // Wait a bit before requesting GC.
+ v8::base::OS::Sleep(v8::base::TimeDelta::FromMilliseconds(50));
reinterpret_cast<i::Isolate*>(isolate_)->stack_guard()->RequestGC();
}
- v8::base::OS::Sleep(50); // Wait a bit before terminating.
+ // Wait a bit before terminating.
+ v8::base::OS::Sleep(v8::base::TimeDelta::FromMilliseconds(50));
v8::V8::TerminateExecution(isolate_);
}
@@ -18812,7 +18814,7 @@ class ThreadInterruptTest {
struct sigaction action;
// Ensure that we'll enter waiting condition
- v8::base::OS::Sleep(100);
+ v8::base::OS::Sleep(v8::base::TimeDelta::FromMilliseconds(100));
// Setup signal handler
memset(&action, 0, sizeof(action));
@@ -18823,7 +18825,7 @@ class ThreadInterruptTest {
kill(getpid(), SIGCHLD);
// Ensure that if wait has returned because of error
- v8::base::OS::Sleep(100);
+ v8::base::OS::Sleep(v8::base::TimeDelta::FromMilliseconds(100));
// Set value and signal semaphore
test_->sem_value_ = 1;
« no previous file with comments | « src/sampler.cc ('k') | test/cctest/test-cpu-profiler.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698