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

Side by Side Diff: src/spaces.h

Issue 12462002: Wait for sweeper threads in EnsureSweeperProgress() only if the main thread finished its sweeping p… (Closed) Base URL: https://v8.googlecode.com/svn/branches/bleeding_edge
Patch Set: Created 7 years, 9 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 | « src/mark-compact.cc ('k') | src/spaces.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 2011 the V8 project authors. All rights reserved. 1 // Copyright 2011 the V8 project authors. All rights reserved.
2 // Redistribution and use in source and binary forms, with or without 2 // Redistribution and use in source and binary forms, with or without
3 // modification, are permitted provided that the following conditions are 3 // modification, are permitted provided that the following conditions are
4 // met: 4 // met:
5 // 5 //
6 // * Redistributions of source code must retain the above copyright 6 // * Redistributions of source code must retain the above copyright
7 // notice, this list of conditions and the following disclaimer. 7 // notice, this list of conditions and the following disclaimer.
8 // * Redistributions in binary form must reproduce the above 8 // * Redistributions in binary form must reproduce the above
9 // copyright notice, this list of conditions and the following 9 // copyright notice, this list of conditions and the following
10 // disclaimer in the documentation and/or other materials provided 10 // disclaimer in the documentation and/or other materials provided
(...skipping 1747 matching lines...) Expand 10 before | Expand all | Expand 10 after
1758 ASSERT(ShouldBeSweptLazily(p)); 1758 ASSERT(ShouldBeSweptLazily(p));
1759 unswept_free_bytes_ -= (p->area_size() - p->LiveBytes()); 1759 unswept_free_bytes_ -= (p->area_size() - p->LiveBytes());
1760 } 1760 }
1761 1761
1762 void ResetUnsweptFreeBytes() { 1762 void ResetUnsweptFreeBytes() {
1763 unswept_free_bytes_ = 0; 1763 unswept_free_bytes_ = 0;
1764 } 1764 }
1765 1765
1766 bool AdvanceSweeper(intptr_t bytes_to_sweep); 1766 bool AdvanceSweeper(intptr_t bytes_to_sweep);
1767 1767
1768 // When parallel sweeper threads are active this function waits 1768 // When parallel sweeper threads are active and the main thread finished
1769 // for them to complete, otherwise AdvanceSweeper with size_in_bytes 1769 // its sweeping phase, this function waits for them to complete, otherwise
1770 // is called. 1770 // AdvanceSweeper with size_in_bytes is called.
1771 bool EnsureSweeperProgress(intptr_t size_in_bytes); 1771 bool EnsureSweeperProgress(intptr_t size_in_bytes);
1772 1772
1773 bool IsLazySweepingComplete() { 1773 bool IsLazySweepingComplete() {
1774 return !first_unswept_page_->is_valid(); 1774 return !first_unswept_page_->is_valid();
1775 } 1775 }
1776 1776
1777 Page* FirstPage() { return anchor_.next_page(); } 1777 Page* FirstPage() { return anchor_.next_page(); }
1778 Page* LastPage() { return anchor_.prev_page(); } 1778 Page* LastPage() { return anchor_.prev_page(); }
1779 1779
1780 void CountFreeListItems(Page* p, FreeList::SizeStats* sizes) { 1780 void CountFreeListItems(Page* p, FreeList::SizeStats* sizes) {
(...skipping 1042 matching lines...) Expand 10 before | Expand all | Expand 10 after
2823 } 2823 }
2824 // Must be small, since an iteration is used for lookup. 2824 // Must be small, since an iteration is used for lookup.
2825 static const int kMaxComments = 64; 2825 static const int kMaxComments = 64;
2826 }; 2826 };
2827 #endif 2827 #endif
2828 2828
2829 2829
2830 } } // namespace v8::internal 2830 } } // namespace v8::internal
2831 2831
2832 #endif // V8_SPACES_H_ 2832 #endif // V8_SPACES_H_
OLDNEW
« no previous file with comments | « src/mark-compact.cc ('k') | src/spaces.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698