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

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

Issue 1241113002: VM: Fix allocation size stats for contexts on ia32 and x64. (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/stub_code_ia32.cc ('k') | no next file » | 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" 5 #include "vm/globals.h"
6 #if defined(TARGET_ARCH_X64) 6 #if defined(TARGET_ARCH_X64)
7 7
8 #include "vm/assembler.h" 8 #include "vm/assembler.h"
9 #include "vm/compiler.h" 9 #include "vm/compiler.h"
10 #include "vm/dart_entry.h" 10 #include "vm/dart_entry.h"
(...skipping 896 matching lines...) Expand 10 before | Expand all | Expand 10 after
907 __ j(ABOVE_EQUAL, &slow_case); 907 __ j(ABOVE_EQUAL, &slow_case);
908 } 908 }
909 909
910 // Successfully allocated the object, now update top to point to 910 // Successfully allocated the object, now update top to point to
911 // next object start and initialize the object. 911 // next object start and initialize the object.
912 // RAX: new object. 912 // RAX: new object.
913 // R13: next object start. 913 // R13: next object start.
914 // R10: number of context variables. 914 // R10: number of context variables.
915 // RCX: heap. 915 // RCX: heap.
916 __ movq(Address(RCX, Heap::TopOffset(space)), R13); 916 __ movq(Address(RCX, Heap::TopOffset(space)), R13);
917 __ addq(RAX, Immediate(kHeapObjectTag));
918 // R13: Size of allocation in bytes. 917 // R13: Size of allocation in bytes.
919 __ subq(R13, RAX); 918 __ subq(R13, RAX);
919 __ addq(RAX, Immediate(kHeapObjectTag));
920 // Generate isolate-independent code to allow sharing between isolates. 920 // Generate isolate-independent code to allow sharing between isolates.
921 __ UpdateAllocationStatsWithSize(cid, R13, space, 921 __ UpdateAllocationStatsWithSize(cid, R13, space,
922 /* inline_isolate */ false); 922 /* inline_isolate */ false);
923 923
924 // Calculate the size tag. 924 // Calculate the size tag.
925 // RAX: new object. 925 // RAX: new object.
926 // R10: number of context variables. 926 // R10: number of context variables.
927 { 927 {
928 Label size_tag_overflow, done; 928 Label size_tag_overflow, done;
929 __ leaq(R13, Address(R10, TIMES_8, fixed_size)); 929 __ leaq(R13, Address(R10, TIMES_8, fixed_size));
(...skipping 1254 matching lines...) Expand 10 before | Expand all | Expand 10 after
2184 // Result: 2184 // Result:
2185 // RCX: entry point. 2185 // RCX: entry point.
2186 void StubCode::GenerateMegamorphicLookupStub(Assembler* assembler) { 2186 void StubCode::GenerateMegamorphicLookupStub(Assembler* assembler) {
2187 EmitMegamorphicLookup(assembler, RDI, RBX, RCX); 2187 EmitMegamorphicLookup(assembler, RDI, RBX, RCX);
2188 __ ret(); 2188 __ ret();
2189 } 2189 }
2190 2190
2191 } // namespace dart 2191 } // namespace dart
2192 2192
2193 #endif // defined TARGET_ARCH_X64 2193 #endif // defined TARGET_ARCH_X64
OLDNEW
« no previous file with comments | « runtime/vm/stub_code_ia32.cc ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698