[vm] Partially disable 5393ce7d35.

Avoid flakily failures setting the thread signal mask.

Bug: https://github.com/dart-lang/sdk/issues/36908
Change-Id: I3d66214189f3276365b4c1cc333847cb4f65c94f
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/103400
Commit-Queue: Ryan Macnak <rmacnak@google.com>
Reviewed-by: Alexander Markov <alexmarkov@google.com>
This commit is contained in:
Ryan Macnak 2019-05-23 17:42:37 +00:00 committed by commit-bot@chromium.org
parent 338b74a52c
commit d4e2d78a94

View file

@ -88,20 +88,6 @@ class ThreadStartData {
DISALLOW_COPY_AND_ASSIGN(ThreadStartData);
};
// Spawned threads inherit their spawner's signal mask. We sometimes spawn
// threads for running Dart code from a thread that is blocking SIGPROF.
// This function explicitly unblocks SIGPROF so the profiler continues to
// sample this thread.
static void UnblockSIGPROF() {
sigset_t set;
sigemptyset(&set);
sigaddset(&set, SIGPROF);
int r = pthread_sigmask(SIG_UNBLOCK, &set, NULL);
USE(r);
ASSERT(r == 0);
ASSERT(!CHECK_IS_BLOCKING(SIGPROF));
}
// Dispatch to the thread start function provided by the caller. This trampoline
// is used to ensure that the thread is properly destroyed if the thread just
// exits.
@ -121,7 +107,6 @@ static void* ThreadStart(void* data_ptr) {
if (thread != NULL) {
OSThread::SetCurrent(thread);
thread->set_name(name);
UnblockSIGPROF();
// Call the supplied thread start function handing it its parameters.
function(parameter);
}