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

Issue 159406: Fix issue 410: test-log/ProfLazyMode flakinness under Linux. (Closed)

Created:
11 years, 5 months ago by Mikhail Naganov
Modified:
9 years, 7 months ago
CC:
v8-dev
Visibility:
Public.

Description

Fix issue 410: test-log/ProfLazyMode flakinness under Linux. I found two causes of flakinness: - SIGPROF signal isn't delivered to a process; - Profiler thread (the one that retrieves tick events from the queue and writes to log) doesn't get a CPU; Both are fixed. The script from bug description with run count increased to 200 runs without any test failures. OS X and Windows are unaffected because they don't use signals mechanism. BUG=http://code.google.com/p/v8/issues/detail?id=410 TEST=see bug description Committed: http://code.google.com/p/v8/source/detail?r=2547

Patch Set 1 #

Patch Set 2 : Renamed variabled to match V8 naming convention #

Total comments: 2
Unified diffs Side-by-side diffs Delta from patch set Stats (+36 lines, -1 line) Patch
M test/cctest/test-log.cc View 1 4 chunks +36 lines, -1 line 2 comments Download

Messages

Total messages: 3 (0 generated)
Mikhail Naganov
11 years, 5 months ago (2009-07-27 15:55:39 UTC) #1
Søren Thygesen Gjesse
LGTM Would it be an idea to use a high priority thread on Linux as ...
11 years, 5 months ago (2009-07-28 08:12:37 UTC) #2
Mikhail Naganov
11 years, 5 months ago (2009-07-28 08:34:15 UTC) #3
Yes, I'm thinking about switching from SIGPROF to a hi-prio thread too. Not only
this is more reliable, but it provides a much better resolution. E.g. running V8
benchmarks on Mac gives 9500 samples from 9.968 s (almost every ms!), while on
Linux it gives only 1000 samples from the same 10 seconds---about 10 times
worse!

The only problem is that Linux PThreads doesn't have pthread_suspend implemented
(on Mac we work with threads using Mach primitives directly), so I will need to
introduce some workaround.

http://codereview.chromium.org/159406/diff/4/1002
File test/cctest/test-log.cc (right):

http://codereview.chromium.org/159406/diff/4/1002#newcode150
Line 150: static bool was_sigprof_received = true;
On 2009/07/28 08:12:37, Søren Gjesse wrote:
> Maybe move this down to 'struct sigaction old_sigprof_handler;'

This will add another 'ifdef' branch around lines 226-227. I think having
was_sigprof_received always declared is more straightforward.

Powered by Google App Engine
This is Rietveld 408576698