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

Unified Diff: runtime/bin/file_macos.cc

Issue 109803002: Profiler Take 2 (Closed) Base URL: https://dart.googlecode.com/svn/branches/bleeding_edge/dart
Patch Set: Created 7 years 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
Index: runtime/bin/file_macos.cc
diff --git a/runtime/bin/file_macos.cc b/runtime/bin/file_macos.cc
index b9500a74fee98e52df71be2d6e15badbd5ea72a7..356e10bf5eb0736b76221abc49b6c8cf242bf149 100644
--- a/runtime/bin/file_macos.cc
+++ b/runtime/bin/file_macos.cc
@@ -18,7 +18,7 @@
#include "bin/builtin.h"
#include "bin/fdutils.h"
#include "bin/log.h"
-
+#include "bin/signal_blocker.h"
namespace dart {
namespace bin {
@@ -66,12 +66,16 @@ bool File::IsClosed() {
int64_t File::Read(void* buffer, int64_t num_bytes) {
ASSERT(handle_->fd() >= 0);
+ // Block profile interrupts while making I/O call.
+ ThreadSignalBlocker tsb(SIGPROF);
return TEMP_FAILURE_RETRY(read(handle_->fd(), buffer, num_bytes));
}
int64_t File::Write(const void* buffer, int64_t num_bytes) {
ASSERT(handle_->fd() >= 0);
+ // Block profile interrupts while making I/O call.
+ ThreadSignalBlocker tsb(SIGPROF);
return TEMP_FAILURE_RETRY(write(handle_->fd(), buffer, num_bytes));
}

Powered by Google App Engine
This is Rietveld 408576698