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

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

Issue 1230063010: Test tracing of string allocations (Closed) Base URL: git@github.com:dart-lang/sdk.git@master
Patch Set: Created 5 years, 5 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/intrinsifier_mips.cc ('k') | runtime/vm/profiler_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) 2013, the Dart project authors. Please see the AUTHORS file 1 // Copyright (c) 2013, 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" // Needed here to get TARGET_ARCH_X64. 5 #include "vm/globals.h" // Needed here to get TARGET_ARCH_X64.
6 #if defined(TARGET_ARCH_X64) 6 #if defined(TARGET_ARCH_X64)
7 7
8 #include "vm/intrinsifier.h" 8 #include "vm/intrinsifier.h"
9 9
10 #include "vm/assembler.h" 10 #include "vm/assembler.h"
(...skipping 1709 matching lines...) Expand 10 before | Expand all | Expand 10 after
1720 } 1720 }
1721 1721
1722 1722
1723 // Allocates one-byte string of length 'end - start'. The content is not 1723 // Allocates one-byte string of length 'end - start'. The content is not
1724 // initialized. 'length-reg' contains tagged length. 1724 // initialized. 'length-reg' contains tagged length.
1725 // Returns new string as tagged pointer in RAX. 1725 // Returns new string as tagged pointer in RAX.
1726 static void TryAllocateOnebyteString(Assembler* assembler, 1726 static void TryAllocateOnebyteString(Assembler* assembler,
1727 Label* ok, 1727 Label* ok,
1728 Label* failure, 1728 Label* failure,
1729 Register length_reg) { 1729 Register length_reg) {
1730 __ MaybeTraceAllocation(kOneByteStringCid, failure, false);
1730 if (length_reg != RDI) { 1731 if (length_reg != RDI) {
1731 __ movq(RDI, length_reg); 1732 __ movq(RDI, length_reg);
1732 } 1733 }
1733 Label pop_and_fail; 1734 Label pop_and_fail;
1734 __ pushq(RDI); // Preserve length. 1735 __ pushq(RDI); // Preserve length.
1735 __ SmiUntag(RDI); 1736 __ SmiUntag(RDI);
1736 const intptr_t fixed_size = sizeof(RawString) + kObjectAlignment - 1; 1737 const intptr_t fixed_size = sizeof(RawString) + kObjectAlignment - 1;
1737 __ leaq(RDI, Address(RDI, TIMES_1, fixed_size)); // RDI is a Smi. 1738 __ leaq(RDI, Address(RDI, TIMES_1, fixed_size)); // RDI is a Smi.
1738 __ andq(RDI, Immediate(-kObjectAlignment)); 1739 __ andq(RDI, Immediate(-kObjectAlignment));
1739 1740
(...skipping 276 matching lines...) Expand 10 before | Expand all | Expand 10 after
2016 // Set return value to Isolate::current_tag_. 2017 // Set return value to Isolate::current_tag_.
2017 __ movq(RAX, Address(RBX, Isolate::current_tag_offset())); 2018 __ movq(RAX, Address(RBX, Isolate::current_tag_offset()));
2018 __ ret(); 2019 __ ret();
2019 } 2020 }
2020 2021
2021 #undef __ 2022 #undef __
2022 2023
2023 } // namespace dart 2024 } // namespace dart
2024 2025
2025 #endif // defined TARGET_ARCH_X64 2026 #endif // defined TARGET_ARCH_X64
OLDNEW
« no previous file with comments | « runtime/vm/intrinsifier_mips.cc ('k') | runtime/vm/profiler_test.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698