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

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

Issue 1644223004: Fix typo in tranferring from regular add to Atomic increment. (Closed) Base URL: git@github.com:dart-lang/sdk.git@master
Patch Set: fix-typo Created 4 years, 10 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 | « no previous file | 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) 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/pages.h" 5 #include "vm/pages.h"
6 6
7 #include "platform/assert.h" 7 #include "platform/assert.h"
8 #include "vm/compiler_stats.h" 8 #include "vm/compiler_stats.h"
9 #include "vm/gc_marker.h" 9 #include "vm/gc_marker.h"
10 #include "vm/gc_sweeper.h" 10 #include "vm/gc_sweeper.h"
(...skipping 825 matching lines...) Expand 10 before | Expand all | Expand 10 after
836 // Make code pages writable. 836 // Make code pages writable.
837 WriteProtectCode(false); 837 WriteProtectCode(false);
838 838
839 // Save old value before GCMarker visits the weak persistent handles. 839 // Save old value before GCMarker visits the weak persistent handles.
840 SpaceUsage usage_before = GetCurrentUsage(); 840 SpaceUsage usage_before = GetCurrentUsage();
841 841
842 // Mark all reachable old-gen objects. 842 // Mark all reachable old-gen objects.
843 bool collect_code = FLAG_collect_code && ShouldCollectCode(); 843 bool collect_code = FLAG_collect_code && ShouldCollectCode();
844 GCMarker marker(heap_); 844 GCMarker marker(heap_);
845 marker.MarkObjects(isolate, this, invoke_api_callbacks, collect_code); 845 marker.MarkObjects(isolate, this, invoke_api_callbacks, collect_code);
846 AtomicOperations::FetchAndIncrementBy(&(usage_.used_in_words), 846 usage_.used_in_words = marker.marked_words();
847 marker.marked_words());
848 847
849 int64_t mid1 = OS::GetCurrentTimeMicros(); 848 int64_t mid1 = OS::GetCurrentTimeMicros();
850 849
851 // Abandon the remainder of the bump allocation block. 850 // Abandon the remainder of the bump allocation block.
852 AbandonBumpAllocation(); 851 AbandonBumpAllocation();
853 // Reset the freelists and setup sweeping. 852 // Reset the freelists and setup sweeping.
854 freelist_[HeapPage::kData].Reset(); 853 freelist_[HeapPage::kData].Reset();
855 freelist_[HeapPage::kExecutable].Reset(); 854 freelist_[HeapPage::kExecutable].Reset();
856 855
857 int64_t mid2 = OS::GetCurrentTimeMicros(); 856 int64_t mid2 = OS::GetCurrentTimeMicros();
(...skipping 364 matching lines...) Expand 10 before | Expand all | Expand 10 after
1222 return 0; 1221 return 0;
1223 } else { 1222 } else {
1224 ASSERT(total_time >= gc_time); 1223 ASSERT(total_time >= gc_time);
1225 int result = static_cast<int>((static_cast<double>(gc_time) / 1224 int result = static_cast<int>((static_cast<double>(gc_time) /
1226 static_cast<double>(total_time)) * 100); 1225 static_cast<double>(total_time)) * 100);
1227 return result; 1226 return result;
1228 } 1227 }
1229 } 1228 }
1230 1229
1231 } // namespace dart 1230 } // namespace dart
OLDNEW
« no previous file with comments | « no previous file | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698