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; |