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

Unified Diff: runtime/vm/os_linux.cc

Issue 24255013: - Write the coverage data to a file instead of printing to stdout. (Closed) Base URL: http://dart.googlecode.com/svn/branches/bleeding_edge/dart/
Patch Set: Created 7 years, 3 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
Index: runtime/vm/os_linux.cc
===================================================================
--- runtime/vm/os_linux.cc (revision 27712)
+++ runtime/vm/os_linux.cc (working copy)
@@ -129,10 +129,10 @@
if (file_open == NULL) {
return;
}
- const char* format = "/tmp/perf-%ld.map";
+ const char* format = "/tmp/perf-%"Pd".map";
intptr_t pid = getpid();
intptr_t len = OS::SNPrint(NULL, 0, format, pid);
- char* filename = new char[len + 1];
+ char* filename = Isolate::Current()->current_zone()->Alloc<char>(len + 1);
OS::SNPrint(filename, len + 1, format, pid);
out_file_ = (*file_open)(filename, true);
}
@@ -273,6 +273,11 @@
}
+intptr_t OS::ProcessId() {
+ return static_cast<intptr_t>(getpid());
+}
+
+
static bool LocalTime(int64_t seconds_since_epoch, tm* tm_result) {
time_t seconds = static_cast<time_t>(seconds_since_epoch);
if (seconds != seconds_since_epoch) return false;
« runtime/vm/json_stream.h ('K') | « runtime/vm/os_android.cc ('k') | runtime/vm/os_macos.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698