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

Side by Side Diff: runtime/vm/os_linux.cc

Issue 26294002: Cleanups: int -> intptr_t for "array" lengths, memory sizes. (Closed) Base URL: http://dart.googlecode.com/svn/branches/bleeding_edge/dart/
Patch Set: Created 7 years, 2 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 unified diff | Download patch | Annotate | Revision Log
« no previous file with comments | « runtime/vm/object.cc ('k') | runtime/vm/scanner_test.cc » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 // Copyright (c) 2012, the Dart project authors. Please see the AUTHORS file 1 // Copyright (c) 2012, the Dart project authors. Please see the AUTHORS file
2 // for details. All rights reserved. Use of this source code is governed by a 2 // for details. All rights reserved. Use of this source code is governed by a
3 // BSD-style license that can be found in the LICENSE file. 3 // BSD-style license that can be found in the LICENSE file.
4 4
5 #include "vm/globals.h" 5 #include "vm/globals.h"
6 #if defined(TARGET_OS_LINUX) 6 #if defined(TARGET_OS_LINUX)
7 7
8 #include "vm/os.h" 8 #include "vm/os.h"
9 9
10 #include <errno.h> // NOLINT 10 #include <errno.h> // NOLINT
(...skipping 111 matching lines...) Expand 10 before | Expand all | Expand 10 after
122 }; 122 };
123 123
124 124
125 class PerfCodeObserver : public CodeObserver { 125 class PerfCodeObserver : public CodeObserver {
126 public: 126 public:
127 PerfCodeObserver() { 127 PerfCodeObserver() {
128 Dart_FileOpenCallback file_open = Isolate::file_open_callback(); 128 Dart_FileOpenCallback file_open = Isolate::file_open_callback();
129 if (file_open == NULL) { 129 if (file_open == NULL) {
130 return; 130 return;
131 } 131 }
132 const char* format = "/tmp/perf-%"Pd".map"; 132 const char* format = "/tmp/perf-%" Pd ".map";
133 intptr_t pid = getpid(); 133 intptr_t pid = getpid();
134 intptr_t len = OS::SNPrint(NULL, 0, format, pid); 134 intptr_t len = OS::SNPrint(NULL, 0, format, pid);
135 char* filename = new char[len + 1]; 135 char* filename = new char[len + 1];
136 OS::SNPrint(filename, len + 1, format, pid); 136 OS::SNPrint(filename, len + 1, format, pid);
137 out_file_ = (*file_open)(filename, true); 137 out_file_ = (*file_open)(filename, true);
138 delete[] filename; 138 delete[] filename;
139 } 139 }
140 140
141 ~PerfCodeObserver() { 141 ~PerfCodeObserver() {
142 Dart_FileCloseCallback file_close = Isolate::file_close_callback(); 142 Dart_FileCloseCallback file_close = Isolate::file_close_callback();
(...skipping 381 matching lines...) Expand 10 before | Expand all | Expand 10 after
524 } 524 }
525 525
526 526
527 void OS::Exit(int code) { 527 void OS::Exit(int code) {
528 exit(code); 528 exit(code);
529 } 529 }
530 530
531 } // namespace dart 531 } // namespace dart
532 532
533 #endif // defined(TARGET_OS_LINUX) 533 #endif // defined(TARGET_OS_LINUX)
OLDNEW
« no previous file with comments | « runtime/vm/object.cc ('k') | runtime/vm/scanner_test.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698