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

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

Issue 14158012: Align code by 32 bytes to reduce benchmark flakiness on Intel CPUs. (Closed) Base URL: https://dart.googlecode.com/svn/branches/bleeding_edge/dart
Patch Set: Created 7 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 | Annotate | Revision Log
« no previous file with comments | « no previous file | runtime/vm/os_win.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 340 matching lines...) Expand 10 before | Expand all | Expand 10 after
351 // testing purposes. 351 // testing purposes.
352 // Flags::DebugIsInt("stackalign", &alignment); 352 // Flags::DebugIsInt("stackalign", &alignment);
353 ASSERT(Utils::IsPowerOfTwo(alignment)); 353 ASSERT(Utils::IsPowerOfTwo(alignment));
354 ASSERT(alignment >= kMinimumAlignment); 354 ASSERT(alignment >= kMinimumAlignment);
355 return alignment; 355 return alignment;
356 } 356 }
357 357
358 358
359 word OS::PreferredCodeAlignment() { 359 word OS::PreferredCodeAlignment() {
360 #if defined(TARGET_ARCH_IA32) || defined(TARGET_ARCH_X64) 360 #if defined(TARGET_ARCH_IA32) || defined(TARGET_ARCH_X64)
361 const int kMinimumAlignment = 16; 361 const int kMinimumAlignment = 32;
362 #elif defined(TARGET_ARCH_ARM) || defined(TARGET_ARCH_MIPS) 362 #elif defined(TARGET_ARCH_ARM) || defined(TARGET_ARCH_MIPS)
363 // TODO(regis): Verify alignment constraints on MIPS. 363 // TODO(regis): Verify alignment constraints on MIPS.
364 const int kMinimumAlignment = 16; 364 const int kMinimumAlignment = 16;
365 #else 365 #else
366 #error Unsupported architecture. 366 #error Unsupported architecture.
367 #endif 367 #endif
368 word alignment = kMinimumAlignment; 368 word alignment = kMinimumAlignment;
369 // TODO(5411554): Allow overriding default code alignment for 369 // TODO(5411554): Allow overriding default code alignment for
370 // testing purposes. 370 // testing purposes.
371 // Flags::DebugIsInt("codealign", &alignment); 371 // Flags::DebugIsInt("codealign", &alignment);
(...skipping 143 matching lines...) Expand 10 before | Expand all | Expand 10 after
515 } 515 }
516 516
517 517
518 void OS::Exit(int code) { 518 void OS::Exit(int code) {
519 exit(code); 519 exit(code);
520 } 520 }
521 521
522 } // namespace dart 522 } // namespace dart
523 523
524 #endif // defined(TARGET_OS_LINUX) 524 #endif // defined(TARGET_OS_LINUX)
OLDNEW
« no previous file with comments | « no previous file | runtime/vm/os_win.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698