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

Side by Side Diff: test/cctest/test-log.cc

Issue 4000007: Improve sampler resolution on Linux. (Closed) Base URL: https://v8.googlecode.com/svn/branches/bleeding_edge
Patch Set: comments addressed Created 10 years, 1 month 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 unified diff | Download patch | Annotate | Revision Log
« no previous file with comments | « src/platform-linux.cc ('k') | no next file » | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 // Copyright 2006-2009 the V8 project authors. All rights reserved. 1 // Copyright 2006-2009 the V8 project authors. All rights reserved.
2 // 2 //
3 // Tests of logging functions from log.h 3 // Tests of logging functions from log.h
4 4
5 #ifdef ENABLE_LOGGING_AND_PROFILING 5 #ifdef ENABLE_LOGGING_AND_PROFILING
6 6
7 #ifdef __linux__ 7 #ifdef __linux__
8 #include <math.h> 8 #include <math.h>
9 #include <pthread.h> 9 #include <pthread.h>
10 #include <signal.h> 10 #include <signal.h>
(...skipping 319 matching lines...) Expand 10 before | Expand all | Expand 10 after
330 CompileAndRunScript("var a = (function(x) { return x + 1; })(10);"); 330 CompileAndRunScript("var a = (function(x) { return x + 1; })(10);");
331 331
332 // No new data beyond last retrieved position. 332 // No new data beyond last retrieved position.
333 CHECK_EQ(0, matcher.GetNextChunk()); 333 CHECK_EQ(0, matcher.GetNextChunk());
334 334
335 // Check that profiling can be resumed again. 335 // Check that profiling can be resumed again.
336 CheckThatProfilerWorks(&matcher); 336 CheckThatProfilerWorks(&matcher);
337 } 337 }
338 338
339 339
340 // Profiling multiple threads that use V8 is currently only available on Linux. 340 // BUG(913). Need to implement support for profiling multiple VM threads.
341 #ifdef __linux__ 341 #if 0
342 342
343 namespace { 343 namespace {
344 344
345 class LoopingThread : public v8::internal::Thread { 345 class LoopingThread : public v8::internal::Thread {
346 public: 346 public:
347 LoopingThread() 347 LoopingThread()
348 : v8::internal::Thread(), 348 : v8::internal::Thread(),
349 semaphore_(v8::internal::OS::CreateSemaphore(0)), 349 semaphore_(v8::internal::OS::CreateSemaphore(0)),
350 run_(true) { 350 run_(true) {
351 } 351 }
(...skipping 837 matching lines...) Expand 10 before | Expand all | Expand 10 after
1189 // Make sure that all log data is written prior crash due to CHECK failure. 1189 // Make sure that all log data is written prior crash due to CHECK failure.
1190 fflush(stdout); 1190 fflush(stdout);
1191 CHECK(results_equal); 1191 CHECK(results_equal);
1192 1192
1193 env->Exit(); 1193 env->Exit();
1194 Logger::TearDown(); 1194 Logger::TearDown();
1195 i::FLAG_always_compact = saved_always_compact; 1195 i::FLAG_always_compact = saved_always_compact;
1196 } 1196 }
1197 1197
1198 #endif // ENABLE_LOGGING_AND_PROFILING 1198 #endif // ENABLE_LOGGING_AND_PROFILING
OLDNEW
« no previous file with comments | « src/platform-linux.cc ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698