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

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

Issue 2999933002: Revert "Add current rss and embedder name to Observatory" (Closed)
Patch Set: Created 3 years, 4 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
« no previous file with comments | « runtime/vm/os_android.cc ('k') | runtime/vm/os_linux.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) 2016, the Dart project authors. Please see the AUTHORS file 1 // Copyright (c) 2016, 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(HOST_OS_FUCHSIA) 6 #if defined(HOST_OS_FUCHSIA)
7 7
8 #include "vm/os.h" 8 #include "vm/os.h"
9 9
10 #include <errno.h> 10 #include <errno.h>
(...skipping 118 matching lines...) Expand 10 before | Expand all | Expand 10 after
129 ASSERT(Utils::IsPowerOfTwo(alignment)); 129 ASSERT(Utils::IsPowerOfTwo(alignment));
130 ASSERT(alignment >= kMinimumAlignment); 130 ASSERT(alignment >= kMinimumAlignment);
131 ASSERT(alignment <= OS::kMaxPreferredCodeAlignment); 131 ASSERT(alignment <= OS::kMaxPreferredCodeAlignment);
132 return alignment; 132 return alignment;
133 } 133 }
134 134
135 int OS::NumberOfAvailableProcessors() { 135 int OS::NumberOfAvailableProcessors() {
136 return sysconf(_SC_NPROCESSORS_CONF); 136 return sysconf(_SC_NPROCESSORS_CONF);
137 } 137 }
138 138
139 uintptr_t OS::MaxRSS() {
140 mx_info_task_stats_t task_stats;
141 mx_handle_t process = mx_process_self();
142 mx_status_t status = mx_object_get_info(
143 process, MX_INFO_TASK_STATS, &task_stats, sizeof(task_stats), NULL, NULL);
144 return (status == MX_OK)
145 ? (task_stats.mem_private_bytes + task_stats.mem_shared_bytes)
146 : 0;
147 }
148
139 void OS::Sleep(int64_t millis) { 149 void OS::Sleep(int64_t millis) {
140 SleepMicros(millis * kMicrosecondsPerMillisecond); 150 SleepMicros(millis * kMicrosecondsPerMillisecond);
141 } 151 }
142 152
143 void OS::SleepMicros(int64_t micros) { 153 void OS::SleepMicros(int64_t micros) {
144 mx_nanosleep(mx_deadline_after(micros * kNanosecondsPerMicrosecond)); 154 mx_nanosleep(mx_deadline_after(micros * kNanosecondsPerMicrosecond));
145 } 155 }
146 156
147 void OS::DebugBreak() { 157 void OS::DebugBreak() {
148 UNIMPLEMENTED(); 158 UNIMPLEMENTED();
(...skipping 118 matching lines...) Expand 10 before | Expand all | Expand 10 after
267 abort(); 277 abort();
268 } 278 }
269 279
270 void OS::Exit(int code) { 280 void OS::Exit(int code) {
271 UNIMPLEMENTED(); 281 UNIMPLEMENTED();
272 } 282 }
273 283
274 } // namespace dart 284 } // namespace dart
275 285
276 #endif // defined(HOST_OS_FUCHSIA) 286 #endif // defined(HOST_OS_FUCHSIA)
OLDNEW
« no previous file with comments | « runtime/vm/os_android.cc ('k') | runtime/vm/os_linux.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698