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

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

Issue 2845053003: Fix asserts in StackFrameIterator which were effectively disabled (Closed)
Patch Set: Add StackFrameIterator::{ValidationPolicy,CrossThreadPolicy} enums Created 3 years, 7 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_fuchsia.cc ('k') | runtime/vm/os_macos.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(HOST_OS_LINUX) 6 #if defined(HOST_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 215 matching lines...) Expand 10 before | Expand all | Expand 10 after
226 // TODO(5411554): Allow overriding default code alignment for 226 // TODO(5411554): Allow overriding default code alignment for
227 // testing purposes. 227 // testing purposes.
228 // Flags::DebugIsInt("codealign", &alignment); 228 // Flags::DebugIsInt("codealign", &alignment);
229 ASSERT(Utils::IsPowerOfTwo(alignment)); 229 ASSERT(Utils::IsPowerOfTwo(alignment));
230 ASSERT(alignment >= kMinimumAlignment); 230 ASSERT(alignment >= kMinimumAlignment);
231 ASSERT(alignment <= OS::kMaxPreferredCodeAlignment); 231 ASSERT(alignment <= OS::kMaxPreferredCodeAlignment);
232 return alignment; 232 return alignment;
233 } 233 }
234 234
235 235
236 bool OS::AllowStackFrameIteratorFromAnotherThread() {
237 return false;
238 }
239
240
241 int OS::NumberOfAvailableProcessors() { 236 int OS::NumberOfAvailableProcessors() {
242 return sysconf(_SC_NPROCESSORS_ONLN); 237 return sysconf(_SC_NPROCESSORS_ONLN);
243 } 238 }
244 239
245 240
246 uintptr_t OS::MaxRSS() { 241 uintptr_t OS::MaxRSS() {
247 struct rusage usage; 242 struct rusage usage;
248 usage.ru_maxrss = 0; 243 usage.ru_maxrss = 0;
249 int r = getrusage(RUSAGE_SELF, &usage); 244 int r = getrusage(RUSAGE_SELF, &usage);
250 ASSERT(r == 0); 245 ASSERT(r == 0);
(...skipping 171 matching lines...) Expand 10 before | Expand all | Expand 10 after
422 } 417 }
423 418
424 419
425 void OS::Exit(int code) { 420 void OS::Exit(int code) {
426 exit(code); 421 exit(code);
427 } 422 }
428 423
429 } // namespace dart 424 } // namespace dart
430 425
431 #endif // defined(HOST_OS_LINUX) 426 #endif // defined(HOST_OS_LINUX)
OLDNEW
« no previous file with comments | « runtime/vm/os_fuchsia.cc ('k') | runtime/vm/os_macos.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698