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

Side by Side Diff: src/spaces.h

Issue 12378071: Fix assert in PagedSpace::SizeOfObject for concurrent sweeping. (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 | « no previous file | 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 1630 matching lines...) Expand 10 before | Expand all | Expand 10 after
1641 // immediately added to the free list so they show up here. 1641 // immediately added to the free list so they show up here.
1642 intptr_t Available() { return free_list_.available(); } 1642 intptr_t Available() { return free_list_.available(); }
1643 1643
1644 // Allocated bytes in this space. Garbage bytes that were not found due to 1644 // Allocated bytes in this space. Garbage bytes that were not found due to
1645 // lazy sweeping are counted as being allocated! The bytes in the current 1645 // lazy sweeping are counted as being allocated! The bytes in the current
1646 // linear allocation area (between top and limit) are also counted here. 1646 // linear allocation area (between top and limit) are also counted here.
1647 virtual intptr_t Size() { return accounting_stats_.Size(); } 1647 virtual intptr_t Size() { return accounting_stats_.Size(); }
1648 1648
1649 // As size, but the bytes in lazily swept pages are estimated and the bytes 1649 // As size, but the bytes in lazily swept pages are estimated and the bytes
1650 // in the current linear allocation area are not included. 1650 // in the current linear allocation area are not included.
1651 virtual intptr_t SizeOfObjects() { 1651 virtual intptr_t SizeOfObjects();
1652 // TODO(hpayer): broken when concurrent sweeping turned on
1653 ASSERT(!IsLazySweepingComplete() || (unswept_free_bytes_ == 0));
1654 return Size() - unswept_free_bytes_ - (limit() - top());
1655 }
1656 1652
1657 // Wasted bytes in this space. These are just the bytes that were thrown away 1653 // Wasted bytes in this space. These are just the bytes that were thrown away
1658 // due to being too small to use for allocation. They do not include the 1654 // due to being too small to use for allocation. They do not include the
1659 // free bytes that were not found at all due to lazy sweeping. 1655 // free bytes that were not found at all due to lazy sweeping.
1660 virtual intptr_t Waste() { return accounting_stats_.Waste(); } 1656 virtual intptr_t Waste() { return accounting_stats_.Waste(); }
1661 1657
1662 // Returns the allocation pointer in this space. 1658 // Returns the allocation pointer in this space.
1663 Address top() { return allocation_info_.top; } 1659 Address top() { return allocation_info_.top; }
1664 Address limit() { return allocation_info_.limit; } 1660 Address limit() { return allocation_info_.limit; }
1665 1661
(...skipping 1161 matching lines...) Expand 10 before | Expand all | Expand 10 after
2827 } 2823 }
2828 // Must be small, since an iteration is used for lookup. 2824 // Must be small, since an iteration is used for lookup.
2829 static const int kMaxComments = 64; 2825 static const int kMaxComments = 64;
2830 }; 2826 };
2831 #endif 2827 #endif
2832 2828
2833 2829
2834 } } // namespace v8::internal 2830 } } // namespace v8::internal
2835 2831
2836 #endif // V8_SPACES_H_ 2832 #endif // V8_SPACES_H_
OLDNEW
« no previous file with comments | « no previous file | src/spaces.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698